diff --git a/.gitattributes b/.gitattributes
deleted file mode 100644
index a6344aac8c09253b3b630fb776ae94478aa0275b..0000000000000000000000000000000000000000
--- a/.gitattributes
+++ /dev/null
@@ -1,35 +0,0 @@
-*.7z filter=lfs diff=lfs merge=lfs -text
-*.arrow filter=lfs diff=lfs merge=lfs -text
-*.bin filter=lfs diff=lfs merge=lfs -text
-*.bz2 filter=lfs diff=lfs merge=lfs -text
-*.ckpt filter=lfs diff=lfs merge=lfs -text
-*.ftz filter=lfs diff=lfs merge=lfs -text
-*.gz filter=lfs diff=lfs merge=lfs -text
-*.h5 filter=lfs diff=lfs merge=lfs -text
-*.joblib filter=lfs diff=lfs merge=lfs -text
-*.lfs.* filter=lfs diff=lfs merge=lfs -text
-*.mlmodel filter=lfs diff=lfs merge=lfs -text
-*.model filter=lfs diff=lfs merge=lfs -text
-*.msgpack filter=lfs diff=lfs merge=lfs -text
-*.npy filter=lfs diff=lfs merge=lfs -text
-*.npz filter=lfs diff=lfs merge=lfs -text
-*.onnx filter=lfs diff=lfs merge=lfs -text
-*.ot filter=lfs diff=lfs merge=lfs -text
-*.parquet filter=lfs diff=lfs merge=lfs -text
-*.pb filter=lfs diff=lfs merge=lfs -text
-*.pickle filter=lfs diff=lfs merge=lfs -text
-*.pkl filter=lfs diff=lfs merge=lfs -text
-*.pt filter=lfs diff=lfs merge=lfs -text
-*.pth filter=lfs diff=lfs merge=lfs -text
-*.rar filter=lfs diff=lfs merge=lfs -text
-*.safetensors filter=lfs diff=lfs merge=lfs -text
-saved_model/**/* filter=lfs diff=lfs merge=lfs -text
-*.tar.* filter=lfs diff=lfs merge=lfs -text
-*.tar filter=lfs diff=lfs merge=lfs -text
-*.tflite filter=lfs diff=lfs merge=lfs -text
-*.tgz filter=lfs diff=lfs merge=lfs -text
-*.wasm filter=lfs diff=lfs merge=lfs -text
-*.xz filter=lfs diff=lfs merge=lfs -text
-*.zip filter=lfs diff=lfs merge=lfs -text
-*.zst filter=lfs diff=lfs merge=lfs -text
-*tfevents* filter=lfs diff=lfs merge=lfs -text
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000000000000000000000000000000000000..6769e21d99a63338394e47bc4c7d0aba1e88d5a5
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,160 @@
+# Byte-compiled / optimized / DLL files
+__pycache__/
+*.py[cod]
+*$py.class
+
+# C extensions
+*.so
+
+# Distribution / packaging
+.Python
+build/
+develop-eggs/
+dist/
+downloads/
+eggs/
+.eggs/
+lib/
+lib64/
+parts/
+sdist/
+var/
+wheels/
+share/python-wheels/
+*.egg-info/
+.installed.cfg
+*.egg
+MANIFEST
+
+# PyInstaller
+# Usually these files are written by a python script from a template
+# before PyInstaller builds the exe, so as to inject date/other infos into it.
+*.manifest
+*.spec
+
+# Installer logs
+pip-log.txt
+pip-delete-this-directory.txt
+
+# Unit test / coverage reports
+htmlcov/
+.tox/
+.nox/
+.coverage
+.coverage.*
+.cache
+nosetests.xml
+coverage.xml
+*.cover
+*.py,cover
+.hypothesis/
+.pytest_cache/
+cover/
+
+# Translations
+*.mo
+*.pot
+
+# Django stuff:
+*.log
+local_settings.py
+db.sqlite3
+db.sqlite3-journal
+
+# Flask stuff:
+instance/
+.webassets-cache
+
+# Scrapy stuff:
+.scrapy
+
+# Sphinx documentation
+docs/_build/
+
+# PyBuilder
+.pybuilder/
+target/
+
+# Jupyter Notebook
+.ipynb_checkpoints
+
+# IPython
+profile_default/
+ipython_config.py
+
+# pyenv
+# For a library or package, you might want to ignore these files since the code is
+# intended to run in multiple environments; otherwise, check them in:
+# .python-version
+
+# pipenv
+# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
+# However, in case of collaboration, if having platform-specific dependencies or dependencies
+# having no cross-platform support, pipenv may install dependencies that don't work, or not
+# install all needed dependencies.
+#Pipfile.lock
+
+# poetry
+# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
+# This is especially recommended for binary packages to ensure reproducibility, and is more
+# commonly ignored for libraries.
+# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
+#poetry.lock
+
+# pdm
+# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
+#pdm.lock
+# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
+# in version control.
+# https://pdm.fming.dev/#use-with-ide
+.pdm.toml
+
+# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
+__pypackages__/
+
+# Celery stuff
+celerybeat-schedule
+celerybeat.pid
+
+# SageMath parsed files
+*.sage.py
+
+# Environments
+.env
+.venv
+env/
+venv/
+ENV/
+env.bak/
+venv.bak/
+
+# Spyder project settings
+.spyderproject
+.spyproject
+
+# Rope project settings
+.ropeproject
+
+# mkdocs documentation
+/site
+
+# mypy
+.mypy_cache/
+.dmypy.json
+dmypy.json
+
+# Pyre type checker
+.pyre/
+
+# pytype static type analyzer
+.pytype/
+
+# Cython debug symbols
+cython_debug/
+
+# PyCharm
+# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
+# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
+# and can be added to the global gitignore or merged into this file. For a more nuclear
+# option (not recommended) you can uncomment the following to ignore the entire idea folder.
+#.idea/
\ No newline at end of file
diff --git a/app.py b/app.py
new file mode 100644
index 0000000000000000000000000000000000000000..1c14d3c377c4e593d40658bca7d13a1bce4b36f6
--- /dev/null
+++ b/app.py
@@ -0,0 +1,462 @@
+import streamlit as st
+from chat_client import chat
+import time
+import pandas as pd
+import os
+from dotenv import load_dotenv
+from search_client import SearchClient
+import math
+import numpy as np
+from sentence_transformers import CrossEncoder
+
+load_dotenv()
+
+
+GOOGLE_SEARCH_ENGINE_ID = os.getenv("GOOGLE_SEARCH_ENGINE_ID")
+GOOGLE_SEARCH_API_KEY = os.getenv("GOOGLE_SEARCH_API_KEY")
+BING_SEARCH_API_KEY = os.getenv("BING_SEARCH_API_KEY")
+COST_PER_1000_TOKENS_INR = 0.139
+CHAT_BOTS = {
+ "Mixtral 8x7B v0.1": "mistralai/Mixtral-8x7B-Instruct-v0.1",
+ "Mistral 7B v0.1": "mistralai/Mistral-7B-Instruct-v0.1",
+}
+
+INITIAL_PROMPT_ENGINEERING = {
+ "SYSTEM_INSTRUCTION": """ You are a knowledgeable author on medical conditions, with a deep expertise in Huntington's disease.
+ You provide extensive, clear information on complex medical topics, treatments, new research and developments.
+ You avoid giving personal medical advice or diagnoses but offers general advice and underscores the importance of consulting healthcare professionals.
+ Your goal is to inform, engage and enlighten users that enquire about Huntington's disease, offering factual data and real-life perspectives with anempathetic tone.
+ You use every search available including web search together with articles and information from
+ * Journal of Huntington's disease,
+ * Movement Disorders,
+ * Neurology,
+ * Journal of Neurology,
+ * Neurosurgery & Psychiatry,
+ * HDBuzz,
+ * PubMed,
+ * Huntington's disease Society of America (HDSA),
+ * Huntington Study Group (HSG),
+ * Nature Reviews Neurology
+ * ScienceDirect
+
+ The information you provide should be understandable to laypersons, well-organized, and include credible sources, citations, and an empathetic tone.
+ It should educate on the scientific aspects and personal challenges of living with Huntington's Disease.""",
+ "SYSTEM_RESPONSE": """Hello! I'm an assistant trained to provide detailed and accurate information on medical conditions, including Huntington's Disease.
+ I'm here to help answer your questions and provide resources to help you better understand this disease and its impact on individuals and their families.
+ If you have any questions about HD or related topics, feel free to ask!""",
+ "PRE_CONTEXT": """NOW YOU ARE SEARCHING THE WEB, AND HERE ARE THE CHUNKS RETRIEVED FROM THE WEB.""",
+ "POST_CONTEXT": """ """, # EMPTY
+ "PRE_PROMPT": """NOW ACCORDING TO THE CONTEXT RETRIEVED FROM THE GENERATE THE CONTENT FOR THE FOLLOWING SUBJECT""",
+ "POST_PROMPT": """
+ Do not repeat yourself
+ """,
+}
+
+googleSearchClient = SearchClient(
+ "google", api_key=GOOGLE_SEARCH_API_KEY, engine_id=GOOGLE_SEARCH_ENGINE_ID
+)
+bingSearchClient = SearchClient("bing", api_key=BING_SEARCH_API_KEY, engine_id=None)
+
+st.set_page_config(
+ page_title="Mixtral Playground",
+ page_icon="📚",
+)
+
+reranker = CrossEncoder("cross-encoder/ms-marco-MiniLM-L-6-v2")
+
+
+def rerank(query, top_k, search_results):
+ chunks = []
+ for result in search_results:
+ text = result["text"]
+ # Chunk the text into segments of 512 words each
+ words = text.split()
+ chunk_size = 512
+ num_chunks = math.ceil(len(words) / chunk_size)
+ for i in range(num_chunks):
+ start = i * chunk_size
+ end = (i + 1) * chunk_size
+ chunk = " ".join(words[start:end])
+ chunks.append((result["link"], chunk))
+
+ # Create sentence combinations with the query
+ sentence_combinations = [[query, chunk[1]] for chunk in chunks]
+
+ # Compute similarity scores for these combinations
+ similarity_scores = reranker.predict(sentence_combinations)
+
+ # Sort scores in decreasing order
+ sim_scores_argsort = reversed(np.argsort(similarity_scores))
+
+ # Rearrange search_results based on the reranked scores
+ reranked_results = []
+ for idx in sim_scores_argsort:
+ link = chunks[idx][0]
+ for result in search_results:
+ if result["link"] == link:
+ reranked_results.append(result)
+ break
+
+ return reranked_results[:top_k]
+
+
+def gen_augmented_prompt_via_websearch(
+ prompt,
+ vendor,
+ n_crawl,
+ top_k,
+ pre_context,
+ post_context,
+ pre_prompt="",
+ post_prompt="",
+ pass_prev=False,
+):
+ """returns a prompt with the context of the query and the top k web search results.
+
+ Args:
+ query (_type_): _description_
+ top_k (_type_): _description_
+ preprompt (str, optional): _description_. Defaults to "".
+ postprompt (str, optional): _description_. Defaults to "".
+ """
+ search_results = []
+ if vendor == "Google":
+ search_results = googleSearchClient.search(prompt, n_crawl)
+ elif vendor == "Bing":
+ search_results = bingSearchClient.search(prompt, n_crawl)
+
+ reranked_results = rerank(prompt, top_k, search_results)
+
+ links = []
+ context = ""
+ for res in reranked_results:
+ context += res["text"] + "\n\n"
+ link = res["link"]
+ links.append(link)
+
+ print(reranked_results)
+
+ prev_input = st.session_state.history[-1][1] if pass_prev else ""
+
+ generated_prompt = f"""
+ {pre_context}
+
+ {context}
+
+ {post_context}
+
+ {pre_prompt}
+
+ {prompt} \n\n
+
+ {post_prompt}
+
+ {prev_input}
+ """
+ return generated_prompt, links
+
+
+def init_state():
+ if "messages" not in st.session_state:
+ st.session_state.messages = []
+
+ if "tokens_used" not in st.session_state:
+ st.session_state.tokens_used = 0
+
+ if "tps" not in st.session_state:
+ st.session_state.tps = 0
+
+ if "temp" not in st.session_state:
+ st.session_state.temp = 0.8
+
+ if "history" not in st.session_state:
+ st.session_state.history = [
+ [
+ INITIAL_PROMPT_ENGINEERING["SYSTEM_INSTRUCTION"],
+ INITIAL_PROMPT_ENGINEERING["SYSTEM_RESPONSE"],
+ ]
+ ]
+
+ if "n_crawl" not in st.session_state:
+ st.session_state.n_crawl = 5
+
+ if "repetion_penalty" not in st.session_state:
+ st.session_state.repetion_penalty = 1
+
+ if "rag_enabled" not in st.session_state:
+ st.session_state.rag_enabled = True
+
+ if "chat_bot" not in st.session_state:
+ st.session_state.chat_bot = "Mixtral 8x7B v0.1"
+
+ if "search_vendor" not in st.session_state:
+ st.session_state.search_vendor = "Bing"
+
+ if "system_instruction" not in st.session_state:
+ st.session_state.system_instruction = INITIAL_PROMPT_ENGINEERING[
+ "SYSTEM_INSTRUCTION"
+ ]
+
+ if "system_response" not in st.session_state:
+ st.session_state.system_instruction = INITIAL_PROMPT_ENGINEERING[
+ "SYSTEM_RESPONSE"
+ ]
+
+ if "pre_context" not in st.session_state:
+ st.session_state.pre_context = INITIAL_PROMPT_ENGINEERING["PRE_CONTEXT"]
+
+ if "post_context" not in st.session_state:
+ st.session_state.post_context = INITIAL_PROMPT_ENGINEERING["POST_CONTEXT"]
+
+ if "pre_prompt" not in st.session_state:
+ st.session_state.pre_prompt = INITIAL_PROMPT_ENGINEERING["PRE_PROMPT"]
+
+ if "post_prompt" not in st.session_state:
+ st.session_state.post_prompt = INITIAL_PROMPT_ENGINEERING["POST_PROMPT"]
+
+ if "pass_prev" not in st.session_state:
+ st.session_state.pass_prev = False
+
+
+def sidebar():
+ def retrieval_settings():
+ st.markdown("# Web Retrieval")
+ st.session_state.rag_enabled = st.toggle("Activate Web Retrieval", value=True)
+ st.session_state.search_vendor = st.radio(
+ "Select Search Vendor",
+ ["Bing", "Google"],
+ disabled=not st.session_state.rag_enabled,
+ )
+ st.session_state.n_crawl = st.slider(
+ label="Links to Crawl",
+ key=1,
+ min_value=1,
+ max_value=10,
+ value=4,
+ disabled=not st.session_state.rag_enabled,
+ )
+ st.session_state.top_k = st.slider(
+ label="Rerank Factor",
+ key=2,
+ min_value=1,
+ max_value=20,
+ value=4,
+ disabled=not st.session_state.rag_enabled,
+ )
+
+ st.markdown("---")
+
+ def model_analytics():
+ st.markdown("# Model Analytics")
+
+ st.write("Total tokens used :", st.session_state["tokens_used"])
+ st.write("Speed :", st.session_state["tps"], " tokens/sec")
+ st.write(
+ "Total cost incurred :",
+ round(COST_PER_1000_TOKENS_INR * st.session_state["tokens_used"] / 1000, 3),
+ "INR",
+ )
+
+ st.markdown("---")
+
+ def model_settings():
+ st.markdown("# Model Settings")
+
+ st.session_state.chat_bot = st.sidebar.radio(
+ "Select one:", [key for key, _ in CHAT_BOTS.items()]
+ )
+ st.session_state.temp = st.slider(
+ label="Temperature", min_value=0.0, max_value=1.0, step=0.1, value=0.9
+ )
+
+ st.session_state.max_tokens = st.slider(
+ label="New tokens to generate",
+ min_value=64,
+ max_value=2048,
+ step=32,
+ value=512,
+ )
+
+ st.session_state.repetion_penalty = st.slider(
+ label="Repetion Penalty", min_value=0.0, max_value=1.0, step=0.1, value=1.0
+ )
+
+ with st.sidebar:
+ retrieval_settings()
+ model_analytics()
+ model_settings()
+
+ st.markdown(
+ """
+ > **Created by [Pragnesh Barik](https://barik.super.site) 🔗**
+ """
+ )
+
+
+def prompt_engineering_dashboard():
+ def engineer_prompt():
+ st.session_state.history[0] = [
+ st.session_state.system_instruction,
+ st.session_state.system_response,
+ ]
+
+ with st.expander("Prompt Engineering Dashboard"):
+ st.info(
+ "**The input to the model follows this below template**",
+ )
+ st.code(
+ """
+ [SYSTEM INSTRUCTION]
+ [SYSTEM RESPONSE]
+
+ [... LIST OF PREV INPUTS]
+
+ [PRE CONTEXT]
+ [CONTEXT RETRIEVED FROM THE WEB]
+ [POST CONTEXT]
+
+ [PRE PROMPT]
+ [PROMPT]
+ [POST PROMPT]
+ [PREV GENERATED INPUT] # Only if Pass previous prompt set True
+
+ """
+ )
+ st.session_state.system_instruction = st.text_area(
+ label="SYSTEM INSTRUCTION",
+ value=INITIAL_PROMPT_ENGINEERING["SYSTEM_INSTRUCTION"],
+ )
+ st.session_state.system_response = st.text_area(
+ "SYSTEM RESPONSE", value=INITIAL_PROMPT_ENGINEERING["SYSTEM_RESPONSE"]
+ )
+ col1, col2 = st.columns(2)
+ with col1:
+ st.text_input(
+ "PRE CONTEXT",
+ value=INITIAL_PROMPT_ENGINEERING["PRE_CONTEXT"],
+ disabled=not st.session_state.rag_enabled,
+ )
+ st.text_input("PRE PROMPT", value=INITIAL_PROMPT_ENGINEERING["PRE_PROMPT"])
+ st.button("Engineer Prompts", on_click=engineer_prompt)
+
+ with col2:
+ st.text_input(
+ "POST CONTEXT",
+ value=INITIAL_PROMPT_ENGINEERING["POST_CONTEXT"],
+ disabled=not st.session_state.rag_enabled,
+ )
+ st.text_input(
+ "POST PROMPT", value=INITIAL_PROMPT_ENGINEERING["POST_PROMPT"]
+ )
+ pass_prev = st.toggle("Pass previous prompt")
+
+
+def header():
+ st.write("# Mixtral Playground")
+ data = {
+ "Attribute": ["LLM", "Text Vectorizer", "Vector Database", "CPU", "System RAM"],
+ "Information": [
+ "Mixtral-8x7B-Instruct-v0.1",
+ "all-distilroberta-v1",
+ "Hosted Pinecone",
+ "2 vCPU",
+ "16 GB",
+ ],
+ }
+ df = pd.DataFrame(data)
+ st.table(df)
+ prompt_engineering_dashboard()
+
+
+def chat_box():
+ for message in st.session_state.messages:
+ with st.chat_message(message["role"]):
+ st.markdown(message["content"])
+
+
+def generate_chat_stream(prompt):
+ links = []
+ if st.session_state.rag_enabled:
+ with st.spinner("Fetching relevent documents from Web...."):
+ prompt, links = gen_augmented_prompt_via_websearch(
+ prompt=prompt,
+ pre_context=st.session_state.pre_context,
+ post_context=st.session_state.post_context,
+ pre_prompt=st.session_state.pre_prompt,
+ post_prompt=st.session_state.post_prompt,
+ vendor=st.session_state.search_vendor,
+ top_k=st.session_state.top_k,
+ n_crawl=st.session_state.n_crawl,
+ )
+
+ with st.spinner("Generating response..."):
+ chat_stream = chat(
+ prompt,
+ st.session_state.history,
+ chat_client=CHAT_BOTS[st.session_state.chat_bot],
+ temperature=st.session_state.temp,
+ max_new_tokens=st.session_state.max_tokens,
+ )
+
+ return chat_stream, links
+
+
+def stream_handler(chat_stream, placeholder):
+ start_time = time.time()
+ full_response = ""
+
+ for chunk in chat_stream:
+ if chunk.token["text"] != "":
+ full_response += chunk.token["text"]
+ placeholder.markdown(full_response + "▌")
+ placeholder.markdown(full_response)
+
+ end_time = time.time()
+ elapsed_time = end_time - start_time
+ total_tokens_processed = len(full_response.split())
+ tokens_per_second = total_tokens_processed // elapsed_time
+ len_response = (len(prompt.split()) + len(full_response.split())) * 1.25
+ col1, col2, col3 = st.columns(3)
+
+ with col1:
+ st.write(f"**{tokens_per_second} tokens/second**")
+
+ with col2:
+ st.write(f"**{int(len_response)} tokens generated**")
+
+ with col3:
+ st.write(
+ f"**₹ {round(len_response * COST_PER_1000_TOKENS_INR / 1000, 5)} cost incurred**"
+ )
+
+ st.session_state["tps"] = tokens_per_second
+ st.session_state["tokens_used"] = len_response + st.session_state["tokens_used"]
+
+ return full_response
+
+
+def show_source(links):
+ with st.expander("Show source"):
+ for i, link in enumerate(links):
+ st.info(f"{link}")
+
+
+init_state()
+sidebar()
+header()
+chat_box()
+
+if prompt := st.chat_input("Generate Ebook"):
+ st.chat_message("user").markdown(prompt)
+ st.session_state.messages.append({"role": "user", "content": prompt})
+
+ chat_stream, links = generate_chat_stream(prompt)
+
+ with st.chat_message("assistant"):
+ placeholder = st.empty()
+ full_response = stream_handler(chat_stream, placeholder)
+ if st.session_state.rag_enabled:
+ show_source(links)
+
+ st.session_state.history.append([prompt, full_response])
+ st.session_state.messages.append({"role": "assistant", "content": full_response})
diff --git a/chat_client.py b/chat_client.py
new file mode 100644
index 0000000000000000000000000000000000000000..a10b6c7c2ddf62fe81c88e447526d75c67143b9f
--- /dev/null
+++ b/chat_client.py
@@ -0,0 +1,50 @@
+from huggingface_hub import InferenceClient
+import os
+from dotenv import load_dotenv
+load_dotenv()
+
+API_TOKEN = os.getenv('HF_TOKEN')
+
+
+def format_prompt(message, history):
+ prompt = ""
+ for user_prompt, bot_response in history:
+ prompt += f"[INST] {user_prompt} [/INST]"
+ prompt += f" {bot_response} "
+ prompt += f"[INST] {message} [/INST]"
+ return prompt
+
+def chat(
+ prompt, history, chat_client = "mistralai/Mistral-7B-Instruct-v0.1",temperature=0.9, max_new_tokens=256, top_p=0.95, repetition_penalty=1.0,
+):
+ client = InferenceClient(
+ chat_client,
+ token=API_TOKEN
+ )
+ temperature = float(temperature)
+ if temperature < 1e-2:
+ temperature = 1e-2
+ top_p = float(top_p)
+
+ generate_kwargs = dict(
+ temperature=temperature,
+ max_new_tokens=max_new_tokens,
+ top_p=top_p,
+ repetition_penalty=repetition_penalty,
+ do_sample=True,
+ seed=42,
+ )
+
+ formatted_prompt = format_prompt(prompt, history)
+
+ stream = client.text_generation(formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=False)
+ output = ""
+
+ # for response in stream:
+ # # print(response)
+ # output += response.token["text"]
+ # yield output
+ # return output
+
+
+ return stream
diff --git a/rag/Scripts/Activate.ps1 b/rag/Scripts/Activate.ps1
new file mode 100644
index 0000000000000000000000000000000000000000..baca251f561d5587ddbbb4ecba1277c5cf9689cc
--- /dev/null
+++ b/rag/Scripts/Activate.ps1
@@ -0,0 +1,399 @@
+<#
+.Synopsis
+Activate a Python virtual environment for the current PowerShell session.
+
+.Description
+Pushes the python executable for a virtual environment to the front of the
+$Env:PATH environment variable and sets the prompt to signify that you are
+in a Python virtual environment. Makes use of the command line switches as
+well as the `pyvenv.cfg` file values present in the virtual environment.
+
+.Parameter VenvDir
+Path to the directory that contains the virtual environment to activate. The
+default value for this is the parent of the directory that the Activate.ps1
+script is located within.
+
+.Parameter Prompt
+The prompt prefix to display when this virtual environment is activated. By
+default, this prompt is the name of the virtual environment folder (VenvDir)
+surrounded by parentheses and followed by a single space (ie. '(.venv) ').
+
+.Example
+Activate.ps1
+Activates the Python virtual environment that contains the Activate.ps1 script.
+
+.Example
+Activate.ps1 -Verbose
+Activates the Python virtual environment that contains the Activate.ps1 script,
+and shows extra information about the activation as it executes.
+
+.Example
+Activate.ps1 -VenvDir C:\Users\MyUser\Common\.venv
+Activates the Python virtual environment located in the specified location.
+
+.Example
+Activate.ps1 -Prompt "MyPython"
+Activates the Python virtual environment that contains the Activate.ps1 script,
+and prefixes the current prompt with the specified string (surrounded in
+parentheses) while the virtual environment is active.
+
+.Notes
+On Windows, it may be required to enable this Activate.ps1 script by setting the
+execution policy for the user. You can do this by issuing the following PowerShell
+command:
+
+PS C:\> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
+
+For more information on Execution Policies:
+https://go.microsoft.com/fwlink/?LinkID=135170
+
+#>
+Param(
+ [Parameter(Mandatory = $false)]
+ [String]
+ $VenvDir,
+ [Parameter(Mandatory = $false)]
+ [String]
+ $Prompt
+)
+
+<# Function declarations --------------------------------------------------- #>
+
+<#
+.Synopsis
+Remove all shell session elements added by the Activate script, including the
+addition of the virtual environment's Python executable from the beginning of
+the PATH variable.
+
+.Parameter NonDestructive
+If present, do not remove this function from the global namespace for the
+session.
+
+#>
+function global:deactivate ([switch]$NonDestructive) {
+ # Revert to original values
+
+ # The prior prompt:
+ if (Test-Path -Path Function:_OLD_VIRTUAL_PROMPT) {
+ Copy-Item -Path Function:_OLD_VIRTUAL_PROMPT -Destination Function:prompt
+ Remove-Item -Path Function:_OLD_VIRTUAL_PROMPT
+ }
+
+ # The prior PYTHONHOME:
+ if (Test-Path -Path Env:_OLD_VIRTUAL_PYTHONHOME) {
+ Copy-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME -Destination Env:PYTHONHOME
+ Remove-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME
+ }
+
+ # The prior PATH:
+ if (Test-Path -Path Env:_OLD_VIRTUAL_PATH) {
+ Copy-Item -Path Env:_OLD_VIRTUAL_PATH -Destination Env:PATH
+ Remove-Item -Path Env:_OLD_VIRTUAL_PATH
+ }
+
+ # Just remove the VIRTUAL_ENV altogether:
+ if (Test-Path -Path Env:VIRTUAL_ENV) {
+ Remove-Item -Path env:VIRTUAL_ENV
+ }
+
+ # Just remove the _PYTHON_VENV_PROMPT_PREFIX altogether:
+ if (Get-Variable -Name "_PYTHON_VENV_PROMPT_PREFIX" -ErrorAction SilentlyContinue) {
+ Remove-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Scope Global -Force
+ }
+
+ # Leave deactivate function in the global namespace if requested:
+ if (-not $NonDestructive) {
+ Remove-Item -Path function:deactivate
+ }
+}
+
+<#
+.Description
+Get-PyVenvConfig parses the values from the pyvenv.cfg file located in the
+given folder, and returns them in a map.
+
+For each line in the pyvenv.cfg file, if that line can be parsed into exactly
+two strings separated by `=` (with any amount of whitespace surrounding the =)
+then it is considered a `key = value` line. The left hand string is the key,
+the right hand is the value.
+
+If the value starts with a `'` or a `"` then the first and last character is
+stripped from the value before being captured.
+
+.Parameter ConfigDir
+Path to the directory that contains the `pyvenv.cfg` file.
+#>
+function Get-PyVenvConfig(
+ [String]
+ $ConfigDir
+) {
+ Write-Verbose "Given ConfigDir=$ConfigDir, obtain values in pyvenv.cfg"
+
+ # Ensure the file exists, and issue a warning if it doesn't (but still allow the function to continue).
+ $pyvenvConfigPath = Join-Path -Resolve -Path $ConfigDir -ChildPath 'pyvenv.cfg' -ErrorAction Continue
+
+ # An empty map will be returned if no config file is found.
+ $pyvenvConfig = @{ }
+
+ if ($pyvenvConfigPath) {
+
+ Write-Verbose "File exists, parse `key = value` lines"
+ $pyvenvConfigContent = Get-Content -Path $pyvenvConfigPath
+
+ $pyvenvConfigContent | ForEach-Object {
+ $keyval = $PSItem -split "\s*=\s*", 2
+ if ($keyval[0] -and $keyval[1]) {
+ $val = $keyval[1]
+
+ # Remove extraneous quotations around a string value.
+ if ("'""".Contains($val.Substring(0, 1))) {
+ $val = $val.Substring(1, $val.Length - 2)
+ }
+
+ $pyvenvConfig[$keyval[0]] = $val
+ Write-Verbose "Adding Key: '$($keyval[0])'='$val'"
+ }
+ }
+ }
+ return $pyvenvConfig
+}
+
+
+<# Begin Activate script --------------------------------------------------- #>
+
+# Determine the containing directory of this script
+$VenvExecPath = Split-Path -Parent $MyInvocation.MyCommand.Definition
+$VenvExecDir = Get-Item -Path $VenvExecPath
+
+Write-Verbose "Activation script is located in path: '$VenvExecPath'"
+Write-Verbose "VenvExecDir Fullname: '$($VenvExecDir.FullName)"
+Write-Verbose "VenvExecDir Name: '$($VenvExecDir.Name)"
+
+# Set values required in priority: CmdLine, ConfigFile, Default
+# First, get the location of the virtual environment, it might not be
+# VenvExecDir if specified on the command line.
+if ($VenvDir) {
+ Write-Verbose "VenvDir given as parameter, using '$VenvDir' to determine values"
+}
+else {
+ Write-Verbose "VenvDir not given as a parameter, using parent directory name as VenvDir."
+ $VenvDir = $VenvExecDir.Parent.FullName.TrimEnd("\\/")
+ Write-Verbose "VenvDir=$VenvDir"
+}
+
+# Next, read the `pyvenv.cfg` file to determine any required value such
+# as `prompt`.
+$pyvenvCfg = Get-PyVenvConfig -ConfigDir $VenvDir
+
+# Next, set the prompt from the command line, or the config file, or
+# just use the name of the virtual environment folder.
+if ($Prompt) {
+ Write-Verbose "Prompt specified as argument, using '$Prompt'"
+}
+else {
+ Write-Verbose "Prompt not specified as argument to script, checking pyvenv.cfg value"
+ if ($pyvenvCfg -and $pyvenvCfg['prompt']) {
+ Write-Verbose " Setting based on value in pyvenv.cfg='$($pyvenvCfg['prompt'])'"
+ $Prompt = $pyvenvCfg['prompt'];
+ }
+ else {
+ Write-Verbose " Setting prompt based on parent's directory's name. (Is the directory name passed to venv module when creating the virtual environment)"
+ Write-Verbose " Got leaf-name of $VenvDir='$(Split-Path -Path $venvDir -Leaf)'"
+ $Prompt = Split-Path -Path $venvDir -Leaf
+ }
+}
+
+Write-Verbose "Prompt = '$Prompt'"
+Write-Verbose "VenvDir='$VenvDir'"
+
+# Deactivate any currently active virtual environment, but leave the
+# deactivate function in place.
+deactivate -nondestructive
+
+# Now set the environment variable VIRTUAL_ENV, used by many tools to determine
+# that there is an activated venv.
+$env:VIRTUAL_ENV = $VenvDir
+
+if (-not $Env:VIRTUAL_ENV_DISABLE_PROMPT) {
+
+ Write-Verbose "Setting prompt to '$Prompt'"
+
+ # Set the prompt to include the env name
+ # Make sure _OLD_VIRTUAL_PROMPT is global
+ function global:_OLD_VIRTUAL_PROMPT { "" }
+ Copy-Item -Path function:prompt -Destination function:_OLD_VIRTUAL_PROMPT
+ New-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Description "Python virtual environment prompt prefix" -Scope Global -Option ReadOnly -Visibility Public -Value $Prompt
+
+ function global:prompt {
+ Write-Host -NoNewline -ForegroundColor Green "($_PYTHON_VENV_PROMPT_PREFIX) "
+ _OLD_VIRTUAL_PROMPT
+ }
+}
+
+# Clear PYTHONHOME
+if (Test-Path -Path Env:PYTHONHOME) {
+ Copy-Item -Path Env:PYTHONHOME -Destination Env:_OLD_VIRTUAL_PYTHONHOME
+ Remove-Item -Path Env:PYTHONHOME
+}
+
+# Add the venv to the PATH
+Copy-Item -Path Env:PATH -Destination Env:_OLD_VIRTUAL_PATH
+$Env:PATH = "$VenvExecDir$([System.IO.Path]::PathSeparator)$Env:PATH"
+
+# SIG # Begin signature block
+# MIIc9wYJKoZIhvcNAQcCoIIc6DCCHOQCAQExDzANBglghkgBZQMEAgEFADB5Bgor
+# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
+# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCD50itNqbOCCDp6
+# 9ZnhKce5X7vV6KL67iKMbGTUZ4nf36CCC38wggUwMIIEGKADAgECAhAECRgbX9W7
+# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
+# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
+# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
+# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
+# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
+# ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
+# DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l
+# qJ3bMtdx6nadBS63j/qSQ8Cl+YnUNxnXtqrwnIal2CWsDnkoOn7p0WfTxvspJ8fT
+# eyOU5JEjlpB3gvmhhCNmElQzUHSxKCa7JGnCwlLyFGeKiUXULaGj6YgsIJWuHEqH
+# CN8M9eJNYBi+qsSyrnAxZjNxPqxwoqvOf+l8y5Kh5TsxHM/q8grkV7tKtel05iv+
+# bMt+dDk2DZDv5LVOpKnqagqrhPOsZ061xPeM0SAlI+sIZD5SlsHyDxL0xY4PwaLo
+# LFH3c7y9hbFig3NBggfkOItqcyDQD2RzPJ6fpjOp/RnfJZPRAgMBAAGjggHNMIIB
+# yTASBgNVHRMBAf8ECDAGAQH/AgEAMA4GA1UdDwEB/wQEAwIBhjATBgNVHSUEDDAK
+# BggrBgEFBQcDAzB5BggrBgEFBQcBAQRtMGswJAYIKwYBBQUHMAGGGGh0dHA6Ly9v
+# Y3NwLmRpZ2ljZXJ0LmNvbTBDBggrBgEFBQcwAoY3aHR0cDovL2NhY2VydHMuZGln
+# aWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJlZElEUm9vdENBLmNydDCBgQYDVR0fBHow
+# eDA6oDigNoY0aHR0cDovL2NybDQuZGlnaWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJl
+# ZElEUm9vdENBLmNybDA6oDigNoY0aHR0cDovL2NybDMuZGlnaWNlcnQuY29tL0Rp
+# Z2lDZXJ0QXNzdXJlZElEUm9vdENBLmNybDBPBgNVHSAESDBGMDgGCmCGSAGG/WwA
+# AgQwKjAoBggrBgEFBQcCARYcaHR0cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzAK
+# BghghkgBhv1sAzAdBgNVHQ4EFgQUWsS5eyoKo6XqcQPAYPkt9mV1DlgwHwYDVR0j
+# BBgwFoAUReuir/SSy4IxLVGLp6chnfNtyA8wDQYJKoZIhvcNAQELBQADggEBAD7s
+# DVoks/Mi0RXILHwlKXaoHV0cLToaxO8wYdd+C2D9wz0PxK+L/e8q3yBVN7Dh9tGS
+# dQ9RtG6ljlriXiSBThCk7j9xjmMOE0ut119EefM2FAaK95xGTlz/kLEbBw6RFfu6
+# r7VRwo0kriTGxycqoSkoGjpxKAI8LpGjwCUR4pwUR6F6aGivm6dcIFzZcbEMj7uo
+# +MUSaJ/PQMtARKUT8OZkDCUIQjKyNookAv4vcn4c10lFluhZHen6dGRrsutmQ9qz
+# sIzV6Q3d9gEgzpkxYz0IGhizgZtPxpMQBvwHgfqL2vmCSfdibqFT+hKUGIUukpHq
+# aGxEMrJmoecYpJpkUe8wggZHMIIFL6ADAgECAhADPtXtoGXRuMkd/PkqbJvYMA0G
+# CSqGSIb3DQEBCwUAMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJ
+# bmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lDZXJ0
+# IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwHhcNMTgxMjE4MDAwMDAw
+# WhcNMjExMjIyMTIwMDAwWjCBgzELMAkGA1UEBhMCVVMxFjAUBgNVBAgTDU5ldyBI
+# YW1wc2hpcmUxEjAQBgNVBAcTCVdvbGZlYm9ybzEjMCEGA1UEChMaUHl0aG9uIFNv
+# ZnR3YXJlIEZvdW5kYXRpb24xIzAhBgNVBAMTGlB5dGhvbiBTb2Z0d2FyZSBGb3Vu
+# ZGF0aW9uMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAqr2kS7J1uW7o
+# JRxlsdrETAjKarfoH5TI8PWST6Yb2xPooP7vHT4iaVXyL5Lze1f53Jw67Sp+u524
+# fJXf30qHViEWxumy2RWG0nciU2d+mMqzjlaAWSZNF0u4RcvyDJokEV0RUOqI5CG5
+# zPI3W9uQ6LiUk3HCYW6kpH177A5T3pw/Po8O8KErJGn1anaqtIICq99ySxrMad/2
+# hPMBRf6Ndah7f7HPn1gkSSTAoejyuqF5h+B0qI4+JK5+VLvz659VTbAWJsYakkxZ
+# xVWYpFv4KeQSSwoo0DzMvmERsTzNvVBMWhu9OriJNg+QfFmf96zVTu93cZ+r7xMp
+# bXyfIOGKhHMaRuZ8ihuWIx3gI9WHDFX6fBKR8+HlhdkaiBEWIsXRoy+EQUyK7zUs
+# +FqOo2sRYttbs8MTF9YDKFZwyPjn9Wn+gLGd5NUEVyNvD9QVGBEtN7vx87bduJUB
+# 8F4DylEsMtZTfjw/au6AmOnmneK5UcqSJuwRyZaGNk7y3qj06utx+HTTqHgi975U
+# pxfyrwAqkovoZEWBVSpvku8PVhkBXcLmNe6MEHlFiaMoiADAeKmX5RFRkN+VrmYG
+# Tg4zajxfdHeIY8TvLf48tTfmnQJd98geJQv/01NUy/FxuwqAuTkaez5Nl1LxP0Cp
+# THhghzO4FRD4itT2wqTh4jpojw9QZnsCAwEAAaOCAcUwggHBMB8GA1UdIwQYMBaA
+# FFrEuXsqCqOl6nEDwGD5LfZldQ5YMB0GA1UdDgQWBBT8Kr9+1L6s84KcpM97IgE7
+# uI8H8jAOBgNVHQ8BAf8EBAMCB4AwEwYDVR0lBAwwCgYIKwYBBQUHAwMwdwYDVR0f
+# BHAwbjA1oDOgMYYvaHR0cDovL2NybDMuZGlnaWNlcnQuY29tL3NoYTItYXNzdXJl
+# ZC1jcy1nMS5jcmwwNaAzoDGGL2h0dHA6Ly9jcmw0LmRpZ2ljZXJ0LmNvbS9zaGEy
+# LWFzc3VyZWQtY3MtZzEuY3JsMEwGA1UdIARFMEMwNwYJYIZIAYb9bAMBMCowKAYI
+# KwYBBQUHAgEWHGh0dHBzOi8vd3d3LmRpZ2ljZXJ0LmNvbS9DUFMwCAYGZ4EMAQQB
+# MIGEBggrBgEFBQcBAQR4MHYwJAYIKwYBBQUHMAGGGGh0dHA6Ly9vY3NwLmRpZ2lj
+# ZXJ0LmNvbTBOBggrBgEFBQcwAoZCaHR0cDovL2NhY2VydHMuZGlnaWNlcnQuY29t
+# L0RpZ2lDZXJ0U0hBMkFzc3VyZWRJRENvZGVTaWduaW5nQ0EuY3J0MAwGA1UdEwEB
+# /wQCMAAwDQYJKoZIhvcNAQELBQADggEBAEt1oS21X0axiafPjyY+vlYqjWKuUu/Y
+# FuYWIEq6iRRaFabNDhj9RBFQF/aJiE5msrQEOfAD6/6gVSH91lZWBqg6NEeG9T9S
+# XbiAPvJ9CEWFsdkXUrjbWhvCnuZ7kqUuU5BAumI1QRbpYgZL3UA+iZXkmjbGh1ln
+# 8rUhWIxbBYL4Sg2nqpB44p7CUFYkPj/MbwU2gvBV2pXjj5WaskoZtsACMv5g42BN
+# oVLoRAi+ev6s07POt+JtHRIm87lTyuc8wh0swTPUwksKbLU1Zdj9CpqtzXnuVE0w
+# 50exJvRSK3Vt4g+0vigpI3qPmDdpkf9+4Mvy0XMNcqrthw20R+PkIlMxghDOMIIQ
+# ygIBATCBhjByMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkw
+# FwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMTEwLwYDVQQDEyhEaWdpQ2VydCBTSEEy
+# IEFzc3VyZWQgSUQgQ29kZSBTaWduaW5nIENBAhADPtXtoGXRuMkd/PkqbJvYMA0G
+# CWCGSAFlAwQCAQUAoIGYMBkGCSqGSIb3DQEJAzEMBgorBgEEAYI3AgEEMBwGCisG
+# AQQBgjcCAQsxDjAMBgorBgEEAYI3AgEVMCwGCisGAQQBgjcCAQwxHjAcoBqAGABQ
+# AHkAdABoAG8AbgAgADMALgA5AC4AODAvBgkqhkiG9w0BCQQxIgQgVkkzBKWOaE6h
+# LZ4RPK1x031KWOzGTBHw2wSm0tSdHC0wDQYJKoZIhvcNAQEBBQAEggIAhvnfzv5s
+# LAI424IYB5BiplTY8igc/dXW0L9VargC6yOC4Pyzyz7MNX0iaLUfv0y3nD25u9MG
+# dGPeOmTfSYnPeu9H/ovvhSwj6LjV9DX1TgsfDPfQ3zs3ak51UkJGgRFj2FKbWnHc
+# 8zuXT7C7M9v4XrjWArswdP/+8SvOymWjYHRFM6rwcet5px6n+bYFU1dUwFV2hNFQ
+# 23wDFhTSATWyPGfn81q73EWrBe3cRpWgS7mfmlSt6sCHxVo5xQX2jjlYA1ttL8tu
+# rBZ+socFWyn82fg0nXDg/5lSapUPKSSaGu6vm8lIlpB4Z449brshSTZ2H4W+LrXu
+# ZSR02O/Yd+i/r+KxedyBipw35YAOGedq6ODfis/ixCMqAyo7xjX/Z+rIWHm7Yf0n
+# FQyya8qwjAkrx6pF1NNisXNk/Ue1Fg8d5/o0a2b2u2T6+A+/cBBqnHXqfExlPoqM
+# 0uIEgWJP9wKAYBbjwdC2lTFbxjnTs2iyv+99BQzU9ecWy+Tzu/woJmiQoSjzdWGc
+# I9mzlyqGEvQB6/Udy+K43Ykgr3noQX6SYH6Yfp0acdwitigbnosfykrkmkfdROeK
+# a6/+RMQqOz4KM5h277Qabadqu9yNPv6hk73pn62QpPaRGn+SRIl7ppTjRz1yOU8f
+# 9Y5obr2wfgVizaUnHquRKeuYbWC+mq/65xahgg19MIINeQYKKwYBBAGCNwMDATGC
+# DWkwgg1lBgkqhkiG9w0BBwKggg1WMIINUgIBAzEPMA0GCWCGSAFlAwQCAQUAMHcG
+# CyqGSIb3DQEJEAEEoGgEZjBkAgEBBglghkgBhv1sBwEwMTANBglghkgBZQMEAgEF
+# AAQgsX+p1he5Y83BxbjDF3wcPgaRPcA/hdudlnmnIp4fj8cCECGQNygHZHlOLsxq
+# r1Ok1q0YDzIwMjExMTA1MjA1NjE0WqCCCjcwggT+MIID5qADAgECAhANQkrgvjqI
+# /2BAIc4UAPDdMA0GCSqGSIb3DQEBCwUAMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
+# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNV
+# BAMTKERpZ2lDZXJ0IFNIQTIgQXNzdXJlZCBJRCBUaW1lc3RhbXBpbmcgQ0EwHhcN
+# MjEwMTAxMDAwMDAwWhcNMzEwMTA2MDAwMDAwWjBIMQswCQYDVQQGEwJVUzEXMBUG
+# A1UEChMORGlnaUNlcnQsIEluYy4xIDAeBgNVBAMTF0RpZ2lDZXJ0IFRpbWVzdGFt
+# cCAyMDIxMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwuZhhGfFivUN
+# CKRFymNrUdc6EUK9CnV1TZS0DFC1JhD+HchvkWsMlucaXEjvROW/m2HNFZFiWrj/
+# ZwucY/02aoH6KfjdK3CF3gIY83htvH35x20JPb5qdofpir34hF0edsnkxnZ2OlPR
+# 0dNaNo/Go+EvGzq3YdZz7E5tM4p8XUUtS7FQ5kE6N1aG3JMjjfdQJehk5t3Tjy9X
+# tYcg6w6OLNUj2vRNeEbjA4MxKUpcDDGKSoyIxfcwWvkUrxVfbENJCf0mI1P2jWPo
+# GqtbsR0wwptpgrTb/FZUvB+hh6u+elsKIC9LCcmVp42y+tZji06lchzun3oBc/gZ
+# 1v4NSYS9AQIDAQABo4IBuDCCAbQwDgYDVR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQC
+# MAAwFgYDVR0lAQH/BAwwCgYIKwYBBQUHAwgwQQYDVR0gBDowODA2BglghkgBhv1s
+# BwEwKTAnBggrBgEFBQcCARYbaHR0cDovL3d3dy5kaWdpY2VydC5jb20vQ1BTMB8G
+# A1UdIwQYMBaAFPS24SAd/imu0uRhpbKiJbLIFzVuMB0GA1UdDgQWBBQ2RIaOpLqw
+# Zr68KC0dRDbd42p6vDBxBgNVHR8EajBoMDKgMKAuhixodHRwOi8vY3JsMy5kaWdp
+# Y2VydC5jb20vc2hhMi1hc3N1cmVkLXRzLmNybDAyoDCgLoYsaHR0cDovL2NybDQu
+# ZGlnaWNlcnQuY29tL3NoYTItYXNzdXJlZC10cy5jcmwwgYUGCCsGAQUFBwEBBHkw
+# dzAkBggrBgEFBQcwAYYYaHR0cDovL29jc3AuZGlnaWNlcnQuY29tME8GCCsGAQUF
+# BzAChkNodHRwOi8vY2FjZXJ0cy5kaWdpY2VydC5jb20vRGlnaUNlcnRTSEEyQXNz
+# dXJlZElEVGltZXN0YW1waW5nQ0EuY3J0MA0GCSqGSIb3DQEBCwUAA4IBAQBIHNy1
+# 6ZojvOca5yAOjmdG/UJyUXQKI0ejq5LSJcRwWb4UoOUngaVNFBUZB3nw0QTDhtk7
+# vf5EAmZN7WmkD/a4cM9i6PVRSnh5Nnont/PnUp+Tp+1DnnvntN1BIon7h6JGA078
+# 9P63ZHdjXyNSaYOC+hpT7ZDMjaEXcw3082U5cEvznNZ6e9oMvD0y0BvL9WH8dQgA
+# dryBDvjA4VzPxBFy5xtkSdgimnUVQvUtMjiB2vRgorq0Uvtc4GEkJU+y38kpqHND
+# Udq9Y9YfW5v3LhtPEx33Sg1xfpe39D+E68Hjo0mh+s6nv1bPull2YYlffqe0jmd4
+# +TaY4cso2luHpoovMIIFMTCCBBmgAwIBAgIQCqEl1tYyG35B5AXaNpfCFTANBgkq
+# hkiG9w0BAQsFADBlMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5j
+# MRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBB
+# c3N1cmVkIElEIFJvb3QgQ0EwHhcNMTYwMTA3MTIwMDAwWhcNMzEwMTA3MTIwMDAw
+# WjByMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQL
+# ExB3d3cuZGlnaWNlcnQuY29tMTEwLwYDVQQDEyhEaWdpQ2VydCBTSEEyIEFzc3Vy
+# ZWQgSUQgVGltZXN0YW1waW5nIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
+# CgKCAQEAvdAy7kvNj3/dqbqCmcU5VChXtiNKxA4HRTNREH3Q+X1NaH7ntqD0jbOI
+# 5Je/YyGQmL8TvFfTw+F+CNZqFAA49y4eO+7MpvYyWf5fZT/gm+vjRkcGGlV+Cyd+
+# wKL1oODeIj8O/36V+/OjuiI+GKwR5PCZA207hXwJ0+5dyJoLVOOoCXFr4M8iEA91
+# z3FyTgqt30A6XLdR4aF5FMZNJCMwXbzsPGBqrC8HzP3w6kfZiFBe/WZuVmEnKYmE
+# UeaC50ZQ/ZQqLKfkdT66mA+Ef58xFNat1fJky3seBdCEGXIX8RcG7z3N1k3vBkL9
+# olMqT4UdxB08r8/arBD13ays6Vb/kwIDAQABo4IBzjCCAcowHQYDVR0OBBYEFPS2
+# 4SAd/imu0uRhpbKiJbLIFzVuMB8GA1UdIwQYMBaAFEXroq/0ksuCMS1Ri6enIZ3z
+# bcgPMBIGA1UdEwEB/wQIMAYBAf8CAQAwDgYDVR0PAQH/BAQDAgGGMBMGA1UdJQQM
+# MAoGCCsGAQUFBwMIMHkGCCsGAQUFBwEBBG0wazAkBggrBgEFBQcwAYYYaHR0cDov
+# L29jc3AuZGlnaWNlcnQuY29tMEMGCCsGAQUFBzAChjdodHRwOi8vY2FjZXJ0cy5k
+# aWdpY2VydC5jb20vRGlnaUNlcnRBc3N1cmVkSURSb290Q0EuY3J0MIGBBgNVHR8E
+# ejB4MDqgOKA2hjRodHRwOi8vY3JsNC5kaWdpY2VydC5jb20vRGlnaUNlcnRBc3N1
+# cmVkSURSb290Q0EuY3JsMDqgOKA2hjRodHRwOi8vY3JsMy5kaWdpY2VydC5jb20v
+# RGlnaUNlcnRBc3N1cmVkSURSb290Q0EuY3JsMFAGA1UdIARJMEcwOAYKYIZIAYb9
+# bAACBDAqMCgGCCsGAQUFBwIBFhxodHRwczovL3d3dy5kaWdpY2VydC5jb20vQ1BT
+# MAsGCWCGSAGG/WwHATANBgkqhkiG9w0BAQsFAAOCAQEAcZUS6VGHVmnN793afKpj
+# erN4zwY3QITvS4S/ys8DAv3Fp8MOIEIsr3fzKx8MIVoqtwU0HWqumfgnoma/Capg
+# 33akOpMP+LLR2HwZYuhegiUexLoceywh4tZbLBQ1QwRostt1AuByx5jWPGTlH0gQ
+# GF+JOGFNYkYkh2OMkVIsrymJ5Xgf1gsUpYDXEkdws3XVk4WTfraSZ/tTYYmo9WuW
+# wPRYaQ18yAGxuSh1t5ljhSKMYcp5lH5Z/IwP42+1ASa2bKXuh1Eh5Fhgm7oMLStt
+# osR+u8QlK0cCCHxJrhO24XxCQijGGFbPQTS2Zl22dHv1VjMiLyI2skuiSpXY9aaO
+# UjGCAoYwggKCAgEBMIGGMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
+# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
+# ZXJ0IFNIQTIgQXNzdXJlZCBJRCBUaW1lc3RhbXBpbmcgQ0ECEA1CSuC+Ooj/YEAh
+# zhQA8N0wDQYJYIZIAWUDBAIBBQCggdEwGgYJKoZIhvcNAQkDMQ0GCyqGSIb3DQEJ
+# EAEEMBwGCSqGSIb3DQEJBTEPFw0yMTExMDUyMDU2MTRaMCsGCyqGSIb3DQEJEAIM
+# MRwwGjAYMBYEFOHXgqjhkb7va8oWkbWqtJSmJJvzMC8GCSqGSIb3DQEJBDEiBCAu
+# 6d27aot4QF9oB1Fuus/15RcSvYtxIrhRP5CibpngLTA3BgsqhkiG9w0BCRACLzEo
+# MCYwJDAiBCCzEJAGvArZgweRVyngRANBXIPjKSthTyaWTI01cez1qTANBgkqhkiG
+# 9w0BAQEFAASCAQBEh1HtS0zGaZu71b+EG3d1DpAcoZu4CId3yMekv4ozrPE2qb5P
+# Okr27XOG32KmZBvFxlo6j5lQUZON7IPoKywYw5iXtnG3TbJ6YB7lCjRsHEX0o644
+# QlmuuI4xS3D03PPC+/QgdN2s1KJpkmlJA6mj06KTgXNSSFJUneqEzwkmm5dQxGJ+
+# tfvqo6VKunhceh9guIQJxWqId3tvy4WzSisxSTvT8SyGWeIPfl9aQp+zu0PjAo1H
+# juSRLYoeqK3HsbI8mcpW1/RzkeGoIUy5XyTn4wRLZp1jhiybkWpq/RFKJxuuhb+y
+# 1cwg8ahAw9gcx5ckatOrCn0Iv/zEoNq8wppx
+# SIG # End signature block
diff --git a/rag/Scripts/activate b/rag/Scripts/activate
new file mode 100644
index 0000000000000000000000000000000000000000..cee40d4b2ae0c65245b36648c82305e1fca52883
--- /dev/null
+++ b/rag/Scripts/activate
@@ -0,0 +1,66 @@
+# This file must be used with "source bin/activate" *from bash*
+# you cannot run it directly
+
+deactivate () {
+ # reset old environment variables
+ if [ -n "${_OLD_VIRTUAL_PATH:-}" ] ; then
+ PATH="${_OLD_VIRTUAL_PATH:-}"
+ export PATH
+ unset _OLD_VIRTUAL_PATH
+ fi
+ if [ -n "${_OLD_VIRTUAL_PYTHONHOME:-}" ] ; then
+ PYTHONHOME="${_OLD_VIRTUAL_PYTHONHOME:-}"
+ export PYTHONHOME
+ unset _OLD_VIRTUAL_PYTHONHOME
+ fi
+
+ # This should detect bash and zsh, which have a hash command that must
+ # be called to get it to forget past commands. Without forgetting
+ # past commands the $PATH changes we made may not be respected
+ if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then
+ hash -r 2> /dev/null
+ fi
+
+ if [ -n "${_OLD_VIRTUAL_PS1:-}" ] ; then
+ PS1="${_OLD_VIRTUAL_PS1:-}"
+ export PS1
+ unset _OLD_VIRTUAL_PS1
+ fi
+
+ unset VIRTUAL_ENV
+ if [ ! "${1:-}" = "nondestructive" ] ; then
+ # Self destruct!
+ unset -f deactivate
+ fi
+}
+
+# unset irrelevant variables
+deactivate nondestructive
+
+VIRTUAL_ENV="E:\Projects\ebook-gen\ebook-gen\rag"
+export VIRTUAL_ENV
+
+_OLD_VIRTUAL_PATH="$PATH"
+PATH="$VIRTUAL_ENV/Scripts:$PATH"
+export PATH
+
+# unset PYTHONHOME if set
+# this will fail if PYTHONHOME is set to the empty string (which is bad anyway)
+# could use `if (set -u; : $PYTHONHOME) ;` in bash
+if [ -n "${PYTHONHOME:-}" ] ; then
+ _OLD_VIRTUAL_PYTHONHOME="${PYTHONHOME:-}"
+ unset PYTHONHOME
+fi
+
+if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT:-}" ] ; then
+ _OLD_VIRTUAL_PS1="${PS1:-}"
+ PS1="(rag) ${PS1:-}"
+ export PS1
+fi
+
+# This should detect bash and zsh, which have a hash command that must
+# be called to get it to forget past commands. Without forgetting
+# past commands the $PATH changes we made may not be respected
+if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then
+ hash -r 2> /dev/null
+fi
diff --git a/rag/Scripts/activate.bat b/rag/Scripts/activate.bat
new file mode 100644
index 0000000000000000000000000000000000000000..7a14a13dcab0fdb43879d64e4601bb9ae86b67ef
--- /dev/null
+++ b/rag/Scripts/activate.bat
@@ -0,0 +1,33 @@
+@echo off
+
+rem This file is UTF-8 encoded, so we need to update the current code page while executing it
+for /f "tokens=2 delims=:." %%a in ('"%SystemRoot%\System32\chcp.com"') do (
+ set _OLD_CODEPAGE=%%a
+)
+if defined _OLD_CODEPAGE (
+ "%SystemRoot%\System32\chcp.com" 65001 > nul
+)
+
+set VIRTUAL_ENV=E:\Projects\ebook-gen\ebook-gen\rag
+
+if not defined PROMPT set PROMPT=$P$G
+
+if defined _OLD_VIRTUAL_PROMPT set PROMPT=%_OLD_VIRTUAL_PROMPT%
+if defined _OLD_VIRTUAL_PYTHONHOME set PYTHONHOME=%_OLD_VIRTUAL_PYTHONHOME%
+
+set _OLD_VIRTUAL_PROMPT=%PROMPT%
+set PROMPT=(rag) %PROMPT%
+
+if defined PYTHONHOME set _OLD_VIRTUAL_PYTHONHOME=%PYTHONHOME%
+set PYTHONHOME=
+
+if defined _OLD_VIRTUAL_PATH set PATH=%_OLD_VIRTUAL_PATH%
+if not defined _OLD_VIRTUAL_PATH set _OLD_VIRTUAL_PATH=%PATH%
+
+set PATH=%VIRTUAL_ENV%\Scripts;%PATH%
+
+:END
+if defined _OLD_CODEPAGE (
+ "%SystemRoot%\System32\chcp.com" %_OLD_CODEPAGE% > nul
+ set _OLD_CODEPAGE=
+)
diff --git a/rag/Scripts/convert-caffe2-to-onnx.exe b/rag/Scripts/convert-caffe2-to-onnx.exe
new file mode 100644
index 0000000000000000000000000000000000000000..34f550d4b2baf1adf2fa8f28881674ebcce9d86a
Binary files /dev/null and b/rag/Scripts/convert-caffe2-to-onnx.exe differ
diff --git a/rag/Scripts/convert-onnx-to-caffe2.exe b/rag/Scripts/convert-onnx-to-caffe2.exe
new file mode 100644
index 0000000000000000000000000000000000000000..c683789f9da02c35aa0adb6180cfa45b00a7bd14
Binary files /dev/null and b/rag/Scripts/convert-onnx-to-caffe2.exe differ
diff --git a/rag/Scripts/deactivate.bat b/rag/Scripts/deactivate.bat
new file mode 100644
index 0000000000000000000000000000000000000000..1205c618686fbb0e28bb9f61a782d7be790d1163
--- /dev/null
+++ b/rag/Scripts/deactivate.bat
@@ -0,0 +1,21 @@
+@echo off
+
+if defined _OLD_VIRTUAL_PROMPT (
+ set "PROMPT=%_OLD_VIRTUAL_PROMPT%"
+)
+set _OLD_VIRTUAL_PROMPT=
+
+if defined _OLD_VIRTUAL_PYTHONHOME (
+ set "PYTHONHOME=%_OLD_VIRTUAL_PYTHONHOME%"
+ set _OLD_VIRTUAL_PYTHONHOME=
+)
+
+if defined _OLD_VIRTUAL_PATH (
+ set "PATH=%_OLD_VIRTUAL_PATH%"
+)
+
+set _OLD_VIRTUAL_PATH=
+
+set VIRTUAL_ENV=
+
+:END
diff --git a/rag/Scripts/dotenv.exe b/rag/Scripts/dotenv.exe
new file mode 100644
index 0000000000000000000000000000000000000000..21297b22e2dd63e55eaa811b09b2c600afdd2d37
Binary files /dev/null and b/rag/Scripts/dotenv.exe differ
diff --git a/rag/Scripts/f2py.exe b/rag/Scripts/f2py.exe
new file mode 100644
index 0000000000000000000000000000000000000000..b45eaf1f59102a10f901007d2fcbcf38fb1c8d2a
Binary files /dev/null and b/rag/Scripts/f2py.exe differ
diff --git a/rag/Scripts/huggingface-cli.exe b/rag/Scripts/huggingface-cli.exe
new file mode 100644
index 0000000000000000000000000000000000000000..746dbaf86ca75939ff968a3defbc9c21794b98e1
Binary files /dev/null and b/rag/Scripts/huggingface-cli.exe differ
diff --git a/rag/Scripts/ipython.exe b/rag/Scripts/ipython.exe
new file mode 100644
index 0000000000000000000000000000000000000000..8762a22fe4edf10e52a6dcf3d69aa8d77baba189
Binary files /dev/null and b/rag/Scripts/ipython.exe differ
diff --git a/rag/Scripts/ipython3.exe b/rag/Scripts/ipython3.exe
new file mode 100644
index 0000000000000000000000000000000000000000..8762a22fe4edf10e52a6dcf3d69aa8d77baba189
Binary files /dev/null and b/rag/Scripts/ipython3.exe differ
diff --git a/rag/Scripts/isympy.exe b/rag/Scripts/isympy.exe
new file mode 100644
index 0000000000000000000000000000000000000000..ac2351cacf8d219ea661937b2cbb30b351361f2c
Binary files /dev/null and b/rag/Scripts/isympy.exe differ
diff --git a/rag/Scripts/jsonschema.exe b/rag/Scripts/jsonschema.exe
new file mode 100644
index 0000000000000000000000000000000000000000..419b854b84acb0be2864b41d2cd19a635868fc69
Binary files /dev/null and b/rag/Scripts/jsonschema.exe differ
diff --git a/rag/Scripts/jupyter-kernel.exe b/rag/Scripts/jupyter-kernel.exe
new file mode 100644
index 0000000000000000000000000000000000000000..bf8598fede7dcfeda67d2deacf70cb448c97c56d
Binary files /dev/null and b/rag/Scripts/jupyter-kernel.exe differ
diff --git a/rag/Scripts/jupyter-kernelspec.exe b/rag/Scripts/jupyter-kernelspec.exe
new file mode 100644
index 0000000000000000000000000000000000000000..9818c2186b0fc869c983c49871f7da7a98f1b065
Binary files /dev/null and b/rag/Scripts/jupyter-kernelspec.exe differ
diff --git a/rag/Scripts/jupyter-migrate.exe b/rag/Scripts/jupyter-migrate.exe
new file mode 100644
index 0000000000000000000000000000000000000000..de021f1c80b0a2c544ad6190c55ef52a11cc49e6
Binary files /dev/null and b/rag/Scripts/jupyter-migrate.exe differ
diff --git a/rag/Scripts/jupyter-run.exe b/rag/Scripts/jupyter-run.exe
new file mode 100644
index 0000000000000000000000000000000000000000..62f32f14163e6774eba9d5033d3c66ace3bb5bde
Binary files /dev/null and b/rag/Scripts/jupyter-run.exe differ
diff --git a/rag/Scripts/jupyter-troubleshoot.exe b/rag/Scripts/jupyter-troubleshoot.exe
new file mode 100644
index 0000000000000000000000000000000000000000..e60ca96dbb455d971ea641cb065803f6a115dc15
Binary files /dev/null and b/rag/Scripts/jupyter-troubleshoot.exe differ
diff --git a/rag/Scripts/jupyter.exe b/rag/Scripts/jupyter.exe
new file mode 100644
index 0000000000000000000000000000000000000000..3602cab6fc0a08f9e4d60e00f32a9a266f2b8fe5
Binary files /dev/null and b/rag/Scripts/jupyter.exe differ
diff --git a/rag/Scripts/markdown-it.exe b/rag/Scripts/markdown-it.exe
new file mode 100644
index 0000000000000000000000000000000000000000..b6d80e132493cdf4b932162398bd79fb1b538774
Binary files /dev/null and b/rag/Scripts/markdown-it.exe differ
diff --git a/rag/Scripts/nltk.exe b/rag/Scripts/nltk.exe
new file mode 100644
index 0000000000000000000000000000000000000000..7579d1cd7be2ff4fcffcf1ad0025d8af7be1ce89
Binary files /dev/null and b/rag/Scripts/nltk.exe differ
diff --git a/rag/Scripts/normalizer.exe b/rag/Scripts/normalizer.exe
new file mode 100644
index 0000000000000000000000000000000000000000..61afc43adfc489b1dbc3b82128c2a71813bf5e02
Binary files /dev/null and b/rag/Scripts/normalizer.exe differ
diff --git a/rag/Scripts/pinecone.exe b/rag/Scripts/pinecone.exe
new file mode 100644
index 0000000000000000000000000000000000000000..b813e31c5fa59ec1593a1be36f49568a9f3173b6
Binary files /dev/null and b/rag/Scripts/pinecone.exe differ
diff --git a/rag/Scripts/pip.exe b/rag/Scripts/pip.exe
new file mode 100644
index 0000000000000000000000000000000000000000..c0ca365bd64744e00e2a46da4e01a0ab51e2e479
Binary files /dev/null and b/rag/Scripts/pip.exe differ
diff --git a/rag/Scripts/pip3.9.exe b/rag/Scripts/pip3.9.exe
new file mode 100644
index 0000000000000000000000000000000000000000..c0ca365bd64744e00e2a46da4e01a0ab51e2e479
Binary files /dev/null and b/rag/Scripts/pip3.9.exe differ
diff --git a/rag/Scripts/pip3.exe b/rag/Scripts/pip3.exe
new file mode 100644
index 0000000000000000000000000000000000000000..c0ca365bd64744e00e2a46da4e01a0ab51e2e479
Binary files /dev/null and b/rag/Scripts/pip3.exe differ
diff --git a/rag/Scripts/pygmentize.exe b/rag/Scripts/pygmentize.exe
new file mode 100644
index 0000000000000000000000000000000000000000..921785fc91710329cf065e4395718bcd21630e50
Binary files /dev/null and b/rag/Scripts/pygmentize.exe differ
diff --git a/rag/Scripts/python.exe b/rag/Scripts/python.exe
new file mode 100644
index 0000000000000000000000000000000000000000..a479e5f019173882d84d7262768aeeda81189cf2
Binary files /dev/null and b/rag/Scripts/python.exe differ
diff --git a/rag/Scripts/pythonw.exe b/rag/Scripts/pythonw.exe
new file mode 100644
index 0000000000000000000000000000000000000000..633eac918ba8cf56fc0ebaf98dc577d304b3bff2
Binary files /dev/null and b/rag/Scripts/pythonw.exe differ
diff --git a/rag/Scripts/pywin32_postinstall.py b/rag/Scripts/pywin32_postinstall.py
new file mode 100644
index 0000000000000000000000000000000000000000..147f0cde7baae295b0a92f2b299e4614303a38d8
--- /dev/null
+++ b/rag/Scripts/pywin32_postinstall.py
@@ -0,0 +1,783 @@
+# postinstall script for pywin32
+#
+# copies PyWinTypesxx.dll and PythonCOMxx.dll into the system directory,
+# and creates a pth file
+import glob
+import os
+import shutil
+import sys
+import sysconfig
+
+try:
+ import winreg as winreg
+except:
+ import winreg
+
+# Send output somewhere so it can be found if necessary...
+import tempfile
+
+tee_f = open(os.path.join(tempfile.gettempdir(), "pywin32_postinstall.log"), "w")
+
+
+class Tee:
+ def __init__(self, file):
+ self.f = file
+
+ def write(self, what):
+ if self.f is not None:
+ try:
+ self.f.write(what.replace("\n", "\r\n"))
+ except IOError:
+ pass
+ tee_f.write(what)
+
+ def flush(self):
+ if self.f is not None:
+ try:
+ self.f.flush()
+ except IOError:
+ pass
+ tee_f.flush()
+
+
+# For some unknown reason, when running under bdist_wininst we will start up
+# with sys.stdout as None but stderr is hooked up. This work-around allows
+# bdist_wininst to see the output we write and display it at the end of
+# the install.
+if sys.stdout is None:
+ sys.stdout = sys.stderr
+
+sys.stderr = Tee(sys.stderr)
+sys.stdout = Tee(sys.stdout)
+
+com_modules = [
+ # module_name, class_names
+ ("win32com.servers.interp", "Interpreter"),
+ ("win32com.servers.dictionary", "DictionaryPolicy"),
+ ("win32com.axscript.client.pyscript", "PyScript"),
+]
+
+# Is this a 'silent' install - ie, avoid all dialogs.
+# Different than 'verbose'
+silent = 0
+
+# Verbosity of output messages.
+verbose = 1
+
+root_key_name = "Software\\Python\\PythonCore\\" + sys.winver
+
+try:
+ # When this script is run from inside the bdist_wininst installer,
+ # file_created() and directory_created() are additional builtin
+ # functions which write lines to Python23\pywin32-install.log. This is
+ # a list of actions for the uninstaller, the format is inspired by what
+ # the Wise installer also creates.
+ file_created
+ is_bdist_wininst = True
+except NameError:
+ is_bdist_wininst = False # we know what it is not - but not what it is :)
+
+ def file_created(file):
+ pass
+
+ def directory_created(directory):
+ pass
+
+ def get_root_hkey():
+ try:
+ winreg.OpenKey(
+ winreg.HKEY_LOCAL_MACHINE, root_key_name, 0, winreg.KEY_CREATE_SUB_KEY
+ )
+ return winreg.HKEY_LOCAL_MACHINE
+ except OSError:
+ # Either not exist, or no permissions to create subkey means
+ # must be HKCU
+ return winreg.HKEY_CURRENT_USER
+
+
+try:
+ create_shortcut
+except NameError:
+ # Create a function with the same signature as create_shortcut provided
+ # by bdist_wininst
+ def create_shortcut(
+ path, description, filename, arguments="", workdir="", iconpath="", iconindex=0
+ ):
+ import pythoncom
+ from win32com.shell import shell
+
+ ilink = pythoncom.CoCreateInstance(
+ shell.CLSID_ShellLink,
+ None,
+ pythoncom.CLSCTX_INPROC_SERVER,
+ shell.IID_IShellLink,
+ )
+ ilink.SetPath(path)
+ ilink.SetDescription(description)
+ if arguments:
+ ilink.SetArguments(arguments)
+ if workdir:
+ ilink.SetWorkingDirectory(workdir)
+ if iconpath or iconindex:
+ ilink.SetIconLocation(iconpath, iconindex)
+ # now save it.
+ ipf = ilink.QueryInterface(pythoncom.IID_IPersistFile)
+ ipf.Save(filename, 0)
+
+ # Support the same list of "path names" as bdist_wininst.
+ def get_special_folder_path(path_name):
+ from win32com.shell import shell, shellcon
+
+ for maybe in """
+ CSIDL_COMMON_STARTMENU CSIDL_STARTMENU CSIDL_COMMON_APPDATA
+ CSIDL_LOCAL_APPDATA CSIDL_APPDATA CSIDL_COMMON_DESKTOPDIRECTORY
+ CSIDL_DESKTOPDIRECTORY CSIDL_COMMON_STARTUP CSIDL_STARTUP
+ CSIDL_COMMON_PROGRAMS CSIDL_PROGRAMS CSIDL_PROGRAM_FILES_COMMON
+ CSIDL_PROGRAM_FILES CSIDL_FONTS""".split():
+ if maybe == path_name:
+ csidl = getattr(shellcon, maybe)
+ return shell.SHGetSpecialFolderPath(0, csidl, False)
+ raise ValueError("%s is an unknown path ID" % (path_name,))
+
+
+def CopyTo(desc, src, dest):
+ import win32api
+ import win32con
+
+ while 1:
+ try:
+ win32api.CopyFile(src, dest, 0)
+ return
+ except win32api.error as details:
+ if details.winerror == 5: # access denied - user not admin.
+ raise
+ if silent:
+ # Running silent mode - just re-raise the error.
+ raise
+ full_desc = (
+ "Error %s\n\n"
+ "If you have any Python applications running, "
+ "please close them now\nand select 'Retry'\n\n%s"
+ % (desc, details.strerror)
+ )
+ rc = win32api.MessageBox(
+ 0, full_desc, "Installation Error", win32con.MB_ABORTRETRYIGNORE
+ )
+ if rc == win32con.IDABORT:
+ raise
+ elif rc == win32con.IDIGNORE:
+ return
+ # else retry - around we go again.
+
+
+# We need to import win32api to determine the Windows system directory,
+# so we can copy our system files there - but importing win32api will
+# load the pywintypes.dll already in the system directory preventing us
+# from updating them!
+# So, we pull the same trick pywintypes.py does, but it loads from
+# our pywintypes_system32 directory.
+def LoadSystemModule(lib_dir, modname):
+ # See if this is a debug build.
+ import importlib.machinery
+ import importlib.util
+
+ suffix = "_d" if "_d.pyd" in importlib.machinery.EXTENSION_SUFFIXES else ""
+ filename = "%s%d%d%s.dll" % (
+ modname,
+ sys.version_info[0],
+ sys.version_info[1],
+ suffix,
+ )
+ filename = os.path.join(lib_dir, "pywin32_system32", filename)
+ loader = importlib.machinery.ExtensionFileLoader(modname, filename)
+ spec = importlib.machinery.ModuleSpec(name=modname, loader=loader, origin=filename)
+ mod = importlib.util.module_from_spec(spec)
+ spec.loader.exec_module(mod)
+
+
+def SetPyKeyVal(key_name, value_name, value):
+ root_hkey = get_root_hkey()
+ root_key = winreg.OpenKey(root_hkey, root_key_name)
+ try:
+ my_key = winreg.CreateKey(root_key, key_name)
+ try:
+ winreg.SetValueEx(my_key, value_name, 0, winreg.REG_SZ, value)
+ if verbose:
+ print("-> %s\\%s[%s]=%r" % (root_key_name, key_name, value_name, value))
+ finally:
+ my_key.Close()
+ finally:
+ root_key.Close()
+
+
+def UnsetPyKeyVal(key_name, value_name, delete_key=False):
+ root_hkey = get_root_hkey()
+ root_key = winreg.OpenKey(root_hkey, root_key_name)
+ try:
+ my_key = winreg.OpenKey(root_key, key_name, 0, winreg.KEY_SET_VALUE)
+ try:
+ winreg.DeleteValue(my_key, value_name)
+ if verbose:
+ print("-> DELETE %s\\%s[%s]" % (root_key_name, key_name, value_name))
+ finally:
+ my_key.Close()
+ if delete_key:
+ winreg.DeleteKey(root_key, key_name)
+ if verbose:
+ print("-> DELETE %s\\%s" % (root_key_name, key_name))
+ except OSError as why:
+ winerror = getattr(why, "winerror", why.errno)
+ if winerror != 2: # file not found
+ raise
+ finally:
+ root_key.Close()
+
+
+def RegisterCOMObjects(register=True):
+ import win32com.server.register
+
+ if register:
+ func = win32com.server.register.RegisterClasses
+ else:
+ func = win32com.server.register.UnregisterClasses
+ flags = {}
+ if not verbose:
+ flags["quiet"] = 1
+ for module, klass_name in com_modules:
+ __import__(module)
+ mod = sys.modules[module]
+ flags["finalize_register"] = getattr(mod, "DllRegisterServer", None)
+ flags["finalize_unregister"] = getattr(mod, "DllUnregisterServer", None)
+ klass = getattr(mod, klass_name)
+ func(klass, **flags)
+
+
+def RegisterHelpFile(register=True, lib_dir=None):
+ if lib_dir is None:
+ lib_dir = sysconfig.get_paths()["platlib"]
+ if register:
+ # Register the .chm help file.
+ chm_file = os.path.join(lib_dir, "PyWin32.chm")
+ if os.path.isfile(chm_file):
+ # This isn't recursive, so if 'Help' doesn't exist, we croak
+ SetPyKeyVal("Help", None, None)
+ SetPyKeyVal("Help\\Pythonwin Reference", None, chm_file)
+ return chm_file
+ else:
+ print("NOTE: PyWin32.chm can not be located, so has not " "been registered")
+ else:
+ UnsetPyKeyVal("Help\\Pythonwin Reference", None, delete_key=True)
+ return None
+
+
+def RegisterPythonwin(register=True, lib_dir=None):
+ """Add (or remove) Pythonwin to context menu for python scripts.
+ ??? Should probably also add Edit command for pys files also.
+ Also need to remove these keys on uninstall, but there's no function
+ like file_created to add registry entries to uninstall log ???
+ """
+ import os
+
+ if lib_dir is None:
+ lib_dir = sysconfig.get_paths()["platlib"]
+ classes_root = get_root_hkey()
+ ## Installer executable doesn't seem to pass anything to postinstall script indicating if it's a debug build,
+ pythonwin_exe = os.path.join(lib_dir, "Pythonwin", "Pythonwin.exe")
+ pythonwin_edit_command = pythonwin_exe + ' -edit "%1"'
+
+ keys_vals = [
+ (
+ "Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\Pythonwin.exe",
+ "",
+ pythonwin_exe,
+ ),
+ (
+ "Software\\Classes\\Python.File\\shell\\Edit with Pythonwin",
+ "command",
+ pythonwin_edit_command,
+ ),
+ (
+ "Software\\Classes\\Python.NoConFile\\shell\\Edit with Pythonwin",
+ "command",
+ pythonwin_edit_command,
+ ),
+ ]
+
+ try:
+ if register:
+ for key, sub_key, val in keys_vals:
+ ## Since winreg only uses the character Api functions, this can fail if Python
+ ## is installed to a path containing non-ascii characters
+ hkey = winreg.CreateKey(classes_root, key)
+ if sub_key:
+ hkey = winreg.CreateKey(hkey, sub_key)
+ winreg.SetValueEx(hkey, None, 0, winreg.REG_SZ, val)
+ hkey.Close()
+ else:
+ for key, sub_key, val in keys_vals:
+ try:
+ if sub_key:
+ hkey = winreg.OpenKey(classes_root, key)
+ winreg.DeleteKey(hkey, sub_key)
+ hkey.Close()
+ winreg.DeleteKey(classes_root, key)
+ except OSError as why:
+ winerror = getattr(why, "winerror", why.errno)
+ if winerror != 2: # file not found
+ raise
+ finally:
+ # tell windows about the change
+ from win32com.shell import shell, shellcon
+
+ shell.SHChangeNotify(
+ shellcon.SHCNE_ASSOCCHANGED, shellcon.SHCNF_IDLIST, None, None
+ )
+
+
+def get_shortcuts_folder():
+ if get_root_hkey() == winreg.HKEY_LOCAL_MACHINE:
+ try:
+ fldr = get_special_folder_path("CSIDL_COMMON_PROGRAMS")
+ except OSError:
+ # No CSIDL_COMMON_PROGRAMS on this platform
+ fldr = get_special_folder_path("CSIDL_PROGRAMS")
+ else:
+ # non-admin install - always goes in this user's start menu.
+ fldr = get_special_folder_path("CSIDL_PROGRAMS")
+
+ try:
+ install_group = winreg.QueryValue(
+ get_root_hkey(), root_key_name + "\\InstallPath\\InstallGroup"
+ )
+ except OSError:
+ vi = sys.version_info
+ install_group = "Python %d.%d" % (vi[0], vi[1])
+ return os.path.join(fldr, install_group)
+
+
+# Get the system directory, which may be the Wow64 directory if we are a 32bit
+# python on a 64bit OS.
+def get_system_dir():
+ import win32api # we assume this exists.
+
+ try:
+ import pythoncom
+ import win32process
+ from win32com.shell import shell, shellcon
+
+ try:
+ if win32process.IsWow64Process():
+ return shell.SHGetSpecialFolderPath(0, shellcon.CSIDL_SYSTEMX86)
+ return shell.SHGetSpecialFolderPath(0, shellcon.CSIDL_SYSTEM)
+ except (pythoncom.com_error, win32process.error):
+ return win32api.GetSystemDirectory()
+ except ImportError:
+ return win32api.GetSystemDirectory()
+
+
+def fixup_dbi():
+ # We used to have a dbi.pyd with our .pyd files, but now have a .py file.
+ # If the user didn't uninstall, they will find the .pyd which will cause
+ # problems - so handle that.
+ import win32api
+ import win32con
+
+ pyd_name = os.path.join(os.path.dirname(win32api.__file__), "dbi.pyd")
+ pyd_d_name = os.path.join(os.path.dirname(win32api.__file__), "dbi_d.pyd")
+ py_name = os.path.join(os.path.dirname(win32con.__file__), "dbi.py")
+ for this_pyd in (pyd_name, pyd_d_name):
+ this_dest = this_pyd + ".old"
+ if os.path.isfile(this_pyd) and os.path.isfile(py_name):
+ try:
+ if os.path.isfile(this_dest):
+ print(
+ "Old dbi '%s' already exists - deleting '%s'"
+ % (this_dest, this_pyd)
+ )
+ os.remove(this_pyd)
+ else:
+ os.rename(this_pyd, this_dest)
+ print("renamed '%s'->'%s.old'" % (this_pyd, this_pyd))
+ file_created(this_pyd + ".old")
+ except os.error as exc:
+ print("FAILED to rename '%s': %s" % (this_pyd, exc))
+
+
+def install(lib_dir):
+ import traceback
+
+ # The .pth file is now installed as a regular file.
+ # Create the .pth file in the site-packages dir, and use only relative paths
+ # We used to write a .pth directly to sys.prefix - clobber it.
+ if os.path.isfile(os.path.join(sys.prefix, "pywin32.pth")):
+ os.unlink(os.path.join(sys.prefix, "pywin32.pth"))
+ # The .pth may be new and therefore not loaded in this session.
+ # Setup the paths just in case.
+ for name in "win32 win32\\lib Pythonwin".split():
+ sys.path.append(os.path.join(lib_dir, name))
+ # It is possible people with old versions installed with still have
+ # pywintypes and pythoncom registered. We no longer need this, and stale
+ # entries hurt us.
+ for name in "pythoncom pywintypes".split():
+ keyname = "Software\\Python\\PythonCore\\" + sys.winver + "\\Modules\\" + name
+ for root in winreg.HKEY_LOCAL_MACHINE, winreg.HKEY_CURRENT_USER:
+ try:
+ winreg.DeleteKey(root, keyname + "\\Debug")
+ except WindowsError:
+ pass
+ try:
+ winreg.DeleteKey(root, keyname)
+ except WindowsError:
+ pass
+ LoadSystemModule(lib_dir, "pywintypes")
+ LoadSystemModule(lib_dir, "pythoncom")
+ import win32api
+
+ # and now we can get the system directory:
+ files = glob.glob(os.path.join(lib_dir, "pywin32_system32\\*.*"))
+ if not files:
+ raise RuntimeError("No system files to copy!!")
+ # Try the system32 directory first - if that fails due to "access denied",
+ # it implies a non-admin user, and we use sys.prefix
+ for dest_dir in [get_system_dir(), sys.prefix]:
+ # and copy some files over there
+ worked = 0
+ try:
+ for fname in files:
+ base = os.path.basename(fname)
+ dst = os.path.join(dest_dir, base)
+ CopyTo("installing %s" % base, fname, dst)
+ if verbose:
+ print("Copied %s to %s" % (base, dst))
+ # Register the files with the uninstaller
+ file_created(dst)
+ worked = 1
+ # Nuke any other versions that may exist - having
+ # duplicates causes major headaches.
+ bad_dest_dirs = [
+ os.path.join(sys.prefix, "Library\\bin"),
+ os.path.join(sys.prefix, "Lib\\site-packages\\win32"),
+ ]
+ if dest_dir != sys.prefix:
+ bad_dest_dirs.append(sys.prefix)
+ for bad_dest_dir in bad_dest_dirs:
+ bad_fname = os.path.join(bad_dest_dir, base)
+ if os.path.exists(bad_fname):
+ # let exceptions go here - delete must succeed
+ os.unlink(bad_fname)
+ if worked:
+ break
+ except win32api.error as details:
+ if details.winerror == 5:
+ # access denied - user not admin - try sys.prefix dir,
+ # but first check that a version doesn't already exist
+ # in that place - otherwise that one will still get used!
+ if os.path.exists(dst):
+ msg = (
+ "The file '%s' exists, but can not be replaced "
+ "due to insufficient permissions. You must "
+ "reinstall this software as an Administrator" % dst
+ )
+ print(msg)
+ raise RuntimeError(msg)
+ continue
+ raise
+ else:
+ raise RuntimeError(
+ "You don't have enough permissions to install the system files"
+ )
+
+ # Pythonwin 'compiles' config files - record them for uninstall.
+ pywin_dir = os.path.join(lib_dir, "Pythonwin", "pywin")
+ for fname in glob.glob(os.path.join(pywin_dir, "*.cfg")):
+ file_created(fname[:-1] + "c") # .cfg->.cfc
+
+ # Register our demo COM objects.
+ try:
+ try:
+ RegisterCOMObjects()
+ except win32api.error as details:
+ if details.winerror != 5: # ERROR_ACCESS_DENIED
+ raise
+ print("You do not have the permissions to install COM objects.")
+ print("The sample COM objects were not registered.")
+ except Exception:
+ print("FAILED to register the Python COM objects")
+ traceback.print_exc()
+
+ # There may be no main Python key in HKCU if, eg, an admin installed
+ # python itself.
+ winreg.CreateKey(get_root_hkey(), root_key_name)
+
+ chm_file = None
+ try:
+ chm_file = RegisterHelpFile(True, lib_dir)
+ except Exception:
+ print("Failed to register help file")
+ traceback.print_exc()
+ else:
+ if verbose:
+ print("Registered help file")
+
+ # misc other fixups.
+ fixup_dbi()
+
+ # Register Pythonwin in context menu
+ try:
+ RegisterPythonwin(True, lib_dir)
+ except Exception:
+ print("Failed to register pythonwin as editor")
+ traceback.print_exc()
+ else:
+ if verbose:
+ print("Pythonwin has been registered in context menu")
+
+ # Create the win32com\gen_py directory.
+ make_dir = os.path.join(lib_dir, "win32com", "gen_py")
+ if not os.path.isdir(make_dir):
+ if verbose:
+ print("Creating directory %s" % (make_dir,))
+ directory_created(make_dir)
+ os.mkdir(make_dir)
+
+ try:
+ # create shortcuts
+ # CSIDL_COMMON_PROGRAMS only available works on NT/2000/XP, and
+ # will fail there if the user has no admin rights.
+ fldr = get_shortcuts_folder()
+ # If the group doesn't exist, then we don't make shortcuts - its
+ # possible that this isn't a "normal" install.
+ if os.path.isdir(fldr):
+ dst = os.path.join(fldr, "PythonWin.lnk")
+ create_shortcut(
+ os.path.join(lib_dir, "Pythonwin\\Pythonwin.exe"),
+ "The Pythonwin IDE",
+ dst,
+ "",
+ sys.prefix,
+ )
+ file_created(dst)
+ if verbose:
+ print("Shortcut for Pythonwin created")
+ # And the docs.
+ if chm_file:
+ dst = os.path.join(fldr, "Python for Windows Documentation.lnk")
+ doc = "Documentation for the PyWin32 extensions"
+ create_shortcut(chm_file, doc, dst)
+ file_created(dst)
+ if verbose:
+ print("Shortcut to documentation created")
+ else:
+ if verbose:
+ print("Can't install shortcuts - %r is not a folder" % (fldr,))
+ except Exception as details:
+ print(details)
+
+ # importing win32com.client ensures the gen_py dir created - not strictly
+ # necessary to do now, but this makes the installation "complete"
+ try:
+ import win32com.client # noqa
+ except ImportError:
+ # Don't let this error sound fatal
+ pass
+ print("The pywin32 extensions were successfully installed.")
+
+ if is_bdist_wininst:
+ # Open a web page with info about the .exe installers being deprecated.
+ import webbrowser
+
+ try:
+ webbrowser.open("https://mhammond.github.io/pywin32_installers.html")
+ except webbrowser.Error:
+ print("Please visit https://mhammond.github.io/pywin32_installers.html")
+
+
+def uninstall(lib_dir):
+ # First ensure our system modules are loaded from pywin32_system, so
+ # we can remove the ones we copied...
+ LoadSystemModule(lib_dir, "pywintypes")
+ LoadSystemModule(lib_dir, "pythoncom")
+
+ try:
+ RegisterCOMObjects(False)
+ except Exception as why:
+ print("Failed to unregister COM objects: %s" % (why,))
+
+ try:
+ RegisterHelpFile(False, lib_dir)
+ except Exception as why:
+ print("Failed to unregister help file: %s" % (why,))
+ else:
+ if verbose:
+ print("Unregistered help file")
+
+ try:
+ RegisterPythonwin(False, lib_dir)
+ except Exception as why:
+ print("Failed to unregister Pythonwin: %s" % (why,))
+ else:
+ if verbose:
+ print("Unregistered Pythonwin")
+
+ try:
+ # remove gen_py directory.
+ gen_dir = os.path.join(lib_dir, "win32com", "gen_py")
+ if os.path.isdir(gen_dir):
+ shutil.rmtree(gen_dir)
+ if verbose:
+ print("Removed directory %s" % (gen_dir,))
+
+ # Remove pythonwin compiled "config" files.
+ pywin_dir = os.path.join(lib_dir, "Pythonwin", "pywin")
+ for fname in glob.glob(os.path.join(pywin_dir, "*.cfc")):
+ os.remove(fname)
+
+ # The dbi.pyd.old files we may have created.
+ try:
+ os.remove(os.path.join(lib_dir, "win32", "dbi.pyd.old"))
+ except os.error:
+ pass
+ try:
+ os.remove(os.path.join(lib_dir, "win32", "dbi_d.pyd.old"))
+ except os.error:
+ pass
+
+ except Exception as why:
+ print("Failed to remove misc files: %s" % (why,))
+
+ try:
+ fldr = get_shortcuts_folder()
+ for link in ("PythonWin.lnk", "Python for Windows Documentation.lnk"):
+ fqlink = os.path.join(fldr, link)
+ if os.path.isfile(fqlink):
+ os.remove(fqlink)
+ if verbose:
+ print("Removed %s" % (link,))
+ except Exception as why:
+ print("Failed to remove shortcuts: %s" % (why,))
+ # Now remove the system32 files.
+ files = glob.glob(os.path.join(lib_dir, "pywin32_system32\\*.*"))
+ # Try the system32 directory first - if that fails due to "access denied",
+ # it implies a non-admin user, and we use sys.prefix
+ try:
+ for dest_dir in [get_system_dir(), sys.prefix]:
+ # and copy some files over there
+ worked = 0
+ for fname in files:
+ base = os.path.basename(fname)
+ dst = os.path.join(dest_dir, base)
+ if os.path.isfile(dst):
+ try:
+ os.remove(dst)
+ worked = 1
+ if verbose:
+ print("Removed file %s" % (dst))
+ except Exception:
+ print("FAILED to remove %s" % (dst,))
+ if worked:
+ break
+ except Exception as why:
+ print("FAILED to remove system files: %s" % (why,))
+
+
+# NOTE: If this script is run from inside the bdist_wininst created
+# binary installer or uninstaller, the command line args are either
+# '-install' or '-remove'.
+
+# Important: From inside the binary installer this script MUST NOT
+# call sys.exit() or raise SystemExit, otherwise not only this script
+# but also the installer will terminate! (Is there a way to prevent
+# this from the bdist_wininst C code?)
+
+
+def verify_destination(location):
+ if not os.path.isdir(location):
+ raise argparse.ArgumentTypeError('Path "{}" does not exist!'.format(location))
+ return location
+
+
+def main():
+ import argparse
+
+ parser = argparse.ArgumentParser(
+ formatter_class=argparse.RawDescriptionHelpFormatter,
+ description="""A post-install script for the pywin32 extensions.
+
+ * Typical usage:
+
+ > python pywin32_postinstall.py -install
+
+ If you installed pywin32 via a .exe installer, this should be run
+ automatically after installation, but if it fails you can run it again.
+
+ If you installed pywin32 via PIP, you almost certainly need to run this to
+ setup the environment correctly.
+
+ Execute with script with a '-install' parameter, to ensure the environment
+ is setup correctly.
+ """,
+ )
+ parser.add_argument(
+ "-install",
+ default=False,
+ action="store_true",
+ help="Configure the Python environment correctly for pywin32.",
+ )
+ parser.add_argument(
+ "-remove",
+ default=False,
+ action="store_true",
+ help="Try and remove everything that was installed or copied.",
+ )
+ parser.add_argument(
+ "-wait",
+ type=int,
+ help="Wait for the specified process to terminate before starting.",
+ )
+ parser.add_argument(
+ "-silent",
+ default=False,
+ action="store_true",
+ help='Don\'t display the "Abort/Retry/Ignore" dialog for files in use.',
+ )
+ parser.add_argument(
+ "-quiet",
+ default=False,
+ action="store_true",
+ help="Don't display progress messages.",
+ )
+ parser.add_argument(
+ "-destination",
+ default=sysconfig.get_paths()["platlib"],
+ type=verify_destination,
+ help="Location of the PyWin32 installation",
+ )
+
+ args = parser.parse_args()
+
+ if not args.quiet:
+ print("Parsed arguments are: {}".format(args))
+
+ if not args.install ^ args.remove:
+ parser.error("You need to either choose to -install or -remove!")
+
+ if args.wait is not None:
+ try:
+ os.waitpid(args.wait, 0)
+ except os.error:
+ # child already dead
+ pass
+
+ silent = args.silent
+ verbose = not args.quiet
+
+ if args.install:
+ install(args.destination)
+
+ if args.remove:
+ if not is_bdist_wininst:
+ uninstall(args.destination)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/rag/Scripts/pywin32_testall.py b/rag/Scripts/pywin32_testall.py
new file mode 100644
index 0000000000000000000000000000000000000000..a54f9d4fa8553330d2a9d1a32dac394c8c6e927b
--- /dev/null
+++ b/rag/Scripts/pywin32_testall.py
@@ -0,0 +1,124 @@
+"""A test runner for pywin32"""
+import os
+import site
+import subprocess
+import sys
+
+# locate the dirs based on where this script is - it may be either in the
+# source tree, or in an installed Python 'Scripts' tree.
+this_dir = os.path.dirname(__file__)
+site_packages = [
+ site.getusersitepackages(),
+] + site.getsitepackages()
+
+failures = []
+
+
+# Run a test using subprocess and wait for the result.
+# If we get an returncode != 0, we know that there was an error, but we don't
+# abort immediately - we run as many tests as we can.
+def run_test(script, cmdline_extras):
+ dirname, scriptname = os.path.split(script)
+ # some tests prefer to be run from their directory.
+ cmd = [sys.executable, "-u", scriptname] + cmdline_extras
+ print("--- Running '%s' ---" % script)
+ sys.stdout.flush()
+ result = subprocess.run(cmd, check=False, cwd=dirname)
+ print("*** Test script '%s' exited with %s" % (script, result.returncode))
+ sys.stdout.flush()
+ if result.returncode:
+ failures.append(script)
+
+
+def find_and_run(possible_locations, extras):
+ for maybe in possible_locations:
+ if os.path.isfile(maybe):
+ run_test(maybe, extras)
+ break
+ else:
+ raise RuntimeError(
+ "Failed to locate a test script in one of %s" % possible_locations
+ )
+
+
+def main():
+ import argparse
+
+ code_directories = [this_dir] + site_packages
+
+ parser = argparse.ArgumentParser(
+ description="A script to trigger tests in all subprojects of PyWin32."
+ )
+ parser.add_argument(
+ "-no-user-interaction",
+ default=False,
+ action="store_true",
+ help="(This is now the default - use `-user-interaction` to include them)",
+ )
+
+ parser.add_argument(
+ "-user-interaction",
+ action="store_true",
+ help="Include tests which require user interaction",
+ )
+
+ parser.add_argument(
+ "-skip-adodbapi",
+ default=False,
+ action="store_true",
+ help="Skip the adodbapi tests; useful for CI where there's no provider",
+ )
+
+ args, remains = parser.parse_known_args()
+
+ # win32, win32ui / Pythonwin
+
+ extras = []
+ if args.user_interaction:
+ extras += ["-user-interaction"]
+ extras.extend(remains)
+ scripts = [
+ "win32/test/testall.py",
+ "Pythonwin/pywin/test/all.py",
+ ]
+ for script in scripts:
+ maybes = [os.path.join(directory, script) for directory in code_directories]
+ find_and_run(maybes, extras)
+
+ # win32com
+ maybes = [
+ os.path.join(directory, "win32com", "test", "testall.py")
+ for directory in [
+ os.path.join(this_dir, "com"),
+ ]
+ + site_packages
+ ]
+ extras = remains + ["1"] # only run "level 1" tests in CI
+ find_and_run(maybes, extras)
+
+ # adodbapi
+ if not args.skip_adodbapi:
+ maybes = [
+ os.path.join(directory, "adodbapi", "test", "adodbapitest.py")
+ for directory in code_directories
+ ]
+ find_and_run(maybes, remains)
+ # This script has a hard-coded sql server name in it, (and markh typically
+ # doesn't have a different server to test on) but there is now supposed to be a server out there on the Internet
+ # just to run these tests, so try it...
+ maybes = [
+ os.path.join(directory, "adodbapi", "test", "test_adodbapi_dbapi20.py")
+ for directory in code_directories
+ ]
+ find_and_run(maybes, remains)
+
+ if failures:
+ print("The following scripts failed")
+ for failure in failures:
+ print(">", failure)
+ sys.exit(1)
+ print("All tests passed \\o/")
+
+
+if __name__ == "__main__":
+ main()
diff --git a/rag/Scripts/streamlit.cmd b/rag/Scripts/streamlit.cmd
new file mode 100644
index 0000000000000000000000000000000000000000..16cef3d145bffa5df48a2f38a93fa673bb645eba
--- /dev/null
+++ b/rag/Scripts/streamlit.cmd
@@ -0,0 +1,16 @@
+rem Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022)
+rem
+rem Licensed under the Apache License, Version 2.0 (the "License");
+rem you may not use this file except in compliance with the License.
+rem You may obtain a copy of the License at
+rem
+rem http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing, software
+rem distributed under the License is distributed on an "AS IS" BASIS,
+rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+rem See the License for the specific language governing permissions and
+rem limitations under the License.
+
+@echo OFF
+python -m streamlit %*
diff --git a/rag/Scripts/streamlit.exe b/rag/Scripts/streamlit.exe
new file mode 100644
index 0000000000000000000000000000000000000000..33fa09abadfde3b62b2f652f4386a192a2b4d484
Binary files /dev/null and b/rag/Scripts/streamlit.exe differ
diff --git a/rag/Scripts/torchrun.exe b/rag/Scripts/torchrun.exe
new file mode 100644
index 0000000000000000000000000000000000000000..a9f3babd11aa280604b4377a1631533c5fdb5db3
Binary files /dev/null and b/rag/Scripts/torchrun.exe differ
diff --git a/rag/Scripts/tqdm.exe b/rag/Scripts/tqdm.exe
new file mode 100644
index 0000000000000000000000000000000000000000..1d4dae1b77623724ca51eeef0c33baa07e00d010
Binary files /dev/null and b/rag/Scripts/tqdm.exe differ
diff --git a/rag/Scripts/transformers-cli.exe b/rag/Scripts/transformers-cli.exe
new file mode 100644
index 0000000000000000000000000000000000000000..f5ae7f6bd030116def7293ce4b1c768f3e4f7737
Binary files /dev/null and b/rag/Scripts/transformers-cli.exe differ
diff --git a/rag/Scripts/watchmedo.exe b/rag/Scripts/watchmedo.exe
new file mode 100644
index 0000000000000000000000000000000000000000..59abfd8a6339574f8f5a9f55b8f05c7a36be3c2c
Binary files /dev/null and b/rag/Scripts/watchmedo.exe differ
diff --git a/rag/etc/jupyter/nbconfig/notebook.d/pydeck.json b/rag/etc/jupyter/nbconfig/notebook.d/pydeck.json
new file mode 100644
index 0000000000000000000000000000000000000000..143b42aeb573b96bac0391209543ff04ab82f651
--- /dev/null
+++ b/rag/etc/jupyter/nbconfig/notebook.d/pydeck.json
@@ -0,0 +1,5 @@
+{
+ "load_extensions": {
+ "pydeck/extension": true
+ }
+}
diff --git a/rag/pyvenv.cfg b/rag/pyvenv.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..1fd738fee2138c0b803e41100446b874226f34f7
--- /dev/null
+++ b/rag/pyvenv.cfg
@@ -0,0 +1,3 @@
+home = C:\Python39
+include-system-site-packages = false
+version = 3.9.8
diff --git a/rag/share/jupyter/kernels/python3/kernel.json b/rag/share/jupyter/kernels/python3/kernel.json
new file mode 100644
index 0000000000000000000000000000000000000000..cca38a42a0a4f4ba0a75032390819a08569a7553
--- /dev/null
+++ b/rag/share/jupyter/kernels/python3/kernel.json
@@ -0,0 +1,14 @@
+{
+ "argv": [
+ "python",
+ "-m",
+ "ipykernel_launcher",
+ "-f",
+ "{connection_file}"
+ ],
+ "display_name": "Python 3 (ipykernel)",
+ "language": "python",
+ "metadata": {
+ "debugger": true
+ }
+}
\ No newline at end of file
diff --git a/rag/share/jupyter/kernels/python3/logo-32x32.png b/rag/share/jupyter/kernels/python3/logo-32x32.png
new file mode 100644
index 0000000000000000000000000000000000000000..be81330765764699553aa4fbaf0e9fc27c20c6d2
Binary files /dev/null and b/rag/share/jupyter/kernels/python3/logo-32x32.png differ
diff --git a/rag/share/jupyter/kernels/python3/logo-64x64.png b/rag/share/jupyter/kernels/python3/logo-64x64.png
new file mode 100644
index 0000000000000000000000000000000000000000..eebbff638361154ed3f262a81e915012713e7614
Binary files /dev/null and b/rag/share/jupyter/kernels/python3/logo-64x64.png differ
diff --git a/rag/share/jupyter/kernels/python3/logo-svg.svg b/rag/share/jupyter/kernels/python3/logo-svg.svg
new file mode 100644
index 0000000000000000000000000000000000000000..467b07b265bd7c9ddd575a2ce7178c62a35d6f83
--- /dev/null
+++ b/rag/share/jupyter/kernels/python3/logo-svg.svg
@@ -0,0 +1,265 @@
+
+
+
+
diff --git a/rag/share/jupyter/nbextensions/pydeck/extensionRequires.js b/rag/share/jupyter/nbextensions/pydeck/extensionRequires.js
new file mode 100644
index 0000000000000000000000000000000000000000..f663cc192edcb23360ed281390a083352c743434
--- /dev/null
+++ b/rag/share/jupyter/nbextensions/pydeck/extensionRequires.js
@@ -0,0 +1,15 @@
+/* eslint-disable */
+define(function() {
+ 'use strict';
+ requirejs.config({
+ map: {
+ '*': {
+ '@deck.gl/jupyter-widget': 'nbextensions/pydeck/index'
+ }
+ }
+ });
+ // Export the required load_ipython_extension function
+ return {
+ load_ipython_extension: function() {}
+ };
+});
diff --git a/rag/share/jupyter/nbextensions/pydeck/index.js b/rag/share/jupyter/nbextensions/pydeck/index.js
new file mode 100644
index 0000000000000000000000000000000000000000..0bca0f10a290a101d20ba7efb5ee462d13c07ff6
--- /dev/null
+++ b/rag/share/jupyter/nbextensions/pydeck/index.js
@@ -0,0 +1,26 @@
+!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("@jupyter-widgets/base"));else if("function"==typeof define&&define.amd)define(["@jupyter-widgets/base"],e);else{var n="object"==typeof exports?e(require("@jupyter-widgets/base")):e(t["@jupyter-widgets/base"]);for(var r in n)("object"==typeof exports?exports:t)[r]=n[r]}}(window,(function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=260)}([function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},function(t,e){function n(e){return t.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},n(e)}t.exports=n},function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"a",(function(){return r}))},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e){function n(t,e){for(var n=0;n{var t;t="OESVertexArrayObject emulation library context restored",globalThis.console&&globalThis.console.log&&globalThis.console.log(t),e.reset_()},!0),this.reset_()};p.prototype.VERTEX_ARRAY_BINDING_OES=34229,p.prototype.reset_=function(){if(void 0!==this.vertexArrayObjects)for(let t=0;ta(t)?void 0:0,A={3074:t=>a(t)?void 0:36064,35723:t=>a(t)?void 0:4352,35977:d,32937:d,36795:(t,e)=>{const n=a(t)?t.getExtension("EXT_disjoint_timer_query_webgl2"):t.getExtension("EXT_disjoint_timer_query");return n&&n.GPU_DISJOINT_EXT?e(n.GPU_DISJOINT_EXT):0},37445:(t,e)=>{const n=t.getExtension("WEBGL_debug_renderer_info");return e(n&&n.UNMASKED_VENDOR_WEBGL||7936)},37446:(t,e)=>{const n=t.getExtension("WEBGL_debug_renderer_info");return e(n&&n.UNMASKED_RENDERER_WEBGL||7937)},34047:(t,e)=>{const n=t.luma.extensions.EXT_texture_filter_anisotropic;return n?e(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT):1},32883:d,35071:d,37447:d,36063:(t,e)=>{if(!a(t)){const n=t.getExtension("WEBGL_draw_buffers");return n?e(n.MAX_COLOR_ATTACHMENTS_WEBGL):0}},35379:d,35374:d,35377:d,34852:t=>{if(!a(t)){const e=t.getExtension("WEBGL_draw_buffers");return e?e.MAX_DRAW_BUFFERS_WEBGL:0}},36203:t=>t.getExtension("OES_element_index")?2147483647:65535,33001:t=>t.getExtension("OES_element_index")?16777216:65535,33e3:t=>16777216,37157:d,35373:d,35657:d,36183:d,37137:d,34045:d,35978:d,35979:d,35968:d,35376:d,35375:d,35659:d,37154:d,35371:d,35658:d,35076:d,35077:d,35380:d};const g={OES_vertex_array_object:{meta:{suffix:"OES"},createVertexArray:()=>{i(!1,"VertexArray requires WebGL2 or OES_vertex_array_object extension")},deleteVertexArray:()=>{},bindVertexArray:()=>{},isVertexArray:()=>!1},ANGLE_instanced_arrays:{meta:{suffix:"ANGLE"},vertexAttribDivisor(t,e){i(0===e,"WebGL instanced rendering not supported")},drawElementsInstanced:()=>{},drawArraysInstanced:()=>{}},WEBGL_draw_buffers:{meta:{suffix:"WEBGL"},drawBuffers:()=>{i(!1)}},EXT_disjoint_timer_query:{meta:{suffix:"EXT"},createQuery:()=>{i(!1)},deleteQuery:()=>{i(!1)},beginQuery:()=>{i(!1)},endQuery:()=>{},getQuery(t,e){return this.getQueryObject(t,e)},getQueryParameter(t,e){return this.getQueryObject(t,e)},getQueryObject:()=>{}}},m={readBuffer:(t,e,n)=>{a(t)&&e(n)},getVertexAttrib:(t,e,n,r)=>{const{webgl2:i,ext:o}=function(t,e){return{webgl2:a(t),ext:t.getExtension(e)}}(t,"ANGLE_instanced_arrays");let s;switch(r){case 35069:s=!!i&&void 0;break;case 35070:s=i||o?void 0:0}return void 0!==s?s:e(n,r)},getProgramParameter:(t,e,n,r)=>{if(!a(t))switch(r){case 35967:return 35981;case 35971:case 35382:return 0}return e(n,r)},getInternalformatParameter:(t,e,n,r,i)=>{if(!a(t))switch(i){case 32937:return new Int32Array([0])}return t.getInternalformatParameter(n,r,i)},getTexParameter(t,e,n,r){switch(r){case 34046:const{extensions:e}=t.luma,n=e.EXT_texture_filter_anisotropic;r=n&&n.TEXTURE_MAX_ANISOTROPY_EXT||34046}return e(n,r)},getParameter:function(t,e,n){const r=A[n],i="function"==typeof r?r(t,e,n):r;return void 0!==i?i:e(n)},hint:(t,e,n,r)=>e(n,r)};function y(t,e){let{extension:n,target:r,target2:o}=e;const a=g[n];i(a);const{meta:s={}}=a,{suffix:u=""}=s,c=t.getExtension(n);for(const e of Object.keys(a)){const n="".concat(e).concat(u);let i=null;"meta"===e||"function"==typeof t[e]||(c&&"function"==typeof c[n]?i=function(){return c[n](...arguments)}:"function"==typeof a[e]&&(i=a[e].bind(r))),i&&(r[e]=i,o[e]=i)}}globalThis.polyfillContext=function(t){t.luma=t.luma||{};const{luma:e}=t;return e.polyfilled||(!function(t){if("function"==typeof t.createVertexArray)return;const e=t.getSupportedExtensions;t.getSupportedExtensions=function(){const t=e.call(this)||[];return t.indexOf("OES_vertex_array_object")<0&&t.push("OES_vertex_array_object"),t};const n=t.getExtension;t.getExtension=function(e){const r=n.call(this,e);return r||("OES_vertex_array_object"!==e?null:(t.__OESVertexArrayObject||(this.__OESVertexArrayObject=new p(this)),this.__OESVertexArrayObject))}}(t),function(t){t.luma.extensions={};const e=t.getSupportedExtensions()||[];for(const n of e)t.luma[n]=t.getExtension(n)}(t),function(t,e){for(const n of Object.getOwnPropertyNames(e))"overrides"!==n&&y(t,{extension:n,target:t.luma,target2:t})}(t,g),function(t,e){let{target:n,target2:r}=e;Object.keys(m).forEach(e=>{if("function"==typeof m[e]){const i=t[e]?t[e].bind(t):()=>{},o=m[e].bind(null,t,i);n[e]=o,r[e]=o}})}(t,{target:e,target2:t}),e.polyfilled=!0),t};const v={3042:!1,32773:new Float32Array([0,0,0,0]),32777:32774,34877:32774,32969:1,32968:0,32971:1,32970:0,3106:new Float32Array([0,0,0,0]),3107:[!0,!0,!0,!0],2884:!1,2885:1029,2929:!1,2931:1,2932:513,2928:new Float32Array([0,1]),2930:!0,3024:!0,36006:null,2886:2305,33170:4352,2849:1,32823:!1,32824:0,10752:0,32938:1,32939:!1,3089:!1,3088:new Int32Array([0,0,1024,1024]),2960:!1,2961:0,2968:4294967295,36005:4294967295,2962:519,2967:0,2963:4294967295,34816:519,36003:0,36004:4294967295,2964:7680,2965:7680,2966:7680,34817:7680,34818:7680,34819:7680,2978:[0,0,1024,1024],3333:4,3317:4,37440:!1,37441:!1,37443:37444,35723:4352,36010:null,35977:!1,3330:0,3332:0,3331:0,3314:0,32878:0,3316:0,3315:0,32877:0},_=(t,e,n)=>e?t.enable(n):t.disable(n),b=(t,e,n)=>t.hint(n,e),x=(t,e,n)=>t.pixelStorei(n,e);function w(t){return Array.isArray(t)||ArrayBuffer.isView(t)}const E={3042:_,32773:(t,e)=>t.blendColor(...e),32777:"blendEquation",34877:"blendEquation",32969:"blendFunc",32968:"blendFunc",32971:"blendFunc",32970:"blendFunc",3106:(t,e)=>t.clearColor(...e),3107:(t,e)=>t.colorMask(...e),2884:_,2885:(t,e)=>t.cullFace(e),2929:_,2931:(t,e)=>t.clearDepth(e),2932:(t,e)=>t.depthFunc(e),2928:(t,e)=>t.depthRange(...e),2930:(t,e)=>t.depthMask(e),3024:_,35723:b,36006:(t,e)=>{const n=a(t)?36009:36160;return t.bindFramebuffer(n,e)},2886:(t,e)=>t.frontFace(e),33170:b,2849:(t,e)=>t.lineWidth(e),32823:_,32824:"polygonOffset",10752:"polygonOffset",35977:_,32938:"sampleCoverage",32939:"sampleCoverage",3089:_,3088:(t,e)=>t.scissor(...e),2960:_,2961:(t,e)=>t.clearStencil(e),2968:(t,e)=>t.stencilMaskSeparate(1028,e),36005:(t,e)=>t.stencilMaskSeparate(1029,e),2962:"stencilFuncFront",2967:"stencilFuncFront",2963:"stencilFuncFront",34816:"stencilFuncBack",36003:"stencilFuncBack",36004:"stencilFuncBack",2964:"stencilOpFront",2965:"stencilOpFront",2966:"stencilOpFront",34817:"stencilOpBack",34818:"stencilOpBack",34819:"stencilOpBack",2978:(t,e)=>t.viewport(...e),3333:x,3317:x,37440:x,37441:x,37443:x,3330:x,3332:x,3331:x,36010:(t,e)=>t.bindFramebuffer(36008,e),3314:x,32878:x,3316:x,3315:x,32877:x,framebuffer:(t,e)=>{const n=e&&"handle"in e?e.handle:e;return t.bindFramebuffer(36160,n)},blend:(t,e)=>e?t.enable(3042):t.disable(3042),blendColor:(t,e)=>t.blendColor(...e),blendEquation:(t,e)=>{e=w(e)?e:[e,e],t.blendEquationSeparate(...e)},blendFunc:(t,e)=>{e=w(e)&&2===e.length?[...e,...e]:e,t.blendFuncSeparate(...e)},clearColor:(t,e)=>t.clearColor(...e),clearDepth:(t,e)=>t.clearDepth(e),clearStencil:(t,e)=>t.clearStencil(e),colorMask:(t,e)=>t.colorMask(...e),cull:(t,e)=>e?t.enable(2884):t.disable(2884),cullFace:(t,e)=>t.cullFace(e),depthTest:(t,e)=>e?t.enable(2929):t.disable(2929),depthFunc:(t,e)=>t.depthFunc(e),depthMask:(t,e)=>t.depthMask(e),depthRange:(t,e)=>t.depthRange(...e),dither:(t,e)=>e?t.enable(3024):t.disable(3024),derivativeHint:(t,e)=>{t.hint(35723,e)},frontFace:(t,e)=>t.frontFace(e),mipmapHint:(t,e)=>t.hint(33170,e),lineWidth:(t,e)=>t.lineWidth(e),polygonOffsetFill:(t,e)=>e?t.enable(32823):t.disable(32823),polygonOffset:(t,e)=>t.polygonOffset(...e),sampleCoverage:(t,e)=>t.sampleCoverage(...e),scissorTest:(t,e)=>e?t.enable(3089):t.disable(3089),scissor:(t,e)=>t.scissor(...e),stencilTest:(t,e)=>e?t.enable(2960):t.disable(2960),stencilMask:(t,e)=>{e=w(e)?e:[e,e];const[n,r]=e;t.stencilMaskSeparate(1028,n),t.stencilMaskSeparate(1029,r)},stencilFunc:(t,e)=>{e=w(e)&&3===e.length?[...e,...e]:e;const[n,r,i,o,a,s]=e;t.stencilFuncSeparate(1028,n,r,i),t.stencilFuncSeparate(1029,o,a,s)},stencilOp:(t,e)=>{e=w(e)&&3===e.length?[...e,...e]:e;const[n,r,i,o,a,s]=e;t.stencilOpSeparate(1028,n,r,i),t.stencilOpSeparate(1029,o,a,s)},viewport:(t,e)=>t.viewport(...e)};function O(t,e,n){return void 0!==e[t]?e[t]:n[t]}const S={blendEquation:(t,e,n)=>t.blendEquationSeparate(O(32777,e,n),O(34877,e,n)),blendFunc:(t,e,n)=>t.blendFuncSeparate(O(32969,e,n),O(32968,e,n),O(32971,e,n),O(32970,e,n)),polygonOffset:(t,e,n)=>t.polygonOffset(O(32824,e,n),O(10752,e,n)),sampleCoverage:(t,e,n)=>t.sampleCoverage(O(32938,e,n),O(32939,e,n)),stencilFuncFront:(t,e,n)=>t.stencilFuncSeparate(1028,O(2962,e,n),O(2967,e,n),O(2963,e,n)),stencilFuncBack:(t,e,n)=>t.stencilFuncSeparate(1029,O(34816,e,n),O(36003,e,n),O(36004,e,n)),stencilOpFront:(t,e,n)=>t.stencilOpSeparate(1028,O(2964,e,n),O(2965,e,n),O(2966,e,n)),stencilOpBack:(t,e,n)=>t.stencilOpSeparate(1029,O(34817,e,n),O(34818,e,n),O(34819,e,n))},T={enable:(t,e)=>t({[e]:!0}),disable:(t,e)=>t({[e]:!1}),pixelStorei:(t,e,n)=>t({[e]:n}),hint:(t,e,n)=>t({[e]:n}),bindFramebuffer:(t,e,n)=>{switch(e){case 36160:return t({36006:n,36010:n});case 36009:return t({36006:n});case 36008:return t({36010:n});default:return null}},blendColor:(t,e,n,r,i)=>t({32773:new Float32Array([e,n,r,i])}),blendEquation:(t,e)=>t({32777:e,34877:e}),blendEquationSeparate:(t,e,n)=>t({32777:e,34877:n}),blendFunc:(t,e,n)=>t({32969:e,32968:n,32971:e,32970:n}),blendFuncSeparate:(t,e,n,r,i)=>t({32969:e,32968:n,32971:r,32970:i}),clearColor:(t,e,n,r,i)=>t({3106:new Float32Array([e,n,r,i])}),clearDepth:(t,e)=>t({2931:e}),clearStencil:(t,e)=>t({2961:e}),colorMask:(t,e,n,r,i)=>t({3107:[e,n,r,i]}),cullFace:(t,e)=>t({2885:e}),depthFunc:(t,e)=>t({2932:e}),depthRange:(t,e,n)=>t({2928:new Float32Array([e,n])}),depthMask:(t,e)=>t({2930:e}),frontFace:(t,e)=>t({2886:e}),lineWidth:(t,e)=>t({2849:e}),polygonOffset:(t,e,n)=>t({32824:e,10752:n}),sampleCoverage:(t,e,n)=>t({32938:e,32939:n}),scissor:(t,e,n,r,i)=>t({3088:new Int32Array([e,n,r,i])}),stencilMask:(t,e)=>t({2968:e,36005:e}),stencilMaskSeparate:(t,e,n)=>t({[1028===e?2968:36005]:n}),stencilFunc:(t,e,n,r)=>t({2962:e,2967:n,2963:r,34816:e,36003:n,36004:r}),stencilFuncSeparate:(t,e,n,r,i)=>t({[1028===e?2962:34816]:n,[1028===e?2967:36003]:r,[1028===e?2963:36004]:i}),stencilOp:(t,e,n,r)=>t({2964:e,2965:n,2966:r,34817:e,34818:n,34819:r}),stencilOpSeparate:(t,e,n,r,i)=>t({[1028===e?2964:34817]:n,[1028===e?2965:34818]:r,[1028===e?2966:34819]:i}),viewport:(t,e,n,r,i)=>t({2978:[e,n,r,i]})},C=(t,e)=>t.isEnabled(e),P={3042:C,2884:C,2929:C,3024:C,32823:C,32926:C,32928:C,3089:C,2960:C,35977:C};function M(t){for(const e in t)return!1;return!0}function I(t,e){if(t===e)return!0;const n=Array.isArray(t)||ArrayBuffer.isView(t),r=Array.isArray(e)||ArrayBuffer.isView(e);if(n&&r&&t.length===e.length){for(let n=0;n{})}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.gl=t,this.program=null,this.stateStack=[],this.enable=!0,this.cache=e?z(t):Object.assign({},v),this.log=n,this._updateCache=this._updateCache.bind(this),Object.seal(this)}push(){this.stateStack.push({})}pop(){i(this.stateStack.length>0);const t=this.stateStack[this.stateStack.length-1];F(this.gl,t),this.stateStack.pop()}_updateCache(t){let e,n=!1;const r=this.stateStack.length>0&&this.stateStack[this.stateStack.length-1];for(const o in t){i(void 0!==o);const a=t[o],s=this.cache[o];I(a,s)||(n=!0,e=s,r&&!(o in r)&&(r[o]=s),this.cache[o]=a)}return{valueChanged:n,oldValue:e}}}function L(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{enable:n=!0,copyState:r}=e;if(i(void 0!==r),!t.state){const{polyfillContext:e}=globalThis;e&&e(t),t.state=new D(t,{copyState:r}),k(t);for(const e in T){R(t,e,T[e])}B(t,"getParameter"),B(t,"isEnabled")}return t.state.enable=n,t}function j(t){i(t.state),t.state.pop()}function F(t,e){if(i(o(t),"setParameters requires a WebGL context"),M(e))return;const n={};for(const r in e){const i=Number(r),o=E[r];o&&("string"==typeof o?n[o]=!0:o(t,e[r],i))}const r=t.state&&t.state.cache;if(r)for(const i in n){(0,S[i])(t,e,r)}}function z(t,e){if("number"==typeof(e=e||v)){const n=e,r=P[n];return r?r(t,n):t.getParameter(n)}const n=Array.isArray(e)?e:Object.keys(e),r={};for(const e of n){const n=P[e];r[e]=n?n(t,Number(e)):t.getParameter(Number(e))}return r}function U(t){F(t,v)}function N(t,e,n){if(M(e))return n(t);const{nocatch:r=!0}=e;let i;if(function(t){t.state||L(t,{copyState:!1}),t.state.push()}(t),F(t,e),r)i=n(t),j(t);else try{i=n(t)}finally{j(t)}return i}var G=n(142);function V(t){const{luma:e}=t;if(t.canvas&&e){const{clientWidth:n}=e.canvasSizeInfo;return n?t.drawingBufferWidth/n:1}return 1}function H(t,e){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const r=V(t),i=t.drawingBufferWidth,o=t.drawingBufferHeight;return q(e,r,i,o,n)}function W(t){const e="undefined"==typeof window?1:window.devicePixelRatio||1;return Number.isFinite(t)?t<=0?1:t:t?e:1}function q(t,e,n,r,i){const o=X(t[0],e,n);let a=Z(t[1],e,r,i),s=X(t[0]+1,e,n);const u=s===n-1?s:s-1;let c;return s=Z(t[1]+1,e,r,i),i?(s=0===s?s:s+1,c=a,a=s):c=s===r-1?s:s-1,{x:o,y:a,width:Math.max(u-o+1,1),height:Math.max(c-a+1,1)}}function X(t,e,n){return Math.min(Math.round(t*e),n-1)}function Z(t,e,n,r){return r?Math.max(0,n-1-Math.round(t*e)):Math.min(Math.round(t*e),n-1)}const J=Object(G.a)(),Q=J&&"undefined"!=typeof document,K={webgl2:!0,webgl1:!0,throwOnError:!0,manageState:!0,canvas:null,debug:!1,width:800,height:600};function Y(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(J,"createGLContext only available in the browser.\nCreate your own headless context or use 'createHeadlessContext' from @luma.gl/test-utils"),t=Object.assign({},K,t);const{width:e,height:n}=t;function r(e){if(t.throwOnError)throw new Error(e);return console.error(e),null}let o;t.onError=r;const{canvas:a}=t,s=nt({canvas:a,width:e,height:n,onError:r});return o=et(s,t),o?(o=$(o,t),rt(o),o):null}function $(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t||t._instrumented)return t;t._version=t._version||it(t),t.luma=t.luma||{},t.luma.canvasSizeInfo=t.luma.canvasSizeInfo||{},e=Object.assign({},K,e);const{manageState:n,debug:i}=e;return n&&L(t,{copyState:!1,log:function(){for(var t=arguments.length,e=new Array(t),n=0;n1&&void 0!==arguments[1]?arguments[1]:{};if(t.canvas){return void ot(t,W(e.useDevicePixels),e)}const n=t.getExtension("STACKGL_resize_drawingbuffer");n&&"width"in e&&"height"in e&&n.resize(e.width,e.height)}function et(t,e){const{onError:n}=e;let r=null;const i=t=>r=t.statusMessage||r;t.addEventListener("webglcontextcreationerror",i,!1);const{webgl1:o=!0,webgl2:a=!0}=e;let s=null;return a&&(s=s||t.getContext("webgl2",e),s=s||t.getContext("experimental-webgl2",e)),o&&(s=s||t.getContext("webgl",e),s=s||t.getContext("experimental-webgl",e)),t.removeEventListener("webglcontextcreationerror",i,!1),s?(e.onContextLost&&t.addEventListener("webglcontextlost",e.onContextLost,!1),e.onContextRestored&&t.addEventListener("webglcontextrestored",e.onContextRestored,!1),s):n("Failed to create ".concat(a&&!o?"WebGL2":"WebGL"," context: ").concat(r||"Unknown error"))}function nt(t){let e,{canvas:n,width:r=800,height:i=600,onError:o}=t;if("string"==typeof n){Q&&"complete"===document.readyState||o("createGLContext called on canvas '".concat(n,"' before page was loaded")),e=document.getElementById(n)}else n?e=n:(e=document.createElement("canvas"),e.id="lumagl-canvas",e.style.width=Number.isFinite(r)?"".concat(r,"px"):"100%",e.style.height=Number.isFinite(i)?"".concat(i,"px"):"100%",document.body.insertBefore(e,document.body.firstChild));return e}function rt(t){const e=a(t)?"WebGL2":"WebGL1",n=function(t){const e=t.getParameter(7936),n=t.getParameter(7937),r=t.getExtension("WEBGL_debug_renderer_info");return{vendor:r&&t.getParameter(r.UNMASKED_VENDOR_WEBGL||7936)||e,renderer:r&&t.getParameter(r.UNMASKED_RENDERER_WEBGL||7937)||n,vendorMasked:e,rendererMasked:n,version:t.getParameter(7938),shadingLanguageVersion:t.getParameter(35724)}}(t),i=n?"(".concat(n.vendor,",").concat(n.renderer,")"):"",o=t.debug?" debug":"";r.info(1,"".concat(e).concat(o," context ").concat(i))()}function it(t){return"undefined"!=typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext?2:1}function ot(t,e,n){let i="width"in n?n.width:t.canvas.clientWidth,o="height"in n?n.height:t.canvas.clientHeight;i&&o||(r.log(1,"Canvas clientWidth/clientHeight is 0")(),e=1,i=t.canvas.width||1,o=t.canvas.height||1),t.luma=t.luma||{},t.luma.canvasSizeInfo=t.luma.canvasSizeInfo||{};const a=t.luma.canvasSizeInfo;if(a.clientWidth!==i||a.clientHeight!==o||a.devicePixelRatio!==e){let n=e;const a=Math.floor(i*n),s=Math.floor(o*n);t.canvas.width=a,t.canvas.height=s,t.drawingBufferWidth===a&&t.drawingBufferHeight===s||(r.warn("Device pixel ratio clamped")(),n=Math.min(t.drawingBufferWidth/i,t.drawingBufferHeight/o),t.canvas.width=Math.floor(i*n),t.canvas.height=Math.floor(o*n)),Object.assign(t.luma.canvasSizeInfo,{clientWidth:i,clientHeight:o,devicePixelRatio:e})}}n.d(e,"k",(function(){return r})),n.d(e,"i",(function(){return o})),n.d(e,"j",(function(){return a})),n.d(e,"g",(function(){return s})),n.d(e,"b",(function(){return u})),n.d(e,"a",(function(){return c})),n.d(e,"f",(function(){return z})),n.d(e,"n",(function(){return F})),n.d(e,"l",(function(){return U})),n.d(e,"o",(function(){return N})),n.d(e,"c",(function(){return Y})),n.d(e,"m",(function(){return tt})),n.d(e,"h",(function(){return $})),n.d(e,"e",(function(){return V})),n.d(e,"d",(function(){return H}))},function(t,e,n){var r=n(274);function i(e,n,o){return"undefined"!=typeof Reflect&&Reflect.get?t.exports=i=Reflect.get:t.exports=i=function(t,e,n){var i=r(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(n):o.value}},i(e,n,o||e)}t.exports=i},function(t,e,n){var r=n(271),i=n(272),o=n(273);t.exports=function(t,e){return r(t)||i(t,e)||o()}},function(t,e,n){"use strict";function r(t,e){if(!t)throw new Error(e||"luma.gl: assertion failed.")}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return i})),n.d(e,"c",(function(){return o}));var r=1e-6,i="undefined"!=typeof Float32Array?Float32Array:Array,o=Math.random;Math.PI;Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)})},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"d",(function(){return o})),n.d(e,"e",(function(){return a})),n.d(e,"b",(function(){return s})),n.d(e,"c",(function(){return u}));var r=n(21),i={DEFAULT:-1,LNGLAT:1,METER_OFFSETS:2,LNGLAT_OFFSETS:3,CARTESIAN:0};Object.defineProperty(i,"IDENTITY",{get:function(){return r.a.deprecated("COORDINATE_SYSTEM.IDENTITY","COORDINATE_SYSTEM.CARTESIAN")(),0}});var o={WEB_MERCATOR:1,GLOBE:2,WEB_MERCATOR_AUTO_OFFSET:4,IDENTITY:0},a={common:0,meters:1,pixels:2},s={click:{handler:"onClick"},panstart:{handler:"onDragStart"},panmove:{handler:"onDrag"},panend:{handler:"onDragEnd"}},u={DRAW:"draw",MASK:"mask"}},function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"e",(function(){return a})),n.d(e,"f",(function(){return s})),n.d(e,"j",(function(){return u})),n.d(e,"i",(function(){return c})),n.d(e,"h",(function(){return l})),n.d(e,"c",(function(){return h})),n.d(e,"a",(function(){return f})),n.d(e,"g",(function(){return p})),n.d(e,"d",(function(){return d}));n(144);const r=1/Math.PI*180,i=1/180*Math.PI,o={EPSILON:1e-12,debug:!1,precision:4,printTypes:!1,printDegrees:!1,printRowMajor:!0};function a(t,{precision:e=o.precision}={}){return t=function(t){return Math.round(t/o.EPSILON)*o.EPSILON}(t),"".concat(parseFloat(t.toPrecision(e)))}function s(t){return Array.isArray(t)||ArrayBuffer.isView(t)&&!(t instanceof DataView)}function u(t){return l(t)}function c(t){return h(t)}function l(t,e){return A(t,t=>t*i,e)}function h(t,e){return A(t,t=>t*r,e)}function f(t,e,n){return A(t,t=>Math.max(e,Math.min(n,t)))}function p(t,e,n){return s(t)?t.map((t,r)=>p(t,e[r],n)):n*e+(1-n)*t}function d(t,e,n){const r=o.EPSILON;n&&(o.EPSILON=n);try{if(t===e)return!0;if(s(t)&&s(e)){if(t.length!==e.length)return!1;for(let n=0;n0&&void 0!==arguments[0]?arguments[0]:{};u()(this,t),f()(this,"type","point");var n=e.color,r=void 0===n?g:n,i=e.intensity,o=void 0===i?1:i,a=e.position,s=void 0===a?y:a;this.id=e.id||"point-".concat(v++),this.color=r,this.intensity=o,this.type="point",this.position=s,this.attenuation=b(e),this.projectedLight=A({},this)}return l()(t,[{key:"getProjectedLight",value:function(t){var e=t.layer,n=this.projectedLight,i=e.context.viewport,o=e.props,a=o.coordinateSystem,s=o.coordinateOrigin,u=Object(p.b)(this.position,{viewport:i,coordinateSystem:a,coordinateOrigin:s,fromCoordinateSystem:i.isGeospatial?r.a.LNGLAT:r.a.CARTESIAN,fromCoordinateOrigin:[0,0,0]});return n.color=this.color,n.intensity=this.intensity,n.position=u,n}}]),t}();function b(t){return t.attenuation?t.attenuation:"intensity"in t?[0,0,t.intensity||0]:m}var x=n(5),w=n.n(x),E=n(6),O=n.n(E),S=n(1),T=n.n(S),C=n(124);function P(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=T()(t);if(e){var i=T()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return O()(this,n)}}var M=function(t){w()(n,t);var e=P(n);function n(){return u()(this,n),e.apply(this,arguments)}return l()(n,[{key:"getProjectedLight",value:function(t){var e=t.layer,n=this.projectedLight,r=e.context.viewport,i=e.props,o=i.coordinateSystem,a=i.coordinateOrigin,s=i.modelMatrix,u=Object(C.b)({viewport:r,modelMatrix:s,coordinateSystem:o,coordinateOrigin:a}).project_uCameraPosition;return n.color=this.color,n.intensity=this.intensity,n.position=u,n}}]),n}(_),I=n(9),B=n.n(I);const R=Math.PI/180,k=23.4397*R;function D(t,e,n){const r=R*-n,i=R*e,o=function(t){return function(t){return("number"==typeof t?t:t.getTime())/864e5-.5+2440588}(t)-2451545}(t),a=function(t){const e=function(t){const e=t,n=R*(1.9148*Math.sin(e)+.02*Math.sin(2*e)+3e-4*Math.sin(3*e));return e+n+102.9372*R+Math.PI}((n=t,R*(357.5291+.98560028*n)));var n;return{declination:F(e,0),rightAscension:j(e,0)}}(o),s=function(t,e){return R*(280.147+360.9856235*t)-e}(o,r)-a.rightAscension;return{azimuth:z(s,i,a.declination),altitude:U(s,i,a.declination)}}function L(t,e,n){const{azimuth:r,altitude:i}=D(t,e,n);return[Math.sin(r)*Math.cos(i),Math.cos(r)*Math.cos(i),-Math.sin(i)]}function j(t,e){const n=t;return Math.atan2(Math.sin(n)*Math.cos(k)-Math.tan(e)*Math.sin(k),Math.cos(n))}function F(t,e){const n=t;return Math.asin(Math.sin(e)*Math.cos(k)+Math.cos(e)*Math.sin(k)*Math.sin(n))}function z(t,e,n){const r=t,i=e,o=n;return Math.atan2(Math.sin(r),Math.cos(r)*Math.sin(i)-Math.tan(o)*Math.cos(i))}function U(t,e,n){const r=t,i=e,o=n;return Math.asin(Math.sin(i)*Math.sin(o)+Math.cos(i)*Math.cos(o)*Math.cos(r))}function N(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=T()(t);if(e){var i=T()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return O()(this,n)}}var G=function(t){w()(n,t);var e=N(n);function n(t){var r;return u()(this,n),(r=e.call(this,t)).timestamp=t.timestamp,r}return l()(n,[{key:"getProjectedLight",value:function(t){var e=t.layer.context.viewport;if(e.resolution&&e.resolution>0){var n=L(this.timestamp,0,0),r=B()(n,3),i=r[0],o=r[1],a=r[2];this.direction=[i,-a,o]}else{var s=e.latitude,u=e.longitude;this.direction=L(this.timestamp,s,u)}return this}}]),n}(a.a),V=n(186),H=n(60);const W=[-1,-1,1,-1,-1,1,1,1];class q extends V.a{constructor(t,e){const n=W.map(t=>-1===t?0:t);super(t,Object.assign({},e,{vs:"attribute vec2 aClipSpacePosition;\nattribute vec2 aTexCoord;\nattribute vec2 aCoordinate;\n\nvarying vec2 position;\nvarying vec2 coordinate;\nvarying vec2 uv;\n\nvoid main(void) {\n gl_Position = vec4(aClipSpacePosition, 0., 1.);\n position = aClipSpacePosition;\n coordinate = aCoordinate;\n uv = aTexCoord;\n}\n",geometry:new H.a({drawMode:5,vertexCount:4,attributes:{aClipSpacePosition:{size:2,value:new Float32Array(W)},aTexCoord:{size:2,value:new Float32Array(n)},aCoordinate:{size:2,value:new Float32Array(n)}}})})),this.setVertexCount(4)}}var X=n(7),Z=n(188);function J(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=T()(t);if(e){var i=T()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return O()(this,n)}}var Q=function(t){w()(n,t);var e=J(n);function n(t,r){var i;u()(this,n),i=e.call(this,t,r);var o=r.module,a=r.fs,s=r.id;return i.model=new q(t,{id:s,fs:a,modules:[o]}),i}return l()(n,[{key:"render",value:function(t){var e=this,n=this.gl;Object(X.n)(n,{viewport:[0,0,n.drawingBufferWidth,n.drawingBufferHeight]}),Object(X.o)(n,{framebuffer:t.outputBuffer,clearColor:[0,0,0,0]},(function(){return e._renderPass(n,t)}))}},{key:"delete",value:function(){this.model.delete(),this.model=null}},{key:"_renderPass",value:function(t,e){var n=e.inputBuffer;Object(Z.a)(t,{color:!0}),this.model.draw({moduleSettings:this.props.moduleSettings,uniforms:{texture:n,texSize:[n.width,n.height]},parameters:{depthWrite:!1,depthTest:!1}})}}]),n}(n(178).a),K=n(205);function Y(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return $(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function $(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:{};u()(this,t),this.id="".concat(e.name,"-pass"),this.props=n,Object(K.b)(e),this.module=e}return l()(t,[{key:"preRender",value:function(){}},{key:"postRender",value:function(t,e){var n=this.passes||function(t,e,n,r){if(!e.passes){var i=rt(e);return[new Q(t,{id:n,module:e,fs:i,moduleSettings:r})]}return e.passes.map((function(i,o){var a=rt(e,i),s="".concat(n,"-").concat(o);return new Q(t,{id:s,module:e,fs:a,moduleSettings:r})}))}(t,this.module,this.id,this.props);this.passes=n;for(var r=e.target,i=e.inputBuffer,o=e.swapBuffer,a=0;a1&&void 0!==arguments[1]?arguments[1]:t;if(e.filter){var n="string"==typeof e.filter?e.filter:"".concat(t.name,"_filterColor");return et(n)}if(e.sampler){var r="string"==typeof e.sampler?e.sampler:"".concat(t.name,"_sampleColor");return nt(r)}return null}var it=n(73),ot=n(199),at=n(170),st=n(165),ut=n(164),ct=n(198),lt=n(172),ht=n(42),ft=n(86),pt=n(163),dt=n(78),At=n(19);function gt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function mt(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{},n=e.topLeft,r=void 0===n||n,i=B()(t,3),o=i[0],a=i[1],s=i[2],u=void 0===s?this.projectedCenter[2]:s,c=r?a:this.height-a,l=Object(At.n)([o,c,u],this.pixelUnprojectionMatrix),h=B()(l,3),f=h[0],p=h[1],d=h[2];return[f,p,d]}},{key:"panByPosition",value:function(t,e){var n=this.project(t),r=[this.width/2+n[0]-e[0],this.height/2+n[1]-e[1],this.projectedCenter[2]];return{target:this.unproject(r)}}}]),n}(ht.a),xt=n(159);function wt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Et=n(84),Ot=n(13),St=n(25);class Tt{constructor({phi:t=0,theta:e=0,radius:n=1,bearing:r,pitch:i,altitude:o,radiusScale:a=6371e3}={}){wt(this,"phi",void 0),wt(this,"theta",void 0),wt(this,"radius",void 0),wt(this,"radiusScale",void 0),this.phi=t,this.theta=e,this.radius=n||o||1,this.radiusScale=a||1,void 0!==r&&(this.bearing=r),void 0!==i&&(this.pitch=i),this.check()}toString(){return this.formatString(Ot.b)}formatString({printTypes:t=!1}){const e=Ot.e;return"".concat(t?"Spherical":"","[rho:").concat(e(this.radius),",theta:").concat(e(this.theta),",phi:").concat(e(this.phi),"]")}equals(t){return Object(Ot.d)(this.radius,t.radius)&&Object(Ot.d)(this.theta,t.theta)&&Object(Ot.d)(this.phi,t.phi)}exactEquals(t){return this.radius===t.radius&&this.theta===t.theta&&this.phi===t.phi}get bearing(){return 180-Object(Ot.c)(this.phi)}set bearing(t){this.phi=Math.PI-Object(Ot.h)(t)}get pitch(){return Object(Ot.c)(this.theta)}set pitch(t){this.theta=Object(Ot.h)(t)}get longitude(){return Object(Ot.c)(this.phi)}get latitude(){return Object(Ot.c)(this.theta)}get lng(){return Object(Ot.c)(this.phi)}get lat(){return Object(Ot.c)(this.theta)}get z(){return(this.radius-1)*this.radiusScale}set(t,e,n){return this.radius=t,this.phi=e,this.theta=n,this.check()}clone(){return(new Tt).copy(this)}copy(t){return this.radius=t.radius,this.phi=t.phi,this.theta=t.theta,this.check()}fromLngLatZ([t,e,n]){return this.radius=1+n/this.radiusScale,this.phi=Object(Ot.h)(e),this.theta=Object(Ot.h)(t),this.check()}fromVector3(t){return this.radius=St.h(t),this.radius>0&&(this.theta=Math.atan2(t[0],t[1]),this.phi=Math.acos(Object(Ot.a)(t[2]/this.radius,-1,1))),this.check()}toVector3(){return new Et.a(0,0,this.radius).rotateX({radians:this.theta}).rotateZ({radians:this.phi})}makeSafe(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this}check(){if(!(Number.isFinite(this.phi)&&Number.isFinite(this.theta)&&this.radius>0))throw new Error("SphericalCoordinates: some fields set to invalid numbers");return this}}function Ct(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Pt(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:20,e=this.getDirection(!0);return this._move(e.rotateZ({radians:Math.PI/2}),t)}},{key:"moveRight",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20,e=this.getDirection(!0);return this._move(e.rotateZ({radians:-Math.PI/2}),t)}},{key:"moveUp",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20,e=this.getDirection(!0);return this._move(e,t)}},{key:"moveDown",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20,e=this.getDirection(!0);return this._move(e.negate(),t)}},{key:"rotateLeft",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:15;return this._getUpdatedState({bearing:this.getViewportProps().bearing-t})}},{key:"rotateRight",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:15;return this._getUpdatedState({bearing:this.getViewportProps().bearing+t})}},{key:"rotateUp",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;return this._getUpdatedState({pitch:this.getViewportProps().pitch+t})}},{key:"rotateDown",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;return this._getUpdatedState({pitch:this.getViewportProps().pitch-t})}},{key:"zoomIn",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2;return this.zoom({scale:t})}},{key:"zoomOut",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2;return this.zoom({scale:1/t})}},{key:"shortestPathFrom",value:function(t){var e=t.getViewportProps(),n=qt({},this.getViewportProps()),r=n.bearing,i=n.longitude;return Math.abs(r-e.bearing)>180&&(n.bearing=r<0?r+360:r-360),null!==i&&null!==e.longitude&&Math.abs(i-e.longitude)>180&&(n.longitude=i<0?i+360:i-360),n}},{key:"_move",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.getViewportProps().position,r=t.scale(e);return this._getUpdatedState({position:new Et.a(n).add(r)})}},{key:"getDirection",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=new Tt({bearing:this.getViewportProps().bearing,pitch:t?90:90+this.getViewportProps().pitch}),n=e.toVector3().normalize();return n}},{key:"_getUpdatedState",value:function(t){return new n(qt(qt(qt({},this.getViewportProps()),this.getState()),t))}},{key:"applyConstraints",value:function(t){var e=t.pitch,n=t.maxPitch,r=t.minPitch,i=t.longitude,o=t.bearing;return t.pitch=Object(Ot.a)(e,r,n),null!==i&&(i<-180||i>180)&&(t.longitude=Object(Vt.e)(i+180,360)-180),(o<-180||o>180)&&(t.bearing=Object(Vt.e)(o+180,360)-180),t}}]),n}(Gt.a),Jt=function(t){w()(n,t);var e=Xt(n);function n(){var t;u()(this,n);for(var r=arguments.length,i=new Array(r),o=0;o0&&void 0!==arguments[0]?arguments[0]:{};return u()(this,n),(t=e.call(this,r)).props.orbitAxis=r.orbitAxis||"Z",t}return l()(n,[{key:"ViewportType",get:function(){return bt}},{key:"ControllerType",get:function(){return Yt.b}}]),n}(jt.a);f()(te,"displayName","OrbitView");var ee=n(158),ne=n(8),re=n.n(ne),ie=n(113);function oe(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=T()(t);if(e){var i=T()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return O()(this,n)}}var ae=function(t){w()(n,t);var e=oe(n);function n(){return u()(this,n),e.apply(this,arguments)}return l()(n,[{key:"applyConstraints",value:function(t){var e=t.maxZoom,n=t.minZoom,r=t.zoom;t.zoom=Object(Ot.a)(r,n,e);var i=t.longitude,o=t.latitude;return(i<-180||i>180)&&(t.longitude=Object(Vt.e)(i+180,360)-180),t.latitude=Object(Ot.a)(o,-89,89),t}}]),n}(ie.a),se=function(t){w()(n,t);var e=oe(n);function n(){var t;u()(this,n);for(var r=arguments.length,i=new Array(r),o=0;o=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Ae(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:{};return u()(this,n),(t=e.call(this,{compare:["longitude","latitude","zoom","bearing","pitch"],extract:["width","height","longitude","latitude","zoom","bearing","pitch"],required:["width","height","latitude","longitude","zoom"]})).opts=me(me({},_e),r),t}return l()(n,[{key:"interpolateProps",value:function(t,e,n){var r,i=Object(At.d)(t,e,n,this.opts),o=de(ve);try{for(o.s();!(r=o.n()).done;){var a=r.value;i[a]=Object(Ot.g)(t[a]||0,e[a]||0,n)}}catch(t){o.e(t)}finally{o.f()}return i}},{key:"getDuration",value:function(t,e){var n=e.transitionDuration;return"auto"===n&&(n=Object(At.h)(t,e,this.opts)),n}}]),n}(pe.a),xe=n(21),we=n(29),Ee=n(52),Oe=n(219),Se=n(67),Te=n(161),Ce=n(80),Pe=n(162),Me=n(138);n.d(e,"COORDINATE_SYSTEM",(function(){return r.a})),n.d(e,"OPERATION",(function(){return r.c})),n.d(e,"UNIT",(function(){return r.e})),n.d(e,"LightingEffect",(function(){return i.a})),n.d(e,"AmbientLight",(function(){return o.a})),n.d(e,"DirectionalLight",(function(){return a.a})),n.d(e,"PointLight",(function(){return _})),n.d(e,"_CameraLight",(function(){return M})),n.d(e,"_SunLight",(function(){return G})),n.d(e,"PostProcessEffect",(function(){return tt})),n.d(e,"_LayersPass",(function(){return it.a})),n.d(e,"Deck",(function(){return ot.a})),n.d(e,"LayerManager",(function(){return at.a})),n.d(e,"AttributeManager",(function(){return st.a})),n.d(e,"Layer",(function(){return ut.a})),n.d(e,"CompositeLayer",(function(){return ct.a})),n.d(e,"DeckRenderer",(function(){return lt.a})),n.d(e,"Viewport",(function(){return ht.a})),n.d(e,"WebMercatorViewport",(function(){return ft.a})),n.d(e,"_GlobeViewport",(function(){return pt.a})),n.d(e,"OrbitViewport",(function(){return bt})),n.d(e,"OrthographicViewport",(function(){return xt.a})),n.d(e,"FirstPersonViewport",(function(){return It})),n.d(e,"picking",(function(){return Bt.a})),n.d(e,"project",(function(){return Rt.a})),n.d(e,"project32",(function(){return kt.a})),n.d(e,"gouraudLighting",(function(){return Dt.a})),n.d(e,"phongLighting",(function(){return Dt.b})),n.d(e,"shadow",(function(){return Lt.a})),n.d(e,"View",(function(){return jt.a})),n.d(e,"MapView",(function(){return Ft.a})),n.d(e,"FirstPersonView",(function(){return Kt})),n.d(e,"OrbitView",(function(){return te})),n.d(e,"OrthographicView",(function(){return ee.a})),n.d(e,"_GlobeView",(function(){return ce})),n.d(e,"Controller",(function(){return Nt.a})),n.d(e,"MapController",(function(){return ie.b})),n.d(e,"_GlobeController",(function(){return se})),n.d(e,"FirstPersonController",(function(){return Jt})),n.d(e,"OrbitController",(function(){return Yt.b})),n.d(e,"OrthographicController",(function(){return le.a})),n.d(e,"LayerExtension",(function(){return he.a})),n.d(e,"TRANSITION_EVENTS",(function(){return fe.a})),n.d(e,"TransitionInterpolator",(function(){return pe.a})),n.d(e,"LinearInterpolator",(function(){return Ht.a})),n.d(e,"FlyToInterpolator",(function(){return be})),n.d(e,"log",(function(){return xe.a})),n.d(e,"assert",(function(){return we.a})),n.d(e,"createIterable",(function(){return Ee.a})),n.d(e,"fp64LowPart",(function(){return Vt.b})),n.d(e,"Tesselator",(function(){return Oe.a})),n.d(e,"_fillArray",(function(){return Se.a})),n.d(e,"_flatten",(function(){return Se.b})),n.d(e,"_count",(function(){return Te.a})),n.d(e,"_memoize",(function(){return Ce.a})),n.d(e,"_mergeShaders",(function(){return Pe.a})),n.d(e,"_compareProps",(function(){return Me.a}))},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t){var e=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===r(e)?e:String(e)}function o(t,e,n){return(e=i(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"a",(function(){return o}))},,function(t,e,n){"use strict";var r=n(36);function i(t,e){const n=Object(r.n)([],e,t);return Object(r.k)(n,n,1/n[3]),n}function o(t,e){const n=t%e;return n<0?e+n:n}function a(t,e,n){return tn?n:t}const s=Math.log2||function(t){return Math.log(t)*Math.LOG2E};var u=n(26),c=n(34),l=n(25);function h(t,e){if(!t)throw new Error(e||"@math.gl/web-mercator: assertion failed.")}const f=Math.PI,p=f/4,d=f/180,A=180/f,g=1.5;function m(t){return Math.pow(2,t)}function y(t){return s(t)}function v(t){const[e,n]=t;h(Number.isFinite(e)),h(Number.isFinite(n)&&n>=-90&&n<=90,"invalid latitude");const r=n*d;return[512*(e*d+f)/(2*f),512*(f+Math.log(Math.tan(p+.5*r)))/(2*f)]}function _(t){const[e,n]=t,r=e/512*(2*f)-f,i=2*(Math.atan(Math.exp(n/512*(2*f)-f))-p);return[r*A,i*A]}function b(t){const{latitude:e}=t;h(Number.isFinite(e));return y(4003e4*Math.cos(e*d))-9}function x(t){return 512/4003e4/Math.cos(t*d)}function w(t){const{latitude:e,longitude:n,highPrecision:r=!1}=t;h(Number.isFinite(e)&&Number.isFinite(n));const i=Math.cos(e*d),o=512/360/i,a=512/4003e4/i,s={unitsPerMeter:[a,a,a],metersPerUnit:[1/a,1/a,1/a],unitsPerDegree:[512/360,o,a],degreesPerUnit:[.703125,1/o,1/a]};if(r){const t=d*Math.tan(e*d)/i,n=512/360*t/2,r=512/4003e4*t,u=r/o*a;s.unitsPerDegree2=[0,n,r],s.unitsPerMeter2=[u,0,u]}return s}function E(t,e){const[n,r,i]=t,[o,a,s]=e,{unitsPerMeter:u,unitsPerMeter2:c}=w({longitude:n,latitude:r,highPrecision:!0}),l=v(t);l[0]+=o*(u[0]+c[0]*a),l[1]+=a*(u[1]+c[1]*a);const h=_(l),f=(i||0)+(s||0);return Number.isFinite(i)||Number.isFinite(s)?[h[0],h[1],f]:h}function O(t){const{height:e,pitch:n,bearing:r,altitude:i,scale:o,center:a}=t,s=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];u.p(s,s,[0,0,-i]),u.l(s,s,-n*d),u.n(s,s,r*d);const c=o/e;return u.o(s,s,[c,c,c]),a&&u.p(s,s,l.j([],a)),s}function S(t){const{width:e,height:n,altitude:r,pitch:i=0,offset:o,center:s,scale:u,nearZMultiplier:c=1,farZMultiplier:l=1}=t;let{fovy:h=T(g)}=t;void 0!==r&&(h=T(r));const f=h*d,p=i*d,A=C(h);let m=A;s&&(m+=s[2]*u/Math.cos(p)/n);const y=f*(.5+(o?o[1]:0)/n),v=Math.sin(y)*m/Math.sin(a(Math.PI/2-p-y,.01,Math.PI-.01)),_=Math.sin(p)*v+m,b=10*m;return{fov:f,aspect:e/n,focalDistance:A,near:c,far:Math.min(_*l,b)}}function T(t){return 2*Math.atan(.5/t)*A}function C(t){return.5/Math.tan(.5*t*d)}function P(t,e){const[n,r,o=0]=t;return h(Number.isFinite(n)&&Number.isFinite(r)&&Number.isFinite(o)),i(e,[n,r,o,1])}function M(t,e,n=0){const[r,o,a]=t;if(h(Number.isFinite(r)&&Number.isFinite(o),"invalid pixel coordinate"),Number.isFinite(a)){return i(e,[r,o,a,1])}const s=i(e,[r,o,0,1]),u=i(e,[r,o,1,1]),l=s[2],f=u[2],p=l===f?0:((n||0)-l)/(f-l);return c.c([],s,u,p)}function I(t){const{width:e,height:n,bounds:r,minExtent:i=0,maxZoom:o=24,offset:u=[0,0]}=t,[[c,l],[f,p]]=r,d=function(t=0){if("number"==typeof t)return{top:t,bottom:t,left:t,right:t};return h(Number.isFinite(t.top)&&Number.isFinite(t.bottom)&&Number.isFinite(t.left)&&Number.isFinite(t.right)),t}(t.padding),A=v([c,a(p,-85.051129,85.051129)]),g=v([f,a(l,-85.051129,85.051129)]),m=[Math.max(Math.abs(g[0]-A[0]),i),Math.max(Math.abs(g[1]-A[1]),i)],y=[e-d.left-d.right-2*Math.abs(u[0]),n-d.top-d.bottom-2*Math.abs(u[1])];h(y[0]>0&&y[1]>0);const b=y[0]/m[0],x=y[1]/m[1],w=(d.right-d.left)/2/b,E=(d.bottom-d.top)/2/x,O=_([(g[0]+A[0])/2+w,(g[1]+A[1])/2+E]),S=Math.min(o,s(Math.abs(Math.min(b,x))));return h(Number.isFinite(S)),{longitude:O[0],latitude:O[1],zoom:S}}const B=Math.PI/180;function R(t,e=0){const{width:n,height:r,unproject:i}=t,o={targetZ:e},a=i([0,r],o),s=i([n,r],o);let u,c;return(t.fovy?.5*t.fovy*B:Math.atan(.5/t.altitude))>(90-t.pitch)*B-.01?(u=k(t,0,e),c=k(t,n,e)):(u=i([0,0],o),c=i([n,0],o)),[a,s,c,u]}function k(t,e,n){const{pixelUnprojectionMatrix:r}=t,o=i(r,[e,0,1,1]),a=i(r,[e,t.height,1,1]),s=(n*t.distanceScales.unitsPerMeter[2]-o[2])/(a[2]-o[2]),u=_(c.c([],o,a,s));return u.push(n),u}function D(t){const{width:e,height:n,pitch:r=0}=t;let{longitude:i,latitude:a,zoom:u,bearing:c=0}=t;(i<-180||i>180)&&(i=o(i+180,360)-180),(c<-180||c>180)&&(c=o(c+180,360)-180);const l=s(n/512);if(u<=l)u=l,a=0;else{const t=n/2/Math.pow(2,u),e=_([0,t])[1];if(ae&&(a=e)}}return{width:e,height:n,longitude:i,latitude:a,zoom:u,pitch:r,bearing:c}}const L=["longitude","latitude","zoom"],j={curve:1.414,speed:1.2};function F(t,e,n,r){const{startZoom:i,startCenterXY:o,uDelta:a,w0:s,u1:u,S:l,rho:h,rho2:f,r0:p}=U(t,e,r);if(u<.01){const r={};for(const i of L){const o=t[i],a=e[i];r[i]=(d=n)*a+(1-d)*o}return r}var d;const A=n*l,g=Math.cosh(p)/Math.cosh(p+h*A),m=s*((Math.cosh(p)*Math.tanh(p+h*A)-Math.sinh(p))/f)/u,v=i+y(1/g),b=c.e([],a,m);c.a(b,b,o);const x=_(b);return{longitude:x[0],latitude:x[1],zoom:v}}function z(t,e,n){const r={...j,...n},{screenSpeed:i,speed:o,maxDuration:a}=r,{S:s,rho:u}=U(t,e,r),c=1e3*s;let l;return l=Number.isFinite(i)?c/(i/u):c/o,Number.isFinite(a)&&l>a?0:l}function U(t,e,n){const r=(n=Object.assign({},j,n)).curve,i=t.zoom,o=[t.longitude,t.latitude],a=m(i),s=e.zoom,u=[e.longitude,e.latitude],l=m(s-i),h=v(o),f=v(u),p=c.f([],f,h),d=Math.max(t.width,t.height),A=d/l,g=c.b(p)*a,y=Math.max(g,.01),_=r*r,b=(A*A-d*d+_*_*y*y)/(2*d*_*y),x=(A*A-d*d-_*_*y*y)/(2*A*_*y),w=Math.log(Math.sqrt(b*b+1)-b),E=Math.log(Math.sqrt(x*x+1)-x);return{startZoom:i,startCenterXY:h,uDelta:p,w0:d,u1:g,S:(E-w)/r,rho:r,rho2:_,r0:w,r1:E}}n.d(e,"f",(function(){return R})),n.d(e,"c",(function(){return I})),n.d(e,"m",(function(){return D})),n.d(e,"d",(function(){return F})),n.d(e,"h",(function(){return z})),n.d(e,"l",(function(){return v})),n.d(e,"p",(function(){return _})),n.d(e,"q",(function(){return P})),n.d(e,"n",(function(){return M})),n.d(e,"b",(function(){return T})),n.d(e,"e",(function(){return C})),n.d(e,"i",(function(){return b})),n.d(e,"o",(function(){return x})),n.d(e,"g",(function(){return w})),n.d(e,"a",(function(){return E})),n.d(e,"k",(function(){return O})),n.d(e,"j",(function(){return S}))},function(t,e,n){"use strict";var r={};function i(t){const e=t&&t.lastIndexOf("/");return e>=0?t.substr(e+1):""}function o(t){const e=t&&t.lastIndexOf("/");return e>=0?t.substr(0,e):""}function a(...t){return(t=t.map((e,n)=>(n&&(e=e.replace(new RegExp("^".concat("/")),"")),n!==t.length-1&&(e=e.replace(new RegExp("".concat("/","$")),"")),e))).join("/")}n.r(r),n.d(r,"filename",(function(){return i})),n.d(r,"dirname",(function(){return o})),n.d(r,"join",(function(){return a}));n(149);var s=n(216);n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return s}))},function(t,e,n){"use strict";var r=n(298);e.a=new r.a({id:"deck"})},function(t,e,n){"use strict";n.d(e,"f",(function(){return o})),n.d(e,"h",(function(){return a})),n.d(e,"g",(function(){return s})),n.d(e,"d",(function(){return u})),n.d(e,"a",(function(){return c})),n.d(e,"e",(function(){return l})),n.d(e,"j",(function(){return h})),n.d(e,"b",(function(){return f})),n.d(e,"c",(function(){return p})),n.d(e,"i",(function(){return d})),n.d(e,"k",(function(){return A}));const r=t=>"boolean"==typeof t,i=t=>"function"==typeof t,o=t=>null!==t&&"object"==typeof t,a=t=>o(t)&&t.constructor==={}.constructor,s=t=>o(t)&&i(t.then),u=t=>t&&"function"==typeof t[Symbol.iterator],c=t=>t&&"function"==typeof t[Symbol.asyncIterator],l=t=>t&&i(t.next),h=t=>"undefined"!=typeof Response&&t instanceof Response||t&&t.arrayBuffer&&t.text&&t.json,f=t=>"undefined"!=typeof Blob&&t instanceof Blob,p=t=>t&&"object"==typeof t&&t.isBuffer,d=t=>(t=>"undefined"!=typeof ReadableStream&&t instanceof ReadableStream||o(t)&&i(t.tee)&&i(t.cancel)&&i(t.getReader))(t)||(t=>o(t)&&i(t.read)&&i(t.pipe)&&r(t.readable))(t),A=t=>(t=>o(t)&&i(t.abort)&&i(t.getWriter))(t)||(t=>o(t)&&i(t.end)&&i(t.write)&&r(t.writable))(t)},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return o}));var r=n(13);function i(t){if(!Number.isFinite(t))throw new Error("Invalid number ".concat(t));return t}function o(t,e,n=""){if(r.b.debug&&!function(t,e){if(t.length!==e)return!1;for(let e=0;e0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o,t}function l(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function h(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],s=n[1],u=n[2];return t[0]=i*u-o*s,t[1]=o*a-r*u,t[2]=r*s-i*a,t}function f(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[3]*r+n[7]*i+n[11]*o+n[15];return a=a||1,t[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])/a,t[1]=(n[1]*r+n[5]*i+n[9]*o+n[13])/a,t[2]=(n[2]*r+n[6]*i+n[10]*o+n[14])/a,t}function p(t,e,n){var r=e[0],i=e[1],o=e[2];return t[0]=r*n[0]+i*n[3]+o*n[6],t[1]=r*n[1]+i*n[4]+o*n[7],t[2]=r*n[2]+i*n[5]+o*n[8],t}function d(t,e,n){var r=n[0],i=n[1],o=n[2],a=n[3],s=e[0],u=e[1],c=e[2],l=i*c-o*u,h=o*s-r*c,f=r*u-i*s,p=i*f-o*h,d=o*l-r*f,A=r*h-i*l,g=2*a;return l*=g,h*=g,f*=g,p*=2,d*=2,A*=2,t[0]=s+l+p,t[1]=u+h+d,t[2]=c+f+A,t}function A(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0],o[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),o[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function g(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),o[1]=i[1],o[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function m(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),o[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),o[2]=i[2],t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function y(t,e){var n=t[0],r=t[1],i=t[2],o=e[0],a=e[1],s=e[2],u=Math.sqrt(n*n+r*r+i*i)*Math.sqrt(o*o+a*a+s*s),c=u&&l(t,e)/u;return Math.acos(Math.min(Math.max(c,-1),1))}var v,_=function(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t},b=o;v=i()},function(t,e,n){"use strict";n.d(e,"q",(function(){return i})),n.d(e,"f",(function(){return o})),n.d(e,"a",(function(){return a})),n.d(e,"h",(function(){return s})),n.d(e,"p",(function(){return u})),n.d(e,"o",(function(){return c})),n.d(e,"k",(function(){return l})),n.d(e,"l",(function(){return h})),n.d(e,"m",(function(){return f})),n.d(e,"n",(function(){return p})),n.d(e,"e",(function(){return d})),n.d(e,"c",(function(){return A})),n.d(e,"d",(function(){return g})),n.d(e,"j",(function(){return m})),n.d(e,"i",(function(){return y})),n.d(e,"g",(function(){return v})),n.d(e,"b",(function(){return _}));var r=n(11);function i(t,e){if(t===e){var n=e[1],r=e[2],i=e[3],o=e[6],a=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=o,t[11]=e[14],t[12]=i,t[13]=a,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function o(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=e[9],f=e[10],p=e[11],d=e[12],A=e[13],g=e[14],m=e[15],y=n*s-r*a,v=n*u-i*a,_=n*c-o*a,b=r*u-i*s,x=r*c-o*s,w=i*c-o*u,E=l*A-h*d,O=l*g-f*d,S=l*m-p*d,T=h*g-f*A,C=h*m-p*A,P=f*m-p*g,M=y*P-v*C+_*T+b*S-x*O+w*E;return M?(M=1/M,t[0]=(s*P-u*C+c*T)*M,t[1]=(i*C-r*P-o*T)*M,t[2]=(A*w-g*x+m*b)*M,t[3]=(f*x-h*w-p*b)*M,t[4]=(u*S-a*P-c*O)*M,t[5]=(n*P-i*S+o*O)*M,t[6]=(g*_-d*w-m*v)*M,t[7]=(l*w-f*_+p*v)*M,t[8]=(a*C-s*S+c*E)*M,t[9]=(r*S-n*C-o*E)*M,t[10]=(d*x-A*_+m*y)*M,t[11]=(h*_-l*x-p*y)*M,t[12]=(s*O-a*T-u*E)*M,t[13]=(n*T-r*O+i*E)*M,t[14]=(A*v-d*b-g*y)*M,t[15]=(l*b-h*v+f*y)*M,t):null}function a(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],u=t[7],c=t[8],l=t[9],h=t[10],f=t[11],p=t[12],d=t[13],A=t[14],g=t[15];return(e*a-n*o)*(h*g-f*A)-(e*s-r*o)*(l*g-f*d)+(e*u-i*o)*(l*A-h*d)+(n*s-r*a)*(c*g-f*p)-(n*u-i*a)*(c*A-h*p)+(r*u-i*s)*(c*d-l*p)}function s(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=e[9],p=e[10],d=e[11],A=e[12],g=e[13],m=e[14],y=e[15],v=n[0],_=n[1],b=n[2],x=n[3];return t[0]=v*r+_*s+b*h+x*A,t[1]=v*i+_*u+b*f+x*g,t[2]=v*o+_*c+b*p+x*m,t[3]=v*a+_*l+b*d+x*y,v=n[4],_=n[5],b=n[6],x=n[7],t[4]=v*r+_*s+b*h+x*A,t[5]=v*i+_*u+b*f+x*g,t[6]=v*o+_*c+b*p+x*m,t[7]=v*a+_*l+b*d+x*y,v=n[8],_=n[9],b=n[10],x=n[11],t[8]=v*r+_*s+b*h+x*A,t[9]=v*i+_*u+b*f+x*g,t[10]=v*o+_*c+b*p+x*m,t[11]=v*a+_*l+b*d+x*y,v=n[12],_=n[13],b=n[14],x=n[15],t[12]=v*r+_*s+b*h+x*A,t[13]=v*i+_*u+b*f+x*g,t[14]=v*o+_*c+b*p+x*m,t[15]=v*a+_*l+b*d+x*y,t}function u(t,e,n){var r,i,o,a,s,u,c,l,h,f,p,d,A=n[0],g=n[1],m=n[2];return e===t?(t[12]=e[0]*A+e[4]*g+e[8]*m+e[12],t[13]=e[1]*A+e[5]*g+e[9]*m+e[13],t[14]=e[2]*A+e[6]*g+e[10]*m+e[14],t[15]=e[3]*A+e[7]*g+e[11]*m+e[15]):(r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=e[9],p=e[10],d=e[11],t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=u,t[6]=c,t[7]=l,t[8]=h,t[9]=f,t[10]=p,t[11]=d,t[12]=r*A+s*g+h*m+e[12],t[13]=i*A+u*g+f*m+e[13],t[14]=o*A+c*g+p*m+e[14],t[15]=a*A+l*g+d*m+e[15]),t}function c(t,e,n){var r=n[0],i=n[1],o=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function l(t,e,n,i){var o,a,s,u,c,l,h,f,p,d,A,g,m,y,v,_,b,x,w,E,O,S,T,C,P=i[0],M=i[1],I=i[2],B=Math.hypot(P,M,I);return B0&&i[t]&&i[t].call(null,e,n,o)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var r=n(38),i=n(63),o=n(53),a=n(7),s=n(10),u=n(143);const c={offset:"accessor.offset",stride:"accessor.stride",type:"accessor.type",size:"accessor.size",divisor:"accessor.divisor",normalized:"accessor.normalized",integer:"accessor.integer",instanced:"accessor.divisor",isInstanced:"accessor.divisor"},l={removedProps:{},replacedProps:{bytes:"byteLength"},deprecatedProps:c},h={removedProps:c};class f extends r.a{get[Symbol.toStringTag](){return"Buffer"}constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(t,e),this.stubRemovedMethods("Buffer","v6.0",["layout","setLayout","getIndexedParameter"]),this.target=e.target||(this.gl.webgl2?36662:34962),this.initialize(e),Object.seal(this)}getElementCount(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.accessor;return Math.round(this.byteLength/i.a.getBytesPerElement(t))}getVertexCount(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.accessor;return Math.round(this.byteLength/i.a.getBytesPerVertex(t))}initialize(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ArrayBuffer.isView(t)&&(t={data:t}),Number.isFinite(t)&&(t={byteLength:t}),t=Object(u.a)("Buffer",t,l),this.usage=t.usage||35044,this.debugData=null,this.setAccessor(Object.assign({},t,t.accessor)),t.data?this._setData(t.data,t.offset,t.byteLength):this._setByteLength(t.byteLength||0),this}setProps(t){return"accessor"in(t=Object(u.a)("Buffer",t,h))&&this.setAccessor(t.accessor),this}setAccessor(t){return delete(t=Object.assign({},t)).buffer,this.accessor=new i.a(t),this}reallocate(t){return t>this.byteLength?(this._setByteLength(t),!0):(this.bytesUsed=t,!1)}setData(t){return this.initialize(t)}subData(t){ArrayBuffer.isView(t)&&(t={data:t});const{data:e,offset:n=0,srcOffset:r=0}=t,i=t.byteLength||t.length;Object(s.a)(e);const o=this.gl.webgl2?36663:this.target;return this.gl.bindBuffer(o,this.handle),0!==r||void 0!==i?(Object(a.a)(this.gl),this.gl.bufferSubData(this.target,n,e,r,i)):this.gl.bufferSubData(o,n,e),this.gl.bindBuffer(o,null),this.debugData=null,this._inferType(e),this}copyData(t){let{sourceBuffer:e,readOffset:n=0,writeOffset:r=0,size:i}=t;const{gl:o}=this;return Object(a.a)(o),o.bindBuffer(36662,e.handle),o.bindBuffer(36663,this.handle),o.copyBufferSubData(36662,36663,n,r,i),o.bindBuffer(36662,null),o.bindBuffer(36663,null),this.debugData=null,this}getData(){let{dstData:t=null,srcByteOffset:e=0,dstOffset:n=0,length:r=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(a.a)(this.gl);const i=Object(o.c)(this.accessor.type||5126,{clamped:!1}),u=this._getAvailableElementCount(e),c=n;let l,h;t?(h=t.length,l=h-c):(l=Math.min(u,r||u),h=c+l);const f=Math.min(u,l);return r=r||f,Object(s.a)(r<=f),t=t||new i(h),this.gl.bindBuffer(36662,this.handle),this.gl.getBufferSubData(36662,e,t,n,r),this.gl.bindBuffer(36662,null),t}bind(){let{target:t=this.target,index:e=this.accessor&&this.accessor.index,offset:n=0,size:r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 35345===t||35982===t?void 0!==r?this.gl.bindBufferRange(t,e,this.handle,n,r):(Object(s.a)(0===n),this.gl.bindBufferBase(t,e,this.handle)):this.gl.bindBuffer(t,this.handle),this}unbind(){let{target:t=this.target,index:e=this.accessor&&this.accessor.index}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 35345===t||35982===t?this.gl.bindBufferBase(t,e,null):this.gl.bindBuffer(t,null),this}getDebugData(){return this.debugData?{data:this.debugData,changed:!1}:(this.debugData=this.getData({length:Math.min(10,this.byteLength)}),{data:this.debugData,changed:!0})}invalidateDebugData(){this.debugData=null}_setData(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.byteLength+e;Object(s.a)(ArrayBuffer.isView(t)),this._trackDeallocatedMemory();const r=this._getTarget();this.gl.bindBuffer(r,this.handle),this.gl.bufferData(r,n,this.usage),this.gl.bufferSubData(r,e,t),this.gl.bindBuffer(r,null),this.debugData=t.slice(0,10),this.bytesUsed=n,this._trackAllocatedMemory(n);const a=Object(o.b)(t);return Object(s.a)(a),this.setAccessor(new i.a(this.accessor,{type:a})),this}_setByteLength(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.usage;Object(s.a)(t>=0),this._trackDeallocatedMemory();let n=t;0===t&&(n=new Float32Array(0));const r=this._getTarget();return this.gl.bindBuffer(r,this.handle),this.gl.bufferData(r,n,e),this.gl.bindBuffer(r,null),this.usage=e,this.debugData=null,this.bytesUsed=t,this._trackAllocatedMemory(t),this}_getTarget(){return this.gl.webgl2?36663:this.target}_getAvailableElementCount(t){const e=t/Object(o.c)(this.accessor.type||5126,{clamped:!1}).BYTES_PER_ELEMENT;return this.getElementCount()-e}_inferType(t){this.accessor.type||this.setAccessor(new i.a(this.accessor,{type:Object(o.b)(t)}))}_createHandle(){return this.gl.createBuffer()}_deleteHandle(){this.gl.deleteBuffer(this.handle),this._trackDeallocatedMemory()}_getParameter(t){this.gl.bindBuffer(this.target,this.handle);const e=this.gl.getBufferParameter(this.target,t);return this.gl.bindBuffer(this.target,null),e}get type(){return a.k.deprecated("Buffer.type","Buffer.accessor.type")(),this.accessor.type}get bytes(){return a.k.deprecated("Buffer.bytes","Buffer.byteLength")(),this.byteLength}setByteLength(t){return a.k.deprecated("setByteLength","reallocate")(),this.reallocate(t)}updateAccessor(t){return a.k.deprecated("updateAccessor(...)","setAccessor(new Accessor(buffer.accessor, ...)")(),this.accessor=new i.a(this.accessor,t),this}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"e",(function(){return o})),n.d(e,"b",(function(){return a})),n.d(e,"d",(function(){return s})),n.d(e,"c",(function(){return u})),n.d(e,"g",(function(){return c})),n.d(e,"h",(function(){return l})),n.d(e,"i",(function(){return h})),n.d(e,"j",(function(){return f})),n.d(e,"f",(function(){return A}));var r=n(11);function i(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function o(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function a(t){var e=t[0],n=t[1];return Math.hypot(e,n)}function s(t,e){return t[0]=-e[0],t[1]=-e[1],t}function u(t,e,n,r){var i=e[0],o=e[1];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t}function c(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i,t[1]=n[1]*r+n[3]*i,t}function l(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i+n[4],t[1]=n[1]*r+n[3]*i+n[5],t}function h(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[3]*i+n[6],t[1]=n[1]*r+n[4]*i+n[7],t}function f(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[4]*i+n[12],t[1]=n[1]*r+n[5]*i+n[13],t}var p,d,A=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t};p=new r.a(2),r.a!=Float32Array&&(p[0]=0,p[1]=0),d=p},function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"e",(function(){return a})),n.d(e,"c",(function(){return s})),n.d(e,"d",(function(){return u})),n.d(e,"b",(function(){return f})),n.d(e,"f",(function(){return p}));var r=n(68),i=n(84);function o(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function a(t,e){var n=t%e;return n<0?e+n:n}function s(t){return[t[12],t[13],t[14]]}function u(t){return{left:h(t[3]+t[0],t[7]+t[4],t[11]+t[8],t[15]+t[12]),right:h(t[3]-t[0],t[7]-t[4],t[11]-t[8],t[15]-t[12]),bottom:h(t[3]+t[1],t[7]+t[5],t[11]+t[9],t[15]+t[13]),top:h(t[3]-t[1],t[7]-t[5],t[11]-t[9],t[15]-t[13]),near:h(t[3]+t[2],t[7]+t[6],t[11]+t[10],t[15]+t[14]),far:h(t[3]-t[2],t[7]-t[6],t[11]-t[10],t[15]-t[14])}}var c,l=new i.a;function h(t,e,n,r){l.set(t,e,n);var o=l.len();return{distance:r/o,normal:new i.a(-t/o,-e/o,-n/o)}}function f(t){return t-Math.fround(t)}function p(t,e){var n=e.size,i=void 0===n?1:n,o=e.startIndex,a=void 0===o?0:o,s=void 0!==e.endIndex?e.endIndex:t.length,u=(s-a)/i;c=r.a.allocate(c,u,{type:Float32Array,size:2*i});for(var l=a,h=0;l0&&(a=1/Math.sqrt(a)),t[0]=n*a,t[1]=r*a,t[2]=i*a,t[3]=o*a,t}function p(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function d(t,e,n,r){var i=e[0],o=e[1],a=e[2],s=e[3];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a),t[3]=s+r*(n[3]-s),t}function A(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*a,t[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*a,t[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*a,t[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*a,t}function g(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],s=n[1],u=n[2],c=n[3],l=c*r+s*o-u*i,h=c*i+u*r-a*o,f=c*o+a*i-s*r,p=-a*r-s*i-u*o;return t[0]=l*c+p*-a+h*-u-f*-s,t[1]=h*c+p*-s+f*-a-l*-u,t[2]=f*c+p*-u+l*-s-h*-a,t[3]=e[3],t}function m(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]}function y(t,e){var n=t[0],i=t[1],o=t[2],a=t[3],s=e[0],u=e[1],c=e[2],l=e[3];return Math.abs(n-s)<=r.b*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(i-u)<=r.b*Math.max(1,Math.abs(i),Math.abs(u))&&Math.abs(o-c)<=r.b*Math.max(1,Math.abs(o),Math.abs(c))&&Math.abs(a-l)<=r.b*Math.max(1,Math.abs(a),Math.abs(l))}var v,_;v=new r.a(4),r.a!=Float32Array&&(v[0]=0,v[1]=0,v[2]=0,v[3]=0),_=v},function(t,e,n){"use strict";n(2),n(13);const r={CLOCKWISE:1,COUNTER_CLOCKWISE:-1};function i(t,e,n={}){return function(t,e={}){return Math.sign(o(t,e))}(t,n)!==e&&(function(t,e){const{start:n=0,end:r=t.length,size:i=2}=e,o=(r-n)/i,a=Math.floor(o/2);for(let e=0;e80*n){g=f=t[0],m=p=t[1];for(let e=n;ef&&(f=v),_>p&&(p=_);h=Math.max(f-g,p-m),h=0!==h?1/h:0}return c(a,l,n,g,m,h),l}function s(t,e,n,r,i,a){let s,u;if(void 0===a&&(a=o(t,{start:e,end:n,size:r})),i===a<0)for(s=e;s=e;s-=r)u=C(s,t[s],t[s+1],u);return u&&x(u,u.next)&&(P(u),u=u.next),u}function u(t,e){if(!t)return t;e||(e=t);let n,r=t;do{if(n=!1,r.steiner||!x(r,r.next)&&0!==b(r.prev,r,r.next))r=r.next;else{if(P(r),r=e=r.prev,r===r.next)break;n=!0}}while(n||r!==e);return e}function c(t,e,n,r,i,o,a){if(!t)return;!a&&o&&function(t,e,n,r){let i=t;do{null===i.z&&(i.z=m(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){let e,n,r,i,o,a,s,u,c=1;do{for(i=t,t=null,u=null,r=0;i;){for(r++,a=i,o=0,n=0;n0||s>0&&a;)0!==o&&(0===s||!a||i.z<=a.z)?(e=i,i=i.nextZ,o--):(e=a,a=a.nextZ,s--),u?u.nextZ=e:t=e,e.prevZ=u,u=e;i=a}u.nextZ=null,c*=2}while(r>1)}(i)}(t,r,i,o);let s,d,A=t;for(;t.prev!==t.next;)if(s=t.prev,d=t.next,o?h(t,r,i,o):l(t))e.push(s.i/n),e.push(t.i/n),e.push(d.i/n),P(t),t=d.next,A=d.next;else if((t=d)===A){a?1===a?c(t=f(u(t),e,n),e,n,r,i,o,2):2===a&&p(t,e,n,r,i,o):c(u(t),e,n,r,i,o,1);break}}function l(t){const e=t.prev,n=t,r=t.next;if(b(e,n,r)>=0)return!1;let i=t.next.next;for(;i!==t.prev;){if(v(e.x,e.y,n.x,n.y,r.x,r.y,i.x,i.y)&&b(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function h(t,e,n,r){const i=t.prev,o=t,a=t.next;if(b(i,o,a)>=0)return!1;const s=i.xo.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,l=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,h=m(s,u,e,n,r),f=m(c,l,e,n,r);let p=t.prevZ,d=t.nextZ;for(;p&&p.z>=h&&d&&d.z<=f;){if(p!==t.prev&&p!==t.next&&v(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&b(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,d!==t.prev&&d!==t.next&&v(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&b(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(;p&&p.z>=h;){if(p!==t.prev&&p!==t.next&&v(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&b(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;d&&d.z<=f;){if(d!==t.prev&&d!==t.next&&v(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&b(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function f(t,e,n){let r=t;do{const i=r.prev,o=r.next.next;!x(i,o)&&w(i,r,r.next,o)&&S(i,o)&&S(o,i)&&(e.push(i.i/n),e.push(r.i/n),e.push(o.i/n),P(r),P(r.next),r=t=o),r=r.next}while(r!==t);return u(r)}function p(t,e,n,r,i,o){let a=t;do{let t=a.next.next;for(;t!==a.prev;){if(a.i!==t.i&&_(a,t)){let s=T(a,t);return a=u(a,a.next),s=u(s,s.next),c(a,e,n,r,i,o),void c(s,e,n,r,i,o)}t=t.next}a=a.next}while(a!==t)}function d(t,e){return t.x-e.x}function A(t,e){if(e=function(t,e){let n=e;const r=t.x,i=t.y;let o,a=-1/0;do{if(i<=n.y&&i>=n.next.y&&n.next.y!==n.y){const t=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(t<=r&&t>a){if(a=t,t===r){if(i===n.y)return n;if(i===n.next.y)return n.next}o=n.x=n.x&&n.x>=u&&r!==n.x&&v(io.x||n.x===o.x&&g(o,n)))&&(o=n,h=l)),n=n.next}while(n!==s);return o}(t,e)){const n=T(e,t);u(e,e.next),u(n,n.next)}}function g(t,e){return b(t.prev,t,e.prev)<0&&b(e.next,t,t.next)<0}function m(t,e,n,r,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function y(t){let e=t,n=t;do{(e.x=0&&(t-a)*(r-s)-(n-a)*(e-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function _(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){let n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&w(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&(S(t,e)&&S(e,t)&&function(t,e){let n=t,r=!1;const i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)&&(b(t.prev,t,e.prev)||b(t,e.prev,e))||x(t,e)&&b(t.prev,t,t.next)>0&&b(e.prev,e,e.next)>0)}function b(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function x(t,e){return t.x===e.x&&t.y===e.y}function w(t,e,n,r){const i=O(b(t,e,n)),o=O(b(t,e,r)),a=O(b(n,r,t)),s=O(b(n,r,e));return i!==o&&a!==s||(!(0!==i||!E(t,n,e))||(!(0!==o||!E(t,r,e))||(!(0!==a||!E(n,t,r))||!(0!==s||!E(n,e,r)))))}function E(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function O(t){return t>0?1:t<0?-1:0}function S(t,e){return b(t.prev,t,t.next)<0?b(t,e,t.next)>=0&&b(t,t.prev,e)>=0:b(t,e,t.prev)<0||b(t,t.next,e)<0}function T(t,e){const n=new M(t.i,t.x,t.y),r=new M(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function C(t,e,n,r){const i=new M(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function P(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function M(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function I(t,e){const n=e.length,r=t.length;if(r>0){let i=!0;for(let o=0;oe[2]&&(n|=2),t[1]e[3]&&(n|=8),n}function L(t,e){const{size:n=2,broken:r=!1,gridResolution:i=10,gridOffset:o=[0,0],startIndex:a=0,endIndex:s=t.length}=e||{},u=(s-a)/n;let c=[];const l=[c],h=R(t,0,n,a);let f,p;const d=U(h,i,o,[]),A=[];I(c,h);for(let e=1;en&&(c=[],l.push(c),I(c,h)),p=D(f,d)}I(c,f),B(h,f)}return r?l:l[0]}function j(t,e){for(let n=0;n=0?(I(c,p)&&h.push(A),_+=d):h.length&&(h[h.length-1]=0),B(g,p),m=d,y=A;return[v?{pos:u,types:e&&l}:null,_?{pos:c,types:e&&h}:null]}function U(t,e,n,r){const i=Math.floor((t[0]-n[0])/e)*e+n[0],o=Math.floor((t[1]-n[1])/e)*e+n[1];return r[0]=i,r[1]=o,r[2]=i+e,r[3]=o+e,r}function N(t,e,n){8&n?(t[1]+=e,t[3]+=e):4&n?(t[1]-=e,t[3]-=e):2&n?(t[0]+=e,t[2]+=e):1&n&&(t[0]-=e,t[2]-=e)}function G(t,e,n,r){let i=1/0,o=-1/0,a=1/0,s=-1/0;for(let r=0;ro?e:o,a=ns?n:s}return r[0][0]=i,r[0][1]=a,r[1][0]=o,r[1][1]=s,r}function V(t,e){const{size:n=2,startIndex:r=0,endIndex:i=t.length,normalize:o=!0}=e||{},a=t.slice(r,i);X(a,n,0,i-r);const s=L(a,{size:n,broken:!0,gridResolution:360,gridOffset:[-180,-180]});if(o)for(const t of s)Z(t,n);return s}function H(t,e=null,n){const{size:r=2,normalize:i=!0,edgeTypes:o=!1}=n||{};e=e||[];const a=[],s=[];let u=0,c=0;for(let i=0;i<=e.length;i++){const o=e[i]||t.length,l=c,h=W(t,r,u,o);for(let e=h;ei&&(i=e,o=a-1)}return o}function q(t,e,n,r,i=85.051129){const o=t[n],a=t[r-e];if(Math.abs(o-a)>180){const r=R(t,0,e,n);r[0]+=360*Math.round((a-o)/360),I(t,r),r[1]=Math.sign(r[1])*i,I(t,r),r[0]=o,I(t,r)}}function X(t,e,n,r){let i,o=t[0];for(let a=n;a180||e<-180)&&(i-=360*Math.round(e/360)),t[a]=o=i}}function Z(t,e){let n;const r=t.length/e;for(let i=0;i1&&void 0!==arguments[1]?arguments[1]:{};Object(r.b)(t);const{id:n,userData:i={}}=e;this.gl=t,this.gl2=t,this.id=n||Object(s.c)(this[Symbol.toStringTag]),this.userData=i,this._bound=!1,this._handle=e.handle,void 0===this._handle&&(this._handle=this._createHandle()),this.byteLength=0,this._initStats(),this._addStats()}toString(){return"".concat(this[Symbol.toStringTag]||this.constructor.name,"(").concat(this.id,")")}get handle(){return this._handle}delete(){let{deleteChildren:t=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=this._handle&&this._deleteHandle(this._handle);return this._handle&&this._removeStats(),this._handle=null,e&&t&&e.filter(Boolean).forEach(t=>t.delete()),this}bind(){let t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.handle;return"function"!=typeof e?(this._bindHandle(e),this):(this._bound?t=e():(this._bindHandle(this.handle),this._bound=!0,t=e(),this._bound=!1,this._bindHandle(null)),t)}unbind(){this.bind(null)}getParameter(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=Object(o.b)(this.gl,t),Object(a.a)(t);const n=(this.constructor.PARAMETERS||{})[t];if(n){const t=Object(r.j)(this.gl);if(!((!("webgl2"in n)||t)&&(!("extension"in n)||this.gl.getExtension(n.extension)))){const e=n.webgl1,r="webgl2"in n?n.webgl2:n.webgl1;return t?r:e}}return this._getParameter(t,e)}getParameters(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{parameters:e,keys:n}=t,i=this.constructor.PARAMETERS||{},a=Object(r.j)(this.gl),s={},u=e||Object.keys(i);for(const e of u){const r=i[e];if(r&&(!("webgl2"in r)||a)&&(!("extension"in r)||this.gl.getExtension(r.extension))){const i=n?Object(o.a)(this.gl,e):e;s[i]=this.getParameter(e,t),n&&"GLenum"===r.type&&(s[i]=Object(o.a)(this.gl,s[i]))}}return s}setParameter(t,e){t=Object(o.b)(this.gl,t),Object(a.a)(t);const n=(this.constructor.PARAMETERS||{})[t];if(n){const t=Object(r.j)(this.gl);if(!((!("webgl2"in n)||t)&&(!("extension"in n)||this.gl.getExtension(n.extension))))throw new Error("Parameter not available on this platform");"GLenum"===n.type&&(e=Object(o.b)(e))}return this._setParameter(t,e),this}setParameters(t){for(const e in t)this.setParameter(e,t[e]);return this}stubRemovedMethods(t,e,n){return Object(u.a)(this,t,e,n)}initialize(t){}_createHandle(){throw new Error(c)}_deleteHandle(){throw new Error(c)}_bindHandle(t){throw new Error(c)}_getOptsFromHandle(){throw new Error(c)}_getParameter(t,e){throw new Error(c)}_setParameter(t,e){throw new Error(c)}_context(){return this.gl.luma=this.gl.luma||{},this.gl.luma}_initStats(){this.gl.stats=this.gl.stats||new i.a}_addStats(){const t=this[Symbol.toStringTag],e=i.b.get("Resource Counts");e.get("Resources Created").incrementCount(),e.get("".concat(t,"s Created")).incrementCount(),e.get("".concat(t,"s Active")).incrementCount()}_removeStats(){const t=this[Symbol.toStringTag];i.b.get("Resource Counts").get("".concat(t,"s Active")).decrementCount()}_trackAllocatedMemory(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this[Symbol.toStringTag];this._doTrackAllocatedMemory(t,e),this._doTrackAllocatedMemory(t,e,this.gl.stats.get("Memory Usage"))}_doTrackAllocatedMemory(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this[Symbol.toStringTag],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i.b.get("Memory Usage");n.get("GPU Memory").addCount(t),n.get("".concat(e," Memory")).addCount(t),this.byteLength=t}_trackDeallocatedMemory(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this[Symbol.toStringTag];this._doTrackDeallocatedMemory(t),this._doTrackDeallocatedMemory(t,this.gl.stats.get("Memory Usage"))}_doTrackDeallocatedMemory(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this[Symbol.toStringTag],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.b.get("Memory Usage");e.get("GPU Memory").subtractCount(this.byteLength),e.get("".concat(t," Memory")).subtractCount(this.byteLength),this.byteLength=0}}},function(t,e,n){t.exports=n(277)},function(t,e,n){var r=n(268),i=n(269),o=n(270);t.exports=function(t){return r(t)||i(t)||o()}},function(t,e,n){var r=n(266);Object.assign(r,n(66),n(292),n(291),n(151),n(294),n(196)),t.exports=r},function(t,e,n){"use strict";n.d(e,"a",(function(){return w}));var r=n(9),i=n.n(r),o=n(3),a=n.n(o),s=n(4),u=n.n(s),c=n(0),l=n.n(c),h=n(21),f=n(35),p=n(78),d=n(13),A=n(84),g=n(70),m=n(19),y=n(12),v=Math.PI/180,_=Object(f.a)(),b=[0,0,0],x={unitsPerMeter:[1,1,1],metersPerUnit:[1,1,1]};var w=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a()(this,t),l()(this,"_frustumPlanes",{}),this.id=e.id||this.constructor.displayName||"viewport",this.x=e.x||0,this.y=e.y||0,this.width=e.width||1,this.height=e.height||1,this.zoom=e.zoom||0,this.padding=e.padding,this.distanceScales=e.distanceScales||x,this.focalDistance=e.focalDistance||1,this.position=e.position||b,this.modelMatrix=e.modelMatrix||null;var n=e.longitude,r=e.latitude;this.isGeospatial=Number.isFinite(r)&&Number.isFinite(n),this._initProps(e),this._initMatrices(e),this.equals=this.equals.bind(this),this.project=this.project.bind(this),this.unproject=this.unproject.bind(this),this.projectPosition=this.projectPosition.bind(this),this.unprojectPosition=this.unprojectPosition.bind(this),this.projectFlat=this.projectFlat.bind(this),this.unprojectFlat=this.unprojectFlat.bind(this)}return u()(t,[{key:"metersPerPixel",get:function(){return this.distanceScales.metersPerUnit[2]/this.scale}},{key:"projectionMode",get:function(){return this.isGeospatial?this.zoom<12?y.d.WEB_MERCATOR:y.d.WEB_MERCATOR_AUTO_OFFSET:y.d.IDENTITY}},{key:"equals",value:function(e){return e instanceof t&&(this===e||e.width===this.width&&e.height===this.height&&e.scale===this.scale&&Object(d.d)(e.projectionMatrix,this.projectionMatrix)&&Object(d.d)(e.viewMatrix,this.viewMatrix))}},{key:"project",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.topLeft,r=void 0===n||n,o=this.projectPosition(t),a=Object(m.q)(o,this.pixelProjectionMatrix),s=i()(a,2),u=s[0],c=s[1],l=r?c:this.height-c;return 2===t.length?[u,l]:[u,l,a[2]]}},{key:"unproject",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.topLeft,r=void 0===n||n,o=e.targetZ,a=i()(t,3),s=a[0],u=a[1],c=a[2],l=r?u:this.height-u,h=o&&o*this.distanceScales.unitsPerMeter[2],f=Object(m.n)([s,l,c],this.pixelUnprojectionMatrix,h),p=this.unprojectPosition(f),d=i()(p,3),A=d[0],g=d[1],y=d[2];return Number.isFinite(c)?[A,g,y]:Number.isFinite(o)?[A,g,o]:[A,g]}},{key:"projectPosition",value:function(t){var e=this.projectFlat(t),n=i()(e,2);return[n[0],n[1],(t[2]||0)*this.distanceScales.unitsPerMeter[2]]}},{key:"unprojectPosition",value:function(t){var e=this.unprojectFlat(t),n=i()(e,2);return[n[0],n[1],(t[2]||0)*this.distanceScales.metersPerUnit[2]]}},{key:"projectFlat",value:function(t){if(this.isGeospatial){var e=Object(m.l)(t);return e[1]=Object(d.a)(e[1],-318,830),e}return t}},{key:"unprojectFlat",value:function(t){return this.isGeospatial?Object(m.p)(t):t}},{key:"getBounds",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e={targetZ:t.z||0},n=this.unproject([0,0],e),r=this.unproject([this.width,0],e),i=this.unproject([0,this.height],e),o=this.unproject([this.width,this.height],e);return[Math.min(n[0],r[0],i[0],o[0]),Math.min(n[1],r[1],i[1],o[1]),Math.max(n[0],r[0],i[0],o[0]),Math.max(n[1],r[1],i[1],o[1])]}},{key:"getDistanceScales",value:function(t){return t?Object(m.g)({longitude:t[0],latitude:t[1],highPrecision:!0}):this.distanceScales}},{key:"containsPixel",value:function(t){var e=t.x,n=t.y,r=t.width,i=void 0===r?1:r,o=t.height,a=void 0===o?1:o;return ec)n.set(e.subarray(0,c),i);else if(n.set(e,i),a)for(var l=u;l=A)){var m=g?r.value:r.getBuffer().getData({srcByteOffset:h});if(r.settings.normalized&&!g){var y=u;u=function(t,e){return r.normalizeConstant(y(t,e))}}var v=g?function(t,e){return u(m,e)}:function(t,e){return u(m.subarray(t,t+l),e)},_=e.getData({length:i}),b=new Float32Array(A);!function(t){var e=t.source,n=t.target,r=t.size,i=t.getData,a=t.sourceStartIndices,s=t.targetStartIndices;if(!Array.isArray(s))return o({source:e,target:n,size:r,getData:i}),n;for(var u=0,c=0,l=i&&function(t,e){return i(t+c,e)},h=Math.min(a.length,s.length),f=1;f1)for(var n=1;nr&&(n=Math.min(n,r/t.width));const o=t.width*n,a=t.height*n,s=["font-size:1px;","padding:".concat(Math.floor(a/2),"px ").concat(Math.floor(o/2),"px;"),"line-height:".concat(a,"px;"),"background:url(".concat(i,");"),"background-size:".concat(o,"px ").concat(a,"px;"),"color:transparent;"].join("");return["".concat(e," %c+"),s]}const l={BLACK:30,RED:31,GREEN:32,YELLOW:33,BLUE:34,MAGENTA:35,CYAN:36,WHITE:37,BRIGHT_BLACK:90,BRIGHT_RED:91,BRIGHT_GREEN:92,BRIGHT_YELLOW:93,BRIGHT_BLUE:94,BRIGHT_MAGENTA:95,BRIGHT_CYAN:96,BRIGHT_WHITE:97};function h(t){return"string"==typeof t?l[t.toUpperCase()]||l.WHITE:t}function f(t,e){if(!t)throw new Error(e||"Assertion failed")}var p=n(98);function d(){let t;if(s&&p.b.performance)t=p.b.performance.now();else if(p.a.hrtime){const e=p.a.hrtime();t=1e3*e[0]+e[1]/1e6}else t=Date.now();return t}const A={debug:s&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},g={enabled:!0,level:0};function m(){}const y={},v={once:!0};function _(t){for(const e in t)for(const n in t[e])return n||"untitled";return"empty"}class b{constructor({id:t}={id:""}){this.id=t,this.VERSION="8.9.7",this._startTs=d(),this._deltaTs=d(),this.LOG_THROTTLE_TIMEOUT=0,this._storage=new u("__probe-".concat(this.id,"__"),g),this.userData={},this.timeStamp("".concat(this.id," started")),function(t,e=["constructor"]){const n=Object.getPrototypeOf(t),r=Object.getOwnPropertyNames(n);for(const n of r)"function"==typeof t[n]&&(e.find(t=>n===t)||(t[n]=t[n].bind(t)))}(this),Object.seal(this)}set level(t){this.setLevel(t)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((d()-this._startTs).toPrecision(10))}getDelta(){return Number((d()-this._deltaTs).toPrecision(10))}set priority(t){this.level=t}get priority(){return this.level}getPriority(){return this.level}enable(t=!0){return this._storage.updateConfiguration({enabled:t}),this}setLevel(t){return this._storage.updateConfiguration({level:t}),this}assert(t,e){f(t,e)}warn(t){return this._getLogFunction(0,t,A.warn,arguments,v)}error(t){return this._getLogFunction(0,t,A.error,arguments)}deprecated(t,e){return this.warn("`".concat(t,"` is deprecated and will be removed in a later version. Use `").concat(e,"` instead"))}removed(t,e){return this.error("`".concat(t,"` has been removed. Use `").concat(e,"` instead"))}probe(t,e){return this._getLogFunction(t,e,A.log,arguments,{time:!0,once:!0})}log(t,e){return this._getLogFunction(t,e,A.debug,arguments)}info(t,e){return this._getLogFunction(t,e,console.info,arguments)}once(t,e){return this._getLogFunction(t,e,A.debug||A.info,arguments,v)}table(t,e,n){return e?this._getLogFunction(t,e,console.table||m,n&&[n],{tag:_(e)}):m}image({logLevel:t,priority:e,image:r,message:i="",scale:o=1}){return this._shouldLog(t||e)?s?function({image:t,message:e="",scale:n=1}){if("string"==typeof t){const r=new Image;return r.onload=()=>{const t=c(r,e,n);console.log(...t)},r.src=t,m}const r=t.nodeName||"";if("img"===r.toLowerCase())return console.log(...c(t,e,n)),m;if("canvas"===r.toLowerCase()){const r=new Image;return r.onload=()=>console.log(...c(r,e,n)),r.src=t.toDataURL(),m}return m}({image:r,message:i,scale:o}):function({image:t,message:e="",scale:r=1}){let i=null;try{i=n(276)}catch(t){}if(i)return()=>i(t,{fit:"box",width:"".concat(Math.round(80*r),"%")}).then(t=>console.log(t));return m}({image:r,message:i,scale:o}):m}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}get(t){return this._storage.config[t]}set(t,e){this._storage.updateConfiguration({[t]:e})}time(t,e){return this._getLogFunction(t,e,console.time?console.time:console.info)}timeEnd(t,e){return this._getLogFunction(t,e,console.timeEnd?console.timeEnd:console.info)}timeStamp(t,e){return this._getLogFunction(t,e,console.timeStamp||m)}group(t,e,n={collapsed:!1}){n=w({logLevel:t,message:e,opts:n});const{collapsed:r}=n;return n.method=(r?console.groupCollapsed:console.group)||console.info,this._getLogFunction(n)}groupCollapsed(t,e,n={}){return this.group(t,e,Object.assign({},n,{collapsed:!0}))}groupEnd(t){return this._getLogFunction(t,"",console.groupEnd||m)}withGroup(t,e,n){this.group(t,e)();try{n()}finally{this.groupEnd(t)()}}trace(){console.trace&&console.trace()}_shouldLog(t){return this.isEnabled()&&this.getLevel()>=x(t)}_getLogFunction(t,e,n,r=[],i){if(this._shouldLog(t)){i=w({logLevel:t,message:e,args:r,opts:i}),f(n=n||i.method),i.total=this.getTotal(),i.delta=this.getDelta(),this._deltaTs=d();const o=i.tag||i.message;if(i.once){if(y[o])return m;y[o]=d()}return e=function(t,e,n){if("string"==typeof e){const a=n.time?function(t,e=8){const n=Math.max(e-t.length,0);return"".concat(" ".repeat(n)).concat(t)}(function(t){let e;return e=t<10?"".concat(t.toFixed(2),"ms"):t<100?"".concat(t.toFixed(1),"ms"):t<1e3?"".concat(t.toFixed(0),"ms"):"".concat((t/1e3).toFixed(2),"s"),e}(n.total)):"";e=n.time?"".concat(t,": ").concat(a," ").concat(e):"".concat(t,": ").concat(e),r=e,i=n.color,o=n.background,s||"string"!=typeof r||(i&&(i=h(i),r="[".concat(i,"m").concat(r,"[39m")),o&&(i=h(o),r="[".concat(o+10,"m").concat(r,"[49m"))),e=r}var r,i,o;return e}(this.id,i.message,i),n.bind(console,e,...i.args)}return m}}function x(t){if(!t)return 0;let e;switch(typeof t){case"number":e=t;break;case"object":e=t.logLevel||t.priority||0;break;default:return 0}return f(Number.isFinite(e)&&e>=0),e}function w(t){const{logLevel:e,message:n}=t;t.logLevel=x(e);const r=t.args?Array.from(t.args):[];for(;r.length&&r.shift()!==n;);switch(t.args=r,typeof e){case"string":case"function":void 0!==n&&r.unshift(n),t.message=e;break;case"object":Object.assign(t,e)}"function"==typeof t.message&&(t.message=t.message());const i=typeof t.message;return f("string"===i||"object"===i),Object.assign(t,t.opts)}b.VERSION="8.9.7";const E=new b({id:"loaders.gl"});class O{log(){return()=>{}}info(){return()=>{}}warn(){return()=>{}}error(){return()=>{}}}var S=n(72);const T={fetch:null,mimeType:void 0,nothrow:!1,log:new class{constructor(){Object(o.a)(this,"console",void 0),this.console=console}log(...t){return this.console.log.bind(this.console,...t)}info(...t){return this.console.info.bind(this.console,...t)}warn(...t){return this.console.warn.bind(this.console,...t)}error(...t){return this.console.error.bind(this.console,...t)}},CDN:"https://unpkg.com/@loaders.gl",worker:!0,maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:S.c,_nodeWorkers:!1,_workerType:"",limit:0,_limitMB:0,batchSize:"auto",batchDebounceMs:0,metadata:!1,transforms:[]},C={throws:"nothrow",dataType:"(no longer used)",uri:"baseUri",method:"fetch.method",headers:"fetch.headers",body:"fetch.body",mode:"fetch.mode",credentials:"fetch.credentials",cache:"fetch.cache",redirect:"fetch.redirect",referrer:"fetch.referrer",referrerPolicy:"fetch.referrerPolicy",integrity:"fetch.integrity",keepalive:"fetch.keepalive",signal:"fetch.signal"};function P(){globalThis.loaders=globalThis.loaders||{};const{loaders:t}=globalThis;return t._state=t._state||{},t._state}n.d(e,"c",(function(){return P})),n.d(e,"b",(function(){return M})),n.d(e,"e",(function(){return I})),n.d(e,"d",(function(){return B})),n.d(e,"a",(function(){return R}));const M=()=>{const t=P();return t.globalOptions=t.globalOptions||{...T},t.globalOptions};function I(t){const e=P(),n=M();e.globalOptions=L(n,t)}function B(t,e,n,r){return n=n||[],function(t,e){k(t,null,T,C,e);for(const n of e){const r=t&&t[n.id]||{},i=n.options&&n.options[n.id]||{},o=n.deprecatedOptions&&n.deprecatedOptions[n.id]||{};k(r,n.id,i,o,e)}}(t,n=Array.isArray(n)?n:[n]),L(e,t,r)}function R(t,e){const n=M(),o=t||n;return"function"==typeof o.fetch?o.fetch:Object(r.f)(o.fetch)?t=>Object(i.a)(t,o):null!=e&&e.fetch?null==e?void 0:e.fetch:i.a}function k(t,e,n,i,o){const a=e||"Top level",s=e?"".concat(e,"."):"";for(const u in t){const c=!e&&Object(r.f)(t[u]),l="baseUri"===u&&!e,h="workerUrl"===u&&e;if(!(u in n)&&!l&&!h)if(u in i)E.warn("".concat(a," loader option '").concat(s).concat(u,"' no longer supported, use '").concat(i[u],"'"))();else if(!c){const t=D(u,o);E.warn("".concat(a," loader option '").concat(s).concat(u,"' not recognized. ").concat(t))()}}}function D(t,e){const n=t.toLowerCase();let r="";for(const i of e)for(const e in i.options){if(t===e)return"Did you mean '".concat(i.id,".").concat(e,"'?");const o=e.toLowerCase();(n.startsWith(o)||o.startsWith(n))&&(r=r||"Did you mean '".concat(i.id,".").concat(e,"'?"))}return r}function L(t,e,n){const r={...t.options||{}};return function(t,e){e&&!("baseUri"in t)&&(t.baseUri=e)}(r,n),null===r.log&&(r.log=new O),j(r,M()),j(r,e),r}function j(t,e){for(const n in e)if(n in e){const i=e[n];Object(r.h)(i)&&Object(r.h)(t[n])?t[n]={...t[n],...e[n]}:t[n]=e[n]}}},function(t,e,n){"use strict";n.d(e,"c",(function(){return o})),n.d(e,"b",(function(){return a})),n.d(e,"a",(function(){return s}));var r=n(10);const i={};function o(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"id";i[t]=i[t]||1;const e=i[t]++;return"".concat(t,"-").concat(e)}function a(t){return Object(r.a)("number"==typeof t,"Input must be a number"),t&&0==(t&t-1)}function s(t){let e=!0;for(const n in t){e=!1;break}return e}},function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return o}));var r=n(10);function i(t,e){if("string"!=typeof e)return e;const n=Number(e);if(!isNaN(n))return n;const i=t[e=e.replace(/^.*\./,"")];return Object(r.a)(void 0!==i,"Accessing undefined constant GL.".concat(e)),i}function o(t,e){e=Number(e);for(const n in t)if(t[n]===e)return"GL.".concat(n);return String(e)}},function(t,e,n){"use strict";(function(t,r){n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return a})),n.d(e,"d",(function(){return s})),n.d(e,"c",(function(){return u}));const i={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:void 0!==t&&t,document:"undefined"!=typeof document&&document},o=i.global||i.self||i.window||{},a="object"!=typeof r||"[object process]"!==String(r)||r.browser,s="function"==typeof importScripts,u="undefined"!=typeof window&&void 0!==window.orientation,c=void 0!==r&&r.version&&/v([0-9]*)/.exec(r.version);c&&parseFloat(c[1])}).call(this,n(71),n(44))},function(t,e,n){"use strict";n.d(e,"a",(function(){return S}));var r=n(0),i=n.n(r),o=n(3),a=n.n(o),s=n(4),u=n.n(s),c=n(8),l=n.n(c),h=n(5),f=n.n(h),p=n(6),d=n.n(p),A=n(1),g=n.n(A),m=n(114),y=n(13);function v(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function _(t){for(var e=1;e=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function x(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:{};a()(this,n);var i=Array.isArray(r)?r:r.transitionProps,o=Array.isArray(r)?{}:r;return o.transitionProps=Array.isArray(i)?{compare:i,required:i}:i||{compare:E,required:O},(t=e.call(this,o.transitionProps)).opts=o,t}return u()(n,[{key:"initializeProps",value:function(t,e){var r=l()(g()(n.prototype),"initializeProps",this).call(this,t,e),i=this.opts,o=i.makeViewport,a=i.around;if(o&&a){var s=o(t),u=o(e),c=s.unproject(a);r.start.around=a,Object.assign(r.end,{around:u.project(c),aroundPosition:c,width:e.width,height:e.height})}return r}},{key:"interpolateProps",value:function(t,e,n){var r,i={},o=b(this._propsToExtract);try{for(o.s();!(r=o.n()).done;){var a=r.value;i[a]=Object(y.g)(t[a]||0,e[a]||0,n)}}catch(t){o.e(t)}finally{o.f()}if(e.aroundPosition&&this.opts.makeViewport){var s=this.opts.makeViewport(_(_({},e),i));Object.assign(i,s.panByPosition(e.aroundPosition,Object(y.g)(t.around,e.around,n)))}return i}}]),n}(m.a)},function(t,e,n){"use strict";function r(t,e){if(!t)throw new Error(e||"loaders.gl assertion failed.")}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"c",(function(){return a})),n.d(e,"b",(function(){return s}));var r=[],i=[];function o(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,o=r,a={index:-1,data:t,target:[]};return t?"function"==typeof t[Symbol.iterator]?o=t:t.length>0&&(i.length=t.length,o=i):o=r,(e>0||Number.isFinite(n))&&(o=(Array.isArray(o)?o:Array.from(o)).slice(e,n),a.index=e-1),{iterable:o,objectInfo:a}}function a(t){return t&&t[Symbol.asyncIterator]}function s(t,e){var n=e.size,r=e.stride,i=e.offset,o=e.startIndices,a=e.nested,s=t.BYTES_PER_ELEMENT,u=r?r/s:n,c=i?i/s:0,l=Math.floor((t.length-c)/u);return function(e,r){var i=r.index,s=r.target;if(!o){for(var h=i*u+c,f=0;f1&&void 0!==arguments[1]?arguments[1]:{};switch(t){case 5126:return Float32Array;case 5123:case 33635:case 32819:case 32820:return Uint16Array;case 5125:return Uint32Array;case 5121:return e?Uint8ClampedArray:Uint8Array;case 5120:return Int8Array;case 5122:return Int16Array;case 5124:return Int32Array;default:throw new Error("Failed to deduce typed array type from GL constant")}}function o(t){let{data:e,width:n,height:r,bytesPerPixel:i=4,temp:o}=t;const a=n*i;o=o||new Uint8Array(a);for(let t=0;t1&&void 0!==arguments[1]?arguments[1]:{};const{format:n,linearFiltering:r}=e;let i=!0;return n&&(i=i&&Object(a.d)(t,n),i=i&&(!r||Object(a.e)(t,n))),i}constructor(t,e){const{id:n=Object(u.c)("texture"),handle:r,target:i}=e;super(t,{id:n,handle:r}),this.target=i,this.textureUnit=void 0,this.loaded=!1,this.width=void 0,this.height=void 0,this.depth=void 0,this.format=void 0,this.type=void 0,this.dataFormat=void 0,this.border=void 0,this.textureUnit=void 0,this.mipmaps=void 0}toString(){return"Texture(".concat(this.id,",").concat(this.width,"x").concat(this.height,")")}initialize(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.data;if(e instanceof Promise)return e.then(e=>this.initialize(Object.assign({},t,{pixels:e,data:e}))),this;const n="undefined"!=typeof HTMLVideoElement&&e instanceof HTMLVideoElement;if(n&&e.readyStatethis.initialize(t)),this;const{pixels:i=null,format:o=6408,border:a=0,recreate:s=!1,parameters:u={},pixelStore:c={},textureUnit:l}=t;e||(e=i);let{width:h,height:f,dataFormat:p,type:d,compressed:A=!1,mipmaps:g=!0}=t;const{depth:m=0}=t;return({width:h,height:f,compressed:A,dataFormat:p,type:d}=this._deduceParameters({format:o,type:d,dataFormat:p,compressed:A,data:e,width:h,height:f})),this.width=h,this.height=f,this.depth=m,this.format=o,this.type=d,this.dataFormat=p,this.border=a,this.textureUnit=l,Number.isFinite(this.textureUnit)&&(this.gl.activeTexture(33984+this.textureUnit),this.gl.bindTexture(this.target,this.handle)),g&&this._isNPOT()&&(r.k.warn("texture: ".concat(this," is Non-Power-Of-Two, disabling mipmaping"))(),g=!1,this._updateForNPOT(u)),this.mipmaps=g,this.setImageData({data:e,width:h,height:f,depth:m,format:o,type:d,dataFormat:p,border:a,mipmaps:g,parameters:c,compressed:A}),g&&this.generateMipmap(),this.setParameters(u),s&&(this.data=e),n&&(this._video={video:e,parameters:u,lastTime:e.readyState>=HTMLVideoElement.HAVE_CURRENT_DATA?e.currentTime:-1}),this}update(){if(this._video){const{video:t,parameters:e,lastTime:n}=this._video;if(n===t.currentTime||t.readyState0&&void 0!==arguments[0]?arguments[0]:{};return this._isNPOT()?(r.k.warn("texture: ".concat(this," is Non-Power-Of-Two, disabling mipmaping"))(),this):(this.mipmaps=!0,this.gl.bindTexture(this.target,this.handle),Object(r.o)(this.gl,t,()=>{this.gl.generateMipmap(this.target)}),this.gl.bindTexture(this.target,null),this)}setImageData(t){this._trackDeallocatedMemory("Texture");const{target:e=this.target,pixels:n=null,level:i=0,format:o=this.format,border:u=this.border,offset:c=0,parameters:l={}}=t;let{data:h=null,type:f=this.type,width:p=this.width,height:d=this.height,dataFormat:A=this.dataFormat,compressed:g=!1}=t;h||(h=n),({type:f,dataFormat:A,compressed:g,width:p,height:d}=this._deduceParameters({format:o,type:f,dataFormat:A,compressed:g,data:h,width:p,height:d}));const{gl:m}=this;m.bindTexture(this.target,this.handle);let y,v=null;({data:h,dataType:v}=this._getDataType({data:h,compressed:g}));let _=0;if(Object(r.o)(this.gl,l,()=>{switch(v){case"null":m.texImage2D(e,i,o,p,d,u,A,f,h);break;case"typed-array":m.texImage2D(e,i,o,p,d,u,A,f,h,c);break;case"buffer":y=Object(r.a)(m),y.bindBuffer(35052,h.handle||h),y.texImage2D(e,i,o,p,d,u,A,f,c),y.bindBuffer(35052,null);break;case"browser-object":Object(r.j)(m)?m.texImage2D(e,i,o,p,d,u,A,f,h):m.texImage2D(e,i,o,A,f,h);break;case"compressed":for(const[t,n]of h.entries())m.compressedTexImage2D(e,t,n.format,n.width,n.height,u,n.data),_+=n.levelSize;break;default:Object(s.a)(!1,"Unknown image data type")}}),"compressed"===v)this._trackAllocatedMemory(_,"Texture");else if(h&&h.byteLength)this._trackAllocatedMemory(h.byteLength,"Texture");else{const t=a.a[this.dataFormat]||4,e=a.c[this.type]||1;this._trackAllocatedMemory(this.width*this.height*t*e,"Texture")}return this.loaded=!0,this}setSubImageData(t){let{target:e=this.target,pixels:n=null,data:i=null,x:a=0,y:u=0,width:c=this.width,height:h=this.height,level:f=0,format:p=this.format,type:d=this.type,dataFormat:A=this.dataFormat,compressed:g=!1,offset:m=0,border:y=this.border,parameters:v={}}=t;if(({type:d,dataFormat:A,compressed:g,width:c,height:h}=this._deduceParameters({format:p,type:d,dataFormat:A,compressed:g,data:i,width:c,height:h})),Object(s.a)(0===this.depth,"texSubImage not supported for 3D textures"),i||(i=n),i&&i.data){const t=i;i=t.data,c=t.shape[0],h=t.shape[1]}i instanceof o.a&&(i=i.handle),this.gl.bindTexture(this.target,this.handle),Object(r.o)(this.gl,v,()=>{if(g)this.gl.compressedTexSubImage2D(e,f,a,u,c,h,p,i);else if(null===i)this.gl.texSubImage2D(e,f,a,u,c,h,A,d,null);else if(ArrayBuffer.isView(i))this.gl.texSubImage2D(e,f,a,u,c,h,A,d,i,m);else if(i instanceof l){const t=Object(r.a)(this.gl);t.bindBuffer(35052,i),t.texSubImage2D(e,f,a,u,c,h,A,d,m),t.bindBuffer(35052,null)}else if(Object(r.j)(this.gl)){Object(r.a)(this.gl).texSubImage2D(e,f,a,u,c,h,A,d,i)}else this.gl.texSubImage2D(e,f,a,u,A,d,i)}),this.gl.bindTexture(this.target,null)}copyFramebuffer(){return r.k.error("Texture.copyFramebuffer({...}) is no logner supported, use copyToTexture(source, target, opts})")(),null}getActiveUnit(){return this.gl.getParameter(34016)-33984}bind(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.textureUnit;const{gl:e}=this;return void 0!==t&&(this.textureUnit=t,e.activeTexture(33984+t)),e.bindTexture(this.target,this.handle),t}unbind(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.textureUnit;const{gl:e}=this;return void 0!==t&&(this.textureUnit=t,e.activeTexture(33984+t)),e.bindTexture(this.target,null),t}_getDataType(t){let{data:e,compressed:n=!1}=t;return n?{data:e,dataType:"compressed"}:null===e?{data:e,dataType:"null"}:ArrayBuffer.isView(e)?{data:e,dataType:"typed-array"}:e instanceof o.a?{data:e.handle,dataType:"buffer"}:e instanceof l?{data:e,dataType:"buffer"}:{data:e,dataType:"browser-object"}}_deduceParameters(t){const{format:e,data:n}=t;let{width:r,height:i,dataFormat:o,type:s,compressed:u}=t;const c=a.b[e];return o=o||c&&c.dataFormat,s=s||c&&c.types[0],u=u||c&&c.compressed,({width:r,height:i}=this._deduceImageSize(n,r,i)),{dataFormat:o,type:s,compressed:u,width:r,height:i,format:e,data:n}}_deduceImageSize(t,e,n){let r;return r="undefined"!=typeof ImageData&&t instanceof ImageData?{width:t.width,height:t.height}:"undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement?{width:t.naturalWidth,height:t.naturalHeight}:"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap?{width:t.width,height:t.height}:"undefined"!=typeof HTMLVideoElement&&t instanceof HTMLVideoElement?{width:t.videoWidth,height:t.videoHeight}:t?{width:e,height:n}:{width:e>=0?e:1,height:n>=0?n:1},Object(s.a)(r,"Could not deduced texture size"),Object(s.a)(void 0===e||r.width===e,"Deduced texture width does not match supplied width"),Object(s.a)(void 0===n||r.height===n,"Deduced texture height does not match supplied height"),r}_createHandle(){return this.gl.createTexture()}_deleteHandle(){this.gl.deleteTexture(this.handle),this._trackDeallocatedMemory("Texture")}_getParameter(t){switch(t){case 4096:return this.width;case 4097:return this.height;default:this.gl.bindTexture(this.target,this.handle);const e=this.gl.getTexParameter(this.target,t);return this.gl.bindTexture(this.target,null),e}}_setParameter(t,e){switch(this.gl.bindTexture(this.target,this.handle),e=this._getNPOTParam(t,e),t){case 33082:case 33083:this.gl.texParameterf(this.handle,t,e);break;case 4096:case 4097:Object(s.a)(!1);break;default:this.gl.texParameteri(this.target,t,e)}return this.gl.bindTexture(this.target,null),this}_isNPOT(){return!Object(r.j)(this.gl)&&(!(!this.width||!this.height)&&(!Object(u.b)(this.width)||!Object(u.b)(this.height)))}_updateForNPOT(t){void 0===t[this.gl.TEXTURE_MIN_FILTER]&&(t[this.gl.TEXTURE_MIN_FILTER]=this.gl.LINEAR),void 0===t[this.gl.TEXTURE_WRAP_S]&&(t[this.gl.TEXTURE_WRAP_S]=this.gl.CLAMP_TO_EDGE),void 0===t[this.gl.TEXTURE_WRAP_T]&&(t[this.gl.TEXTURE_WRAP_T]=this.gl.CLAMP_TO_EDGE)}_getNPOTParam(t,e){if(this._isNPOT())switch(t){case 10241:-1===c.indexOf(e)&&(e=9729);break;case 10242:case 10243:33071!==e&&(e=33071)}return e}}},function(t,e,n){"use strict";function r(t,e,n){const r=e[0],i=e[1],o=n[3]*r+n[7]*i||1;return t[0]=(n[0]*r+n[4]*i)/o,t[1]=(n[1]*r+n[5]*i)/o,t}function i(t,e,n){const r=e[0],i=e[1],o=e[2],a=n[3]*r+n[7]*i+n[11]*o||1;return t[0]=(n[0]*r+n[4]*i+n[8]*o)/a,t[1]=(n[1]*r+n[5]*i+n[9]*o)/a,t[2]=(n[2]*r+n[6]*i+n[10]*o)/a,t}function o(t,e,n){const r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i,t[1]=n[1]*r+n[3]*i,t[2]=e[2],t}function a(t,e,n){const r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i,t[1]=n[1]*r+n[3]*i,t[2]=e[2],t[3]=e[3],t}function s(t,e,n){const r=e[0],i=e[1],o=e[2];return t[0]=n[0]*r+n[3]*i+n[6]*o,t[1]=n[1]*r+n[4]*i+n[7]*o,t[2]=n[2]*r+n[5]*i+n[8]*o,t[3]=e[3],t}n.d(e,"a",(function(){return r})),n.d(e,"c",(function(){return i})),n.d(e,"b",(function(){return o})),n.d(e,"d",(function(){return a})),n.d(e,"e",(function(){return s}))},function(t,e){function n(e){return t.exports=n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},t.exports.__esModule=!0,t.exports.default=t.exports,n(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"i",(function(){return o})),n.d(e,"d",(function(){return a})),n.d(e,"b",(function(){return s})),n.d(e,"e",(function(){return u})),n.d(e,"h",(function(){return c})),n.d(e,"f",(function(){return l})),n.d(e,"g",(function(){return h})),n.d(e,"c",(function(){return f}));var r=n(11);function i(){var t=new r.a(9);return r.a!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function o(t,e){if(t===e){var n=e[1],r=e[2],i=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=r,t[7]=i}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}function a(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=l*a-s*c,f=-l*o+s*u,p=c*o-a*u,d=n*h+r*f+i*p;return d?(d=1/d,t[0]=h*d,t[1]=(-l*r+i*c)*d,t[2]=(s*r-i*a)*d,t[3]=f*d,t[4]=(l*n-i*u)*d,t[5]=(-s*n+i*o)*d,t[6]=p*d,t[7]=(-c*n+r*u)*d,t[8]=(a*n-r*o)*d,t):null}function s(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],u=t[7],c=t[8];return e*(c*o-a*u)+n*(-c*i+a*s)+r*(u*i-o*s)}function u(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=n[0],p=n[1],d=n[2],A=n[3],g=n[4],m=n[5],y=n[6],v=n[7],_=n[8];return t[0]=f*r+p*a+d*c,t[1]=f*i+p*s+d*l,t[2]=f*o+p*u+d*h,t[3]=A*r+g*a+m*c,t[4]=A*i+g*s+m*l,t[5]=A*o+g*u+m*h,t[6]=y*r+v*a+_*c,t[7]=y*i+v*s+_*l,t[8]=y*o+v*u+_*h,t}function c(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=n[0],p=n[1];return t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=u,t[6]=f*r+p*a+c,t[7]=f*i+p*s+l,t[8]=f*o+p*u+h,t}function l(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=Math.sin(n),p=Math.cos(n);return t[0]=p*r+f*a,t[1]=p*i+f*s,t[2]=p*o+f*u,t[3]=p*a-f*r,t[4]=p*s-f*i,t[5]=p*u-f*o,t[6]=c,t[7]=l,t[8]=h,t}function h(t,e,n){var r=n[0],i=n[1];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function f(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,s=r+r,u=i+i,c=n*a,l=r*a,h=r*s,f=i*a,p=i*s,d=i*u,A=o*a,g=o*s,m=o*u;return t[0]=1-h-d,t[3]=l-m,t[6]=f+g,t[1]=l+m,t[4]=1-c-d,t[7]=p-A,t[2]=f-g,t[5]=p+A,t[8]=1-c-h,t}},function(t,e,n){"use strict";n.d(e,"a",(function(){return x}));var r=n(3),i=n.n(r),o=n(4),a=n.n(o),s=n(0),u=n.n(s),c=n(154),l=n(50);function h(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function f(t){for(var e=1;e=0&&t[0]<=r&&t[1]>=0&&t[1]<=i;return o&&e&&e.stopPropagation(),o}},{key:"isFunctionKeyPressed",value:function(t){var e=t.srcEvent;return Boolean(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}},{key:"isDragging",value:function(){return this._interactionState.isDragging||!1}},{key:"blockEvents",value:function(t){var e=this,n=setTimeout((function(){e._eventStartBlocked===n&&(e._eventStartBlocked=null)}),t);this._eventStartBlocked=n}},{key:"setProps",value:function(t){t.dragMode&&(this.dragMode=t.dragMode),this.props=t,"transitionInterpolator"in t||(t.transitionInterpolator=this._getTransitionProps().transitionInterpolator),this.transitionManager.processViewStateChange(t);var e=t.inertia;this.inertia=Number.isFinite(e)?e:!0===e?300:0;var n=t.scrollZoom,r=void 0===n||n,i=t.dragPan,o=void 0===i||i,a=t.dragRotate,s=void 0===a||a,u=t.doubleClickZoom,c=void 0===u||u,l=t.touchZoom,h=void 0===l||l,f=t.touchRotate,p=void 0!==f&&f,d=t.keyboard,b=void 0===d||d,x=Boolean(this.onViewStateChange);this.toggleEvents(A,x&&r),this.toggleEvents(g,x&&(o||s)),this.toggleEvents(m,x&&(h||p)),this.toggleEvents(y,x&&p),this.toggleEvents(v,x&&c),this.toggleEvents(_,x&&b),this.scrollZoom=r,this.dragPan=o,this.dragRotate=s,this.doubleClickZoom=c,this.touchZoom=h,this.touchRotate=p,this.keyboard=b}},{key:"updateTransition",value:function(){this.transitionManager.updateTransition()}},{key:"toggleEvents",value:function(t,e){var n=this;this.eventManager&&t.forEach((function(t){n._events[t]!==e&&(n._events[t]=e,e?n.eventManager.on(t,n.handleEvent):n.eventManager.off(t,n.handleEvent))}))}},{key:"updateViewport",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=f(f({},t.getViewportProps()),e),i=this.controllerState!==t;if(this.state=t.getState(),this._setInteractionState(n),i){var o=this.controllerState&&this.controllerState.getViewportProps();this.onViewStateChange&&this.onViewStateChange({viewState:r,interactionState:this._interactionState,oldViewState:o})}}},{key:"_onTransition",value:function(t){this.onViewStateChange(f(f({},t),{},{interactionState:this._interactionState}))}},{key:"_setInteractionState",value:function(t){Object.assign(this._interactionState,t),this.onStateChange(this._interactionState)}},{key:"_onPanStart",value:function(t){var e=this.getCenter(t);if(!this.isPointInBounds(e,t))return!1;var n=this.isFunctionKeyPressed(t)||t.rightButton||!1;(this.invertPan||"pan"===this.dragMode)&&(n=!n);var r=this.controllerState[n?"panStart":"rotateStart"]({pos:e});return this._panMove=n,this.updateViewport(r,p,{isDragging:!0}),!0}},{key:"_onPan",value:function(t){return!!this.isDragging()&&(this._panMove?this._onPanMove(t):this._onPanRotate(t))}},{key:"_onPanEnd",value:function(t){return!!this.isDragging()&&(this._panMove?this._onPanMoveEnd(t):this._onPanRotateEnd(t))}},{key:"_onPanMove",value:function(t){if(!this.dragPan)return!1;var e=this.getCenter(t),n=this.controllerState.pan({pos:e});return this.updateViewport(n,p,{isDragging:!0,isPanning:!0}),!0}},{key:"_onPanMoveEnd",value:function(t){var e=this.inertia;if(this.dragPan&&e&&t.velocity){var n=this.getCenter(t),r=[n[0]+t.velocityX*e/2,n[1]+t.velocityY*e/2],i=this.controllerState.pan({pos:r}).panEnd();this.updateViewport(i,f(f({},this._getTransitionProps()),{},{transitionDuration:e,transitionEasing:d}),{isDragging:!1,isPanning:!0})}else{var o=this.controllerState.panEnd();this.updateViewport(o,null,{isDragging:!1,isPanning:!1})}return!0}},{key:"_onPanRotate",value:function(t){if(!this.dragRotate)return!1;var e=this.getCenter(t),n=this.controllerState.rotate({pos:e});return this.updateViewport(n,p,{isDragging:!0,isRotating:!0}),!0}},{key:"_onPanRotateEnd",value:function(t){var e=this.inertia;if(this.dragRotate&&e&&t.velocity){var n=this.getCenter(t),r=[n[0]+t.velocityX*e/2,n[1]+t.velocityY*e/2],i=this.controllerState.rotate({pos:r}).rotateEnd();this.updateViewport(i,f(f({},this._getTransitionProps()),{},{transitionDuration:e,transitionEasing:d}),{isDragging:!1,isRotating:!0})}else{var o=this.controllerState.rotateEnd();this.updateViewport(o,null,{isDragging:!1,isRotating:!1})}return!0}},{key:"_onWheel",value:function(t){if(!this.scrollZoom)return!1;t.srcEvent.preventDefault();var e=this.getCenter(t);if(!this.isPointInBounds(e,t))return!1;var n=!0===this.scrollZoom?{}:this.scrollZoom,r=n.speed,i=void 0===r?.01:r,o=n.smooth,a=void 0!==o&&o,s=t.delta,u=2/(1+Math.exp(-Math.abs(s*i)));s<0&&0!==u&&(u=1/u);var c=this.controllerState.zoom({pos:e,scale:u});return this.updateViewport(c,f(f({},this._getTransitionProps({around:e})),{},{transitionDuration:a?250:1}),{isZooming:!0,isPanning:!0}),!0}},{key:"_onTriplePanStart",value:function(t){var e=this.getCenter(t);if(!this.isPointInBounds(e,t))return!1;var n=this.controllerState.rotateStart({pos:e});return this.updateViewport(n,p,{isDragging:!0}),!0}},{key:"_onTriplePan",value:function(t){if(!this.touchRotate)return!1;if(!this.isDragging())return!1;var e=this.getCenter(t);e[0]-=t.deltaX;var n=this.controllerState.rotate({pos:e});return this.updateViewport(n,p,{isDragging:!0,isRotating:!0}),!0}},{key:"_onTriplePanEnd",value:function(t){if(!this.isDragging())return!1;var e=this.inertia;if(this.touchRotate&&e&&t.velocityY){var n=this.getCenter(t),r=[n[0],n[1]+=t.velocityY*e/2],i=this.controllerState.rotate({pos:r});this.updateViewport(i,f(f({},this._getTransitionProps()),{},{transitionDuration:e,transitionEasing:d}),{isDragging:!1,isRotating:!0}),this.blockEvents(e)}else{var o=this.controllerState.rotateEnd();this.updateViewport(o,null,{isDragging:!1,isRotating:!1})}return!0}},{key:"_onPinchStart",value:function(t){var e=this.getCenter(t);if(!this.isPointInBounds(e,t))return!1;var n=this.controllerState.zoomStart({pos:e}).rotateStart({pos:e});return b._startPinchRotation=t.rotation,b._lastPinchEvent=t,this.updateViewport(n,p,{isDragging:!0}),!0}},{key:"_onPinch",value:function(t){if(!this.touchZoom&&!this.touchRotate)return!1;if(!this.isDragging())return!1;var e=this.controllerState;if(this.touchZoom){var n=t.scale,r=this.getCenter(t);e=e.zoom({pos:r,scale:n})}if(this.touchRotate){var i=t.rotation;e=e.rotate({deltaAngleX:b._startPinchRotation-i})}return this.updateViewport(e,p,{isDragging:!0,isPanning:this.touchZoom,isZooming:this.touchZoom,isRotating:this.touchRotate}),b._lastPinchEvent=t,!0}},{key:"_onPinchEnd",value:function(t){if(!this.isDragging())return!1;var e=this.inertia,n=b._lastPinchEvent;if(this.touchZoom&&e&&n&&t.scale!==n.scale){var r=this.getCenter(t),i=this.controllerState.rotateEnd(),o=Math.log2(t.scale),a=(o-Math.log2(n.scale))/(t.deltaTime-n.deltaTime),s=Math.pow(2,o+a*e/2);i=i.zoom({pos:r,scale:s}).zoomEnd(),this.updateViewport(i,f(f({},this._getTransitionProps({around:r})),{},{transitionDuration:e,transitionEasing:d}),{isDragging:!1,isPanning:this.touchZoom,isZooming:this.touchZoom,isRotating:!1}),this.blockEvents(e)}else{var u=this.controllerState.zoomEnd().rotateEnd();this.updateViewport(u,null,{isDragging:!1,isPanning:!1,isZooming:!1,isRotating:!1})}return b._startPinchRotation=null,b._lastPinchEvent=null,!0}},{key:"_onDoubleTap",value:function(t){if(!this.doubleClickZoom)return!1;var e=this.getCenter(t);if(!this.isPointInBounds(e,t))return!1;var n=this.isFunctionKeyPressed(t),r=this.controllerState.zoom({pos:e,scale:n?.5:2});return this.updateViewport(r,this._getTransitionProps({around:e}),{isZooming:!0,isPanning:!0}),this.blockEvents(100),!0}},{key:"_onKeyDown",value:function(t){if(!this.keyboard)return!1;var e,n=this.isFunctionKeyPressed(t),r=!0===this.keyboard?{}:this.keyboard,i=r.zoomSpeed,o=r.moveSpeed,a=r.rotateSpeedX,s=r.rotateSpeedY,u=this.controllerState,c={};switch(t.srcEvent.code){case"Minus":e=n?u.zoomOut(i).zoomOut(i):u.zoomOut(i),c.isZooming=!0;break;case"Equal":e=n?u.zoomIn(i).zoomIn(i):u.zoomIn(i),c.isZooming=!0;break;case"ArrowLeft":n?(e=u.rotateLeft(a),c.isRotating=!0):(e=u.moveLeft(o),c.isPanning=!0);break;case"ArrowRight":n?(e=u.rotateRight(a),c.isRotating=!0):(e=u.moveRight(o),c.isPanning=!0);break;case"ArrowUp":n?(e=u.rotateUp(s),c.isRotating=!0):(e=u.moveUp(o),c.isPanning=!0);break;case"ArrowDown":n?(e=u.rotateDown(s),c.isRotating=!0):(e=u.moveDown(o),c.isPanning=!0);break;default:return!1}return this.updateViewport(e,this._getTransitionProps(),c),!0}},{key:"_getTransitionProps",value:function(t){var e=this.transition;return e&&e.transitionInterpolator?t?f(f({},e),{},{transitionInterpolator:new l.a(f(f(f({},t),e.transitionInterpolator.opts),{},{makeViewport:this.controllerState.makeViewport}))}):e:p}}]),t}()},function(t,e,n){"use strict";var r=n(28),i=n.n(r),o=n(0),a=n.n(o),s=n(3),u=n.n(s),c=n(4),l=n.n(c),h=n(42),f=/([0-9]+\.?[0-9]*)(%|px)/;function p(t){switch(i()(t)){case"number":return{position:t,relative:!1};case"string":var e=f.exec(t);if(e&&e.length>=3){var n="%"===e[2],r=parseFloat(e[1]);return{position:n?r/100:r,relative:n}}default:throw new Error("Could not parse position string ".concat(t))}}function d(t,e){return t.relative?Math.round(t.position*e):t.position}var A=n(61),g=n(29);function m(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function y(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};const{id:e=Object(r.c)("geometry"),drawMode:n=o.TRIANGLES,attributes:i={},indices:a=null,vertexCount:s=null}=t;this.id=e,this.drawMode=0|n,this.attributes={},this.userData={},this._setAttributes(i,a),this.vertexCount=s||this._calculateVertexCount(this.attributes,this.indices)}get mode(){return this.drawMode}getVertexCount(){return this.vertexCount}getAttributes(){return this.indices?{indices:this.indices,...this.attributes}:this.attributes}_print(t){return"Geometry ".concat(this.id," attribute ").concat(t)}_setAttributes(t,e){e&&(this.indices=ArrayBuffer.isView(e)?{value:e,size:1}:e);for(const e in t){let n=t[e];n=ArrayBuffer.isView(n)?{value:n}:n,Object(i.a)(ArrayBuffer.isView(n.value),"".concat(this._print(e),": must be typed array or object with value as typed array")),"POSITION"!==e&&"positions"!==e||n.size||(n.size=3),"indices"===e?(Object(i.a)(!this.indices),this.indices=n):this.attributes[e]=n}return this.indices&&void 0!==this.indices.isIndexed&&(this.indices=Object.assign({},this.indices),delete this.indices.isIndexed),this}_calculateVertexCount(t,e){if(e)return e.value.length;let n=1/0;for(const e in t){const r=t[e],{value:i,size:o,constant:a}=r;!a&&i&&o>=1&&(n=Math.min(n,i.length/o))}return Object(i.a)(Number.isFinite(n)),n}}},function(t,e,n){"use strict";function r(t,e){if(t===e)return!0;if(!t||!e)return!1;for(var n in t){var i=t[n],o=e[n];if(!(i===o||Array.isArray(i)&&Array.isArray(o)&&r(i,o)))return!1}return!0}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";var r=n(22);const i=/^data:([-\w.]+\/[-\w.+]+)(;|,)/,o=/^([-\w.]+\/[-\w.+]+)/;function a(t){const e=o.exec(t);return e?e[1]:t}function s(t){const e=i.exec(t);return e?e[1]:""}n.d(e,"b",(function(){return c})),n.d(e,"a",(function(){return l}));const u=/\?.*/;function c(t){if(Object(r.j)(t)){const e=h(t.url||"");return{url:e,type:a(t.headers.get("content-type")||"")||s(e)}}return Object(r.b)(t)?{url:h(t.name||""),type:t.type||""}:"string"==typeof t?{url:h(t),type:s(t)}:{url:"",type:""}}function l(t){return Object(r.j)(t)?t.headers["content-length"]||-1:Object(r.b)(t)?t.size:"string"==typeof t?t.length:t instanceof ArrayBuffer||ArrayBuffer.isView(t)?t.byteLength:-1}function h(t){return t.replace(u,"")}},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var r=n(53),i=n(10),o=n(143);const a={offset:0,stride:0,type:5126,size:1,divisor:0,normalized:!1,integer:!1},s={deprecatedProps:{instanced:"divisor",isInstanced:"divisor"}};class u{static getBytesPerElement(t){return Object(r.c)(t.type||5126).BYTES_PER_ELEMENT}static getBytesPerVertex(t){Object(i.a)(t.size);return Object(r.c)(t.type||5126).BYTES_PER_ELEMENT*t.size}static resolve(){for(var t=arguments.length,e=new Array(t),n=0;nthis._assign(t)),Object.freeze(this)}toString(){return JSON.stringify(this)}get BYTES_PER_ELEMENT(){return u.getBytesPerElement(this)}get BYTES_PER_VERTEX(){return u.getBytesPerVertex(this)}_assign(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t=Object(o.a)("Accessor",t,s),void 0!==t.type&&(this.type=t.type,5124!==t.type&&5125!==t.type||(this.integer=!0)),void 0!==t.size&&(this.size=t.size),void 0!==t.offset&&(this.offset=t.offset),void 0!==t.stride&&(this.stride=t.stride),void 0!==t.normalized&&(this.normalized=t.normalized),void 0!==t.integer&&(this.integer=t.integer),void 0!==t.divisor&&(this.divisor=t.divisor),void 0!==t.buffer&&(this.buffer=t.buffer),void 0!==t.index&&("boolean"==typeof t.index?this.index=t.index?1:0:this.index=t.index),void 0!==t.instanced&&(this.divisor=t.instanced?1:0),void 0!==t.isInstanced&&(this.divisor=t.isInstanced?1:0),this}}},function(t,e,n){"use strict";n.d(e,"b",(function(){return p})),n.d(e,"a",(function(){return d})),n.d(e,"d",(function(){return y})),n.d(e,"c",(function(){return b}));var r=n(9),i=n.n(r),o=n(245),a=n.n(o),s=n(37);function u(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0,u=(o=o||n.length)-i;if(u<=0)return e;for(var c=e,l=0;l=1&&t[0].length>=2&&Number.isFinite(t[0][0])}(t)){var p,d=0,A=u(t.entries());try{for(A.s();!(p=A.n()).done;){var y=i()(p.value,2),v=y[0];d=g(n,d,y[1],e,0===v?l:h),r.push(d)}}catch(t){A.e(t)}finally{A.f()}return r.pop(),{positions:n,holeIndices:r}}return g(n,0,t,e,l),n}function v(t,e,n){for(var r=t.length/3,i=0,o=0;oA&&f>g||(A>g?(n||(o=o.slice()),_(o,0,2,1)):(n||(o=o.slice()),_(o,1,2,0)))}return a()(o,i,e)}},function(t,e,n){"use strict";n.r(e);var r=n(103),i=n(20);async function o(t,e,n){if("number"==typeof t)return await i.a._readToArrayBuffer(t,e,n);t instanceof Blob||(t=new Blob([t]));const r=t.slice(e,e+n);return await async function(t){return await new Promise((e,n)=>{const r=new FileReader;r.onload=t=>{var n;return e(null==t||null===(n=t.target)||void 0===n?void 0:n.result)},r.onerror=t=>n(t),r.readAsArrayBuffer(t)})}(r)}var a=n(100),s=n(72),u=n(85),c=n(106);function l(t,e={}){if(t=Object(a.b)(t),!s.c){const n=i.a.readFileSync(t,e);return"string"!=typeof n?Object(u.d)(n):n}return e.nothrow||Object(c.a)(!1),null}var h=n(101);async function f(t,e,n){t=Object(a.b)(t),s.c||await i.a.writeFile(t,Object(h.c)(e),{flag:"w"}),Object(c.a)(!1)}function p(t,e,n){t=Object(a.b)(t),s.c||i.a.writeFileSync(t,Object(h.c)(e),{flag:"w"}),Object(c.a)(!1)}var d=n(46),A=n(112),g=n(79),m=n(105),y=n(45),v=n(126),_=n(91),b=n(62);function x(t,e,n,r){Object(c.a)(!r||"object"==typeof r),Array.isArray(e)||Object(y.a)(e)||(r=void 0,n=e,e=void 0),n=n||{};const i=e,o=Object(_.b)(i,r),a=Object(g.b)(t,o,n);if(!a)return null;n=Object(d.d)(n,a,o);const{url:s}=Object(b.b)(t);return function(t,e,n,r){if(e=Object(v.b)(e,t,n),t.parseTextSync&&"string"==typeof e)return t.parseTextSync(e,n);if(t.parseSync&&e instanceof ArrayBuffer)return t.parseSync(e,n,r);throw new Error("".concat(t.name," loader: 'parseSync' not supported by this loader, use 'parse' instead. ").concat(r.url||""))}(a,t,n,r=Object(_.a)({url:s,parseSync:x,parse:()=>{throw new Error("parseSync called parse")},loaders:e},n))}var w=n(156);async function E(t,e,n,r){Object(c.a)(!r||"object"==typeof r),Array.isArray(e)||Object(y.a)(e)||(r=void 0,n=e,e=void 0),t=await t,n=n||{};const{url:i}=Object(b.b)(t),o=await Object(g.a)(t,e,n);return o?(n=Object(d.d)(n,o,e,i),r=Object(_.a)({url:i,parseInBatches:E,parse:m.a,loaders:e},n,r),await async function(t,e,n,r){const i=await async function(t,e,n,r){const i=await Object(v.c)(e,n),o=await async function(t,e=[]){let n=t;for await(const t of e)n=t(n);return n}(i,(null==n?void 0:n.transforms)||[]);if(t.parseInBatches)return t.parseInBatches(o,n,r);return async function*(){const e=await Object(w.a)(o),i=await Object(m.a)(e,t,{...n,mimeType:t.mimeTypes[0]},r),a={mimeType:t.mimeTypes[0],shape:Array.isArray(i)?"row-table":"unknown",batchType:"data",data:i,length:Array.isArray(i)?i.length:1};yield a}()}(t,e,n,r);if(!n.metadata)return i;const o={batchType:"metadata",metadata:{_loader:t,_context:r},data:[],bytesUsed:0};return async function*(t){yield o,yield*t}(i)}(o,t,n,r)):null}var O=n(215);function S(t,e,n,r){Array.isArray(e)||Object(y.a)(e)||(void 0,n=e,e=null);const i=Object(d.a)(n||{});if(!Array.isArray(t))return T(t,e,n,i);return t.map(t=>T(t,e,n,i))}async function T(t,e,n,r){if("string"==typeof t){const i=t,o=await r(i);return await E(o,e,n)}return await E(t,e,n)}var C=n(220),P=n(134),M=n(190),I=n(179);async function B(t,e,n={},r={}){const i=Object(M.a)(t),o=P.a.getWorkerFarm(n),{source:a}=n,s={name:i,source:a};a||(s.url=Object(M.b)(t,n));const u=o.getWorkerPool(s),c=n.jobName||t.name,l=await u.startJob(c,R.bind(null,r)),h=Object(I.b)(n);l.postMessage("process",{input:e,options:h});return(await l.result).result}async function R(t,e,n,r){switch(n){case"done":e.done(r);break;case"error":e.error(new Error(r.error));break;case"process":const{id:i,input:o,options:a}=r;try{if(!t.process)return void e.postMessage("error",{id:i,error:"Worker not set up to process on main thread"});const n=await t.process(o,a);e.postMessage("done",{id:i,result:n})}catch(t){const n=t instanceof Error?t.message:"unknown error";e.postMessage("error",{id:i,error:n})}break;default:console.warn("process-on-worker: unknown message ".concat(n))}}async function k(t,e,n){if(n={...Object(d.b)(),...n},Object(C.a)(e,n))return await B(e,t,n);if(e.encode)return await e.encode(t,n);if(e.encodeSync)return e.encodeSync(t,n);if(e.encodeText)return(new TextEncoder).encode(await e.encodeText(t,n));if(e.encodeInBatches){const r=j(t,e,n),i=[];for await(const t of r)i.push(t);return Object(u.b)(...i)}if(!s.c&&e.encodeURLtoURL){const i=z("input");await f(i,t);const o=z("output"),a=await F(i,o,e,n);return(await Object(r.a)(a)).arrayBuffer()}throw new Error("Writer could not encode data")}function D(t,e,n){if(e.encodeSync)return e.encodeSync(t,n);throw new Error("Writer could not synchronously encode data")}async function L(t,e,n){if(e.text&&e.encodeText)return await e.encodeText(t,n);if(e.text&&(e.encode||e.encodeInBatches)){const r=await k(t,e,n);return(new TextDecoder).decode(r)}throw new Error("Writer could not encode data as text")}function j(t,e,n){if(e.encodeInBatches){const r=function(t){return[{table:t,start:0,end:t.length}]}(t);return e.encodeInBatches(r,n)}throw new Error("Writer could not encode data in batches")}async function F(t,e,n,r){if(t=Object(a.b)(t),e=Object(a.b)(e),s.c||!n.encodeURLtoURL)throw new Error;return await n.encodeURLtoURL(t,e,r)}function z(t){return"/tmp/".concat(t)}async function U(t,e,n,r){const i=await k(t,n,r);return await f(e,i)}function N(t,e,n,r){return p(e,D(t,n,r))}var G=n(221),V=n(127);function H(t,e){const n=t[Symbol.asyncIterator]?t[Symbol.asyncIterator]():t[Symbol.iterator]();return new ReadableStream({type:"bytes",async pull(t){try{const{done:e,value:r}=await n.next();e?t.close():t.enqueue(new Uint8Array(r))}catch(e){t.error(e)}},async cancel(){var t;await(null==n||null===(t=n.return)||void 0===t?void 0:t.call(n))}},{highWaterMark:2**24,...e})}const W={name:"Null loader",id:"null",module:"core",version:"3.2.10",worker:!0,mimeTypes:["application/x.empty"],extensions:["null"],tests:[()=>!1],options:{null:{}}};function q(t,e,n){return e.null.echoParameters?{arrayBuffer:t,options:e,context:n=n&&JSON.parse(JSON.stringify(n))}:null}const X={name:"Null loader",id:"null",module:"core",version:"3.2.10",mimeTypes:["application/x.empty"],extensions:["null"],parse:async(t,e,n)=>q(t,e,n),parseSync:q,parseInBatches:async function*(t,e,n){for await(const r of t)yield q(r,e,n)},tests:[()=>!1],options:{null:{echoParameters:!1}}};var Z=n(222);async function J(t,e,n=(()=>{}),r=(()=>{})){if(!(t=await t).ok)return t;const i=t.body;if(!i)return t;const o=t.headers.get("content-length")||0,a=o&&parseInt(o);if(!(o>0))return t;if("undefined"==typeof ReadableStream||!i.getReader)return t;const s=new ReadableStream({async start(t){const o=i.getReader();await async function t(e,n,r,i,o,a,s){try{const{done:u,value:c}=await n.read();if(u)return a(),void e.close();r+=c.byteLength;const l=Math.round(r/i*100);o(l,{loadedBytes:r,totalBytes:i}),e.enqueue(c),await t(e,n,r,i,o,a,s)}catch(t){e.error(t),s(t)}}(t,o,0,a,e,n,r)}});return new Response(s)}var Q=n(2);class K{constructor(t,e){Object(Q.a)(this,"_fetch",void 0),Object(Q.a)(this,"files",{}),Object(Q.a)(this,"lowerCaseFiles",{}),Object(Q.a)(this,"usedFiles",{}),this._fetch=(null==e?void 0:e.fetch)||fetch;for(let e=0;e0&&d>0&&(s[h++]=l-o,s[h++]=l-o-1,s[h++]=l-1,s[h++]=l-o,s[h++]=l-1,s[h++]=l),l++}return{vertexCount:a,positions:c,indices:s,texCoords:u}}function I(t,e,n){return Object(T.g)(Object(T.g)(t[0],t[1],n),Object(T.g)(t[3],t[2],n),e)}var B="\n#define SHADER_NAME bitmap-layer-fragment-shader\n\n#ifdef GL_ES\nprecision highp float;\n#endif\n\nuniform sampler2D bitmapTexture;\n\nvarying vec2 vTexCoord;\nvarying vec2 vTexPos;\n\nuniform float desaturate;\nuniform vec4 transparentColor;\nuniform vec3 tintColor;\nuniform float opacity;\n\nuniform float coordinateConversion;\nuniform vec4 bounds;\n\n/* projection utils */\nconst float TILE_SIZE = 512.0;\nconst float PI = 3.1415926536;\nconst float WORLD_SCALE = TILE_SIZE / PI / 2.0;\n\n// from degrees to Web Mercator\nvec2 lnglat_to_mercator(vec2 lnglat) {\n float x = lnglat.x;\n float y = clamp(lnglat.y, -89.9, 89.9);\n return vec2(\n radians(x) + PI,\n PI + log(tan(PI * 0.25 + radians(y) * 0.5))\n ) * WORLD_SCALE;\n}\n\n// from Web Mercator to degrees\nvec2 mercator_to_lnglat(vec2 xy) {\n xy /= WORLD_SCALE;\n return degrees(vec2(\n xy.x - PI,\n atan(exp(xy.y - PI)) * 2.0 - PI * 0.5\n ));\n}\n/* End projection utils */\n\n// apply desaturation\nvec3 color_desaturate(vec3 color) {\n float luminance = (color.r + color.g + color.b) * 0.333333333;\n return mix(color, vec3(luminance), desaturate);\n}\n\n// apply tint\nvec3 color_tint(vec3 color) {\n return color * tintColor;\n}\n\n// blend with background color\nvec4 apply_opacity(vec3 color, float alpha) {\n if (transparentColor.a == 0.0) {\n return vec4(color, alpha);\n }\n float blendedAlpha = alpha + transparentColor.a * (1.0 - alpha);\n float highLightRatio = alpha / blendedAlpha;\n vec3 blendedRGB = mix(transparentColor.rgb, color, highLightRatio);\n return vec4(blendedRGB, blendedAlpha);\n}\n\nvec2 getUV(vec2 pos) {\n return vec2(\n (pos.x - bounds[0]) / (bounds[2] - bounds[0]),\n (pos.y - bounds[3]) / (bounds[1] - bounds[3])\n );\n}\n\n".concat("\nvec3 packUVsIntoRGB(vec2 uv) {\n // Extract the top 8 bits. We want values to be truncated down so we can add a fraction\n vec2 uv8bit = floor(uv * 256.);\n\n // Calculate the normalized remainders of u and v parts that do not fit into 8 bits\n // Scale and clamp to 0-1 range\n vec2 uvFraction = fract(uv * 256.);\n vec2 uvFraction4bit = floor(uvFraction * 16.);\n\n // Remainder can be encoded in blue channel, encode as 4 bits for pixel coordinates\n float fractions = uvFraction4bit.x + uvFraction4bit.y * 16.;\n\n return vec3(uv8bit, fractions) / 255.;\n}\n","\n\nvoid main(void) {\n vec2 uv = vTexCoord;\n if (coordinateConversion < -0.5) {\n vec2 lnglat = mercator_to_lnglat(vTexPos);\n uv = getUV(lnglat);\n } else if (coordinateConversion > 0.5) {\n vec2 commonPos = lnglat_to_mercator(vTexPos);\n uv = getUV(commonPos);\n }\n vec4 bitmapColor = texture2D(bitmapTexture, uv);\n\n gl_FragColor = apply_opacity(color_tint(color_desaturate(bitmapColor.rgb)), bitmapColor.a * opacity);\n\n geometry.uv = uv;\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n\n if (picking_uActive) {\n // Since instance information is not used, we can use picking color for pixel index\n gl_FragColor.rgb = packUVsIntoRGB(uv);\n }\n}\n");function R(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function k(t){for(var e=1;e 0.5) {\n vTexPos = geometry.worldPosition.xy;\n }\n\n vec4 color = vec4(0.0);\n DECKGL_FILTER_COLOR(color, geometry);\n}\n",fs:B,modules:[b.a,x.a]})}},{key:"initializeState",value:function(){var t=this,e=this.getAttributeManager();e.remove(["instancePickingColors"]);e.add({indices:{size:1,isIndexed:!0,update:function(e){return e.value=t.state.mesh.indices},noAlloc:!0},positions:{size:3,type:5130,fp64:this.use64bitPositions(),update:function(e){return e.value=t.state.mesh.positions},noAlloc:!0},texCoords:{size:2,update:function(e){return e.value=t.state.mesh.texCoords},noAlloc:!0}})}},{key:"updateState",value:function(t){var e=t.props,n=t.oldProps,r=t.changeFlags,i=this.getAttributeManager();if(r.extensionsChanged){var o,a=this.context.gl;null===(o=this.state.model)||void 0===o||o.delete(),this.state.model=this._getModel(a),i.invalidateAll()}if(e.bounds!==n.bounds){var s=this.state.mesh,u=this._createMesh();for(var c in this.state.model.setVertexCount(u.vertexCount),u)s&&s[c]!==u[c]&&i.invalidate(c);this.setState(k({mesh:u},this._getCoordinateUniforms()))}else e._imageCoordinateSystem!==n._imageCoordinateSystem&&this.setState(this._getCoordinateUniforms())}},{key:"getPickingInfo",value:function(t){var e=this.props.image,n=t.info;if(!n.color||!e)return n.bitmap=null,n;var r=e,i=r.width,a=r.height;n.index=0;var s,u,c,l,h,f=(s=n.color,u=o()(s,3),c=u[0],l=u[1],h=u[2],[(c+(15&h)/16)/256,(l+(240&h)/256)/256]),p=[Math.floor(f[0]*i),Math.floor(f[1]*a)];return n.bitmap={size:{width:i,height:a},uv:f,pixel:p},n}},{key:"disablePickingIndex",value:function(){this.setState({disablePicking:!0})}},{key:"restorePickingColors",value:function(){this.setState({disablePicking:!1})}},{key:"_updateAutoHighlight",value:function(t){h()(m()(n.prototype),"_updateAutoHighlight",this).call(this,k(k({},t),{},{color:this.encodePickingColor(0)}))}},{key:"_createMesh",value:function(){var t=this.props.bounds,e=t;return F(t)&&(e=[[t[0],t[1]],[t[0],t[3]],[t[2],t[3]],[t[2],t[1]]]),M(e,this.context.viewport.resolution)}},{key:"_getModel",value:function(t){return t?new E.a(t,k(k({},this.getShaders()),{},{id:this.props.id,geometry:new O.a({drawMode:4,vertexCount:6}),isInstanced:!1})):null}},{key:"draw",value:function(t){var e=t.uniforms,n=t.moduleParameters,r=this.state,i=r.model,o=r.coordinateConversion,a=r.bounds,s=r.disablePicking,u=this.props,c=u.image,l=u.desaturate,h=u.transparentColor,f=u.tintColor;n.pickingActive&&s||c&&i&&i.setUniforms(e).setUniforms({bitmapTexture:c,desaturate:l,transparentColor:h.map((function(t){return t/255})),tintColor:f.slice(0,3).map((function(t){return t/255})),coordinateConversion:o,bounds:a}).draw()}},{key:"_getCoordinateUniforms",value:function(){var t=_.a.LNGLAT,e=_.a.CARTESIAN,n=_.a.DEFAULT,r=this.props._imageCoordinateSystem;if(r!==n){var i=this.props.bounds;if(!F(i))throw new Error("_imageCoordinateSystem only supports rectangular bounds");var o=this.context.viewport.resolution?t:e;if((r=r===t?t:e)===t&&o===e)return{coordinateConversion:-1,bounds:i};if(r===e&&o===t){var a=Object(S.l)([i[0],i[1]]),s=Object(S.l)([i[2],i[3]]);return{coordinateConversion:1,bounds:[a[0],a[1],s[0],s[1]]}}}return{coordinateConversion:0,bounds:[0,0,0,0]}}}]),n}(w.a);function F(t){return Number.isFinite(t[0])}v()(j,"layerName","BitmapLayer"),v()(j,"defaultProps",L);var z=n(118),U=n(231),N=n(232),G=n(168),V=n(167),H=n(223),W=n(117),q=n(224),X=n(229),Z=n(166),J=n(116),Q=n(171),K=n(169);n.d(e,"ArcLayer",(function(){return r.a})),n.d(e,"BitmapLayer",(function(){return j})),n.d(e,"IconLayer",(function(){return z.a})),n.d(e,"LineLayer",(function(){return U.a})),n.d(e,"PointCloudLayer",(function(){return N.a})),n.d(e,"ScatterplotLayer",(function(){return G.a})),n.d(e,"ColumnLayer",(function(){return V.a})),n.d(e,"GridCellLayer",(function(){return H.a})),n.d(e,"PathLayer",(function(){return W.a})),n.d(e,"PolygonLayer",(function(){return q.a})),n.d(e,"GeoJsonLayer",(function(){return X.a})),n.d(e,"TextLayer",(function(){return Z.a})),n.d(e,"SolidPolygonLayer",(function(){return J.a})),n.d(e,"_MultiIconLayer",(function(){return Q.a})),n.d(e,"_TextBackgroundLayer",(function(){return K.a}))},function(t,e,n){"use strict";function r(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return!0};return Array.isArray(t)?i(t,e,[]):e(t)?[t]:[]}function i(t,e,n){for(var r=-1;++r0&&void 0!==arguments[0]?arguments[0]:{};i()(this,t),u()(this,"_pool",[]),u()(this,"opts",{overAlloc:2,poolSize:100}),this.setOptions(e)}return a()(t,[{key:"setOptions",value:function(t){Object.assign(this.opts,t)}},{key:"allocate",value:function(t,e,n){var r=n.size,i=void 0===r?1:r,o=n.type,a=n.padding,s=void 0===a?0:a,u=n.copy,c=void 0!==u&&u,l=n.initialize,h=void 0!==l&&l,f=n.maxCount,p=o||t&&t.constructor||Float32Array,d=e*i+s;if(ArrayBuffer.isView(t)){if(d<=t.length)return t;if(d*t.BYTES_PER_ELEMENT<=t.buffer.byteLength)return new p(t.buffer,0,d)}var A=1/0;f&&(A=f*i+s);var g=this._allocate(p,d,h,A);return t&&c?g.set(t):h||g.fill(0,0,4),this._release(t),g}},{key:"release",value:function(t){this._release(t)}},{key:"_allocate",value:function(t,e,n,r){var i=Math.max(Math.ceil(e*this.opts.overAlloc),1);i>r&&(i=r);var o=this._pool,a=t.BYTES_PER_ELEMENT*i,s=o.findIndex((function(t){return t.byteLength>=a}));if(s>=0){var u=new t(o.splice(s,1)[0],0,i);return n&&u.fill(0),u}return new t(i)}},{key:"_release",value:function(t){if(ArrayBuffer.isView(t)){var e=this._pool,n=t.buffer,r=n.byteLength,i=e.findIndex((function(t){return t.byteLength>=r}));i<0?e.push(n):(i>0||e.lengththis.opts.poolSize&&e.shift()}}}]),t}();e.a=new c},function(t,e){function n(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}t.exports=function(t){return function(){var e=this,r=arguments;return new Promise((function(i,o){var a=t.apply(e,r);function s(t){n(a,i,o,s,u,"next",t)}function u(t){n(a,i,o,s,u,"throw",t)}s(void 0)}))}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return i})),n.d(e,"d",(function(){return o})),n.d(e,"c",(function(){return a}));n(15);function r(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=e[9],f=e[10],p=e[11],d=e[12],A=e[13],g=e[14],m=e[15],y=n*s-r*a,v=n*u-i*a,_=n*c-o*a,b=r*u-i*s,x=r*c-o*s,w=i*c-o*u,E=l*A-h*d,O=l*g-f*d,S=l*m-p*d,T=h*g-f*A,C=h*m-p*A,P=f*m-p*g,M=y*P-v*C+_*T+b*S-x*O+w*E;return M?(M=1/M,t[0]=(s*P-u*C+c*T)*M,t[1]=(i*C-r*P-o*T)*M,t[2]=(A*w-g*x+m*b)*M,t[3]=(f*x-h*w-p*b)*M,t[4]=(u*S-a*P-c*O)*M,t[5]=(n*P-i*S+o*O)*M,t[6]=(g*_-d*w-m*v)*M,t[7]=(l*w-f*_+p*v)*M,t[8]=(a*C-s*S+c*E)*M,t[9]=(r*S-n*C-o*E)*M,t[10]=(d*x-A*_+m*y)*M,t[11]=(h*_-l*x-p*y)*M,t[12]=(s*O-a*T-u*E)*M,t[13]=(n*T-r*O+i*E)*M,t[14]=(A*v-d*b-g*y)*M,t[15]=(l*b-h*v+f*y)*M,t):null}function i(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=e[9],p=e[10],d=e[11],A=e[12],g=e[13],m=e[14],y=e[15],v=n[0],_=n[1],b=n[2],x=n[3];return t[0]=v*r+_*s+b*h+x*A,t[1]=v*i+_*u+b*f+x*g,t[2]=v*o+_*c+b*p+x*m,t[3]=v*a+_*l+b*d+x*y,v=n[4],_=n[5],b=n[6],x=n[7],t[4]=v*r+_*s+b*h+x*A,t[5]=v*i+_*u+b*f+x*g,t[6]=v*o+_*c+b*p+x*m,t[7]=v*a+_*l+b*d+x*y,v=n[8],_=n[9],b=n[10],x=n[11],t[8]=v*r+_*s+b*h+x*A,t[9]=v*i+_*u+b*f+x*g,t[10]=v*o+_*c+b*p+x*m,t[11]=v*a+_*l+b*d+x*y,v=n[12],_=n[13],b=n[14],x=n[15],t[12]=v*r+_*s+b*h+x*A,t[13]=v*i+_*u+b*f+x*g,t[14]=v*o+_*c+b*p+x*m,t[15]=v*a+_*l+b*d+x*y,t}function o(t,e,n){var r,i,o,a,s,u,c,l,h,f,p,d,A=n[0],g=n[1],m=n[2];return e===t?(t[12]=e[0]*A+e[4]*g+e[8]*m+e[12],t[13]=e[1]*A+e[5]*g+e[9]*m+e[13],t[14]=e[2]*A+e[6]*g+e[10]*m+e[14],t[15]=e[3]*A+e[7]*g+e[11]*m+e[15]):(r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=e[9],p=e[10],d=e[11],t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=u,t[6]=c,t[7]=l,t[8]=h,t[9]=f,t[10]=p,t[11]=d,t[12]=r*A+s*g+h*m+e[12],t[13]=i*A+u*g+f*m+e[13],t[14]=o*A+c*g+p*m+e[14],t[15]=a*A+l*g+d*m+e[15]),t}function a(t,e,n){var r=n[0],i=n[1],o=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";(function(t,r){n.d(e,"e",(function(){return o})),n.d(e,"f",(function(){return a})),n.d(e,"b",(function(){return s})),n.d(e,"a",(function(){return u})),n.d(e,"c",(function(){return c})),n.d(e,"d",(function(){return l}));const i={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:void 0!==t&&t,document:"undefined"!=typeof document&&document},o=i.self||i.window||i.global||{},a=i.window||i.self||i.global||{},s=i.global||i.self||i.window||{},u=i.document||{},c=Boolean("object"!=typeof r||"[object process]"!==String(r)||r.browser),l="function"==typeof importScripts,h=void 0!==r&&r.version&&/v([0-9]*)/.exec(r.version);h&&parseFloat(h[1])}).call(this,n(71),n(44))},function(t,e,n){"use strict";n.d(e,"a",(function(){return w}));var r=n(3),i=n.n(r),o=n(4),a=n.n(o),s=n(27),u=n.n(s),c=n(5),l=n.n(c),h=n(6),f=n.n(h),p=n(1),d=n.n(p),A=n(0),g=n.n(A),m=n(178),y=n(7),v=n(188);function _(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return b(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return b(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function b(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={},i=function i(o,a){var s,u=o.props._offset,c=o.id,l=o.parent&&o.parent.id;if(l&&!(l in n)&&i(o.parent,!1),l in r){var h=r[l]=r[l]||t(n[l],n);s=h(o,a),r[c]=h}else Number.isFinite(u)?(s=u+(n[l]||0),r[c]=null):s=e;return a&&s>=e&&(e=s+1),n[c]=s,s};return i}(this._lastRenderIndex+1),l={layer:n[0],viewport:t,isPicking:r.startsWith("picking"),renderPass:r,cullRect:o},h={},f=0;f1&&void 0!==arguments[1]?arguments[1]:{};const{colorBufferFloat:n,colorBufferHalfFloat:r}=e;let i=!0;return n&&(i=Boolean(t.getExtension("EXT_color_buffer_float")||t.getExtension("WEBGL_color_buffer_float")||t.getExtension("OES_texture_float"))),r&&(i=i&&Boolean(t.getExtension("EXT_color_buffer_float")||t.getExtension("EXT_color_buffer_half_float"))),i}static getDefaultFramebuffer(t){return t.luma=t.luma||{},t.luma.defaultFramebuffer=t.luma.defaultFramebuffer||new f(t,{id:"default-framebuffer",handle:null,attachments:{}}),t.luma.defaultFramebuffer}get MAX_COLOR_ATTACHMENTS(){const t=Object(r.a)(this.gl);return t.getParameter(t.MAX_COLOR_ATTACHMENTS)}get MAX_DRAW_BUFFERS(){const t=Object(r.a)(this.gl);return t.getParameter(t.MAX_DRAW_BUFFERS)}constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(t,e),this.width=null,this.height=null,this.attachments={},this.readBuffer=36064,this.drawBuffers=[36064],this.ownResources=[],this.initialize(e),Object.seal(this)}get color(){return this.attachments[36064]||null}get texture(){return this.attachments[36064]||null}get depth(){return this.attachments[36096]||this.attachments[33306]||null}get stencil(){return this.attachments[36128]||this.attachments[33306]||null}initialize(t){let{width:e=1,height:n=1,attachments:r=null,color:i=!0,depth:o=!0,stencil:a=!1,check:s=!0,readBuffer:u,drawBuffers:c}=t;if(Object(h.a)(e>=0&&n>=0,"Width and height need to be integers"),this.width=e,this.height=n,r)for(const t in r){const i=r[t];(Array.isArray(i)?i[0]:i).resize({width:e,height:n})}else r=this._createDefaultAttachments(i,o,a,e,n);this.update({clearAttachments:!0,attachments:r,readBuffer:u,drawBuffers:c}),r&&s&&this.checkStatus()}delete(){for(const t of this.ownResources)t.delete();return super.delete(),this}update(t){let{attachments:e={},readBuffer:n,drawBuffers:r,clearAttachments:i=!1,resizeAttachments:o=!0}=t;this.attach(e,{clearAttachments:i,resizeAttachments:o});const{gl:a}=this,s=a.bindFramebuffer(36160,this.handle);return n&&this._setReadBuffer(n),r&&this._setDrawBuffers(r),a.bindFramebuffer(36160,s||null),this}resize(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{width:e,height:n}=t;if(null===this.handle)return Object(h.a)(void 0===e&&void 0===n),this.width=this.gl.drawingBufferWidth,this.height=this.gl.drawingBufferHeight,this;void 0===e&&(e=this.gl.drawingBufferWidth),void 0===n&&(n=this.gl.drawingBufferHeight),e!==this.width&&n!==this.height&&r.k.log(2,"Resizing framebuffer ".concat(this.id," to ").concat(e,"x").concat(n))();for(const t in this.attachments)this.attachments[t].resize({width:e,height:n});return this.width=e,this.height=n,this}attach(t){let{clearAttachments:e=!1,resizeAttachments:n=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r={};e&&Object.keys(this.attachments).forEach(t=>{r[t]=null}),Object.assign(r,t);const i=this.gl.bindFramebuffer(36160,this.handle);for(const t in r){Object(h.a)(void 0!==t,"Misspelled framebuffer binding point?");const e=Number(t),i=r[e];let o=i;if(o)if(o instanceof a.a)this._attachRenderbuffer({attachment:e,renderbuffer:o});else if(Array.isArray(i)){const[t,n=0,r=0]=i;o=t,this._attachTexture({attachment:e,texture:t,layer:n,level:r})}else this._attachTexture({attachment:e,texture:o,layer:0,level:0});else this._unattach(e);n&&o&&o.resize({width:this.width,height:this.height})}this.gl.bindFramebuffer(36160,i||null),Object.assign(this.attachments,t),Object.keys(this.attachments).filter(t=>!this.attachments[t]).forEach(t=>{delete this.attachments[t]})}checkStatus(){const{gl:t}=this,e=this.getStatus();if(36053!==e)throw new Error(function(t){return(f.STATUS||{})[t]||"Framebuffer error ".concat(t)}(e));return this}getStatus(){const{gl:t}=this,e=t.bindFramebuffer(36160,this.handle),n=t.checkFramebufferStatus(36160);return t.bindFramebuffer(36160,e||null),n}clear(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{color:e,depth:n,stencil:r,drawBuffers:i=[]}=t,o=this.gl.bindFramebuffer(36160,this.handle);return(e||n||r)&&Object(s.a)(this.gl,{color:e,depth:n,stencil:r}),i.forEach((t,e)=>{Object(s.b)(this.gl,{drawBuffer:e,value:t})}),this.gl.bindFramebuffer(36160,o||null),this}readPixels(){return r.k.error("Framebuffer.readPixels() is no logner supported, use readPixelsToArray(framebuffer)")(),null}readPixelsToBuffer(){return r.k.error("Framebuffer.readPixelsToBuffer()is no logner supported, use readPixelsToBuffer(framebuffer)")(),null}copyToDataUrl(){return r.k.error("Framebuffer.copyToDataUrl() is no logner supported, use copyToDataUrl(framebuffer)")(),null}copyToImage(){return r.k.error("Framebuffer.copyToImage() is no logner supported, use copyToImage(framebuffer)")(),null}copyToTexture(){return r.k.error("Framebuffer.copyToTexture({...}) is no logner supported, use copyToTexture(source, target, opts})")(),null}blit(){return r.k.error("Framebuffer.blit({...}) is no logner supported, use blit(source, target, opts)")(),null}invalidate(t){let{attachments:e=[],x:n=0,y:i=0,width:o,height:a}=t;const s=Object(r.a)(this.gl),u=s.bindFramebuffer(36008,this.handle);return 0===n&&0===i&&void 0===o&&void 0===a?s.invalidateFramebuffer(36008,e):s.invalidateFramebuffer(36008,e,n,i,o,a),s.bindFramebuffer(36008,u),this}getAttachmentParameter(t,e,n){let r=this._getAttachmentParameterFallback(e);return null===r&&(this.gl.bindFramebuffer(36160,this.handle),r=this.gl.getFramebufferAttachmentParameter(36160,t,e),this.gl.bindFramebuffer(36160,null)),n&&r>1e3&&(r=Object(l.a)(this.gl,r)),r}getAttachmentParameters(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:36064,e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.constructor.ATTACHMENT_PARAMETERS||[];const r={};for(const i of n){r[e?Object(l.a)(this.gl,i):i]=this.getAttachmentParameter(t,i,e)}return r}getParameters(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const e=Object.keys(this.attachments),n={};for(const r of e){const e=Number(r);n[t?Object(l.a)(this.gl,e):e]=this.getAttachmentParameters(e,t)}return n}show(){return"undefined"!=typeof window&&window.open(Object(u.a)(this),"luma-debug-texture"),this}log(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(t>r.k.level||"undefined"==typeof window)return this;e=e||"Framebuffer ".concat(this.id);const n=Object(u.a)(this,{targetMaxHeight:100});return r.k.image({logLevel:t,message:e,image:n},e)(),this}bind(){let{target:t=36160}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.gl.bindFramebuffer(t,this.handle),this}unbind(){let{target:t=36160}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.gl.bindFramebuffer(t,null),this}_createDefaultAttachments(t,e,n,r,i){let s=null;return t&&(s=s||{},s[36064]=new o.a(this.gl,{id:"".concat(this.id,"-color0"),pixels:null,format:6408,type:5121,width:r,height:i,mipmaps:!1,parameters:{10241:9729,10240:9729,10242:33071,10243:33071}}),this.ownResources.push(s[36064])),e&&n?(s=s||{},s[33306]=new a.a(this.gl,{id:"".concat(this.id,"-depth-stencil"),format:35056,width:r,height:111}),this.ownResources.push(s[33306])):e?(s=s||{},s[36096]=new a.a(this.gl,{id:"".concat(this.id,"-depth"),format:33189,width:r,height:i}),this.ownResources.push(s[36096])):n&&Object(h.a)(!1),s}_unattach(t){const e=this.attachments[t];e&&(e instanceof a.a?this.gl.framebufferRenderbuffer(36160,t,36161,null):this.gl.framebufferTexture2D(36160,t,3553,null,0),delete this.attachments[t])}_attachRenderbuffer(t){let{attachment:e=36064,renderbuffer:n}=t;const{gl:r}=this;r.framebufferRenderbuffer(36160,e,36161,n.handle),this.attachments[e]=n}_attachTexture(t){let{attachment:e=36064,texture:n,layer:i,level:o}=t;const{gl:a}=this;switch(a.bindTexture(n.target,n.handle),n.target){case 35866:case 32879:Object(r.a)(a).framebufferTextureLayer(36160,e,n.target,o,i);break;case 34067:const t=function(t){return t<34069?t+34069:t}(i);a.framebufferTexture2D(36160,e,t,n.handle,o);break;case 3553:a.framebufferTexture2D(36160,e,3553,n.handle,o);break;default:Object(h.a)(!1,"Illegal texture type")}a.bindTexture(n.target,null),this.attachments[e]=n}_setReadBuffer(t){const e=Object(r.g)(this.gl);e?e.readBuffer(t):Object(h.a)(36064===t||1029===t,"Multiple render targets not supported"),this.readBuffer=t}_setDrawBuffers(t){const{gl:e}=this,n=Object(r.a)(e);if(n)n.drawBuffers(t);else{const n=e.getExtension("WEBGL_draw_buffers");n?n.drawBuffersWEBGL(t):Object(h.a)(1===t.length&&(36064===t[0]||1029===t[0]),"Multiple render targets not supported")}this.drawBuffers=t}_getAttachmentParameterFallback(t){const e=Object(c.a)(this.gl);switch(t){case 36052:return e.WEBGL2?null:0;case 33298:case 33299:case 33300:case 33301:case 33302:case 33303:return e.WEBGL2?null:8;case 33297:return e.WEBGL2?null:5125;case 33296:return e.WEBGL2||e.EXT_sRGB?null:9729;default:return null}}_createHandle(){return this.gl.createFramebuffer()}_deleteHandle(){this.gl.deleteFramebuffer(this.handle)}_bindHandle(t){return this.gl.bindFramebuffer(36160,t)}}f.ATTACHMENT_PARAMETERS=[36049,36048,33296,33298,33299,33300,33301,33302,33303]},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(3),i=n.n(r),o=n(4),a=n.n(o),s=function(){function t(e){i()(this,t),this._inProgress=!1,this._handle=null,this._timeline=e,this.time=0,this.settings={duration:0}}return a()(t,[{key:"inProgress",get:function(){return this._inProgress}},{key:"start",value:function(t){var e,n;this.cancel(),this.settings=t,this._inProgress=!0,null===(e=(n=this.settings).onStart)||void 0===e||e.call(n,this)}},{key:"end",value:function(){var t,e;this._inProgress&&(this._timeline.removeChannel(this._handle),this._handle=null,this._inProgress=!1,null===(t=(e=this.settings).onEnd)||void 0===t||t.call(e,this))}},{key:"cancel",value:function(){var t,e;this._inProgress&&(null===(t=(e=this.settings).onInterrupt)||void 0===t||t.call(e,this),this._timeline.removeChannel(this._handle),this._handle=null,this._inProgress=!1)}},{key:"update",value:function(){var t,e;if(!this._inProgress)return!1;if(null===this._handle){var n=this._timeline,r=this.settings;this._handle=n.addChannel({delay:n.getTime(),duration:r.duration})}return this.time=this._timeline.getTime(this._handle),this._onUpdate(),null===(t=(e=this.settings).onUpdate)||void 0===t||t.call(e,this),this._timeline.isFinished(this._handle)&&this.end(),!0}},{key:"_onUpdate",value:function(){}}]),t}()},function(t,e,n){"use strict";var r=n(2),i=n(137);class o{constructor(t,e){Object(r.a)(this,"name",void 0),Object(r.a)(this,"type",void 0),Object(r.a)(this,"sampleSize",1),Object(r.a)(this,"time",void 0),Object(r.a)(this,"count",void 0),Object(r.a)(this,"samples",void 0),Object(r.a)(this,"lastTiming",void 0),Object(r.a)(this,"lastSampleTime",void 0),Object(r.a)(this,"lastSampleCount",void 0),Object(r.a)(this,"_count",0),Object(r.a)(this,"_time",0),Object(r.a)(this,"_samples",0),Object(r.a)(this,"_startTime",0),Object(r.a)(this,"_timerPending",!1),this.name=t,this.type=e,this.reset()}setSampleSize(t){return this.sampleSize=t,this}incrementCount(){return this.addCount(1),this}decrementCount(){return this.subtractCount(1),this}addCount(t){return this._count+=t,this._samples++,this._checkSampling(),this}subtractCount(t){return this._count-=t,this._samples++,this._checkSampling(),this}addTime(t){return this._time+=t,this.lastTiming=t,this._samples++,this._checkSampling(),this}timeStart(){return this._startTime=Object(i.a)(),this._timerPending=!0,this}timeEnd(){return this._timerPending?(this.addTime(Object(i.a)()-this._startTime),this._timerPending=!1,this._checkSampling(),this):this}getSampleAverageCount(){return this.sampleSize>0?this.lastSampleCount/this.sampleSize:0}getSampleAverageTime(){return this.sampleSize>0?this.lastSampleTime/this.sampleSize:0}getSampleHz(){return this.lastSampleTime>0?this.sampleSize/(this.lastSampleTime/1e3):0}getAverageCount(){return this.samples>0?this.count/this.samples:0}getAverageTime(){return this.samples>0?this.time/this.samples:0}getHz(){return this.time>0?this.samples/(this.time/1e3):0}reset(){return this.time=0,this.count=0,this.samples=0,this.lastTiming=0,this.lastSampleTime=0,this.lastSampleCount=0,this._count=0,this._time=0,this._samples=0,this._startTime=0,this._timerPending=!1,this}_checkSampling(){this._samples===this.sampleSize&&(this.lastSampleTime=this._time,this.lastSampleCount=this._count,this.count+=this._count,this.time+=this._time,this.samples+=this._samples,this._time=0,this._count=0,this._samples=0)}}class a{constructor(t){Object(r.a)(this,"id",void 0),Object(r.a)(this,"stats",{}),this.id=t.id,this.stats={},this._initializeStats(t.stats),Object.seal(this)}get(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"count";return this._getOrCreate({name:t,type:e})}get size(){return Object.keys(this.stats).length}reset(){for(const t in this.stats)this.stats[t].reset();return this}forEach(t){for(const e in this.stats)t(this.stats[e])}getTable(){const t={};return this.forEach(e=>{t[e.name]={time:e.time||0,count:e.count||0,average:e.getAverageTime()||0,hz:e.getHz()||0}}),t}_initializeStats(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach(t=>this._getOrCreate(t))}_getOrCreate(t){if(!t||!t.name)return null;const{name:e,type:n}=t;return this.stats[e]||(this.stats[e]=t instanceof o?t:new o(e,n)),this.stats[e]}}n.d(e,"a",(function(){return a}))},function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return i}));const r="vs",i="fs"},function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));var r,i=n(177),o=n(23),a=n(55),s=n(26),u=n(34),c=n(25),l=n(36);!function(t){t[t.COL0ROW0=0]="COL0ROW0",t[t.COL0ROW1=1]="COL0ROW1",t[t.COL0ROW2=2]="COL0ROW2",t[t.COL0ROW3=3]="COL0ROW3",t[t.COL1ROW0=4]="COL1ROW0",t[t.COL1ROW1=5]="COL1ROW1",t[t.COL1ROW2=6]="COL1ROW2",t[t.COL1ROW3=7]="COL1ROW3",t[t.COL2ROW0=8]="COL2ROW0",t[t.COL2ROW1=9]="COL2ROW1",t[t.COL2ROW2=10]="COL2ROW2",t[t.COL2ROW3=11]="COL2ROW3",t[t.COL3ROW0=12]="COL3ROW0",t[t.COL3ROW1=13]="COL3ROW1",t[t.COL3ROW2=14]="COL3ROW2",t[t.COL3ROW3=15]="COL3ROW3"}(r||(r={}));const h=45*Math.PI/180,f=1,p=.1,d=500,A=Object.freeze([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);class g extends i.a{static get IDENTITY(){return function(){y||(y=new g,Object.freeze(y));return y}()}static get ZERO(){return function(){m||(m=new g([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),Object.freeze(m));return m}()}get ELEMENTS(){return 16}get RANK(){return 4}get INDICES(){return r}constructor(t){super(-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0),1===arguments.length&&Array.isArray(t)?this.copy(t):this.identity()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this[4]=t[4],this[5]=t[5],this[6]=t[6],this[7]=t[7],this[8]=t[8],this[9]=t[9],this[10]=t[10],this[11]=t[11],this[12]=t[12],this[13]=t[13],this[14]=t[14],this[15]=t[15],this.check()}set(t,e,n,r,i,o,a,s,u,c,l,h,f,p,d,A){return this[0]=t,this[1]=e,this[2]=n,this[3]=r,this[4]=i,this[5]=o,this[6]=a,this[7]=s,this[8]=u,this[9]=c,this[10]=l,this[11]=h,this[12]=f,this[13]=p,this[14]=d,this[15]=A,this.check()}setRowMajor(t,e,n,r,i,o,a,s,u,c,l,h,f,p,d,A){return this[0]=t,this[1]=i,this[2]=u,this[3]=f,this[4]=e,this[5]=o,this[6]=c,this[7]=p,this[8]=n,this[9]=a,this[10]=l,this[11]=d,this[12]=r,this[13]=s,this[14]=h,this[15]=A,this.check()}toRowMajor(t){return t[0]=this[0],t[1]=this[4],t[2]=this[8],t[3]=this[12],t[4]=this[1],t[5]=this[5],t[6]=this[9],t[7]=this[13],t[8]=this[2],t[9]=this[6],t[10]=this[10],t[11]=this[14],t[12]=this[3],t[13]=this[7],t[14]=this[11],t[15]=this[15],t}identity(){return this.copy(A)}fromObject(t){return this.check()}fromQuaternion(t){return s.c(this,t),this.check()}frustum(t){const{left:e,right:n,bottom:r,top:i,near:o=p,far:a=d}=t;return a===1/0?function(t,e,n,r,i,o){const a=2*o/(n-e),s=2*o/(i-r),u=(n+e)/(n-e),c=(i+r)/(i-r),l=-2*o;t[0]=a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=u,t[9]=c,t[10]=-1,t[11]=-1,t[12]=0,t[13]=0,t[14]=l,t[15]=0}(this,e,n,r,i,o):s.d(this,e,n,r,i,o,a),this.check()}lookAt(t){const{eye:e,center:n=[0,0,0],up:r=[0,1,0]}=t;return s.g(this,e,n,r),this.check()}ortho(t){const{left:e,right:n,bottom:r,top:i,near:o=p,far:a=d}=t;return s.i(this,e,n,r,i,o,a),this.check()}orthographic(t){const{fovy:e=h,aspect:n=f,focalDistance:r=1,near:i=p,far:o=d}=t;v(e);const a=e/2,s=r*Math.tan(a),u=s*n;return this.ortho({left:-u,right:u,bottom:-s,top:s,near:i,far:o})}perspective(t){const{fovy:e=45*Math.PI/180,aspect:n=1,near:r=.1,far:i=500}=t;return v(e),s.j(this,e,n,r,i),this.check()}determinant(){return s.a(this)}getScale(t=[-0,-0,-0]){return t[0]=Math.sqrt(this[0]*this[0]+this[1]*this[1]+this[2]*this[2]),t[1]=Math.sqrt(this[4]*this[4]+this[5]*this[5]+this[6]*this[6]),t[2]=Math.sqrt(this[8]*this[8]+this[9]*this[9]+this[10]*this[10]),t}getTranslation(t=[-0,-0,-0]){return t[0]=this[12],t[1]=this[13],t[2]=this[14],t}getRotation(t,e){t=t||[-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0],e=e||[-0,-0,-0];const n=this.getScale(e),r=1/n[0],i=1/n[1],o=1/n[2];return t[0]=this[0]*r,t[1]=this[1]*i,t[2]=this[2]*o,t[3]=0,t[4]=this[4]*r,t[5]=this[5]*i,t[6]=this[6]*o,t[7]=0,t[8]=this[8]*r,t[9]=this[9]*i,t[10]=this[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}getRotationMatrix3(t,e){t=t||[-0,-0,-0,-0,-0,-0,-0,-0,-0],e=e||[-0,-0,-0];const n=this.getScale(e),r=1/n[0],i=1/n[1],o=1/n[2];return t[0]=this[0]*r,t[1]=this[1]*i,t[2]=this[2]*o,t[3]=this[4]*r,t[4]=this[5]*i,t[5]=this[6]*o,t[6]=this[8]*r,t[7]=this[9]*i,t[8]=this[10]*o,t}transpose(){return s.q(this,this),this.check()}invert(){return s.f(this,this),this.check()}multiplyLeft(t){return s.h(this,t,this),this.check()}multiplyRight(t){return s.h(this,this,t),this.check()}rotateX(t){return s.l(this,this,t),this.check()}rotateY(t){return s.m(this,this,t),this.check()}rotateZ(t){return s.n(this,this,t),this.check()}rotateXYZ(t){return this.rotateX(t[0]).rotateY(t[1]).rotateZ(t[2])}rotateAxis(t,e){return s.k(this,this,t,e),this.check()}scale(t){return s.o(this,this,Array.isArray(t)?t:[t,t,t]),this.check()}translate(t){return s.p(this,this,t),this.check()}transform(t,e){return 4===t.length?(e=l.n(e||[-0,-0,-0,-0],t,this),Object(o.b)(e,4),e):this.transformAsPoint(t,e)}transformAsPoint(t,e){const{length:n}=t;let r;switch(n){case 2:r=u.j(e||[-0,-0],t,this);break;case 3:r=c.p(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return Object(o.b)(r,t.length),r}transformAsVector(t,e){let n;switch(t.length){case 2:n=Object(a.a)(e||[-0,-0],t,this);break;case 3:n=Object(a.c)(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return Object(o.b)(n,t.length),n}transformPoint(t,e){return this.transformAsPoint(t,e)}transformVector(t,e){return this.transformAsPoint(t,e)}transformDirection(t,e){return this.transformAsVector(t,e)}makeRotationX(t){return this.identity().rotateX(t)}makeTranslation(t,e,n){return this.identity().translate([t,e,n])}}let m,y;function v(t){if(t>2*Math.PI)throw Error("expected radians")}},function(t,e,n){"use strict";var r=n(20),i=n(85),o=n(45);const a=new(n(298).a)({id:"loaders.gl"});var s=n(62),u=n(112),c=n(22);n.d(e,"a",(function(){return h})),n.d(e,"b",(function(){return f}));const l=/\.([^.]+)$/;async function h(t,e=[],n,r){if(!p(t))return null;let i=f(t,e,{...n,nothrow:!0},r);if(i)return i;if(Object(c.b)(t)&&(i=f(t=await t.slice(0,10).arrayBuffer(),e,n,r)),!(i||null!=n&&n.nothrow))throw new Error(d(t));return i}function f(t,e=[],n,r){if(!p(t))return null;if(e&&!Array.isArray(e))return Object(o.b)(e);let i=[];e&&(i=i.concat(e)),null!=n&&n.ignoreRegisteredLoaders||i.push(...Object(u.b)()),function(t){for(const e of t)Object(o.b)(e)}(i);const c=function(t,e,n,r){const{url:i,type:o}=Object(s.b)(t),u=i||(null==r?void 0:r.url);let c=null,h="";null!=n&&n.mimeType&&(c=A(e,null==n?void 0:n.mimeType),h="match forced by supplied MIME type ".concat(null==n?void 0:n.mimeType));var f;c=c||function(t,e){const n=e&&l.exec(e),r=n&&n[1];return r?function(t,e){e=e.toLowerCase();for(const n of t)for(const t of n.extensions)if(t.toLowerCase()===e)return n;return null}(t,r):null}(e,u),h=h||(c?"matched url ".concat(u):""),c=c||A(e,o),h=h||(c?"matched MIME type ".concat(o):""),c=c||function(t,e){if(!e)return null;for(const n of t)if("string"==typeof e){if(g(e,n))return n}else if(ArrayBuffer.isView(e)){if(m(e.buffer,e.byteOffset,n))return n}else if(e instanceof ArrayBuffer){if(m(e,0,n))return n}return null}(e,t),h=h||(c?"matched initial data ".concat(y(t)):""),c=c||A(e,null==n?void 0:n.fallbackMimeType),h=h||(c?"matched fallback MIME type ".concat(o):""),h&&a.log(1,"selectLoader selected ".concat(null===(f=c)||void 0===f?void 0:f.name,": ").concat(h,"."));return c}(t,i,n,r);if(!(c||null!=n&&n.nothrow))throw new Error(d(t));return c}function p(t){return!(t instanceof Response&&204===t.status)}function d(t){const{url:e,type:n}=Object(s.b)(t);let i="No valid loader found (";i+=e?"".concat(r.b.filename(e),", "):"no url provided, ",i+="MIME type: ".concat(n?'"'.concat(n,'"'):"not provided",", ");const o=t?y(t):"";return i+=o?' first bytes: "'.concat(o,'"'):"first bytes: not available",i+=")",i}function A(t,e){for(const n of t){if(n.mimeTypes&&n.mimeTypes.includes(e))return n;if(e==="application/x.".concat(n.id))return n}return null}function g(t,e){if(e.testText)return e.testText(t);return(Array.isArray(e.tests)?e.tests:[e.tests]).some(e=>t.startsWith(e))}function m(t,e,n){return(Array.isArray(n.tests)?n.tests:[n.tests]).some(r=>function(t,e,n,r){if(r instanceof ArrayBuffer)return Object(i.a)(r,t,r.byteLength);switch(typeof r){case"function":return r(t,n);case"string":const i=v(t,e,r.length);return r===i;default:return!1}}(t,e,n,r))}function y(t,e=5){if("string"==typeof t)return t.slice(0,e);if(ArrayBuffer.isView(t))return v(t.buffer,t.byteOffset,e);if(t instanceof ArrayBuffer){return v(t,0,e)}return""}function v(t,e,n){if(t.byteLengtht instanceof ArrayBuffer?new Uint8Array(t):t),n=e.reduce((t,e)=>t+e.byteLength,0),r=new Uint8Array(n);let i=0;for(const t of e)r.set(t,i),i+=t.byteLength;return r.buffer}function s(t,e,n){const r=void 0!==n?new Uint8Array(t).subarray(e,e+n):new Uint8Array(t).subarray(e);return new Uint8Array(r).buffer}},function(t,e,n){"use strict";n.d(e,"a",(function(){return P}));var r=n(9),i=n.n(r),o=n(3),a=n.n(o),s=n(4),u=n.n(s),c=n(27),l=n.n(c),h=n(8),f=n.n(h),p=n(5),d=n.n(p),A=n(6),g=n.n(A),m=n(1),y=n.n(m),v=n(0),_=n.n(v),b=n(42),x=n(19),w=n(92),E=n(13),O=n(78);function S(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function T(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};a()(this,n);var i,o=r.latitude,s=void 0===o?0:o,u=r.longitude,c=void 0===u?0:u,h=r.zoom,f=void 0===h?0:h,p=r.pitch,d=void 0===p?0:p,A=r.bearing,g=void 0===A?0:A,m=r.nearZMultiplier,y=void 0===m?.1:m,v=r.farZMultiplier,_=void 0===v?1.01:v,b=r.orthographic,w=void 0!==b&&b,S=r.projectionMatrix,C=r.repeat,P=void 0!==C&&C,M=r.worldOffset,I=void 0===M?0:M,B=r.position,R=r.padding,k=r.legacyMeterSizes,D=void 0!==k&&k,L=r.width,j=r.height,F=r.altitude,z=void 0===F?1.5:F,U=Math.pow(2,f);L=L||1,j=j||1;var N=null;if(S)z=S[5]/2,i=Object(x.b)(z);else{var G;if(r.fovy?(i=r.fovy,z=Object(x.e)(i)):i=Object(x.b)(z),R){var V=R.top,H=void 0===V?0:V,W=R.bottom,q=void 0===W?0:W;G=[0,Object(E.a)((H+j-q)/2,0,j)-j/2]}N=Object(x.j)({width:L,height:j,scale:U,center:B&&[0,0,B[2]*Object(x.o)(s)],offset:G,pitch:d,fovy:i,nearZMultiplier:y,farZMultiplier:_})}var X=Object(x.k)({height:j,pitch:d,bearing:g,scale:U,altitude:z});if(I){var Z=(new O.a).translate([512*I,0,0]);X=Z.multiplyLeft(X)}return(t=e.call(this,T(T(T({},r),{},{width:L,height:j,viewMatrix:X,longitude:c,latitude:s,zoom:f},N),{},{fovy:i,focalDistance:z}))).latitude=s,t.longitude=c,t.zoom=f,t.pitch=d,t.bearing=g,t.altitude=z,t.fovy=i,t.orthographic=w,t._subViewports=P?[]:null,t._pseudoMeters=D,Object.freeze(l()(t)),t}return u()(n,[{key:"subViewports",get:function(){if(this._subViewports&&!this._subViewports.length)for(var t=this.getBounds(),e=Math.floor((t[0]+180)/360),r=Math.ceil((t[2]-180)/360),i=e;i<=r;i++){var o=i?new n(T(T({},this),{},{worldOffset:i})):this;this._subViewports.push(o)}return this._subViewports}},{key:"projectPosition",value:function(t){if(this._pseudoMeters)return f()(y()(n.prototype),"projectPosition",this).call(this,t);var e=this.projectFlat(t),r=i()(e,2);return[r[0],r[1],(t[2]||0)*Object(x.o)(t[1])]}},{key:"unprojectPosition",value:function(t){if(this._pseudoMeters)return f()(y()(n.prototype),"unprojectPosition",this).call(this,t);var e=this.unprojectFlat(t),r=i()(e,2),o=r[0],a=r[1];return[o,a,(t[2]||0)/Object(x.o)(a)]}},{key:"addMetersToLngLat",value:function(t,e){return Object(x.a)(t,e)}},{key:"panByPosition",value:function(t,e){var n=Object(x.n)(e,this.pixelUnprojectionMatrix),r=this.projectFlat(t),o=w.a([],r,w.b([],n)),a=w.a([],this.center,o),s=this.unprojectFlat(a),u=i()(s,2);return{longitude:u[0],latitude:u[1]}}},{key:"getBounds",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=Object(x.f)(this,t.z||0);return[Math.min(e[0][0],e[1][0],e[2][0],e[3][0]),Math.min(e[0][1],e[1][1],e[2][1],e[3][1]),Math.max(e[0][0],e[1][0],e[2][0],e[3][0]),Math.max(e[0][1],e[1][1],e[2][1],e[3][1])]}},{key:"fitBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.width,i=this.height,o=Object(x.c)(T({width:r,height:i,bounds:t},e)),a=o.longitude,s=o.latitude,u=o.zoom;return new n({width:r,height:i,longitude:a,latitude:s,zoom:u})}}]),n}(b.a);_()(P,"displayName","WebMercatorViewport")},function(t,e,n){"use strict";n.r(e);var r=n(174),i=n.n(r);function o(t,e){if(!t)throw new Error("null row");if(!e)throw new Error("no headers");const n={};for(let r=0;r0;)this._settlers.dequeue().resolve({done:!0});this._closed=!0}[u](){return this}enqueue(t){if(this._closed)throw new Error("Closed");if(this._settlers.length>0){if(this._values.length>0)throw new Error("Illegal internal state");const e=this._settlers.dequeue();t instanceof Error?e.reject(t):e.resolve({value:t})}else this._values.enqueue(t)}next(){if(this._values.length>0){const t=this._values.dequeue();return t instanceof Error?Promise.reject(t):Promise.resolve({value:t})}if(this._closed){if(this._settlers.length>0)throw new Error("Illegal internal state");return Promise.resolve({done:!0})}return new Promise((t,e)=>{this._settlers.enqueue({resolve:t,reject:e})})}}class h{constructor(t,e){if(Object(s.a)(this,"schema",void 0),Object(s.a)(this,"options",void 0),Object(s.a)(this,"length",0),Object(s.a)(this,"rows",null),Object(s.a)(this,"cursor",0),Object(s.a)(this,"_headers",[]),this.options=e,this.schema=t,!Array.isArray(t)){this._headers=[];for(const e in t)this._headers[t[e].index]=t[e].name}}rowCount(){return this.length}addArrayRow(t,e){Number.isFinite(e)&&(this.cursor=e),this.rows=this.rows||new Array(100),this.rows[this.length]=t,this.length++}addObjectRow(t,e){Number.isFinite(e)&&(this.cursor=e),this.rows=this.rows||new Array(100),this.rows[this.length]=t,this.length++}getBatch(){let t=this.rows;if(!t)return null;t=t.slice(0,this.length),this.rows=null;return{shape:this.options.shape,batchType:"data",data:t,length:this.length,schema:this.schema,cursor:this.cursor}}}class f{constructor(t,e){if(Object(s.a)(this,"schema",void 0),Object(s.a)(this,"options",void 0),Object(s.a)(this,"length",0),Object(s.a)(this,"objectRows",null),Object(s.a)(this,"arrayRows",null),Object(s.a)(this,"cursor",0),Object(s.a)(this,"_headers",[]),this.options=e,this.schema=t,!Array.isArray(t)){this._headers=[];for(const e in t)this._headers[t[e].index]=t[e].name}}rowCount(){return this.length}addArrayRow(t,e){switch(Number.isFinite(e)&&(this.cursor=e),this.options.shape){case"object-row-table":const n=o(t,this._headers);this.addObjectRow(n,e);break;case"array-row-table":this.arrayRows=this.arrayRows||new Array(100),this.arrayRows[this.length]=t,this.length++}}addObjectRow(t,e){switch(Number.isFinite(e)&&(this.cursor=e),this.options.shape){case"array-row-table":const n=a(t,this._headers);this.addArrayRow(n,e);break;case"object-row-table":this.objectRows=this.objectRows||new Array(100),this.objectRows[this.length]=t,this.length++}}getBatch(){let t=this.arrayRows||this.objectRows;return t?(t=t.slice(0,this.length),this.arrayRows=null,this.objectRows=null,{shape:this.options.shape,batchType:"data",data:t,length:this.length,schema:this.schema,cursor:this.cursor}):null}}class p{constructor(t,e){Object(s.a)(this,"schema",void 0),Object(s.a)(this,"length",0),Object(s.a)(this,"allocated",0),Object(s.a)(this,"columns",{}),this.schema=t,this._reallocateColumns()}rowCount(){return this.length}addArrayRow(t){this._reallocateColumns();let e=0;for(const n in this.columns)this.columns[n][this.length]=t[e++];this.length++}addObjectRow(t){this._reallocateColumns();for(const e in t)this.columns[e][this.length]=t[e];this.length++}getBatch(){this._pruneColumns();const t=Array.isArray(this.schema)?this.columns:{};if(!Array.isArray(this.schema))for(const e in this.schema){const n=this.schema[e];t[n.name]=this.columns[n.index]}this.columns={};return{shape:"columnar-table",batchType:"data",data:t,schema:this.schema,length:this.length}}_reallocateColumns(){if(!(this.length0?this.allocated*=2:100,this.columns={};for(const t in this.schema){const e=this.schema[t],n=e.type||Float32Array,r=this.columns[e.index];if(r&&ArrayBuffer.isView(r)){const t=new n(this.allocated);t.set(r),this.columns[e.index]=t}else r?(r.length=this.allocated,this.columns[e.index]=r):this.columns[e.index]=new n(this.allocated)}}}_pruneColumns(){for(const[t,e]of Object.entries(this.columns))this.columns[t]=e.slice(0,this.length)}}const d={shape:"array-row-table",batchSize:"auto",batchDebounceMs:0,limit:0,_limitMB:0};class A{constructor(t,e){Object(s.a)(this,"schema",void 0),Object(s.a)(this,"options",void 0),Object(s.a)(this,"aggregator",null),Object(s.a)(this,"batchCount",0),Object(s.a)(this,"bytesUsed",0),Object(s.a)(this,"isChunkComplete",!1),Object(s.a)(this,"lastBatchEmittedMs",Date.now()),Object(s.a)(this,"totalLength",0),Object(s.a)(this,"totalBytes",0),Object(s.a)(this,"rowBytes",0),this.schema=t,this.options={...d,...e}}limitReached(){var t,e;return!!(Boolean(null===(t=this.options)||void 0===t?void 0:t.limit)&&this.totalLength>=this.options.limit)||!!(Boolean(null===(e=this.options)||void 0===e?void 0:e._limitMB)&&this.totalBytes/1e6>=this.options._limitMB)}addRow(t){this.limitReached()||(this.totalLength++,this.rowBytes=this.rowBytes||this._estimateRowMB(t),this.totalBytes+=this.rowBytes,Array.isArray(t)?this.addArrayRow(t):this.addObjectRow(t))}addArrayRow(t){if(!this.aggregator){const t=this._getTableBatchType();this.aggregator=new t(this.schema,this.options)}this.aggregator.addArrayRow(t)}addObjectRow(t){if(!this.aggregator){const t=this._getTableBatchType();this.aggregator=new t(this.schema,this.options)}this.aggregator.addObjectRow(t)}chunkComplete(t){t instanceof ArrayBuffer&&(this.bytesUsed+=t.byteLength),"string"==typeof t&&(this.bytesUsed+=t.length),this.isChunkComplete=!0}getFullBatch(t){return this._isFull()?this._getBatch(t):null}getFinalBatch(t){return this._getBatch(t)}_estimateRowMB(t){return Array.isArray(t)?8*t.length:8*Object.keys(t).length}_isFull(){if(!this.aggregator||0===this.aggregator.rowCount())return!1;if("auto"===this.options.batchSize){if(!this.isChunkComplete)return!1}else if(this.options.batchSize>this.aggregator.rowCount())return!1;return!(this.options.batchDebounceMs>Date.now()-this.lastBatchEmittedMs)&&(this.isChunkComplete=!1,this.lastBatchEmittedMs=Date.now(),!0)}_getBatch(t){if(!this.aggregator)return null;null!=t&&t.bytesUsed&&(this.bytesUsed=t.bytesUsed);const e=this.aggregator.getBatch();return e.count=this.batchCount,e.bytesUsed=this.bytesUsed,Object.assign(e,t),this.batchCount++,this.aggregator=null,e}_getTableBatchType(){switch(this.options.shape){case"row-table":return h;case"array-row-table":case"object-row-table":return f;case"columnar-table":return p;case"arrow-table":if(!A.ArrowBatch)throw new Error("TableBatchBuilder");return A.ArrowBatch;default:throw new Error("TableBatchBuilder")}}}Object(s.a)(A,"ArrowBatch",void 0);
+/* @license
+Papa Parse
+v5.0.0-beta.0
+https://github.com/mholt/PapaParse
+License: MIT
+*/
+const g={parse:function(t,e,n){var r=(e=e||{}).dynamicTyping||!1;E(r)&&(e.dynamicTypingFunction=r,r={});if(e.dynamicTyping=r,e.transform=!!E(e.transform)&&e.transform,e.worker&&g.WORKERS_SUPPORTED){var i=newWorker();return i.userStep=e.step,i.userChunk=e.chunk,i.userComplete=e.complete,i.userError=e.error,e.step=E(e.step),e.chunk=E(e.chunk),e.complete=E(e.complete),e.error=E(e.error),delete e.worker,void i.postMessage({input:t,config:e,workerId:i.id})}var o=null;"string"==typeof t&&(o=new v(e));o||(o=new n(e));return o.stream(t)},unparse:function(t,e){var n=!1,r=!0,i=",",o="\r\n",a='"',s=a+a,u=!1,c=null;!function(){if("object"!=typeof e)return;"string"!=typeof e.delimiter||g.BAD_DELIMITERS.filter((function(t){return-1!==e.delimiter.indexOf(t)})).length||(i=e.delimiter);("boolean"==typeof e.quotes||Array.isArray(e.quotes))&&(n=e.quotes);"boolean"!=typeof e.skipEmptyLines&&"string"!=typeof e.skipEmptyLines||(u=e.skipEmptyLines);"string"==typeof e.newline&&(o=e.newline);"string"==typeof e.quoteChar&&(a=e.quoteChar);"boolean"==typeof e.header&&(r=e.header);if(Array.isArray(e.columns)){if(0===e.columns.length)throw new Error("Option columns is empty");c=e.columns}void 0!==e.escapeChar&&(s=e.escapeChar+a)}();var l=new RegExp(b(a),"g");"string"==typeof t&&(t=JSON.parse(t));if(Array.isArray(t)){if(!t.length||Array.isArray(t[0]))return f(null,t,u);if("object"==typeof t[0])return f(c||h(t[0]),t,u)}else if("object"==typeof t)return"string"==typeof t.data&&(t.data=JSON.parse(t.data)),Array.isArray(t.data)&&(t.fields||(t.fields=t.meta&&t.meta.fields),t.fields||(t.fields=Array.isArray(t.data[0])?t.fields:h(t.data[0])),Array.isArray(t.data[0])||"object"==typeof t.data[0]||(t.data=[t.data])),f(t.fields||[],t.data||[],u);throw new Error("Unable to serialize unrecognized input");function h(t){if("object"!=typeof t)return[];var e=[];for(var n in t)e.push(n);return e}function f(t,e,n){var a="";"string"==typeof t&&(t=JSON.parse(t)),"string"==typeof e&&(e=JSON.parse(e));var s=Array.isArray(t)&&t.length>0,u=!Array.isArray(e[0]);if(s&&r){for(var c=0;c0&&(a+=i),a+=p(t[c],c);e.length>0&&(a+=o)}for(var l=0;l0&&!d&&(a+=i);var v=s&&u?t[y]:y;a+=p(e[l][v],y)}l0&&!d)&&(a+=o)}}return a}function p(t,e){return null==t?"":t.constructor===Date?JSON.stringify(t).slice(1,25):(t=t.toString().replace(l,s),"boolean"==typeof n&&n||Array.isArray(n)&&n[e]||function(t,e){for(var n=0;n-1)return!0;return!1}(t,g.BAD_DELIMITERS)||t.indexOf(i)>-1||" "===t.charAt(0)||" "===t.charAt(t.length-1)?a+t+a:t)}},RECORD_SEP:String.fromCharCode(30),UNIT_SEP:String.fromCharCode(31),BYTE_ORDER_MARK:"\ufeff",BAD_DELIMITERS:["\r","\n",'"',"\ufeff"],WORKERS_SUPPORTED:!1,NODE_STREAM_INPUT:1,LocalChunkSize:10485760,RemoteChunkSize:5242880,DefaultDelimiter:",",Parser:x,ParserHandle:_,ChunkStreamer:y,StringStreamer:v};var m=g;function y(t){this._handle=null,this._finished=!1,this._completed=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(t){var e=w(t);e.chunkSize=parseInt(e.chunkSize),t.step||t.chunk||(e.chunkSize=null);this._handle=new _(e),this._handle.streamer=this,this._config=e}.call(this,t),this.parseChunk=function(t,e){if(this.isFirstChunk&&E(this._config.beforeFirstChunk)){var n=this._config.beforeFirstChunk(t);void 0!==n&&(t=n)}this.isFirstChunk=!1;var r=this._partialLine+t;this._partialLine="";var i=this._handle.parse(r,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var o=i.meta.cursor;this._finished||(this._partialLine=r.substring(o-this._baseIndex),this._baseIndex=o),i&&i.data&&(this._rowCount+=i.data.length);var a=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(E(this._config.chunk)&&!e){if(this._config.chunk(i,this._handle),this._handle.paused()||this._handle.aborted())return;i=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(i.data),this._completeResults.errors=this._completeResults.errors.concat(i.errors),this._completeResults.meta=i.meta),this._completed||!a||!E(this._config.complete)||i&&i.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),a||i&&i.meta.paused||this._nextChunk(),i}},this._sendError=function(t){E(this._config.error)&&this._config.error(t)}}function v(t){var e;t=t||{},y.call(this,t),this.stream=function(t){return e=t,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var t=this._config.chunkSize,n=t?e.substr(0,t):e;return e=t?e.substr(t):"",this._finished=!e,this.parseChunk(n)}}}function _(t){var e,n,r,i=/^\s*-?(\d*\.?\d+|\d+\.?\d*)(e[-+]?\d+)?\s*$/i,o=/(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))/,a=this,s=0,u=0,c=!1,l=!1,h=[],f={data:[],errors:[],meta:{}};if(E(t.step)){var p=t.step;t.step=function(e){if(f=e,m())A();else{if(A(),!f.data||0===f.data.length)return;s+=e.data.length,t.preview&&s>t.preview?n.abort():p(f,a)}}}function d(e){return"greedy"===t.skipEmptyLines?""===e.join("").trim():1===e.length&&0===e[0].length}function A(){if(f&&r&&(v("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+g.DefaultDelimiter+"'"),r=!1),t.skipEmptyLines)for(var e=0;e=h.length?"__parsed_extra":h[r]),t.transform&&(a=t.transform(a,o)),a=y(o,a),"__parsed_extra"===o?(i[o]=i[o]||[],i[o].push(a)):i[o]=a}return t.header&&(r>h.length?v("FieldMismatch","TooManyFields","Too many fields: expected "+h.length+" fields but parsed "+r,u+n):r1&&i[0].length=r.length/2?"\r\n":"\r"}(i,s)),r=!1,t.delimiter)E(t.delimiter)&&(t.delimiter=t.delimiter(i),f.meta.delimiter=t.delimiter);else{var u=function(e,n,r,i,o){var a,s,u;o=o||[",","\t","|",";",g.RECORD_SEP,g.UNIT_SEP];for(var c=0;c1&&(h+=Math.abs(y-u),u=y):u=0}A.data.length>0&&(f/=A.data.length-p),(void 0===s||h>s)&&f>1.99&&(s=h,a=l)}return t.delimiter=a,{successful:!!a,bestDelimiter:a}}(i,t.newline,t.skipEmptyLines,t.comments,t.delimitersToGuess);u.successful?t.delimiter=u.bestDelimiter:(r=!0,t.delimiter=g.DefaultDelimiter),f.meta.delimiter=t.delimiter}var l=w(t);return t.preview&&t.header&&l.preview++,e=i,n=new x(l),f=n.parse(e,o,a),A(),c?{meta:{paused:!0}}:f||{meta:{paused:!1}}},this.paused=function(){return c},this.pause=function(){c=!0,n.abort(),e=e.substr(n.getCharIndex())},this.resume=function(){c=!1,a.streamer.parseChunk(e,!0)},this.aborted=function(){return l},this.abort=function(){l=!0,n.abort(),f.meta.aborted=!0,E(t.complete)&&t.complete(f),e=""}}function b(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function x(t){var e,n=(t=t||{}).delimiter,r=t.newline,i=t.comments,o=t.step,a=t.preview,s=t.fastMode,u=e=void 0===t.quoteChar?'"':t.quoteChar;if(void 0!==t.escapeChar&&(u=t.escapeChar),("string"!=typeof n||g.BAD_DELIMITERS.indexOf(n)>-1)&&(n=","),i===n)throw new Error("Comment character same as delimiter");!0===i?i="#":("string"!=typeof i||g.BAD_DELIMITERS.indexOf(i)>-1)&&(i=!1),"\n"!==r&&"\r"!==r&&"\r\n"!==r&&(r="\n");var c=0,l=!1;this.parse=function(t,h,f){if("string"!=typeof t)throw new Error("Input must be a string");var p=t.length,d=n.length,A=r.length,g=i.length,m=E(o);c=0;var y=[],v=[],_=[],x=0;if(!t)return L();if(s||!1!==s&&-1===t.indexOf(e)){for(var w=t.split(r),O=0;O=a)return y=y.slice(0,a),L(!0)}}return L()}for(var S,T=t.indexOf(n,c),C=t.indexOf(r,c),P=new RegExp(b(u)+b(e),"g");;)if(t[c]!==e)if(i&&0===_.length&&t.substr(c,g)===i){if(-1===C)return L();c=C+A,C=t.indexOf(r,c),T=t.indexOf(n,c)}else if(-1!==T&&(T=a)return L(!0)}else{for(S=c,c++;;){if(-1===(S=t.indexOf(e,S+1)))return f||v.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:y.length,index:c}),k();if(S===p-1)return k(t.substring(c,S).replace(P,e));if(e!==u||t[S+1]!==u){if(e===u||0===S||t[S-1]!==u){var M=R(-1===C?T:Math.min(T,C));if(t[S+1+M]===n){if(_.push(t.substring(c,S).replace(P,e)),c=S+1+M+d,T=t.indexOf(n,c),C=t.indexOf(r,c),m&&(j(),l))return L();if(a&&y.length>=a)return L(!0);break}var I=R(C);if(t.substr(S+1+I,A)===r){if(_.push(t.substring(c,S).replace(P,e)),D(S+1+I+A),T=t.indexOf(n,c),m&&(j(),l))return L();if(a&&y.length>=a)return L(!0);break}v.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:y.length,index:c}),S++}}else S++}if(m&&(j(),l))return L();if(a&&y.length>=a)return L(!0)}return k();function B(t){y.push(t),x=c}function R(e){var n=0;if(-1!==e){var r=t.substring(S+1,e);r&&""===r.trim()&&(n=r.length)}return n}function k(e){return f||(void 0===e&&(e=t.substr(c)),_.push(e),c=p,B(_),m&&j()),L()}function D(e){c=e,B(_),_=[],C=t.indexOf(r,c)}function L(t,e){return{data:e||!1?y[0]:y,errors:v,meta:{delimiter:n,linebreak:r,aborted:l,truncated:!!t,cursor:x+(h||0)}}}function j(){o(L(void 0,!0)),y=[],v=[]}},this.abort=function(){l=!0},this.getCharIndex=function(){return c}}function w(t){if("object"!=typeof t||null===t)return t;var e=Array.isArray(t)?[]:{};for(var n in t)e[n]=w(t[n]);return e}function E(t){return"function"==typeof t}v.prototype=Object.create(v.prototype),v.prototype.constructor=v;const{ChunkStreamer:O}=m;function S(t){t=t||{},O.call(this,t),this.textDecoder=new TextDecoder(this._config.encoding),this.stream=async function(t){this._input=t;try{for await(const e of t)this.parseChunk(this.getStringChunk(e));this._finished=!0,this.parseChunk("")}catch(t){this._sendError(t)}},this._nextChunk=function(){},this.getStringChunk=function(t){return"string"==typeof t?t:this.textDecoder.decode(t,{stream:!0})}}S.prototype=Object.create(O.prototype),S.prototype.constructor=S;const T={csv:{shape:"object-row-table",optimizeMemoryUsage:!1,header:"auto",columnPrefix:"column",quoteChar:'"',escapeChar:'"',dynamicTyping:!0,comments:!1,skipEmptyLines:!0,delimitersToGuess:[",","\t","|",";"]}},C={id:"csv",module:"csv",name:"CSV",version:"3.3.3",extensions:["csv","tsv","dsv"],mimeTypes:["text/csv","text/tab-separated-values","text/dsv"],category:"table",parse:async(t,e)=>P((new TextDecoder).decode(t),e),parseText:(t,e)=>P(t,e),parseInBatches:function(t,e){var n;"auto"===(e={...e}).batchSize&&(e.batchSize=4e3);const r={...T.csv,...null===(n=e)||void 0===n?void 0:n.csv},i=new l;let o=!0,a=null,s=null,u=null;const c={...r,header:!1,download:!1,chunkSize:5242880,skipEmptyLines:!1,step(t){let n=t.data;if(r.skipEmptyLines){if(""===n.flat().join("").trim())return}const c=t.meta.cursor;if(o&&!a){if("auto"===r.header?M(n):Boolean(r.header))return void(a=n.map(I()))}o&&(o=!1,a||(a=B(r.columnPrefix,n.length)),u=function(t,e){const n=e?{}:[];for(let r=0;r{throw new Error(t)}},u=m.parse(t,s);let{data:c}=u;const l=u.meta.fields||B(n.columnPrefix,r.length);switch(n.shape){case"object-row-table":c=c.map(t=>Array.isArray(t)?o(t,l):t);break;case"array-row-table":c=c.map(t=>Array.isArray(t)?t:a(t,l))}return c}function M(t){return t&&t.every(t=>"string"==typeof t)}function I(){const t=new Set;return e=>{let n=e,r=1;for(;t.has(n);)n="".concat(e,".").concat(r),r++;return t.add(n),n}}function B(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=[];for(let r=0;r2&&void 0!==arguments[2]?arguments[2]:"sessionStorage";Object(s.a)(this,"storage",void 0),Object(s.a)(this,"id",void 0),Object(s.a)(this,"config",void 0),this.storage=function(t){try{const e=window[t],n="__storage_test__";return e.setItem(n,n),e.removeItem(n),e}catch(t){return null}}(n),this.id=t,this.config=e,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(t){if(Object.assign(this.config,t),this.storage){const t=JSON.stringify(this.config);this.storage.setItem(this.id,t)}}_loadConfiguration(){let t={};if(this.storage){const e=this.storage.getItem(this.id);t=e?JSON.parse(e):{}}return Object.assign(this.config,t),this}}function j(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:600;const i=t.src.replace(/\(/g,"%28").replace(/\)/g,"%29");t.width>r&&(n=Math.min(n,r/t.width));const o=t.width*n,a=t.height*n,s=["font-size:1px;","padding:".concat(Math.floor(a/2),"px ").concat(Math.floor(o/2),"px;"),"line-height:".concat(a,"px;"),"background:url(".concat(i,");"),"background-size:".concat(o,"px ").concat(a,"px;"),"color:transparent;"].join("");return["".concat(e," %c+"),s]}let F;function z(t){return"string"==typeof t?F[t.toUpperCase()]||F.WHITE:t}function U(t,e){if(!t)throw new Error(e||"Assertion failed")}!function(t){t[t.BLACK=30]="BLACK",t[t.RED=31]="RED",t[t.GREEN=32]="GREEN",t[t.YELLOW=33]="YELLOW",t[t.BLUE=34]="BLUE",t[t.MAGENTA=35]="MAGENTA",t[t.CYAN=36]="CYAN",t[t.WHITE=37]="WHITE",t[t.BRIGHT_BLACK=90]="BRIGHT_BLACK",t[t.BRIGHT_RED=91]="BRIGHT_RED",t[t.BRIGHT_GREEN=92]="BRIGHT_GREEN",t[t.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",t[t.BRIGHT_BLUE=94]="BRIGHT_BLUE",t[t.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",t[t.BRIGHT_CYAN=96]="BRIGHT_CYAN",t[t.BRIGHT_WHITE=97]="BRIGHT_WHITE"}(F||(F={}));var N=n(99);function G(){let t;var e,n;if(D.a&&"performance"in N.b)t=null===N.b||void 0===N.b||null===(e=N.b.performance)||void 0===e||null===(n=e.now)||void 0===n?void 0:n.call(e);else if("hrtime"in N.a){var r;const e=null===N.a||void 0===N.a||null===(r=N.a.hrtime)||void 0===r?void 0:r.call(N.a);t=1e3*e[0]+e[1]/1e6}else t=Date.now();return t}const V={debug:D.a&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},H={enabled:!0,level:0};function W(){}const q={},X={once:!0};class Z{constructor(){let{id:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{id:""};Object(s.a)(this,"id",void 0),Object(s.a)(this,"VERSION","8.9.7"),Object(s.a)(this,"_startTs",G()),Object(s.a)(this,"_deltaTs",G()),Object(s.a)(this,"_storage",void 0),Object(s.a)(this,"userData",{}),Object(s.a)(this,"LOG_THROTTLE_TIMEOUT",0),this.id=t,this.userData={},this._storage=new L("__probe-".concat(this.id,"__"),H),this.timeStamp("".concat(this.id," started")),function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["constructor"];const n=Object.getPrototypeOf(t),r=Object.getOwnPropertyNames(n);for(const n of r)"function"==typeof t[n]&&(e.find(t=>n===t)||(t[n]=t[n].bind(t)))}(this),Object.seal(this)}set level(t){this.setLevel(t)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((G()-this._startTs).toPrecision(10))}getDelta(){return Number((G()-this._deltaTs).toPrecision(10))}set priority(t){this.level=t}get priority(){return this.level}getPriority(){return this.level}enable(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._storage.setConfiguration({enabled:t}),this}setLevel(t){return this._storage.setConfiguration({level:t}),this}get(t){return this._storage.config[t]}set(t,e){this._storage.setConfiguration({[t]:e})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(t,e){U(t,e)}warn(t){return this._getLogFunction(0,t,V.warn,arguments,X)}error(t){return this._getLogFunction(0,t,V.error,arguments)}deprecated(t,e){return this.warn("`".concat(t,"` is deprecated and will be removed in a later version. Use `").concat(e,"` instead"))}removed(t,e){return this.error("`".concat(t,"` has been removed. Use `").concat(e,"` instead"))}probe(t,e){return this._getLogFunction(t,e,V.log,arguments,{time:!0,once:!0})}log(t,e){return this._getLogFunction(t,e,V.debug,arguments)}info(t,e){return this._getLogFunction(t,e,console.info,arguments)}once(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i{const e=j(t,n,r);console.log(...e)},t.src=e,W}const i=e.nodeName||"";if("img"===i.toLowerCase())return console.log(...j(e,n,r)),W;if("canvas"===i.toLowerCase()){const t=new Image;return t.onload=()=>console.log(...j(t,n,r)),t.src=e.toDataURL(),W}return W}({image:r,message:i,scale:o}):function(t){let{image:e,message:n="",scale:r=1}=t;return console.warn("removed"),W}({image:r,message:i,scale:o}):W}time(t,e){return this._getLogFunction(t,e,console.time?console.time:console.info)}timeEnd(t,e){return this._getLogFunction(t,e,console.timeEnd?console.timeEnd:console.info)}timeStamp(t,e){return this._getLogFunction(t,e,console.timeStamp||W)}group(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{collapsed:!1};const r=Q({logLevel:t,message:e,opts:n}),{collapsed:i}=n;return r.method=(i?console.groupCollapsed:console.group)||console.info,this._getLogFunction(r)}groupCollapsed(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.group(t,e,Object.assign({},n,{collapsed:!0}))}groupEnd(t){return this._getLogFunction(t,"",console.groupEnd||W)}withGroup(t,e,n){this.group(t,e)();try{n()}finally{this.groupEnd(t)()}}trace(){console.trace&&console.trace()}_shouldLog(t){return this.isEnabled()&&this.getLevel()>=J(t)}_getLogFunction(t,e,n,r,i){if(this._shouldLog(t)){i=Q({logLevel:t,message:e,args:r,opts:i}),U(n=n||i.method),i.total=this.getTotal(),i.delta=this.getDelta(),this._deltaTs=G();const o=i.tag||i.message;if(i.once){if(q[o])return W;q[o]=G()}return e=function(t,e,n){if("string"==typeof e){const a=n.time?function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8;const n=Math.max(e-t.length,0);return"".concat(" ".repeat(n)).concat(t)}(function(t){let e;return e=t<10?"".concat(t.toFixed(2),"ms"):t<100?"".concat(t.toFixed(1),"ms"):t<1e3?"".concat(t.toFixed(0),"ms"):"".concat((t/1e3).toFixed(2),"s"),e}(n.total)):"";e=n.time?"".concat(t,": ").concat(a," ").concat(e):"".concat(t,": ").concat(e),r=e,i=n.color,o=n.background,D.a||"string"!=typeof r||(i&&(i=z(i),r="[".concat(i,"m").concat(r,"[39m")),o&&(i=z(o),r="[".concat(o+10,"m").concat(r,"[49m"))),e=r}var r,i,o;return e}(this.id,i.message,i),n.bind(console,e,...i.args)}return W}}function J(t){if(!t)return 0;let e;switch(typeof t){case"number":e=t;break;case"object":e=t.logLevel||t.priority||0;break;default:return 0}return U(Number.isFinite(e)&&e>=0),e}function Q(t){const{logLevel:e,message:n}=t;t.logLevel=J(e);const r=t.args?Array.from(t.args):[];for(;r.length&&r.shift()!==n;);switch(typeof e){case"string":case"function":void 0!==n&&r.unshift(n),t.message=e;break;case"object":Object.assign(t,e)}"function"==typeof t.message&&(t.message=t.message());const i=typeof t.message;return U("string"===i||"object"===i),Object.assign(t,{args:r},t.opts)}function K(t){for(const e in t)for(const n in t[e])return n||"untitled";return"empty"}Object(s.a)(Z,"VERSION","8.9.7");new Z({id:"loaders.gl"});var Y=n(318);new class{constructor(){Object(s.a)(this,"console",void 0),this.console=console}log(){for(var t=arguments.length,e=new Array(t),n=0;n{const t=$();return t.loaderRegistry=t.loaderRegistry||[],t.loaderRegistry};var et,nt,rt=n(250),it=n.n(rt);function ot(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return at(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return at(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function at(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n4)e="Array<".concat(t.length,">");else if("string"==typeof t)e=t;else if("number"==typeof t)e=String(t);else try{e=JSON.stringify(t)}catch(t){e=""}return e.length>50&&(e=e.slice(0,50)),e}function dt(t,e){var n,r,i=t,o=ot(it()(new Set(t.match(/{[^}]*}/g).map((function(t){return t.replace(/[{}]/g,"")})))));try{for(o.s();!(r=o.n()).done;){var a=r.value;if(a.includes(".")){n=e;var s,u=ot(a.split("."));try{for(u.s();!(s=u.n()).done;){var c=s.value;if(!n.hasOwnProperty(c)){n=void 0;break}n=n[c]}}catch(t){u.e(t)}finally{u.f()}}else n=e.hasOwnProperty(a)?e[a]:e.properties&&e.properties.hasOwnProperty(a)?e.properties[a]:void 0;i=i.replaceAll("{".concat(a,"}"),n)}}catch(t){o.e(t)}finally{o.f()}return i}var At=n(131),gt={};var mt=n(41);var yt=n(88),vt=n.n(yt),_t=n(89),bt=n.n(_t),xt={position:"absolute",top:"0px",left:"0px",width:344,padding:"12px 24px",margin:24,overflowX:"hidden",overflowY:"overlay",outline:"none",maxHeight:"94%",boxSizing:"border-box",backgroundColor:"rgb(255, 255, 255)",fontFamily:'"Fira Sans", sans-serif',zIndex:1},wt=function(){function t(e){var n=e.container,r=e.props;vt()(this,t);var i=r.description,o=document.createElement("div");o.className="deck-json-description-box",Object.assign(o.style,xt),this.el=o;var a=document.createElement("div");a.innerHTML=i,o.appendChild(a),n.append(o)}return bt()(t,[{key:"remove",value:function(){this.el.remove(),this.description=null}}],[{key:"stringName",get:function(){return"description"}}]),t}();function Et(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ot(t){for(var e=1;e=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Tt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,r={},i=Object.keys(e).filter(n),o=St(i);try{for(o.s();!(t=o.n()).done;){var a=t.value;r[a]=e[a]}}catch(t){o.e(t)}finally{o.f()}return r}var It={classes:Mt(mt,Ct),enumerations:{COORDINATE_SYSTEM:mt.COORDINATE_SYSTEM,GL:{DEPTH_BUFFER_BIT:256,STENCIL_BUFFER_BIT:1024,COLOR_BUFFER_BIT:16384,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,ZERO:0,ONE:1,SRC_COLOR:768,ONE_MINUS_SRC_COLOR:769,SRC_ALPHA:770,ONE_MINUS_SRC_ALPHA:771,DST_ALPHA:772,ONE_MINUS_DST_ALPHA:773,DST_COLOR:774,ONE_MINUS_DST_COLOR:775,SRC_ALPHA_SATURATE:776,CONSTANT_COLOR:32769,ONE_MINUS_CONSTANT_COLOR:32770,CONSTANT_ALPHA:32771,ONE_MINUS_CONSTANT_ALPHA:32772,FUNC_ADD:32774,FUNC_SUBTRACT:32778,FUNC_REVERSE_SUBTRACT:32779,BLEND_EQUATION:32777,BLEND_EQUATION_RGB:32777,BLEND_EQUATION_ALPHA:34877,BLEND_DST_RGB:32968,BLEND_SRC_RGB:32969,BLEND_DST_ALPHA:32970,BLEND_SRC_ALPHA:32971,BLEND_COLOR:32773,ARRAY_BUFFER_BINDING:34964,ELEMENT_ARRAY_BUFFER_BINDING:34965,LINE_WIDTH:2849,ALIASED_POINT_SIZE_RANGE:33901,ALIASED_LINE_WIDTH_RANGE:33902,CULL_FACE_MODE:2885,FRONT_FACE:2886,DEPTH_RANGE:2928,DEPTH_WRITEMASK:2930,DEPTH_CLEAR_VALUE:2931,DEPTH_FUNC:2932,STENCIL_CLEAR_VALUE:2961,STENCIL_FUNC:2962,STENCIL_FAIL:2964,STENCIL_PASS_DEPTH_FAIL:2965,STENCIL_PASS_DEPTH_PASS:2966,STENCIL_REF:2967,STENCIL_VALUE_MASK:2963,STENCIL_WRITEMASK:2968,STENCIL_BACK_FUNC:34816,STENCIL_BACK_FAIL:34817,STENCIL_BACK_PASS_DEPTH_FAIL:34818,STENCIL_BACK_PASS_DEPTH_PASS:34819,STENCIL_BACK_REF:36003,STENCIL_BACK_VALUE_MASK:36004,STENCIL_BACK_WRITEMASK:36005,VIEWPORT:2978,SCISSOR_BOX:3088,COLOR_CLEAR_VALUE:3106,COLOR_WRITEMASK:3107,UNPACK_ALIGNMENT:3317,PACK_ALIGNMENT:3333,MAX_TEXTURE_SIZE:3379,MAX_VIEWPORT_DIMS:3386,SUBPIXEL_BITS:3408,RED_BITS:3410,GREEN_BITS:3411,BLUE_BITS:3412,ALPHA_BITS:3413,DEPTH_BITS:3414,STENCIL_BITS:3415,POLYGON_OFFSET_UNITS:10752,POLYGON_OFFSET_FACTOR:32824,TEXTURE_BINDING_2D:32873,SAMPLE_BUFFERS:32936,SAMPLES:32937,SAMPLE_COVERAGE_VALUE:32938,SAMPLE_COVERAGE_INVERT:32939,COMPRESSED_TEXTURE_FORMATS:34467,VENDOR:7936,RENDERER:7937,VERSION:7938,IMPLEMENTATION_COLOR_READ_TYPE:35738,IMPLEMENTATION_COLOR_READ_FORMAT:35739,BROWSER_DEFAULT_WEBGL:37444,STATIC_DRAW:35044,STREAM_DRAW:35040,DYNAMIC_DRAW:35048,ARRAY_BUFFER:34962,ELEMENT_ARRAY_BUFFER:34963,BUFFER_SIZE:34660,BUFFER_USAGE:34661,CURRENT_VERTEX_ATTRIB:34342,VERTEX_ATTRIB_ARRAY_ENABLED:34338,VERTEX_ATTRIB_ARRAY_SIZE:34339,VERTEX_ATTRIB_ARRAY_STRIDE:34340,VERTEX_ATTRIB_ARRAY_TYPE:34341,VERTEX_ATTRIB_ARRAY_NORMALIZED:34922,VERTEX_ATTRIB_ARRAY_POINTER:34373,VERTEX_ATTRIB_ARRAY_BUFFER_BINDING:34975,CULL_FACE:2884,FRONT:1028,BACK:1029,FRONT_AND_BACK:1032,BLEND:3042,DEPTH_TEST:2929,DITHER:3024,POLYGON_OFFSET_FILL:32823,SAMPLE_ALPHA_TO_COVERAGE:32926,SAMPLE_COVERAGE:32928,SCISSOR_TEST:3089,STENCIL_TEST:2960,NO_ERROR:0,INVALID_ENUM:1280,INVALID_VALUE:1281,INVALID_OPERATION:1282,OUT_OF_MEMORY:1285,CONTEXT_LOST_WEBGL:37442,CW:2304,CCW:2305,DONT_CARE:4352,FASTEST:4353,NICEST:4354,GENERATE_MIPMAP_HINT:33170,BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DOUBLE:5130,DEPTH_COMPONENT:6402,ALPHA:6406,RGB:6407,RGBA:6408,LUMINANCE:6409,LUMINANCE_ALPHA:6410,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,FRAGMENT_SHADER:35632,VERTEX_SHADER:35633,COMPILE_STATUS:35713,DELETE_STATUS:35712,LINK_STATUS:35714,VALIDATE_STATUS:35715,ATTACHED_SHADERS:35717,ACTIVE_ATTRIBUTES:35721,ACTIVE_UNIFORMS:35718,MAX_VERTEX_ATTRIBS:34921,MAX_VERTEX_UNIFORM_VECTORS:36347,MAX_VARYING_VECTORS:36348,MAX_COMBINED_TEXTURE_IMAGE_UNITS:35661,MAX_VERTEX_TEXTURE_IMAGE_UNITS:35660,MAX_TEXTURE_IMAGE_UNITS:34930,MAX_FRAGMENT_UNIFORM_VECTORS:36349,SHADER_TYPE:35663,SHADING_LANGUAGE_VERSION:35724,CURRENT_PROGRAM:35725,NEVER:512,ALWAYS:519,LESS:513,EQUAL:514,LEQUAL:515,GREATER:516,GEQUAL:518,NOTEQUAL:517,KEEP:7680,REPLACE:7681,INCR:7682,DECR:7683,INVERT:5386,INCR_WRAP:34055,DECR_WRAP:34056,NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987,TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,TEXTURE_2D:3553,TEXTURE:5890,TEXTURE_CUBE_MAP:34067,TEXTURE_BINDING_CUBE_MAP:34068,TEXTURE_CUBE_MAP_POSITIVE_X:34069,TEXTURE_CUBE_MAP_NEGATIVE_X:34070,TEXTURE_CUBE_MAP_POSITIVE_Y:34071,TEXTURE_CUBE_MAP_NEGATIVE_Y:34072,TEXTURE_CUBE_MAP_POSITIVE_Z:34073,TEXTURE_CUBE_MAP_NEGATIVE_Z:34074,MAX_CUBE_MAP_TEXTURE_SIZE:34076,TEXTURE0:33984,ACTIVE_TEXTURE:34016,REPEAT:10497,CLAMP_TO_EDGE:33071,MIRRORED_REPEAT:33648,TEXTURE_WIDTH:4096,TEXTURE_HEIGHT:4097,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,INT_VEC2:35667,INT_VEC3:35668,INT_VEC4:35669,BOOL:35670,BOOL_VEC2:35671,BOOL_VEC3:35672,BOOL_VEC4:35673,FLOAT_MAT2:35674,FLOAT_MAT3:35675,FLOAT_MAT4:35676,SAMPLER_2D:35678,SAMPLER_CUBE:35680,LOW_FLOAT:36336,MEDIUM_FLOAT:36337,HIGH_FLOAT:36338,LOW_INT:36339,MEDIUM_INT:36340,HIGH_INT:36341,FRAMEBUFFER:36160,RENDERBUFFER:36161,RGBA4:32854,RGB5_A1:32855,RGB565:36194,DEPTH_COMPONENT16:33189,STENCIL_INDEX:6401,STENCIL_INDEX8:36168,DEPTH_STENCIL:34041,RENDERBUFFER_WIDTH:36162,RENDERBUFFER_HEIGHT:36163,RENDERBUFFER_INTERNAL_FORMAT:36164,RENDERBUFFER_RED_SIZE:36176,RENDERBUFFER_GREEN_SIZE:36177,RENDERBUFFER_BLUE_SIZE:36178,RENDERBUFFER_ALPHA_SIZE:36179,RENDERBUFFER_DEPTH_SIZE:36180,RENDERBUFFER_STENCIL_SIZE:36181,FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:36048,FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:36049,FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:36050,FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:36051,COLOR_ATTACHMENT0:36064,DEPTH_ATTACHMENT:36096,STENCIL_ATTACHMENT:36128,DEPTH_STENCIL_ATTACHMENT:33306,NONE:0,FRAMEBUFFER_COMPLETE:36053,FRAMEBUFFER_INCOMPLETE_ATTACHMENT:36054,FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:36055,FRAMEBUFFER_INCOMPLETE_DIMENSIONS:36057,FRAMEBUFFER_UNSUPPORTED:36061,FRAMEBUFFER_BINDING:36006,RENDERBUFFER_BINDING:36007,READ_FRAMEBUFFER:36008,DRAW_FRAMEBUFFER:36009,MAX_RENDERBUFFER_SIZE:34024,INVALID_FRAMEBUFFER_OPERATION:1286,UNPACK_FLIP_Y_WEBGL:37440,UNPACK_PREMULTIPLY_ALPHA_WEBGL:37441,UNPACK_COLORSPACE_CONVERSION_WEBGL:37443,READ_BUFFER:3074,UNPACK_ROW_LENGTH:3314,UNPACK_SKIP_ROWS:3315,UNPACK_SKIP_PIXELS:3316,PACK_ROW_LENGTH:3330,PACK_SKIP_ROWS:3331,PACK_SKIP_PIXELS:3332,TEXTURE_BINDING_3D:32874,UNPACK_SKIP_IMAGES:32877,UNPACK_IMAGE_HEIGHT:32878,MAX_3D_TEXTURE_SIZE:32883,MAX_ELEMENTS_VERTICES:33e3,MAX_ELEMENTS_INDICES:33001,MAX_TEXTURE_LOD_BIAS:34045,MAX_FRAGMENT_UNIFORM_COMPONENTS:35657,MAX_VERTEX_UNIFORM_COMPONENTS:35658,MAX_ARRAY_TEXTURE_LAYERS:35071,MIN_PROGRAM_TEXEL_OFFSET:35076,MAX_PROGRAM_TEXEL_OFFSET:35077,MAX_VARYING_COMPONENTS:35659,FRAGMENT_SHADER_DERIVATIVE_HINT:35723,RASTERIZER_DISCARD:35977,VERTEX_ARRAY_BINDING:34229,MAX_VERTEX_OUTPUT_COMPONENTS:37154,MAX_FRAGMENT_INPUT_COMPONENTS:37157,MAX_SERVER_WAIT_TIMEOUT:37137,MAX_ELEMENT_INDEX:36203,RED:6403,RGB8:32849,RGBA8:32856,RGB10_A2:32857,TEXTURE_3D:32879,TEXTURE_WRAP_R:32882,TEXTURE_MIN_LOD:33082,TEXTURE_MAX_LOD:33083,TEXTURE_BASE_LEVEL:33084,TEXTURE_MAX_LEVEL:33085,TEXTURE_COMPARE_MODE:34892,TEXTURE_COMPARE_FUNC:34893,SRGB:35904,SRGB8:35905,SRGB8_ALPHA8:35907,COMPARE_REF_TO_TEXTURE:34894,RGBA32F:34836,RGB32F:34837,RGBA16F:34842,RGB16F:34843,TEXTURE_2D_ARRAY:35866,TEXTURE_BINDING_2D_ARRAY:35869,R11F_G11F_B10F:35898,RGB9_E5:35901,RGBA32UI:36208,RGB32UI:36209,RGBA16UI:36214,RGB16UI:36215,RGBA8UI:36220,RGB8UI:36221,RGBA32I:36226,RGB32I:36227,RGBA16I:36232,RGB16I:36233,RGBA8I:36238,RGB8I:36239,RED_INTEGER:36244,RGB_INTEGER:36248,RGBA_INTEGER:36249,R8:33321,RG8:33323,R16F:33325,R32F:33326,RG16F:33327,RG32F:33328,R8I:33329,R8UI:33330,R16I:33331,R16UI:33332,R32I:33333,R32UI:33334,RG8I:33335,RG8UI:33336,RG16I:33337,RG16UI:33338,RG32I:33339,RG32UI:33340,R8_SNORM:36756,RG8_SNORM:36757,RGB8_SNORM:36758,RGBA8_SNORM:36759,RGB10_A2UI:36975,TEXTURE_IMMUTABLE_FORMAT:37167,TEXTURE_IMMUTABLE_LEVELS:33503,UNSIGNED_INT_2_10_10_10_REV:33640,UNSIGNED_INT_10F_11F_11F_REV:35899,UNSIGNED_INT_5_9_9_9_REV:35902,FLOAT_32_UNSIGNED_INT_24_8_REV:36269,UNSIGNED_INT_24_8:34042,HALF_FLOAT:5131,RG:33319,RG_INTEGER:33320,INT_2_10_10_10_REV:36255,CURRENT_QUERY:34917,QUERY_RESULT:34918,QUERY_RESULT_AVAILABLE:34919,ANY_SAMPLES_PASSED:35887,ANY_SAMPLES_PASSED_CONSERVATIVE:36202,MAX_DRAW_BUFFERS:34852,DRAW_BUFFER0:34853,DRAW_BUFFER1:34854,DRAW_BUFFER2:34855,DRAW_BUFFER3:34856,DRAW_BUFFER4:34857,DRAW_BUFFER5:34858,DRAW_BUFFER6:34859,DRAW_BUFFER7:34860,DRAW_BUFFER8:34861,DRAW_BUFFER9:34862,DRAW_BUFFER10:34863,DRAW_BUFFER11:34864,DRAW_BUFFER12:34865,DRAW_BUFFER13:34866,DRAW_BUFFER14:34867,DRAW_BUFFER15:34868,MAX_COLOR_ATTACHMENTS:36063,COLOR_ATTACHMENT1:36065,COLOR_ATTACHMENT2:36066,COLOR_ATTACHMENT3:36067,COLOR_ATTACHMENT4:36068,COLOR_ATTACHMENT5:36069,COLOR_ATTACHMENT6:36070,COLOR_ATTACHMENT7:36071,COLOR_ATTACHMENT8:36072,COLOR_ATTACHMENT9:36073,COLOR_ATTACHMENT10:36074,COLOR_ATTACHMENT11:36075,COLOR_ATTACHMENT12:36076,COLOR_ATTACHMENT13:36077,COLOR_ATTACHMENT14:36078,COLOR_ATTACHMENT15:36079,SAMPLER_3D:35679,SAMPLER_2D_SHADOW:35682,SAMPLER_2D_ARRAY:36289,SAMPLER_2D_ARRAY_SHADOW:36292,SAMPLER_CUBE_SHADOW:36293,INT_SAMPLER_2D:36298,INT_SAMPLER_3D:36299,INT_SAMPLER_CUBE:36300,INT_SAMPLER_2D_ARRAY:36303,UNSIGNED_INT_SAMPLER_2D:36306,UNSIGNED_INT_SAMPLER_3D:36307,UNSIGNED_INT_SAMPLER_CUBE:36308,UNSIGNED_INT_SAMPLER_2D_ARRAY:36311,MAX_SAMPLES:36183,SAMPLER_BINDING:35097,PIXEL_PACK_BUFFER:35051,PIXEL_UNPACK_BUFFER:35052,PIXEL_PACK_BUFFER_BINDING:35053,PIXEL_UNPACK_BUFFER_BINDING:35055,COPY_READ_BUFFER:36662,COPY_WRITE_BUFFER:36663,COPY_READ_BUFFER_BINDING:36662,COPY_WRITE_BUFFER_BINDING:36663,FLOAT_MAT2x3:35685,FLOAT_MAT2x4:35686,FLOAT_MAT3x2:35687,FLOAT_MAT3x4:35688,FLOAT_MAT4x2:35689,FLOAT_MAT4x3:35690,UNSIGNED_INT_VEC2:36294,UNSIGNED_INT_VEC3:36295,UNSIGNED_INT_VEC4:36296,UNSIGNED_NORMALIZED:35863,SIGNED_NORMALIZED:36764,VERTEX_ATTRIB_ARRAY_INTEGER:35069,VERTEX_ATTRIB_ARRAY_DIVISOR:35070,TRANSFORM_FEEDBACK_BUFFER_MODE:35967,MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS:35968,TRANSFORM_FEEDBACK_VARYINGS:35971,TRANSFORM_FEEDBACK_BUFFER_START:35972,TRANSFORM_FEEDBACK_BUFFER_SIZE:35973,TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN:35976,MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS:35978,MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS:35979,INTERLEAVED_ATTRIBS:35980,SEPARATE_ATTRIBS:35981,TRANSFORM_FEEDBACK_BUFFER:35982,TRANSFORM_FEEDBACK_BUFFER_BINDING:35983,TRANSFORM_FEEDBACK:36386,TRANSFORM_FEEDBACK_PAUSED:36387,TRANSFORM_FEEDBACK_ACTIVE:36388,TRANSFORM_FEEDBACK_BINDING:36389,FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING:33296,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE:33297,FRAMEBUFFER_ATTACHMENT_RED_SIZE:33298,FRAMEBUFFER_ATTACHMENT_GREEN_SIZE:33299,FRAMEBUFFER_ATTACHMENT_BLUE_SIZE:33300,FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:33301,FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE:33302,FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:33303,FRAMEBUFFER_DEFAULT:33304,DEPTH24_STENCIL8:35056,DRAW_FRAMEBUFFER_BINDING:36006,READ_FRAMEBUFFER_BINDING:36010,RENDERBUFFER_SAMPLES:36011,FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER:36052,FRAMEBUFFER_INCOMPLETE_MULTISAMPLE:36182,UNIFORM_BUFFER:35345,UNIFORM_BUFFER_BINDING:35368,UNIFORM_BUFFER_START:35369,UNIFORM_BUFFER_SIZE:35370,MAX_VERTEX_UNIFORM_BLOCKS:35371,MAX_FRAGMENT_UNIFORM_BLOCKS:35373,MAX_COMBINED_UNIFORM_BLOCKS:35374,MAX_UNIFORM_BUFFER_BINDINGS:35375,MAX_UNIFORM_BLOCK_SIZE:35376,MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS:35377,MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS:35379,UNIFORM_BUFFER_OFFSET_ALIGNMENT:35380,ACTIVE_UNIFORM_BLOCKS:35382,UNIFORM_TYPE:35383,UNIFORM_SIZE:35384,UNIFORM_BLOCK_INDEX:35386,UNIFORM_OFFSET:35387,UNIFORM_ARRAY_STRIDE:35388,UNIFORM_MATRIX_STRIDE:35389,UNIFORM_IS_ROW_MAJOR:35390,UNIFORM_BLOCK_BINDING:35391,UNIFORM_BLOCK_DATA_SIZE:35392,UNIFORM_BLOCK_ACTIVE_UNIFORMS:35394,UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES:35395,UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER:35396,UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER:35398,OBJECT_TYPE:37138,SYNC_CONDITION:37139,SYNC_STATUS:37140,SYNC_FLAGS:37141,SYNC_FENCE:37142,SYNC_GPU_COMMANDS_COMPLETE:37143,UNSIGNALED:37144,SIGNALED:37145,ALREADY_SIGNALED:37146,TIMEOUT_EXPIRED:37147,CONDITION_SATISFIED:37148,WAIT_FAILED:37149,SYNC_FLUSH_COMMANDS_BIT:1,COLOR:6144,DEPTH:6145,STENCIL:6146,MIN:32775,MAX:32776,DEPTH_COMPONENT24:33190,STREAM_READ:35041,STREAM_COPY:35042,STATIC_READ:35045,STATIC_COPY:35046,DYNAMIC_READ:35049,DYNAMIC_COPY:35050,DEPTH_COMPONENT32F:36012,DEPTH32F_STENCIL8:36013,INVALID_INDEX:4294967295,TIMEOUT_IGNORED:-1,MAX_CLIENT_WAIT_TIMEOUT_WEBGL:37447,VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE:35070,UNMASKED_VENDOR_WEBGL:37445,UNMASKED_RENDERER_WEBGL:37446,MAX_TEXTURE_MAX_ANISOTROPY_EXT:34047,TEXTURE_MAX_ANISOTROPY_EXT:34046,COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_RGBA8_ETC2_EAC:37493,COMPRESSED_SRGB8_ETC2:37494,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37495,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37496,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37497,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGB_ATC_WEBGL:35986,COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL:35986,COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL:34798,UNSIGNED_INT_24_8_WEBGL:34042,HALF_FLOAT_OES:36193,RGBA32F_EXT:34836,RGB32F_EXT:34837,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT:33297,UNSIGNED_NORMALIZED_EXT:35863,MIN_EXT:32775,MAX_EXT:32776,SRGB_EXT:35904,SRGB_ALPHA_EXT:35906,SRGB8_ALPHA8_EXT:35907,FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT:33296,FRAGMENT_SHADER_DERIVATIVE_HINT_OES:35723,COLOR_ATTACHMENT0_WEBGL:36064,COLOR_ATTACHMENT1_WEBGL:36065,COLOR_ATTACHMENT2_WEBGL:36066,COLOR_ATTACHMENT3_WEBGL:36067,COLOR_ATTACHMENT4_WEBGL:36068,COLOR_ATTACHMENT5_WEBGL:36069,COLOR_ATTACHMENT6_WEBGL:36070,COLOR_ATTACHMENT7_WEBGL:36071,COLOR_ATTACHMENT8_WEBGL:36072,COLOR_ATTACHMENT9_WEBGL:36073,COLOR_ATTACHMENT10_WEBGL:36074,COLOR_ATTACHMENT11_WEBGL:36075,COLOR_ATTACHMENT12_WEBGL:36076,COLOR_ATTACHMENT13_WEBGL:36077,COLOR_ATTACHMENT14_WEBGL:36078,COLOR_ATTACHMENT15_WEBGL:36079,DRAW_BUFFER0_WEBGL:34853,DRAW_BUFFER1_WEBGL:34854,DRAW_BUFFER2_WEBGL:34855,DRAW_BUFFER3_WEBGL:34856,DRAW_BUFFER4_WEBGL:34857,DRAW_BUFFER5_WEBGL:34858,DRAW_BUFFER6_WEBGL:34859,DRAW_BUFFER7_WEBGL:34860,DRAW_BUFFER8_WEBGL:34861,DRAW_BUFFER9_WEBGL:34862,DRAW_BUFFER10_WEBGL:34863,DRAW_BUFFER11_WEBGL:34864,DRAW_BUFFER12_WEBGL:34865,DRAW_BUFFER13_WEBGL:34866,DRAW_BUFFER14_WEBGL:34867,DRAW_BUFFER15_WEBGL:34868,MAX_COLOR_ATTACHMENTS_WEBGL:36063,MAX_DRAW_BUFFERS_WEBGL:34852,VERTEX_ARRAY_BINDING_OES:34229,QUERY_COUNTER_BITS_EXT:34916,CURRENT_QUERY_EXT:34917,QUERY_RESULT_EXT:34918,QUERY_RESULT_AVAILABLE_EXT:34919,TIME_ELAPSED_EXT:35007,TIMESTAMP_EXT:36392,GPU_DISJOINT_EXT:36795}}};!function(t){const e=tt();t=Array.isArray(t)?t:[t];for(const n of t){const t=k(n);e.find(e=>t===e)||e.unshift(t)}}([C]);var Bt=new mt.JSONConverter({configuration:It});function Rt(t,e){if(t){var n={};t.forEach((function(t){var e=t.libraryName,i=t.resourceUri;n[e]=!1,e in window?r(e,window[e]):(Object.defineProperty(window,e,{set:function(t){return r(e,t)},get:function(){return n[e]}}),function(t){if(!gt[t]){var e=document.createElement("script");e.type="text/javascript",e.src=t,document.querySelector("head").appendChild(e),gt[t]=new Promise((function(t){e.onload=t}))}gt[t]}(i))}))}function r(t,r){!function(t,e){var n={classes:Mt(t,Ct),functions:Mt(t,Pt)};e.mergeConfiguration(n)}(r,Bt),n[t]=r,Object.values(n).every((function(t){return t}))&&"function"==typeof e&&e()}}function kt(t,e){var n=Bt.convert(t);e.setProps(n)}function Dt(t){var e=t.mapProvider,n=t.props,r=t.mapboxApiKey,i=t.googleMapsKey,o=t.handleEvent,a=t.getTooltip,s=t.container,u=Ot(Ot({},o?{onClick:function(t){return o("deck-click-event",t)},onHover:function(t){return o("deck-hover-event",t)},onResize:function(t){return o("deck-resize-event",t)},onViewStateChange:function(t){var e=t.viewState,n=(t.interactionState,t.oldViewState,new mt.WebMercatorViewport(e));e.nw=n.unproject([0,0]),e.se=n.unproject([n.width,n.height]),o("deck-view-state-change-event",e)},onDragStart:function(t){return o("deck-drag-start-event",t)},onDrag:function(t){return o("deck-drag-event",t)},onDragEnd:function(t){return o("deck-drag-end-event",t)}}:null),{},{getTooltip:a,container:s});switch(e){case"mapbox":return mt.log.info("Using Mapbox base maps")(),new mt.DeckGL(Ot(Ot(Ot({},u),n),{},{map:At.a,mapboxApiAccessToken:r,onLoad:At.c}));case"carto":return mt.log.info("Using Carto base maps")(),new mt.DeckGL(Ot(Ot({map:At.a},u),n));case"google_maps":return mt.log.info("Using Google Maps base maps")(),function(t){var e=t.container,n=(t.onClick,t.onComplete,t.getTooltip,t.googleMapsKey),r=t.layers,i=t.mapStyle,o=void 0===i?"satellite":i,a=t.initialViewState,s=void 0===a?{latitude:0,longitude:0,zoom:1}:a;if(!n)return mt.log.warn("No Google Maps API key set")(),null;var u=new mt.GoogleMapsOverlay({layers:r}),c={center:{lat:s.latitude,lng:s.longitude},mapTypeId:o,zoom:s.zoom},l=new window.google.maps.Map(e,c);return u.setMap(l),u}(Ot(Ot(Ot({},u),n),{},{googleMapsKey:i}));default:return mt.log.info("No recognized map provider specified")(),new mt.DeckGL(Ot(Ot(Ot({},u),n),{},{map:null,mapboxApiAccessToken:null}))}}function Lt(t){var e,n=t.mapboxApiKey,r=t.googleMapsKey,i=t.container,o=t.jsonInput,a=t.tooltip,s=t.handleEvent,u=t.customLibraries,c=t.configuration;try{c&&Bt.mergeConfiguration(c);var l=o.layers||[],h=Bt.convert(o);!function(t,e){var n=document.createElement("div");n.className="deckgl-ui-elements-overlay",n.style.zIndex=1,t.insertAdjacentElement("beforebegin",n);for(var r=[],i=0,o=Object.keys(e);if.length&&e.setProps({layers:t})}}))}catch(t){console.error(t)}return e}},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){var r=n(214);function i(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};i()(this,t),u()(this,"type","directional");var n=e.color,r=void 0===n?l:n,o=e.intensity,a=void 0===o?1:o,s=e.direction,p=void 0===s?h:s,d=e._shadow,A=void 0!==d&&d;this.id=e.id||"directional-".concat(f++),this.color=r,this.intensity=a,this.type="directional",this.direction=new c.a(p).normalize().toArray(),this.shadow=A}return a()(t,[{key:"getProjectedLight",value:function(t){return this}}]),t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(100),i=n(108);async function o(t,e){if("string"==typeof t){t=Object(r.b)(t);let n=e;return null!=e&&e.fetch&&"function"!=typeof(null==e?void 0:e.fetch)&&(n=e.fetch),await fetch(t,n)}return await Object(i.b)(t)}},function(t,e,n){"use strict";const r={name:"fp32",vs:"#ifdef LUMA_FP32_TAN_PRECISION_WORKAROUND\nconst float TWO_PI = 6.2831854820251465;\nconst float PI_2 = 1.5707963705062866;\nconst float PI_16 = 0.1963495463132858;\n\nconst float SIN_TABLE_0 = 0.19509032368659973;\nconst float SIN_TABLE_1 = 0.3826834261417389;\nconst float SIN_TABLE_2 = 0.5555702447891235;\nconst float SIN_TABLE_3 = 0.7071067690849304;\n\nconst float COS_TABLE_0 = 0.9807852506637573;\nconst float COS_TABLE_1 = 0.9238795042037964;\nconst float COS_TABLE_2 = 0.8314695954322815;\nconst float COS_TABLE_3 = 0.7071067690849304;\n\nconst float INVERSE_FACTORIAL_3 = 1.666666716337204e-01;\nconst float INVERSE_FACTORIAL_5 = 8.333333767950535e-03;\nconst float INVERSE_FACTORIAL_7 = 1.9841270113829523e-04;\nconst float INVERSE_FACTORIAL_9 = 2.75573188446287533e-06;\n\nfloat sin_taylor_fp32(float a) {\n float r, s, t, x;\n\n if (a == 0.0) {\n return 0.0;\n }\n\n x = -a * a;\n s = a;\n r = a;\n\n r = r * x;\n t = r * INVERSE_FACTORIAL_3;\n s = s + t;\n\n r = r * x;\n t = r * INVERSE_FACTORIAL_5;\n s = s + t;\n\n r = r * x;\n t = r * INVERSE_FACTORIAL_7;\n s = s + t;\n\n r = r * x;\n t = r * INVERSE_FACTORIAL_9;\n s = s + t;\n\n return s;\n}\n\nvoid sincos_taylor_fp32(float a, out float sin_t, out float cos_t) {\n if (a == 0.0) {\n sin_t = 0.0;\n cos_t = 1.0;\n }\n sin_t = sin_taylor_fp32(a);\n cos_t = sqrt(1.0 - sin_t * sin_t);\n}\n\nfloat tan_taylor_fp32(float a) {\n float sin_a;\n float cos_a;\n\n if (a == 0.0) {\n return 0.0;\n }\n float z = floor(a / TWO_PI);\n float r = a - TWO_PI * z;\n\n float t;\n float q = floor(r / PI_2 + 0.5);\n int j = int(q);\n\n if (j < -2 || j > 2) {\n return 1.0 / 0.0;\n }\n\n t = r - PI_2 * q;\n\n q = floor(t / PI_16 + 0.5);\n int k = int(q);\n int abs_k = int(abs(float(k)));\n\n if (abs_k > 4) {\n return 1.0 / 0.0;\n } else {\n t = t - PI_16 * q;\n }\n\n float u = 0.0;\n float v = 0.0;\n\n float sin_t, cos_t;\n float s, c;\n sincos_taylor_fp32(t, sin_t, cos_t);\n\n if (k == 0) {\n s = sin_t;\n c = cos_t;\n } else {\n if (abs(float(abs_k) - 1.0) < 0.5) {\n u = COS_TABLE_0;\n v = SIN_TABLE_0;\n } else if (abs(float(abs_k) - 2.0) < 0.5) {\n u = COS_TABLE_1;\n v = SIN_TABLE_1;\n } else if (abs(float(abs_k) - 3.0) < 0.5) {\n u = COS_TABLE_2;\n v = SIN_TABLE_2;\n } else if (abs(float(abs_k) - 4.0) < 0.5) {\n u = COS_TABLE_3;\n v = SIN_TABLE_3;\n }\n if (k > 0) {\n s = u * sin_t + v * cos_t;\n c = u * cos_t - v * sin_t;\n } else {\n s = u * sin_t - v * cos_t;\n c = u * cos_t + v * sin_t;\n }\n }\n\n if (j == 0) {\n sin_a = s;\n cos_a = c;\n } else if (j == 1) {\n sin_a = c;\n cos_a = -s;\n } else if (j == -1) {\n sin_a = -c;\n cos_a = s;\n } else {\n sin_a = -s;\n cos_a = -c;\n }\n return sin_a / cos_a;\n}\n#endif\n\nfloat tan_fp32(float a) {\n#ifdef LUMA_FP32_TAN_PRECISION_WORKAROUND\n return tan_taylor_fp32(a);\n#else\n return tan(a);\n#endif\n}\n",fs:null};var i="#define SMOOTH_EDGE_RADIUS 0.5",o={name:"geometry",vs:"\n".concat(i,"\n\nstruct VertexGeometry {\n vec4 position;\n vec3 worldPosition;\n vec3 worldPositionAlt;\n vec3 normal;\n vec2 uv;\n vec3 pickingColor;\n} geometry = VertexGeometry(\n vec4(0.0, 0.0, 1.0, 0.0),\n vec3(0.0),\n vec3(0.0),\n vec3(0.0),\n vec2(0.0),\n vec3(0.0)\n);\n"),fs:"\n".concat(i,"\n\nstruct FragmentGeometry {\n vec2 uv;\n} geometry;\n\nfloat smoothedge(float edge, float x) {\n return smoothstep(edge - SMOOTH_EDGE_RADIUS, edge + SMOOTH_EDGE_RADIUS, x);\n}\n")},a=n(12),s=Object.keys(a.a).map((function(t){return"const int COORDINATE_SYSTEM_".concat(t," = ").concat(a.a[t],";")})).join(""),u=Object.keys(a.d).map((function(t){return"const int PROJECTION_MODE_".concat(t," = ").concat(a.d[t],";")})).join(""),c=Object.keys(a.e).map((function(t){return"const int UNIT_".concat(t.toUpperCase()," = ").concat(a.e[t],";")})).join(""),l="".concat(s,"\n").concat(u,"\n").concat(c,'\n\nuniform int project_uCoordinateSystem;\nuniform int project_uProjectionMode;\nuniform float project_uScale;\nuniform bool project_uWrapLongitude;\nuniform vec3 project_uCommonUnitsPerMeter;\nuniform vec3 project_uCommonUnitsPerWorldUnit;\nuniform vec3 project_uCommonUnitsPerWorldUnit2;\nuniform vec4 project_uCenter;\nuniform mat4 project_uModelMatrix;\nuniform mat4 project_uViewProjectionMatrix;\nuniform vec2 project_uViewportSize;\nuniform float project_uDevicePixelRatio;\nuniform float project_uFocalDistance;\nuniform vec3 project_uCameraPosition;\nuniform vec3 project_uCoordinateOrigin;\nuniform vec3 project_uCommonOrigin;\nuniform bool project_uPseudoMeters;\n\nconst float TILE_SIZE = 512.0;\nconst float PI = 3.1415926536;\nconst float WORLD_SCALE = TILE_SIZE / (PI * 2.0);\nconst vec3 ZERO_64_LOW = vec3(0.0);\nconst float EARTH_RADIUS = 6370972.0; // meters\nconst float GLOBE_RADIUS = 256.0;\n\n// returns an adjustment factor for uCommonUnitsPerMeter\nfloat project_size_at_latitude(float lat) {\n float y = clamp(lat, -89.9, 89.9);\n return 1.0 / cos(radians(y));\n}\n\nfloat project_size() {\n if (project_uProjectionMode == PROJECTION_MODE_WEB_MERCATOR &&\n project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT &&\n project_uPseudoMeters == false) {\n\n // uCommonUnitsPerMeter in low-zoom Web Mercator is non-linear\n // Adjust by 1 / cos(latitude)\n // If geometry.position (vertex in common space) is populated, use it\n // Otherwise use geometry.worldPosition (anchor in world space)\n \n if (geometry.position.w == 0.0) {\n return project_size_at_latitude(geometry.worldPosition.y);\n }\n\n // latitude from common y: 2.0 * (atan(exp(y / TILE_SIZE * 2.0 * PI - PI)) - PI / 4.0)\n // Taylor series of 1 / cos(latitude)\n // Max error < 0.003\n \n float y = geometry.position.y / TILE_SIZE * 2.0 - 1.0;\n float y2 = y * y;\n float y4 = y2 * y2;\n float y6 = y4 * y2;\n return 1.0 + 4.9348 * y2 + 4.0587 * y4 + 1.5642 * y6;\n }\n return 1.0;\n}\n\nfloat project_size_at_latitude(float meters, float lat) {\n return meters * project_uCommonUnitsPerMeter.z * project_size_at_latitude(lat);\n}\n\n//\n// Scaling offsets - scales meters to "world distance"\n// Note the scalar version of project_size is for scaling the z component only\n//\nfloat project_size(float meters) {\n return meters * project_uCommonUnitsPerMeter.z * project_size();\n}\n\nvec2 project_size(vec2 meters) {\n return meters * project_uCommonUnitsPerMeter.xy * project_size();\n}\n\nvec3 project_size(vec3 meters) {\n return meters * project_uCommonUnitsPerMeter * project_size();\n}\n\nvec4 project_size(vec4 meters) {\n return vec4(meters.xyz * project_uCommonUnitsPerMeter, meters.w);\n}\n\n// Get rotation matrix that aligns the z axis with the given up vector\n// Find 3 unit vectors ux, uy, uz that are perpendicular to each other and uz == up\nmat3 project_get_orientation_matrix(vec3 up) {\n vec3 uz = normalize(up);\n // Tangent on XY plane\n vec3 ux = abs(uz.z) == 1.0 ? vec3(1.0, 0.0, 0.0) : normalize(vec3(uz.y, -uz.x, 0));\n vec3 uy = cross(uz, ux);\n return mat3(ux, uy, uz);\n}\n\nbool project_needs_rotation(vec3 commonPosition, out mat3 transform) {\n if (project_uProjectionMode == PROJECTION_MODE_GLOBE) {\n transform = project_get_orientation_matrix(commonPosition);\n return true;\n }\n return false;\n}\n\n//\n// Projecting normal - transform deltas from current coordinate system to\n// normals in the worldspace\n//\nvec3 project_normal(vec3 vector) {\n // Apply model matrix\n vec4 normal_modelspace = project_uModelMatrix * vec4(vector, 0.0);\n vec3 n = normalize(normal_modelspace.xyz * project_uCommonUnitsPerMeter);\n mat3 rotation;\n if (project_needs_rotation(geometry.position.xyz, rotation)) {\n n = rotation * n;\n }\n return n;\n}\n\nvec4 project_offset_(vec4 offset) {\n float dy = offset.y;\n vec3 commonUnitsPerWorldUnit = project_uCommonUnitsPerWorldUnit + project_uCommonUnitsPerWorldUnit2 * dy;\n return vec4(offset.xyz * commonUnitsPerWorldUnit, offset.w);\n}\n\n//\n// Projecting positions - non-linear projection: lnglats => unit tile [0-1, 0-1]\n//\nvec2 project_mercator_(vec2 lnglat) {\n float x = lnglat.x;\n if (project_uWrapLongitude) {\n x = mod(x + 180., 360.0) - 180.;\n }\n float y = clamp(lnglat.y, -89.9, 89.9);\n return vec2(\n radians(x) + PI,\n PI + log(tan_fp32(PI * 0.25 + radians(y) * 0.5))\n ) * WORLD_SCALE;\n}\n\nvec3 project_globe_(vec3 lnglatz) {\n float lambda = radians(lnglatz.x);\n float phi = radians(lnglatz.y);\n float cosPhi = cos(phi);\n float D = (lnglatz.z / EARTH_RADIUS + 1.0) * GLOBE_RADIUS;\n\n return vec3(\n sin(lambda) * cosPhi,\n -cos(lambda) * cosPhi,\n sin(phi)\n ) * D;\n}\n\n//\n// Projects positions (defined by project_uCoordinateSystem) to common space (defined by project_uProjectionMode)\n//\nvec4 project_position(vec4 position, vec3 position64Low) {\n vec4 position_world = project_uModelMatrix * position;\n\n // Work around for a Mac+NVIDIA bug https://github.com/visgl/deck.gl/issues/4145\n if (project_uProjectionMode == PROJECTION_MODE_WEB_MERCATOR) {\n if (project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT) {\n return vec4(\n project_mercator_(position_world.xy),\n project_size_at_latitude(position_world.z, position_world.y),\n position_world.w\n );\n }\n if (project_uCoordinateSystem == COORDINATE_SYSTEM_CARTESIAN) {\n position_world.xyz += project_uCoordinateOrigin;\n }\n }\n if (project_uProjectionMode == PROJECTION_MODE_GLOBE) {\n if (project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT) {\n return vec4(\n project_globe_(position_world.xyz),\n position_world.w\n );\n }\n }\n if (project_uProjectionMode == PROJECTION_MODE_WEB_MERCATOR_AUTO_OFFSET) {\n if (project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT) {\n if (abs(position_world.y - project_uCoordinateOrigin.y) > 0.25) {\n // Too far from the projection center for offset mode to be accurate\n // Only use high parts\n return vec4(\n project_mercator_(position_world.xy) - project_uCommonOrigin.xy,\n project_size(position_world.z),\n position_world.w\n );\n }\n }\n }\n if (project_uProjectionMode == PROJECTION_MODE_IDENTITY ||\n (project_uProjectionMode == PROJECTION_MODE_WEB_MERCATOR_AUTO_OFFSET &&\n (project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT ||\n project_uCoordinateSystem == COORDINATE_SYSTEM_CARTESIAN))) {\n // Subtract high part of 64 bit value. Convert remainder to float32, preserving precision.\n position_world.xyz -= project_uCoordinateOrigin;\n }\n\n // Translation is already added to the high parts\n return project_offset_(position_world + project_uModelMatrix * vec4(position64Low, 0.0));\n}\n\nvec4 project_position(vec4 position) {\n return project_position(position, ZERO_64_LOW);\n}\n\nvec3 project_position(vec3 position, vec3 position64Low) {\n vec4 projected_position = project_position(vec4(position, 1.0), position64Low);\n return projected_position.xyz;\n}\n\nvec3 project_position(vec3 position) {\n vec4 projected_position = project_position(vec4(position, 1.0), ZERO_64_LOW);\n return projected_position.xyz;\n}\n\nvec2 project_position(vec2 position) {\n vec4 projected_position = project_position(vec4(position, 0.0, 1.0), ZERO_64_LOW);\n return projected_position.xy;\n}\n\nvec4 project_common_position_to_clipspace(vec4 position, mat4 viewProjectionMatrix, vec4 center) {\n return viewProjectionMatrix * position + center;\n}\n\n//\n// Projects from common space coordinates to clip space.\n// Uses project_uViewProjectionMatrix\n//\nvec4 project_common_position_to_clipspace(vec4 position) {\n return project_common_position_to_clipspace(position, project_uViewProjectionMatrix, project_uCenter);\n}\n\n// Returns a clip space offset that corresponds to a given number of screen pixels\nvec2 project_pixel_size_to_clipspace(vec2 pixels) {\n vec2 offset = pixels / project_uViewportSize * project_uDevicePixelRatio * 2.0;\n return offset * project_uFocalDistance;\n}\n\nfloat project_size_to_pixel(float meters) {\n return project_size(meters) * project_uScale;\n}\nfloat project_size_to_pixel(float size, int unit) {\n if (unit == UNIT_METERS) return project_size_to_pixel(size);\n if (unit == UNIT_COMMON) return size * project_uScale;\n // UNIT_PIXELS\n return size;\n}\nfloat project_pixel_size(float pixels) {\n return pixels / project_uScale;\n}\nvec2 project_pixel_size(vec2 pixels) {\n return pixels / project_uScale;\n}\n'),h=n(124),f={};e.a={name:"project",dependencies:[r,o],vs:l,getUniforms:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f;return"viewport"in t?Object(h.b)(t):{}}}},function(t,e,n){"use strict";var r=n(51),i=n(155);var o=n(195),a=n(45),s=n(22),u=n(46),c=n(126),l=n(91),h=n(62),f=n(79);async function p(t,e,n,d){Object(r.a)(!d||"object"==typeof d),!e||Array.isArray(e)||Object(a.a)(e)||(d=void 0,n=e,e=void 0),t=await t,n=n||{};const{url:A}=Object(h.b)(t),g=e,m=Object(l.b)(g,d),y=await Object(f.a)(t,m,n);return y?(n=Object(u.d)(n,y,m,A),d=Object(l.a)({url:A,parse:p,loaders:m},n,d),await async function(t,e,n,a){if(function(t,e=i.a){Object(r.a)(t,"no worker provided");const n=t.version}(t),Object(s.j)(e)){const t=e,{ok:n,redirected:r,status:i,statusText:o,type:s,url:u}=t,c=Object.fromEntries(t.headers.entries());a.response={headers:c,ok:n,redirected:r,status:i,statusText:o,type:s,url:u}}if(e=await Object(c.a)(e,t,n),t.parseTextSync&&"string"==typeof e)return n.dataType="text",t.parseTextSync(e,n,a,t);if(Object(o.a)(t,n))return await Object(o.b)(t,e,n,a,p);if(t.parseText&&"string"==typeof e)return await t.parseText(e,n,a,t);if(t.parse)return await t.parse(e,n,a,t);throw Object(r.a)(!t.parseSync),new Error("".concat(t.id," loader - no parser found and worker is disabled"))}(y,t,n,d)):null}n.d(e,"a",(function(){return p}))},function(t,e,n){"use strict";function r(t,e){if(!t)throw new Error(e||"loader assertion failed.")}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";var r=n(7),i=n(54),o=n(10);let a="";n.d(e,"a",(function(){return s}));class s extends i.a{get[Symbol.toStringTag](){return"Texture2D"}static isSupported(t,e){return i.a.isSupported(t,e)}constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var n,i;Object(r.b)(t),(e instanceof Promise||"string"==typeof e)&&(e={data:e}),"string"==typeof e.data&&(e=Object.assign({},e,{data:(n=e.data,Object(o.a)("string"==typeof n),n=a+n,new Promise((t,e)=>{try{const r=new Image;r.onload=()=>t(r),r.onerror=()=>e(new Error("Could not load image ".concat(n,"."))),r.crossOrigin=i&&i.crossOrigin||"anonymous",r.src=n}catch(t){e(t)}}))})),super(t,Object.assign({},e,{target:3553})),this.initialize(e),Object.seal(this)}}},function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return a}));var r=n(22),i=n(62);async function o(t){if(Object(r.j)(t))return t;const e={},n=Object(i.a)(t);n>=0&&(e["content-length"]=String(n));const{url:o,type:a}=Object(i.b)(t);a&&(e["content-type"]=a);const s=await async function(t){if("string"==typeof t)return"data:,".concat(t.slice(0,5));if(t instanceof Blob){const e=t.slice(0,5);return await new Promise(t=>{const n=new FileReader;n.onload=e=>{var n;return t(null==e||null===(n=e.target)||void 0===n?void 0:n.result)},n.readAsDataURL(e)})}if(t instanceof ArrayBuffer){const e=function(t){let e="";const n=new Uint8Array(t);for(let t=0;t60?"".concat(e.slice(0,60),"..."):e}catch(t){}return e}(t);throw new Error(e)}}},function(t,e,n){"use strict";var r=n(38);const i="EXT_color_buffer_float";var o={33189:{bpp:2},33190:{gl2:!0,bpp:3},36012:{gl2:!0,bpp:4},36168:{bpp:1},34041:{bpp:4},35056:{gl2:!0,bpp:4},36013:{gl2:!0,bpp:5},32854:{bpp:2},36194:{bpp:2},32855:{bpp:2},33321:{gl2:!0,bpp:1},33330:{gl2:!0,bpp:1},33329:{gl2:!0,bpp:1},33332:{gl2:!0,bpp:2},33331:{gl2:!0,bpp:2},33334:{gl2:!0,bpp:4},33333:{gl2:!0,bpp:4},33323:{gl2:!0,bpp:2},33336:{gl2:!0,bpp:2},33335:{gl2:!0,bpp:2},33338:{gl2:!0,bpp:4},33337:{gl2:!0,bpp:4},33340:{gl2:!0,bpp:8},33339:{gl2:!0,bpp:8},32849:{gl2:!0,bpp:3},32856:{gl2:!0,bpp:4},32857:{gl2:!0,bpp:4},36220:{gl2:!0,bpp:4},36238:{gl2:!0,bpp:4},36975:{gl2:!0,bpp:4},36214:{gl2:!0,bpp:8},36232:{gl2:!0,bpp:8},36226:{gl2:!0,bpp:16},36208:{gl2:!0,bpp:16},33325:{gl2:i,bpp:2},33327:{gl2:i,bpp:4},34842:{gl2:i,bpp:8},33326:{gl2:i,bpp:4},33328:{gl2:i,bpp:8},34836:{gl2:i,bpp:16},35898:{gl2:i,bpp:4}},a=n(7),s=n(10);n.d(e,"a",(function(){return u}));class u extends r.a{get[Symbol.toStringTag](){return"Renderbuffer"}static isSupported(t){let{format:e}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{format:null};return!e||function(t,e,n){const r=n[e];if(!r)return!1;const i=Object(a.j)(t)&&r.gl2||r.gl1;return"string"==typeof i?t.getExtension(i):i}(t,e,o)}static getSamplesForFormat(t,e){let{format:n}=e;return t.getInternalformatParameter(36161,n,32937)}constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(t,e),this.initialize(e),Object.seal(this)}initialize(t){let{format:e,width:n=1,height:r=1,samples:i=0}=t;return Object(s.a)(e,"Needs format"),this._trackDeallocatedMemory(),this.gl.bindRenderbuffer(36161,this.handle),0!==i&&Object(a.j)(this.gl)?this.gl.renderbufferStorageMultisample(36161,i,e,n,r):this.gl.renderbufferStorage(36161,e,n,r),this.format=e,this.width=n,this.height=r,this.samples=i,this._trackAllocatedMemory(this.width*this.height*(this.samples||1)*o[this.format].bpp),this}resize(t){let{width:e,height:n}=t;return e!==this.width||n!==this.height?this.initialize({width:e,height:n,format:this.format,samples:this.samples}):this}_createHandle(){return this.gl.createRenderbuffer()}_deleteHandle(){this.gl.deleteRenderbuffer(this.handle),this._trackDeallocatedMemory()}_bindHandle(t){this.gl.bindRenderbuffer(36161,t)}_syncHandle(t){this.format=this.getParameter(36164),this.width=this.getParameter(36162),this.height=this.getParameter(36163),this.samples=this.getParameter(36011)}_getParameter(t){this.gl.bindRenderbuffer(36161,this.handle);return this.gl.getRenderbufferParameter(36161,t)}}},function(t,e,n){"use strict";(function(t){n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return o}));const r="undefined"!=typeof navigator&&navigator.userAgent?navigator.userAgent.toLowerCase():"",i="undefined"!=typeof window?window:t;void 0!==t||window,"undefined"!=typeof document&&document;let o=!1;try{const t={get passive(){return o=!0,!0}};i.addEventListener("test",null,t),i.removeEventListener("test",null)}catch(t){o=!1}}).call(this,n(71))},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return r}));"undefined"!=typeof window&&window,void 0!==t||window;var r="undefined"!=typeof document?document:{}}).call(this,n(71))},function(t,e,n){"use strict";n.d(e,"c",(function(){return a})),n.d(e,"b",(function(){return s})),n.d(e,"a",(function(){return u}));var r=n(45),i=n(46);const o=()=>{const t=Object(i.c)();return t.loaderRegistry=t.loaderRegistry||[],t.loaderRegistry};function a(t){const e=o();t=Array.isArray(t)?t:[t];for(const n of t){const t=Object(r.b)(n);e.find(e=>t===e)||e.unshift(t)}}function s(){return o()}function u(){Object(i.c)().loaderRegistry=[]}},function(t,e,n){"use strict";n.d(e,"a",(function(){return C})),n.d(e,"b",(function(){return P}));var r=n(27),i=n.n(r),o=n(8),a=n.n(o),s=n(0),u=n.n(s),c=n(3),l=n.n(c),h=n(4),f=n.n(h),p=n(5),d=n.n(p),A=n(6),g=n.n(A),m=n(1),y=n.n(m),v=n(13),_=n(58),b=n(125),x=n(19),w=n(29),E=n(50);function O(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function S(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:2;return this._zoomFromCenter(t)}},{key:"zoomOut",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2;return this._zoomFromCenter(1/t)}},{key:"moveLeft",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;return this._panFromCenter([t,0])}},{key:"moveRight",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;return this._panFromCenter([-t,0])}},{key:"moveUp",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;return this._panFromCenter([0,t])}},{key:"moveDown",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;return this._panFromCenter([0,-t])}},{key:"rotateLeft",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:15;return this._getUpdatedState({bearing:this.getViewportProps().bearing-t})}},{key:"rotateRight",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:15;return this._getUpdatedState({bearing:this.getViewportProps().bearing+t})}},{key:"rotateUp",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;return this._getUpdatedState({pitch:this.getViewportProps().pitch+t})}},{key:"rotateDown",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;return this._getUpdatedState({pitch:this.getViewportProps().pitch-t})}},{key:"shortestPathFrom",value:function(t){var e=t.getViewportProps(),n=S({},this.getViewportProps()),r=n.bearing,i=n.longitude;return Math.abs(r-e.bearing)>180&&(n.bearing=r<0?r+360:r-360),Math.abs(i-e.longitude)>180&&(n.longitude=i<0?i+360:i-360),n}},{key:"applyConstraints",value:function(t){var e=t.maxZoom,n=t.minZoom,r=t.zoom;t.zoom=Object(v.a)(r,n,e);var i=t.maxPitch,o=t.minPitch,a=t.pitch;t.pitch=Object(v.a)(a,o,i);var s=t.normalize;return(void 0===s||s)&&Object.assign(t,Object(x.m)(t)),t}},{key:"_zoomFromCenter",value:function(t){var e=this.getViewportProps(),n=e.width,r=e.height;return this.zoom({pos:[n/2,r/2],scale:t})}},{key:"_panFromCenter",value:function(t){var e=this.getViewportProps(),n=e.width,r=e.height;return this.pan({startPos:[n/2,r/2],pos:[n/2+t[0],r/2+t[1]]})}},{key:"_getUpdatedState",value:function(t){return new this.constructor(S(S(S({makeViewport:this.makeViewport},this.getViewportProps()),this.getState()),t))}},{key:"_unproject",value:function(t){var e=this.makeViewport(this.getViewportProps());return t&&e.unproject(t)}},{key:"_getNewRotation",value:function(t,e,n,r){var i=t[0]-e[0],o=t[1]-e[1],a=t[1],s=e[1],u=this.getViewportProps(),c=u.width,l=u.height,h=i/c,f=0;o>0?Math.abs(l-s)>5&&(f=o/(s-l)*1.2):o<0&&s>5&&(f=1-a/s),f=Object(v.a)(f,-1,1);var p=this.getViewportProps(),d=p.minPitch,A=p.maxPitch,g=n;return f>0?g=n+f*(A-n):f<0&&(g=n-f*(d-n)),{pitch:g,bearing:r+180*h}}}]),n}(b.a),P=function(t){d()(n,t);var e=T(n);function n(){var t;l()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n90)&&(d*=-1),e={rotationX:c+180*((n[1]-u[1])/p),rotationOrbit:l+180*d}}else e={rotationX:c+a,rotationOrbit:l+i};return this._getUpdatedState(e)}},{key:"rotateEnd",value:function(){return this._getUpdatedState({startRotationX:null,startRotationOrbit:null})}},{key:"shortestPathFrom",value:function(t){var e=t.getViewportProps(),n=w({},this.getViewportProps()),r=n.rotationOrbit;return Math.abs(r-e.rotationOrbit)>180&&(n.rotationOrbit=r<0?r+360:r-360),n}},{key:"zoomStart",value:function(t){var e=t.pos;return this._getUpdatedState({startZoomPosition:this._unproject(e),startZoom:this.getViewportProps().zoom})}},{key:"zoom",value:function(t){var e=t.pos,n=t.startPos,r=t.scale,i=this.getState(),o=i.startZoom,a=i.startZoomPosition;if(a||(o=this.getViewportProps().zoom,a=this._unproject(n)||this._unproject(e)),!a)return this;var s=this._calculateNewZoom({scale:r,startZoom:o}),u=this.makeViewport(w(w({},this.getViewportProps()),{},{zoom:s}));return this._getUpdatedState(w({zoom:s},u.panByPosition(a,e)))}},{key:"zoomEnd",value:function(){return this._getUpdatedState({startZoomPosition:null,startZoom:null})}},{key:"zoomIn",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2;return this._getUpdatedState({zoom:this._calculateNewZoom({scale:t})})}},{key:"zoomOut",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2;return this._getUpdatedState({zoom:this._calculateNewZoom({scale:1/t})})}},{key:"moveLeft",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50;return this._panFromCenter([-t,0])}},{key:"moveRight",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50;return this._panFromCenter([t,0])}},{key:"moveUp",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50;return this._panFromCenter([0,-t])}},{key:"moveDown",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50;return this._panFromCenter([0,t])}},{key:"rotateLeft",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:15;return this._getUpdatedState({rotationOrbit:this.getViewportProps().rotationOrbit-t})}},{key:"rotateRight",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:15;return this._getUpdatedState({rotationOrbit:this.getViewportProps().rotationOrbit+t})}},{key:"rotateUp",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;return this._getUpdatedState({rotationX:this.getViewportProps().rotationX-t})}},{key:"rotateDown",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;return this._getUpdatedState({rotationX:this.getViewportProps().rotationX+t})}},{key:"_unproject",value:function(t){var e=this.makeViewport(this.getViewportProps());return t&&e.unproject(t)}},{key:"_calculateNewZoom",value:function(t){var e=t.scale,n=t.startZoom,r=this.getViewportProps(),i=r.maxZoom,o=r.minZoom;void 0===n&&(n=this.getViewportProps().zoom);var a=n+Math.log2(e);return Object(m.a)(a,o,i)}},{key:"_panFromCenter",value:function(t){var e=this.getViewportProps(),n=e.width,r=e.height,i=e.target;return this.pan({startPosition:i,pos:[n/2+t[0],r/2+t[1]]})}},{key:"_getUpdatedState",value:function(t){return new this.constructor(w(w(w({makeViewport:this.makeViewport},this.getViewportProps()),this.getState()),t))}},{key:"applyConstraints",value:function(t){var e=t.maxZoom,n=t.minZoom,r=t.zoom,i=t.maxRotationX,o=t.minRotationX,a=t.rotationOrbit;return t.zoom=Array.isArray(r)?[Object(m.a)(r[0],n,e),Object(m.a)(r[1],n,e)]:Object(m.a)(r,n,e),t.rotationX=Object(m.a)(t.rotationX,o,i),(a<-180||a>180)&&(t.rotationOrbit=Object(_.e)(a+180,360)-180),t}}]),n}(v.a),S=function(t){f()(n,t);var e=E(n);function n(){var t;u()(this,n);for(var r=arguments.length,o=new Array(r),s=0;s=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function M(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n2?a[u*o+2]:0;i[3*s]=c,i[3*s+1]=l,i[3*s+2]=h}}},{key:"_updateVertexValid",value:function(t,e){var n=e.vertexStart,r=e.geometrySize,i=this.positionSize,o=this.attributes.vertexValid,a=t&&S.a(t);if(t&&t.edgeTypes?o.set(t.edgeTypes,n):o.fill(1,n,n+r),a)for(var s=0;s0&&!Number.isFinite(t[0])}var L="\nattribute vec2 vertexPositions;\nattribute float vertexValid;\n\nuniform bool extruded;\nuniform bool isWireframe;\nuniform float elevationScale;\nuniform float opacity;\n\nvarying vec4 vColor;\n\nstruct PolygonProps {\n vec4 fillColors;\n vec4 lineColors;\n vec3 positions;\n vec3 nextPositions;\n vec3 pickingColors;\n vec3 positions64Low;\n vec3 nextPositions64Low;\n float elevations;\n};\n\nvec3 project_offset_normal(vec3 vector) {\n if (project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT ||\n project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSETS) {\n // normals generated by the polygon tesselator are in lnglat offsets instead of meters\n return normalize(vector * project_uCommonUnitsPerWorldUnit);\n }\n return project_normal(vector);\n}\n\nvoid calculatePosition(PolygonProps props) {\n#ifdef IS_SIDE_VERTEX\n if(vertexValid < 0.5){\n gl_Position = vec4(0.);\n return;\n }\n#endif\n\n vec3 pos;\n vec3 pos64Low;\n vec3 normal;\n vec4 colors = isWireframe ? props.lineColors : props.fillColors;\n\n geometry.worldPosition = props.positions;\n geometry.worldPositionAlt = props.nextPositions;\n geometry.pickingColor = props.pickingColors;\n\n#ifdef IS_SIDE_VERTEX\n pos = mix(props.positions, props.nextPositions, vertexPositions.x);\n pos64Low = mix(props.positions64Low, props.nextPositions64Low, vertexPositions.x);\n#else\n pos = props.positions;\n pos64Low = props.positions64Low;\n#endif\n\n if (extruded) {\n pos.z += props.elevations * vertexPositions.y * elevationScale;\n }\n gl_Position = project_position_to_clipspace(pos, pos64Low, vec3(0.), geometry.position);\n\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n if (extruded) {\n #ifdef IS_SIDE_VERTEX\n normal = vec3(\n props.positions.y - props.nextPositions.y + (props.positions64Low.y - props.nextPositions64Low.y),\n props.nextPositions.x - props.positions.x + (props.nextPositions64Low.x - props.positions64Low.x),\n 0.0);\n normal = project_offset_normal(normal);\n #else\n normal = project_normal(vec3(0.0, 0.0, 1.0));\n #endif\n geometry.normal = normal;\n vec3 lightColor = lighting_getLightColor(colors.rgb, project_uCameraPosition, geometry.position.xyz, normal);\n vColor = vec4(lightColor, colors.a * opacity);\n } else {\n vColor = vec4(colors.rgb, colors.a * opacity);\n }\n DECKGL_FILTER_COLOR(vColor, geometry);\n}\n",j="#define SHADER_NAME solid-polygon-layer-vertex-shader\n\nattribute vec3 positions;\nattribute vec3 positions64Low;\nattribute float elevations;\nattribute vec4 fillColors;\nattribute vec4 lineColors;\nattribute vec3 pickingColors;\n\n".concat(L,"\n\nvoid main(void) {\n PolygonProps props;\n\n props.positions = positions;\n props.positions64Low = positions64Low;\n props.elevations = elevations;\n props.fillColors = fillColors;\n props.lineColors = lineColors;\n props.pickingColors = pickingColors;\n\n calculatePosition(props);\n}\n"),F="#define SHADER_NAME solid-polygon-layer-vertex-shader-side\n#define IS_SIDE_VERTEX\n\n\nattribute vec3 instancePositions;\nattribute vec3 nextPositions;\nattribute vec3 instancePositions64Low;\nattribute vec3 nextPositions64Low;\nattribute float instanceElevations;\nattribute vec4 instanceFillColors;\nattribute vec4 instanceLineColors;\nattribute vec3 instancePickingColors;\n\n".concat(L,"\n\nvoid main(void) {\n PolygonProps props;\n\n #if RING_WINDING_ORDER_CW == 1\n props.positions = instancePositions;\n props.positions64Low = instancePositions64Low;\n props.nextPositions = nextPositions;\n props.nextPositions64Low = nextPositions64Low;\n #else\n props.positions = nextPositions;\n props.positions64Low = nextPositions64Low;\n props.nextPositions = instancePositions;\n props.nextPositions64Low = instancePositions64Low;\n #endif\n props.elevations = instanceElevations;\n props.fillColors = instanceFillColors;\n props.lineColors = instanceLineColors;\n props.pickingColors = instancePickingColors;\n\n calculatePosition(props);\n}\n");function z(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function U(t){for(var e=1;e=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function S(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n2&&void 0!==arguments[2]?arguments[2]:[],r=this.positionSize;e*r>=t.length&&(e+=1-t.length/r);var i=e*r;return n[0]=t[i],n[1]=t[i+1],n[2]=3===r&&t[i+2]||0,n}},{key:"isClosed",value:function(t){if(!this.normalize)return Boolean(this.opts.loop);var e=this.positionSize,n=t.length-e;return t[0]===t[n]&&t[1]===t[n+1]&&(2===e||t[2]===t[n+2])}}]),n}(w.a);function I(t){return Array.isArray(t[0])}function B(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function R(t){for(var e=1;e 0.0;\n // side of the segment - -1: left, 0: center, 1: right\n float sideOfPath = positions.y;\n float isJoint = float(sideOfPath == 0.0);\n\n vec3 deltaA3 = (currPoint - prevPoint);\n vec3 deltaB3 = (nextPoint - currPoint);\n\n mat3 rotationMatrix;\n bool needsRotation = !billboard && project_needs_rotation(currPoint, rotationMatrix);\n if (needsRotation) {\n deltaA3 = deltaA3 * rotationMatrix;\n deltaB3 = deltaB3 * rotationMatrix;\n }\n vec2 deltaA = deltaA3.xy / width;\n vec2 deltaB = deltaB3.xy / width;\n\n float lenA = length(deltaA);\n float lenB = length(deltaB);\n\n vec2 dirA = lenA > 0. ? normalize(deltaA) : vec2(0.0, 0.0);\n vec2 dirB = lenB > 0. ? normalize(deltaB) : vec2(0.0, 0.0);\n\n vec2 perpA = vec2(-dirA.y, dirA.x);\n vec2 perpB = vec2(-dirB.y, dirB.x);\n\n // tangent of the corner\n vec2 tangent = dirA + dirB;\n tangent = length(tangent) > 0. ? normalize(tangent) : perpA;\n // direction of the corner\n vec2 miterVec = vec2(-tangent.y, tangent.x);\n // direction of the segment\n vec2 dir = isEnd ? dirA : dirB;\n // direction of the extrusion\n vec2 perp = isEnd ? perpA : perpB;\n // length of the segment\n float L = isEnd ? lenA : lenB;\n\n // A = angle of the corner\n float sinHalfA = abs(dot(miterVec, perp));\n float cosHalfA = abs(dot(dirA, miterVec));\n\n // -1: right, 1: left\n float turnDirection = flipIfTrue(dirA.x * dirB.y >= dirA.y * dirB.x);\n\n // relative position to the corner:\n // -1: inside (smaller side of the angle)\n // 0: center\n // 1: outside (bigger side of the angle)\n float cornerPosition = sideOfPath * turnDirection;\n\n float miterSize = 1.0 / max(sinHalfA, EPSILON);\n // trim if inside corner extends further than the line segment\n miterSize = mix(\n min(miterSize, max(lenA, lenB) / max(cosHalfA, EPSILON)),\n miterSize,\n step(0.0, cornerPosition)\n );\n\n vec2 offsetVec = mix(miterVec * miterSize, perp, step(0.5, cornerPosition))\n * (sideOfPath + isJoint * turnDirection);\n\n // special treatment for start cap and end cap\n bool isStartCap = lenA == 0.0 || (!isEnd && (instanceTypes == 1.0 || instanceTypes == 3.0));\n bool isEndCap = lenB == 0.0 || (isEnd && (instanceTypes == 2.0 || instanceTypes == 3.0));\n bool isCap = isStartCap || isEndCap;\n\n // extend out a triangle to envelope the round cap\n if (isCap) {\n offsetVec = mix(perp * sideOfPath, dir * capType * 4.0 * flipIfTrue(isStartCap), isJoint);\n vJointType = capType;\n } else {\n vJointType = jointType;\n }\n\n // Generate variables for fragment shader\n vPathLength = L;\n vCornerOffset = offsetVec;\n vMiterLength = dot(vCornerOffset, miterVec * turnDirection);\n vMiterLength = isCap ? isJoint : vMiterLength;\n\n vec2 offsetFromStartOfPath = vCornerOffset + deltaA * float(isEnd);\n vPathPosition = vec2(\n dot(offsetFromStartOfPath, perp),\n dot(offsetFromStartOfPath, dir)\n );\n geometry.uv = vPathPosition;\n\n float isValid = step(instanceTypes, 3.5);\n vec3 offset = vec3(offsetVec * width * isValid, 0.0);\n\n if (needsRotation) {\n offset = rotationMatrix * offset;\n }\n return currPoint + offset;\n}\n\n// In clipspace extrusion, if a line extends behind the camera, clip it to avoid visual artifacts\nvoid clipLine(inout vec4 position, vec4 refPosition) {\n if (position.w < EPSILON) {\n float r = (EPSILON - refPosition.w) / (position.w - refPosition.w);\n position = refPosition + (position - refPosition) * r;\n }\n}\n\nvoid main() {\n geometry.pickingColor = instancePickingColors;\n\n vColor = vec4(instanceColors.rgb, instanceColors.a * opacity);\n\n float isEnd = positions.x;\n\n vec3 prevPosition = mix(instanceLeftPositions, instanceStartPositions, isEnd);\n vec3 prevPosition64Low = mix(instanceLeftPositions64Low, instanceStartPositions64Low, isEnd);\n\n vec3 currPosition = mix(instanceStartPositions, instanceEndPositions, isEnd);\n vec3 currPosition64Low = mix(instanceStartPositions64Low, instanceEndPositions64Low, isEnd);\n\n vec3 nextPosition = mix(instanceEndPositions, instanceRightPositions, isEnd);\n vec3 nextPosition64Low = mix(instanceEndPositions64Low, instanceRightPositions64Low, isEnd);\n\n geometry.worldPosition = currPosition;\n vec2 widthPixels = vec2(clamp(\n project_size_to_pixel(instanceStrokeWidths * widthScale, widthUnits),\n widthMinPixels, widthMaxPixels) / 2.0);\n vec3 width;\n\n if (billboard) {\n // Extrude in clipspace\n vec4 prevPositionScreen = project_position_to_clipspace(prevPosition, prevPosition64Low, ZERO_OFFSET);\n vec4 currPositionScreen = project_position_to_clipspace(currPosition, currPosition64Low, ZERO_OFFSET, geometry.position);\n vec4 nextPositionScreen = project_position_to_clipspace(nextPosition, nextPosition64Low, ZERO_OFFSET);\n\n clipLine(prevPositionScreen, currPositionScreen);\n clipLine(nextPositionScreen, currPositionScreen);\n clipLine(currPositionScreen, mix(nextPositionScreen, prevPositionScreen, isEnd));\n\n width = vec3(widthPixels, 0.0);\n DECKGL_FILTER_SIZE(width, geometry);\n\n vec3 pos = lineJoin(\n prevPositionScreen.xyz / prevPositionScreen.w,\n currPositionScreen.xyz / currPositionScreen.w,\n nextPositionScreen.xyz / nextPositionScreen.w,\n project_pixel_size_to_clipspace(width.xy)\n );\n\n gl_Position = vec4(pos * currPositionScreen.w, currPositionScreen.w);\n } else {\n // Extrude in commonspace\n prevPosition = project_position(prevPosition, prevPosition64Low);\n currPosition = project_position(currPosition, currPosition64Low);\n nextPosition = project_position(nextPosition, nextPosition64Low);\n\n width = vec3(project_pixel_size(widthPixels), 0.0);\n DECKGL_FILTER_SIZE(width, geometry);\n\n vec4 pos = vec4(\n lineJoin(prevPosition, currPosition, nextPosition, width.xy),\n 1.0);\n geometry.position = pos;\n gl_Position = project_common_position_to_clipspace(pos);\n }\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n DECKGL_FILTER_COLOR(vColor, geometry);\n}\n",fs:"#define SHADER_NAME path-layer-fragment-shader\n\nprecision highp float;\n\nuniform float miterLimit;\n\nvarying vec4 vColor;\nvarying vec2 vCornerOffset;\nvarying float vMiterLength;\n/*\n * vPathPosition represents the relative coordinates of the current fragment on the path segment.\n * vPathPosition.x - position along the width of the path, between [-1, 1]. 0 is the center line.\n * vPathPosition.y - position along the length of the path, between [0, L / width].\n */\nvarying vec2 vPathPosition;\nvarying float vPathLength;\nvarying float vJointType;\n\nvoid main(void) {\n geometry.uv = vPathPosition;\n\n if (vPathPosition.y < 0.0 || vPathPosition.y > vPathLength) {\n // if joint is rounded, test distance from the corner\n if (vJointType > 0.5 && length(vCornerOffset) > 1.0) {\n discard;\n }\n // trim miter\n if (vJointType < 0.5 && vMiterLength > miterLimit + 1.0) {\n discard;\n }\n }\n gl_FragColor = vColor;\n\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",modules:[m.a,y.a]})}},{key:"wrapLongitude",get:function(){return!1}},{key:"initializeState",value:function(){var t=this;this.getAttributeManager().addInstanced({positions:{size:3,vertexOffset:1,type:5130,fp64:this.use64bitPositions(),transition:j,accessor:"getPath",update:this.calculatePositions,noAlloc:!0,shaderAttributes:{instanceLeftPositions:{vertexOffset:0},instanceStartPositions:{vertexOffset:1},instanceEndPositions:{vertexOffset:2},instanceRightPositions:{vertexOffset:3}}},instanceTypes:{size:1,type:5121,update:this.calculateSegmentTypes,noAlloc:!0},instanceStrokeWidths:{size:1,accessor:"getWidth",transition:j,defaultValue:1},instanceColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,accessor:"getColor",transition:j,defaultValue:D},instancePickingColors:{size:3,type:5121,accessor:function(e,n){var r=n.index,i=n.target;return t.encodePickingColor(e&&e.__source?e.__source.index:r,i)}}}),this.setState({pathTesselator:new M({fp64:this.use64bitPositions()})})}},{key:"updateState",value:function(t){u()(d()(n.prototype),"updateState",this).call(this,t);var e=t.props,r=t.changeFlags,i=this.getAttributeManager();if(r.dataChanged||r.updateTriggersChanged&&(r.updateTriggersChanged.all||r.updateTriggersChanged.getPath)){var o=this.state.pathTesselator,a=e.data.attributes||{};o.updateGeometry({data:e.data,geometryBuffer:a.getPath,buffers:a,normalize:!e._pathType,loop:"loop"===e._pathType,getGeometry:e.getPath,positionFormat:e.positionFormat,wrapLongitude:e.wrapLongitude,resolution:this.context.viewport.resolution,dataChanged:r.dataChanged}),this.setState({numInstances:o.instanceCount,startIndices:o.vertexStarts}),r.dataChanged||i.invalidateAll()}if(r.extensionsChanged){var s,c=this.context.gl;null===(s=this.state.model)||void 0===s||s.delete(),this.state.model=this._getModel(c),i.invalidateAll()}}},{key:"getPickingInfo",value:function(t){var e=u()(d()(n.prototype),"getPickingInfo",this).call(this,t),r=e.index,i=this.props.data;return i[0]&&i[0].__source&&(e.object=i.find((function(t){return t.__source.index===r}))),e}},{key:"disablePickingIndex",value:function(t){var e=this.props.data;if(e[0]&&e[0].__source)for(var n=0;n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function M(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0){var l=function(t){for(var e,n=t.icons,r=t.buffer,i=t.mapping,o=void 0===i?{}:i,a=t.xOffset,s=void 0===a?0:a,u=t.yOffset,c=void 0===u?0:u,l=t.rowHeight,h=void 0===l?0:l,f=t.canvasWidth,p=[],d=0;df&&(L(o,p,c),s=0,c=h+c+r,h=0,p=[]),p.push({icon:A,xOffset:s}),s=s+m+r,h=Math.max(h,g)}}return p.length>0&&L(o,p,c),{mapping:o,rowHeight:h,xOffset:s,yOffset:c,canvasWidth:f,canvasHeight:(e=h+c+r,Math.pow(2,Math.ceil(Math.log2(e))))}}({icons:c,buffer:this._buffer,canvasWidth:this._canvasWidth,mapping:this._mapping,rowHeight:this._rowHeight,xOffset:this._xOffset,yOffset:this._yOffset}),h=l.mapping,f=l.xOffset,p=l.yOffset,d=l.rowHeight,A=l.canvasHeight;this._rowHeight=d,this._mapping=h,this._xOffset=f,this._yOffset=p,this._canvasHeight=A,this._texture||(this._texture=new O.a(this.gl,{width:this._canvasWidth,height:this._canvasHeight,parameters:this._textureParameters||k})),this._texture.height!==this._canvasHeight&&(this._texture=(n=this._texture,r=this._canvasWidth,i=this._canvasHeight,o=this._textureParameters||k,a=n.width,s=n.height,u=new O.a(n.gl,{width:r,height:i,parameters:o}),Object(S.b)(n,u,{targetY:0,width:a,height:s}),n.delete(),u)),this.onUpdate(),this._canvas=this._canvas||document.createElement("canvas"),this._loadIcons(c)}}}},{key:"_loadIcons",value:function(t){var e,n=this,r=this._canvas.getContext("2d"),i=P(t);try{var o=function(){var t=e.value;n._pendingCount++,Object(T.a)(t.url,n._loadOptions).then((function(e){var i=D(t),o=n._mapping[i],a=o.x,s=o.y,u=o.width,c=o.height,l=function(t,e,n,r){return n===e.width&&r===e.height?e:(t.canvas.height=r,t.canvas.width=n,t.clearRect(0,0,t.canvas.width,t.canvas.height),t.drawImage(e,0,0,e.width,e.height,0,0,n,r),t.canvas)}(r,e,u,c);n._texture.setSubImageData({data:l,x:a,y:s,width:u,height:c}),n._texture.generateMipmap(),n.onUpdate()})).catch((function(e){n.onError({url:t.url,source:t.source,sourceIndex:t.sourceIndex,loadOptions:n._loadOptions,error:e})})).finally((function(){n._pendingCount--}))};for(i.s();!(e=i.n()).done;)o()}catch(t){i.e(t)}finally{i.f()}}}]),t}();function F(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function z(t){for(var e=1;e=0&&t=0&&t0?", ":"")+Object(r.e)(this[n],t);return"".concat(t.printTypes?this.constructor.name:"","[").concat(e,"]")}equals(t){if(!t||this.length!==t.length)return!1;for(let e=0;e=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0,shadow_uColor:t.shadowColor||m,shadow_uLightId:t.shadowLightId||0,shadow_uLightCount:t.shadowMatrices.length},i=A({viewport:t.viewport,center:e.project_uCenter}),o=[],a=g({shadowMatrices:t.shadowMatrices,viewport:t.viewport}).slice(),u=0;u0?r["shadow_uShadowMap".concat(f)]=t.shadowMaps[f]:r["shadow_uShadowMap".concat(f)]=t.dummyShadowMap;return r}e.a={name:"shadow",dependencies:[u.a],vs:"\nconst int max_lights = 2;\nuniform mat4 shadow_uViewProjectionMatrices[max_lights];\nuniform vec4 shadow_uProjectCenters[max_lights];\nuniform bool shadow_uDrawShadowMap;\nuniform bool shadow_uUseShadowMap;\nuniform int shadow_uLightId;\nuniform float shadow_uLightCount;\n\nvarying vec3 shadow_vPosition[max_lights];\n\nvec4 shadow_setVertexPosition(vec4 position_commonspace) {\n if (shadow_uDrawShadowMap) {\n return project_common_position_to_clipspace(position_commonspace, shadow_uViewProjectionMatrices[shadow_uLightId], shadow_uProjectCenters[shadow_uLightId]);\n }\n if (shadow_uUseShadowMap) {\n for (int i = 0; i < max_lights; i++) {\n if(i < int(shadow_uLightCount)) {\n vec4 shadowMap_position = project_common_position_to_clipspace(position_commonspace, shadow_uViewProjectionMatrices[i], shadow_uProjectCenters[i]);\n shadow_vPosition[i] = (shadowMap_position.xyz / shadowMap_position.w + 1.0) / 2.0;\n }\n }\n }\n return gl_Position;\n}\n",fs:"\nconst int max_lights = 2;\nuniform bool shadow_uDrawShadowMap;\nuniform bool shadow_uUseShadowMap;\nuniform sampler2D shadow_uShadowMap0;\nuniform sampler2D shadow_uShadowMap1;\nuniform vec4 shadow_uColor;\nuniform float shadow_uLightCount;\n\nvarying vec3 shadow_vPosition[max_lights];\n\nconst vec4 bitPackShift = vec4(1.0, 255.0, 65025.0, 16581375.0);\nconst vec4 bitUnpackShift = 1.0 / bitPackShift;\nconst vec4 bitMask = vec4(1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0, 0.0);\n\nfloat shadow_getShadowWeight(vec3 position, sampler2D shadowMap) {\n vec4 rgbaDepth = texture2D(shadowMap, position.xy);\n\n float z = dot(rgbaDepth, bitUnpackShift);\n return smoothstep(0.001, 0.01, position.z - z);\n}\n\nvec4 shadow_filterShadowColor(vec4 color) {\n if (shadow_uDrawShadowMap) {\n vec4 rgbaDepth = fract(gl_FragCoord.z * bitPackShift);\n rgbaDepth -= rgbaDepth.gbaa * bitMask;\n return rgbaDepth;\n }\n if (shadow_uUseShadowMap) {\n float shadowAlpha = 0.0;\n shadowAlpha += shadow_getShadowWeight(shadow_vPosition[0], shadow_uShadowMap0);\n if(shadow_uLightCount > 1.0) {\n shadowAlpha += shadow_getShadowWeight(shadow_vPosition[1], shadow_uShadowMap1);\n }\n shadowAlpha *= shadow_uColor.a / shadow_uLightCount;\n float blendedAlpha = shadowAlpha + color.a * (1.0 - shadowAlpha);\n\n return vec4(\n mix(color.rgb, shadow_uColor.rgb, shadowAlpha / blendedAlpha),\n blendedAlpha\n );\n }\n return color;\n}\n",inject:{"vs:DECKGL_FILTER_GL_POSITION":"\n position = shadow_setVertexPosition(geometry.position);\n ","fs:DECKGL_FILTER_COLOR":"\n color = shadow_filterShadowColor(color);\n "},getUniforms:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"viewport"in t&&(t.drawToShadowMap||t.shadowMaps&&t.shadowMaps.length>0)?v(t,e):{}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return p})),n.d(e,"b",(function(){return d}));var r=n(70),i=n(90),o=n(12),a=n(80),s=[0,0,0,0],u=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0],c=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],l=[0,0,0],h=[0,0,0],f=Object(a.a)((function(t){var e=t.viewport,n=t.devicePixelRatio,a=t.coordinateSystem,h=t.coordinateOrigin,f=function(t,e,n){var o=t.viewMatrixUncentered,a=t.projectionMatrix,c=t.viewMatrix,l=t.viewProjectionMatrix,h=s,f=s,d=t.cameraPosition,A=p(t,e,n),g=A.geospatialOrigin,m=A.shaderCoordinateOrigin;A.offsetMode&&(f=t.projectPosition(g||m),d=[d[0]-f[0],d[1]-f[1],d[2]-f[2]],f[3]=1,h=i.b([],f,l),c=o||c,l=r.b([],a,c),l=r.b([],l,u));return{viewMatrix:c,viewProjectionMatrix:l,projectionCenter:h,originCommon:f,cameraPosCommon:d,shaderCoordinateOrigin:m,geospatialOrigin:g}}(e,a,h),d=f.projectionCenter,A=f.viewProjectionMatrix,g=f.originCommon,m=f.cameraPosCommon,y=f.shaderCoordinateOrigin,v=f.geospatialOrigin,_=e.getDistanceScales(),b=[e.width*n,e.height*n],x=i.b([],[0,0,-e.focalDistance,1],e.projectionMatrix)[3]||1,w={project_uCoordinateSystem:a,project_uProjectionMode:e.projectionMode,project_uCoordinateOrigin:y,project_uCommonOrigin:g.slice(0,3),project_uCenter:d,project_uPseudoMeters:Boolean(e._pseudoMeters),project_uViewportSize:b,project_uDevicePixelRatio:n,project_uFocalDistance:x,project_uCommonUnitsPerMeter:_.unitsPerMeter,project_uCommonUnitsPerWorldUnit:_.unitsPerMeter,project_uCommonUnitsPerWorldUnit2:l,project_uScale:e.scale,project_uWrapLongitude:!1,project_uViewProjectionMatrix:A,project_uModelMatrix:c,project_uCameraPosition:m};if(v){var E=e.getDistanceScales(v);switch(a){case o.a.METER_OFFSETS:w.project_uCommonUnitsPerWorldUnit=E.unitsPerMeter,w.project_uCommonUnitsPerWorldUnit2=E.unitsPerMeter2;break;case o.a.LNGLAT:case o.a.LNGLAT_OFFSETS:e._pseudoMeters||(w.project_uCommonUnitsPerMeter=E.unitsPerMeter),w.project_uCommonUnitsPerWorldUnit=E.unitsPerDegree,w.project_uCommonUnitsPerWorldUnit2=E.unitsPerDegree2;break;case o.a.CARTESIAN:w.project_uCommonUnitsPerWorldUnit=[1,1,E.unitsPerMeter[2]],w.project_uCommonUnitsPerWorldUnit2=[0,0,E.unitsPerMeter2[2]]}}return w}));function p(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h;n.length<3&&(n=[n[0],n[1],0]);var r,i=n,a=!0;switch(r=e===o.a.LNGLAT_OFFSETS||e===o.a.METER_OFFSETS?n:t.isGeospatial?[Math.fround(t.longitude),Math.fround(t.latitude),0]:null,t.projectionMode){case o.d.WEB_MERCATOR:e!==o.a.LNGLAT&&e!==o.a.CARTESIAN||(r=[0,0,0],a=!1);break;case o.d.WEB_MERCATOR_AUTO_OFFSET:e===o.a.LNGLAT?i=r:e===o.a.CARTESIAN&&(i=[Math.fround(t.center[0]),Math.fround(t.center[1]),0],r=t.unprojectPosition(i),i[0]-=n[0],i[1]-=n[1],i[2]-=n[2]);break;case o.d.IDENTITY:(i=t.position.map(Math.fround))[2]=i[2]||0;break;case o.d.GLOBE:a=!1,r=null;break;default:a=!1}return{geospatialOrigin:r,shaderCoordinateOrigin:i,offsetMode:a}}function d(t){var e=t.viewport,n=t.devicePixelRatio,r=void 0===n?1:n,i=t.modelMatrix,a=void 0===i?null:i,s=t.coordinateSystem,u=void 0===s?o.a.DEFAULT:s,l=t.coordinateOrigin,p=void 0===l?h:l,d=t.autoWrapLongitude,A=void 0!==d&&d;u===o.a.DEFAULT&&(u=e.isGeospatial?o.a.LNGLAT:o.a.CARTESIAN);var g=f({viewport:e,devicePixelRatio:r,coordinateSystem:u,coordinateOrigin:p});return g.project_uWrapLongitude=A,g.project_uModelMatrix=a||c,g}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(3),i=n.n(r),o=n(4),a=n.n(o),s=function(){function t(e,n){i()(this,t),this._viewportProps=this.applyConstraints(e),this._state=n}return a()(t,[{key:"getViewportProps",value:function(){return this._viewportProps}},{key:"getState",value:function(){return this._state}}]),t}()},function(t,e,n){"use strict";n.d(e,"b",(function(){return u})),n.d(e,"a",(function(){return c})),n.d(e,"c",(function(){return l}));var r=n(156),i=n(22),o=n(127),a=n(108);const s="Cannot convert supplied data type";function u(t,e,n){if(e.text&&"string"==typeof t)return t;if(Object(i.c)(t)&&(t=t.buffer),t instanceof ArrayBuffer){const n=t;if(e.text&&!e.binary){return new TextDecoder("utf8").decode(n)}return n}if(ArrayBuffer.isView(t)){if(e.text&&!e.binary){return new TextDecoder("utf8").decode(t)}let n=t.buffer;const r=t.byteLength||t.length;return 0===t.byteOffset&&r===n.byteLength||(n=n.slice(t.byteOffset,t.byteOffset+r)),n}throw new Error(s)}async function c(t,e,n){const c=t instanceof ArrayBuffer||ArrayBuffer.isView(t);if("string"==typeof t||c)return u(t,e);if(Object(i.b)(t)&&(t=await Object(a.b)(t)),Object(i.j)(t)){const n=t;return await Object(a.a)(n),e.binary?await n.arrayBuffer():await n.text()}if(Object(i.i)(t)&&(t=Object(o.a)(t,n)),Object(i.d)(t)||Object(i.a)(t))return Object(r.a)(t);throw new Error(s)}async function l(t,e){if(Object(i.e)(t))return t;if(Object(i.j)(t)){const n=t;await Object(a.a)(n);const r=await n.body;return Object(o.a)(r,e)}return Object(i.b)(t)||Object(i.i)(t)?Object(o.a)(t,e):Object(i.a)(t)?t[Symbol.asyncIterator]():function(t){if(ArrayBuffer.isView(t))return function*(){yield t.buffer}();if(t instanceof ArrayBuffer)return function*(){yield t}();if(Object(i.e)(t))return t;if(Object(i.d)(t))return t[Symbol.iterator]();throw new Error(s)}(t)}},function(t,e,n){"use strict";const r=262144;var i=n(72),o=n(85);function a(t,e){return i.c?async function*(t,e){const n=t.getReader();let r;try{for(;;){const t=r||n.read();null!=e&&e._streamReadAhead&&(r=n.read());const{done:i,value:a}=await t;if(i)return;yield Object(o.d)(a)}}catch(t){n.releaseLock()}}(t,e):async function*(t,e){for await(const e of t)yield Object(o.d)(e)}(t)}var s=n(22);function u(t,e){if("string"==typeof t)return function*(t,e){const n=(null==e?void 0:e.chunkSize)||262144;let r=0;const i=new TextEncoder;for(;r
+ * Released under the Apache License, Version 2.0
+ * see: https://github.com/dcodeIO/long.js for details
+ */i=[],void 0===(o="function"==typeof(r=function(){"use strict";function t(t,e,n){this.low=0|t,this.high=0|e,this.unsigned=!!n}function e(t){return!0===(t&&t.__isLong__)}t.prototype.__isLong__,Object.defineProperty(t.prototype,"__isLong__",{value:!0,enumerable:!1,configurable:!1}),t.isLong=e;var n={},r={};function i(t,e){var i,o,s;return e?(s=0<=(t>>>=0)&&t<256)&&(o=r[t])?o:(i=a(t,(0|t)<0?-1:0,!0),s&&(r[t]=i),i):(s=-128<=(t|=0)&&t<128)&&(o=n[t])?o:(i=a(t,t<0?-1:0,!1),s&&(n[t]=i),i)}function o(t,e){if(isNaN(t)||!isFinite(t))return e?A:d;if(e){if(t<0)return A;if(t>=h)return _}else{if(t<=-f)return b;if(t+1>=f)return v}return t<0?o(-t,e).neg():a(t%l|0,t/l|0,e)}function a(e,n,r){return new t(e,n,r)}t.fromInt=i,t.fromNumber=o,t.fromBits=a;var s=Math.pow;function u(t,e,n){if(0===t.length)throw Error("empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return d;if("number"==typeof e?(n=e,e=!1):e=!!e,(n=n||10)<2||360)throw Error("interior hyphen");if(0===r)return u(t.substring(1),e,n).neg();for(var i=o(s(n,8)),a=d,c=0;c>>0:this.low},x.toNumber=function(){return this.unsigned?(this.high>>>0)*l+(this.low>>>0):this.high*l+(this.low>>>0)},x.toString=function(t){if((t=t||10)<2||36>>0).toString(t);if((a=c).isZero())return l+u;for(;l.length<6;)l="0"+l;u=""+l+u}},x.getHighBits=function(){return this.high},x.getHighBitsUnsigned=function(){return this.high>>>0},x.getLowBits=function(){return this.low},x.getLowBitsUnsigned=function(){return this.low>>>0},x.getNumBitsAbs=function(){if(this.isNegative())return this.eq(b)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,e=31;e>0&&0==(t&1<=0},x.isOdd=function(){return 1==(1&this.low)},x.isEven=function(){return 0==(1&this.low)},x.equals=function(t){return e(t)||(t=c(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&this.high===t.high&&this.low===t.low},x.eq=x.equals,x.notEquals=function(t){return!this.eq(t)},x.neq=x.notEquals,x.lessThan=function(t){return this.comp(t)<0},x.lt=x.lessThan,x.lessThanOrEqual=function(t){return this.comp(t)<=0},x.lte=x.lessThanOrEqual,x.greaterThan=function(t){return this.comp(t)>0},x.gt=x.greaterThan,x.greaterThanOrEqual=function(t){return this.comp(t)>=0},x.gte=x.greaterThanOrEqual,x.compare=function(t){if(e(t)||(t=c(t)),this.eq(t))return 0;var n=this.isNegative(),r=t.isNegative();return n&&!r?-1:!n&&r?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},x.comp=x.compare,x.negate=function(){return!this.unsigned&&this.eq(b)?b:this.not().add(g)},x.neg=x.negate,x.add=function(t){e(t)||(t=c(t));var n=this.high>>>16,r=65535&this.high,i=this.low>>>16,o=65535&this.low,s=t.high>>>16,u=65535&t.high,l=t.low>>>16,h=0,f=0,p=0,d=0;return p+=(d+=o+(65535&t.low))>>>16,f+=(p+=i+l)>>>16,h+=(f+=r+u)>>>16,h+=n+s,a((p&=65535)<<16|(d&=65535),(h&=65535)<<16|(f&=65535),this.unsigned)},x.subtract=function(t){return e(t)||(t=c(t)),this.add(t.neg())},x.sub=x.subtract,x.multiply=function(t){if(this.isZero())return d;if(e(t)||(t=c(t)),t.isZero())return d;if(this.eq(b))return t.isOdd()?b:d;if(t.eq(b))return this.isOdd()?b:d;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(p)&&t.lt(p))return o(this.toNumber()*t.toNumber(),this.unsigned);var n=this.high>>>16,r=65535&this.high,i=this.low>>>16,s=65535&this.low,u=t.high>>>16,l=65535&t.high,h=t.low>>>16,f=65535&t.low,A=0,g=0,m=0,y=0;return m+=(y+=s*f)>>>16,g+=(m+=i*f)>>>16,m&=65535,g+=(m+=s*h)>>>16,A+=(g+=r*f)>>>16,g&=65535,A+=(g+=i*h)>>>16,g&=65535,A+=(g+=s*l)>>>16,A+=n*f+r*h+i*l+s*u,a((m&=65535)<<16|(y&=65535),(A&=65535)<<16|(g&=65535),this.unsigned)},x.mul=x.multiply,x.divide=function(t){if(e(t)||(t=c(t)),t.isZero())throw Error("division by zero");if(this.isZero())return this.unsigned?A:d;var n,r,i;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return A;if(t.gt(this.shru(1)))return m;i=A}else{if(this.eq(b))return t.eq(g)||t.eq(y)?b:t.eq(b)?g:(n=this.shr(1).div(t).shl(1)).eq(d)?t.isNegative()?g:y:(r=this.sub(t.mul(n)),i=n.add(r.div(t)));if(t.eq(b))return this.unsigned?A:d;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();i=d}for(r=this;r.gte(t);){n=Math.max(1,Math.floor(r.toNumber()/t.toNumber()));for(var a=Math.ceil(Math.log(n)/Math.LN2),u=a<=48?1:s(2,a-48),l=o(n),h=l.mul(t);h.isNegative()||h.gt(r);)h=(l=o(n-=u,this.unsigned)).mul(t);l.isZero()&&(l=g),i=i.add(l),r=r.sub(h)}return i},x.div=x.divide,x.modulo=function(t){return e(t)||(t=c(t)),this.sub(this.div(t).mul(t))},x.mod=x.modulo,x.not=function(){return a(~this.low,~this.high,this.unsigned)},x.and=function(t){return e(t)||(t=c(t)),a(this.low&t.low,this.high&t.high,this.unsigned)},x.or=function(t){return e(t)||(t=c(t)),a(this.low|t.low,this.high|t.high,this.unsigned)},x.xor=function(t){return e(t)||(t=c(t)),a(this.low^t.low,this.high^t.high,this.unsigned)},x.shiftLeft=function(t){return e(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?a(this.low<>>32-t,this.unsigned):a(0,this.low<>>t|this.high<<32-t,this.high>>t,this.unsigned):a(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},x.shr=x.shiftRight,x.shiftRightUnsigned=function(t){if(e(t)&&(t=t.toInt()),0==(t&=63))return this;var n=this.high;return t<32?a(this.low>>>t|n<<32-t,n>>>t,this.unsigned):a(32===t?n:n>>>t-32,0,this.unsigned)},x.shru=x.shiftRightUnsigned,x.toSigned=function(){return this.unsigned?a(this.low,this.high,!1):this},x.toUnsigned=function(){return this.unsigned?this:a(this.low,this.high,!0)},x.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},x.toBytesLE=function(){var t=this.high,e=this.low;return[255&e,e>>>8&255,e>>>16&255,e>>>24&255,255&t,t>>>8&255,t>>>16&255,t>>>24&255]},x.toBytesBE=function(){var t=this.high,e=this.low;return[t>>>24&255,t>>>16&255,t>>>8&255,255&t,e>>>24&255,e>>>16&255,e>>>8&255,255&e]},t})?r.apply(e,i):r)||(t.exports=o)},function(t,e,n){"use strict";n.d(e,"a",(function(){return f})),n.d(e,"b",(function(){return p}));var r=n(52),i=n(12);function o(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){u=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw o}}}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:o;Object(i.b)(t)}function s(){for(var t=0,e=["mapboxgl-missing-css"];t{};class f{static isSupported(){return"undefined"!=typeof Worker&&i.b||void 0!==o&&!i.b}constructor(t){Object(r.a)(this,"name",void 0),Object(r.a)(this,"source",void 0),Object(r.a)(this,"url",void 0),Object(r.a)(this,"terminated",!1),Object(r.a)(this,"worker",void 0),Object(r.a)(this,"onMessage",void 0),Object(r.a)(this,"onError",void 0),Object(r.a)(this,"_loadableURL","");const{name:e,source:n,url:o}=t;Object(a.a)(n||o),this.name=e,this.source=n,this.url=o,this.onMessage=h,this.onError=t=>console.log(t),this.worker=i.b?this._createBrowserWorker():this._createNodeWorker()}destroy(){this.onMessage=h,this.onError=h,this.worker.terminate(),this.terminated=!0}get isRunning(){return Boolean(this.onMessage)}postMessage(t,e){e=e||Object(l.a)(t),this.worker.postMessage(t,e)}_getErrorFromErrorEvent(t){let e="Failed to load ";return e+="worker ".concat(this.name," from ").concat(this.url,". "),t.message&&(e+="".concat(t.message," in ")),t.lineno&&(e+=":".concat(t.lineno,":").concat(t.colno)),new Error(e)}_createBrowserWorker(){this._loadableURL=u({source:this.source,url:this.url});const t=new Worker(this._loadableURL,{name:this.name});return t.onmessage=t=>{t.data?this.onMessage(t.data):this.onError(new Error("No data received"))},t.onerror=t=>{this.onError(this._getErrorFromErrorEvent(t)),this.terminated=!0},t.onmessageerror=t=>console.error(t),t}_createNodeWorker(){let t;if(this.url){const e=this.url.includes(":/")||this.url.startsWith("/")?this.url:"./".concat(this.url);t=new o(e,{eval:!1})}else{if(!this.source)throw new Error("no worker");t=new o(this.source,{eval:!0})}return t.on("message",t=>{this.onMessage(t)}),t.on("error",t=>{this.onError(t)}),t.on("exit",t=>{}),t}}class p{constructor(t,e){Object(r.a)(this,"name",void 0),Object(r.a)(this,"workerThread",void 0),Object(r.a)(this,"isRunning",!0),Object(r.a)(this,"result",void 0),Object(r.a)(this,"_resolve",()=>{}),Object(r.a)(this,"_reject",()=>{}),this.name=t,this.workerThread=e,this.result=new Promise((t,e)=>{this._resolve=t,this._reject=e})}postMessage(t,e){this.workerThread.postMessage({source:"loaders.gl",type:t,payload:e})}done(t){Object(a.a)(this.isRunning),this.isRunning=!1,this._resolve(t)}error(t){Object(a.a)(this.isRunning),this.isRunning=!1,this._reject(t)}}class d{static isSupported(){return f.isSupported()}constructor(t){Object(r.a)(this,"name","unnamed"),Object(r.a)(this,"source",void 0),Object(r.a)(this,"url",void 0),Object(r.a)(this,"maxConcurrency",1),Object(r.a)(this,"maxMobileConcurrency",1),Object(r.a)(this,"onDebug",()=>{}),Object(r.a)(this,"reuseWorkers",!0),Object(r.a)(this,"props",{}),Object(r.a)(this,"jobQueue",[]),Object(r.a)(this,"idleQueue",[]),Object(r.a)(this,"count",0),Object(r.a)(this,"isDestroyed",!1),this.source=t.source,this.url=t.url,this.setProps(t)}destroy(){this.idleQueue.forEach(t=>t.destroy()),this.isDestroyed=!0}setProps(t){this.props={...this.props,...t},void 0!==t.name&&(this.name=t.name),void 0!==t.maxConcurrency&&(this.maxConcurrency=t.maxConcurrency),void 0!==t.maxMobileConcurrency&&(this.maxMobileConcurrency=t.maxMobileConcurrency),void 0!==t.reuseWorkers&&(this.reuseWorkers=t.reuseWorkers),void 0!==t.onDebug&&(this.onDebug=t.onDebug)}async startJob(t,e=((t,e,n)=>t.done(n)),n=((t,e)=>t.error(e))){const r=new Promise(r=>(this.jobQueue.push({name:t,onMessage:e,onError:n,onStart:r}),this));return this._startQueuedJob(),await r}async _startQueuedJob(){if(!this.jobQueue.length)return;const t=this._getAvailableWorker();if(!t)return;const e=this.jobQueue.shift();if(e){this.onDebug({message:"Starting job",name:e.name,workerThread:t,backlog:this.jobQueue.length});const n=new p(e.name,t);t.onMessage=t=>e.onMessage(n,t.type,t.payload),t.onError=t=>e.onError(n,t),e.onStart(n);try{await n.result}finally{this.returnWorkerToQueue(t)}}}returnWorkerToQueue(t){this.isDestroyed||!this.reuseWorkers||this.count>this._getMaxConcurrency()?(t.destroy(),this.count--):this.idleQueue.push(t),this.isDestroyed||this._startQueuedJob()}_getAvailableWorker(){if(this.idleQueue.length>0)return this.idleQueue.shift()||null;if(this.count{}};class g{static isSupported(){return f.isSupported()}static getWorkerFarm(t={}){return g._workerFarm=g._workerFarm||new g({}),g._workerFarm.setProps(t),g._workerFarm}constructor(t){Object(r.a)(this,"props",void 0),Object(r.a)(this,"workerPools",new Map),this.props={...A},this.setProps(t),this.workerPools=new Map}destroy(){for(const t of this.workerPools.values())t.destroy();this.workerPools=new Map}setProps(t){this.props={...this.props,...t};for(const t of this.workerPools.values())t.setProps(this._getWorkerPoolProps())}getWorkerPool(t){const{name:e,source:n,url:r}=t;let i=this.workerPools.get(e);return i||(i=new d({name:e,source:n,url:r}),i.setProps(this._getWorkerPoolProps()),this.workerPools.set(e,i)),i}_getWorkerPoolProps(){return{maxConcurrency:this.props.maxConcurrency,maxMobileConcurrency:this.props.maxMobileConcurrency,reuseWorkers:this.props.reuseWorkers,onDebug:this.props.onDebug}}}Object(r.a)(g,"_workerFarm",void 0)},function(t,e,n){"use strict";async function*r(t,e={}){const n=new TextDecoder(void 0,e);for await(const e of t)yield"string"==typeof e?e:n.decode(e,{stream:!0})}async function*i(t){const e=new TextEncoder;for await(const n of t)yield"string"==typeof n?e.encode(n):n}async function*o(t){let e="";for await(const n of t){let t;for(e+=n;(t=e.indexOf("\n"))>=0;){const n=e.slice(0,t+1);e=e.slice(t+1),yield n}}e.length>0&&(yield e)}async function*a(t){let e=1;for await(const n of t)yield{counter:e,line:n},e++}n.d(e,"c",(function(){return r})),n.d(e,"d",(function(){return i})),n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return a}))},function(t,e,n){"use strict";function r(t,e=5){if("string"==typeof t)return t.slice(0,e);if(ArrayBuffer.isView(t))return i(t.buffer,t.byteOffset,e);if(t instanceof ArrayBuffer){return i(t,0,e)}return""}function i(t,e,n){if(t.byteLength<=e+n)return"";const r=new DataView(t);let i="";for(let t=0;t=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function R(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:{};for(var n in i()(this,t),u()(this,"id","lighting-effect"),u()(this,"props",null),u()(this,"shadowColor",L),u()(this,"ambientLight",null),u()(this,"directionalLights",[]),u()(this,"pointLights",[]),u()(this,"shadowPasses",[]),u()(this,"shadowMaps",[]),u()(this,"dummyShadowMap",null),e){var r=e[n];switch(r.type){case"ambient":this.ambientLight=r;break;case"directional":this.directionalLights.push(r);break;case"point":this.pointLights.push(r)}}this._applyDefaultLights(),this.shadow=this.directionalLights.some((function(t){return t.shadow}))}return a()(t,[{key:"preRender",value:function(t,e){var n=e.layers,r=e.layerFilter,i=e.viewports,o=e.onViewportActive,a=e.views;if(this.shadow){this.shadowMatrices=this._calculateMatrices(),0===this.shadowPasses.length&&this._createShadowPasses(t),this.programManager||(this.programManager=c.a.getDefaultProgramManager(t),I.a&&this.programManager.addDefaultModule(I.a)),this.dummyShadowMap||(this.dummyShadowMap=new l.a(t,{width:1,height:1}));for(var s=0;s2&&void 0!==arguments[2]&&arguments[2],r=e.projectPosition(t);if(n&&e instanceof s.a){var o=i()(t,3),a=o[0],u=o[1],c=o[2],l=void 0===c?0:c,h=e.getDistanceScales([a,u]);r[2]=l*h.unitsPerMeter[2]}return r}function f(t,e){var n=e.viewport,r=e.modelMatrix,a=e.coordinateSystem,s=e.coordinateOrigin,c=e.offsetMode,f=i()(t,3),p=f[0],d=f[1],A=f[2],g=void 0===A?0:A;if(r){var m=u.b([],[p,d,g,1],r),y=i()(m,3);p=y[0],d=y[1],g=y[2]}switch(a){case o.a.LNGLAT:return h([p,d,g],n,c);case o.a.LNGLAT_OFFSETS:return h([p+s[0],d+s[1],g+(s[2]||0)],n,c);case o.a.METER_OFFSETS:return h(Object(l.a)(s,[p,d,g]),n,c);case o.a.CARTESIAN:default:return n.isGeospatial?[p+s[0],d+s[1],g+s[2]]:n.projectPosition([p,d,g])}}function p(t,e){var n=function(t){var e=t.viewport,n=t.modelMatrix,r=t.coordinateOrigin,i=t.coordinateSystem,a=t.fromCoordinateSystem,s=t.fromCoordinateOrigin;return i===o.a.DEFAULT&&(i=e.isGeospatial?o.a.LNGLAT:o.a.CARTESIAN),void 0===a&&(a=i),void 0===s&&(s=r),{viewport:e,coordinateSystem:i,coordinateOrigin:r,modelMatrix:n,fromCoordinateSystem:a,fromCoordinateOrigin:s}}(e),r=n.viewport,i=n.coordinateSystem,s=n.coordinateOrigin,u=n.modelMatrix,l=n.fromCoordinateSystem,h=n.fromCoordinateOrigin,p=Object(a.a)(r,i,s),d=p.geospatialOrigin,A=p.shaderCoordinateOrigin,g=p.offsetMode,m=f(t,{viewport:r,modelMatrix:u,coordinateSystem:l,coordinateOrigin:h,offsetMode:g});if(g){var y=r.projectPosition(d||A);c.d(m,m,y)}return m}},function(t,e,n){"use strict";var r="#if (defined(SHADER_TYPE_FRAGMENT) && defined(LIGHTING_FRAGMENT)) || (defined(SHADER_TYPE_VERTEX) && defined(LIGHTING_VERTEX))\n\nstruct AmbientLight {\n vec3 color;\n};\n\nstruct PointLight {\n vec3 color;\n vec3 position;\n vec3 attenuation;\n};\n\nstruct DirectionalLight {\n vec3 color;\n vec3 direction;\n};\n\nuniform AmbientLight lighting_uAmbientLight;\nuniform PointLight lighting_uPointLight[MAX_LIGHTS];\nuniform DirectionalLight lighting_uDirectionalLight[MAX_LIGHTS];\nuniform int lighting_uPointLightCount;\nuniform int lighting_uDirectionalLightCount;\n\nuniform bool lighting_uEnabled;\n\nfloat getPointLightAttenuation(PointLight pointLight, float distance) {\n return pointLight.attenuation.x\n + pointLight.attenuation.y * distance\n + pointLight.attenuation.z * distance * distance;\n}\n\n#endif\n";n.d(e,"a",(function(){return s}));const i={lightSources:{}};function o(){let{color:t=[0,0,0],intensity:e=1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.map(t=>t*e/255)}function a(t){let{ambientLight:e,pointLights:n=[],directionalLights:r=[]}=t;const i={};return i["lighting_uAmbientLight.color"]=e?o(e):[0,0,0],n.forEach((t,e)=>{i["lighting_uPointLight[".concat(e,"].color")]=o(t),i["lighting_uPointLight[".concat(e,"].position")]=t.position,i["lighting_uPointLight[".concat(e,"].attenuation")]=t.attenuation||[1,0,0]}),i.lighting_uPointLightCount=n.length,r.forEach((t,e)=>{i["lighting_uDirectionalLight[".concat(e,"].color")]=o(t),i["lighting_uDirectionalLight[".concat(e,"].direction")]=t.direction}),i.lighting_uDirectionalLightCount=r.length,i}const s={name:"lights",vs:r,fs:r,getUniforms:function t(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i;if("lightSources"in e){const{ambientLight:t,pointLights:n,directionalLights:r}=e.lightSources||{};return t||n&&n.length>0||r&&r.length>0?Object.assign({},a({ambientLight:t,pointLights:n,directionalLights:r}),{lighting_uEnabled:!0}):{lighting_uEnabled:!1}}if("lights"in e){const n={pointLights:[],directionalLights:[]};for(const t of e.lights||[])switch(t.type){case"ambient":n.ambientLight=t;break;case"directional":n.directionalLights.push(t);break;case"point":n.pointLights.push(t)}return t({lightSources:n})}return{}},defines:{MAX_LIGHTS:3}}},function(t,e,n){var r;
+/*! Hammer.JS - v2.0.7 - 2016-04-22
+ * http://hammerjs.github.io/
+ *
+ * Copyright (c) 2016 Jorik Tangelder;
+ * Licensed under the MIT license */!function(i,o,a,s){"use strict";var u,c=["","webkit","Moz","MS","ms","o"],l=o.createElement("div"),h=Math.round,f=Math.abs,p=Date.now;function d(t,e,n){return setTimeout(b(t,n),e)}function A(t,e,n){return!!Array.isArray(t)&&(g(t,n[e],n),!0)}function g(t,e,n){var r;if(t)if(t.forEach)t.forEach(e,n);else if(void 0!==t.length)for(r=0;r\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=i.console&&(i.console.warn||i.console.log);return o&&o.call(i.console,r,n),t.apply(this,arguments)}}u="function"!=typeof Object.assign?function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n-1}function C(t){return t.trim().split(/\s+/g)}function P(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var r=0;rn[e]})):r.sort()),r}function B(t,e){for(var n,r,i=e[0].toUpperCase()+e.slice(1),o=0;o1&&!n.firstMultiple?n.firstMultiple=G(e):1===i&&(n.firstMultiple=!1);var o=n.firstInput,a=n.firstMultiple,s=a?a.center:o.center,u=e.center=V(r);e.timeStamp=p(),e.deltaTime=e.timeStamp-o.timeStamp,e.angle=X(s,u),e.distance=q(s,u),function(t,e){var n=e.center,r=t.offsetDelta||{},i=t.prevDelta||{},o=t.prevInput||{};1!==e.eventType&&4!==o.eventType||(i=t.prevDelta={x:o.deltaX||0,y:o.deltaY||0},r=t.offsetDelta={x:n.x,y:n.y});e.deltaX=i.x+(n.x-r.x),e.deltaY=i.y+(n.y-r.y)}(n,e),e.offsetDirection=W(e.deltaX,e.deltaY);var c=H(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=c.x,e.overallVelocityY=c.y,e.overallVelocity=f(c.x)>f(c.y)?c.x:c.y,e.scale=a?(l=a.pointers,h=r,q(h[0],h[1],z)/q(l[0],l[1],z)):1,e.rotation=a?function(t,e){return X(e[1],e[0],z)+X(t[1],t[0],z)}(a.pointers,r):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length,function(t,e){var n,r,i,o,a=t.lastInterval||e,s=e.timeStamp-a.timeStamp;if(8!=e.eventType&&(s>25||void 0===a.velocity)){var u=e.deltaX-a.deltaX,c=e.deltaY-a.deltaY,l=H(s,u,c);r=l.x,i=l.y,n=f(l.x)>f(l.y)?l.x:l.y,o=W(u,c),t.lastInterval=e}else n=a.velocity,r=a.velocityX,i=a.velocityY,o=a.direction;e.velocity=n,e.velocityX=r,e.velocityY=i,e.direction=o}(n,e);var l,h;var d=t.element;S(e.srcEvent.target,d)&&(d=e.srcEvent.target);e.target=d}(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function G(t){for(var e=[],n=0;n=f(e)?t<0?2:4:e<0?8:16}function q(t,e,n){n||(n=F);var r=e[n[0]]-t[n[0]],i=e[n[1]]-t[n[1]];return Math.sqrt(r*r+i*i)}function X(t,e,n){n||(n=F);var r=e[n[0]]-t[n[0]],i=e[n[1]]-t[n[1]];return 180*Math.atan2(i,r)/Math.PI}U.prototype={handler:function(){},init:function(){this.evEl&&E(this.element,this.evEl,this.domHandler),this.evTarget&&E(this.target,this.evTarget,this.domHandler),this.evWin&&E(k(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&O(this.element,this.evEl,this.domHandler),this.evTarget&&O(this.target,this.evTarget,this.domHandler),this.evWin&&O(k(this.element),this.evWin,this.domHandler)}};var Z={mousedown:1,mousemove:2,mouseup:4};function J(){this.evEl="mousedown",this.evWin="mousemove mouseup",this.pressed=!1,U.apply(this,arguments)}_(J,U,{handler:function(t){var e=Z[t.type];1&e&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=4),this.pressed&&(4&e&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:"mouse",srcEvent:t}))}});var Q={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},K={2:"touch",3:"pen",4:"mouse",5:"kinect"},Y="pointerdown",$="pointermove pointerup pointercancel";function tt(){this.evEl=Y,this.evWin=$,U.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}i.MSPointerEvent&&!i.PointerEvent&&(Y="MSPointerDown",$="MSPointerMove MSPointerUp MSPointerCancel"),_(tt,U,{handler:function(t){var e=this.store,n=!1,r=t.type.toLowerCase().replace("ms",""),i=Q[r],o=K[t.pointerType]||t.pointerType,a="touch"==o,s=P(e,t.pointerId,"pointerId");1&i&&(0===t.button||a)?s<0&&(e.push(t),s=e.length-1):12&i&&(n=!0),s<0||(e[s]=t,this.callback(this.manager,i,{pointers:e,changedPointers:[t],pointerType:o,srcEvent:t}),n&&e.splice(s,1))}});var et={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function nt(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,U.apply(this,arguments)}function rt(t,e){var n=M(t.touches),r=M(t.changedTouches);return 12&e&&(n=I(n.concat(r),"identifier",!0)),[n,r]}_(nt,U,{handler:function(t){var e=et[t.type];if(1===e&&(this.started=!0),this.started){var n=rt.call(this,t,e);12&e&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:"touch",srcEvent:t})}}});var it={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function ot(){this.evTarget="touchstart touchmove touchend touchcancel",this.targetIds={},U.apply(this,arguments)}function at(t,e){var n=M(t.touches),r=this.targetIds;if(3&e&&1===n.length)return r[n[0].identifier]=!0,[n,n];var i,o,a=M(t.changedTouches),s=[],u=this.target;if(o=n.filter((function(t){return S(t.target,u)})),1===e)for(i=0;i-1&&r.splice(t,1)}),2500)}}function lt(t){for(var e=t.srcEvent.clientX,n=t.srcEvent.clientY,r=0;r-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){var e=this,n=this.state;function r(n){e.manager.emit(n,t)}n<8&&r(e.options.event+gt(n)),r(e.options.event),t.additionalEvent&&r(t.additionalEvent),n>=8&&r(e.options.event+gt(n))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=32},canEmit:function(){for(var t=0;te.threshold&&i&e.direction},attrTest:function(t){return vt.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=mt(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),_(bt,vt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return["none"]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),_(xt,At,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return["auto"]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,r=t.distancee.time;if(this._input=t,!r||!n||12&t.eventType&&!i)this.reset();else if(1&t.eventType)this.reset(),this._timer=d((function(){this.state=8,this.tryEmit()}),e.time,this);else if(4&t.eventType)return 8;return 32},reset:function(){clearTimeout(this._timer)},emit:function(t){8===this.state&&(t&&4&t.eventType?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=p(),this.manager.emit(this.options.event,this._input)))}}),_(wt,vt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return["none"]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)}}),_(Et,vt,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return _t.prototype.getTouchAction.call(this)},attrTest:function(t){var e,n=this.options.direction;return 30&n?e=t.overallVelocity:6&n?e=t.overallVelocityX:24&n&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&f(e)>this.options.velocity&&4&t.eventType},emit:function(t){var e=mt(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),_(Ot,At,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return["manipulation"]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,r=t.distance=0),Object(r.a)(e>0),t+(e-1)&~(e-1)}function o(t,e,n){let r;if(t instanceof ArrayBuffer)r=new Uint8Array(t);else{const e=t.byteOffset,n=t.byteLength;r=new Uint8Array(t.buffer||t.arrayBuffer,e,n)}return e.set(r,n),n+i(r.byteLength,4)}},function(t,e,n){"use strict";n.r(e);var r=n(233);n.d(e,"SimpleMeshLayer",(function(){return r.a}));var i=n(228);n.d(e,"ScenegraphLayer",(function(){return i.a}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var r=n(3),i=n.n(r),o=n(0),a=n.n(o),s=[255,255,255],u=0,c=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i()(this,t),a()(this,"type","ambient");var n=e.color,r=void 0===n?s:n,o=e.intensity,c=void 0===o?1:o;this.id=e.id||"ambient-".concat(u++),this.color=r,this.intensity=c}},function(t,e,n){"use strict";n.d(e,"a",(function(){return v}));var r=n(3),i=n.n(r),o=n(4),a=n.n(o),s=n(5),u=n.n(s),c=n(6),l=n.n(c),h=n(1),f=n.n(h),p=n(0),d=n.n(p),A=n(59),g=n(86),m=n(113);function y(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=f()(t);if(e){var i=f()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return l()(this,n)}}var v=function(t){u()(n,t);var e=y(n);function n(){return i()(this,n),e.apply(this,arguments)}return a()(n,[{key:"ViewportType",get:function(){return g.a}},{key:"ControllerType",get:function(){return m.b}}]),n}(A.a);d()(v,"displayName","MapView")},function(t,e,n){"use strict";n.d(e,"a",(function(){return p})),n.d(e,"b",(function(){return g}));var r=n(3),i=n.n(r),o=n(4),a=n.n(o),s=n(0),u=n.n(s),c=n(75);function l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function h(t){for(var e=1;e0||"auto"===e)&&Boolean(n)}},{key:"_isUpdateDueToCurrentTransition",value:function(t){return!(!this.transition.inProgress||!this.propsInTransition)&&this.transition.settings.interpolator.arePropsEqual(t,this.propsInTransition)}},{key:"_shouldIgnoreViewportChange",value:function(t,e){return this.transition.inProgress?this.transition.settings.interruption===p.IGNORE||this._isUpdateDueToCurrentTransition(e):!this._isTransitionEnabled(e)||e.transitionInterpolator.arePropsEqual(t,e)}},{key:"_triggerTransition",value:function(t,e){var n=this.getControllerState(t),r=this.getControllerState(e).shortestPathFrom(n),i=e.transitionInterpolator,o=i.getDuration?i.getDuration(t,e):e.transitionDuration;if(0!==o){var a=i.initializeProps(t,r);this.propsInTransition={};var s={duration:o,easing:e.transitionEasing||d,interpolator:i,interruption:e.transitionInterruption||A,startProps:a.start,endProps:a.end,onStart:e.onTransitionStart,onUpdate:this._onTransitionUpdate,onInterrupt:this._onTransitionEnd(e.onTransitionInterrupt),onEnd:this._onTransitionEnd(e.onTransitionEnd)};this.transition.start(s),this.onStateChange({inTransition:!0}),this.updateTransition()}}},{key:"_onTransitionEnd",value:function(t){var e=this;return function(n){e.propsInTransition=null,e.onStateChange({inTransition:!1,isZooming:!1,isPanning:!1,isRotating:!1}),null==t||t(n)}}}]),t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r="3.2.10"},function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return o}));var r=n(85);async function i(t,e){for(;;){const{done:n,value:r}=await t.next();if(n)return void t.return();if(e(r))return}}async function o(t){const e=[];for await(const n of t)e.push(n);return Object(r.b)(...e)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var r=n(204);function i(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){u=!0,a=t},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);ni&&(a+=i-f),l+=a,h+=a}return[l,h]}return Object(v.a)(n+a,o,i)}}]),n}(b.a),O=function(t){d()(n,t);var e=w(n);function n(){var t;l()(this,n);for(var r=arguments.length,o=new Array(r),s=0;s=0&&n.modules.splice(r,1)}if("inject"in e)if(t.inject){var i=a({},t.inject);for(var o in e.inject)i[o]=(i[o]||"")+e.inject[o];n.inject=i}else n.inject=e.inject;return n}},function(t,e,n){"use strict";n.d(e,"a",(function(){return C}));var r=n(9),i=n.n(r),o=n(0),a=n.n(o),s=n(3),u=n.n(s),c=n(4),l=n.n(c),h=n(5),f=n.n(h),p=n(6),d=n.n(p),A=n(1),g=n.n(A),m=n(78),y=n(42),v=n(12),_=n(83),b=n(90);function x(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function w(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};u()(this,n);var i=r.latitude,o=void 0===i?0:i,a=r.longitude,s=void 0===a?0:a,c=r.zoom,l=void 0===c?0:c,h=r.nearZMultiplier,f=void 0===h?.1:h,p=r.farZMultiplier,d=void 0===p?2:p,A=r.resolution,g=void 0===A?10:A,y=r.height,v=r.altitude,_=void 0===v?1.5:v;y=y||1,_=Math.max(.75,_);var b=(new m.a).lookAt({eye:[0,-_,0],up:[0,0,1]}),x=Math.pow(2,l);b.rotateX(o*O),b.rotateZ(-s*O),b.scale(x/y);var E=Math.atan(.5/_),S=512*x/y;return(t=e.call(this,w(w({},r),{},{height:y,viewMatrix:b,longitude:s,latitude:o,zoom:l,distanceScales:T(),fovyRadians:2*E,focalDistance:_,near:f,far:Math.min(2,1/S+1)*_*d}))).latitude=o,t.longitude=s,t.resolution=g,t}return l()(n,[{key:"projectionMode",get:function(){return v.d.GLOBE}},{key:"getDistanceScales",value:function(){return this.distanceScales}},{key:"getBounds",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e={targetZ:t.z||0},n=this.unproject([0,this.height/2],e),r=this.unproject([this.width/2,0],e),i=this.unproject([this.width,this.height/2],e),o=this.unproject([this.width/2,this.height],e);return i[0]this.longitude&&(n[0]-=360),[Math.min(n[0],i[0],r[0],o[0]),Math.min(n[1],i[1],r[1],o[1]),Math.max(n[0],i[0],r[0],o[0]),Math.max(n[1],i[1],r[1],o[1])]}},{key:"unproject",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.topLeft,o=void 0===r||r,a=n.targetZ,s=i()(t,3),u=s[0],c=s[1],l=s[2],h=o?c:this.height-c,f=this.pixelUnprojectionMatrix;if(Number.isFinite(l))e=P(f,[u,h,l,1]);else{var p=P(f,[u,h,-1,1]),d=P(f,[u,h,1,1]),A=256*((a||0)/6370972+1),g=_.c(_.d([],p,d)),m=_.c(p),y=_.c(d),v=(4*m*y-Math.pow(g-m-y,2))/16,b=4*v/g,x=Math.sqrt(m-b),w=Math.sqrt(Math.max(0,A*A-b)),E=(x-w)/Math.sqrt(g);e=_.b([],p,d,E)}var O=this.unprojectPosition(e),S=i()(O,3),T=S[0],C=S[1],M=S[2];return Number.isFinite(l)?[T,C,M]:Number.isFinite(a)?[T,C,a]:[T,C]}},{key:"projectPosition",value:function(t){var e=i()(t,3),n=e[0],r=e[1],o=e[2],a=void 0===o?0:o,s=n*O,u=r*O,c=Math.cos(u),l=256*(a/6370972+1);return[Math.sin(s)*c*l,-Math.cos(s)*c*l,Math.sin(u)*l]}},{key:"unprojectPosition",value:function(t){var e=i()(t,3),n=e[0],r=e[1],o=e[2],a=_.a(t),s=Math.asin(o/a);return[Math.atan2(n,-r)*S,s*S,6370972*(a/256-1)]}},{key:"projectFlat",value:function(t){return t}},{key:"unprojectFlat",value:function(t){return t}},{key:"panByPosition",value:function(t,e){var n=this.unproject(e);return{longitude:t[0]-n[0]+this.longitude,latitude:t[1]-n[1]+this.latitude}}}]),n}(y.a);function P(t,e){var n=b.b([],e,t);return b.a(n,n,1/n[3]),n}},function(t,e,n){"use strict";var r=n(9),i=n.n(r),o=n(3),a=n.n(o),s=n(4),u=n.n(s),c=n(27),l=n.n(c),h=n(5),f=n.n(h),p=n(6),d=n.n(p),A=n(1),g=n.n(A),m=n(0),y=n.n(m),v=n(12),_=n(165),b=n(43),x=n(13),w=n(75);function E(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=g()(t);if(e){var i=g()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return d()(this,n)}}var O=function(t){f()(n,t);var e=E(n);function n(){return a()(this,n),e.apply(this,arguments)}return u()(n,[{key:"value",get:function(){return this._value}},{key:"_onUpdate",value:function(){var t=this.time,e=this.settings,n=e.fromValue,r=e.toValue,i=e.duration,o=(0,e.easing)(t/i);this._value=Object(x.g)(n,r,o)}}]),n}(w.a);function S(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=g()(t);if(e){var i=g()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return d()(this,n)}}function T(t,e,n,r,i){var o=e-t;return(n-e)*i+-o*r+o+e}function C(t,e){if(Array.isArray(t)){for(var n=0,r=0;r=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function B(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0}},{key:"add",value:function(t,e,n,r){var i=this.transitions;if(i.has(t)){var o=i.get(t),a=o.value;e=void 0===a?o.settings.fromValue:a,this.remove(t)}if(r=Object(b.e)(r)){var s=L[r.type];if(s){var u=new s(this.timeline);u.start(k(k({},r),{},{fromValue:e,toValue:n})),i.set(t,u)}else M.a.error("unsupported transition type '".concat(r.type,"'"))()}}},{key:"remove",value:function(t){var e=this.transitions;e.has(t)&&(e.get(t).cancel(),e.delete(t))}},{key:"update",value:function(){var t,e={},n=I(this.transitions);try{for(n.s();!(t=n.n()).done;){var r=i()(t.value,2),o=r[0],a=r[1];a.update(),e[o]=a.value,a.inProgress||this.remove(o)}}catch(t){n.e(t)}finally{n.f()}return e}},{key:"clear",value:function(){var t,e=I(this.transitions.keys());try{for(e.s();!(t=e.n()).done;){var n=t.value;this.remove(n)}}catch(t){e.e(t)}finally{e.f()}}}]),t}(),F=n(138),z=n(24),U=n(161),N=n(32),G=n(7),V=n(29),H=n(80),W=n(162),q=n(145),X=n(68),Z=n(52),J=n(28),Q=n.n(J),K=n(107);function Y(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function $(t){for(var e=1;e=e.min)}},color:{validate:function(t,e){return e.optional&&!t||ct(t)&&(3===t.length||4===t.length)},equal:function(t,e,n){return at(t,e)}},accessor:{validate:function(t,e){var n=lt(t);return"function"===n||n===lt(e.value)},equal:function(t,e,n){return"function"==typeof e||at(t,e)}},array:{validate:function(t,e){return e.optional&&!t||ct(t)},equal:function(t,e,n){return n.compare?at(t,e):t===e}},object:{equal:function(t,e,n){return n.compare?Object(nt.a)(t,e):t===e}},function:{validate:function(t,e){return e.optional&&!t||"function"==typeof t},equal:function(t,e,n){return!n.compare||t===e}},data:{transform:function(t,e,n){var r=n.props.dataTransform;return r&&t?r(t):t}},image:{transform:function(t,e,n){return function(t,e){var n=t.context&&t.context.gl;if(!n||!e)return null;if(e instanceof K.a)return e;e.constructor&&"Object"!==e.constructor.name&&(e={data:e});var r=null;e.compressed&&(r=y()({},10241,e.data.length>1?9985:9729));var i=new K.a(n,$($({},e),{},{parameters:$($($({},tt),r),t.props.textureParameters)}));return et[i.id]=!0,i}(n,t)},release:function(t){var e;(e=t)&&e instanceof K.a&&et[e.id]&&(e.delete(),delete et[e.id])}}};function at(t,e){if(t===e)return!0;if(!ct(t)||!ct(e))return!1;var n=t.length;if(n!==e.length)return!1;for(var r=0;r=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function ft(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&e.pendingLoadCount!==e.resolvedLoadCount)}for(var n in this.asyncProps)if(this.isAsyncPropLoading(n))return!0;return!1}},{key:"reloadAsyncProp",value:function(t,e){this._watchPromise(t,Promise.resolve(e))}},{key:"setAsyncProps",value:function(t){var e=t[z.c]||{},n=t[z.b]||t,r=t[z.a]||{};for(var i in e){var o=e[i];this._createAsyncPropData(i,r[i]),this._updateAsyncProp(i,o),e[i]=this.getAsyncProp(i)}for(var a in n){var s=n[a];this._createAsyncPropData(a,r[a]),this._updateAsyncProp(a,s)}}},{key:"_fetch",value:function(t,e){return null}},{key:"_onResolve",value:function(t,e){}},{key:"_onError",value:function(t,e){}},{key:"_updateAsyncProp",value:function(t,e){this._didAsyncInputValueChange(t,e)&&("string"==typeof e&&(e=this._fetch(t,e)),e instanceof Promise?this._watchPromise(t,e):Object(Z.c)(e)?this._resolveAsyncIterable(t,e):this._setPropValue(t,e))}},{key:"_freezeAsyncOldProps",value:function(){if(!this.oldAsyncProps&&this.oldProps)for(var t in this.oldAsyncProps=Object.create(this.oldProps),this.asyncProps)Object.defineProperty(this.oldAsyncProps,t,{enumerable:!0,value:this.oldProps[t]})}},{key:"_didAsyncInputValueChange",value:function(t,e){var n=this.asyncProps[t];return e!==n.resolvedValue&&e!==n.lastValue&&(n.lastValue=e,!0)}},{key:"_setPropValue",value:function(t,e){this._freezeAsyncOldProps();var n=this.asyncProps[t];n&&(e=this._postProcessValue(n,e),n.resolvedValue=e,n.pendingLoadCount++,n.resolvedLoadCount=n.pendingLoadCount)}},{key:"_setAsyncPropValue",value:function(t,e,n){var r=this.asyncProps[t];r&&n>=r.resolvedLoadCount&&void 0!==e&&(this._freezeAsyncOldProps(),r.resolvedValue=e,r.resolvedLoadCount=n,this.onAsyncPropUpdated(t,e))}},{key:"_watchPromise",value:function(t,e){var n=this,r=this.asyncProps[t];if(r){r.pendingLoadCount++;var i=r.pendingLoadCount;e.then((function(e){e=n._postProcessValue(r,e),n._setAsyncPropValue(t,e,i),n._onResolve(t,e)})).catch((function(e){n._onError(t,e)}))}}},{key:"_resolveAsyncIterable",value:(e=Tt()(It.a.mark((function t(e,n){var r,i,o,a,s,u,c,l,h,f,p;return It.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("data"===e){t.next=3;break}return this._setPropValue(e,n),t.abrupt("return");case 3:if(r=this.asyncProps[e]){t.next=6;break}return t.abrupt("return");case 6:r.pendingLoadCount++,i=r.pendingLoadCount,o=[],a=0,s=!1,u=!1,t.prev=12,l=Pt()(n);case 14:return t.next=16,l.next();case 16:if(!(s=!(h=t.sent).done)){t.next=26;break}f=h.value,p=this.component.props.dataTransform,o=p?p(f,o):o.concat(f),Object.defineProperty(o,"__diff",{enumerable:!1,value:[{startRow:a,endRow:o.length}]}),a=o.length,this._setAsyncPropValue(e,o,i);case 23:s=!1,t.next=14;break;case 26:t.next=32;break;case 28:t.prev=28,t.t0=t.catch(12),u=!0,c=t.t0;case 32:if(t.prev=32,t.prev=33,!s||null==l.return){t.next=37;break}return t.next=37,l.return();case 37:if(t.prev=37,!u){t.next=40;break}throw c;case 40:return t.finish(37);case 41:return t.finish(32);case 42:this._onResolve(e,o);case 43:case"end":return t.stop()}}),t,this,[[12,28,32,42],[33,,37,41]])}))),function(t,n){return e.apply(this,arguments)})},{key:"_postProcessValue",value:function(t,e){var n=t.type;return n&&(n.release&&n.release(t.resolvedValue,n,this.component),n.transform)?n.transform(e,n,this.component):e}},{key:"_createAsyncPropData",value:function(t,e){if(!this.asyncProps[t]){var n=this.component&&this.component.constructor._propTypes;this.asyncProps[t]={type:n&&n[t],lastValue:null,resolvedValue:e,pendingLoadCount:0,resolvedLoadCount:0}}}}]),t}()),Dt=n(19),Lt=n(215);function jt(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return Ft(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ft(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Ft(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:[];return e[0]=t+1&255,e[1]=t+1>>8&255,e[2]=t+1>>8>>8&255,e}},{key:"decodePickingColor",value:function(t){Object(V.a)(t instanceof Uint8Array);var e=i()(t,3);return e[0]+256*e[1]+65536*e[2]-1}},{key:"getNumInstances",value:function(){return Number.isFinite(this.props.numInstances)?this.props.numInstances:this.state&&void 0!==this.state.numInstances?this.state.numInstances:Object(U.a)(this.props.data)}},{key:"getStartIndices",value:function(){return this.props.startIndices?this.props.startIndices:this.state&&this.state.startIndices?this.state.startIndices:null}},{key:"getBounds",value:function(){var t,e=this.getAttributeManager();if(!e)return null;var n=e.attributes,r=n.positions,i=n.instancePositions;return null===(t=r||i)||void 0===t?void 0:t.getBounds()}},{key:"getShaders",value:function(t){var e,n=jt(this.props.extensions);try{for(n.s();!(e=n.n()).done;){var r=e.value;t=Object(W.a)(t,r.getShaders.call(this,r))}}catch(t){n.e(t)}finally{n.f()}return t}},{key:"shouldUpdateState",value:function(t){return t.changeFlags.propsOrDataChanged}},{key:"updateState",value:function(t){var e=this.getAttributeManager(),n=t.changeFlags.dataChanged;if(n&&e)if(Array.isArray(n)){var r,i=jt(n);try{for(i.s();!(r=i.n()).done;){var o=r.value;e.invalidateAll(o)}}catch(t){i.e(t)}finally{i.f()}}else e.invalidateAll();var a=t.props,s=t.oldProps,u=Number.isInteger(s.highlightedObjectIndex)||s.pickable,c=Number.isInteger(a.highlightedObjectIndex)||a.pickable;if(u!==c&&e){var l=e.attributes,h=l.pickingColors,f=l.instancePickingColors,p=h||f;p&&(c&&p.constant&&(p.constant=!1,e.invalidate(p.id)),p.value||c||(p.constant=!0,p.value=[0,0,0]))}}},{key:"finalizeState",value:function(t){var e,n=jt(this.getModels());try{for(n.s();!(e=n.n()).done;){e.value.delete()}}catch(t){n.e(t)}finally{n.f()}var r=this.getAttributeManager();r&&r.finalize(),this.context&&this.context.resourceManager.unsubscribe({consumerId:this.id}),this.internalState&&(this.internalState.uniformTransitions.clear(),this.internalState.finalize())}},{key:"draw",value:function(t){var e,n=jt(this.getModels());try{for(n.s();!(e=n.n()).done;){e.value.draw(t)}}catch(t){n.e(t)}finally{n.f()}}},{key:"getPickingInfo",value:function(t){var e=t.info,n=(t.mode,t.sourceLayer,e.index);return n>=0&&Array.isArray(this.props.data)&&(e.object=this.props.data[n]),e}},{key:"raiseError",value:function(t,e){var n,r,i,o;(e&&(t.message="".concat(e,": ").concat(t.message)),null!==(n=(r=this.props).onError)&&void 0!==n&&n.call(r,t))||(null===(i=this.context)||void 0===i||null===(o=i.onError)||void 0===o||o.call(i,t,this))}},{key:"getNeedsRedraw",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{clearRedrawFlags:!1};return this._getNeedsRedraw(t)}},{key:"needsUpdate",value:function(){return!!this.internalState&&(this.internalState.needsUpdate||this.hasUniformTransition()||this.shouldUpdateState(this._getUpdateParams()))}},{key:"hasUniformTransition",value:function(){var t;return(null===(t=this.internalState)||void 0===t?void 0:t.uniformTransitions.active)||!1}},{key:"activateViewport",value:function(t){if(this.internalState){var e=this.internalState.viewport;this.internalState.viewport=t,e&&Ht({oldViewport:e,viewport:t})||(this.setChangeFlags({viewportChanged:!0}),this.isComposite?this.needsUpdate()&&this.setNeedsUpdate():this._update())}}},{key:"invalidateAttribute",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"all",e=this.getAttributeManager();e&&("all"===t?e.invalidateAll():e.invalidate(t))}},{key:"updateAttributes",value:function(t){var e,n=jt(this.getModels());try{for(n.s();!(e=n.n()).done;){var r=e.value;this._setModelAttributes(r,t)}}catch(t){n.e(t)}finally{n.f()}}},{key:"_updateAttributes",value:function(){var t=this.getAttributeManager();if(t){var e=this.props,n=this.getNumInstances(),r=this.getStartIndices();t.update({data:e.data,numInstances:n,startIndices:r,props:e,transitions:e.transitions,buffers:e.data.attributes,context:this});var i=t.getChangedAttributes({clearChangedFlags:!0});this.updateAttributes(i)}}},{key:"_updateAttributeTransition",value:function(){var t=this.getAttributeManager();t&&t.updateTransition()}},{key:"_updateUniformTransition",value:function(){var t=this.internalState.uniformTransitions;if(t.active){var e=t.update(),n=Object.create(this.props);for(var r in e)Object.defineProperty(n,r,{value:e[r]});return n}return this.props}},{key:"calculateInstancePickingColors",value:function(t,e){var n=e.numInstances;if(!t.constant){var r=Math.floor(Wt.length/3);if(this.internalState.usesPickingColorCache=!0,rGt&&M.a.warn("Layer has too many data objects. Picking might not be able to distinguish all objects.")(),Wt=X.a.allocate(Wt,n,{size:3,copy:!0,maxCount:Math.max(n,Gt)});for(var i=Math.floor(Wt.length/3),o=[],a=r;a=0?this.encodePickingColor(a):null),this.setModuleParameters(u)}}},{key:"_getUpdateParams",value:function(){return{props:this.props,oldProps:this.internalState.getOldProps(),context:this.context,changeFlags:this.internalState.changeFlags}}},{key:"_getNeedsRedraw",value:function(t){if(!this.internalState)return!1;var e=!1;e=e||this.internalState.needsRedraw&&this.id,this.internalState.needsRedraw=this.internalState.needsRedraw&&!t.clearRedrawFlags;var n=this.getAttributeManager(),r=!!n&&n.getNeedsRedraw(t);return e=e||r}},{key:"_onAsyncPropUpdated",value:function(){this._diffProps(this.props,this.internalState.getOldProps()),this.setNeedsUpdate()}}]),n}(wt);y()(Xt,"defaultProps",qt),y()(Xt,"layerName","Layer")},function(t,e,n){"use strict";var r=n(0),i=n.n(r),o=n(3),a=n.n(o),s=n(4),u=n.n(s),c=n(9),l=n.n(c),h=n(27),f=n.n(h),p=n(8),d=n.n(p),A=n(5),g=n.n(A),m=n(6),y=n.n(m),v=n(1),_=n.n(v),b=n(251),x=n(189),w=n(33);function E(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function O(t){for(var e=1;e=o){for(var a=new Array(i).fill(1/0),s=new Array(i).fill(-1/0),u=0;us[c]&&(s[c]=l)}t=[a,s]}}return this.state.bounds=t,t}},{key:"setData",value:function(t){var e,n=this.state;e=ArrayBuffer.isView(t)?{value:t}:t instanceof w.a?{buffer:t}:t;var r=I(I({},this.settings),e);if(n.bufferAccessor=r,n.bounds=null,e.constant){var i=e.value;if(i=this._normalizeValue(i,[],0),this.settings.normalized&&(i=this.normalizeConstant(i)),!(!n.constant||!this._areValuesEqual(i,this.value)))return!1;n.externalBuffer=null,n.constant=!0,this.value=i}else if(e.buffer){var o=e.buffer;n.externalBuffer=o,n.constant=!1,this.value=e.value||null;var a=e.value instanceof Float64Array;r.type=e.type||o.accessor.type,r.bytesPerElement=o.accessor.BYTES_PER_ELEMENT*(a?2:1),r.stride=B(r)}else if(e.value){this._checkExternalBuffer(e);var s=e.value;n.externalBuffer=null,n.constant=!1,this.value=s,r.bytesPerElement=s.BYTES_PER_ELEMENT,r.stride=B(r);var u=this.buffer,c=this.byteOffset;this.doublePrecision&&s instanceof Float64Array&&(s=Object(C.f)(s,r));var l=s.byteLength+c+2*r.stride;u.byteLength0&&void 0!==arguments[0]?arguments[0]:{};this.state.bounds=null;var e=this.value,n=t.startOffset,r=void 0===n?0:n,i=t.endOffset;this.buffer.subData({data:this.doublePrecision&&e instanceof Float64Array?Object(C.f)(e,{size:this.size,startIndex:r,endIndex:i}):e.subarray(r,i),offset:r*e.BYTES_PER_ELEMENT+this.byteOffset})}},{key:"allocate",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.state,r=n.allocatedValue,i=T.a.allocate(r,t+1,{size:this.size,type:this.settings.defaultType,copy:e});this.value=i;var o=this.buffer,a=this.byteOffset;return o.byteLength=0;)e[n+a]=Number.isFinite(t[a])?t[a]:i[a]}return e}},{key:"_areValuesEqual",value:function(t,e){if(!t||!e)return!1;for(var n=this.size,r=0;r=e[1])return t;for(var n=[],r=t.length,i=0,o=0;oe[1]?n.push(a):e=[Math.min(a[0],e[0]),Math.max(a[1],e[1])]}return n.splice(i,0,e),n}var N=n(43);function G(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return V(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return V(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function V(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:{},e=t.clearChangedFlags,n=void 0!==e&&e,r=this.state.needsRedraw;return this.state.needsRedraw=r&&!n,r}},{key:"getUpdateTriggers",value:function(){var t=this.settings.accessor;return[this.id].concat("function"!=typeof t&&t||[])}},{key:"supportsTransition",value:function(){return Boolean(this.settings.transition)}},{key:"getTransitionSetting",value:function(t){if(!t||!this.supportsTransition())return null;var e=this.settings.accessor,n=this.settings.transition,r=Array.isArray(e)?t[e.find((function(e){return t[e]}))]:t[e];return Object(N.e)(r,n)}},{key:"setNeedsUpdate",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.id,e=arguments.length>1?arguments[1]:void 0;if(this.state.needsUpdate=this.state.needsUpdate||t,this.setNeedsRedraw(t),e){var n=e.startRow,r=void 0===n?0:n,i=e.endRow,o=void 0===i?1/0:i;this.state.updateRanges=U(this.state.updateRanges,[r,o])}else this.state.updateRanges=z}},{key:"clearNeedsUpdate",value:function(){this.state.needsUpdate=!1,this.state.updateRanges=F}},{key:"setNeedsRedraw",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.id;this.state.needsRedraw=this.state.needsRedraw||t}},{key:"allocate",value:function(t){var e=this.state,r=this.settings;return!r.noAlloc&&(!!r.update&&(d()(_()(n.prototype),"allocate",this).call(this,t,e.updateRanges!==z),!0))}},{key:"updateBuffer",value:function(t){var e=t.numInstances,r=t.data,i=t.props,o=t.context;if(!this.needsUpdate())return!1;var a=this.state.updateRanges,s=this.settings,u=s.update,c=s.noAlloc,h=!0;if(u){var f,p=G(a);try{for(p.s();!(f=p.n()).done;){var A=l()(f.value,2),g=A[0],m=A[1];u.call(o,this,{data:r,startRow:g,endRow:m,props:i,numInstances:e})}}catch(t){p.e(t)}finally{p.f()}if(this.value)if(this.constant||this.buffer.byteLength1&&void 0!==arguments[1]?arguments[1]:null,n=this.state,r=this.settings;if(!t)return n.binaryValue=null,n.binaryAccessor=null,!1;if(r.noAlloc)return!1;if(n.binaryValue===t)return this.clearNeedsUpdate(),!0;n.binaryValue=t,this.setNeedsRedraw();var i=r.transform||e!==this.startIndices;if(i){ArrayBuffer.isView(t)&&(t={value:t});var o=t;Object(D.a)(ArrayBuffer.isView(o.value),"invalid ".concat(r.accessor));var a=Boolean(o.size)&&o.size!==this.size;return n.binaryAccessor=Object(L.b)(o.value,{size:o.size||this.size,stride:o.stride,offset:o.offset,startIndices:e,nested:a}),!1}return this.clearNeedsUpdate(),this.setData(t),!0}},{key:"getVertexOffset",value:function(t){var e=this.startIndices;return(e?e[t]:t)*this.size}},{key:"getShaderAttributes",value:function(){var t=this.settings.shaderAttributes||i()({},this.id,null),e={};for(var r in t)Object.assign(e,d()(_()(n.prototype),"getShaderAttributes",this).call(this,r,t[r]));return e}},{key:"_autoUpdater",value:function(t,e){var n=e.data,r=e.startRow,i=e.endRow,o=e.props,a=e.numInstances;if(!t.constant){var s=t.settings,u=t.state,c=t.value,l=t.size,h=t.startIndices,f=s.accessor,p=s.transform,d=u.binaryAccessor||("function"==typeof f?f:o[f]);Object(D.a)("function"==typeof d,'accessor "'.concat(f,'" is not a function'));var A,g=t.getVertexOffset(r),m=Object(L.a)(n,r,i),y=m.iterable,v=m.objectInfo,_=G(y);try{for(_.s();!(A=_.n()).done;){var b=A.value;v.index++;var x=d(b,v);if(p&&(x=p.call(this,x)),h){var w=(v.indexl?c.set(x,g):(t._normalizeValue(x,v.target,0),Object(j.a)({target:c,source:v.target,start:g,count:w}));g+=w*l}else t._normalizeValue(x,c,g),g+=l}}catch(t){_.e(t)}finally{_.f()}}}},{key:"_validateAttributeUpdaters",value:function(){var t=this.settings;if(!(t.noAlloc||"function"==typeof t.update))throw new Error("Attribute ".concat(this.id," missing update or accessor"))}},{key:"_checkAttributeArray",value:function(){var t=this.value,e=Math.min(4,this.size);if(t&&t.length>=e){var n=!0;switch(e){case 4:n=n&&Number.isFinite(t[3]);case 3:n=n&&Number.isFinite(t[2]);case 2:n=n&&Number.isFinite(t[1]);case 1:n=n&&Number.isFinite(t[0]);break;default:n=!1}if(!n)throw new Error("Illegal attribute generated for ".concat(this.id))}}}]),n}(k),q=n(32),X=n(322),Z=n(75);function J(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Q(t){for(var e=1;e=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Y(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function it(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n EPSILON || length(aTo - aCur) > EPSILON;\n vIsTransitioningFlag = isTransitioning ? 1.0 : 0.0;\n\n vNext = getNextValue(aCur, aPrev, aTo);\n gl_Position = vec4(0, 0, 0, 1);\n gl_PointSize = 100.0;\n}\n",fs:"\n#define SHADER_NAME spring-transition-is-transitioning-fragment-shader\n\nvarying float vIsTransitioningFlag;\n\nvoid main(void) {\n if (vIsTransitioningFlag == 0.0) {\n discard;\n }\n gl_FragColor = vec4(1.0);\n}",defines:{ATTRIBUTE_TYPE:r},varyings:["vNext"]})}(n,r,this.framebuffer);var s={byteLength:0,usage:35050};this.buffers=[new w.a(n,s),new w.a(n,s),new w.a(n,s)]}return u()(t,[{key:"inProgress",get:function(){return this.transition.inProgress}},{key:"start",value:function(t,e){var n,r=this.gl,i=this.buffers,o=this.attribute,a={numInstances:e,attribute:o,fromLength:this.currentLength,fromStartIndices:this.currentStartIndices,getData:t.enter},s=rt(i);try{for(s.s();!(n=s.n()).done;){var u=n.value;Object(N.f)(at({buffer:u},a))}}catch(t){s.e(t)}finally{s.f()}this.settings=t,this.currentStartIndices=o.startIndices,this.currentLength=Object(N.b)(o,e),this.attributeInTransition.setData({buffer:i[1],value:o.value}),this.transition.start(at(at({},t),{},{duration:1/0})),this.transform.update({elementCount:Math.floor(this.currentLength/o.size),sourceBuffers:{aTo:Object(N.d)(r,o)}})}},{key:"update",value:function(){var t=this.buffers,e=this.transform,n=this.framebuffer,r=this.transition;if(!r.update())return!1;var i=this.settings;return e.update({sourceBuffers:{aPrev:t[0],aCur:t[1]},feedbackBuffers:{vNext:t[2]}}),e.run({framebuffer:n,discard:!1,clearRenderTarget:!0,uniforms:{stiffness:i.stiffness,damping:i.damping},parameters:{depthTest:!1,blend:!0,viewport:[0,0,1,1],blendFunc:[1,1],blendEquation:[32776,32776]}}),Object(N.a)(t),this.attributeInTransition.setData({buffer:t[1],value:this.attribute.value}),Object(tt.c)(n)[0]>0||r.end(),!0}},{key:"cancel",value:function(){this.transition.cancel(),this.transform.delete();var t,e=rt(this.buffers);try{for(e.s();!(t=e.n()).done;){t.value.delete()}}catch(t){e.e(t)}finally{e.f()}this.buffers.length=0,this.texture.delete(),this.framebuffer.delete()}}]),t}()},ut=function(){function t(e,n){var r=n.id,i=n.timeline;a()(this,t),this.id=r,this.gl=e,this.timeline=i,this.transitions={},this.needsRedraw=!1,this.numInstances=1,this.isSupported=X.a.isSupported(e)}return u()(t,[{key:"finalize",value:function(){for(var t in this.transitions)this._removeTransition(t)}},{key:"update",value:function(t){var e=t.attributes,n=t.transitions,r=t.numInstances;for(var i in this.numInstances=r||1,e){var o=e[i],a=o.getTransitionSetting(n);a&&this._updateAttribute(i,o,a)}for(var s in this.transitions){var u=e[s];u&&u.getTransitionSetting(n)||this._removeTransition(s)}}},{key:"hasAttribute",value:function(t){var e=this.transitions[t];return e&&e.inProgress}},{key:"getAttributes",value:function(){var t={};for(var e in this.transitions){var n=this.transitions[e];n.inProgress&&(t[e]=n.attributeInTransition)}return t}},{key:"run",value:function(){if(!this.isSupported||0===this.numInstances)return!1;for(var t in this.transitions){this.transitions[t].update()&&(this.needsRedraw=!0)}var e=this.needsRedraw;return this.needsRedraw=!1,e}},{key:"_removeTransition",value:function(t){this.transitions[t].cancel(),delete this.transitions[t]}},{key:"_updateAttribute",value:function(t,e,n){var r=this.transitions[t],i=!r||r.type!==n.type;if(i){if(!this.isSupported)return void P.a.warn("WebGL2 not supported by this browser. Transition for ".concat(t," is disabled."))();r&&this._removeTransition(t);var o=st[n.type];o?this.transitions[t]=new o({attribute:e,timeline:this.timeline,gl:this.gl}):(P.a.error("unsupported transition type '".concat(n.type,"'"))(),i=!1)}(i||e.needsRedraw())&&(this.needsRedraw=!0,this.transitions[t].start(n,this.numInstances))}}]),t}();function ct(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function lt(t){for(var e=1;e=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function ft(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:{},r=n.id,i=void 0===r?"attribute-manager":r,o=n.stats,s=n.timeline;a()(this,t),this.id=i,this.gl=e,this.attributes={},this.updateTriggers={},this.needsRedraw=!0,this.userData={},this.stats=o,this.attributeTransitionManager=new ut(e,{id:"".concat(i,"-transitions"),timeline:s}),Object.seal(this)}return u()(t,[{key:"finalize",value:function(){for(var t in this.attributes)this.attributes[t].delete();this.attributeTransitionManager.finalize()}},{key:"getNeedsRedraw",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{clearRedrawFlags:!1},e=this.needsRedraw;return this.needsRedraw=this.needsRedraw&&!t.clearRedrawFlags,e&&this.id}},{key:"setNeedsRedraw",value:function(){this.needsRedraw=!0}},{key:"add",value:function(t){this._add(t)}},{key:"addInstanced",value:function(t){this._add(t,{instanced:1})}},{key:"remove",value:function(t){var e,n=ht(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;void 0!==this.attributes[r]&&(this.attributes[r].delete(),delete this.attributes[r])}}catch(t){n.e(t)}finally{n.f()}}},{key:"invalidate",value:function(t,e){var n=this._invalidateTrigger(t,e);Object(q.a)("attributeManager.invalidate",this,t,n)}},{key:"invalidateAll",value:function(t){for(var e in this.attributes)this.attributes[e].setNeedsUpdate(e,t);Object(q.a)("attributeManager.invalidate",this,"all")}},{key:"update",value:function(t){var e=t.data,n=t.numInstances,r=t.startIndices,i=void 0===r?null:r,o=t.transitions,a=t.props,s=void 0===a?{}:a,u=t.buffers,c=void 0===u?{}:u,l=t.context,h=void 0===l?{}:l,f=!1;for(var p in Object(q.a)("attributeManager.updateStart",this),this.stats&&this.stats.get("Update Attributes").timeStart(),this.attributes){var d=this.attributes[p],A=d.settings.accessor;d.startIndices=i,d.numInstances=n,s[p]&&P.a.removed("props.".concat(p),"data.attributes.".concat(p))(),d.setExternalBuffer(c[p])||d.setBinaryValue("string"==typeof A?c[A]:void 0,e.startIndices)||"string"==typeof A&&!c[A]&&d.setConstantValue(s[A])||d.needsUpdate()&&(f=!0,this._updateAttribute({attribute:d,numInstances:n,data:e,props:s,context:h})),this.needsRedraw=this.needsRedraw||d.needsRedraw()}f&&Object(q.a)("attributeManager.updateEnd",this,n),this.stats&&this.stats.get("Update Attributes").timeEnd(),this.attributeTransitionManager.update({attributes:this.attributes,numInstances:n,transitions:o})}},{key:"updateTransition",value:function(){var t=this.attributeTransitionManager.run();return this.needsRedraw=this.needsRedraw||t,t}},{key:"getAttributes",value:function(){return this.attributes}},{key:"getChangedAttributes",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{clearChangedFlags:!1},e=this.attributes,n=this.attributeTransitionManager,r=lt({},n.getAttributes());for(var i in e){var o=e[i];o.needsRedraw(t)&&!n.hasAttribute(i)&&(r[i]=o)}return r}},{key:"getShaderAttributes",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t||(t=this.getAttributes());var n={};for(var r in t)e[r]||Object.assign(n,t[r].getShaderAttributes());return n}},{key:"_add",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(var n in t){var r=t[n];this.attributes[n]=this._createAttribute(n,r,e)}this._mapUpdateTriggersToAttributes()}},{key:"_createAttribute",value:function(t,e,n){var r=lt(lt({},e),{},{id:t,size:(e.isIndexed?1:e.size)||1,divisor:n.instanced?1:e.divisor||0});return new W(this.gl,r)}},{key:"_mapUpdateTriggersToAttributes",value:function(){var t=this,e={},n=function(n){t.attributes[n].getUpdateTriggers().forEach((function(t){e[t]||(e[t]=[]),e[t].push(n)}))};for(var r in this.attributes)n(r);this.updateTriggers=e}},{key:"_invalidateTrigger",value:function(t,e){var n=this.attributes,r=this.updateTriggers[t];return r&&r.forEach((function(t){var r=n[t];r&&r.setNeedsUpdate(r.id,e)})),r}},{key:"_updateAttribute",value:function(t){var e=t.attribute,n=t.numInstances;(Object(q.a)("attribute.updateStart",e),e.constant)?e.setConstantValue(e.value):(e.allocate(n)&&Object(q.a)("attribute.allocate",e,n),e.updateBuffer(t)&&(this.needsRedraw=!0,Object(q.a)("attribute.updateEnd",e,n)))}}]),t}()},function(t,e,n){"use strict";var r=n(9),i=n.n(r),o=n(3),a=n.n(o),s=n(4),u=n.n(s),c=n(27),l=n.n(c),h=n(5),f=n.n(h),p=n(6),d=n.n(p),A=n(1),g=n.n(A),m=n(0),y=n.n(m),v=n(52),_=n(198),b=n(171);const x=1e20;class w{constructor({fontSize:t=24,buffer:e=3,radius:n=8,cutoff:r=.25,fontFamily:i="sans-serif",fontWeight:o="normal",fontStyle:a="normal"}={}){this.buffer=e,this.cutoff=r,this.radius=n;const s=this.size=t+4*e,u=this._createCanvas(s),c=this.ctx=u.getContext("2d",{willReadFrequently:!0});c.font=`${a} ${o} ${t}px ${i}`,c.textBaseline="alphabetic",c.textAlign="left",c.fillStyle="black",this.gridOuter=new Float64Array(s*s),this.gridInner=new Float64Array(s*s),this.f=new Float64Array(s),this.z=new Float64Array(s+1),this.v=new Uint16Array(s)}_createCanvas(t){const e=document.createElement("canvas");return e.width=e.height=t,e}draw(t){const{width:e,actualBoundingBoxAscent:n,actualBoundingBoxDescent:r,actualBoundingBoxLeft:i,actualBoundingBoxRight:o}=this.ctx.measureText(t),a=Math.ceil(n),s=Math.min(this.size-this.buffer,Math.ceil(o-i)),u=Math.min(this.size-this.buffer,a+Math.ceil(r)),c=s+2*this.buffer,l=u+2*this.buffer,h=Math.max(c*l,0),f=new Uint8ClampedArray(h),p={data:f,width:c,height:l,glyphWidth:s,glyphHeight:u,glyphTop:a,glyphLeft:0,glyphAdvance:e};if(0===s||0===u)return p;const{ctx:d,buffer:A,gridInner:g,gridOuter:m}=this;d.clearRect(A,A,s,u),d.fillText(t,A,A+a);const y=d.getImageData(A,A,s,u);m.fill(x,0,h),g.fill(0,0,h);for(let t=0;t0?t*t:0,g[r]=t<0?t*t:0}}E(m,0,0,c,l,c,this.f,this.v,this.z),E(g,A,A,s,u,c,this.f,this.v,this.z);for(let t=0;t-1);u++,o[u]=s,a[u]=c,a[u+1]=x}for(let s=0,u=0;s=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function C(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);nr&&(as){var h=M(t,s,u,i);c+h>r&&(ar&&(h=I(t,s,u,r,i,o),a=o[o.length-1])),s=u,c+=h}return c}function R(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5?arguments[5]:void 0;void 0===o&&(o=t.length);var a=[];return"break-all"===e?I(t,i,o,n,r,a):B(t,i,o,n,r,a),a}function k(t,e,n,r,i,o){for(var a=0,s=0,u=e;u0,h=[0,0],f=[0,0],p=0,d=0,A=0,g=0;g<=a;g++){var m=o[g];if("\n"!==m&&g!==a||(A=g),A>d){for(var y=l?R(o,n,r,i,d,A):P,v=0;v<=y.length;v++){var _=0===v?d:y[v-1],b=v0&&void 0!==arguments[0]?arguments[0]:5;a()(this,t),y()(this,"_cache",{}),y()(this,"_order",[]),this.limit=e}return u()(t,[{key:"get",value:function(t){var e=this._cache[t];return e&&(this._deleteOrder(t),this._appendOrder(t)),e}},{key:"set",value:function(t,e){this._cache[t]?(this.delete(t),this._cache[t]=e,this._appendOrder(t)):(Object.keys(this._cache).length===this.limit&&this.delete(this._order[0]),this._cache[t]=e,this._appendOrder(t))}},{key:"delete",value:function(t){this._cache[t]&&(delete this._cache[t],this._deleteOrder(t))}},{key:"_deleteOrder",value:function(t){var e=this._order.indexOf(t);e>=0&&this._order.splice(e,1)}},{key:"_appendOrder",value:function(t){this._order.push(t)}}]),t}();function j(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return F(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return F(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function F(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:{};Object.assign(this.props,t),this._key=this._getKey();var e=V(this._key,this.props.characterSet),n=G.get(this._key);if(n&&0===e.size)this._atlas!==n&&(this._atlas=n);else{var r=this._generateFontAtlas(e,n);this._atlas=r,G.set(this._key,r)}}},{key:"_generateFontAtlas",value:function(t,e){var n=this.props,r=n.fontFamily,i=n.fontWeight,o=n.fontSize,a=n.buffer,s=n.sdf,u=n.radius,c=n.cutoff,l=e&&e.data;l||((l=document.createElement("canvas")).width=1024);var h=l.getContext("2d");W(h,r,o,i);var f=function(t){var e,n,r=t.characterSet,i=t.getFontWidth,o=t.fontHeight,a=t.buffer,s=t.maxCanvasWidth,u=t.mapping,c=void 0===u?{}:u,l=t.xOffset,h=void 0===l?0:l,f=t.yOffset,p=void 0===f?0:f,d=0,A=h,g=o+2*a,m=T(r);try{for(m.s();!(e=m.n()).done;){var y=e.value;if(!c[y]){var v=i(y);A+v+2*a>s&&(A=0,d++),c[y]={x:A+a,y:p+d*g+a,width:v,height:g,layoutWidth:v,layoutHeight:o},A+=v+2*a}}}catch(t){m.e(t)}finally{m.f()}return{mapping:c,xOffset:A,yOffset:p+d*g,canvasHeight:(n=p+(d+1)*g,Math.pow(2,Math.ceil(Math.log2(n))))}}(U({getFontWidth:function(t){return h.measureText(t).width},fontHeight:1.2*o,buffer:a,characterSet:t,maxCanvasWidth:1024},e&&{mapping:e.mapping,xOffset:e.xOffset,yOffset:e.yOffset})),p=f.mapping,d=f.canvasHeight,A=f.xOffset,g=f.yOffset;if(l.height!==d){var m=h.getImageData(0,0,l.width,l.height);l.height=d,h.putImageData(m,0,0)}if(W(h,r,o,i),s){var y,v=new w({fontSize:o,buffer:a,radius:u,cutoff:c,fontFamily:r,fontWeight:"".concat(i)}),_=j(t);try{for(_.s();!(y=_.n()).done;){var b=y.value,x=v.draw(b),E=x.data,O=x.width,S=x.height,C=x.glyphTop;p[b].width=O,p[b].layoutOffsetY=.9*o-C;var P=h.createImageData(O,S);H(E,P),h.putImageData(P,p[b].x,p[b].y)}}catch(t){_.e(t)}finally{_.f()}}else{var M,I=j(t);try{for(I.s();!(M=I.n()).done;){var B=M.value;h.fillText(B,p[B].x,p[B].y+a+.9*o)}}catch(t){I.e(t)}finally{I.f()}}return{xOffset:A,yOffset:g,mapping:p,data:l,width:l.width,height:l.height}}},{key:"_getKey",value:function(){var t=this.props,e=t.fontFamily,n=t.fontWeight,r=t.fontSize,i=t.buffer,o=t.sdf,a=t.radius,s=t.cutoff;return o?"".concat(e," ").concat(n," ").concat(r," ").concat(i," ").concat(a," ").concat(s):"".concat(e," ").concat(n," ").concat(r," ").concat(i)}}]),t}(),X=n(169);function Z(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return J(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return J(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function J(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0?this.props.data[e.index]:null,e}},{key:"_updateFontAtlas",value:function(){var t=this.props,e=t.fontSettings,n=t.fontFamily,r=t.fontWeight,i=this.state,o=i.fontAtlasManager,a=i.characterSet,s=K(K({},e),{},{characterSet:a,fontFamily:n,fontWeight:r});if(!o.mapping)return o.setProps(s),!0;for(var u in s)if(s[u]!==o.props[u])return o.setProps(s),!0;return!1}},{key:"_updateText",value:function(){var t,e,n=this.props,r=n.data,i=n.characterSet,o=null===(t=r.attributes)||void 0===t?void 0:t.getText,a=this.props.getText,s=r.startIndices,u="auto"===i&&new Set;if(o&&s){var c=function(t){var e=t.value,n=t.length,r=t.stride,i=t.offset,o=t.startIndices,a=t.characterSet,s=e.BYTES_PER_ELEMENT,u=r?r/s:1,c=i?i/s:0,l=o[n]||Math.ceil((e.length-c)/u),h=a&&new Set,f=new Array(n),p=e;if(u>1||c>0){p=new(0,e.constructor)(l);for(var d=0;d=3,"Invalid cache limit"),G=new L(t)}(t)}}]),n}(_.a);y()(rt,"defaultProps",nt),y()(rt,"layerName","TextLayer")},function(t,e,n){"use strict";var r=n(3),i=n.n(r),o=n(4),a=n.n(o),s=n(8),u=n.n(s),c=n(5),l=n.n(c),h=n(6),f=n.n(h),p=n(1),d=n.n(p),A=n(0),g=n.n(A),m=n(217),y=n(235),v=n(234),_=n(12),b=n(164),x=n(7),w=n(251),E=n(189),O=n(186),S=n(21),T=n(47),C=n(60),P=n(37);function M(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function I(t){for(var e=1;e=o),a=a.flatMap((function(t){return[t[0],t[1]]})),Object(P.h)(a,P.a.COUNTER_CLOCKWISE));var s=r>0,u=o+1,c=s?3*u+1:o,l=2*Math.PI/o,h=new Uint16Array(s?3*o*2:0),f=new Float32Array(3*c),p=new Float32Array(3*c),d=0;if(s){for(var A=0;A 0.0 && instanceElevations >= 0.0);\n float dotRadius = radius * coverage * shouldRender;\n\n geometry.pickingColor = instancePickingColors;\n\n // project center of column\n vec3 centroidPosition = vec3(instancePositions.xy, instancePositions.z + elevation);\n vec3 centroidPosition64Low = instancePositions64Low;\n vec2 offset = (rotationMatrix * positions.xy * strokeOffsetRatio + offset) * dotRadius;\n if (radiusUnits == UNIT_METERS) {\n offset = project_size(offset);\n }\n vec3 pos = vec3(offset, 0.);\n DECKGL_FILTER_SIZE(pos, geometry);\n\n gl_Position = project_position_to_clipspace(centroidPosition, centroidPosition64Low, pos, geometry.position);\n geometry.normal = project_normal(vec3(rotationMatrix * normals.xy, normals.z));\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n // Light calculations\n if (extruded && !isStroke) {\n#ifdef FLAT_SHADING\n position_commonspace = geometry.position;\n vColor = vec4(color.rgb, color.a * opacity);\n#else\n vec3 lightColor = lighting_getLightColor(color.rgb, project_uCameraPosition, geometry.position.xyz, geometry.normal);\n vColor = vec4(lightColor, color.a * opacity);\n#endif\n } else {\n vColor = vec4(color.rgb, color.a * opacity);\n }\n DECKGL_FILTER_COLOR(vColor, geometry);\n}\n",fs:"#version 300 es\n#define SHADER_NAME column-layer-fragment-shader\n\nprecision highp float;\n\nuniform vec3 project_uCameraPosition;\nuniform bool extruded;\nuniform bool isStroke;\n\nout vec4 fragColor;\n\nin vec4 vColor;\n#ifdef FLAT_SHADING\nin vec4 position_commonspace;\n#endif\n\nvoid main(void) {\n fragColor = vColor;\n#ifdef FLAT_SHADING\n if (extruded && !isStroke && !picking_uActive) {\n vec3 normal = normalize(cross(dFdx(position_commonspace.xyz), dFdy(position_commonspace.xyz)));\n fragColor.rgb = lighting_getLightColor(vColor.rgb, project_uCameraPosition, position_commonspace.xyz, normal);\n }\n#endif\n DECKGL_FILTER_COLOR(fragColor, geometry);\n}\n",defines:r,transpileToGLSL100:e,modules:[m.a,i?y.b:y.a,v.a]})}},{key:"initializeState",value:function(){this.getAttributeManager().addInstanced({instancePositions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:!0,accessor:"getPosition"},instanceElevations:{size:1,transition:!0,accessor:"getElevation"},instanceFillColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,transition:!0,accessor:"getFillColor",defaultValue:j},instanceLineColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,transition:!0,accessor:"getLineColor",defaultValue:j},instanceStrokeWidths:{size:1,accessor:"getLineWidth",transition:!0}})}},{key:"updateState",value:function(t){u()(d()(n.prototype),"updateState",this).call(this,t);var e=t.props,r=t.oldProps,i=t.changeFlags.extensionsChanged||e.flatShading!==r.flatShading;if(i){var o,a=this.context.gl;null===(o=this.state.model)||void 0===o||o.delete(),this.state.model=this._getModel(a),this.getAttributeManager().invalidateAll()}(i||e.diskResolution!==r.diskResolution||e.vertices!==r.vertices||(e.extruded||e.stroked)!==(r.extruded||r.stroked))&&this._updateGeometry(e)}},{key:"getGeometry",value:function(t,e,n){var r=new R({radius:1,height:n?2:0,vertices:e,nradial:t}),i=0;if(e)for(var o=0;o 0.5) {\n float isLine = antialiasing ? \n smoothedge(innerUnitRadius * outerRadiusPixels, distToCenter) :\n step(innerUnitRadius * outerRadiusPixels, distToCenter);\n\n if (filled) {\n gl_FragColor = mix(vFillColor, vLineColor, isLine);\n } else {\n if (isLine == 0.0) {\n discard;\n }\n gl_FragColor = vec4(vLineColor.rgb, vLineColor.a * isLine);\n }\n } else if (filled) {\n gl_FragColor = vFillColor;\n } else {\n discard;\n }\n\n gl_FragColor.a *= inCircle;\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",modules:[m.a,y.a]})}},{key:"initializeState",value:function(){this.getAttributeManager().addInstanced({instancePositions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:!0,accessor:"getPosition"},instanceRadius:{size:1,transition:!0,accessor:"getRadius",defaultValue:1},instanceFillColors:{size:this.props.colorFormat.length,transition:!0,normalized:!0,type:5121,accessor:"getFillColor",defaultValue:[0,0,0,255]},instanceLineColors:{size:this.props.colorFormat.length,transition:!0,normalized:!0,type:5121,accessor:"getLineColor",defaultValue:[0,0,0,255]},instanceLineWidths:{size:1,transition:!0,accessor:"getLineWidth",defaultValue:1}})}},{key:"updateState",value:function(t){if(u()(d()(n.prototype),"updateState",this).call(this,t),t.changeFlags.extensionsChanged){var e,r=this.context.gl;null===(e=this.state.model)||void 0===e||e.delete(),this.state.model=this._getModel(r),this.getAttributeManager().invalidateAll()}}},{key:"draw",value:function(t){var e=t.uniforms,n=this.props,r=n.radiusUnits,i=n.radiusScale,o=n.radiusMinPixels,a=n.radiusMaxPixels,s=n.stroked,u=n.filled,c=n.billboard,l=n.antialiasing,h=n.lineWidthUnits,f=n.lineWidthScale,p=n.lineWidthMinPixels,d=n.lineWidthMaxPixels;this.state.model.setUniforms(e).setUniforms({stroked:s?1:0,filled:u,billboard:c,antialiasing:l,radiusUnits:v.e[r],radiusScale:i,radiusMinPixels:o,radiusMaxPixels:a,lineWidthUnits:v.e[h],lineWidthScale:f,lineWidthMinPixels:p,lineWidthMaxPixels:d}).draw()}},{key:"_getModel",value:function(t){return new b.a(t,E(E({},this.getShaders()),{},{id:this.props.id,geometry:new x.a({drawMode:6,vertexCount:4,attributes:{positions:{size:3,value:new Float32Array([-1,-1,0,1,-1,0,1,1,0,-1,1,0])}}}),isInstanced:!0}))}}]),n}(_.a);g()(C,"defaultProps",T),g()(C,"layerName","ScatterplotLayer")},function(t,e,n){"use strict";var r=n(3),i=n.n(r),o=n(4),a=n.n(o),s=n(8),u=n.n(s),c=n(5),l=n.n(c),h=n(6),f=n.n(h),p=n(1),d=n.n(p),A=n(0),g=n.n(A),m=n(217),y=n(234),v=n(12),_=n(164),b=n(186),x=n(60);function w(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function E(t){for(var e=1;e=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function m(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0}},{key:"delete",value:function(){}},{key:"getData",value:function(){var t=this;return this.isLoaded?this._error?Promise.reject(this._error):this._content:this._loader.then((function(){return t.getData()}))}},{key:"setData",value:function(t,e){var n=this;if(t!==this._data||e){this._data=t;var r=++this._loadCount,i=t;"string"==typeof t&&(i=Object(A.a)(t)),i instanceof Promise?(this.isLoaded=!1,this._loader=i.then((function(t){n._loadCount===r&&(n.isLoaded=!0,n._error=void 0,n._content=t)})).catch((function(t){n._loadCount===r&&(n.isLoaded=!0,n._error=t||!0)}))):(this.isLoaded=!0,this._error=void 0,this._content=t);var o,a=g(this._subscribers);try{for(a.s();!(o=a.n()).done;){o.value.onChange(this.getData())}}catch(t){a.e(t)}finally{a.f()}}}}]),t}(),v=function(){function t(e){var n=e.gl,r=e.protocol;i()(this,t),this.protocol=r||"resource://",this._context={gl:n,resourceManager:this},this._resources={},this._consumers={},this._pruneRequest=null}return a()(t,[{key:"contains",value:function(t){return!!t.startsWith(this.protocol)||t in this._resources}},{key:"add",value:function(t){var e=t.resourceId,n=t.data,r=t.forceUpdate,i=void 0!==r&&r,o=t.persistent,a=void 0===o||o,s=this._resources[e];s?s.setData(n,i):(s=new y(e,n,this._context),this._resources[e]=s),s.persistent=a}},{key:"remove",value:function(t){var e=this._resources[t];e&&(e.delete(),delete this._resources[t])}},{key:"unsubscribe",value:function(t){var e=t.consumerId,n=this._consumers[e];if(n){for(var r in n){var i=n[r],o=this._resources[i.resourceId];o&&o.unsubscribe(i)}delete this._consumers[e],this.prune()}}},{key:"subscribe",value:function(t){var e=t.resourceId,n=t.onChange,r=t.consumerId,i=t.requestId,o=void 0===i?"default":i,a=this._resources,s=this.protocol;e.startsWith(s)&&(a[e=e.replace(s,"")]||this.add({resourceId:e,data:null,persistent:!1}));var u=a[e];if(this._track(r,o,u,n),u)return u.getData()}},{key:"prune",value:function(){var t=this;this._pruneRequest||(this._pruneRequest=setTimeout((function(){return t._prune()}),0))}},{key:"finalize",value:function(){for(var t in this._resources)this._resources[t].delete()}},{key:"_track",value:function(t,e,n,r){var i=this._consumers,o=i[t]=i[t]||{},a=o[e]||{},s=a.resourceId&&this._resources[a.resourceId];s&&(s.unsubscribe(a),this.prune()),n&&(o[e]=a,a.onChange=r,a.resourceId=n.id,n.subscribe(a))}},{key:"_prune",value:function(){this._pruneRequest=null;for(var t=0,e=Object.keys(this._resources);t=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function w(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:{},o=r.deck,a=r.stats,s=r.viewport,l=r.timeline;i()(this,t),u()(this,"_lastRenderedLayers",[]),u()(this,"_needsRedraw",!1),u()(this,"_needsUpdate",!1),u()(this,"_nextLayers",null),u()(this,"_debug",!1),u()(this,"activateViewport",(function(t){Object(f.a)("layerManager.activateViewport",n,t),t&&(n.context.viewport=t)})),this.layers=[],this.resourceManager=new v({gl:e,protocol:"deck://"}),this.context={mousePosition:null,userData:{},layerManager:this,gl:e,deck:o,programManager:e&&Object(b.a)(e),stats:a||new d.a({id:"deck.gl"}),viewport:s||new _.a({id:"DEFAULT-INITIAL-VIEWPORT"}),timeline:l||new c.a,resourceManager:this.resourceManager,onError:void 0},Object.seal(this)}return a()(t,[{key:"finalize",value:function(){this.resourceManager.finalize();var t,e=x(this.layers);try{for(e.s();!(t=e.n()).done;){var n=t.value;this._finalizeLayer(n)}}catch(t){e.e(t)}finally{e.f()}}},{key:"needsRedraw",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{clearRedrawFlags:!1},e=this._needsRedraw;t.clearRedrawFlags&&(this._needsRedraw=!1);var n,r=x(this.layers);try{for(r.s();!(n=r.n()).done;){var i=n.value,o=i.getNeedsRedraw(t);e=e||o}}catch(t){r.e(t)}finally{r.f()}return e}},{key:"needsUpdate",value:function(){return this._nextLayers&&this._nextLayers!==this._lastRenderedLayers?"layers changed":this._needsUpdate}},{key:"setNeedsRedraw",value:function(t){this._needsRedraw=this._needsRedraw||t}},{key:"setNeedsUpdate",value:function(t){this._needsUpdate=this._needsUpdate||t}},{key:"getLayers",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.layerIds;return e?this.layers.filter((function(t){return e.find((function(e){return 0===t.id.indexOf(e)}))})):this.layers}},{key:"setProps",value:function(t){"debug"in t&&(this._debug=t.debug),"userData"in t&&(this.context.userData=t.userData),"layers"in t&&(this._nextLayers=t.layers),"onError"in t&&(this.context.onError=t.onError)}},{key:"setLayers",value:function(t,e){Object(f.a)("layerManager.setLayers",this,e,t),this._lastRenderedLayers=t;var n,r=Object(p.b)(t,Boolean),i=x(r);try{for(i.s();!(n=i.n()).done;){n.value.context=this.context}}catch(t){i.e(t)}finally{i.f()}this._updateLayers(this.layers,r)}},{key:"updateLayers",value:function(){var t=this.needsUpdate();t&&(this.setNeedsRedraw("updating layers: ".concat(t)),this.setLayers(this._nextLayers||this._lastRenderedLayers,t)),this._nextLayers=null}},{key:"_handleError",value:function(t,e,n){n.raiseError(e,"".concat(t," of ").concat(n))}},{key:"_updateLayers",value:function(t,e){var n,r={},i=x(t);try{for(i.s();!(n=i.n()).done;){var o=n.value;r[o.id]?h.a.warn("Multiple old layers with same id ".concat(o.id))():r[o.id]=o}}catch(t){i.e(t)}finally{i.f()}var a=[];this._updateSublayersRecursively(e,r,a),this._finalizeOldLayers(r);for(var s=!1,u=0,c=a;u 0.0) {\n float inFill = alpha;\n float inBorder = smoothstep(outlineBuffer - gamma, outlineBuffer + gamma, distance);\n color = mix(outlineColor, vColor, inFill);\n alpha = inBorder;\n }\n }\n\n // Take the global opacity and the alpha from color into account for the alpha component\n float a = alpha * color.a;\n \n if (a < alphaCutoff) {\n discard;\n }\n\n gl_FragColor = vec4(color.rgb, a * opacity);\n }\n\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n"})}},{key:"initializeState",value:function(){var t=this;u()(d()(n.prototype),"initializeState",this).call(this),this.getAttributeManager().addInstanced({instanceOffsets:{size:2,accessor:"getIconOffsets"},instancePickingColors:{type:5121,size:3,accessor:function(e,n){var r=n.index,i=n.target;return t.encodePickingColor(r,i)}}})}},{key:"updateState",value:function(t){u()(d()(n.prototype),"updateState",this).call(this,t);var e=t.props,r=t.oldProps,i=e.outlineColor;i!==r.outlineColor&&((i=i.map((function(t){return t/255})))[3]=Number.isFinite(i[3])?i[3]:1,this.setState({outlineColor:i})),!e.sdf&&e.outlineWidth&&m.a.warn("".concat(this.id,": fontSettings.sdf is required to render outline"))()}},{key:"draw",value:function(t){var e=this.props,r=e.sdf,i=e.smoothing,o=e.outlineWidth,a=this.state.outlineColor,s=o?Math.max(i,.75*(1-o)):-1;(t.uniforms=_(_({},t.uniforms),{},{buffer:.75,outlineBuffer:s,gamma:i,sdf:Boolean(r),outlineColor:a}),u()(d()(n.prototype),"draw",this).call(this,t),r&&o)&&(this.state.iconManager.getTexture()&&this.state.model.draw({uniforms:{outlineBuffer:.75}}))}},{key:"getInstanceOffset",value:function(t){var e=this;return t?Array.from(t).flatMap((function(t){return u()(d()(n.prototype),"getInstanceOffset",e).call(e,t)})):x}},{key:"getInstanceColorMode",value:function(t){return 1}},{key:"getInstanceIconFrame",value:function(t){var e=this;return t?Array.from(t).flatMap((function(t){return u()(d()(n.prototype),"getInstanceIconFrame",e).call(e,t)})):x}}]),n}(y.a);g()(w,"defaultProps",{getIconOffsets:{type:"accessor",value:function(t){return t.offsets}},alphaCutoff:.001,smoothing:.1,outlineWidth:0,outlineColor:{type:"color",value:[0,0,0,255]}}),g()(w,"layerName","MultiIconLayer")},function(t,e,n){"use strict";var r=n(0),i=n.n(r),o=n(3),a=n.n(o),s=n(4),u=n.n(s),c=n(32),l=n(5),h=n.n(l),f=n(6),p=n.n(f),d=n(1),A=n.n(d),g=n(12);function m(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=A()(t);if(e){var i=A()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return p()(this,n)}}var y=function(t){h()(n,t);var e=m(n);function n(){return a()(this,n),e.apply(this,arguments)}return u()(n,[{key:"shouldDrawLayer",value:function(t){return t.props.operation===g.c.DRAW}}]),n}(n(73).a),v=n(180),_=n(74);function b(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return x(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return x(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function x(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:{clearRedrawFlags:!1},e=this._needsRedraw;return t.clearRedrawFlags&&(this._needsRedraw=!1),e}},{key:"finalize",value:function(){var t,e=this.renderBuffers,n=b(e);try{for(n.s();!(t=n.n()).done;){t.value.delete()}}catch(t){n.e(t)}finally{n.f()}e.length=0}},{key:"_preRender",value:function(t,e){var n,r=null,i=b(t);try{for(i.s();!(n=i.n()).done;){var o=n.value;o.preRender(this.gl,e),o.postRender&&(r=o)}}catch(t){i.e(t)}finally{i.f()}r&&this._resizeRenderBuffers(),this.lastPostProcessEffect=r}},{key:"_resizeRenderBuffers",value:function(){var t=this.renderBuffers;0===t.length&&t.push(new _.a(this.gl),new _.a(this.gl));var e,n=b(t);try{for(n.s();!(e=n.n()).done;){e.value.resize()}}catch(t){n.e(t)}finally{n.f()}}},{key:"_postRender",value:function(t,e){var n,r=this.renderBuffers,i={inputBuffer:r[0],swapBuffer:r[1],target:null},o=b(t);try{for(o.s();!(n=o.n()).done;){var a=n.value;if(a.postRender){if(a===this.lastPostProcessEffect){i.target=e.target,a.postRender(this.gl,i);break}var s=a.postRender(this.gl,i);i.inputBuffer=s,i.swapBuffer=s===r[0]?r[1]:r[0]}}}catch(t){o.e(t)}finally{o.f()}}}]),t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var r=n(28),i=n.n(r),o=n(0),a=n.n(o),s=n(3),u=n.n(s),c=n(4),l=n.n(c);function h(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function f(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:"Transport";u()(this,t),this.name=e,this._messageQueue=[],this.userData={}}return l()(t,[{key:"getRootDOMElement",value:function(){return"undefined"!=typeof document?document.body:null}},{key:"sendJSONMessage",value:function(){console.error("Back-channel not implemented for this transport")}},{key:"sendBinaryMessage",value:function(){console.error("Back-channel not implemented for this transport")}},{key:"_initialize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=f({transport:this},t);p.onInitialize(e)}},{key:"_finalize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=f({transport:this},t);p.onFinalize(e),this._destroyed=!0}},{key:"_messageReceived",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t=f({transport:this},t),console.debug("Delivering transport message",t),p.onMessage(t)}}],[{key:"setCallbacks",value:function(t){var e=t.onInitialize,n=t.onFinalize,r=t.onMessage;e&&(p.onInitialize=e),n&&(p.onFinalize=n),r&&(p.onMessage=r)}},{key:"_stringifyJSONSafe",value:function(t){var e=new Set;return JSON.stringify(t,(function(t,n){if("object"===i()(n)&&null!==n){if(e.has(n))try{return JSON.parse(JSON.stringify(n))}catch(t){return}e.add(n)}return n}))}}]),t}()},function(t,e,n){var r=n(214);t.exports=function(t,e,n){return(e=r(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){"use strict";(function(t){function r(e){if("undefined"!=typeof window&&"object"==typeof window.process&&"renderer"===window.process.type)return!0;if(void 0!==t&&"object"==typeof t.versions&&Boolean(t.versions.electron))return!0;const n="object"==typeof navigator&&"string"==typeof navigator.userAgent&&navigator.userAgent,r=e||n;return!!(r&&r.indexOf("Electron")>=0)}n.d(e,"a",(function(){return r}))}).call(this,n(44))},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(7);function i(t,e,n,i){const o="See luma.gl ".concat(n," Upgrade Guide at https://luma.gl/docs/upgrade-guide"),a=Object.getPrototypeOf(t);i.forEach(t=>{a.methodName||(a[t]=()=>{throw r.k.removed("Calling removed method ".concat(e,".").concat(t,": "),o)(),new Error(t)})})}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(122),i=n(23),o=n(13);class a extends r.a{toString(){let t="[";if(o.b.printRowMajor){t+="row-major:";for(let e=0;e1&&void 0!==arguments[1]?arguments[1]:{id:"pass"};a()(this,t);var r=n.id;this.id=r,this.gl=e,this.props=l({},n)}return u()(t,[{key:"setProps",value:function(t){Object.assign(this.props,t)}},{key:"render",value:function(t){}},{key:"cleanup",value:function(){}}]),t}()},function(t,e,n){"use strict";function r(t,e=!0,n){const o=n||new Set;if(t){if(i(t))o.add(t);else if(i(t.buffer))o.add(t.buffer);else if(ArrayBuffer.isView(t));else if(e&&"object"==typeof t)for(const n in t)r(t[n],e,o)}else;return void 0===n?Array.from(o):[]}function i(t){return!!t&&(t instanceof ArrayBuffer||("undefined"!=typeof MessagePort&&t instanceof MessagePort||("undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas)))}function o(t){if(null===t)return{};const e=Object.assign({},t);return Object.keys(e).forEach(n=>{"object"!=typeof t[n]||ArrayBuffer.isView(t[n])?"function"==typeof e[n]||e[n]instanceof RegExp?e[n]={}:e[n]=t[n]:e[n]=o(t[n])}),e}n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return o}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return T}));var r=n(3),i=n.n(r),o=n(4),a=n.n(o),s=n(27),u=n.n(s),c=n(8),l=n.n(c),h=n(5),f=n.n(h),p=n(6),d=n.n(p),A=n(1),g=n.n(A),m=n(0),y=n.n(m),v=n(73),_=n(7),b=n(12),x=n(21);function w(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function E(t){for(var e=1;e=24&&2303741511===e.getUint32(0,!1)))return null;return{mimeType:"image/png",width:e.getUint32(16,!1),height:e.getUint32(20,!1)}}(e)||function(t){const e=i(t);if(!(e.byteLength>=3&&65496===e.getUint16(0,!1)&&255===e.getUint8(2)))return null;const{tableMarkers:n,sofMarkers:r}=function(){const t=new Set([65499,65476,65484,65501,65534]);for(let e=65504;e<65520;++e)t.add(e);const e=new Set([65472,65473,65474,65475,65477,65478,65479,65481,65482,65483,65485,65486,65487,65502]);return{tableMarkers:t,sofMarkers:e}}();let o=2;for(;o+9=10&&1195984440===e.getUint32(0,!1)))return null;return{mimeType:"image/gif",width:e.getUint16(6,!0),height:e.getUint16(8,!0)}}(e)||function(t){const e=i(t);if(!(e.byteLength>=14&&16973===e.getUint16(0,!1)&&e.getUint32(2,!0)===e.byteLength))return null;return{mimeType:"image/bmp",width:e.getUint32(18,!0),height:e.getUint32(22,!0)}}(e)}function i(t){if(t instanceof DataView)return t;if(ArrayBuffer.isView(t))return new DataView(t.buffer);if(t instanceof ArrayBuffer)return new DataView(t);throw new Error("toDataView")}},function(t,e,n){"use strict";function r(t){for(var e=t.data,n=t.getIndex,r=t.dataRange,i=t.replace,o=r.startRow,a=void 0===o?0:o,s=r.endRow,u=void 0===s?1/0:s,c=e.length,l=c,h=c,f=0;ff&&p>=a&&(l=f),p>=u){h=f;break}}for(var d=l,A=h-l!==i.length?e.slice(h):void 0,g=0;g=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}},function(t,e,n){"use strict";function r(t){var e=document.createElement("link");e.type="text/css",e.rel="stylesheet",e.href=t,document.getElementsByTagName("head")[0].appendChild(e)}function i(t,e){var n=document.createElement("div");return n.style.width=Number.isFinite(t)?"".concat(t,"px"):t,n.style.height="".concat(e,"px"),n.style.position="relative",n}n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";const r={name:"Draco",id:"draco",module:"draco",shapes:["mesh"],version:"3.2.10",worker:!0,extensions:["drc"],mimeTypes:["application/octet-stream"],binary:!0,tests:["DRACO"],options:{draco:{decoderType:"object"==typeof WebAssembly?"wasm":"js",libraryPath:"libs/",extraAttributes:{},attributeNameEntry:void 0}}};var i=n(2);class o{constructor(t,e){Object(i.a)(this,"fields",void 0),Object(i.a)(this,"metadata",void 0),function(t,e){if(!t)throw new Error(e||"loader assertion failed.")}(Array.isArray(t)),function(t){const e={};for(const n of t)e[n.name]&&console.warn("Schema: duplicated field name",n.name,n),e[n.name]=!0}(t),this.fields=t,this.metadata=e||new Map}compareTo(t){if(this.metadata!==t.metadata)return!1;if(this.fields.length!==t.fields.length)return!1;for(let e=0;ee[t.name]);return new o(n,this.metadata)}selectAt(...t){const e=t.map(t=>this.fields[t]).filter(Boolean);return new o(e,this.metadata)}assign(t){let e,n=this.metadata;if(t instanceof o){const r=t;e=r.fields,n=a(a(new Map,this.metadata),r.metadata)}else e=t;const r=Object.create(null);for(const t of this.fields)r[t.name]=t;for(const t of e)r[t.name]=t;const i=Object.values(r);return new o(i,n)}}function a(t,e){return new Map([...t||new Map,...e||new Map])}class s{constructor(t,e,n=!1,r=new Map){Object(i.a)(this,"name",void 0),Object(i.a)(this,"type",void 0),Object(i.a)(this,"nullable",void 0),Object(i.a)(this,"metadata",void 0),this.name=t,this.type=e,this.nullable=n,this.metadata=r}get typeId(){return this.type&&this.type.typeId}clone(){return new s(this.name,this.type,this.nullable,this.metadata)}compareTo(t){return this.name===t.name&&this.type===t.type&&this.nullable===t.nullable&&this.metadata===t.metadata}toString(){return"".concat(this.type).concat(this.nullable?", nullable":"").concat(this.metadata?", metadata: ".concat(this.metadata):"")}}let u,c,l,h,f,p,d,A,g;!function(t){t[t.NONE=0]="NONE",t[t.Null=1]="Null",t[t.Int=2]="Int",t[t.Float=3]="Float",t[t.Binary=4]="Binary",t[t.Utf8=5]="Utf8",t[t.Bool=6]="Bool",t[t.Decimal=7]="Decimal",t[t.Date=8]="Date",t[t.Time=9]="Time",t[t.Timestamp=10]="Timestamp",t[t.Interval=11]="Interval",t[t.List=12]="List",t[t.Struct=13]="Struct",t[t.Union=14]="Union",t[t.FixedSizeBinary=15]="FixedSizeBinary",t[t.FixedSizeList=16]="FixedSizeList",t[t.Map=17]="Map",t[t.Dictionary=-1]="Dictionary",t[t.Int8=-2]="Int8",t[t.Int16=-3]="Int16",t[t.Int32=-4]="Int32",t[t.Int64=-5]="Int64",t[t.Uint8=-6]="Uint8",t[t.Uint16=-7]="Uint16",t[t.Uint32=-8]="Uint32",t[t.Uint64=-9]="Uint64",t[t.Float16=-10]="Float16",t[t.Float32=-11]="Float32",t[t.Float64=-12]="Float64",t[t.DateDay=-13]="DateDay",t[t.DateMillisecond=-14]="DateMillisecond",t[t.TimestampSecond=-15]="TimestampSecond",t[t.TimestampMillisecond=-16]="TimestampMillisecond",t[t.TimestampMicrosecond=-17]="TimestampMicrosecond",t[t.TimestampNanosecond=-18]="TimestampNanosecond",t[t.TimeSecond=-19]="TimeSecond",t[t.TimeMillisecond=-20]="TimeMillisecond",t[t.TimeMicrosecond=-21]="TimeMicrosecond",t[t.TimeNanosecond=-22]="TimeNanosecond",t[t.DenseUnion=-23]="DenseUnion",t[t.SparseUnion=-24]="SparseUnion",t[t.IntervalDayTime=-25]="IntervalDayTime",t[t.IntervalYearMonth=-26]="IntervalYearMonth"}(u||(u={}));class m{static isNull(t){return t&&t.typeId===u.Null}static isInt(t){return t&&t.typeId===u.Int}static isFloat(t){return t&&t.typeId===u.Float}static isBinary(t){return t&&t.typeId===u.Binary}static isUtf8(t){return t&&t.typeId===u.Utf8}static isBool(t){return t&&t.typeId===u.Bool}static isDecimal(t){return t&&t.typeId===u.Decimal}static isDate(t){return t&&t.typeId===u.Date}static isTime(t){return t&&t.typeId===u.Time}static isTimestamp(t){return t&&t.typeId===u.Timestamp}static isInterval(t){return t&&t.typeId===u.Interval}static isList(t){return t&&t.typeId===u.List}static isStruct(t){return t&&t.typeId===u.Struct}static isUnion(t){return t&&t.typeId===u.Union}static isFixedSizeBinary(t){return t&&t.typeId===u.FixedSizeBinary}static isFixedSizeList(t){return t&&t.typeId===u.FixedSizeList}static isMap(t){return t&&t.typeId===u.Map}static isDictionary(t){return t&&t.typeId===u.Dictionary}get typeId(){return u.NONE}compareTo(t){return this===t}}Symbol.toStringTag;Symbol.toStringTag;c=Symbol.toStringTag;class y extends m{constructor(t,e){super(),Object(i.a)(this,"isSigned",void 0),Object(i.a)(this,"bitWidth",void 0),this.isSigned=t,this.bitWidth=e}get typeId(){return u.Int}get[c](){return"Int"}toString(){return"".concat(this.isSigned?"I":"Ui","nt").concat(this.bitWidth)}}class v extends y{constructor(){super(!0,8)}}class _ extends y{constructor(){super(!0,16)}}class b extends y{constructor(){super(!0,32)}}class x extends y{constructor(){super(!1,8)}}class w extends y{constructor(){super(!1,16)}}class E extends y{constructor(){super(!1,32)}}const O=32,S=64;l=Symbol.toStringTag;class T extends m{constructor(t){super(),Object(i.a)(this,"precision",void 0),this.precision=t}get typeId(){return u.Float}get[l](){return"Float"}toString(){return"Float".concat(this.precision)}}class C extends T{constructor(){super(O)}}class P extends T{constructor(){super(S)}}Symbol.toStringTag;Symbol.toStringTag;h=Symbol.toStringTag;f=Symbol.toStringTag;p=Symbol.toStringTag;d=Symbol.toStringTag;A=Symbol.toStringTag;class M extends m{constructor(t,e){super(),Object(i.a)(this,"listSize",void 0),Object(i.a)(this,"children",void 0),this.listSize=t,this.children=[e]}get typeId(){return u.FixedSizeList}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get[A](){return"FixedSizeList"}toString(){return"FixedSizeList[".concat(this.listSize,"]<").concat(this.valueType,">")}}g=Symbol.toStringTag;function I(t,e,n){const r=function(t){switch(t.constructor){case Int8Array:return new v;case Uint8Array:return new x;case Int16Array:return new _;case Uint16Array:return new w;case Int32Array:return new b;case Uint32Array:return new E;case Float32Array:return new C;case Float64Array:return new P;default:throw new Error("array type not supported")}}(e.value),i=n||function(t){const e=new Map;"byteOffset"in t&&e.set("byteOffset",t.byteOffset.toString(10));"byteStride"in t&&e.set("byteStride",t.byteStride.toString(10));"normalized"in t&&e.set("normalized",t.normalized.toString());return e}(e);return new s(t,new M(e.size,new s("value",r)),!1,i)}function B(t,e,n){return I(t,e,n?R(n.metadata):void 0)}function R(t){const e=new Map;for(const n in t)e.set("".concat(n,".string"),JSON.stringify(t[n]));return e}const k={POSITION:"POSITION",NORMAL:"NORMAL",COLOR:"COLOR_0",TEX_COORD:"TEXCOORD_0"},D={1:Int8Array,2:Uint8Array,3:Int16Array,4:Uint16Array,5:Int32Array,6:Uint32Array,9:Float32Array};class L{constructor(t){Object(i.a)(this,"draco",void 0),Object(i.a)(this,"decoder",void 0),Object(i.a)(this,"metadataQuerier",void 0),this.draco=t,this.decoder=new this.draco.Decoder,this.metadataQuerier=new this.draco.MetadataQuerier}destroy(){this.draco.destroy(this.decoder),this.draco.destroy(this.metadataQuerier)}parseSync(t,e={}){const n=new this.draco.DecoderBuffer;n.Init(new Int8Array(t),t.byteLength),this._disableAttributeTransforms(e);const r=this.decoder.GetEncodedGeometryType(n),i=r===this.draco.TRIANGULAR_MESH?new this.draco.Mesh:new this.draco.PointCloud;try{let t;switch(r){case this.draco.TRIANGULAR_MESH:t=this.decoder.DecodeBufferToMesh(n,i);break;case this.draco.POINT_CLOUD:t=this.decoder.DecodeBufferToPointCloud(n,i);break;default:throw new Error("DRACO: Unknown geometry type.")}if(!t.ok()||!i.ptr){const e="DRACO decompression failed: ".concat(t.error_msg());throw new Error(e)}const a=this._getDracoLoaderData(i,r,e),s=this._getMeshData(i,a,e),u=function(t){let e=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0;const s=t.POSITION?t.POSITION.value:[],u=s&&s.length;for(let t=0;ti?u:i,o=c>o?c:o,a=l>a?l:a}return[[e,n,r],[i,o,a]]}(s.attributes),c=function(t,e,n){const r=R(e.metadata),i=[],a=function(t){const e={};for(const n in t){const r=t[n];e[r.name||"undefined"]=r}return e}(e.attributes);for(const e in t){const n=B(e,t[e],a[e]);i.push(n)}if(n){const t=B("indices",n);i.push(t)}return new o(i,r)}(s.attributes,a,s.indices);return{loader:"draco",loaderData:a,header:{vertexCount:i.num_points(),boundingBox:u},...s,schema:c}}finally{this.draco.destroy(n),i&&this.draco.destroy(i)}}_getDracoLoaderData(t,e,n){const r=this._getTopLevelMetadata(t),i=this._getDracoAttributes(t,n);return{geometry_type:e,num_attributes:t.num_attributes(),num_points:t.num_points(),num_faces:t instanceof this.draco.Mesh?t.num_faces():0,metadata:r,attributes:i}}_getDracoAttributes(t,e){const n={};for(let r=0;rthis.decoder[t]).includes(r)){const e=new this.draco.AttributeQuantizationTransform;try{if(e.InitFromAttribute(t))return{quantization_bits:e.quantization_bits(),range:e.range(),min_values:new Float32Array([1,2,3]).map(t=>e.min_value(t))}}finally{this.draco.destroy(e)}}return null}_getOctahedronTransform(t,e){const{octahedronAttributes:n=[]}=e,r=t.attribute_type();if(n.map(t=>this.decoder[t]).includes(r)){const e=new this.draco.AttributeQuantizationTransform;try{if(e.InitFromAttribute(t))return{quantization_bits:e.quantization_bits()}}finally{this.draco.destroy(e)}}return null}}var j=n(317);const F="https://www.gstatic.com/draco/versioned/decoders/".concat("1.4.1","/draco_decoder.js"),z="https://www.gstatic.com/draco/versioned/decoders/".concat("1.4.1","/draco_wasm_wrapper.js"),U="https://www.gstatic.com/draco/versioned/decoders/".concat("1.4.1","/draco_decoder.wasm");"https://raw.githubusercontent.com/google/draco/".concat("1.4.1","/javascript/draco_encoder.js");let N;async function G(t){const e=t.modules||{};return N=e.draco3d?N||e.draco3d.createDecoderModule({}).then(t=>({draco:t})):N||async function(t){let e,n;switch(t.draco&&t.draco.decoderType){case"js":e=await Object(j.a)(F,"draco",t);break;case"wasm":default:[e,n]=await Promise.all([await Object(j.a)(z,"draco",t),await Object(j.a)(U,"draco",t)])}return e=e||globalThis.DracoDecoderModule,await function(t,e){const n={};e&&(n.wasmBinary=e);return new Promise(e=>{t({...n,onModuleLoaded:t=>e({draco:t})})})}(e,n)}(t),await N}var V=n(49);n.d(e,"a",(function(){return H}));V.b;const H={...r,parse:async function(t,e){const{draco:n}=await G(e),r=new L(n);try{return r.parseSync(t,null==e?void 0:e.draco)}finally{r.destroy()}}}},function(t,e,n){"use strict";var r=n(7),i=n(204),o=n(47),a=n(10),s=n(188),u=n(321),c=n(63),l=n(33),h=n(38);let f=null;function p(t,e){var n;return new t((n=t.BYTES_PER_ELEMENT*e,(!f||f.byteLength1&&void 0!==arguments[1]?arguments[1]:{}).constantAttributeZero||(Object(r.j)(t)||"Chrome"===Object(d.a)())}static getDefaultArray(t){return t.luma=t.luma||{},t.luma.defaultVertexArray||(t.luma.defaultVertexArray=new A(t,{handle:null,isDefaultArray:!0})),t.luma.defaultVertexArray}static getMaxAttributes(t){return A.MAX_ATTRIBUTES=A.MAX_ATTRIBUTES||t.getParameter(34921),A.MAX_ATTRIBUTES}static setConstant(t,e,n){switch(n.constructor){case Float32Array:A._setConstantFloatArray(t,e,n);break;case Int32Array:A._setConstantIntArray(t,e,n);break;case Uint32Array:A._setConstantUintArray(t,e,n);break;default:Object(a.a)(!1)}}constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e.id||e.program&&e.program.id;super(t,Object.assign({},e,{id:n})),this.buffer=null,this.bufferValue=null,this.isDefaultArray=e.isDefaultArray||!1,this.gl2=t,this.initialize(e),Object.seal(this)}delete(){return super.delete(),this.buffer&&this.buffer.delete(),this}get MAX_ATTRIBUTES(){return A.getMaxAttributes(this.gl)}initialize(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.setProps(t)}setProps(t){return this}setElementBuffer(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return Object(a.a)(!t||34963===t.target,"elements must be GL.ELEMENT_ARRAY_BUFFER"),this.bind(()=>{this.gl.bindBuffer(34963,t?t.handle:null)}),this}setBuffer(t,e,n){if(34963===e.target)return this.setElementBuffer(e,n);const{size:i,type:o,stride:s,offset:u,normalized:c,integer:l,divisor:h}=n,{gl:f,gl2:p}=this;return t=Number(t),this.bind(()=>{f.bindBuffer(34962,e.handle),l?(Object(a.a)(Object(r.j)(f)),p.vertexAttribIPointer(t,i,o,s,u)):f.vertexAttribPointer(t,i,o,c,s,u),f.enableVertexAttribArray(t),p.vertexAttribDivisor(t,h||0)}),this}enable(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return!e&&0===t&&!A.isSupported(this.gl,{constantAttributeZero:!0})||(t=Number(t),this.bind(()=>e?this.gl.enableVertexAttribArray(t):this.gl.disableVertexAttribArray(t))),this}getConstantBuffer(t,e){const n=this._normalizeConstantArrayValue(e),r=n.byteLength*t,i=n.length*t;let o=!this.buffer;if(this.buffer=this.buffer||new l.a(this.gl,r),o=o||this.buffer.reallocate(r),o=o||!this._compareConstantArrayValues(n,this.bufferValue),o){const t=p(e.constructor,i);!function(t){let{target:e,source:n,start:r=0,count:i=1}=t;const o=n.length,a=i*o;let s=0;for(let t=r;s{switch(t){case 34373:return this.gl.getVertexAttribOffset(n,t);default:return this.gl.getVertexAttrib(n,t)}})}}var g=n(176);const m=/^(.+)__LOCATION_([0-9]+)$/,y=["setBuffers","setGeneric","clearBindings","setLocations","setGenericValues","setDivisor","enable","disable"];class v{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e.id||e.program&&e.program.id;this.id=n,this.gl=t,this.configuration=null,this.elements=null,this.elementsAccessor=null,this.values=null,this.accessors=null,this.unused=null,this.drawParams=null,this.buffer=null,this.attributes={},this.vertexArrayObject=new A(t),Object(g.a)(this,"VertexArray","v6.0",y),this.initialize(e),Object.seal(this)}delete(){this.buffer&&this.buffer.delete(),this.vertexArrayObject.delete()}initialize(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.reset(),this.configuration=null,this.bindOnUse=!1,this.setProps(t)}reset(){this.elements=null,this.elementsAccessor=null;const{MAX_ATTRIBUTES:t}=this.vertexArrayObject;return this.values=new Array(t).fill(null),this.accessors=new Array(t).fill(null),this.unused={},this.drawParams=null,this}setProps(t){return"program"in t&&(this.configuration=t.program&&t.program.configuration),"configuration"in t&&(this.configuration=t.configuration),"attributes"in t&&this.setAttributes(t.attributes),"elements"in t&&this.setElementBuffer(t.elements),"bindOnUse"in t&&(t=t.bindOnUse),this}clearDrawParams(){this.drawParams=null}getDrawParams(){return this.drawParams=this.drawParams||this._updateDrawParams(),this.drawParams}setAttributes(t){return Object.assign(this.attributes,t),this.vertexArrayObject.bind(()=>{for(const e in t){const n=t[e];this._setAttribute(e,n)}this.gl.bindBuffer(34962,null)}),this}setElementBuffer(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.elements=t,this.elementsAccessor=e,this.clearDrawParams(),this.vertexArrayObject.setElementBuffer(t,e),this}setBuffer(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(34963===e.target)return this.setElementBuffer(e,n);const{location:r,accessor:i}=this._resolveLocationAndAccessor(t,e,e.accessor,n);return r>=0&&(this.values[r]=e,this.accessors[r]=i,this.clearDrawParams(),this.vertexArrayObject.setBuffer(r,e,i)),this}setConstant(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{location:r,accessor:i}=this._resolveLocationAndAccessor(t,e,Object.assign({size:e.length},n));return r>=0&&(e=this.vertexArrayObject._normalizeConstantArrayValue(e),this.values[r]=e,this.accessors[r]=i,this.clearDrawParams(),this.vertexArrayObject.enable(r,!1)),this}unbindBuffers(){return this.vertexArrayObject.bind(()=>{this.elements&&this.vertexArrayObject.setElementBuffer(null),this.buffer=this.buffer||new l.a(this.gl,{accessor:{size:4}});for(let t=0;t{this.elements&&this.setElementBuffer(this.elements);for(let t=0;t{this._setConstantAttributes(t,e),r=n()}),r}_resolveLocationAndAccessor(t,e,n,i){const o={location:-1,accessor:null},{location:s,name:u}=this._getAttributeIndex(t);if(!Number.isFinite(s)||s<0)return this.unused[t]=e,r.k.once(3,()=>"unused value ".concat(t," in ").concat(this.id))(),o;const l=this._getAttributeInfo(u||s);if(!l)return o;const h=this.accessors[s]||{},f=c.a.resolve(l.accessor,h,n,i),{size:p,type:d}=f;return Object(a.a)(Number.isFinite(p)&&Number.isFinite(d)),{location:s,accessor:f}}_getAttributeInfo(t){return this.configuration&&this.configuration.getAttributeInfo(t)}_getAttributeIndex(t){const e=Number(t);if(Number.isFinite(e))return{location:e};const n=m.exec(t),r=n?n[1]:t,i=n?Number(n[2]):0;return this.configuration?{location:this.configuration.getAttributeLocation(r)+i,name:r}:{location:-1}}_setAttribute(t,e){if(e instanceof l.a)this.setBuffer(t,e);else if(Array.isArray(e)&&e.length&&e[0]instanceof l.a){const n=e[0],r=e[1];this.setBuffer(t,n,r)}else if(ArrayBuffer.isView(e)||Array.isArray(e)){const n=e;this.setConstant(t,n)}else{if(!(e.buffer instanceof l.a))throw new Error("VertexArray: attributes must be Buffers or constants (i.e. typed array)");{const n=e;this.setBuffer(t,n.buffer,n)}}}_setConstantAttributes(t,e){const n=Math.max(0|t,0|e);let r=this.values[0];ArrayBuffer.isView(r)&&this._setConstantAttributeZero(r,n);for(let t=1;t0;if(t.isInstanced=t.isInstanced||o,n instanceof l.a){const e=n;if(o){const n=e.getVertexCount(r);t.instanceCount=Math.min(t.instanceCount,n)}else{const n=e.getVertexCount(r);t.vertexCount=Math.min(t.vertexCount,n)}}}setElements(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.k.deprecated("setElements","setElementBuffer")(),this.setElementBuffer(t,e)}}var _=n(314),b=n(48),x=n(81);function w(t,e){const{maxElts:n=16,size:r=1}=e;let i="[";for(let o=0;o0&&(i+=",".concat(o%r==0?" ":"")),i+=E(t[o],e);const o=t.length>n?"...":"]";return"".concat(i).concat(o)}function E(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=1e-16,{isInteger:r=!1}=e;if(Array.isArray(t)||ArrayBuffer.isView(t))return w(t,e);if(!Number.isFinite(t))return String(t);if(Math.abs(t)100&&Math.abs(t)<1e4)return t.toFixed(0);const i=t.toPrecision(2),o=i.indexOf(".0");return o===i.length-2?i.slice(0,-1):i}function O(t,e,n,r){const{gl:i}=t;if(!e)return{[r]:"null","Format ":"N/A"};let o,a,s,u="NOT PROVIDED",c=1,h=0,f=0;if(n&&(u=n.type,c=n.size,u=String(u).replace("Array",""),o=-1!==u.indexOf("nt")),e instanceof l.a){const t=e,{data:l,changed:p}=t.getDebugData();let d;if(a=p?"*":"",s=l,f=t.byteLength,h=f/l.BYTES_PER_ELEMENT/c,n){const t=n.divisor>0;d="".concat(t?"I ":"P "," ").concat(h," (x").concat(c,"=").concat(f," bytes ").concat(Object(b.a)(i,u),")")}else o=!0,d="".concat(f," bytes");return{[r]:"".concat(a).concat(E(s,{size:c,isInteger:o})),"Format ":d}}return s=e,c=e.length,u=String(e.constructor.name).replace("Array",""),o=-1!==u.indexOf("nt"),{[r]:"".concat(E(s,{size:c,isInteger:o})," (constant)"),"Format ":"".concat(c,"x").concat(u," (constant)")}}function S(t,e){const{type:n,size:r}=e,i=Object(x.b)(n,r);return i?"".concat(t," (").concat(i.name,")"):t}function T(t){let{header:e="Uniforms",program:n,uniforms:r,undefinedOnly:i=!1}=t;Object(a.a)(n);const o=n._uniformSetters,s={},u=Object.keys(o).sort();let c=0;for(const t of u)t.match(".*_.*")||t.match(".*Matrix")||C({table:s,header:e,uniforms:r,uniformName:t,undefinedOnly:i})&&c++;for(const t of u)t.match(".*Matrix")&&C({table:s,header:e,uniforms:r,uniformName:t,undefinedOnly:i})&&c++;for(const t of u)s[t]||C({table:s,header:e,uniforms:r,uniformName:t,undefinedOnly:i})&&c++;let l=0;const h={};if(!i)for(const t in r){const n=r[t];s[t]||(l++,h[t]={Type:"NOT USED: ".concat(n),[e]:E(n)})}return{table:s,count:c,unusedTable:h,unusedCount:l}}function C(t){let{table:e,header:n,uniforms:r,uniformName:i,undefinedOnly:o}=t;const a=r[i],s=function(t){return null!=t}(a);return(!o||!s)&&(e[i]={[n]:s?E(a):"N/A","Uniform Type":s?a:"NOT PROVIDED"},!0)}function P(t){const{type:e,size:n}=t.accessor,r=Object(x.b)(e,n);return r?"".concat(r.name," ").concat(t.name):t.name}const M={POSITION:"positions",NORMAL:"normals",COLOR_0:"colors",TEXCOORD_0:"texCoords",TEXCOORD_1:"texCoords1",TEXCOORD_2:"texCoords2"};function I(t,e){const{attributeMap:n=M}=e||{};return n&&n[t]||t}function B(t,e){let n;switch(t){case"texCoords":case"texCoord1":case"texCoord2":case"texCoord3":n="uvs";break;case"vertices":case"positions":case"normals":case"pickingColors":n="vectors"}switch(n){case"vectors":e.size=e.size||3;break;case"uvs":e.size=e.size||2}Object(a.a)(Number.isFinite(e.size),"attribute ".concat(t," needs size"))}n.d(e,"a",(function(){return D}));const R=()=>{},k={};class D{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{id:n=Object(o.c)("model")}=e;Object(a.a)(Object(r.i)(t)),this.id=n,this.gl=t,this.id=e.id||Object(o.c)("Model"),this.lastLogTime=0,this.animated=!1,this.initialize(e)}initialize(t){this.props={},this.programManager=t.programManager||i.a.getDefaultProgramManager(this.gl),this._programManagerState=-1,this._managedProgram=!1;const{program:e=null,vs:n,fs:r,modules:o,defines:s,inject:u,varyings:c,bufferMode:l,transpileToGLSL100:h}=t;this.programProps={program:e,vs:n,fs:r,modules:o,defines:s,inject:u,varyings:c,bufferMode:l,transpileToGLSL100:h},this.program=null,this.vertexArray=null,this._programDirty=!0,this.userData={},this.needsRedraw=!0,this._attributes={},this.attributes={},this.uniforms={},this.pickable=!0,this._checkProgram(),this.setUniforms(Object.assign({},this.getModuleUniforms(t.moduleSettings))),this.drawMode=void 0!==t.drawMode?t.drawMode:4,this.vertexCount=t.vertexCount||0,this.geometryBuffers={},this.isInstanced=t.isInstanced||t.instanced||t.instanceCount>0,this._setModelProps(t),this.geometry={},Object(a.a)(void 0!==this.drawMode&&Number.isFinite(this.vertexCount),"Model needs drawMode and vertexCount")}setProps(t){this._setModelProps(t)}delete(){for(const t in this._attributes)this._attributes[t]!==this.attributes[t]&&this._attributes[t].delete();this._managedProgram&&(this.programManager.release(this.program),this._managedProgram=!1),this.vertexArray.delete(),this._deleteGeometryBuffers()}getDrawMode(){return this.drawMode}getVertexCount(){return this.vertexCount}getInstanceCount(){return this.instanceCount}getAttributes(){return this.attributes}getProgram(){return this.program}setProgram(t){const{program:e,vs:n,fs:r,modules:i,defines:o,inject:a,varyings:s,bufferMode:u,transpileToGLSL100:c}=t;this.programProps={program:e,vs:n,fs:r,modules:i,defines:o,inject:a,varyings:s,bufferMode:u,transpileToGLSL100:c},this._programDirty=!0}getUniforms(){return this.uniforms}setDrawMode(t){return this.drawMode=t,this}setVertexCount(t){return Object(a.a)(Number.isFinite(t)),this.vertexCount=t,this}setInstanceCount(t){return Object(a.a)(Number.isFinite(t)),this.instanceCount=t,this}setGeometry(t){return this.drawMode=t.drawMode,this.vertexCount=t.getVertexCount(),this._deleteGeometryBuffers(),this.geometryBuffers=function(t,e,n){const r={};let i=e.indices;for(const o in e.attributes){const a=e.attributes[o],s=I(o,n);if("indices"===o)i=a;else if(a.constant)r[s]=a.value;else{const e=a.value,n={...a};delete n.value,r[s]=[new l.a(t,e),n],B(o,n)}}if(i){const e=i.value||i;Object(a.a)(e instanceof Uint16Array||e instanceof Uint32Array,'attribute array for "indices" must be of integer type');const n={size:1,isIndexed:void 0===i.isIndexed||i.isIndexed};r.indices=[new l.a(t,{data:e,target:34963}),n]}return r}(this.gl,t),this.vertexArray.setAttributes(this.geometryBuffers),this}setAttributes(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Object(o.a)(t))return this;const e={};for(const n in t){const r=t[n];e[n]=r.getValue?r.getValue():r}return this.vertexArray.setAttributes(e),this}setUniforms(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.assign(this.uniforms,t),this}getModuleUniforms(t){this._checkProgram();const e=this.programManager.getUniforms(this.program);return e?e(t):{}}updateModuleSettings(t){const e=this.getModuleUniforms(t||{});return this.setUniforms(e)}clear(t){return Object(s.a)(this.program.gl,t),this}draw(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._checkProgram();const{moduleSettings:e=null,framebuffer:n,uniforms:i={},attributes:o={},transformFeedback:a=this.transformFeedback,parameters:s={},vertexArray:u=this.vertexArray}=t;let c;this.setAttributes(o),this.updateModuleSettings(e),this.setUniforms(i),r.k.priority>=2&&(c=this._logDrawCallStart(2));const l=this.vertexArray.getDrawParams(),{isIndexed:h=l.isIndexed,indexType:f=l.indexType,indexOffset:p=l.indexOffset,vertexArrayInstanced:d=l.isInstanced}=this.props;d&&!this.isInstanced&&r.k.warn("Found instanced attributes on non-instanced model",this.id)();const{isInstanced:A,instanceCount:g}=this,{onBeforeRender:m=R,onAfterRender:y=R}=this.props;m(),this.program.setUniforms(this.uniforms);const v=this.program.draw(Object.assign(k,t,{logPriority:c,uniforms:null,framebuffer:n,parameters:s,drawMode:this.getDrawMode(),vertexCount:this.getVertexCount(),vertexArray:u,transformFeedback:a,isIndexed:h,indexType:f,isInstanced:A,instanceCount:g,offset:h?p:0}));return y(),r.k.priority>=2&&this._logDrawCallEnd(c,u,n),v}transform(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{discard:e=!0,feedbackBuffers:n,unbindModels:r=[]}=t;let{parameters:i}=t;n&&this._setFeedbackBuffers(n),e&&(i=Object.assign({},i,{35977:e})),r.forEach(t=>t.vertexArray.unbindBuffers());try{this.draw(Object.assign({},t,{parameters:i}))}finally{r.forEach(t=>t.vertexArray.bindBuffers())}return this}render(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r.k.warn("Model.render() is deprecated. Use Model.setUniforms() and Model.draw()")(),this.setUniforms(t).draw()}_setModelProps(t){Object.assign(this.props,t),"uniforms"in t&&this.setUniforms(t.uniforms),"pickable"in t&&(this.pickable=t.pickable),"instanceCount"in t&&(this.instanceCount=t.instanceCount),"geometry"in t&&this.setGeometry(t.geometry),"attributes"in t&&this.setAttributes(t.attributes),"_feedbackBuffers"in t&&this._setFeedbackBuffers(t._feedbackBuffers)}_checkProgram(){if(!(this._programDirty||this.programManager.stateHash!==this._programManagerState))return;let{program:t}=this.programProps;if(t)this._managedProgram=!1;else{const{vs:e,fs:n,modules:r,inject:i,defines:o,varyings:a,bufferMode:s,transpileToGLSL100:u}=this.programProps;t=this.programManager.get({vs:e,fs:n,modules:r,inject:i,defines:o,varyings:a,bufferMode:s,transpileToGLSL100:u}),this.program&&this._managedProgram&&this.programManager.release(this.program),this._programManagerState=this.programManager.stateHash,this._managedProgram=!0}Object(a.a)(t instanceof u.a,"Model needs a program"),this._programDirty=!1,t!==this.program&&(this.program=t,this.vertexArray?this.vertexArray.setProps({program:this.program,attributes:this.vertexArray.attributes}):this.vertexArray=new v(this.gl,{program:this.program}),this.setUniforms(Object.assign({},this.getModuleUniforms())))}_deleteGeometryBuffers(){for(const t in this.geometryBuffers){const e=this.geometryBuffers[t][0]||this.geometryBuffers[t];e instanceof l.a&&e.delete()}}_setAnimationProps(t){this.animated&&Object(a.a)(t,"Model.draw(): animated uniforms but no animationProps")}_setFeedbackBuffers(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Object(o.a)(t))return this;const{gl:e}=this.program;return this.transformFeedback=this.transformFeedback||new _.a(e,{program:this.program}),this.transformFeedback.setBuffers(t),this}_logDrawCallStart(t){const e=t>3?0:1e4;if(!(Date.now()-this.lastLogTime>> DRAWING MODEL ".concat(this.id),{collapsed:r.k.level<=2})(),t}_logDrawCallEnd(t,e,n,i){if(void 0===t)return;const o=function(t){let{vertexArray:e,header:n="Attributes"}=t;if(!e.configuration)return{};const r={};e.elements&&(r.ELEMENT_ARRAY_BUFFER=O(e,e.elements,null,n));const i=e.values;for(const t in i){const o=e._getAttributeInfo(t);if(o){let a="".concat(t,": ").concat(o.name);const s=e.accessors[o.location];s&&(a="".concat(t,": ").concat(S(o.name,s))),r[a]=O(e,i[t],s,n)}}return r}({vertexArray:e,header:"".concat(this.id," attributes"),attributes:this._attributes}),{table:a,unusedTable:s,unusedCount:u}=T({header:"".concat(this.id," uniforms"),program:this.program,uniforms:Object.assign({},this.program.uniforms,n)}),{table:c,count:l}=T({header:"".concat(this.id," uniforms"),program:this.program,uniforms:Object.assign({},this.program.uniforms,n),undefinedOnly:!0});l>0&&r.k.log("MISSING UNIFORMS",Object.keys(c))(),u>0&&r.k.log("UNUSED UNIFORMS",Object.keys(s))();const h=function(t){const e={},n="Accessors for ".concat(t.id);for(const r of t.attributeInfos)if(r){const t=P(r);e["in ".concat(t)]={[n]:JSON.stringify(r.accessor)}}for(const r of t.varyingInfos)if(r){const t=P(r);e["out ".concat(t)]={[n]:JSON.stringify(r.accessor)}}return e}(this.vertexArray.configuration);r.k.table(t,o)(),r.k.table(t,a)(),r.k.table(t+1,h)(),i&&i.log({logLevel:2,message:"Rendered to ".concat(i.id)}),r.k.groupEnd(2)()}}},function(t,e,n){"use strict";function r(t,e){if(!t)throw new Error(e||"shadertools: assertion failed.")}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return a})),n.d(e,"b",(function(){return s}));var r=n(7),i=n(10);const o=6144;function a(t){let{framebuffer:e=null,color:n=null,depth:o=null,stencil:a=null}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const s={};e&&(s.framebuffer=e);let u=0;n&&(u|=16384,!0!==n&&(s.clearColor=n)),o&&(u|=256,!0!==o&&(s.clearDepth=o)),a&&(u|=1024,!0!==o&&(s.clearStencil=o)),Object(i.a)(0!==u,"clear: bad arguments"),Object(r.o)(t,s,()=>{t.clear(u)})}function s(t){let{framebuffer:e=null,buffer:n=o,drawBuffer:a=0,value:s=[0,0,0,0]}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(r.a)(t),Object(r.o)(t,{framebuffer:e},()=>{switch(n){case o:switch(s.constructor){case Int32Array:t.clearBufferiv(n,a,s);break;case Uint32Array:t.clearBufferuiv(n,a,s);break;case Float32Array:default:t.clearBufferfv(n,a,s)}break;case 6145:t.clearBufferfv(6145,0,[s]);break;case 6146:t.clearBufferiv(6146,0,[s]);break;case 34041:const[e,r]=s;t.clearBufferfi(34041,0,e,r);break;default:Object(i.a)(!1,"clear: bad arguments")}})}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(74),i=n(107);const o={WEBGL2:"WEBGL2",VERTEX_ARRAY_OBJECT:"VERTEX_ARRAY_OBJECT",TIMER_QUERY:"TIMER_QUERY",INSTANCED_RENDERING:"INSTANCED_RENDERING",MULTIPLE_RENDER_TARGETS:"MULTIPLE_RENDER_TARGETS",ELEMENT_INDEX_UINT32:"ELEMENT_INDEX_UINT32",BLEND_EQUATION_MINMAX:"BLEND_EQUATION_MINMAX",FLOAT_BLEND:"FLOAT_BLEND",COLOR_ENCODING_SRGB:"COLOR_ENCODING_SRGB",TEXTURE_DEPTH:"TEXTURE_DEPTH",TEXTURE_FLOAT:"TEXTURE_FLOAT",TEXTURE_HALF_FLOAT:"TEXTURE_HALF_FLOAT",TEXTURE_FILTER_LINEAR_FLOAT:"TEXTURE_FILTER_LINEAR_FLOAT",TEXTURE_FILTER_LINEAR_HALF_FLOAT:"TEXTURE_FILTER_LINEAR_HALF_FLOAT",TEXTURE_FILTER_ANISOTROPIC:"TEXTURE_FILTER_ANISOTROPIC",COLOR_ATTACHMENT_RGBA32F:"COLOR_ATTACHMENT_RGBA32F",COLOR_ATTACHMENT_FLOAT:"COLOR_ATTACHMENT_FLOAT",COLOR_ATTACHMENT_HALF_FLOAT:"COLOR_ATTACHMENT_HALF_FLOAT",GLSL_FRAG_DATA:"GLSL_FRAG_DATA",GLSL_FRAG_DEPTH:"GLSL_FRAG_DEPTH",GLSL_DERIVATIVES:"GLSL_DERIVATIVES",GLSL_TEXTURE_LOD:"GLSL_TEXTURE_LOD"};e.b={[o.WEBGL2]:[!1,!0],[o.VERTEX_ARRAY_OBJECT]:["OES_vertex_array_object",!0],[o.TIMER_QUERY]:["EXT_disjoint_timer_query","EXT_disjoint_timer_query_webgl2"],[o.INSTANCED_RENDERING]:["ANGLE_instanced_arrays",!0],[o.MULTIPLE_RENDER_TARGETS]:["WEBGL_draw_buffers",!0],[o.ELEMENT_INDEX_UINT32]:["OES_element_index_uint",!0],[o.BLEND_EQUATION_MINMAX]:["EXT_blend_minmax",!0],[o.FLOAT_BLEND]:["EXT_float_blend"],[o.COLOR_ENCODING_SRGB]:["EXT_sRGB",!0],[o.TEXTURE_DEPTH]:["WEBGL_depth_texture",!0],[o.TEXTURE_FLOAT]:["OES_texture_float",!0],[o.TEXTURE_HALF_FLOAT]:["OES_texture_half_float",!0],[o.TEXTURE_FILTER_LINEAR_FLOAT]:["OES_texture_float_linear"],[o.TEXTURE_FILTER_LINEAR_HALF_FLOAT]:["OES_texture_half_float_linear"],[o.TEXTURE_FILTER_ANISOTROPIC]:["EXT_texture_filter_anisotropic"],[o.COLOR_ATTACHMENT_RGBA32F]:[function(t){const e=new i.a(t,{format:6408,type:5126,dataFormat:6408}),n=new r.a(t,{id:"test-framebuffer",check:!1,attachments:{36064:e}}),o=n.getStatus();return e.delete(),n.delete(),36053===o},"EXT_color_buffer_float"],[o.COLOR_ATTACHMENT_FLOAT]:[!1,"EXT_color_buffer_float"],[o.COLOR_ATTACHMENT_HALF_FLOAT]:["EXT_color_buffer_half_float"],[o.GLSL_FRAG_DATA]:["WEBGL_draw_buffers",!0],[o.GLSL_FRAG_DEPTH]:["EXT_frag_depth",!0],[o.GLSL_DERIVATIVES]:["OES_standard_derivatives",!0],[o.GLSL_TEXTURE_LOD]:["EXT_shader_texture_lod",!0]}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return o}));var r=n(51);function i(t){const e="3.2.10"!==t.version?" (worker-utils@".concat("3.2.10",")"):"";return"".concat(t.name,"@").concat(t.version).concat(e)}function o(t,e={}){const n=e[t.id]||{},i="".concat(t.id,"-worker.js");let o=n.workerUrl;if(o||"compression"!==t.id||(o=e.workerUrl),"test"===e._workerType&&(o="modules/".concat(t.module,"/dist/").concat(i)),!o){let e=t.version;"latest"===e&&(e="latest");const n=e?"@".concat(e):"";o="https://unpkg.com/@loaders.gl/".concat(t.module).concat(n,"/dist/").concat(i)}return Object(r.a)(o),o}},function(t,e,n){"use strict";var r=n(77),i=n(187);n.d(e,"a",(function(){return a})),n.d(e,"c",(function(){return l})),n.d(e,"b",(function(){return h}));const o={[r.b]:"#ifdef MODULE_LOGDEPTH\n logdepth_adjustPosition(gl_Position);\n#endif\n",[r.a]:"#ifdef MODULE_MATERIAL\n gl_FragColor = material_filterColor(gl_FragColor);\n#endif\n\n#ifdef MODULE_LIGHTING\n gl_FragColor = lighting_filterColor(gl_FragColor);\n#endif\n\n#ifdef MODULE_FOG\n gl_FragColor = fog_filterColor(gl_FragColor);\n#endif\n\n#ifdef MODULE_PICKING\n gl_FragColor = picking_filterHighlightColor(gl_FragColor);\n gl_FragColor = picking_filterPickingColor(gl_FragColor);\n#endif\n\n#ifdef MODULE_LOGDEPTH\n logdepth_setFragDepth();\n#endif\n"},a="__LUMA_INJECT_DECLARATIONS__",s=/void\s+main\s*\([^)]*\)\s*\{\n?/,u=/}\n?[^{}]*$/,c=[];function l(t,e,n){let i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const l=e===r.b;for(const e in n){const r=n[e];r.sort((t,e)=>t.order-e.order),c.length=r.length;for(let t=0,e=r.length;tt+i));break;case"vs:#main-end":l&&(t=t.replace(u,t=>i+t));break;case"fs:#decl":l||(t=t.replace(a,i));break;case"fs:#main-start":l||(t=t.replace(s,t=>t+i));break;case"fs:#main-end":l||(t=t.replace(u,t=>i+t));break;default:t=t.replace(e,t=>t+i)}}return t=t.replace(a,""),i&&(t=t.replace(/\}\s*$/,t=>t+o[e])),t}function h(t){const e={};return Object(i.a)(Array.isArray(t)&&t.length>1),t.forEach(t=>{for(const n in t)e[n]=e[n]?"".concat(e[n],"\n").concat(t[n]):t[n]}),e}},,,function(t,e){function n(e){return t.exports=n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,n(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){"use strict";n.d(e,"a",(function(){return a})),n.d(e,"b",(function(){return s}));var r=n(49),i=n(134),o=n(190);function a(t,e){return!!i.a.isSupported()&&(!!(r.b||null!=e&&e._nodeWorkers)&&(t.worker&&(null==e?void 0:e.worker)))}async function s(t,e,n,r,a){const s=t.id,c=Object(o.b)(t,n),l=i.a.getWorkerFarm(n).getWorkerPool({name:s,url:c});n=JSON.parse(JSON.stringify(n)),r=JSON.parse(JSON.stringify(r||{}));const h=await l.startJob("process-on-worker",u.bind(null,a));h.postMessage("process",{input:e,options:n,context:r});const f=await h.result;return await f.result}async function u(t,e,n,r){switch(n){case"done":e.done(r);break;case"error":e.error(new Error(r.error));break;case"process":const{id:i,input:o,options:a}=r;try{const n=await t(o,a);e.postMessage("done",{id:i,result:n})}catch(t){const n=t instanceof Error?t.message:"unknown error";e.postMessage("error",{id:i,error:n})}break;default:console.warn("parse-with-worker unknown message ".concat(n))}}},function(t,e,n){"use strict";n.r(e);var r=n(9),i=n.n(r),o=n(0),a=n.n(o),s=n(3),u=n.n(s),c=n(4),l=n.n(c),h=n(28),f=n.n(h);function p(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!t)throw new Error("JSON conversion error ".concat(e))}function d(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return A(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return A(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function A(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n Jupyter Kernel)")).jupyterModel=null,t.jupyterView=null,t}return a()(n,[{key:"getRootDOMElement",value:function(){return this.jupyterView.el}},{key:"sendJSONMessage",value:function(t,e){var n=p.a._stringifyJSONSafe({type:t,data:e});this.jupyterModel.send(n)}}]),n}(p.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return O}));var r=n(3),i=n.n(r),o=n(4),a=n.n(o),s=n(8),u=n.n(s),c=n(5),l=n.n(c),h=n(6),f=n.n(h),p=n(1),d=n.n(p),A=n(0),g=n.n(A),m=n(164),y=n(32),v=n(67);function _(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return b(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return b(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function b(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:{},n=this.props,r=n.opacity,i=n.pickable,o=n.visible,a=n.parameters,s=n.getPolygonOffset,u=n.highlightedObjectIndex,c=n.autoHighlight,l=n.highlightColor,h=n.coordinateSystem,f=n.coordinateOrigin,p=n.wrapLongitude,d=n.positionFormat,A=n.modelMatrix,g=n.extensions,m=n.fetch,y=n.operation,v=n._subLayerProps,b={id:"",updateTriggers:{},opacity:r,pickable:i,visible:o,parameters:a,getPolygonOffset:s,highlightedObjectIndex:u,autoHighlight:c,highlightColor:l,coordinateSystem:h,coordinateOrigin:f,wrapLongitude:p,positionFormat:d,modelMatrix:A,extensions:g,fetch:m,operation:y},x=v&&e.id&&v[e.id],E=x&&x.updateTriggers,O=e.id||"sublayer";if(x){var S=this.constructor._propTypes,T=e.type?e.type._propTypes:{};for(var C in x){var P=T[C]||S[C];P&&"accessor"===P.type&&(x[C]=this.getSubLayerAccessor(x[C]))}}Object.assign(b,e,x),b.id="".concat(this.props.id,"-").concat(O),b.updateTriggers=w(w({all:null===(t=this.props.updateTriggers)||void 0===t?void 0:t.all},e.updateTriggers),E);var M,I=_(g);try{for(I.s();!(M=I.n()).done;){var B=M.value,R=B.getSubLayerProps.call(this,B);R&&Object.assign(b,R,{updateTriggers:Object.assign(b.updateTriggers,R.updateTriggers)})}}catch(t){I.e(t)}finally{I.f()}return b}},{key:"_updateAutoHighlight",value:function(t){var e,n=_(this.getSubLayers());try{for(n.s();!(e=n.n()).done;){e.value.updateAutoHighlight(t)}}catch(t){n.e(t)}finally{n.f()}}},{key:"_getAttributeManager",value:function(){return null}},{key:"_postUpdate",value:function(t,e){var n=this.internalState.subLayers,r=!n||this.needsUpdate();if(r){var i=this.renderLayers();n=Object(v.b)(i,Boolean),this.internalState.subLayers=n}Object(y.a)("compositeLayer.renderLayers",this,r,n);var o,a=_(n);try{for(a.s();!(o=a.n()).done;){o.value.parent=this}}catch(t){a.e(t)}finally{a.f()}}}]),n}(m.a);g()(O,"layerName","CompositeLayer")},function(t,e,n){"use strict";var r=n(3),i=n.n(r),o=n(4),a=n.n(o),s=n(0),u=n.n(s),c=n(170),l=n(61),h=n(21),f=n(67);function p(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function d(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{clearRedrawFlags:!1},e=this._needsRedraw;return t.clearRedrawFlags&&(this._needsRedraw=!1),e}},{key:"setNeedsUpdate",value:function(t){this._needsUpdate=this._needsUpdate||t,this._needsRedraw=this._needsRedraw||t}},{key:"updateViewStates",value:function(){for(var t in this.controllers){var e=this.controllers[t];e&&e.updateTransition()}}},{key:"getViewports",value:function(t){return t?this._viewports.filter((function(e){return e.containsPixel(t)})):this._viewports}},{key:"getViews",value:function(){var t={};return this.views.forEach((function(e){t[e.id]=e})),t}},{key:"getView",value:function(t){return this.views.find((function(e){return e.id===t}))}},{key:"getViewState",value:function(t){var e="string"==typeof t?this.getView(t):t,n=e&&this.viewState[e.getViewStateId()]||this.viewState;return e?e.filterViewState(n):n}},{key:"getViewport",value:function(t){return this._viewportMap[t]}},{key:"unproject",value:function(t,e){for(var n=this.getViewports(),r={x:t[0],y:t[1]},i=n.length-1;i>=0;--i){var o=n[i];if(o.containsPixel(r)){var a=t.slice();return a[0]-=o.x,a[1]-=o.y,o.unproject(a,e)}}return null}},{key:"setProps",value:function(t){t.views&&this._setViews(t.views),t.viewState&&this._setViewState(t.viewState),("width"in t||"height"in t)&&this._setSize(t.width,t.height),this._isUpdating||this._update()}},{key:"_update",value:function(){this._isUpdating=!0,this._needsUpdate&&(this._needsUpdate=!1,this._rebuildViewports()),this._needsUpdate&&(this._needsUpdate=!1,this._rebuildViewports()),this._isUpdating=!1}},{key:"_setSize",value:function(t,e){t===this.width&&e===this.height||(this.width=t,this.height=e,this.setNeedsUpdate("Size changed"))}},{key:"_setViews",value:function(t){t=Object(f.b)(t,Boolean),this._diffViews(t,this.views)&&this.setNeedsUpdate("views changed"),this.views=t}},{key:"_setViewState",value:function(t){t?(!Object(l.a)(t,this.viewState)&&this.setNeedsUpdate("viewState changed"),this.viewState=t):h.a.warn("missing `viewState` or `initialViewState`")()}},{key:"_onViewStateChange",value:function(t,e){this._eventCallbacks.onViewStateChange&&this._eventCallbacks.onViewStateChange(d(d({},e),{},{viewId:t}))}},{key:"_createController",value:function(t,e){var n=this;return new(0,e.type)({timeline:this.timeline,eventManager:this._eventManager,onViewStateChange:this._onViewStateChange.bind(this,e.id),onStateChange:this._eventCallbacks.onInteractionStateChange,makeViewport:function(e){var r;return null===(r=n.getView(t.id))||void 0===r?void 0:r.makeViewport({viewState:e,width:n.width,height:n.height})}})}},{key:"_updateController",value:function(t,e,n,r){var i=t.controller;if(i){var o=d(d(d({},e),i),{},{id:t.id,x:n.x,y:n.y,width:n.width,height:n.height});return r||(r=this._createController(t,o)),r&&r.setProps(o),r}return null}},{key:"_rebuildViewports",value:function(){var t=this.views,e=this.controllers;this._viewports=[],this.controllers={};for(var n=!1,r=t.length;r--;){var i=t[r],o=this.getViewState(i),a=i.makeViewport({viewState:o,width:this.width,height:this.height}),s=e[i.id],u=Boolean(i.controller);u&&!s&&(n=!0),!n&&u||!s||(s.finalize(),s=null),this.controllers[i.id]=this._updateController(i,o,a,s),this._viewports.unshift(a)}for(var c in e){var l=e[c];l&&!this.controllers[c]&&l.finalize()}this._buildViewportMap()}},{key:"_buildViewportMap",value:function(){var t=this;this._viewportMap={},this._viewports.forEach((function(e){e.id&&(t._viewportMap[e.id]=t._viewportMap[e.id]||e)}))}},{key:"_diffViews",value:function(t,e){return t.length!==e.length||t.some((function(n,r){return!t[r].equals(e[r])}))}}]),t}(),g=n(153),m=n(139),y=n(107),v=n(13),_=n(8),b=n.n(_),x=n(5),w=n.n(x),E=n(6),O=n.n(E),S=n(1),T=n.n(S),C=n(74),P=n(7),M=n(12);function I(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function B(t){for(var e=1;e=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function z(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function N(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n4)return h.a.warn("Too many mask layers. The max supported is 4")(),"continue";a={id:o,index:n.channels.findIndex((function(t){return(null==t?void 0:t.id)===o})),layers:[],layerBounds:[],coordinateOrigin:t.root.props.coordinateOrigin,coordinateSystem:t.root.props.coordinateSystem},r[o]=a}a.layers.push(t),a.layerBounds.push(t.getBounds())};for(o.s();!(e=o.n()).done;)a()}catch(t){o.e(t)}finally{o.f()}for(var s=0;s<4;s++){var u=this.channels[s];u&&u.id in r||(this.channels[s]=null)}for(var c in r){var l=r[c];l.index<0&&(l.index=this.channels.findIndex((function(t){return!t})),this.channels[l.index]=l)}return r}},{key:"getModuleParameters",value:function(){return{maskMap:this.masks?this.maskMap:this.dummyMaskMap,maskChannels:this.masks}}},{key:"cleanup",value:function(){this.dummyMaskMap&&(this.dummyMaskMap.delete(),this.dummyMaskMap=void 0),this.maskPass&&(this.maskPass.delete(),this.maskPass=void 0,this.maskMap=void 0),this.lastViewport=void 0,this.masks=null,this.channels.length=0}}]),t}();function V(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return H(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return H(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function H(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:{clearRedrawFlags:!1},e=this._needsRedraw;return t.clearRedrawFlags&&(this._needsRedraw=!1),e}},{key:"getEffects",value:function(){return this._internalEffects}},{key:"finalize",value:function(){this.cleanup()}},{key:"setEffects",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.cleanup(),this.effects=t,this._internalEffects=t.slice(),this._internalEffects.push(new G),t.some((function(t){return t instanceof m.a}))||this._internalEffects.push(W)}},{key:"cleanup",value:function(){var t,e=V(this.effects);try{for(e.s();!(t=e.n()).done;){t.value.cleanup()}}catch(t){e.e(t)}finally{e.f()}var n,r=V(this._internalEffects);try{for(r.s();!(n=r.n()).done;){n.value.cleanup()}}catch(t){r.e(t)}finally{r.f()}this.effects.length=0,this._internalEffects.length=0}}]),t}(),X=n(172),Z=n(206),J=n(180);function Q(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function K(t){for(var e=1;ef)d+=4*c;else for(var y=0;y=0){var v=y+s-r,_=v*v+m;_<=f&&(f=_,p=d)}d+=4}}if(p>=0){var b=e.slice(p,p+4),x=n(b);if(x){var w=Math.floor(p/4/c),E=p/4-w*c;return K(K({},x),{},{pickedColor:b,pickedX:s+E,pickedY:u+w})}h.a.error("Picked non-existent layer. Is picking buffer corrupt?")()}return Y}function tt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function et(t){var e,n=t.pickInfo,r=t.viewports,i=t.pixelRatio,o=t.x,a=t.y,s=t.z,u=r[0];if(r.length>1&&(u=function(t,e){for(var n=t.length-1;n>=0;n--){var r=t[n];if(r.containsPixel(e))return r}return t[0]}((null==n?void 0:n.pickedViewports)||r,{x:o,y:a})),u){var c=[o-u.x,a-u.y];void 0!==s&&(c[2]=s),e=u.unproject(c)}return{color:null,layer:null,viewport:u,index:-1,picked:!1,x:o,y:a,pixel:[o,a],coordinate:e,devicePixel:n&&"pickedX"in n?[n.pickedX,n.pickedY]:void 0,pixelRatio:i}}function nt(t){var e=t.pickInfo,n=t.lastPickedInfo,r=t.mode,i=t.layers,o=e.pickedColor,a=e.pickedLayer,s=e.pickedObjectIndex,c=a?[a]:[];if("hover"===r){var l=n.index,h=n.layerId,f=a?a.props.id:null;if(f!==h||s!==l){if(f!==h){var p=i.find((function(t){return t.props.id===h}));p&&c.unshift(p)}n.layerId=f,n.index=s,n.info=null}}var d=et(t),A=new Map;return A.set(null,d),c.forEach((function(t){var e=function(t){for(var e=1;e=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function ot(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:this.lastPickedInfo.info,a=o&&o.layer&&o.layer.id,s=o&&o.viewport&&o.viewport.id,u=a?r.find((function(t){return t.id===a})):null,c=s&&i.find((function(t){return t.id===s}))||i[0],l=c&&c.unproject([e-c.x,n-c.y]),h={x:e,y:n,viewport:c,coordinate:l,layer:u};return st(st({},o),h)}},{key:"_resizeBuffer",value:function(){var t,e,n=this.gl;if(!this.pickingFBO&&(this.pickingFBO=new C.a(n),C.a.isSupported(n,{colorBufferFloat:!0}))){var r=new C.a(n);r.attach(u()({},36064,new y.a(n,{format:Object(P.j)(n)?34836:6408,type:5126}))),this.depthFBO=r}null===(t=this.pickingFBO)||void 0===t||t.resize({width:n.canvas.width,height:n.canvas.height}),null===(e=this.depthFBO)||void 0===e||e.resize({width:n.canvas.width,height:n.canvas.height})}},{key:"_getPickable",value:function(t){if(!1===this._pickable)return null;var e=t.filter((function(t){return t.isPickable()&&!t.isComposite}));return e.length?e:null}},{key:"_pickClosestObject",value:function(t){var e=t.layers,n=t.views,r=t.viewports,i=t.x,o=t.y,a=t.radius,s=void 0===a?0:a,u=t.depth,c=void 0===u?1:u,l=t.mode,h=void 0===l?"query":l,f=t.unproject3D,p=t.onViewportActive,d=t.effects,A=this._getPickable(e),g=Object(P.e)(this.gl);if(!A)return{result:[],emptyInfo:et({viewports:r,x:i,y:o,pixelRatio:g})};this._resizeBuffer();for(var m,y=Object(P.d)(this.gl,[i,o],!0),v=[y.x+Math.floor(y.width/2),y.y+Math.floor(y.height/2)],_=Math.round(s*g),b=this.pickingFBO,x=b.width,w=b.height,E=this._getPickingRect({deviceX:v[0],deviceY:v[1],deviceRadius:_,deviceWidth:x,deviceHeight:w}),O={x:i-s,y:o-s,width:2*s+1,height:2*s+1},S=[],T=new Set,C=0;C=0){var o=e.slice(i,i+4),a=o.join(",");if(!r.has(a)){var s=n(o);s?r.set(a,K(K({},s),{},{color:o})):h.a.error("Picked non-existent layer. Is picking buffer corrupt?")()}}}return Array.from(r.values())}(this._drawAndSample({layers:m,views:n,viewports:r,onViewportActive:A,deviceRect:O,cullRect:{x:i,y:o,width:s,height:c},effects:g,pass:"picking:".concat(f)})),T=new Map,C=Number.isFinite(d),M=0;M=d);M++){var I=S[M],B={color:I.pickedColor,layer:null,index:I.pickedObjectIndex,picked:!0,x:i,y:o,pixelRatio:y};B=rt({layer:I.pickedLayer,info:B,mode:f}),T.has(B.object)||T.set(B.object,B)}return Array.from(T.values())}},{key:"_drawAndSample",value:function(t){var e=t.layers,n=t.views,r=t.viewports,i=t.onViewportActive,o=t.deviceRect,a=t.cullRect,s=t.effects,u=t.pass,c=arguments.length>1&&void 0!==arguments[1]&&arguments[1],l=c?this.depthFBO:this.pickingFBO,h=this.pickLayersPass.render({layers:e,layerFilter:this.layerFilter,views:n,viewports:r,onViewportActive:i,pickingFBO:l,deviceRect:o,cullRect:a,effects:s,pass:u,pickZ:c}),f=h.decodePickingColor,p=o.x,d=o.y,A=o.width,g=o.height,m=new(c?Float32Array:Uint8Array)(A*g*4);return Object(Z.c)(l,{sourceX:p,sourceY:d,sourceWidth:A,sourceHeight:g,target:m}),{pickedColors:m,decodePickingColor:f}}},{key:"_getPickingRect",value:function(t){var e=t.deviceX,n=t.deviceY,r=t.deviceRadius,i=t.deviceWidth,o=t.deviceHeight,a=Math.max(0,e-r),s=Math.max(0,n-r),u=Math.min(i,e+r+1)-a,c=Math.min(o,n+r+1)-s;return u<=0||c<=0?null:{x:a,y:s,width:u,height:c}}}]),t}(),ct={zIndex:"1",position:"absolute",pointerEvents:"none",color:"#a0a7b4",backgroundColor:"#29323c",padding:"10px",top:"0",left:"0",display:"none"},lt=function(){function t(e){i()(this,t),u()(this,"el",null),u()(this,"isVisible",!1);var n=e.parentElement;n&&(this.el=document.createElement("div"),this.el.className="deck-tooltip",Object.assign(this.el.style,ct),n.appendChild(this.el))}return a()(t,[{key:"setTooltip",value:function(t,e,n){var r=this.el;if(r){if("string"==typeof t)r.innerText=t;else{if(!t)return this.isVisible=!1,void(r.style.display="none");t.text&&(r.innerText=t.text),t.html&&(r.innerHTML=t.html),t.className&&(r.className=t.className),Object.assign(r.style,t.style)}this.isVisible=!0,r.style.display="block",r.style.transform="translate(".concat(e,"px, ").concat(n,"px)")}}},{key:"remove",value:function(){this.el&&(this.el.remove(),this.el=null)}}]),t}(),ht=n(68),ft=n(200),pt=n(313),dt=n(132),At=n(10),gt=n(38),mt=n(251),yt=n(189);class vt extends gt.a{get[Symbol.toStringTag](){return"Query"}static isSupported(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=Object(P.j)(t),r=Object(mt.c)(t,yt.a.TIMER_QUERY);let i=n||r;for(const t of e)switch(t){case"queries":i=i&&n;break;case"timers":i=i&&r;break;default:Object(At.a)(!1)}return i}constructor(t){super(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),this.target=null,this._queryPending=!1,this._pollingPromise=null,Object.seal(this)}beginTimeElapsedQuery(){return this.begin(35007)}beginOcclusionQuery(){let{conservative:t=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.begin(t?36202:35887)}beginTransformFeedbackQuery(){return this.begin(35976)}begin(t){return this._queryPending||(this.target=t,this.gl2.beginQuery(this.target,this.handle)),this}end(){return this._queryPending||this.target&&(this.gl2.endQuery(this.target),this.target=null,this._queryPending=!0),this}isResultAvailable(){if(!this._queryPending)return!1;const t=this.gl2.getQueryParameter(this.handle,34919);return t&&(this._queryPending=!1),t}isTimerDisjoint(){return this.gl2.getParameter(36795)}getResult(){return this.gl2.getQueryParameter(this.handle,34918)}getTimerMilliseconds(){return this.getResult()/1e6}createPoll(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Number.POSITIVE_INFINITY;if(this._pollingPromise)return this._pollingPromise;let e=0;return this._pollingPromise=new Promise((n,r)=>{const i=()=>{this.isResultAvailable()?(n(this.getResult()),this._pollingPromise=null):e++>t?(r("Timed out"),this._pollingPromise=null):requestAnimationFrame(i)};requestAnimationFrame(i)}),this._pollingPromise}_createHandle(){return vt.isSupported(this.gl)?this.gl2.createQuery():null}_deleteHandle(){this.gl2.deleteQuery(this.handle)}}var _t=n(142);const bt=Object(_t.a)()&&"undefined"!=typeof document;let xt=0;class wt{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{onCreateContext:e=(t=>Object(P.c)(t)),onAddHTML:n=null,onInitialize:r=(()=>{}),onRender:i=(()=>{}),onFinalize:o=(()=>{}),onError:a,gl:s=null,glOptions:u={},debug:c=!1,createFramebuffer:l=!1,autoResizeViewport:h=!0,autoResizeDrawingBuffer:f=!0,stats:p=dt.b.get("animation-loop-".concat(xt++))}=t;let{useDevicePixels:d=!0}=t;"useDevicePixelRatio"in t&&(P.k.deprecated("useDevicePixelRatio","useDevicePixels")(),d=t.useDevicePixelRatio),this.props={onCreateContext:e,onAddHTML:n,onInitialize:r,onRender:i,onFinalize:o,onError:a,gl:s,glOptions:u,debug:c,createFramebuffer:l},this.gl=s,this.needsRedraw=null,this.timeline=null,this.stats=p,this.cpuTime=this.stats.get("CPU Time"),this.gpuTime=this.stats.get("GPU Time"),this.frameRate=this.stats.get("Frame Rate"),this._initialized=!1,this._running=!1,this._animationFrameId=null,this._nextFramePromise=null,this._resolveNextFrame=null,this._cpuStartTime=0,this.setProps({autoResizeViewport:h,autoResizeDrawingBuffer:f,useDevicePixels:d}),this.start=this.start.bind(this),this.stop=this.stop.bind(this),this._pageLoadPromise=null,this._onMousemove=this._onMousemove.bind(this),this._onMouseleave=this._onMouseleave.bind(this)}delete(){this.stop(),this._setDisplay(null)}setNeedsRedraw(t){return Object(At.a)("string"==typeof t),this.needsRedraw=this.needsRedraw||t,this}setProps(t){return"autoResizeViewport"in t&&(this.autoResizeViewport=t.autoResizeViewport),"autoResizeDrawingBuffer"in t&&(this.autoResizeDrawingBuffer=t.autoResizeDrawingBuffer),"useDevicePixels"in t&&(this.useDevicePixels=t.useDevicePixels),this}start(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._running)return this;this._running=!0;const e=this._getPageLoadPromise().then(()=>!this._running||this._initialized?null:(this._createWebGLContext(t),this._createFramebuffer(),this._startEventHandling(),this._initializeCallbackData(),this._updateCallbackData(),this._resizeCanvasDrawingBuffer(),this._resizeViewport(),this._gpuTimeQuery=vt.isSupported(this.gl,["timers"])?new vt(this.gl):null,this._initialized=!0,this.onInitialize(this.animationProps))).then(t=>{this._running&&(this._addCallbackData(t||{}),!1!==t&&this._startLoop())});return this.props.onError&&e.catch(this.props.onError),this}redraw(){return this.isContextLost()||(this._beginTimers(),this._setupFrame(),this._updateCallbackData(),this._renderFrame(this.animationProps),this._clearNeedsRedraw(),this.offScreen&&this.gl.commit&&this.gl.commit(),this._resolveNextFrame&&(this._resolveNextFrame(this),this._nextFramePromise=null,this._resolveNextFrame=null),this._endTimers()),this}stop(){return this._running&&(this._finalizeCallbackData(),this._cancelAnimationFrame(this._animationFrameId),this._nextFramePromise=null,this._resolveNextFrame=null,this._animationFrameId=null,this._running=!1),this}attachTimeline(t){return this.timeline=t,this.timeline}detachTimeline(){this.timeline=null}waitForRender(){return this.setNeedsRedraw("waitForRender"),this._nextFramePromise||(this._nextFramePromise=new Promise(t=>{this._resolveNextFrame=t})),this._nextFramePromise}async toDataURL(){return this.setNeedsRedraw("toDataURL"),await this.waitForRender(),this.gl.canvas.toDataURL()}isContextLost(){return this.gl.isContextLost()}onCreateContext(){return this.props.onCreateContext(...arguments)}onInitialize(){return this.props.onInitialize(...arguments)}onRender(){return this.props.onRender(...arguments)}onFinalize(){return this.props.onFinalize(...arguments)}getHTMLControlValue(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const n=document.getElementById(t);return n?Number(n.value):e}setViewParameters(){return P.k.removed("AnimationLoop.setViewParameters","AnimationLoop.setProps")(),this}_startLoop(){const t=()=>{this._running&&(this.redraw(),this._animationFrameId=this._requestAnimationFrame(t))};this._cancelAnimationFrame(this._animationFrameId),this._animationFrameId=this._requestAnimationFrame(t)}_getPageLoadPromise(){return this._pageLoadPromise||(this._pageLoadPromise=bt?new Promise((t,e)=>{bt&&"complete"===document.readyState?t(document):window.addEventListener("load",()=>{t(document)})}):Promise.resolve({})),this._pageLoadPromise}_setDisplay(t){this.display&&(this.display.delete(),this.display.animationLoop=null),t&&(t.animationLoop=this),this.display=t}_cancelAnimationFrame(t){return this.display&&this.display.cancelAnimationFrame?this.display.cancelAnimationFrame(t):(e=t,"undefined"!=typeof window&&window.cancelAnimationFrame?window.cancelAnimationFrame(e):clearTimeout(e));var e}_requestAnimationFrame(t){if(this._running)return this.display&&this.display.requestAnimationFrame?this.display.requestAnimationFrame(t):(e=t,"undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame(e):setTimeout(e,1e3/60));var e}_renderFrame(){this.display?this.display._renderFrame(...arguments):this.onRender(...arguments)}_clearNeedsRedraw(){this.needsRedraw=null}_setupFrame(){this._resizeCanvasDrawingBuffer(),this._resizeViewport(),this._resizeFramebuffer()}_initializeCallbackData(){this.animationProps={gl:this.gl,stop:this.stop,canvas:this.gl.canvas,framebuffer:this.framebuffer,useDevicePixels:this.useDevicePixels,needsRedraw:null,startTime:Date.now(),engineTime:0,tick:0,tock:0,time:0,_timeline:this.timeline,_loop:this,_animationLoop:this,_mousePosition:null}}_updateCallbackData(){const{width:t,height:e,aspect:n}=this._getSizeAndAspect();t===this.animationProps.width&&e===this.animationProps.height||this.setNeedsRedraw("drawing buffer resized"),n!==this.animationProps.aspect&&this.setNeedsRedraw("drawing buffer aspect changed"),this.animationProps.width=t,this.animationProps.height=e,this.animationProps.aspect=n,this.animationProps.needsRedraw=this.needsRedraw,this.animationProps.engineTime=Date.now()-this.animationProps.startTime,this.timeline&&this.timeline.update(this.animationProps.engineTime),this.animationProps.tick=Math.floor(this.animationProps.time/1e3*60),this.animationProps.tock++,this.animationProps.time=this.timeline?this.timeline.getTime():this.animationProps.engineTime,this.animationProps._offScreen=this.offScreen}_finalizeCallbackData(){this.onFinalize(this.animationProps)}_addCallbackData(t){"object"==typeof t&&null!==t&&(this.animationProps=Object.assign({},this.animationProps,t))}_createWebGLContext(t){if(this.offScreen=t.canvas&&"undefined"!=typeof OffscreenCanvas&&t.canvas instanceof OffscreenCanvas,t=Object.assign({},t,this.props.glOptions),this.gl=this.props.gl?Object(P.h)(this.props.gl,t):this.onCreateContext(t),!Object(P.i)(this.gl))throw new Error("AnimationLoop.onCreateContext - illegal context returned");Object(P.l)(this.gl),this._createInfoDiv()}_createInfoDiv(){if(this.gl.canvas&&this.props.onAddHTML){const t=document.createElement("div");document.body.appendChild(t),t.style.position="relative";const e=document.createElement("div");e.style.position="absolute",e.style.left="10px",e.style.bottom="10px",e.style.width="300px",e.style.background="white",t.appendChild(this.gl.canvas),t.appendChild(e);const n=this.props.onAddHTML(e);n&&(e.innerHTML=n)}}_getSizeAndAspect(){const t=this.gl.drawingBufferWidth,e=this.gl.drawingBufferHeight;let n=1;const{canvas:r}=this.gl;return r&&r.clientHeight?n=r.clientWidth/r.clientHeight:t>0&&e>0&&(n=t/e),{width:t,height:e,aspect:n}}_resizeViewport(){this.autoResizeViewport&&this.gl.viewport(0,0,this.gl.drawingBufferWidth,this.gl.drawingBufferHeight)}_resizeCanvasDrawingBuffer(){this.autoResizeDrawingBuffer&&Object(P.m)(this.gl,{useDevicePixels:this.useDevicePixels})}_createFramebuffer(){this.props.createFramebuffer&&(this.framebuffer=new C.a(this.gl))}_resizeFramebuffer(){this.framebuffer&&this.framebuffer.resize({width:this.gl.drawingBufferWidth,height:this.gl.drawingBufferHeight})}_beginTimers(){this.frameRate.timeEnd(),this.frameRate.timeStart(),this._gpuTimeQuery&&this._gpuTimeQuery.isResultAvailable()&&!this._gpuTimeQuery.isTimerDisjoint()&&this.stats.get("GPU Time").addTime(this._gpuTimeQuery.getTimerMilliseconds()),this._gpuTimeQuery&&this._gpuTimeQuery.beginTimeElapsedQuery(),this.cpuTime.timeStart()}_endTimers(){this.cpuTime.timeEnd(),this._gpuTimeQuery&&this._gpuTimeQuery.end()}_startEventHandling(){const{canvas:t}=this.gl;t&&(t.addEventListener("mousemove",this._onMousemove),t.addEventListener("mouseleave",this._onMouseleave))}_onMousemove(t){this.animationProps._mousePosition=[t.offsetX,t.offsetY]}_onMouseleave(t){this.animationProps._mousePosition=null}}var Et=n(315),Ot=n(76),St=n(147),Tt=n.n(St);const Ct={mousedown:1,mousemove:2,mouseup:4};!function(t){const e=t.prototype.handler;t.prototype.handler=function(t){const n=this.store;t.button>0&&"pointerdown"===t.type&&(function(t,e){for(let n=0;ne.pointerId===t.pointerId)||n.push(t)),e.call(this,t)}}(Tt.a.PointerEventInput),Tt.a.MouseInput.prototype.handler=function(t){let e=Ct[t.type];1&e&&t.button>=0&&(this.pressed=!0),2&e&&0===t.which&&(e=4),this.pressed&&(4&e&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:"mouse",srcEvent:t}))};const Pt=Tt.a.Manager;var Mt=Tt.a;class It{constructor(t,e,n){this.element=t,this.callback=e,this.options={enable:!0,...n}}}const Bt=Mt?[[Mt.Pan,{event:"tripan",pointers:3,threshold:0,enable:!1}],[Mt.Rotate,{enable:!1}],[Mt.Pinch,{enable:!1}],[Mt.Swipe,{enable:!1}],[Mt.Pan,{threshold:0,enable:!1}],[Mt.Press,{enable:!1}],[Mt.Tap,{event:"doubletap",taps:2,enable:!1}],[Mt.Tap,{event:"anytap",enable:!1}],[Mt.Tap,{enable:!1}]]:null,Rt={tripan:["rotate","pinch","pan"],rotate:["pinch"],pinch:["pan"],pan:["press","doubletap","anytap","tap"],doubletap:["anytap"],anytap:["tap"]},kt={doubletap:["tap"]},Dt={pointerdown:"pointerdown",pointermove:"pointermove",pointerup:"pointerup",touchstart:"pointerdown",touchmove:"pointermove",touchend:"pointerup",mousedown:"pointerdown",mousemove:"pointermove",mouseup:"pointerup"},Lt={KEY_EVENTS:["keydown","keyup"],MOUSE_EVENTS:["mousedown","mousemove","mouseup","mouseover","mouseout","mouseleave"],WHEEL_EVENTS:["wheel","mousewheel"]},jt={tap:"tap",anytap:"anytap",doubletap:"doubletap",press:"press",pinch:"pinch",pinchin:"pinch",pinchout:"pinch",pinchstart:"pinch",pinchmove:"pinch",pinchend:"pinch",pinchcancel:"pinch",rotate:"rotate",rotatestart:"rotate",rotatemove:"rotate",rotateend:"rotate",rotatecancel:"rotate",tripan:"tripan",tripanstart:"tripan",tripanmove:"tripan",tripanup:"tripan",tripandown:"tripan",tripanleft:"tripan",tripanright:"tripan",tripanend:"tripan",tripancancel:"tripan",pan:"pan",panstart:"pan",panmove:"pan",panup:"pan",pandown:"pan",panleft:"pan",panright:"pan",panend:"pan",pancancel:"pan",swipe:"swipe",swipeleft:"swipe",swiperight:"swipe",swipeup:"swipe",swipedown:"swipe"},Ft={click:"tap",anyclick:"anytap",dblclick:"doubletap",mousedown:"pointerdown",mousemove:"pointermove",mouseup:"pointerup",mouseover:"pointerover",mouseout:"pointerout",mouseleave:"pointerleave"};var zt=n(110);const Ut=-1!==zt.b.indexOf("firefox"),{WHEEL_EVENTS:Nt}=Lt;class Gt extends It{constructor(t,e,n){super(t,e,n),this.handleEvent=t=>{if(!this.options.enable)return;let e=t.deltaY;zt.c.WheelEvent&&(Ut&&t.deltaMode===zt.c.WheelEvent.DOM_DELTA_PIXEL&&(e/=zt.c.devicePixelRatio),t.deltaMode===zt.c.WheelEvent.DOM_DELTA_LINE&&(e*=40)),0!==e&&e%4.000244140625==0&&(e=Math.floor(e/4.000244140625)),t.shiftKey&&e&&(e*=.25),this.callback({type:"wheel",center:{x:t.clientX,y:t.clientY},delta:-e,srcEvent:t,pointerType:"mouse",target:t.target})},this.events=(this.options.events||[]).concat(Nt),this.events.forEach(e=>t.addEventListener(e,this.handleEvent,!!zt.a&&{passive:!1}))}destroy(){this.events.forEach(t=>this.element.removeEventListener(t,this.handleEvent))}enableEventType(t,e){"wheel"===t&&(this.options.enable=e)}}const{MOUSE_EVENTS:Vt}=Lt;class Ht extends It{constructor(t,e,n){super(t,e,n),this.handleEvent=t=>{this.handleOverEvent(t),this.handleOutEvent(t),this.handleEnterEvent(t),this.handleLeaveEvent(t),this.handleMoveEvent(t)},this.pressed=!1;const{enable:r}=this.options;this.enableMoveEvent=r,this.enableLeaveEvent=r,this.enableEnterEvent=r,this.enableOutEvent=r,this.enableOverEvent=r,this.events=(this.options.events||[]).concat(Vt),this.events.forEach(e=>t.addEventListener(e,this.handleEvent))}destroy(){this.events.forEach(t=>this.element.removeEventListener(t,this.handleEvent))}enableEventType(t,e){"pointermove"===t&&(this.enableMoveEvent=e),"pointerover"===t&&(this.enableOverEvent=e),"pointerout"===t&&(this.enableOutEvent=e),"pointerenter"===t&&(this.enableEnterEvent=e),"pointerleave"===t&&(this.enableLeaveEvent=e)}handleOverEvent(t){this.enableOverEvent&&"mouseover"===t.type&&this._emit("pointerover",t)}handleOutEvent(t){this.enableOutEvent&&"mouseout"===t.type&&this._emit("pointerout",t)}handleEnterEvent(t){this.enableEnterEvent&&"mouseenter"===t.type&&this._emit("pointerenter",t)}handleLeaveEvent(t){this.enableLeaveEvent&&"mouseleave"===t.type&&this._emit("pointerleave",t)}handleMoveEvent(t){if(this.enableMoveEvent)switch(t.type){case"mousedown":t.button>=0&&(this.pressed=!0);break;case"mousemove":0===t.which&&(this.pressed=!1),this.pressed||this._emit("pointermove",t);break;case"mouseup":this.pressed=!1}}_emit(t,e){this.callback({type:t,center:{x:e.clientX,y:e.clientY},srcEvent:e,pointerType:"mouse",target:e.target})}}const{KEY_EVENTS:Wt}=Lt;class qt extends It{constructor(t,e,n){super(t,e,n),this.handleEvent=t=>{const e=t.target||t.srcElement;"INPUT"===e.tagName&&"text"===e.type||"TEXTAREA"===e.tagName||(this.enableDownEvent&&"keydown"===t.type&&this.callback({type:"keydown",srcEvent:t,key:t.key,target:t.target}),this.enableUpEvent&&"keyup"===t.type&&this.callback({type:"keyup",srcEvent:t,key:t.key,target:t.target}))},this.enableDownEvent=this.options.enable,this.enableUpEvent=this.options.enable,this.events=(this.options.events||[]).concat(Wt),t.tabIndex=this.options.tabIndex||0,t.style.outline="none",this.events.forEach(e=>t.addEventListener(e,this.handleEvent))}destroy(){this.events.forEach(t=>this.element.removeEventListener(t,this.handleEvent))}enableEventType(t,e){"keydown"===t&&(this.enableDownEvent=e),"keyup"===t&&(this.enableUpEvent=e)}}class Xt extends It{constructor(t,e,n){super(t,e,n),this.handleEvent=t=>{this.options.enable&&this.callback({type:"contextmenu",center:{x:t.clientX,y:t.clientY},srcEvent:t,pointerType:"mouse",target:t.target})},t.addEventListener("contextmenu",this.handleEvent)}destroy(){this.element.removeEventListener("contextmenu",this.handleEvent)}enableEventType(t,e){"contextmenu"===t&&(this.options.enable=e)}}const Zt={pointerdown:1,pointermove:2,pointerup:4,mousedown:1,mousemove:2,mouseup:4};function Jt(t){const e=Zt[t.srcEvent.type];if(!e)return null;const{buttons:n,button:r,which:i}=t.srcEvent;let o=!1,a=!1,s=!1;return 4===e||2===e&&!Number.isFinite(n)?(o=1===i,a=2===i,s=3===i):2===e?(o=Boolean(1&n),a=Boolean(4&n),s=Boolean(2&n)):1===e&&(o=0===r,a=1===r,s=2===r),{leftButton:o,middleButton:a,rightButton:s}}function Qt(t,e){const n=t.center;if(!n)return null;const r=e.getBoundingClientRect(),i=r.width/e.offsetWidth||1,o=r.height/e.offsetHeight||1;return{center:n,offsetCenter:{x:(n.x-r.left-e.clientLeft)/i,y:(n.y-r.top-e.clientTop)/o}}}const Kt={srcElement:"root",priority:0};class Yt{constructor(t){this.handleEvent=t=>{if(this.isEmpty())return;const e=this._normalizeEvent(t);let n=t.srcEvent.target;for(;n&&n!==e.rootElement;){if(this._emit(e,n),e.handled)return;n=n.parentNode}this._emit(e,"root")},this.eventManager=t,this.handlers=[],this.handlersByElement=new Map,this._active=!1}isEmpty(){return!this._active}add(t,e,n,r=!1,i=!1){const{handlers:o,handlersByElement:a}=this;let s=Kt;"string"==typeof n||n&&n.addEventListener?s={...Kt,srcElement:n}:n&&(s={...Kt,...n});let u=a.get(s.srcElement);u||(u=[],a.set(s.srcElement,u));const c={type:t,handler:e,srcElement:s.srcElement,priority:s.priority};r&&(c.once=!0),i&&(c.passive=!0),o.push(c),this._active=this._active||!c.passive;let l=u.length-1;for(;l>=0&&!(u[l].priority>=c.priority);)l--;u.splice(l+1,0,c)}remove(t,e){const{handlers:n,handlersByElement:r}=this;for(let i=n.length-1;i>=0;i--){const o=n[i];if(o.type===t&&o.handler===e){n.splice(i,1);const t=r.get(o.srcElement);t.splice(t.indexOf(o),1),0===t.length&&r.delete(o.srcElement)}}this._active=n.some(t=>!t.passive)}_emit(t,e){const n=this.handlersByElement.get(e);if(n){let e=!1;const r=()=>{t.handled=!0},i=()=>{t.handled=!0,e=!0},o=[];for(let a=0;a{t.srcEvent.preventDefault()},stopImmediatePropagation:null,stopPropagation:null,handled:!1,rootElement:e}}}const $t={events:null,recognizers:null,recognizerOptions:{},Manager:Pt,touchAction:"none",tabIndex:0};class te{constructor(t=null,e){this._onBasicInput=t=>{const{srcEvent:e}=t,n=Dt[e.type];n&&this.manager.emit(n,t)},this._onOtherEvent=t=>{this.manager.emit(t.type,t)},this.options={...$t,...e},this.events=new Map,this.setElement(t);const{events:n}=this.options;n&&this.on(n)}getElement(){return this.element}setElement(t){if(this.element&&this.destroy(),this.element=t,!t)return;const{options:e}=this,n=e.Manager;this.manager=new n(t,{touchAction:e.touchAction,recognizers:e.recognizers||Bt}).on("hammer.input",this._onBasicInput),e.recognizers||Object.keys(Rt).forEach(t=>{const e=this.manager.get(t);e&&Rt[t].forEach(t=>{e.recognizeWith(t)})});for(const t in e.recognizerOptions){const n=this.manager.get(t);if(n){const r=e.recognizerOptions[t];delete r.enable,n.set(r)}}this.wheelInput=new Gt(t,this._onOtherEvent,{enable:!1}),this.moveInput=new Ht(t,this._onOtherEvent,{enable:!1}),this.keyInput=new qt(t,this._onOtherEvent,{enable:!1,tabIndex:e.tabIndex}),this.contextmenuInput=new Xt(t,this._onOtherEvent,{enable:!1});for(const[t,e]of this.events)e.isEmpty()||(this._toggleRecognizer(e.recognizerName,!0),this.manager.on(t,e.handleEvent))}destroy(){this.element&&(this.wheelInput.destroy(),this.moveInput.destroy(),this.keyInput.destroy(),this.contextmenuInput.destroy(),this.manager.destroy(),this.wheelInput=null,this.moveInput=null,this.keyInput=null,this.contextmenuInput=null,this.manager=null,this.element=null)}on(t,e,n){this._addEventHandler(t,e,n,!1)}once(t,e,n){this._addEventHandler(t,e,n,!0)}watch(t,e,n){this._addEventHandler(t,e,n,!1,!0)}off(t,e){this._removeEventHandler(t,e)}_toggleRecognizer(t,e){const{manager:n}=this;if(!n)return;const r=n.get(t);if(r&&r.options.enable!==e){r.set({enable:e});const i=kt[t];i&&!this.options.recognizers&&i.forEach(i=>{const o=n.get(i);e?(o.requireFailure(t),r.dropRequireFailure(i)):o.dropRequireFailure(t)})}this.wheelInput.enableEventType(t,e),this.moveInput.enableEventType(t,e),this.keyInput.enableEventType(t,e),this.contextmenuInput.enableEventType(t,e)}_addEventHandler(t,e,n,r,i){if("string"!=typeof t){n=e;for(const e in t)this._addEventHandler(e,t[e],n,r,i);return}const{manager:o,events:a}=this,s=Ft[t]||t;let u=a.get(s);u||(u=new Yt(this),a.set(s,u),u.recognizerName=jt[s]||s,o&&o.on(s,u.handleEvent)),u.add(t,e,n,r,i),u.isEmpty()||this._toggleRecognizer(u.recognizerName,!0)}_removeEventHandler(t,e){if("string"!=typeof t){for(const e in t)this._removeEventHandler(e,t[e]);return}const{events:n}=this,r=Ft[t]||t,i=n.get(r);if(i&&(i.remove(t,e),i.isEmpty())){const{recognizerName:t}=i;let e=!1;for(const r of n.values())if(r.recognizerName===t&&!r.isEmpty()){e=!0;break}e||this._toggleRecognizer(t,!1)}}}var ee=n(29);function ne(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return re(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return re(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function re(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:{clearRedrawFlags:!1};if(!this.layerManager)return!1;if(this.props._animate)return"Deck._animate";var e=this._needsRedraw;t.clearRedrawFlags&&(this._needsRedraw=!1);var n=this.viewManager.needsRedraw(t),r=this.layerManager.needsRedraw(t),i=this.effectManager.needsRedraw(t),o=this.deckRenderer.needsRedraw(t);return e=e||n||r||i||o}},{key:"redraw",value:function(t){if(this.layerManager){var e=this.needsRedraw({clearRedrawFlags:!0});(e=t||e)&&(this.stats.get("Redraw Count").incrementCount(),this.props._customRender?this.props._customRender(e):this._drawLayers(e))}}},{key:"isInitialized",get:function(){return null!==this.viewManager}},{key:"getViews",value:function(){return Object(ee.a)(this.viewManager),this.viewManager.views}},{key:"getViewports",value:function(t){return Object(ee.a)(this.viewManager),this.viewManager.getViewports(t)}},{key:"pickObject",value:function(t){var e=this._pick("pickObject","pickObject Time",t).result;return e.length?e[0]:null}},{key:"pickMultipleObjects",value:function(t){return t.depth=t.depth||10,this._pick("pickObject","pickMultipleObjects Time",t).result}},{key:"pickObjects",value:function(t){return this._pick("pickObjects","pickObjects Time",t)}},{key:"_addResources",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];for(var n in t)this.layerManager.resourceManager.add({resourceId:n,data:t[n],forceUpdate:e})}},{key:"_removeResources",value:function(t){var e,n=ne(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;this.layerManager.resourceManager.remove(r)}}catch(t){n.e(t)}finally{n.f()}}},{key:"_pick",value:function(t,e,n){Object(ee.a)(this.deckPicker);var r=this.stats;r.get("Pick Count").incrementCount(),r.get(e).timeStart();var i=this.deckPicker[t](oe({layers:this.layerManager.getLayers(n),views:this.viewManager.getViews(),viewports:this.getViewports(n),onViewportActive:this.layerManager.activateViewport,effects:this.effectManager.getEffects()},n));return r.get(e).timeEnd(),i}},{key:"_createCanvas",value:function(t){var e=t.canvas;("string"==typeof e&&(e=document.getElementById(e),Object(ee.a)(e)),e)||((e=document.createElement("canvas")).id=t.id||"deckgl-overlay",(t.parent||document.body).appendChild(e));return Object.assign(e.style,t.style),e}},{key:"_setCanvasSize",value:function(t){if(this.canvas){var e=t.width,n=t.height;if(e||0===e){var r=Number.isFinite(e)?"".concat(e,"px"):e;this.canvas.style.width=r}if(n||0===n){var i,o=Number.isFinite(n)?"".concat(n,"px"):n;this.canvas.style.position=(null===(i=t.style)||void 0===i?void 0:i.position)||"absolute",this.canvas.style.height=o}}}},{key:"_updateCanvasSize",value:function(){var t=this.canvas;if(t){var e,n=t.clientWidth||t.width,r=t.clientHeight||t.height;if(n!==this.width||r!==this.height)this.width=n,this.height=r,null===(e=this.viewManager)||void 0===e||e.setProps({width:n,height:r}),this.props.onResize({width:n,height:r})}}},{key:"_createAnimationLoop",value:function(t){var e=this,n=t.width,r=t.height,i=t.gl,o=t.glOptions,a=t.debug,s=t.onError,u=t.onBeforeRender,c=t.onAfterRender,l=t.useDevicePixels;return new wt({width:n,height:r,useDevicePixels:l,autoResizeViewport:!1,gl:i,onCreateContext:function(t){return Object(P.c)(oe(oe(oe({},o),t),{},{canvas:e.canvas,debug:a,onContextLost:function(){return e._onContextLost()}}))},onInitialize:function(t){return e._setGLContext(t.gl)},onRender:this._onRenderFrame.bind(this),onBeforeRender:u,onAfterRender:c,onError:s})}},{key:"_getViewState",value:function(){return this.props.viewState||this.viewState}},{key:"_getViews",value:function(){var t=this.props.views||[new g.a({id:"default-view"})];return(t=Array.isArray(t)?t:[t]).length&&this.props.controller&&(t[0].props.controller=this.props.controller),t}},{key:"_onContextLost",value:function(){var t=this.props.onError;this.animationLoop&&t&&t(new Error("WebGL context is lost"))}},{key:"_pickAndCallback",value:function(){var t=this._pickRequest;if(t.event){var e=this._pick("pickObject","pickObject Time",t),n=e.result,r=e.emptyInfo;this.cursorState.isHovering=n.length>0;var i,o=r,a=!1,s=ne(n);try{for(s.s();!(i=s.n()).done;){var u,c=i.value;o=c,a=(null===(u=c.layer)||void 0===u?void 0:u.onHover(c,t.event))||a}}catch(t){s.e(t)}finally{s.f()}if(!a&&this.props.onHover&&this.props.onHover(o,t.event),this.props.getTooltip&&this.tooltip){var l=this.props.getTooltip(o);this.tooltip.setTooltip(l,o.x,o.y)}t.event=null}}},{key:"_updateCursor",value:function(){var t=this.props.parent||this.canvas;t&&(t.style.cursor=this.props.getCursor(this.cursorState))}},{key:"_setGLContext",value:function(t){if(!this.layerManager){this.canvas||(this.canvas=t.canvas,Object(P.h)(t,{enable:!0,copyState:!0})),this.tooltip=new lt(this.canvas),Object(P.n)(t,{blend:!0,blendFunc:[770,771,1,771],polygonOffsetFill:!0,depthTest:!0,depthFunc:515}),this.props.onWebGLInitialized(t);var e=new Et.a;for(var n in e.play(),this.animationLoop.attachTimeline(e),this.eventManager=new te(this.props.parent||t.canvas,{touchAction:this.props.touchAction,recognizerOptions:this.props.eventRecognizerOptions,events:{pointerdown:this._onPointerDown,pointermove:this._onPointerMove,pointerleave:this._onPointerMove}}),M.b)this.eventManager.on(n,this._onEvent);this.viewManager=new A({timeline:e,eventManager:this.eventManager,onViewStateChange:this._onViewStateChange.bind(this),onInteractionStateChange:this._onInteractionStateChange.bind(this),views:this._getViews(),viewState:this._getViewState(),width:this.width,height:this.height});var r=this.viewManager.getViewports()[0];this.layerManager=new c.a(t,{deck:this,stats:this.stats,viewport:r,timeline:e}),this.effectManager=new q,this.deckRenderer=new X.a(t),this.deckPicker=new ut(t),this.setProps(this.props),this._updateCanvasSize(),this.props.onLoad()}}},{key:"_drawLayers",value:function(t,e){var n=this.layerManager.context.gl;Object(P.n)(n,this.props.parameters),this.props.onBeforeRender({gl:n}),this.deckRenderer.renderLayers(oe({target:this.props._framebuffer,layers:this.layerManager.getLayers(),viewports:this.viewManager.getViewports(),onViewportActive:this.layerManager.activateViewport,views:this.viewManager.getViews(),pass:"screen",redrawReason:t,effects:this.effectManager.getEffects()},e)),this.props.onAfterRender({gl:n})}},{key:"_onRenderFrame",value:function(t){this._getFrameStats(),this._metricsCounter++%60==0&&(this._getMetrics(),this.stats.reset(),h.a.table(4,this.metrics)(),this.props._onMetrics&&this.props._onMetrics(this.metrics)),this._updateCanvasSize(),this._updateCursor(),this.tooltip.isVisible&&this.viewManager.needsRedraw()&&this.tooltip.setTooltip(null),this.layerManager.updateLayers(),this._pickAndCallback(),this.redraw(),this.viewManager&&this.viewManager.updateViewStates()}},{key:"_onViewStateChange",value:function(t){var e=this.props.onViewStateChange(t)||t.viewState;this.viewState&&(this.viewState=oe(oe({},this.viewState),{},u()({},t.viewId,e)),this.props.viewState||this.viewManager&&this.viewManager.setProps({viewState:this.viewState}))}},{key:"_onInteractionStateChange",value:function(t){this.cursorState.isDragging=t.isDragging||!1,this.props.onInteractionStateChange(t)}},{key:"_getFrameStats",value:function(){var t=this.stats;t.get("frameRate").timeEnd(),t.get("frameRate").timeStart();var e=this.animationLoop.stats;t.get("GPU Time").addTime(e.get("GPU Time").lastTiming),t.get("CPU Time").addTime(e.get("CPU Time").lastTiming)}},{key:"_getMetrics",value:function(){var t=this.metrics,e=this.stats;t.fps=e.get("frameRate").getHz(),t.setPropsTime=e.get("setProps Time").time,t.updateAttributesTime=e.get("Update Attributes").time,t.framesRedrawn=e.get("Redraw Count").count,t.pickTime=e.get("pickObject Time").time+e.get("pickMultipleObjects Time").time+e.get("pickObjects Time").time,t.pickCount=e.get("Pick Count").count,t.gpuTime=e.get("GPU Time").time,t.cpuTime=e.get("CPU Time").time,t.gpuTimePerFrame=e.get("GPU Time").getAverageTime(),t.cpuTimePerFrame=e.get("CPU Time").getAverageTime();var n=dt.b.get("Memory Usage");t.bufferMemory=n.get("Buffer Memory").count,t.textureMemory=n.get("Texture Memory").count,t.renderbufferMemory=n.get("Renderbuffer Memory").count,t.gpuMemory=n.get("GPU Memory").count}}]),t}();u()(ue,"defaultProps",se),u()(ue,"VERSION",ft.a.VERSION)},function(t,e,n){"use strict";var r=n(0),i=n.n(r),o=n(112),a=n(320),s=n(21),u=n(32);var c={id:"JSON",name:"JSON",module:"",version:"",options:{},extensions:["json","geojson"],mimeTypes:["application/json","application/geo+json"],testText:function(t){var e=t[0],n=t[t.length-1];return"{"===e&&"}"===n||"["===e&&"]"===n},parseTextSync:JSON.parse};function l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function h(t){for(var e=1;e>>0):4294967296*(e>>>0)+(t>>>0)}function u(t,e,n){var r=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));n.realloc(r);for(var i=n.pos-1;i>=t;i--)n.buf[i+r]=n.buf[i]}function c(t,e){for(var n=0;n>>8,t[n+2]=e>>>16,t[n+3]=e>>>24}function _(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}i.prototype={destroy:function(){this.buf=null},readFields:function(t,e,n){for(n=n||this.length;this.pos>3,o=this.pos;this.type=7&r,t(i,e,this),this.pos===o&&this.skip(r)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=y(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=_(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=y(this.buf,this.pos)+4294967296*y(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=y(this.buf,this.pos)+4294967296*_(this.buf,this.pos+4);return this.pos+=8,t},readFloat:function(){var t=r.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=r.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,n,r=this.buf;return e=127&(n=r[this.pos++]),n<128?e:(e|=(127&(n=r[this.pos++]))<<7,n<128?e:(e|=(127&(n=r[this.pos++]))<<14,n<128?e:(e|=(127&(n=r[this.pos++]))<<21,n<128?e:function(t,e,n){var r,i,o=n.buf;if(i=o[n.pos++],r=(112&i)>>4,i<128)return s(t,r,e);if(i=o[n.pos++],r|=(127&i)<<3,i<128)return s(t,r,e);if(i=o[n.pos++],r|=(127&i)<<10,i<128)return s(t,r,e);if(i=o[n.pos++],r|=(127&i)<<17,i<128)return s(t,r,e);if(i=o[n.pos++],r|=(127&i)<<24,i<128)return s(t,r,e);if(i=o[n.pos++],r|=(1&i)<<31,i<128)return s(t,r,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(n=r[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=12&&o?function(t,e,n){return o.decode(t.subarray(e,n))}(this.buf,e,t):function(t,e,n){var r="",i=e;for(;i239?4:u>223?3:u>191?2:1;if(i+l>n)break;1===l?u<128&&(c=u):2===l?128==(192&(o=t[i+1]))&&(c=(31&u)<<6|63&o)<=127&&(c=null):3===l?(o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&((c=(15&u)<<12|(63&o)<<6|63&a)<=2047||c>=55296&&c<=57343)&&(c=null)):4===l&&(o=t[i+1],a=t[i+2],s=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&((c=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||c>=1114112)&&(c=null)),null===c?(c=65533,l=1):c>65535&&(c-=65536,r+=String.fromCharCode(c>>>10&1023|55296),c=56320|1023&c),r+=String.fromCharCode(c),i+=l}return r}(this.buf,e,t)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==i.Bytes)return t.push(this.readVarint(e));var n=a(this);for(t=t||[];this.pos127;);else if(e===i.Bytes)this.pos=this.readVarint()+this.pos;else if(e===i.Fixed32)this.pos+=4;else{if(e!==i.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e268435455||t<0?function(t,e){var n,r;t>=0?(n=t%4294967296|0,r=t/4294967296|0):(r=~(-t/4294967296),4294967295^(n=~(-t%4294967296))?n=n+1|0:(n=0,r=r+1|0));if(t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,n){n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos]=127&t}(n,0,e),function(t,e){var n=(7&t)<<4;if(e.buf[e.pos++]|=n|((t>>>=3)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;e.buf[e.pos++]=127&t}(r,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,n){for(var r,i,o=0;o55295&&r<57344){if(!i){r>56319||o+1===e.length?(t[n++]=239,t[n++]=191,t[n++]=189):i=r;continue}if(r<56320){t[n++]=239,t[n++]=191,t[n++]=189,i=r;continue}r=i-55296<<10|r-56320|65536,i=null}else i&&(t[n++]=239,t[n++]=191,t[n++]=189,i=null);r<128?t[n++]=r:(r<2048?t[n++]=r>>6|192:(r<65536?t[n++]=r>>12|224:(t[n++]=r>>18|240,t[n++]=r>>12&63|128),t[n++]=r>>6&63|128),t[n++]=63&r|128)}return n}(this.buf,t,this.pos);var n=this.pos-e;n>=128&&u(e,n,this),this.pos=e-1,this.writeVarint(n),this.pos+=n},writeFloat:function(t){this.realloc(4),r.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),r.write(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var n=0;n=128&&u(n,r,this),this.pos=n-1,this.writeVarint(r),this.pos+=r},writeMessage:function(t,e,n){this.writeTag(t,i.Bytes),this.writeRawMessage(e,n)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,c,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,l,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,p,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,h,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,f,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,d,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,A,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,g,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,m,e)},writeBytesField:function(t,e){this.writeTag(t,i.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,i.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,i.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,i.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,i.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,i.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,i.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,i.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,i.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,i.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}}},function(t,e,n){const r=n(285),i={"||":function(t,e){return t||e},"&&":function(t,e){return t&&e},"|":function(t,e){return t|e},"^":function(t,e){return t^e},"&":function(t,e){return t&e},"==":function(t,e){return t==e},"!=":function(t,e){return t!=e},"===":function(t,e){return t===e},"!==":function(t,e){return t!==e},"<":function(t,e){return t":function(t,e){return t>e},"<=":function(t,e){return t<=e},">=":function(t,e){return t>=e},"<<":function(t,e){return t<>":function(t,e){return t>>e},">>>":function(t,e){return t>>>e},"+":function(t,e){return t+e},"-":function(t,e){return t-e},"*":function(t,e){return t*e},"/":function(t,e){return t/e},"%":function(t,e){return t%e}},o={"-":function(t){return-t},"+":function(t){return+t},"~":function(t){return~t},"!":function(t){return!t}};function a(t,e){return t.map((function(t){return l(t,e)}))}async function s(t,e){return await Promise.all(t.map(t=>h(t,e)))}function u(t,e){const n=l(t.object,e);return t.computed?[n,n[l(t.property,e)]]:[n,n[t.property.name]]}async function c(t,e){const n=await h(t.object,e);return t.computed?[n,n[await h(t.property,e)]]:[n,n[t.property.name]]}function l(t,e){switch(t.type){case"ArrayExpression":return a(t.elements,e);case"BinaryExpression":return i[t.operator](l(t.left,e),l(t.right,e));case"CallExpression":let n,r,s;if("MemberExpression"===t.callee.type?(s=u(t.callee,e),n=s[0],r=s[1]):r=l(t.callee,e),"function"!=typeof r)return;return r.apply(n,a(t.arguments,e));case"ConditionalExpression":return l(t.test,e)?l(t.consequent,e):l(t.alternate,e);case"Identifier":return e[t.name];case"Literal":return t.value;case"LogicalExpression":return"||"===t.operator?l(t.left,e)||l(t.right,e):"&&"===t.operator?l(t.left,e)&&l(t.right,e):i[t.operator](l(t.left,e),l(t.right,e));case"MemberExpression":return u(t,e)[1];case"ThisExpression":return e;case"UnaryExpression":return o[t.operator](l(t.argument,e));default:return}}async function h(t,e){switch(t.type){case"ArrayExpression":return await s(t.elements,e);case"BinaryExpression":{const[n,r]=await Promise.all([h(t.left,e),h(t.right,e)]);return i[t.operator](n,r)}case"CallExpression":let n,r,a;if("MemberExpression"===t.callee.type?(a=await c(t.callee,e),n=a[0],r=a[1]):r=await h(t.callee,e),"function"!=typeof r)return;return await r.apply(n,await s(t.arguments,e));case"ConditionalExpression":return await h(t.test,e)?await h(t.consequent,e):await h(t.alternate,e);case"Identifier":return e[t.name];case"Literal":return t.value;case"LogicalExpression":{if("||"===t.operator)return await h(t.left,e)||await h(t.right,e);if("&&"===t.operator)return await h(t.left,e)&&await h(t.right,e);const[n,r]=await Promise.all([h(t.left,e),h(t.right,e)]);return i[t.operator](n,r)}case"MemberExpression":return(await c(t,e))[1];case"ThisExpression":return e;case"UnaryExpression":return o[t.operator](await h(t.argument,e));default:return}}t.exports={parse:r,eval:l,evalAsync:h,compile:function(t){return l.bind(null,r(t))},compileAsync:function(t){return h.bind(null,r(t))}}},function(t,e,n){"use strict";var r=n(77),i=n(205),o=n(187);function a(t){return s(function t(e,n){return e.map(e=>(e instanceof i.a||(Object(o.a)("string"!=typeof e,"Shader module use by name is deprecated. Import shader module '".concat(e,"' and use it directly.")),Object(o.a)(e.name,"shader module has no name"),(e=new i.a(e)).dependencies=t(e.dependencies)),e))}(t))}function s(t){const e={},n={};return u({modules:t,level:0,moduleMap:e,moduleDepth:n}),Object.keys(n).sort((t,e)=>n[e]-n[t]).map(t=>e[t])}function u(t){let{modules:e,level:n,moduleMap:r,moduleDepth:i}=t;if(n>=5)throw new Error("Possible loop in shader dependency graph");for(const t of e)r[t.name]=t,(void 0===i[t.name]||i[t.name]0&&void 0!==arguments[0]?arguments[0]:{};const e="undefined"!=typeof window&&window.navigator||{},n=t.userAgent||e.userAgent||"",r=-1!==n.indexOf("MSIE "),i=-1!==n.indexOf("Trident/");return r||i}const l={GLSL_FRAG_DATA:["WEBGL_draw_buffers",!0],GLSL_FRAG_DEPTH:["EXT_frag_depth",!0],GLSL_DERIVATIVES:["OES_standard_derivatives",!0],GLSL_TEXTURE_LOD:["EXT_shader_texture_lod",!0]},h={};Object.keys(l).forEach(t=>{h[t]=t});const f={};function p(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=l[e];if(Object(o.a)(r,e),!c(n))return!0;if(e in f)return f[e];const i=r[0],a=n.behavior||"enable",s="#extension GL_".concat(i," : ").concat(a,"\nvoid main(void) {}"),u=t.createShader(35633);t.shaderSource(u,s),t.compileShader(u);const h=t.getShaderParameter(u,35713);return t.deleteShader(u),f[e]=h,h}function d(t,e){const n=l[e];Object(o.a)(n,e);const r=function(t){return"undefined"!=typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext||Boolean(t&&2===t._version)}(t)&&n[1]||n[0],i="string"==typeof r?Boolean(t.getExtension(r)):r;return Object(o.a)(!1===i||!0===i),i}function A(t,e){return(e=Array.isArray(e)?e:[e]).every(e=>d(t,e))}var g=n(191);function m(t){return new RegExp("\\b".concat(t,"[ \\t]+(\\w+[ \\t]+\\w+(\\[\\w+\\])?;)"),"g")}const y=[[/^(#version[ \t]+(100|300[ \t]+es))?[ \t]*\n/,"#version 300 es\n"],[/\btexture(2D|2DProj|Cube)Lod(EXT)?\(/g,"textureLod("],[/\btexture(2D|2DProj|Cube)(EXT)?\(/g,"texture("]],v=[...y,[m("attribute"),"in $1"],[m("varying"),"out $1"]],_=[...y,[m("varying"),"in $1"]],b=[[/^#version[ \t]+300[ \t]+es/,"#version 100"],[/\btexture(2D|2DProj|Cube)Lod\(/g,"texture$1LodEXT("],[/\btexture\(/g,"texture2D("],[/\btextureLod\(/g,"texture2DLodEXT("]],x=[...b,[m("in"),"attribute $1"],[m("out"),"varying $1"]],w=[...b,[m("in"),"varying $1"]],E=/\bout[ \t]+vec4[ \t]+(\w+)[ \t]*;\n?/,O=/void\s+main\s*\([^)]*\)\s*\{\n?/;function S(t,e,n){switch(e){case 300:return n?T(t,v):function(t){const e=(t=T(t,_)).match(E);if(e){const n=e[1];t=t.replace(new RegExp("\\b".concat("gl_FragColor","\\b"),"g"),n)}else{const e="fragmentColor";t=t.replace(O,t=>"out vec4 ".concat(e,";\n").concat(t)).replace(new RegExp("\\b".concat("gl_FragColor","\\b"),"g"),e)}return t}(t);case 100:return n?T(t,x):function(t){const e=(t=T(t,w)).match(E);if(e){const n=e[1];t=t.replace(E,"").replace(new RegExp("\\b".concat(n,"\\b"),"g"),"gl_FragColor")}return t}(t);default:throw new Error("unknown GLSL version ".concat(e))}}function T(t,e){for(const[n,r]of e)t=t.replace(n,r);return t}const C="\n\n".concat(g.a,"\n\n"),P={[r.b]:"vertex",[r.a]:"fragment"};function M(t,e){let{id:n,source:i,type:a,modules:s,defines:u={},hookFunctions:c=[],inject:l={},transpileToGLSL100:f=!1,prologue:d=!0,log:m}=e;Object(o.a)("string"==typeof i,"shader source must be a string");const y=a===r.b,v=i.split("\n");let _=100,b="",x=i;0===v[0].indexOf("#version ")?(_=300,b=v[0],x=v.slice(1).join("\n")):b="#version ".concat(_);const w={};s.forEach(t=>{Object.assign(w,t.getDefines())}),Object.assign(w,u);let E=d?"".concat(b,"\n").concat(function(t){let{id:e,source:n,type:r}=t;return e&&"string"==typeof e&&-1===n.indexOf("SHADER_NAME")?"\n#define SHADER_NAME ".concat(e,"_").concat(P[r],"\n\n"):""}({id:n,source:i,type:a}),"\n").concat(function(t){let{type:e}=t;return"\n#define SHADER_TYPE_".concat(P[e].toUpperCase(),"\n")}({type:a}),"\n").concat(function(t){switch(function(t){const e=t.getExtension("WEBGL_debug_renderer_info"),n=t.getParameter(e&&e.UNMASKED_VENDOR_WEBGL||7936),r=t.getParameter(e&&e.UNMASKED_RENDERER_WEBGL||7937);return{gpuVendor:function(t,e){if(t.match(/NVIDIA/i)||e.match(/NVIDIA/i))return"NVIDIA";if(t.match(/INTEL/i)||e.match(/INTEL/i))return"INTEL";if(t.match(/AMD/i)||e.match(/AMD/i)||t.match(/ATI/i)||e.match(/ATI/i))return"AMD";return"UNKNOWN GPU"}(n,r),vendor:n,renderer:r,version:t.getParameter(7938),shadingLanguageVersion:t.getParameter(35724)}}(t).gpuVendor.toLowerCase()){case"nvidia":return"#define NVIDIA_GPU\n// Nvidia optimizes away the calculation necessary for emulated fp64\n#define LUMA_FP64_CODE_ELIMINATION_WORKAROUND 1\n";case"intel":return"#define INTEL_GPU\n// Intel optimizes away the calculation necessary for emulated fp64\n#define LUMA_FP64_CODE_ELIMINATION_WORKAROUND 1\n// Intel's built-in 'tan' function doesn't have acceptable precision\n#define LUMA_FP32_TAN_PRECISION_WORKAROUND 1\n// Intel GPU doesn't have full 32 bits precision in same cases, causes overflow\n#define LUMA_FP64_HIGH_BITS_OVERFLOW_WORKAROUND 1\n";case"amd":return"#define AMD_GPU\n";default:return"#define DEFAULT_GPU\n// Prevent driver from optimizing away the calculation necessary for emulated fp64\n#define LUMA_FP64_CODE_ELIMINATION_WORKAROUND 1\n// Intel's built-in 'tan' function doesn't have acceptable precision\n#define LUMA_FP32_TAN_PRECISION_WORKAROUND 1\n// Intel GPU doesn't have full 32 bits precision in same cases, causes overflow\n#define LUMA_FP64_HIGH_BITS_OVERFLOW_WORKAROUND 1\n"}}(t),"\n").concat(function(t,e,n){let r="#if (__VERSION__ > 120)\n\n# define FEATURE_GLSL_DERIVATIVES\n# define FEATURE_GLSL_DRAW_BUFFERS\n# define FEATURE_GLSL_FRAG_DEPTH\n# define FEATURE_GLSL_TEXTURE_LOD\n\n// DEPRECATED FLAGS, remove in v9\n# define FRAG_DEPTH\n# define DERIVATIVES\n# define DRAW_BUFFERS\n# define TEXTURE_LOD\n\n#endif // __VERSION\n";return A(t,h.GLSL_FRAG_DEPTH)&&(r+="\n// FRAG_DEPTH => gl_FragDepth is available\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n# define FEATURE_GLSL_FRAG_DEPTH\n# define FRAG_DEPTH\n# define gl_FragDepth gl_FragDepthEXT\n#endif\n"),A(t,h.GLSL_DERIVATIVES)&&p(t,h.GLSL_DERIVATIVES)&&(r+="\n// DERIVATIVES => dxdF, dxdY and fwidth are available\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n# define FEATURE_GLSL_DERIVATIVES\n# define DERIVATIVES\n#endif\n"),A(t,h.GLSL_FRAG_DATA)&&p(t,h.GLSL_FRAG_DATA,{behavior:"require"})&&(r+="\n// DRAW_BUFFERS => gl_FragData[] is available\n#ifdef GL_EXT_draw_buffers\n#extension GL_EXT_draw_buffers : require\n#define FEATURE_GLSL_DRAW_BUFFERS\n#define DRAW_BUFFERS\n#endif\n"),A(t,h.GLSL_TEXTURE_LOD)&&(r+="// TEXTURE_LOD => texture2DLod etc are available\n#ifdef GL_EXT_shader_texture_lod\n#extension GL_EXT_shader_texture_lod : enable\n\n# define FEATURE_GLSL_TEXTURE_LOD\n# define TEXTURE_LOD\n\n#endif\n"),r}(t),"\n").concat(function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=0,n="";for(const r in t){0===e&&(n+="\n// APPLICATION DEFINES\n"),e++;const i=t[r];(i||Number.isFinite(i))&&(n+="#define ".concat(r.toUpperCase()," ").concat(t[r],"\n"))}0===e&&(n+="\n");return n}(w),"\n").concat(y?"":"precision highp float;\n\n","\n"):"".concat(b,"\n");const O=function(t){const e={vs:{},fs:{}};return t.forEach(t=>{let n;"string"!=typeof t?(n=t,t=n.hook):n={},t=t.trim();const[r,i]=t.split(":"),o=t.replace(/\(.+/,"");e[r][o]=Object.assign(n,{signature:i})}),e}(c),T={},M={},I={};for(const t in l){const e="string"==typeof l[t]?{injection:l[t],order:0}:l[t],n=t.match(/^(v|f)s:(#)?([\w-]+)$/);if(n){const r=n[2],i=n[3];r?"decl"===i?M[t]=[e]:I[t]=[e]:T[t]=[e]}else I[t]=[e]}for(const t of s){m&&t.checkDeprecations(x,m);E+=t.getModuleSource(a,_);const e=t.injections[a];for(const t in e){const n=t.match(/^(v|f)s:#([\w-]+)$/);if(n){const r="decl"===n[2]?M:I;r[t]=r[t]||[],r[t].push(e[t])}else T[t]=T[t]||[],T[t].push(e[t])}}return E+=C,E=Object(g.c)(E,a,M),E+=function(t,e){let n="";for(const r in t){const i=t[r];if(n+="void ".concat(i.signature," {\n"),i.header&&(n+=" ".concat(i.header)),e[r]){const t=e[r];t.sort((t,e)=>t.order-e.order);for(const e of t)n+=" ".concat(e.injection,"\n")}i.footer&&(n+=" ".concat(i.footer)),n+="}\n"}return n}(O[a],T),E+=x,E=Object(g.c)(E,a,I),E=S(E,f?100:_,y),E}function I(t){return function(e){const n={};for(const r of t){const t=r.getUniforms(e,n);Object.assign(n,t)}return n}}var B=n(321);n.d(e,"a",(function(){return R}));class R{static getDefaultProgramManager(t){return t.luma=t.luma||{},t.luma.defaultProgramManager=t.luma.defaultProgramManager||new R(t),t.luma.defaultProgramManager}constructor(t){this.gl=t,this._programCache={},this._getUniforms={},this._registeredModules={},this._hookFunctions=[],this._defaultModules=[],this._hashes={},this._hashCounter=0,this.stateHash=0,this._useCounts={}}addDefaultModule(t){this._defaultModules.find(e=>e.name===t.name)||this._defaultModules.push(t),this.stateHash++}removeDefaultModule(t){const e="string"==typeof t?t:t.name;this._defaultModules=this._defaultModules.filter(t=>t.name!==e),this.stateHash++}addShaderHook(t,e){e&&(t=Object.assign(e,{hook:t})),this._hookFunctions.push(t),this.stateHash++}get(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{vs:e="",fs:n="",defines:i={},inject:o={},varyings:s=[],bufferMode:u=35981,transpileToGLSL100:c=!1}=t,l=this._getModuleList(t.modules),h=this._getHash(e),f=this._getHash(n),p=l.map(t=>this._getHash(t.name)).sort(),d=s.map(t=>this._getHash(t)),A=Object.keys(i).sort(),g=Object.keys(o).sort(),m=[],y=[];for(const t of A)m.push(this._getHash(t)),m.push(this._getHash(i[t]));for(const t of g)y.push(this._getHash(t)),y.push(this._getHash(o[t]));const v="".concat(h,"/").concat(f,"D").concat(m.join("/"),"M").concat(p.join("/"),"I").concat(y.join("/"),"V").concat(d.join("/"),"H").concat(this.stateHash,"B").concat(u).concat(c?"T":"");if(!this._programCache[v]){const t=function(t,e){const{vs:n,fs:i}=e,o=a(e.modules||[]);return{gl:t,vs:M(t,Object.assign({},e,{source:n,type:r.b,modules:o})),fs:M(t,Object.assign({},e,{source:i,type:r.a,modules:o})),getUniforms:I(o)}}(this.gl,{vs:e,fs:n,modules:l,inject:o,defines:i,hookFunctions:this._hookFunctions,transpileToGLSL100:c});this._programCache[v]=new B.a(this.gl,{hash:v,vs:t.vs,fs:t.fs,varyings:s,bufferMode:u}),this._getUniforms[v]=t.getUniforms||(t=>{}),this._useCounts[v]=0}return this._useCounts[v]++,this._programCache[v]}getUniforms(t){return this._getUniforms[t.hash]||null}release(t){const e=t.hash;this._useCounts[e]--,0===this._useCounts[e]&&(this._programCache[e].delete(),delete this._programCache[e],delete this._getUniforms[e],delete this._useCounts[e])}_getHash(t){return void 0===this._hashes[t]&&(this._hashes[t]=this._hashCounter++),this._hashes[t]}_getModuleList(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const e=new Array(this._defaultModules.length+t.length),n={};let r=0;for(let t=0,i=this._defaultModules.length;tNumber.isFinite(t)&&(!("max"in e)||t<=e.max)&&(!("min"in e)||t>=e.min)},array:{validate:(t,e)=>Array.isArray(t)||ArrayBuffer.isView(t)}};function o(t){let e=a(t);return"object"===e?t?"type"in t?Object.assign({},t,i[t.type]):"value"in t?(e=a(t.value),Object.assign({type:e},t,i[e])):{type:"object",value:t}:{type:"object",value:null}:Object.assign({type:e,value:t},i[e])}function a(t){return Array.isArray(t)||ArrayBuffer.isView(t)?"array":typeof t}n.d(e,"a",(function(){return s})),n.d(e,"b",(function(){return u}));class s{constructor(t){let{name:e,vs:n,fs:i,dependencies:a=[],uniforms:s,getUniforms:u,deprecations:c=[],defines:l={},inject:h={},vertexShader:f,fragmentShader:p}=t;Object(r.a)("string"==typeof e),this.name=e,this.vs=n||f,this.fs=i||p,this.getModuleUniforms=u,this.dependencies=a,this.deprecations=this._parseDeprecationDefinitions(c),this.defines=l,this.injections=function(t){const e={vs:{},fs:{}};for(const n in t){let r=t[n];const i=n.slice(0,2);"string"==typeof r&&(r={order:0,injection:r}),e[i][n]=r}return e}(h),s&&(this.uniforms=function(t){const e={};for(const n in t){const r=o(t[n]);e[n]=r}return e}(s))}getModuleSource(t){let e;switch(t){case"vs":e=this.vs||"";break;case"fs":e=this.fs||"";break;default:Object(r.a)(!1)}return"#define MODULE_".concat(this.name.toUpperCase().replace(/[^0-9a-z]/gi,"_"),"\n").concat(e,"// END MODULE_").concat(this.name,"\n\n")}getUniforms(t,e){return this.getModuleUniforms?this.getModuleUniforms(t,e):this.uniforms?this._defaultGetUniforms(t):{}}getDefines(){return this.defines}checkDeprecations(t,e){this.deprecations.forEach(n=>{n.regex.test(t)&&(n.deprecated?e.deprecated(n.old,n.new)():e.removed(n.old,n.new)())})}_parseDeprecationDefinitions(t){return t.forEach(t=>{switch(t.type){case"function":t.regex=new RegExp("\\b".concat(t.old,"\\("));break;default:t.regex=new RegExp("".concat(t.type," ").concat(t.old,";"))}}),t}_defaultGetUniforms(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e={},n=this.uniforms;for(const i in n){const o=n[i];i in t&&!o.private?(o.validate&&Object(r.a)(o.validate(t[i],o),"".concat(this.name,": invalid ").concat(i)),e[i]=t[i]):e[i]=o.value}return e}}function u(t){if(!t.normalized&&(t.normalized=!0,t.uniforms&&!t.getUniforms)){const e=new s(t);t.getUniforms=e.getUniforms.bind(e)}return t}},function(t,e,n){"use strict";var r=n(33),i=n(74),o=n(54),a=n(7),s=n(53),u=n(10);function c(t){switch(t){case 6406:case 33326:case 6403:return 1;case 33328:case 33319:return 2;case 6407:case 34837:return 3;case 6408:case 34836:return 4;default:return Object(u.a)(!1),0}}var l=n(236);function h(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{sourceX:n=0,sourceY:r=0,sourceFormat:i=6408}=e;let{sourceAttachment:o=36064,target:a=null,sourceWidth:c,sourceHeight:l,sourceType:h}=e;const{framebuffer:f,deleteFramebuffer:p}=A(t);Object(u.a)(f);const{gl:d,handle:m,attachments:y}=f;c=c||f.width,l=l||f.height,36064===o&&null===m&&(o=1028),Object(u.a)(y[o]),h=h||y[o].type,a=g(a,h,i,c,l),h=h||Object(s.b)(a);const v=d.bindFramebuffer(36160,m);return d.readPixels(n,r,c,l,i,h,a),d.bindFramebuffer(36160,v||null),p&&f.delete(),a}function f(t,e){let{sourceX:n=0,sourceY:i=0,sourceFormat:o=6408,target:s=null,targetByteOffset:l=0,sourceWidth:h,sourceHeight:f,sourceType:p}=e;const{framebuffer:d,deleteFramebuffer:g}=A(t);Object(u.a)(d),h=h||d.width,f=f||d.height;const m=Object(a.a)(d.gl);if(p=p||(s?s.type:5121),!s){const t=c(o),e=function(t){switch(t){case 5121:return 1;case 33635:case 32819:case 32820:return 2;case 5126:return 4;default:return Object(u.a)(!1),0}}(p),n=l+h*f*t*e;s=new r.a(m,{byteLength:n,accessor:{type:p,size:t}})}return s.bind({target:35051}),Object(a.o)(m,{framebuffer:d},()=>{m.readPixels(n,i,h,f,o,p,l)}),s.unbind({target:35051}),g&&d.delete(),s}function p(t){let{sourceAttachment:e=36064,targetMaxHeight:n=Number.MAX_SAFE_INTEGER}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=h(t,{sourceAttachment:e}),{width:i,height:o}=t;for(;o>n;)({data:r,width:i,height:o}=Object(s.d)({data:r,width:i,height:o}));Object(s.a)({data:r,width:i,height:o});const a=document.createElement("canvas");a.width=i,a.height=o;const u=a.getContext("2d"),c=u.createImageData(i,o);return c.data.set(r),u.putImageData(c,0,0),a.toDataURL()}function d(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{sourceX:r=0,sourceY:i=0,targetMipmaplevel:s=0,targetInternalFormat:c=6408}=n;let{targetX:l,targetY:h,targetZ:f,width:p,height:d}=n;const{framebuffer:g,deleteFramebuffer:m}=A(t);Object(u.a)(g);const{gl:y,handle:v}=g,_=void 0!==l||void 0!==h||void 0!==f;l=l||0,h=h||0,f=f||0;const b=y.bindFramebuffer(36160,v);Object(u.a)(e);let x=null;if(e instanceof o.a&&(x=e,p=Number.isFinite(p)?p:x.width,d=Number.isFinite(d)?d:x.height,x.bind(0),e=x.target),_)switch(e){case 3553:case 34067:y.copyTexSubImage2D(e,s,l,h,r,i,p,d);break;case 35866:case 32879:Object(a.a)(y).copyTexSubImage3D(e,s,l,h,f,r,i,p,d)}else y.copyTexImage2D(e,s,c,r,i,p,d,0);return x&&x.unbind(),y.bindFramebuffer(36160,b||null),m&&g.delete(),x}function A(t){return t instanceof i.a?{framebuffer:t,deleteFramebuffer:!1}:{framebuffer:Object(l.b)(t),deleteFramebuffer:!0}}function g(t,e,n,r,i){if(t)return t;e=e||5121;return new(Object(s.c)(e,{clamped:!1}))(r*i*c(n))}n.d(e,"c",(function(){return h})),n.d(e,"d",(function(){return f})),n.d(e,"a",(function(){return p})),n.d(e,"b",(function(){return d}))},,,,,,,,function(t,e,n){var r=n(194).default,i=n(261);t.exports=function(t){var e=i(t,"string");return"symbol"===r(e)?e:String(e)},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(22),i=n(45),o=n(46),a=n(105);async function s(t,e,n,s){Array.isArray(e)||Object(i.a)(e)||(void 0,n=e,e=void 0);const u=Object(o.a)(n);let c=t;return"string"==typeof t&&(c=await u(t)),Object(r.b)(t)&&(c=await u(t)),await Object(a.a)(c,e,n)}},function(t,e){},function(t,e,n){"use strict";var r=n(104);e.a={name:"project32",dependencies:[r.a],vs:"\nvec4 project_position_to_clipspace(\n vec3 position, vec3 position64Low, vec3 offset, out vec4 commonPosition\n) {\n vec3 projectedPosition = project_position(position, position64Low);\n mat3 rotation;\n if (project_needs_rotation(projectedPosition, rotation)) {\n // offset is specified as ENU\n // when in globe projection, rotate offset so that the ground alighs with the surface of the globe\n offset = rotation * offset;\n }\n commonPosition = vec4(projectedPosition + offset, 1.0);\n return project_common_position_to_clipspace(commonPosition);\n}\n\nvec4 project_position_to_clipspace(\n vec3 position, vec3 position64Low, vec3 offset\n) {\n vec4 commonPosition;\n return project_position_to_clipspace(position, position64Low, offset, commonPosition);\n}\n"}},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var r=n(3),i=n.n(r),o=n(4),a=n.n(o),s=n(0),u=n.n(s),c=n(61),l=function(){function t(e){i()(this,t),e&&(this.opts=e)}return a()(t,[{key:"equals",value:function(t){return this===t||this.constructor===t.constructor&&Object(c.a)(this.opts,t.opts)}},{key:"getShaders",value:function(t){return null}},{key:"getSubLayerProps",value:function(t){var e=t.constructor.defaultProps,n={updateTriggers:{}};for(var r in e)if(r in this.props){var i=e[r],o=this.props[r];n[r]=o,i&&"accessor"===i.type&&(n.updateTriggers[r]=this.props.updateTriggers[r],"function"==typeof o&&(n[r]=this.getSubLayerAccessor(o)))}return n}},{key:"initializeState",value:function(t,e){}},{key:"updateState",value:function(t,e){}},{key:"draw",value:function(t,e){}},{key:"finalizeState",value:function(t,e){}}]),t}();u()(l,"defaultProps",{})},function(t,e,n){"use strict";n.d(e,"a",(function(){return A}));var r=n(3),i=n.n(r),o=n(4),a=n.n(o),s=n(0),u=n.n(s),c=n(52),l=n(68),h=n(29),f=n(33);function p(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return d(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0)){if(!this.props.throttleRequests)return Promise.resolve({done:()=>{}});if(this.requestMap.has(t))return this.requestMap.get(t);const n={handle:t,priority:0,getPriority:e},r=new Promise(t=>(n.resolve=t,n));return this.requestQueue.push(n),this.requestMap.set(t,r),this._issueNewRequests(),r}_issueRequest(t){const{handle:e,resolve:n}=t;let r=!1;const i=()=>{r||(r=!0,this.requestMap.delete(e),this.activeRequestCount--,this._issueNewRequests())};return this.activeRequestCount++,n?n({done:i}):Promise.resolve({done:i})}_issueNewRequests(){this.deferredUpdate||(this.deferredUpdate=setTimeout(()=>this._issueNewRequestsAsync(),0))}_issueNewRequestsAsync(){this.deferredUpdate=null;const t=Math.max(this.props.maxRequests-this.activeRequestCount,0);if(0!==t){this._updateAllRequests();for(let e=0;et.priority-e.priority)}_updateRequest(t){return t.priority=t.getPriority(t.handle),!(t.priority<0)||(t.resolve(null),!1)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r={name:"JSON",id:"json",module:"json",version:"3.2.10",extensions:["json","geojson"],mimeTypes:["application/json"],category:"json",text:!0,parseTextSync:i,parse:async t=>i((new TextDecoder).decode(t)),options:{}};function i(t){return JSON.parse(t)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return y}));var r=n(3),i=n.n(r),o=n(4),a=n.n(o),s=n(5),u=n.n(s),c=n(6),l=n.n(c),h=n(1),f=n.n(h),p=n(0),d=n.n(p),A=n(297),g=n(12);function m(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=f()(t);if(e){var i=f()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return l()(this,n)}}var y=function(t){u()(n,t);var e=m(n);function n(){return i()(this,n),e.apply(this,arguments)}return a()(n,[{key:"getGeometry",value:function(t){return new A.a}},{key:"draw",value:function(t){var e=t.uniforms,n=this.props,r=n.elevationScale,i=n.extruded,o=n.offset,a=n.coverage,s=n.cellSize,u=n.angle,c=n.radiusUnits;this.state.model.setUniforms(e).setUniforms({radius:s/2,radiusUnits:g.e[c],angle:u,offset:o,extruded:i,coverage:a,elevationScale:r,edgeDistance:1,isWireframe:!1}).draw()}}]),n}(n(167).a);d()(y,"layerName","GridCellLayer"),d()(y,"defaultProps",{cellSize:{type:"number",min:0,value:1e3},offset:{type:"array",value:[1,1]}})},function(t,e,n){"use strict";n.d(e,"a",(function(){return T}));var r=n(3),i=n.n(r),o=n(4),a=n.n(o),s=n(5),u=n.n(s),c=n(6),l=n.n(c),h=n(1),f=n.n(h),p=n(0),d=n.n(p),A=n(21),g=n(52),m=n(198),y=n(116),v=n(117),_=n(64),b=n(182);function x(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return w(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return w(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function w(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:{},n=this.props,r=n.data,i=n.getPolygon,o=n.positionFormat,a=n._normalize,s=[],u="XY"===o?2:3,c=e.startRow,l=e.endRow,h=Object(g.a)(r,c,l),f=h.iterable,p=h.objectInfo,d=x(f);try{for(d.s();!(t=d.n()).done;){var A=t.value;p.index++;var m=i(A,p);a&&(m=_.d(m,u));var y=m,v=y.holeIndices,b=m.positions||m;if(v)for(var w=0;w<=v.length;w++){var E=b.slice(v[w-1]||0,v[w]||b.length);s.push(this.getSubLayerRow({path:E},A,p.index))}else s.push(this.getSubLayerRow({path:b},A,p.index))}}catch(t){d.e(t)}finally{d.f()}return s}},{key:"renderLayers",value:function(){var t=this.props,e=t.data,n=t._dataDiff,r=t.stroked,i=t.filled,o=t.extruded,a=t.wireframe,s=t._normalize,u=t._windingOrder,c=t.elevationScale,l=t.transitions,h=t.positionFormat,f=this.props,p=f.lineWidthUnits,d=f.lineWidthScale,A=f.lineWidthMinPixels,g=f.lineWidthMaxPixels,m=f.lineJointRounded,_=f.lineMiterLimit,b=f.lineDashJustified,x=this.props,w=x.getFillColor,E=x.getLineColor,S=x.getLineWidth,T=x.getLineDashArray,C=x.getElevation,P=x.getPolygon,M=x.updateTriggers,I=x.material,B=this.state,R=B.paths,k=B.pathsDiff,D=this.getSubLayerClass("fill",y.a),L=this.getSubLayerClass("stroke",v.a),j=this.shouldRenderSubLayer("fill",R)&&new D({_dataDiff:n,extruded:o,elevationScale:c,filled:i,wireframe:a,_normalize:s,_windingOrder:u,getElevation:C,getFillColor:w,getLineColor:o&&a?E:O,material:I,transitions:l},this.getSubLayerProps({id:"fill",updateTriggers:M&&{getPolygon:M.getPolygon,getElevation:M.getElevation,getFillColor:M.getFillColor,lineColors:o&&a,getLineColor:M.getLineColor}}),{data:e,positionFormat:h,getPolygon:P});return[!o&&j,!o&&r&&this.shouldRenderSubLayer("stroke",R)&&new L({_dataDiff:k&&function(){return k},widthUnits:p,widthScale:d,widthMinPixels:A,widthMaxPixels:g,jointRounded:m,miterLimit:_,dashJustified:b,_pathType:"loop",transitions:l&&{getWidth:l.getLineWidth,getColor:l.getLineColor,getPath:l.getPolygon},getColor:this.getSubLayerAccessor(E),getWidth:this.getSubLayerAccessor(S),getDashArray:this.getSubLayerAccessor(T)},this.getSubLayerProps({id:"stroke",updateTriggers:M&&{getWidth:M.getLineWidth,getColor:M.getLineColor,getDashArray:M.getLineDashArray}}),{data:R,positionFormat:h,getPath:function(t){return t.path}}),o&&j]}}]),n}(m.a);d()(T,"layerName","PolygonLayer"),d()(T,"defaultProps",S)},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(136);function i(t){try{return JSON.parse(t)}catch(e){throw new Error('Failed to parse JSON from data starting with "'.concat(Object(r.a)(t),'"'))}}},function(t,e){e.read=function(t,e,n,r,i){var o,a,s=8*i-r-1,u=(1<>1,l=-7,h=n?i-1:0,f=n?-1:1,p=t[e+h];for(h+=f,o=p&(1<<-l)-1,p>>=-l,l+=s;l>0;o=256*o+t[e+h],h+=f,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=r;l>0;a=256*a+t[e+h],h+=f,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),o-=c}return(p?-1:1)*a*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var a,s,u,c=8*o-i-1,l=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,d=r?1:-1,A=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+h>=1?f/u:f*Math.pow(2,1-h))*u>=2&&(a++,u/=2),a+h>=l?(s=0,a=l):a+h>=1?(s=(e*u-1)*Math.pow(2,i),a+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;t[n+p]=255&s,p+=d,s/=256,i-=8);for(a=a<0;t[n+p]=255&a,p+=d,a/=256,c-=8);t[n+p-d]|=128*A}},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:{};const{id:e}=t;this.id=e||Object(T.c)(this.constructor.name),this.display=!0,this.position=new O.a,this.rotation=new O.a,this.scale=new O.a(1,1,1),this.matrix=new S.a,this.userData={},this.props={},this._setScenegraphNodeProps(t)}delete(){}setProps(t){return this._setScenegraphNodeProps(t),this}toString(){return"{type: ScenegraphNode, id: ".concat(this.id,")}")}setPosition(t){return Object(C.a)(3===t.length,"setPosition requires vector argument"),this.position=t,this}setRotation(t){return Object(C.a)(3===t.length,"setRotation requires vector argument"),this.rotation=t,this}setScale(t){return Object(C.a)(3===t.length,"setScale requires vector argument"),this.scale=t,this}setMatrix(t){!(arguments.length>1&&void 0!==arguments[1])||arguments[1]?this.matrix.copy(t):this.matrix=t}setMatrixComponents(t){let{position:e,rotation:n,scale:r,update:i=!0}=t;return e&&this.setPosition(e),n&&this.setRotation(n),r&&this.setScale(r),i&&this.updateMatrix(),this}updateMatrix(){const t=this.position,e=this.rotation,n=this.scale;return this.matrix.identity(),this.matrix.translate(t),this.matrix.rotateXYZ(e),this.matrix.scale(n),this}update(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{position:e,rotation:n,scale:r}=t;return e&&this.setPosition(e),n&&this.setRotation(n),r&&this.setScale(r),this.updateMatrix(),this}getCoordinateUniforms(t,e){Object(C.a)(t),e=e||this.matrix;const n=new S.a(t).multiplyRight(e),r=n.invert(),i=r.transpose();return{viewMatrix:t,modelMatrix:e,objectMatrix:e,worldMatrix:n,worldInverseMatrix:r,worldInverseTransposeMatrix:i}}_setScenegraphNodeProps(t){"display"in t&&(this.display=t.display),"position"in t&&this.setPosition(t.position),"rotation"in t&&this.setRotation(t.rotation),"scale"in t&&this.setScale(t.scale),"matrix"in t&&this.setMatrix(t.matrix),Object.assign(this.props,t)}}var M=n(33),I=n(63);class B extends P{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t=Array.isArray(t)?{children:t}:t;const{children:e=[]}=t;w.k.assert(e.every(t=>t instanceof P),"every child must an instance of ScenegraphNode"),super(t),this.children=e}add(){for(var t=arguments.length,e=new Array(t),n=0;n-1&&e.splice(n,1),this}removeAll(){return this.children=[],this}delete(){this.children.forEach(t=>t.delete()),this.removeAll(),super.delete()}traverse(t){let{worldMatrix:e=new S.a}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=new S.a(e).multiplyRight(this.matrix);for(const e of this.children)e instanceof B?e.traverse(t,{worldMatrix:n}):t(e,{worldMatrix:n})}}var R=n(323);const k={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},D={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array};function L(t){if(!t._animation){const e=D[t.componentType],n=k[t.type],r=n*t.count,{buffer:i,byteOffset:o}=t.bufferView.data,a=new e(i,o+(t.byteOffset||0),r);if(1===n)t._animation=Array.from(a);else{const e=[];for(let t=0;tt>=s),c=Math.max(0,u-1);if(!Array.isArray(n[r]))switch(r){case"translation":n[r]=[0,0,0];break;case"rotation":n[r]=[0,0,0,1];break;case"scale":n[r]=[1,1,1];break;default:w.k.warn("Bad animation path ".concat(r))()}Object(C.a)(n[r].length===a[c].length);const l=i[c],h=i[u];switch(o){case"STEP":!function(t,e,n){for(let r=0;rl){const t=(s-l)/(h-l);!function(t,e,n,r,i){if("rotation"===e){F.slerp({start:n,target:r,ratio:i});for(let n=0;nl){const t=(s-l)/(h-l),e=h-l;!function(t,e,n){let{p0:r,outTangent0:i,inTangent1:o,p1:a,tDiff:s,ratio:u}=n;for(let n=0;n{let{sampler:n,target:r,path:i}=t;z(e,n,r,i),function(t,e){if(e.matrix.identity(),t.translation&&e.matrix.translate(t.translation),t.rotation){const n=j.fromQuaternion(t.rotation);e.matrix.multiplyRight(n)}t.scale&&e.matrix.scale(t.scale)}(r,r._node)})}}class N{constructor(t){this.animations=t.animations.map((e,n)=>{const r=e.name||"Animation-".concat(n),i=e.samplers.map(e=>{let{input:n,interpolation:r="LINEAR",output:i}=e;return{input:L(t.accessors[n]),interpolation:r,output:L(t.accessors[i])}}),o=e.channels.map(e=>{let{sampler:n,target:r}=e;return{sampler:i[n],target:t.nodes[r.node],path:r.path}});return new U({name:r,channels:o})})}animate(t){this.setTime(t)}setTime(t){this.animations.forEach(e=>e.animate(t))}getAnimations(){return this.animations}}var G=n(186);class V extends P{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(e),this.onBeforeRender=null,this.AfterRender=null,t instanceof G.a?(this.model=t,this._setModelNodeProps(e)):this.model=new G.a(t,e),this.managedResources=e.managedResources||[]}setProps(t){return super.setProps(t),this._setModelNodeProps(t),this}delete(){this.model&&(this.model.delete(),this.model=null),this.managedResources.forEach(t=>t.delete()),this.managedResources=[]}draw(){return this.model.draw(...arguments)}setUniforms(){return this.model.setUniforms(...arguments),this}setAttributes(){return this.model.setAttributes(...arguments),this}updateModuleSettings(){return this.model.updateModuleSettings(...arguments),this}_setModelNodeProps(t){this.model.setProps(t)}}var H=n(247);function W(t,e){return Object(w.j)(t)?"#version 300 es\n".concat(e):e}const q={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},X={modelOptions:{},pbrDebug:!1,imageBasedLightingEnvironment:null,lights:!0,useTangents:!1};class Z{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.gl=t,this.options=Object.assign({},X,e)}instantiate(t){this.gltf=t;return(t.scenes||[]).map(t=>this.createScene(t))}createAnimator(){return Array.isArray(this.gltf.animations)?new N(this.gltf):null}createScene(t){const e=(t.nodes||[]).map(t=>this.createNode(t));return new B({id:t.name||t.id,children:e})}createNode(t){if(!t._node){const e=(t.children||[]).map(t=>this.createNode(t));t.mesh&&e.push(this.createMesh(t.mesh));const n=new B({id:t.name||t.id,children:e});if(t.matrix)n.setMatrix(t.matrix);else{if(n.matrix.identity(),t.translation&&n.matrix.translate(t.translation),t.rotation){const e=(new S.a).fromQuaternion(t.rotation);n.matrix.multiplyRight(e)}t.scale&&n.matrix.scale(t.scale)}t._node=n}return t._node}createMesh(t){if(!t._mesh){const e=(t.primitives||[]).map((e,n)=>this.createPrimitive(e,n,t)),n=new B({id:t.name||t.id,children:e});t._mesh=n}return t._mesh}getVertexCount(t){w.k.warn("getVertexCount() not found")()}createPrimitive(t,e,n){return function(t,e){const{id:n,drawMode:r,vertexCount:i,attributes:o,modelOptions:a}=e,s=new H.a(t,e);w.k.info(4,"createGLTFModel defines: ",s.defines)();const u=[];u.push(...s.generatedTextures),u.push(...Object.values(o).map(t=>t.buffer));const c=new V(t,Object.assign({id:n,drawMode:r,vertexCount:i,modules:[E.a],defines:s.defines,parameters:s.parameters,vs:W(t,"\n#if (__VERSION__ < 300)\n #define _attr attribute\n#else\n #define _attr in\n#endif\n\n _attr vec4 POSITION;\n\n #ifdef HAS_NORMALS\n _attr vec4 NORMAL;\n #endif\n\n #ifdef HAS_TANGENTS\n _attr vec4 TANGENT;\n #endif\n\n #ifdef HAS_UV\n _attr vec2 TEXCOORD_0;\n #endif\n\n void main(void) {\n vec4 _NORMAL = vec4(0.);\n vec4 _TANGENT = vec4(0.);\n vec2 _TEXCOORD_0 = vec2(0.);\n\n #ifdef HAS_NORMALS\n _NORMAL = NORMAL;\n #endif\n\n #ifdef HAS_TANGENTS\n _TANGENT = TANGENT;\n #endif\n\n #ifdef HAS_UV\n _TEXCOORD_0 = TEXCOORD_0;\n #endif\n\n pbr_setPositionNormalTangentUV(POSITION, _NORMAL, _TANGENT, _TEXCOORD_0);\n gl_Position = u_MVPMatrix * POSITION;\n }\n"),fs:W(t,"\n#if (__VERSION__ < 300)\n #define fragmentColor gl_FragColor\n#else\n out vec4 fragmentColor;\n#endif\n\n void main(void) {\n fragmentColor = pbr_filterColor(vec4(0));\n }\n"),managedResources:u},a));return c.setProps({attributes:o}),c.setUniforms(s.uniforms),c}(this.gl,Object.assign({id:t.name||"".concat(n.name||n.id,"-primitive-").concat(e),drawMode:t.mode||4,vertexCount:t.indices?t.indices.count:this.getVertexCount(t.attributes),attributes:this.createAttributes(t.attributes,t.indices),material:t.material},this.options))}createAttributes(t,e){const n={};return Object.keys(t).forEach(e=>{n[e]=this.createAccessor(t[e],this.createBuffer(t[e],this.gl.ARRAY_BUFFER))}),e&&(n.indices=this.createAccessor(e,this.createBuffer(e,this.gl.ELEMENT_ARRAY_BUFFER))),w.k.info(4,"glTF Attributes",{attributes:t,indices:e,generated:n})(),n}createBuffer(t,e){t.bufferView||(t.bufferView={});const{bufferView:n}=t;return n.lumaBuffers||(n.lumaBuffers={}),n.lumaBuffers[e]||(n.lumaBuffers[e]=new M.a(this.gl,{id:"from-".concat(n.id),data:n.data||t.value,target:e})),n.lumaBuffers[e]}createAccessor(t,e){return new I.a({buffer:e,offset:t.byteOffset||0,stride:t.bufferView.byteStride||0,type:t.componentType,size:q[t.type]})}createSampler(t){return t}needsPOT(){return!1}}var J=n(319),Q=n(69),K=n.n(Q),Y=n(39),$=n.n(Y);function tt(){return(tt=K()($.a.mark((function t(e){var n;return $.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=[],e.scenes.forEach((function(t){t.traverse((function(t){Object.values(t.model.getUniforms()).forEach((function(t){!1===t.loaded&&n.push(t)}))}))})),t.next=4,et((function(){return n.some((function(t){return!t.loaded}))}));case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function et(t){return nt.apply(this,arguments)}function nt(){return(nt=K()($.a.mark((function t(e){return $.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e()){t.next=5;break}return t.next=3,new Promise((function(t){return requestAnimationFrame(t)}));case 3:t.next=0;break;case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var rt=n(130);function it(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ot(t){for(var e=1;e=0&&i2&&void 0!==arguments[2]?arguments[2]:{},r={pointFeatures:[],lineFeatures:[],polygonFeatures:[],polygonOutlineFeatures:[]},i=n.startRow,o=void 0===i?0:i,a=n.endRow,s=void 0===a?t.length:a,u=o;u0;)e=e[0];return e&&Number.isFinite(e[0])}(o,a))switch(o){case"Point":s.push(n({geometry:t},r,i));break;case"MultiPoint":a.forEach((function(t){s.push(n({geometry:{type:"Point",coordinates:t}},r,i))}));break;case"LineString":u.push(n({geometry:t},r,i));break;case"MultiLineString":a.forEach((function(t){u.push(n({geometry:{type:"LineString",coordinates:t}},r,i))}));break;case"Polygon":c.push(n({geometry:t},r,i)),a.forEach((function(t){l.push(n({geometry:{type:"LineString",coordinates:t}},r,i))}));break;case"MultiPolygon":a.forEach((function(t){c.push(n({geometry:{type:"Polygon",coordinates:t}},r,i)),t.forEach((function(t){l.push(n({geometry:{type:"LineString",coordinates:t}},r,i))}))}))}else k.a.warn("".concat(o," coordinates are malformed"))()}var j={Point:1,MultiPoint:2,LineString:2,MultiLineString:3,Polygon:3,MultiPolygon:4};function F(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function z(t){for(var e=1;e=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function H(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0&&o.id.startsWith("".concat(this.id,"-points-text"))&&this.state.binary&&(r.index=this.props.data.points.globalFeatureIds.value[i]),r}},{key:"_updateAutoHighlight",value:function(t){var e,n="".concat(this.id,"-points-"),r="points"===t.featureType,i=V(this.getSubLayers());try{for(i.s();!(e=i.n()).done;){var o=e.value;o.id.startsWith(n)===r&&o.updateAutoHighlight(t)}}catch(t){i.e(t)}finally{i.f()}}},{key:"_renderPolygonLayer",value:function(){var t=this.props,e=t.extruded,n=t.wireframe,r=this.state.layerProps,i="polygons-fill",o=this.shouldRenderSubLayer(i,r.polygons.data)&&this.getSubLayerClass(i,I.type);if(o){var a=R(this,I.props),s=e&&n;return s||delete a.getLineColor,a.updateTriggers.lineColors=s,new o(a,this.getSubLayerProps({id:i,updateTriggers:a.updateTriggers}),r.polygons)}return null}},{key:"_renderLineLayers",value:function(){var t=this.props,e=t.extruded,n=t.stroked,r=this.state.layerProps,i=!e&&n&&this.shouldRenderSubLayer("polygons-stroke",r.polygonsOutline.data)&&this.getSubLayerClass("polygons-stroke",M.type),o=this.shouldRenderSubLayer("linestrings",r.lines.data)&&this.getSubLayerClass("linestrings",M.type);if(i||o){var a=R(this,M.props);return[i&&new i(a,this.getSubLayerProps({id:"polygons-stroke",updateTriggers:a.updateTriggers}),r.polygonsOutline),o&&new o(a,this.getSubLayerProps({id:"linestrings",updateTriggers:a.updateTriggers}),r.lines)]}return null}},{key:"_renderPointLayers",value:function(){var t=this.props.pointType,e=this.state,n=e.layerProps,r=e.binary,o=this.props.highlightedObjectIndex;!r&&Number.isFinite(o)&&(o=n.points.data.findIndex((function(t){return t.__source.index===o})));var a,s=[],u=V(new Set(t.split("+")));try{for(u.s();!(a=u.n()).done;){var c=a.value,l="points-".concat(c),h=P[c],f=h&&this.shouldRenderSubLayer(l,n.points.data)&&this.getSubLayerClass(l,h.type);if(f){var p=R(this,h.props),d=n.points;if("text"===c&&r){var A=d.data.attributes,g=(A.instancePickingColors,i()(A,G));d=X(X({},d),{},{data:X(X({},d.data),{},{attributes:g})})}s.push(new f(p,this.getSubLayerProps({id:l,updateTriggers:p.updateTriggers,highlightedObjectIndex:o}),d))}}}catch(t){u.e(t)}finally{u.f()}return s}},{key:"renderLayers",value:function(){var t=this.props.extruded,e=this._renderPolygonLayer();return[!t&&e,this._renderLineLayers(),this._renderPointLayers(),t&&e]}},{key:"getSubLayerAccessor",value:function(t){return this.state.binary&&"function"==typeof t?function(e,n){var r=w(n.data,n.index);return t(r,n)}:l()(g()(n.prototype),"getSubLayerAccessor",this).call(this,t)}}]),n}(v.a);y()(Q,"layerName","GeoJsonLayer"),y()(Q,"defaultProps",J)},function(t,e,n){"use strict";var r=n(3),i=n.n(r),o=n(4),a=n.n(o),s=n(8),u=n.n(s),c=n(5),l=n.n(c),h=n(6),f=n.n(h),p=n(1),d=n.n(p),A=n(0),g=n.n(A),m=n(217),y=n(234),v=n(12),_=n(164),b=n(186),x=n(60);function w(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function E(t){for(var e=1;e 180.0) {\n indexDir = -1.0;\n isValid = 0.0;\n } else if (abs(currPos.x - nextPos.x) > 180.0) {\n indexDir = 1.0;\n isValid = 0.0;\n }\n nextPos = indexDir < 0.0 ? prevPos : nextPos;\n nextSegmentRatio = indexDir < 0.0 ? prevSegmentRatio : nextSegmentRatio;\n\n if (isValid == 0.0) {\n // split at the 180th meridian\n nextPos.x += nextPos.x > 0.0 ? -360.0 : 360.0;\n float t = ((currPos.x > 0.0 ? 180.0 : -180.0) - currPos.x) / (nextPos.x - currPos.x);\n currPos = mix(currPos, nextPos, t);\n segmentRatio = mix(segmentRatio, nextSegmentRatio, t);\n }\n\n vec3 currPos64Low = mix(instanceSourcePositions64Low, instanceTargetPositions64Low, segmentRatio);\n vec3 nextPos64Low = mix(instanceSourcePositions64Low, instanceTargetPositions64Low, nextSegmentRatio);\n \n curr = project_position_to_clipspace(currPos, currPos64Low, vec3(0.0), geometry.position);\n next = project_position_to_clipspace(nextPos, nextPos64Low, vec3(0.0));\n \n } else {\n vec3 source_world = instanceSourcePositions;\n vec3 target_world = instanceTargetPositions;\n if (useShortestPath) {\n source_world.x = mod(source_world.x + 180., 360.0) - 180.;\n target_world.x = mod(target_world.x + 180., 360.0) - 180.;\n\n float deltaLng = target_world.x - source_world.x;\n if (deltaLng > 180.) target_world.x -= 360.;\n if (deltaLng < -180.) source_world.x -= 360.;\n }\n source = project_position(source_world, instanceSourcePositions64Low);\n target = project_position(target_world, instanceTargetPositions64Low);\n\n // common x at longitude=-180\n float antiMeridianX = 0.0;\n\n if (useShortestPath) {\n if (project_uProjectionMode == PROJECTION_MODE_WEB_MERCATOR_AUTO_OFFSET) {\n antiMeridianX = -(project_uCoordinateOrigin.x + 180.) / 360. * TILE_SIZE;\n }\n float thresholdRatio = (antiMeridianX - source.x) / (target.x - source.x);\n\n if (prevSegmentRatio <= thresholdRatio && nextSegmentRatio > thresholdRatio) {\n isValid = 0.0;\n indexDir = sign(segmentRatio - thresholdRatio);\n segmentRatio = thresholdRatio;\n }\n }\n\n nextSegmentRatio = indexDir < 0.0 ? prevSegmentRatio : nextSegmentRatio;\n vec3 currPos = interpolateFlat(source, target, segmentRatio);\n vec3 nextPos = interpolateFlat(source, target, nextSegmentRatio);\n\n if (useShortestPath) {\n if (nextPos.x < antiMeridianX) {\n currPos.x += TILE_SIZE;\n nextPos.x += TILE_SIZE;\n }\n }\n\n curr = project_common_position_to_clipspace(vec4(currPos, 1.0));\n next = project_common_position_to_clipspace(vec4(nextPos, 1.0));\n geometry.position = vec4(currPos, 1.0);\n }\n\n // Multiply out width and clamp to limits\n // mercator pixels are interpreted as screen pixels\n float widthPixels = clamp(\n project_size_to_pixel(instanceWidths * widthScale, widthUnits),\n widthMinPixels, widthMaxPixels\n );\n\n // extrude\n vec3 offset = vec3(\n getExtrusionOffset((next.xy - curr.xy) * indexDir, positions.y, widthPixels),\n 0.0);\n DECKGL_FILTER_SIZE(offset, geometry);\n gl_Position = curr + vec4(project_pixel_size_to_clipspace(offset.xy), 0.0, 0.0);\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n vec4 color = mix(instanceSourceColors, instanceTargetColors, segmentRatio);\n vColor = vec4(color.rgb, color.a * opacity);\n DECKGL_FILTER_COLOR(vColor, geometry);\n}\n",fs:"#define SHADER_NAME arc-layer-fragment-shader\n\nprecision highp float;\n\nvarying vec4 vColor;\nvarying vec2 uv;\nvarying float isValid;\n\nvoid main(void) {\n if (isValid == 0.0) {\n discard;\n }\n\n gl_FragColor = vColor;\n geometry.uv = uv;\n\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",modules:[m.a,y.a]})}},{key:"wrapLongitude",get:function(){return!1}},{key:"initializeState",value:function(){this.getAttributeManager().addInstanced({instanceSourcePositions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:!0,accessor:"getSourcePosition"},instanceTargetPositions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:!0,accessor:"getTargetPosition"},instanceSourceColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,transition:!0,accessor:"getSourceColor",defaultValue:S},instanceTargetColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,transition:!0,accessor:"getTargetColor",defaultValue:S},instanceWidths:{size:1,transition:!0,accessor:"getWidth",defaultValue:1},instanceHeights:{size:1,transition:!0,accessor:"getHeight",defaultValue:1},instanceTilts:{size:1,transition:!0,accessor:"getTilt",defaultValue:0}})}},{key:"updateState",value:function(t){if(u()(d()(n.prototype),"updateState",this).call(this,t),t.changeFlags.extensionsChanged){var e,r=this.context.gl;null===(e=this.state.model)||void 0===e||e.delete(),this.state.model=this._getModel(r),this.getAttributeManager().invalidateAll()}}},{key:"draw",value:function(t){var e=t.uniforms,n=this.props,r=n.widthUnits,i=n.widthScale,o=n.widthMinPixels,a=n.widthMaxPixels,s=n.greatCircle,u=n.wrapLongitude;this.state.model.setUniforms(e).setUniforms({greatCircle:s,widthUnits:v.e[r],widthScale:i,widthMinPixels:o,widthMaxPixels:a,useShortestPath:u}).draw()}},{key:"_getModel",value:function(t){for(var e=[],n=0;n<50;n++)e=e.concat([n,1,0,n,-1,0]);var r=new b.a(t,E(E({},this.getShaders()),{},{id:this.props.id,geometry:new x.a({drawMode:5,attributes:{positions:new Float32Array(e)}}),isInstanced:!0}));return r.setUniforms({numSegments:50}),r}}]),n}(_.a);g()(C,"layerName","ArcLayer"),g()(C,"defaultProps",T)},function(t,e,n){"use strict";var r=n(3),i=n.n(r),o=n(4),a=n.n(o),s=n(8),u=n.n(s),c=n(5),l=n.n(c),h=n(6),f=n.n(h),p=n(1),d=n.n(p),A=n(0),g=n.n(A),m=n(217),y=n(234),v=n(12),_=n(164),b=n(186),x=n(60);function w(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function E(t){for(var e=1;e 0.5 || useShortestPath < -0.5) {\n source_world.x = mod(source_world.x + 180., 360.0) - 180.;\n target_world.x = mod(target_world.x + 180., 360.0) - 180.;\n float deltaLng = target_world.x - source_world.x;\n\n if (deltaLng * useShortestPath > 180.) {\n source_world.x += 360. * useShortestPath;\n source_world = splitLine(source_world, target_world, 180. * useShortestPath);\n source_world_64low = vec3(0.0);\n } else if (deltaLng * useShortestPath < -180.) {\n target_world.x += 360. * useShortestPath;\n target_world = splitLine(source_world, target_world, 180. * useShortestPath);\n target_world_64low = vec3(0.0);\n } else if (useShortestPath < 0.) {\n // Line is not split, abort\n gl_Position = vec4(0.);\n return;\n }\n }\n\n // Position\n vec4 source_commonspace;\n vec4 target_commonspace;\n vec4 source = project_position_to_clipspace(source_world, source_world_64low, vec3(0.), source_commonspace);\n vec4 target = project_position_to_clipspace(target_world, target_world_64low, vec3(0.), target_commonspace);\n \n // linear interpolation of source & target to pick right coord\n float segmentIndex = positions.x;\n vec4 p = mix(source, target, segmentIndex);\n geometry.position = mix(source_commonspace, target_commonspace, segmentIndex);\n uv = positions.xy;\n geometry.uv = uv;\n geometry.pickingColor = instancePickingColors;\n\n // Multiply out width and clamp to limits\n float widthPixels = clamp(\n project_size_to_pixel(instanceWidths * widthScale, widthUnits),\n widthMinPixels, widthMaxPixels\n );\n\n // extrude\n vec3 offset = vec3(\n getExtrusionOffset(target.xy - source.xy, positions.y, widthPixels),\n 0.0);\n DECKGL_FILTER_SIZE(offset, geometry);\n gl_Position = p + vec4(project_pixel_size_to_clipspace(offset.xy), 0.0, 0.0);\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n // Color\n vColor = vec4(instanceColors.rgb, instanceColors.a * opacity);\n DECKGL_FILTER_COLOR(vColor, geometry);\n}\n",fs:"#define SHADER_NAME line-layer-fragment-shader\n\nprecision highp float;\n\nvarying vec4 vColor;\nvarying vec2 uv;\n\nvoid main(void) {\n geometry.uv = uv;\n\n gl_FragColor = vColor;\n\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",modules:[m.a,y.a]})}},{key:"wrapLongitude",get:function(){return!1}},{key:"initializeState",value:function(){this.getAttributeManager().addInstanced({instanceSourcePositions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:!0,accessor:"getSourcePosition"},instanceTargetPositions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:!0,accessor:"getTargetPosition"},instanceColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,transition:!0,accessor:"getColor",defaultValue:[0,0,0,255]},instanceWidths:{size:1,transition:!0,accessor:"getWidth",defaultValue:1}})}},{key:"updateState",value:function(t){if(u()(d()(n.prototype),"updateState",this).call(this,t),t.changeFlags.extensionsChanged){var e,r=this.context.gl;null===(e=this.state.model)||void 0===e||e.delete(),this.state.model=this._getModel(r),this.getAttributeManager().invalidateAll()}}},{key:"draw",value:function(t){var e=t.uniforms,n=this.props,r=n.widthUnits,i=n.widthScale,o=n.widthMinPixels,a=n.widthMaxPixels,s=n.wrapLongitude;this.state.model.setUniforms(e).setUniforms({widthUnits:v.e[r],widthScale:i,widthMinPixels:o,widthMaxPixels:a,useShortestPath:s?1:0}).draw(),s&&this.state.model.setUniforms({useShortestPath:-1}).draw()}},{key:"_getModel",value:function(t){return new b.a(t,E(E({},this.getShaders()),{},{id:this.props.id,geometry:new x.a({drawMode:5,attributes:{positions:new Float32Array([0,-1,0,0,1,0,1,-1,0,1,1,0])}}),isInstanced:!0}))}}]),n}(_.a);g()(T,"layerName","LineLayer"),g()(T,"defaultProps",S)},function(t,e,n){"use strict";var r=n(3),i=n.n(r),o=n(4),a=n.n(o),s=n(8),u=n.n(s),c=n(5),l=n.n(c),h=n(6),f=n.n(h),p=n(1),d=n.n(p),A=n(0),g=n.n(A),m=n(217),y=n(235),v=n(234),_=n(12),b=n(164),x=n(186),w=n(60);function E(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function O(t){for(var e=1;e 1.0) {\n discard;\n }\n\n gl_FragColor = vColor;\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",modules:[m.a,y.a,v.a]})}},{key:"initializeState",value:function(){this.getAttributeManager().addInstanced({instancePositions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:!0,accessor:"getPosition"},instanceNormals:{size:3,transition:!0,accessor:"getNormal",defaultValue:C},instanceColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,transition:!0,accessor:"getColor",defaultValue:T}})}},{key:"updateState",value:function(t){var e,r,i,o=t.changeFlags,a=t.props;if(u()(d()(n.prototype),"updateState",this).call(this,t),o.extensionsChanged){var s,c=this.context.gl;null===(s=this.state.model)||void 0===s||s.delete(),this.state.model=this._getModel(c),this.getAttributeManager().invalidateAll()}o.dataChanged&&(e=a.data,r=e.header,i=e.attributes,r&&i&&(e.length=r.vertexCount,i.POSITION&&(i.instancePositions=i.POSITION),i.NORMAL&&(i.instanceNormals=i.NORMAL),i.COLOR_0&&(i.instanceColors=i.COLOR_0)))}},{key:"draw",value:function(t){var e=t.uniforms,n=this.props,r=n.pointSize,i=n.sizeUnits;this.state.model.setUniforms(e).setUniforms({sizeUnits:_.e[i],radiusPixels:r}).draw()}},{key:"_getModel",value:function(t){for(var e=[],n=0;n<3;n++){var r=n/3*Math.PI*2;e.push(2*Math.cos(r),2*Math.sin(r),0)}return new x.a(t,O(O({},this.getShaders()),{},{id:this.props.id,geometry:new w.a({drawMode:4,attributes:{positions:new Float32Array(e)}}),isInstanced:!0}))}}]),n}(b.a);g()(M,"layerName","PointCloudLayer"),g()(M,"defaultProps",P)},function(t,e,n){"use strict";var r=n(3),i=n.n(r),o=n(4),a=n.n(o),s=n(8),u=n.n(s),c=n(5),l=n.n(c),h=n(6),f=n.n(h),p=n(1),d=n.n(p),A=n(0),g=n.n(A),m=n(21),y=n(217),v=n(235),_=n(234),b=n(164),x=n(60),w=n(7),E=n(107),O=n(186),S=n(251),T=n(189),C=n(130);function P(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function M(t){for(var e=1;e 0.001;\n}\n\nbool isVertexPicked(vec3 vertexColor) {\n return\n picking_uSelectedColorValid &&\n !picking_isColorValid(abs(vertexColor - picking_uSelectedColor));\n}\n\nvoid picking_setPickingColor(vec3 pickingColor) {\n if (picking_uActive) {\n picking_vRGBcolor_Avalid.a = float(picking_isColorValid(pickingColor));\n\n if (!picking_uAttribute) {\n picking_vRGBcolor_Avalid.rgb = pickingColor * COLOR_SCALE;\n }\n } else {\n picking_vRGBcolor_Avalid.a = float(isVertexPicked(pickingColor));\n }\n}\n\nvoid picking_setPickingAttribute(float value) {\n if (picking_uAttribute) {\n picking_vRGBcolor_Avalid.r = value;\n }\n}\nvoid picking_setPickingAttribute(vec2 value) {\n if (picking_uAttribute) {\n picking_vRGBcolor_Avalid.rg = value;\n }\n}\nvoid picking_setPickingAttribute(vec3 value) {\n if (picking_uAttribute) {\n picking_vRGBcolor_Avalid.rgb = value;\n }\n}\n",fs:"uniform bool picking_uActive;\nuniform vec3 picking_uSelectedColor;\nuniform vec4 picking_uHighlightColor;\n\nin vec4 picking_vRGBcolor_Avalid;\nvec4 picking_filterHighlightColor(vec4 color) {\n if (picking_uActive) {\n return color;\n }\n bool selected = bool(picking_vRGBcolor_Avalid.a);\n\n if (selected) {\n float highLightAlpha = picking_uHighlightColor.a;\n float blendedAlpha = highLightAlpha + color.a * (1.0 - highLightAlpha);\n float highLightRatio = highLightAlpha / blendedAlpha;\n\n vec3 blendedRGB = mix(color.rgb, picking_uHighlightColor.rgb, highLightRatio);\n return vec4(blendedRGB, blendedAlpha);\n } else {\n return color;\n }\n}\nvec4 picking_filterPickingColor(vec4 color) {\n if (picking_uActive) {\n if (picking_vRGBcolor_Avalid.a == 0.0) {\n discard;\n }\n return picking_vRGBcolor_Avalid;\n }\n return color;\n}\nvec4 picking_filterColor(vec4 color) {\n vec4 highightColor = picking_filterHighlightColor(color);\n return picking_filterPickingColor(highightColor);\n}\n\n",getUniforms:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o;const e={};if(void 0!==t.pickingSelectedColor)if(t.pickingSelectedColor){const n=t.pickingSelectedColor.slice(0,3);e.picking_uSelectedColorValid=1,e.picking_uSelectedColor=n}else e.picking_uSelectedColorValid=0;if(t.pickingHighlightColor){const n=Array.from(t.pickingHighlightColor,t=>t/255);Number.isFinite(n[3])||(n[3]=1),e.picking_uHighlightColor=n}return void 0!==t.pickingActive&&(e.picking_uActive=Boolean(t.pickingActive),e.picking_uAttribute=Boolean(t.pickingAttribute)),e}};function s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}e.a=function(t){for(var e=1;e 0.0) {\n float specular_angle = max(dot(normal_worldspace, halfway_direction), 0.0);\n specular = pow(specular_angle, lighting_uShininess);\n }\n lambertian = max(lambertian, 0.0);\n return (lambertian * lighting_uDiffuse * surfaceColor + specular * lighting_uSpecularColor) * color;\n}\n\nvec3 lighting_getLightColor(vec3 surfaceColor, vec3 cameraPosition, vec3 position_worldspace, vec3 normal_worldspace) {\n vec3 lightColor = surfaceColor;\n\n if (lighting_uEnabled) {\n vec3 view_direction = normalize(cameraPosition - position_worldspace);\n lightColor = lighting_uAmbient * surfaceColor * lighting_uAmbientLight.color;\n\n for (int i = 0; i < MAX_LIGHTS; i++) {\n if (i >= lighting_uPointLightCount) {\n break;\n }\n PointLight pointLight = lighting_uPointLight[i];\n vec3 light_position_worldspace = pointLight.position;\n vec3 light_direction = normalize(light_position_worldspace - position_worldspace);\n lightColor += lighting_getLightColor(surfaceColor, light_direction, view_direction, normal_worldspace, pointLight.color);\n }\n\n for (int i = 0; i < MAX_LIGHTS; i++) {\n if (i >= lighting_uDirectionalLightCount) {\n break;\n }\n DirectionalLight directionalLight = lighting_uDirectionalLight[i];\n lightColor += lighting_getLightColor(surfaceColor, -directionalLight.direction, view_direction, normal_worldspace, directionalLight.color);\n }\n }\n return lightColor;\n}\n\nvec3 lighting_getSpecularLightColor(vec3 cameraPosition, vec3 position_worldspace, vec3 normal_worldspace) {\n vec3 lightColor = vec3(0, 0, 0);\n vec3 surfaceColor = vec3(0, 0, 0);\n\n if (lighting_uEnabled) {\n vec3 view_direction = normalize(cameraPosition - position_worldspace);\n\n for (int i = 0; i < MAX_LIGHTS; i++) {\n if (i >= lighting_uPointLightCount) {\n break;\n }\n PointLight pointLight = lighting_uPointLight[i];\n vec3 light_position_worldspace = pointLight.position;\n vec3 light_direction = normalize(light_position_worldspace - position_worldspace);\n lightColor += lighting_getLightColor(surfaceColor, light_direction, view_direction, normal_worldspace, pointLight.color);\n }\n\n for (int i = 0; i < MAX_LIGHTS; i++) {\n if (i >= lighting_uDirectionalLightCount) {\n break;\n }\n DirectionalLight directionalLight = lighting_uDirectionalLight[i];\n lightColor += lighting_getLightColor(surfaceColor, -directionalLight.direction, view_direction, normal_worldspace, directionalLight.color);\n }\n }\n return lightColor;\n}\n";n.d(e,"a",(function(){return u})),n.d(e,"b",(function(){return c}));const o={};function a(t){const{ambient:e=.35,diffuse:n=.6,shininess:r=32,specularColor:i=[30,30,30]}=t;return{lighting_uAmbient:e,lighting_uDiffuse:n,lighting_uShininess:r,lighting_uSpecularColor:i.map(t=>t/255)}}function s(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o;if(!("material"in t))return{};const{material:e}=t;return e?a(e):{lighting_uEnabled:!1}}const u={name:"gouraud-lighting",dependencies:[r.a],vs:i,defines:{LIGHTING_VERTEX:1},getUniforms:s},c={name:"phong-lighting",dependencies:[r.a],fs:i,defines:{LIGHTING_FRAGMENT:1},getUniforms:s}},function(t,e,n){"use strict";n.d(e,"a",(function(){return u})),n.d(e,"b",(function(){return c}));var r=n(107),i=n(237),o=n(238),a=n(74),s=n(10);function u(t,e){Object(s.a)(t instanceof r.a||t instanceof i.a||t instanceof o.a);const n=t.constructor,{gl:a,width:u,height:c,format:l,type:h,dataFormat:f,border:p,mipmaps:d}=t;return new n(a,Object.assign({width:u,height:c,format:l,type:h,dataFormat:f,border:p,mipmaps:d},e))}function c(t,e){const{gl:n,width:r,height:i,id:o}=t;return new a.a(n,Object.assign({},e,{id:"framebuffer-for-".concat(o),width:r,height:i,attachments:{36064:t}}))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(7),i=n(54);const o=[34069,34070,34071,34072,34073,34074];class a extends i.a{get[Symbol.toStringTag](){return"TextureCube"}constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(r.b)(t),super(t,Object.assign({},e,{target:34067})),this.initialize(e),Object.seal(this)}initialize(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{mipmaps:e=!0,parameters:n={}}=t;return this.opts=t,this.setCubeMapImageData(t).then(()=>{this.loaded=!0,e&&this.generateMipmap(t),this.setParameters(n)}),this}subImage(t){let{face:e,data:n,x:r=0,y:i=0,mipmapLevel:o=0}=t;return this._subImage({target:e,data:n,x:r,y:i,mipmapLevel:o})}async setCubeMapImageData(t){let{width:e,height:n,pixels:i,data:a,border:s=0,format:u=6408,type:c=5121}=t;const{gl:l}=this,h=i||a,f=await Promise.all(o.map(t=>{const e=h[t];return Promise.all(Array.isArray(e)?e:[e])}));this.bind(),o.forEach((t,i)=>{f[i].length>1&&!1!==this.opts.mipmaps&&r.k.warn("".concat(this.id," has mipmap and multiple LODs."))(),f[i].forEach((r,i)=>{e&&n?l.texImage2D(t,i,u,e,n,s,u,c,r):l.texImage2D(t,i,u,u,c,r)})}),this.unbind()}setImageDataForFace(t){const{face:e,width:n,height:r,pixels:i,data:o,border:a=0,format:s=6408,type:u=5121}=t,{gl:c}=this,l=i||o;return this.bind(),l instanceof Promise?l.then(n=>this.setImageDataForFace(Object.assign({},t,{face:e,data:n,pixels:n}))):this.width||this.height?c.texImage2D(e,0,s,n,r,a,s,u,l):c.texImage2D(e,0,s,s,u,l),this}}a.FACES=o},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(7),i=n(54),o=n(82),a=n(33);class s extends i.a{get[Symbol.toStringTag](){return"Texture3D"}static isSupported(t){return Object(r.j)(t)}constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(r.a)(t),e=Object.assign({depth:1},e,{target:32879,unpackFlipY:!1}),super(t,e),this.initialize(e),Object.seal(this)}setImageData(t){let{level:e=0,dataFormat:n=6408,width:i,height:s,depth:u=1,border:c=0,format:l,type:h=5121,offset:f=0,data:p,parameters:d={}}=t;if(this._trackDeallocatedMemory("Texture"),this.gl.bindTexture(this.target,this.handle),Object(r.o)(this.gl,d,()=>{ArrayBuffer.isView(p)&&this.gl.texImage3D(this.target,e,n,i,s,u,c,l,h,p),p instanceof a.a&&(this.gl.bindBuffer(35052,p.handle),this.gl.texImage3D(this.target,e,n,i,s,u,c,l,h,f))}),p&&p.byteLength)this._trackAllocatedMemory(p.byteLength,"Texture");else{const t=o.a[this.dataFormat]||4,e=o.c[this.type]||1;this._trackAllocatedMemory(this.width*this.height*this.depth*t*e,"Texture")}return this.loaded=!0,this}}},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return i}));var r=n(240);function i(){return!("object"==typeof t&&"[object process]"===String(t)&&!t.browser)||Object(r.a)()}}).call(this,n(44))},function(t,e,n){"use strict";(function(t){function r(e){if("undefined"!=typeof window&&"object"==typeof window.process&&"renderer"===window.process.type)return!0;if(void 0!==t&&"object"==typeof t.versions&&Boolean(t.versions.electron))return!0;const n="object"==typeof navigator&&"string"==typeof navigator.userAgent&&navigator.userAgent,r=e||n;return!!(r&&r.indexOf("Electron")>=0)}n.d(e,"a",(function(){return r}))}).call(this,n(44))},function(t,e){t.exports=function(t){var e;if("undefined"!=typeof Symbol){if(Symbol.asyncIterator&&null!=(e=t[Symbol.asyncIterator]))return e.call(t);if(Symbol.iterator&&null!=(e=t[Symbol.iterator]))return e.call(t)}throw new TypeError("Object is not async iterable")}},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return f}));var r=n(243),i=n(244),o=n(2),a=n(30),s=n.n(a),u=n(111);var c={container:s.a.object,gl:s.a.object,mapboxApiAccessToken:s.a.string,mapboxApiUrl:s.a.string,attributionControl:s.a.bool,preserveDrawingBuffer:s.a.bool,reuseMaps:s.a.bool,transformRequest:s.a.func,mapOptions:s.a.object,mapStyle:s.a.oneOfType([s.a.string,s.a.object]),visible:s.a.bool,asyncRender:s.a.bool,onLoad:s.a.func,onError:s.a.func,width:s.a.number,height:s.a.number,viewState:s.a.object,longitude:s.a.number,latitude:s.a.number,zoom:s.a.number,bearing:s.a.number,pitch:s.a.number,altitude:s.a.number},l={container:u.a.body,mapboxApiAccessToken:function(){var e=null;if("undefined"!=typeof window&&window.location){var n=window.location.search.match(/access_token=([^&\/]*)/);e=n&&n[1]}e||void 0===t||(e=e||t.env.MapboxAccessToken||t.env.REACT_APP_MAPBOX_ACCESS_TOKEN);return e||"no-token"}(),mapboxApiUrl:"https://api.mapbox.com",preserveDrawingBuffer:!1,attributionControl:!0,reuseMaps:!1,mapOptions:{},mapStyle:"mapbox://styles/mapbox/light-v8",visible:!0,asyncRender:!1,onLoad:function(){},onError:function(t){t&&console.error(t.error)},width:0,height:0,longitude:0,latitude:0,zoom:0,bearing:0,pitch:0,altitude:1.5};function h(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"component";t.debug&&s.a.checkPropTypes(c,t,"prop",e)}var f=function(){function t(e){var n=this;if(Object(r.a)(this,t),Object(o.a)(this,"mapboxgl",void 0),Object(o.a)(this,"props",l),Object(o.a)(this,"_map",null),Object(o.a)(this,"width",0),Object(o.a)(this,"height",0),Object(o.a)(this,"_fireLoadEvent",(function(){n.props.onLoad({type:"load",target:n._map})})),!e.mapboxgl)throw new Error("Mapbox not available");this.mapboxgl=e.mapboxgl,t.initialized||(t.initialized=!0,this._checkStyleSheet(this.mapboxgl.version)),this._initialize(e)}return Object(i.a)(t,[{key:"finalize",value:function(){return this._destroy(),this}},{key:"setProps",value:function(t){return this._update(this.props,t),this}},{key:"resize",value:function(){return this._map.resize(),this}},{key:"redraw",value:function(){var t=this._map;t.style&&(t._frame&&(t._frame.cancel(),t._frame=null),t._render())}},{key:"getMap",value:function(){return this._map}},{key:"_reuse",value:function(e){this._map=t.savedMap;var n=this._map.getContainer(),r=e.container;for(r.classList.add("mapboxgl-map");n.childNodes.length>0;)r.appendChild(n.childNodes[0]);this._map._container=r,t.savedMap=null,e.mapStyle&&this._map.setStyle(e.mapStyle,{diff:!1}),this._map.isStyleLoaded()?this._fireLoadEvent():this._map.once("styledata",this._fireLoadEvent)}},{key:"_create",value:function(e){if(e.reuseMaps&&t.savedMap)this._reuse(e);else{if(e.gl){var n=HTMLCanvasElement.prototype.getContext;HTMLCanvasElement.prototype.getContext=function(){return HTMLCanvasElement.prototype.getContext=n,e.gl}}var r={container:e.container,center:[0,0],zoom:8,pitch:0,bearing:0,maxZoom:24,style:e.mapStyle,interactive:!1,trackResize:!1,attributionControl:e.attributionControl,preserveDrawingBuffer:e.preserveDrawingBuffer};e.transformRequest&&(r.transformRequest=e.transformRequest),this._map=new this.mapboxgl.Map(Object.assign({},r,e.mapOptions)),this._map.once("load",e.onLoad),this._map.on("error",e.onError)}return this}},{key:"_destroy",value:function(){this._map&&(t.savedMap?this._map.remove():(t.savedMap=this._map,this._map.off("load",this.props.onLoad),this._map.off("error",this.props.onError),this._map.off("styledata",this._fireLoadEvent)),this._map=null)}},{key:"_initialize",value:function(t){var e=this;h(t=Object.assign({},l,t),"Mapbox"),this.mapboxgl.accessToken=t.mapboxApiAccessToken||l.mapboxApiAccessToken,this.mapboxgl.baseApiUrl=t.mapboxApiUrl,this._create(t);var n=t.container;Object.defineProperty(n,"offsetWidth",{get:function(){return e.width}}),Object.defineProperty(n,"clientWidth",{get:function(){return e.width}}),Object.defineProperty(n,"offsetHeight",{get:function(){return e.height}}),Object.defineProperty(n,"clientHeight",{get:function(){return e.height}});var r=this._map.getCanvas();r&&(r.style.outline="none"),this._updateMapViewport({},t),this._updateMapSize({},t),this.props=t}},{key:"_update",value:function(t,e){if(this._map){h(e=Object.assign({},this.props,e),"Mapbox");var n=this._updateMapViewport(t,e),r=this._updateMapSize(t,e);e.asyncRender||!n&&!r||this.redraw(),this.props=e}}},{key:"_updateMapSize",value:function(t,e){var n=t.width!==e.width||t.height!==e.height;return n&&(this.width=e.width,this.height=e.height,this.resize()),n}},{key:"_updateMapViewport",value:function(t,e){var n=this._getViewState(t),r=this._getViewState(e),i=r.latitude!==n.latitude||r.longitude!==n.longitude||r.zoom!==n.zoom||r.pitch!==n.pitch||r.bearing!==n.bearing||r.altitude!==n.altitude;return i&&(this._map.jumpTo(this._viewStateToMapboxProps(r)),r.altitude!==n.altitude&&(this._map.transform.altitude=r.altitude)),i}},{key:"_getViewState",value:function(t){var e=t.viewState||t,n=e.longitude,r=e.latitude,i=e.zoom,o=e.pitch,a=void 0===o?0:o,s=e.bearing,u=void 0===s?0:s,c=e.altitude;return{longitude:n,latitude:r,zoom:i,pitch:a,bearing:u,altitude:void 0===c?1.5:c}}},{key:"_checkStyleSheet",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"0.47.0";if(void 0!==u.a)try{var e=u.a.createElement("div");e.className="mapboxgl-map",e.style.display="none",u.a.body.append(e);var n="static"!==window.getComputedStyle(e).position;if(!n){var r=u.a.createElement("link");r.setAttribute("rel","stylesheet"),r.setAttribute("type","text/css"),r.setAttribute("href","https://api.tiles.mapbox.com/mapbox-gl-js/v".concat(t,"/mapbox-gl.css")),u.a.head.append(r)}}catch(t){}}},{key:"_viewStateToMapboxProps",value:function(t){return{center:[t.longitude,t.latitude],zoom:t.zoom,bearing:t.bearing,pitch:t.pitch}}}]),t}();Object(o.a)(f,"initialized",!1),Object(o.a)(f,"propTypes",c),Object(o.a)(f,"defaultProps",l),Object(o.a)(f,"savedMap",null)}).call(this,n(44))},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";function r(t,e){for(var n=0;n80*n){r=s=t[0],o=u=t[1];for(var v=n;vs&&(s=c),l>u&&(u=l);p=0!==(p=Math.max(s-r,u-o))?32767/p:0}return a(m,y,n,r,o,p,0),y}function i(t,e,n,r,i){var o,a;if(i===C(t,e,n,r)>0)for(o=e;o=e;o-=r)a=O(o,t[o],t[o+1],a);return a&&v(a,a.next)&&(S(a),a=a.next),a}function o(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!v(r,r.next)&&0!==y(r.prev,r,r.next))r=r.next;else{if(S(r),(r=e=r.prev)===r.next)break;n=!0}}while(n||r!==e);return e}function a(t,e,n,r,i,h,f){if(t){!f&&h&&function(t,e,n,r){var i=t;do{0===i.z&&(i.z=d(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,n,r,i,o,a,s,u,c=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,r=n,s=0,e=0;e0||u>0&&r;)0!==s&&(0===u||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,u--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,c*=2}while(a>1)}(i)}(t,r,i,h);for(var p,A,g=t;t.prev!==t.next;)if(p=t.prev,A=t.next,h?u(t,r,i,h):s(t))e.push(p.i/n|0),e.push(t.i/n|0),e.push(A.i/n|0),S(t),t=A.next,g=A.next;else if((t=A)===g){f?1===f?a(t=c(o(t),e,n),e,n,r,i,h,2):2===f&&l(t,e,n,r,i,h):a(o(t),e,n,r,i,h,1);break}}}function s(t){var e=t.prev,n=t,r=t.next;if(y(e,n,r)>=0)return!1;for(var i=e.x,o=n.x,a=r.x,s=e.y,u=n.y,c=r.y,l=io?i>a?i:a:o>a?o:a,p=s>u?s>c?s:c:u>c?u:c,d=r.next;d!==e;){if(d.x>=l&&d.x<=f&&d.y>=h&&d.y<=p&&g(i,s,o,u,a,c,d.x,d.y)&&y(d.prev,d,d.next)>=0)return!1;d=d.next}return!0}function u(t,e,n,r){var i=t.prev,o=t,a=t.next;if(y(i,o,a)>=0)return!1;for(var s=i.x,u=o.x,c=a.x,l=i.y,h=o.y,f=a.y,p=su?s>c?s:c:u>c?u:c,v=l>h?l>f?l:f:h>f?h:f,_=d(p,A,e,n,r),b=d(m,v,e,n,r),x=t.prevZ,w=t.nextZ;x&&x.z>=_&&w&&w.z<=b;){if(x.x>=p&&x.x<=m&&x.y>=A&&x.y<=v&&x!==i&&x!==a&&g(s,l,u,h,c,f,x.x,x.y)&&y(x.prev,x,x.next)>=0)return!1;if(x=x.prevZ,w.x>=p&&w.x<=m&&w.y>=A&&w.y<=v&&w!==i&&w!==a&&g(s,l,u,h,c,f,w.x,w.y)&&y(w.prev,w,w.next)>=0)return!1;w=w.nextZ}for(;x&&x.z>=_;){if(x.x>=p&&x.x<=m&&x.y>=A&&x.y<=v&&x!==i&&x!==a&&g(s,l,u,h,c,f,x.x,x.y)&&y(x.prev,x,x.next)>=0)return!1;x=x.prevZ}for(;w&&w.z<=b;){if(w.x>=p&&w.x<=m&&w.y>=A&&w.y<=v&&w!==i&&w!==a&&g(s,l,u,h,c,f,w.x,w.y)&&y(w.prev,w,w.next)>=0)return!1;w=w.nextZ}return!0}function c(t,e,n){var r=t;do{var i=r.prev,a=r.next.next;!v(i,a)&&_(i,r,r.next,a)&&w(i,a)&&w(a,i)&&(e.push(i.i/n|0),e.push(r.i/n|0),e.push(a.i/n|0),S(r),S(r.next),r=t=a),r=r.next}while(r!==t);return o(r)}function l(t,e,n,r,i,s){var u=t;do{for(var c=u.next.next;c!==u.prev;){if(u.i!==c.i&&m(u,c)){var l=E(u,c);return u=o(u,u.next),l=o(l,l.next),a(u,e,n,r,i,s,0),void a(l,e,n,r,i,s,0)}c=c.next}u=u.next}while(u!==t)}function h(t,e){return t.x-e.x}function f(t,e){var n=function(t,e){var n,r=e,i=t.x,o=t.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a&&(a=s,n=r.x=r.x&&r.x>=l&&i!==r.x&&g(on.x||r.x===n.x&&p(n,r)))&&(n=r,f=u)),r=r.next}while(r!==c);return n}(t,e);if(!n)return e;var r=E(n,t);return o(r,r.next),o(n,n.next)}function p(t,e){return y(t.prev,t,e.prev)<0&&y(e.next,t,t.next)<0}function d(t,e,n,r,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-n)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-r)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function A(t){var e=t,n=t;do{(e.x=(t-a)*(o-s)&&(t-a)*(r-s)>=(n-a)*(e-s)&&(n-a)*(o-s)>=(i-a)*(r-s)}function m(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&_(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&(w(t,e)&&w(e,t)&&function(t,e){var n=t,r=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)&&(y(t.prev,t,e.prev)||y(t,e.prev,e))||v(t,e)&&y(t.prev,t,t.next)>0&&y(e.prev,e,e.next)>0)}function y(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function v(t,e){return t.x===e.x&&t.y===e.y}function _(t,e,n,r){var i=x(y(t,e,n)),o=x(y(t,e,r)),a=x(y(n,r,t)),s=x(y(n,r,e));return i!==o&&a!==s||(!(0!==i||!b(t,n,e))||(!(0!==o||!b(t,r,e))||(!(0!==a||!b(n,t,r))||!(0!==s||!b(n,e,r)))))}function b(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function x(t){return t>0?1:t<0?-1:0}function w(t,e){return y(t.prev,t,t.next)<0?y(t,e,t.next)>=0&&y(t,t.prev,e)>=0:y(t,e,t.prev)<0||y(t,t.next,e)<0}function E(t,e){var n=new T(t.i,t.x,t.y),r=new T(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function O(t,e,n,r){var i=new T(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function S(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function T(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function C(t,e,n,r){for(var i=0,o=e,a=n-r;o0&&(r+=t[i-1].length,n.holes.push(r))}return n}},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return A}));new Uint8Array([0]);const r=[171,75,84,88,32,50,48,187,13,10,26,10];var i,o,a,s,u,c,l,h;!function(t){t[t.NONE=0]="NONE",t[t.BASISLZ=1]="BASISLZ",t[t.ZSTD=2]="ZSTD",t[t.ZLIB=3]="ZLIB"}(i||(i={})),function(t){t[t.BASICFORMAT=0]="BASICFORMAT"}(o||(o={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.ETC1S=163]="ETC1S",t[t.UASTC=166]="UASTC"}(a||(a={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.SRGB=1]="SRGB"}(s||(s={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.LINEAR=1]="LINEAR",t[t.SRGB=2]="SRGB",t[t.ITU=3]="ITU",t[t.NTSC=4]="NTSC",t[t.SLOG=5]="SLOG",t[t.SLOG2=6]="SLOG2"}(u||(u={})),function(t){t[t.ALPHA_STRAIGHT=0]="ALPHA_STRAIGHT",t[t.ALPHA_PREMULTIPLIED=1]="ALPHA_PREMULTIPLIED"}(c||(c={})),function(t){t[t.RGB=0]="RGB",t[t.RRR=3]="RRR",t[t.GGG=4]="GGG",t[t.AAA=15]="AAA"}(l||(l={})),function(t){t[t.RGB=0]="RGB",t[t.RGBA=3]="RGBA",t[t.RRR=4]="RRR",t[t.RRRG=5]="RRRG"}(h||(h={}));class f{constructor(){this.vkFormat=0,this.typeSize=1,this.pixelWidth=0,this.pixelHeight=0,this.pixelDepth=0,this.layerCount=0,this.faceCount=1,this.supercompressionScheme=i.NONE,this.levels=[],this.dataFormatDescriptor=[{vendorId:0,descriptorType:o.BASICFORMAT,versionNumber:2,descriptorBlockSize:40,colorModel:a.UNSPECIFIED,colorPrimaries:s.SRGB,transferFunction:s.SRGB,flags:c.ALPHA_STRAIGHT,texelBlockDimension:{x:4,y:4,z:1,w:1},bytesPlane:[],samples:[]}],this.keyValue={},this.globalData=null}}class p{constructor(t,e,n,r){this._dataView=new DataView(t.buffer,t.byteOffset+e,n),this._littleEndian=r,this._offset=0}_nextUint8(){const t=this._dataView.getUint8(this._offset);return this._offset+=1,t}_nextUint16(){const t=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,t}_nextUint32(){const t=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,t}_nextUint64(){const t=this._dataView.getUint32(this._offset,this._littleEndian)+2**32*this._dataView.getUint32(this._offset+4,this._littleEndian);return this._offset+=8,t}_skip(t){return this._offset+=t,this}_scan(t,e=0){const n=this._offset;let r=0;for(;this._dataView.getUint8(this._offset)!==e&&r2&&void 0!==arguments[2]?arguments[2]:null;const r=t.texture&&t.texture.sampler&&t.texture.sampler.parameters||{},i=t.texture.source.image;let a,s={};i.compressed?(a=i,s={[this.gl.TEXTURE_MIN_FILTER]:i.data.length>1?this.gl.LINEAR_MIPMAP_NEAREST:this.gl.LINEAR}):a={data:i};const u=new o.a(this.gl,{id:t.name||t.id,parameters:{...r,...s},pixelStore:{[this.gl.UNPACK_FLIP_Y_WEBGL]:!1},...a});this.uniforms[e]=u,this.defineIfPresent(n,n),this.generatedTextures.push(u)}parsePbrMetallicRoughness(t){t.baseColorTexture&&this.parseTexture(t.baseColorTexture,"u_BaseColorSampler","HAS_BASECOLORMAP"),this.uniforms.u_BaseColorFactor=t.baseColorFactor||[1,1,1,1],t.metallicRoughnessTexture&&this.parseTexture(t.metallicRoughnessTexture,"u_MetallicRoughnessSampler","HAS_METALROUGHNESSMAP");const{metallicFactor:e=1,roughnessFactor:n=1}=t;this.uniforms.u_MetallicRoughnessValues=[e,n]}parseMaterial(t){if(this.uniforms.pbr_uUnlit=Boolean(t.unlit),t.pbrMetallicRoughness&&this.parsePbrMetallicRoughness(t.pbrMetallicRoughness),t.normalTexture){this.parseTexture(t.normalTexture,"u_NormalSampler","HAS_NORMALMAP");const{scale:e=1}=t.normalTexture;this.uniforms.u_NormalScale=e}if(t.occlusionTexture){this.parseTexture(t.occlusionTexture,"u_OcclusionSampler","HAS_OCCLUSIONMAP");const{strength:e=1}=t.occlusionTexture;this.uniforms.u_OcclusionStrength=e}if(t.emissiveTexture&&(this.parseTexture(t.emissiveTexture,"u_EmissiveSampler","HAS_EMISSIVEMAP"),this.uniforms.u_EmissiveFactor=t.emissiveFactor||[0,0,0]),"MASK"===t.alphaMode){const{alphaCutoff:e=.5}=t;this.defines.ALPHA_CUTOFF=1,this.uniforms.u_AlphaCutoff=e}else"BLEND"===t.alphaMode&&(a.k.warn("BLEND alphaMode might not work well because it requires mesh sorting")(),Object.assign(this.parameters,{blend:!0,blendEquation:this.gl.FUNC_ADD,blendFunc:[this.gl.SRC_ALPHA,this.gl.ONE_MINUS_SRC_ALPHA,this.gl.ONE,this.gl.ONE_MINUS_SRC_ALPHA]}))}delete(){this.generatedTextures.forEach(t=>t.delete())}}},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return i}));var r=n(249);function i(){return!("object"==typeof t&&"[object process]"===String(t)&&!t.browser)||Object(r.a)()}}).call(this,n(44))},function(t,e,n){"use strict";(function(t){function r(e){if("undefined"!=typeof window&&"object"==typeof window.process&&"renderer"===window.process.type)return!0;if(void 0!==t&&"object"==typeof t.versions&&Boolean(t.versions.electron))return!0;const n="object"==typeof navigator&&"string"==typeof navigator.userAgent&&navigator.userAgent,r=e||n;return!!(r&&r.indexOf("Electron")>=0)}n.d(e,"a",(function(){return r}))}).call(this,n(44))},function(t,e,n){var r=n(287),i=n(288),o=n(289),a=n(290);t.exports=function(t){return r(t)||i(t)||o(t)||a()},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return s})),n.d(e,"a",(function(){return u}));var r=n(189),i=n(7),o=n(10);function a(t,e){return s(t,e)}function s(t,e){return(e=Array.isArray(e)?e:[e]).every(e=>c(t,e))}function u(t){t.luma=t.luma||{},t.luma.caps=t.luma.caps||{};for(const e in r.b)void 0===t.luma.caps[e]&&(t.luma.caps[e]=c(t,e));return t.luma.caps}function c(t,e){return t.luma=t.luma||{},t.luma.caps=t.luma.caps||{},void 0===t.luma.caps[e]&&(t.luma.caps[e]=function(t,e){const n=r.b[e];let a;Object(o.a)(n,e);const s=Object(i.j)(t)&&n[1]||n[0];if("function"==typeof s)a=s(t);else if(Array.isArray(s)){a=!0;for(const e of s)a=a&&Boolean(t.getExtension(e))}else"string"==typeof s?a=Boolean(t.getExtension(s)):"boolean"==typeof s?a=s:Object(o.a)(!1);return a}(t,e)),t.luma.caps[e]||i.k.log(2,"Feature: ".concat(e," not supported"))(),t.luma.caps[e]}},,,,,,,,,function(t,e,n){var r=document.body&&document.body.getAttribute("data-base-url");r&&(window.__webpack_public_path__="".concat(r,"nbextensions/pydeck/nb_extension"));var i=n(197).default.jupyterTransport,o=null,a=null;try{o=n(295).default,a=n(265).default}catch(t){}var s=n(128),u=s.MODULE_VERSION,c=s.MODULE_NAME,l=n(87),h=l.createDeck,f=l.updateDeck,p=n(296).initPlayground;p(),t.exports={jupyterTransport:i,MODULE_VERSION:u,MODULE_NAME:c,JupyterTransportModel:o,JupyterTransportView:a,initPlayground:p,createDeck:h,updateDeck:f}},function(t,e,n){var r=n(194).default;t.exports=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){function n(e,r){return t.exports=n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},t.exports.__esModule=!0,t.exports.default=t.exports,n(e,r)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){var r=n(56);t.exports=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=r(t)););return t},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return y}));var r=n(88),i=n.n(r),o=n(89),a=n.n(o),s=n(140),u=n.n(s),c=n(119),l=n.n(c),h=n(120),f=n.n(h),p=n(56),d=n.n(p),A=n(141),g=n(197);function m(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=d()(t);if(e){var i=d()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}var y=function(t){l()(n,t);var e=m(n);function n(){return i()(this,n),e.apply(this,arguments)}return a()(n,[{key:"initialize",value:function(){this.listenTo(this.model,"destroy",this.remove),this.transport=new g.default,this.transport.jupyterModel=this.model,this.transport.jupyterView=this,this.transport._initialize(),u()(d()(n.prototype),"initialize",this).apply(this,arguments)}},{key:"remove",value:function(){this.transport&&(this.transport._finalize(),this.transport.jupyterModel=null,this.transport.jupyterView=null,this.transport=null)}},{key:"render",value:function(){u()(d()(n.prototype),"render",this).call(this),this.model.on("change:json_input",this.onJsonChanged.bind(this)),this.model.on("change:data_buffer",this.onDataBufferChanged.bind(this)),this.onDataBufferChanged()}},{key:"onJsonChanged",value:function(){var t=JSON.parse(this.model.get("json_input"));this.transport._messageReceived({type:"json",json:t})}},{key:"onDataBufferChanged",value:function(){var t=this.model.get("json_input"),e=this.model.get("data_buffer");t&&e?this.transport._messageReceived({type:"json-with-binary",json:t,binary:e}):this.transport._messageReceived({type:"json",json:t})}}]),n}(A.DOMWidgetView)},function(t,e,n){(function(e){const r=n(293),i=n(16),o=n(278).default,{registerLoaders:a,load:s,parse:u,fetchFile:c}=n(65),l="undefined"==typeof window?e:window;l.deck=l.deck||{},l.luma=l.luma||{},l.loaders=l.loaders||{},Object.assign(l.deck,i,{DeckGL:o}),Object.assign(l.luma,r),Object.assign(l.loaders,{registerLoaders:a,load:s,parse:u,fetchFile:c}),t.exports=l.deck}).call(this,n(71))},function(t,e){},function(t,e){t.exports=function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),b(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;b(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:w(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}(t.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}},function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return a}));var r=n(242),i=n(199);const o={position:"absolute",left:0,top:0,width:"100%",height:"100%"};class a extends i.a{constructor(t={}){if("undefined"==typeof document)throw Error("Deck can only be used in the browser");const{mapCanvas:e,deckCanvas:n}=function(t){let{container:e=document.body}=t;if("string"==typeof e&&(e=document.getElementById(e)),!e)throw Error("Deck: container not found");"static"===window.getComputedStyle(e).position&&(e.style.position="relative");const n=document.createElement("div");e.appendChild(n),Object.assign(n.style,o);const r=document.createElement("canvas");return e.appendChild(r),Object.assign(r.style,o),{container:e,mapCanvas:n,deckCanvas:r}}(t),i=t.viewState||t.initialViewState,a=Number.isFinite(i&&i.latitude),{map:s=window.mapboxgl}=t;super({canvas:n,...t}),s&&s.Map?this._map=a&&new r.a({...t,viewState:i,container:e,mapboxgl:s}):this._map=s,this._onBeforeRender=t=>{if(this.onBeforeRender(t),this._map){const t=this.getViewports()[0];this._map.setProps({width:t.width,height:t.height,viewState:t})}}}getMapboxMap(){return this._map&&this._map.getMap()}finalize(){this._map&&this._map.finalize(),super.finalize()}setProps(t){"onBeforeRender"in t&&this._onBeforeRender&&t.onBeforeRender!==this._onBeforeRender&&(this.onBeforeRender=t.onBeforeRender,t.onBeforeRender=this._onBeforeRender),"mapStyle"in t&&this._map&&this._map._map.setStyle(t.mapStyle),super.setProps(t)}}},function(t,e,n){"use strict";var r=n(280);function i(){}function o(){}o.resetWarningCache=i,t.exports=function(){function t(t,e,n,i,o,a){if(a!==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 e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},function(t,e,n){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,e){t.exports=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r=0||(i[n]=t[n]);return i}},function(t,e,n){"use strict";(function(t){
+/*!
+ * The buffer module from node.js, for the browser.
+ *
+ * @author Feross Aboukhadijeh
+ * @license MIT
+ */
+var r=n(283),i=n(226),o=n(284);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function d(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return U(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return N(t).length;default:if(r)return U(t).length;e=(""+e).toLowerCase(),r=!0}}function A(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return P(this,e,n);case"utf8":case"utf-8":return S(this,e,n);case"ascii":return T(this,e,n);case"latin1":case"binary":return C(this,e,n);case"base64":return O(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function g(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function m(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=u.from(e,r)),u.isBuffer(e))return 0===e.length?-1:y(t,e,n,r,i);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):y(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function y(t,e,n,r,i){var o,a=1,s=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,n/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var l=-1;for(o=n;o