diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 000000000..37af41610 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,32 @@ +repos: + +- repo: https://github.com/psf/black + rev: 23.7.0 + hooks: + - id: black + name: Run black formatter + language_version: python3 + + +- repo: local + hooks: + + - id: mypy + name: Run mypy + entry: mypy application --ignore-missing-imports --follow-imports=skip + language: system + pass_filenames: false + + + - id: flask-tests + name: Run Flask tests + entry: make test + language: system + pass_filenames: false + + + - id: coverage-check + name: Coverage >= 70% + entry: make cover + language: system + pass_filenames: false diff --git a/Makefile b/Makefile index fa11162e7..79e18c618 100644 --- a/Makefile +++ b/Makefile @@ -58,7 +58,7 @@ test: flask routes && flask test cover: - . ./venv/bin/activate && FLASK_APP=cre.py FLASK_CONFIG=testing flask test --cover + . ./venv/bin/activate && FLASK_APP=cre.py FLASK_CONFIG=testing FLASK_COVERAGE=1 flask test --cover install-deps-python: [ -d "./venv" ] && . ./venv/bin/activate &&\ diff --git a/application/cmd/cre_main.py b/application/cmd/cre_main.py index ead5a4281..eec6eafe1 100644 --- a/application/cmd/cre_main.py +++ b/application/cmd/cre_main.py @@ -1,6 +1,8 @@ import time import argparse import json + +# mypy: disable-error-code="arg-type,return-value,union-attr,assignment,attr-defined" import logging import os import shutil @@ -192,7 +194,9 @@ def parse_file( else ( defs.Code if doctype == defs.Credoctypes.Code.value - else defs.Tool if doctype == defs.Credoctypes.Tool.value else None + else defs.Tool + if doctype == defs.Credoctypes.Tool.value + else None ) ) document = from_dict( diff --git a/application/config.py b/application/config.py index 8459f8208..40c3e96b8 100644 --- a/application/config.py +++ b/application/config.py @@ -13,6 +13,7 @@ class Config: GAP_ANALYSIS_OPTIMIZED = ( os.environ.get("GAP_ANALYSIS_OPTIMIZED", "False").lower() == "true" ) + ENABLE_MYOPENCRE = ENABLE_MYOPENCRE class DevelopmentConfig(Config): @@ -30,6 +31,7 @@ class TestingConfig(Config): CACHE_TYPE = "SimpleCache" TESTING = True SQLALCHEMY_DATABASE_URI = os.environ.get("TEST_DATABASE_URL") or "sqlite://" + ENABLE_MYOPENCRE = True class ProductionConfig(Config): diff --git a/application/database/db.py b/application/database/db.py index 6c1613277..8114ad9fd 100644 --- a/application/database/db.py +++ b/application/database/db.py @@ -402,7 +402,7 @@ def populate_DB(self, session): self.link_CRE_to_Node(lnk.cre, lnk.node, lnk.type) @classmethod - def add_cre(self, dbcre: CRE): + def add_cre(cls, dbcre: CRE): document = NeoCRE.nodes.first_or_none(document_id=dbcre.id) if not document: return NeoCRE( @@ -424,6 +424,7 @@ def add_cre(self, dbcre: CRE): document.external_id = dbcre.external_id or "" return document.save() + @staticmethod def __create_dbnode(dbnode: Node): if dbnode.ntype == "Standard": return NeoStandard( @@ -452,9 +453,10 @@ def __create_dbnode(dbnode: Node): version=dbnode.version or "", ).save() elif dbnode.ntype == "Tool": - ttype = [tag for tag in dbnode.tags if tag in cre_defs.ToolTypes] - if ttype: - ttype = ttype[0] + ttype_list = [tag for tag in dbnode.tags if tag in cre_defs.ToolTypes] + ttype: cre_defs.ToolTypes + if ttype_list: + ttype = ttype_list[0] else: ttype = cre_defs.ToolTypes.Unknown return NeoTool( @@ -470,6 +472,7 @@ def __create_dbnode(dbnode: Node): version=dbnode.version or "", ).save() + @staticmethod def __update_dbnode(dbnode: Node): existing = NeoNode.nodes.first_or_none(document_id=dbnode.id) if dbnode.ntype == "Standard": @@ -509,9 +512,10 @@ def __update_dbnode(dbnode: Node): existing.tags = ( [dbnode.tags] if isinstance(dbnode.tags, str) else dbnode.tags ) - ttype = [tag for tag in dbnode.tags if tag in cre_defs.ToolTypes] - if ttype: - ttype = ttype[0] + ttype_list = [tag for tag in dbnode.tags if tag in cre_defs.ToolTypes] + ttype: cre_defs.ToolTypes + if ttype_list: + ttype = ttype_list[0] else: ttype = cre_defs.ToolTypes.Unknown existing.tooltype = ttype @@ -563,23 +567,12 @@ def link_CRE_to_Node(self, CRE_id, node_id, link_type): @classmethod def gap_analysis(self, name_1, name_2): """ - Gap analysis with feature toggle support. - - Toggle between original exhaustive traversal (default) and - optimized tiered pruning (opt-in via GAP_ANALYSIS_OPTIMIZED env var). + Gap analysis with optimized tiered pruning. """ - from application.config import Config - - if Config.GAP_ANALYSIS_OPTIMIZED: - logger.info( - f"Gap Analysis: Using OPTIMIZED tiered pruning for {name_1}>>{name_2}" - ) - return self._gap_analysis_optimized(name_1, name_2) - else: - logger.info( - f"Gap Analysis: Using ORIGINAL exhaustive traversal for {name_1}>>{name_2}" - ) - return self._gap_analysis_original(name_1, name_2) + logger.info( + f"Gap Analysis: Using OPTIMIZED tiered pruning for {name_1}>>{name_2}" + ) + return self._gap_analysis_optimized(name_1, name_2) @classmethod def _gap_analysis_optimized(self, name_1, name_2): @@ -597,7 +590,8 @@ def _gap_analysis_optimized(self, name_1, name_2): denylist = ["Cross-cutting concerns"] # Tier 1: Strong Links (LINKED_TO, SAME, AUTOMATICALLY_LINKED_TO) - path_records, _ = db.cypher_query( + # Tier 1: Strong Links (LINKED_TO, AUTOMATICALLY_LINKED_TO, SAME) + strong_paths, _ = db.cypher_query( """ MATCH (BaseStandard:NeoStandard {name: $name1}) MATCH (CompareStandard:NeoStandard {name: $name2}) @@ -610,15 +604,12 @@ def _gap_analysis_optimized(self, name_1, name_2): resolve_objects=True, ) - # If strict strong links found, return early (Pruning) - if path_records and len(path_records) > 0: - logger.info( - f"Gap Analysis: Tier 1 (Strong) found {len(path_records)} paths. Pruning remainder." - ) - return self._format_gap_analysis_response(base_standard, path_records) + if strong_paths: + # return raw records for Tier 1 + return strong_paths # Tier 2: Medium Links (Add CONTAINS to the mix) - path_records, _ = db.cypher_query( + medium_paths, _ = db.cypher_query( """ MATCH (BaseStandard:NeoStandard {name: $name1}) MATCH (CompareStandard:NeoStandard {name: $name2}) @@ -631,17 +622,15 @@ def _gap_analysis_optimized(self, name_1, name_2): resolve_objects=True, ) - if path_records and len(path_records) > 0: - logger.info( - f"Gap Analysis: Tier 2 (Medium) found {len(path_records)} paths. Pruning remainder." - ) - return self._format_gap_analysis_response(base_standard, path_records) + if medium_paths: + # return raw records for Tier 2 + return medium_paths # Tier 3: Weak/All Links (Wildcard - The original expensive query) logger.info( "Gap Analysis: Tiers 1 & 2 empty. Executing Tier 3 (Wildcard search)." ) - path_records_all, _ = db.cypher_query( + broad_paths, _ = db.cypher_query( """ MATCH (BaseStandard:NeoStandard {name: $name1}) MATCH (CompareStandard:NeoStandard {name: $name2}) @@ -654,7 +643,8 @@ def _gap_analysis_optimized(self, name_1, name_2): resolve_objects=True, ) - return self._format_gap_analysis_response(base_standard, path_records_all) + # final fallback, return whatever Tier 3 produced (possibly empty) + return broad_paths @classmethod def _gap_analysis_original(self, name_1, name_2): @@ -777,12 +767,12 @@ def standards(self) -> List[str]: return list(set(results)) @classmethod - def everything(self) -> List[str]: + def everything(self) -> List[cre_defs.Document]: try: return [NEO_DB.parse_node(rec) for rec in NeoDocument.nodes.all()] except neo4j.exceptions.ServiceUnavailable: logger.error("Neo4j DB offline") - return None + return [] @staticmethod def parse_node(node: NeoDocument) -> cre_defs.Document: @@ -794,29 +784,26 @@ def parse_node_no_links(node: NeoDocument) -> cre_defs.Document: class Node_collection: - graph: inmemory_graph.CRE_Graph = None - neo_db: NEO_DB = None + graph: inmemory_graph.CRE_Graph + neo_db: NEO_DB | None = None session = sqla.session def __init__(self) -> None: if not os.environ.get("NO_LOAD_GRAPH_DB"): self.neo_db = NEO_DB.instance() self.session = sqla.session + self.graph = inmemory_graph.CRE_Graph() def with_graph(self) -> "Node_collection": - if self.graph is not None: + if len(self.graph.get_raw_graph().edges) == 0: + logger.info("Loading CRE graph in memory, memory-heavy operation!") + self.graph.with_graph( + graph=inmemory_graph.Singleton_Graph_Storage.instance(), + graph_data=self.__get_all_nodes_and_cres(cres_only=True), + ) + logger.info("Successfully loaded CRE graph in memory") + else: logger.debug("CRE graph already loaded, skipping reload") - return self - - logger.info("Loading CRE graph in memory, memory-heavy operation!") - self.graph = inmemory_graph.CRE_Graph() - graph_singleton = inmemory_graph.Singleton_Graph_Storage.instance() - self.graph.with_graph( - graph=graph_singleton, - graph_data=self.__get_all_nodes_and_cres(cres_only=True), - ) - logger.info("Successfully loaded CRE graph in memory") - return self def __get_external_links(self) -> List[Tuple[CRE, Node, str]]: @@ -869,9 +856,9 @@ def __get_unlinked_cres(self) -> List[CRE]: def __get_all_nodes_and_cres( self, cres_only: bool = False ) -> List[cre_defs.Document]: - result = [] - nodes = [] - cres = [] + result: List[cre_defs.Document] = [] + nodes: List[Node] = [] + cres: List[CRE] = [] if not cres_only: node_ids = self.session.query(Node.id).all() for nid in node_ids: @@ -879,7 +866,9 @@ def __get_all_nodes_and_cres( cre_ids = self.session.query(CRE.id).all() for cid in cre_ids: - result.append(self.get_cre_by_db_id(cid[0])) + cre = self.get_cre_by_db_id(cid[0]) + if cre: + result.append(cre) return result @classmethod @@ -981,23 +970,23 @@ def get_by_tags(self, tags: List[str]) -> List[cre_defs.Document]: cre_where_clause.append(sqla.and_(CRE.tags.like("%{}%".format(tag)))) nodes = Node.query.filter(*nodes_where_clause).all() or [] - for node in nodes: - node = self.get_nodes( - name=node.name, - section=node.section, - subsection=node.subsection, - version=node.version, - link=node.link, - ntype=node.ntype, - sectionID=node.section_id, + for query_node in nodes: + found_nodes = self.get_nodes( + name=query_node.name, + section=query_node.section, + subsection=query_node.subsection, + version=query_node.version, + link=query_node.link, + ntype=query_node.ntype, + sectionID=query_node.section_id, ) - if node: - documents.extend(node) + if found_nodes: + documents.extend(found_nodes) else: logger.fatal( "db.get_node returned None for" "Node %s:%s:%s that exists, BUG!" - % (node.name, node.section, node.section_id) + % (query_node.name, query_node.section, query_node.section_id) ) cres = CRE.query.filter(*cre_where_clause).all() or [] @@ -1026,13 +1015,13 @@ def get_nodes_with_pagination( ntype: str = cre_defs.Standard.__name__, description: Optional[str] = None, sectionID: Optional[str] = None, - ) -> Tuple[Optional[int], Optional[List[cre_defs.Standard]], Optional[List[Node]]]: + ) -> Tuple[Optional[int], Optional[List[cre_defs.Document]], Optional[Any]]: """ Returns the relevant node entries of a singular ntype (or ntype irrelevant if ntype==None) and their linked CREs include_only: If set, only the CRE ids in the list provided will be returned If a standard entry is not linked to by a CRE in the list the Standard entry will be returned empty. """ - nodes = [] + nodes: List[cre_defs.Document] = [] dbnodes = self.__get_nodes_query__( name=name, @@ -1049,6 +1038,8 @@ def get_nodes_with_pagination( if dbnodes.items: for dbnode in dbnodes.items: node = nodeFromDB(dbnode=dbnode) + if node is None: + continue linked_cres = Links.query.filter(Links.node == dbnode.id).all() for dbcre_link in linked_cres: dbcre = CRE.query.filter(CRE.id == dbcre_link.cre).first() @@ -1087,8 +1078,8 @@ def get_nodes( ntype: str = cre_defs.Standard.__name__, sectionID: Optional[str] = None, db_id: Optional[str] = None, - ) -> Optional[List[cre_defs.Node]]: - nodes = [] + ) -> List[cre_defs.Document]: + nodes: List[cre_defs.Document] = [] nodes_query = None if db_id: nodes_query = self.session.query(Node).filter(Node.id == db_id) @@ -1108,6 +1099,8 @@ def get_nodes( if dbnodes: for dbnode in dbnodes: node = nodeFromDB(dbnode=dbnode) + if node is None: + continue linked_cres = Links.query.filter(Links.node == dbnode.id).all() for dbcre_link in linked_cres: dbcre = CRE.query.filter(CRE.id == dbcre_link.cre).first() @@ -1140,7 +1133,7 @@ def get_nodes( return [] - def get_cre_by_db_id(self, id: str) -> cre_defs.CRE: + def get_cre_by_db_id(self, id: str) -> Optional[cre_defs.CRE]: """internal method, returns a shallow cre (no links) by its database id Args: @@ -1302,7 +1295,6 @@ def __make_cre_internal_links(self, cre: CRE) -> List[cre_defs.Link]: ) for internal_link in internal_links: - linked_cre_query = self.session.query(CRE) link_type = cre_defs.LinkTypes.from_str(internal_link.type) @@ -1331,7 +1323,7 @@ def __make_cre_internal_links(self, cre: CRE) -> List[cre_defs.Link]: return links def __make_cre_links( - self, cre: CRE, include_only_nodes: List[str] + self, cre: CRE, include_only_nodes: List[str] | None ) -> List[cre_defs.Link]: links = [] for link in self.session.query(Links).filter(Links.cre == cre.id).all(): @@ -1345,7 +1337,9 @@ def __make_cre_links( ) return links - def export(self, dir: str = None, dry_run: bool = False) -> List[cre_defs.Document]: + def export( + self, dir: str | None = None, dry_run: bool = False + ) -> List[cre_defs.Document]: """Exports the database to a CRE file collection on disk""" docs: Dict[str, cre_defs.Document] = {} cre, standard = None, None @@ -1407,7 +1401,7 @@ def export(self, dir: str = None, dry_run: bool = False) -> List[cre_defs.Docume if not dry_run: for _, doc in docs.items(): title = "" - if hasattr(doc, "id"): + if hasattr(doc, "id") and doc.id: title = ( doc.id.replace("/", "-") .replace(" ", "_") @@ -1415,7 +1409,7 @@ def export(self, dir: str = None, dry_run: bool = False) -> List[cre_defs.Docume .replace("'", "") + ".yaml" ) - elif hasattr(doc, "sectionID"): + elif hasattr(doc, "sectionID") and doc.sectionID: title = ( doc.name + "_" @@ -1425,21 +1419,33 @@ def export(self, dir: str = None, dry_run: bool = False) -> List[cre_defs.Docume .replace("'", "") + ".yaml" ) + elif isinstance(doc, cre_defs.Code): + title = ( + doc.name.replace("/", "-") + .replace(" ", "_") + .replace('"', "") + .replace("'", "") + + ".yaml" + ) else: - logger.fatal( - f"doc does not have neither sectionID nor id, this is a bug! {doc.__dict__}" + logger.error( + "doc does not have sectionID or id, this is a bug: %s", + doc.__dict__, + ) + raise ValueError( + "Document missing required identifier (sectionID or id)" ) file.writeToDisk( file_title=title, file_content=yaml.safe_dump(doc.todict()), - cres_loc=dir, + cres_loc=dir or "", ) return list(docs.values()) def all_cres_with_pagination( self, page: int = 1, per_page: int = 10 - ) -> List[cre_defs.CRE]: + ) -> Tuple[List[cre_defs.CRE], int, int]: result: List[cre_defs.CRE] = [] cres = self.session.query(CRE).paginate( page=int(page), per_page=per_page, error_out=False @@ -1450,9 +1456,6 @@ def all_cres_with_pagination( return result, page, total_pages def get_cre_path(self, fromID: str, toID: str) -> List[cre_defs.Document]: - if not self.graph: - self.with_graph() - fromDbID = ( self.session.query(CRE.id).filter(CRE.external_id == fromID).first()[0] ) @@ -1460,8 +1463,8 @@ def get_cre_path(self, fromID: str, toID: str) -> List[cre_defs.Document]: forwardPath = self.graph.get_path(f"CRE: {fromDbID}", f"CRE: {toDbID}") backwardsPath = self.graph.get_path(f"CRE: {toDbID}", f"CRE: {fromDbID}") - cres = [] - path = [] + cres: List[cre_defs.Document] = [] + path: List[str] = [] if forwardPath: # our graph is directed, so we need to check both paths path = forwardPath else: @@ -1476,11 +1479,11 @@ def get_cre_path(self, fromID: str, toID: str) -> List[cre_defs.Document]: return cres def get_cre_hierarchy(self, cre: cre_defs.CRE) -> int: - if not self.graph: - self.with_graph() roots = self.get_root_cres() root_cre_ids = [r.id for r in roots] + if not cre.id: + raise ValueError("CRE is missing required id; data is corrupted") return self.graph.get_hierarchy(rootIDs=root_cre_ids, creID=cre.id) # def all_nodes_with_pagination( @@ -1540,13 +1543,13 @@ def delete_gapanalysis_results_for(self, node_name): return res def add_cre(self, cre: cre_defs.CRE) -> CRE: - entry: CRE = None + entry: Optional[CRE] = None query = self.session.query(CRE).filter(func.lower(CRE.name) == cre.name.lower()) if cre.id: entry = query.filter(CRE.external_id == cre.id).first() else: entry = query.filter( - func.lower(CRE.description) == cre.description.lower() + func.lower(CRE.description) == (cre.description or "").lower() ).first() if entry is not None: @@ -1616,7 +1619,7 @@ def add_internal_link( higher: CRE, lower: CRE, ltype: cre_defs.LinkTypes, - ) -> cre_defs.Link: + ) -> Optional[cre_defs.Link]: """ adds a link between two CREs in the database, Args: @@ -1730,7 +1733,7 @@ def add_internal_link( return cre_defs.Link(document=lower, ltype=ltype) except inmemory_graph.CycleDetectedError as cde: # cycle detected, do nothing - pass + return None def add_link( self, @@ -1772,7 +1775,7 @@ def add_link( if self.graph: self.graph.add_link( doc_from=CREfromDB(cre), - link_to=cre_defs.Link(document=nodeFromDB(node), ltype=ltype.value), + link_to=cre_defs.Link(document=nodeFromDB(node), ltype=ltype), ) self.session.commit() @@ -1783,7 +1786,7 @@ def find_path_between_nodes( """One line method to return paths in a graph, this starts getting complicated when we have more linktypes""" res: bool = nx.has_path( - self.graph.graph.to_undirected(), + self.graph.get_raw_graph().to_undirected(), "Node: " + str(node_source_id), "Node: " + str(node_destination_id), ) @@ -1798,7 +1801,7 @@ def standards(self) -> List[str]: ) return list(set([s[0] for s in standards])) - def text_search(self, text: str) -> List[Optional[cre_defs.Document]]: + def text_search(self, text: str) -> List[cre_defs.Document]: """Given a piece of text, tries to find the best match for the text in the database. Shortcuts: @@ -1822,22 +1825,22 @@ def text_search(self, text: str) -> List[Optional[cre_defs.Document]]: ) match = re.search(cre_id_search, text, re.IGNORECASE) if match: - return self.get_CREs(external_id=match.group("id")) + return [cre for cre in self.get_CREs(external_id=match.group("id"))] match = re.search(cre_naked_id_search, text, re.IGNORECASE) if match: - return self.get_CREs(external_id=match.group()) + return [cre for cre in self.get_CREs(external_id=match.group())] match = re.search(cre_name_search, text, re.IGNORECASE) if match: - return self.get_CREs(name=match.group("name")) + return [cre for cre in self.get_CREs(name=match.group("name"))] match = re.search(node_search, text, re.IGNORECASE) if match: link = match.group("link") ntype = match.group("ntype") txt = match.group("val") - results: List[cre_defs.Document] = [] + node_results: List[cre_defs.Document] = [] if txt: args = txt.split(":") if ":" in txt else txt.split(" ") if len(args) < 4: @@ -1853,40 +1856,43 @@ def text_search(self, text: str) -> List[Optional[cre_defs.Document]]: sectionID=combo[3], ) if nodes: - results.extend(nodes) + node_results.extend(nodes) elif link or ntype: nodes = self.get_nodes(link=link, ntype=ntype) if nodes: - results.extend(nodes) - if results: - return list(set(results)) + node_results.extend(nodes) + if node_results: + return list(set(node_results)) # fuzzy matches second args = [f"%{text}%", "", "", "", "", ""] - results = {} - s = set([p for p in permutations(args, 6)]) - for combo in s: + results: Dict[str, cre_defs.Document] = {} + s6 = set([p for p in permutations(args, 6)]) + for combo6 in s6: nodes = self.get_nodes( - name=combo[0], - section=combo[1], - subsection=combo[2], - link=combo[3], - description=combo[4], + name=combo6[0], + section=combo6[1], + subsection=combo6[2], + link=combo6[3], + description=combo6[4], partial=True, ntype=None, # type: ignore - sectionID=combo[5], + sectionID=combo6[5], ) if nodes: for node in nodes: node_key = f"{node.name}:{node.version}:{node.section}:{node.sectionID}:{node.subsection}:" results[node_key] = node args = [f"%{text}%", None, None] - for combo in permutations(args, 3): + for combo3 in permutations(args, 3): cres = self.get_CREs( - name=combo[0], external_id=combo[1], description=combo[2], partial=True + name=combo3[0], + external_id=combo3[1], + description=combo3[2], + partial=True, ) if cres: for cre in cres: - results[cre.id] = cre + results[cre.id or ""] = cre return list(results.values()) def get_root_cres(self): @@ -1897,14 +1903,14 @@ def get_root_cres(self): .filter( ~CRE.id.in_( self.session.query(InternalLinks.cre).filter( - InternalLinks.type == cre_defs.LinkTypes.Contains, + InternalLinks.type == cre_defs.LinkTypes.Contains.value, ) ) ) .filter( ~CRE.id.in_( self.session.query(InternalLinks.group).filter( - InternalLinks.type == cre_defs.LinkTypes.PartOf, + InternalLinks.type == cre_defs.LinkTypes.PartOf.value, ) ) ) @@ -1946,7 +1952,9 @@ def get_embeddings_by_doc_type_paginated( res[entry.node_id] = [float(e) for e in entry.embeddings.split(",")] return res, total_pages, page - def get_embeddings_for_doc(self, doc: cre_defs.Node | cre_defs.CRE) -> Embeddings: + def get_embeddings_for_doc( + self, doc: cre_defs.Node | cre_defs.CRE + ) -> Optional[Embeddings]: if doc.doctype == cre_defs.Credoctypes.CRE: obj = self.session.query(CRE).filter(CRE.external_id == doc.id).first() return ( @@ -1955,7 +1963,7 @@ def get_embeddings_for_doc(self, doc: cre_defs.Node | cre_defs.CRE) -> Embedding .first() ) else: - node = dbNodeFromNode(doc) + node = dbNodeFromNode(cast(cre_defs.Node, doc)) if not node: logger.warning( f"cannot get embeddings for doc {doc.todict()} it's not translatable to a database document" @@ -1968,8 +1976,9 @@ def get_embeddings_for_doc(self, doc: cre_defs.Node | cre_defs.CRE) -> Embedding .filter(Embeddings.node_id == obj[0].id) .first() ) + return None - def get_embedding(self, object_id: str) -> Optional[Embeddings]: + def get_embedding(self, object_id: str) -> List[Embeddings]: return ( self.session.query(Embeddings) .filter( @@ -2025,7 +2034,7 @@ def gap_analysis_exists(self, cache_key) -> bool: ) return self.session.query(q.exists()).scalar() - def get_gap_analysis_result(self, cache_key) -> str: + def get_gap_analysis_result(self, cache_key) -> Optional[str]: logger.info(f"looking for gap analysis with cache key: {cache_key}") res = ( self.session.query(GapAnalysisResults) @@ -2036,6 +2045,7 @@ def get_gap_analysis_result(self, cache_key) -> str: logger.info(f"found gap analysis with cache key: {cache_key}") return res.ga_object logger.info(f"did not find gap analysis with cache key: {cache_key}") + return None def add_gap_analysis_result(self, cache_key: str, ga_object: str): if not self.gap_analysis_exists(cache_key): @@ -2107,7 +2117,7 @@ def dbNodeFromTool(tool: cre_defs.Node) -> Node: def nodeFromDB(dbnode: Node) -> cre_defs.Node: if not dbnode: - return None + raise ValueError("dbnode cannot be None") tags = [] if dbnode.tags: tags = list(set(dbnode.tags.split(","))) @@ -2151,7 +2161,7 @@ def nodeFromDB(dbnode: Node) -> cre_defs.Node: def CREfromDB(dbcre: CRE) -> cre_defs.CRE: if not dbcre: - return None + raise ValueError("dbcre cannot be None") tags = [] if dbcre.tags: tags = list(set(dbcre.tags.split(","))) @@ -2181,7 +2191,7 @@ def gap_analysis( if base_standard is None: return None grouped_paths = {} - extra_paths_dict = {} + extra_paths_dict: Dict[str, Dict[str, Dict[str, Any]]] = {} GA_STRONG_UPPER_LIMIT = 2 for node in base_standard: diff --git a/application/database/inmemory_graph.py b/application/database/inmemory_graph.py index be747326e..2bf5b1c4c 100644 --- a/application/database/inmemory_graph.py +++ b/application/database/inmemory_graph.py @@ -1,7 +1,7 @@ import sys import logging import networkx as nx -from typing import List, Tuple +from typing import Any, List, Optional from application.defs import cre_defs as defs @@ -16,31 +16,36 @@ def __init__(self, message): class Singleton_Graph_Storage(nx.DiGraph): - __instance: "Singleton_Graph_Storage" = None + __instance: Optional["Singleton_Graph_Storage"] = None @classmethod def instance(cls) -> "Singleton_Graph_Storage": if cls.__instance is None: - cls.__instance = nx.DiGraph() + cls.__instance = cls() return cls.__instance - def __init__(): - raise ValueError("CRE_Graph is a singleton, please call instance() instead") + def __init__(self) -> None: + super().__init__() + if Singleton_Graph_Storage.__instance is not None: + raise ValueError("CRE_Graph is a singleton, please call instance() instead") class CRE_Graph: - __graph: nx.Graph = None - __parent_child_subgraph = None + def __init__(self) -> None: + self.__graph: nx.DiGraph = Singleton_Graph_Storage.instance() + self.__parent_child_subgraph: Optional[nx.Graph] = None - def get_raw_graph(self): + def get_raw_graph(self) -> nx.DiGraph: return self.__graph - def with_graph(self, graph: nx.Graph, graph_data: List[defs.Document]): + def with_graph(self, graph: nx.DiGraph, graph_data: List[defs.Document]) -> None: self.__graph = graph if not len(graph.edges): self.__load_cre_graph(graph_data) - def introduces_cycle(self, doc_from: defs.Document, link_to: defs.Link): + def introduces_cycle( + self, doc_from: defs.Document, link_to: defs.Link + ) -> Optional[Any]: try: ex = self.has_cycle() if ex: @@ -54,7 +59,9 @@ def introduces_cycle(self, doc_from: defs.Document, link_to: defs.Link): # TODO: when this becomes too slow (e.g. when we are importing 1000s of CREs at once) # we can instead add the edge find the cycle and then remove the edge - new_graph = self.__graph.copy() + # Avoid NetworkX creating a new instance of our singleton subclass on copy(). + # Copy into a plain DiGraph for speculative cycle checks. + new_graph = nx.DiGraph(self.__graph) # this needs our special add_edge but with the copied graph new_graph = self.__add_graph_edge( @@ -65,15 +72,14 @@ def introduces_cycle(self, doc_from: defs.Document, link_to: defs.Link): except nx.exception.NetworkXNoCycle: return None - def has_cycle(self): + def has_cycle(self) -> Optional[Any]: try: ex = nx.find_cycle(self.__graph, orientation="original") return ex except nx.exception.NetworkXNoCycle: return None - def get_hierarchy(self, rootIDs: List[str], creID: str): - + def get_hierarchy(self, rootIDs: List[str], creID: str) -> int: if len(self.__graph.edges) == 0: logger.error("graph is empty") return -1 @@ -87,12 +93,14 @@ def get_hierarchy(self, rootIDs: List[str], creID: str): include_cres = [] for el in self.__graph.edges: edge_data = self.__graph.get_edge_data(*el) + if edge_data is None: + continue if ( el[0].startswith("CRE") and el[1].startswith("CRE") and ( - edge_data["ltype"] == defs.LinkTypes.Contains - or edge_data["ltype"] == defs.LinkTypes.PartOf + edge_data["ltype"] == defs.LinkTypes.Contains.value + or edge_data["ltype"] == defs.LinkTypes.PartOf.value ) ): include_cres.append(el[0]) @@ -106,6 +114,9 @@ def get_hierarchy(self, rootIDs: List[str], creID: str): self.__parent_child_subgraph = self.__graph.subgraph(set(include_cres)) shortest_path = sys.maxsize + if self.__parent_child_subgraph is None: + return shortest_path + for root in rootIDs: try: shortest_path = min( @@ -131,13 +142,13 @@ def get_hierarchy(self, rootIDs: List[str], creID: str): continue return shortest_path - def get_path(self, start: str, end: str) -> List[Tuple[str, str]]: + def get_path(self, start: str, end: str) -> List[str]: try: return nx.shortest_path(self.__graph, start, end) except nx.NetworkXNoPath: return [] - def add_cre(self, cre: defs.CRE): + def add_cre(self, cre: defs.CRE) -> None: if not isinstance(cre, defs.CRE): raise ValueError( f"inmemory graph add_cre takes only cre objects, instead got {type(cre)}" @@ -146,12 +157,12 @@ def add_cre(self, cre: defs.CRE): if cre and graph_cre not in self.__graph.nodes(): self.__graph.add_node(graph_cre, internal_id=cre.id) - def add_dbnode(self, dbnode: defs.Node): + def add_dbnode(self, dbnode: defs.Node) -> None: graph_node = "Node: " + str(dbnode.id) if dbnode and graph_node not in self.__graph.nodes(): self.__graph.add_node(graph_node, internal_id=dbnode.id) - def add_link(self, doc_from: defs.Document, link_to: defs.Link): + def add_link(self, doc_from: defs.Document, link_to: defs.Link) -> None: logger.debug( f"adding link {doc_from.id}, {link_to.document.id} ltype: {link_to.ltype}" ) @@ -174,7 +185,7 @@ def __add_graph_edge( doc_from: defs.Document, link_to: defs.Link, graph: nx.DiGraph, - ) -> nx.digraph: + ) -> nx.DiGraph: """ Adds a directed edge to the graph provided called by both graph population and speculative cycle finding methods @@ -185,7 +196,7 @@ def __add_graph_edge( f"cannot add an edge from a document to itself, from: {doc_from}, to: {link_to.document}" ) to_doctype = defs.Credoctypes.CRE.value - if link_to.document.doctype != defs.Credoctypes.CRE.value: + if link_to.document.doctype != defs.Credoctypes.CRE: to_doctype = "Node" if doc_from.doctype == defs.Credoctypes.CRE: @@ -233,21 +244,26 @@ def __add_graph_edge( ) return graph - def __load_cre_graph(self, documents: List[defs.Document]): + def __load_cre_graph(self, documents: List[defs.Document]) -> None: for doc in documents: if not doc: continue if doc.doctype == defs.Credoctypes.CRE: - self.add_cre(cre=doc) + if isinstance(doc, defs.CRE): + self.add_cre(cre=doc) else: - self.add_dbnode(dbnode=doc) + if isinstance(doc, defs.Node): + self.add_dbnode(dbnode=doc) for link in doc.links: if not link.document: logger.error(f"doc {doc}, has a link with a document that's None") + continue if link.document.doctype == defs.Credoctypes.CRE: - self.add_cre(cre=link.document) + if isinstance(link.document, defs.CRE): + self.add_cre(cre=link.document) else: - self.add_dbnode(dbnode=link.document) + if isinstance(link.document, defs.Node): + self.add_dbnode(dbnode=link.document) try: self.add_link(doc_from=doc, link_to=link) except CycleDetectedError as cde: diff --git a/application/defs/cre_defs.py b/application/defs/cre_defs.py index 5edf7121b..92df5fa40 100644 --- a/application/defs/cre_defs.py +++ b/application/defs/cre_defs.py @@ -1,528 +1,551 @@ -import re -import json -from copy import copy -from dataclasses import asdict, dataclass, field -from enum import Enum, EnumMeta -from typing import Any, Dict, List, Optional, Set, Union -from application.defs import cre_exceptions - - -class ExportFormat: # TODO: this can likely be replaced with a method that iterates over an object's vars and formats headers to - # :: - separator = "|" - section = "name" - subsection = "section" - hyperlink = "hyperlink" - link_type = "link_type" - # name = "name" - id = "id" - description = "description" - cre_link = "Linked_CRE_" - cre = "CRE" - tooltype = "ToolType" - sectionID = "id" - - @staticmethod - def get_doctype(header: str) -> Optional["Credoctypes"]: - """Given a header of type - ::<> - return the doctype - """ - typ = [t for t in Credoctypes if t in header] - if not typ: - return None - else: - return typ[0] - - @staticmethod - def node_name_key(sname: str) -> str: - """returns :: used mostly for matching""" - return "%s%s%s" % ( - ExportFormat.separator, - sname, - ExportFormat.separator, - ) - - # @staticmethod - # def tooltype_key(sname: str, doctype: "Credoctypes") -> str: - # "returns ::tooltype" - # return "%s%s%s%s%s" % ( - # doctype, - # ExportFormat.separator, - # sname, - # ExportFormat.separator, - # ExportFormat.tooltype, - # ) - - @staticmethod - def sectionID_key(sname: str) -> str: - "returns |id" - return "%s%s%s" % ( - sname, - ExportFormat.separator, - ExportFormat.sectionID, - ) - - @staticmethod - def description_key(sname: str) -> str: - "returns |description" - return "%s%s%s" % ( - sname, - ExportFormat.separator, - ExportFormat.description, - ) - - @staticmethod - def section_key(sname: str) -> str: - "returns |name" - return "%s%s%s" % ( - sname, - ExportFormat.separator, - ExportFormat.section, - ) - - @staticmethod - def subsection_key(sname: str) -> str: - "returns |section" - return "%s%s%s" % ( - sname, - ExportFormat.separator, - ExportFormat.subsection, - ) - - @staticmethod - def hyperlink_key(sname: str) -> str: - "returns |hyperlink" - return "%s%s%s" % ( - sname, - ExportFormat.separator, - ExportFormat.hyperlink, - ) - - # Todo(northdpole): the following to be uncommented when we import complex linktypes - # @staticmethod - # def link_type_key(sname: str, doctype: "Credoctypes") -> str: - # "returns :link_type" - # return "%s%s%s%s%s" % ( - # doctype.value, - # ExportFormat.separator, - # sname, - # ExportFormat.separator, - # ExportFormat.link_type, - # ) - - # @staticmethod - # def linked_cre_id_key(name: str) -> str: - # "returns Linked_CRE_:id" - # return "%s%s%s%s" % ( - # ExportFormat.cre_link, - # name, - # ExportFormat.separator, - # ExportFormat.id, - # ) - - # @staticmethod - # def linked_cre_name_key(name: str) -> str: - # "returns Linked_CRE_:name" - # return "%s%s%s%s" % ( - # ExportFormat.cre_link, - # name, - # ExportFormat.separator, - # ExportFormat.name, - # ) - - # @staticmethod - # def linked_cre_link_type_key(name: str) -> str: - # "returns Linked_CRE_:link_type" - # return "%s%s%s%s" % ( - # ExportFormat.cre_link, - # name, - # ExportFormat.separator, - # ExportFormat.link_type, - # ) - - # @staticmethod - # def cre_id_key() -> str: - # "returns CRE:id" - # return "%s%s%s" % ( - # ExportFormat.cre, - # ExportFormat.separator, - # ExportFormat.id, - # ) - - # @staticmethod - # def cre_name_key() -> str: - # "returns CRE:name" - # return "%s%s%s" % ( - # ExportFormat.cre, - # ExportFormat.separator, - # ExportFormat.name, - # ) - - # @staticmethod - # def cre_description_key() -> str: - # "returns CRE:description" - # return "%s%s%s" % ( - # ExportFormat.cre, - # ExportFormat.separator, - # ExportFormat.description, - # ) - - -class EnumMetaWithContains(EnumMeta): - def __contains__(cls: Enum, item: Any) -> bool: - return item in [v.value for v in cls.__members__.values()] - - -class Credoctypes(str, Enum, metaclass=EnumMetaWithContains): - CRE = "CRE" - Standard = "Standard" - Tool = "Tool" - Code = "Code" - - @staticmethod - def from_str(typ: str) -> "Credoctypes": - typ = [t for t in Credoctypes if t in typ] - if not typ: - return None - else: - return typ[0] - - -class LinkTypes(str, Enum, metaclass=EnumMetaWithContains): - LinkedTo = "Linked To" # Any standard entry is by default “linked” - PartOf = "Is Part Of" # Hierarchy above: “is part of” - Contains = "Contains" # Hierarchy below: “Contains” - Related = "Related" # Hierarchy across (other CRE topic or Tag): “related” - - AutomaticallyLinkedTo = "Automatically linked to" - RemediatedBy = "Remediated by" - Remediates = "Remediates" - - TestedBy = "TestedBy" - Tests = "Tests" - - @staticmethod - def from_str(name: str) -> Any: # it returns LinkTypes but then it won't run - res = [x for x in LinkTypes if x.value == name] - if not res: - raise KeyError( - f"{name} is not a valid linktype, supported linktypes are {[t for t in LinkTypes]}" - ) - return res[0] - - @classmethod - def opposite(cls, typ) -> Any: # it returns the opposite of the type provided - if typ == cls.Contains: - return cls.PartOf - elif typ == cls.PartOf: - return cls.Contains - elif typ == cls.LinkedTo: - return typ - elif typ == cls.Related: - return typ - elif typ == cls.RemediatedBy: - return cls.Remediates - elif typ == cls.Remediates: - return cls.RemediatedBy - elif typ == cls.TestedBy: - return cls.Tests - elif typ == cls.Tests: - return cls.TestedBy - - -class ToolTypes(str, Enum, metaclass=EnumMetaWithContains): - Offensive = "Offensive" - Defensive = "Defensive" - Training = "Training" - Unknown = "Unknown" - - @staticmethod - def from_str(tooltype: str) -> Optional["ToolTypes"]: - if tooltype: - ttype = [t for t in ToolTypes if t.value.lower() == tooltype.lower()] - if ttype: - return ttype[0] - return None - - -@dataclass -class Link: - document: "Document" - ltype: LinkTypes - tags: List[str] = field(default_factory=list) - - def __post_init__(self): - if self.tags is None: - self.tags = [] - - if type(self.ltype) == str: - self.ltype = LinkTypes.from_str(self.ltype) - - def __hash__(self) -> int: - return hash(json.dumps(self.todict())) - - def __repr__(self) -> str: - return json.dumps(self.todict()) - - def __eq__(self, other: object) -> bool: - return ( - type(other) is Link - and self.ltype.value == other.ltype.value - and self.tags == other.tags - and self.document.__eq__(other.document) - ) - - def todict(self) -> Dict[str, Union[List[str], str, Dict[Any, Any]]]: - res: Dict[str, Union[List[str], str, Dict[Any, Any]]] = {} - if self.document: - res["document"] = self.document.todict() - else: - raise ValueError( - f"Found Link not containing a document, this is a bug, for debugging, the tags for this Link are {self.tags}" - ) - self.tags = [x for x in self.tags if x != ""] - if self.tags and len(self.tags): - res["tags"] = self.tags - - res["ltype"] = "" + self.ltype.value - return res - - -@dataclass(init=True, repr=True, eq=True, order=True) -class Document: - name: str - doctype: Credoctypes - description: Optional[str] = "" - links: List[Link] = field(default_factory=list) - embeddings: List[float] = field(default_factory=list) - embeddings_text: str = "" - tags: List[str] = field(default_factory=list) - metadata: Dict[str, Any] = field(default_factory=dict) - - def __eq__(self, other: object) -> bool: - return ( - isinstance(other, type(self)) - and self.id == other.id - and self.name == other.name - and self.doctype.value == other.doctype.value - and self.description == other.description - and len(self.links) == len(other.links) - and all( - [ - a in other.links and b in self.links - for a in self.links - for b in other.links - ] - ) - and all( - [ - a in other.tags and b in self.tags - for a in self.tags - for b in other.tags - ] - ) - and self.metadata == other.metadata - and all( - [ - a in other.embeddings and b in self.embeddings - for a in self.embeddings - for b in other.embeddings - ] - ) - and self.embeddings_text == other.embeddings_text - ) - - def __hash__(self) -> int: - return hash(json.dumps(self.todict())) - - def shallow_copy(self) -> Any: - """Returns a copy of itself minus the Links, - useful when creating links between cres""" - res = copy(self) - res.links = [] - return res - - def todict(self) -> Dict[str, Union[Dict[str, str], List[Any], Set[str], str]]: - res = asdict( - self, - dict_factory=lambda x: { - k: v if type(v) == list or type(v) == set or type(v) == dict else str(v) - for (k, v) in x - if v not in ["", {}, [], None, set()] - }, - ) - res["doctype"] = self.doctype.value + "" - if "links" in res: - res["links"] = [l.todict() for l in self.links] - if "tags" in res: - res["tags"] = list(self.tags) - return res - - def __repr__(self): - return f"{self.todict()}" - - def has_link(self, link: Link) -> bool: - return link.document.id in [l.document.id for l in self.links] - - def add_link(self, link: Link) -> "Document": - if not self.links: - self.links = [] - if not isinstance(link, Link): - raise ValueError( - f"add_link only takes Link() types, instead it was provided with '{type(link)}', that's an internal bug, please open a ticket" - ) - if link.document.id == self.id: - raise ValueError( - f"Cannot link a document to itself, {self.id} is the same as the link" - ) - if link.document.id in [l.document.id for l in self.links]: - raise cre_exceptions.DuplicateLinkException( - f"Cannot link the same document twice, document {link.document.id} is already linked to {self.id}" - ) - - self.links.append(link) - return self - - def __post_init__(self): - if not len(self.name) > 1: - raise cre_exceptions.InvalidDocumentNameException(self) - - @classmethod - def from_dict(self, input_doc: Dict): - document = None - if input_doc.get("doctype") == Credoctypes.CRE: - document = CRE(**input_doc) - document.doctype = Credoctypes.CRE - elif input_doc.get("doctype") == Credoctypes.Standard: - document = Standard(**input_doc) - document.doctype = Credoctypes.Standard - - elif input_doc.get("doctype") == Credoctypes.Tool: - document = Tool(**input_doc) - document.doctype = Credoctypes.Tool - document.tooltype = ToolTypes.from_str(document.tooltype) - links = document.links - document.links = [] - for link in links: - doc = Document.from_dict(link["document"]) - l = Link(document=doc, ltype=LinkTypes.from_str(link["ltype"])) - document.add_link(l) - return document - - -@dataclass(eq=False) -class CRE(Document): - doctype: Credoctypes = Credoctypes.CRE - id: Optional[str] = "" - - def todict(self) -> Dict[str, Dict[str, str] | List[Any] | Set[str] | str]: - return super().todict() - - def __post_init__(self): - if not re.match(r"\d\d\d-\d\d\d", self.id): - raise cre_exceptions.InvalidCREIDException(self) - - -@dataclass -class Node(Document): - id: Optional[str] = "" - hyperlink: Optional[str] = "" - version: Optional[str] = "" - - def todict(self): - res = super().todict() - if self.hyperlink: - res["hyperlink"] = self.hyperlink - return res - - def __eq__(self, other: object) -> bool: - return ( - isinstance(other, type(self)) - and super().__eq__(other) - and self.hyperlink == other.hyperlink - ) - - -@dataclass -class Standard(Node): - section: str = "" - sectionID: str = "" - doctype: Credoctypes = Credoctypes.Standard - subsection: Optional[str] = "" - - def __post_init__(self): - self.id = f"{self.name}" - if self.sectionID: - self.id += f":{self.sectionID}" - if self.section: - self.id += f":{self.section}" - if self.subsection: - self.id += f":{self.subsection}" - if self.hyperlink: - self.id += f":{self.hyperlink}" - if self.version: - self.id += f":{self.version}" - - return super().__post_init__() - - def todict(self) -> Dict[Any, Any]: - res = super().todict() - res["section"] = self.section - if self.subsection: - res["subsection"] = self.subsection - if self.version: - res["version"] = self.version - if self.sectionID: - res["sectionID"] = self.sectionID - return res - - def __hash__(self) -> int: - return hash(json.dumps(self.todict())) - - def __eq__(self, other: object) -> bool: - return ( - super().__eq__(other) - and self.section == other.section - and self.subsection == other.subsection - and self.version == other.version - and self.sectionID == other.sectionID - ) - - -@dataclass -class Tool(Standard): - tooltype: ToolTypes = ToolTypes.Unknown - doctype: Credoctypes = Credoctypes.Tool - - def __post_init__(self): - self.id = f"{self.name}" - if self.sectionID: - self.id += f":{self.sectionID}" - if self.section: - self.id += f":{self.section}" - if self.subsection: - self.id += f":{self.subsection}" - if self.hyperlink: - self.id += f":{self.hyperlink}" - if self.version: - self.id += f":{self.version}" - if self.tooltype != ToolTypes.Unknown: - self.id += f":{self.tooltype}" - return super().__post_init__() - - def __eq__(self, other: object) -> bool: - return super().__eq__(other) and self.tooltype == other.tooltype - - def todict(self) -> Dict[str, Any]: - res = super().todict() - res["tooltype"] = self.tooltype.value + "" - return res - - def __hash__(self) -> int: - return hash(json.dumps(self.todict())) - - +import re +import json +from copy import copy +from dataclasses import asdict, dataclass, field +from enum import Enum, EnumMeta +from typing import Any, Dict, List, Optional, Set, Union, Iterable +from application.defs import cre_exceptions + + +class ExportFormat: # TODO: this can likely be replaced with a method that iterates over an object's vars and formats headers to + # :: + separator = "|" + section = "name" + subsection = "section" + hyperlink = "hyperlink" + link_type = "link_type" + # name = "name" + id = "id" + description = "description" + cre_link = "Linked_CRE_" + cre = "CRE" + tooltype = "ToolType" + sectionID = "id" + + @staticmethod + def get_doctype(header: str) -> Optional["Credoctypes"]: + """Given a header of type + ::<> + return the doctype + """ + typ = [t for t in Credoctypes if t in header] + if not typ: + return None + else: + return typ[0] + + @staticmethod + def node_name_key(sname: str) -> str: + """returns :: used mostly for matching""" + return "%s%s%s" % ( + ExportFormat.separator, + sname, + ExportFormat.separator, + ) + + # @staticmethod + # def tooltype_key(sname: str, doctype: "Credoctypes") -> str: + # "returns ::tooltype" + # return "%s%s%s%s%s" % ( + # doctype, + # ExportFormat.separator, + # sname, + # ExportFormat.separator, + # ExportFormat.tooltype, + # ) + + @staticmethod + def sectionID_key(sname: str) -> str: + "returns |id" + return "%s%s%s" % ( + sname, + ExportFormat.separator, + ExportFormat.sectionID, + ) + + @staticmethod + def description_key(sname: str) -> str: + "returns |description" + return "%s%s%s" % ( + sname, + ExportFormat.separator, + ExportFormat.description, + ) + + @staticmethod + def section_key(sname: str) -> str: + "returns |name" + return "%s%s%s" % ( + sname, + ExportFormat.separator, + ExportFormat.section, + ) + + @staticmethod + def subsection_key(sname: str) -> str: + "returns |section" + return "%s%s%s" % ( + sname, + ExportFormat.separator, + ExportFormat.subsection, + ) + + @staticmethod + def hyperlink_key(sname: str) -> str: + "returns |hyperlink" + return "%s%s%s" % ( + sname, + ExportFormat.separator, + ExportFormat.hyperlink, + ) + + # Todo(northdpole): the following to be uncommented when we import complex linktypes + # @staticmethod + # def link_type_key(sname: str, doctype: "Credoctypes") -> str: + # "returns :link_type" + # return "%s%s%s%s%s" % ( + # doctype.value, + # ExportFormat.separator, + # sname, + # ExportFormat.separator, + # ExportFormat.link_type, + # ) + + # @staticmethod + # def linked_cre_id_key(name: str) -> str: + # "returns Linked_CRE_:id" + # return "%s%s%s%s" % ( + # ExportFormat.cre_link, + # name, + # ExportFormat.separator, + # ExportFormat.id, + # ) + + # @staticmethod + # def linked_cre_name_key(name: str) -> str: + # "returns Linked_CRE_:name" + # return "%s%s%s%s" % ( + # ExportFormat.cre_link, + # name, + # ExportFormat.separator, + # ExportFormat.name, + # ) + + # @staticmethod + # def linked_cre_link_type_key(name: str) -> str: + # "returns Linked_CRE_:link_type" + # return "%s%s%s%s" % ( + # ExportFormat.cre_link, + # name, + # ExportFormat.separator, + # ExportFormat.link_type, + # ) + + # @staticmethod + # def cre_id_key() -> str: + # "returns CRE:id" + # return "%s%s%s" % ( + # ExportFormat.cre, + # ExportFormat.separator, + # ExportFormat.id, + # ) + + # @staticmethod + # def cre_name_key() -> str: + # "returns CRE:name" + # return "%s%s%s" % ( + # ExportFormat.cre, + # ExportFormat.separator, + # ExportFormat.name, + # ) + + # @staticmethod + # def cre_description_key() -> str: + # "returns CRE:description" + # return "%s%s%s" % ( + # ExportFormat.cre, + # ExportFormat.separator, + # ExportFormat.description, + # ) + + +class EnumMetaWithContains(EnumMeta): + def __contains__(cls, item: Any) -> bool: + # give explicit type for members to help mypy + members: Iterable[Enum] = cls.__members__.values() # type: ignore[name-defined] + return item in [v.value for v in members] + + +class Credoctypes(str, Enum, metaclass=EnumMetaWithContains): + CRE = "CRE" + Standard = "Standard" + Tool = "Tool" + Code = "Code" + + @staticmethod + def from_str(typ: str) -> Optional["Credoctypes"]: + matching: list[Credoctypes] = [t for t in Credoctypes if t in typ] + if not matching: + return None + else: + return matching[0] + + +class LinkTypes(str, Enum, metaclass=EnumMetaWithContains): + LinkedTo = "Linked To" # Any standard entry is by default “linked” + PartOf = "Is Part Of" # Hierarchy above: “is part of” + Contains = "Contains" # Hierarchy below: “Contains” + Related = "Related" # Hierarchy across (other CRE topic or Tag): “related” + + AutomaticallyLinkedTo = "Automatically linked to" + RemediatedBy = "Remediated by" + Remediates = "Remediates" + + TestedBy = "TestedBy" + Tests = "Tests" + + @staticmethod + def from_str(name: str) -> "LinkTypes": + res = [x for x in LinkTypes if x.value == name] + if not res: + raise KeyError( + f"{name} is not a valid linktype, supported linktypes are {[t for t in LinkTypes]}" + ) + return res[0] + + @classmethod + def opposite(cls, typ) -> Any: # it returns the opposite of the type provided + if typ == cls.Contains: + return cls.PartOf + elif typ == cls.PartOf: + return cls.Contains + elif typ == cls.LinkedTo: + return typ + elif typ == cls.Related: + return typ + elif typ == cls.RemediatedBy: + return cls.Remediates + elif typ == cls.Remediates: + return cls.RemediatedBy + elif typ == cls.TestedBy: + return cls.Tests + elif typ == cls.Tests: + return cls.TestedBy + + +class ToolTypes(str, Enum, metaclass=EnumMetaWithContains): + Offensive = "Offensive" + Defensive = "Defensive" + Training = "Training" + Unknown = "Unknown" + + @staticmethod + def from_str(tooltype: str) -> Optional["ToolTypes"]: + if tooltype: + ttype = [t for t in ToolTypes if t.value.lower() == tooltype.lower()] + if ttype: + return ttype[0] + return None + + +@dataclass +class Link: + document: "Document" + ltype: LinkTypes + tags: List[str] = field(default_factory=list) + + def __post_init__(self): + if self.tags is None: + self.tags = [] + + if type(self.ltype) == str: + self.ltype = LinkTypes.from_str(self.ltype) + + def __hash__(self) -> int: + return hash(json.dumps(self.todict())) + + def __repr__(self) -> str: + return json.dumps(self.todict()) + + def __eq__(self, other: object) -> bool: + return ( + type(other) is Link + and self.ltype.value == other.ltype.value + and self.tags == other.tags + and self.document.__eq__(other.document) + ) + + def todict(self) -> Dict[str, Union[List[str], str, Dict[Any, Any]]]: + res: Dict[str, Union[List[str], str, Dict[Any, Any]]] = {} + if self.document: + res["document"] = self.document.todict() + else: + raise ValueError( + f"Found Link not containing a document, this is a bug, for debugging, the tags for this Link are {self.tags}" + ) + self.tags = [x for x in self.tags if x != ""] + if self.tags and len(self.tags): + res["tags"] = self.tags + + res["ltype"] = "" + self.ltype.value + return res + + +@dataclass(init=True, repr=True, eq=True, order=True) +class Document: + name: str + doctype: Credoctypes + id: Optional[str] = "" + hyperlink: Optional[str] = "" + section: Optional[str] = "" + sectionID: Optional[str] = "" + subsection: Optional[str] = "" + version: Optional[str] = "" + tooltype: Optional["ToolTypes"] = None + description: Optional[str] = "" + links: List[Link] = field(default_factory=list) + embeddings: List[float] = field(default_factory=list) + embeddings_text: str = "" + tags: List[str] = field(default_factory=list) + metadata: Dict[str, Any] = field(default_factory=dict) + + def __eq__(self, other: object) -> bool: + return ( + isinstance(other, type(self)) + and self.id == other.id + and self.name == other.name + and self.doctype.value == other.doctype.value + and self.description == other.description + and len(self.links) == len(other.links) + and all( + [ + a in other.links and b in self.links + for a in self.links + for b in other.links + ] + ) + and all( + [ + a in other.tags and b in self.tags + for a in self.tags + for b in other.tags + ] + ) + and self.metadata == other.metadata + and all( + [ + a in other.embeddings and b in self.embeddings + for a in self.embeddings + for b in other.embeddings + ] + ) + and self.embeddings_text == other.embeddings_text + ) + + def __hash__(self) -> int: + return hash(json.dumps(self.todict())) + + def shallow_copy(self) -> Any: + """Returns a copy of itself minus the Links, + useful when creating links between cres""" + res = copy(self) + res.links = [] + return res + + def todict(self) -> Dict[str, Union[Dict[str, str], List[Any], Set[str], str]]: + res = asdict( + self, + dict_factory=lambda x: { + k: v if type(v) == list or type(v) == set or type(v) == dict else str(v) + for (k, v) in x + if v not in ["", {}, [], None, set()] + }, + ) + res["doctype"] = self.doctype.value + "" + if "links" in res: + res["links"] = [l.todict() for l in self.links] + if "tags" in res: + res["tags"] = list(self.tags) + return res + + def __repr__(self): + return f"{self.todict()}" + + def has_link(self, link: Link) -> bool: + return link.document.id in [l.document.id for l in self.links] + + def add_link(self, link: Link) -> "Document": + if not self.links: + self.links = [] + if not isinstance(link, Link): + raise ValueError( + f"add_link only takes Link() types, instead it was provided with '{type(link)}', that's an internal bug, please open a ticket" + ) + if link.document.id == self.id: + raise ValueError( + f"Cannot link a document to itself, {self.id} is the same as the link" + ) + if link.document.id in [l.document.id for l in self.links]: + raise cre_exceptions.DuplicateLinkException( + f"Cannot link the same document twice, document {link.document.id} is already linked to {self.id}" + ) + + self.links.append(link) + return self + + def __post_init__(self): + if not len(self.name) > 1: + raise cre_exceptions.InvalidDocumentNameException(self) + + @classmethod + def from_dict(cls, input_doc: Dict) -> Optional["Document"]: + document: Document | None = None + if input_doc.get("doctype") == Credoctypes.CRE: + document = CRE(**input_doc) + document.doctype = Credoctypes.CRE + elif input_doc.get("doctype") == Credoctypes.Standard: + document = Standard(**input_doc) + document.doctype = Credoctypes.Standard + + elif input_doc.get("doctype") == Credoctypes.Tool: + document = Tool(**input_doc) + document.doctype = Credoctypes.Tool + tt = ToolTypes.from_str(document.tooltype) + document.tooltype = tt or ToolTypes.Unknown + if not document: + return None + links: List[Any] = document.links + document.links = [] + for link in links: + if isinstance(link, dict): + doc = Document.from_dict(link["document"]) + if doc is not None: + l = Link(document=doc, ltype=LinkTypes.from_str(link["ltype"])) + document.add_link(l) + elif isinstance(link, Link): + document.add_link(link) + else: + # unexpected format, ignore + continue + return document + + +@dataclass(eq=False) +class CRE(Document): + doctype: Credoctypes = Credoctypes.CRE + id: Optional[str] = "" + + def todict(self) -> Dict[str, Dict[str, str] | List[Any] | Set[str] | str]: + return super().todict() + + def __post_init__(self): + if not re.match(r"\d\d\d-\d\d\d", self.id): + raise cre_exceptions.InvalidCREIDException(self) + + +@dataclass +class Node(Document): + id: Optional[str] = "" + hyperlink: Optional[str] = "" + version: Optional[str] = "" + + def todict(self): + res = super().todict() + if self.hyperlink: + res["hyperlink"] = self.hyperlink + return res + + def __eq__(self, other: object) -> bool: + return ( + isinstance(other, type(self)) + and super().__eq__(other) + and self.hyperlink == other.hyperlink + ) + + +@dataclass +class Standard(Node): + section: str = "" + sectionID: str = "" + doctype: Credoctypes = Credoctypes.Standard + subsection: Optional[str] = "" + + def __post_init__(self): + self.id = f"{self.name}" + if self.sectionID: + self.id += f":{self.sectionID}" + if self.section: + self.id += f":{self.section}" + if self.subsection: + self.id += f":{self.subsection}" + if self.hyperlink: + self.id += f":{self.hyperlink}" + if self.version: + self.id += f":{self.version}" + + return super().__post_init__() + + def todict(self) -> Dict[Any, Any]: + res = super().todict() + res["section"] = self.section + if self.subsection: + res["subsection"] = self.subsection + if self.version: + res["version"] = self.version + if self.sectionID: + res["sectionID"] = self.sectionID + return res + + def __hash__(self) -> int: + return hash(json.dumps(self.todict())) + + def __eq__(self, other: object) -> bool: + if not isinstance(other, Standard): + return False + return ( + super().__eq__(other) + and self.section == other.section + and self.subsection == other.subsection + and self.version == other.version + and self.sectionID == other.sectionID + ) + + +@dataclass +class Tool(Standard): + tooltype: ToolTypes = ToolTypes.Unknown + doctype: Credoctypes = Credoctypes.Tool + + def __post_init__(self): + self.id = f"{self.name}" + if self.sectionID: + self.id += f":{self.sectionID}" + if self.section: + self.id += f":{self.section}" + if self.subsection: + self.id += f":{self.subsection}" + if self.hyperlink: + self.id += f":{self.hyperlink}" + if self.version: + self.id += f":{self.version}" + if self.tooltype != ToolTypes.Unknown: + self.id += f":{self.tooltype}" + return super().__post_init__() + + def __eq__(self, other: object) -> bool: + if not isinstance(other, Tool): + return False + return super().__eq__(other) and self.tooltype == other.tooltype + + def todict(self) -> Dict[str, Any]: + res = super().todict() + res["tooltype"] = self.tooltype.value + "" + return res + + def __hash__(self) -> int: + return hash(json.dumps(self.todict())) + + @dataclass(eq=False) class Code(Node): doctype: Credoctypes = Credoctypes.Code diff --git a/application/defs/osib_defs.py b/application/defs/osib_defs.py index 89c204704..622e1a831 100644 --- a/application/defs/osib_defs.py +++ b/application/defs/osib_defs.py @@ -178,44 +178,61 @@ def _parse_node( if english_attrs: if node_type == defs.Credoctypes.Standard: res = defs.Standard( - name=name, - section=current_path.replace(f"{root}.{orgname}.", ""), - hyperlink=english_attrs.source if english_attrs.source else "", + name=str(name) if name else "", + section=str(current_path.replace(f"{root}.{orgname}.", "")), + hyperlink=str(english_attrs.source) if english_attrs.source else "", ) elif node_type == defs.Credoctypes.Code: res = defs.Code( - name=name, - description=english_attrs.description, - hyperlink=english_attrs.source if english_attrs.source else "", + name=str(name) if name else "", + description=str(english_attrs.description) + if english_attrs.description + else "", + hyperlink=str(english_attrs.source) if english_attrs.source else "", ) elif node_type == defs.Credoctypes.Tool: ttype = [ t for t in defs.ToolTypes - if "categories" in vars(osib.attributes) + if osib.attributes and osib.attributes.categories - and t in osib.attributes.categories + and t.value in osib.attributes.categories ] + tooltype_value = None if ttype: - ttype = ttype[0] - osib.attributes.categories.remove(ttype) - osib.attributes.categories.remove(node_type) + tooltype_value = ttype[0] + if osib.attributes and osib.attributes.categories: + try: + osib.attributes.categories.remove(tooltype_value.value) + except ValueError: + pass + try: + if node_type: + osib.attributes.categories.remove(node_type.value) + except Exception: + pass res = defs.Tool( - name=name, - description=english_attrs.description, - hyperlink=english_attrs.source if english_attrs.source else "", - tooltype=ttype if ttype else defs.ToolTypes.Unknown, - section=english_attrs.section if english_attrs.section else "", + name=str(name) if name else "", + description=str(english_attrs.description) + if english_attrs.description + else "", + hyperlink=str(english_attrs.source) if english_attrs.source else "", + tooltype=tooltype_value + if tooltype_value + else defs.ToolTypes.Unknown, + section=str(english_attrs.section) if english_attrs.section else "", sectionID=( - english_attrs.sectionID if english_attrs.sectionID else "" + str(english_attrs.sectionID) if english_attrs.sectionID else "" ), ) elif node_type == defs.Credoctypes.CRE: res = defs.CRE( - name=name, - description=english_attrs.description, - hyperlink=english_attrs.source if english_attrs.source else "", + name=str(name) if name else "", + description=str(english_attrs.description) + if english_attrs.description + else "", + hyperlink=str(english_attrs.source) if english_attrs.source else "", ) else: raise ValueError("OSIB node type unknown") @@ -232,7 +249,7 @@ def _parse_node( for olink in osib.attributes.links: linked_doc = find_doc(olink) - if olink.type: + if linked_doc and olink.type: if olink.type.lower() == "parent": res.add_link( link=defs.Link( @@ -310,18 +327,14 @@ def osib2cre(tree: Osib_tree) -> Tuple[List[defs.CRE], List[defs.Standard]]: ) ) else: - cres.extend( - [ - defs.CRE(d) - for d in _parse_node( - root=root, - orgname=str(orgname), - osib=project, - node_type=defs.Credoctypes.CRE, - current_path=f"{root}.{orgname}", - ) - ] + parsed_cres = _parse_node( + root=root, + orgname=str(orgname), + osib=project, + node_type=defs.Credoctypes.CRE, + current_path=f"{root}.{orgname}", ) + cres.extend([d for d in parsed_cres if isinstance(d, defs.CRE)]) return (cres, standards) @@ -392,7 +405,11 @@ def paths_to_osib( path = f"OSIB.OWASP.CRE.{r[0]}" result[r[0]] = osibs[r[0]] - osibs[r[0]].attributes.links.append(_Link(link=path, type="Related")) + attrs0 = osibs[r[0]].attributes + if attrs0 is None: + attrs0 = Node_attributes() + osibs[r[0]].attributes = attrs0 + attrs0.links.append(_Link(link=path, type="Related")) path = "" if l1: @@ -400,15 +417,23 @@ def paths_to_osib( else: path = f"OSIB.OWASP.CRE.{r[1]}" result[r[1]] = osibs[r[1]] - osibs[r[1]].attributes.links.append(_Link(link=path, type="Related")) + attrs1 = osibs[r[1]].attributes + if attrs1 is None: + attrs1 = Node_attributes() + osibs[r[1]].attributes = attrs1 + attrs1.links.append(_Link(link=path, type="Related")) # build the child-tree structure for osib_path in sorted(osib_paths, key=len): pwo = None for oid in osib_path.split("."): if pwo is not None: - if oid not in pwo.children: - pwo.children[oid] = osibs[oid] + children = pwo.children + if children is None: + children = {} + pwo.children = children + if oid not in children: + children[oid] = osibs[oid] else: result[oid] = osibs[oid] pwo = osibs[oid] @@ -419,7 +444,6 @@ def paths_to_osib( def cre2osib(docs: List[defs.Document]) -> Osib_tree: # TODO: This only works with a link depth of 1, this is the general assumption for CREs but would be nice to make it work recursively - osib_paths: List[str] = [] related_nodes: List[Tuple[str, str]] = [] cres = {} root = "OSIB" @@ -430,30 +454,36 @@ def cre2osib(docs: List[defs.Document]) -> Osib_tree: # TODO: get this to update paths attaching the TYPE of document that is in this path somehow, maybe as part of node attrs(?) for doc in docs: - cres[doc.id] = doc + if doc.id: + cres[doc.id] = doc for link in doc.links: - cres[link.document.id] = link.document + if link.document.id: + cres[link.document.id] = link.document if link.ltype == defs.LinkTypes.PartOf: - osib_paths = update_paths( + osib_graph = update_paths( paths=osib_graph, - pid=link.document.id, - cid=doc.id, + pid=link.document.id or "", + cid=doc.id or "", rel_type=link.ltype, ) elif link.ltype == defs.LinkTypes.Contains: - osib_paths = update_paths( + osib_graph = update_paths( paths=osib_graph, - pid=doc.id, - cid=link.document.id, + pid=doc.id or "", + cid=link.document.id or "", rel_type=link.ltype, ) elif link.ltype == defs.LinkTypes.Related: - related_nodes.append((doc.id, link.document.id)) + if doc.id and link.document.id: + related_nodes.append((doc.id, link.document.id)) elif link.ltype == defs.LinkTypes.LinkedTo: - related_nodes.append((doc.id, link.document.id)) + if doc.id and link.document.id: + related_nodes.append((doc.id, link.document.id)) + # Extract paths from the graph + osib_paths = [list(p) for p in osib_graph.nodes()] return paths_to_osib( - osib_paths=[".".join(p) for p in osib_paths], + osib_paths=[str(p) for p in osib_paths], cres=cres, related_nodes=related_nodes, ) diff --git a/application/frontend/www/bundle.js b/application/frontend/www/bundle.js index e5ac0cc91..e52025ab4 100644 --- a/application/frontend/www/bundle.js +++ b/application/frontend/www/bundle.js @@ -1,2 +1,3 @@ /*! For license information please see bundle.js.LICENSE.txt */ -(()=>{var e={23:e=>{"use strict";function t(e){e.languages.mizar={comment:/::.+/,keyword:/@proof\b|\b(?:according|aggregate|all|and|antonym|are|as|associativity|assume|asymmetry|attr|be|begin|being|by|canceled|case|cases|clusters?|coherence|commutativity|compatibility|connectedness|consider|consistency|constructors|contradiction|correctness|def|deffunc|define|definitions?|defpred|do|does|end|environ|equals|ex|exactly|existence|for|from|func|given|hence|hereby|holds|idempotence|identity|iff?|implies|involutiveness|irreflexivity|is|it|let|means|mode|non|not|notations?|now|of|or|otherwise|over|per|pred|prefix|projectivity|proof|provided|qua|reconsider|redefine|reduce|reducibility|reflexivity|registrations?|requirements|reserve|sch|schemes?|section|selector|set|sethood|st|struct|such|suppose|symmetry|synonym|take|that|the|then|theorems?|thesis|thus|to|transitivity|uniqueness|vocabular(?:ies|y)|when|where|with|wrt)\b/,parameter:{pattern:/\$(?:10|\d)/,alias:"variable"},variable:/\b\w+(?=:)/,number:/(?:\b|-)\d+\b/,operator:/\.\.\.|->|&|\.?=/,punctuation:/\(#|#\)|[,:;\[\](){}]/}}e.exports=t,t.displayName="mizar",t.aliases=[]},33:e=>{"use strict";function t(e){!function(e){for(var t=/\(\*(?:[^(*]|\((?!\*)|\*(?!\))|)*\*\)/.source,n=0;n<2;n++)t=t.replace(//g,function(){return t});t=t.replace(//g,"[]"),e.languages.coq={comment:RegExp(t),string:{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},attribute:[{pattern:RegExp(/#\[(?:[^\[\]("]|"(?:[^"]|"")*"(?!")|\((?!\*)|)*\]/.source.replace(//g,function(){return t})),greedy:!0,alias:"attr-name",inside:{comment:RegExp(t),string:{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},operator:/=/,punctuation:/^#\[|\]$|[,()]/}},{pattern:/\b(?:Cumulative|Global|Local|Monomorphic|NonCumulative|Polymorphic|Private|Program)\b/,alias:"attr-name"}],keyword:/\b(?:Abort|About|Add|Admit|Admitted|All|Arguments|As|Assumptions|Axiom|Axioms|Back|BackTo|Backtrace|BinOp|BinOpSpec|BinRel|Bind|Blacklist|Canonical|Case|Cd|Check|Class|Classes|Close|CoFixpoint|CoInductive|Coercion|Coercions|Collection|Combined|Compute|Conjecture|Conjectures|Constant|Constants|Constraint|Constructors|Context|Corollary|Create|CstOp|Custom|Cut|Debug|Declare|Defined|Definition|Delimit|Dependencies|Dependent|Derive|Diffs|Drop|Elimination|End|Entry|Equality|Eval|Example|Existential|Existentials|Existing|Export|Extern|Extraction|Fact|Fail|Field|File|Firstorder|Fixpoint|Flags|Focus|From|Funclass|Function|Functional|GC|Generalizable|Goal|Grab|Grammar|Graph|Guarded|Haskell|Heap|Hide|Hint|HintDb|Hints|Hypotheses|Hypothesis|IF|Identity|Immediate|Implicit|Implicits|Import|Include|Induction|Inductive|Infix|Info|Initial|InjTyp|Inline|Inspect|Instance|Instances|Intro|Intros|Inversion|Inversion_clear|JSON|Language|Left|Lemma|Let|Lia|Libraries|Library|Load|LoadPath|Locate|Ltac|Ltac2|ML|Match|Method|Minimality|Module|Modules|Morphism|Next|NoInline|Notation|Number|OCaml|Obligation|Obligations|Opaque|Open|Optimize|Parameter|Parameters|Parametric|Path|Paths|Prenex|Preterm|Primitive|Print|Profile|Projections|Proof|Prop|PropBinOp|PropOp|PropUOp|Property|Proposition|Pwd|Qed|Quit|Rec|Record|Recursive|Redirect|Reduction|Register|Relation|Remark|Remove|Require|Reserved|Reset|Resolve|Restart|Rewrite|Right|Ring|Rings|SProp|Saturate|Save|Scheme|Scope|Scopes|Search|SearchHead|SearchPattern|SearchRewrite|Section|Separate|Set|Setoid|Show|Signatures|Solve|Solver|Sort|Sortclass|Sorted|Spec|Step|Strategies|Strategy|String|Structure|SubClass|Subgraph|SuchThat|Tactic|Term|TestCompile|Theorem|Time|Timeout|To|Transparent|Type|Typeclasses|Types|Typing|UnOp|UnOpSpec|Undelimit|Undo|Unfocus|Unfocused|Unfold|Universe|Universes|Unshelve|Variable|Variables|Variant|Verbose|View|Visibility|Zify|_|apply|as|at|by|cofix|else|end|exists|exists2|fix|for|forall|fun|if|in|let|match|measure|move|removed|return|struct|then|using|wf|where|with)\b/,number:/\b(?:0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]+)?(?:p[+-]?\d[\d_]*)?|\d[\d_]*(?:\.[\d_]+)?(?:e[+-]?\d[\d_]*)?)\b/i,punct:{pattern:/@\{|\{\||\[=|:>/,alias:"punctuation"},operator:/\/\\|\\\/|\.{2,3}|:{1,2}=|\*\*|[-=]>|<(?:->?|[+:=>]|<:)|>(?:=|->)|\|[-|]?|[-!%&*+/<=>?@^~']/,punctuation:/\.\(|`\(|@\{|`\{|\{\||\[=|:>|[:.,;(){}\[\]]/}}(e)}e.exports=t,t.displayName="coq",t.aliases=[]},41:(e,t)=>{"use strict";var n,r,i,a;if("object"==typeof performance&&"function"==typeof performance.now){var o=performance;t.unstable_now=function(){return o.now()}}else{var s=Date,c=s.now();t.unstable_now=function(){return s.now()-c}}if("undefined"==typeof window||"function"!=typeof MessageChannel){var l=null,u=null,f=function(){if(null!==l)try{var e=t.unstable_now();l(!0,e),l=null}catch(e){throw setTimeout(f,0),e}};n=function(e){null!==l?setTimeout(n,0,e):(l=e,setTimeout(f,0))},r=function(e,t){u=setTimeout(e,t)},i=function(){clearTimeout(u)},t.unstable_shouldYield=function(){return!1},a=t.unstable_forceFrameRate=function(){}}else{var h=window.setTimeout,d=window.clearTimeout;if("undefined"!=typeof console){var p=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!=typeof p&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var g=!1,b=null,m=-1,w=5,v=0;t.unstable_shouldYield=function(){return t.unstable_now()>=v},a=function(){},t.unstable_forceFrameRate=function(e){0>e||125>>1,i=e[r];if(!(void 0!==i&&0T(o,n))void 0!==c&&0>T(c,o)?(e[r]=c,e[s]=n,r=s):(e[r]=o,e[a]=n,r=a);else{if(!(void 0!==c&&0>T(c,n)))break e;e[r]=c,e[s]=n,r=s}}}return t}return null}function T(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var A=[],k=[],C=1,M=null,I=3,O=!1,R=!1,N=!1;function P(e){for(var t=S(k);null!==t;){if(null===t.callback)x(k);else{if(!(t.startTime<=e))break;x(k),t.sortIndex=t.expirationTime,_(A,t)}t=S(k)}}function L(e){if(N=!1,P(e),!R)if(null!==S(A))R=!0,n(D);else{var t=S(k);null!==t&&r(L,t.startTime-e)}}function D(e,n){R=!1,N&&(N=!1,i()),O=!0;var a=I;try{for(P(n),M=S(A);null!==M&&(!(M.expirationTime>n)||e&&!t.unstable_shouldYield());){var o=M.callback;if("function"==typeof o){M.callback=null,I=M.priorityLevel;var s=o(M.expirationTime<=n);n=t.unstable_now(),"function"==typeof s?M.callback=s:M===S(A)&&x(A),P(n)}else x(A);M=S(A)}if(null!==M)var c=!0;else{var l=S(k);null!==l&&r(L,l.startTime-n),c=!1}return c}finally{M=null,I=a,O=!1}}var F=a;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){R||O||(R=!0,n(D))},t.unstable_getCurrentPriorityLevel=function(){return I},t.unstable_getFirstCallbackNode=function(){return S(A)},t.unstable_next=function(e){switch(I){case 1:case 2:case 3:var t=3;break;default:t=I}var n=I;I=t;try{return e()}finally{I=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=F,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=I;I=e;try{return t()}finally{I=n}},t.unstable_scheduleCallback=function(e,a,o){var s=t.unstable_now();switch(o="object"==typeof o&&null!==o&&"number"==typeof(o=o.delay)&&0s?(e.sortIndex=o,_(k,e),null===S(A)&&e===S(k)&&(N?i():N=!0,r(L,o-s))):(e.sortIndex=c,_(A,e),R||O||(R=!0,n(D))),e},t.unstable_wrapCallback=function(e){var t=I;return function(){var n=I;I=t;try{return e.apply(this,arguments)}finally{I=n}}}},56:e=>{"use strict";function t(e){!function(e){var t={pattern:/(\b\d+)(?:%|[a-z]+)/,lookbehind:!0},n={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0},r={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},url:{pattern:/\burl\((["']?).*?\1\)/i,greedy:!0},string:{pattern:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,greedy:!0},interpolation:null,func:null,important:/\B!(?:important|optional)\b/i,keyword:{pattern:/(^|\s+)(?:(?:else|for|if|return|unless)(?=\s|$)|@[\w-]+)/,lookbehind:!0},hexcode:/#[\da-f]{3,6}/i,color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,boolean:/\b(?:false|true)\b/,operator:[/~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.{2,3}|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/],number:n,punctuation:/[{}()\[\];:,]/};r.interpolation={pattern:/\{[^\r\n}:]+\}/,alias:"variable",inside:{delimiter:{pattern:/^\{|\}$/,alias:"punctuation"},rest:r}},r.func={pattern:/[\w-]+\([^)]*\).*/,inside:{function:/^[^(]+/,rest:r}},e.languages.stylus={"atrule-declaration":{pattern:/(^[ \t]*)@.+/m,lookbehind:!0,inside:{atrule:/^@[\w-]+/,rest:r}},"variable-declaration":{pattern:/(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:\{[^{}]*\}|\S.*|$)/m,lookbehind:!0,inside:{variable:/^\S+/,rest:r}},statement:{pattern:/(^[ \t]*)(?:else|for|if|return|unless)[ \t].+/m,lookbehind:!0,inside:{keyword:/^\S+/,rest:r}},"property-declaration":{pattern:/((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)(?!\s)[^{\r\n]*(?:;|[^{\r\n,]$(?!(?:\r?\n|\r)(?:\{|\2[ \t])))/m,lookbehind:!0,inside:{property:{pattern:/^[^\s:]+/,inside:{interpolation:r.interpolation}},rest:r}},selector:{pattern:/(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t])))/m,lookbehind:!0,inside:{interpolation:r.interpolation,comment:r.comment,punctuation:/[{},]/}},func:r.func,string:r.string,comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0,greedy:!0},interpolation:r.interpolation,punctuation:/[{}()\[\];:.]/}}(e)}e.exports=t,t.displayName="stylus",t.aliases=[]},58:e=>{"use strict";function t(e){!function(e){var t=/(?:\r?\n|\r)[ \t]*\|.+\|(?:(?!\|).)*/.source;e.languages.gherkin={pystring:{pattern:/("""|''')[\s\S]+?\1/,alias:"string"},comment:{pattern:/(^[ \t]*)#.*/m,lookbehind:!0},tag:{pattern:/(^[ \t]*)@\S*/m,lookbehind:!0},feature:{pattern:/((?:^|\r?\n|\r)[ \t]*)(?:Ability|Ahoy matey!|Arwedd|Aspekt|Besigheid Behoefte|Business Need|Caracteristica|Característica|Egenskab|Egenskap|Eiginleiki|Feature|Fīča|Fitur|Fonctionnalité|Fonksyonalite|Funcionalidade|Funcionalitat|Functionalitate|Funcţionalitate|Funcționalitate|Functionaliteit|Fungsi|Funkcia|Funkcija|Funkcionalitāte|Funkcionalnost|Funkcja|Funksie|Funktionalität|Funktionalitéit|Funzionalità|Hwaet|Hwæt|Jellemző|Karakteristik|Lastnost|Mak|Mogucnost|laH|Mogućnost|Moznosti|Možnosti|OH HAI|Omadus|Ominaisuus|Osobina|Özellik|Potrzeba biznesowa|perbogh|poQbogh malja'|Požadavek|Požiadavka|Pretty much|Qap|Qu'meH 'ut|Savybė|Tính năng|Trajto|Vermoë|Vlastnosť|Właściwość|Značilnost|Δυνατότητα|Λειτουργία|Могућност|Мөмкинлек|Особина|Свойство|Үзенчәлеклелек|Функционал|Функционалност|Функция|Функціонал|תכונה|خاصية|خصوصیت|صلاحیت|کاروبار کی ضرورت|وِیژگی|रूप लेख|ਖਾਸੀਅਤ|ਨਕਸ਼ ਨੁਹਾਰ|ਮੁਹਾਂਦਰਾ|గుణము|ಹೆಚ್ಚಳ|ความต้องการทางธุรกิจ|ความสามารถ|โครงหลัก|기능|フィーチャ|功能|機能):(?:[^:\r\n]+(?:\r?\n|\r|$))*/,lookbehind:!0,inside:{important:{pattern:/(:)[^\r\n]+/,lookbehind:!0},keyword:/[^:\r\n]+:/}},scenario:{pattern:/(^[ \t]*)(?:Abstract Scenario|Abstrakt Scenario|Achtergrond|Aer|Ær|Agtergrond|All y'all|Antecedentes|Antecedents|Atburðarás|Atburðarásir|Awww, look mate|B4|Background|Baggrund|Bakgrund|Bakgrunn|Bakgrunnur|Beispiele|Beispiller|Bối cảnh|Cefndir|Cenario|Cenário|Cenario de Fundo|Cenário de Fundo|Cenarios|Cenários|Contesto|Context|Contexte|Contexto|Conto|Contoh|Contone|Dæmi|Dasar|Dead men tell no tales|Delineacao do Cenario|Delineação do Cenário|Dis is what went down|Dữ liệu|Dyagram Senaryo|Dyagram senaryo|Egzanp|Ejemplos|Eksempler|Ekzemploj|Enghreifftiau|Esbozo do escenario|Escenari|Escenario|Esempi|Esquema de l'escenari|Esquema del escenario|Esquema do Cenario|Esquema do Cenário|EXAMPLZ|Examples|Exempel|Exemple|Exemples|Exemplos|First off|Fono|Forgatókönyv|Forgatókönyv vázlat|Fundo|Geçmiş|Grundlage|Hannergrond|ghantoH|Háttér|Heave to|Istorik|Juhtumid|Keadaan|Khung kịch bản|Khung tình huống|Kịch bản|Koncept|Konsep skenario|Kontèks|Kontekst|Kontekstas|Konteksts|Kontext|Konturo de la scenaro|Latar Belakang|lut chovnatlh|lut|lutmey|Lýsing Atburðarásar|Lýsing Dæma|MISHUN SRSLY|MISHUN|Menggariskan Senario|mo'|Náčrt Scenára|Náčrt Scénáře|Náčrt Scenáru|Oris scenarija|Örnekler|Osnova|Osnova Scenára|Osnova scénáře|Osnutek|Ozadje|Paraugs|Pavyzdžiai|Példák|Piemēri|Plan du scénario|Plan du Scénario|Plan Senaryo|Plan senaryo|Plang vum Szenario|Pozadí|Pozadie|Pozadina|Príklady|Příklady|Primer|Primeri|Primjeri|Przykłady|Raamstsenaarium|Reckon it's like|Rerefons|Scenár|Scénář|Scenarie|Scenarij|Scenarijai|Scenarijaus šablonas|Scenariji|Scenārijs|Scenārijs pēc parauga|Scenarijus|Scenario|Scénario|Scenario Amlinellol|Scenario Outline|Scenario Template|Scenariomal|Scenariomall|Scenarios|Scenariu|Scenariusz|Scenaro|Schema dello scenario|Se ðe|Se the|Se þe|Senario|Senaryo Deskripsyon|Senaryo deskripsyon|Senaryo|Senaryo taslağı|Shiver me timbers|Situācija|Situai|Situasie Uiteensetting|Situasie|Skenario konsep|Skenario|Skica|Structura scenariu|Structură scenariu|Struktura scenarija|Stsenaarium|Swa hwaer swa|Swa|Swa hwær swa|Szablon scenariusza|Szenario|Szenariogrundriss|Tapaukset|Tapaus|Tapausaihio|Taust|Tausta|Template Keadaan|Template Senario|Template Situai|The thing of it is|Tình huống|Variantai|Voorbeelde|Voorbeelden|Wharrimean is|Yo-ho-ho|You'll wanna|Założenia|Παραδείγματα|Περιγραφή Σεναρίου|Σενάρια|Σενάριο|Υπόβαθρο|Кереш|Контекст|Концепт|Мисаллар|Мисоллар|Основа|Передумова|Позадина|Предистория|Предыстория|Приклади|Пример|Примери|Примеры|Рамка на сценарий|Скица|Структура сценарија|Структура сценария|Структура сценарію|Сценарий|Сценарий структураси|Сценарийның төзелеше|Сценарији|Сценарио|Сценарій|Тарих|Үрнәкләр|דוגמאות|רקע|תבנית תרחיש|תרחיש|الخلفية|الگوی سناریو|امثلة|پس منظر|زمینه|سناریو|سيناريو|سيناريو مخطط|مثالیں|منظر نامے کا خاکہ|منظرنامہ|نمونه ها|उदाहरण|परिदृश्य|परिदृश्य रूपरेखा|पृष्ठभूमि|ਉਦਾਹਰਨਾਂ|ਪਟਕਥਾ|ਪਟਕਥਾ ਢਾਂਚਾ|ਪਟਕਥਾ ਰੂਪ ਰੇਖਾ|ਪਿਛੋਕੜ|ఉదాహరణలు|కథనం|నేపథ్యం|సన్నివేశం|ಉದಾಹರಣೆಗಳು|ಕಥಾಸಾರಾಂಶ|ವಿವರಣೆ|ಹಿನ್ನೆಲೆ|โครงสร้างของเหตุการณ์|ชุดของตัวอย่าง|ชุดของเหตุการณ์|แนวคิด|สรุปเหตุการณ์|เหตุการณ์|배경|시나리오|시나리오 개요|예|サンプル|シナリオ|シナリオアウトライン|シナリオテンプレ|シナリオテンプレート|テンプレ|例|例子|剧本|剧本大纲|劇本|劇本大綱|场景|场景大纲|場景|場景大綱|背景):[^:\r\n]*/m,lookbehind:!0,inside:{important:{pattern:/(:)[^\r\n]*/,lookbehind:!0},keyword:/[^:\r\n]+:/}},"table-body":{pattern:RegExp("("+t+")(?:"+t+")+"),lookbehind:!0,inside:{outline:{pattern:/<[^>]+>/,alias:"variable"},td:{pattern:/\s*[^\s|][^|]*/,alias:"string"},punctuation:/\|/}},"table-head":{pattern:RegExp(t),inside:{th:{pattern:/\s*[^\s|][^|]*/,alias:"variable"},punctuation:/\|/}},atrule:{pattern:/(^[ \t]+)(?:'a|'ach|'ej|7|a|A také|A taktiež|A tiež|A zároveň|Aber|Ac|Adott|Akkor|Ak|Aleshores|Ale|Ali|Allora|Alors|Als|Ama|Amennyiben|Amikor|Ampak|an|AN|Ananging|And y'all|And|Angenommen|Anrhegedig a|An|Apabila|Atès|Atesa|Atunci|Avast!|Aye|A|awer|Bagi|Banjur|Bet|Biết|Blimey!|Buh|But at the end of the day I reckon|But y'all|But|BUT|Cal|Când|Cand|Cando|Ce|Cuando|Če|Ða ðe|Ða|Dadas|Dada|Dados|Dado|DaH ghu' bejlu'|dann|Dann|Dano|Dan|Dar|Dat fiind|Data|Date fiind|Date|Dati fiind|Dati|Daţi fiind|Dați fiind|DEN|Dato|De|Den youse gotta|Dengan|Diberi|Diyelim ki|Donada|Donat|Donitaĵo|Do|Dun|Duota|Ðurh|Eeldades|Ef|Eğer ki|Entao|Então|Entón|E|En|Entonces|Epi|És|Etant donnée|Etant donné|Et|Étant données|Étant donnée|Étant donné|Etant données|Etant donnés|Étant donnés|Fakat|Gangway!|Gdy|Gegeben seien|Gegeben sei|Gegeven|Gegewe|ghu' noblu'|Gitt|Given y'all|Given|Givet|Givun|Ha|Cho|I CAN HAZ|In|Ir|It's just unbelievable|I|Ja|Jeśli|Jeżeli|Kad|Kada|Kadar|Kai|Kaj|Když|Keď|Kemudian|Ketika|Khi|Kiedy|Ko|Kuid|Kui|Kun|Lan|latlh|Le sa a|Let go and haul|Le|Lè sa a|Lè|Logo|Lorsqu'<|Lorsque|mä|Maar|Mais|Mając|Ma|Majd|Maka|Manawa|Mas|Men|Menawa|Mutta|Nalika|Nalikaning|Nanging|Når|När|Nato|Nhưng|Niin|Njuk|O zaman|Och|Og|Oletetaan|Ond|Onda|Oraz|Pak|Pero|Però|Podano|Pokiaľ|Pokud|Potem|Potom|Privzeto|Pryd|Quan|Quand|Quando|qaSDI'|Så|Sed|Se|Siis|Sipoze ke|Sipoze Ke|Sipoze|Si|Şi|Și|Soit|Stel|Tada|Tad|Takrat|Tak|Tapi|Ter|Tetapi|Tha the|Tha|Then y'all|Then|Thì|Thurh|Toda|Too right|Un|Und|ugeholl|Và|vaj|Vendar|Ve|wann|Wanneer|WEN|Wenn|When y'all|When|Wtedy|Wun|Y'know|Yeah nah|Yna|Youse know like when|Youse know when youse got|Y|Za predpokladu|Za předpokladu|Zadan|Zadani|Zadano|Zadate|Zadato|Zakładając|Zaradi|Zatati|Þa þe|Þa|Þá|Þegar|Þurh|Αλλά|Δεδομένου|Και|Όταν|Τότε|А також|Агар|Але|Али|Аммо|А|Әгәр|Әйтик|Әмма|Бирок|Ва|Вә|Дадено|Дано|Допустим|Если|Задате|Задати|Задато|И|І|К тому же|Када|Кад|Когато|Когда|Коли|Ләкин|Лекин|Нәтиҗәдә|Нехай|Но|Онда|Припустимо, що|Припустимо|Пусть|Также|Та|Тогда|Тоді|То|Унда|Һәм|Якщо|אבל|אזי|אז|בהינתן|וגם|כאשר|آنگاه|اذاً|اگر|اما|اور|با فرض|بالفرض|بفرض|پھر|تب|ثم|جب|عندما|فرض کیا|لكن|لیکن|متى|هنگامی|و|अगर|और|कदा|किन्तु|चूंकि|जब|तथा|तदा|तब|परन्तु|पर|यदि|ਅਤੇ|ਜਦੋਂ|ਜਿਵੇਂ ਕਿ|ਜੇਕਰ|ਤਦ|ਪਰ|అప్పుడు|ఈ పరిస్థితిలో|కాని|చెప్పబడినది|మరియు|ಆದರೆ|ನಂತರ|ನೀಡಿದ|ಮತ್ತು|ಸ್ಥಿತಿಯನ್ನು|กำหนดให้|ดังนั้น|แต่|เมื่อ|และ|그러면<|그리고<|단<|만약<|만일<|먼저<|조건<|하지만<|かつ<|しかし<|ただし<|ならば<|もし<|並且<|但し<|但是<|假如<|假定<|假設<|假设<|前提<|同时<|同時<|并且<|当<|當<|而且<|那么<|那麼<)(?=[ \t])/m,lookbehind:!0},string:{pattern:/"(?:\\.|[^"\\\r\n])*"|'(?:\\.|[^'\\\r\n])*'/,inside:{outline:{pattern:/<[^>]+>/,alias:"variable"}}},outline:{pattern:/<[^>]+>/,alias:"variable"}}}(e)}e.exports=t,t.displayName="gherkin",t.aliases=[]},60:e=>{"use strict";function t(e){e.languages.xojo={comment:{pattern:/(?:'|\/\/|Rem\b).+/i,greedy:!0},string:{pattern:/"(?:""|[^"])*"/,greedy:!0},number:[/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,/&[bchou][a-z\d]+/i],directive:{pattern:/#(?:Else|ElseIf|Endif|If|Pragma)\b/i,alias:"property"},keyword:/\b(?:AddHandler|App|Array|As(?:signs)?|Auto|Boolean|Break|By(?:Ref|Val)|Byte|Call|Case|Catch|CFStringRef|CGFloat|Class|Color|Const|Continue|CString|Currency|CurrentMethodName|Declare|Delegate|Dim|Do(?:uble|wnTo)?|Each|Else(?:If)?|End|Enumeration|Event|Exception|Exit|Extends|False|Finally|For|Function|Get|GetTypeInfo|Global|GOTO|If|Implements|In|Inherits|Int(?:8|16|32|64|eger|erface)?|Lib|Loop|Me|Module|Next|Nil|Object|Optional|OSType|ParamArray|Private|Property|Protected|PString|Ptr|Raise(?:Event)?|ReDim|RemoveHandler|Return|Select(?:or)?|Self|Set|Shared|Short|Single|Soft|Static|Step|String|Sub|Super|Text|Then|To|True|Try|Ubound|UInt(?:8|16|32|64|eger)?|Until|Using|Var(?:iant)?|Wend|While|WindowPtr|WString)\b/i,operator:/<[=>]?|>=?|[+\-*\/\\^=]|\b(?:AddressOf|And|Ctype|IsA?|Mod|New|Not|Or|WeakAddressOf|Xor)\b/i,punctuation:/[.,;:()]/}}e.exports=t,t.displayName="xojo",t.aliases=[]},61:e=>{"use strict";function t(e){e.languages["splunk-spl"]={comment:/`comment\("(?:\\.|[^\\"])*"\)`/,string:{pattern:/"(?:\\.|[^\\"])*"/,greedy:!0},keyword:/\b(?:abstract|accum|addcoltotals|addinfo|addtotals|analyzefields|anomalies|anomalousvalue|anomalydetection|append|appendcols|appendcsv|appendlookup|appendpipe|arules|associate|audit|autoregress|bin|bucket|bucketdir|chart|cluster|cofilter|collect|concurrency|contingency|convert|correlate|datamodel|dbinspect|dedup|delete|delta|diff|erex|eval|eventcount|eventstats|extract|fieldformat|fields|fieldsummary|filldown|fillnull|findtypes|folderize|foreach|format|from|gauge|gentimes|geom|geomfilter|geostats|head|highlight|history|iconify|input|inputcsv|inputlookup|iplocation|join|kmeans|kv|kvform|loadjob|localize|localop|lookup|makecontinuous|makemv|makeresults|map|mcollect|metadata|metasearch|meventcollect|mstats|multikv|multisearch|mvcombine|mvexpand|nomv|outlier|outputcsv|outputlookup|outputtext|overlap|pivot|predict|rangemap|rare|regex|relevancy|reltime|rename|replace|rest|return|reverse|rex|rtorder|run|savedsearch|script|scrub|search|searchtxn|selfjoin|sendemail|set|setfields|sichart|sirare|sistats|sitimechart|sitop|sort|spath|stats|strcat|streamstats|table|tags|tail|timechart|timewrap|top|transaction|transpose|trendline|tscollect|tstats|typeahead|typelearner|typer|union|uniq|untable|where|x11|xmlkv|xmlunescape|xpath|xyseries)\b/i,"operator-word":{pattern:/\b(?:and|as|by|not|or|xor)\b/i,alias:"operator"},function:/\b\w+(?=\s*\()/,property:/\b\w+(?=\s*=(?!=))/,date:{pattern:/\b\d{1,2}\/\d{1,2}\/\d{1,4}(?:(?::\d{1,2}){3})?\b/,alias:"number"},number:/\b\d+(?:\.\d+)?\b/,boolean:/\b(?:f|false|t|true)\b/i,operator:/[<>=]=?|[-+*/%|]/,punctuation:/[()[\],]/}}e.exports=t,t.displayName="splunkSpl",t.aliases=[]},70:(e,t,n)=>{"use strict";var r=n(8433);function i(e){e.register(r),e.languages.objectivec=e.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete e.languages.objectivec["class-name"],e.languages.objc=e.languages.objectivec}e.exports=i,i.displayName="objectivec",i.aliases=["objc"]},73:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(5248),i=n.n(r)()(function(e){return e[1]});i.push([e.id,"main#gap-analysis{padding:30px;margin:var(--header-height) 0}main#gap-analysis span.name{padding:0 10px}@media(min-width: 0px)and (max-width: 500px){main#gap-analysis span.name{width:85px;display:inline-block}}",""]);const a=i},81:(e,t,n)=>{const r=n(3103);function i(e,t){return`\n${o(e,t)}\n${a(e)}\nreturn {Body: Body, Vector: Vector};\n`}function a(e){let t=r(e),n=t("{var}",{join:", "});return`\nfunction Body(${n}) {\n this.isPinned = false;\n this.pos = new Vector(${n});\n this.force = new Vector();\n this.velocity = new Vector();\n this.mass = 1;\n\n this.springCount = 0;\n this.springLength = 0;\n}\n\nBody.prototype.reset = function() {\n this.force.reset();\n this.springCount = 0;\n this.springLength = 0;\n}\n\nBody.prototype.setPosition = function (${n}) {\n ${t("this.pos.{var} = {var} || 0;",{indent:2})}\n};`}function o(e,t){let n=r(e),i="";return t&&(i=`${n("\n var v{var};\nObject.defineProperty(this, '{var}', {\n set: function(v) { \n if (!Number.isFinite(v)) throw new Error('Cannot set non-numbers to {var}');\n v{var} = v; \n },\n get: function() { return v{var}; }\n});")}`),`function Vector(${n("{var}",{join:", "})}) {\n ${i}\n if (typeof arguments[0] === 'object') {\n // could be another vector\n let v = arguments[0];\n ${n('if (!Number.isFinite(v.{var})) throw new Error("Expected value is not a finite number at Vector constructor ({var})");',{indent:4})}\n ${n("this.{var} = v.{var};",{indent:4})}\n } else {\n ${n('this.{var} = typeof {var} === "number" ? {var} : 0;',{indent:4})}\n }\n }\n \n Vector.prototype.reset = function () {\n ${n("this.{var} = ",{join:""})}0;\n };`}e.exports=function(e,t){let n=i(e,t),{Body:r}=new Function(n)();return r},e.exports.generateCreateBodyFunctionBody=i,e.exports.getVectorCode=o,e.exports.getBodyCode=a},94:(e,t,n)=>{"use strict";var r=n(618);function i(e){e.register(r),function(e){e.languages.crystal=e.languages.extend("ruby",{keyword:[/\b(?:__DIR__|__END_LINE__|__FILE__|__LINE__|abstract|alias|annotation|as|asm|begin|break|case|class|def|do|else|elsif|end|ensure|enum|extend|for|fun|if|ifdef|include|instance_sizeof|lib|macro|module|next|of|out|pointerof|private|protected|ptr|require|rescue|return|select|self|sizeof|struct|super|then|type|typeof|undef|uninitialized|union|unless|until|when|while|with|yield)\b/,{pattern:/(\.\s*)(?:is_a|responds_to)\?/,lookbehind:!0}],number:/\b(?:0b[01_]*[01]|0o[0-7_]*[0-7]|0x[\da-fA-F_]*[\da-fA-F]|(?:\d(?:[\d_]*\d)?)(?:\.[\d_]*\d)?(?:[eE][+-]?[\d_]*\d)?)(?:_(?:[uif](?:8|16|32|64))?)?\b/,operator:[/->/,e.languages.ruby.operator],punctuation:/[(){}[\].,;\\]/}),e.languages.insertBefore("crystal","string-literal",{attribute:{pattern:/@\[.*?\]/,inside:{delimiter:{pattern:/^@\[|\]$/,alias:"punctuation"},attribute:{pattern:/^(\s*)\w+/,lookbehind:!0,alias:"class-name"},args:{pattern:/\S(?:[\s\S]*\S)?/,inside:e.languages.crystal}}},expansion:{pattern:/\{(?:\{.*?\}|%.*?%)\}/,inside:{content:{pattern:/^(\{.)[\s\S]+(?=.\}$)/,lookbehind:!0,inside:e.languages.crystal},delimiter:{pattern:/^\{[\{%]|[\}%]\}$/,alias:"operator"}}},char:{pattern:/'(?:[^\\\r\n]{1,2}|\\(?:.|u(?:[A-Fa-f0-9]{1,4}|\{[A-Fa-f0-9]{1,6}\})))'/,greedy:!0}})}(e)}e.exports=i,i.displayName="crystal",i.aliases=[]},98:(e,t,n)=>{"use strict";var r=n(2046),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,a,o={};return e?(r.forEach(e.split("\n"),function(e){if(a=e.indexOf(":"),t=r.trim(e.substr(0,a)).toLowerCase(),n=r.trim(e.substr(a+1)),t){if(o[t]&&i.indexOf(t)>=0)return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([n]):o[t]?o[t]+", "+n:n}}),o):o}},153:e=>{"use strict";function t(e){!function(e){e.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var t={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(t).forEach(function(n){var r=t[n],i=[];/^\w+$/.test(n)||i.push(/\w+/.exec(n)[0]),"diff"===n&&i.push("bold"),e.languages.diff[n]={pattern:RegExp("^(?:["+r+"].*(?:\r\n?|\n|(?![\\s\\S])))+","m"),alias:i,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(n)[0]}}}}),Object.defineProperty(e.languages.diff,"PREFIXES",{value:t})}(e)}e.exports=t,t.displayName="diff",t.aliases=[]},164:(e,t,n)=>{"use strict";var r=n(5880);function i(e){e.register(r),e.languages.plsql=e.languages.extend("sql",{comment:{pattern:/\/\*[\s\S]*?\*\/|--.*/,greedy:!0},keyword:/\b(?:A|ACCESSIBLE|ADD|AGENT|AGGREGATE|ALL|ALTER|AND|ANY|ARRAY|AS|ASC|AT|ATTRIBUTE|AUTHID|AVG|BEGIN|BETWEEN|BFILE_BASE|BINARY|BLOB_BASE|BLOCK|BODY|BOTH|BOUND|BULK|BY|BYTE|C|CALL|CALLING|CASCADE|CASE|CHAR|CHARACTER|CHARSET|CHARSETFORM|CHARSETID|CHAR_BASE|CHECK|CLOB_BASE|CLONE|CLOSE|CLUSTER|CLUSTERS|COLAUTH|COLLECT|COLUMNS|COMMENT|COMMIT|COMMITTED|COMPILED|COMPRESS|CONNECT|CONSTANT|CONSTRUCTOR|CONTEXT|CONTINUE|CONVERT|COUNT|CRASH|CREATE|CREDENTIAL|CURRENT|CURSOR|CUSTOMDATUM|DANGLING|DATA|DATE|DATE_BASE|DAY|DECLARE|DEFAULT|DEFINE|DELETE|DESC|DETERMINISTIC|DIRECTORY|DISTINCT|DOUBLE|DROP|DURATION|ELEMENT|ELSE|ELSIF|EMPTY|END|ESCAPE|EXCEPT|EXCEPTION|EXCEPTIONS|EXCLUSIVE|EXECUTE|EXISTS|EXIT|EXTERNAL|FETCH|FINAL|FIRST|FIXED|FLOAT|FOR|FORALL|FORCE|FROM|FUNCTION|GENERAL|GOTO|GRANT|GROUP|HASH|HAVING|HEAP|HIDDEN|HOUR|IDENTIFIED|IF|IMMEDIATE|IMMUTABLE|IN|INCLUDING|INDEX|INDEXES|INDICATOR|INDICES|INFINITE|INSERT|INSTANTIABLE|INT|INTERFACE|INTERSECT|INTERVAL|INTO|INVALIDATE|IS|ISOLATION|JAVA|LANGUAGE|LARGE|LEADING|LENGTH|LEVEL|LIBRARY|LIKE|LIKE2|LIKE4|LIKEC|LIMIT|LIMITED|LOCAL|LOCK|LONG|LOOP|MAP|MAX|MAXLEN|MEMBER|MERGE|MIN|MINUS|MINUTE|MOD|MODE|MODIFY|MONTH|MULTISET|MUTABLE|NAME|NAN|NATIONAL|NATIVE|NCHAR|NEW|NOCOMPRESS|NOCOPY|NOT|NOWAIT|NULL|NUMBER_BASE|OBJECT|OCICOLL|OCIDATE|OCIDATETIME|OCIDURATION|OCIINTERVAL|OCILOBLOCATOR|OCINUMBER|OCIRAW|OCIREF|OCIREFCURSOR|OCIROWID|OCISTRING|OCITYPE|OF|OLD|ON|ONLY|OPAQUE|OPEN|OPERATOR|OPTION|OR|ORACLE|ORADATA|ORDER|ORGANIZATION|ORLANY|ORLVARY|OTHERS|OUT|OVERLAPS|OVERRIDING|PACKAGE|PARALLEL_ENABLE|PARAMETER|PARAMETERS|PARENT|PARTITION|PASCAL|PERSISTABLE|PIPE|PIPELINED|PLUGGABLE|POLYMORPHIC|PRAGMA|PRECISION|PRIOR|PRIVATE|PROCEDURE|PUBLIC|RAISE|RANGE|RAW|READ|RECORD|REF|REFERENCE|RELIES_ON|REM|REMAINDER|RENAME|RESOURCE|RESULT|RESULT_CACHE|RETURN|RETURNING|REVERSE|REVOKE|ROLLBACK|ROW|SAMPLE|SAVE|SAVEPOINT|SB1|SB2|SB4|SECOND|SEGMENT|SELECT|SELF|SEPARATE|SEQUENCE|SERIALIZABLE|SET|SHARE|SHORT|SIZE|SIZE_T|SOME|SPARSE|SQL|SQLCODE|SQLDATA|SQLNAME|SQLSTATE|STANDARD|START|STATIC|STDDEV|STORED|STRING|STRUCT|STYLE|SUBMULTISET|SUBPARTITION|SUBSTITUTABLE|SUBTYPE|SUM|SYNONYM|TABAUTH|TABLE|TDO|THE|THEN|TIME|TIMESTAMP|TIMEZONE_ABBR|TIMEZONE_HOUR|TIMEZONE_MINUTE|TIMEZONE_REGION|TO|TRAILING|TRANSACTION|TRANSACTIONAL|TRUSTED|TYPE|UB1|UB2|UB4|UNDER|UNION|UNIQUE|UNPLUG|UNSIGNED|UNTRUSTED|UPDATE|USE|USING|VALIST|VALUE|VALUES|VARIABLE|VARIANCE|VARRAY|VARYING|VIEW|VIEWS|VOID|WHEN|WHERE|WHILE|WITH|WORK|WRAPPED|WRITE|YEAR|ZONE)\b/i,operator:/:=?|=>|[<>^~!]=|\.\.|\|\||\*\*|[-+*/%<>=@]/}),e.languages.insertBefore("plsql","operator",{label:{pattern:/<<\s*\w+\s*>>/,alias:"symbol"}})}e.exports=i,i.displayName="plsql",i.aliases=[]},187:e=>{"use strict";function t(e){e.languages.jolie=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\[\s\S]|[^"\\])*"/,lookbehind:!0,greedy:!0},"class-name":{pattern:/((?:\b(?:as|courier|embed|in|inputPort|outputPort|service)\b|@)[ \t]*)\w+/,lookbehind:!0},keyword:/\b(?:as|cH|comp|concurrent|constants|courier|cset|csets|default|define|else|embed|embedded|execution|exit|extender|for|foreach|forward|from|global|if|import|in|include|init|inputPort|install|instanceof|interface|is_defined|linkIn|linkOut|main|new|nullProcess|outputPort|over|private|provide|public|scope|sequential|service|single|spawn|synchronized|this|throw|throws|type|undef|until|while|with)\b/,function:/\b[a-z_]\w*(?=[ \t]*[@(])/i,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?l?/i,operator:/-[-=>]?|\+[+=]?|<[<=]?|[>=*!]=?|&&|\|\||[?\/%^@|]/,punctuation:/[()[\]{},;.:]/,builtin:/\b(?:Byte|any|bool|char|double|enum|float|int|length|long|ranges|regex|string|undefined|void)\b/}),e.languages.insertBefore("jolie","keyword",{aggregates:{pattern:/(\bAggregates\s*:\s*)(?:\w+(?:\s+with\s+\w+)?\s*,\s*)*\w+(?:\s+with\s+\w+)?/,lookbehind:!0,inside:{keyword:/\bwith\b/,"class-name":/\w+/,punctuation:/,/}},redirects:{pattern:/(\bRedirects\s*:\s*)(?:\w+\s*=>\s*\w+\s*,\s*)*(?:\w+\s*=>\s*\w+)/,lookbehind:!0,inside:{punctuation:/,/,"class-name":/\w+/,operator:/=>/}},property:{pattern:/\b(?:Aggregates|[Ii]nterfaces|Java|Javascript|Jolie|[Ll]ocation|OneWay|[Pp]rotocol|Redirects|RequestResponse)\b(?=[ \t]*:)/}})}e.exports=t,t.displayName="jolie",t.aliases=[]},261:(e,t,n)=>{"use strict";e.exports=n(4505)},267:(e,t,n)=>{"use strict";var r=n(4696);function i(e){e.register(r),e.languages.sparql=e.languages.extend("turtle",{boolean:/\b(?:false|true)\b/i,variable:{pattern:/[?$]\w+/,greedy:!0}}),e.languages.insertBefore("sparql","punctuation",{keyword:[/\b(?:A|ADD|ALL|AS|ASC|ASK|BNODE|BY|CLEAR|CONSTRUCT|COPY|CREATE|DATA|DEFAULT|DELETE|DESC|DESCRIBE|DISTINCT|DROP|EXISTS|FILTER|FROM|GROUP|HAVING|INSERT|INTO|LIMIT|LOAD|MINUS|MOVE|NAMED|NOT|NOW|OFFSET|OPTIONAL|ORDER|RAND|REDUCED|SELECT|SEPARATOR|SERVICE|SILENT|STRUUID|UNION|USING|UUID|VALUES|WHERE)\b/i,/\b(?:ABS|AVG|BIND|BOUND|CEIL|COALESCE|CONCAT|CONTAINS|COUNT|DATATYPE|DAY|ENCODE_FOR_URI|FLOOR|GROUP_CONCAT|HOURS|IF|IRI|isBLANK|isIRI|isLITERAL|isNUMERIC|isURI|LANG|LANGMATCHES|LCASE|MAX|MD5|MIN|MINUTES|MONTH|REGEX|REPLACE|ROUND|sameTerm|SAMPLE|SECONDS|SHA1|SHA256|SHA384|SHA512|STR|STRAFTER|STRBEFORE|STRDT|STRENDS|STRLANG|STRLEN|STRSTARTS|SUBSTR|SUM|TIMEZONE|TZ|UCASE|URI|YEAR)\b(?=\s*\()/i,/\b(?:BASE|GRAPH|PREFIX)\b/i]}),e.languages.rq=e.languages.sparql}e.exports=i,i.displayName="sparql",i.aliases=["rq"]},276:(e,t,n)=>{"use strict";var r=n(2046),i=n(7595),a=n(8854),o=n(3725);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return s(e),e.headers=e.headers||{},e.data=i.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||o.adapter)(e).then(function(t){return s(e),t.data=i.call(e,t.data,t.headers,e.transformResponse),t},function(t){return a(t)||(s(e),t&&t.response&&(t.response.data=i.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},309:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(5248),i=n.n(r)()(function(e){return e[1]});i.push([e.id,"main#explorer-content{padding:30px;margin:var(--header-height) 0}main#explorer-content .search-field input{font-size:16px;height:32px;width:320px;margin-bottom:10px;border-radius:3px;border:1px solid #858585;padding:0 5px}main#explorer-content #graphs-menu{display:flex;margin-bottom:20px}main#explorer-content #graphs-menu .menu-title{margin:0 10px 0 0}main#explorer-content #graphs-menu ul{list-style:none;padding:0;margin:0;display:flex;font-size:15px}main#explorer-content #graphs-menu li{padding:0 8px}main#explorer-content #graphs-menu li+li{border-left:1px solid #b1b0b0}main#explorer-content #graphs-menu li:first-child{padding-left:0}main#explorer-content .list{padding:0;width:100%}main#explorer-content .arrow .icon{transform:rotate(-90deg)}main#explorer-content .arrow.active .icon{transform:rotate(0)}main#explorer-content .arrow:hover{cursor:pointer}main#explorer-content .item{border-top:1px dotted #d3d3d3;border-left:6px solid #d3d3d3;margin:4px 4px 4px 40px;background-color:rgba(200,200,200,.2);vertical-align:middle}main#explorer-content .item .content{display:flex;flex-wrap:wrap}main#explorer-content .item .header{margin-left:5px;overflow:hidden;white-space:nowrap;display:flex;align-items:center;vertical-align:middle}main#explorer-content .item .header>a{font-size:120%;line-height:30px;font-weight:bold;max-width:100%;white-space:normal}main#explorer-content .item .header .cre-code{margin-right:4px;color:gray}main#explorer-content .item .description{margin-left:20px}main#explorer-content .highlight{background-color:#ff0}main#explorer-content>.list>.item{margin-left:0}@media(min-width: 0px)and (max-width: 770px){#graphs-menu{flex-direction:column}}",""]);const a=i},310:e=>{"use strict";function t(e){e.languages.aql={comment:/\/\/.*|\/\*[\s\S]*?\*\//,property:{pattern:/([{,]\s*)(?:(?!\d)\w+|(["'´`])(?:(?!\2)[^\\\r\n]|\\.)*\2)(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\.)*\1/,greedy:!0},identifier:{pattern:/([´`])(?:(?!\1)[^\\\r\n]|\\.)*\1/,greedy:!0},variable:/@@?\w+/,keyword:[{pattern:/(\bWITH\s+)COUNT(?=\s+INTO\b)/i,lookbehind:!0},/\b(?:AGGREGATE|ALL|AND|ANY|ASC|COLLECT|DESC|DISTINCT|FILTER|FOR|GRAPH|IN|INBOUND|INSERT|INTO|K_PATHS|K_SHORTEST_PATHS|LET|LIKE|LIMIT|NONE|NOT|NULL|OR|OUTBOUND|REMOVE|REPLACE|RETURN|SHORTEST_PATH|SORT|UPDATE|UPSERT|WINDOW|WITH)\b/i,{pattern:/(^|[^\w.[])(?:KEEP|PRUNE|SEARCH|TO)\b/i,lookbehind:!0},{pattern:/(^|[^\w.[])(?:CURRENT|NEW|OLD)\b/,lookbehind:!0},{pattern:/\bOPTIONS(?=\s*\{)/i}],function:/\b(?!\d)\w+(?=\s*\()/,boolean:/\b(?:false|true)\b/i,range:{pattern:/\.\./,alias:"operator"},number:[/\b0b[01]+/i,/\b0x[0-9a-f]+/i,/(?:\B\.\d+|\b(?:0|[1-9]\d*)(?:\.\d+)?)(?:e[+-]?\d+)?/i],operator:/\*{2,}|[=!]~|[!=<>]=?|&&|\|\||[-+*/%]/,punctuation:/::|[?.:,;()[\]{}]/}}e.exports=t,t.displayName="aql",t.aliases=[]},323:e=>{"use strict";function t(e){e.languages.applescript={comment:[/\(\*(?:\(\*(?:[^*]|\*(?!\)))*\*\)|(?!\(\*)[\s\S])*?\*\)/,/--.+/,/#.+/],string:/"(?:\\.|[^"\\\r\n])*"/,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e-?\d+)?\b/i,operator:[/[&=≠≤≥*+\-\/÷^]|[<>]=?/,/\b(?:(?:begin|end|start)s? with|(?:contains?|(?:does not|doesn't) contain)|(?:is|isn't|is not) (?:contained by|in)|(?:(?:is|isn't|is not) )?(?:greater|less) than(?: or equal)?(?: to)?|(?:comes|(?:does not|doesn't) come) (?:after|before)|(?:is|isn't|is not) equal(?: to)?|(?:(?:does not|doesn't) equal|equal to|equals|is not|isn't)|(?:a )?(?:ref(?: to)?|reference to)|(?:and|as|div|mod|not|or))\b/],keyword:/\b(?:about|above|after|against|apart from|around|aside from|at|back|before|beginning|behind|below|beneath|beside|between|but|by|considering|continue|copy|does|eighth|else|end|equal|error|every|exit|false|fifth|first|for|fourth|from|front|get|given|global|if|ignoring|in|instead of|into|is|it|its|last|local|me|middle|my|ninth|of|on|onto|out of|over|prop|property|put|repeat|return|returning|second|set|seventh|since|sixth|some|tell|tenth|that|the|then|third|through|thru|timeout|times|to|transaction|true|try|until|where|while|whose|with|without)\b/,"class-name":/\b(?:POSIX file|RGB color|alias|application|boolean|centimeters|centimetres|class|constant|cubic centimeters|cubic centimetres|cubic feet|cubic inches|cubic meters|cubic metres|cubic yards|date|degrees Celsius|degrees Fahrenheit|degrees Kelvin|feet|file|gallons|grams|inches|integer|kilograms|kilometers|kilometres|list|liters|litres|meters|metres|miles|number|ounces|pounds|quarts|real|record|reference|script|square feet|square kilometers|square kilometres|square meters|square metres|square miles|square yards|text|yards)\b/,punctuation:/[{}():,¬«»《》]/}}e.exports=t,t.displayName="applescript",t.aliases=[]},334:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var a,o,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),c=1;c{"use strict";function t(e){!function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin}(e)}e.exports=t,t.displayName="kotlin",t.aliases=["kt","kts"]},358:e=>{"use strict";function t(e){e.languages.unrealscript={comment:/\/\/.*|\/\*[\s\S]*?\*\//,string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},category:{pattern:/(\b(?:(?:autoexpand|hide|show)categories|var)\s*\()[^()]+(?=\))/,lookbehind:!0,greedy:!0,alias:"property"},metadata:{pattern:/(\w\s*)<\s*\w+\s*=[^<>|=\r\n]+(?:\|\s*\w+\s*=[^<>|=\r\n]+)*>/,lookbehind:!0,greedy:!0,inside:{property:/\b\w+(?=\s*=)/,operator:/=/,punctuation:/[<>|]/}},macro:{pattern:/`\w+/,alias:"property"},"class-name":{pattern:/(\b(?:class|enum|extends|interface|state(?:\(\))?|struct|within)\s+)\w+/,lookbehind:!0},keyword:/\b(?:abstract|actor|array|auto|autoexpandcategories|bool|break|byte|case|class|classgroup|client|coerce|collapsecategories|config|const|continue|default|defaultproperties|delegate|dependson|deprecated|do|dontcollapsecategories|editconst|editinlinenew|else|enum|event|exec|export|extends|final|float|for|forcescriptorder|foreach|function|goto|guid|hidecategories|hidedropdown|if|ignores|implements|inherits|input|int|interface|iterator|latent|local|material|name|native|nativereplication|noexport|nontransient|noteditinlinenew|notplaceable|operator|optional|out|pawn|perobjectconfig|perobjectlocalized|placeable|postoperator|preoperator|private|protected|reliable|replication|return|server|showcategories|simulated|singular|state|static|string|struct|structdefault|structdefaultproperties|switch|texture|transient|travel|unreliable|until|var|vector|while|within)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,boolean:/\b(?:false|true)\b/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/>>|<<|--|\+\+|\*\*|[-+*/~!=<>$@]=?|&&?|\|\|?|\^\^?|[?:%]|\b(?:ClockwiseFrom|Cross|Dot)\b/,punctuation:/[()[\]{};,.]/},e.languages.uc=e.languages.uscript=e.languages.unrealscript}e.exports=t,t.displayName="unrealscript",t.aliases=["uc","uscript"]},377:e=>{"use strict";function t(e){e.languages.eiffel={comment:/--.*/,string:[{pattern:/"([^[]*)\[[\s\S]*?\]\1"/,greedy:!0},{pattern:/"([^{]*)\{[\s\S]*?\}\1"/,greedy:!0},{pattern:/"(?:%(?:(?!\n)\s)*\n\s*%|%\S|[^%"\r\n])*"/,greedy:!0}],char:/'(?:%.|[^%'\r\n])+'/,keyword:/\b(?:across|agent|alias|all|and|as|assign|attached|attribute|check|class|convert|create|Current|debug|deferred|detachable|do|else|elseif|end|ensure|expanded|export|external|feature|from|frozen|if|implies|inherit|inspect|invariant|like|local|loop|not|note|obsolete|old|once|or|Precursor|redefine|rename|require|rescue|Result|retry|select|separate|some|then|undefine|until|variant|Void|when|xor)\b/i,boolean:/\b(?:False|True)\b/i,"class-name":/\b[A-Z][\dA-Z_]*\b/,number:[/\b0[xcb][\da-f](?:_*[\da-f])*\b/i,/(?:\b\d(?:_*\d)*)?\.(?:(?:\d(?:_*\d)*)?e[+-]?)?\d(?:_*\d)*\b|\b\d(?:_*\d)*\b\.?/i],punctuation:/:=|<<|>>|\(\||\|\)|->|\.(?=\w)|[{}[\];(),:?]/,operator:/\\\\|\|\.\.\||\.\.|\/[~\/=]?|[><]=?|[-+*^=~]/}}e.exports=t,t.displayName="eiffel",t.aliases=[]},394:e=>{"use strict";function t(e){!function(e){e.languages.xquery=e.languages.extend("markup",{"xquery-comment":{pattern:/\(:[\s\S]*?:\)/,greedy:!0,alias:"comment"},string:{pattern:/(["'])(?:\1\1|(?!\1)[\s\S])*\1/,greedy:!0},extension:{pattern:/\(#.+?#\)/,alias:"symbol"},variable:/\$[-\w:]+/,axis:{pattern:/(^|[^-])(?:ancestor(?:-or-self)?|attribute|child|descendant(?:-or-self)?|following(?:-sibling)?|parent|preceding(?:-sibling)?|self)(?=::)/,lookbehind:!0,alias:"operator"},"keyword-operator":{pattern:/(^|[^:-])\b(?:and|castable as|div|eq|except|ge|gt|idiv|instance of|intersect|is|le|lt|mod|ne|or|union)\b(?=$|[^:-])/,lookbehind:!0,alias:"operator"},keyword:{pattern:/(^|[^:-])\b(?:as|ascending|at|base-uri|boundary-space|case|cast as|collation|construction|copy-namespaces|declare|default|descending|else|empty (?:greatest|least)|encoding|every|external|for|function|if|import|in|inherit|lax|let|map|module|namespace|no-inherit|no-preserve|option|order(?: by|ed|ing)?|preserve|return|satisfies|schema|some|stable|strict|strip|then|to|treat as|typeswitch|unordered|validate|variable|version|where|xquery)\b(?=$|[^:-])/,lookbehind:!0},function:/[\w-]+(?::[\w-]+)*(?=\s*\()/,"xquery-element":{pattern:/(element\s+)[\w-]+(?::[\w-]+)*/,lookbehind:!0,alias:"tag"},"xquery-attribute":{pattern:/(attribute\s+)[\w-]+(?::[\w-]+)*/,lookbehind:!0,alias:"attr-name"},builtin:{pattern:/(^|[^:-])\b(?:attribute|comment|document|element|processing-instruction|text|xs:(?:ENTITIES|ENTITY|ID|IDREFS?|NCName|NMTOKENS?|NOTATION|Name|QName|anyAtomicType|anyType|anyURI|base64Binary|boolean|byte|date|dateTime|dayTimeDuration|decimal|double|duration|float|gDay|gMonth|gMonthDay|gYear|gYearMonth|hexBinary|int|integer|language|long|negativeInteger|nonNegativeInteger|nonPositiveInteger|normalizedString|positiveInteger|short|string|time|token|unsigned(?:Byte|Int|Long|Short)|untyped(?:Atomic)?|yearMonthDuration))\b(?=$|[^:-])/,lookbehind:!0},number:/\b\d+(?:\.\d+)?(?:E[+-]?\d+)?/,operator:[/[+*=?|@]|\.\.?|:=|!=|<[=<]?|>[=>]?/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}],punctuation:/[[\](){},;:/]/}),e.languages.xquery.tag.pattern=/<\/?(?!\d)[^\s>\/=$<%]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/,e.languages.xquery.tag.inside["attr-value"].pattern=/=(?:("|')(?:\\[\s\S]|\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}|(?!\1)[^\\])*\1|[^\s'">=]+)/,e.languages.xquery.tag.inside["attr-value"].inside.punctuation=/^="|"$/,e.languages.xquery.tag.inside["attr-value"].inside.expression={pattern:/\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}/,inside:e.languages.xquery,alias:"language-xquery"};var t=function(e){return"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(t).join("")},n=function(r){for(var i=[],a=0;a0&&i[i.length-1].tagName===t(o.content[0].content[1])&&i.pop():"/>"===o.content[o.content.length-1].content||i.push({tagName:t(o.content[0].content[1]),openedBraces:0}):!(i.length>0&&"punctuation"===o.type&&"{"===o.content)||r[a+1]&&"punctuation"===r[a+1].type&&"{"===r[a+1].content||r[a-1]&&"plain-text"===r[a-1].type&&"{"===r[a-1].content?i.length>0&&i[i.length-1].openedBraces>0&&"punctuation"===o.type&&"}"===o.content?i[i.length-1].openedBraces--:"comment"!==o.type&&(s=!0):i[i.length-1].openedBraces++),(s||"string"==typeof o)&&i.length>0&&0===i[i.length-1].openedBraces){var c=t(o);a0&&("string"==typeof r[a-1]||"plain-text"===r[a-1].type)&&(c=t(r[a-1])+c,r.splice(a-1,1),a--),/^\s+$/.test(c)?r[a]=c:r[a]=new e.Token("plain-text",c,null,c)}o.content&&"string"!=typeof o.content&&n(o.content)}};e.hooks.add("after-tokenize",function(e){"xquery"===e.language&&n(e.tokens)})}(e)}e.exports=t,t.displayName="xquery",t.aliases=[]},416:(e,t,n)=>{"use strict";n.d(t,{B:()=>a,t:()=>i});var r=console;function i(){return r}function a(e){r=e}},437:(e,t,n)=>{"use strict";var r=n(2046);e.exports=function(e,t){t=t||{};var n={},i=["url","method","data"],a=["headers","auth","proxy","params"],o=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function c(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function l(i){r.isUndefined(t[i])?r.isUndefined(e[i])||(n[i]=c(void 0,e[i])):n[i]=c(e[i],t[i])}r.forEach(i,function(e){r.isUndefined(t[e])||(n[e]=c(void 0,t[e]))}),r.forEach(a,l),r.forEach(o,function(i){r.isUndefined(t[i])?r.isUndefined(e[i])||(n[i]=c(void 0,e[i])):n[i]=c(void 0,t[i])}),r.forEach(s,function(r){r in t?n[r]=c(e[r],t[r]):r in e&&(n[r]=c(void 0,e[r]))});var u=i.concat(a).concat(o).concat(s),f=Object.keys(e).concat(Object.keys(t)).filter(function(e){return-1===u.indexOf(e)});return r.forEach(f,l),n}},452:e=>{"use strict";function t(e){!function(e){e.languages.ignore={comment:/^#.*/m,entry:{pattern:/\S(?:.*(?:(?:\\ )|\S))?/,alias:"string",inside:{operator:/^!|\*\*?|\?/,regex:{pattern:/(^|[^\\])\[[^\[\]]*\]/,lookbehind:!0},punctuation:/\//}}},e.languages.gitignore=e.languages.ignore,e.languages.hgignore=e.languages.ignore,e.languages.npmignore=e.languages.ignore}(e)}e.exports=t,t.displayName="ignore",t.aliases=["gitignore","hgignore","npmignore"]},463:e=>{"use strict";function t(e){e.languages.nasm={comment:/;.*$/m,string:/(["'`])(?:\\.|(?!\1)[^\\\r\n])*\1/,label:{pattern:/(^\s*)[A-Za-z._?$][\w.?$@~#]*:/m,lookbehind:!0,alias:"function"},keyword:[/\[?BITS (?:16|32|64)\]?/,{pattern:/(^\s*)section\s*[a-z.]+:?/im,lookbehind:!0},/(?:extern|global)[^;\r\n]*/i,/(?:CPU|DEFAULT|FLOAT).*$/m],register:{pattern:/\b(?:st\d|[xyz]mm\d\d?|[cdt]r\d|r\d\d?[bwd]?|[er]?[abcd]x|[abcd][hl]|[er]?(?:bp|di|si|sp)|[cdefgs]s)\b/i,alias:"variable"},number:/(?:\b|(?=\$))(?:0[hx](?:\.[\da-f]+|[\da-f]+(?:\.[\da-f]+)?)(?:p[+-]?\d+)?|\d[\da-f]+[hx]|\$\d[\da-f]*|0[oq][0-7]+|[0-7]+[oq]|0[by][01]+|[01]+[by]|0[dt]\d+|(?:\d+(?:\.\d+)?|\.\d+)(?:\.?e[+-]?\d+)?[dt]?)\b/i,operator:/[\[\]*+\-\/%<>=&|$!]/}}e.exports=t,t.displayName="nasm",t.aliases=[]},497:e=>{"use strict";function t(e){!function(e){e.languages.velocity=e.languages.extend("markup",{});var t={variable:{pattern:/(^|[^\\](?:\\\\)*)\$!?(?:[a-z][\w-]*(?:\([^)]*\))?(?:\.[a-z][\w-]*(?:\([^)]*\))?|\[[^\]]+\])*|\{[^}]+\})/i,lookbehind:!0,inside:{}},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},number:/\b\d+\b/,boolean:/\b(?:false|true)\b/,operator:/[=!<>]=?|[+*/%-]|&&|\|\||\.\.|\b(?:eq|g[et]|l[et]|n(?:e|ot))\b/,punctuation:/[(){}[\]:,.]/};t.variable.inside={string:t.string,function:{pattern:/([^\w-])[a-z][\w-]*(?=\()/,lookbehind:!0},number:t.number,boolean:t.boolean,punctuation:t.punctuation},e.languages.insertBefore("velocity","comment",{unparsed:{pattern:/(^|[^\\])#\[\[[\s\S]*?\]\]#/,lookbehind:!0,greedy:!0,inside:{punctuation:/^#\[\[|\]\]#$/}},"velocity-comment":[{pattern:/(^|[^\\])#\*[\s\S]*?\*#/,lookbehind:!0,greedy:!0,alias:"comment"},{pattern:/(^|[^\\])##.*/,lookbehind:!0,greedy:!0,alias:"comment"}],directive:{pattern:/(^|[^\\](?:\\\\)*)#@?(?:[a-z][\w-]*|\{[a-z][\w-]*\})(?:\s*\((?:[^()]|\([^()]*\))*\))?/i,lookbehind:!0,inside:{keyword:{pattern:/^#@?(?:[a-z][\w-]*|\{[a-z][\w-]*\})|\bin\b/,inside:{punctuation:/[{}]/}},rest:t}},variable:t.variable}),e.languages.velocity.tag.inside["attr-value"].inside.rest=e.languages.velocity}(e)}e.exports=t,t.displayName="velocity",t.aliases=[]},512:e=>{"use strict";function t(e){e.languages.cil={comment:/\/\/.*/,string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},directive:{pattern:/(^|\W)\.[a-z]+(?=\s)/,lookbehind:!0,alias:"class-name"},variable:/\[[\w\.]+\]/,keyword:/\b(?:abstract|ansi|assembly|auto|autochar|beforefieldinit|bool|bstr|byvalstr|catch|char|cil|class|currency|date|decimal|default|enum|error|explicit|extends|extern|famandassem|family|famorassem|final(?:ly)?|float32|float64|hidebysig|u?int(?:8|16|32|64)?|iant|idispatch|implements|import|initonly|instance|interface|iunknown|literal|lpstr|lpstruct|lptstr|lpwstr|managed|method|native(?:Type)?|nested|newslot|object(?:ref)?|pinvokeimpl|private|privatescope|public|reqsecobj|rtspecialname|runtime|sealed|sequential|serializable|specialname|static|string|struct|syschar|tbstr|unicode|unmanagedexp|unsigned|value(?:type)?|variant|virtual|void)\b/,function:/\b(?:(?:constrained|no|readonly|tail|unaligned|volatile)\.)?(?:conv\.(?:[iu][1248]?|ovf\.[iu][1248]?(?:\.un)?|r\.un|r4|r8)|ldc\.(?:i4(?:\.\d+|\.[mM]1|\.s)?|i8|r4|r8)|ldelem(?:\.[iu][1248]?|\.r[48]|\.ref|a)?|ldind\.(?:[iu][1248]?|r[48]|ref)|stelem\.?(?:i[1248]?|r[48]|ref)?|stind\.(?:i[1248]?|r[48]|ref)?|end(?:fault|filter|finally)|ldarg(?:\.[0-3s]|a(?:\.s)?)?|ldloc(?:\.\d+|\.s)?|sub(?:\.ovf(?:\.un)?)?|mul(?:\.ovf(?:\.un)?)?|add(?:\.ovf(?:\.un)?)?|stloc(?:\.[0-3s])?|refany(?:type|val)|blt(?:\.un)?(?:\.s)?|ble(?:\.un)?(?:\.s)?|bgt(?:\.un)?(?:\.s)?|bge(?:\.un)?(?:\.s)?|unbox(?:\.any)?|init(?:blk|obj)|call(?:i|virt)?|brfalse(?:\.s)?|bne\.un(?:\.s)?|ldloca(?:\.s)?|brzero(?:\.s)?|brtrue(?:\.s)?|brnull(?:\.s)?|brinst(?:\.s)?|starg(?:\.s)?|leave(?:\.s)?|shr(?:\.un)?|rem(?:\.un)?|div(?:\.un)?|clt(?:\.un)?|alignment|castclass|ldvirtftn|beq(?:\.s)?|ckfinite|ldsflda|ldtoken|localloc|mkrefany|rethrow|cgt\.un|arglist|switch|stsfld|sizeof|newobj|newarr|ldsfld|ldnull|ldflda|isinst|throw|stobj|stfld|ldstr|ldobj|ldlen|ldftn|ldfld|cpobj|cpblk|break|br\.s|xor|shl|ret|pop|not|nop|neg|jmp|dup|cgt|ceq|box|and|or|br)\b/,boolean:/\b(?:false|true)\b/,number:/\b-?(?:0x[0-9a-f]+|\d+)(?:\.[0-9a-f]+)?\b/i,punctuation:/[{}[\];(),:=]|IL_[0-9A-Za-z]+/}}e.exports=t,t.displayName="cil",t.aliases=[]},527:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(5248),i=n.n(r)()(function(e){return e[1]});i.push([e.id,'.node{cursor:pointer}.node:hover{stroke:#000;stroke-width:1.5px}.node--leaf{fill:#fff}.label{font:11px "Helvetica Neue",Helvetica,Arial,sans-serif;text-anchor:middle;text-shadow:0 1px 0 #fff,1px 0 0 #fff,-1px 0 0 #fff,0 -1px 0 #fff}.label,.node--root,.ui.button.screen-size-button{margin:0;background-color:rgba(0,0,0,0)}.circle-tooltip{box-shadow:0 2px 5px rgba(0,0,0,.2);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;max-width:300px;word-wrap:break-word}.breadcrumb-item{word-break:break-word;overflow-wrap:anywhere;display:inline;max-width:100%}.breadcrumb-container{margin-top:0 !important;margin-bottom:0 !important;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;padding:10px;background-color:#f8f8f8;border-radius:4px;box-shadow:0 1px 3px rgba(0,0,0,.1);overflow:auto;max-width:100%;line-height:1.4;white-space:normal;word-break:break-word;overflow-wrap:anywhere}',""]);const a=i},543:e=>{"use strict";function t(e){!function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(//g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),a=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+a+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+a+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(t){["url","bold","italic","strike","code-snippet"].forEach(function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])})}),e.hooks.add("after-tokenize",function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n",quot:'"'},c=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(e)}e.exports=t,t.displayName="markdown",t.aliases=["md"]},571:e=>{"use strict";e.exports=n;var t=n.prototype;function n(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}t.space=null,t.normal={},t.property={}},597:(e,t,n)=>{"use strict";var r=n(8433);function i(e){e.register(r),e.languages.hlsl=e.languages.extend("c",{"class-name":[e.languages.c["class-name"],/\b(?:AppendStructuredBuffer|BlendState|Buffer|ByteAddressBuffer|CompileShader|ComputeShader|ConsumeStructuredBuffer|DepthStencilState|DepthStencilView|DomainShader|GeometryShader|Hullshader|InputPatch|LineStream|OutputPatch|PixelShader|PointStream|RWBuffer|RWByteAddressBuffer|RWStructuredBuffer|RWTexture(?:1D|1DArray|2D|2DArray|3D)|RasterizerState|RenderTargetView|SamplerComparisonState|SamplerState|StructuredBuffer|Texture(?:1D|1DArray|2D|2DArray|2DMS|2DMSArray|3D|Cube|CubeArray)|TriangleStream|VertexShader)\b/],keyword:[/\b(?:asm|asm_fragment|auto|break|case|catch|cbuffer|centroid|char|class|column_major|compile|compile_fragment|const|const_cast|continue|default|delete|discard|do|dynamic_cast|else|enum|explicit|export|extern|for|friend|fxgroup|goto|groupshared|if|in|inline|inout|interface|line|lineadj|linear|long|matrix|mutable|namespace|new|nointerpolation|noperspective|operator|out|packoffset|pass|pixelfragment|point|precise|private|protected|public|register|reinterpret_cast|return|row_major|sample|sampler|shared|short|signed|sizeof|snorm|stateblock|stateblock_state|static|static_cast|string|struct|switch|tbuffer|technique|technique10|technique11|template|texture|this|throw|triangle|triangleadj|try|typedef|typename|uniform|union|unorm|unsigned|using|vector|vertexfragment|virtual|void|volatile|while)\b/,/\b(?:bool|double|dword|float|half|int|min(?:10float|12int|16(?:float|int|uint))|uint)(?:[1-4](?:x[1-4])?)?\b/],number:/(?:(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[eE][+-]?\d+)?|\b0x[\da-fA-F]+)[fFhHlLuU]?\b/,boolean:/\b(?:false|true)\b/})}e.exports=i,i.displayName="hlsl",i.aliases=[]},604:e=>{"use strict";function t(e){e.languages.vhdl={comment:/--.+/,"vhdl-vectors":{pattern:/\b[oxb]"[\da-f_]+"|"[01uxzwlh-]+"/i,alias:"number"},"quoted-function":{pattern:/"\S+?"(?=\()/,alias:"function"},string:/"(?:[^\\"\r\n]|\\(?:\r\n|[\s\S]))*"/,constant:/\b(?:library|use)\b/i,keyword:/\b(?:'active|'ascending|'base|'delayed|'driving|'driving_value|'event|'high|'image|'instance_name|'last_active|'last_event|'last_value|'left|'leftof|'length|'low|'path_name|'pos|'pred|'quiet|'range|'reverse_range|'right|'rightof|'simple_name|'stable|'succ|'transaction|'val|'value|access|after|alias|all|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|new|next|null|of|on|open|others|out|package|port|postponed|procedure|process|pure|range|record|register|reject|report|return|select|severity|shared|signal|subtype|then|to|transport|type|unaffected|units|until|use|variable|wait|when|while|with)\b/i,boolean:/\b(?:false|true)\b/i,function:/\w+(?=\()/,number:/'[01uxzwlh-]'|\b(?:\d+#[\da-f_.]+#|\d[\d_.]*)(?:e[-+]?\d+)?/i,operator:/[<>]=?|:=|[-+*/&=]|\b(?:abs|and|mod|nand|nor|not|or|rem|rol|ror|sla|sll|sra|srl|xnor|xor)\b/i,punctuation:/[{}[\];(),.:]/}}e.exports=t,t.displayName="vhdl",t.aliases=[]},613:(e,t,n)=>{e.exports=function(e){var t=n(2074),f=n(2475),h=n(5975);if(e){if(void 0!==e.springCoeff)throw new Error("springCoeff was renamed to springCoefficient");if(void 0!==e.dragCoeff)throw new Error("dragCoeff was renamed to dragCoefficient")}e=f(e,{springLength:10,springCoefficient:.8,gravity:-12,theta:.8,dragCoefficient:.9,timeStep:.5,adaptiveTimeStepWeight:0,dimensions:2,debug:!1});var d=l[e.dimensions];if(!d){var p=e.dimensions;d={Body:r(p,e.debug),createQuadTree:i(p),createBounds:a(p),createDragForce:o(p),createSpringForce:s(p),integrate:c(p)},l[p]=d}var g=d.Body,b=d.createQuadTree,m=d.createBounds,w=d.createDragForce,v=d.createSpringForce,y=d.integrate,E=n(4374).random(42),_=[],S=[],x=b(e,E),T=m(_,e,E),A=v(e,E),k=w(e),C=[],M=new Map,I=0;N("nbody",function(){if(0!==_.length){x.insertBodies(_);for(var e=_.length;e--;){var t=_[e];t.isPinned||(t.reset(),x.updateBodyForce(t),k.update(t))}}}),N("spring",function(){for(var e=S.length;e--;)A.update(S[e])});var O={bodies:_,quadTree:x,springs:S,settings:e,addForce:N,removeForce:function(e){var t=C.indexOf(M.get(e));t<0||(C.splice(t,1),M.delete(e))},getForces:function(){return M},step:function(){for(var t=0;tnew g(e))(e);return _.push(t),t},removeBody:function(e){if(e){var t=_.indexOf(e);if(!(t<0))return _.splice(t,1),0===_.length&&T.reset(),!0}},addSpring:function(e,n,r,i){if(!e||!n)throw new Error("Cannot add null spring to force simulator");"number"!=typeof r&&(r=-1);var a=new t(e,n,r,i>=0?i:-1);return S.push(a),a},getTotalMovement:function(){return 0},removeSpring:function(e){if(e){var t=S.indexOf(e);return t>-1?(S.splice(t,1),!0):void 0}},getBestNewBodyPosition:function(e){return T.getBestNewPosition(e)},getBBox:R,getBoundingBox:R,invalidateBBox:function(){console.warn("invalidateBBox() is deprecated, bounds always recomputed on `getBBox()` call")},gravity:function(t){return void 0!==t?(e.gravity=t,x.options({gravity:t}),this):e.gravity},theta:function(t){return void 0!==t?(e.theta=t,x.options({theta:t}),this):e.theta},random:E};return function(e,t){for(var n in e)u(e,t,n)}(e,O),h(O),O;function R(){return T.update(),T.box}function N(e,t){if(M.has(e))throw new Error("Force "+e+" is already added");M.set(e,t),C.push(t)}};var r=n(81),i=n(934),a=n(3599),o=n(5788),s=n(1325),c=n(680),l={};function u(e,t,n){if(e.hasOwnProperty(n)&&"function"!=typeof t[n]){var r=Number.isFinite(e[n]);t[n]=r?function(r){if(void 0!==r){if(!Number.isFinite(r))throw new Error("Value of "+n+" should be a valid number.");return e[n]=r,t}return e[n]}:function(r){return void 0!==r?(e[n]=r,t):e[n]}}}},618:e=>{"use strict";function t(e){!function(e){e.languages.ruby=e.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===||[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),e.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var t={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:e.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete e.languages.ruby.function;var n="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",r=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;e.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+n+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+r),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+r+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),e.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+n),greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+n),greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete e.languages.ruby.string,e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),e.languages.rb=e.languages.ruby}(e)}e.exports=t,t.displayName="ruby",t.aliases=["rb"]},640:e=>{"use strict";function t(e){!function(e){e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete e.languages.sass.atrule;var t=/\$[-\w]+|#\{\$[-\w]+\}/,n=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:t,operator:n}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:t,operator:n,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})}(e)}e.exports=t,t.displayName="sass",t.aliases=[]},672:function(e){e.exports=function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:r,getOwnPropertyDescriptor:i}=Object;let{freeze:a,seal:o,create:s}=Object,{apply:c,construct:l}="undefined"!=typeof Reflect&&Reflect;c||(c=function(e,t,n){return e.apply(t,n)}),a||(a=function(e){return e}),o||(o=function(e){return e}),l||(l=function(e,t){return new e(...t)});const u=_(Array.prototype.forEach),f=_(Array.prototype.pop),h=_(Array.prototype.push),d=_(String.prototype.toLowerCase),p=_(String.prototype.toString),g=_(String.prototype.match),b=_(String.prototype.replace),m=_(String.prototype.indexOf),w=_(String.prototype.trim),v=_(RegExp.prototype.test),y=(E=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),i=1;i/gm),j=o(/\${[\w\W]*}/gm),B=o(/^data-[\-\w.\u00B7-\uFFFF]/),z=o(/^aria-[\-\w]+$/),$=o(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),H=o(/^(?:\w+script|data):/i),G=o(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),V=o(/^html$/i);var W=Object.freeze({__proto__:null,MUSTACHE_EXPR:F,ERB_EXPR:U,TMPLIT_EXPR:j,DATA_ATTR:B,ARIA_ATTR:z,IS_ALLOWED_URI:$,IS_SCRIPT_OR_DATA:H,ATTR_WHITESPACE:G,DOCTYPE_NAME:V});const q=()=>"undefined"==typeof window?null:window;return function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:q();const r=e=>t(e);if(r.version="3.0.5",r.removed=[],!n||!n.document||9!==n.document.nodeType)return r.isSupported=!1,r;const i=n.document,o=i.currentScript;let{document:s}=n;const{DocumentFragment:c,HTMLTemplateElement:l,Node:E,Element:_,NodeFilter:F,NamedNodeMap:U=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:j,DOMParser:B,trustedTypes:z}=n,H=_.prototype,G=T(H,"cloneNode"),X=T(H,"nextSibling"),Y=T(H,"childNodes"),K=T(H,"parentNode");if("function"==typeof l){const e=s.createElement("template");e.content&&e.content.ownerDocument&&(s=e.content.ownerDocument)}let Z,Q="";const{implementation:J,createNodeIterator:ee,createDocumentFragment:te,getElementsByTagName:ne}=s,{importNode:re}=i;let ie={};r.isSupported="function"==typeof e&&"function"==typeof K&&J&&void 0!==J.createHTMLDocument;const{MUSTACHE_EXPR:ae,ERB_EXPR:oe,TMPLIT_EXPR:se,DATA_ATTR:ce,ARIA_ATTR:le,IS_SCRIPT_OR_DATA:ue,ATTR_WHITESPACE:fe}=W;let{IS_ALLOWED_URI:he}=W,de=null;const pe=S({},[...A,...k,...C,...I,...R]);let ge=null;const be=S({},[...N,...P,...L,...D]);let me=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),we=null,ve=null,ye=!0,Ee=!0,_e=!1,Se=!0,xe=!1,Te=!1,Ae=!1,ke=!1,Ce=!1,Me=!1,Ie=!1,Oe=!0,Re=!1,Ne=!0,Pe=!1,Le={},De=null;const Fe=S({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ue=null;const je=S({},["audio","video","img","source","image","track"]);let Be=null;const ze=S({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),$e="http://www.w3.org/1998/Math/MathML",He="http://www.w3.org/2000/svg",Ge="http://www.w3.org/1999/xhtml";let Ve=Ge,We=!1,qe=null;const Xe=S({},[$e,He,Ge],p);let Ye;const Ke=["application/xhtml+xml","text/html"];let Ze,Qe=null;const Je=s.createElement("form"),et=function(e){return e instanceof RegExp||e instanceof Function},tt=function(e){if(!Qe||Qe!==e){if(e&&"object"==typeof e||(e={}),e=x(e),Ye=Ye=-1===Ke.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Ze="application/xhtml+xml"===Ye?p:d,de="ALLOWED_TAGS"in e?S({},e.ALLOWED_TAGS,Ze):pe,ge="ALLOWED_ATTR"in e?S({},e.ALLOWED_ATTR,Ze):be,qe="ALLOWED_NAMESPACES"in e?S({},e.ALLOWED_NAMESPACES,p):Xe,Be="ADD_URI_SAFE_ATTR"in e?S(x(ze),e.ADD_URI_SAFE_ATTR,Ze):ze,Ue="ADD_DATA_URI_TAGS"in e?S(x(je),e.ADD_DATA_URI_TAGS,Ze):je,De="FORBID_CONTENTS"in e?S({},e.FORBID_CONTENTS,Ze):Fe,we="FORBID_TAGS"in e?S({},e.FORBID_TAGS,Ze):{},ve="FORBID_ATTR"in e?S({},e.FORBID_ATTR,Ze):{},Le="USE_PROFILES"in e&&e.USE_PROFILES,ye=!1!==e.ALLOW_ARIA_ATTR,Ee=!1!==e.ALLOW_DATA_ATTR,_e=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Se=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,xe=e.SAFE_FOR_TEMPLATES||!1,Te=e.WHOLE_DOCUMENT||!1,Ce=e.RETURN_DOM||!1,Me=e.RETURN_DOM_FRAGMENT||!1,Ie=e.RETURN_TRUSTED_TYPE||!1,ke=e.FORCE_BODY||!1,Oe=!1!==e.SANITIZE_DOM,Re=e.SANITIZE_NAMED_PROPS||!1,Ne=!1!==e.KEEP_CONTENT,Pe=e.IN_PLACE||!1,he=e.ALLOWED_URI_REGEXP||$,Ve=e.NAMESPACE||Ge,me=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&et(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(me.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&et(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(me.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(me.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),xe&&(Ee=!1),Me&&(Ce=!0),Le&&(de=S({},[...R]),ge=[],!0===Le.html&&(S(de,A),S(ge,N)),!0===Le.svg&&(S(de,k),S(ge,P),S(ge,D)),!0===Le.svgFilters&&(S(de,C),S(ge,P),S(ge,D)),!0===Le.mathMl&&(S(de,I),S(ge,L),S(ge,D))),e.ADD_TAGS&&(de===pe&&(de=x(de)),S(de,e.ADD_TAGS,Ze)),e.ADD_ATTR&&(ge===be&&(ge=x(ge)),S(ge,e.ADD_ATTR,Ze)),e.ADD_URI_SAFE_ATTR&&S(Be,e.ADD_URI_SAFE_ATTR,Ze),e.FORBID_CONTENTS&&(De===Fe&&(De=x(De)),S(De,e.FORBID_CONTENTS,Ze)),Ne&&(de["#text"]=!0),Te&&S(de,["html","head","body"]),de.table&&(S(de,["tbody"]),delete we.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw y('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw y('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Z=e.TRUSTED_TYPES_POLICY,Q=Z.createHTML("")}else void 0===Z&&(Z=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const i="dompurify"+(n?"#"+n:"");try{return e.createPolicy(i,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+i+" could not be created."),null}}(z,o)),null!==Z&&"string"==typeof Q&&(Q=Z.createHTML(""));a&&a(e),Qe=e}},nt=S({},["mi","mo","mn","ms","mtext"]),rt=S({},["foreignobject","desc","title","annotation-xml"]),it=S({},["title","style","font","a","script"]),at=S({},k);S(at,C),S(at,M);const ot=S({},I);S(ot,O);const st=function(e){h(r.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},ct=function(e,t){try{h(r.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){h(r.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!ge[e])if(Ce||Me)try{st(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},lt=function(e){let t,n;if(ke)e=""+e;else{const t=g(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Ye&&Ve===Ge&&(e=''+e+"");const r=Z?Z.createHTML(e):e;if(Ve===Ge)try{t=(new B).parseFromString(r,Ye)}catch(e){}if(!t||!t.documentElement){t=J.createDocument(Ve,"template",null);try{t.documentElement.innerHTML=We?Q:r}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(s.createTextNode(n),i.childNodes[0]||null),Ve===Ge?ne.call(t,Te?"html":"body")[0]:Te?t.documentElement:i},ut=function(e){return ee.call(e.ownerDocument||e,e,F.SHOW_ELEMENT|F.SHOW_COMMENT|F.SHOW_TEXT,null,!1)},ft=function(e){return"object"==typeof E?e instanceof E:e&&"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},ht=function(e,t,n){ie[e]&&u(ie[e],e=>{e.call(r,t,n,Qe)})},dt=function(e){let t;if(ht("beforeSanitizeElements",e,null),(n=e)instanceof j&&("string"!=typeof n.nodeName||"string"!=typeof n.textContent||"function"!=typeof n.removeChild||!(n.attributes instanceof U)||"function"!=typeof n.removeAttribute||"function"!=typeof n.setAttribute||"string"!=typeof n.namespaceURI||"function"!=typeof n.insertBefore||"function"!=typeof n.hasChildNodes))return st(e),!0;var n;const i=Ze(e.nodeName);if(ht("uponSanitizeElement",e,{tagName:i,allowedTags:de}),e.hasChildNodes()&&!ft(e.firstElementChild)&&(!ft(e.content)||!ft(e.content.firstElementChild))&&v(/<[/\w]/g,e.innerHTML)&&v(/<[/\w]/g,e.textContent))return st(e),!0;if(!de[i]||we[i]){if(!we[i]&>(i)){if(me.tagNameCheck instanceof RegExp&&v(me.tagNameCheck,i))return!1;if(me.tagNameCheck instanceof Function&&me.tagNameCheck(i))return!1}if(Ne&&!De[i]){const t=K(e)||e.parentNode,n=Y(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r)t.insertBefore(G(n[r],!0),X(e))}return st(e),!0}return e instanceof _&&!function(e){let t=K(e);t&&t.tagName||(t={namespaceURI:Ve,tagName:"template"});const n=d(e.tagName),r=d(t.tagName);return!!qe[e.namespaceURI]&&(e.namespaceURI===He?t.namespaceURI===Ge?"svg"===n:t.namespaceURI===$e?"svg"===n&&("annotation-xml"===r||nt[r]):Boolean(at[n]):e.namespaceURI===$e?t.namespaceURI===Ge?"math"===n:t.namespaceURI===He?"math"===n&&rt[r]:Boolean(ot[n]):e.namespaceURI===Ge?!(t.namespaceURI===He&&!rt[r])&&!(t.namespaceURI===$e&&!nt[r])&&!ot[n]&&(it[n]||!at[n]):!("application/xhtml+xml"!==Ye||!qe[e.namespaceURI]))}(e)?(st(e),!0):"noscript"!==i&&"noembed"!==i&&"noframes"!==i||!v(/<\/no(script|embed|frames)/i,e.innerHTML)?(xe&&3===e.nodeType&&(t=e.textContent,t=b(t,ae," "),t=b(t,oe," "),t=b(t,se," "),e.textContent!==t&&(h(r.removed,{element:e.cloneNode()}),e.textContent=t)),ht("afterSanitizeElements",e,null),!1):(st(e),!0)},pt=function(e,t,n){if(Oe&&("id"===t||"name"===t)&&(n in s||n in Je))return!1;if(Ee&&!ve[t]&&v(ce,t));else if(ye&&v(le,t));else if(!ge[t]||ve[t]){if(!(gt(e)&&(me.tagNameCheck instanceof RegExp&&v(me.tagNameCheck,e)||me.tagNameCheck instanceof Function&&me.tagNameCheck(e))&&(me.attributeNameCheck instanceof RegExp&&v(me.attributeNameCheck,t)||me.attributeNameCheck instanceof Function&&me.attributeNameCheck(t))||"is"===t&&me.allowCustomizedBuiltInElements&&(me.tagNameCheck instanceof RegExp&&v(me.tagNameCheck,n)||me.tagNameCheck instanceof Function&&me.tagNameCheck(n))))return!1}else if(Be[t]);else if(v(he,b(n,fe,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==m(n,"data:")||!Ue[e])if(_e&&!v(ue,b(n,fe,"")));else if(n)return!1;return!0},gt=function(e){return e.indexOf("-")>0},bt=function(e){let t,n,i,a;ht("beforeSanitizeAttributes",e,null);const{attributes:o}=e;if(!o)return;const s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ge};for(a=o.length;a--;){t=o[a];const{name:c,namespaceURI:l}=t;if(n="value"===c?t.value:w(t.value),i=Ze(c),s.attrName=i,s.attrValue=n,s.keepAttr=!0,s.forceKeepAttr=void 0,ht("uponSanitizeAttribute",e,s),n=s.attrValue,s.forceKeepAttr)continue;if(ct(c,e),!s.keepAttr)continue;if(!Se&&v(/\/>/i,n)){ct(c,e);continue}xe&&(n=b(n,ae," "),n=b(n,oe," "),n=b(n,se," "));const u=Ze(e.nodeName);if(pt(u,i,n)){if(!Re||"id"!==i&&"name"!==i||(ct(c,e),n="user-content-"+n),Z&&"object"==typeof z&&"function"==typeof z.getAttributeType)if(l);else switch(z.getAttributeType(u,i)){case"TrustedHTML":n=Z.createHTML(n);break;case"TrustedScriptURL":n=Z.createScriptURL(n)}try{l?e.setAttributeNS(l,c,n):e.setAttribute(c,n),f(r.removed)}catch(e){}}}ht("afterSanitizeAttributes",e,null)},mt=function e(t){let n;const r=ut(t);for(ht("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)ht("uponSanitizeShadowNode",n,null),dt(n)||(n.content instanceof c&&e(n.content),bt(n));ht("afterSanitizeShadowDOM",t,null)};return r.sanitize=function(e){let t,n,a,o,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(We=!e,We&&(e="\x3c!--\x3e"),"string"!=typeof e&&!ft(e)){if("function"!=typeof e.toString)throw y("toString is not a function");if("string"!=typeof(e=e.toString()))throw y("dirty is not a string, aborting")}if(!r.isSupported)return e;if(Ae||tt(s),r.removed=[],"string"==typeof e&&(Pe=!1),Pe){if(e.nodeName){const t=Ze(e.nodeName);if(!de[t]||we[t])throw y("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof E)t=lt("\x3c!----\x3e"),n=t.ownerDocument.importNode(e,!0),1===n.nodeType&&"BODY"===n.nodeName||"HTML"===n.nodeName?t=n:t.appendChild(n);else{if(!Ce&&!xe&&!Te&&-1===e.indexOf("<"))return Z&&Ie?Z.createHTML(e):e;if(t=lt(e),!t)return Ce?null:Ie?Q:""}t&&ke&&st(t.firstChild);const l=ut(Pe?e:t);for(;a=l.nextNode();)dt(a)||(a.content instanceof c&&mt(a.content),bt(a));if(Pe)return e;if(Ce){if(Me)for(o=te.call(t.ownerDocument);t.firstChild;)o.appendChild(t.firstChild);else o=t;return(ge.shadowroot||ge.shadowrootmode)&&(o=re.call(i,o,!0)),o}let u=Te?t.outerHTML:t.innerHTML;return Te&&de["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&v(V,t.ownerDocument.doctype.name)&&(u="\n"+u),xe&&(u=b(u,ae," "),u=b(u,oe," "),u=b(u,se," ")),Z&&Ie?Z.createHTML(u):u},r.setConfig=function(e){tt(e),Ae=!0},r.clearConfig=function(){Qe=null,Ae=!1},r.isValidAttribute=function(e,t,n){Qe||tt({});const r=Ze(e),i=Ze(t);return pt(r,i,n)},r.addHook=function(e,t){"function"==typeof t&&(ie[e]=ie[e]||[],h(ie[e],t))},r.removeHook=function(e){if(ie[e])return f(ie[e])},r.removeHooks=function(e){ie[e]&&(ie[e]=[])},r.removeAllHooks=function(){ie={}},r}()}()},680:(e,t,n)=>{const r=n(3103);function i(e){let t=r(e);return`\n var length = bodies.length;\n if (length === 0) return 0;\n\n ${t("var d{var} = 0, t{var} = 0;",{indent:2})}\n\n for (var i = 0; i < length; ++i) {\n var body = bodies[i];\n if (body.isPinned) continue;\n\n if (adaptiveTimeStepWeight && body.springCount) {\n timeStep = (adaptiveTimeStepWeight * body.springLength/body.springCount);\n }\n\n var coeff = timeStep / body.mass;\n\n ${t("body.velocity.{var} += coeff * body.force.{var};",{indent:4})}\n ${t("var v{var} = body.velocity.{var};",{indent:4})}\n var v = Math.sqrt(${t("v{var} * v{var}",{join:" + "})});\n\n if (v > 1) {\n // We normalize it so that we move within timeStep range. \n // for the case when v <= 1 - we let velocity to fade out.\n ${t("body.velocity.{var} = v{var} / v;",{indent:6})}\n }\n\n ${t("d{var} = timeStep * body.velocity.{var};",{indent:4})}\n\n ${t("body.pos.{var} += d{var};",{indent:4})}\n\n ${t("t{var} += Math.abs(d{var});",{indent:4})}\n }\n\n return (${t("t{var} * t{var}",{join:" + "})})/length;\n`}e.exports=function(e){let t=i(e);return new Function("bodies","timeStep","adaptiveTimeStepWeight",t)},e.exports.generateIntegratorFunctionBody=i},706:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},712:e=>{"use strict";function t(e){!function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var i=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],a=r.variable[1].inside,o=0;o{"use strict";function t(e){e.languages.bicep={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],property:[{pattern:/([\r\n][ \t]*)[a-z_]\w*(?=[ \t]*:)/i,lookbehind:!0},{pattern:/([\r\n][ \t]*)'(?:\\.|\$(?!\{)|[^'\\\r\n$])*'(?=[ \t]*:)/,lookbehind:!0,greedy:!0}],string:[{pattern:/'''[^'][\s\S]*?'''/,greedy:!0},{pattern:/(^|[^\\'])'(?:\\.|\$(?!\{)|[^'\\\r\n$])*'/,lookbehind:!0,greedy:!0}],"interpolated-string":{pattern:/(^|[^\\'])'(?:\\.|\$(?:(?!\{)|\{[^{}\r\n]*\})|[^'\\\r\n$])*'/,lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/\$\{[^{}\r\n]*\}/,inside:{expression:{pattern:/(^\$\{)[\s\S]+(?=\}$)/,lookbehind:!0},punctuation:/^\$\{|\}$/}},string:/[\s\S]+/}},datatype:{pattern:/(\b(?:output|param)\b[ \t]+\w+[ \t]+)\w+\b/,lookbehind:!0,alias:"class-name"},boolean:/\b(?:false|true)\b/,keyword:/\b(?:existing|for|if|in|module|null|output|param|resource|targetScope|var)\b/,decorator:/@\w+\b/,function:/\b[a-z_]\w*(?=[ \t]*\()/i,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/,punctuation:/[{}[\];(),.:]/},e.languages.bicep["interpolated-string"].inside.interpolation.inside.expression.inside=e.languages.bicep}e.exports=t,t.displayName="bicep",t.aliases=[]},740:(e,t,n)=>{"use strict";var r=n(618);function i(e){e.register(r),function(e){e.languages.haml={"multiline-comment":{pattern:/((?:^|\r?\n|\r)([\t ]*))(?:\/|-#).*(?:(?:\r?\n|\r)\2[\t ].+)*/,lookbehind:!0,alias:"comment"},"multiline-code":[{pattern:/((?:^|\r?\n|\r)([\t ]*)(?:[~-]|[&!]?=)).*,[\t ]*(?:(?:\r?\n|\r)\2[\t ].*,[\t ]*)*(?:(?:\r?\n|\r)\2[\t ].+)/,lookbehind:!0,inside:e.languages.ruby},{pattern:/((?:^|\r?\n|\r)([\t ]*)(?:[~-]|[&!]?=)).*\|[\t ]*(?:(?:\r?\n|\r)\2[\t ].*\|[\t ]*)*/,lookbehind:!0,inside:e.languages.ruby}],filter:{pattern:/((?:^|\r?\n|\r)([\t ]*)):[\w-]+(?:(?:\r?\n|\r)(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/,lookbehind:!0,inside:{"filter-name":{pattern:/^:[\w-]+/,alias:"symbol"}}},markup:{pattern:/((?:^|\r?\n|\r)[\t ]*)<.+/,lookbehind:!0,inside:e.languages.markup},doctype:{pattern:/((?:^|\r?\n|\r)[\t ]*)!!!(?: .+)?/,lookbehind:!0},tag:{pattern:/((?:^|\r?\n|\r)[\t ]*)[%.#][\w\-#.]*[\w\-](?:\([^)]+\)|\{(?:\{[^}]+\}|[^{}])+\}|\[[^\]]+\])*[\/<>]*/,lookbehind:!0,inside:{attributes:[{pattern:/(^|[^#])\{(?:\{[^}]+\}|[^{}])+\}/,lookbehind:!0,inside:e.languages.ruby},{pattern:/\([^)]+\)/,inside:{"attr-value":{pattern:/(=\s*)(?:"(?:\\.|[^\\"\r\n])*"|[^)\s]+)/,lookbehind:!0},"attr-name":/[\w:-]+(?=\s*!?=|\s*[,)])/,punctuation:/[=(),]/}},{pattern:/\[[^\]]+\]/,inside:e.languages.ruby}],punctuation:/[<>]/}},code:{pattern:/((?:^|\r?\n|\r)[\t ]*(?:[~-]|[&!]?=)).+/,lookbehind:!0,inside:e.languages.ruby},interpolation:{pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"},ruby:{pattern:/[\s\S]+/,inside:e.languages.ruby}}},punctuation:{pattern:/((?:^|\r?\n|\r)[\t ]*)[~=\-&!]+/,lookbehind:!0}};for(var t=["css",{filter:"coffee",language:"coffeescript"},"erb","javascript","less","markdown","ruby","scss","textile"],n={},r=0,i=t.length;r{"use strict";function t(e){!function(e){var t=/(?:\B-|\b_|\b)[A-Za-z][\w-]*(?![\w-])/.source,n="(?:"+/\b(?:unsigned\s+)?long\s+long(?![\w-])/.source+"|"+/\b(?:unrestricted|unsigned)\s+[a-z]+(?![\w-])/.source+"|"+/(?!(?:unrestricted|unsigned)\b)/.source+t+/(?:\s*<(?:[^<>]|<[^<>]*>)*>)?/.source+")"+/(?:\s*\?)?/.source,r={};for(var i in e.languages["web-idl"]={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},string:{pattern:/"[^"]*"/,greedy:!0},namespace:{pattern:RegExp(/(\bnamespace\s+)/.source+t),lookbehind:!0},"class-name":[{pattern:/(^|[^\w-])(?:iterable|maplike|setlike)\s*<(?:[^<>]|<[^<>]*>)*>/,lookbehind:!0,inside:r},{pattern:RegExp(/(\b(?:attribute|const|deleter|getter|optional|setter)\s+)/.source+n),lookbehind:!0,inside:r},{pattern:RegExp("("+/\bcallback\s+/.source+t+/\s*=\s*/.source+")"+n),lookbehind:!0,inside:r},{pattern:RegExp(/(\btypedef\b\s*)/.source+n),lookbehind:!0,inside:r},{pattern:RegExp(/(\b(?:callback|dictionary|enum|interface(?:\s+mixin)?)\s+)(?!(?:interface|mixin)\b)/.source+t),lookbehind:!0},{pattern:RegExp(/(:\s*)/.source+t),lookbehind:!0},RegExp(t+/(?=\s+(?:implements|includes)\b)/.source),{pattern:RegExp(/(\b(?:implements|includes)\s+)/.source+t),lookbehind:!0},{pattern:RegExp(n+"(?="+/\s*(?:\.{3}\s*)?/.source+t+/\s*[(),;=]/.source+")"),inside:r}],builtin:/\b(?:ArrayBuffer|BigInt64Array|BigUint64Array|ByteString|DOMString|DataView|Float32Array|Float64Array|FrozenArray|Int16Array|Int32Array|Int8Array|ObservableArray|Promise|USVString|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray)\b/,keyword:[/\b(?:async|attribute|callback|const|constructor|deleter|dictionary|enum|getter|implements|includes|inherit|interface|mixin|namespace|null|optional|or|partial|readonly|required|setter|static|stringifier|typedef|unrestricted)\b/,/\b(?:any|bigint|boolean|byte|double|float|iterable|long|maplike|object|octet|record|sequence|setlike|short|symbol|undefined|unsigned|void)\b/],boolean:/\b(?:false|true)\b/,number:{pattern:/(^|[^\w-])-?(?:0x[0-9a-f]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|NaN|Infinity)(?![\w-])/i,lookbehind:!0},operator:/\.{3}|[=:?<>-]/,punctuation:/[(){}[\].,;]/},e.languages["web-idl"])"class-name"!==i&&(r[i]=e.languages["web-idl"][i]);e.languages.webidl=e.languages["web-idl"]}(e)}e.exports=t,t.displayName="webIdl",t.aliases=[]},745:e=>{"use strict";function t(e){!function(e){var t=e.languages.parser=e.languages.extend("markup",{keyword:{pattern:/(^|[^^])(?:\^(?:case|eval|for|if|switch|throw)\b|@(?:BASE|CLASS|GET(?:_DEFAULT)?|OPTIONS|SET_DEFAULT|USE)\b)/,lookbehind:!0},variable:{pattern:/(^|[^^])\B\$(?:\w+|(?=[.{]))(?:(?:\.|::?)\w+)*(?:\.|::?)?/,lookbehind:!0,inside:{punctuation:/\.|:+/}},function:{pattern:/(^|[^^])\B[@^]\w+(?:(?:\.|::?)\w+)*(?:\.|::?)?/,lookbehind:!0,inside:{keyword:{pattern:/(^@)(?:GET_|SET_)/,lookbehind:!0},punctuation:/\.|:+/}},escape:{pattern:/\^(?:[$^;@()\[\]{}"':]|#[a-f\d]*)/i,alias:"builtin"},punctuation:/[\[\](){};]/});t=e.languages.insertBefore("parser","keyword",{"parser-comment":{pattern:/(\s)#.*/,lookbehind:!0,alias:"comment"},expression:{pattern:/(^|[^^])\((?:[^()]|\((?:[^()]|\((?:[^()])*\))*\))*\)/,greedy:!0,lookbehind:!0,inside:{string:{pattern:/(^|[^^])(["'])(?:(?!\2)[^^]|\^[\s\S])*\2/,lookbehind:!0},keyword:t.keyword,variable:t.variable,function:t.function,boolean:/\b(?:false|true)\b/,number:/\b(?:0x[a-f\d]+|\d+(?:\.\d*)?(?:e[+-]?\d+)?)\b/i,escape:t.escape,operator:/[~+*\/\\%]|!(?:\|\|?|=)?|&&?|\|\|?|==|<[<=]?|>[>=]?|-[fd]?|\b(?:def|eq|ge|gt|in|is|le|lt|ne)\b/,punctuation:t.punctuation}}}),e.languages.insertBefore("inside","punctuation",{expression:t.expression,keyword:t.keyword,variable:t.variable,function:t.function,escape:t.escape,"parser-punctuation":{pattern:t.punctuation,alias:"punctuation"}},t.tag.inside["attr-value"])}(e)}e.exports=t,t.displayName="parser",t.aliases=[]},768:e=>{"use strict";function t(e){e.languages.asm6502={comment:/;.*/,directive:{pattern:/\.\w+(?= )/,alias:"property"},string:/(["'`])(?:\\.|(?!\1)[^\\\r\n])*\1/,"op-code":{pattern:/\b(?:ADC|AND|ASL|BCC|BCS|BEQ|BIT|BMI|BNE|BPL|BRK|BVC|BVS|CLC|CLD|CLI|CLV|CMP|CPX|CPY|DEC|DEX|DEY|EOR|INC|INX|INY|JMP|JSR|LDA|LDX|LDY|LSR|NOP|ORA|PHA|PHP|PLA|PLP|ROL|ROR|RTI|RTS|SBC|SEC|SED|SEI|STA|STX|STY|TAX|TAY|TSX|TXA|TXS|TYA|adc|and|asl|bcc|bcs|beq|bit|bmi|bne|bpl|brk|bvc|bvs|clc|cld|cli|clv|cmp|cpx|cpy|dec|dex|dey|eor|inc|inx|iny|jmp|jsr|lda|ldx|ldy|lsr|nop|ora|pha|php|pla|plp|rol|ror|rti|rts|sbc|sec|sed|sei|sta|stx|sty|tax|tay|tsx|txa|txs|tya)\b/,alias:"keyword"},"hex-number":{pattern:/#?\$[\da-f]{1,4}\b/i,alias:"number"},"binary-number":{pattern:/#?%[01]+\b/,alias:"number"},"decimal-number":{pattern:/#?\b\d+\b/,alias:"number"},register:{pattern:/\b[xya]\b/i,alias:"variable"},punctuation:/[(),:]/}}e.exports=t,t.displayName="asm6502",t.aliases=[]},816:(e,t,n)=>{"use strict";var r=n(1535),i=n(2208),a=r.booleanish,o=r.number,s=r.spaceSeparated;e.exports=i({transform:function(e,t){return"role"===t?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:a,ariaAutoComplete:null,ariaBusy:a,ariaChecked:a,ariaColCount:o,ariaColIndex:o,ariaColSpan:o,ariaControls:s,ariaCurrent:null,ariaDescribedBy:s,ariaDetails:null,ariaDisabled:a,ariaDropEffect:s,ariaErrorMessage:null,ariaExpanded:a,ariaFlowTo:s,ariaGrabbed:a,ariaHasPopup:null,ariaHidden:a,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:s,ariaLevel:o,ariaLive:null,ariaModal:a,ariaMultiLine:a,ariaMultiSelectable:a,ariaOrientation:null,ariaOwns:s,ariaPlaceholder:null,ariaPosInSet:o,ariaPressed:a,ariaReadOnly:a,ariaRelevant:null,ariaRequired:a,ariaRoleDescription:s,ariaRowCount:o,ariaRowIndex:o,ariaRowSpan:o,ariaSelected:a,ariaSetSize:o,ariaSort:null,ariaValueMax:o,ariaValueMin:o,ariaValueNow:o,ariaValueText:null,role:null}})},851:(e,t,n)=>{e.exports=function(e){if("uniqueLinkId"in(e=e||{})&&(console.warn("ngraph.graph: Starting from version 0.14 `uniqueLinkId` is deprecated.\nUse `multigraph` option instead\n","\n","Note: there is also change in default behavior: From now on each graph\nis considered to be not a multigraph by default (each edge is unique)."),e.multigraph=e.uniqueLinkId),void 0===e.multigraph&&(e.multigraph=!1),"function"!=typeof Map)throw new Error("ngraph.graph requires `Map` to be defined. Please polyfill it before using ngraph");var t,n=new Map,c=new Map,l={},u=0,f=e.multigraph?function(e,t,n){var r=s(e,t),i=l.hasOwnProperty(r);if(i||A(e,t)){i||(l[r]=0);var a="@"+ ++l[r];r=s(e+a,t+a)}return new o(e,t,n,r)}:function(e,t,n){var r=s(e,t),i=c.get(r);return i?(i.data=n,i):new o(e,t,n,r)},h=[],d=k,p=k,g=k,b=k,m={version:20,addNode:y,addLink:function(e,t,n){g();var r=E(e)||y(e),i=E(t)||y(t),o=f(e,t,n),s=c.has(o.id);return c.set(o.id,o),a(r,o),e!==t&&a(i,o),d(o,s?"update":"add"),b(),o},removeLink:function(e,t){return void 0!==t&&(e=A(e,t)),T(e)},removeNode:_,getNode:E,getNodeCount:S,getLinkCount:x,getEdgeCount:x,getLinksCount:x,getNodesCount:S,getLinks:function(e){var t=E(e);return t?t.links:null},forEachNode:I,forEachLinkedNode:function(e,t,r){var i=E(e);if(i&&i.links&&"function"==typeof t)return r?function(e,t,r){for(var i=e.values(),a=i.next();!a.done;){var o=a.value;if(o.fromId===t&&r(n.get(o.toId),o))return!0;a=i.next()}}(i.links,e,t):function(e,t,r){for(var i=e.values(),a=i.next();!a.done;){var o=a.value,s=o.fromId===t?o.toId:o.fromId;if(r(n.get(s),o))return!0;a=i.next()}}(i.links,e,t)},forEachLink:function(e){if("function"==typeof e)for(var t=c.values(),n=t.next();!n.done;){if(e(n.value))return!0;n=t.next()}},beginUpdate:g,endUpdate:b,clear:function(){g(),I(function(e){_(e.id)}),b()},hasLink:A,hasNode:E,getLink:A};return r(m),t=m.on,m.on=function(){return m.beginUpdate=g=C,m.endUpdate=b=M,d=w,p=v,m.on=t,t.apply(m,arguments)},m;function w(e,t){h.push({link:e,changeType:t})}function v(e,t){h.push({node:e,changeType:t})}function y(e,t){if(void 0===e)throw new Error("Invalid node identifier");g();var r=E(e);return r?(r.data=t,p(r,"update")):(r=new i(e,t),p(r,"add")),n.set(e,r),b(),r}function E(e){return n.get(e)}function _(e){var t=E(e);if(!t)return!1;g();var r=t.links;return r&&(r.forEach(T),t.links=null),n.delete(e),p(t,"remove"),b(),!0}function S(){return n.size}function x(){return c.size}function T(e){if(!e)return!1;if(!c.get(e.id))return!1;g(),c.delete(e.id);var t=E(e.fromId),n=E(e.toId);return t&&t.links.delete(e),n&&n.links.delete(e),d(e,"remove"),b(),!0}function A(e,t){if(void 0!==e&&void 0!==t)return c.get(s(e,t))}function k(){}function C(){u+=1}function M(){0==(u-=1)&&h.length>0&&(m.fire("changed",h),h.length=0)}function I(e){if("function"!=typeof e)throw new Error("Function is expected to iterate over graph nodes. You passed "+e);for(var t=n.values(),r=t.next();!r.done;){if(e(r.value))return!0;r=t.next()}}};var r=n(5975);function i(e,t){this.id=e,this.links=null,this.data=t}function a(e,t){e.links?e.links.add(t):e.links=new Set([t])}function o(e,t,n,r){this.fromId=e,this.toId=t,this.data=n,this.id=r}function s(e,t){return e.toString()+"👉 "+t.toString()}},856:(e,t,n)=>{"use strict";var r=n(7183);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,a,o){if(o!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i};return n.PropTypes=n,n}},872:(e,t,n)=>{"use strict";n.d(t,{QueryClient:()=>r.QueryClient,QueryClientProvider:()=>i.QueryClientProvider,useQuery:()=>i.useQuery});var r=n(4746);n.o(r,"QueryClientProvider")&&n.d(t,{QueryClientProvider:function(){return r.QueryClientProvider}}),n.o(r,"useQuery")&&n.d(t,{useQuery:function(){return r.useQuery}});var i=n(1443)},889:(e,t,n)=>{"use strict";var r=n(4336);function i(e){e.register(r),e.languages.idris=e.languages.extend("haskell",{comment:{pattern:/(?:(?:--|\|\|\|).*$|\{-[\s\S]*?-\})/m},keyword:/\b(?:Type|case|class|codata|constructor|corecord|data|do|dsl|else|export|if|implementation|implicit|import|impossible|in|infix|infixl|infixr|instance|interface|let|module|mutual|namespace|of|parameters|partial|postulate|private|proof|public|quoteGoal|record|rewrite|syntax|then|total|using|where|with)\b/,builtin:void 0}),e.languages.insertBefore("idris","keyword",{"import-statement":{pattern:/(^\s*import\s+)(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*/m,lookbehind:!0,inside:{punctuation:/\./}}}),e.languages.idr=e.languages.idris}e.exports=i,i.displayName="idris",i.aliases=["idr"]},892:e=>{"use strict";function t(e){e.languages.gcode={comment:/;.*|\B\(.*?\)\B/,string:{pattern:/"(?:""|[^"])*"/,greedy:!0},keyword:/\b[GM]\d+(?:\.\d+)?\b/,property:/\b[A-Z]/,checksum:{pattern:/(\*)\d+/,lookbehind:!0,alias:"number"},punctuation:/[:*]/}}e.exports=t,t.displayName="gcode",t.aliases=[]},905:e=>{"use strict";function t(e){e.languages.cypher={comment:/\/\/.*/,string:{pattern:/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/,greedy:!0},"class-name":{pattern:/(:\s*)(?:\w+|`(?:[^`\\\r\n])*`)(?=\s*[{):])/,lookbehind:!0,greedy:!0},relationship:{pattern:/(-\[\s*(?:\w+\s*|`(?:[^`\\\r\n])*`\s*)?:\s*|\|\s*:\s*)(?:\w+|`(?:[^`\\\r\n])*`)/,lookbehind:!0,greedy:!0,alias:"property"},identifier:{pattern:/`(?:[^`\\\r\n])*`/,greedy:!0},variable:/\$\w+/,keyword:/\b(?:ADD|ALL|AND|AS|ASC|ASCENDING|ASSERT|BY|CALL|CASE|COMMIT|CONSTRAINT|CONTAINS|CREATE|CSV|DELETE|DESC|DESCENDING|DETACH|DISTINCT|DO|DROP|ELSE|END|ENDS|EXISTS|FOR|FOREACH|IN|INDEX|IS|JOIN|KEY|LIMIT|LOAD|MANDATORY|MATCH|MERGE|NODE|NOT|OF|ON|OPTIONAL|OR|ORDER(?=\s+BY)|PERIODIC|REMOVE|REQUIRE|RETURN|SCALAR|SCAN|SET|SKIP|START|STARTS|THEN|UNION|UNIQUE|UNWIND|USING|WHEN|WHERE|WITH|XOR|YIELD)\b/i,function:/\b\w+\b(?=\s*\()/,boolean:/\b(?:false|null|true)\b/i,number:/\b(?:0x[\da-fA-F]+|\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)\b/,operator:/:|<--?|--?>?|<>|=~?|[<>]=?|[+*/%^|]|\.\.\.?/,punctuation:/[()[\]{},;.]/}}e.exports=t,t.displayName="cypher",t.aliases=[]},913:e=>{"use strict";function t(e){!function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(e)}e.exports=t,t.displayName="typescript",t.aliases=["ts"]},914:e=>{"use strict";function t(e){e.languages.ini={comment:{pattern:/(^[ \f\t\v]*)[#;][^\n\r]*/m,lookbehind:!0},section:{pattern:/(^[ \f\t\v]*)\[[^\n\r\]]*\]?/m,lookbehind:!0,inside:{"section-name":{pattern:/(^\[[ \f\t\v]*)[^ \f\t\v\]]+(?:[ \f\t\v]+[^ \f\t\v\]]+)*/,lookbehind:!0,alias:"selector"},punctuation:/\[|\]/}},key:{pattern:/(^[ \f\t\v]*)[^ \f\n\r\t\v=]+(?:[ \f\t\v]+[^ \f\n\r\t\v=]+)*(?=[ \f\t\v]*=)/m,lookbehind:!0,alias:"attr-name"},value:{pattern:/(=[ \f\t\v]*)[^ \f\n\r\t\v]+(?:[ \f\t\v]+[^ \f\n\r\t\v]+)*/,lookbehind:!0,alias:"attr-value",inside:{"inner-value":{pattern:/^("|').+(?=\1$)/,lookbehind:!0}}},punctuation:/=/}}e.exports=t,t.displayName="ini",t.aliases=[]},923:(e,t,n)=>{"use strict";var r=n(8692);e.exports=r,r.register(n(2884)),r.register(n(7797)),r.register(n(6995)),r.register(n(5916)),r.register(n(5369)),r.register(n(5083)),r.register(n(3659)),r.register(n(2858)),r.register(n(5926)),r.register(n(4595)),r.register(n(323)),r.register(n(310)),r.register(n(5996)),r.register(n(6285)),r.register(n(9253)),r.register(n(768)),r.register(n(5766)),r.register(n(6969)),r.register(n(3907)),r.register(n(4972)),r.register(n(3678)),r.register(n(5656)),r.register(n(712)),r.register(n(9738)),r.register(n(6652)),r.register(n(5095)),r.register(n(731)),r.register(n(1275)),r.register(n(7659)),r.register(n(7650)),r.register(n(7751)),r.register(n(2601)),r.register(n(5445)),r.register(n(7465)),r.register(n(8433)),r.register(n(3776)),r.register(n(3088)),r.register(n(512)),r.register(n(6804)),r.register(n(3251)),r.register(n(6391)),r.register(n(3029)),r.register(n(9752)),r.register(n(33)),r.register(n(1377)),r.register(n(94)),r.register(n(8241)),r.register(n(5781)),r.register(n(5470)),r.register(n(2819)),r.register(n(9048)),r.register(n(905)),r.register(n(8356)),r.register(n(6627)),r.register(n(1322)),r.register(n(5945)),r.register(n(5875)),r.register(n(153)),r.register(n(2277)),r.register(n(9065)),r.register(n(5770)),r.register(n(1739)),r.register(n(1337)),r.register(n(1421)),r.register(n(377)),r.register(n(2432)),r.register(n(8473)),r.register(n(2668)),r.register(n(5183)),r.register(n(4473)),r.register(n(4761)),r.register(n(8160)),r.register(n(7949)),r.register(n(4003)),r.register(n(3770)),r.register(n(9122)),r.register(n(7322)),r.register(n(4052)),r.register(n(9846)),r.register(n(4584)),r.register(n(892)),r.register(n(8738)),r.register(n(4319)),r.register(n(58)),r.register(n(4652)),r.register(n(4838)),r.register(n(7600)),r.register(n(9443)),r.register(n(6325)),r.register(n(4508)),r.register(n(7849)),r.register(n(8072)),r.register(n(740)),r.register(n(6954)),r.register(n(4336)),r.register(n(2038)),r.register(n(9387)),r.register(n(597)),r.register(n(5174)),r.register(n(6853)),r.register(n(5686)),r.register(n(8194)),r.register(n(7107)),r.register(n(5467)),r.register(n(1525)),r.register(n(889)),r.register(n(6096)),r.register(n(452)),r.register(n(9338)),r.register(n(914)),r.register(n(4278)),r.register(n(3210)),r.register(n(4498)),r.register(n(3298)),r.register(n(2573)),r.register(n(7231)),r.register(n(3191)),r.register(n(187)),r.register(n(4215)),r.register(n(2293)),r.register(n(7603)),r.register(n(6647)),r.register(n(8148)),r.register(n(5729)),r.register(n(5166)),r.register(n(1328)),r.register(n(9229)),r.register(n(2809)),r.register(n(6656)),r.register(n(7427)),r.register(n(335)),r.register(n(5308)),r.register(n(5912)),r.register(n(2620)),r.register(n(1558)),r.register(n(4547)),r.register(n(2905)),r.register(n(5706)),r.register(n(1402)),r.register(n(4099)),r.register(n(8175)),r.register(n(1718)),r.register(n(8306)),r.register(n(8038)),r.register(n(6485)),r.register(n(5878)),r.register(n(543)),r.register(n(5562)),r.register(n(7007)),r.register(n(1997)),r.register(n(6966)),r.register(n(3019)),r.register(n(23)),r.register(n(3910)),r.register(n(3763)),r.register(n(2964)),r.register(n(5002)),r.register(n(4791)),r.register(n(2763)),r.register(n(1117)),r.register(n(463)),r.register(n(1698)),r.register(n(6146)),r.register(n(2408)),r.register(n(1464)),r.register(n(971)),r.register(n(4713)),r.register(n(70)),r.register(n(5268)),r.register(n(4797)),r.register(n(9128)),r.register(n(1471)),r.register(n(4983)),r.register(n(745)),r.register(n(9058)),r.register(n(2289)),r.register(n(5970)),r.register(n(1092)),r.register(n(6227)),r.register(n(5578)),r.register(n(1496)),r.register(n(6956)),r.register(n(164)),r.register(n(6393)),r.register(n(1459)),r.register(n(7309)),r.register(n(8985)),r.register(n(8545)),r.register(n(3935)),r.register(n(4493)),r.register(n(3171)),r.register(n(6220)),r.register(n(1288)),r.register(n(4340)),r.register(n(5508)),r.register(n(4727)),r.register(n(5456)),r.register(n(4591)),r.register(n(5306)),r.register(n(4559)),r.register(n(2563)),r.register(n(7794)),r.register(n(2132)),r.register(n(8622)),r.register(n(3123)),r.register(n(6181)),r.register(n(4210)),r.register(n(9984)),r.register(n(3791)),r.register(n(2252)),r.register(n(6358)),r.register(n(618)),r.register(n(7680)),r.register(n(5477)),r.register(n(640)),r.register(n(6042)),r.register(n(7473)),r.register(n(4478)),r.register(n(5147)),r.register(n(6580)),r.register(n(7993)),r.register(n(5670)),r.register(n(1972)),r.register(n(6923)),r.register(n(7656)),r.register(n(7881)),r.register(n(267)),r.register(n(61)),r.register(n(9530)),r.register(n(5880)),r.register(n(1269)),r.register(n(5394)),r.register(n(56)),r.register(n(9459)),r.register(n(7459)),r.register(n(5229)),r.register(n(6402)),r.register(n(4867)),r.register(n(4689)),r.register(n(7639)),r.register(n(8297)),r.register(n(6770)),r.register(n(1359)),r.register(n(9683)),r.register(n(1570)),r.register(n(4696)),r.register(n(3571)),r.register(n(913)),r.register(n(6499)),r.register(n(358)),r.register(n(5776)),r.register(n(1242)),r.register(n(2286)),r.register(n(7872)),r.register(n(8004)),r.register(n(497)),r.register(n(3802)),r.register(n(604)),r.register(n(4624)),r.register(n(7545)),r.register(n(1283)),r.register(n(2810)),r.register(n(744)),r.register(n(1126)),r.register(n(8400)),r.register(n(9144)),r.register(n(4485)),r.register(n(4686)),r.register(n(60)),r.register(n(394)),r.register(n(2837)),r.register(n(2831)),r.register(n(5542))},934:(e,t,n)=>{const r=n(3103),i=n(5987);function a(e){let t=r(e),n=Math.pow(2,e);return`\n\n/**\n * Our implementation of QuadTree is non-recursive to avoid GC hit\n * This data structure represent stack of elements\n * which we are trying to insert into quad tree.\n */\nfunction InsertStack () {\n this.stack = [];\n this.popIdx = 0;\n}\n\nInsertStack.prototype = {\n isEmpty: function() {\n return this.popIdx === 0;\n },\n push: function (node, body) {\n var item = this.stack[this.popIdx];\n if (!item) {\n // we are trying to avoid memory pressure: create new element\n // only when absolutely necessary\n this.stack[this.popIdx] = new InsertStackElement(node, body);\n } else {\n item.node = node;\n item.body = body;\n }\n ++this.popIdx;\n },\n pop: function () {\n if (this.popIdx > 0) {\n return this.stack[--this.popIdx];\n }\n },\n reset: function () {\n this.popIdx = 0;\n }\n};\n\nfunction InsertStackElement(node, body) {\n this.node = node; // QuadTree node\n this.body = body; // physical body which needs to be inserted to node\n}\n\n${l(e)}\n${o(e)}\n${c(e)}\n${s(e)}\n\nfunction createQuadTree(options, random) {\n options = options || {};\n options.gravity = typeof options.gravity === 'number' ? options.gravity : -1;\n options.theta = typeof options.theta === 'number' ? options.theta : 0.8;\n\n var gravity = options.gravity;\n var updateQueue = [];\n var insertStack = new InsertStack();\n var theta = options.theta;\n\n var nodesCache = [];\n var currentInCache = 0;\n var root = newNode();\n\n return {\n insertBodies: insertBodies,\n\n /**\n * Gets root node if it is present\n */\n getRoot: function() {\n return root;\n },\n\n updateBodyForce: update,\n\n options: function(newOptions) {\n if (newOptions) {\n if (typeof newOptions.gravity === 'number') {\n gravity = newOptions.gravity;\n }\n if (typeof newOptions.theta === 'number') {\n theta = newOptions.theta;\n }\n\n return this;\n }\n\n return {\n gravity: gravity,\n theta: theta\n };\n }\n };\n\n function newNode() {\n // To avoid pressure on GC we reuse nodes.\n var node = nodesCache[currentInCache];\n if (node) {\n${function(){let e=[];for(let t=0;t {var}max) {var}max = pos.{var};",{indent:6})}\n }\n\n // Makes the bounds square.\n var maxSideLength = -Infinity;\n ${t("if ({var}max - {var}min > maxSideLength) maxSideLength = {var}max - {var}min ;",{indent:4})}\n\n currentInCache = 0;\n root = newNode();\n ${t("root.min_{var} = {var}min;",{indent:4})}\n ${t("root.max_{var} = {var}min + maxSideLength;",{indent:4})}\n\n i = bodies.length - 1;\n if (i >= 0) {\n root.body = bodies[i];\n }\n while (i--) {\n insert(bodies[i], root);\n }\n }\n\n function insert(newBody) {\n insertStack.reset();\n insertStack.push(root, newBody);\n\n while (!insertStack.isEmpty()) {\n var stackItem = insertStack.pop();\n var node = stackItem.node;\n var body = stackItem.body;\n\n if (!node.body) {\n // This is internal node. Update the total mass of the node and center-of-mass.\n ${t("var {var} = body.pos.{var};",{indent:8})}\n node.mass += body.mass;\n ${t("node.mass_{var} += body.mass * {var};",{indent:8})}\n\n // Recursively insert the body in the appropriate quadrant.\n // But first find the appropriate quadrant.\n var quadIdx = 0; // Assume we are in the 0's quad.\n ${t("var min_{var} = node.min_{var};",{indent:8})}\n ${t("var max_{var} = (min_{var} + node.max_{var}) / 2;",{indent:8})}\n\n${function(){let t=[],n=Array(9).join(" ");for(let r=0;r max_${i(r)}) {`),t.push(n+` quadIdx = quadIdx + ${Math.pow(2,r)};`),t.push(n+` min_${i(r)} = max_${i(r)};`),t.push(n+` max_${i(r)} = node.max_${i(r)};`),t.push(n+"}");return t.join("\n")}()}\n\n var child = getChild(node, quadIdx);\n\n if (!child) {\n // The node is internal but this quadrant is not taken. Add\n // subnode to it.\n child = newNode();\n ${t("child.min_{var} = min_{var};",{indent:10})}\n ${t("child.max_{var} = max_{var};",{indent:10})}\n child.body = body;\n\n setChild(node, quadIdx, child);\n } else {\n // continue searching in this quadrant.\n insertStack.push(child, body);\n }\n } else {\n // We are trying to add to the leaf node.\n // We have to convert current leaf into internal node\n // and continue adding two nodes.\n var oldBody = node.body;\n node.body = null; // internal nodes do not cary bodies\n\n if (isSamePosition(oldBody.pos, body.pos)) {\n // Prevent infinite subdivision by bumping one node\n // anywhere in this quadrant\n var retriesCount = 3;\n do {\n var offset = random.nextDouble();\n ${t("var d{var} = (node.max_{var} - node.min_{var}) * offset;",{indent:12})}\n\n ${t("oldBody.pos.{var} = node.min_{var} + d{var};",{indent:12})}\n retriesCount -= 1;\n // Make sure we don't bump it out of the box. If we do, next iteration should fix it\n } while (retriesCount > 0 && isSamePosition(oldBody.pos, body.pos));\n\n if (retriesCount === 0 && isSamePosition(oldBody.pos, body.pos)) {\n // This is very bad, we ran out of precision.\n // if we do not return from the method we'll get into\n // infinite loop here. So we sacrifice correctness of layout, and keep the app running\n // Next layout iteration should get larger bounding box in the first step and fix this\n return;\n }\n }\n // Next iteration should subdivide node further.\n insertStack.push(node, oldBody);\n insertStack.push(node, body);\n }\n }\n }\n}\nreturn createQuadTree;\n\n`}function o(e){let t=r(e);return`\n function isSamePosition(point1, point2) {\n ${t("var d{var} = Math.abs(point1.{var} - point2.{var});",{indent:2})}\n \n return ${t("d{var} < 1e-8",{join:" && "})};\n } \n`}function s(e){var t=Math.pow(2,e);return`\nfunction setChild(node, idx, child) {\n ${function(){let e=[];for(let n=0;n 0) {\n return this.stack[--this.popIdx];\n }\n },\n reset: function () {\n this.popIdx = 0;\n }\n};\n\nfunction InsertStackElement(node, body) {\n this.node = node; // QuadTree node\n this.body = body; // physical body which needs to be inserted to node\n}\n"}e.exports=function(e){let t=a(e);return new Function(t)()},e.exports.generateQuadTreeFunctionBody=a,e.exports.getInsertStackCode=u,e.exports.getQuadNodeCode=l,e.exports.isSamePosition=o,e.exports.getChildBodyCode=c,e.exports.setChildBodyCode=s},971:e=>{"use strict";function t(e){e.languages.nix={comment:{pattern:/\/\*[\s\S]*?\*\/|#.*/,greedy:!0},string:{pattern:/"(?:[^"\\]|\\[\s\S])*"|''(?:(?!'')[\s\S]|''(?:'|\\|\$\{))*''/,greedy:!0,inside:{interpolation:{pattern:/(^|(?:^|(?!'').)[^\\])\$\{(?:[^{}]|\{[^}]*\})*\}/,lookbehind:!0,inside:null}}},url:[/\b(?:[a-z]{3,7}:\/\/)[\w\-+%~\/.:#=?&]+/,{pattern:/([^\/])(?:[\w\-+%~.:#=?&]*(?!\/\/)[\w\-+%~\/.:#=?&])?(?!\/\/)\/[\w\-+%~\/.:#=?&]*/,lookbehind:!0}],antiquotation:{pattern:/\$(?=\{)/,alias:"important"},number:/\b\d+\b/,keyword:/\b(?:assert|builtins|else|if|in|inherit|let|null|or|then|with)\b/,function:/\b(?:abort|add|all|any|attrNames|attrValues|baseNameOf|compareVersions|concatLists|currentSystem|deepSeq|derivation|dirOf|div|elem(?:At)?|fetch(?:Tarball|url)|filter(?:Source)?|fromJSON|genList|getAttr|getEnv|hasAttr|hashString|head|import|intersectAttrs|is(?:Attrs|Bool|Function|Int|List|Null|String)|length|lessThan|listToAttrs|map|mul|parseDrvName|pathExists|read(?:Dir|File)|removeAttrs|replaceStrings|seq|sort|stringLength|sub(?:string)?|tail|throw|to(?:File|JSON|Path|String|XML)|trace|typeOf)\b|\bfoldl'\B/,boolean:/\b(?:false|true)\b/,operator:/[=!<>]=?|\+\+?|\|\||&&|\/\/|->?|[?@]/,punctuation:/[{}()[\].,:;]/},e.languages.nix.string.inside.interpolation.inside=e.languages.nix}e.exports=t,t.displayName="nix",t.aliases=[]},993:(e,t,n)=>{"use strict";var r=n(6326),i=n(334),a=n(9828);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n