diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000000000000000000000000000000000..ea8bfadabb8dde4630881e15fa0c8c4ac4e9935f --- /dev/null +++ b/.gitattributes @@ -0,0 +1,35 @@ +*.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 +*.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 +*js.map filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..1501c2781e0830e6f8c3dfcf0fd5e75e15dc4cf3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,56 @@ +# Python build +.eggs/ +gradio.egg-info +dist/ +*.pyc +__pycache__/ +*.py[cod] +*$py.class +build/ + +# JS build +gradio/templates/cdn +gradio/templates/frontend + +# Secrets +.env + +# Gradio run artifacts +*.db +*.sqlite3 +gradio/launches.json +flagged/ +gradio_cached_examples/ + +# Tests +.coverage +coverage.xml +test.txt +**/snapshots/**/*.png + +# Demos +demo/tmp.zip +demo/files/*.avi +demo/files/*.mp4 +demo/all_demos/demos/* +demo/all_demos/requirements.txt +demo/*/config.json + +# Etc +.idea/* +.DS_Store +*.bak +workspace.code-workspace +*.h5 + +# log files +.pnpm-debug.log + +# Local virtualenv for devs +.venv* + +# FRP +gradio/frpc_* + +flagged/* +*.js.map \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..bbd8e3bea2d3a0f5a972b3cb0840ab1696167f77 --- /dev/null +++ b/README.md @@ -0,0 +1,14 @@ +--- +title: Anime Colorization With Hint +emoji: 🌖 +colorFrom: red +colorTo: yellow +sdk: gradio +sdk_version: 3.16.0 +app_file: app.py +pinned: false +license: mit +duplicated_from: HighCWu/anime-colorization-with-hint +--- + +Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference diff --git a/app.py b/app.py new file mode 100644 index 0000000000000000000000000000000000000000..c04c45d2323aa84955cbfaabf5885a13e1b00b45 --- /dev/null +++ b/app.py @@ -0,0 +1,135 @@ +import sys +from typing import Dict +sys.path.insert(0, 'gradio-modified') + +import gradio as gr +import numpy as np + +from PIL import Image + +import torch + +if torch.cuda.is_available(): + t = torch.cuda.get_device_properties(0).total_memory + r = torch.cuda.memory_reserved(0) + a = torch.cuda.memory_allocated(0) + f = t-a # free inside reserved + if f < 2**32: + device = 'cpu' + else: + device = 'cuda' +else: + device = 'cpu' + torch._C._jit_set_bailout_depth(0) + +print('Use device:', device) + + +net = torch.jit.load(f'weights/pkp-v1.{device}.jit.pt') + + +def resize_original(img: Image.Image): + if img is None: + return img + if isinstance(img, dict): + img = img["image"] + + guide_img = img.convert('L') + w, h = guide_img.size + scale = 256 / min(guide_img.size) + guide_img = guide_img.resize([int(round(s*scale)) for s in guide_img.size], Image.Resampling.LANCZOS) + + guide = np.asarray(guide_img) + h, w = guide.shape[-2:] + rows = int(np.ceil(h/64))*64 + cols = int(np.ceil(w/64))*64 + ph_1 = (rows-h) // 2 + ph_2 = rows-h - (rows-h) // 2 + pw_1 = (cols-w) // 2 + pw_2 = cols-w - (cols-w) // 2 + guide = np.pad(guide, ((ph_1, ph_2), (pw_1, pw_2)), mode='constant', constant_values=255) + guide_img = Image.fromarray(guide) + + return gr.Image.update(value=guide_img.convert('RGBA')), guide_img.convert('RGBA') + + +def colorize(img: Dict[str, Image.Image], guide_img: Image.Image, seed: int, hint_mode: str): + if not isinstance(img, dict): + return gr.update(visible=True) + + if hint_mode == "Roughly Hint": + hint_mode_int = 0 + elif hint_mode == "Precisely Hint": + hint_mode_int = 1 + + guide_img = guide_img.convert('L') + hint_img = img["mask"].convert('RGBA') # I modified gradio to enable it upload colorful mask + + guide = torch.from_numpy(np.asarray(guide_img))[None,None].float().to(device) / 255.0 * 2 - 1 + hint = torch.from_numpy(np.asarray(hint_img)).permute(2,0,1)[None].float().to(device) / 255.0 * 2 - 1 + hint_alpha = (hint[:,-1:] > 0.99).float() + hint = hint[:,:3] * hint_alpha - 2 * (1 - hint_alpha) + + np.random.seed(int(seed)) + b, c, h, w = hint.shape + h //= 8 + w //= 8 + noises = [torch.from_numpy(np.random.randn(b, c, h, w)).float().to(device) for _ in range(16+1)] + + with torch.inference_mode(): + sample = net(noises, guide, hint, hint_mode_int) + out = sample[0].cpu().numpy().transpose([1,2,0]) + out = np.uint8(((out + 1) / 2 * 255).clip(0,255)) + + return Image.fromarray(out).convert('RGB') + + +with gr.Blocks() as demo: + gr.Markdown('''

Anime Colorization With Hint

+

Colorize your anime sketches with hint points.

+This is a modified version of + +HighCWu/pixel-guide-diffusion-for-anime-colorization + with hint points inputs.
+''') + with gr.Row(): + with gr.Column(): + inp = gr.Image( + source="upload", + tool="sketch", # tool="color-sketch", # color-sketch upload image mixed with the original + type="pil", + label="Sketch", + interactive=True, + elem_id="sketch-canvas" + ) + inp_store = gr.Image( + type="pil", + interactive=False + ) + inp_store.visible = False + with gr.Column(): + seed = gr.Slider(1, 2**32, step=1, label="Seed", interactive=True, randomize=True) + hint_mode = gr.Radio(["Roughly Hint", "Precisely Hint"], value="Roughly Hint", label="Hint Mode") + btn = gr.Button("Run") + with gr.Column(): + output = gr.Image(type="pil", label="Output", interactive=False) + gr.Markdown(''' +PS: Worse than the no hint version I thought. Probably because my model is underfitting in the super-resolution part
+I modified a little gradio codes for uploading the colorful hint points. +''') + gr.Markdown( + '
visitor badge
' + ) + inp.upload( + resize_original, + inp, + [inp, inp_store], + ) + btn.click( + colorize, + [inp, inp_store, seed, hint_mode], + output + ) + +if __name__ == "__main__": + demo.launch() diff --git a/gradio-modified/gradio/.dockerignore b/gradio-modified/gradio/.dockerignore new file mode 100644 index 0000000000000000000000000000000000000000..450a3af270f5d285eb3a59a03593d06078b145eb --- /dev/null +++ b/gradio-modified/gradio/.dockerignore @@ -0,0 +1,2 @@ +templates/frontend +templates/frontend/**/* diff --git a/gradio-modified/gradio/__init__.py b/gradio-modified/gradio/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f2d88f3ae975848f6583c6a41ce0e90e5c505154 --- /dev/null +++ b/gradio-modified/gradio/__init__.py @@ -0,0 +1,86 @@ +import pkgutil + +import gradio.components as components +import gradio.inputs as inputs +import gradio.outputs as outputs +import gradio.processing_utils +import gradio.templates +from gradio.blocks import Blocks +from gradio.components import ( + HTML, + JSON, + Audio, + Button, + Carousel, + Chatbot, + Checkbox, + Checkboxgroup, + CheckboxGroup, + ColorPicker, + DataFrame, + Dataframe, + Dataset, + Dropdown, + File, + Gallery, + Highlight, + Highlightedtext, + HighlightedText, + Image, + Interpretation, + Json, + Label, + LinePlot, + Markdown, + Model3D, + Number, + Plot, + Radio, + ScatterPlot, + Slider, + State, + StatusTracker, + Text, + Textbox, + TimeSeries, + Timeseries, + UploadButton, + Variable, + Video, + component, +) +from gradio.exceptions import Error +from gradio.flagging import ( + CSVLogger, + FlaggingCallback, + HuggingFaceDatasetJSONSaver, + HuggingFaceDatasetSaver, + SimpleCSVLogger, +) +from gradio.helpers import Progress +from gradio.helpers import create_examples as Examples +from gradio.helpers import make_waveform, skip, update +from gradio.interface import Interface, TabbedInterface, close_all +from gradio.ipython_ext import load_ipython_extension +from gradio.layouts import Accordion, Box, Column, Group, Row, Tab, TabItem, Tabs +from gradio.mix import Parallel, Series +from gradio.routes import Request, mount_gradio_app +from gradio.templates import ( + Files, + ImageMask, + ImagePaint, + List, + Matrix, + Mic, + Microphone, + Numpy, + Paint, + Pil, + PlayableVideo, + Sketchpad, + TextArea, + Webcam, +) + +current_pkg_version = pkgutil.get_data(__name__, "version.txt").decode("ascii").strip() +__version__ = current_pkg_version diff --git a/gradio-modified/gradio/blocks.py b/gradio-modified/gradio/blocks.py new file mode 100644 index 0000000000000000000000000000000000000000..dad4090c747cba3d38689642f4b5f17f5a004a58 --- /dev/null +++ b/gradio-modified/gradio/blocks.py @@ -0,0 +1,1673 @@ +from __future__ import annotations + +import copy +import getpass +import inspect +import json +import os +import pkgutil +import random +import sys +import time +import warnings +import webbrowser +from abc import abstractmethod +from pathlib import Path +from types import ModuleType +from typing import TYPE_CHECKING, Any, Callable, Dict, Iterator, List, Set, Tuple, Type + +import anyio +import requests +from anyio import CapacityLimiter +from typing_extensions import Literal + +from gradio import ( + components, + encryptor, + external, + networking, + queueing, + routes, + strings, + utils, +) +from gradio.context import Context +from gradio.deprecation import check_deprecated_parameters +from gradio.documentation import document, set_documentation_group +from gradio.exceptions import DuplicateBlockError, InvalidApiName +from gradio.helpers import create_tracker, skip, special_args +from gradio.tunneling import CURRENT_TUNNELS +from gradio.utils import ( + TupleNoPrint, + check_function_inputs_match, + component_or_layout_class, + delete_none, + get_cancel_function, + get_continuous_fn, +) + +set_documentation_group("blocks") + + +if TYPE_CHECKING: # Only import for type checking (is False at runtime). + import comet_ml + from fastapi.applications import FastAPI + + from gradio.components import Component + + +class Block: + def __init__( + self, + *, + render: bool = True, + elem_id: str | None = None, + visible: bool = True, + root_url: str | None = None, # URL that is prepended to all file paths + _skip_init_processing: bool = False, # Used for loading from Spaces + **kwargs, + ): + self._id = Context.id + Context.id += 1 + self.visible = visible + self.elem_id = elem_id + self.root_url = root_url + self._skip_init_processing = _skip_init_processing + self._style = {} + self.parent: BlockContext | None = None + + if render: + self.render() + check_deprecated_parameters(self.__class__.__name__, **kwargs) + + def render(self): + """ + Adds self into appropriate BlockContext + """ + if Context.root_block is not None and self._id in Context.root_block.blocks: + raise DuplicateBlockError( + f"A block with id: {self._id} has already been rendered in the current Blocks." + ) + if Context.block is not None: + Context.block.add(self) + if Context.root_block is not None: + Context.root_block.blocks[self._id] = self + if isinstance(self, components.TempFileManager): + Context.root_block.temp_file_sets.append(self.temp_files) + return self + + def unrender(self): + """ + Removes self from BlockContext if it has been rendered (otherwise does nothing). + Removes self from the layout and collection of blocks, but does not delete any event triggers. + """ + if Context.block is not None: + try: + Context.block.children.remove(self) + except ValueError: + pass + if Context.root_block is not None: + try: + del Context.root_block.blocks[self._id] + except KeyError: + pass + return self + + def get_block_name(self) -> str: + """ + Gets block's class name. + + If it is template component it gets the parent's class name. + + @return: class name + """ + return ( + self.__class__.__base__.__name__.lower() + if hasattr(self, "is_template") + else self.__class__.__name__.lower() + ) + + def get_expected_parent(self) -> Type[BlockContext] | None: + return None + + def set_event_trigger( + self, + event_name: str, + fn: Callable | None, + inputs: Component | List[Component] | Set[Component] | None, + outputs: Component | List[Component] | None, + preprocess: bool = True, + postprocess: bool = True, + scroll_to_output: bool = False, + show_progress: bool = True, + api_name: str | None = None, + js: str | None = None, + no_target: bool = False, + queue: bool | None = None, + batch: bool = False, + max_batch_size: int = 4, + cancels: List[int] | None = None, + every: float | None = None, + ) -> Dict[str, Any]: + """ + Adds an event to the component's dependencies. + Parameters: + event_name: event name + fn: Callable function + inputs: input list + outputs: output list + preprocess: whether to run the preprocess methods of components + postprocess: whether to run the postprocess methods of components + scroll_to_output: whether to scroll to output of dependency on trigger + show_progress: whether to show progress animation while running. + api_name: Defining this parameter exposes the endpoint in the api docs + js: Optional frontend js method to run before running 'fn'. Input arguments for js method are values of 'inputs' and 'outputs', return should be a list of values for output components + no_target: if True, sets "targets" to [], used for Blocks "load" event + batch: whether this function takes in a batch of inputs + max_batch_size: the maximum batch size to send to the function + cancels: a list of other events to cancel when this event is triggered. For example, setting cancels=[click_event] will cancel the click_event, where click_event is the return value of another components .click method. + Returns: None + """ + # Support for singular parameter + if isinstance(inputs, set): + inputs_as_dict = True + inputs = sorted(inputs, key=lambda x: x._id) + else: + inputs_as_dict = False + if inputs is None: + inputs = [] + elif not isinstance(inputs, list): + inputs = [inputs] + + if isinstance(outputs, set): + outputs = sorted(outputs, key=lambda x: x._id) + else: + if outputs is None: + outputs = [] + elif not isinstance(outputs, list): + outputs = [outputs] + + if fn is not None and not cancels: + check_function_inputs_match(fn, inputs, inputs_as_dict) + + if Context.root_block is None: + raise AttributeError( + f"{event_name}() and other events can only be called within a Blocks context." + ) + if every is not None and every <= 0: + raise ValueError("Parameter every must be positive or None") + if every and batch: + raise ValueError( + f"Cannot run {event_name} event in a batch and every {every} seconds. " + "Either batch is True or every is non-zero but not both." + ) + + if every and fn: + fn = get_continuous_fn(fn, every) + elif every: + raise ValueError("Cannot set a value for `every` without a `fn`.") + + Context.root_block.fns.append( + BlockFunction(fn, inputs, outputs, preprocess, postprocess, inputs_as_dict) + ) + if api_name is not None: + api_name_ = utils.append_unique_suffix( + api_name, [dep["api_name"] for dep in Context.root_block.dependencies] + ) + if not (api_name == api_name_): + warnings.warn( + "api_name {} already exists, using {}".format(api_name, api_name_) + ) + api_name = api_name_ + + dependency = { + "targets": [self._id] if not no_target else [], + "trigger": event_name, + "inputs": [block._id for block in inputs], + "outputs": [block._id for block in outputs], + "backend_fn": fn is not None, + "js": js, + "queue": False if fn is None else queue, + "api_name": api_name, + "scroll_to_output": scroll_to_output, + "show_progress": show_progress, + "every": every, + "batch": batch, + "max_batch_size": max_batch_size, + "cancels": cancels or [], + } + Context.root_block.dependencies.append(dependency) + return dependency + + def get_config(self): + return { + "visible": self.visible, + "elem_id": self.elem_id, + "style": self._style, + "root_url": self.root_url, + } + + @staticmethod + @abstractmethod + def update(**kwargs) -> Dict: + return {} + + @classmethod + def get_specific_update(cls, generic_update: Dict[str, Any]) -> Dict: + del generic_update["__type__"] + specific_update = cls.update(**generic_update) + return specific_update + + +class BlockContext(Block): + def __init__( + self, + visible: bool = True, + render: bool = True, + **kwargs, + ): + """ + Parameters: + visible: If False, this will be hidden but included in the Blocks config file (its visibility can later be updated). + render: If False, this will not be included in the Blocks config file at all. + """ + self.children: List[Block] = [] + super().__init__(visible=visible, render=render, **kwargs) + + def __enter__(self): + self.parent = Context.block + Context.block = self + return self + + def add(self, child: Block): + child.parent = self + self.children.append(child) + + def fill_expected_parents(self): + children = [] + pseudo_parent = None + for child in self.children: + expected_parent = child.get_expected_parent() + if not expected_parent or isinstance(self, expected_parent): + pseudo_parent = None + children.append(child) + else: + if pseudo_parent is not None and isinstance( + pseudo_parent, expected_parent + ): + pseudo_parent.children.append(child) + else: + pseudo_parent = expected_parent(render=False) + children.append(pseudo_parent) + pseudo_parent.children = [child] + if Context.root_block: + Context.root_block.blocks[pseudo_parent._id] = pseudo_parent + child.parent = pseudo_parent + self.children = children + + def __exit__(self, *args): + if getattr(self, "allow_expected_parents", True): + self.fill_expected_parents() + Context.block = self.parent + + def postprocess(self, y): + """ + Any postprocessing needed to be performed on a block context. + """ + return y + + +class BlockFunction: + def __init__( + self, + fn: Callable | None, + inputs: List[Component], + outputs: List[Component], + preprocess: bool, + postprocess: bool, + inputs_as_dict: bool, + ): + self.fn = fn + self.inputs = inputs + self.outputs = outputs + self.preprocess = preprocess + self.postprocess = postprocess + self.total_runtime = 0 + self.total_runs = 0 + self.inputs_as_dict = inputs_as_dict + + def __str__(self): + return str( + { + "fn": getattr(self.fn, "__name__", "fn") + if self.fn is not None + else None, + "preprocess": self.preprocess, + "postprocess": self.postprocess, + } + ) + + def __repr__(self): + return str(self) + + +class class_or_instancemethod(classmethod): + def __get__(self, instance, type_): + descr_get = super().__get__ if instance is None else self.__func__.__get__ + return descr_get(instance, type_) + + +def postprocess_update_dict(block: Block, update_dict: Dict, postprocess: bool = True): + """ + Converts a dictionary of updates into a format that can be sent to the frontend. + E.g. {"__type__": "generic_update", "value": "2", "interactive": False} + Into -> {"__type__": "update", "value": 2.0, "mode": "static"} + + Parameters: + block: The Block that is being updated with this update dictionary. + update_dict: The original update dictionary + postprocess: Whether to postprocess the "value" key of the update dictionary. + """ + if update_dict.get("__type__", "") == "generic_update": + update_dict = block.get_specific_update(update_dict) + if update_dict.get("value") is components._Keywords.NO_VALUE: + update_dict.pop("value") + prediction_value = delete_none(update_dict, skip_value=True) + if "value" in prediction_value and postprocess: + assert isinstance( + block, components.IOComponent + ), f"Component {block.__class__} does not support value" + prediction_value["value"] = block.postprocess(prediction_value["value"]) + return prediction_value + + +def convert_component_dict_to_list( + outputs_ids: List[int], predictions: Dict +) -> List | Dict: + """ + Converts a dictionary of component updates into a list of updates in the order of + the outputs_ids and including every output component. Leaves other types of dictionaries unchanged. + E.g. {"textbox": "hello", "number": {"__type__": "generic_update", "value": "2"}} + Into -> ["hello", {"__type__": "generic_update"}, {"__type__": "generic_update", "value": "2"}] + """ + keys_are_blocks = [isinstance(key, Block) for key in predictions.keys()] + if all(keys_are_blocks): + reordered_predictions = [skip() for _ in outputs_ids] + for component, value in predictions.items(): + if component._id not in outputs_ids: + raise ValueError( + f"Returned component {component} not specified as output of function." + ) + output_index = outputs_ids.index(component._id) + reordered_predictions[output_index] = value + predictions = utils.resolve_singleton(reordered_predictions) + elif any(keys_are_blocks): + raise ValueError( + "Returned dictionary included some keys as Components. Either all keys must be Components to assign Component values, or return a List of values to assign output values in order." + ) + return predictions + + +@document("load") +class Blocks(BlockContext): + """ + Blocks is Gradio's low-level API that allows you to create more custom web + applications and demos than Interfaces (yet still entirely in Python). + + + Compared to the Interface class, Blocks offers more flexibility and control over: + (1) the layout of components (2) the events that + trigger the execution of functions (3) data flows (e.g. inputs can trigger outputs, + which can trigger the next level of outputs). Blocks also offers ways to group + together related demos such as with tabs. + + + The basic usage of Blocks is as follows: create a Blocks object, then use it as a + context (with the "with" statement), and then define layouts, components, or events + within the Blocks context. Finally, call the launch() method to launch the demo. + + Example: + import gradio as gr + def update(name): + return f"Welcome to Gradio, {name}!" + + with gr.Blocks() as demo: + gr.Markdown("Start typing below and then click **Run** to see the output.") + with gr.Row(): + inp = gr.Textbox(placeholder="What is your name?") + out = gr.Textbox() + btn = gr.Button("Run") + btn.click(fn=update, inputs=inp, outputs=out) + + demo.launch() + Demos: blocks_hello, blocks_flipper, blocks_speech_text_sentiment, generate_english_german, sound_alert + Guides: blocks_and_event_listeners, controlling_layout, state_in_blocks, custom_CSS_and_JS, custom_interpretations_with_blocks, using_blocks_like_functions + """ + + def __init__( + self, + theme: str = "default", + analytics_enabled: bool | None = None, + mode: str = "blocks", + title: str = "Gradio", + css: str | None = None, + **kwargs, + ): + """ + Parameters: + theme: which theme to use - right now, only "default" is supported. + analytics_enabled: whether to allow basic telemetry. If None, will use GRADIO_ANALYTICS_ENABLED environment variable or default to True. + mode: a human-friendly name for the kind of Blocks or Interface being created. + title: The tab title to display when this is opened in a browser window. + css: custom css or path to custom css file to apply to entire Blocks + """ + # Cleanup shared parameters with Interface #TODO: is this part still necessary after Interface with Blocks? + self.limiter = None + self.save_to = None + self.theme = theme + self.encrypt = False + self.share = False + self.enable_queue = None + self.max_threads = 40 + self.show_error = True + if css is not None and Path(css).exists(): + with open(css) as css_file: + self.css = css_file.read() + else: + self.css = css + + # For analytics_enabled and allow_flagging: (1) first check for + # parameter, (2) check for env variable, (3) default to True/"manual" + self.analytics_enabled = ( + analytics_enabled + if analytics_enabled is not None + else os.getenv("GRADIO_ANALYTICS_ENABLED", "True") == "True" + ) + + super().__init__(render=False, **kwargs) + self.blocks: Dict[int, Block] = {} + self.fns: List[BlockFunction] = [] + self.dependencies = [] + self.mode = mode + + self.is_running = False + self.local_url = None + self.share_url = None + self.width = None + self.height = None + self.api_open = True + + self.ip_address = "" + self.is_space = True if os.getenv("SYSTEM") == "spaces" else False + self.favicon_path = None + self.auth = None + self.dev_mode = True + self.app_id = random.getrandbits(64) + self.temp_file_sets = [] + self.title = title + self.show_api = True + + # Only used when an Interface is loaded from a config + self.predict = None + self.input_components = None + self.output_components = None + self.__name__ = None + self.api_mode = None + + if self.analytics_enabled: + self.ip_address = utils.get_local_ip_address() + data = { + "mode": self.mode, + "ip_address": self.ip_address, + "custom_css": self.css is not None, + "theme": self.theme, + "version": (pkgutil.get_data(__name__, "version.txt") or b"") + .decode("ascii") + .strip(), + } + utils.initiated_analytics(data) + + @classmethod + def from_config( + cls, config: dict, fns: List[Callable], root_url: str | None = None + ) -> Blocks: + """ + Factory method that creates a Blocks from a config and list of functions. + + Parameters: + config: a dictionary containing the configuration of the Blocks. + fns: a list of functions that are used in the Blocks. Must be in the same order as the dependencies in the config. + root_url: an optional root url to use for the components in the Blocks. Allows serving files from an external URL. + """ + config = copy.deepcopy(config) + components_config = config["components"] + original_mapping: Dict[int, Block] = {} + + def get_block_instance(id: int) -> Block: + for block_config in components_config: + if block_config["id"] == id: + break + else: + raise ValueError("Cannot find block with id {}".format(id)) + cls = component_or_layout_class(block_config["type"]) + block_config["props"].pop("type", None) + block_config["props"].pop("name", None) + style = block_config["props"].pop("style", None) + if block_config["props"].get("root_url") is None and root_url: + block_config["props"]["root_url"] = root_url + "/" + # Any component has already processed its initial value, so we skip that step here + block = cls(**block_config["props"], _skip_init_processing=True) + if style and isinstance(block, components.IOComponent): + block.style(**style) + return block + + def iterate_over_children(children_list): + for child_config in children_list: + id = child_config["id"] + block = get_block_instance(id) + + original_mapping[id] = block + + children = child_config.get("children") + if children is not None: + assert isinstance( + block, BlockContext + ), f"Invalid config, Block with id {id} has children but is not a BlockContext." + with block: + iterate_over_children(children) + + with Blocks(theme=config["theme"], css=config["theme"]) as blocks: + # ID 0 should be the root Blocks component + original_mapping[0] = Context.root_block or blocks + + iterate_over_children(config["layout"]["children"]) + + first_dependency = None + + # add the event triggers + for dependency, fn in zip(config["dependencies"], fns): + # We used to add a "fake_event" to the config to cache examples + # without removing it. This was causing bugs in calling gr.Interface.load + # We fixed the issue by removing "fake_event" from the config in examples.py + # but we still need to skip these events when loading the config to support + # older demos + if dependency["trigger"] == "fake_event": + continue + targets = dependency.pop("targets") + trigger = dependency.pop("trigger") + dependency.pop("backend_fn") + dependency.pop("documentation", None) + dependency["inputs"] = [ + original_mapping[i] for i in dependency["inputs"] + ] + dependency["outputs"] = [ + original_mapping[o] for o in dependency["outputs"] + ] + dependency.pop("status_tracker", None) + dependency["preprocess"] = False + dependency["postprocess"] = False + + for target in targets: + dependency = original_mapping[target].set_event_trigger( + event_name=trigger, fn=fn, **dependency + ) + if first_dependency is None: + first_dependency = dependency + + # Allows some use of Interface-specific methods with loaded Spaces + if first_dependency and Context.root_block: + blocks.predict = [fns[0]] + blocks.input_components = [ + Context.root_block.blocks[i] for i in first_dependency["inputs"] + ] + blocks.output_components = [ + Context.root_block.blocks[o] for o in first_dependency["outputs"] + ] + blocks.__name__ = "Interface" + blocks.api_mode = True + + return blocks + + def __str__(self): + return self.__repr__() + + def __repr__(self): + num_backend_fns = len([d for d in self.dependencies if d["backend_fn"]]) + repr = f"Gradio Blocks instance: {num_backend_fns} backend functions" + repr += "\n" + "-" * len(repr) + for d, dependency in enumerate(self.dependencies): + if dependency["backend_fn"]: + repr += f"\nfn_index={d}" + repr += "\n inputs:" + for input_id in dependency["inputs"]: + block = self.blocks[input_id] + repr += "\n |-{}".format(str(block)) + repr += "\n outputs:" + for output_id in dependency["outputs"]: + block = self.blocks[output_id] + repr += "\n |-{}".format(str(block)) + return repr + + def render(self): + if Context.root_block is not None: + if self._id in Context.root_block.blocks: + raise DuplicateBlockError( + f"A block with id: {self._id} has already been rendered in the current Blocks." + ) + if not set(Context.root_block.blocks).isdisjoint(self.blocks): + raise DuplicateBlockError( + "At least one block in this Blocks has already been rendered." + ) + + Context.root_block.blocks.update(self.blocks) + Context.root_block.fns.extend(self.fns) + dependency_offset = len(Context.root_block.dependencies) + for i, dependency in enumerate(self.dependencies): + api_name = dependency["api_name"] + if api_name is not None: + api_name_ = utils.append_unique_suffix( + api_name, + [dep["api_name"] for dep in Context.root_block.dependencies], + ) + if not (api_name == api_name_): + warnings.warn( + "api_name {} already exists, using {}".format( + api_name, api_name_ + ) + ) + dependency["api_name"] = api_name_ + dependency["cancels"] = [ + c + dependency_offset for c in dependency["cancels"] + ] + # Recreate the cancel function so that it has the latest + # dependency fn indices. This is necessary to properly cancel + # events in the backend + if dependency["cancels"]: + updated_cancels = [ + Context.root_block.dependencies[i] + for i in dependency["cancels"] + ] + new_fn = BlockFunction( + get_cancel_function(updated_cancels)[0], + [], + [], + False, + True, + False, + ) + Context.root_block.fns[dependency_offset + i] = new_fn + Context.root_block.dependencies.append(dependency) + Context.root_block.temp_file_sets.extend(self.temp_file_sets) + + if Context.block is not None: + Context.block.children.extend(self.children) + return self + + def is_callable(self, fn_index: int = 0) -> bool: + """Checks if a particular Blocks function is callable (i.e. not stateful or a generator).""" + block_fn = self.fns[fn_index] + dependency = self.dependencies[fn_index] + + if inspect.isasyncgenfunction(block_fn.fn): + return False + if inspect.isgeneratorfunction(block_fn.fn): + return False + for input_id in dependency["inputs"]: + block = self.blocks[input_id] + if getattr(block, "stateful", False): + return False + for output_id in dependency["outputs"]: + block = self.blocks[output_id] + if getattr(block, "stateful", False): + return False + + return True + + def __call__(self, *inputs, fn_index: int = 0, api_name: str | None = None): + """ + Allows Blocks objects to be called as functions. Supply the parameters to the + function as positional arguments. To choose which function to call, use the + fn_index parameter, which must be a keyword argument. + + Parameters: + *inputs: the parameters to pass to the function + fn_index: the index of the function to call (defaults to 0, which for Interfaces, is the default prediction function) + api_name: The api_name of the dependency to call. Will take precedence over fn_index. + """ + if api_name is not None: + inferred_fn_index = next( + ( + i + for i, d in enumerate(self.dependencies) + if d.get("api_name") == api_name + ), + None, + ) + if inferred_fn_index is None: + raise InvalidApiName(f"Cannot find a function with api_name {api_name}") + fn_index = inferred_fn_index + if not (self.is_callable(fn_index)): + raise ValueError( + "This function is not callable because it is either stateful or is a generator. Please use the .launch() method instead to create an interactive user interface." + ) + + inputs = list(inputs) + processed_inputs = self.serialize_data(fn_index, inputs) + batch = self.dependencies[fn_index]["batch"] + if batch: + processed_inputs = [[inp] for inp in processed_inputs] + + outputs = utils.synchronize_async( + self.process_api, + fn_index=fn_index, + inputs=processed_inputs, + request=None, + state={}, + ) + outputs = outputs["data"] + + if batch: + outputs = [out[0] for out in outputs] + + processed_outputs = self.deserialize_data(fn_index, outputs) + processed_outputs = utils.resolve_singleton(processed_outputs) + + return processed_outputs + + async def call_function( + self, + fn_index: int, + processed_input: List[Any], + iterator: Iterator[Any] | None = None, + requests: routes.Request | List[routes.Request] | None = None, + event_id: str | None = None, + ): + """ + Calls function with given index and preprocessed input, and measures process time. + Parameters: + fn_index: index of function to call + processed_input: preprocessed input to pass to function + iterator: iterator to use if function is a generator + requests: requests to pass to function + event_id: id of event in queue + """ + block_fn = self.fns[fn_index] + assert block_fn.fn, f"function with index {fn_index} not defined." + is_generating = False + + if block_fn.inputs_as_dict: + processed_input = [ + { + input_component: data + for input_component, data in zip(block_fn.inputs, processed_input) + } + ] + + if isinstance(requests, list): + request = requests[0] + else: + request = requests + processed_input, progress_index = special_args( + block_fn.fn, + processed_input, + request, + ) + progress_tracker = ( + processed_input[progress_index] if progress_index is not None else None + ) + + start = time.time() + + if iterator is None: # If not a generator function that has already run + if progress_tracker is not None and progress_index is not None: + progress_tracker, fn = create_tracker( + self, event_id, block_fn.fn, progress_tracker.track_tqdm + ) + processed_input[progress_index] = progress_tracker + else: + fn = block_fn.fn + + if inspect.iscoroutinefunction(fn): + prediction = await fn(*processed_input) + else: + prediction = await anyio.to_thread.run_sync( + fn, *processed_input, limiter=self.limiter + ) + else: + prediction = None + + if inspect.isasyncgenfunction(block_fn.fn): + raise ValueError("Gradio does not support async generators.") + if inspect.isgeneratorfunction(block_fn.fn): + if not self.enable_queue: + raise ValueError("Need to enable queue to use generators.") + try: + if iterator is None: + iterator = prediction + prediction = await anyio.to_thread.run_sync( + utils.async_iteration, iterator, limiter=self.limiter + ) + is_generating = True + except StopAsyncIteration: + n_outputs = len(self.dependencies[fn_index].get("outputs")) + prediction = ( + components._Keywords.FINISHED_ITERATING + if n_outputs == 1 + else (components._Keywords.FINISHED_ITERATING,) * n_outputs + ) + iterator = None + + duration = time.time() - start + + return { + "prediction": prediction, + "duration": duration, + "is_generating": is_generating, + "iterator": iterator, + } + + def serialize_data(self, fn_index: int, inputs: List[Any]) -> List[Any]: + dependency = self.dependencies[fn_index] + processed_input = [] + + for i, input_id in enumerate(dependency["inputs"]): + block = self.blocks[input_id] + assert isinstance( + block, components.IOComponent + ), f"{block.__class__} Component with id {input_id} not a valid input component." + serialized_input = block.serialize(inputs[i]) + processed_input.append(serialized_input) + + return processed_input + + def deserialize_data(self, fn_index: int, outputs: List[Any]) -> List[Any]: + dependency = self.dependencies[fn_index] + predictions = [] + + for o, output_id in enumerate(dependency["outputs"]): + block = self.blocks[output_id] + assert isinstance( + block, components.IOComponent + ), f"{block.__class__} Component with id {output_id} not a valid output component." + deserialized = block.deserialize(outputs[o]) + predictions.append(deserialized) + + return predictions + + def preprocess_data(self, fn_index: int, inputs: List[Any], state: Dict[int, Any]): + block_fn = self.fns[fn_index] + dependency = self.dependencies[fn_index] + + if block_fn.preprocess: + processed_input = [] + for i, input_id in enumerate(dependency["inputs"]): + block = self.blocks[input_id] + assert isinstance( + block, components.Component + ), f"{block.__class__} Component with id {input_id} not a valid input component." + if getattr(block, "stateful", False): + processed_input.append(state.get(input_id)) + else: + processed_input.append(block.preprocess(inputs[i])) + else: + processed_input = inputs + return processed_input + + def postprocess_data( + self, fn_index: int, predictions: List | Dict, state: Dict[int, Any] + ): + block_fn = self.fns[fn_index] + dependency = self.dependencies[fn_index] + batch = dependency["batch"] + + if type(predictions) is dict and len(predictions) > 0: + predictions = convert_component_dict_to_list( + dependency["outputs"], predictions + ) + + if len(dependency["outputs"]) == 1 and not (batch): + predictions = [ + predictions, + ] + + output = [] + for i, output_id in enumerate(dependency["outputs"]): + if predictions[i] is components._Keywords.FINISHED_ITERATING: + output.append(None) + continue + block = self.blocks[output_id] + if getattr(block, "stateful", False): + if not utils.is_update(predictions[i]): + state[output_id] = predictions[i] + output.append(None) + else: + prediction_value = predictions[i] + if utils.is_update(prediction_value): + assert isinstance(prediction_value, dict) + prediction_value = postprocess_update_dict( + block=block, + update_dict=prediction_value, + postprocess=block_fn.postprocess, + ) + elif block_fn.postprocess: + assert isinstance( + block, components.Component + ), f"{block.__class__} Component with id {output_id} not a valid output component." + prediction_value = block.postprocess(prediction_value) + output.append(prediction_value) + return output + + async def process_api( + self, + fn_index: int, + inputs: List[Any], + state: Dict[int, Any], + request: routes.Request | List[routes.Request] | None = None, + iterators: Dict[int, Any] | None = None, + event_id: str | None = None, + ) -> Dict[str, Any]: + """ + Processes API calls from the frontend. First preprocesses the data, + then runs the relevant function, then postprocesses the output. + Parameters: + fn_index: Index of function to run. + inputs: input data received from the frontend + username: name of user if authentication is set up (not used) + state: data stored from stateful components for session (key is input block id) + iterators: the in-progress iterators for each generator function (key is function index) + Returns: None + """ + block_fn = self.fns[fn_index] + batch = self.dependencies[fn_index]["batch"] + + if batch: + max_batch_size = self.dependencies[fn_index]["max_batch_size"] + batch_sizes = [len(inp) for inp in inputs] + batch_size = batch_sizes[0] + if inspect.isasyncgenfunction(block_fn.fn) or inspect.isgeneratorfunction( + block_fn.fn + ): + raise ValueError("Gradio does not support generators in batch mode.") + if not all(x == batch_size for x in batch_sizes): + raise ValueError( + f"All inputs to a batch function must have the same length but instead have sizes: {batch_sizes}." + ) + if batch_size > max_batch_size: + raise ValueError( + f"Batch size ({batch_size}) exceeds the max_batch_size for this function ({max_batch_size})" + ) + + inputs = [ + self.preprocess_data(fn_index, list(i), state) for i in zip(*inputs) + ] + result = await self.call_function( + fn_index, list(zip(*inputs)), None, request + ) + preds = result["prediction"] + data = [ + self.postprocess_data(fn_index, list(o), state) for o in zip(*preds) + ] + data = list(zip(*data)) + is_generating, iterator = None, None + else: + inputs = self.preprocess_data(fn_index, inputs, state) + iterator = iterators.get(fn_index, None) if iterators else None + result = await self.call_function( + fn_index, inputs, iterator, request, event_id + ) + data = self.postprocess_data(fn_index, result["prediction"], state) + is_generating, iterator = result["is_generating"], result["iterator"] + + block_fn.total_runtime += result["duration"] + block_fn.total_runs += 1 + + return { + "data": data, + "is_generating": is_generating, + "iterator": iterator, + "duration": result["duration"], + "average_duration": block_fn.total_runtime / block_fn.total_runs, + } + + async def create_limiter(self): + self.limiter = ( + None + if self.max_threads == 40 + else CapacityLimiter(total_tokens=self.max_threads) + ) + + def get_config(self): + return {"type": "column"} + + def get_config_file(self): + config = { + "version": routes.VERSION, + "mode": self.mode, + "dev_mode": self.dev_mode, + "components": [], + "theme": self.theme, + "css": self.css, + "title": self.title or "Gradio", + "is_space": self.is_space, + "enable_queue": getattr(self, "enable_queue", False), # launch attributes + "show_error": getattr(self, "show_error", False), + "show_api": self.show_api, + "is_colab": utils.colab_check(), + } + + def getLayout(block): + if not isinstance(block, BlockContext): + return {"id": block._id} + children_layout = [] + for child in block.children: + children_layout.append(getLayout(child)) + return {"id": block._id, "children": children_layout} + + config["layout"] = getLayout(self) + + for _id, block in self.blocks.items(): + config["components"].append( + { + "id": _id, + "type": (block.get_block_name()), + "props": utils.delete_none(block.get_config()) + if hasattr(block, "get_config") + else {}, + } + ) + config["dependencies"] = self.dependencies + return config + + def __enter__(self): + if Context.block is None: + Context.root_block = self + self.parent = Context.block + Context.block = self + return self + + def __exit__(self, *args): + super().fill_expected_parents() + Context.block = self.parent + # Configure the load events before root_block is reset + self.attach_load_events() + if self.parent is None: + Context.root_block = None + else: + self.parent.children.extend(self.children) + self.config = self.get_config_file() + self.app = routes.App.create_app(self) + + @class_or_instancemethod + def load( + self_or_cls, + fn: Callable | None = None, + inputs: List[Component] | None = None, + outputs: List[Component] | None = None, + api_name: str | None = None, + scroll_to_output: bool = False, + show_progress: bool = True, + queue=None, + batch: bool = False, + max_batch_size: int = 4, + preprocess: bool = True, + postprocess: bool = True, + every: float | None = None, + _js: str | None = None, + *, + name: str | None = None, + src: str | None = None, + api_key: str | None = None, + alias: str | None = None, + **kwargs, + ) -> Blocks | Dict[str, Any] | None: + """ + For reverse compatibility reasons, this is both a class method and an instance + method, the two of which, confusingly, do two completely different things. + + + Class method: loads a demo from a Hugging Face Spaces repo and creates it locally and returns a block instance. Equivalent to gradio.Interface.load() + + + Instance method: adds event that runs as soon as the demo loads in the browser. Example usage below. + Parameters: + name: Class Method - the name of the model (e.g. "gpt2" or "facebook/bart-base") or space (e.g. "flax-community/spanish-gpt2"), can include the `src` as prefix (e.g. "models/facebook/bart-base") + src: Class Method - the source of the model: `models` or `spaces` (or leave empty if source is provided as a prefix in `name`) + api_key: Class Method - optional access token for loading private Hugging Face Hub models or spaces. Find your token here: https://huggingface.co/settings/tokens + alias: Class Method - optional string used as the name of the loaded model instead of the default name (only applies if loading a Space running Gradio 2.x) + fn: Instance Method - the function to wrap an interface around. Often a machine learning model's prediction function. Each parameter of the function corresponds to one input component, and the function should return a single value or a tuple of values, with each element in the tuple corresponding to one output component. + inputs: Instance Method - List of gradio.components to use as inputs. If the function takes no inputs, this should be an empty list. + outputs: Instance Method - List of gradio.components to use as inputs. If the function returns no outputs, this should be an empty list. + api_name: Instance Method - Defining this parameter exposes the endpoint in the api docs + scroll_to_output: Instance Method - If True, will scroll to output component on completion + show_progress: Instance Method - If True, will show progress animation while pending + queue: Instance Method - If True, will place the request on the queue, if the queue exists + batch: Instance Method - If True, then the function should process a batch of inputs, meaning that it should accept a list of input values for each parameter. The lists should be of equal length (and be up to length `max_batch_size`). The function is then *required* to return a tuple of lists (even if there is only 1 output component), with each list in the tuple corresponding to one output component. + max_batch_size: Instance Method - Maximum number of inputs to batch together if this is called from the queue (only relevant if batch=True) + preprocess: Instance Method - If False, will not run preprocessing of component data before running 'fn' (e.g. leaving it as a base64 string if this method is called with the `Image` component). + postprocess: Instance Method - If False, will not run postprocessing of component data before returning 'fn' output to the browser. + every: Instance Method - Run this event 'every' number of seconds. Interpreted in seconds. Queue must be enabled. + Example: + import gradio as gr + import datetime + with gr.Blocks() as demo: + def get_time(): + return datetime.datetime.now().time() + dt = gr.Textbox(label="Current time") + demo.load(get_time, inputs=None, outputs=dt) + demo.launch() + """ + # _js: Optional frontend js method to run before running 'fn'. Input arguments for js method are values of 'inputs' and 'outputs', return should be a list of values for output components. + if isinstance(self_or_cls, type): + if name is None: + raise ValueError( + "Blocks.load() requires passing parameters as keyword arguments" + ) + return external.load_blocks_from_repo(name, src, api_key, alias, **kwargs) + else: + return self_or_cls.set_event_trigger( + event_name="load", + fn=fn, + inputs=inputs, + outputs=outputs, + api_name=api_name, + preprocess=preprocess, + postprocess=postprocess, + scroll_to_output=scroll_to_output, + show_progress=show_progress, + js=_js, + queue=queue, + batch=batch, + max_batch_size=max_batch_size, + every=every, + no_target=True, + ) + + def clear(self): + """Resets the layout of the Blocks object.""" + self.blocks = {} + self.fns = [] + self.dependencies = [] + self.children = [] + return self + + @document() + def queue( + self, + concurrency_count: int = 1, + status_update_rate: float | Literal["auto"] = "auto", + client_position_to_load_data: int | None = None, + default_enabled: bool | None = None, + api_open: bool = True, + max_size: int | None = None, + ): + """ + You can control the rate of processed requests by creating a queue. This will allow you to set the number of requests to be processed at one time, and will let users know their position in the queue. + Parameters: + concurrency_count: Number of worker threads that will be processing requests from the queue concurrently. Increasing this number will increase the rate at which requests are processed, but will also increase the memory usage of the queue. + status_update_rate: If "auto", Queue will send status estimations to all clients whenever a job is finished. Otherwise Queue will send status at regular intervals set by this parameter as the number of seconds. + client_position_to_load_data: DEPRECATED. This parameter is deprecated and has no effect. + default_enabled: Deprecated and has no effect. + api_open: If True, the REST routes of the backend will be open, allowing requests made directly to those endpoints to skip the queue. + max_size: The maximum number of events the queue will store at any given moment. If the queue is full, new events will not be added and a user will receive a message saying that the queue is full. If None, the queue size will be unlimited. + Example: + demo = gr.Interface(gr.Textbox(), gr.Image(), image_generator) + demo.queue(concurrency_count=3) + demo.launch() + """ + if default_enabled is not None: + warnings.warn( + "The default_enabled parameter of queue has no effect and will be removed " + "in a future version of gradio." + ) + self.enable_queue = True + self.api_open = api_open + if client_position_to_load_data is not None: + warnings.warn("The client_position_to_load_data parameter is deprecated.") + self._queue = queueing.Queue( + live_updates=status_update_rate == "auto", + concurrency_count=concurrency_count, + update_intervals=status_update_rate if status_update_rate != "auto" else 1, + max_size=max_size, + blocks_dependencies=self.dependencies, + ) + self.config = self.get_config_file() + return self + + def launch( + self, + inline: bool | None = None, + inbrowser: bool = False, + share: bool | None = None, + debug: bool = False, + enable_queue: bool | None = None, + max_threads: int = 40, + auth: Callable | Tuple[str, str] | List[Tuple[str, str]] | None = None, + auth_message: str | None = None, + prevent_thread_lock: bool = False, + show_error: bool = False, + server_name: str | None = None, + server_port: int | None = None, + show_tips: bool = False, + height: int = 500, + width: int | str = "100%", + encrypt: bool = False, + favicon_path: str | None = None, + ssl_keyfile: str | None = None, + ssl_certfile: str | None = None, + ssl_keyfile_password: str | None = None, + quiet: bool = False, + show_api: bool = True, + _frontend: bool = True, + ) -> Tuple[FastAPI, str, str]: + """ + Launches a simple web server that serves the demo. Can also be used to create a + public link used by anyone to access the demo from their browser by setting share=True. + + Parameters: + inline: whether to display in the interface inline in an iframe. Defaults to True in python notebooks; False otherwise. + inbrowser: whether to automatically launch the interface in a new tab on the default browser. + share: whether to create a publicly shareable link for the interface. Creates an SSH tunnel to make your UI accessible from anywhere. If not provided, it is set to False by default every time, except when running in Google Colab. When localhost is not accessible (e.g. Google Colab), setting share=False is not supported. + debug: if True, blocks the main thread from running. If running in Google Colab, this is needed to print the errors in the cell output. + auth: If provided, username and password (or list of username-password tuples) required to access interface. Can also provide function that takes username and password and returns True if valid login. + auth_message: If provided, HTML message provided on login page. + prevent_thread_lock: If True, the interface will block the main thread while the server is running. + show_error: If True, any errors in the interface will be displayed in an alert modal and printed in the browser console log + server_port: will start gradio app on this port (if available). Can be set by environment variable GRADIO_SERVER_PORT. If None, will search for an available port starting at 7860. + server_name: to make app accessible on local network, set this to "0.0.0.0". Can be set by environment variable GRADIO_SERVER_NAME. If None, will use "127.0.0.1". + show_tips: if True, will occasionally show tips about new Gradio features + enable_queue: DEPRECATED (use .queue() method instead.) if True, inference requests will be served through a queue instead of with parallel threads. Required for longer inference times (> 1min) to prevent timeout. The default option in HuggingFace Spaces is True. The default option elsewhere is False. + max_threads: the maximum number of total threads that the Gradio app can generate in parallel. The default is inherited from the starlette library (currently 40). Applies whether the queue is enabled or not. But if queuing is enabled, this parameter is increaseed to be at least the concurrency_count of the queue. + width: The width in pixels of the iframe element containing the interface (used if inline=True) + height: The height in pixels of the iframe element containing the interface (used if inline=True) + encrypt: If True, flagged data will be encrypted by key provided by creator at launch + favicon_path: If a path to a file (.png, .gif, or .ico) is provided, it will be used as the favicon for the web page. + ssl_keyfile: If a path to a file is provided, will use this as the private key file to create a local server running on https. + ssl_certfile: If a path to a file is provided, will use this as the signed certificate for https. Needs to be provided if ssl_keyfile is provided. + ssl_keyfile_password: If a password is provided, will use this with the ssl certificate for https. + quiet: If True, suppresses most print statements. + show_api: If True, shows the api docs in the footer of the app. Default True. If the queue is enabled, then api_open parameter of .queue() will determine if the api docs are shown, independent of the value of show_api. + Returns: + app: FastAPI app object that is running the demo + local_url: Locally accessible link to the demo + share_url: Publicly accessible link to the demo (if share=True, otherwise None) + Example: + import gradio as gr + def reverse(text): + return text[::-1] + demo = gr.Interface(reverse, "text", "text") + demo.launch(share=True, auth=("username", "password")) + """ + self.dev_mode = False + if ( + auth + and not callable(auth) + and not isinstance(auth[0], tuple) + and not isinstance(auth[0], list) + ): + self.auth = [auth] + else: + self.auth = auth + self.auth_message = auth_message + self.show_tips = show_tips + self.show_error = show_error + self.height = height + self.width = width + self.favicon_path = favicon_path + self.progress_tracking = any( + block_fn.fn is not None and special_args(block_fn.fn)[1] is not None + for block_fn in self.fns + ) + + if enable_queue is not None: + self.enable_queue = enable_queue + warnings.warn( + "The `enable_queue` parameter has been deprecated. Please use the `.queue()` method instead.", + DeprecationWarning, + ) + + if self.is_space: + self.enable_queue = self.enable_queue is not False + else: + self.enable_queue = self.enable_queue is True + if self.enable_queue and not hasattr(self, "_queue"): + self.queue() + self.show_api = self.api_open if self.enable_queue else show_api + + if not self.enable_queue and self.progress_tracking: + raise ValueError("Progress tracking requires queuing to be enabled.") + + for dep in self.dependencies: + for i in dep["cancels"]: + if not self.queue_enabled_for_fn(i): + raise ValueError( + "In order to cancel an event, the queue for that event must be enabled! " + "You may get this error by either 1) passing a function that uses the yield keyword " + "into an interface without enabling the queue or 2) defining an event that cancels " + "another event without enabling the queue. Both can be solved by calling .queue() " + "before .launch()" + ) + if dep["batch"] and ( + dep["queue"] is False + or (dep["queue"] is None and not self.enable_queue) + ): + raise ValueError("In order to use batching, the queue must be enabled.") + + self.config = self.get_config_file() + self.encrypt = encrypt + self.max_threads = max( + self._queue.max_thread_count if self.enable_queue else 0, max_threads + ) + if self.encrypt: + self.encryption_key = encryptor.get_key( + getpass.getpass("Enter key for encryption: ") + ) + + if self.is_running: + assert isinstance( + self.local_url, str + ), f"Invalid local_url: {self.local_url}" + if not (quiet): + print( + "Rerunning server... use `close()` to stop if you need to change `launch()` parameters.\n----" + ) + else: + server_name, server_port, local_url, app, server = networking.start_server( + self, + server_name, + server_port, + ssl_keyfile, + ssl_certfile, + ssl_keyfile_password, + ) + self.server_name = server_name + self.local_url = local_url + self.server_port = server_port + self.server_app = app + self.server = server + self.is_running = True + self.is_colab = utils.colab_check() + self.protocol = ( + "https" + if self.local_url.startswith("https") or self.is_colab + else "http" + ) + + if self.enable_queue: + self._queue.set_url(self.local_url) + + # Cannot run async functions in background other than app's scope. + # Workaround by triggering the app endpoint + requests.get(f"{self.local_url}startup-events") + + if self.enable_queue: + if self.encrypt: + raise ValueError("Cannot queue with encryption enabled.") + utils.launch_counter() + + self.share = ( + share + if share is not None + else True + if self.is_colab and self.enable_queue + else False + ) + + # If running in a colab or not able to access localhost, + # a shareable link must be created. + if _frontend and (not networking.url_ok(self.local_url)) and (not self.share): + raise ValueError( + "When localhost is not accessible, a shareable link must be created. Please set share=True." + ) + + if self.is_colab: + if not quiet: + if debug: + print(strings.en["COLAB_DEBUG_TRUE"]) + else: + print(strings.en["COLAB_DEBUG_FALSE"]) + if not self.share: + print(strings.en["COLAB_WARNING"].format(self.server_port)) + if self.enable_queue and not self.share: + raise ValueError( + "When using queueing in Colab, a shareable link must be created. Please set share=True." + ) + else: + print( + strings.en["RUNNING_LOCALLY_SEPARATED"].format( + self.protocol, self.server_name, self.server_port + ) + ) + + if self.share: + if self.is_space: + raise RuntimeError("Share is not supported when you are in Spaces") + try: + if self.share_url is None: + self.share_url = networking.setup_tunnel( + self.server_name, self.server_port + ) + print(strings.en["SHARE_LINK_DISPLAY"].format(self.share_url)) + if not (quiet): + print(strings.en["SHARE_LINK_MESSAGE"]) + except RuntimeError: + if self.analytics_enabled: + utils.error_analytics(self.ip_address, "Not able to set up tunnel") + self.share_url = None + self.share = False + print(strings.en["COULD_NOT_GET_SHARE_LINK"]) + else: + if not (quiet): + print(strings.en["PUBLIC_SHARE_TRUE"]) + self.share_url = None + + if inbrowser: + link = self.share_url if self.share and self.share_url else self.local_url + webbrowser.open(link) + + # Check if running in a Python notebook in which case, display inline + if inline is None: + inline = utils.ipython_check() and (self.auth is None) + if inline: + if self.auth is not None: + print( + "Warning: authentication is not supported inline. Please" + "click the link to access the interface in a new tab." + ) + try: + from IPython.display import HTML, Javascript, display # type: ignore + + if self.share and self.share_url: + while not networking.url_ok(self.share_url): + time.sleep(0.25) + display( + HTML( + f'
' + ) + ) + elif self.is_colab: + # modified from /usr/local/lib/python3.7/dist-packages/google/colab/output/_util.py within Colab environment + code = """(async (port, path, width, height, cache, element) => { + if (!google.colab.kernel.accessAllowed && !cache) { + return; + } + element.appendChild(document.createTextNode('')); + const url = await google.colab.kernel.proxyPort(port, {cache}); + + const external_link = document.createElement('div'); + external_link.innerHTML = ` +
+ Running on + https://localhost:${port}${path} + +
+ `; + element.appendChild(external_link); + + const iframe = document.createElement('iframe'); + iframe.src = new URL(path, url).toString(); + iframe.height = height; + iframe.allow = "autoplay; camera; microphone; clipboard-read; clipboard-write;" + iframe.width = width; + iframe.style.border = 0; + element.appendChild(iframe); + })""" + "({port}, {path}, {width}, {height}, {cache}, window.element)".format( + port=json.dumps(self.server_port), + path=json.dumps("/"), + width=json.dumps(self.width), + height=json.dumps(self.height), + cache=json.dumps(False), + ) + + display(Javascript(code)) + else: + display( + HTML( + f'
' + ) + ) + except ImportError: + pass + + if getattr(self, "analytics_enabled", False): + data = { + "launch_method": "browser" if inbrowser else "inline", + "is_google_colab": self.is_colab, + "is_sharing_on": self.share, + "share_url": self.share_url, + "ip_address": self.ip_address, + "enable_queue": self.enable_queue, + "show_tips": self.show_tips, + "server_name": server_name, + "server_port": server_port, + "is_spaces": self.is_space, + "mode": self.mode, + } + utils.launch_analytics(data) + + utils.show_tip(self) + + # Block main thread if debug==True + if debug or int(os.getenv("GRADIO_DEBUG", 0)) == 1: + self.block_thread() + # Block main thread if running in a script to stop script from exiting + is_in_interactive_mode = bool(getattr(sys, "ps1", sys.flags.interactive)) + + if not prevent_thread_lock and not is_in_interactive_mode: + self.block_thread() + + return TupleNoPrint((self.server_app, self.local_url, self.share_url)) + + def integrate( + self, + comet_ml: comet_ml.Experiment | None = None, + wandb: ModuleType | None = None, + mlflow: ModuleType | None = None, + ) -> None: + """ + A catch-all method for integrating with other libraries. This method should be run after launch() + Parameters: + comet_ml: If a comet_ml Experiment object is provided, will integrate with the experiment and appear on Comet dashboard + wandb: If the wandb module is provided, will integrate with it and appear on WandB dashboard + mlflow: If the mlflow module is provided, will integrate with the experiment and appear on ML Flow dashboard + """ + analytics_integration = "" + if comet_ml is not None: + analytics_integration = "CometML" + comet_ml.log_other("Created from", "Gradio") + if self.share_url is not None: + comet_ml.log_text("gradio: " + self.share_url) + comet_ml.end() + elif self.local_url: + comet_ml.log_text("gradio: " + self.local_url) + comet_ml.end() + else: + raise ValueError("Please run `launch()` first.") + if wandb is not None: + analytics_integration = "WandB" + if self.share_url is not None: + wandb.log( + { + "Gradio panel": wandb.Html( + '' + ) + } + ) + else: + print( + "The WandB integration requires you to " + "`launch(share=True)` first." + ) + if mlflow is not None: + analytics_integration = "MLFlow" + if self.share_url is not None: + mlflow.log_param("Gradio Interface Share Link", self.share_url) + else: + mlflow.log_param("Gradio Interface Local Link", self.local_url) + if self.analytics_enabled and analytics_integration: + data = {"integration": analytics_integration} + utils.integration_analytics(data) + + def close(self, verbose: bool = True) -> None: + """ + Closes the Interface that was launched and frees the port. + """ + try: + if self.enable_queue: + self._queue.close() + self.server.close() + self.is_running = False + if verbose: + print("Closing server running on port: {}".format(self.server_port)) + except (AttributeError, OSError): # can't close if not running + pass + + def block_thread( + self, + ) -> None: + """Block main thread until interrupted by user.""" + try: + while True: + time.sleep(0.1) + except (KeyboardInterrupt, OSError): + print("Keyboard interruption in main thread... closing server.") + self.server.close() + for tunnel in CURRENT_TUNNELS: + tunnel.kill() + + def attach_load_events(self): + """Add a load event for every component whose initial value should be randomized.""" + if Context.root_block: + for component in Context.root_block.blocks.values(): + if ( + isinstance(component, components.IOComponent) + and component.load_event_to_attach + ): + load_fn, every = component.load_event_to_attach + # Use set_event_trigger to avoid ambiguity between load class/instance method + self.set_event_trigger( + "load", + load_fn, + None, + component, + no_target=True, + queue=False, + every=every, + ) + + def startup_events(self): + """Events that should be run when the app containing this block starts up.""" + + if self.enable_queue: + utils.run_coro_in_background(self._queue.start, (self.progress_tracking,)) + utils.run_coro_in_background(self.create_limiter) + + def queue_enabled_for_fn(self, fn_index: int): + if self.dependencies[fn_index]["queue"] is None: + return self.enable_queue + return self.dependencies[fn_index]["queue"] diff --git a/gradio-modified/gradio/components.py b/gradio-modified/gradio/components.py new file mode 100644 index 0000000000000000000000000000000000000000..ae41c535846c530643965cf969bd438a54295469 --- /dev/null +++ b/gradio-modified/gradio/components.py @@ -0,0 +1,5068 @@ +"""Contains all of the components that can be used with Gradio Interface / Blocks. +Along with the docs for each component, you can find the names of example demos that use +each component. These demos are located in the `demo` directory.""" + +from __future__ import annotations + +import inspect +import json +import math +import operator +import random +import tempfile +import uuid +import warnings +from copy import deepcopy +from enum import Enum +from pathlib import Path +from types import ModuleType +from typing import TYPE_CHECKING, Any, Callable, Dict, List, Tuple, Type + +import altair as alt +import matplotlib.figure +import numpy as np +import pandas as pd +import PIL +import PIL.ImageOps +from ffmpy import FFmpeg +from markdown_it import MarkdownIt +from mdit_py_plugins.dollarmath.index import dollarmath_plugin +from pandas.api.types import is_numeric_dtype +from PIL import Image as _Image # using _ to minimize namespace pollution +from typing_extensions import Literal + +from gradio import media_data, processing_utils, utils +from gradio.blocks import Block, BlockContext +from gradio.context import Context +from gradio.documentation import document, set_documentation_group +from gradio.events import ( + Blurrable, + Changeable, + Clearable, + Clickable, + Editable, + Playable, + Streamable, + Submittable, + Uploadable, +) +from gradio.layouts import Column, Form, Row +from gradio.processing_utils import TempFileManager +from gradio.serializing import ( + FileSerializable, + ImgSerializable, + JSONSerializable, + Serializable, + SimpleSerializable, +) + +if TYPE_CHECKING: + from typing import TypedDict + + class DataframeData(TypedDict): + headers: List[str] + data: List[List[str | int | bool]] + + +set_documentation_group("component") +_Image.init() # fixes https://github.com/gradio-app/gradio/issues/2843 + + +class _Keywords(Enum): + NO_VALUE = "NO_VALUE" # Used as a sentinel to determine if nothing is provided as a argument for `value` in `Component.update()` + FINISHED_ITERATING = "FINISHED_ITERATING" # Used to skip processing of a component's value (needed for generators + state) + + +class Component(Block): + """ + A base class for defining the methods that all gradio components should have. + """ + + def __str__(self): + return self.__repr__() + + def __repr__(self): + return f"{self.get_block_name()}" + + def get_config(self): + """ + :return: a dictionary with context variables for the javascript file associated with the context + """ + return { + "name": self.get_block_name(), + **super().get_config(), + } + + def preprocess(self, x: Any) -> Any: + """ + Any preprocessing needed to be performed on function input. + """ + return x + + def postprocess(self, y): + """ + Any postprocessing needed to be performed on function output. + """ + return y + + def style( + self, + *, + container: bool | None = None, + **kwargs, + ): + """ + This method can be used to change the appearance of the component. + Parameters: + container: If True, will place the component in a container - providing some extra padding around the border. + """ + put_deprecated_params_in_box = False + if "rounded" in kwargs: + warnings.warn( + "'rounded' styling is no longer supported. To round adjacent components together, place them in a Column(variant='box')." + ) + if isinstance(kwargs["rounded"], list) or isinstance( + kwargs["rounded"], tuple + ): + put_deprecated_params_in_box = True + kwargs.pop("rounded") + if "margin" in kwargs: + warnings.warn( + "'margin' styling is no longer supported. To place adjacent components together without margin, place them in a Column(variant='box')." + ) + if isinstance(kwargs["margin"], list) or isinstance( + kwargs["margin"], tuple + ): + put_deprecated_params_in_box = True + kwargs.pop("margin") + if "border" in kwargs: + warnings.warn( + "'border' styling is no longer supported. To place adjacent components in a shared border, place them in a Column(variant='box')." + ) + kwargs.pop("border") + if container is not None: + self._style["container"] = container + if len(kwargs): + for key in kwargs: + warnings.warn(f"Unknown style parameter: {key}") + if put_deprecated_params_in_box and isinstance(self.parent, (Row, Column)): + if self.parent.variant == "default": + self.parent.variant = "compact" + return self + + +class IOComponent(Component, Serializable): + """ + A base class for defining methods that all input/output components should have. + """ + + def __init__( + self, + *, + value: Any = None, + label: str | None = None, + show_label: bool = True, + interactive: bool | None = None, + visible: bool = True, + elem_id: str | None = None, + load_fn: Callable | None = None, + every: float | None = None, + **kwargs, + ): + super().__init__(elem_id=elem_id, visible=visible, **kwargs) + + self.label = label + self.show_label = show_label + self.interactive = interactive + + self.load_event = None + self.load_event_to_attach = None + load_fn, initial_value = self.get_load_fn_and_initial_value(value) + self.value = ( + initial_value + if self._skip_init_processing + else self.postprocess(initial_value) + ) + if callable(load_fn): + self.load_event = self.attach_load_event(load_fn, every) + + self.set_interpret_parameters() + + def get_config(self): + return { + "label": self.label, + "show_label": self.show_label, + "interactive": self.interactive, + **super().get_config(), + } + + def set_interpret_parameters(self): + """ + Set any parameters for interpretation. + """ + return self + + def get_interpretation_neighbors(self, x: Any) -> Tuple[List, Dict, bool]: + """ + Generates values similar to input to be used to interpret the significance of the input in the final output. + Parameters: + x: Input to interface + Returns: (neighbor_values, interpret_kwargs, interpret_by_removal) + neighbor_values: Neighboring values to input x to compute for interpretation + interpret_kwargs: Keyword arguments to be passed to get_interpretation_scores + interpret_by_removal: If True, returned neighbors are values where the interpreted subsection was removed. If False, returned neighbors are values where the interpreted subsection was modified to a different value. + """ + return [], {}, True + + def get_interpretation_scores( + self, x: Any, neighbors: List[Any], scores: List[float], **kwargs + ) -> List: + """ + Arrange the output values from the neighbors into interpretation scores for the interface to render. + Parameters: + x: Input to interface + neighbors: Neighboring values to input x used for interpretation. + scores: Output value corresponding to each neighbor in neighbors + Returns: + Arrangement of interpretation scores for interfaces to render. + """ + return [] + + def generate_sample(self) -> Any: + """ + Returns a sample value of the input that would be accepted by the api. Used for api documentation. + """ + pass + + @staticmethod + def add_interactive_to_config(config, interactive): + if interactive is not None: + config["mode"] = "dynamic" if interactive else "static" + return config + + @staticmethod + def get_load_fn_and_initial_value(value): + if callable(value): + initial_value = value() + load_fn = value + else: + initial_value = value + load_fn = None + return load_fn, initial_value + + def attach_load_event(self, callable: Callable, every: float | None): + """Add a load event that runs `callable`, optionally every `every` seconds.""" + if Context.root_block: + return Context.root_block.load( + callable, + None, + self, + no_target=True, + every=every, + ) + else: + self.load_event_to_attach = (callable, every) + + def as_example(self, input_data): + """Return the input data in a way that can be displayed by the examples dataset component in the front-end.""" + return input_data + + +class FormComponent: + def get_expected_parent(self) -> Type[Form]: + return Form + + +@document("change", "submit", "blur", "style") +class Textbox( + FormComponent, Changeable, Submittable, Blurrable, IOComponent, SimpleSerializable +): + """ + Creates a textarea for user to enter string input or display string output. + Preprocessing: passes textarea value as a {str} into the function. + Postprocessing: expects a {str} returned from function and sets textarea value to it. + Examples-format: a {str} representing the textbox input. + + Demos: hello_world, diff_texts, sentence_builder + Guides: creating_a_chatbot, real_time_speech_recognition + """ + + def __init__( + self, + value: str | Callable | None = "", + *, + lines: int = 1, + max_lines: int = 20, + placeholder: str | None = None, + label: str | None = None, + every: float | None = None, + show_label: bool = True, + interactive: bool | None = None, + visible: bool = True, + elem_id: str | None = None, + type: str = "text", + **kwargs, + ): + """ + Parameters: + value: default text to provide in textarea. If callable, the function will be called whenever the app loads to set the initial value of the component. + lines: minimum number of line rows to provide in textarea. + max_lines: maximum number of line rows to provide in textarea. + placeholder: placeholder hint to provide behind textarea. + label: component name in interface. + every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute. + show_label: if True, will display label. + interactive: if True, will be rendered as an editable textbox; if False, editing will be disabled. If not provided, this is inferred based on whether the component is used as an input or output. + visible: If False, component will be hidden. + elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles. + type: The type of textbox. One of: 'text', 'password', 'email', Default is 'text'. + """ + if type not in ["text", "password", "email"]: + raise ValueError('`type` must be one of "text", "password", or "email".') + + # + self.lines = lines + self.max_lines = max_lines if type == "text" else 1 + self.placeholder = placeholder + self.interpret_by_tokens = True + IOComponent.__init__( + self, + label=label, + every=every, + show_label=show_label, + interactive=interactive, + visible=visible, + elem_id=elem_id, + value=value, + **kwargs, + ) + self.cleared_value = "" + self.test_input = value + self.type = type + + def get_config(self): + return { + "lines": self.lines, + "max_lines": self.max_lines, + "placeholder": self.placeholder, + "value": self.value, + "type": self.type, + **IOComponent.get_config(self), + } + + @staticmethod + def update( + value: str | Literal[_Keywords.NO_VALUE] | None = _Keywords.NO_VALUE, + lines: int | None = None, + max_lines: int | None = None, + placeholder: str | None = None, + label: str | None = None, + show_label: bool | None = None, + visible: bool | None = None, + interactive: bool | None = None, + type: str | None = None, + ): + updated_config = { + "lines": lines, + "max_lines": max_lines, + "placeholder": placeholder, + "label": label, + "show_label": show_label, + "visible": visible, + "value": value, + "type": type, + "__type__": "update", + } + return IOComponent.add_interactive_to_config(updated_config, interactive) + + def generate_sample(self) -> str: + return "Hello World" + + def preprocess(self, x: str | None) -> str | None: + """ + Preprocesses input (converts it to a string) before passing it to the function. + Parameters: + x: text + Returns: + text + """ + return None if x is None else str(x) + + def postprocess(self, y: str | None) -> str | None: + """ + Postproccess the function output y by converting it to a str before passing it to the frontend. + Parameters: + y: function output to postprocess. + Returns: + text + """ + return None if y is None else str(y) + + def set_interpret_parameters( + self, separator: str = " ", replacement: str | None = None + ): + """ + Calculates interpretation score of characters in input by splitting input into tokens, then using a "leave one out" method to calculate the score of each token by removing each token and measuring the delta of the output value. + Parameters: + separator: Separator to use to split input into tokens. + replacement: In the "leave one out" step, the text that the token should be replaced with. If None, the token is removed altogether. + """ + self.interpretation_separator = separator + self.interpretation_replacement = replacement + return self + + def tokenize(self, x: str) -> Tuple[List[str], List[str], None]: + """ + Tokenizes an input string by dividing into "words" delimited by self.interpretation_separator + """ + tokens = x.split(self.interpretation_separator) + leave_one_out_strings = [] + for index in range(len(tokens)): + leave_one_out_set = list(tokens) + if self.interpretation_replacement is None: + leave_one_out_set.pop(index) + else: + leave_one_out_set[index] = self.interpretation_replacement + leave_one_out_strings.append( + self.interpretation_separator.join(leave_one_out_set) + ) + return tokens, leave_one_out_strings, None + + def get_masked_inputs( + self, tokens: List[str], binary_mask_matrix: List[List[int]] + ) -> List[str]: + """ + Constructs partially-masked sentences for SHAP interpretation + """ + masked_inputs = [] + for binary_mask_vector in binary_mask_matrix: + masked_input = np.array(tokens)[np.array(binary_mask_vector, dtype=bool)] + masked_inputs.append(self.interpretation_separator.join(masked_input)) + return masked_inputs + + def get_interpretation_scores( + self, x, neighbors, scores: List[float], tokens: List[str], masks=None, **kwargs + ) -> List[Tuple[str, float]]: + """ + Returns: + Each tuple set represents a set of characters and their corresponding interpretation score. + """ + result = [] + for token, score in zip(tokens, scores): + result.append((token, score)) + result.append((self.interpretation_separator, 0)) + return result + + +@document("change", "submit", "style") +class Number( + FormComponent, Changeable, Submittable, Blurrable, IOComponent, SimpleSerializable +): + """ + Creates a numeric field for user to enter numbers as input or display numeric output. + Preprocessing: passes field value as a {float} or {int} into the function, depending on `precision`. + Postprocessing: expects an {int} or {float} returned from the function and sets field value to it. + Examples-format: a {float} or {int} representing the number's value. + + Demos: tax_calculator, titanic_survival, blocks_simple_squares + """ + + def __init__( + self, + value: float | Callable | None = None, + *, + label: str | None = None, + every: float | None = None, + show_label: bool = True, + interactive: bool | None = None, + visible: bool = True, + elem_id: str | None = None, + precision: int | None = None, + **kwargs, + ): + """ + Parameters: + value: default value. If callable, the function will be called whenever the app loads to set the initial value of the component. + label: component name in interface. + every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute. + show_label: if True, will display label. + interactive: if True, will be editable; if False, editing will be disabled. If not provided, this is inferred based on whether the component is used as an input or output. + visible: If False, component will be hidden. + elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles. + precision: Precision to round input/output to. If set to 0, will round to nearest integer and covert type to int. If None, no rounding happens. + """ + self.precision = precision + self.interpret_by_tokens = False + IOComponent.__init__( + self, + label=label, + every=every, + show_label=show_label, + interactive=interactive, + visible=visible, + elem_id=elem_id, + value=value, + **kwargs, + ) + self.test_input = self.value if self.value is not None else 1 + + @staticmethod + def _round_to_precision(num: float | int, precision: int | None) -> float | int: + """ + Round to a given precision. + + If precision is None, no rounding happens. If 0, num is converted to int. + + Parameters: + num: Number to round. + precision: Precision to round to. + Returns: + rounded number + """ + if precision is None: + return float(num) + elif precision == 0: + return int(round(num, precision)) + else: + return round(num, precision) + + def get_config(self): + return { + "value": self.value, + **IOComponent.get_config(self), + } + + @staticmethod + def update( + value: float | Literal[_Keywords.NO_VALUE] | None = _Keywords.NO_VALUE, + label: str | None = None, + show_label: bool | None = None, + interactive: bool | None = None, + visible: bool | None = None, + ): + updated_config = { + "label": label, + "show_label": show_label, + "visible": visible, + "value": value, + "__type__": "update", + } + return IOComponent.add_interactive_to_config(updated_config, interactive) + + def preprocess(self, x: float | None) -> float | None: + """ + Parameters: + x: numeric input + Returns: + number representing function input + """ + if x is None: + return None + return self._round_to_precision(x, self.precision) + + def postprocess(self, y: float | None) -> float | None: + """ + Any postprocessing needed to be performed on function output. + + Parameters: + y: numeric output + Returns: + number representing function output + """ + if y is None: + return None + return self._round_to_precision(y, self.precision) + + def set_interpret_parameters( + self, steps: int = 3, delta: float = 1, delta_type: str = "percent" + ): + """ + Calculates interpretation scores of numeric values close to the input number. + Parameters: + steps: Number of nearby values to measure in each direction (above and below the input number). + delta: Size of step in each direction between nearby values. + delta_type: "percent" if delta step between nearby values should be a calculated as a percent, or "absolute" if delta should be a constant step change. + """ + self.interpretation_steps = steps + self.interpretation_delta = delta + self.interpretation_delta_type = delta_type + return self + + def get_interpretation_neighbors(self, x: float | int) -> Tuple[List[float], Dict]: + x = self._round_to_precision(x, self.precision) + if self.interpretation_delta_type == "percent": + delta = 1.0 * self.interpretation_delta * x / 100 + elif self.interpretation_delta_type == "absolute": + delta = self.interpretation_delta + else: + delta = self.interpretation_delta + if self.precision == 0 and math.floor(delta) != delta: + raise ValueError( + f"Delta value {delta} is not an integer and precision=0. Cannot generate valid set of neighbors. " + "If delta_type='percent', pick a value of delta such that x * delta is an integer. " + "If delta_type='absolute', pick a value of delta that is an integer." + ) + # run_interpretation will preprocess the neighbors so no need to covert to int here + negatives = ( + np.array(x) + np.arange(-self.interpretation_steps, 0) * delta + ).tolist() + positives = ( + np.array(x) + np.arange(1, self.interpretation_steps + 1) * delta + ).tolist() + return negatives + positives, {} + + def get_interpretation_scores( + self, x: float, neighbors: List[float], scores: List[float | None], **kwargs + ) -> List[Tuple[float, float | None]]: + """ + Returns: + Each tuple set represents a numeric value near the input and its corresponding interpretation score. + """ + interpretation = list(zip(neighbors, scores)) + interpretation.insert(int(len(interpretation) / 2), (x, None)) + return interpretation + + def generate_sample(self) -> float: + return self._round_to_precision(1, self.precision) + + +@document("change", "style") +class Slider(FormComponent, Changeable, IOComponent, SimpleSerializable): + """ + Creates a slider that ranges from `minimum` to `maximum` with a step size of `step`. + Preprocessing: passes slider value as a {float} into the function. + Postprocessing: expects an {int} or {float} returned from function and sets slider value to it as long as it is within range. + Examples-format: A {float} or {int} representing the slider's value. + + Demos: sentence_builder, generate_tone, titanic_survival, interface_random_slider, blocks_random_slider + Guides: create_your_own_friends_with_a_gan + """ + + def __init__( + self, + minimum: float = 0, + maximum: float = 100, + value: float | Callable | None = None, + *, + step: float | None = None, + label: str | None = None, + every: float | None = None, + show_label: bool = True, + interactive: bool | None = None, + visible: bool = True, + elem_id: str | None = None, + randomize: bool = False, + **kwargs, + ): + """ + Parameters: + minimum: minimum value for slider. + maximum: maximum value for slider. + value: default value. If callable, the function will be called whenever the app loads to set the initial value of the component. Ignored if randomized=True. + step: increment between slider values. + label: component name in interface. + every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute. + show_label: if True, will display label. + interactive: if True, slider will be adjustable; if False, adjusting will be disabled. If not provided, this is inferred based on whether the component is used as an input or output. + visible: If False, component will be hidden. + elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles. + randomize: If True, the value of the slider when the app loads is taken uniformly at random from the range given by the minimum and maximum. + """ + self.minimum = minimum + self.maximum = maximum + if step is None: + difference = maximum - minimum + power = math.floor(math.log10(difference) - 2) + self.step = 10**power + else: + self.step = step + if randomize: + value = self.get_random_value + IOComponent.__init__( + self, + label=label, + every=every, + show_label=show_label, + interactive=interactive, + visible=visible, + elem_id=elem_id, + value=value, + **kwargs, + ) + self.cleared_value = self.value + self.test_input = self.value + self.interpret_by_tokens = False + + def get_config(self): + return { + "minimum": self.minimum, + "maximum": self.maximum, + "step": self.step, + "value": self.value, + **IOComponent.get_config(self), + } + + def get_random_value(self): + n_steps = int((self.maximum - self.minimum) / self.step) + step = random.randint(0, n_steps) + value = self.minimum + step * self.step + # Round to number of decimals in step so that UI doesn't display long decimals + n_decimals = max(str(self.step)[::-1].find("."), 0) + if n_decimals: + value = round(value, n_decimals) + return value + + @staticmethod + def update( + value: float | Literal[_Keywords.NO_VALUE] | None = _Keywords.NO_VALUE, + minimum: float | None = None, + maximum: float | None = None, + step: float | None = None, + label: str | None = None, + show_label: bool | None = None, + interactive: bool | None = None, + visible: bool | None = None, + ): + updated_config = { + "minimum": minimum, + "maximum": maximum, + "step": step, + "label": label, + "show_label": show_label, + "interactive": interactive, + "visible": visible, + "value": value, + "__type__": "update", + } + return IOComponent.add_interactive_to_config(updated_config, interactive) + + def generate_sample(self) -> float: + return self.maximum + + def postprocess(self, y: float | None) -> float | None: + """ + Any postprocessing needed to be performed on function output. + Parameters: + y: numeric output + Returns: + numeric output or minimum number if None + """ + return self.minimum if y is None else y + + def set_interpret_parameters(self, steps: int = 8) -> "Slider": + """ + Calculates interpretation scores of numeric values ranging between the minimum and maximum values of the slider. + Parameters: + steps: Number of neighboring values to measure between the minimum and maximum values of the slider range. + """ + self.interpretation_steps = steps + return self + + def get_interpretation_neighbors(self, x) -> Tuple[object, dict]: + return ( + np.linspace(self.minimum, self.maximum, self.interpretation_steps).tolist(), + {}, + ) + + def get_interpretation_scores( + self, x, neighbors, scores: List[float], **kwargs + ) -> List[float]: + """ + Returns: + Each value represents the score corresponding to an evenly spaced range of inputs between the minimum and maximum slider values. + """ + return scores + + def style( + self, + *, + container: bool | None = None, + ): + """ + This method can be used to change the appearance of the slider. + Parameters: + container: If True, will place the component in a container - providing some extra padding around the border. + """ + return Component.style( + self, + container=container, + ) + + +@document("change", "style") +class Checkbox(FormComponent, Changeable, IOComponent, SimpleSerializable): + """ + Creates a checkbox that can be set to `True` or `False`. + + Preprocessing: passes the status of the checkbox as a {bool} into the function. + Postprocessing: expects a {bool} returned from the function and, if it is True, checks the checkbox. + Examples-format: a {bool} representing whether the box is checked. + Demos: sentence_builder, titanic_survival + """ + + def __init__( + self, + value: bool | Callable = False, + *, + label: str | None = None, + every: float | None = None, + show_label: bool = True, + interactive: bool | None = None, + visible: bool = True, + elem_id: str | None = None, + **kwargs, + ): + """ + Parameters: + value: if True, checked by default. If callable, the function will be called whenever the app loads to set the initial value of the component. + label: component name in interface. + every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute. + show_label: if True, will display label. + interactive: if True, this checkbox can be checked; if False, checking will be disabled. If not provided, this is inferred based on whether the component is used as an input or output. + visible: If False, component will be hidden. + elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles. + """ + self.test_input = True + self.interpret_by_tokens = False + IOComponent.__init__( + self, + label=label, + every=every, + show_label=show_label, + interactive=interactive, + visible=visible, + elem_id=elem_id, + value=value, + **kwargs, + ) + + def get_config(self): + return { + "value": self.value, + **IOComponent.get_config(self), + } + + @staticmethod + def update( + value: bool | Literal[_Keywords.NO_VALUE] | None = _Keywords.NO_VALUE, + label: str | None = None, + show_label: bool | None = None, + interactive: bool | None = None, + visible: bool | None = None, + ): + updated_config = { + "label": label, + "show_label": show_label, + "interactive": interactive, + "visible": visible, + "value": value, + "__type__": "update", + } + return IOComponent.add_interactive_to_config(updated_config, interactive) + + def generate_sample(self): + return True + + def set_interpret_parameters(self): + """ + Calculates interpretation score of the input by comparing the output against the output when the input is the inverse boolean value of x. + """ + return self + + def get_interpretation_neighbors(self, x): + return [not x], {} + + def get_interpretation_scores(self, x, neighbors, scores, **kwargs): + """ + Returns: + The first value represents the interpretation score if the input is False, and the second if the input is True. + """ + if x: + return scores[0], None + else: + return None, scores[0] + + +@document("change", "style") +class CheckboxGroup(FormComponent, Changeable, IOComponent, SimpleSerializable): + """ + Creates a set of checkboxes of which a subset can be checked. + Preprocessing: passes the list of checked checkboxes as a {List[str]} or their indices as a {List[int]} into the function, depending on `type`. + Postprocessing: expects a {List[str]}, each element of which becomes a checked checkbox. + Examples-format: a {List[str]} representing the values to be checked. + Demos: sentence_builder, titanic_survival + """ + + def __init__( + self, + choices: List[str] | None = None, + *, + value: List[str] | str | Callable | None = None, + type: str = "value", + label: str | None = None, + every: float | None = None, + show_label: bool = True, + interactive: bool | None = None, + visible: bool = True, + elem_id: str | None = None, + **kwargs, + ): + """ + Parameters: + choices: list of options to select from. + value: default selected list of options. If callable, the function will be called whenever the app loads to set the initial value of the component. + type: Type of value to be returned by component. "value" returns the list of strings of the choices selected, "index" returns the list of indicies of the choices selected. + label: component name in interface. + every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute. + show_label: if True, will display label. + interactive: if True, choices in this checkbox group will be checkable; if False, checking will be disabled. If not provided, this is inferred based on whether the component is used as an input or output. + visible: If False, component will be hidden. + elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles. + """ + self.choices = choices or [] + self.cleared_value = [] + valid_types = ["value", "index"] + if type not in valid_types: + raise ValueError( + f"Invalid value for parameter `type`: {type}. Please choose from one of: {valid_types}" + ) + self.type = type + self.test_input = self.choices + self.interpret_by_tokens = False + IOComponent.__init__( + self, + label=label, + every=every, + show_label=show_label, + interactive=interactive, + visible=visible, + elem_id=elem_id, + value=value, + **kwargs, + ) + + def get_config(self): + return { + "choices": self.choices, + "value": self.value, + **IOComponent.get_config(self), + } + + @staticmethod + def update( + value: List[str] + | str + | Literal[_Keywords.NO_VALUE] + | None = _Keywords.NO_VALUE, + choices: List[str] | None = None, + label: str | None = None, + show_label: bool | None = None, + interactive: bool | None = None, + visible: bool | None = None, + ): + updated_config = { + "choices": choices, + "label": label, + "show_label": show_label, + "interactive": interactive, + "visible": visible, + "value": value, + "__type__": "update", + } + return IOComponent.add_interactive_to_config(updated_config, interactive) + + def generate_sample(self): + return self.choices + + def preprocess(self, x: List[str]) -> List[str] | List[int]: + """ + Parameters: + x: list of selected choices + Returns: + list of selected choices as strings or indices within choice list + """ + if self.type == "value": + return x + elif self.type == "index": + return [self.choices.index(choice) for choice in x] + else: + raise ValueError( + "Unknown type: " + + str(self.type) + + ". Please choose from: 'value', 'index'." + ) + + def postprocess(self, y: List[str] | str | None) -> List[str]: + """ + Any postprocessing needed to be performed on function output. + Parameters: + y: List of selected choices. If a single choice is selected, it can be passed in as a string + Returns: + List of selected choices + """ + if y is None: + return [] + if not isinstance(y, list): + y = [y] + return y + + def set_interpret_parameters(self): + """ + Calculates interpretation score of each choice in the input by comparing the output against the outputs when each choice in the input is independently either removed or added. + """ + return self + + def get_interpretation_neighbors(self, x): + leave_one_out_sets = [] + for choice in self.choices: + leave_one_out_set = list(x) + if choice in leave_one_out_set: + leave_one_out_set.remove(choice) + else: + leave_one_out_set.append(choice) + leave_one_out_sets.append(leave_one_out_set) + return leave_one_out_sets, {} + + def get_interpretation_scores(self, x, neighbors, scores, **kwargs): + """ + Returns: + For each tuple in the list, the first value represents the interpretation score if the input is False, and the second if the input is True. + """ + final_scores = [] + for choice, score in zip(self.choices, scores): + if choice in x: + score_set = [score, None] + else: + score_set = [None, score] + final_scores.append(score_set) + return final_scores + + def style( + self, + *, + item_container: bool | None = None, + container: bool | None = None, + **kwargs, + ): + """ + This method can be used to change the appearance of the CheckboxGroup. + Parameters: + item_container: If True, will place the items in a container. + container: If True, will place the component in a container - providing some extra padding around the border. + """ + if item_container is not None: + self._style["item_container"] = item_container + + return Component.style(self, container=container, **kwargs) + + +@document("change", "style") +class Radio(FormComponent, Changeable, IOComponent, SimpleSerializable): + """ + Creates a set of radio buttons of which only one can be selected. + Preprocessing: passes the value of the selected radio button as a {str} or its index as an {int} into the function, depending on `type`. + Postprocessing: expects a {str} corresponding to the value of the radio button to be selected. + Examples-format: a {str} representing the radio option to select. + + Demos: sentence_builder, titanic_survival, blocks_essay + """ + + def __init__( + self, + choices: List[str] | None = None, + *, + value: str | Callable | None = None, + type: str = "value", + label: str | None = None, + every: float | None = None, + show_label: bool = True, + interactive: bool | None = None, + visible: bool = True, + elem_id: str | None = None, + **kwargs, + ): + """ + Parameters: + choices: list of options to select from. + value: the button selected by default. If None, no button is selected by default. If callable, the function will be called whenever the app loads to set the initial value of the component. + type: Type of value to be returned by component. "value" returns the string of the choice selected, "index" returns the index of the choice selected. + label: component name in interface. + every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute. + show_label: if True, will display label. + interactive: if True, choices in this radio group will be selectable; if False, selection will be disabled. If not provided, this is inferred based on whether the component is used as an input or output. + visible: If False, component will be hidden. + elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles. + """ + self.choices = choices or [] + valid_types = ["value", "index"] + if type not in valid_types: + raise ValueError( + f"Invalid value for parameter `type`: {type}. Please choose from one of: {valid_types}" + ) + self.type = type + self.test_input = self.choices[0] if len(self.choices) else None + self.interpret_by_tokens = False + IOComponent.__init__( + self, + label=label, + every=every, + show_label=show_label, + interactive=interactive, + visible=visible, + elem_id=elem_id, + value=value, + **kwargs, + ) + self.cleared_value = self.value + + def get_config(self): + return { + "choices": self.choices, + "value": self.value, + **IOComponent.get_config(self), + } + + @staticmethod + def update( + value: Any | Literal[_Keywords.NO_VALUE] | None = _Keywords.NO_VALUE, + choices: List[str] | None = None, + label: str | None = None, + show_label: bool | None = None, + interactive: bool | None = None, + visible: bool | None = None, + ): + updated_config = { + "choices": choices, + "label": label, + "show_label": show_label, + "interactive": interactive, + "visible": visible, + "value": value, + "__type__": "update", + } + return IOComponent.add_interactive_to_config(updated_config, interactive) + + def generate_sample(self): + return self.choices[0] + + def preprocess(self, x: str | None) -> str | int | None: + """ + Parameters: + x: selected choice + Returns: + selected choice as string or index within choice list + """ + if self.type == "value": + return x + elif self.type == "index": + if x is None: + return None + else: + return self.choices.index(x) + else: + raise ValueError( + "Unknown type: " + + str(self.type) + + ". Please choose from: 'value', 'index'." + ) + + def set_interpret_parameters(self): + """ + Calculates interpretation score of each choice by comparing the output against each of the outputs when alternative choices are selected. + """ + return self + + def get_interpretation_neighbors(self, x): + choices = list(self.choices) + choices.remove(x) + return choices, {} + + def get_interpretation_scores( + self, x, neighbors, scores: List[float | None], **kwargs + ) -> List: + """ + Returns: + Each value represents the interpretation score corresponding to each choice. + """ + scores.insert(self.choices.index(x), None) + return scores + + def style( + self, + *, + item_container: bool | None = None, + container: bool | None = None, + **kwargs, + ): + """ + This method can be used to change the appearance of the radio component. + Parameters: + item_container: If True, will place items in a container. + container: If True, will place the component in a container - providing some extra padding around the border. + """ + if item_container is not None: + self._style["item_container"] = item_container + + return Component.style(self, container=container, **kwargs) + + +@document("change", "style") +class Dropdown(Radio): + """ + Creates a dropdown of which only one entry can be selected. + Preprocessing: passes the value of the selected dropdown entry as a {str} or its index as an {int} into the function, depending on `type`. + Postprocessing: expects a {str} corresponding to the value of the dropdown entry to be selected. + Examples-format: a {str} representing the drop down value to select. + Demos: sentence_builder, titanic_survival + """ + + def __init__( + self, + choices: List[str] | None = None, + *, + value: str | Callable | None = None, + type: str = "value", + label: str | None = None, + every: float | None = None, + show_label: bool = True, + interactive: bool | None = None, + visible: bool = True, + elem_id: str | None = None, + **kwargs, + ): + """ + Parameters: + choices: list of options to select from. + value: default value selected in dropdown. If None, no value is selected by default. If callable, the function will be called whenever the app loads to set the initial value of the component. + type: Type of value to be returned by component. "value" returns the string of the choice selected, "index" returns the index of the choice selected. + label: component name in interface. + every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute. + show_label: if True, will display label. + interactive: if True, choices in this dropdown will be selectable; if False, selection will be disabled. If not provided, this is inferred based on whether the component is used as an input or output. + visible: If False, component will be hidden. + elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles. + """ + Radio.__init__( + self, + value=value, + choices=choices, + type=type, + label=label, + every=every, + show_label=show_label, + interactive=interactive, + visible=visible, + elem_id=elem_id, + **kwargs, + ) + + def style(self, *, container: bool | None = None, **kwargs): + """ + This method can be used to change the appearance of the Dropdown. + Parameters: + container: If True, will place the component in a container - providing some extra padding around the border. + """ + return Component.style(self, container=container, **kwargs) + + +@document("edit", "clear", "change", "stream", "change", "style") +class Image( + Editable, + Clearable, + Changeable, + Streamable, + Uploadable, + IOComponent, + ImgSerializable, +): + """ + Creates an image component that can be used to upload/draw images (as an input) or display images (as an output). + Preprocessing: passes the uploaded image as a {numpy.array}, {PIL.Image} or {str} filepath depending on `type` -- unless `tool` is `sketch` AND source is one of `upload` or `webcam`. In these cases, a {dict} with keys `image` and `mask` is passed, and the format of the corresponding values depends on `type`. + Postprocessing: expects a {numpy.array}, {PIL.Image} or {str} or {pathlib.Path} filepath to an image and displays the image. + Examples-format: a {str} filepath to a local file that contains the image. + Demos: image_mod, image_mod_default_image + Guides: Gradio_and_ONNX_on_Hugging_Face, image_classification_in_pytorch, image_classification_in_tensorflow, image_classification_with_vision_transformers, building_a_pictionary_app, create_your_own_friends_with_a_gan + """ + + def __init__( + self, + value: str | _Image.Image | np.ndarray | None = None, + *, + shape: Tuple[int, int] | None = None, + image_mode: str = "RGB", + invert_colors: bool = False, + source: str = "upload", + tool: str | None = None, + type: str = "numpy", + label: str | None = None, + every: float | None = None, + show_label: bool = True, + interactive: bool | None = None, + visible: bool = True, + streaming: bool = False, + elem_id: str | None = None, + mirror_webcam: bool = True, + **kwargs, + ): + """ + Parameters: + value: A PIL Image, numpy array, path or URL for the default value that Image component is going to take. If callable, the function will be called whenever the app loads to set the initial value of the component. + shape: (width, height) shape to crop and resize image to; if None, matches input image size. Pass None for either width or height to only crop and resize the other. + image_mode: "RGB" if color, or "L" if black and white. + invert_colors: whether to invert the image as a preprocessing step. + source: Source of image. "upload" creates a box where user can drop an image file, "webcam" allows user to take snapshot from their webcam, "canvas" defaults to a white image that can be edited and drawn upon with tools. + tool: Tools used for editing. "editor" allows a full screen editor (and is the default if source is "upload" or "webcam"), "select" provides a cropping and zoom tool, "sketch" allows you to create a binary sketch (and is the default if source="canvas"), and "color-sketch" allows you to created a sketch in different colors. "color-sketch" can be used with source="upload" or "webcam" to allow sketching on an image. "sketch" can also be used with "upload" or "webcam" to create a mask over an image and in that case both the image and mask are passed into the function as a dictionary with keys "image" and "mask" respectively. + type: The format the image is converted to before being passed into the prediction function. "numpy" converts the image to a numpy array with shape (width, height, 3) and values from 0 to 255, "pil" converts the image to a PIL image object, "filepath" passes a str path to a temporary file containing the image. + label: component name in interface. + every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute. + show_label: if True, will display label. + interactive: if True, will allow users to upload and edit an image; if False, can only be used to display images. If not provided, this is inferred based on whether the component is used as an input or output. + visible: If False, component will be hidden. + streaming: If True when used in a `live` interface, will automatically stream webcam feed. Only valid is source is 'webcam'. + elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles. + mirror_webcam: If True webcam will be mirrored. Default is True. + """ + self.mirror_webcam = mirror_webcam + valid_types = ["numpy", "pil", "filepath"] + if type not in valid_types: + raise ValueError( + f"Invalid value for parameter `type`: {type}. Please choose from one of: {valid_types}" + ) + self.type = type + self.shape = shape + self.image_mode = image_mode + valid_sources = ["upload", "webcam", "canvas"] + if source not in valid_sources: + raise ValueError( + f"Invalid value for parameter `source`: {source}. Please choose from one of: {valid_sources}" + ) + self.source = source + if tool is None: + self.tool = "sketch" if source == "canvas" else "editor" + else: + self.tool = tool + self.invert_colors = invert_colors + self.test_input = deepcopy(media_data.BASE64_IMAGE) + self.interpret_by_tokens = True + self.streaming = streaming + if streaming and source != "webcam": + raise ValueError("Image streaming only available if source is 'webcam'.") + + IOComponent.__init__( + self, + label=label, + every=every, + show_label=show_label, + interactive=interactive, + visible=visible, + elem_id=elem_id, + value=value, + **kwargs, + ) + + def get_config(self): + return { + "image_mode": self.image_mode, + "shape": self.shape, + "source": self.source, + "tool": self.tool, + "value": self.value, + "streaming": self.streaming, + "mirror_webcam": self.mirror_webcam, + **IOComponent.get_config(self), + } + + @staticmethod + def update( + value: Any | Literal[_Keywords.NO_VALUE] | None = _Keywords.NO_VALUE, + label: str | None = None, + show_label: bool | None = None, + interactive: bool | None = None, + visible: bool | None = None, + ): + updated_config = { + "label": label, + "show_label": show_label, + "interactive": interactive, + "visible": visible, + "value": value, + "__type__": "update", + } + return IOComponent.add_interactive_to_config(updated_config, interactive) + + def _format_image( + self, im: _Image.Image | None + ) -> np.ndarray | _Image.Image | str | None: + """Helper method to format an image based on self.type""" + if im is None: + return im + fmt = im.format + if self.type == "pil": + return im + elif self.type == "numpy": + return np.array(im) + elif self.type == "filepath": + file_obj = tempfile.NamedTemporaryFile( + delete=False, + suffix=("." + fmt.lower() if fmt is not None else ".png"), + ) + im.save(file_obj.name) + return file_obj.name + else: + raise ValueError( + "Unknown type: " + + str(self.type) + + ". Please choose from: 'numpy', 'pil', 'filepath'." + ) + + def generate_sample(self): + return deepcopy(media_data.BASE64_IMAGE) + + def preprocess( + self, x: str | Dict[str, str] + ) -> np.ndarray | _Image.Image | str | Dict | None: + """ + Parameters: + x: base64 url data, or (if tool == "sketch") a dict of image and mask base64 url data + Returns: + image in requested format, or (if tool == "sketch") a dict of image and mask in requested format + """ + if x is None: + return x + + mask = "" + if self.tool == "sketch" and self.source in ["upload", "webcam"]: + assert isinstance(x, dict) + x, mask = x["image"], x["mask"] + + assert isinstance(x, str) + im = processing_utils.decode_base64_to_image(x) + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + im = im.convert(self.image_mode) + if self.shape is not None: + im = processing_utils.resize_and_crop(im, self.shape) + if self.invert_colors: + im = PIL.ImageOps.invert(im) + if ( + self.source == "webcam" + and self.mirror_webcam is True + and self.tool != "color-sketch" + ): + im = PIL.ImageOps.mirror(im) + + if self.tool == "sketch" and self.source in ["upload", "webcam"]: + if mask is None: + return self._format_image(im) + mask_im = processing_utils.decode_base64_to_image(mask) + return { + "image": self._format_image(im), + "mask": self._format_image(mask_im), + } + + return self._format_image(im) + + def postprocess( + self, y: np.ndarray | _Image.Image | str | Path | None + ) -> str | None: + """ + Parameters: + y: image as a numpy array, PIL Image, string/Path filepath, or string URL + Returns: + base64 url data + """ + if y is None: + return None + if isinstance(y, np.ndarray): + return processing_utils.encode_array_to_base64(y) + elif isinstance(y, _Image.Image): + return processing_utils.encode_pil_to_base64(y) + elif isinstance(y, (str, Path)): + return processing_utils.encode_url_or_file_to_base64(y) + else: + raise ValueError("Cannot process this value as an Image") + + def set_interpret_parameters(self, segments: int = 16): + """ + Calculates interpretation score of image subsections by splitting the image into subsections, then using a "leave one out" method to calculate the score of each subsection by whiting out the subsection and measuring the delta of the output value. + Parameters: + segments: Number of interpretation segments to split image into. + """ + self.interpretation_segments = segments + return self + + def _segment_by_slic(self, x): + """ + Helper method that segments an image into superpixels using slic. + Parameters: + x: base64 representation of an image + """ + x = processing_utils.decode_base64_to_image(x) + if self.shape is not None: + x = processing_utils.resize_and_crop(x, self.shape) + resized_and_cropped_image = np.array(x) + try: + from skimage.segmentation import slic + except (ImportError, ModuleNotFoundError): + raise ValueError( + "Error: running this interpretation for images requires scikit-image, please install it first." + ) + try: + segments_slic = slic( + resized_and_cropped_image, + self.interpretation_segments, + compactness=10, + sigma=1, + start_label=1, + ) + except TypeError: # For skimage 0.16 and older + segments_slic = slic( + resized_and_cropped_image, + self.interpretation_segments, + compactness=10, + sigma=1, + ) + return segments_slic, resized_and_cropped_image + + def tokenize(self, x): + """ + Segments image into tokens, masks, and leave-one-out-tokens + Parameters: + x: base64 representation of an image + Returns: + tokens: list of tokens, used by the get_masked_input() method + leave_one_out_tokens: list of left-out tokens, used by the get_interpretation_neighbors() method + masks: list of masks, used by the get_interpretation_neighbors() method + """ + segments_slic, resized_and_cropped_image = self._segment_by_slic(x) + tokens, masks, leave_one_out_tokens = [], [], [] + replace_color = np.mean(resized_and_cropped_image, axis=(0, 1)) + for (i, segment_value) in enumerate(np.unique(segments_slic)): + mask = segments_slic == segment_value + image_screen = np.copy(resized_and_cropped_image) + image_screen[segments_slic == segment_value] = replace_color + leave_one_out_tokens.append( + processing_utils.encode_array_to_base64(image_screen) + ) + token = np.copy(resized_and_cropped_image) + token[segments_slic != segment_value] = 0 + tokens.append(token) + masks.append(mask) + return tokens, leave_one_out_tokens, masks + + def get_masked_inputs(self, tokens, binary_mask_matrix): + masked_inputs = [] + for binary_mask_vector in binary_mask_matrix: + masked_input = np.zeros_like(tokens[0], dtype=int) + for token, b in zip(tokens, binary_mask_vector): + masked_input = masked_input + token * int(b) + masked_inputs.append(processing_utils.encode_array_to_base64(masked_input)) + return masked_inputs + + def get_interpretation_scores( + self, x, neighbors, scores, masks, tokens=None, **kwargs + ) -> List[List[float]]: + """ + Returns: + A 2D array representing the interpretation score of each pixel of the image. + """ + x = processing_utils.decode_base64_to_image(x) + if self.shape is not None: + x = processing_utils.resize_and_crop(x, self.shape) + x = np.array(x) + output_scores = np.zeros((x.shape[0], x.shape[1])) + + for score, mask in zip(scores, masks): + output_scores += score * mask + + max_val, min_val = np.max(output_scores), np.min(output_scores) + if max_val > 0: + output_scores = (output_scores - min_val) / (max_val - min_val) + return output_scores.tolist() + + def style(self, *, height: int | None = None, width: int | None = None, **kwargs): + """ + This method can be used to change the appearance of the Image component. + Parameters: + height: Height of the image. + width: Width of the image. + """ + self._style["height"] = height + self._style["width"] = width + return Component.style( + self, + **kwargs, + ) + + def stream( + self, + fn: Callable, + inputs: List[Component], + outputs: List[Component], + _js: str | None = None, + api_name: str | None = None, + preprocess: bool = True, + postprocess: bool = True, + ): + """ + This event is triggered when the user streams the component (e.g. a live webcam + component) + Parameters: + fn: Callable function + inputs: List of inputs + outputs: List of outputs + """ + # js: Optional frontend js method to run before running 'fn'. Input arguments for js method are values of 'inputs' and 'outputs', return should be a list of values for output components. + if self.source != "webcam": + raise ValueError("Image streaming only available if source is 'webcam'.") + Streamable.stream( + self, + fn, + inputs, + outputs, + _js=_js, + api_name=api_name, + preprocess=preprocess, + postprocess=postprocess, + ) + + def as_example(self, input_data: str | None) -> str: + return "" if input_data is None else str(Path(input_data).resolve()) + + +@document("change", "clear", "play", "pause", "stop", "style") +class Video( + Changeable, + Clearable, + Playable, + Uploadable, + IOComponent, + FileSerializable, + TempFileManager, +): + """ + Creates a video component that can be used to upload/record videos (as an input) or display videos (as an output). + For the video to be playable in the browser it must have a compatible container and codec combination. Allowed + combinations are .mp4 with h264 codec, .ogg with theora codec, and .webm with vp9 codec. If the component detects + that the output video would not be playable in the browser it will attempt to convert it to a playable mp4 video. + If the conversion fails, the original video is returned. + Preprocessing: passes the uploaded video as a {str} filepath or URL whose extension can be modified by `format`. + Postprocessing: expects a {str} filepath to a video which is displayed. + Examples-format: a {str} filepath to a local file that contains the video. + Demos: video_identity + """ + + def __init__( + self, + value: str | Callable | None = None, + *, + format: str | None = None, + source: str = "upload", + label: str | None = None, + every: float | None = None, + show_label: bool = True, + interactive: bool | None = None, + visible: bool = True, + elem_id: str | None = None, + mirror_webcam: bool = True, + include_audio: bool | None = None, + **kwargs, + ): + """ + Parameters: + value: A path or URL for the default value that Video component is going to take. If callable, the function will be called whenever the app loads to set the initial value of the component. + format: Format of video format to be returned by component, such as 'avi' or 'mp4'. Use 'mp4' to ensure browser playability. If set to None, video will keep uploaded format. + source: Source of video. "upload" creates a box where user can drop an video file, "webcam" allows user to record a video from their webcam. + label: component name in interface. + every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute. + show_label: if True, will display label. + interactive: if True, will allow users to upload a video; if False, can only be used to display videos. If not provided, this is inferred based on whether the component is used as an input or output. + visible: If False, component will be hidden. + elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles. + mirror_webcam: If True webcam will be mirrored. Default is True. + include_audio: Whether the component should record/retain the audio track for a video. By default, audio is excluded for webcam videos and included for uploaded videos. + """ + self.format = format + valid_sources = ["upload", "webcam"] + if source not in valid_sources: + raise ValueError( + f"Invalid value for parameter `source`: {source}. Please choose from one of: {valid_sources}" + ) + self.source = source + self.mirror_webcam = mirror_webcam + self.include_audio = ( + include_audio if include_audio is not None else source == "upload" + ) + TempFileManager.__init__(self) + IOComponent.__init__( + self, + label=label, + every=every, + show_label=show_label, + interactive=interactive, + visible=visible, + elem_id=elem_id, + value=value, + **kwargs, + ) + + def get_config(self): + return { + "source": self.source, + "value": self.value, + "mirror_webcam": self.mirror_webcam, + "include_audio": self.include_audio, + **IOComponent.get_config(self), + } + + @staticmethod + def update( + value: Any | Literal[_Keywords.NO_VALUE] | None = _Keywords.NO_VALUE, + source: str | None = None, + label: str | None = None, + show_label: bool | None = None, + interactive: bool | None = None, + visible: bool | None = None, + ): + updated_config = { + "source": source, + "label": label, + "show_label": show_label, + "interactive": interactive, + "visible": visible, + "value": value, + "__type__": "update", + } + return IOComponent.add_interactive_to_config(updated_config, interactive) + + def preprocess(self, x: Dict[str, str] | None) -> str | None: + """ + Parameters: + x: a dictionary with the following keys: 'name' (containing the file path to a video), 'data' (with either the file URL or base64 representation of the video), and 'is_file` (True if `data` contains the file URL). + Returns: + a string file path to the preprocessed video + """ + if x is None: + return x + + file_name, file_data, is_file = ( + x["name"], + x["data"], + x.get("is_file", False), + ) + if is_file: + file = self.make_temp_copy_if_needed(file_name) + file_name = Path(file) + else: + file = processing_utils.decode_base64_to_file( + file_data, file_path=file_name + ) + file_name = Path(file.name) + + uploaded_format = file_name.suffix.replace(".", "") + modify_format = self.format is not None and uploaded_format != self.format + flip = self.source == "webcam" and self.mirror_webcam + if modify_format or flip: + format = f".{self.format if modify_format else uploaded_format}" + output_options = ["-vf", "hflip", "-c:a", "copy"] if flip else [] + output_options += ["-an"] if not self.include_audio else [] + flip_suffix = "_flip" if flip else "" + output_file_name = str( + file_name.with_name(f"{file_name.stem}{flip_suffix}{format}") + ) + if Path(output_file_name).exists(): + return output_file_name + ff = FFmpeg( + inputs={str(file_name): None}, + outputs={output_file_name: output_options}, + ) + ff.run() + return output_file_name + elif not self.include_audio: + output_file_name = str(file_name.with_name(f"muted_{file_name.name}")) + ff = FFmpeg( + inputs={str(file_name): None}, + outputs={output_file_name: ["-an"]}, + ) + ff.run() + return output_file_name + else: + return str(file_name) + + def generate_sample(self): + """Generates a random video for testing the API.""" + return deepcopy(media_data.BASE64_VIDEO) + + def postprocess(self, y: str | None) -> Dict[str, Any] | None: + """ + Processes a video to ensure that it is in the correct format before + returning it to the front end. + Parameters: + y: a path or URL to the video file + Returns: + a dictionary with the following keys: 'name' (containing the file path + to a temporary copy of the video), 'data' (None), and 'is_file` (True). + """ + if y is None: + return None + + returned_format = y.split(".")[-1].lower() + + if self.format is None or returned_format == self.format: + conversion_needed = False + else: + conversion_needed = True + + # For cases where the video is a URL and does not need to be converted to another format, we can just return the URL + if utils.validate_url(y) and not (conversion_needed): + return {"name": y, "data": None, "is_file": True} + + # For cases where the video needs to be converted to another format + if utils.validate_url(y): + y = self.download_temp_copy_if_needed(y) + if ( + processing_utils.ffmpeg_installed() + and not processing_utils.video_is_playable(y) + ): + warnings.warn( + "Video does not have browser-compatible container or codec. Converting to mp4" + ) + y = processing_utils.convert_video_to_playable_mp4(y) + if self.format is not None and returned_format != self.format: + output_file_name = y[0 : y.rindex(".") + 1] + self.format + ff = FFmpeg(inputs={y: None}, outputs={output_file_name: None}) + ff.run() + y = output_file_name + + y = self.make_temp_copy_if_needed(y) + return {"name": y, "data": None, "is_file": True} + + def style(self, *, height: int | None = None, width: int | None = None, **kwargs): + """ + This method can be used to change the appearance of the video component. + Parameters: + height: Height of the video. + width: Width of the video. + """ + self._style["height"] = height + self._style["width"] = width + return Component.style( + self, + **kwargs, + ) + + +@document("change", "clear", "play", "pause", "stop", "stream", "style") +class Audio( + Changeable, + Clearable, + Playable, + Streamable, + Uploadable, + IOComponent, + FileSerializable, + TempFileManager, +): + """ + Creates an audio component that can be used to upload/record audio (as an input) or display audio (as an output). + Preprocessing: passes the uploaded audio as a {Tuple(int, numpy.array)} corresponding to (sample rate, data) or as a {str} filepath, depending on `type` + Postprocessing: expects a {Tuple(int, numpy.array)} corresponding to (sample rate, data) or as a {str} filepath or URL to an audio file, which gets displayed + Examples-format: a {str} filepath to a local file that contains audio. + Demos: main_note, generate_tone, reverse_audio + Guides: real_time_speech_recognition + """ + + def __init__( + self, + value: str | Tuple[int, np.ndarray] | Callable | None = None, + *, + source: str = "upload", + type: str = "numpy", + label: str | None = None, + every: float | None = None, + show_label: bool = True, + interactive: bool | None = None, + visible: bool = True, + streaming: bool = False, + elem_id: str | None = None, + **kwargs, + ): + """ + Parameters: + value: A path, URL, or [sample_rate, numpy array] tuple for the default value that Audio component is going to take. If callable, the function will be called whenever the app loads to set the initial value of the component. + source: Source of audio. "upload" creates a box where user can drop an audio file, "microphone" creates a microphone input. + type: The format the audio file is converted to before being passed into the prediction function. "numpy" converts the audio to a tuple consisting of: (int sample rate, numpy.array for the data), "filepath" passes a str path to a temporary file containing the audio. + label: component name in interface. + every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute. + show_label: if True, will display label. + interactive: if True, will allow users to upload and edit a audio file; if False, can only be used to play audio. If not provided, this is inferred based on whether the component is used as an input or output. + visible: If False, component will be hidden. + streaming: If set to True when used in a `live` interface, will automatically stream webcam feed. Only valid is source is 'microphone'. + elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles. + """ + valid_sources = ["upload", "microphone"] + if source not in valid_sources: + raise ValueError( + f"Invalid value for parameter `source`: {source}. Please choose from one of: {valid_sources}" + ) + self.source = source + valid_types = ["numpy", "filepath"] + if type not in valid_types: + raise ValueError( + f"Invalid value for parameter `type`: {type}. Please choose from one of: {valid_types}" + ) + self.type = type + self.test_input = deepcopy(media_data.BASE64_AUDIO) + self.interpret_by_tokens = True + self.streaming = streaming + if streaming and source != "microphone": + raise ValueError( + "Audio streaming only available if source is 'microphone'." + ) + TempFileManager.__init__(self) + IOComponent.__init__( + self, + label=label, + every=every, + show_label=show_label, + interactive=interactive, + visible=visible, + elem_id=elem_id, + value=value, + **kwargs, + ) + + def get_config(self): + return { + "source": self.source, + "value": self.value, + "streaming": self.streaming, + **IOComponent.get_config(self), + } + + @staticmethod + def update( + value: Any | Literal[_Keywords.NO_VALUE] | None = _Keywords.NO_VALUE, + source: str | None = None, + label: str | None = None, + show_label: bool | None = None, + interactive: bool | None = None, + visible: bool | None = None, + ): + updated_config = { + "source": source, + "label": label, + "show_label": show_label, + "interactive": interactive, + "visible": visible, + "value": value, + "__type__": "update", + } + return IOComponent.add_interactive_to_config(updated_config, interactive) + + def preprocess( + self, x: Dict[str, Any] | None + ) -> Tuple[int, np.ndarray] | str | None: + """ + Parameters: + x: dictionary with keys "name", "data", "is_file", "crop_min", "crop_max". + Returns: + audio in requested format + """ + if x is None: + return x + file_name, file_data, is_file = ( + x["name"], + x["data"], + x.get("is_file", False), + ) + crop_min, crop_max = x.get("crop_min", 0), x.get("crop_max", 100) + if is_file: + if utils.validate_url(file_name): + temp_file_path = self.download_temp_copy_if_needed(file_name) + else: + temp_file_path = self.make_temp_copy_if_needed(file_name) + else: + temp_file_obj = processing_utils.decode_base64_to_file( + file_data, file_path=file_name + ) + temp_file_path = temp_file_obj.name + + sample_rate, data = processing_utils.audio_from_file( + temp_file_path, crop_min=crop_min, crop_max=crop_max + ) + + if self.type == "numpy": + return sample_rate, data + elif self.type == "filepath": + processing_utils.audio_to_file(sample_rate, data, temp_file_path) + return temp_file_path + else: + raise ValueError( + "Unknown type: " + + str(self.type) + + ". Please choose from: 'numpy', 'filepath'." + ) + + def set_interpret_parameters(self, segments: int = 8): + """ + Calculates interpretation score of audio subsections by splitting the audio into subsections, then using a "leave one out" method to calculate the score of each subsection by removing the subsection and measuring the delta of the output value. + Parameters: + segments: Number of interpretation segments to split audio into. + """ + self.interpretation_segments = segments + return self + + def tokenize(self, x): + if x.get("is_file"): + sample_rate, data = processing_utils.audio_from_file(x["name"]) + else: + file_obj = processing_utils.decode_base64_to_file(x["data"]) + sample_rate, data = processing_utils.audio_from_file(file_obj.name) + leave_one_out_sets = [] + tokens = [] + masks = [] + duration = data.shape[0] + boundaries = np.linspace(0, duration, self.interpretation_segments + 1).tolist() + boundaries = [round(boundary) for boundary in boundaries] + for index in range(len(boundaries) - 1): + start, stop = boundaries[index], boundaries[index + 1] + masks.append((start, stop)) + + # Handle the leave one outs + leave_one_out_data = np.copy(data) + leave_one_out_data[start:stop] = 0 + file = tempfile.NamedTemporaryFile(delete=False, suffix=".wav") + processing_utils.audio_to_file(sample_rate, leave_one_out_data, file.name) + out_data = processing_utils.encode_file_to_base64(file.name) + leave_one_out_sets.append(out_data) + file.close() + Path(file.name).unlink() + + # Handle the tokens + token = np.copy(data) + token[0:start] = 0 + token[stop:] = 0 + file = tempfile.NamedTemporaryFile(delete=False, suffix=".wav") + processing_utils.audio_to_file(sample_rate, token, file.name) + token_data = processing_utils.encode_file_to_base64(file.name) + file.close() + Path(file.name).unlink() + + tokens.append(token_data) + tokens = [{"name": "token.wav", "data": token} for token in tokens] + leave_one_out_sets = [ + {"name": "loo.wav", "data": loo_set} for loo_set in leave_one_out_sets + ] + return tokens, leave_one_out_sets, masks + + def get_masked_inputs(self, tokens, binary_mask_matrix): + # create a "zero input" vector and get sample rate + x = tokens[0]["data"] + file_obj = processing_utils.decode_base64_to_file(x) + sample_rate, data = processing_utils.audio_from_file(file_obj.name) + zero_input = np.zeros_like(data, dtype="int16") + # decode all of the tokens + token_data = [] + for token in tokens: + file_obj = processing_utils.decode_base64_to_file(token["data"]) + _, data = processing_utils.audio_from_file(file_obj.name) + token_data.append(data) + # construct the masked version + masked_inputs = [] + for binary_mask_vector in binary_mask_matrix: + masked_input = np.copy(zero_input) + for t, b in zip(token_data, binary_mask_vector): + masked_input = masked_input + t * int(b) + file = tempfile.NamedTemporaryFile(delete=False) + processing_utils.audio_to_file(sample_rate, masked_input, file.name) + masked_data = processing_utils.encode_file_to_base64(file.name) + file.close() + Path(file.name).unlink() + masked_inputs.append(masked_data) + return masked_inputs + + def get_interpretation_scores( + self, x, neighbors, scores, masks=None, tokens=None + ) -> List[float]: + """ + Returns: + Each value represents the interpretation score corresponding to an evenly spaced subsection of audio. + """ + return list(scores) + + def generate_sample(self): + return deepcopy(media_data.BASE64_AUDIO) + + def postprocess(self, y: Tuple[int, np.ndarray] | str | None) -> str | Dict | None: + """ + Parameters: + y: audio data in either of the following formats: a tuple of (sample_rate, data), or a string filepath or URL to an audio file, or None. + Returns: + base64 url data + """ + if y is None: + return None + if isinstance(y, str) and utils.validate_url(y): + return {"name": y, "data": None, "is_file": True} + if isinstance(y, tuple): + sample_rate, data = y + file = tempfile.NamedTemporaryFile(suffix=".wav", delete=False) + processing_utils.audio_to_file(sample_rate, data, file.name) + file_path = file.name + self.temp_files.add(file_path) + else: + file_path = self.make_temp_copy_if_needed(y) + return {"name": file_path, "data": None, "is_file": True} + + def stream( + self, + fn: Callable, + inputs: List[Component], + outputs: List[Component], + _js: str | None = None, + api_name: str | None = None, + preprocess: bool = True, + postprocess: bool = True, + ): + """ + This event is triggered when the user streams the component (e.g. a live webcam + component) + Parameters: + fn: Callable function + inputs: List of inputs + outputs: List of outputs + """ + # _js: Optional frontend js method to run before running 'fn'. Input arguments for js method are values of 'inputs' and 'outputs', return should be a list of values for output components. + if self.source != "microphone": + raise ValueError( + "Audio streaming only available if source is 'microphone'." + ) + Streamable.stream( + self, + fn, + inputs, + outputs, + _js=_js, + api_name=api_name, + preprocess=preprocess, + postprocess=postprocess, + ) + + def style( + self, + **kwargs, + ): + """ + This method can be used to change the appearance of the audio component. + """ + return Component.style( + self, + **kwargs, + ) + + def as_example(self, input_data: str | None) -> str: + return Path(input_data).name if input_data else "" + + +@document("change", "clear", "style") +class File( + Changeable, Clearable, Uploadable, IOComponent, FileSerializable, TempFileManager +): + """ + Creates a file component that allows uploading generic file (when used as an input) and or displaying generic files (output). + Preprocessing: passes the uploaded file as a {file-object} or {List[file-object]} depending on `file_count` (or a {bytes}/{List{bytes}} depending on `type`) + Postprocessing: expects function to return a {str} path to a file, or {List[str]} consisting of paths to files. + Examples-format: a {str} path to a local file that populates the component. + Demos: zip_to_json, zip_files + """ + + def __init__( + self, + value: str | List[str] | Callable | None = None, + *, + file_count: str = "single", + file_types: List[str] | None = None, + type: str = "file", + label: str | None = None, + every: float | None = None, + show_label: bool = True, + interactive: bool | None = None, + visible: bool = True, + elem_id: str | None = None, + **kwargs, + ): + """ + Parameters: + value: Default file to display, given as str file path. If callable, the function will be called whenever the app loads to set the initial value of the component. + file_count: if single, allows user to upload one file. If "multiple", user uploads multiple files. If "directory", user uploads all files in selected directory. Return type will be list for each file in case of "multiple" or "directory". + file_types: List of type of files to be uploaded. "file" allows any file to be uploaded, "image" allows only image files to be uploaded, "audio" allows only audio files to be uploaded, "video" allows only video files to be uploaded, "text" allows only text files to be uploaded. + type: Type of value to be returned by component. "file" returns a temporary file object whose path can be retrieved by file_obj.name and original filename can be retrieved with file_obj.orig_name, "binary" returns an bytes object. + label: component name in interface. + every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute. + show_label: if True, will display label. + interactive: if True, will allow users to upload a file; if False, can only be used to display files. If not provided, this is inferred based on whether the component is used as an input or output. + visible: If False, component will be hidden. + elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles. + """ + self.file_count = file_count + self.file_types = file_types + valid_types = [ + "file", + "binary", + "bytes", + ] # "bytes" is included for backwards compatibility + if type not in valid_types: + raise ValueError( + f"Invalid value for parameter `type`: {type}. Please choose from one of: {valid_types}" + ) + if type == "bytes": + warnings.warn( + "The `bytes` type is deprecated and may not work as expected. Please use `binary` instead." + ) + self.type = type + self.test_input = None + TempFileManager.__init__(self) + IOComponent.__init__( + self, + label=label, + every=every, + show_label=show_label, + interactive=interactive, + visible=visible, + elem_id=elem_id, + value=value, + **kwargs, + ) + + def get_config(self): + return { + "file_count": self.file_count, + "file_types": self.file_types, + "value": self.value, + **IOComponent.get_config(self), + } + + @staticmethod + def update( + value: Any | Literal[_Keywords.NO_VALUE] | None = _Keywords.NO_VALUE, + label: str | None = None, + show_label: bool | None = None, + interactive: bool | None = None, + visible: bool | None = None, + ): + updated_config = { + "label": label, + "show_label": show_label, + "interactive": interactive, + "visible": visible, + "value": value, + "__type__": "update", + } + return IOComponent.add_interactive_to_config(updated_config, interactive) + + def preprocess( + self, x: List[Dict[str, Any]] | None + ) -> bytes | tempfile._TemporaryFileWrapper | List[ + bytes | tempfile._TemporaryFileWrapper + ] | None: + """ + Parameters: + x: List of JSON objects with filename as 'name' property and base64 data as 'data' property + Returns: + File objects in requested format + """ + if x is None: + return None + + def process_single_file(f) -> bytes | tempfile._TemporaryFileWrapper: + file_name, data, is_file = ( + f["name"], + f["data"], + f.get("is_file", False), + ) + if self.type == "file": + if is_file: + temp_file_path = self.make_temp_copy_if_needed(file_name) + file = tempfile.NamedTemporaryFile(delete=False) + file.name = temp_file_path + file.orig_name = file_name # type: ignore + else: + file = processing_utils.decode_base64_to_file( + data, file_path=file_name + ) + file.orig_name = file_name # type: ignore + return file + elif ( + self.type == "binary" or self.type == "bytes" + ): # "bytes" is included for backwards compatibility + if is_file: + with open(file_name, "rb") as file_data: + return file_data.read() + return processing_utils.decode_base64_to_binary(data)[0] + else: + raise ValueError( + "Unknown type: " + + str(self.type) + + ". Please choose from: 'file', 'bytes'." + ) + + if self.file_count == "single": + if isinstance(x, list): + return process_single_file(x[0]) + else: + return process_single_file(x) + else: + if isinstance(x, list): + return [process_single_file(f) for f in x] + else: + return process_single_file(x) + + def generate_sample(self): + return deepcopy(media_data.BASE64_FILE) + + def postprocess( + self, y: str | List[str] | None + ) -> Dict[str, Any] | List[Dict[str, Any]] | None: + """ + Parameters: + y: file path + Returns: + JSON object with key 'name' for filename, 'data' for base64 url, and 'size' for filesize in bytes + """ + if y is None: + return None + if isinstance(y, list): + return [ + { + "orig_name": Path(file).name, + "name": self.make_temp_copy_if_needed(file), + "size": Path(file).stat().st_size, + "data": None, + "is_file": True, + } + for file in y + ] + else: + return { + "orig_name": Path(y).name, + "name": self.make_temp_copy_if_needed(y), + "size": Path(y).stat().st_size, + "data": None, + "is_file": True, + } + + def serialize( + self, x: str | None, load_dir: str = "", encryption_key: bytes | None = None + ) -> Dict | None: + serialized = FileSerializable.serialize(self, x, load_dir, encryption_key) + if serialized is None: + return None + serialized["size"] = Path(serialized["name"]).stat().st_size + return serialized + + def style( + self, + **kwargs, + ): + """ + This method can be used to change the appearance of the file component. + """ + return Component.style( + self, + **kwargs, + ) + + def as_example(self, input_data: str | List | None) -> str: + if input_data is None: + return "" + elif isinstance(input_data, list): + return ", ".join([Path(file).name for file in input_data]) + else: + return Path(input_data).name + + +@document("change", "style") +class Dataframe(Changeable, IOComponent, JSONSerializable): + """ + Accepts or displays 2D input through a spreadsheet-like component for dataframes. + Preprocessing: passes the uploaded spreadsheet data as a {pandas.DataFrame}, {numpy.array}, {List[List]}, or {List} depending on `type` + Postprocessing: expects a {pandas.DataFrame}, {numpy.array}, {List[List]}, {List}, a {Dict} with keys `data` (and optionally `headers`), or {str} path to a csv, which is rendered in the spreadsheet. + Examples-format: a {str} filepath to a csv with data, a pandas dataframe, or a list of lists (excluding headers) where each sublist is a row of data. + Demos: filter_records, matrix_transpose, tax_calculator + """ + + markdown_parser = None + + def __init__( + self, + value: List[List[Any]] | Callable | None = None, + *, + headers: List[str] | None = None, + row_count: int | Tuple[int, str] = (1, "dynamic"), + col_count: int | Tuple[int, str] | None = None, + datatype: str | List[str] = "str", + type: str = "pandas", + max_rows: int | None = 20, + max_cols: int | None = None, + overflow_row_behaviour: str = "paginate", + label: str | None = None, + every: float | None = None, + show_label: bool = True, + interactive: bool | None = None, + visible: bool = True, + elem_id: str | None = None, + wrap: bool = False, + **kwargs, + ): + """ + Parameters: + value: Default value as a 2-dimensional list of values. If callable, the function will be called whenever the app loads to set the initial value of the component. + headers: List of str header names. If None, no headers are shown. + row_count: Limit number of rows for input and decide whether user can create new rows. The first element of the tuple is an `int`, the row count; the second should be 'fixed' or 'dynamic', the new row behaviour. If an `int` is passed the rows default to 'dynamic' + col_count: Limit number of columns for input and decide whether user can create new columns. The first element of the tuple is an `int`, the number of columns; the second should be 'fixed' or 'dynamic', the new column behaviour. If an `int` is passed the columns default to 'dynamic' + datatype: Datatype of values in sheet. Can be provided per column as a list of strings, or for the entire sheet as a single string. Valid datatypes are "str", "number", "bool", "date", and "markdown". + type: Type of value to be returned by component. "pandas" for pandas dataframe, "numpy" for numpy array, or "array" for a Python array. + label: component name in interface. + max_rows: Maximum number of rows to display at once. Set to None for infinite. + max_cols: Maximum number of columns to display at once. Set to None for infinite. + overflow_row_behaviour: If set to "paginate", will create pages for overflow rows. If set to "show_ends", will show initial and final rows and truncate middle rows. + label: component name in interface. + every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute. + show_label: if True, will display label. + interactive: if True, will allow users to edit the dataframe; if False, can only be used to display data. If not provided, this is inferred based on whether the component is used as an input or output. + visible: If False, component will be hidden. + elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles. + wrap: if True text in table cells will wrap when appropriate, if False the table will scroll horiztonally. Defaults to False. + """ + + self.wrap = wrap + self.row_count = self.__process_counts(row_count) + self.col_count = self.__process_counts( + col_count, len(headers) if headers else 3 + ) + + self.__validate_headers(headers, self.col_count[0]) + + self.headers = ( + headers if headers is not None else list(range(1, self.col_count[0] + 1)) + ) + self.datatype = ( + datatype if isinstance(datatype, list) else [datatype] * self.col_count[0] + ) + valid_types = ["pandas", "numpy", "array"] + if type not in valid_types: + raise ValueError( + f"Invalid value for parameter `type`: {type}. Please choose from one of: {valid_types}" + ) + self.type = type + values = { + "str": "", + "number": 0, + "bool": False, + "date": "01/01/1970", + "markdown": "", + "html": "", + } + column_dtypes = ( + [datatype] * self.col_count[0] if isinstance(datatype, str) else datatype + ) + self.test_input = [ + [values[c] for c in column_dtypes] for _ in range(self.row_count[0]) + ] + + self.max_rows = max_rows + self.max_cols = max_cols + self.overflow_row_behaviour = overflow_row_behaviour + IOComponent.__init__( + self, + label=label, + every=every, + show_label=show_label, + interactive=interactive, + visible=visible, + elem_id=elem_id, + value=value, + **kwargs, + ) + + def get_config(self): + return { + "headers": self.headers, + "datatype": self.datatype, + "row_count": self.row_count, + "col_count": self.col_count, + "value": self.value, + "max_rows": self.max_rows, + "max_cols": self.max_cols, + "overflow_row_behaviour": self.overflow_row_behaviour, + "wrap": self.wrap, + **IOComponent.get_config(self), + } + + @staticmethod + def update( + value: Any | Literal[_Keywords.NO_VALUE] | None = _Keywords.NO_VALUE, + max_rows: int | None = None, + max_cols: str | None = None, + label: str | None = None, + show_label: bool | None = None, + interactive: bool | None = None, + visible: bool | None = None, + ): + updated_config = { + "max_rows": max_rows, + "max_cols": max_cols, + "label": label, + "show_label": show_label, + "interactive": interactive, + "visible": visible, + "value": value, + "__type__": "update", + } + return IOComponent.add_interactive_to_config(updated_config, interactive) + + def preprocess(self, x: DataframeData): + """ + Parameters: + x: 2D array of str, numeric, or bool data + Returns: + Dataframe in requested format + """ + if self.type == "pandas": + if x.get("headers") is not None: + return pd.DataFrame(x["data"], columns=x.get("headers")) + else: + return pd.DataFrame(x["data"]) + if self.type == "numpy": + return np.array(x["data"]) + elif self.type == "array": + return x["data"] + else: + raise ValueError( + "Unknown type: " + + str(self.type) + + ". Please choose from: 'pandas', 'numpy', 'array'." + ) + + def generate_sample(self): + return [[1, 2, 3], [4, 5, 6]] + + def postprocess( + self, y: str | pd.DataFrame | np.ndarray | List[List[str | float]] | Dict + ) -> Dict: + """ + Parameters: + y: dataframe in given format + Returns: + JSON object with key 'headers' for list of header names, 'data' for 2D array of string or numeric data + """ + if y is None: + return self.postprocess(self.test_input) + if isinstance(y, dict): + return y + if isinstance(y, str): + dataframe = pd.read_csv(y) + return { + "headers": list(dataframe.columns), + "data": Dataframe.__process_markdown( + dataframe.to_dict(orient="split")["data"], self.datatype + ), + } + if isinstance(y, pd.DataFrame): + return { + "headers": list(y.columns), # type: ignore + "data": Dataframe.__process_markdown( + y.to_dict(orient="split")["data"], self.datatype # type: ignore + ), + } + if isinstance(y, (np.ndarray, list)): + if isinstance(y, np.ndarray): + y = y.tolist() + assert isinstance(y, list), "output cannot be converted to list" + + _headers = self.headers + + if len(self.headers) < len(y[0]): + _headers = [ + *self.headers, + *list(range(len(self.headers) + 1, len(y[0]) + 1)), + ] + elif len(self.headers) > len(y[0]): + _headers = self.headers[: len(y[0])] + + return { + "headers": _headers, + "data": Dataframe.__process_markdown(y, self.datatype), + } + raise ValueError("Cannot process value as a Dataframe") + + @staticmethod + def __process_counts(count, default=3) -> Tuple[int, str]: + if count is None: + return (default, "dynamic") + if type(count) == int or type(count) == float: + return (int(count), "dynamic") + else: + return count + + @staticmethod + def __validate_headers(headers: List[str] | None, col_count: int): + if headers is not None and len(headers) != col_count: + raise ValueError( + "The length of the headers list must be equal to the col_count int.\nThe column count is set to {cols} but `headers` has {headers} items. Check the values passed to `col_count` and `headers`.".format( + cols=col_count, headers=len(headers) + ) + ) + + @classmethod + def __process_markdown(cls, data: List[List[Any]], datatype: List[str]): + if "markdown" not in datatype: + return data + + if cls.markdown_parser is None: + cls.markdown_parser = ( + MarkdownIt() + .use(dollarmath_plugin, renderer=utils.tex2svg, allow_digits=False) + .enable("table") + ) + + for i in range(len(data)): + for j in range(len(data[i])): + if datatype[j] == "markdown": + data[i][j] = cls.markdown_parser.render(data[i][j]) + + return data + + def style( + self, + **kwargs, + ): + """ + This method can be used to change the appearance of the DataFrame component. + """ + return Component.style( + self, + **kwargs, + ) + + def as_example(self, input_data: pd.DataFrame | np.ndarray | str | None): + if input_data is None: + return "" + elif isinstance(input_data, pd.DataFrame): + return input_data.head(n=5).to_dict(orient="split")["data"] # type: ignore + elif isinstance(input_data, np.ndarray): + return input_data.tolist() + return input_data + + +@document("change", "style") +class Timeseries(Changeable, IOComponent, JSONSerializable): + """ + Creates a component that can be used to upload/preview timeseries csv files or display a dataframe consisting of a time series graphically. + Preprocessing: passes the uploaded timeseries data as a {pandas.DataFrame} into the function + Postprocessing: expects a {pandas.DataFrame} or {str} path to a csv to be returned, which is then displayed as a timeseries graph + Examples-format: a {str} filepath of csv data with time series data. + Demos: fraud_detector + """ + + def __init__( + self, + value: str | Callable | None = None, + *, + x: str | None = None, + y: str | List[str] | None = None, + colors: List[str] | None = None, + label: str | None = None, + every: float | None = None, + show_label: bool = True, + interactive: bool | None = None, + visible: bool = True, + elem_id: str | None = None, + **kwargs, + ): + """ + Parameters: + value: File path for the timeseries csv file. If callable, the function will be called whenever the app loads to set the initial value of the component. + x: Column name of x (time) series. None if csv has no headers, in which case first column is x series. + y: Column name of y series, or list of column names if multiple series. None if csv has no headers, in which case every column after first is a y series. + label: component name in interface. + every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute. + colors: an ordered list of colors to use for each line plot + show_label: if True, will display label. + interactive: if True, will allow users to upload a timeseries csv; if False, can only be used to display timeseries data. If not provided, this is inferred based on whether the component is used as an input or output. + visible: If False, component will be hidden. + elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles. + """ + self.x = x + if isinstance(y, str): + y = [y] + self.y = y + self.colors = colors + IOComponent.__init__( + self, + label=label, + every=every, + show_label=show_label, + interactive=interactive, + visible=visible, + elem_id=elem_id, + value=value, + **kwargs, + ) + + def get_config(self): + return { + "x": self.x, + "y": self.y, + "value": self.value, + "colors": self.colors, + **IOComponent.get_config(self), + } + + @staticmethod + def update( + value: Any | Literal[_Keywords.NO_VALUE] | None = _Keywords.NO_VALUE, + colors: List[str] | None = None, + label: str | None = None, + show_label: bool | None = None, + interactive: bool | None = None, + visible: bool | None = None, + ): + updated_config = { + "colors": colors, + "label": label, + "show_label": show_label, + "interactive": interactive, + "visible": visible, + "value": value, + "__type__": "update", + } + return IOComponent.add_interactive_to_config(updated_config, interactive) + + def preprocess(self, x: Dict | None) -> pd.DataFrame | None: + """ + Parameters: + x: Dict with keys 'data': 2D array of str, numeric, or bool data, 'headers': list of strings for header names, 'range': optional two element list designating start of end of subrange. + Returns: + Dataframe of timeseries data + """ + if x is None: + return x + elif x.get("is_file"): + dataframe = pd.read_csv(x["name"]) + else: + dataframe = pd.DataFrame(data=x["data"], columns=x["headers"]) + if x.get("range") is not None: + dataframe = dataframe.loc[dataframe[self.x or 0] >= x["range"][0]] + dataframe = dataframe.loc[dataframe[self.x or 0] <= x["range"][1]] + return dataframe + + def generate_sample(self): + return { + "data": [[1] + [2] * len(self.y or [])] * 4, + "headers": [self.x] + (self.y or []), + } + + def postprocess(self, y: str | pd.DataFrame | None) -> Dict | None: + """ + Parameters: + y: csv or dataframe with timeseries data + Returns: + JSON object with key 'headers' for list of header names, 'data' for 2D array of string or numeric data + """ + if y is None: + return None + if isinstance(y, str): + dataframe = pd.read_csv(y) + return { + "headers": dataframe.columns.values.tolist(), + "data": dataframe.values.tolist(), + } + if isinstance(y, pd.DataFrame): + return {"headers": y.columns.values.tolist(), "data": y.values.tolist()} + raise ValueError("Cannot process value as Timeseries data") + + def style( + self, + **kwargs, + ): + """ + This method can be used to change the appearance of the TimeSeries component. + """ + return Component.style( + self, + **kwargs, + ) + + +@document() +class State(IOComponent, SimpleSerializable): + """ + Special hidden component that stores session state across runs of the demo by the + same user. The value of the State variable is cleared when the user refreshes the page. + + Preprocessing: No preprocessing is performed + Postprocessing: No postprocessing is performed + Demos: chatbot_demo, blocks_simple_squares + Guides: creating_a_chatbot, real_time_speech_recognition + """ + + allow_string_shortcut = False + + def __init__( + self, + value: Any = None, + **kwargs, + ): + """ + Parameters: + value: the initial value of the state. If callable, the function will be called whenever the app loads to set the initial value of the component. + """ + self.stateful = True + IOComponent.__init__(self, value=deepcopy(value), **kwargs) + + def style(self): + return self + + +class Variable(State): + """Variable was renamed to State. This class is kept for backwards compatibility.""" + + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + + def get_block_name(self): + return "state" + + +@document("click", "style") +class Button(Clickable, IOComponent, SimpleSerializable): + """ + Used to create a button, that can be assigned arbitrary click() events. The label (value) of the button can be used as an input or set via the output of a function. + + Preprocessing: passes the button value as a {str} into the function + Postprocessing: expects a {str} to be returned from a function, which is set as the label of the button + Demos: blocks_inputs, blocks_kinematics + """ + + def __init__( + self, + value: str | Callable = "Run", + *, + variant: str = "secondary", + visible: bool = True, + elem_id: str | None = None, + **kwargs, + ): + """ + Parameters: + value: Default text for the button to display. If callable, the function will be called whenever the app loads to set the initial value of the component. + variant: 'primary' for main call-to-action, 'secondary' for a more subdued style + visible: If False, component will be hidden. + elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles. + """ + IOComponent.__init__( + self, visible=visible, elem_id=elem_id, value=value, **kwargs + ) + self.variant = variant + + def get_config(self): + return { + "value": self.value, + "variant": self.variant, + **Component.get_config(self), + } + + @staticmethod + def update( + value: str | Literal[_Keywords.NO_VALUE] | None = _Keywords.NO_VALUE, + variant: str | None = None, + visible: bool | None = None, + ): + return { + "variant": variant, + "visible": visible, + "value": value, + "__type__": "update", + } + + def style(self, *, full_width: bool | None = None, **kwargs): + """ + This method can be used to change the appearance of the button component. + Parameters: + full_width: If True, will expand to fill parent container. + """ + if full_width is not None: + self._style["full_width"] = full_width + + return Component.style(self, **kwargs) + + +@document("click", "upload", "style") +class UploadButton( + Clickable, Uploadable, IOComponent, FileSerializable, TempFileManager +): + """ + Used to create an upload button, when cicked allows a user to upload files that satisfy the specified file type or generic files (if file_type not set). + Preprocessing: passes the uploaded file as a {file-object} or {List[file-object]} depending on `file_count` (or a {bytes}/{List{bytes}} depending on `type`) + Postprocessing: expects function to return a {str} path to a file, or {List[str]} consisting of paths to files. + Examples-format: a {str} path to a local file that populates the component. + Demos: upload_button + """ + + def __init__( + self, + label: str = "Upload a File", + value: str | List[str] | Callable | None = None, + *, + visible: bool = True, + elem_id: str | None = None, + type: str = "file", + file_count: str = "single", + file_types: List[str] | None = None, + **kwargs, + ): + """ + Parameters: + value: Default text for the button to display. + type: Type of value to be returned by component. "file" returns a temporary file object whose path can be retrieved by file_obj.name and original filename can be retrieved with file_obj.orig_name, "binary" returns an bytes object. + file_count: if single, allows user to upload one file. If "multiple", user uploads multiple files. If "directory", user uploads all files in selected directory. Return type will be list for each file in case of "multiple" or "directory". + file_types: List of type of files to be uploaded. "file" allows any file to be uploaded, "image" allows only image files to be uploaded, "audio" allows only audio files to be uploaded, "video" allows only video files to be uploaded, "text" allows only text files to be uploaded. + label: Text to display on the button. Defaults to "Upload a File". + visible: If False, component will be hidden. + elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles. + """ + self.type = type + self.file_count = file_count + self.file_types = file_types + self.label = label + TempFileManager.__init__(self) + IOComponent.__init__( + self, label=label, visible=visible, elem_id=elem_id, value=value, **kwargs + ) + + def get_config(self): + return { + "label": self.label, + "value": self.value, + "file_count": self.file_count, + "file_types": self.file_types, + **Component.get_config(self), + } + + @staticmethod + def update( + value: str | Literal[_Keywords.NO_VALUE] | None = _Keywords.NO_VALUE, + interactive: bool | None = None, + visible: bool | None = None, + ): + updated_config = { + "interactive": interactive, + "visible": visible, + "value": value, + "__type__": "update", + } + return IOComponent.add_interactive_to_config(updated_config, interactive) + + def preprocess( + self, x: List[Dict[str, Any]] | None + ) -> bytes | tempfile._TemporaryFileWrapper | List[ + bytes | tempfile._TemporaryFileWrapper + ] | None: + """ + Parameters: + x: List of JSON objects with filename as 'name' property and base64 data as 'data' property + Returns: + File objects in requested format + """ + if x is None: + return None + + def process_single_file(f) -> bytes | tempfile._TemporaryFileWrapper: + file_name, data, is_file = ( + f["name"], + f["data"], + f.get("is_file", False), + ) + if self.type == "file": + if is_file: + temp_file_path = self.make_temp_copy_if_needed(file_name) + file = tempfile.NamedTemporaryFile(delete=False) + file.name = temp_file_path + file.orig_name = file_name # type: ignore + else: + file = processing_utils.decode_base64_to_file( + data, file_path=file_name + ) + file.orig_name = file_name # type: ignore + return file + elif self.type == "bytes": + if is_file: + with open(file_name, "rb") as file_data: + return file_data.read() + return processing_utils.decode_base64_to_binary(data)[0] + else: + raise ValueError( + "Unknown type: " + + str(self.type) + + ". Please choose from: 'file', 'bytes'." + ) + + if self.file_count == "single": + if isinstance(x, list): + return process_single_file(x[0]) + else: + return process_single_file(x) + else: + if isinstance(x, list): + return [process_single_file(f) for f in x] + else: + return process_single_file(x) + + def generate_sample(self): + return deepcopy(media_data.BASE64_FILE) + + def serialize( + self, x: str | None, load_dir: str = "", encryption_key: bytes | None = None + ) -> Dict | None: + serialized = FileSerializable.serialize(self, x, load_dir, encryption_key) + if serialized is None: + return None + serialized["size"] = Path(serialized["name"]).stat().st_size + return serialized + + def style(self, *, full_width: bool | None = None, **kwargs): + """ + This method can be used to change the appearance of the button component. + Parameters: + full_width: If True, will expand to fill parent container. + """ + if full_width is not None: + self._style["full_width"] = full_width + + return Component.style(self, **kwargs) + + +@document("change", "submit", "style") +class ColorPicker(Changeable, Submittable, IOComponent, SimpleSerializable): + """ + Creates a color picker for user to select a color as string input. + Preprocessing: passes selected color value as a {str} into the function. + Postprocessing: expects a {str} returned from function and sets color picker value to it. + Examples-format: a {str} with a hexadecimal representation of a color, e.g. "#ff0000" for red. + Demos: color_picker, color_generator + """ + + def __init__( + self, + value: str | Callable | None = None, + *, + label: str | None = None, + every: float | None = None, + show_label: bool = True, + interactive: bool | None = None, + visible: bool = True, + elem_id: str | None = None, + **kwargs, + ): + """ + Parameters: + value: default text to provide in color picker. If callable, the function will be called whenever the app loads to set the initial value of the component. + label: component name in interface. + every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute. + show_label: if True, will display label. + interactive: if True, will be rendered as an editable color picker; if False, editing will be disabled. If not provided, this is inferred based on whether the component is used as an input or output. + visible: If False, component will be hidden. + elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles. + """ + self.cleared_value = "#000000" + self.test_input = value + IOComponent.__init__( + self, + label=label, + every=every, + show_label=show_label, + interactive=interactive, + visible=visible, + elem_id=elem_id, + value=value, + **kwargs, + ) + + def get_config(self): + return { + "value": self.value, + **IOComponent.get_config(self), + } + + @staticmethod + def update( + value: str | Literal[_Keywords.NO_VALUE] | None = _Keywords.NO_VALUE, + label: str | None = None, + show_label: bool | None = None, + visible: bool | None = None, + interactive: bool | None = None, + ): + updated_config = { + "value": value, + "label": label, + "show_label": show_label, + "visible": visible, + "__type__": "update", + } + return IOComponent.add_interactive_to_config(updated_config, interactive) + + def preprocess(self, x: str | None) -> str | None: + """ + Any preprocessing needed to be performed on function input. + Parameters: + x: text + Returns: + text + """ + if x is None: + return None + else: + return str(x) + + def generate_sample(self) -> str: + return "#000000" + + def postprocess(self, y: str | None) -> str | None: + """ + Any postprocessing needed to be performed on function output. + Parameters: + y: text + Returns: + text + """ + if y is None: + return None + else: + return str(y) + + +############################ +# Only Output Components +############################ + + +@document("change", "style") +class Label(Changeable, IOComponent, JSONSerializable): + """ + Displays a classification label, along with confidence scores of top categories, if provided. + Preprocessing: this component does *not* accept input. + Postprocessing: expects a {Dict[str, float]} of classes and confidences, or {str} with just the class or an {int}/{float} for regression outputs, or a {str} path to a .json file containing a json dictionary in the structure produced by Label.postprocess(). + + Demos: main_note, titanic_survival + Guides: Gradio_and_ONNX_on_Hugging_Face, image_classification_in_pytorch, image_classification_in_tensorflow, image_classification_with_vision_transformers, building_a_pictionary_app + """ + + CONFIDENCES_KEY = "confidences" + + def __init__( + self, + value: Dict[str, float] | str | float | Callable | None = None, + *, + num_top_classes: int | None = None, + label: str | None = None, + every: float | None = None, + show_label: bool = True, + visible: bool = True, + elem_id: str | None = None, + color: str | None = None, + **kwargs, + ): + """ + Parameters: + value: Default value to show in the component. If a str or number is provided, simply displays the string or number. If a {Dict[str, float]} of classes and confidences is provided, displays the top class on top and the `num_top_classes` below, along with their confidence bars. If callable, the function will be called whenever the app loads to set the initial value of the component. + num_top_classes: number of most confident classes to show. + label: component name in interface. + every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute. + show_label: if True, will display label. + visible: If False, component will be hidden. + elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles. + color: The background color of the label (either a valid css color name or hexadecimal string). + """ + self.num_top_classes = num_top_classes + self.color = color + IOComponent.__init__( + self, + label=label, + every=every, + show_label=show_label, + visible=visible, + elem_id=elem_id, + value=value, + **kwargs, + ) + + def get_config(self): + return { + "num_top_classes": self.num_top_classes, + "value": self.value, + "color": self.color, + **IOComponent.get_config(self), + } + + def postprocess(self, y: Dict[str, float] | str | float | None) -> Dict | None: + """ + Parameters: + y: a dictionary mapping labels to confidence value, or just a string/numerical label by itself + Returns: + Object with key 'label' representing primary label, and key 'confidences' representing a list of label-confidence pairs + """ + if y is None or y == {}: + return None + if isinstance(y, str) and y.endswith(".json") and Path(y).exists(): + return self.serialize(y) + if isinstance(y, (str, float, int)): + return {"label": str(y)} + if isinstance(y, dict): + if "confidences" in y and isinstance(y["confidences"], dict): + y = y["confidences"] + y = {c["label"]: c["confidence"] for c in y} + sorted_pred = sorted(y.items(), key=operator.itemgetter(1), reverse=True) + if self.num_top_classes is not None: + sorted_pred = sorted_pred[: self.num_top_classes] + return { + "label": sorted_pred[0][0], + "confidences": [ + {"label": pred[0], "confidence": pred[1]} for pred in sorted_pred + ], + } + raise ValueError( + "The `Label` output interface expects one of: a string label, or an int label, a " + "float label, or a dictionary whose keys are labels and values are confidences. " + "Instead, got a {}".format(type(y)) + ) + + @staticmethod + def update( + value: Dict[str, float] + | str + | float + | Literal[_Keywords.NO_VALUE] + | None = _Keywords.NO_VALUE, + label: str | None = None, + show_label: bool | None = None, + visible: bool | None = None, + color: str | Literal[_Keywords.NO_VALUE] | None = _Keywords.NO_VALUE, + ): + # If color is not specified (NO_VALUE) map it to None so that + # it gets filtered out in postprocess. This will mean the color + # will not be updated in the front-end + if color is _Keywords.NO_VALUE: + color = None + # If the color was specified by the developer as None + # Map is so that the color is updated to be transparent, + # e.g. no background default state. + elif color is None: + color = "transparent" + updated_config = { + "label": label, + "show_label": show_label, + "visible": visible, + "value": value, + "color": color, + "__type__": "update", + } + return updated_config + + def style( + self, + *, + container: bool | None = None, + ): + """ + This method can be used to change the appearance of the label component. + Parameters: + container: If True, will add a container to the label - providing some extra padding around the border. + """ + return Component.style(self, container=container) + + +@document("change", "style") +class HighlightedText(Changeable, IOComponent, JSONSerializable): + """ + Displays text that contains spans that are highlighted by category or numerical value. + Preprocessing: this component does *not* accept input. + Postprocessing: expects a {List[Tuple[str, float | str]]]} consisting of spans of text and their associated labels, or a {Dict} with two keys: (1) "text" whose value is the complete text, and "entities", which is a list of dictionaries, each of which have the keys: "entity" (consisting of the entity label), "start" (the character index where the label starts), and "end" (the character index where the label ends). Entities should not overlap. + + Demos: diff_texts, text_analysis + Guides: named_entity_recognition + """ + + def __init__( + self, + value: List[Tuple[str, str | float | None]] | Dict | Callable | None = None, + *, + color_map: Dict[str, str] + | None = None, # Parameter moved to HighlightedText.style() + show_legend: bool = False, + combine_adjacent: bool = False, + adjacent_separator: str = "", + label: str | None = None, + every: float | None = None, + show_label: bool = True, + visible: bool = True, + elem_id: str | None = None, + **kwargs, + ): + """ + Parameters: + value: Default value to show. If callable, the function will be called whenever the app loads to set the initial value of the component. + show_legend: whether to show span categories in a separate legend or inline. + combine_adjacent: If True, will merge the labels of adjacent tokens belonging to the same category. + adjacent_separator: Specifies the separator to be used between tokens if combine_adjacent is True. + label: component name in interface. + every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute. + show_label: if True, will display label. + visible: If False, component will be hidden. + elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles. + """ + self.color_map = color_map + if color_map is not None: + warnings.warn( + "The 'color_map' parameter has been moved from the constructor to `HighlightedText.style()` ", + ) + self.show_legend = show_legend + self.combine_adjacent = combine_adjacent + self.adjacent_separator = adjacent_separator + IOComponent.__init__( + self, + label=label, + every=every, + show_label=show_label, + visible=visible, + elem_id=elem_id, + value=value, + **kwargs, + ) + + def get_config(self): + return { + "color_map": self.color_map, + "show_legend": self.show_legend, + "value": self.value, + **IOComponent.get_config(self), + } + + @staticmethod + def update( + value: List[Tuple[str, str | float | None]] + | Dict + | Literal[_Keywords.NO_VALUE] + | None, + color_map: Dict[str, str] | None = None, + show_legend: bool | None = None, + label: str | None = None, + show_label: bool | None = None, + visible: bool | None = None, + ): + updated_config = { + "color_map": color_map, + "show_legend": show_legend, + "label": label, + "show_label": show_label, + "visible": visible, + "value": value, + "__type__": "update", + } + return updated_config + + def postprocess( + self, y: List[Tuple[str, str | float | None]] | Dict | None + ) -> List[Tuple[str, str | float | None]] | None: + """ + Parameters: + y: List of (word, category) tuples + Returns: + List of (word, category) tuples + """ + if y is None: + return None + if isinstance(y, dict): + try: + text = y["text"] + entities = y["entities"] + except KeyError: + raise ValueError( + "Expected a dictionary with keys 'text' and 'entities' for the value of the HighlightedText component." + ) + if len(entities) == 0: + y = [(text, None)] + else: + list_format = [] + index = 0 + entities = sorted(entities, key=lambda x: x["start"]) + for entity in entities: + list_format.append((text[index : entity["start"]], None)) + list_format.append( + (text[entity["start"] : entity["end"]], entity["entity"]) + ) + index = entity["end"] + list_format.append((text[index:], None)) + y = list_format + if self.combine_adjacent: + output = [] + running_text, running_category = None, None + for text, category in y: + if running_text is None: + running_text = text + running_category = category + elif category == running_category: + running_text += self.adjacent_separator + text + elif not text: + # Skip fully empty item, these get added in processing + # of dictionaries. + pass + else: + output.append((running_text, running_category)) + running_text = text + running_category = category + if running_text is not None: + output.append((running_text, running_category)) + return output + else: + return y + + def style( + self, + *, + color_map: Dict[str, str] | None = None, + container: bool | None = None, + **kwargs, + ): + """ + This method can be used to change the appearance of the HighlightedText component. + Parameters: + color_map: Map between category and respective colors. + container: If True, will place the component in a container - providing some extra padding around the border. + """ + if color_map is not None: + self._style["color_map"] = color_map + + return Component.style(self, container=container, **kwargs) + + +@document("change", "style") +class JSON(Changeable, IOComponent, JSONSerializable): + """ + Used to display arbitrary JSON output prettily. + Preprocessing: this component does *not* accept input. + Postprocessing: expects a valid JSON {str} -- or a {list} or {dict} that is JSON serializable. + + Demos: zip_to_json, blocks_xray + """ + + def __init__( + self, + value: str | Callable | None = None, + *, + label: str | None = None, + every: float | None = None, + show_label: bool = True, + visible: bool = True, + elem_id: str | None = None, + **kwargs, + ): + """ + Parameters: + value: Default value. If callable, the function will be called whenever the app loads to set the initial value of the component. + label: component name in interface. + every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute. + show_label: if True, will display label. + visible: If False, component will be hidden. + elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles. + """ + IOComponent.__init__( + self, + label=label, + every=every, + show_label=show_label, + visible=visible, + elem_id=elem_id, + value=value, + **kwargs, + ) + + def get_config(self): + return { + "value": self.value, + **IOComponent.get_config(self), + } + + @staticmethod + def update( + value: Any | Literal[_Keywords.NO_VALUE] | None = _Keywords.NO_VALUE, + label: str | None = None, + show_label: bool | None = None, + visible: bool | None = None, + interactive: bool | None = None, + ): + updated_config = { + "label": label, + "show_label": show_label, + "visible": visible, + "value": value, + "__type__": "update", + } + return updated_config + + def postprocess(self, y: Dict | List | str | None) -> Dict | List | None: + """ + Parameters: + y: JSON output + Returns: + JSON output + """ + if y is None: + return None + if isinstance(y, str): + return json.loads(y) + else: + return y + + def style(self, *, container: bool | None = None, **kwargs): + """ + This method can be used to change the appearance of the JSON component. + Parameters: + container: If True, will place the JSON in a container - providing some extra padding around the border. + """ + return Component.style(self, container=container, **kwargs) + + +@document("change") +class HTML(Changeable, IOComponent, SimpleSerializable): + """ + Used to display arbitrary HTML output. + Preprocessing: this component does *not* accept input. + Postprocessing: expects a valid HTML {str}. + + Demos: text_analysis + Guides: key_features + """ + + def __init__( + self, + value: str | Callable = "", + *, + label: str | None = None, + every: float | None = None, + show_label: bool = True, + visible: bool = True, + elem_id: str | None = None, + **kwargs, + ): + """ + Parameters: + value: Default value. If callable, the function will be called whenever the app loads to set the initial value of the component. + label: component name in interface. + every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute. + show_label: if True, will display label. + visible: If False, component will be hidden. + elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles. + """ + IOComponent.__init__( + self, + label=label, + every=every, + show_label=show_label, + visible=visible, + elem_id=elem_id, + value=value, + **kwargs, + ) + + def get_config(self): + return { + "value": self.value, + **IOComponent.get_config(self), + } + + @staticmethod + def update( + value: Any | Literal[_Keywords.NO_VALUE] | None = _Keywords.NO_VALUE, + label: str | None = None, + show_label: bool | None = None, + visible: bool | None = None, + ): + updated_config = { + "label": label, + "show_label": show_label, + "visible": visible, + "value": value, + "__type__": "update", + } + return updated_config + + def style(self): + return self + + +@document("style") +class Gallery(IOComponent, TempFileManager, FileSerializable): + """ + Used to display a list of images as a gallery that can be scrolled through. + Preprocessing: this component does *not* accept input. + Postprocessing: expects a list of images in any format, {List[numpy.array | PIL.Image | str]}, or a {List} of (image, {str} caption) tuples and displays them. + + Demos: fake_gan + """ + + def __init__( + self, + value: List[np.ndarray | _Image.Image | str] | Callable | None = None, + *, + label: str | None = None, + every: float | None = None, + show_label: bool = True, + visible: bool = True, + elem_id: str | None = None, + **kwargs, + ): + """ + Parameters: + value: List of images to display in the gallery by default. If callable, the function will be called whenever the app loads to set the initial value of the component. + label: component name in interface. + every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute. + show_label: if True, will display label. + visible: If False, component will be hidden. + elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles. + """ + TempFileManager.__init__(self) + super().__init__( + label=label, + every=every, + show_label=show_label, + visible=visible, + elem_id=elem_id, + value=value, + **kwargs, + ) + + @staticmethod + def update( + value: Any | Literal[_Keywords.NO_VALUE] | None = _Keywords.NO_VALUE, + label: str | None = None, + show_label: bool | None = None, + visible: bool | None = None, + ): + updated_config = { + "label": label, + "show_label": show_label, + "visible": visible, + "value": value, + "__type__": "update", + } + return updated_config + + def get_config(self): + return { + "value": self.value, + **IOComponent.get_config(self), + } + + def postprocess( + self, + y: List[np.ndarray | _Image.Image | str] + | List[Tuple[np.ndarray | _Image.Image | str, str]] + | None, + ) -> List[str]: + """ + Parameters: + y: list of images, or list of (image, caption) tuples + Returns: + list of string file paths to images in temp directory + """ + if y is None: + return [] + output = [] + for img in y: + caption = None + if isinstance(img, tuple) or isinstance(img, list): + img, caption = img + if isinstance(img, np.ndarray): + file = processing_utils.save_array_to_file(img) + file_path = str(Path(file.name).resolve()) + self.temp_files.add(file_path) + elif isinstance(img, _Image.Image): + file = processing_utils.save_pil_to_file(img) + file_path = str(Path(file.name).resolve()) + self.temp_files.add(file_path) + elif isinstance(img, str): + if utils.validate_url(img): + file_path = img + else: + file_path = self.make_temp_copy_if_needed(img) + else: + raise ValueError(f"Cannot process type as image: {type(img)}") + + if caption is not None: + output.append( + [{"name": file_path, "data": None, "is_file": True}, caption] + ) + else: + output.append({"name": file_path, "data": None, "is_file": True}) + + return output + + def style( + self, + *, + grid: int | Tuple | None = None, + height: str | None = None, + container: bool | None = None, + **kwargs, + ): + """ + This method can be used to change the appearance of the gallery component. + Parameters: + grid: Represents the number of images that should be shown in one row, for each of the six standard screen sizes (<576px, <768px, <992px, <1200px, <1400px, >1400px). if fewer that 6 are given then the last will be used for all subsequent breakpoints + height: Height of the gallery. + container: If True, will place gallery in a container - providing some extra padding around the border. + """ + if grid is not None: + self._style["grid"] = grid + if height is not None: + self._style["height"] = height + + return Component.style(self, container=container, **kwargs) + + def deserialize( + self, x: Any, save_dir: str = "", encryption_key: bytes | None = None + ) -> None | str: + if x is None: + return None + gallery_path = Path(save_dir) / str(uuid.uuid4()) + gallery_path.mkdir(exist_ok=True, parents=True) + captions = {} + for img_data in x: + if isinstance(img_data, list) or isinstance(img_data, tuple): + img_data, caption = img_data + else: + caption = None + name = FileSerializable.deserialize(self, img_data, gallery_path) + captions[name] = caption + captions_file = gallery_path / "captions.json" + with captions_file.open("w") as captions_json: + json.dump(captions, captions_json) + return str(gallery_path.resolve()) + + def serialize(self, x: Any, load_dir: str = "", called_directly: bool = False): + files = [] + captions_file = Path(x) / "captions.json" + with captions_file.open("r") as captions_json: + captions = json.load(captions_json) + for file_name, caption in captions.items(): + img = FileSerializable.serialize(self, file_name) + files.append([img, caption]) + return files + + +class Carousel(IOComponent, Changeable, SimpleSerializable): + """ + Deprecated Component + """ + + def __init__( + self, + *args, + **kwargs, + ): + raise DeprecationWarning( + "The Carousel component is deprecated. Please consider using the Gallery " + "component, which can be used to display images (and optional captions).", + ) + + +@document("change", "style") +class Chatbot(Changeable, IOComponent, JSONSerializable): + """ + Displays a chatbot output showing both user submitted messages and responses. Supports a subset of Markdown including bold, italics, code, and images. + Preprocessing: this component does *not* accept input. + Postprocessing: expects a {List[Tuple[str, str]]}, a list of tuples with user inputs and responses as strings of HTML. + + Demos: chatbot_demo + """ + + def __init__( + self, + value: List[Tuple[str, str]] | Callable | None = None, + color_map: Dict[str, str] | None = None, # Parameter moved to Chatbot.style() + *, + label: str | None = None, + every: float | None = None, + show_label: bool = True, + visible: bool = True, + elem_id: str | None = None, + **kwargs, + ): + """ + Parameters: + value: Default value to show in chatbot. If callable, the function will be called whenever the app loads to set the initial value of the component. + label: component name in interface. + every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute. + show_label: if True, will display label. + visible: If False, component will be hidden. + elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles. + """ + if color_map is not None: + warnings.warn( + "The 'color_map' parameter has been moved from the constructor to `Chatbot.style()` ", + ) + self.color_map = color_map + self.md = MarkdownIt() + + IOComponent.__init__( + self, + label=label, + every=every, + show_label=show_label, + visible=visible, + elem_id=elem_id, + value=value, + **kwargs, + ) + + def get_config(self): + return { + "value": self.value, + "color_map": self.color_map, + **IOComponent.get_config(self), + } + + @staticmethod + def update( + value: Any | Literal[_Keywords.NO_VALUE] | None = _Keywords.NO_VALUE, + color_map: Tuple[str, str] | None = None, + label: str | None = None, + show_label: bool | None = None, + visible: bool | None = None, + ): + updated_config = { + "color_map": color_map, + "label": label, + "show_label": show_label, + "visible": visible, + "value": value, + "__type__": "update", + } + return updated_config + + def postprocess(self, y: List[Tuple[str, str]]) -> List[Tuple[str, str]]: + """ + Parameters: + y: List of tuples representing the message and response pairs. Each message and response should be a string, which may be in Markdown format. + Returns: + List of tuples representing the message and response. Each message and response will be a string of HTML. + """ + if y is None: + return [] + for i, (message, response) in enumerate(y): + y[i] = (self.md.render(message), self.md.render(response)) + return y + + def style(self, *, color_map: Tuple[str, str] | None = None, **kwargs): + """ + This method can be used to change the appearance of the Chatbot component. + Parameters: + color_map: Tuple containing colors to apply to user and response chat bubbles. + Returns: + + """ + if color_map is not None: + self._style["color_map"] = color_map + + return Component.style( + self, + **kwargs, + ) + + +@document("change", "edit", "clear", "style") +class Model3D( + Changeable, Editable, Clearable, IOComponent, FileSerializable, TempFileManager +): + """ + Component allows users to upload or view 3D Model files (.obj, .glb, or .gltf). + Preprocessing: This component passes the uploaded file as a {str} filepath. + Postprocessing: expects function to return a {str} path to a file of type (.obj, glb, or .gltf) + + Demos: model3D + Guides: how_to_use_3D_model_component + """ + + def __init__( + self, + value: str | Callable | None = None, + *, + clear_color: List[float] | None = None, + label: str | None = None, + every: float | None = None, + show_label: bool = True, + visible: bool = True, + elem_id: str | None = None, + **kwargs, + ): + """ + Parameters: + value: path to (.obj, glb, or .gltf) file to show in model3D viewer. If callable, the function will be called whenever the app loads to set the initial value of the component. + clear_color: background color of scene + label: component name in interface. + every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute. + show_label: if True, will display label. + visible: If False, component will be hidden. + elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles. + """ + self.clear_color = clear_color or [0.2, 0.2, 0.2, 1.0] + TempFileManager.__init__(self) + IOComponent.__init__( + self, + label=label, + every=every, + show_label=show_label, + visible=visible, + elem_id=elem_id, + value=value, + **kwargs, + ) + + def get_config(self): + return { + "clearColor": self.clear_color, + "value": self.value, + **IOComponent.get_config(self), + } + + @staticmethod + def update( + value: Any | Literal[_Keywords.NO_VALUE] | None = _Keywords.NO_VALUE, + label: str | None = None, + show_label: bool | None = None, + visible: bool | None = None, + ): + updated_config = { + "label": label, + "show_label": show_label, + "visible": visible, + "value": value, + "__type__": "update", + } + return updated_config + + def preprocess(self, x: Dict[str, str] | None) -> str | None: + """ + Parameters: + x: JSON object with filename as 'name' property and base64 data as 'data' property + Returns: + string file path to temporary file with the 3D image model + """ + if x is None: + return x + file_name, file_data, is_file = ( + x["name"], + x["data"], + x.get("is_file", False), + ) + if is_file: + temp_file_path = self.make_temp_copy_if_needed(file_name) + else: + temp_file = processing_utils.decode_base64_to_file( + file_data, file_path=file_name + ) + temp_file_path = temp_file.name + + return temp_file_path + + def generate_sample(self): + return media_data.BASE64_MODEL3D + + def postprocess(self, y: str | None) -> Dict[str, str] | None: + """ + Parameters: + y: path to the model + Returns: + file name mapped to base64 url data + """ + if y is None: + return y + data = { + "name": self.make_temp_copy_if_needed(y), + "data": None, + "is_file": True, + } + return data + + def style(self, **kwargs): + """ + This method can be used to change the appearance of the Model3D component. + """ + return Component.style( + self, + **kwargs, + ) + + def as_example(self, input_data: str | None) -> str: + return Path(input_data).name if input_data else "" + + +@document("change", "clear") +class Plot(Changeable, Clearable, IOComponent, JSONSerializable): + """ + Used to display various kinds of plots (matplotlib, plotly, or bokeh are supported) + Preprocessing: this component does *not* accept input. + Postprocessing: expects either a {matplotlib.figure.Figure}, a {plotly.graph_objects._figure.Figure}, or a {dict} corresponding to a bokeh plot (json_item format) + + Demos: altair_plot, outbreak_forecast, blocks_kinematics, stock_forecast, map_airbnb + Guides: plot_component_for_maps + """ + + def __init__( + self, + value: Callable | None | pd.DataFrame = None, + *, + label: str | None = None, + every: float | None = None, + show_label: bool = True, + visible: bool = True, + elem_id: str | None = None, + **kwargs, + ): + """ + Parameters: + value: Optionally, supply a default plot object to display, must be a matplotlib, plotly, altair, or bokeh figure, or a callable. If callable, the function will be called whenever the app loads to set the initial value of the component. + label: component name in interface. + every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute. + show_label: if True, will display label. + visible: If False, component will be hidden. + elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles. + """ + IOComponent.__init__( + self, + label=label, + every=every, + show_label=show_label, + visible=visible, + elem_id=elem_id, + value=value, + **kwargs, + ) + + def get_config(self): + return {"value": self.value, **IOComponent.get_config(self)} + + @staticmethod + def update( + value: Any | Literal[_Keywords.NO_VALUE] | None = _Keywords.NO_VALUE, + label: str | None = None, + show_label: bool | None = None, + visible: bool | None = None, + ): + updated_config = { + "label": label, + "show_label": show_label, + "visible": visible, + "value": value, + "__type__": "update", + } + return updated_config + + def postprocess(self, y) -> Dict[str, str] | None: + """ + Parameters: + y: plot data + Returns: + plot type mapped to plot base64 data + """ + if y is None: + return None + if isinstance(y, (ModuleType, matplotlib.figure.Figure)): + dtype = "matplotlib" + out_y = processing_utils.encode_plot_to_base64(y) + elif isinstance(y, dict): + dtype = "bokeh" + out_y = json.dumps(y) + else: + is_altair = "altair" in y.__module__ + if is_altair: + dtype = "altair" + else: + dtype = "plotly" + out_y = y.to_json() + return {"type": dtype, "plot": out_y} + + def style(self, container: bool | None = None): + return Component.style( + self, + container=container, + ) + + +class AltairPlot: + @staticmethod + def create_legend(position, title): + if position == "none": + legend = None + else: + position = {"orient": position} if position else {} + legend = {"title": title, **position} + + return legend + + @staticmethod + def create_scale(limit): + return alt.Scale(domain=limit) if limit else alt.Undefined + + +@document("change", "clear") +class ScatterPlot(Plot): + """ + Create a scatter plot. + + Preprocessing: this component does *not* accept input. + Postprocessing: expects a pandas dataframe with the data to plot. + + Demos: native_plots + Guides: creating_a_dashboard_from_bigquery_data + """ + + def __init__( + self, + value: pd.DataFrame | Callable | None = None, + x: str | None = None, + y: str | None = None, + *, + color: str | None = None, + size: str | None = None, + shape: str | None = None, + title: str | None = None, + tooltip: List[str] | str | None = None, + x_title: str | None = None, + y_title: str | None = None, + color_legend_title: str | None = None, + size_legend_title: str | None = None, + shape_legend_title: str | None = None, + color_legend_position: str | None = None, + size_legend_position: str | None = None, + shape_legend_position: str | None = None, + height: int | None = None, + width: int | None = None, + x_lim: List[int | float] | None = None, + y_lim: List[int | float] | None = None, + caption: str | None = None, + interactive: bool | None = True, + label: str | None = None, + every: float | None = None, + show_label: bool = True, + visible: bool = True, + elem_id: str | None = None, + ): + """ + Parameters: + value: The pandas dataframe containing the data to display in a scatter plot, or a callable. If callable, the function will be called whenever the app loads to set the initial value of the component. + x: Column corresponding to the x axis. + y: Column corresponding to the y axis. + color: The column to determine the point color. If the column contains numeric data, gradio will interpolate the column data so that small values correspond to light colors and large values correspond to dark values. + size: The column used to determine the point size. Should contain numeric data so that gradio can map the data to the point size. + shape: The column used to determine the point shape. Should contain categorical data. Gradio will map each unique value to a different shape. + title: The title to display on top of the chart. + tooltip: The column (or list of columns) to display on the tooltip when a user hovers a point on the plot. + x_title: The title given to the x axis. By default, uses the value of the x parameter. + y_title: The title given to the y axis. By default, uses the value of the y parameter. + color_legend_title: The title given to the color legend. By default, uses the value of color parameter. + size_legend_title: The title given to the size legend. By default, uses the value of the size parameter. + shape_legend_title: The title given to the shape legend. By default, uses the value of the shape parameter. + color_legend_position: The position of the color legend. If the string value 'none' is passed, this legend is omitted. For other valid position values see: https://vega.github.io/vega/docs/legends/#orientation. + size_legend_position: The position of the size legend. If the string value 'none' is passed, this legend is omitted. For other valid position values see: https://vega.github.io/vega/docs/legends/#orientation. + shape_legend_position: The position of the shape legend. If the string value 'none' is passed, this legend is omitted. For other valid position values see: https://vega.github.io/vega/docs/legends/#orientation. + height: The height of the plot in pixels. + width: The width of the plot in pixels. + x_lim: A tuple or list containing the limits for the x-axis, specified as [x_min, x_max]. + y_lim: A tuple of list containing the limits for the y-axis, specified as [y_min, y_max]. + caption: The (optional) caption to display below the plot. + interactive: Whether users should be able to interact with the plot by panning or zooming with their mouse or trackpad. + label: The (optional) label to display on the top left corner of the plot. + every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute. + show_label: Whether the label should be displayed. + visible: Whether the plot should be visible. + elem_id: Unique id used for custom css targetting. + """ + self.x = x + self.y = y + self.color = color + self.size = size + self.shape = shape + self.tooltip = tooltip + self.title = title + self.x_title = x_title + self.y_title = y_title + self.color_legend_title = color_legend_title + self.color_legend_position = color_legend_position + self.size_legend_title = size_legend_title + self.size_legend_position = size_legend_position + self.shape_legend_title = shape_legend_title + self.shape_legend_position = shape_legend_position + self.caption = caption + self.interactive_chart = interactive + self.width = width + self.height = height + self.x_lim = x_lim + self.y_lim = y_lim + super().__init__( + value=value, + label=label, + every=every, + show_label=show_label, + visible=visible, + elem_id=elem_id, + ) + + def get_config(self): + config = super().get_config() + config["caption"] = self.caption + return config + + def get_block_name(self) -> str: + return "plot" + + @staticmethod + def update( + value: DataFrame | Dict | Literal[_Keywords.NO_VALUE] = _Keywords.NO_VALUE, + x: str | None = None, + y: str | None = None, + color: str | None = None, + size: str | None = None, + shape: str | None = None, + title: str | None = None, + tooltip: List[str] | str | None = None, + x_title: str | None = None, + y_title: str | None = None, + color_legend_title: str | None = None, + size_legend_title: str | None = None, + shape_legend_title: str | None = None, + color_legend_position: str | None = None, + size_legend_position: str | None = None, + shape_legend_position: str | None = None, + height: int | None = None, + width: int | None = None, + x_lim: List[int | float] | None = None, + y_lim: List[int | float] | None = None, + interactive: bool | None = None, + caption: str | None = None, + label: str | None = None, + show_label: bool | None = None, + visible: bool | None = None, + ): + """Update an existing plot component. + + If updating any of the plot properties (color, size, etc) the value, x, and y parameters must be specified. + + Parameters: + value: The pandas dataframe containing the data to display in a scatter plot. + x: Column corresponding to the x axis. + y: Column corresponding to the y axis. + color: The column to determine the point color. If the column contains numeric data, gradio will interpolate the column data so that small values correspond to light colors and large values correspond to dark values. + size: The column used to determine the point size. Should contain numeric data so that gradio can map the data to the point size. + shape: The column used to determine the point shape. Should contain categorical data. Gradio will map each unique value to a different shape. + title: The title to display on top of the chart. + tooltip: The column (or list of columns) to display on the tooltip when a user hovers a point on the plot. + x_title: The title given to the x axis. By default, uses the value of the x parameter. + y_title: The title given to the y axis. By default, uses the value of the y parameter. + color_legend_title: The title given to the color legend. By default, uses the value of color parameter. + size_legend_title: The title given to the size legend. By default, uses the value of the size parameter. + shape_legend_title: The title given to the shape legend. By default, uses the value of the shape parameter. + color_legend_position: The position of the color legend. If the string value 'none' is passed, this legend is omitted. For other valid position values see: https://vega.github.io/vega/docs/legends/#orientation. + size_legend_position: The position of the size legend. If the string value 'none' is passed, this legend is omitted. For other valid position values see: https://vega.github.io/vega/docs/legends/#orientation. + shape_legend_position: The position of the shape legend. If the string value 'none' is passed, this legend is omitted. For other valid position values see: https://vega.github.io/vega/docs/legends/#orientation. + height: The height of the plot in pixels. + width: The width of the plot in pixels. + x_lim: A tuple or list containing the limits for the x-axis, specified as [x_min, x_max]. + y_lim: A tuple of list containing the limits for the y-axis, specified as [y_min, y_max]. + interactive: Whether users should be able to interact with the plot by panning or zooming with their mouse or trackpad. + caption: The (optional) caption to display below the plot. + label: The (optional) label to display in the top left corner of the plot. + show_label: Whether the label should be displayed. + visible: Whether the plot should be visible. + """ + properties = [ + x, + y, + color, + size, + shape, + title, + tooltip, + x_title, + y_title, + color_legend_title, + size_legend_title, + shape_legend_title, + color_legend_position, + size_legend_position, + shape_legend_position, + interactive, + height, + width, + x_lim, + y_lim, + ] + if any(properties): + if not isinstance(value, pd.DataFrame): + raise ValueError( + "In order to update plot properties the value parameter " + "must be provided, and it must be a Dataframe. Please pass a value " + "parameter to gr.ScatterPlot.update." + ) + if x is None or y is None: + raise ValueError( + "In order to update plot properties, the x and y axis data " + "must be specified. Please pass valid values for x an y to " + "gr.ScatterPlot.update." + ) + chart = ScatterPlot.create_plot(value, *properties) + value = {"type": "altair", "plot": chart.to_json(), "chart": "scatter"} + + updated_config = { + "label": label, + "show_label": show_label, + "visible": visible, + "value": value, + "caption": caption, + "__type__": "update", + } + return updated_config + + @staticmethod + def create_plot( + value: pd.DataFrame, + x: str, + y: str, + color: str | None = None, + size: str | None = None, + shape: str | None = None, + title: str | None = None, + tooltip: List[str] | str | None = None, + x_title: str | None = None, + y_title: str | None = None, + color_legend_title: str | None = None, + size_legend_title: str | None = None, + shape_legend_title: str | None = None, + color_legend_position: str | None = None, + size_legend_position: str | None = None, + shape_legend_position: str | None = None, + height: int | None = None, + width: int | None = None, + x_lim: List[int | float] | None = None, + y_lim: List[int | float] | None = None, + interactive: bool | None = True, + ): + """Helper for creating the scatter plot.""" + interactive = True if interactive is None else interactive + encodings = dict( + x=alt.X( + x, # type: ignore + title=x_title or x, # type: ignore + scale=AltairPlot.create_scale(x_lim), # type: ignore + ), # ignore: type + y=alt.Y( + y, # type: ignore + title=y_title or y, # type: ignore + scale=AltairPlot.create_scale(y_lim), # type: ignore + ), + ) + properties = {} + if title: + properties["title"] = title + if height: + properties["height"] = height + if width: + properties["width"] = width + if color: + if is_numeric_dtype(value[color]): + domain = [value[color].min(), value[color].max()] + range_ = [0, 1] + type_ = "quantitative" + else: + domain = value[color].unique().tolist() + range_ = list(range(len(domain))) + type_ = "nominal" + + encodings["color"] = { + "field": color, + "type": type_, + "legend": AltairPlot.create_legend( + position=color_legend_position, title=color_legend_title or color + ), + "scale": {"domain": domain, "range": range_}, + } + if tooltip: + encodings["tooltip"] = tooltip + if size: + encodings["size"] = { + "field": size, + "type": "quantitative" if is_numeric_dtype(value[size]) else "nominal", + "legend": AltairPlot.create_legend( + position=size_legend_position, title=size_legend_title or size + ), + } + if shape: + encodings["shape"] = { + "field": shape, + "type": "quantitative" if is_numeric_dtype(value[shape]) else "nominal", + "legend": AltairPlot.create_legend( + position=shape_legend_position, title=shape_legend_title or shape + ), + } + chart = ( + alt.Chart(value) # type: ignore + .mark_point(clip=True) # type: ignore + .encode(**encodings) + .properties(background="transparent", **properties) + ) + if interactive: + chart = chart.interactive() + + return chart + + def postprocess(self, y: pd.DataFrame | Dict | None) -> Dict[str, str] | None: + # if None or update + if y is None or isinstance(y, Dict): + return y + if self.x is None or self.y is None: + raise ValueError("No value provided for required parameters `x` and `y`.") + chart = self.create_plot( + value=y, + x=self.x, + y=self.y, + color=self.color, + size=self.size, + shape=self.shape, + title=self.title, + tooltip=self.tooltip, + x_title=self.x_title, + y_title=self.y_title, + color_legend_title=self.color_legend_title, + size_legend_title=self.size_legend_title, + shape_legend_title=self.size_legend_title, + color_legend_position=self.color_legend_position, + size_legend_position=self.size_legend_position, + shape_legend_position=self.shape_legend_position, + interactive=self.interactive_chart, + height=self.height, + width=self.width, + x_lim=self.x_lim, + y_lim=self.y_lim, + ) + + return {"type": "altair", "plot": chart.to_json(), "chart": "scatter"} + + +@document("change", "clear") +class LinePlot(Plot): + """ + Create a line plot. + + Preprocessing: this component does *not* accept input. + Postprocessing: expects a pandas dataframe with the data to plot. + + Demos: native_plots, live_dashboard + """ + + def __init__( + self, + value: pd.DataFrame | Callable | None = None, + x: str | None = None, + y: str | None = None, + *, + color: str | None = None, + stroke_dash: str | None = None, + overlay_point: bool | None = None, + title: str | None = None, + tooltip: List[str] | str | None = None, + x_title: str | None = None, + y_title: str | None = None, + color_legend_title: str | None = None, + stroke_dash_legend_title: str | None = None, + color_legend_position: str | None = None, + stroke_dash_legend_position: str | None = None, + height: int | None = None, + width: int | None = None, + x_lim: List[int] | None = None, + y_lim: List[int] | None = None, + caption: str | None = None, + interactive: bool | None = True, + label: str | None = None, + show_label: bool = True, + every: float | None = None, + visible: bool = True, + elem_id: str | None = None, + ): + """ + Parameters: + value: The pandas dataframe containing the data to display in a scatter plot. + x: Column corresponding to the x axis. + y: Column corresponding to the y axis. + color: The column to determine the point color. If the column contains numeric data, gradio will interpolate the column data so that small values correspond to light colors and large values correspond to dark values. + stroke_dash: The column to determine the symbol used to draw the line, e.g. dashed lines, dashed lines with points. + overlay_point: Whether to draw a point on the line for each (x, y) coordinate pair. + title: The title to display on top of the chart. + tooltip: The column (or list of columns) to display on the tooltip when a user hovers a point on the plot. + x_title: The title given to the x axis. By default, uses the value of the x parameter. + y_title: The title given to the y axis. By default, uses the value of the y parameter. + color_legend_title: The title given to the color legend. By default, uses the value of color parameter. + stroke_dash_legend_title: The title given to the stroke_dash legend. By default, uses the value of the stroke_dash parameter. + color_legend_position: The position of the color legend. If the string value 'none' is passed, this legend is omitted. For other valid position values see: https://vega.github.io/vega/docs/legends/#orientation. + stroke_dash_legend_position: The position of the stoke_dash legend. If the string value 'none' is passed, this legend is omitted. For other valid position values see: https://vega.github.io/vega/docs/legends/#orientation. + height: The height of the plot in pixels. + width: The width of the plot in pixels. + x_lim: A tuple or list containing the limits for the x-axis, specified as [x_min, x_max]. + y_lim: A tuple of list containing the limits for the y-axis, specified as [y_min, y_max]. + caption: The (optional) caption to display below the plot. + interactive: Whether users should be able to interact with the plot by panning or zooming with their mouse or trackpad. + label: The (optional) label to display on the top left corner of the plot. + every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute. + show_label: Whether the label should be displayed. + visible: Whether the plot should be visible. + elem_id: Unique id used for custom css targetting. + """ + self.x = x + self.y = y + self.color = color + self.stroke_dash = stroke_dash + self.tooltip = tooltip + self.title = title + self.x_title = x_title + self.y_title = y_title + self.color_legend_title = color_legend_title + self.stroke_dash_legend_title = stroke_dash_legend_title + self.color_legend_position = color_legend_position + self.stroke_dash_legend_position = stroke_dash_legend_position + self.overlay_point = overlay_point + self.x_lim = x_lim + self.y_lim = y_lim + self.caption = caption + self.interactive_chart = interactive + self.width = width + self.height = height + super().__init__( + value=value, + label=label, + show_label=show_label, + visible=visible, + elem_id=elem_id, + every=every, + ) + + def get_config(self): + config = super().get_config() + config["caption"] = self.caption + return config + + def get_block_name(self) -> str: + return "plot" + + @staticmethod + def update( + value: pd.DataFrame | Dict | Literal[_Keywords.NO_VALUE] = _Keywords.NO_VALUE, + x: str | None = None, + y: str | None = None, + color: str | None = None, + stroke_dash: str | None = None, + overlay_point: bool | None = None, + title: str | None = None, + tooltip: List[str] | str | None = None, + x_title: str | None = None, + y_title: str | None = None, + color_legend_title: str | None = None, + stroke_dash_legend_title: str | None = None, + color_legend_position: str | None = None, + stroke_dash_legend_position: str | None = None, + height: int | None = None, + width: int | None = None, + x_lim: List[int] | None = None, + y_lim: List[int] | None = None, + interactive: bool | None = None, + caption: str | None = None, + label: str | None = None, + show_label: bool | None = None, + visible: bool | None = None, + ): + """Update an existing plot component. + + If updating any of the plot properties (color, size, etc) the value, x, and y parameters must be specified. + + Parameters: + value: The pandas dataframe containing the data to display in a scatter plot. + x: Column corresponding to the x axis. + y: Column corresponding to the y axis. + color: The column to determine the point color. If the column contains numeric data, gradio will interpolate the column data so that small values correspond to light colors and large values correspond to dark values. + stroke_dash: The column to determine the symbol used to draw the line, e.g. dashed lines, dashed lines with points. + overlay_point: Whether to draw a point on the line for each (x, y) coordinate pair. + title: The title to display on top of the chart. + tooltip: The column (or list of columns) to display on the tooltip when a user hovers a point on the plot. + x_title: The title given to the x axis. By default, uses the value of the x parameter. + y_title: The title given to the y axis. By default, uses the value of the y parameter. + color_legend_title: The title given to the color legend. By default, uses the value of color parameter. + stroke_dash_legend_title: The title given to the stroke legend. By default, uses the value of stroke parameter. + color_legend_position: The position of the color legend. If the string value 'none' is passed, this legend is omitted. For other valid position values see: https://vega.github.io/vega/docs/legends/#orientation + stroke_dash_legend_position: The position of the stoke_dash legend. If the string value 'none' is passed, this legend is omitted. For other valid position values see: https://vega.github.io/vega/docs/legends/#orientation + height: The height of the plot in pixels. + width: The width of the plot in pixels. + x_lim: A tuple or list containing the limits for the x-axis, specified as [x_min, x_max]. + y_lim: A tuple of list containing the limits for the y-axis, specified as [y_min, y_max]. + caption: The (optional) caption to display below the plot. + interactive: Whether users should be able to interact with the plot by panning or zooming with their mouse or trackpad. + label: The (optional) label to display in the top left corner of the plot. + show_label: Whether the label should be displayed. + visible: Whether the plot should be visible. + """ + properties = [ + x, + y, + color, + stroke_dash, + overlay_point, + title, + tooltip, + x_title, + y_title, + color_legend_title, + stroke_dash_legend_title, + color_legend_position, + stroke_dash_legend_position, + height, + width, + x_lim, + y_lim, + interactive, + ] + if any(properties): + if not isinstance(value, pd.DataFrame): + raise ValueError( + "In order to update plot properties the value parameter " + "must be provided, and it must be a Dataframe. Please pass a value " + "parameter to gr.LinePlot.update." + ) + if x is None or y is None: + raise ValueError( + "In order to update plot properties, the x and y axis data " + "must be specified. Please pass valid values for x an y to " + "gr.LinePlot.update." + ) + chart = LinePlot.create_plot(value, *properties) + value = {"type": "altair", "plot": chart.to_json(), "chart": "line"} + + updated_config = { + "label": label, + "show_label": show_label, + "visible": visible, + "value": value, + "caption": caption, + "__type__": "update", + } + return updated_config + + @staticmethod + def create_plot( + value: pd.DataFrame, + x: str, + y: str, + color: str | None = None, + stroke_dash: str | None = None, + overlay_point: bool | None = None, + title: str | None = None, + tooltip: List[str] | str | None = None, + x_title: str | None = None, + y_title: str | None = None, + color_legend_title: str | None = None, + stroke_dash_legend_title: str | None = None, + color_legend_position: str | None = None, + stroke_dash_legend_position: str | None = None, + height: int | None = None, + width: int | None = None, + x_lim: List[int] | None = None, + y_lim: List[int] | None = None, + interactive: bool | None = None, + ): + """Helper for creating the scatter plot.""" + interactive = True if interactive is None else interactive + encodings = dict( + x=alt.X( + x, # type: ignore + title=x_title or x, # type: ignore + scale=AltairPlot.create_scale(x_lim), # type: ignore + ), + y=alt.Y( + y, # type: ignore + title=y_title or y, # type: ignore + scale=AltairPlot.create_scale(y_lim), # type: ignore + ), + ) + properties = {} + if title: + properties["title"] = title + if height: + properties["height"] = height + if width: + properties["width"] = width + + if color: + domain = value[color].unique().tolist() + range_ = list(range(len(domain))) + encodings["color"] = { + "field": color, + "type": "nominal", + "scale": {"domain": domain, "range": range_}, + "legend": AltairPlot.create_legend( + position=color_legend_position, title=color_legend_title or color + ), + } + + highlight = None + if interactive and any([color, stroke_dash]): + highlight = alt.selection( + type="single", # type: ignore + on="mouseover", + fields=[c for c in [color, stroke_dash] if c], + nearest=True, + ) + + if stroke_dash: + stroke_dash = { + "field": stroke_dash, # type: ignore + "legend": AltairPlot.create_legend( # type: ignore + position=stroke_dash_legend_position, # type: ignore + title=stroke_dash_legend_title or stroke_dash, # type: ignore + ), # type: ignore + } # type: ignore + else: + stroke_dash = alt.value(alt.Undefined) # type: ignore + + if tooltip: + encodings["tooltip"] = tooltip + + chart = alt.Chart(value).encode(**encodings) # type: ignore + + points = chart.mark_point(clip=True).encode( + opacity=alt.value(alt.Undefined) if overlay_point else alt.value(0), + ) + lines = chart.mark_line(clip=True).encode(strokeDash=stroke_dash) + + if highlight: + points = points.add_selection(highlight) + + lines = lines.encode( + size=alt.condition(highlight, alt.value(4), alt.value(1)), + ) + + chart = (lines + points).properties(background="transparent", **properties) + if interactive: + chart = chart.interactive() + + return chart + + def postprocess(self, y: pd.DataFrame | Dict | None) -> Dict[str, str] | None: + # if None or update + if y is None or isinstance(y, Dict): + return y + if self.x is None or self.y is None: + raise ValueError("No value provided for required parameters `x` and `y`.") + chart = self.create_plot( + value=y, + x=self.x, + y=self.y, + color=self.color, + overlay_point=self.overlay_point, + title=self.title, + tooltip=self.tooltip, + x_title=self.x_title, + y_title=self.y_title, + color_legend_title=self.color_legend_title, + color_legend_position=self.color_legend_position, + stroke_dash_legend_title=self.stroke_dash_legend_title, + stroke_dash_legend_position=self.stroke_dash_legend_position, + x_lim=self.x_lim, + y_lim=self.y_lim, + stroke_dash=self.stroke_dash, + interactive=self.interactive_chart, + height=self.height, + width=self.width, + ) + + return {"type": "altair", "plot": chart.to_json(), "chart": "line"} + + +@document("change") +class Markdown(IOComponent, Changeable, SimpleSerializable): + """ + Used to render arbitrary Markdown output. Can also render latex enclosed by dollar signs. + Preprocessing: this component does *not* accept input. + Postprocessing: expects a valid {str} that can be rendered as Markdown. + + Demos: blocks_hello, blocks_kinematics + Guides: key_features + """ + + def __init__( + self, + value: str | Callable = "", + *, + visible: bool = True, + elem_id: str | None = None, + **kwargs, + ): + """ + Parameters: + value: Value to show in Markdown component. If callable, the function will be called whenever the app loads to set the initial value of the component. + visible: If False, component will be hidden. + elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles. + """ + self.md = ( + MarkdownIt() + .use(dollarmath_plugin, renderer=utils.tex2svg, allow_digits=False) + .enable("table") + ) + IOComponent.__init__( + self, visible=visible, elem_id=elem_id, value=value, **kwargs + ) + + def postprocess(self, y: str | None) -> str | None: + """ + Parameters: + y: markdown representation + Returns: + HTML rendering of markdown + """ + if y is None: + return None + unindented_y = inspect.cleandoc(y) + return self.md.render(unindented_y) + + def get_config(self): + return { + "value": self.value, + **Component.get_config(self), + } + + @staticmethod + def update( + value: Any | Literal[_Keywords.NO_VALUE] | None = _Keywords.NO_VALUE, + visible: bool | None = None, + ): + updated_config = { + "visible": visible, + "value": value, + "__type__": "update", + } + return updated_config + + def style(self): + return self + + def as_example(self, input_data: str | None) -> str: + postprocessed = self.postprocess(input_data) + return postprocessed if postprocessed else "" + + +############################ +# Special Components +############################ + + +@document("click", "style") +class Dataset(Clickable, Component): + """ + Used to create an output widget for showing datasets. Used to render the examples + box. + Preprocessing: passes the selected sample either as a {list} of data (if type="value") or as an {int} index (if type="index") + Postprocessing: expects a {list} of {lists} corresponding to the dataset data. + """ + + def __init__( + self, + *, + label: str | None = None, + components: List[IOComponent] | List[str], + samples: List[List[Any]] | None = None, + headers: List[str] | None = None, + type: str = "values", + samples_per_page: int = 10, + visible: bool = True, + elem_id: str | None = None, + **kwargs, + ): + """ + Parameters: + components: Which component types to show in this dataset widget, can be passed in as a list of string names or Components instances. The following components are supported in a Dataset: Audio, Checkbox, CheckboxGroup, ColorPicker, Dataframe, Dropdown, File, HTML, Image, Markdown, Model3D, Number, Radio, Slider, Textbox, TimeSeries, Video + samples: a nested list of samples. Each sublist within the outer list represents a data sample, and each element within the sublist represents an value for each component + headers: Column headers in the Dataset widget, should be the same len as components. If not provided, inferred from component labels + type: 'values' if clicking on a sample should pass the value of the sample, or "index" if it should pass the index of the sample + samples_per_page: how many examples to show per page. + visible: If False, component will be hidden. + elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles. + """ + Component.__init__(self, visible=visible, elem_id=elem_id, **kwargs) + self.components = [get_component_instance(c, render=False) for c in components] + + # Narrow type to IOComponent + assert all( + [isinstance(c, IOComponent) for c in self.components] + ), "All components in a `Dataset` must be subclasses of `IOComponent`" + self.components = [c for c in self.components if isinstance(c, IOComponent)] + + self.samples = [[]] if samples is None else samples + for example in self.samples: + for i, (component, ex) in enumerate(zip(self.components, example)): + example[i] = component.as_example(ex) + self.type = type + self.label = label + if headers is not None: + self.headers = headers + elif all([c.label is None for c in self.components]): + self.headers = [] + else: + self.headers = [c.label or "" for c in self.components] + self.samples_per_page = samples_per_page + + def get_config(self): + return { + "components": [component.get_block_name() for component in self.components], + "headers": self.headers, + "samples": self.samples, + "type": self.type, + "label": self.label, + "samples_per_page": self.samples_per_page, + **Component.get_config(self), + } + + @staticmethod + def update( + samples: Any | Literal[_Keywords.NO_VALUE] | None = _Keywords.NO_VALUE, + visible: bool | None = None, + label: str | None = None, + ): + return { + "samples": samples, + "visible": visible, + "label": label, + "__type__": "update", + } + + def preprocess(self, x: Any) -> Any: + """ + Any preprocessing needed to be performed on function input. + """ + if self.type == "index": + return x + elif self.type == "values": + return self.samples[x] + + def postprocess(self, samples: List[List[Any]]) -> Dict: + return { + "samples": samples, + "__type__": "update", + } + + def style(self, **kwargs): + """ + This method can be used to change the appearance of the Dataset component. + """ + return Component.style(self, **kwargs) + + +@document() +class Interpretation(Component): + """ + Used to create an interpretation widget for a component. + Preprocessing: this component does *not* accept input. + Postprocessing: expects a {dict} with keys "original" and "interpretation". + + Guides: custom_interpretations_with_blocks + """ + + def __init__( + self, + component: Component, + *, + visible: bool = True, + elem_id: str | None = None, + **kwargs, + ): + """ + Parameters: + component: Which component to show in the interpretation widget. + visible: Whether or not the interpretation is visible. + elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles. + """ + Component.__init__(self, visible=visible, elem_id=elem_id, **kwargs) + self.component = component + + def get_config(self): + return { + "component": self.component.get_block_name(), + "component_props": self.component.get_config(), + } + + @staticmethod + def update( + value: Any | Literal[_Keywords.NO_VALUE] | None = _Keywords.NO_VALUE, + visible: bool | None = None, + ): + return { + "visible": visible, + "value": value, + "__type__": "update", + } + + def style(self): + return self + + +class StatusTracker(Component): + def __init__( + self, + **kwargs, + ): + warnings.warn("The StatusTracker component is deprecated.") + + +def component(cls_name: str) -> Component: + obj = utils.component_or_layout_class(cls_name)() + if isinstance(obj, BlockContext): + raise ValueError(f"Invalid component: {obj.__class__}") + return obj + + +def get_component_instance(comp: str | dict | Component, render=True) -> Component: + if isinstance(comp, str): + component_obj = component(comp) + if not (render): + component_obj.unrender() + return component_obj + elif isinstance(comp, dict): + name = comp.pop("name") + component_cls = utils.component_or_layout_class(name) + component_obj = component_cls(**comp) + if isinstance(component_obj, BlockContext): + raise ValueError(f"Invalid component: {name}") + if not (render): + component_obj.unrender() + return component_obj + elif isinstance(comp, Component): + return comp + else: + raise ValueError( + f"Component must provided as a `str` or `dict` or `Component` but is {comp}" + ) + + +Text = Textbox +DataFrame = Dataframe +Highlightedtext = HighlightedText +Highlight = HighlightedText +Checkboxgroup = CheckboxGroup +TimeSeries = Timeseries +Json = JSON diff --git a/gradio-modified/gradio/context.py b/gradio-modified/gradio/context.py new file mode 100644 index 0000000000000000000000000000000000000000..8eeb73d95a980bc4d827c27dd37d2113e561d78f --- /dev/null +++ b/gradio-modified/gradio/context.py @@ -0,0 +1,14 @@ +# Defines the Context class, which is used to store the state of all Blocks that are being rendered. + +from __future__ import annotations + +from typing import TYPE_CHECKING + +if TYPE_CHECKING: # Only import for type checking (is False at runtime). + from gradio.blocks import BlockContext, Blocks + + +class Context: + root_block: Blocks | None = None # The current root block that holds all blocks. + block: BlockContext | None = None # The current block that children are added to. + id: int = 0 # Running id to uniquely refer to any block that gets defined diff --git a/gradio-modified/gradio/data_classes.py b/gradio-modified/gradio/data_classes.py new file mode 100644 index 0000000000000000000000000000000000000000..1a80869af6ac9d0977710e736b0f93bf40a4359d --- /dev/null +++ b/gradio-modified/gradio/data_classes.py @@ -0,0 +1,55 @@ +"""Pydantic data models and other dataclasses. This is the only file that uses Optional[] +typing syntax instead of | None syntax to work with pydantic""" + +from enum import Enum, auto +from typing import Any, Dict, List, Optional, Union + +from pydantic import BaseModel + + +class PredictBody(BaseModel): + session_hash: Optional[str] + event_id: Optional[str] + data: List[Any] + fn_index: Optional[int] + batched: Optional[ + bool + ] = False # Whether the data is a batch of samples (i.e. called from the queue if batch=True) or a single sample (i.e. called from the UI) + request: Optional[ + Union[Dict, List[Dict]] + ] = None # dictionary of request headers, query parameters, url, etc. (used to to pass in request for queuing) + + +class ResetBody(BaseModel): + session_hash: str + fn_index: int + + +class InterfaceTypes(Enum): + STANDARD = auto() + INPUT_ONLY = auto() + OUTPUT_ONLY = auto() + UNIFIED = auto() + + +class Estimation(BaseModel): + msg: Optional[str] = "estimation" + rank: Optional[int] = None + queue_size: int + avg_event_process_time: Optional[float] + avg_event_concurrent_process_time: Optional[float] + rank_eta: Optional[float] = None + queue_eta: float + + +class ProgressUnit(BaseModel): + index: Optional[int] + length: Optional[int] + unit: Optional[str] + progress: Optional[float] + desc: Optional[str] + + +class Progress(BaseModel): + msg: str = "progress" + progress_data: List[ProgressUnit] = [] diff --git a/gradio-modified/gradio/deprecation.py b/gradio-modified/gradio/deprecation.py new file mode 100644 index 0000000000000000000000000000000000000000..46ea2c5c52cab7f041120a01e79cdcb4266f4d87 --- /dev/null +++ b/gradio-modified/gradio/deprecation.py @@ -0,0 +1,45 @@ +import warnings + + +def simple_deprecated_notice(term: str) -> str: + return f"`{term}` parameter is deprecated, and it has no effect" + + +def use_in_launch(term: str) -> str: + return f"`{term}` is deprecated in `Interface()`, please use it within `launch()` instead." + + +DEPRECATION_MESSAGE = { + "optional": simple_deprecated_notice("optional"), + "keep_filename": simple_deprecated_notice("keep_filename"), + "numeric": simple_deprecated_notice("numeric"), + "verbose": simple_deprecated_notice("verbose"), + "allow_screenshot": simple_deprecated_notice("allow_screenshot"), + "layout": simple_deprecated_notice("layout"), + "show_input": simple_deprecated_notice("show_input"), + "show_output": simple_deprecated_notice("show_output"), + "capture_session": simple_deprecated_notice("capture_session"), + "api_mode": simple_deprecated_notice("api_mode"), + "show_tips": use_in_launch("show_tips"), + "encrypt": use_in_launch("encrypt"), + "enable_queue": use_in_launch("enable_queue"), + "server_name": use_in_launch("server_name"), + "server_port": use_in_launch("server_port"), + "width": use_in_launch("width"), + "height": use_in_launch("height"), + "plot": "The 'plot' parameter has been deprecated. Use the new Plot component instead", + "type": "The 'type' parameter has been deprecated. Use the Number component instead.", +} + + +def check_deprecated_parameters(cls: str, **kwargs) -> None: + for key, value in DEPRECATION_MESSAGE.items(): + if key in kwargs: + kwargs.pop(key) + # Interestingly, using DeprecationWarning causes warning to not appear. + warnings.warn(value) + + if len(kwargs) != 0: + warnings.warn( + f"You have unused kwarg parameters in {cls}, please remove them: {kwargs}" + ) diff --git a/gradio-modified/gradio/documentation.py b/gradio-modified/gradio/documentation.py new file mode 100644 index 0000000000000000000000000000000000000000..ac98d61725859373ee26eeded34fff3ca67750ce --- /dev/null +++ b/gradio-modified/gradio/documentation.py @@ -0,0 +1,193 @@ +"""Contains methods that generate documentation for Gradio functions and classes.""" + +from __future__ import annotations + +import inspect +from typing import Callable, Dict, List, Tuple + +classes_to_document = {} +documentation_group = None + + +def set_documentation_group(m): + global documentation_group + documentation_group = m + if m not in classes_to_document: + classes_to_document[m] = [] + + +def document(*fns): + """ + Defines the @document decorator which adds classes or functions to the Gradio + documentation at www.gradio.app/docs. + + Usage examples: + - Put @document() above a class to document the class and its constructor. + - Put @document(fn1, fn2) above a class to also document the class methods fn1 and fn2. + """ + + def inner_doc(cls): + global documentation_group + classes_to_document[documentation_group].append((cls, fns)) + return cls + + return inner_doc + + +def document_fn(fn: Callable) -> Tuple[str, List[Dict], Dict, str | None]: + """ + Generates documentation for any function. + Parameters: + fn: Function to document + Returns: + description: General description of fn + parameters: A list of dicts for each parameter, storing data for the parameter name, annotation and doc + return: A dict storing data for the returned annotation and doc + example: Code for an example use of the fn + """ + doc_str = inspect.getdoc(fn) or "" + doc_lines = doc_str.split("\n") + signature = inspect.signature(fn) + description, parameters, returns, examples = [], {}, [], [] + mode = "description" + for line in doc_lines: + line = line.rstrip() + if line == "Parameters:": + mode = "parameter" + elif line == "Example:": + mode = "example" + elif line == "Returns:": + mode = "return" + else: + if mode == "description": + description.append(line if line.strip() else "
") + continue + assert ( + line.startswith(" ") or line.strip() == "" + ), f"Documentation format for {fn.__name__} has format error in line: {line}" + line = line[4:] + if mode == "parameter": + colon_index = line.index(": ") + assert ( + colon_index > -1 + ), f"Documentation format for {fn.__name__} has format error in line: {line}" + parameter = line[:colon_index] + parameter_doc = line[colon_index + 2 :] + parameters[parameter] = parameter_doc + elif mode == "return": + returns.append(line) + elif mode == "example": + examples.append(line) + description_doc = " ".join(description) + parameter_docs = [] + for param_name, param in signature.parameters.items(): + if param_name.startswith("_"): + continue + if param_name == "kwargs" and param_name not in parameters: + continue + parameter_doc = { + "name": param_name, + "annotation": param.annotation, + "doc": parameters.get(param_name), + } + if param_name in parameters: + del parameters[param_name] + if param.default != inspect.Parameter.empty: + default = param.default + if type(default) == str: + default = '"' + default + '"' + if default.__class__.__module__ != "builtins": + default = f"{default.__class__.__name__}()" + parameter_doc["default"] = default + elif parameter_doc["doc"] is not None and "kwargs" in parameter_doc["doc"]: + parameter_doc["kwargs"] = True + parameter_docs.append(parameter_doc) + assert ( + len(parameters) == 0 + ), f"Documentation format for {fn.__name__} documents nonexistent parameters: {''.join(parameters.keys())}" + if len(returns) == 0: + return_docs = {} + elif len(returns) == 1: + return_docs = {"annotation": signature.return_annotation, "doc": returns[0]} + else: + return_docs = {} + # raise ValueError("Does not support multiple returns yet.") + examples_doc = "\n".join(examples) if len(examples) > 0 else None + return description_doc, parameter_docs, return_docs, examples_doc + + +def document_cls(cls): + doc_str = inspect.getdoc(cls) + if doc_str is None: + return "", {}, "" + tags = {} + description_lines = [] + mode = "description" + for line in doc_str.split("\n"): + line = line.rstrip() + if line.endswith(":") and " " not in line: + mode = line[:-1].lower() + tags[mode] = [] + elif line.split(" ")[0].endswith(":") and not line.startswith(" "): + tag = line[: line.index(":")].lower() + value = line[line.index(":") + 2 :] + tags[tag] = value + else: + if mode == "description": + description_lines.append(line if line.strip() else "
") + else: + assert ( + line.startswith(" ") or not line.strip() + ), f"Documentation format for {cls.__name__} has format error in line: {line}" + tags[mode].append(line[4:]) + if "example" in tags: + example = "\n".join(tags["example"]) + del tags["example"] + else: + example = None + for key, val in tags.items(): + if isinstance(val, list): + tags[key] = "
".join(val) + description = " ".join(description_lines).replace("\n", "
") + return description, tags, example + + +def generate_documentation(): + documentation = {} + for mode, class_list in classes_to_document.items(): + documentation[mode] = [] + for cls, fns in class_list: + fn_to_document = cls if inspect.isfunction(cls) else cls.__init__ + _, parameter_doc, return_doc, _ = document_fn(fn_to_document) + cls_description, cls_tags, cls_example = document_cls(cls) + cls_documentation = { + "class": cls, + "name": cls.__name__, + "description": cls_description, + "tags": cls_tags, + "parameters": parameter_doc, + "returns": return_doc, + "example": cls_example, + "fns": [], + } + for fn_name in fns: + fn = getattr(cls, fn_name) + ( + description_doc, + parameter_docs, + return_docs, + examples_doc, + ) = document_fn(fn) + cls_documentation["fns"].append( + { + "fn": fn, + "name": fn_name, + "description": description_doc, + "tags": {}, + "parameters": parameter_docs, + "returns": return_docs, + "example": examples_doc, + } + ) + documentation[mode].append(cls_documentation) + return documentation diff --git a/gradio-modified/gradio/encryptor.py b/gradio-modified/gradio/encryptor.py new file mode 100644 index 0000000000000000000000000000000000000000..01951ea1d27f03a435164300b1f75db68342722d --- /dev/null +++ b/gradio-modified/gradio/encryptor.py @@ -0,0 +1,31 @@ +from Crypto import Random +from Crypto.Cipher import AES +from Crypto.Hash import SHA256 + + +def get_key(password: str) -> bytes: + """Generates an encryption key based on the password provided.""" + key = SHA256.new(password.encode()).digest() + return key + + +def encrypt(key: bytes, source: bytes) -> bytes: + """Encrypts source data using the provided encryption key""" + IV = Random.new().read(AES.block_size) # generate IV + encryptor = AES.new(key, AES.MODE_CBC, IV) + padding = AES.block_size - len(source) % AES.block_size # calculate needed padding + source += bytes([padding]) * padding # Python 2.x: source += chr(padding) * padding + data = IV + encryptor.encrypt(source) # store the IV at the beginning and encrypt + return data + + +def decrypt(key: bytes, source: bytes) -> bytes: + IV = source[: AES.block_size] # extract the IV from the beginning + decryptor = AES.new(key, AES.MODE_CBC, IV) + data = decryptor.decrypt(source[AES.block_size :]) # decrypt + padding = data[-1] # pick the padding value from the end; Python 2.x: ord(data[-1]) + if ( + data[-padding:] != bytes([padding]) * padding + ): # Python 2.x: chr(padding) * padding + raise ValueError("Invalid padding...") + return data[:-padding] # remove the padding diff --git a/gradio-modified/gradio/events.py b/gradio-modified/gradio/events.py new file mode 100644 index 0000000000000000000000000000000000000000..f0692c5d5f7e8f49d18fd25a7c5f60c9c033e418 --- /dev/null +++ b/gradio-modified/gradio/events.py @@ -0,0 +1,723 @@ +"""Contains all of the events that can be triggered in a gr.Blocks() app, with the exception +of the on-page-load event, which is defined in gr.Blocks().load().""" + +from __future__ import annotations + +import warnings +from typing import TYPE_CHECKING, Any, Callable, Dict, List, Set + +from gradio.blocks import Block +from gradio.utils import get_cancel_function + +if TYPE_CHECKING: # Only import for type checking (is False at runtime). + from gradio.components import Component, StatusTracker + + +def set_cancel_events( + block: Block, event_name: str, cancels: None | Dict[str, Any] | List[Dict[str, Any]] +): + if cancels: + if not isinstance(cancels, list): + cancels = [cancels] + cancel_fn, fn_indices_to_cancel = get_cancel_function(cancels) + block.set_event_trigger( + event_name, + cancel_fn, + inputs=None, + outputs=None, + queue=False, + preprocess=False, + cancels=fn_indices_to_cancel, + ) + + +class EventListener(Block): + pass + + +class Changeable(EventListener): + def change( + self, + fn: Callable | None, + inputs: Component | List[Component] | Set[Component] | None = None, + outputs: Component | List[Component] | None = None, + api_name: str | None = None, + status_tracker: StatusTracker | None = None, + scroll_to_output: bool = False, + show_progress: bool = True, + queue: bool | None = None, + batch: bool = False, + max_batch_size: int = 4, + preprocess: bool = True, + postprocess: bool = True, + cancels: Dict[str, Any] | List[Dict[str, Any]] | None = None, + every: float | None = None, + _js: str | None = None, + ): + """ + This event is triggered when the component's input value changes (e.g. when the user types in a textbox + or uploads an image). This method can be used when this component is in a Gradio Blocks. + + Parameters: + fn: the function to wrap an interface around. Often a machine learning model's prediction function. Each parameter of the function corresponds to one input component, and the function should return a single value or a tuple of values, with each element in the tuple corresponding to one output component. + inputs: List of gradio.components to use as inputs. If the function takes no inputs, this should be an empty list. + outputs: List of gradio.components to use as inputs. If the function returns no outputs, this should be an empty list. + api_name: Defining this parameter exposes the endpoint in the api docs + scroll_to_output: If True, will scroll to output component on completion + show_progress: If True, will show progress animation while pending + queue: If True, will place the request on the queue, if the queue exists + batch: If True, then the function should process a batch of inputs, meaning that it should accept a list of input values for each parameter. The lists should be of equal length (and be up to length `max_batch_size`). The function is then *required* to return a tuple of lists (even if there is only 1 output component), with each list in the tuple corresponding to one output component. + max_batch_size: Maximum number of inputs to batch together if this is called from the queue (only relevant if batch=True) + preprocess: If False, will not run preprocessing of component data before running 'fn' (e.g. leaving it as a base64 string if this method is called with the `Image` component). + postprocess: If False, will not run postprocessing of component data before returning 'fn' output to the browser. + cancels: A list of other events to cancel when this event is triggered. For example, setting cancels=[click_event] will cancel the click_event, where click_event is the return value of another components .click method. + every: Run this event 'every' number of seconds while the client connection is open. Interpreted in seconds. Queue must be enabled. + """ + # _js: Optional frontend js method to run before running 'fn'. Input arguments for js method are values of 'inputs' and 'outputs', return should be a list of values for output components. + if status_tracker: + warnings.warn( + "The 'status_tracker' parameter has been deprecated and has no effect." + ) + dep = self.set_event_trigger( + "change", + fn, + inputs, + outputs, + preprocess=preprocess, + postprocess=postprocess, + scroll_to_output=scroll_to_output, + show_progress=show_progress, + api_name=api_name, + js=_js, + queue=queue, + batch=batch, + max_batch_size=max_batch_size, + every=every, + ) + set_cancel_events(self, "change", cancels) + return dep + + +class Clickable(EventListener): + def click( + self, + fn: Callable | None, + inputs: Component | List[Component] | Set[Component] | None = None, + outputs: Component | List[Component] | None = None, + api_name: str | None = None, + status_tracker: StatusTracker | None = None, + scroll_to_output: bool = False, + show_progress: bool = True, + queue=None, + batch: bool = False, + max_batch_size: int = 4, + preprocess: bool = True, + postprocess: bool = True, + cancels: Dict[str, Any] | List[Dict[str, Any]] | None = None, + every: float | None = None, + _js: str | None = None, + ): + """ + This event is triggered when the component (e.g. a button) is clicked. + This method can be used when this component is in a Gradio Blocks. + + Parameters: + fn: the function to wrap an interface around. Often a machine learning model's prediction function. Each parameter of the function corresponds to one input component, and the function should return a single value or a tuple of values, with each element in the tuple corresponding to one output component. + inputs: List of gradio.components to use as inputs. If the function takes no inputs, this should be an empty list. + outputs: List of gradio.components to use as inputs. If the function returns no outputs, this should be an empty list. + api_name: Defining this parameter exposes the endpoint in the api docs + scroll_to_output: If True, will scroll to output component on completion + show_progress: If True, will show progress animation while pending + queue: If True, will place the request on the queue, if the queue exists + batch: If True, then the function should process a batch of inputs, meaning that it should accept a list of input values for each parameter. The lists should be of equal length (and be up to length `max_batch_size`). The function is then *required* to return a tuple of lists (even if there is only 1 output component), with each list in the tuple corresponding to one output component. + max_batch_size: Maximum number of inputs to batch together if this is called from the queue (only relevant if batch=True) + preprocess: If False, will not run preprocessing of component data before running 'fn' (e.g. leaving it as a base64 string if this method is called with the `Image` component). + postprocess: If False, will not run postprocessing of component data before returning 'fn' output to the browser. + cancels: A list of other events to cancel when this event is triggered. For example, setting cancels=[click_event] will cancel the click_event, where click_event is the return value of another components .click method. + every: Run this event 'every' number of seconds while the client connection is open. Interpreted in seconds. Queue must be enabled. + """ + # _js: Optional frontend js method to run before running 'fn'. Input arguments for js method are values of 'inputs' and 'outputs', return should be a list of values for output components. + if status_tracker: + warnings.warn( + "The 'status_tracker' parameter has been deprecated and has no effect." + ) + + dep = self.set_event_trigger( + "click", + fn, + inputs, + outputs, + preprocess=preprocess, + postprocess=postprocess, + scroll_to_output=scroll_to_output, + show_progress=show_progress, + api_name=api_name, + js=_js, + queue=queue, + batch=batch, + max_batch_size=max_batch_size, + every=every, + ) + set_cancel_events(self, "click", cancels) + return dep + + +class Submittable(EventListener): + def submit( + self, + fn: Callable | None, + inputs: Component | List[Component] | Set[Component] | None = None, + outputs: Component | List[Component] | None = None, + api_name: str | None = None, + status_tracker: StatusTracker | None = None, + scroll_to_output: bool = False, + show_progress: bool = True, + queue: bool | None = None, + batch: bool = False, + max_batch_size: int = 4, + preprocess: bool = True, + postprocess: bool = True, + cancels: Dict[str, Any] | List[Dict[str, Any]] | None = None, + every: float | None = None, + _js: str | None = None, + ): + """ + This event is triggered when the user presses the Enter key while the component (e.g. a textbox) is focused. + This method can be used when this component is in a Gradio Blocks. + + + Parameters: + fn: the function to wrap an interface around. Often a machine learning model's prediction function. Each parameter of the function corresponds to one input component, and the function should return a single value or a tuple of values, with each element in the tuple corresponding to one output component. + inputs: List of gradio.components to use as inputs. If the function takes no inputs, this should be an empty list. + outputs: List of gradio.components to use as inputs. If the function returns no outputs, this should be an empty list. + api_name: Defining this parameter exposes the endpoint in the api docs + scroll_to_output: If True, will scroll to output component on completion + show_progress: If True, will show progress animation while pending + queue: If True, will place the request on the queue, if the queue exists + batch: If True, then the function should process a batch of inputs, meaning that it should accept a list of input values for each parameter. The lists should be of equal length (and be up to length `max_batch_size`). The function is then *required* to return a tuple of lists (even if there is only 1 output component), with each list in the tuple corresponding to one output component. + max_batch_size: Maximum number of inputs to batch together if this is called from the queue (only relevant if batch=True) + preprocess: If False, will not run preprocessing of component data before running 'fn' (e.g. leaving it as a base64 string if this method is called with the `Image` component). + postprocess: If False, will not run postprocessing of component data before returning 'fn' output to the browser. + cancels: A list of other events to cancel when this event is triggered. For example, setting cancels=[click_event] will cancel the click_event, where click_event is the return value of another components .click method. + every: Run this event 'every' number of seconds while the client connection is open. Interpreted in seconds. Queue must be enabled. + """ + # _js: Optional frontend js method to run before running 'fn'. Input arguments for js method are values of 'inputs' and 'outputs', return should be a list of values for output components. + if status_tracker: + warnings.warn( + "The 'status_tracker' parameter has been deprecated and has no effect." + ) + + dep = self.set_event_trigger( + "submit", + fn, + inputs, + outputs, + preprocess=preprocess, + postprocess=postprocess, + scroll_to_output=scroll_to_output, + show_progress=show_progress, + api_name=api_name, + js=_js, + queue=queue, + batch=batch, + max_batch_size=max_batch_size, + every=every, + ) + set_cancel_events(self, "submit", cancels) + return dep + + +class Editable(EventListener): + def edit( + self, + fn: Callable | None, + inputs: Component | List[Component] | Set[Component] | None = None, + outputs: Component | List[Component] | None = None, + api_name: str | None = None, + status_tracker: StatusTracker | None = None, + scroll_to_output: bool = False, + show_progress: bool = True, + queue: bool | None = None, + batch: bool = False, + max_batch_size: int = 4, + preprocess: bool = True, + postprocess: bool = True, + cancels: Dict[str, Any] | List[Dict[str, Any]] | None = None, + every: float | None = None, + _js: str | None = None, + ): + """ + This event is triggered when the user edits the component (e.g. image) using the + built-in editor. This method can be used when this component is in a Gradio Blocks. + + Parameters: + fn: the function to wrap an interface around. Often a machine learning model's prediction function. Each parameter of the function corresponds to one input component, and the function should return a single value or a tuple of values, with each element in the tuple corresponding to one output component. + inputs: List of gradio.components to use as inputs. If the function takes no inputs, this should be an empty list. + outputs: List of gradio.components to use as inputs. If the function returns no outputs, this should be an empty list. + api_name: Defining this parameter exposes the endpoint in the api docs + scroll_to_output: If True, will scroll to output component on completion + show_progress: If True, will show progress animation while pending + queue: If True, will place the request on the queue, if the queue exists + batch: If True, then the function should process a batch of inputs, meaning that it should accept a list of input values for each parameter. The lists should be of equal length (and be up to length `max_batch_size`). The function is then *required* to return a tuple of lists (even if there is only 1 output component), with each list in the tuple corresponding to one output component. + max_batch_size: Maximum number of inputs to batch together if this is called from the queue (only relevant if batch=True) + preprocess: If False, will not run preprocessing of component data before running 'fn' (e.g. leaving it as a base64 string if this method is called with the `Image` component). + postprocess: If False, will not run postprocessing of component data before returning 'fn' output to the browser. + cancels: A list of other events to cancel when this event is triggered. For example, setting cancels=[click_event] will cancel the click_event, where click_event is the return value of another components .click method. + every: Run this event 'every' number of seconds while the client connection is open. Interpreted in seconds. Queue must be enabled. + """ + # _js: Optional frontend js method to run before running 'fn'. Input arguments for js method are values of 'inputs' and 'outputs', return should be a list of values for output components. + if status_tracker: + warnings.warn( + "The 'status_tracker' parameter has been deprecated and has no effect." + ) + + dep = self.set_event_trigger( + "edit", + fn, + inputs, + outputs, + preprocess=preprocess, + postprocess=postprocess, + scroll_to_output=scroll_to_output, + show_progress=show_progress, + api_name=api_name, + js=_js, + queue=queue, + batch=batch, + max_batch_size=max_batch_size, + every=every, + ) + set_cancel_events(self, "edit", cancels) + return dep + + +class Clearable(EventListener): + def clear( + self, + fn: Callable | None, + inputs: Component | List[Component] | Set[Component] | None = None, + outputs: Component | List[Component] | None = None, + api_name: str | None = None, + status_tracker: StatusTracker | None = None, + scroll_to_output: bool = False, + show_progress: bool = True, + queue: bool | None = None, + batch: bool = False, + max_batch_size: int = 4, + preprocess: bool = True, + postprocess: bool = True, + cancels: Dict[str, Any] | List[Dict[str, Any]] | None = None, + every: float | None = None, + _js: str | None = None, + ): + """ + This event is triggered when the user clears the component (e.g. image or audio) + using the X button for the component. This method can be used when this component is in a Gradio Blocks. + + Parameters: + fn: the function to wrap an interface around. Often a machine learning model's prediction function. Each parameter of the function corresponds to one input component, and the function should return a single value or a tuple of values, with each element in the tuple corresponding to one output component. + inputs: List of gradio.components to use as inputs. If the function takes no inputs, this should be an empty list. + outputs: List of gradio.components to use as inputs. If the function returns no outputs, this should be an empty list. + api_name: Defining this parameter exposes the endpoint in the api docs + scroll_to_output: If True, will scroll to output component on completion + show_progress: If True, will show progress animation while pending + queue: If True, will place the request on the queue, if the queue exists + batch: If True, then the function should process a batch of inputs, meaning that it should accept a list of input values for each parameter. The lists should be of equal length (and be up to length `max_batch_size`). The function is then *required* to return a tuple of lists (even if there is only 1 output component), with each list in the tuple corresponding to one output component. + max_batch_size: Maximum number of inputs to batch together if this is called from the queue (only relevant if batch=True) + preprocess: If False, will not run preprocessing of component data before running 'fn' (e.g. leaving it as a base64 string if this method is called with the `Image` component). + postprocess: If False, will not run postprocessing of component data before returning 'fn' output to the browser. + cancels: A list of other events to cancel when this event is triggered. For example, setting cancels=[click_event] will cancel the click_event, where click_event is the return value of another components .click method. + every: Run this event 'every' number of seconds while the client connection is open. Interpreted in seconds. Queue must be enabled. + """ + # _js: Optional frontend js method to run before running 'fn'. Input arguments for js method are values of 'inputs' and 'outputs', return should be a list of values for output components. + if status_tracker: + warnings.warn( + "The 'status_tracker' parameter has been deprecated and has no effect." + ) + + dep = self.set_event_trigger( + "submit", + fn, + inputs, + outputs, + preprocess=preprocess, + postprocess=postprocess, + scroll_to_output=scroll_to_output, + show_progress=show_progress, + api_name=api_name, + js=_js, + queue=queue, + batch=batch, + max_batch_size=max_batch_size, + every=every, + ) + set_cancel_events(self, "submit", cancels) + return dep + + +class Playable(EventListener): + def play( + self, + fn: Callable | None, + inputs: Component | List[Component] | Set[Component] | None = None, + outputs: Component | List[Component] | None = None, + api_name: str | None = None, + status_tracker: StatusTracker | None = None, + scroll_to_output: bool = False, + show_progress: bool = True, + queue: bool | None = None, + batch: bool = False, + max_batch_size: int = 4, + preprocess: bool = True, + postprocess: bool = True, + cancels: Dict[str, Any] | List[Dict[str, Any]] | None = None, + every: float | None = None, + _js: str | None = None, + ): + """ + This event is triggered when the user plays the component (e.g. audio or video). + This method can be used when this component is in a Gradio Blocks. + + Parameters: + fn: the function to wrap an interface around. Often a machine learning model's prediction function. Each parameter of the function corresponds to one input component, and the function should return a single value or a tuple of values, with each element in the tuple corresponding to one output component. + inputs: List of gradio.components to use as inputs. If the function takes no inputs, this should be an empty list. + outputs: List of gradio.components to use as inputs. If the function returns no outputs, this should be an empty list. + api_name: Defining this parameter exposes the endpoint in the api docs + scroll_to_output: If True, will scroll to output component on completion + show_progress: If True, will show progress animation while pending + queue: If True, will place the request on the queue, if the queue exists + batch: If True, then the function should process a batch of inputs, meaning that it should accept a list of input values for each parameter. The lists should be of equal length (and be up to length `max_batch_size`). The function is then *required* to return a tuple of lists (even if there is only 1 output component), with each list in the tuple corresponding to one output component. + max_batch_size: Maximum number of inputs to batch together if this is called from the queue (only relevant if batch=True) + preprocess: If False, will not run preprocessing of component data before running 'fn' (e.g. leaving it as a base64 string if this method is called with the `Image` component). + postprocess: If False, will not run postprocessing of component data before returning 'fn' output to the browser. + cancels: A list of other events to cancel when this event is triggered. For example, setting cancels=[click_event] will cancel the click_event, where click_event is the return value of another components .click method. + every: Run this event 'every' number of seconds while the client connection is open. Interpreted in seconds. Queue must be enabled. + """ + # _js: Optional frontend js method to run before running 'fn'. Input arguments for js method are values of 'inputs' and 'outputs', return should be a list of values for output components. + if status_tracker: + warnings.warn( + "The 'status_tracker' parameter has been deprecated and has no effect." + ) + + dep = self.set_event_trigger( + "play", + fn, + inputs, + outputs, + preprocess=preprocess, + postprocess=postprocess, + scroll_to_output=scroll_to_output, + show_progress=show_progress, + api_name=api_name, + js=_js, + queue=queue, + batch=batch, + max_batch_size=max_batch_size, + every=every, + ) + set_cancel_events(self, "play", cancels) + return dep + + def pause( + self, + fn: Callable | None, + inputs: Component | List[Component] | Set[Component] | None = None, + outputs: Component | List[Component] | None = None, + api_name: str | None = None, + status_tracker: StatusTracker | None = None, + scroll_to_output: bool = False, + show_progress: bool = True, + queue: bool | None = None, + batch: bool = False, + max_batch_size: int = 4, + preprocess: bool = True, + postprocess: bool = True, + cancels: Dict[str, Any] | List[Dict[str, Any]] | None = None, + every: float | None = None, + _js: str | None = None, + ): + """ + This event is triggered when the user pauses the component (e.g. audio or video). + This method can be used when this component is in a Gradio Blocks. + + Parameters: + fn: the function to wrap an interface around. Often a machine learning model's prediction function. Each parameter of the function corresponds to one input component, and the function should return a single value or a tuple of values, with each element in the tuple corresponding to one output component. + inputs: List of gradio.components to use as inputs. If the function takes no inputs, this should be an empty list. + outputs: List of gradio.components to use as inputs. If the function returns no outputs, this should be an empty list. + api_name: Defining this parameter exposes the endpoint in the api docs + scroll_to_output: If True, will scroll to output component on completion + show_progress: If True, will show progress animation while pending + queue: If True, will place the request on the queue, if the queue exists + batch: If True, then the function should process a batch of inputs, meaning that it should accept a list of input values for each parameter. The lists should be of equal length (and be up to length `max_batch_size`). The function is then *required* to return a tuple of lists (even if there is only 1 output component), with each list in the tuple corresponding to one output component. + max_batch_size: Maximum number of inputs to batch together if this is called from the queue (only relevant if batch=True) + preprocess: If False, will not run preprocessing of component data before running 'fn' (e.g. leaving it as a base64 string if this method is called with the `Image` component). + postprocess: If False, will not run postprocessing of component data before returning 'fn' output to the browser. + cancels: A list of other events to cancel when this event is triggered. For example, setting cancels=[click_event] will cancel the click_event, where click_event is the return value of another components .click method. + every: Run this event 'every' number of seconds while the client connection is open. Interpreted in seconds. Queue must be enabled. + """ + # _js: Optional frontend js method to run before running 'fn'. Input arguments for js method are values of 'inputs' and 'outputs', return should be a list of values for output components. + if status_tracker: + warnings.warn( + "The 'status_tracker' parameter has been deprecated and has no effect." + ) + + dep = self.set_event_trigger( + "pause", + fn, + inputs, + outputs, + preprocess=preprocess, + postprocess=postprocess, + scroll_to_output=scroll_to_output, + show_progress=show_progress, + api_name=api_name, + js=_js, + queue=queue, + batch=batch, + max_batch_size=max_batch_size, + every=every, + ) + set_cancel_events(self, "pause", cancels) + return dep + + def stop( + self, + fn: Callable | None, + inputs: Component | List[Component] | Set[Component] | None = None, + outputs: Component | List[Component] | None = None, + api_name: str | None = None, + status_tracker: StatusTracker | None = None, + scroll_to_output: bool = False, + show_progress: bool = True, + queue: bool | None = None, + batch: bool = False, + max_batch_size: int = 4, + preprocess: bool = True, + postprocess: bool = True, + cancels: Dict[str, Any] | List[Dict[str, Any]] | None = None, + every: float | None = None, + _js: str | None = None, + ): + """ + This event is triggered when the user stops the component (e.g. audio or video). + This method can be used when this component is in a Gradio Blocks. + + Parameters: + fn: the function to wrap an interface around. Often a machine learning model's prediction function. Each parameter of the function corresponds to one input component, and the function should return a single value or a tuple of values, with each element in the tuple corresponding to one output component. + inputs: List of gradio.components to use as inputs. If the function takes no inputs, this should be an empty list. + outputs: List of gradio.components to use as inputs. If the function returns no outputs, this should be an empty list. + api_name: Defining this parameter exposes the endpoint in the api docs + scroll_to_output: If True, will scroll to output component on completion + show_progress: If True, will show progress animation while pending + queue: If True, will place the request on the queue, if the queue exists + batch: If True, then the function should process a batch of inputs, meaning that it should accept a list of input values for each parameter. The lists should be of equal length (and be up to length `max_batch_size`). The function is then *required* to return a tuple of lists (even if there is only 1 output component), with each list in the tuple corresponding to one output component. + max_batch_size: Maximum number of inputs to batch together if this is called from the queue (only relevant if batch=True) + preprocess: If False, will not run preprocessing of component data before running 'fn' (e.g. leaving it as a base64 string if this method is called with the `Image` component). + postprocess: If False, will not run postprocessing of component data before returning 'fn' output to the browser. + cancels: A list of other events to cancel when this event is triggered. For example, setting cancels=[click_event] will cancel the click_event, where click_event is the return value of another components .click method. + every: Run this event 'every' number of seconds while the client connection is open. Interpreted in seconds. Queue must be enabled. + """ + # _js: Optional frontend js method to run before running 'fn'. Input arguments for js method are values of 'inputs' and 'outputs', return should be a list of values for output components. + if status_tracker: + warnings.warn( + "The 'status_tracker' parameter has been deprecated and has no effect." + ) + + dep = self.set_event_trigger( + "stop", + fn, + inputs, + outputs, + preprocess=preprocess, + postprocess=postprocess, + scroll_to_output=scroll_to_output, + show_progress=show_progress, + api_name=api_name, + js=_js, + queue=queue, + batch=batch, + max_batch_size=max_batch_size, + every=every, + ) + set_cancel_events(self, "stop", cancels) + return dep + + +class Streamable(EventListener): + def stream( + self, + fn: Callable | None, + inputs: Component | List[Component] | Set[Component] | None = None, + outputs: Component | List[Component] | None = None, + api_name: str | None = None, + status_tracker: StatusTracker | None = None, + scroll_to_output: bool = False, + show_progress: bool = False, + queue: bool | None = None, + batch: bool = False, + max_batch_size: int = 4, + preprocess: bool = True, + postprocess: bool = True, + cancels: Dict[str, Any] | List[Dict[str, Any]] | None = None, + every: float | None = None, + _js: str | None = None, + ): + """ + This event is triggered when the user streams the component (e.g. a live webcam + component). This method can be used when this component is in a Gradio Blocks. + + Parameters: + fn: the function to wrap an interface around. Often a machine learning model's prediction function. Each parameter of the function corresponds to one input component, and the function should return a single value or a tuple of values, with each element in the tuple corresponding to one output component. + inputs: List of gradio.components to use as inputs. If the function takes no inputs, this should be an empty list. + outputs: List of gradio.components to use as inputs. If the function returns no outputs, this should be an empty list. + api_name: Defining this parameter exposes the endpoint in the api docs + scroll_to_output: If True, will scroll to output component on completion + show_progress: If True, will show progress animation while pending + queue: If True, will place the request on the queue, if the queue exists + batch: If True, then the function should process a batch of inputs, meaning that it should accept a list of input values for each parameter. The lists should be of equal length (and be up to length `max_batch_size`). The function is then *required* to return a tuple of lists (even if there is only 1 output component), with each list in the tuple corresponding to one output component. + max_batch_size: Maximum number of inputs to batch together if this is called from the queue (only relevant if batch=True) + preprocess: If False, will not run preprocessing of component data before running 'fn' (e.g. leaving it as a base64 string if this method is called with the `Image` component). + postprocess: If False, will not run postprocessing of component data before returning 'fn' output to the browser. + cancels: A list of other events to cancel when this event is triggered. For example, setting cancels=[click_event] will cancel the click_event, where click_event is the return value of another components .click method. + every: Run this event 'every' number of seconds while the client connection is open. Interpreted in seconds. Queue must be enabled. + """ + # _js: Optional frontend js method to run before running 'fn'. Input arguments for js method are values of 'inputs' and 'outputs', return should be a list of values for output components. + self.streaming = True + + if status_tracker: + warnings.warn( + "The 'status_tracker' parameter has been deprecated and has no effect." + ) + + dep = self.set_event_trigger( + "stream", + fn, + inputs, + outputs, + preprocess=preprocess, + postprocess=postprocess, + scroll_to_output=scroll_to_output, + show_progress=show_progress, + api_name=api_name, + js=_js, + queue=queue, + batch=batch, + max_batch_size=max_batch_size, + every=every, + ) + set_cancel_events(self, "stream", cancels) + return dep + + +class Blurrable(EventListener): + def blur( + self, + fn: Callable | None, + inputs: Component | List[Component] | Set[Component] | None = None, + outputs: Component | List[Component] | None = None, + api_name: str | None = None, + scroll_to_output: bool = False, + show_progress: bool = True, + queue: bool | None = None, + batch: bool = False, + max_batch_size: int = 4, + preprocess: bool = True, + postprocess: bool = True, + cancels: Dict[str, Any] | List[Dict[str, Any]] | None = None, + every: float | None = None, + _js: str | None = None, + ): + """ + This event is triggered when the component's is unfocused/blurred (e.g. when the user clicks outside of a textbox). This method can be used when this component is in a Gradio Blocks. + + Parameters: + fn: Callable function + inputs: List of gradio.components to use as inputs. If the function takes no inputs, this should be an empty list. + outputs: List of gradio.components to use as inputs. If the function returns no outputs, this should be an empty list. + api_name: Defining this parameter exposes the endpoint in the api docs + scroll_to_output: If True, will scroll to output component on completion + show_progress: If True, will show progress animation while pending + queue: If True, will place the request on the queue, if the queue exists + batch: If True, then the function should process a batch of inputs, meaning that it should accept a list of input values for each parameter. The lists should be of equal length (and be up to length `max_batch_size`). The function is then *required* to return a tuple of lists (even if there is only 1 output component), with each list in the tuple corresponding to one output component. + max_batch_size: Maximum number of inputs to batch together if this is called from the queue (only relevant if batch=True) + preprocess: If False, will not run preprocessing of component data before running 'fn' (e.g. leaving it as a base64 string if this method is called with the `Image` component). + postprocess: If False, will not run postprocessing of component data before returning 'fn' output to the browser. + cancels: A list of other events to cancel when this event is triggered. For example, setting cancels=[click_event] will cancel the click_event, where click_event is the return value of another components .click method. + every: Run this event 'every' number of seconds while the client connection is open. Interpreted in seconds. Queue must be enabled. + """ + # _js: Optional frontend js method to run before running 'fn'. Input arguments for js method are values of 'inputs' and 'outputs', return should be a list of values for output components. + + self.set_event_trigger( + "blur", + fn, + inputs, + outputs, + preprocess=preprocess, + postprocess=postprocess, + scroll_to_output=scroll_to_output, + show_progress=show_progress, + api_name=api_name, + js=_js, + queue=queue, + batch=batch, + max_batch_size=max_batch_size, + every=every, + ) + set_cancel_events(self, "blur", cancels) + + +class Uploadable(EventListener): + def upload( + self, + fn: Callable | None, + inputs: List[Component], + outputs: Component | List[Component] | None = None, + api_name: str | None = None, + scroll_to_output: bool = False, + show_progress: bool = True, + queue: bool | None = None, + batch: bool = False, + max_batch_size: int = 4, + preprocess: bool = True, + postprocess: bool = True, + cancels: List[Dict[str, Any]] | None = None, + every: float | None = None, + _js: str | None = None, + ): + """ + This event is triggered when the user uploads a file into the component (e.g. when the user uploads a video into a video component). This method can be used when this component is in a Gradio Blocks. + + Parameters: + fn: Callable function + inputs: List of inputs + outputs: List of outputs + api_name: Defining this parameter exposes the endpoint in the api docs + scroll_to_output: If True, will scroll to output component on completion + show_progress: If True, will show progress animation while pending + queue: If True, will place the request on the queue, if the queue exists + batch: If True, then the function should process a batch of inputs, meaning that it should accept a list of input values for each parameter. The lists should be of equal length (and be up to length `max_batch_size`). The function is then *required* to return a tuple of lists (even if there is only 1 output component), with each list in the tuple corresponding to one output component. + max_batch_size: Maximum number of inputs to batch together if this is called from the queue (only relevant if batch=True) + preprocess: If False, will not run preprocessing of component data before running 'fn' (e.g. leaving it as a base64 string if this method is called with the `Image` component). + postprocess: If False, will not run postprocessing of component data before returning 'fn' output to the browser. + cancels: A list of other events to cancel when this event is triggered. For example, setting cancels=[click_event] will cancel the click_event, where click_event is the return value of another components .click method. + every: Run this event 'every' number of seconds while the client connection is open. Interpreted in seconds. Queue must be enabled. + """ + # _js: Optional frontend js method to run before running 'fn'. Input arguments for js method are values of 'inputs' and 'outputs', return should be a list of values for output components. + + self.set_event_trigger( + "upload", + fn, + inputs, + outputs, + preprocess=preprocess, + postprocess=postprocess, + scroll_to_output=scroll_to_output, + show_progress=show_progress, + api_name=api_name, + js=_js, + queue=queue, + batch=batch, + max_batch_size=max_batch_size, + every=every, + ) + set_cancel_events(self, "upload", cancels) diff --git a/gradio-modified/gradio/examples.py b/gradio-modified/gradio/examples.py new file mode 100644 index 0000000000000000000000000000000000000000..a40ae25e903eebb8913276739200c2b02372e839 --- /dev/null +++ b/gradio-modified/gradio/examples.py @@ -0,0 +1,327 @@ +""" +Defines helper methods useful for loading and caching Interface examples. +""" +from __future__ import annotations + +import ast +import csv +import os +import warnings +from pathlib import Path +from typing import TYPE_CHECKING, Any, Callable, List + +from gradio import utils +from gradio.components import Dataset +from gradio.context import Context +from gradio.documentation import document, set_documentation_group +from gradio.flagging import CSVLogger + +if TYPE_CHECKING: # Only import for type checking (to avoid circular imports). + from gradio.components import IOComponent + +CACHED_FOLDER = "gradio_cached_examples" +LOG_FILE = "log.csv" + +set_documentation_group("component-helpers") + + +def create_examples( + examples: List[Any] | List[List[Any]] | str, + inputs: IOComponent | List[IOComponent], + outputs: IOComponent | List[IOComponent] | None = None, + fn: Callable | None = None, + cache_examples: bool = False, + examples_per_page: int = 10, + _api_mode: bool = False, + label: str | None = None, + elem_id: str | None = None, + run_on_click: bool = False, + preprocess: bool = True, + postprocess: bool = True, + batch: bool = False, +): + """Top-level synchronous function that creates Examples. Provided for backwards compatibility, i.e. so that gr.Examples(...) can be used to create the Examples component.""" + examples_obj = Examples( + examples=examples, + inputs=inputs, + outputs=outputs, + fn=fn, + cache_examples=cache_examples, + examples_per_page=examples_per_page, + _api_mode=_api_mode, + label=label, + elem_id=elem_id, + run_on_click=run_on_click, + preprocess=preprocess, + postprocess=postprocess, + batch=batch, + _initiated_directly=False, + ) + utils.synchronize_async(examples_obj.create) + return examples_obj + + +@document() +class Examples: + """ + This class is a wrapper over the Dataset component and can be used to create Examples + for Blocks / Interfaces. Populates the Dataset component with examples and + assigns event listener so that clicking on an example populates the input/output + components. Optionally handles example caching for fast inference. + + Demos: blocks_inputs, fake_gan + Guides: more_on_examples_and_flagging, using_hugging_face_integrations, image_classification_in_pytorch, image_classification_in_tensorflow, image_classification_with_vision_transformers, create_your_own_friends_with_a_gan + """ + + def __init__( + self, + examples: List[Any] | List[List[Any]] | str, + inputs: IOComponent | List[IOComponent], + outputs: IOComponent | List[IOComponent] | None = None, + fn: Callable | None = None, + cache_examples: bool = False, + examples_per_page: int = 10, + _api_mode: bool = False, + label: str | None = "Examples", + elem_id: str | None = None, + run_on_click: bool = False, + preprocess: bool = True, + postprocess: bool = True, + batch: bool = False, + _initiated_directly: bool = True, + ): + """ + Parameters: + examples: example inputs that can be clicked to populate specific components. Should be nested list, in which the outer list consists of samples and each inner list consists of an input corresponding to each input component. A string path to a directory of examples can also be provided but it should be within the directory with the python file running the gradio app. If there are multiple input components and a directory is provided, a log.csv file must be present in the directory to link corresponding inputs. + inputs: the component or list of components corresponding to the examples + outputs: optionally, provide the component or list of components corresponding to the output of the examples. Required if `cache` is True. + fn: optionally, provide the function to run to generate the outputs corresponding to the examples. Required if `cache` is True. + cache_examples: if True, caches examples for fast runtime. If True, then `fn` and `outputs` need to be provided + examples_per_page: how many examples to show per page. + label: the label to use for the examples component (by default, "Examples") + elem_id: an optional string that is assigned as the id of this component in the HTML DOM. + run_on_click: if cache_examples is False, clicking on an example does not run the function when an example is clicked. Set this to True to run the function when an example is clicked. Has no effect if cache_examples is True. + preprocess: if True, preprocesses the example input before running the prediction function and caching the output. Only applies if cache_examples is True. + postprocess: if True, postprocesses the example output after running the prediction function and before caching. Only applies if cache_examples is True. + batch: If True, then the function should process a batch of inputs, meaning that it should accept a list of input values for each parameter. Used only if cache_examples is True. + """ + if _initiated_directly: + warnings.warn( + "Please use gr.Examples(...) instead of gr.examples.Examples(...) to create the Examples.", + ) + + if cache_examples and (fn is None or outputs is None): + raise ValueError("If caching examples, `fn` and `outputs` must be provided") + + if not isinstance(inputs, list): + inputs = [inputs] + if outputs and not isinstance(outputs, list): + outputs = [outputs] + + working_directory = Path().absolute() + + if examples is None: + raise ValueError("The parameter `examples` cannot be None") + elif isinstance(examples, list) and ( + len(examples) == 0 or isinstance(examples[0], list) + ): + pass + elif ( + isinstance(examples, list) and len(inputs) == 1 + ): # If there is only one input component, examples can be provided as a regular list instead of a list of lists + examples = [[e] for e in examples] + elif isinstance(examples, str): + if not Path(examples).exists(): + raise FileNotFoundError( + "Could not find examples directory: " + examples + ) + working_directory = examples + if not (Path(examples) / LOG_FILE).exists(): + if len(inputs) == 1: + examples = [[e] for e in os.listdir(examples)] + else: + raise FileNotFoundError( + "Could not find log file (required for multiple inputs): " + + LOG_FILE + ) + else: + with open(Path(examples) / LOG_FILE) as logs: + examples = list(csv.reader(logs)) + examples = [ + examples[i][: len(inputs)] for i in range(1, len(examples)) + ] # remove header and unnecessary columns + + else: + raise ValueError( + "The parameter `examples` must either be a string directory or a list" + "(if there is only 1 input component) or (more generally), a nested " + "list, where each sublist represents a set of inputs." + ) + + input_has_examples = [False] * len(inputs) + for example in examples: + for idx, example_for_input in enumerate(example): + if not (example_for_input is None): + try: + input_has_examples[idx] = True + except IndexError: + pass # If there are more example components than inputs, ignore. This can sometimes be intentional (e.g. loading from a log file where outputs and timestamps are also logged) + + inputs_with_examples = [ + inp for (inp, keep) in zip(inputs, input_has_examples) if keep + ] + non_none_examples = [ + [ex for (ex, keep) in zip(example, input_has_examples) if keep] + for example in examples + ] + + self.examples = examples + self.non_none_examples = non_none_examples + self.inputs = inputs + self.inputs_with_examples = inputs_with_examples + self.outputs = outputs + self.fn = fn + self.cache_examples = cache_examples + self._api_mode = _api_mode + self.preprocess = preprocess + self.postprocess = postprocess + self.batch = batch + + with utils.set_directory(working_directory): + self.processed_examples = [ + [ + component.postprocess(sample) + for component, sample in zip(inputs, example) + ] + for example in examples + ] + self.non_none_processed_examples = [ + [ex for (ex, keep) in zip(example, input_has_examples) if keep] + for example in self.processed_examples + ] + if cache_examples: + for example in self.examples: + if len([ex for ex in example if ex is not None]) != len(self.inputs): + warnings.warn( + "Examples are being cached but not all input components have " + "example values. This may result in an exception being thrown by " + "your function. If you do get an error while caching examples, make " + "sure all of your inputs have example values for all of your examples " + "or you provide default values for those particular parameters in your function." + ) + break + + with utils.set_directory(working_directory): + self.dataset = Dataset( + components=inputs_with_examples, + samples=non_none_examples, + type="index", + label=label, + samples_per_page=examples_per_page, + elem_id=elem_id, + ) + + self.cached_folder = Path(CACHED_FOLDER) / str(self.dataset._id) + self.cached_file = Path(self.cached_folder) / "log.csv" + self.cache_examples = cache_examples + self.run_on_click = run_on_click + + async def create(self) -> None: + """Caches the examples if self.cache_examples is True and creates the Dataset + component to hold the examples""" + + async def load_example(example_id): + if self.cache_examples: + processed_example = self.non_none_processed_examples[ + example_id + ] + await self.load_from_cache(example_id) + else: + processed_example = self.non_none_processed_examples[example_id] + return utils.resolve_singleton(processed_example) + + if Context.root_block: + if self.cache_examples and self.outputs: + targets = self.inputs_with_examples + else: + targets = self.inputs + self.dataset.click( + load_example, + inputs=[self.dataset], + outputs=targets, # type: ignore + postprocess=False, + queue=False, + ) + if self.run_on_click and not self.cache_examples: + if self.fn is None: + raise ValueError("Cannot run_on_click if no function is provided") + self.dataset.click( + self.fn, + inputs=self.inputs, # type: ignore + outputs=self.outputs, # type: ignore + ) + + if self.cache_examples: + await self.cache() + + async def cache(self) -> None: + """ + Caches all of the examples so that their predictions can be shown immediately. + """ + if Path(self.cached_file).exists(): + print( + f"Using cache from '{Path(self.cached_folder).resolve()}' directory. If method or examples have changed since last caching, delete this folder to clear cache." + ) + else: + if Context.root_block is None: + raise ValueError("Cannot cache examples if not in a Blocks context") + + print(f"Caching examples at: '{Path(self.cached_file).resolve()}'") + cache_logger = CSVLogger() + + # create a fake dependency to process the examples and get the predictions + dependency = Context.root_block.set_event_trigger( + event_name="fake_event", + fn=self.fn, + inputs=self.inputs_with_examples, # type: ignore + outputs=self.outputs, # type: ignore + preprocess=self.preprocess and not self._api_mode, + postprocess=self.postprocess and not self._api_mode, + batch=self.batch, + ) + + fn_index = Context.root_block.dependencies.index(dependency) + assert self.outputs is not None + cache_logger.setup(self.outputs, self.cached_folder) + for example_id, _ in enumerate(self.examples): + processed_input = self.processed_examples[example_id] + if self.batch: + processed_input = [[value] for value in processed_input] + prediction = await Context.root_block.process_api( + fn_index=fn_index, inputs=processed_input, request=None, state={} + ) + output = prediction["data"] + if self.batch: + output = [value[0] for value in output] + cache_logger.flag(output) + # Remove the "fake_event" to prevent bugs in loading interfaces from spaces + Context.root_block.dependencies.remove(dependency) + Context.root_block.fns.pop(fn_index) + + async def load_from_cache(self, example_id: int) -> List[Any]: + """Loads a particular cached example for the interface. + Parameters: + example_id: The id of the example to process (zero-indexed). + """ + with open(self.cached_file) as cache: + examples = list(csv.reader(cache)) + example = examples[example_id + 1] # +1 to adjust for header + output = [] + assert self.outputs is not None + for component, value in zip(self.outputs, example): + try: + value_as_dict = ast.literal_eval(value) + assert utils.is_update(value_as_dict) + output.append(value_as_dict) + except (ValueError, TypeError, SyntaxError, AssertionError): + output.append(component.serialize(value, self.cached_folder)) + return output diff --git a/gradio-modified/gradio/exceptions.py b/gradio-modified/gradio/exceptions.py new file mode 100644 index 0000000000000000000000000000000000000000..d6cf6a8f2fed4941c5c4a17902292062a929886e --- /dev/null +++ b/gradio-modified/gradio/exceptions.py @@ -0,0 +1,23 @@ +class DuplicateBlockError(ValueError): + """Raised when a Blocks contains more than one Block with the same id""" + + pass + + +class TooManyRequestsError(Exception): + """Raised when the Hugging Face API returns a 429 status code.""" + + pass + + +class InvalidApiName(ValueError): + pass + + +class Error(Exception): + def __init__(self, message: str): + self.message = message + super().__init__(self.message) + + def __str__(self): + return repr(self.message) diff --git a/gradio-modified/gradio/external.py b/gradio-modified/gradio/external.py new file mode 100644 index 0000000000000000000000000000000000000000..4a1365623316679dc4cb2d76a607deb505208ab5 --- /dev/null +++ b/gradio-modified/gradio/external.py @@ -0,0 +1,462 @@ +"""This module should not be used directly as its API is subject to change. Instead, +use the `gr.Blocks.load()` or `gr.Interface.load()` functions.""" + +from __future__ import annotations + +import json +import re +import uuid +import warnings +from copy import deepcopy +from typing import TYPE_CHECKING, Callable, Dict + +import requests + +import gradio +from gradio import components, utils +from gradio.exceptions import TooManyRequestsError +from gradio.external_utils import ( + cols_to_rows, + encode_to_base64, + get_tabular_examples, + get_ws_fn, + postprocess_label, + rows_to_cols, + streamline_spaces_interface, + use_websocket, +) +from gradio.processing_utils import to_binary + +if TYPE_CHECKING: + from gradio.blocks import Blocks + from gradio.interface import Interface + + +def load_blocks_from_repo( + name: str, + src: str | None = None, + api_key: str | None = None, + alias: str | None = None, + **kwargs, +) -> Blocks: + """Creates and returns a Blocks instance from a Hugging Face model or Space repo.""" + if src is None: + # Separate the repo type (e.g. "model") from repo name (e.g. "google/vit-base-patch16-224") + tokens = name.split("/") + assert ( + len(tokens) > 1 + ), "Either `src` parameter must be provided, or `name` must be formatted as {src}/{repo name}" + src = tokens[0] + name = "/".join(tokens[1:]) + + factory_methods: Dict[str, Callable] = { + # for each repo type, we have a method that returns the Interface given the model name & optionally an api_key + "huggingface": from_model, + "models": from_model, + "spaces": from_spaces, + } + assert src.lower() in factory_methods, "parameter: src must be one of {}".format( + factory_methods.keys() + ) + + blocks: gradio.Blocks = factory_methods[src](name, api_key, alias, **kwargs) + return blocks + + +def from_model(model_name: str, api_key: str | None, alias: str | None, **kwargs): + model_url = "https://huggingface.co/{}".format(model_name) + api_url = "https://api-inference.huggingface.co/models/{}".format(model_name) + print("Fetching model from: {}".format(model_url)) + + headers = {"Authorization": f"Bearer {api_key}"} if api_key is not None else {} + + # Checking if model exists, and if so, it gets the pipeline + response = requests.request("GET", api_url, headers=headers) + assert ( + response.status_code == 200 + ), f"Could not find model: {model_name}. If it is a private or gated model, please provide your Hugging Face access token (https://huggingface.co/settings/tokens) as the argument for the `api_key` parameter." + p = response.json().get("pipeline_tag") + + pipelines = { + "audio-classification": { + # example model: ehcalabres/wav2vec2-lg-xlsr-en-speech-emotion-recognition + "inputs": components.Audio(source="upload", type="filepath", label="Input"), + "outputs": components.Label(label="Class"), + "preprocess": lambda i: to_binary, + "postprocess": lambda r: postprocess_label( + {i["label"].split(", ")[0]: i["score"] for i in r.json()} + ), + }, + "audio-to-audio": { + # example model: facebook/xm_transformer_sm_all-en + "inputs": components.Audio(source="upload", type="filepath", label="Input"), + "outputs": components.Audio(label="Output"), + "preprocess": to_binary, + "postprocess": encode_to_base64, + }, + "automatic-speech-recognition": { + # example model: facebook/wav2vec2-base-960h + "inputs": components.Audio(source="upload", type="filepath", label="Input"), + "outputs": components.Textbox(label="Output"), + "preprocess": to_binary, + "postprocess": lambda r: r.json()["text"], + }, + "feature-extraction": { + # example model: julien-c/distilbert-feature-extraction + "inputs": components.Textbox(label="Input"), + "outputs": components.Dataframe(label="Output"), + "preprocess": lambda x: {"inputs": x}, + "postprocess": lambda r: r.json()[0], + }, + "fill-mask": { + "inputs": components.Textbox(label="Input"), + "outputs": components.Label(label="Classification"), + "preprocess": lambda x: {"inputs": x}, + "postprocess": lambda r: postprocess_label( + {i["token_str"]: i["score"] for i in r.json()} + ), + }, + "image-classification": { + # Example: google/vit-base-patch16-224 + "inputs": components.Image(type="filepath", label="Input Image"), + "outputs": components.Label(label="Classification"), + "preprocess": to_binary, + "postprocess": lambda r: postprocess_label( + {i["label"].split(", ")[0]: i["score"] for i in r.json()} + ), + }, + "question-answering": { + # Example: deepset/xlm-roberta-base-squad2 + "inputs": [ + components.Textbox(lines=7, label="Context"), + components.Textbox(label="Question"), + ], + "outputs": [ + components.Textbox(label="Answer"), + components.Label(label="Score"), + ], + "preprocess": lambda c, q: {"inputs": {"context": c, "question": q}}, + "postprocess": lambda r: (r.json()["answer"], {"label": r.json()["score"]}), + }, + "summarization": { + # Example: facebook/bart-large-cnn + "inputs": components.Textbox(label="Input"), + "outputs": components.Textbox(label="Summary"), + "preprocess": lambda x: {"inputs": x}, + "postprocess": lambda r: r.json()[0]["summary_text"], + }, + "text-classification": { + # Example: distilbert-base-uncased-finetuned-sst-2-english + "inputs": components.Textbox(label="Input"), + "outputs": components.Label(label="Classification"), + "preprocess": lambda x: {"inputs": x}, + "postprocess": lambda r: postprocess_label( + {i["label"].split(", ")[0]: i["score"] for i in r.json()[0]} + ), + }, + "text-generation": { + # Example: gpt2 + "inputs": components.Textbox(label="Input"), + "outputs": components.Textbox(label="Output"), + "preprocess": lambda x: {"inputs": x}, + "postprocess": lambda r: r.json()[0]["generated_text"], + }, + "text2text-generation": { + # Example: valhalla/t5-small-qa-qg-hl + "inputs": components.Textbox(label="Input"), + "outputs": components.Textbox(label="Generated Text"), + "preprocess": lambda x: {"inputs": x}, + "postprocess": lambda r: r.json()[0]["generated_text"], + }, + "translation": { + "inputs": components.Textbox(label="Input"), + "outputs": components.Textbox(label="Translation"), + "preprocess": lambda x: {"inputs": x}, + "postprocess": lambda r: r.json()[0]["translation_text"], + }, + "zero-shot-classification": { + # Example: facebook/bart-large-mnli + "inputs": [ + components.Textbox(label="Input"), + components.Textbox(label="Possible class names (" "comma-separated)"), + components.Checkbox(label="Allow multiple true classes"), + ], + "outputs": components.Label(label="Classification"), + "preprocess": lambda i, c, m: { + "inputs": i, + "parameters": {"candidate_labels": c, "multi_class": m}, + }, + "postprocess": lambda r: postprocess_label( + { + r.json()["labels"][i]: r.json()["scores"][i] + for i in range(len(r.json()["labels"])) + } + ), + }, + "sentence-similarity": { + # Example: sentence-transformers/distilbert-base-nli-stsb-mean-tokens + "inputs": [ + components.Textbox( + value="That is a happy person", label="Source Sentence" + ), + components.Textbox( + lines=7, + placeholder="Separate each sentence by a newline", + label="Sentences to compare to", + ), + ], + "outputs": components.Label(label="Classification"), + "preprocess": lambda src, sentences: { + "inputs": { + "source_sentence": src, + "sentences": [s for s in sentences.splitlines() if s != ""], + } + }, + "postprocess": lambda r: postprocess_label( + {f"sentence {i}": v for i, v in enumerate(r.json())} + ), + }, + "text-to-speech": { + # Example: julien-c/ljspeech_tts_train_tacotron2_raw_phn_tacotron_g2p_en_no_space_train + "inputs": components.Textbox(label="Input"), + "outputs": components.Audio(label="Audio"), + "preprocess": lambda x: {"inputs": x}, + "postprocess": encode_to_base64, + }, + "text-to-image": { + # example model: osanseviero/BigGAN-deep-128 + "inputs": components.Textbox(label="Input"), + "outputs": components.Image(label="Output"), + "preprocess": lambda x: {"inputs": x}, + "postprocess": encode_to_base64, + }, + "token-classification": { + # example model: huggingface-course/bert-finetuned-ner + "inputs": components.Textbox(label="Input"), + "outputs": components.HighlightedText(label="Output"), + "preprocess": lambda x: {"inputs": x}, + "postprocess": lambda r: r, # Handled as a special case in query_huggingface_api() + }, + } + + if p in ["tabular-classification", "tabular-regression"]: + example_data = get_tabular_examples(model_name) + col_names, example_data = cols_to_rows(example_data) + example_data = [[example_data]] if example_data else None + + pipelines[p] = { + "inputs": components.Dataframe( + label="Input Rows", + type="pandas", + headers=col_names, + col_count=(len(col_names), "fixed"), + ), + "outputs": components.Dataframe( + label="Predictions", type="array", headers=["prediction"] + ), + "preprocess": rows_to_cols, + "postprocess": lambda r: { + "headers": ["prediction"], + "data": [[pred] for pred in json.loads(r.text)], + }, + "examples": example_data, + } + + if p is None or not (p in pipelines): + raise ValueError("Unsupported pipeline type: {}".format(p)) + + pipeline = pipelines[p] + + def query_huggingface_api(*params): + # Convert to a list of input components + data = pipeline["preprocess"](*params) + if isinstance( + data, dict + ): # HF doesn't allow additional parameters for binary files (e.g. images or audio files) + data.update({"options": {"wait_for_model": True}}) + data = json.dumps(data) + response = requests.request("POST", api_url, headers=headers, data=data) + if not (response.status_code == 200): + errors_json = response.json() + errors, warns = "", "" + if errors_json.get("error"): + errors = f", Error: {errors_json.get('error')}" + if errors_json.get("warnings"): + warns = f", Warnings: {errors_json.get('warnings')}" + raise ValueError( + f"Could not complete request to HuggingFace API, Status Code: {response.status_code}" + + errors + + warns + ) + if ( + p == "token-classification" + ): # Handle as a special case since HF API only returns the named entities and we need the input as well + ner_groups = response.json() + input_string = params[0] + response = utils.format_ner_list(input_string, ner_groups) + output = pipeline["postprocess"](response) + return output + + if alias is None: + query_huggingface_api.__name__ = model_name + else: + query_huggingface_api.__name__ = alias + + interface_info = { + "fn": query_huggingface_api, + "inputs": pipeline["inputs"], + "outputs": pipeline["outputs"], + "title": model_name, + "examples": pipeline.get("examples"), + } + + kwargs = dict(interface_info, **kwargs) + kwargs["_api_mode"] = True # So interface doesn't run pre/postprocess. + interface = gradio.Interface(**kwargs) + return interface + + +def from_spaces( + space_name: str, api_key: str | None, alias: str | None, **kwargs +) -> Blocks: + space_url = "https://huggingface.co/spaces/{}".format(space_name) + + print("Fetching Space from: {}".format(space_url)) + + headers = {} + if api_key is not None: + headers["Authorization"] = f"Bearer {api_key}" + + iframe_url = ( + requests.get( + f"https://huggingface.co/api/spaces/{space_name}/host", headers=headers + ) + .json() + .get("host") + ) + + if iframe_url is None: + raise ValueError( + f"Could not find Space: {space_name}. If it is a private or gated Space, please provide your Hugging Face access token (https://huggingface.co/settings/tokens) as the argument for the `api_key` parameter." + ) + + r = requests.get(iframe_url, headers=headers) + + result = re.search( + r"window.gradio_config = (.*?);[\s]*", r.text + ) # some basic regex to extract the config + try: + config = json.loads(result.group(1)) # type: ignore + except AttributeError: + raise ValueError("Could not load the Space: {}".format(space_name)) + if "allow_flagging" in config: # Create an Interface for Gradio 2.x Spaces + return from_spaces_interface( + space_name, config, alias, api_key, iframe_url, **kwargs + ) + else: # Create a Blocks for Gradio 3.x Spaces + if kwargs: + warnings.warn( + "You cannot override parameters for this Space by passing in kwargs. " + "Instead, please load the Space as a function and use it to create a " + "Blocks or Interface locally. You may find this Guide helpful: " + "https://gradio.app/using_blocks_like_functions/" + ) + return from_spaces_blocks(config, api_key, iframe_url) + + +def from_spaces_blocks(config: Dict, api_key: str | None, iframe_url: str) -> Blocks: + api_url = "{}/api/predict/".format(iframe_url) + + headers = {"Content-Type": "application/json"} + if api_key is not None: + headers["Authorization"] = f"Bearer {api_key}" + ws_url = "{}/queue/join".format(iframe_url).replace("https", "wss") + + ws_fn = get_ws_fn(ws_url, headers) + + fns = [] + for d, dependency in enumerate(config["dependencies"]): + if dependency["backend_fn"]: + + def get_fn(outputs, fn_index, use_ws): + def fn(*data): + data = json.dumps({"data": data, "fn_index": fn_index}) + hash_data = json.dumps( + {"fn_index": fn_index, "session_hash": str(uuid.uuid4())} + ) + if use_ws: + result = utils.synchronize_async(ws_fn, data, hash_data) + output = result["data"] + else: + response = requests.post(api_url, headers=headers, data=data) + result = json.loads(response.content.decode("utf-8")) + try: + output = result["data"] + except KeyError: + if "error" in result and "429" in result["error"]: + raise TooManyRequestsError( + "Too many requests to the Hugging Face API" + ) + raise KeyError( + f"Could not find 'data' key in response from external Space. Response received: {result}" + ) + if len(outputs) == 1: + output = output[0] + return output + + return fn + + fn = get_fn( + deepcopy(dependency["outputs"]), d, use_websocket(config, dependency) + ) + fns.append(fn) + else: + fns.append(None) + return gradio.Blocks.from_config(config, fns, iframe_url) + + +def from_spaces_interface( + model_name: str, + config: Dict, + alias: str | None, + api_key: str | None, + iframe_url: str, + **kwargs, +) -> Interface: + + config = streamline_spaces_interface(config) + api_url = "{}/api/predict/".format(iframe_url) + headers = {"Content-Type": "application/json"} + if api_key is not None: + headers["Authorization"] = f"Bearer {api_key}" + + # The function should call the API with preprocessed data + def fn(*data): + data = json.dumps({"data": data}) + response = requests.post(api_url, headers=headers, data=data) + result = json.loads(response.content.decode("utf-8")) + try: + output = result["data"] + except KeyError: + if "error" in result and "429" in result["error"]: + raise TooManyRequestsError("Too many requests to the Hugging Face API") + raise KeyError( + f"Could not find 'data' key in response from external Space. Response received: {result}" + ) + if ( + len(config["outputs"]) == 1 + ): # if the fn is supposed to return a single value, pop it + output = output[0] + if len(config["outputs"]) == 1 and isinstance( + output, list + ): # Needed to support Output.Image() returning bounding boxes as well (TODO: handle different versions of gradio since they have slightly different APIs) + output = output[0] + return output + + fn.__name__ = alias if (alias is not None) else model_name + config["fn"] = fn + + kwargs = dict(config, **kwargs) + kwargs["_api_mode"] = True + interface = gradio.Interface(**kwargs) + return interface diff --git a/gradio-modified/gradio/external_utils.py b/gradio-modified/gradio/external_utils.py new file mode 100644 index 0000000000000000000000000000000000000000..e00b2f4fdd3c5fb09b06177fa1e40148b71aefd4 --- /dev/null +++ b/gradio-modified/gradio/external_utils.py @@ -0,0 +1,186 @@ +"""Utility function for gradio/external.py""" + +import base64 +import json +import math +import operator +import re +import warnings +from typing import Any, Dict, List, Tuple + +import requests +import websockets +import yaml +from packaging import version +from websockets.legacy.protocol import WebSocketCommonProtocol + +from gradio import components, exceptions + +################## +# Helper functions for processing tabular data +################## + + +def get_tabular_examples(model_name: str) -> Dict[str, List[float]]: + readme = requests.get(f"https://huggingface.co/{model_name}/resolve/main/README.md") + if readme.status_code != 200: + warnings.warn(f"Cannot load examples from README for {model_name}", UserWarning) + example_data = {} + else: + yaml_regex = re.search( + "(?:^|[\r\n])---[\n\r]+([\\S\\s]*?)[\n\r]+---([\n\r]|$)", readme.text + ) + if yaml_regex is None: + example_data = {} + else: + example_yaml = next( + yaml.safe_load_all(readme.text[: yaml_regex.span()[-1]]) + ) + example_data = example_yaml.get("widget", {}).get("structuredData", {}) + if not example_data: + raise ValueError( + f"No example data found in README.md of {model_name} - Cannot build gradio demo. " + "See the README.md here: https://huggingface.co/scikit-learn/tabular-playground/blob/main/README.md " + "for a reference on how to provide example data to your model." + ) + # replace nan with string NaN for inference API + for data in example_data.values(): + for i, val in enumerate(data): + if isinstance(val, float) and math.isnan(val): + data[i] = "NaN" + return example_data + + +def cols_to_rows( + example_data: Dict[str, List[float]] +) -> Tuple[List[str], List[List[float]]]: + headers = list(example_data.keys()) + n_rows = max(len(example_data[header] or []) for header in headers) + data = [] + for row_index in range(n_rows): + row_data = [] + for header in headers: + col = example_data[header] or [] + if row_index >= len(col): + row_data.append("NaN") + else: + row_data.append(col[row_index]) + data.append(row_data) + return headers, data + + +def rows_to_cols(incoming_data: Dict) -> Dict[str, Dict[str, Dict[str, List[str]]]]: + data_column_wise = {} + for i, header in enumerate(incoming_data["headers"]): + data_column_wise[header] = [str(row[i]) for row in incoming_data["data"]] + return {"inputs": {"data": data_column_wise}} + + +################## +# Helper functions for processing other kinds of data +################## + + +def postprocess_label(scores: Dict) -> Dict: + sorted_pred = sorted(scores.items(), key=operator.itemgetter(1), reverse=True) + return { + "label": sorted_pred[0][0], + "confidences": [ + {"label": pred[0], "confidence": pred[1]} for pred in sorted_pred + ], + } + + +def encode_to_base64(r: requests.Response) -> str: + # Handles the different ways HF API returns the prediction + base64_repr = base64.b64encode(r.content).decode("utf-8") + data_prefix = ";base64," + # Case 1: base64 representation already includes data prefix + if data_prefix in base64_repr: + return base64_repr + else: + content_type = r.headers.get("content-type") + # Case 2: the data prefix is a key in the response + if content_type == "application/json": + try: + content_type = r.json()[0]["content-type"] + base64_repr = r.json()[0]["blob"] + except KeyError: + raise ValueError( + "Cannot determine content type returned" "by external API." + ) + # Case 3: the data prefix is included in the response headers + else: + pass + new_base64 = "data:{};base64,".format(content_type) + base64_repr + return new_base64 + + +################## +# Helper functions for connecting to websockets +################## + + +async def get_pred_from_ws( + websocket: WebSocketCommonProtocol, data: str, hash_data: str +) -> Dict[str, Any]: + completed = False + resp = {} + while not completed: + msg = await websocket.recv() + resp = json.loads(msg) + if resp["msg"] == "queue_full": + raise exceptions.Error("Queue is full! Please try again.") + if resp["msg"] == "send_hash": + await websocket.send(hash_data) + elif resp["msg"] == "send_data": + await websocket.send(data) + completed = resp["msg"] == "process_completed" + return resp["output"] + + +def get_ws_fn(ws_url, headers): + async def ws_fn(data, hash_data): + async with websockets.connect( # type: ignore + ws_url, open_timeout=10, extra_headers=headers + ) as websocket: + return await get_pred_from_ws(websocket, data, hash_data) + + return ws_fn + + +def use_websocket(config, dependency): + queue_enabled = config.get("enable_queue", False) + queue_uses_websocket = version.parse( + config.get("version", "2.0") + ) >= version.Version("3.2") + dependency_uses_queue = dependency.get("queue", False) is not False + return queue_enabled and queue_uses_websocket and dependency_uses_queue + + +################## +# Helper function for cleaning up an Interface loaded from HF Spaces +################## + + +def streamline_spaces_interface(config: Dict) -> Dict: + """Streamlines the interface config dictionary to remove unnecessary keys.""" + config["inputs"] = [ + components.get_component_instance(component) + for component in config["input_components"] + ] + config["outputs"] = [ + components.get_component_instance(component) + for component in config["output_components"] + ] + parameters = { + "article", + "description", + "flagging_options", + "inputs", + "outputs", + "theme", + "title", + } + config = {k: config[k] for k in parameters} + return config diff --git a/gradio-modified/gradio/flagging.py b/gradio-modified/gradio/flagging.py new file mode 100644 index 0000000000000000000000000000000000000000..e87cf44d471df1f229458f07cac7c67ac0cfd540 --- /dev/null +++ b/gradio-modified/gradio/flagging.py @@ -0,0 +1,560 @@ +from __future__ import annotations + +import csv +import datetime +import io +import json +import os +import uuid +from abc import ABC, abstractmethod +from pathlib import Path +from typing import TYPE_CHECKING, Any, List + +import gradio as gr +from gradio import encryptor, utils +from gradio.documentation import document, set_documentation_group + +if TYPE_CHECKING: + from gradio.components import IOComponent + +set_documentation_group("flagging") + + +def _get_dataset_features_info(is_new, components): + """ + Takes in a list of components and returns a dataset features info + + Parameters: + is_new: boolean, whether the dataset is new or not + components: list of components + + Returns: + infos: a dictionary of the dataset features + file_preview_types: dictionary mapping of gradio components to appropriate string. + header: list of header strings + + """ + infos = {"flagged": {"features": {}}} + # File previews for certain input and output types + file_preview_types = {gr.Audio: "Audio", gr.Image: "Image"} + headers = [] + + # Generate the headers and dataset_infos + if is_new: + + for component in components: + headers.append(component.label) + infos["flagged"]["features"][component.label] = { + "dtype": "string", + "_type": "Value", + } + if isinstance(component, tuple(file_preview_types)): + headers.append(component.label + " file") + for _component, _type in file_preview_types.items(): + if isinstance(component, _component): + infos["flagged"]["features"][ + (component.label or "") + " file" + ] = {"_type": _type} + break + + headers.append("flag") + infos["flagged"]["features"]["flag"] = { + "dtype": "string", + "_type": "Value", + } + + return infos, file_preview_types, headers + + +class FlaggingCallback(ABC): + """ + An abstract class for defining the methods that any FlaggingCallback should have. + """ + + @abstractmethod + def setup(self, components: List[IOComponent], flagging_dir: str): + """ + This method should be overridden and ensure that everything is set up correctly for flag(). + This method gets called once at the beginning of the Interface.launch() method. + Parameters: + components: Set of components that will provide flagged data. + flagging_dir: A string, typically containing the path to the directory where the flagging file should be storied (provided as an argument to Interface.__init__()). + """ + pass + + @abstractmethod + def flag( + self, + flag_data: List[Any], + flag_option: str | None = None, + flag_index: int | None = None, + username: str | None = None, + ) -> int: + """ + This method should be overridden by the FlaggingCallback subclass and may contain optional additional arguments. + This gets called every time the button is pressed. + Parameters: + interface: The Interface object that is being used to launch the flagging interface. + flag_data: The data to be flagged. + flag_option (optional): In the case that flagging_options are provided, the flag option that is being used. + flag_index (optional): The index of the sample that is being flagged. + username (optional): The username of the user that is flagging the data, if logged in. + Returns: + (int) The total number of samples that have been flagged. + """ + pass + + +@document() +class SimpleCSVLogger(FlaggingCallback): + """ + A simplified implementation of the FlaggingCallback abstract class + provided for illustrative purposes. Each flagged sample (both the input and output data) + is logged to a CSV file on the machine running the gradio app. + Example: + import gradio as gr + def image_classifier(inp): + return {'cat': 0.3, 'dog': 0.7} + demo = gr.Interface(fn=image_classifier, inputs="image", outputs="label", + flagging_callback=SimpleCSVLogger()) + """ + + def __init__(self): + pass + + def setup(self, components: List[IOComponent], flagging_dir: str | Path): + self.components = components + self.flagging_dir = flagging_dir + os.makedirs(flagging_dir, exist_ok=True) + + def flag( + self, + flag_data: List[Any], + flag_option: str | None = None, + flag_index: int | None = None, + username: str | None = None, + ) -> int: + flagging_dir = self.flagging_dir + log_filepath = Path(flagging_dir) / "log.csv" + + csv_data = [] + for component, sample in zip(self.components, flag_data): + save_dir = Path(flagging_dir) / utils.strip_invalid_filename_characters( + component.label or "" + ) + csv_data.append( + component.deserialize( + sample, + save_dir, + None, + ) + ) + + with open(log_filepath, "a", newline="") as csvfile: + writer = csv.writer(csvfile) + writer.writerow(utils.sanitize_list_for_csv(csv_data)) + + with open(log_filepath, "r") as csvfile: + line_count = len([None for row in csv.reader(csvfile)]) - 1 + return line_count + + +@document() +class CSVLogger(FlaggingCallback): + """ + The default implementation of the FlaggingCallback abstract class. Each flagged + sample (both the input and output data) is logged to a CSV file with headers on the machine running the gradio app. + Example: + import gradio as gr + def image_classifier(inp): + return {'cat': 0.3, 'dog': 0.7} + demo = gr.Interface(fn=image_classifier, inputs="image", outputs="label", + flagging_callback=CSVLogger()) + Guides: using_flagging + """ + + def __init__(self): + pass + + def setup( + self, + components: List[IOComponent], + flagging_dir: str | Path, + encryption_key: bytes | None = None, + ): + self.components = components + self.flagging_dir = flagging_dir + self.encryption_key = encryption_key + os.makedirs(flagging_dir, exist_ok=True) + + def flag( + self, + flag_data: List[Any], + flag_option: str | None = None, + flag_index: int | None = None, + username: str | None = None, + ) -> int: + flagging_dir = self.flagging_dir + log_filepath = Path(flagging_dir) / "log.csv" + is_new = not Path(log_filepath).exists() + headers = [ + component.label or f"component {idx}" + for idx, component in enumerate(self.components) + ] + [ + "flag", + "username", + "timestamp", + ] + + csv_data = [] + for idx, (component, sample) in enumerate(zip(self.components, flag_data)): + save_dir = Path(flagging_dir) / utils.strip_invalid_filename_characters( + component.label or f"component {idx}" + ) + if utils.is_update(sample): + csv_data.append(str(sample)) + else: + csv_data.append( + component.deserialize( + sample, + save_dir=save_dir, + encryption_key=self.encryption_key, + ) + if sample is not None + else "" + ) + csv_data.append(flag_option if flag_option is not None else "") + csv_data.append(username if username is not None else "") + csv_data.append(str(datetime.datetime.now())) + + def replace_flag_at_index(file_content: str, flag_index: int): + file_content_ = io.StringIO(file_content) + content = list(csv.reader(file_content_)) + header = content[0] + flag_col_index = header.index("flag") + content[flag_index][flag_col_index] = flag_option # type: ignore + output = io.StringIO() + writer = csv.writer(output) + writer.writerows(utils.sanitize_list_for_csv(content)) + return output.getvalue() + + if self.encryption_key: + output = io.StringIO() + if not is_new: + with open(log_filepath, "rb", encoding="utf-8") as csvfile: + encrypted_csv = csvfile.read() + decrypted_csv = encryptor.decrypt( + self.encryption_key, encrypted_csv + ) + file_content = decrypted_csv.decode() + if flag_index is not None: + file_content = replace_flag_at_index(file_content, flag_index) + output.write(file_content) + writer = csv.writer(output) + if flag_index is None: + if is_new: + writer.writerow(utils.sanitize_list_for_csv(headers)) + writer.writerow(utils.sanitize_list_for_csv(csv_data)) + with open(log_filepath, "wb", encoding="utf-8") as csvfile: + csvfile.write( + encryptor.encrypt(self.encryption_key, output.getvalue().encode()) + ) + else: + if flag_index is None: + with open(log_filepath, "a", newline="", encoding="utf-8") as csvfile: + writer = csv.writer(csvfile) + if is_new: + writer.writerow(utils.sanitize_list_for_csv(headers)) + writer.writerow(utils.sanitize_list_for_csv(csv_data)) + else: + with open(log_filepath, encoding="utf-8") as csvfile: + file_content = csvfile.read() + file_content = replace_flag_at_index(file_content, flag_index) + with open( + log_filepath, "w", newline="", encoding="utf-8" + ) as csvfile: # newline parameter needed for Windows + csvfile.write(file_content) + with open(log_filepath, "r", encoding="utf-8") as csvfile: + line_count = len([None for row in csv.reader(csvfile)]) - 1 + return line_count + + +@document() +class HuggingFaceDatasetSaver(FlaggingCallback): + """ + A callback that saves each flagged sample (both the input and output data) + to a HuggingFace dataset. + Example: + import gradio as gr + hf_writer = gr.HuggingFaceDatasetSaver(HF_API_TOKEN, "image-classification-mistakes") + def image_classifier(inp): + return {'cat': 0.3, 'dog': 0.7} + demo = gr.Interface(fn=image_classifier, inputs="image", outputs="label", + allow_flagging="manual", flagging_callback=hf_writer) + Guides: using_flagging + """ + + def __init__( + self, + hf_token: str, + dataset_name: str, + organization: str | None = None, + private: bool = False, + ): + """ + Parameters: + hf_token: The HuggingFace token to use to create (and write the flagged sample to) the HuggingFace dataset. + dataset_name: The name of the dataset to save the data to, e.g. "image-classifier-1" + organization: The organization to save the dataset under. The hf_token must provide write access to this organization. If not provided, saved under the name of the user corresponding to the hf_token. + private: Whether the dataset should be private (defaults to False). + """ + self.hf_token = hf_token + self.dataset_name = dataset_name + self.organization_name = organization + self.dataset_private = private + + def setup(self, components: List[IOComponent], flagging_dir: str): + """ + Params: + flagging_dir (str): local directory where the dataset is cloned, + updated, and pushed from. + """ + try: + import huggingface_hub + except (ImportError, ModuleNotFoundError): + raise ImportError( + "Package `huggingface_hub` not found is needed " + "for HuggingFaceDatasetSaver. Try 'pip install huggingface_hub'." + ) + path_to_dataset_repo = huggingface_hub.create_repo( + name=self.dataset_name, + token=self.hf_token, + private=self.dataset_private, + repo_type="dataset", + exist_ok=True, + ) + self.path_to_dataset_repo = path_to_dataset_repo # e.g. "https://huggingface.co/datasets/abidlabs/test-audio-10" + self.components = components + self.flagging_dir = flagging_dir + self.dataset_dir = Path(flagging_dir) / self.dataset_name + self.repo = huggingface_hub.Repository( + local_dir=str(self.dataset_dir), + clone_from=path_to_dataset_repo, + use_auth_token=self.hf_token, + ) + self.repo.git_pull(lfs=True) + + # Should filename be user-specified? + self.log_file = Path(self.dataset_dir) / "data.csv" + self.infos_file = Path(self.dataset_dir) / "dataset_infos.json" + + def flag( + self, + flag_data: List[Any], + flag_option: str | None = None, + flag_index: int | None = None, + username: str | None = None, + ) -> int: + self.repo.git_pull(lfs=True) + + is_new = not Path(self.log_file).exists() + + with open(self.log_file, "a", newline="", encoding="utf-8") as csvfile: + writer = csv.writer(csvfile) + + # File previews for certain input and output types + infos, file_preview_types, headers = _get_dataset_features_info( + is_new, self.components + ) + + # Generate the headers and dataset_infos + if is_new: + writer.writerow(utils.sanitize_list_for_csv(headers)) + + # Generate the row corresponding to the flagged sample + csv_data = [] + for component, sample in zip(self.components, flag_data): + save_dir = Path( + self.dataset_dir + ) / utils.strip_invalid_filename_characters(component.label or "") + filepath = component.deserialize(sample, save_dir, None) + csv_data.append(filepath) + if isinstance(component, tuple(file_preview_types)): + csv_data.append( + "{}/resolve/main/{}".format(self.path_to_dataset_repo, filepath) + ) + csv_data.append(flag_option if flag_option is not None else "") + writer.writerow(utils.sanitize_list_for_csv(csv_data)) + + if is_new: + json.dump(infos, open(self.infos_file, "w")) + + with open(self.log_file, "r", encoding="utf-8") as csvfile: + line_count = len([None for row in csv.reader(csvfile)]) - 1 + + self.repo.push_to_hub(commit_message="Flagged sample #{}".format(line_count)) + + return line_count + + +class HuggingFaceDatasetJSONSaver(FlaggingCallback): + """ + A FlaggingCallback that saves flagged data to a Hugging Face dataset in JSONL format. + + Each data sample is saved in a different JSONL file, + allowing multiple users to use flagging simultaneously. + Saving to a single CSV would cause errors as only one user can edit at the same time. + + """ + + def __init__( + self, + hf_foken: str, + dataset_name: str, + organization: str | None = None, + private: bool = False, + verbose: bool = True, + ): + """ + Params: + hf_token (str): The token to use to access the huggingface API. + dataset_name (str): The name of the dataset to save the data to, e.g. + "image-classifier-1" + organization (str): The name of the organization to which to attach + the datasets. If None, the dataset attaches to the user only. + private (bool): If the dataset does not already exist, whether it + should be created as a private dataset or public. Private datasets + may require paid huggingface.co accounts + verbose (bool): Whether to print out the status of the dataset + creation. + """ + self.hf_foken = hf_foken + self.dataset_name = dataset_name + self.organization_name = organization + self.dataset_private = private + self.verbose = verbose + + def setup(self, components: List[IOComponent], flagging_dir: str): + """ + Params: + components List[Component]: list of components for flagging + flagging_dir (str): local directory where the dataset is cloned, + updated, and pushed from. + """ + try: + import huggingface_hub + except (ImportError, ModuleNotFoundError): + raise ImportError( + "Package `huggingface_hub` not found is needed " + "for HuggingFaceDatasetJSONSaver. Try 'pip install huggingface_hub'." + ) + path_to_dataset_repo = huggingface_hub.create_repo( + name=self.dataset_name, + token=self.hf_foken, + private=self.dataset_private, + repo_type="dataset", + exist_ok=True, + ) + self.path_to_dataset_repo = path_to_dataset_repo # e.g. "https://huggingface.co/datasets/abidlabs/test-audio-10" + self.components = components + self.flagging_dir = flagging_dir + self.dataset_dir = Path(flagging_dir) / self.dataset_name + self.repo = huggingface_hub.Repository( + local_dir=str(self.dataset_dir), + clone_from=path_to_dataset_repo, + use_auth_token=self.hf_foken, + ) + self.repo.git_pull(lfs=True) + + self.infos_file = Path(self.dataset_dir) / "dataset_infos.json" + + def flag( + self, + flag_data: List[Any], + flag_option: str | None = None, + flag_index: int | None = None, + username: str | None = None, + ) -> str: + self.repo.git_pull(lfs=True) + + # Generate unique folder for the flagged sample + unique_name = self.get_unique_name() # unique name for folder + folder_name = ( + Path(self.dataset_dir) / unique_name + ) # unique folder for specific example + os.makedirs(folder_name) + + # Now uses the existence of `dataset_infos.json` to determine if new + is_new = not Path(self.infos_file).exists() + + # File previews for certain input and output types + infos, file_preview_types, _ = _get_dataset_features_info( + is_new, self.components + ) + + # Generate the row and header corresponding to the flagged sample + csv_data = [] + headers = [] + + for component, sample in zip(self.components, flag_data): + headers.append(component.label) + + try: + save_dir = Path(folder_name) / utils.strip_invalid_filename_characters( + component.label or "" + ) + filepath = component.deserialize(sample, save_dir, None) + except Exception: + # Could not parse 'sample' (mostly) because it was None and `component.save_flagged` + # does not handle None cases. + # for example: Label (line 3109 of components.py raises an error if data is None) + filepath = None + + if isinstance(component, tuple(file_preview_types)): + headers.append(component.label or "" + " file") + + csv_data.append( + "{}/resolve/main/{}/{}".format( + self.path_to_dataset_repo, unique_name, filepath + ) + if filepath is not None + else None + ) + + csv_data.append(filepath) + headers.append("flag") + csv_data.append(flag_option if flag_option is not None else "") + + # Creates metadata dict from row data and dumps it + metadata_dict = { + header: _csv_data for header, _csv_data in zip(headers, csv_data) + } + self.dump_json(metadata_dict, Path(folder_name) / "metadata.jsonl") + + if is_new: + json.dump(infos, open(self.infos_file, "w")) + + self.repo.push_to_hub(commit_message="Flagged sample {}".format(unique_name)) + return unique_name + + def get_unique_name(self): + id = uuid.uuid4() + return str(id) + + def dump_json(self, thing: dict, file_path: str | Path) -> None: + with open(file_path, "w+", encoding="utf8") as f: + json.dump(thing, f) + + +class FlagMethod: + """ + Helper class that contains the flagging button option and callback + """ + + def __init__(self, flagging_callback: FlaggingCallback, flag_option=None): + self.flagging_callback = flagging_callback + self.flag_option = flag_option + self.__name__ = "Flag" + + def __call__(self, *flag_data): + self.flagging_callback.flag(list(flag_data), flag_option=self.flag_option) diff --git a/gradio-modified/gradio/helpers.py b/gradio-modified/gradio/helpers.py new file mode 100644 index 0000000000000000000000000000000000000000..4d2d329331766f0b9b94175412e061aca218e683 --- /dev/null +++ b/gradio-modified/gradio/helpers.py @@ -0,0 +1,792 @@ +""" +Defines helper methods useful for loading and caching Interface examples. +""" +from __future__ import annotations + +import ast +import csv +import inspect +import os +import subprocess +import tempfile +import threading +import warnings +from pathlib import Path +from typing import TYPE_CHECKING, Any, Callable, Iterable, List, Optional, Tuple + +import matplotlib +import matplotlib.pyplot as plt +import numpy as np +import PIL + +from gradio import processing_utils, routes, utils +from gradio.context import Context +from gradio.documentation import document, set_documentation_group +from gradio.flagging import CSVLogger + +if TYPE_CHECKING: # Only import for type checking (to avoid circular imports). + from gradio.components import IOComponent + +CACHED_FOLDER = "gradio_cached_examples" +LOG_FILE = "log.csv" + +set_documentation_group("helpers") + + +def create_examples( + examples: List[Any] | List[List[Any]] | str, + inputs: IOComponent | List[IOComponent], + outputs: IOComponent | List[IOComponent] | None = None, + fn: Callable | None = None, + cache_examples: bool = False, + examples_per_page: int = 10, + _api_mode: bool = False, + label: str | None = None, + elem_id: str | None = None, + run_on_click: bool = False, + preprocess: bool = True, + postprocess: bool = True, + batch: bool = False, +): + """Top-level synchronous function that creates Examples. Provided for backwards compatibility, i.e. so that gr.Examples(...) can be used to create the Examples component.""" + examples_obj = Examples( + examples=examples, + inputs=inputs, + outputs=outputs, + fn=fn, + cache_examples=cache_examples, + examples_per_page=examples_per_page, + _api_mode=_api_mode, + label=label, + elem_id=elem_id, + run_on_click=run_on_click, + preprocess=preprocess, + postprocess=postprocess, + batch=batch, + _initiated_directly=False, + ) + utils.synchronize_async(examples_obj.create) + return examples_obj + + +@document() +class Examples: + """ + This class is a wrapper over the Dataset component and can be used to create Examples + for Blocks / Interfaces. Populates the Dataset component with examples and + assigns event listener so that clicking on an example populates the input/output + components. Optionally handles example caching for fast inference. + + Demos: blocks_inputs, fake_gan + Guides: more_on_examples_and_flagging, using_hugging_face_integrations, image_classification_in_pytorch, image_classification_in_tensorflow, image_classification_with_vision_transformers, create_your_own_friends_with_a_gan + """ + + def __init__( + self, + examples: List[Any] | List[List[Any]] | str, + inputs: IOComponent | List[IOComponent], + outputs: Optional[IOComponent | List[IOComponent]] = None, + fn: Optional[Callable] = None, + cache_examples: bool = False, + examples_per_page: int = 10, + _api_mode: bool = False, + label: str = "Examples", + elem_id: Optional[str] = None, + run_on_click: bool = False, + preprocess: bool = True, + postprocess: bool = True, + batch: bool = False, + _initiated_directly: bool = True, + ): + """ + Parameters: + examples: example inputs that can be clicked to populate specific components. Should be nested list, in which the outer list consists of samples and each inner list consists of an input corresponding to each input component. A string path to a directory of examples can also be provided but it should be within the directory with the python file running the gradio app. If there are multiple input components and a directory is provided, a log.csv file must be present in the directory to link corresponding inputs. + inputs: the component or list of components corresponding to the examples + outputs: optionally, provide the component or list of components corresponding to the output of the examples. Required if `cache` is True. + fn: optionally, provide the function to run to generate the outputs corresponding to the examples. Required if `cache` is True. + cache_examples: if True, caches examples for fast runtime. If True, then `fn` and `outputs` need to be provided + examples_per_page: how many examples to show per page. + label: the label to use for the examples component (by default, "Examples") + elem_id: an optional string that is assigned as the id of this component in the HTML DOM. + run_on_click: if cache_examples is False, clicking on an example does not run the function when an example is clicked. Set this to True to run the function when an example is clicked. Has no effect if cache_examples is True. + preprocess: if True, preprocesses the example input before running the prediction function and caching the output. Only applies if cache_examples is True. + postprocess: if True, postprocesses the example output after running the prediction function and before caching. Only applies if cache_examples is True. + batch: If True, then the function should process a batch of inputs, meaning that it should accept a list of input values for each parameter. Used only if cache_examples is True. + """ + if _initiated_directly: + warnings.warn( + "Please use gr.Examples(...) instead of gr.examples.Examples(...) to create the Examples.", + ) + + if cache_examples and (fn is None or outputs is None): + raise ValueError("If caching examples, `fn` and `outputs` must be provided") + + if not isinstance(inputs, list): + inputs = [inputs] + if not isinstance(outputs, list): + outputs = [outputs] + + working_directory = Path().absolute() + + if examples is None: + raise ValueError("The parameter `examples` cannot be None") + elif isinstance(examples, list) and ( + len(examples) == 0 or isinstance(examples[0], list) + ): + pass + elif ( + isinstance(examples, list) and len(inputs) == 1 + ): # If there is only one input component, examples can be provided as a regular list instead of a list of lists + examples = [[e] for e in examples] + elif isinstance(examples, str): + if not os.path.exists(examples): + raise FileNotFoundError( + "Could not find examples directory: " + examples + ) + working_directory = examples + if not os.path.exists(os.path.join(examples, LOG_FILE)): + if len(inputs) == 1: + examples = [[e] for e in os.listdir(examples)] + else: + raise FileNotFoundError( + "Could not find log file (required for multiple inputs): " + + LOG_FILE + ) + else: + with open(os.path.join(examples, LOG_FILE)) as logs: + examples = list(csv.reader(logs)) + examples = [ + examples[i][: len(inputs)] for i in range(1, len(examples)) + ] # remove header and unnecessary columns + + else: + raise ValueError( + "The parameter `examples` must either be a string directory or a list" + "(if there is only 1 input component) or (more generally), a nested " + "list, where each sublist represents a set of inputs." + ) + + input_has_examples = [False] * len(inputs) + for example in examples: + for idx, example_for_input in enumerate(example): + if not (example_for_input is None): + try: + input_has_examples[idx] = True + except IndexError: + pass # If there are more example components than inputs, ignore. This can sometimes be intentional (e.g. loading from a log file where outputs and timestamps are also logged) + + inputs_with_examples = [ + inp for (inp, keep) in zip(inputs, input_has_examples) if keep + ] + non_none_examples = [ + [ex for (ex, keep) in zip(example, input_has_examples) if keep] + for example in examples + ] + + self.examples = examples + self.non_none_examples = non_none_examples + self.inputs = inputs + self.inputs_with_examples = inputs_with_examples + self.outputs = outputs + self.fn = fn + self.cache_examples = cache_examples + self._api_mode = _api_mode + self.preprocess = preprocess + self.postprocess = postprocess + self.batch = batch + + with utils.set_directory(working_directory): + self.processed_examples = [ + [ + component.postprocess(sample) + for component, sample in zip(inputs, example) + ] + for example in examples + ] + self.non_none_processed_examples = [ + [ex for (ex, keep) in zip(example, input_has_examples) if keep] + for example in self.processed_examples + ] + if cache_examples: + for example in self.examples: + if len([ex for ex in example if ex is not None]) != len(self.inputs): + warnings.warn( + "Examples are being cached but not all input components have " + "example values. This may result in an exception being thrown by " + "your function. If you do get an error while caching examples, make " + "sure all of your inputs have example values for all of your examples " + "or you provide default values for those particular parameters in your function." + ) + break + + from gradio.components import Dataset + + with utils.set_directory(working_directory): + self.dataset = Dataset( + components=inputs_with_examples, + samples=non_none_examples, + type="index", + label=label, + samples_per_page=examples_per_page, + elem_id=elem_id, + ) + + self.cached_folder = os.path.join(CACHED_FOLDER, str(self.dataset._id)) + self.cached_file = os.path.join(self.cached_folder, "log.csv") + self.cache_examples = cache_examples + self.run_on_click = run_on_click + + async def create(self) -> None: + """Caches the examples if self.cache_examples is True and creates the Dataset + component to hold the examples""" + + async def load_example(example_id): + if self.cache_examples: + processed_example = self.non_none_processed_examples[ + example_id + ] + await self.load_from_cache(example_id) + else: + processed_example = self.non_none_processed_examples[example_id] + return utils.resolve_singleton(processed_example) + + if Context.root_block: + self.dataset.click( + load_example, + inputs=[self.dataset], + outputs=self.inputs_with_examples + + (self.outputs if self.cache_examples else []), + postprocess=False, + queue=False, + ) + if self.run_on_click and not self.cache_examples: + self.dataset.click( + self.fn, + inputs=self.inputs, + outputs=self.outputs, + ) + + if self.cache_examples: + await self.cache() + + async def cache(self) -> None: + """ + Caches all of the examples so that their predictions can be shown immediately. + """ + if os.path.exists(self.cached_file): + print( + f"Using cache from '{os.path.abspath(self.cached_folder)}' directory. If method or examples have changed since last caching, delete this folder to clear cache." + ) + else: + if Context.root_block is None: + raise ValueError("Cannot cache examples if not in a Blocks context") + + print(f"Caching examples at: '{os.path.abspath(self.cached_file)}'") + cache_logger = CSVLogger() + + # create a fake dependency to process the examples and get the predictions + dependency = Context.root_block.set_event_trigger( + event_name="fake_event", + fn=self.fn, + inputs=self.inputs_with_examples, + outputs=self.outputs, + preprocess=self.preprocess and not self._api_mode, + postprocess=self.postprocess and not self._api_mode, + batch=self.batch, + ) + + fn_index = Context.root_block.dependencies.index(dependency) + cache_logger.setup(self.outputs, self.cached_folder) + for example_id, _ in enumerate(self.examples): + processed_input = self.processed_examples[example_id] + if self.batch: + processed_input = [[value] for value in processed_input] + prediction = await Context.root_block.process_api( + fn_index=fn_index, inputs=processed_input, request=None, state={} + ) + output = prediction["data"] + if self.batch: + output = [value[0] for value in output] + cache_logger.flag(output) + # Remove the "fake_event" to prevent bugs in loading interfaces from spaces + Context.root_block.dependencies.remove(dependency) + Context.root_block.fns.pop(fn_index) + + async def load_from_cache(self, example_id: int) -> List[Any]: + """Loads a particular cached example for the interface. + Parameters: + example_id: The id of the example to process (zero-indexed). + """ + with open(self.cached_file) as cache: + examples = list(csv.reader(cache)) + example = examples[example_id + 1] # +1 to adjust for header + output = [] + for component, value in zip(self.outputs, example): + try: + value_as_dict = ast.literal_eval(value) + assert utils.is_update(value_as_dict) + output.append(value_as_dict) + except (ValueError, TypeError, SyntaxError, AssertionError): + output.append(component.serialize(value, self.cached_folder)) + return output + + +class TrackedIterable: + def __init__( + self, + iterable: Iterable, + index: int | None, + length: int | None, + desc: str | None, + unit: str | None, + _tqdm=None, + progress: float = None, + ) -> None: + self.iterable = iterable + self.index = index + self.length = length + self.desc = desc + self.unit = unit + self._tqdm = _tqdm + self.progress = progress + + +@document("__call__", "tqdm") +class Progress(Iterable): + """ + The Progress class provides a custom progress tracker that is used in a function signature. + To attach a Progress tracker to a function, simply add a parameter right after the input parameters that has a default value set to a `gradio.Progress()` instance. + The Progress tracker can then be updated in the function by calling the Progress object or using the `tqdm` method on an Iterable. + The Progress tracker is currently only available with `queue()`. + Example: + import gradio as gr + import time + def my_function(x, progress=gr.Progress()): + progress(0, desc="Starting...") + time.sleep(1) + for i in progress.tqdm(range(100)): + time.sleep(0.1) + return x + gr.Interface(my_function, gr.Textbox(), gr.Textbox()).queue().launch() + Demos: progress + """ + + def __init__( + self, + track_tqdm: bool = False, + _active: bool = False, + _callback: Callable = None, + _event_id: str = None, + ): + """ + Parameters: + track_tqdm: If True, the Progress object will track any tqdm.tqdm iterations with the tqdm library in the function. + """ + self.track_tqdm = track_tqdm + self._active = _active + self._callback = _callback + self._event_id = _event_id + self.iterables: List[TrackedIterable] = [] + + def __len__(self): + return self.iterables[-1].length + + def __iter__(self): + return self + + def __next__(self): + """ + Updates progress tracker with next item in iterable. + """ + if self._active: + current_iterable = self.iterables[-1] + while ( + not hasattr(current_iterable.iterable, "__next__") + and len(self.iterables) > 0 + ): + current_iterable = self.iterables.pop() + self._callback( + event_id=self._event_id, + iterables=self.iterables, + ) + current_iterable.index += 1 + try: + return next(current_iterable.iterable) + except StopIteration: + self.iterables.pop() + raise StopIteration + else: + return self + + def __call__( + self, + progress: float | Tuple[int, int | None] | None, + desc: str | None = None, + total: float | None = None, + unit: str = "steps", + _tqdm=None, + ): + """ + Updates progress tracker with progress and message text. + Parameters: + progress: If float, should be between 0 and 1 representing completion. If Tuple, first number represents steps completed, and second value represents total steps or None if unknown. If None, hides progress bar. + desc: description to display. + total: estimated total number of steps. + unit: unit of iterations. + """ + if self._active: + if isinstance(progress, tuple): + index, total = progress + progress = None + else: + index = None + self._callback( + event_id=self._event_id, + iterables=self.iterables + + [TrackedIterable(None, index, total, desc, unit, _tqdm, progress)], + ) + else: + return progress + + def tqdm( + self, + iterable: Iterable | None, + desc: str = None, + total: float = None, + unit: str = "steps", + _tqdm=None, + *args, + **kwargs, + ): + """ + Attaches progress tracker to iterable, like tqdm. + Parameters: + iterable: iterable to attach progress tracker to. + desc: description to display. + total: estimated total number of steps. + unit: unit of iterations. + """ + if iterable is None: + new_iterable = TrackedIterable(None, 0, total, desc, unit, _tqdm) + self.iterables.append(new_iterable) + self._callback(event_id=self._event_id, iterables=self.iterables) + return + length = len(iterable) if hasattr(iterable, "__len__") else None + self.iterables.append( + TrackedIterable(iter(iterable), 0, length, desc, unit, _tqdm) + ) + return self + + def update(self, n=1): + """ + Increases latest iterable with specified number of steps. + Parameters: + n: number of steps completed. + """ + if self._active and len(self.iterables) > 0: + current_iterable = self.iterables[-1] + current_iterable.index += n + self._callback( + event_id=self._event_id, + iterables=self.iterables, + ) + else: + return + + def close(self, _tqdm): + """ + Removes iterable with given _tqdm. + """ + if self._active: + for i in range(len(self.iterables)): + if id(self.iterables[i]._tqdm) == id(_tqdm): + self.iterables.pop(i) + break + self._callback( + event_id=self._event_id, + iterables=self.iterables, + ) + else: + return + + +def create_tracker(root_blocks, event_id, fn, track_tqdm): + + progress = Progress( + _active=True, _callback=root_blocks._queue.set_progress, _event_id=event_id + ) + if not track_tqdm: + return progress, fn + + try: + _tqdm = __import__("tqdm") + except ModuleNotFoundError: + return progress, fn + if not hasattr(root_blocks, "_progress_tracker_per_thread"): + root_blocks._progress_tracker_per_thread = {} + + def init_tqdm(self, iterable=None, desc=None, *args, **kwargs): + self._progress = root_blocks._progress_tracker_per_thread.get( + threading.get_ident() + ) + if self._progress is not None: + self._progress.event_id = event_id + self._progress.tqdm(iterable, desc, _tqdm=self, *args, **kwargs) + kwargs["file"] = open(os.devnull, "w") + self.__init__orig__(iterable, desc, *args, **kwargs) + + def iter_tqdm(self): + if self._progress is not None: + return self._progress + else: + return self.__iter__orig__() + + def update_tqdm(self, n=1): + if self._progress is not None: + self._progress.update(n) + return self.__update__orig__(n) + + def close_tqdm(self): + if self._progress is not None: + self._progress.close(self) + return self.__close__orig__() + + def exit_tqdm(self, exc_type, exc_value, traceback): + if self._progress is not None: + self._progress.close(self) + return self.__exit__orig__(exc_type, exc_value, traceback) + + if not hasattr(_tqdm.tqdm, "__init__orig__"): + _tqdm.tqdm.__init__orig__ = _tqdm.tqdm.__init__ + _tqdm.tqdm.__init__ = init_tqdm + if not hasattr(_tqdm.tqdm, "__update__orig__"): + _tqdm.tqdm.__update__orig__ = _tqdm.tqdm.update + _tqdm.tqdm.update = update_tqdm + if not hasattr(_tqdm.tqdm, "__close__orig__"): + _tqdm.tqdm.__close__orig__ = _tqdm.tqdm.close + _tqdm.tqdm.close = close_tqdm + if not hasattr(_tqdm.tqdm, "__exit__orig__"): + _tqdm.tqdm.__exit__orig__ = _tqdm.tqdm.__exit__ + _tqdm.tqdm.__exit__ = exit_tqdm + if not hasattr(_tqdm.tqdm, "__iter__orig__"): + _tqdm.tqdm.__iter__orig__ = _tqdm.tqdm.__iter__ + _tqdm.tqdm.__iter__ = iter_tqdm + if hasattr(_tqdm, "auto") and hasattr(_tqdm.auto, "tqdm"): + _tqdm.auto.tqdm = _tqdm.tqdm + + def tracked_fn(*args): + thread_id = threading.get_ident() + root_blocks._progress_tracker_per_thread[thread_id] = progress + response = fn(*args) + del root_blocks._progress_tracker_per_thread[thread_id] + return response + + return progress, tracked_fn + + +def special_args( + fn: Callable, + inputs: List[Any] | None = None, + request: routes.Request | None = None, +): + """ + Checks if function has special arguments Request (via annotation) or Progress (via default value). + If inputs is provided, these values will be loaded into the inputs array. + Parameters: + block_fn: function to check. + inputs: array to load special arguments into. + request: request to load into inputs. + Returns: + updated inputs, request index, progress index + """ + signature = inspect.signature(fn) + positional_args = [] + for i, param in enumerate(signature.parameters.values()): + if param.kind not in (param.POSITIONAL_ONLY, param.POSITIONAL_OR_KEYWORD): + break + positional_args.append(param) + progress_index = None + for i, param in enumerate(positional_args): + if isinstance(param.default, Progress): + progress_index = i + if inputs is not None: + inputs.insert(i, param.default) + elif param.annotation == routes.Request: + if inputs is not None: + inputs.insert(i, request) + if inputs is not None: + while len(inputs) < len(positional_args): + i = len(inputs) + param = positional_args[i] + if param.default == param.empty: + warnings.warn("Unexpected argument. Filling with None.") + inputs.append(None) + else: + inputs.append(param.default) + return inputs or [], progress_index + + +@document() +def update(**kwargs) -> dict: + """ + Updates component properties. When a function passed into a Gradio Interface or a Blocks events returns a typical value, it updates the value of the output component. But it is also possible to update the properties of an output component (such as the number of lines of a `Textbox` or the visibility of an `Image`) by returning the component's `update()` function, which takes as parameters any of the constructor parameters for that component. + This is a shorthand for using the update method on a component. + For example, rather than using gr.Number.update(...) you can just use gr.update(...). + Note that your editor's autocompletion will suggest proper parameters + if you use the update method on the component. + Demos: blocks_essay, blocks_update, blocks_essay_update + + Parameters: + kwargs: Key-word arguments used to update the component's properties. + Example: + # Blocks Example + import gradio as gr + with gr.Blocks() as demo: + radio = gr.Radio([1, 2, 4], label="Set the value of the number") + number = gr.Number(value=2, interactive=True) + radio.change(fn=lambda value: gr.update(value=value), inputs=radio, outputs=number) + demo.launch() + + # Interface example + import gradio as gr + def change_textbox(choice): + if choice == "short": + return gr.Textbox.update(lines=2, visible=True) + elif choice == "long": + return gr.Textbox.update(lines=8, visible=True) + else: + return gr.Textbox.update(visible=False) + gr.Interface( + change_textbox, + gr.Radio( + ["short", "long", "none"], label="What kind of essay would you like to write?" + ), + gr.Textbox(lines=2), + live=True, + ).launch() + """ + kwargs["__type__"] = "generic_update" + return kwargs + + +def skip() -> dict: + return update() + + +@document() +def make_waveform( + audio: str | Tuple[int, np.ndarray], + *, + bg_color: str = "#f3f4f6", + bg_image: str = None, + fg_alpha: float = 0.75, + bars_color: str | Tuple[str, str] = ("#fbbf24", "#ea580c"), + bar_count: int = 50, + bar_width: float = 0.6, +): + """ + Generates a waveform video from an audio file. Useful for creating an easy to share audio visualization. The output should be passed into a `gr.Video` component. + Parameters: + audio: Audio file path or tuple of (sample_rate, audio_data) + bg_color: Background color of waveform (ignored if bg_image is provided) + bg_image: Background image of waveform + fg_alpha: Opacity of foreground waveform + bars_color: Color of waveform bars. Can be a single color or a tuple of (start_color, end_color) of gradient + bar_count: Number of bars in waveform + bar_width: Width of bars in waveform. 1 represents full width, 0.5 represents half width, etc. + Returns: + A filepath to the output video. + """ + if isinstance(audio, str): + audio_file = audio + audio = processing_utils.audio_from_file(audio) + else: + tmp_wav = tempfile.NamedTemporaryFile(suffix=".wav", delete=False) + processing_utils.audio_to_file(audio[0], audio[1], tmp_wav.name) + audio_file = tmp_wav.name + duration = round(len(audio[1]) / audio[0], 4) + + # Helper methods to create waveform + def hex_to_RGB(hex_str): + return [int(hex_str[i : i + 2], 16) for i in range(1, 6, 2)] + + def get_color_gradient(c1, c2, n): + assert n > 1 + c1_rgb = np.array(hex_to_RGB(c1)) / 255 + c2_rgb = np.array(hex_to_RGB(c2)) / 255 + mix_pcts = [x / (n - 1) for x in range(n)] + rgb_colors = [((1 - mix) * c1_rgb + (mix * c2_rgb)) for mix in mix_pcts] + return [ + "#" + "".join([format(int(round(val * 255)), "02x") for val in item]) + for item in rgb_colors + ] + + # Reshape audio to have a fixed number of bars + samples = audio[1] + if len(samples.shape) > 1: + samples = np.mean(samples, 1) + bins_to_pad = bar_count - (len(samples) % bar_count) + samples = np.pad(samples, [(0, bins_to_pad)]) + samples = np.reshape(samples, (bar_count, -1)) + samples = np.abs(samples) + samples = np.max(samples, 1) + + matplotlib.use("Agg") + plt.clf() + # Plot waveform + color = ( + bars_color + if isinstance(bars_color, str) + else get_color_gradient(bars_color[0], bars_color[1], bar_count) + ) + plt.bar( + np.arange(0, bar_count), + samples * 2, + bottom=(-1 * samples), + width=bar_width, + color=color, + ) + plt.axis("off") + plt.margins(x=0) + tmp_img = tempfile.NamedTemporaryFile(suffix=".png", delete=False) + savefig_kwargs = {"bbox_inches": "tight"} + if bg_image is not None: + savefig_kwargs["transparent"] = True + else: + savefig_kwargs["facecolor"] = bg_color + plt.savefig(tmp_img.name, **savefig_kwargs) + waveform_img = PIL.Image.open(tmp_img.name) + waveform_img = waveform_img.resize((1000, 200)) + + # Composite waveform with background image + if bg_image is not None: + waveform_array = np.array(waveform_img) + waveform_array[:, :, 3] = waveform_array[:, :, 3] * fg_alpha + waveform_img = PIL.Image.fromarray(waveform_array) + + bg_img = PIL.Image.open(bg_image) + waveform_width, waveform_height = waveform_img.size + bg_width, bg_height = bg_img.size + if waveform_width != bg_width: + bg_img = bg_img.resize( + (waveform_width, 2 * int(bg_height * waveform_width / bg_width / 2)) + ) + bg_width, bg_height = bg_img.size + composite_height = max(bg_height, waveform_height) + composite = PIL.Image.new("RGBA", (waveform_width, composite_height), "#FFFFFF") + composite.paste(bg_img, (0, composite_height - bg_height)) + composite.paste( + waveform_img, (0, composite_height - waveform_height), waveform_img + ) + composite.save(tmp_img.name) + img_width, img_height = composite.size + else: + img_width, img_height = waveform_img.size + waveform_img.save(tmp_img.name) + + # Convert waveform to video with ffmpeg + output_mp4 = tempfile.NamedTemporaryFile(suffix=".mp4", delete=False) + + ffmpeg_cmd = f"""ffmpeg -loop 1 -i {tmp_img.name} -i {audio_file} -vf "color=c=#FFFFFF77:s={img_width}x{img_height}[bar];[0][bar]overlay=-w+(w/{duration})*t:H-h:shortest=1" -t {duration} -y {output_mp4.name}""" + + subprocess.call(ffmpeg_cmd, shell=True) + return output_mp4.name diff --git a/gradio-modified/gradio/inputs.py b/gradio-modified/gradio/inputs.py new file mode 100644 index 0000000000000000000000000000000000000000..ae7c6c25dbbce899551e8e4f1559e43823a7b028 --- /dev/null +++ b/gradio-modified/gradio/inputs.py @@ -0,0 +1,473 @@ +# type: ignore +""" +This module defines various classes that can serve as the `input` to an interface. Each class must inherit from +`InputComponent`, and each class must define a path to its template. All of the subclasses of `InputComponent` are +automatically added to a registry, which allows them to be easily referenced in other parts of the code. +""" + +from __future__ import annotations + +import warnings +from typing import Any, List, Optional, Tuple + +from gradio import components + + +class Textbox(components.Textbox): + def __init__( + self, + lines: int = 1, + placeholder: Optional[str] = None, + default: str = "", + numeric: Optional[bool] = False, + type: Optional[str] = "text", + label: Optional[str] = None, + optional: bool = False, + ): + warnings.warn( + "Usage of gradio.inputs is deprecated, and will not be supported in the future, please import your component from gradio.components", + ) + super().__init__( + value=default, + lines=lines, + placeholder=placeholder, + label=label, + numeric=numeric, + type=type, + optional=optional, + ) + + +class Number(components.Number): + """ + Component creates a field for user to enter numeric input. Provides a number as an argument to the wrapped function. + Input type: float + """ + + def __init__( + self, + default: Optional[float] = None, + label: Optional[str] = None, + optional: bool = False, + ): + """ + Parameters: + default (float): default value. + label (str): component name in interface. + optional (bool): If True, the interface can be submitted with no value for this component. + """ + warnings.warn( + "Usage of gradio.inputs is deprecated, and will not be supported in the future, please import your component from gradio.components", + ) + super().__init__(value=default, label=label, optional=optional) + + +class Slider(components.Slider): + """ + Component creates a slider that ranges from `minimum` to `maximum`. Provides number as an argument to the wrapped function. + Input type: float + """ + + def __init__( + self, + minimum: float = 0, + maximum: float = 100, + step: Optional[float] = None, + default: Optional[float] = None, + label: Optional[str] = None, + optional: bool = False, + ): + """ + Parameters: + minimum (float): minimum value for slider. + maximum (float): maximum value for slider. + step (float): increment between slider values. + default (float): default value. + label (str): component name in interface. + optional (bool): this parameter is ignored. + """ + warnings.warn( + "Usage of gradio.inputs is deprecated, and will not be supported in the future, please import your component from gradio.components", + ) + + super().__init__( + value=default, + minimum=minimum, + maximum=maximum, + step=step, + label=label, + optional=optional, + ) + + +class Checkbox(components.Checkbox): + """ + Component creates a checkbox that can be set to `True` or `False`. Provides a boolean as an argument to the wrapped function. + Input type: bool + """ + + def __init__( + self, + default: bool = False, + label: Optional[str] = None, + optional: bool = False, + ): + """ + Parameters: + label (str): component name in interface. + default (bool): if True, checked by default. + optional (bool): this parameter is ignored. + """ + warnings.warn( + "Usage of gradio.inputs is deprecated, and will not be supported in the future, please import your component from gradio.components", + ) + super().__init__(value=default, label=label, optional=optional) + + +class CheckboxGroup(components.CheckboxGroup): + """ + Component creates a set of checkboxes of which a subset can be selected. Provides a list of strings representing the selected choices as an argument to the wrapped function. + Input type: Union[List[str], List[int]] + """ + + def __init__( + self, + choices: List[str], + default: List[str] = [], + type: str = "value", + label: Optional[str] = None, + optional: bool = False, + ): + """ + Parameters: + choices (List[str]): list of options to select from. + default (List[str]): default selected list of options. + type (str): Type of value to be returned by component. "value" returns the list of strings of the choices selected, "index" returns the list of indicies of the choices selected. + label (str): component name in interface. + optional (bool): this parameter is ignored. + """ + warnings.warn( + "Usage of gradio.inputs is deprecated, and will not be supported in the future, please import your component from gradio.components", + ) + super().__init__( + value=default, + choices=choices, + type=type, + label=label, + optional=optional, + ) + + +class Radio(components.Radio): + """ + Component creates a set of radio buttons of which only one can be selected. Provides string representing selected choice as an argument to the wrapped function. + Input type: Union[str, int] + """ + + def __init__( + self, + choices: List[str], + type: str = "value", + default: Optional[str] = None, + label: Optional[str] = None, + optional: bool = False, + ): + """ + Parameters: + choices (List[str]): list of options to select from. + type (str): Type of value to be returned by component. "value" returns the string of the choice selected, "index" returns the index of the choice selected. + default (str): the button selected by default. If None, no button is selected by default. + label (str): component name in interface. + optional (bool): this parameter is ignored. + """ + warnings.warn( + "Usage of gradio.inputs is deprecated, and will not be supported in the future, please import your component from gradio.components", + ) + super().__init__( + choices=choices, + type=type, + value=default, + label=label, + optional=optional, + ) + + +class Dropdown(components.Dropdown): + """ + Component creates a dropdown of which only one can be selected. Provides string representing selected choice as an argument to the wrapped function. + Input type: Union[str, int] + """ + + def __init__( + self, + choices: List[str], + type: str = "value", + default: Optional[str] = None, + label: Optional[str] = None, + optional: bool = False, + ): + """ + Parameters: + choices (List[str]): list of options to select from. + type (str): Type of value to be returned by component. "value" returns the string of the choice selected, "index" returns the index of the choice selected. + default (str): default value selected in dropdown. If None, no value is selected by default. + label (str): component name in interface. + optional (bool): this parameter is ignored. + """ + warnings.warn( + "Usage of gradio.inputs is deprecated, and will not be supported in the future, please import your component from gradio.components", + ) + super().__init__( + choices=choices, + type=type, + value=default, + label=label, + optional=optional, + ) + + +class Image(components.Image): + """ + Component creates an image upload box with editing capabilities. + Input type: Union[numpy.array, PIL.Image, file-object] + """ + + def __init__( + self, + shape: Tuple[int, int] = None, + image_mode: str = "RGB", + invert_colors: bool = False, + source: str = "upload", + tool: str = "editor", + type: str = "numpy", + label: str = None, + optional: bool = False, + ): + """ + Parameters: + shape (Tuple[int, int]): (width, height) shape to crop and resize image to; if None, matches input image size. + image_mode (str): How to process the uploaded image. Accepts any of the PIL image modes, e.g. "RGB" for color images, "RGBA" to include the transparency mask, "L" for black-and-white images. + invert_colors (bool): whether to invert the image as a preprocessing step. + source (str): Source of image. "upload" creates a box where user can drop an image file, "webcam" allows user to take snapshot from their webcam, "canvas" defaults to a white image that can be edited and drawn upon with tools. + tool (str): Tools used for editing. "editor" allows a full screen editor, "select" provides a cropping and zoom tool. + type (str): Type of value to be returned by component. "numpy" returns a numpy array with shape (width, height, 3) and values from 0 to 255, "pil" returns a PIL image object, "file" returns a temporary file object whose path can be retrieved by file_obj.name, "filepath" returns the path directly. + label (str): component name in interface. + optional (bool): If True, the interface can be submitted with no uploaded image, in which case the input value is None. + """ + warnings.warn( + "Usage of gradio.inputs is deprecated, and will not be supported in the future, please import your component from gradio.components", + ) + super().__init__( + shape=shape, + image_mode=image_mode, + invert_colors=invert_colors, + source=source, + tool=tool, + type=type, + label=label, + optional=optional, + ) + + +class Video(components.Video): + """ + Component creates a video file upload that is converted to a file path. + + Input type: filepath + """ + + def __init__( + self, + type: Optional[str] = None, + source: str = "upload", + label: Optional[str] = None, + optional: bool = False, + ): + """ + Parameters: + type (str): Type of video format to be returned by component, such as 'avi' or 'mp4'. If set to None, video will keep uploaded format. + source (str): Source of video. "upload" creates a box where user can drop an video file, "webcam" allows user to record a video from their webcam. + label (str): component name in interface. + optional (bool): If True, the interface can be submitted with no uploaded video, in which case the input value is None. + """ + warnings.warn( + "Usage of gradio.inputs is deprecated, and will not be supported in the future, please import your components from gradio.components", + ) + super().__init__(format=type, source=source, label=label, optional=optional) + + +class Audio(components.Audio): + """ + Component accepts audio input files. + Input type: Union[Tuple[int, numpy.array], file-object, numpy.array] + """ + + def __init__( + self, + source: str = "upload", + type: str = "numpy", + label: str = None, + optional: bool = False, + ): + """ + Parameters: + source (str): Source of audio. "upload" creates a box where user can drop an audio file, "microphone" creates a microphone input. + type (str): Type of value to be returned by component. "numpy" returns a 2-set tuple with an integer sample_rate and the data numpy.array of shape (samples, 2), "file" returns a temporary file object whose path can be retrieved by file_obj.name, "filepath" returns the path directly. + label (str): component name in interface. + optional (bool): If True, the interface can be submitted with no uploaded audio, in which case the input value is None. + """ + warnings.warn( + "Usage of gradio.inputs is deprecated, and will not be supported in the future, please import your components from gradio.components", + ) + super().__init__(source=source, type=type, label=label, optional=optional) + + +class File(components.File): + """ + Component accepts generic file uploads. + Input type: Union[file-object, bytes, List[Union[file-object, bytes]]] + """ + + def __init__( + self, + file_count: str = "single", + type: str = "file", + label: Optional[str] = None, + keep_filename: bool = True, + optional: bool = False, + ): + """ + Parameters: + file_count (str): if single, allows user to upload one file. If "multiple", user uploads multiple files. If "directory", user uploads all files in selected directory. Return type will be list for each file in case of "multiple" or "directory". + type (str): Type of value to be returned by component. "file" returns a temporary file object whose path can be retrieved by file_obj.name, "binary" returns an bytes object. + label (str): component name in interface. + keep_filename (bool): DEPRECATED. Original filename always kept. + optional (bool): If True, the interface can be submitted with no uploaded image, in which case the input value is None. + """ + warnings.warn( + "Usage of gradio.inputs is deprecated, and will not be supported in the future, please import your components from gradio.components", + ) + super().__init__( + file_count=file_count, + type=type, + label=label, + keep_filename=keep_filename, + optional=optional, + ) + + +class Dataframe(components.Dataframe): + """ + Component accepts 2D input through a spreadsheet interface. + Input type: Union[pandas.DataFrame, numpy.array, List[Union[str, float]], List[List[Union[str, float]]]] + """ + + def __init__( + self, + headers: Optional[List[str]] = None, + row_count: int = 3, + col_count: Optional[int] = 3, + datatype: str | List[str] = "str", + col_width: int | List[int] = None, + default: Optional[List[List[Any]]] = None, + type: str = "pandas", + label: Optional[str] = None, + optional: bool = False, + ): + """ + Parameters: + headers (List[str]): Header names to dataframe. If None, no headers are shown. + row_count (int): Limit number of rows for input. + col_count (int): Limit number of columns for input. If equal to 1, return data will be one-dimensional. Ignored if `headers` is provided. + datatype (Union[str, List[str]]): Datatype of values in sheet. Can be provided per column as a list of strings, or for the entire sheet as a single string. Valid datatypes are "str", "number", "bool", and "date". + col_width (Union[int, List[int]]): Width of columns in pixels. Can be provided as single value or list of values per column. + default (List[List[Any]]): Default value + type (str): Type of value to be returned by component. "pandas" for pandas dataframe, "numpy" for numpy array, or "array" for a Python array. + label (str): component name in interface. + optional (bool): this parameter is ignored. + """ + warnings.warn( + "Usage of gradio.inputs is deprecated, and will not be supported in the future, please import your components from gradio.components", + ) + super().__init__( + value=default, + headers=headers, + row_count=row_count, + col_count=col_count, + datatype=datatype, + col_width=col_width, + type=type, + label=label, + optional=optional, + ) + + +class Timeseries(components.Timeseries): + """ + Component accepts pandas.DataFrame uploaded as a timeseries csv file. + Input type: pandas.DataFrame + """ + + def __init__( + self, + x: Optional[str] = None, + y: str | List[str] = None, + label: Optional[str] = None, + optional: bool = False, + ): + """ + Parameters: + x (str): Column name of x (time) series. None if csv has no headers, in which case first column is x series. + y (Union[str, List[str]]): Column name of y series, or list of column names if multiple series. None if csv has no headers, in which case every column after first is a y series. + label (str): component name in interface. + optional (bool): If True, the interface can be submitted with no uploaded csv file, in which case the input value is None. + """ + warnings.warn( + "Usage of gradio.inputs is deprecated, and will not be supported in the future, please import your components from gradio.components", + ) + super().__init__(x=x, y=y, label=label, optional=optional) + + +class State(components.State): + """ + Special hidden component that stores state across runs of the interface. + Input type: Any + """ + + def __init__( + self, + label: str = None, + default: Any = None, + ): + """ + Parameters: + label (str): component name in interface (not used). + default (Any): the initial value of the state. + optional (bool): this parameter is ignored. + """ + warnings.warn( + "Usage of gradio.inputs is deprecated, and will not be supported in the future, please import this component as gr.State() from gradio.components", + ) + super().__init__(value=default, label=label) + + +class Image3D(components.Model3D): + """ + Used for 3D image model output. + Input type: File object of type (.obj, glb, or .gltf) + """ + + def __init__( + self, + label: Optional[str] = None, + optional: bool = False, + ): + """ + Parameters: + label (str): component name in interface. + optional (bool): If True, the interface can be submitted with no uploaded image, in which case the input value is None. + """ + warnings.warn( + "Usage of gradio.outputs is deprecated, and will not be supported in the future, please import your components from gradio.components", + ) + super().__init__(label=label, optional=optional) diff --git a/gradio-modified/gradio/interface.py b/gradio-modified/gradio/interface.py new file mode 100644 index 0000000000000000000000000000000000000000..8f93b1a5575b3a4589d6412ac6139377c81c67ef --- /dev/null +++ b/gradio-modified/gradio/interface.py @@ -0,0 +1,844 @@ +""" +This is the core file in the `gradio` package, and defines the Interface class, +including various methods for constructing an interface and then launching it. +""" + +from __future__ import annotations + +import inspect +import json +import os +import pkgutil +import re +import warnings +import weakref +from typing import TYPE_CHECKING, Any, Callable, List, Tuple + +from markdown_it import MarkdownIt +from mdit_py_plugins.dollarmath.index import dollarmath_plugin +from mdit_py_plugins.footnote.index import footnote_plugin + +from gradio import Examples, interpretation, utils +from gradio.blocks import Blocks +from gradio.components import ( + Button, + Interpretation, + IOComponent, + Markdown, + State, + get_component_instance, +) +from gradio.data_classes import InterfaceTypes +from gradio.documentation import document, set_documentation_group +from gradio.events import Changeable, Streamable +from gradio.flagging import CSVLogger, FlaggingCallback, FlagMethod +from gradio.layouts import Column, Row, Tab, Tabs +from gradio.pipelines import load_from_pipeline + +set_documentation_group("interface") + +if TYPE_CHECKING: # Only import for type checking (is False at runtime). + from transformers.pipelines.base import Pipeline + + +@document("launch", "load", "from_pipeline", "integrate", "queue") +class Interface(Blocks): + """ + Interface is Gradio's main high-level class, and allows you to create a web-based GUI / demo + around a machine learning model (or any Python function) in a few lines of code. + You must specify three parameters: (1) the function to create a GUI for (2) the desired input components and + (3) the desired output components. Additional parameters can be used to control the appearance + and behavior of the demo. + + Example: + import gradio as gr + + def image_classifier(inp): + return {'cat': 0.3, 'dog': 0.7} + + demo = gr.Interface(fn=image_classifier, inputs="image", outputs="label") + demo.launch() + Demos: hello_world, hello_world_3, gpt_j + Guides: quickstart, key_features, sharing_your_app, interface_state, reactive_interfaces, advanced_interface_features, setting_up_a_gradio_demo_for_maximum_performance + """ + + # stores references to all currently existing Interface instances + instances: weakref.WeakSet = weakref.WeakSet() + + @classmethod + def get_instances(cls) -> List[Interface]: + """ + :return: list of all current instances. + """ + return list(Interface.instances) + + @classmethod + def load( + cls, + name: str, + src: str | None = None, + api_key: str | None = None, + alias: str | None = None, + **kwargs, + ) -> Interface: + """ + Class method that constructs an Interface from a Hugging Face repo. Can accept + model repos (if src is "models") or Space repos (if src is "spaces"). The input + and output components are automatically loaded from the repo. + Parameters: + name: the name of the model (e.g. "gpt2" or "facebook/bart-base") or space (e.g. "flax-community/spanish-gpt2"), can include the `src` as prefix (e.g. "models/facebook/bart-base") + src: the source of the model: `models` or `spaces` (or leave empty if source is provided as a prefix in `name`) + api_key: optional access token for loading private Hugging Face Hub models or spaces. Find your token here: https://huggingface.co/settings/tokens + alias: optional string used as the name of the loaded model instead of the default name (only applies if loading a Space running Gradio 2.x) + Returns: + a Gradio Interface object for the given model + Example: + import gradio as gr + description = "Story generation with GPT" + examples = [["An adventurer is approached by a mysterious stranger in the tavern for a new quest."]] + demo = gr.Interface.load("models/EleutherAI/gpt-neo-1.3B", description=description, examples=examples) + demo.launch() + """ + return super().load(name=name, src=src, api_key=api_key, alias=alias, **kwargs) + + @classmethod + def from_pipeline(cls, pipeline: Pipeline, **kwargs) -> Interface: + """ + Class method that constructs an Interface from a Hugging Face transformers.Pipeline object. + The input and output components are automatically determined from the pipeline. + Parameters: + pipeline: the pipeline object to use. + Returns: + a Gradio Interface object from the given Pipeline + Example: + import gradio as gr + from transformers import pipeline + pipe = pipeline("image-classification") + gr.Interface.from_pipeline(pipe).launch() + """ + interface_info = load_from_pipeline(pipeline) + kwargs = dict(interface_info, **kwargs) + interface = cls(**kwargs) + return interface + + def __init__( + self, + fn: Callable, + inputs: str | IOComponent | List[str | IOComponent] | None, + outputs: str | IOComponent | List[str | IOComponent] | None, + examples: List[Any] | List[List[Any]] | str | None = None, + cache_examples: bool | None = None, + examples_per_page: int = 10, + live: bool = False, + interpretation: Callable | str | None = None, + num_shap: float = 2.0, + title: str | None = None, + description: str | None = None, + article: str | None = None, + thumbnail: str | None = None, + theme: str = "default", + css: str | None = None, + allow_flagging: str | None = None, + flagging_options: List[str] | None = None, + flagging_dir: str = "flagged", + flagging_callback: FlaggingCallback = CSVLogger(), + analytics_enabled: bool | None = None, + batch: bool = False, + max_batch_size: int = 4, + _api_mode: bool = False, + **kwargs, + ): + """ + Parameters: + fn: the function to wrap an interface around. Often a machine learning model's prediction function. Each parameter of the function corresponds to one input component, and the function should return a single value or a tuple of values, with each element in the tuple corresponding to one output component. + inputs: a single Gradio component, or list of Gradio components. Components can either be passed as instantiated objects, or referred to by their string shortcuts. The number of input components should match the number of parameters in fn. If set to None, then only the output components will be displayed. + outputs: a single Gradio component, or list of Gradio components. Components can either be passed as instantiated objects, or referred to by their string shortcuts. The number of output components should match the number of values returned by fn. If set to None, then only the input components will be displayed. + examples: sample inputs for the function; if provided, appear below the UI components and can be clicked to populate the interface. Should be nested list, in which the outer list consists of samples and each inner list consists of an input corresponding to each input component. A string path to a directory of examples can also be provided, but it should be within the directory with the python file running the gradio app. If there are multiple input components and a directory is provided, a log.csv file must be present in the directory to link corresponding inputs. + cache_examples: If True, caches examples in the server for fast runtime in examples. The default option in HuggingFace Spaces is True. The default option elsewhere is False. + examples_per_page: If examples are provided, how many to display per page. + live: whether the interface should automatically rerun if any of the inputs change. + interpretation: function that provides interpretation explaining prediction output. Pass "default" to use simple built-in interpreter, "shap" to use a built-in shapley-based interpreter, or your own custom interpretation function. For more information on the different interpretation methods, see the Advanced Interface Features guide. + num_shap: a multiplier that determines how many examples are computed for shap-based interpretation. Increasing this value will increase shap runtime, but improve results. Only applies if interpretation is "shap". + title: a title for the interface; if provided, appears above the input and output components in large font. Also used as the tab title when opened in a browser window. + description: a description for the interface; if provided, appears above the input and output components and beneath the title in regular font. Accepts Markdown and HTML content. + article: an expanded article explaining the interface; if provided, appears below the input and output components in regular font. Accepts Markdown and HTML content. + thumbnail: path or url to image to use as display image when the web demo is shared on social media. + theme: Theme to use - right now, only "default" is supported. Can be set with the GRADIO_THEME environment variable. + css: custom css or path to custom css file to use with interface. + allow_flagging: one of "never", "auto", or "manual". If "never" or "auto", users will not see a button to flag an input and output. If "manual", users will see a button to flag. If "auto", every input the user submits will be automatically flagged (outputs are not flagged). If "manual", both the input and outputs are flagged when the user clicks flag button. This parameter can be set with environmental variable GRADIO_ALLOW_FLAGGING; otherwise defaults to "manual". + flagging_options: if provided, allows user to select from the list of options when flagging. Only applies if allow_flagging is "manual". + flagging_dir: what to name the directory where flagged data is stored. + flagging_callback: An instance of a subclass of FlaggingCallback which will be called when a sample is flagged. By default logs to a local CSV file. + analytics_enabled: Whether to allow basic telemetry. If None, will use GRADIO_ANALYTICS_ENABLED environment variable if defined, or default to True. + batch: If True, then the function should process a batch of inputs, meaning that it should accept a list of input values for each parameter. The lists should be of equal length (and be up to length `max_batch_size`). The function is then *required* to return a tuple of lists (even if there is only 1 output component), with each list in the tuple corresponding to one output component. + max_batch_size: Maximum number of inputs to batch together if this is called from the queue (only relevant if batch=True) + """ + super().__init__( + analytics_enabled=analytics_enabled, + mode="interface", + css=css, + title=title or "Gradio", + theme=theme, + **kwargs, + ) + + if isinstance(fn, list): + raise DeprecationWarning( + "The `fn` parameter only accepts a single function, support for a list " + "of functions has been deprecated. Please use gradio.mix.Parallel " + "instead." + ) + + self.interface_type = InterfaceTypes.STANDARD + if (inputs is None or inputs == []) and (outputs is None or outputs == []): + raise ValueError("Must provide at least one of `inputs` or `outputs`") + elif outputs is None or outputs == []: + outputs = [] + self.interface_type = InterfaceTypes.INPUT_ONLY + elif inputs is None or inputs == []: + inputs = [] + self.interface_type = InterfaceTypes.OUTPUT_ONLY + + assert isinstance(inputs, (str, list, IOComponent)) + assert isinstance(outputs, (str, list, IOComponent)) + + if not isinstance(inputs, list): + inputs = [inputs] + if not isinstance(outputs, list): + outputs = [outputs] + + if self.is_space and cache_examples is None: + self.cache_examples = True + else: + self.cache_examples = cache_examples or False + + state_input_indexes = [ + idx for idx, i in enumerate(inputs) if i == "state" or isinstance(i, State) + ] + state_output_indexes = [ + idx for idx, o in enumerate(outputs) if o == "state" or isinstance(o, State) + ] + + if len(state_input_indexes) == 0 and len(state_output_indexes) == 0: + pass + elif len(state_input_indexes) != 1 or len(state_output_indexes) != 1: + raise ValueError( + "If using 'state', there must be exactly one state input and one state output." + ) + else: + state_input_index = state_input_indexes[0] + state_output_index = state_output_indexes[0] + if inputs[state_input_index] == "state": + default = utils.get_default_args(fn)[state_input_index] + state_variable = State(value=default) # type: ignore + else: + state_variable = inputs[state_input_index] + + inputs[state_input_index] = state_variable + outputs[state_output_index] = state_variable + + if cache_examples: + warnings.warn( + "Cache examples cannot be used with state inputs and outputs." + "Setting cache_examples to False." + ) + self.cache_examples = False + + self.input_components = [ + get_component_instance(i, render=False) for i in inputs + ] + self.output_components = [ + get_component_instance(o, render=False) for o in outputs + ] + + for component in self.input_components + self.output_components: + if not (isinstance(component, IOComponent)): + raise ValueError( + f"{component} is not a valid input/output component for Interface." + ) + + if len(self.input_components) == len(self.output_components): + same_components = [ + i is o for i, o in zip(self.input_components, self.output_components) + ] + if all(same_components): + self.interface_type = InterfaceTypes.UNIFIED + + if self.interface_type in [ + InterfaceTypes.STANDARD, + InterfaceTypes.OUTPUT_ONLY, + ]: + for o in self.output_components: + assert isinstance(o, IOComponent) + o.interactive = False # Force output components to be non-interactive + + if ( + interpretation is None + or isinstance(interpretation, list) + or callable(interpretation) + ): + self.interpretation = interpretation + elif isinstance(interpretation, str): + self.interpretation = [ + interpretation.lower() for _ in self.input_components + ] + else: + raise ValueError("Invalid value for parameter: interpretation") + + self.api_mode = _api_mode + self.fn = fn + self.fn_durations = [0, 0] + self.__name__ = getattr(fn, "__name__", "fn") + self.live = live + self.title = title + + CLEANER = re.compile("<.*?>") + + def clean_html(raw_html): + cleantext = re.sub(CLEANER, "", raw_html) + return cleantext + + md = ( + MarkdownIt( + "js-default", + { + "linkify": True, + "typographer": True, + "html": True, + }, + ) + .use(dollarmath_plugin) + .use(footnote_plugin) + .enable("table") + ) + + simple_description = None + if description is not None: + description = md.render(description) + simple_description = clean_html(description) + self.simple_description = simple_description + self.description = description + if article is not None: + article = utils.readme_to_html(article) + article = md.render(article) + self.article = article + + self.thumbnail = thumbnail + self.theme = theme or os.getenv("GRADIO_THEME", "default") + if not (self.theme == "default"): + warnings.warn("Currently, only the 'default' theme is supported.") + + self.examples = examples + self.num_shap = num_shap + self.examples_per_page = examples_per_page + + self.simple_server = None + + # For analytics_enabled and allow_flagging: (1) first check for + # parameter, (2) check for env variable, (3) default to True/"manual" + self.analytics_enabled = ( + analytics_enabled + if analytics_enabled is not None + else os.getenv("GRADIO_ANALYTICS_ENABLED", "True") == "True" + ) + if allow_flagging is None: + allow_flagging = os.getenv("GRADIO_ALLOW_FLAGGING", "manual") + if allow_flagging is True: + warnings.warn( + "The `allow_flagging` parameter in `Interface` now" + "takes a string value ('auto', 'manual', or 'never')" + ", not a boolean. Setting parameter to: 'manual'." + ) + self.allow_flagging = "manual" + elif allow_flagging == "manual": + self.allow_flagging = "manual" + elif allow_flagging is False: + warnings.warn( + "The `allow_flagging` parameter in `Interface` now" + "takes a string value ('auto', 'manual', or 'never')" + ", not a boolean. Setting parameter to: 'never'." + ) + self.allow_flagging = "never" + elif allow_flagging == "never": + self.allow_flagging = "never" + elif allow_flagging == "auto": + self.allow_flagging = "auto" + else: + raise ValueError( + "Invalid value for `allow_flagging` parameter." + "Must be: 'auto', 'manual', or 'never'." + ) + + self.flagging_options = flagging_options + self.flagging_callback = flagging_callback + self.flagging_dir = flagging_dir + self.batch = batch + self.max_batch_size = max_batch_size + + self.save_to = None # Used for selenium tests + self.share = None + self.share_url = None + self.local_url = None + + self.favicon_path = None + + if self.analytics_enabled: + data = { + "mode": self.mode, + "fn": fn, + "inputs": inputs, + "outputs": outputs, + "live": live, + "ip_address": self.ip_address, + "interpretation": interpretation, + "allow_flagging": allow_flagging, + "custom_css": self.css is not None, + "theme": self.theme, + "version": (pkgutil.get_data(__name__, "version.txt") or b"") + .decode("ascii") + .strip(), + } + utils.initiated_analytics(data) + + utils.version_check() + Interface.instances.add(self) + + param_names = inspect.getfullargspec(self.fn)[0] + for component, param_name in zip(self.input_components, param_names): + assert isinstance(component, IOComponent) + if component.label is None: + component.label = param_name + for i, component in enumerate(self.output_components): + assert isinstance(component, IOComponent) + if component.label is None: + if len(self.output_components) == 1: + component.label = "output" + else: + component.label = "output " + str(i) + + if self.allow_flagging != "never": + if ( + self.interface_type == InterfaceTypes.UNIFIED + or self.allow_flagging == "auto" + ): + self.flagging_callback.setup(self.input_components, self.flagging_dir) # type: ignore + elif self.interface_type == InterfaceTypes.INPUT_ONLY: + pass + else: + self.flagging_callback.setup( + self.input_components + self.output_components, self.flagging_dir # type: ignore + ) + + # Render the Gradio UI + with self: + self.render_title_description() + + submit_btn, clear_btn, stop_btn, flag_btns = None, None, None, None + interpretation_btn, interpretation_set = None, None + input_component_column, interpret_component_column = None, None + + with Row().style(equal_height=False): + if self.interface_type in [ + InterfaceTypes.STANDARD, + InterfaceTypes.INPUT_ONLY, + InterfaceTypes.UNIFIED, + ]: + ( + submit_btn, + clear_btn, + stop_btn, + flag_btns, + input_component_column, + interpret_component_column, + interpretation_set, + ) = self.render_input_column() + if self.interface_type in [ + InterfaceTypes.STANDARD, + InterfaceTypes.OUTPUT_ONLY, + ]: + ( + submit_btn_out, + clear_btn_2_out, + stop_btn_2_out, + flag_btns_out, + interpretation_btn, + ) = self.render_output_column(submit_btn) + submit_btn = submit_btn or submit_btn_out + clear_btn = clear_btn or clear_btn_2_out + stop_btn = stop_btn or stop_btn_2_out + flag_btns = flag_btns or flag_btns_out + + assert clear_btn is not None, "Clear button not rendered" + + self.attach_submit_events(submit_btn, stop_btn) + self.attach_clear_events( + clear_btn, input_component_column, interpret_component_column + ) + self.attach_interpretation_events( + interpretation_btn, + interpretation_set, + input_component_column, + interpret_component_column, + ) + + self.render_flagging_buttons(flag_btns) + self.render_examples() + self.render_article() + + self.config = self.get_config_file() + + def render_title_description(self) -> None: + if self.title: + Markdown( + "

" + + self.title + + "

" + ) + if self.description: + Markdown(self.description) + + def render_flag_btns(self) -> List[Tuple[Button, str | None]]: + if self.flagging_options is None: + return [(Button("Flag"), None)] + else: + return [ + ( + Button("Flag as " + flag_option), + flag_option, + ) + for flag_option in self.flagging_options + ] + + def render_input_column( + self, + ) -> Tuple[ + Button | None, + Button | None, + Button | None, + List | None, + Column, + Column | None, + List[Interpretation] | None, + ]: + submit_btn, clear_btn, stop_btn, flag_btns = None, None, None, None + interpret_component_column, interpretation_set = None, None + + with Column(variant="panel"): + input_component_column = Column() + with input_component_column: + for component in self.input_components: + component.render() + if self.interpretation: + interpret_component_column = Column(visible=False) + interpretation_set = [] + with interpret_component_column: + for component in self.input_components: + interpretation_set.append(Interpretation(component)) + with Row(): + if self.interface_type in [ + InterfaceTypes.STANDARD, + InterfaceTypes.INPUT_ONLY, + ]: + clear_btn = Button("Clear") + if not self.live: + submit_btn = Button("Submit", variant="primary") + # Stopping jobs only works if the queue is enabled + # We don't know if the queue is enabled when the interface + # is created. We use whether a generator function is provided + # as a proxy of whether the queue will be enabled. + # Using a generator function without the queue will raise an error. + if inspect.isgeneratorfunction(self.fn): + stop_btn = Button("Stop", variant="stop") + elif self.interface_type == InterfaceTypes.UNIFIED: + clear_btn = Button("Clear") + submit_btn = Button("Submit", variant="primary") + if inspect.isgeneratorfunction(self.fn) and not self.live: + stop_btn = Button("Stop", variant="stop") + if self.allow_flagging == "manual": + flag_btns = self.render_flag_btns() + elif self.allow_flagging == "auto": + flag_btns = [(submit_btn, None)] + return ( + submit_btn, + clear_btn, + stop_btn, + flag_btns, + input_component_column, + interpret_component_column, + interpretation_set, + ) + + def render_output_column( + self, + submit_btn_in: Button | None, + ) -> Tuple[Button | None, Button | None, Button | None, List | None, Button | None]: + submit_btn = submit_btn_in + interpretation_btn, clear_btn, flag_btns, stop_btn = None, None, None, None + + with Column(variant="panel"): + for component in self.output_components: + if not (isinstance(component, State)): + component.render() + with Row(): + if self.interface_type == InterfaceTypes.OUTPUT_ONLY: + clear_btn = Button("Clear") + submit_btn = Button("Generate", variant="primary") + if inspect.isgeneratorfunction(self.fn) and not self.live: + # Stopping jobs only works if the queue is enabled + # We don't know if the queue is enabled when the interface + # is created. We use whether a generator function is provided + # as a proxy of whether the queue will be enabled. + # Using a generator function without the queue will raise an error. + stop_btn = Button("Stop", variant="stop") + if self.allow_flagging == "manual": + flag_btns = self.render_flag_btns() + elif self.allow_flagging == "auto": + assert submit_btn is not None, "Submit button not rendered" + flag_btns = [(submit_btn, None)] + if self.interpretation: + interpretation_btn = Button("Interpret") + + return submit_btn, clear_btn, stop_btn, flag_btns, interpretation_btn + + def render_article(self): + if self.article: + Markdown(self.article) + + def attach_submit_events(self, submit_btn: Button | None, stop_btn: Button | None): + if self.live: + if self.interface_type == InterfaceTypes.OUTPUT_ONLY: + assert submit_btn is not None, "Submit button not rendered" + super().load(self.fn, None, self.output_components) + # For output-only interfaces, the user probably still want a "generate" + # button even if the Interface is live + submit_btn.click( + self.fn, + None, + self.output_components, + api_name="predict", + preprocess=not (self.api_mode), + postprocess=not (self.api_mode), + batch=self.batch, + max_batch_size=self.max_batch_size, + ) + else: + for component in self.input_components: + if isinstance(component, Streamable) and component.streaming: + component.stream( + self.fn, + self.input_components, + self.output_components, + api_name="predict", + preprocess=not (self.api_mode), + postprocess=not (self.api_mode), + ) + continue + if isinstance(component, Changeable): + component.change( + self.fn, + self.input_components, + self.output_components, + api_name="predict", + preprocess=not (self.api_mode), + postprocess=not (self.api_mode), + ) + else: + assert submit_btn is not None, "Submit button not rendered" + pred = submit_btn.click( + self.fn, + self.input_components, + self.output_components, + api_name="predict", + scroll_to_output=True, + preprocess=not (self.api_mode), + postprocess=not (self.api_mode), + batch=self.batch, + max_batch_size=self.max_batch_size, + ) + if stop_btn: + stop_btn.click( + None, + inputs=None, + outputs=None, + cancels=[pred], + ) + + def attach_clear_events( + self, + clear_btn: Button, + input_component_column: Column | None, + interpret_component_column: Column | None, + ): + clear_btn.click( + None, + [], + ( + self.input_components + + self.output_components + + ([input_component_column] if input_component_column else []) + + ([interpret_component_column] if self.interpretation else []) + ), # type: ignore + _js=f"""() => {json.dumps( + [getattr(component, "cleared_value", None) + for component in self.input_components + self.output_components] + ( + [Column.update(visible=True)] + if self.interface_type + in [ + InterfaceTypes.STANDARD, + InterfaceTypes.INPUT_ONLY, + InterfaceTypes.UNIFIED, + ] + else [] + ) + + ([Column.update(visible=False)] if self.interpretation else []) + )} + """, + ) + + def attach_interpretation_events( + self, + interpretation_btn: Button | None, + interpretation_set: List[Interpretation] | None, + input_component_column: Column | None, + interpret_component_column: Column | None, + ): + if interpretation_btn: + interpretation_btn.click( + self.interpret_func, + inputs=self.input_components + self.output_components, + outputs=interpretation_set + or [] + [input_component_column, interpret_component_column], # type: ignore + preprocess=False, + ) + + def render_flagging_buttons(self, flag_btns: List | None): + if flag_btns: + if self.interface_type in [ + InterfaceTypes.STANDARD, + InterfaceTypes.OUTPUT_ONLY, + InterfaceTypes.UNIFIED, + ]: + if ( + self.interface_type == InterfaceTypes.UNIFIED + or self.allow_flagging == "auto" + ): + flag_components = self.input_components + else: + flag_components = self.input_components + self.output_components + for flag_btn, flag_option in flag_btns: + flag_method = FlagMethod(self.flagging_callback, flag_option) + flag_btn.click( + flag_method, + inputs=flag_components, + outputs=[], + preprocess=False, + queue=False, + ) + + def render_examples(self): + if self.examples: + non_state_inputs = [ + c for c in self.input_components if not isinstance(c, State) + ] + non_state_outputs = [ + c for c in self.output_components if not isinstance(c, State) + ] + self.examples_handler = Examples( + examples=self.examples, + inputs=non_state_inputs, # type: ignore + outputs=non_state_outputs, # type: ignore + fn=self.fn, + cache_examples=self.cache_examples, + examples_per_page=self.examples_per_page, + _api_mode=self.api_mode, + batch=self.batch, + ) + + def __str__(self): + return self.__repr__() + + def __repr__(self): + repr = f"Gradio Interface for: {self.__name__}" + repr += "\n" + "-" * len(repr) + repr += "\ninputs:" + for component in self.input_components: + repr += "\n|-{}".format(str(component)) + repr += "\noutputs:" + for component in self.output_components: + repr += "\n|-{}".format(str(component)) + return repr + + async def interpret_func(self, *args): + return await self.interpret(list(args)) + [ + Column.update(visible=False), + Column.update(visible=True), + ] + + async def interpret(self, raw_input: List[Any]) -> List[Any]: + return [ + {"original": raw_value, "interpretation": interpretation} + for interpretation, raw_value in zip( + (await interpretation.run_interpret(self, raw_input))[0], raw_input + ) + ] + + def test_launch(self) -> None: + """ + Deprecated. + """ + warnings.warn("The Interface.test_launch() function is deprecated.") + + +@document() +class TabbedInterface(Blocks): + """ + A TabbedInterface is created by providing a list of Interfaces, each of which gets + rendered in a separate tab. + Demos: stt_or_tts + """ + + def __init__( + self, + interface_list: List[Interface], + tab_names: List[str] | None = None, + title: str | None = None, + theme: str = "default", + analytics_enabled: bool | None = None, + css: str | None = None, + ): + """ + Parameters: + interface_list: a list of interfaces to be rendered in tabs. + tab_names: a list of tab names. If None, the tab names will be "Tab 1", "Tab 2", etc. + title: a title for the interface; if provided, appears above the input and output components in large font. Also used as the tab title when opened in a browser window. + theme: which theme to use - right now, only "default" is supported. + analytics_enabled: whether to allow basic telemetry. If None, will use GRADIO_ANALYTICS_ENABLED environment variable or default to True. + css: custom css or path to custom css file to apply to entire Blocks + Returns: + a Gradio Tabbed Interface for the given interfaces + """ + super().__init__( + title=title or "Gradio", + theme=theme, + analytics_enabled=analytics_enabled, + mode="tabbed_interface", + css=css, + ) + if tab_names is None: + tab_names = ["Tab {}".format(i) for i in range(len(interface_list))] + with self: + if title: + Markdown( + "

" + + title + + "

" + ) + with Tabs(): + for (interface, tab_name) in zip(interface_list, tab_names): + with Tab(label=tab_name): + interface.render() + + +def close_all(verbose: bool = True) -> None: + for io in Interface.get_instances(): + io.close(verbose) diff --git a/gradio-modified/gradio/interpretation.py b/gradio-modified/gradio/interpretation.py new file mode 100644 index 0000000000000000000000000000000000000000..17628ef67d3bff3164f6272f32fc171fb977591b --- /dev/null +++ b/gradio-modified/gradio/interpretation.py @@ -0,0 +1,255 @@ +import copy +import math + +import numpy as np + +from gradio import utils +from gradio.components import Label, Number + + +async def run_interpret(interface, raw_input): + """ + Runs the interpretation command for the machine learning model. Handles both the "default" out-of-the-box + interpretation for a certain set of UI component types, as well as the custom interpretation case. + Parameters: + raw_input: a list of raw inputs to apply the interpretation(s) on. + """ + if isinstance(interface.interpretation, list): # Either "default" or "shap" + processed_input = [ + input_component.preprocess(raw_input[i]) + for i, input_component in enumerate(interface.input_components) + ] + original_output = await interface.call_function(0, processed_input) + original_output = original_output["prediction"] + + if len(interface.output_components) == 1: + original_output = [original_output] + + scores, alternative_outputs = [], [] + + for i, (x, interp) in enumerate(zip(raw_input, interface.interpretation)): + if interp == "default": + input_component = interface.input_components[i] + neighbor_raw_input = list(raw_input) + if input_component.interpret_by_tokens: + tokens, neighbor_values, masks = input_component.tokenize(x) + interface_scores = [] + alternative_output = [] + for neighbor_input in neighbor_values: + neighbor_raw_input[i] = neighbor_input + processed_neighbor_input = [ + input_component.preprocess(neighbor_raw_input[i]) + for i, input_component in enumerate( + interface.input_components + ) + ] + + neighbor_output = await interface.call_function( + 0, processed_neighbor_input + ) + neighbor_output = neighbor_output["prediction"] + if len(interface.output_components) == 1: + neighbor_output = [neighbor_output] + processed_neighbor_output = [ + output_component.postprocess(neighbor_output[i]) + for i, output_component in enumerate( + interface.output_components + ) + ] + + alternative_output.append(processed_neighbor_output) + interface_scores.append( + quantify_difference_in_label( + interface, original_output, neighbor_output + ) + ) + alternative_outputs.append(alternative_output) + scores.append( + input_component.get_interpretation_scores( + raw_input[i], + neighbor_values, + interface_scores, + masks=masks, + tokens=tokens, + ) + ) + else: + ( + neighbor_values, + interpret_kwargs, + ) = input_component.get_interpretation_neighbors(x) + interface_scores = [] + alternative_output = [] + for neighbor_input in neighbor_values: + neighbor_raw_input[i] = neighbor_input + processed_neighbor_input = [ + input_component.preprocess(neighbor_raw_input[i]) + for i, input_component in enumerate( + interface.input_components + ) + ] + neighbor_output = await interface.call_function( + 0, processed_neighbor_input + ) + neighbor_output = neighbor_output["prediction"] + if len(interface.output_components) == 1: + neighbor_output = [neighbor_output] + processed_neighbor_output = [ + output_component.postprocess(neighbor_output[i]) + for i, output_component in enumerate( + interface.output_components + ) + ] + + alternative_output.append(processed_neighbor_output) + interface_scores.append( + quantify_difference_in_label( + interface, original_output, neighbor_output + ) + ) + alternative_outputs.append(alternative_output) + interface_scores = [-score for score in interface_scores] + scores.append( + input_component.get_interpretation_scores( + raw_input[i], + neighbor_values, + interface_scores, + **interpret_kwargs + ) + ) + elif interp == "shap" or interp == "shapley": + try: + import shap # type: ignore + except (ImportError, ModuleNotFoundError): + raise ValueError( + "The package `shap` is required for this interpretation method. Try: `pip install shap`" + ) + input_component = interface.input_components[i] + if not (input_component.interpret_by_tokens): + raise ValueError( + "Input component {} does not support `shap` interpretation".format( + input_component + ) + ) + + tokens, _, masks = input_component.tokenize(x) + + # construct a masked version of the input + def get_masked_prediction(binary_mask): + masked_xs = input_component.get_masked_inputs(tokens, binary_mask) + preds = [] + for masked_x in masked_xs: + processed_masked_input = copy.deepcopy(processed_input) + processed_masked_input[i] = input_component.preprocess(masked_x) + new_output = utils.synchronize_async( + interface.call_function, 0, processed_masked_input + ) + new_output = new_output["prediction"] + if len(interface.output_components) == 1: + new_output = [new_output] + pred = get_regression_or_classification_value( + interface, original_output, new_output + ) + preds.append(pred) + return np.array(preds) + + num_total_segments = len(tokens) + explainer = shap.KernelExplainer( + get_masked_prediction, np.zeros((1, num_total_segments)) + ) + shap_values = explainer.shap_values( + np.ones((1, num_total_segments)), + nsamples=int(interface.num_shap * num_total_segments), + silent=True, + ) + scores.append( + input_component.get_interpretation_scores( + raw_input[i], None, shap_values[0], masks=masks, tokens=tokens + ) + ) + alternative_outputs.append([]) + elif interp is None: + scores.append(None) + alternative_outputs.append([]) + else: + raise ValueError("Unknown intepretation method: {}".format(interp)) + return scores, alternative_outputs + else: # custom interpretation function + processed_input = [ + input_component.preprocess(raw_input[i]) + for i, input_component in enumerate(interface.input_components) + ] + interpreter = interface.interpretation + interpretation = interpreter(*processed_input) + if len(raw_input) == 1: + interpretation = [interpretation] + return interpretation, [] + + +def diff(original, perturbed): + try: # try computing numerical difference + score = float(original) - float(perturbed) + except ValueError: # otherwise, look at strict difference in label + score = int(not (original == perturbed)) + return score + + +def quantify_difference_in_label(interface, original_output, perturbed_output): + output_component = interface.output_components[0] + post_original_output = output_component.postprocess(original_output[0]) + post_perturbed_output = output_component.postprocess(perturbed_output[0]) + + if isinstance(output_component, Label): + original_label = post_original_output["label"] + perturbed_label = post_perturbed_output["label"] + + # Handle different return types of Label interface + if "confidences" in post_original_output: + original_confidence = original_output[0][original_label] + perturbed_confidence = perturbed_output[0][original_label] + score = original_confidence - perturbed_confidence + else: + score = diff(original_label, perturbed_label) + return score + + elif isinstance(output_component, Number): + score = diff(post_original_output, post_perturbed_output) + return score + + else: + raise ValueError( + "This interpretation method doesn't support the Output component: {}".format( + output_component + ) + ) + + +def get_regression_or_classification_value( + interface, original_output, perturbed_output +): + """Used to combine regression/classification for Shap interpretation method.""" + output_component = interface.output_components[0] + post_original_output = output_component.postprocess(original_output[0]) + post_perturbed_output = output_component.postprocess(perturbed_output[0]) + + if type(output_component) == Label: + original_label = post_original_output["label"] + perturbed_label = post_perturbed_output["label"] + + # Handle different return types of Label interface + if "confidences" in post_original_output: + if math.isnan(perturbed_output[0][original_label]): + return 0 + return perturbed_output[0][original_label] + else: + score = diff( + perturbed_label, original_label + ) # Intentionally inverted order of arguments. + return score + + else: + raise ValueError( + "This interpretation method doesn't support the Output component: {}".format( + output_component + ) + ) diff --git a/gradio-modified/gradio/ipython_ext.py b/gradio-modified/gradio/ipython_ext.py new file mode 100644 index 0000000000000000000000000000000000000000..d601c6365bf30925f535e5ecb8a7240ecc333bc0 --- /dev/null +++ b/gradio-modified/gradio/ipython_ext.py @@ -0,0 +1,17 @@ +try: + from IPython.core.magic import needs_local_scope, register_cell_magic +except ImportError: + pass + +import gradio + + +def load_ipython_extension(ipython): + __demo = gradio.Blocks() + + @register_cell_magic + @needs_local_scope + def blocks(line, cell, local_ns=None): + with __demo.clear(): + exec(cell, None, local_ns) + __demo.launch(quiet=True) diff --git a/gradio-modified/gradio/launches.json b/gradio-modified/gradio/launches.json new file mode 100644 index 0000000000000000000000000000000000000000..16c94ee6d6ab2f961edcdf374b8fd5b0113855b3 --- /dev/null +++ b/gradio-modified/gradio/launches.json @@ -0,0 +1 @@ +{"launches": 145} \ No newline at end of file diff --git a/gradio-modified/gradio/layouts.py b/gradio-modified/gradio/layouts.py new file mode 100644 index 0000000000000000000000000000000000000000..cab5aabffee2e69f55b883b1d81b6d1bda69e30e --- /dev/null +++ b/gradio-modified/gradio/layouts.py @@ -0,0 +1,377 @@ +from __future__ import annotations + +import warnings +from typing import TYPE_CHECKING, Callable, List, Type + +from gradio.blocks import BlockContext +from gradio.documentation import document, set_documentation_group + +set_documentation_group("layout") + +if TYPE_CHECKING: # Only import for type checking (is False at runtime). + from gradio.components import Component + + +@document() +class Row(BlockContext): + """ + Row is a layout element within Blocks that renders all children horizontally. + Example: + with gradio.Blocks() as demo: + with gradio.Row(): + gr.Image("lion.jpg") + gr.Image("tiger.jpg") + demo.launch() + Guides: controlling_layout + """ + + def __init__( + self, + *, + variant: str = "default", + visible: bool = True, + elem_id: str | None = None, + **kwargs, + ): + """ + Parameters: + variant: row type, 'default' (no background), 'panel' (gray background color and rounded corners), or 'compact' (rounded corners and no internal gap). + visible: If False, row will be hidden. + elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles. + """ + self.variant = variant + if variant == "compact": + self.allow_expected_parents = False + super().__init__(visible=visible, elem_id=elem_id, **kwargs) + + def get_config(self): + return {"type": "row", "variant": self.variant, **super().get_config()} + + @staticmethod + def update( + visible: bool | None = None, + ): + return { + "visible": visible, + "__type__": "update", + } + + def style( + self, + *, + equal_height: bool | None = None, + mobile_collapse: bool | None = None, + **kwargs, + ): + """ + Styles the Row. + Parameters: + equal_height: If True, makes every child element have equal height + mobile_collapse: DEPRECATED. + """ + if equal_height is not None: + self._style["equal_height"] = equal_height + if mobile_collapse is not None: + warnings.warn("mobile_collapse is no longer supported.") + return self + + +@document() +class Column(BlockContext): + """ + Column is a layout element within Blocks that renders all children vertically. The widths of columns can be set through the `scale` and `min_width` parameters. + If a certain scale results in a column narrower than min_width, the min_width parameter will win. + Example: + with gradio.Blocks() as demo: + with gradio.Row(): + with gradio.Column(scale=1): + text1 = gr.Textbox() + text2 = gr.Textbox() + with gradio.Column(scale=4): + btn1 = gr.Button("Button 1") + btn2 = gr.Button("Button 2") + Guides: controlling_layout + """ + + def __init__( + self, + *, + scale: int = 1, + min_width: int = 320, + variant: str = "default", + visible: bool = True, + elem_id: str | None = None, + **kwargs, + ): + """ + Parameters: + scale: relative width compared to adjacent Columns. For example, if Column A has scale=2, and Column B has scale=1, A will be twice as wide as B. + min_width: minimum pixel width of Column, will wrap if not sufficient screen space to satisfy this value. If a certain scale value results in a column narrower than min_width, the min_width parameter will be respected first. + variant: column type, 'default' (no background), 'panel' (gray background color and rounded corners), or 'compact' (rounded corners and no internal gap). + visible: If False, column will be hidden. + elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles. + """ + self.scale = scale + self.min_width = min_width + self.variant = variant + if variant == "compact": + self.allow_expected_parents = False + super().__init__(visible=visible, elem_id=elem_id, **kwargs) + + def get_config(self): + return { + "type": "column", + "variant": self.variant, + "scale": self.scale, + "min_width": self.min_width, + **super().get_config(), + } + + @staticmethod + def update( + variant: str | None = None, + visible: bool | None = None, + ): + return { + "variant": variant, + "visible": visible, + "__type__": "update", + } + + +class Tabs(BlockContext): + """ + Tabs is a layout element within Blocks that can contain multiple "Tab" Components. + """ + + def __init__( + self, + *, + selected: int | str | None = None, + visible: bool = True, + elem_id: str | None = None, + **kwargs, + ): + """ + Parameters: + selected: The currently selected tab. Must correspond to an id passed to the one of the child TabItems. Defaults to the first TabItem. + visible: If False, Tabs will be hidden. + elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles. + """ + super().__init__(visible=visible, elem_id=elem_id, **kwargs) + self.selected = selected + + def get_config(self): + return {"selected": self.selected, **super().get_config()} + + @staticmethod + def update( + selected: int | str | None = None, + ): + return { + "selected": selected, + "__type__": "update", + } + + def change(self, fn: Callable, inputs: List[Component], outputs: List[Component]): + """ + Parameters: + fn: Callable function + inputs: List of inputs + outputs: List of outputs + Returns: None + """ + self.set_event_trigger("change", fn, inputs, outputs) + + +@document() +class Tab(BlockContext): + """ + Tab (or its alias TabItem) is a layout element. Components defined within the Tab will be visible when this tab is selected tab. + Example: + with gradio.Blocks() as demo: + with gradio.Tab("Lion"): + gr.Image("lion.jpg") + gr.Button("New Lion") + with gradio.Tab("Tiger"): + gr.Image("tiger.jpg") + gr.Button("New Tiger") + Guides: controlling_layout + """ + + def __init__( + self, + label: str, + *, + id: int | str | None = None, + elem_id: str | None = None, + **kwargs, + ): + """ + Parameters: + label: The visual label for the tab + id: An optional identifier for the tab, required if you wish to control the selected tab from a predict function. + elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles. + """ + super().__init__(elem_id=elem_id, **kwargs) + self.label = label + self.id = id + + def get_config(self): + return { + "label": self.label, + "id": self.id, + **super().get_config(), + } + + def select(self, fn: Callable, inputs: List[Component], outputs: List[Component]): + """ + Parameters: + fn: Callable function + inputs: List of inputs + outputs: List of outputs + Returns: None + """ + self.set_event_trigger("select", fn, inputs, outputs) + + def get_expected_parent(self) -> Type[Tabs]: + return Tabs + + def get_block_name(self): + return "tabitem" + + +TabItem = Tab + + +class Group(BlockContext): + """ + Group is a layout element within Blocks which groups together children so that + they do not have any padding or margin between them. + Example: + with gradio.Group(): + gr.Textbox(label="First") + gr.Textbox(label="Last") + """ + + def __init__( + self, + *, + visible: bool = True, + elem_id: str | None = None, + **kwargs, + ): + """ + Parameters: + visible: If False, group will be hidden. + elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles. + """ + super().__init__(visible=visible, elem_id=elem_id, **kwargs) + + def get_config(self): + return {"type": "group", **super().get_config()} + + @staticmethod + def update( + visible: bool | None = None, + ): + return { + "visible": visible, + "__type__": "update", + } + + +@document() +class Box(BlockContext): + """ + Box is a a layout element which places children in a box with rounded corners and + some padding around them. + Example: + with gradio.Box(): + gr.Textbox(label="First") + gr.Textbox(label="Last") + """ + + def __init__( + self, + *, + visible: bool = True, + elem_id: str | None = None, + **kwargs, + ): + """ + Parameters: + visible: If False, box will be hidden. + elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles. + """ + super().__init__(visible=visible, elem_id=elem_id, **kwargs) + + def get_config(self): + return {"type": "box", **super().get_config()} + + @staticmethod + def update( + visible: bool | None = None, + ): + return { + "visible": visible, + "__type__": "update", + } + + def style(self, **kwargs): + return self + + +class Form(BlockContext): + def get_config(self): + return {"type": "form", **super().get_config()} + + +@document() +class Accordion(BlockContext): + """ + Accordion is a layout element which can be toggled to show/hide the contained content. + Example: + with gradio.Accordion("See Details"): + gr.Markdown("lorem ipsum") + """ + + def __init__( + self, + label, + *, + open: bool = True, + visible: bool = True, + elem_id: str | None = None, + **kwargs, + ): + """ + Parameters: + label: name of accordion section. + open: if True, accordion is open by default. + elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles. + """ + self.label = label + self.open = open + super().__init__(visible=visible, elem_id=elem_id, **kwargs) + + def get_config(self): + return { + "type": "accordion", + "open": self.open, + "label": self.label, + **super().get_config(), + } + + @staticmethod + def update( + open: bool | None = None, + label: str | None = None, + visible: bool | None = None, + ): + return { + "visible": visible, + "label": label, + "open": open, + "__type__": "update", + } diff --git a/gradio-modified/gradio/media_data.py b/gradio-modified/gradio/media_data.py new file mode 100644 index 0000000000000000000000000000000000000000..ecbb7442a6c7c1a13f24418bea01e74aeee4d033 --- /dev/null +++ b/gradio-modified/gradio/media_data.py @@ -0,0 +1,8655 @@ +BASE64_IMAGE = ( # test/test_files/bus.png + "data:image/png;base64," + "R0lGODlhPQBEAPeoAJosM//AwO/AwHVYZ/z595kzAP/s7P+goOXMv8+fhw/v739/f+8PD98fH/8mJl+fn/9ZWb8/PzWlwv///6wWGbImAPgTEMImIN9gUFCEm/gDALULDN8PAD6atYdCTX9gUNKlj8wZAKUsAOzZz+UMAOsJAP/Z2ccMDA8PD/95eX5NWvsJCOVNQPtfX/8zM8+QePLl38MGBr8JCP+zs9myn/8GBqwpAP/GxgwJCPny78lzYLgjAJ8vAP9fX/+MjMUcAN8zM/9wcM8ZGcATEL+QePdZWf/29uc/P9cmJu9MTDImIN+/r7+/vz8/P8VNQGNugV8AAF9fX8swMNgTAFlDOICAgPNSUnNWSMQ5MBAQEJE3QPIGAM9AQMqGcG9vb6MhJsEdGM8vLx8fH98AANIWAMuQeL8fABkTEPPQ0OM5OSYdGFl5jo+Pj/+pqcsTE78wMFNGQLYmID4dGPvd3UBAQJmTkP+8vH9QUK+vr8ZWSHpzcJMmILdwcLOGcHRQUHxwcK9PT9DQ0O/v70w5MLypoG8wKOuwsP/g4P/Q0IcwKEswKMl8aJ9fX2xjdOtGRs/Pz+Dg4GImIP8gIH0sKEAwKKmTiKZ8aB/f39Wsl+LFt8dgUE9PT5x5aHBwcP+AgP+WltdgYMyZfyywz78AAAAAAAD///8AAP9mZv///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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goi2MAxbv6O2kEG56I7CSlRsEFKFVyovDJoIRTg7sugNRDGqCJzJgcKE0ywc0ELm6KBCCJo8DIPFeCWNGcyqNFE06ToAfV0HBRgxsvLThHn1oddQMrXj5DyAQgjEHSAJMWZwS3HPxT/QMbabI/iBCliMLEJKX2EEkomBAUCxRi42VDADxyTYDVogV+wSChqmKxEKCDAYFDFj4OmwbY7bDGdBhtrnTQYOigeChUmc1K3QTnAUfEgGFgAWt88hKA6aCRIXhxnQ1yg3BCayK44EWdkUQcBByEQChFXfCB776aQsG0BIlQgQgE8qO26X1h8cEUep8ngRBnOy74E9QgRgEAC8SvOfQkh7FDBDmS43PmGoIiKUUEGkMEC/PJHgxw0xH74yx/3XnaYRJgMB8obxQW6kL9QYEJ0FIFgByfIL7/IQAlvQwEpnAC7DtLNJCKUoO/w45c44GwCXiAFB/OXAATQryUxdN4LfFiwgjCNYg+kYMIEFkCKDs6PKAIJouyGWMS1FSKJOMRB/BoIxYJIUXFUxNwoIkEKPAgCBZSQHQ1A2EWDfDEUVLyADj5AChSIQW6gu10bE/JG2VnCZGfo4R4d0sdQoBAHhPjhIB94v/wRoRKQWGRHgrhGSQJxCS+0pCZbEhAAOw==" +) +BASE64_AUDIO = { + "name": "test/test_files/audio_sample.wav", + "data": "data:audio/wav;base64,UklGRuI/AABXQVZFZm10IBAAAAABAAEAQB8AAIA+AAACABAAZGF0Ydw+AACO/w//5P6R/9D/SgDJAGIAegA3ALkAPAC8/zEA4/+G/8X/3//f/+n/jv+d/87/mP+p/7v/jv/C/ygAogB+AOQAHADX/1EAQwCz//T/kv/B/oD/rf8VABUAKAA3ANv/4P/o/8T/5/8o/6P/dgDDADcBUwCu/w3/+f5Z/5L/YQCfAMsAaAGxAXgAg//m/lT+Rf6k/lQA8wAXAR0BtwD1AF4Amf8g/xX/Tf/8/rb/FQDc/6sA6wAJAeIABQEyADn/af7D/b7+Mv8nALwAdAFAAooBswAKAEz/4v66/nb/KAAlAEoAQwBIAM//qf85AGAAeP+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YmUgQXVkaW8gTGlicmFyeQBJQVJUDgAAAEtldmluIE1hY0xlb2QASUdOUgoAAABDaW5lbWF0aWMAaWQzIHAAAABJRDMDAAAAAABmVElUMgAAABAAAABJbXBhY3QgTW9kZXJhdG9UQUxCAAAAFgAAAFlvdVR1YmUgQXVkaW8gTGlicmFyeVRQRTEAAAAOAAAAS2V2aW4gTWFjTGVvZFRDT04AAAAKAAAAQ2luZW1hdGlj", +} + +BASE64_AUDIO_DUPLICATE = { + "name": "test/test_files/audio_sample.wav", + "data": "data:audio/wav;base64,UklGRuI/AABXQVZFZm10IBAAAAABAAEAQB8AAIA+AAACABAAZGF0Ydw+AACO/w//5P6R/9D/SgDJAGIAegA3ALkAPAC8/zEA4/+G/8X/3//f/+n/jv+d/87/mP+p/7v/jv/C/ygAogB+AOQAHADX/1EAQwCz//T/kv/B/oD/rf8VABUAKAA3ANv/4P/o/8T/5/8o/6P/dgDDADcBUwCu/w3/+f5Z/5L/YQCfAMsAaAGxAXgAg//m/lT+Rf6k/lQA8wAXAR0BtwD1AF4Amf8g/xX/Tf/8/rb/FQDc/6sA6wAJAeIABQEyADn/af7D/b7+Mv8nALwAdAFAAooBswAKAEz/4v66/nb/KAAlAEoAQwBIAM//qf85AGAAeP+z/5f/n/8rAOL/MwBkAMsACwHxANUAjP8B/w7/2/7X/vj+TgDp/0MA5wDRAOMA5v+Q/+n/1/+C/zL/qf/y/yMAhQBEAEAAyf9A/23/JQCZ/5EArgDkAGMAmP/o/9b+Hv9O/8f/mQCdAIwAYwDX/3T/5v7//8r/PQCNAMIAvADq/4//SP8yAMP/1v/t/67/AgBaADwAAQD+/4YAZQDmAHAAgf+S/0D/D/94/7oA1QDaAMoAQgEFAX0A+v+S/i3+lP4o/ycACQBlAMQALAHxAJb/ZQBV/4T/z/8HAMUADgEuASQANwCCAD8A2/9e/wz/O/8u//T/+////ysATABVACABbQAwAMX/tf44/93+vf8IAHEAJAGnATYBoQCn/3j/VP65/vz///83AE8AeQDD//X/b/9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AAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAABKwAAASsAAAEqAAAAOHN0Y28AAAAAAAAACgAAACwAADXXAABrgQAAwYwAARKNAAFhWwABztsAAiToAAKY1gADEjk=", +} +BASE64_FILE = { + "name": "test/test_files/sample_file.pdf", + "data": "data:@file/pdf;base64,JVBERi0xLjQKJdPr6eEKMSAwIG9iago8PC9UaXRsZSAoVW50aXRsZWQgZG9jdW1lbnQpCi9Qcm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W5mbyAxIDAgUj4+CnN0YXJ0eHJlZgoxMDI0MgolJUVPRg==", +} +BINARY_IMAGE = ( + b'GIF89a=\x00D\x00\xf7\xa8\x00\x9a,3\xff\xc0\xc0\xef\xc0\xc0uXg\xfc\xf9\xf7\x993\x00\xff\xec\xec\xff\xa0\xa0\xe5\xcc\xbf\xcf\x9f\x87\x0f\xef\xef\x7f\x7f\x7f\xef\x0f\x0f\xdf\x1f\x1f\xff&&_\x9f\x9f\xffYY\xbf??5\xa5\xc2\xff\xff\xff\xac\x16\x19\xb2&\x00\xf8\x13\x10\xc2& \xdf`PP\x84\x9b\xf8\x03\x00\xb5\x0b\x0c\xdf\x0f\x00>\x9a\xb5\x87BM\x7f`P\xd2\xa5\x8f\xcc\x19\x00\xa5,\x00\xec\xd9\xcf\xe5\x0c\x00\xeb\t\x00\xff\xd9\xd9\xc7\x0c\x0c\x0f\x0f\x0f\xffyy~MZ\xfb\t\x08\xe5M@\xfb__\xff33\xcf\x90x\xf2\xe5\xdf\xc3\x06\x06\xbf\t\x08\xff\xb3\xb3\xd9\xb2\x9f\xff\x06\x06\xac)\x00\xff\xc6\xc6\x0c\t\x08\xf9\xf2\xef\xc9s`\xb8#\x00\x9f/\x00\xff__\xff\x8c\x8c\xc5\x1c\x00\xdf33\xffpp\xcf\x19\x19\xc0\x13\x10\xbf\x90x\xf7YY\xff\xf6\xf6\xe7??\xd7&&\xefLL2& \xdf\xbf\xaf\xbf\xbf\xbf???\xc5M@cn\x81_\x00\x00___\xcb00\xd8\x13\x00YC8\x80\x80\x80\xf3RRsVH\xc490\x10\x10\x10\x917@\xf2\x06\x00\xcf@@\xca\x86pooo\xa3!&\xc1\x1d\x18\xcf//\x1f\x1f\x1f\xdf\x00\x00\xd2\x16\x00\xcb\x90x\xbf\x1f\x00\x19\x13\x10\xf3\xd0\xd0\xe399&\x1d\x18Yy\x8e\x8f\x8f\x8f\xff\xa9\xa9\xcb\x13\x13\xbf00SF@\xb6& >\x1d\x18\xfb\xdd\xdd@@@\x99\x93\x90\xff\xbc\xbc\x7fPP\xaf\xaf\xaf\xc6VHzsp\x93& \xb7pp\xb3\x86ptPP|pp\xafOO\xd0\xd0\xd0\xef\xef\xefL90\xbc\xa9\xa0o0(\xeb\xb0\xb0\xff\xe0\xe0\xff\xd0\xd0\x870(K0(\xc9|h\x9f__lct\xebFF\xcf\xcf\xcf\xe0\xe0\xe0b& \xff },(@0(\xa9\x93\x88\xa6|h\x1f\xdf\xdf\xd5\xac\x97\xe2\xc5\xb7\xc7`POOO\x9cyhppp\xff\x80\x80\xff\x96\x96\xd7``\xcc\x99\x7f,\xb0\xcf\xbf\x00\x00\x00\x00\x00\x00\xff\xff\xff\x00\x00\xffff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00!\xf9\x04\x01\x00\x00\xa8\x00,\x00\x00\x00\x00=\x00D\x00\x00\x08\xff\x00Q\t\x1cH\xb0\xa0\xc1\x83\x08\x13*\\\xc8\xb0\xa1\xc0\x1b\x07\x0c8\x9cHq\xa1\x89\x14\xa72F\xac\xc8\xb1\xa2\t\x1f\x19Cj\x94\xd8\xb1$B\x03\x07D\xaa\x1ci\xb2%*#3V\xcad\xe9\xb2\xa2\x9d 3s\x9e\xdaX\x93!"\x8c:\x83\xf2\xeci\xf0c\xd0\xa3!\x87\x12E\x89\xb4iR\x92.a:\x9d\xfa\xb4\xe5\x0c\x9cT\xb3\xee\x84:\xf1\x06P\xad`\x95*4\n\xb6l\xd5\x84\x06>\x99]\x1b\xb2\xc5\x9c\x83F\xda\xb0\x9d{\xe4\x84\x00\x83W\xe7\xaeM\xe2f\xd4\xa8\xbb\x03\xbd\xea5kE\x88_\xbf\x80\x0fy\x1a\\\xb6\x08\x92\xc3\x87\x01\x070\xe5\x00\x02\xe3\xa9-\x80\xc4\x80\x1cY\xe0dS\x94-_\x0ezd3\xe7\xce\xa8>\x83\x0e=Zf\x92\x13\xa7Gm\x18 \xe1\xaf\xe7\xd5\xb8+\xb7\xceX8\xf6(\xda\xa2D\xd9N\x8d\xbb\xb8n\xc6\x8e}\x8f\xfa\x12<\xf8\xf0\xcf\x11\x1a\x14\x07}|mf\xdf\x00\x9elP\xd1\\\xb8dSaJ\x95\xffz }zu\xadiLs\xa6\xb0&8\x80\x01\xdd\x9f\x9b\x8a ^<\xf9\xe9\xac\xa9:\x82\x1d{\x83\x84\xe6\xef\xc5\xf7\x1d}\xf5\xd9W\x9eq\xa2\x1d\x95\x84a\xb1\xa9\xb0\x01\x00\xdd\x05\xd8\x9c|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\x10\xc6\xa8"s&\x07\n\x13L\xb0sA\x0b\x9b\xa2\x81\x08"h\xf02\x0f\x15\xe0\x964g2\xa8\xd1D\xd3\xa4\xe8\x01\xf5t\x1c\x14`\xc6\xcb\xcbN\x11\xe7\xd6\x87]@\xca\xd7\x8f\x90\xf2\x01\x08#\x10t\x80$\xc5\x99\xc1-\xc7?\x14\xff@\xc6\xdal\x8f\xe2\x04)b0\xb1\t)}\x84\x12J&\x04\x05\x02\xc5\x18\xb8\xd9P\xc0\x0f\x1c\x93`5h\x81_\xb0H(j\x98\xacD( \xc0`P\xc5\x8f\x83\xa6\xc1\xb6;l1\x9d\x06\x1bk\x9d4\x18:(\x1e\n\x15&sR\xb7A9\xc0Q\xf1 \x18X\x00Z\xdf<\x84\xa0:h$H^\x1cgC\\\xa0\xdc\x10\x9a\xc8\xae8\x11gdQ\x07\x01\x07!\x10\n\x11W| {\xef\xa6\x90\xb0m\x01"T B\x01<\xa8\xed\xba_X|pE\x1e\xa7\xc9\xe0D\x19\xce\xcb\xbe\x04\xf5\x08\x11\x80@\x02\xf1+\xce}\t!\xecP\xc1\x0ed\xb8\xdc\xf9\x86\xa0\x88\x8aQA\x06\x90\xc1\x02\xfc\xf2G\x83\x1c4\xc4~\xf8\xcb\x1f\xf7^v\x98D\x98\x0c\x07\xca\x1b\xc5\x05\xba\x90\xbfP`Bt\x14\x81`\x07\'\xc8/\xbf\xc8@\toC\x01)\x9c\x00\xbb\x0e\xd2\xcd$"\x94\xa0\xef\xf0\xe3\x978\xe0l\x02^ \x05\x07\xf3\x97\x00\x04\xd0\xaf%1t\xde\x0b|X\xb0\x820\x8db\x0f\xa4`\xc2\x04\x16@\x8a\x0e\xce\x8f(\x02\t\xa2\xec\x86X\xc4\xb5\x15"\x898\xc4A\xfc\x1a\x08\xc5\x82HQqT\xc4\xdc("A\n<\x08\x02\x05\x94\x90\x1d\r@\xd8E\x83|1\x14T\xbc\x80\x0e>@\n\x14\x88An\xa0\xbb]\x1b\x13\xf2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ltf", + "data": "data:;base64,ewogICAgImFzc2V0IjogewogICAgICAgICJnZW5lcmF0b3IiOiAiQ09MTEFEQTJHTFRGIiwKICAgICAgICAidmVyc2lvbiI6ICIyLjAiCiAgICB9LAogICAgInNjZW5lIjogMCwKICAgICJzY2VuZXMiOiBbCiAgICAgICAgewogICAgICAgICAgICAibm9kZXMiOiBbCiAgICAgICAgICAgICAgICAwCiAgICAgICAgICAgIF0KICAgICAgICB9CiAgICBdLAogICAgIm5vZGVzIjogWwogICAgICAgIHsKICAgICAgICAgICAgImNoaWxkcmVuIjogWwogICAgICAgICAgICAgICAgMQogICAgICAgICAgICBdLAogICAgICAgICAgICAibWF0cml4IjogWwogICAgICAgICAgICAgICAgMS4wLAogICAgICAgICAgICAgICAgMC4wLAogICAgICAgICAgICAgICAgMC4wLAogICAgICAgICAgICAgICAgMC4wLAogICAgICAgICAgICAgICAgMC4wLAogICAgICAgICAgICAgICAgMC4wLAogICAgICAgICAgICAgICAgLTEuMCwKICAgICAgICAgICAgICAgIDAuMCwKICAgICAgICAgICAgICAgIDAuMCwKICAgICAgICAgICAgICAgIDEuMCwKICAgICAgICAgICAgICAgIDAuMCwKICAgICAgICAgICAgICAgIDAuMCwKICAgICAgICAgICAgICAgIDAuMCwKICAgICAgICAgICAgICAgIDAuMCwKICAgICAgICAgICAgICAgIDAuMCwKICAgICAgICAgICAgICAgIDEuMAogICAgICAgICAgICBdCiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAgICJtZXNoIjogMAogICAgICAgIH0KICAgIF0sCiAgICAibWVzaGVzIjogWwogICAgICAgIHsKICAgICAgICAgICAgInByaW1pdGl2ZXMiOiBbCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgImF0dHJpYnV0ZXMiOiB7CiAgICAgICAgICAgICAgICAgICAgICAgICJOT1JNQUwiOiAxLAogICAgICAgICAgICAgICAgICAgICAgICAiUE9TSVRJT04iOiAyCiAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgICAgICAiaW5kaWNlcyI6IDAsCiAgICAgICAgICAgICAgICAgICAgIm1vZGUiOiA0LAogICAgICAgICAgICAgICAgICAgICJtYXRlcmlhbCI6IDAKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgXSwKICAgICAgICAgICAgIm5hbWUiOiAiTWVzaCIKICAgICAgICB9CiAgICBdLAogICAgImFjY2Vzc29ycyI6IFsKICAgICAgICB7CiAgICAgICAgICAgICJidWZmZXJWaWV3IjogMCwKICAgICAgICAgICAgImJ5dGVPZmZzZXQiOiAwLAogICAgICAgICAgICAiY29tcG9uZW50VHlwZSI6IDUxMjMsCiAgICAgICAgICAgICJjb3VudCI6IDM2LAogICAgICAgICAgICAibWF4IjogWwogICAgICAgICAgICAgICAgMjMKICAgICAgICAgICAgXSwKICAgICAgICAgICAgIm1pbiI6IFsKICAgICAgICAgICAgICAgIDAKICAgICAgICAgICAgXSwKICAgICAgICAgICAgInR5cGUiOiAiU0NBTEFSIgogICAgICAgIH0sCiAgICAgICAgewogICAgICAgICAgICAiYnVmZmVyVmlldyI6IDEsCiAgICAgICAgICAgICJieXRlT2Zmc2V0IjogMCwKICAgICAgICAgICAgImNvbXBvbmVudFR5cGUiOiA1MTI2LAogICAgICAgICAgICAiY291bnQiOiAyNCwKICAgICAgICAgICAgIm1heCI6IFsKICAgICAgICAgICAgICAgIDEuMCwKICAgICAgICAgICAgICAgIDEuMCwKICAgICAgICAgICAgICAgIDEuMAogICAgICAgICAgICBdLAogICAgICAgICAgICAibWluIjogWwogICAgICAgICAgICAgICAgLTEuMCwKICAgICAgICAgICAgICAgIC0xLjAsCiAgICAgICAgICAgICAgICAtMS4wCiAgICAgICAgICAgIF0sCiAgICAgICAgICAgICJ0eXBlIjogIlZFQzMiCiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAgICJidWZmZXJWaWV3IjogMSwKICAgICAgICAgICAgImJ5dGVPZmZzZXQiOiAyODgsCiAgICAgICAgICAgICJjb21wb25lbnRUeXBlIjogNTEyNiwKICAgICAgICAgICAgImNvdW50IjogMjQsCiAgICAgICAgICAgICJtYXgiOiBbCiAgICAgICAgICAgICAgICAwLjUsCiAgICAgICAgICAgICAgICAwLjUsCiAgICAgICAgICAgICAgICAwLjUKICAgICAgICAgICAgXSwKICAgICAgICAgICAgIm1pbiI6IFsKICAgICAgICAgICAgICAgIC0wLjUsCiAgICAgICAgICAgICAgICAtMC41LAogICAgICAgICAgICAgICAgLTAuNQogICAgICAgICAgICBdLAogICAgICAgICAgICAidHlwZSI6ICJWRUMzIgogICAgICAgIH0KICAgIF0sCiAgICAibWF0ZXJpYWxzIjogWwogICAgICAgIHsKICAgICAgICAgICAgInBick1ldGFsbGljUm91Z2huZXNzIjogewogICAgICAgICAgICAgICAgImJhc2VDb2xvckZhY3RvciI6IFsKICAgICAgICAgICAgICAgICAgICAwLjgwMDAwMDAxMTkyMDkyOSwKICAgICAgICAgICAgICAgICAgICAwLjAsCiAgICAgICAgICAgICAgICAgICAgMC4wLAogICAgICAgICAgICAgICAgICAgIDEuMAogICAgICAgICAgICAgICAgXSwKICAgICAgICAgICAgICAgICJtZXRhbGxpY0ZhY3RvciI6IDAuMAogICAgICAgICAgICB9LAogICAgICAgICAgICAibmFtZSI6ICJSZWQiCiAgICAgICAgfQogICAgXSwKICAgICJidWZmZXJWaWV3cyI6IFsKICAgICAgICB7CiAgICAgICAgICAgICJidWZmZXIiOiAwLAogICAgICAgICAgICAiYnl0ZU9mZnNldCI6IDU3NiwKICAgICAgICAgICAgImJ5dGVMZW5ndGgiOiA3MiwKICAgICAgICAgICAgInRhcmdldCI6IDM0OTYzCiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAgICJidWZmZXIiOiAwLAogICAgICAgICAgICAiYnl0ZU9mZnNldCI6IDAsCiAgICAgICAgICAgICJieXRlTGVuZ3RoIjogNTc2LAogICAgICAgICAgICAiYnl0ZVN0cmlkZSI6IDEyLAogICAgICAgICAgICAidGFyZ2V0IjogM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FDL0FBQUF2d0FBQUw4QUFBQS9BQUFBdndBQUFEOEFBQUEvQUFBQXZ3QUFBTDhBQUFDL0FBQUF2d0FBQUQ4QUFBQy9BQUFBdndBQUFMOEFBQUMvQUFBQXZ3QUFBRDhBQUFDL0FBQUFQd0FBQUw4QUFBQy9BQUFBUHdBQUFEOEFBQUMvQUFBQkFBSUFBd0FDQUFFQUJBQUZBQVlBQndBR0FBVUFDQUFKQUFvQUN3QUtBQWtBREFBTkFBNEFEd0FPQUEwQUVBQVJBQklBRXdBU0FCRUFGQUFWQUJZQUZ3QVdBQlVBIgogICAgICAgIH0KICAgIF0KfQo=", +} +SUM_PIXELS_INTERPRETATION = { + "scores": [ + [ + [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + ], + [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + ], + [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + ], + [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + ], + [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + ], + [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + ], + [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + ], + [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + ], + [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + ], + [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + ], + [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + ], + [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + ], + [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + ], + [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + ], + [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + ], + [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + ], + [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.9217332561281606, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.8478093032233159, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + 0.7775525960239336, + ], + [ + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.28228141285466124, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.7110596409959468, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.5717043041883806, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + ], + [ + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + ], + [ + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + ], + [ + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + ], + [ + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + ], + [ + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + ], + [ + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + ], + [ + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + ], + [ + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + ], + [ + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + ], + [ + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + ], + [ + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + ], + [ + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + ], + [ + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + ], + [ + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + ], + [ + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + ], + [ + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.17004439297432927, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.6232387569967188, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.349160393746381, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + 0.37415556842308434, + ], + [ + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + ], + [ + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + ], + [ + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + ], + [ + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + ], + [ + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + ], + [ + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + ], + [ + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + ], + [ + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + ], + [ + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + ], + [ + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + ], + [ + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + ], + [ + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + ], + [ + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + ], + [ + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + ], + [ + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + ], + [ + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + ], + [ + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + ], + [ + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.4147847905809689, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.21617448369040726, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.4393939393939394, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + 0.8667245705462266, + ], + ] + ], + "alternative_outputs": [ + [ + [1793106], + [1795539], + [1797837], + [1800021], + [1815417], + [1802088], + [1806420], + [1824192], + [1818906], + [1804818], + [1813338], + [1812561], + [1811298], + [1817472], + [1810533], + [1797249], + ] + ], +} +SUM_PIXELS_SHAP_INTERPRETATION = { + "scores": [ + [ + [ + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.36599426908032084, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.9044030984144017, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.5780729041010304, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.03706410007949775, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.4724172299368354, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + 0.5148839775509372, + ], + ] + ], + "alternative_outputs": [[]], +} + +FILE_TEMPLATE_CONTEXT = { + "file_count": "single", + "value": { + "name": "sample_file.pdf", + "size": 10558, + "data": "data:application/pdf;base64,JVBERi0xLjQKJdPr6eEKMSAwIG9iago8PC9UaXRsZSAoVW50aXRsZWQgZG9jdW1lbnQpCi9Qcm9kdWNlciAoU2tpYS9QREYgbTk3IEdvb2dsZSBEb2NzIFJlbmRlcmVyKT4+CmVuZG9iagozIDAgb2JqCjw8L2NhIDEKL0JNIC9Ob3JtYWw+PgplbmRvYmoKNSAwIG9iago8PC9GaWx0ZXIgL0ZsYXRlRGVjb2RlCi9MZW5ndGggMjM2Pj4gc3RyZWFtCnicjZDfakMhDMbvfYpcD2bzTxNhFFZYe90h7AG2tTDoYO37w9S1O1A4cIyo5Bc/80mALR6pLVYY3k/hJ/RMJh6J82d4e4Dvlo2WRu1tb6UEPV538Hc4H8NqJ3C8DAWnDIQpd4lD2LdYomzcZ9O+Km1qWG0VSCRKG+xQD4FuTZeWdTcR0CiZiqtAPYXOGKOhEBnUD3hC5M0a6lcoObInwdIErsAHcI+F3cknsB3ANFJCU54Byf6B8AAvdZi9s8WokcXNFrvLEj0n0gXu5Hm8TJyiK6nm+54Ipd3IXnQiae5H5vyxTf724RdvlHTtCmVuZHN0cmVhbQplbmRvYmoKMiAwIG9iago8PC9UeXBlIC9QYWdlCi9SZXNvdXJjZXMgPDwvUHJvY1NldCBbL1BERiAvVGV4dCAvSW1hZ2VCIC9JbWFnZUMgL0ltYWdlSV0KL0V4dEdTdGF0ZSA8PC9HMyAzIDAgUj4+Ci9Gb250IDw8L0Y0IDQgMCBSPj4+PgovTWVkaWFCb3ggWzAgMCA2MTIgNzkyXQovQ29udGVudHMgNSAwIFIKL1N0cnV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DAwIG4gCjAwMDAwMDAxMDcgMDAwMDAgbiAKMDAwMDAxMDExMCAwMDAwMCBuIAowMDAwMDAwMTQ0IDAwMDAwIG4gCjAwMDAwMDA2NTggMDAwMDAgbiAKMDAwMDAwMDcxMyAwMDAwMCBuIAowMDAwMDAwNzYwIDAwMDAwIG4gCjAwMDAwMDkyMzkgMDAwMDAgbiAKMDAwMDAwOTQ2NiAwMDAwMCBuIAowMDAwMDA5Nzc0IDAwMDAwIG4gCnRyYWlsZXIKPDwvU2l6ZSAxMgovUm9vdCA3IDAgUgovSW5mbyAxIDAgUj4+CnN0YXJ0eHJlZgoxMDI0MgolJUVPRg==", + }, + "name": "file", + "label": None, + "show_label": True, + "style": {}, + "elem_id": None, + "interactive": None, + "visible": True, +} +BASE64_MICROPHONE = { + "name": "/var/folders/t1/j7cmtcgd0mx43jh9nj_r9mmw0000gn/T/audiovb4gqjpc.wav", + "data": "data:audio/wav;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQRChYECGFOAZwH/////////FUmpZpkq17GDD0JATYCGQ2hyb21lV0GGQ2hyb21lFlSua7+uvdeBAXPFh1upJLeC6SCDgQKGhkFfT1BVU2Oik09wdXNIZWFkAQEAAIC7AAAAAADhjbWERzuAAJ+BAWJkgSAfQ7Z1Af/////////ngQCjQdyBAACA+4PMpH/n1EPs4MPlDak5Fzh3pT23QOozrpMIemMucj6646WZTq/qWAjImUB4j/aEtJ08SjAyqjqFq+2zZ5BmqSKaDZJtE8pZRnh7pd/ez05WinXc/FkOyULyhFtAKY7v5MAAAAAAAAAAAAAAAAAAAKADzFGuPnjkNLV2iu/mGqmEkZOFkTDa9XGu/V+C8YKNhgXB0voRMsMX5rHf2WcKpFvpWqoiFsq5scEBbG0cNIjdGoU+Z3Scu5r9OMpyp0ETCKhFwi+D/g/ukqguM4i4rX7bjr3/IZCXAiOQ40t44c3thLsE9d7N/U6uePnhBMMh4hOCoQEL9bQcJHJpEL8EJsRPhIMhSZI9/aBmdm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modified/gradio/mix.py new file mode 100644 index 0000000000000000000000000000000000000000..aba81eb83a870d713f00ab776537537265975039 --- /dev/null +++ b/gradio-modified/gradio/mix.py @@ -0,0 +1,128 @@ +""" +Ways to transform interfaces to produce new interfaces +""" +import asyncio +import warnings + +import gradio +from gradio.documentation import document, set_documentation_group + +set_documentation_group("mix_interface") + + +@document() +class Parallel(gradio.Interface): + """ + Creates a new Interface consisting of multiple Interfaces in parallel (comparing their outputs). + The Interfaces to put in Parallel must share the same input components (but can have different output components). + + Demos: interface_parallel, interface_parallel_load + Guides: advanced_interface_features + """ + + def __init__(self, *interfaces: gradio.Interface, **options): + """ + Parameters: + interfaces: any number of Interface objects that are to be compared in parallel + options: additional kwargs that are passed into the new Interface object to customize it + Returns: + an Interface object comparing the given models + """ + outputs = [] + + for interface in interfaces: + if not (isinstance(interface, gradio.Interface)): + warnings.warn( + "Parallel requires all inputs to be of type Interface. " + "May not work as expected." + ) + outputs.extend(interface.output_components) + + async def parallel_fn(*args): + return_values_with_durations = await asyncio.gather( + *[interface.call_function(0, list(args)) for interface in interfaces] + ) + return_values = [rv["prediction"] for rv in return_values_with_durations] + combined_list = [] + for interface, return_value in zip(interfaces, return_values): + if len(interface.output_components) == 1: + combined_list.append(return_value) + else: + combined_list.extend(return_value) + if len(outputs) == 1: + return combined_list[0] + return combined_list + + parallel_fn.__name__ = " | ".join([io.__name__ for io in interfaces]) + + kwargs = { + "fn": parallel_fn, + "inputs": interfaces[0].input_components, + "outputs": outputs, + } + kwargs.update(options) + super().__init__(**kwargs) + + +@document() +class Series(gradio.Interface): + """ + Creates a new Interface from multiple Interfaces in series (the output of one is fed as the input to the next, + and so the input and output components must agree between the interfaces). + + Demos: interface_series, interface_series_load + Guides: advanced_interface_features + """ + + def __init__(self, *interfaces: gradio.Interface, **options): + """ + Parameters: + interfaces: any number of Interface objects that are to be connected in series + options: additional kwargs that are passed into the new Interface object to customize it + Returns: + an Interface object connecting the given models + """ + + async def connected_fn(*data): + for idx, interface in enumerate(interfaces): + # skip preprocessing for first interface since the Series interface will include it + if idx > 0 and not (interface.api_mode): + data = [ + input_component.preprocess(data[i]) + for i, input_component in enumerate(interface.input_components) + ] + + # run all of predictions sequentially + data = (await interface.call_function(0, list(data)))["prediction"] + if len(interface.output_components) == 1: + data = [data] + + # skip postprocessing for final interface since the Series interface will include it + if idx < len(interfaces) - 1 and not (interface.api_mode): + data = [ + output_component.postprocess(data[i]) + for i, output_component in enumerate( + interface.output_components + ) + ] + + if len(interface.output_components) == 1: # type: ignore + return data[0] + return data + + for interface in interfaces: + if not (isinstance(interface, gradio.Interface)): + warnings.warn( + "Series requires all inputs to be of type Interface. May " + "not work as expected." + ) + connected_fn.__name__ = " => ".join([io.__name__ for io in interfaces]) + + kwargs = { + "fn": connected_fn, + "inputs": interfaces[0].input_components, + "outputs": interfaces[-1].output_components, + "_api_mode": interfaces[0].api_mode, # TODO: set api_mode per-interface + } + kwargs.update(options) + super().__init__(**kwargs) diff --git a/gradio-modified/gradio/networking.py b/gradio-modified/gradio/networking.py new file mode 100644 index 0000000000000000000000000000000000000000..7e0aa3c20a4393013e05b0e69b1da43fea58ebdd --- /dev/null +++ b/gradio-modified/gradio/networking.py @@ -0,0 +1,185 @@ +""" +Defines helper methods useful for setting up ports, launching servers, and +creating tunnels. +""" +from __future__ import annotations + +import os +import socket +import threading +import time +import warnings +from typing import TYPE_CHECKING, Tuple + +import requests +import uvicorn + +from gradio.routes import App +from gradio.tunneling import Tunnel + +if TYPE_CHECKING: # Only import for type checking (to avoid circular imports). + from gradio.blocks import Blocks + +# By default, the local server will try to open on localhost, port 7860. +# If that is not available, then it will try 7861, 7862, ... 7959. +INITIAL_PORT_VALUE = int(os.getenv("GRADIO_SERVER_PORT", "7860")) +TRY_NUM_PORTS = int(os.getenv("GRADIO_NUM_PORTS", "100")) +LOCALHOST_NAME = os.getenv("GRADIO_SERVER_NAME", "127.0.0.1") +GRADIO_API_SERVER = "https://api.gradio.app/v2/tunnel-request" + + +class Server(uvicorn.Server): + def install_signal_handlers(self): + pass + + def run_in_thread(self): + self.thread = threading.Thread(target=self.run, daemon=True) + self.thread.start() + while not self.started: + time.sleep(1e-3) + + def close(self): + self.should_exit = True + self.thread.join() + + +def get_first_available_port(initial: int, final: int) -> int: + """ + Gets the first open port in a specified range of port numbers + Parameters: + initial: the initial value in the range of port numbers + final: final (exclusive) value in the range of port numbers, should be greater than `initial` + Returns: + port: the first open port in the range + """ + for port in range(initial, final): + try: + s = socket.socket() # create a socket object + s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) + s.bind((LOCALHOST_NAME, port)) # Bind to the port + s.close() + return port + except OSError: + pass + raise OSError( + "All ports from {} to {} are in use. Please close a port.".format( + initial, final - 1 + ) + ) + + +def configure_app(app: App, blocks: Blocks) -> App: + auth = blocks.auth + if auth is not None: + if not callable(auth): + app.auth = {account[0]: account[1] for account in auth} + else: + app.auth = auth + else: + app.auth = None + app.blocks = blocks + app.cwd = os.getcwd() + app.favicon_path = blocks.favicon_path + app.tokens = {} + return app + + +def start_server( + blocks: Blocks, + server_name: str | None = None, + server_port: int | None = None, + ssl_keyfile: str | None = None, + ssl_certfile: str | None = None, + ssl_keyfile_password: str | None = None, +) -> Tuple[str, int, str, App, Server]: + """Launches a local server running the provided Interface + Parameters: + blocks: The Blocks object to run on the server + server_name: to make app accessible on local network, set this to "0.0.0.0". Can be set by environment variable GRADIO_SERVER_NAME. + server_port: will start gradio app on this port (if available). Can be set by environment variable GRADIO_SERVER_PORT. + auth: If provided, username and password (or list of username-password tuples) required to access the Blocks. Can also provide function that takes username and password and returns True if valid login. + ssl_keyfile: If a path to a file is provided, will use this as the private key file to create a local server running on https. + ssl_certfile: If a path to a file is provided, will use this as the signed certificate for https. Needs to be provided if ssl_keyfile is provided. + ssl_keyfile_password: If a password is provided, will use this with the ssl certificate for https. + Returns: + port: the port number the server is running on + path_to_local_server: the complete address that the local server can be accessed at + app: the FastAPI app object + server: the server object that is a subclass of uvicorn.Server (used to close the server) + """ + server_name = server_name or LOCALHOST_NAME + # if port is not specified, search for first available port + if server_port is None: + port = get_first_available_port( + INITIAL_PORT_VALUE, INITIAL_PORT_VALUE + TRY_NUM_PORTS + ) + else: + try: + s = socket.socket() + s.bind((LOCALHOST_NAME, server_port)) + s.close() + except OSError: + raise OSError( + "Port {} is in use. If a gradio.Blocks is running on the port, you can close() it or gradio.close_all().".format( + server_port + ) + ) + port = server_port + + url_host_name = "localhost" if server_name == "0.0.0.0" else server_name + + if ssl_keyfile is not None: + if ssl_certfile is None: + raise ValueError( + "ssl_certfile must be provided if ssl_keyfile is provided." + ) + path_to_local_server = "https://{}:{}/".format(url_host_name, port) + else: + path_to_local_server = "http://{}:{}/".format(url_host_name, port) + + app = App.create_app(blocks) + + if blocks.save_to is not None: # Used for selenium tests + blocks.save_to["port"] = port + config = uvicorn.Config( + app=app, + port=port, + host=server_name, + log_level="warning", + ssl_keyfile=ssl_keyfile, + ssl_certfile=ssl_certfile, + ssl_keyfile_password=ssl_keyfile_password, + ws_max_size=1024 * 1024 * 1024, # Setting max websocket size to be 1 GB + ) + server = Server(config=config) + server.run_in_thread() + return server_name, port, path_to_local_server, app, server + + +def setup_tunnel(local_host: str, local_port: int) -> str: + response = requests.get(GRADIO_API_SERVER) + if response and response.status_code == 200: + try: + payload = response.json()[0] + remote_host, remote_port = payload["host"], int(payload["port"]) + tunnel = Tunnel(remote_host, remote_port, local_host, local_port) + address = tunnel.start_tunnel() + return address + except Exception as e: + raise RuntimeError(str(e)) + else: + raise RuntimeError("Could not get share link from Gradio API Server.") + + +def url_ok(url: str) -> bool: + try: + for _ in range(5): + with warnings.catch_warnings(): + warnings.filterwarnings("ignore") + r = requests.head(url, timeout=3, verify=False) + if r.status_code in (200, 401, 302): # 401 or 302 if auth is set + return True + time.sleep(0.500) + except (ConnectionError, requests.exceptions.ConnectionError): + return False + return False diff --git a/gradio-modified/gradio/outputs.py b/gradio-modified/gradio/outputs.py new file mode 100644 index 0000000000000000000000000000000000000000..2995fdcac85d750490df9b86d548aed452c876ec --- /dev/null +++ b/gradio-modified/gradio/outputs.py @@ -0,0 +1,334 @@ +# type: ignore +""" +This module defines various classes that can serve as the `output` to an interface. Each class must inherit from +`OutputComponent`, and each class must define a path to its template. All of the subclasses of `OutputComponent` are +automatically added to a registry, which allows them to be easily referenced in other parts of the code. +""" + +from __future__ import annotations + +import warnings +from typing import Dict, List, Optional + +from gradio import components + + +class Textbox(components.Textbox): + def __init__( + self, + type: str = "text", + label: Optional[str] = None, + ): + warnings.warn( + "Usage of gradio.outputs is deprecated, and will not be supported in the future, please import your components from gradio.components", + ) + super().__init__(label=label, type=type) + + +class Image(components.Image): + """ + Component displays an output image. + Output type: Union[numpy.array, PIL.Image, str, matplotlib.pyplot, Tuple[Union[numpy.array, PIL.Image, str], List[Tuple[str, float, float, float, float]]]] + """ + + def __init__( + self, type: str = "auto", plot: bool = False, label: Optional[str] = None + ): + """ + Parameters: + type (str): Type of value to be passed to component. "numpy" expects a numpy array with shape (width, height, 3), "pil" expects a PIL image object, "file" expects a file path to the saved image or a remote URL, "plot" expects a matplotlib.pyplot object, "auto" detects return type. + plot (bool): DEPRECATED. Whether to expect a plot to be returned by the function. + label (str): component name in interface. + """ + warnings.warn( + "Usage of gradio.outputs is deprecated, and will not be supported in the future, please import your components from gradio.components", + ) + if plot: + type = "plot" + super().__init__(type=type, label=label) + + +class Video(components.Video): + """ + Used for video output. + Output type: filepath + """ + + def __init__(self, type: Optional[str] = None, label: Optional[str] = None): + """ + Parameters: + type (str): Type of video format to be passed to component, such as 'avi' or 'mp4'. Use 'mp4' to ensure browser playability. If set to None, video will keep returned format. + label (str): component name in interface. + """ + warnings.warn( + "Usage of gradio.outputs is deprecated, and will not be supported in the future, please import your components from gradio.components", + ) + super().__init__(format=type, label=label) + + +class Audio(components.Audio): + """ + Creates an audio player that plays the output audio. + Output type: Union[Tuple[int, numpy.array], str] + """ + + def __init__(self, type: str = "auto", label: Optional[str] = None): + """ + Parameters: + type (str): Type of value to be passed to component. "numpy" returns a 2-set tuple with an integer sample_rate and the data as 16-bit int numpy.array of shape (samples, 2), "file" returns a temporary file path to the saved wav audio file, "auto" detects return type. + label (str): component name in interface. + """ + warnings.warn( + "Usage of gradio.outputs is deprecated, and will not be supported in the future, please import your components from gradio.components", + ) + super().__init__(type=type, label=label) + + +class File(components.File): + """ + Used for file output. + Output type: Union[file-like, str] + """ + + def __init__(self, label: Optional[str] = None): + """ + Parameters: + label (str): component name in interface. + """ + warnings.warn( + "Usage of gradio.outputs is deprecated, and will not be supported in the future, please import your components from gradio.components", + ) + super().__init__(label=label) + + +class Dataframe(components.Dataframe): + """ + Component displays 2D output through a spreadsheet interface. + Output type: Union[pandas.DataFrame, numpy.array, List[Union[str, float]], List[List[Union[str, float]]]] + """ + + def __init__( + self, + headers: Optional[List[str]] = None, + max_rows: Optional[int] = 20, + max_cols: Optional[int] = None, + overflow_row_behaviour: str = "paginate", + type: str = "auto", + label: Optional[str] = None, + ): + """ + Parameters: + headers (List[str]): Header names to dataframe. Only applicable if type is "numpy" or "array". + max_rows (int): Maximum number of rows to display at once. Set to None for infinite. + max_cols (int): Maximum number of columns to display at once. Set to None for infinite. + overflow_row_behaviour (str): If set to "paginate", will create pages for overflow rows. If set to "show_ends", will show initial and final rows and truncate middle rows. + type (str): Type of value to be passed to component. "pandas" for pandas dataframe, "numpy" for numpy array, or "array" for Python array, "auto" detects return type. + label (str): component name in interface. + """ + warnings.warn( + "Usage of gradio.outputs is deprecated, and will not be supported in the future, please import your components from gradio.components", + ) + super().__init__( + headers=headers, + type=type, + label=label, + max_rows=max_rows, + max_cols=max_cols, + overflow_row_behaviour=overflow_row_behaviour, + ) + + +class Timeseries(components.Timeseries): + """ + Component accepts pandas.DataFrame. + Output type: pandas.DataFrame + """ + + def __init__( + self, x: str = None, y: str | List[str] = None, label: Optional[str] = None + ): + """ + Parameters: + x (str): Column name of x (time) series. None if csv has no headers, in which case first column is x series. + y (Union[str, List[str]]): Column name of y series, or list of column names if multiple series. None if csv has no headers, in which case every column after first is a y series. + label (str): component name in interface. + """ + warnings.warn( + "Usage of gradio.outputs is deprecated, and will not be supported in the future, please import your components from gradio.components", + ) + super().__init__(x=x, y=y, label=label) + + +class State(components.State): + """ + Special hidden component that stores state across runs of the interface. + Output type: Any + """ + + def __init__(self, label: Optional[str] = None): + """ + Parameters: + label (str): component name in interface (not used). + """ + warnings.warn( + "Usage of gradio.outputs is deprecated, and will not be supported in the future, please import this component as gr.State() from gradio.components", + ) + super().__init__(label=label) + + +class Label(components.Label): + """ + Component outputs a classification label, along with confidence scores of top categories if provided. Confidence scores are represented as a dictionary mapping labels to scores between 0 and 1. + Output type: Union[Dict[str, float], str, int, float] + """ + + def __init__( + self, + num_top_classes: Optional[int] = None, + type: str = "auto", + label: Optional[str] = None, + ): + """ + Parameters: + num_top_classes (int): number of most confident classes to show. + type (str): Type of value to be passed to component. "value" expects a single out label, "confidences" expects a dictionary mapping labels to confidence scores, "auto" detects return type. + label (str): component name in interface. + """ + warnings.warn( + "Usage of gradio.outputs is deprecated, and will not be supported in the future, please import your components from gradio.components", + ) + super().__init__(num_top_classes=num_top_classes, type=type, label=label) + + +class KeyValues: + """ + Component displays a table representing values for multiple fields. + Output type: Union[Dict, List[Tuple[str, Union[str, int, float]]]] + """ + + def __init__(self, value: str = " ", *, label: Optional[str] = None, **kwargs): + """ + Parameters: + value (str): IGNORED + label (str): component name in interface. + """ + raise DeprecationWarning( + "The KeyValues component is deprecated. Please use the DataFrame or JSON " + "components instead." + ) + + +class HighlightedText(components.HighlightedText): + """ + Component creates text that contains spans that are highlighted by category or numerical value. + Output is represent as a list of Tuple pairs, where the first element represents the span of text represented by the tuple, and the second element represents the category or value of the text. + Output type: List[Tuple[str, Union[float, str]]] + """ + + def __init__( + self, + color_map: Dict[str, str] = None, + label: Optional[str] = None, + show_legend: bool = False, + ): + """ + Parameters: + color_map (Dict[str, str]): Map between category and respective colors + label (str): component name in interface. + show_legend (bool): whether to show span categories in a separate legend or inline. + """ + warnings.warn( + "Usage of gradio.outputs is deprecated, and will not be supported in the future, please import your components from gradio.components", + ) + super().__init__(color_map=color_map, label=label, show_legend=show_legend) + + +class JSON(components.JSON): + """ + Used for JSON output. Expects a JSON string or a Python object that is JSON serializable. + Output type: Union[str, Any] + """ + + def __init__(self, label: Optional[str] = None): + """ + Parameters: + label (str): component name in interface. + """ + warnings.warn( + "Usage of gradio.outputs is deprecated, and will not be supported in the future, please import your components from gradio.components", + ) + super().__init__(label=label) + + +class HTML(components.HTML): + """ + Used for HTML output. Expects an HTML valid string. + Output type: str + """ + + def __init__(self, label: Optional[str] = None): + """ + Parameters: + label (str): component name in interface. + """ + super().__init__(label=label) + + +class Carousel(components.Carousel): + """ + Component displays a set of output components that can be scrolled through. + """ + + def __init__( + self, + components: components.Component | List[components.Component], + label: Optional[str] = None, + ): + """ + Parameters: + components (Union[List[Component], Component]): Classes of component(s) that will be scrolled through. + label (str): component name in interface. + """ + warnings.warn( + "Usage of gradio.outputs is deprecated, and will not be supported in the future, please import your components from gradio.components", + ) + super().__init__(components=components, label=label) + + +class Chatbot(components.Chatbot): + """ + Component displays a chatbot output showing both user submitted messages and responses + Output type: List[Tuple[str, str]] + """ + + def __init__(self, label: Optional[str] = None): + """ + Parameters: + label (str): component name in interface (not used). + """ + warnings.warn( + "Usage of gradio.outputs is deprecated, and will not be supported in the future, please import your components from gradio.components", + ) + super().__init__(label=label) + + +class Image3D(components.Model3D): + """ + Used for 3D image model output. + Input type: File object of type (.obj, glb, or .gltf) + """ + + def __init__( + self, + clear_color=None, + label: Optional[str] = None, + ): + """ + Parameters: + label (str): component name in interface. + optional (bool): If True, the interface can be submitted with no uploaded image, in which case the input value is None. + """ + warnings.warn( + "Usage of gradio.outputs is deprecated, and will not be supported in the future, please import your components from gradio.components", + ) + super().__init__(clear_color=clear_color, label=label) diff --git a/gradio-modified/gradio/pipelines.py b/gradio-modified/gradio/pipelines.py new file mode 100644 index 0000000000000000000000000000000000000000..f974ed6d393a72c22db28451f38e0e5e6fafe377 --- /dev/null +++ b/gradio-modified/gradio/pipelines.py @@ -0,0 +1,191 @@ +"""This module should not be used directly as its API is subject to change. Instead, +please use the `gr.Interface.from_pipeline()` function.""" + +from __future__ import annotations + +from typing import TYPE_CHECKING, Dict + +from gradio import components + +if TYPE_CHECKING: # Only import for type checking (is False at runtime). + from transformers import pipelines + + +def load_from_pipeline(pipeline: pipelines.base.Pipeline) -> Dict: + """ + Gets the appropriate Interface kwargs for a given Hugging Face transformers.Pipeline. + pipeline (transformers.Pipeline): the transformers.Pipeline from which to create an interface + Returns: + (dict): a dictionary of kwargs that can be used to construct an Interface object + """ + try: + import transformers + from transformers import pipelines + except ImportError: + raise ImportError( + "transformers not installed. Please try `pip install transformers`" + ) + if not isinstance(pipeline, pipelines.base.Pipeline): + raise ValueError("pipeline must be a transformers.Pipeline") + + # Handle the different pipelines. The has_attr() checks to make sure the pipeline exists in the + # version of the transformers library that the user has installed. + if hasattr(transformers, "AudioClassificationPipeline") and isinstance( + pipeline, pipelines.audio_classification.AudioClassificationPipeline + ): + pipeline_info = { + "inputs": components.Audio( + source="microphone", type="filepath", label="Input" + ), + "outputs": components.Label(label="Class"), + "preprocess": lambda i: {"inputs": i}, + "postprocess": lambda r: {i["label"].split(", ")[0]: i["score"] for i in r}, + } + elif hasattr(transformers, "AutomaticSpeechRecognitionPipeline") and isinstance( + pipeline, + pipelines.automatic_speech_recognition.AutomaticSpeechRecognitionPipeline, + ): + pipeline_info = { + "inputs": components.Audio( + source="microphone", type="filepath", label="Input" + ), + "outputs": components.Textbox(label="Output"), + "preprocess": lambda i: {"inputs": i}, + "postprocess": lambda r: r["text"], + } + elif hasattr(transformers, "FeatureExtractionPipeline") and isinstance( + pipeline, pipelines.feature_extraction.FeatureExtractionPipeline + ): + pipeline_info = { + "inputs": components.Textbox(label="Input"), + "outputs": components.Dataframe(label="Output"), + "preprocess": lambda x: {"inputs": x}, + "postprocess": lambda r: r[0], + } + elif hasattr(transformers, "FillMaskPipeline") and isinstance( + pipeline, pipelines.fill_mask.FillMaskPipeline + ): + pipeline_info = { + "inputs": components.Textbox(label="Input"), + "outputs": components.Label(label="Classification"), + "preprocess": lambda x: {"inputs": x}, + "postprocess": lambda r: {i["token_str"]: i["score"] for i in r}, + } + elif hasattr(transformers, "ImageClassificationPipeline") and isinstance( + pipeline, pipelines.image_classification.ImageClassificationPipeline + ): + pipeline_info = { + "inputs": components.Image(type="filepath", label="Input Image"), + "outputs": components.Label(type="confidences", label="Classification"), + "preprocess": lambda i: {"images": i}, + "postprocess": lambda r: {i["label"].split(", ")[0]: i["score"] for i in r}, + } + elif hasattr(transformers, "QuestionAnsweringPipeline") and isinstance( + pipeline, pipelines.question_answering.QuestionAnsweringPipeline + ): + pipeline_info = { + "inputs": [ + components.Textbox(lines=7, label="Context"), + components.Textbox(label="Question"), + ], + "outputs": [ + components.Textbox(label="Answer"), + components.Label(label="Score"), + ], + "preprocess": lambda c, q: {"context": c, "question": q}, + "postprocess": lambda r: (r["answer"], r["score"]), + } + elif hasattr(transformers, "SummarizationPipeline") and isinstance( + pipeline, pipelines.text2text_generation.SummarizationPipeline + ): + pipeline_info = { + "inputs": components.Textbox(lines=7, label="Input"), + "outputs": components.Textbox(label="Summary"), + "preprocess": lambda x: {"inputs": x}, + "postprocess": lambda r: r[0]["summary_text"], + } + elif hasattr(transformers, "TextClassificationPipeline") and isinstance( + pipeline, pipelines.text_classification.TextClassificationPipeline + ): + pipeline_info = { + "inputs": components.Textbox(label="Input"), + "outputs": components.Label(label="Classification"), + "preprocess": lambda x: [x], + "postprocess": lambda r: {i["label"].split(", ")[0]: i["score"] for i in r}, + } + elif hasattr(transformers, "TextGenerationPipeline") and isinstance( + pipeline, pipelines.text_generation.TextGenerationPipeline + ): + pipeline_info = { + "inputs": components.Textbox(label="Input"), + "outputs": components.Textbox(label="Output"), + "preprocess": lambda x: {"text_inputs": x}, + "postprocess": lambda r: r[0]["generated_text"], + } + elif hasattr(transformers, "TranslationPipeline") and isinstance( + pipeline, pipelines.text2text_generation.TranslationPipeline + ): + pipeline_info = { + "inputs": components.Textbox(label="Input"), + "outputs": components.Textbox(label="Translation"), + "preprocess": lambda x: [x], + "postprocess": lambda r: r[0]["translation_text"], + } + elif hasattr(transformers, "Text2TextGenerationPipeline") and isinstance( + pipeline, pipelines.text2text_generation.Text2TextGenerationPipeline + ): + pipeline_info = { + "inputs": components.Textbox(label="Input"), + "outputs": components.Textbox(label="Generated Text"), + "preprocess": lambda x: [x], + "postprocess": lambda r: r[0]["generated_text"], + } + elif hasattr(transformers, "ZeroShotClassificationPipeline") and isinstance( + pipeline, pipelines.zero_shot_classification.ZeroShotClassificationPipeline + ): + pipeline_info = { + "inputs": [ + components.Textbox(label="Input"), + components.Textbox(label="Possible class names (" "comma-separated)"), + components.Checkbox(label="Allow multiple true classes"), + ], + "outputs": components.Label(label="Classification"), + "preprocess": lambda i, c, m: { + "sequences": i, + "candidate_labels": c, + "multi_label": m, + }, + "postprocess": lambda r: { + r["labels"][i]: r["scores"][i] for i in range(len(r["labels"])) + }, + } + else: + raise ValueError("Unsupported pipeline type: {}".format(type(pipeline))) + + # define the function that will be called by the Interface + def fn(*params): + data = pipeline_info["preprocess"](*params) + # special cases that needs to be handled differently + if isinstance( + pipeline, + ( + pipelines.text_classification.TextClassificationPipeline, + pipelines.text2text_generation.Text2TextGenerationPipeline, + pipelines.text2text_generation.TranslationPipeline, + ), + ): + data = pipeline(*data) + else: + data = pipeline(**data) + output = pipeline_info["postprocess"](data) + return output + + interface_info = pipeline_info.copy() + interface_info["fn"] = fn + del interface_info["preprocess"] + del interface_info["postprocess"] + + # define the title/description of the Interface + interface_info["title"] = pipeline.model.__class__.__name__ + + return interface_info diff --git a/gradio-modified/gradio/processing_utils.py b/gradio-modified/gradio/processing_utils.py new file mode 100644 index 0000000000000000000000000000000000000000..98e35365c9a2dcb3a0e9ccaeedaad275f09132f1 --- /dev/null +++ b/gradio-modified/gradio/processing_utils.py @@ -0,0 +1,755 @@ +from __future__ import annotations + +import base64 +import hashlib +import json +import mimetypes +import os +import pathlib +import shutil +import subprocess +import tempfile +import urllib.request +import warnings +from io import BytesIO +from pathlib import Path +from typing import Dict, Tuple + +import numpy as np +import requests +from ffmpy import FFmpeg, FFprobe, FFRuntimeError +from PIL import Image, ImageOps, PngImagePlugin + +from gradio import encryptor, utils + +with warnings.catch_warnings(): + warnings.simplefilter("ignore") # Ignore pydub warning if ffmpeg is not installed + from pydub import AudioSegment + + +######################### +# GENERAL +######################### + + +def to_binary(x: str | Dict) -> bytes: + """Converts a base64 string or dictionary to a binary string that can be sent in a POST.""" + if isinstance(x, dict): + if x.get("data"): + base64str = x["data"] + else: + base64str = encode_url_or_file_to_base64(x["name"]) + else: + base64str = x + return base64.b64decode(base64str.split(",")[1]) + + +######################### +# IMAGE PRE-PROCESSING +######################### + + +def decode_base64_to_image(encoding: str) -> Image.Image: + content = encoding.split(";")[1] + image_encoded = content.split(",")[1] + return Image.open(BytesIO(base64.b64decode(image_encoded))) + + +def encode_url_or_file_to_base64(path: str | Path, encryption_key: bytes | None = None): + if utils.validate_url(str(path)): + return encode_url_to_base64(str(path), encryption_key=encryption_key) + else: + return encode_file_to_base64(str(path), encryption_key=encryption_key) + + +def get_mimetype(filename: str) -> str | None: + mimetype = mimetypes.guess_type(filename)[0] + if mimetype is not None: + mimetype = mimetype.replace("x-wav", "wav").replace("x-flac", "flac") + return mimetype + + +def get_extension(encoding: str) -> str | None: + encoding = encoding.replace("audio/wav", "audio/x-wav") + type = mimetypes.guess_type(encoding)[0] + if type == "audio/flac": # flac is not supported by mimetypes + return "flac" + elif type is None: + return None + extension = mimetypes.guess_extension(type) + if extension is not None and extension.startswith("."): + extension = extension[1:] + return extension + + +def encode_file_to_base64(f, encryption_key=None): + with open(f, "rb") as file: + encoded_string = base64.b64encode(file.read()) + if encryption_key: + encoded_string = encryptor.decrypt(encryption_key, encoded_string) + base64_str = str(encoded_string, "utf-8") + mimetype = get_mimetype(f) + return ( + "data:" + + (mimetype if mimetype is not None else "") + + ";base64," + + base64_str + ) + + +def encode_url_to_base64(url, encryption_key=None): + encoded_string = base64.b64encode(requests.get(url).content) + if encryption_key: + encoded_string = encryptor.decrypt(encryption_key, encoded_string) + base64_str = str(encoded_string, "utf-8") + mimetype = get_mimetype(url) + return ( + "data:" + (mimetype if mimetype is not None else "") + ";base64," + base64_str + ) + + +def encode_plot_to_base64(plt): + with BytesIO() as output_bytes: + plt.savefig(output_bytes, format="png") + bytes_data = output_bytes.getvalue() + base64_str = str(base64.b64encode(bytes_data), "utf-8") + return "data:image/png;base64," + base64_str + + +def save_array_to_file(image_array, dir=None): + pil_image = Image.fromarray(_convert(image_array, np.uint8, force_copy=False)) + file_obj = tempfile.NamedTemporaryFile(delete=False, suffix=".png", dir=dir) + pil_image.save(file_obj) + return file_obj + + +def save_pil_to_file(pil_image, dir=None): + file_obj = tempfile.NamedTemporaryFile(delete=False, suffix=".png", dir=dir) + pil_image.save(file_obj) + return file_obj + + +def encode_pil_to_base64(pil_image): + with BytesIO() as output_bytes: + + # Copy any text-only metadata + use_metadata = False + metadata = PngImagePlugin.PngInfo() + for key, value in pil_image.info.items(): + if isinstance(key, str) and isinstance(value, str): + metadata.add_text(key, value) + use_metadata = True + + pil_image.save( + output_bytes, "PNG", pnginfo=(metadata if use_metadata else None) + ) + bytes_data = output_bytes.getvalue() + base64_str = str(base64.b64encode(bytes_data), "utf-8") + return "data:image/png;base64," + base64_str + + +def encode_array_to_base64(image_array): + with BytesIO() as output_bytes: + pil_image = Image.fromarray(_convert(image_array, np.uint8, force_copy=False)) + pil_image.save(output_bytes, "PNG") + bytes_data = output_bytes.getvalue() + base64_str = str(base64.b64encode(bytes_data), "utf-8") + return "data:image/png;base64," + base64_str + + +def resize_and_crop(img, size, crop_type="center"): + """ + Resize and crop an image to fit the specified size. + args: + size: `(width, height)` tuple. Pass `None` for either width or height + to only crop and resize the other. + crop_type: can be 'top', 'middle' or 'bottom', depending on this + value, the image will cropped getting the 'top/left', 'middle' or + 'bottom/right' of the image to fit the size. + raises: + ValueError: if an invalid `crop_type` is provided. + """ + if crop_type == "top": + center = (0, 0) + elif crop_type == "center": + center = (0.5, 0.5) + else: + raise ValueError + + resize = list(size) + if size[0] is None: + resize[0] = img.size[0] + if size[1] is None: + resize[1] = img.size[1] + return ImageOps.fit(img, resize, centering=center) # type: ignore + + +################## +# Audio +################## + + +def audio_from_file(filename, crop_min=0, crop_max=100): + try: + audio = AudioSegment.from_file(filename) + except FileNotFoundError as e: + isfile = Path(filename).is_file() + msg = ( + f"Cannot load audio from file: `{'ffprobe' if isfile else filename}` not found." + + " Please install `ffmpeg` in your system to use non-WAV audio file formats" + " and make sure `ffprobe` is in your PATH." + if isfile + else "" + ) + raise RuntimeError(msg) from e + if crop_min != 0 or crop_max != 100: + audio_start = len(audio) * crop_min / 100 + audio_end = len(audio) * crop_max / 100 + audio = audio[audio_start:audio_end] + data = np.array(audio.get_array_of_samples()) + if audio.channels > 1: + data = data.reshape(-1, audio.channels) + return audio.frame_rate, data + + +def audio_to_file(sample_rate, data, filename): + data = convert_to_16_bit_wav(data) + audio = AudioSegment( + data.tobytes(), + frame_rate=sample_rate, + sample_width=data.dtype.itemsize, + channels=(1 if len(data.shape) == 1 else data.shape[1]), + ) + file = audio.export(filename, format="wav") + file.close() # type: ignore + + +def convert_to_16_bit_wav(data): + # Based on: https://docs.scipy.org/doc/scipy/reference/generated/scipy.io.wavfile.write.html + warning = "Trying to convert audio automatically from {} to 16-bit int format." + if data.dtype in [np.float64, np.float32, np.float16]: + warnings.warn(warning.format(data.dtype)) + data = data / np.abs(data).max() + data = data * 32767 + data = data.astype(np.int16) + elif data.dtype == np.int32: + warnings.warn(warning.format(data.dtype)) + data = data / 65538 + data = data.astype(np.int16) + elif data.dtype == np.int16: + pass + elif data.dtype == np.uint16: + warnings.warn(warning.format(data.dtype)) + data = data - 32768 + data = data.astype(np.int16) + elif data.dtype == np.uint8: + warnings.warn(warning.format(data.dtype)) + data = data * 257 - 32768 + data = data.astype(np.int16) + else: + raise ValueError( + "Audio data cannot be converted automatically from " + f"{data.dtype} to 16-bit int format." + ) + return data + + +################## +# OUTPUT +################## + + +def decode_base64_to_binary(encoding) -> Tuple[bytes, str | None]: + extension = get_extension(encoding) + data = encoding.split(",")[1] + return base64.b64decode(data), extension + + +def decode_base64_to_file( + encoding, encryption_key=None, file_path=None, dir=None, prefix=None +): + if dir is not None: + os.makedirs(dir, exist_ok=True) + data, extension = decode_base64_to_binary(encoding) + if file_path is not None and prefix is None: + filename = Path(file_path).name + prefix = filename + if "." in filename: + prefix = filename[0 : filename.index(".")] + extension = filename[filename.index(".") + 1 :] + + if prefix is not None: + prefix = utils.strip_invalid_filename_characters(prefix) + + if extension is None: + file_obj = tempfile.NamedTemporaryFile(delete=False, prefix=prefix, dir=dir) + else: + file_obj = tempfile.NamedTemporaryFile( + delete=False, + prefix=prefix, + suffix="." + extension, + dir=dir, + ) + if encryption_key is not None: + data = encryptor.encrypt(encryption_key, data) + file_obj.write(data) + file_obj.flush() + return file_obj + + +def dict_or_str_to_json_file(jsn, dir=None): + if dir is not None: + os.makedirs(dir, exist_ok=True) + + file_obj = tempfile.NamedTemporaryFile( + delete=False, suffix=".json", dir=dir, mode="w+" + ) + if isinstance(jsn, str): + jsn = json.loads(jsn) + json.dump(jsn, file_obj) + file_obj.flush() + return file_obj + + +def file_to_json(file_path: str | Path) -> Dict: + with open(file_path) as f: + return json.load(f) + + +class TempFileManager: + """ + A class that should be inherited by any Component that needs to manage temporary files. + It should be instantiated in the __init__ method of the component. + """ + + def __init__(self) -> None: + # Set stores all the temporary files created by this component. + self.temp_files = set() + + def hash_file(self, file_path: str, chunk_num_blocks: int = 128) -> str: + sha1 = hashlib.sha1() + with open(file_path, "rb") as f: + for chunk in iter(lambda: f.read(chunk_num_blocks * sha1.block_size), b""): + sha1.update(chunk) + return sha1.hexdigest() + + def hash_url(self, url: str, chunk_num_blocks: int = 128) -> str: + sha1 = hashlib.sha1() + remote = urllib.request.urlopen(url) + max_file_size = 100 * 1024 * 1024 # 100MB + total_read = 0 + while True: + data = remote.read(chunk_num_blocks * sha1.block_size) + total_read += chunk_num_blocks * sha1.block_size + if not data or total_read > max_file_size: + break + sha1.update(data) + return sha1.hexdigest() + + def get_prefix_and_extension(self, file_path_or_url: str) -> Tuple[str, str]: + file_name = Path(file_path_or_url).name + prefix, extension = file_name, None + if "." in file_name: + prefix = file_name[0 : file_name.index(".")] + extension = "." + file_name[file_name.index(".") + 1 :] + else: + extension = "" + prefix = utils.strip_invalid_filename_characters(prefix) + return prefix, extension + + def get_temp_file_path(self, file_path: str) -> str: + prefix, extension = self.get_prefix_and_extension(file_path) + file_hash = self.hash_file(file_path) + return prefix + file_hash + extension + + def get_temp_url_path(self, url: str) -> str: + prefix, extension = self.get_prefix_and_extension(url) + file_hash = self.hash_url(url) + return prefix + file_hash + extension + + def make_temp_copy_if_needed(self, file_path: str) -> str: + """Returns a temporary file path for a copy of the given file path if it does + not already exist. Otherwise returns the path to the existing temp file.""" + f = tempfile.NamedTemporaryFile() + temp_dir = Path(f.name).parent + + temp_file_path = self.get_temp_file_path(file_path) + f.name = str(temp_dir / temp_file_path) + full_temp_file_path = str(Path(f.name).resolve()) + + if not Path(full_temp_file_path).exists(): + shutil.copy2(file_path, full_temp_file_path) + + self.temp_files.add(full_temp_file_path) + return full_temp_file_path + + def download_temp_copy_if_needed(self, url: str) -> str: + """Downloads a file and makes a temporary file path for a copy if does not already + exist. Otherwise returns the path to the existing temp file.""" + f = tempfile.NamedTemporaryFile() + temp_dir = Path(f.name).parent + + temp_file_path = self.get_temp_url_path(url) + f.name = str(temp_dir / temp_file_path) + full_temp_file_path = str(Path(f.name).resolve()) + + if not Path(full_temp_file_path).exists(): + with requests.get(url, stream=True) as r: + with open(full_temp_file_path, "wb") as f: + shutil.copyfileobj(r.raw, f) + + self.temp_files.add(full_temp_file_path) + return full_temp_file_path + + +def create_tmp_copy_of_file(file_path, dir=None): + if dir is not None: + os.makedirs(dir, exist_ok=True) + file_name = Path(file_path).name + prefix, extension = file_name, None + if "." in file_name: + prefix = file_name[0 : file_name.index(".")] + extension = file_name[file_name.index(".") + 1 :] + prefix = utils.strip_invalid_filename_characters(prefix) + if extension is None: + file_obj = tempfile.NamedTemporaryFile(delete=False, prefix=prefix, dir=dir) + else: + file_obj = tempfile.NamedTemporaryFile( + delete=False, + prefix=prefix, + suffix="." + extension, + dir=dir, + ) + shutil.copy2(file_path, file_obj.name) + return file_obj + + +def _convert(image, dtype, force_copy=False, uniform=False): + """ + Adapted from: https://github.com/scikit-image/scikit-image/blob/main/skimage/util/dtype.py#L510-L531 + + Convert an image to the requested data-type. + Warnings are issued in case of precision loss, or when negative values + are clipped during conversion to unsigned integer types (sign loss). + Floating point values are expected to be normalized and will be clipped + to the range [0.0, 1.0] or [-1.0, 1.0] when converting to unsigned or + signed integers respectively. + Numbers are not shifted to the negative side when converting from + unsigned to signed integer types. Negative values will be clipped when + converting to unsigned integers. + Parameters + ---------- + image : ndarray + Input image. + dtype : dtype + Target data-type. + force_copy : bool, optional + Force a copy of the data, irrespective of its current dtype. + uniform : bool, optional + Uniformly quantize the floating point range to the integer range. + By default (uniform=False) floating point values are scaled and + rounded to the nearest integers, which minimizes back and forth + conversion errors. + .. versionchanged :: 0.15 + ``_convert`` no longer warns about possible precision or sign + information loss. See discussions on these warnings at: + https://github.com/scikit-image/scikit-image/issues/2602 + https://github.com/scikit-image/scikit-image/issues/543#issuecomment-208202228 + https://github.com/scikit-image/scikit-image/pull/3575 + References + ---------- + .. [1] DirectX data conversion rules. + https://msdn.microsoft.com/en-us/library/windows/desktop/dd607323%28v=vs.85%29.aspx + .. [2] Data Conversions. In "OpenGL ES 2.0 Specification v2.0.25", + pp 7-8. Khronos Group, 2010. + .. [3] Proper treatment of pixels as integers. A.W. Paeth. + In "Graphics Gems I", pp 249-256. Morgan Kaufmann, 1990. + .. [4] Dirty Pixels. J. Blinn. In "Jim Blinn's corner: Dirty Pixels", + pp 47-57. Morgan Kaufmann, 1998. + """ + dtype_range = { + bool: (False, True), + np.bool_: (False, True), + np.bool8: (False, True), + float: (-1, 1), + np.float_: (-1, 1), + np.float16: (-1, 1), + np.float32: (-1, 1), + np.float64: (-1, 1), + } + + def _dtype_itemsize(itemsize, *dtypes): + """Return first of `dtypes` with itemsize greater than `itemsize` + Parameters + ---------- + itemsize: int + The data type object element size. + Other Parameters + ---------------- + *dtypes: + Any Object accepted by `np.dtype` to be converted to a data + type object + Returns + ------- + dtype: data type object + First of `dtypes` with itemsize greater than `itemsize`. + """ + return next(dt for dt in dtypes if np.dtype(dt).itemsize >= itemsize) + + def _dtype_bits(kind, bits, itemsize=1): + """Return dtype of `kind` that can store a `bits` wide unsigned int + Parameters: + kind: str + Data type kind. + bits: int + Desired number of bits. + itemsize: int + The data type object element size. + Returns + ------- + dtype: data type object + Data type of `kind` that can store a `bits` wide unsigned int + """ + + s = next( + i + for i in (itemsize,) + (2, 4, 8) + if bits < (i * 8) or (bits == (i * 8) and kind == "u") + ) + + return np.dtype(kind + str(s)) + + def _scale(a, n, m, copy=True): + """Scale an array of unsigned/positive integers from `n` to `m` bits. + Numbers can be represented exactly only if `m` is a multiple of `n`. + Parameters + ---------- + a : ndarray + Input image array. + n : int + Number of bits currently used to encode the values in `a`. + m : int + Desired number of bits to encode the values in `out`. + copy : bool, optional + If True, allocates and returns new array. Otherwise, modifies + `a` in place. + Returns + ------- + out : array + Output image array. Has the same kind as `a`. + """ + kind = a.dtype.kind + if n > m and a.max() < 2**m: + return a.astype(_dtype_bits(kind, m)) + elif n == m: + return a.copy() if copy else a + elif n > m: + # downscale with precision loss + if copy: + b = np.empty(a.shape, _dtype_bits(kind, m)) + np.floor_divide(a, 2 ** (n - m), out=b, dtype=a.dtype, casting="unsafe") + return b + else: + a //= 2 ** (n - m) + return a + elif m % n == 0: + # exact upscale to a multiple of `n` bits + if copy: + b = np.empty(a.shape, _dtype_bits(kind, m)) + np.multiply(a, (2**m - 1) // (2**n - 1), out=b, dtype=b.dtype) + return b + else: + a = a.astype(_dtype_bits(kind, m, a.dtype.itemsize), copy=False) + a *= (2**m - 1) // (2**n - 1) + return a + else: + # upscale to a multiple of `n` bits, + # then downscale with precision loss + o = (m // n + 1) * n + if copy: + b = np.empty(a.shape, _dtype_bits(kind, o)) + np.multiply(a, (2**o - 1) // (2**n - 1), out=b, dtype=b.dtype) + b //= 2 ** (o - m) + return b + else: + a = a.astype(_dtype_bits(kind, o, a.dtype.itemsize), copy=False) + a *= (2**o - 1) // (2**n - 1) + a //= 2 ** (o - m) + return a + + image = np.asarray(image) + dtypeobj_in = image.dtype + if dtype is np.floating: + dtypeobj_out = np.dtype("float64") + else: + dtypeobj_out = np.dtype(dtype) + dtype_in = dtypeobj_in.type + dtype_out = dtypeobj_out.type + kind_in = dtypeobj_in.kind + kind_out = dtypeobj_out.kind + itemsize_in = dtypeobj_in.itemsize + itemsize_out = dtypeobj_out.itemsize + + # Below, we do an `issubdtype` check. Its purpose is to find out + # whether we can get away without doing any image conversion. This happens + # when: + # + # - the output and input dtypes are the same or + # - when the output is specified as a type, and the input dtype + # is a subclass of that type (e.g. `np.floating` will allow + # `float32` and `float64` arrays through) + + if np.issubdtype(dtype_in, np.obj2sctype(dtype)): + if force_copy: + image = image.copy() + return image + + if kind_in in "ui": + imin_in = np.iinfo(dtype_in).min + imax_in = np.iinfo(dtype_in).max + if kind_out in "ui": + imin_out = np.iinfo(dtype_out).min # type: ignore + imax_out = np.iinfo(dtype_out).max # type: ignore + + # any -> binary + if kind_out == "b": + return image > dtype_in(dtype_range[dtype_in][1] / 2) + + # binary -> any + if kind_in == "b": + result = image.astype(dtype_out) + if kind_out != "f": + result *= dtype_out(dtype_range[dtype_out][1]) + return result + + # float -> any + if kind_in == "f": + if kind_out == "f": + # float -> float + return image.astype(dtype_out) + + if np.min(image) < -1.0 or np.max(image) > 1.0: + raise ValueError("Images of type float must be between -1 and 1.") + # floating point -> integer + # use float type that can represent output integer type + computation_type = _dtype_itemsize( + itemsize_out, dtype_in, np.float32, np.float64 + ) + + if not uniform: + if kind_out == "u": + image_out = np.multiply(image, imax_out, dtype=computation_type) # type: ignore + else: + image_out = np.multiply( + image, (imax_out - imin_out) / 2, dtype=computation_type # type: ignore + ) + image_out -= 1.0 / 2.0 + np.rint(image_out, out=image_out) + np.clip(image_out, imin_out, imax_out, out=image_out) # type: ignore + elif kind_out == "u": + image_out = np.multiply(image, imax_out + 1, dtype=computation_type) # type: ignore + np.clip(image_out, 0, imax_out, out=image_out) # type: ignore + else: + image_out = np.multiply( + image, (imax_out - imin_out + 1.0) / 2.0, dtype=computation_type # type: ignore + ) + np.floor(image_out, out=image_out) + np.clip(image_out, imin_out, imax_out, out=image_out) # type: ignore + return image_out.astype(dtype_out) + + # signed/unsigned int -> float + if kind_out == "f": + # use float type that can exactly represent input integers + computation_type = _dtype_itemsize( + itemsize_in, dtype_out, np.float32, np.float64 + ) + + if kind_in == "u": + # using np.divide or np.multiply doesn't copy the data + # until the computation time + image = np.multiply(image, 1.0 / imax_in, dtype=computation_type) # type: ignore + # DirectX uses this conversion also for signed ints + # if imin_in: + # np.maximum(image, -1.0, out=image) + else: + image = np.add(image, 0.5, dtype=computation_type) + image *= 2 / (imax_in - imin_in) # type: ignore + + return np.asarray(image, dtype_out) + + # unsigned int -> signed/unsigned int + if kind_in == "u": + if kind_out == "i": + # unsigned int -> signed int + image = _scale(image, 8 * itemsize_in, 8 * itemsize_out - 1) + return image.view(dtype_out) + else: + # unsigned int -> unsigned int + return _scale(image, 8 * itemsize_in, 8 * itemsize_out) + + # signed int -> unsigned int + if kind_out == "u": + image = _scale(image, 8 * itemsize_in - 1, 8 * itemsize_out) + result = np.empty(image.shape, dtype_out) + np.maximum(image, 0, out=result, dtype=image.dtype, casting="unsafe") + return result + + # signed int -> signed int + if itemsize_in > itemsize_out: + return _scale(image, 8 * itemsize_in - 1, 8 * itemsize_out - 1) + + image = image.astype(_dtype_bits("i", itemsize_out * 8)) + image -= imin_in # type: ignore + image = _scale(image, 8 * itemsize_in, 8 * itemsize_out, copy=False) + image += imin_out # type: ignore + return image.astype(dtype_out) + + +def ffmpeg_installed() -> bool: + return shutil.which("ffmpeg") is not None + + +def video_is_playable(video_filepath: str) -> bool: + """Determines if a video is playable in the browser. + + A video is playable if it has a playable container and codec. + .mp4 -> h264 + .webm -> vp9 + .ogg -> theora + """ + try: + container = pathlib.Path(video_filepath).suffix.lower() + probe = FFprobe( + global_options="-show_format -show_streams -select_streams v -print_format json", + inputs={video_filepath: None}, + ) + output = probe.run(stderr=subprocess.PIPE, stdout=subprocess.PIPE) + output = json.loads(output[0]) + video_codec = output["streams"][0]["codec_name"] + return (container, video_codec) in [ + (".mp4", "h264"), + (".ogg", "theora"), + (".webm", "vp9"), + ] + # If anything goes wrong, assume the video can be played to not convert downstream + except (FFRuntimeError, IndexError, KeyError): + return True + + +def convert_video_to_playable_mp4(video_path: str) -> str: + """Convert the video to mp4. If something goes wrong return the original video.""" + try: + output_path = pathlib.Path(video_path).with_suffix(".mp4") + with tempfile.NamedTemporaryFile(delete=False) as tmp_file: + shutil.copy2(video_path, tmp_file.name) + # ffmpeg will automatically use h264 codec (playable in browser) when converting to mp4 + ff = FFmpeg( + inputs={str(tmp_file.name): None}, + outputs={str(output_path): None}, + global_options="-y -loglevel quiet", + ) + ff.run() + except FFRuntimeError as e: + print(f"Error converting video to browser-playable format {str(e)}") + output_path = video_path + return str(output_path) diff --git a/gradio-modified/gradio/queueing.py b/gradio-modified/gradio/queueing.py new file mode 100644 index 0000000000000000000000000000000000000000..1922449766a0d2727aa1f3a1278b667cf26e45cd --- /dev/null +++ b/gradio-modified/gradio/queueing.py @@ -0,0 +1,446 @@ +from __future__ import annotations + +import asyncio +import copy +import sys +import time +from collections import deque +from typing import Any, Deque, Dict, List, Tuple + +import fastapi + +from gradio.data_classes import Estimation, PredictBody, Progress, ProgressUnit +from gradio.helpers import TrackedIterable +from gradio.utils import AsyncRequest, run_coro_in_background, set_task_name + + +class Event: + def __init__( + self, + websocket: fastapi.WebSocket, + session_hash: str, + fn_index: int, + ): + self.websocket = websocket + self.session_hash: str = session_hash + self.fn_index: int = fn_index + self._id = f"{self.session_hash}_{self.fn_index}" + self.data: PredictBody | None = None + self.lost_connection_time: float | None = None + self.token: str | None = None + self.progress: Progress | None = None + self.progress_pending: bool = False + + async def disconnect(self, code: int = 1000): + await self.websocket.close(code=code) + + +class Queue: + def __init__( + self, + live_updates: bool, + concurrency_count: int, + update_intervals: float, + max_size: int | None, + blocks_dependencies: List, + ): + self.event_queue: Deque[Event] = deque() + self.events_pending_reconnection = [] + self.stopped = False + self.max_thread_count = concurrency_count + self.update_intervals = update_intervals + self.active_jobs: List[None | List[Event]] = [None] * concurrency_count + self.delete_lock = asyncio.Lock() + self.server_path = None + self.duration_history_total = 0 + self.duration_history_count = 0 + self.avg_process_time = 0 + self.avg_concurrent_process_time = None + self.queue_duration = 1 + self.live_updates = live_updates + self.sleep_when_free = 0.05 + self.progress_update_sleep_when_free = 0.1 + self.max_size = max_size + self.blocks_dependencies = blocks_dependencies + self.access_token = "" + + async def start(self, progress_tracking=False): + run_coro_in_background(self.start_processing) + if progress_tracking: + run_coro_in_background(self.start_progress_tracking) + if not self.live_updates: + run_coro_in_background(self.notify_clients) + + def close(self): + self.stopped = True + + def resume(self): + self.stopped = False + + def set_url(self, url: str): + self.server_path = url + + def set_access_token(self, token: str): + self.access_token = token + + def get_active_worker_count(self) -> int: + count = 0 + for worker in self.active_jobs: + if worker is not None: + count += 1 + return count + + def get_events_in_batch(self) -> Tuple[List[Event] | None, bool]: + if not (self.event_queue): + return None, False + + first_event = self.event_queue.popleft() + events = [first_event] + + event_fn_index = first_event.fn_index + batch = self.blocks_dependencies[event_fn_index]["batch"] + + if batch: + batch_size = self.blocks_dependencies[event_fn_index]["max_batch_size"] + rest_of_batch = [ + event for event in self.event_queue if event.fn_index == event_fn_index + ][: batch_size - 1] + events.extend(rest_of_batch) + [self.event_queue.remove(event) for event in rest_of_batch] + + return events, batch + + async def start_processing(self) -> None: + while not self.stopped: + if not self.event_queue: + await asyncio.sleep(self.sleep_when_free) + continue + + if not (None in self.active_jobs): + await asyncio.sleep(self.sleep_when_free) + continue + # Using mutex to avoid editing a list in use + async with self.delete_lock: + events, batch = self.get_events_in_batch() + + if events: + self.active_jobs[self.active_jobs.index(None)] = events + task = run_coro_in_background(self.process_events, events, batch) + run_coro_in_background(self.broadcast_live_estimations) + set_task_name(task, events[0].session_hash, events[0].fn_index, batch) + + async def start_progress_tracking(self) -> None: + while not self.stopped: + if not any(self.active_jobs): + await asyncio.sleep(self.progress_update_sleep_when_free) + continue + + for job in self.active_jobs: + if job is None: + continue + for event in job: + if event.progress_pending and event.progress: + event.progress_pending = False + client_awake = await self.send_message( + event, event.progress.dict() + ) + if not client_awake: + await self.clean_event(event) + + await asyncio.sleep(self.progress_update_sleep_when_free) + + def set_progress( + self, + event_id: str, + iterables: List[TrackedIterable] | None, + ): + if iterables is None: + return + for job in self.active_jobs: + if job is None: + continue + for evt in job: + if evt._id == event_id: + progress_data: List[ProgressUnit] = [] + for iterable in iterables: + progress_unit = ProgressUnit( + index=iterable.index, + length=iterable.length, + unit=iterable.unit, + progress=iterable.progress, + desc=iterable.desc, + ) + progress_data.append(progress_unit) + evt.progress = Progress(progress_data=progress_data) + evt.progress_pending = True + + def push(self, event: Event) -> int | None: + """ + Add event to queue, or return None if Queue is full + Parameters: + event: Event to add to Queue + Returns: + rank of submitted Event + """ + queue_len = len(self.event_queue) + if self.max_size is not None and queue_len >= self.max_size: + return None + self.event_queue.append(event) + return queue_len + + async def clean_event(self, event: Event) -> None: + if event in self.event_queue: + async with self.delete_lock: + self.event_queue.remove(event) + + async def broadcast_live_estimations(self) -> None: + """ + Runs 2 functions sequentially instead of concurrently. Otherwise dced clients are tried to get deleted twice. + """ + if self.live_updates: + await self.broadcast_estimations() + + async def gather_event_data(self, event: Event) -> bool: + """ + Gather data for the event + + Parameters: + event: + """ + if not event.data: + client_awake = await self.send_message(event, {"msg": "send_data"}) + if not client_awake: + return False + event.data = await self.get_message(event) + return True + + async def notify_clients(self) -> None: + """ + Notify clients about events statuses in the queue periodically. + """ + while not self.stopped: + await asyncio.sleep(self.update_intervals) + if self.event_queue: + await self.broadcast_estimations() + + async def broadcast_estimations(self) -> None: + estimation = self.get_estimation() + # Send all messages concurrently + await asyncio.gather( + *[ + self.send_estimation(event, estimation, rank) + for rank, event in enumerate(self.event_queue) + ] + ) + + async def send_estimation( + self, event: Event, estimation: Estimation, rank: int + ) -> Estimation: + """ + Send estimation about ETA to the client. + + Parameters: + event: + estimation: + rank: + """ + estimation.rank = rank + + if self.avg_concurrent_process_time is not None: + estimation.rank_eta = ( + estimation.rank * self.avg_concurrent_process_time + + self.avg_process_time + ) + if None not in self.active_jobs: + # Add estimated amount of time for a thread to get empty + estimation.rank_eta += self.avg_concurrent_process_time + client_awake = await self.send_message(event, estimation.dict()) + if not client_awake: + await self.clean_event(event) + return estimation + + def update_estimation(self, duration: float) -> None: + """ + Update estimation by last x element's average duration. + + Parameters: + duration: + """ + self.duration_history_total += duration + self.duration_history_count += 1 + self.avg_process_time = ( + self.duration_history_total / self.duration_history_count + ) + self.avg_concurrent_process_time = self.avg_process_time / min( + self.max_thread_count, self.duration_history_count + ) + self.queue_duration = self.avg_concurrent_process_time * len(self.event_queue) + + def get_estimation(self) -> Estimation: + return Estimation( + queue_size=len(self.event_queue), + avg_event_process_time=self.avg_process_time, + avg_event_concurrent_process_time=self.avg_concurrent_process_time, + queue_eta=self.queue_duration, + ) + + def get_request_params(self, websocket: fastapi.WebSocket) -> Dict[str, Any]: + return { + "url": str(websocket.url), + "headers": dict(websocket.headers), + "query_params": dict(websocket.query_params), + "path_params": dict(websocket.path_params), + "client": dict(host=websocket.client.host, port=websocket.client.port), # type: ignore + } + + async def call_prediction(self, events: List[Event], batch: bool): + data = events[0].data + assert data is not None, "No event data" + token = events[0].token + data.event_id = events[0]._id if not batch else None + try: + data.request = self.get_request_params(events[0].websocket) + except ValueError: + pass + + if batch: + data.data = list(zip(*[event.data.data for event in events if event.data])) + data.request = [ + self.get_request_params(event.websocket) + for event in events + if event.data + ] + data.batched = True + + response = await AsyncRequest( + method=AsyncRequest.Method.POST, + url=f"{self.server_path}api/predict", + json=dict(data), + headers={"Authorization": f"Bearer {self.access_token}"}, + cookies={"access-token": token} if token is not None else None, + ) + return response + + async def process_events(self, events: List[Event], batch: bool) -> None: + awake_events: List[Event] = [] + try: + for event in events: + client_awake = await self.gather_event_data(event) + if client_awake: + client_awake = await self.send_message( + event, {"msg": "process_starts"} + ) + if client_awake: + awake_events.append(event) + if not awake_events: + return + begin_time = time.time() + response = await self.call_prediction(awake_events, batch) + if response.has_exception: + for event in awake_events: + await self.send_message( + event, + { + "msg": "process_completed", + "output": {"error": str(response.exception)}, + "success": False, + }, + ) + elif response.json.get("is_generating", False): + old_response = response + while response.json.get("is_generating", False): + # Python 3.7 doesn't have named tasks. + # In order to determine if a task was cancelled, we + # ping the websocket to see if it was closed mid-iteration. + if sys.version_info < (3, 8): + is_alive = await self.send_message(event, {"msg": "alive?"}) + if not is_alive: + return + old_response = response + open_ws = [] + for event in awake_events: + open = await self.send_message( + event, + { + "msg": "process_generating", + "output": old_response.json, + "success": old_response.status == 200, + }, + ) + open_ws.append(open) + awake_events = [ + e for e, is_open in zip(awake_events, open_ws) if is_open + ] + if not awake_events: + return + response = await self.call_prediction(awake_events, batch) + for event in awake_events: + if response.status != 200: + relevant_response = response + else: + relevant_response = old_response + + await self.send_message( + event, + { + "msg": "process_completed", + "output": relevant_response.json, + "success": relevant_response.status == 200, + }, + ) + else: + output = copy.deepcopy(response.json) + for e, event in enumerate(awake_events): + if batch and "data" in output: + output["data"] = list(zip(*response.json.get("data")))[e] + await self.send_message( + event, + { + "msg": "process_completed", + "output": output, + "success": response.status == 200, + }, + ) + end_time = time.time() + if response.status == 200: + self.update_estimation(end_time - begin_time) + finally: + for event in awake_events: + try: + await event.disconnect() + except Exception: + pass + self.active_jobs[self.active_jobs.index(events)] = None + for event in awake_events: + await self.clean_event(event) + # Always reset the state of the iterator + # If the job finished successfully, this has no effect + # If the job is cancelled, this will enable future runs + # to start "from scratch" + await self.reset_iterators(event.session_hash, event.fn_index) + + async def send_message(self, event, data: Dict) -> bool: + try: + await event.websocket.send_json(data=data) + return True + except: + await self.clean_event(event) + return False + + async def get_message(self, event) -> PredictBody | None: + try: + data = await event.websocket.receive_json() + return PredictBody(**data) + except: + await self.clean_event(event) + return None + + async def reset_iterators(self, session_hash: str, fn_index: int): + await AsyncRequest( + method=AsyncRequest.Method.POST, + url=f"{self.server_path}reset", + json={ + "session_hash": session_hash, + "fn_index": fn_index, + }, + ) diff --git a/gradio-modified/gradio/reload.py b/gradio-modified/gradio/reload.py new file mode 100644 index 0000000000000000000000000000000000000000..c77b4975952e07eb93b58375cbfc6ff567887b3a --- /dev/null +++ b/gradio-modified/gradio/reload.py @@ -0,0 +1,59 @@ +""" + +Contains the functions that run when `gradio` is called from the command line. Specifically, allows + +$ gradio app.py, to run app.py in reload mode where any changes in the app.py file or Gradio library reloads the demo. +$ gradio app.py my_demo, to use variable names other than "demo" +""" +import inspect +import os +import sys +from pathlib import Path + +import gradio +from gradio import networking + + +def run_in_reload_mode(): + args = sys.argv[1:] + if len(args) == 0: + raise ValueError("No file specified.") + if len(args) == 1: + demo_name = "demo" + else: + demo_name = args[1] + + original_path = args[0] + abs_original_path = Path(original_path).name + path = str(Path(original_path).resolve()) + path = path.replace("/", ".") + path = path.replace("\\", ".") + filename = Path(path).stem + + gradio_folder = Path(inspect.getfile(gradio)).parent + + port = networking.get_first_available_port( + networking.INITIAL_PORT_VALUE, + networking.INITIAL_PORT_VALUE + networking.TRY_NUM_PORTS, + ) + print( + f"\nLaunching in *reload mode* on: http://{networking.LOCALHOST_NAME}:{port} (Press CTRL+C to quit)\n" + ) + command = f"uvicorn {filename}:{demo_name}.app --reload --port {port} --log-level warning " + message = "Watching:" + + message_change_count = 0 + if str(gradio_folder).strip(): + command += f'--reload-dir "{gradio_folder}" ' + message += f" '{gradio_folder}'" + message_change_count += 1 + + abs_parent = Path(abs_original_path).parent + if str(abs_parent).strip(): + command += f'--reload-dir "{abs_parent}"' + if message_change_count == 1: + message += "," + message += f" '{abs_parent}'" + + print(message + "\n") + os.system(command) diff --git a/gradio-modified/gradio/routes.py b/gradio-modified/gradio/routes.py new file mode 100644 index 0000000000000000000000000000000000000000..969a431f153c181ed827a68b5f42949048051258 --- /dev/null +++ b/gradio-modified/gradio/routes.py @@ -0,0 +1,622 @@ +"""Implements a FastAPI server to run the gradio interface. Note that some types in this +module use the Optional/Union notation so that they work correctly with pydantic.""" + +from __future__ import annotations + +import asyncio +import inspect +import json +import mimetypes +import os +import posixpath +import secrets +import traceback +from collections import defaultdict +from copy import deepcopy +from pathlib import Path +from typing import Any, Dict, List, Optional, Type +from urllib.parse import urlparse + +import fastapi +import markupsafe +import orjson +import pkg_resources +from fastapi import Depends, FastAPI, HTTPException, WebSocket, status +from fastapi.middleware.cors import CORSMiddleware +from fastapi.responses import ( + FileResponse, + HTMLResponse, + JSONResponse, + PlainTextResponse, +) +from fastapi.security import OAuth2PasswordRequestForm +from fastapi.templating import Jinja2Templates +from jinja2.exceptions import TemplateNotFound +from starlette.responses import RedirectResponse +from starlette.websockets import WebSocketState + +import gradio +from gradio import utils +from gradio.data_classes import PredictBody, ResetBody +from gradio.documentation import document, set_documentation_group +from gradio.exceptions import Error +from gradio.queueing import Estimation, Event +from gradio.utils import cancel_tasks, run_coro_in_background, set_task_name + +mimetypes.init() + +STATIC_TEMPLATE_LIB = pkg_resources.resource_filename("gradio", "templates/") +STATIC_PATH_LIB = pkg_resources.resource_filename("gradio", "templates/frontend/static") +BUILD_PATH_LIB = pkg_resources.resource_filename("gradio", "templates/frontend/assets") +VERSION_FILE = pkg_resources.resource_filename("gradio", "version.txt") +with open(VERSION_FILE) as version_file: + VERSION = version_file.read() + + +class ORJSONResponse(JSONResponse): + media_type = "application/json" + + @staticmethod + def _render(content: Any) -> bytes: + return orjson.dumps( + content, + option=orjson.OPT_SERIALIZE_NUMPY | orjson.OPT_PASSTHROUGH_DATETIME, + default=str, + ) + + def render(self, content: Any) -> bytes: + return ORJSONResponse._render(content) + + @staticmethod + def _render_str(content: Any) -> str: + return ORJSONResponse._render(content).decode("utf-8") + + +def toorjson(value): + return markupsafe.Markup( + ORJSONResponse._render_str(value) + .replace("<", "\\u003c") + .replace(">", "\\u003e") + .replace("&", "\\u0026") + .replace("'", "\\u0027") + ) + + +templates = Jinja2Templates(directory=STATIC_TEMPLATE_LIB) +templates.env.filters["toorjson"] = toorjson + + +########### +# Auth +########### + + +class App(FastAPI): + """ + FastAPI App Wrapper + """ + + def __init__(self, **kwargs): + self.tokens = {} + self.auth = None + self.blocks: gradio.Blocks | None = None + self.state_holder = {} + self.iterators = defaultdict(dict) + self.lock = asyncio.Lock() + self.queue_token = secrets.token_urlsafe(32) + self.startup_events_triggered = False + super().__init__(**kwargs) + + def configure_app(self, blocks: gradio.Blocks) -> None: + auth = blocks.auth + if auth is not None: + if not callable(auth): + self.auth = {account[0]: account[1] for account in auth} + else: + self.auth = auth + else: + self.auth = None + + self.blocks = blocks + if hasattr(self.blocks, "_queue"): + self.blocks._queue.set_access_token(self.queue_token) + self.cwd = os.getcwd() + self.favicon_path = blocks.favicon_path + self.tokens = {} + + def get_blocks(self) -> gradio.Blocks: + if self.blocks is None: + raise ValueError("No Blocks has been configured for this app.") + return self.blocks + + @staticmethod + def create_app(blocks: gradio.Blocks) -> App: + app = App(default_response_class=ORJSONResponse) + app.configure_app(blocks) + + app.add_middleware( + CORSMiddleware, + allow_origins=["*"], + allow_methods=["*"], + allow_headers=["*"], + ) + + @app.get("/user") + @app.get("/user/") + def get_current_user(request: fastapi.Request) -> Optional[str]: + token = request.cookies.get("access-token") + return app.tokens.get(token) + + @app.get("/login_check") + @app.get("/login_check/") + def login_check(user: str = Depends(get_current_user)): + if app.auth is None or not (user is None): + return + raise HTTPException( + status_code=status.HTTP_401_UNAUTHORIZED, detail="Not authenticated" + ) + + async def ws_login_check(websocket: WebSocket) -> Optional[str]: + token = websocket.cookies.get("access-token") + return token # token is returned to allow request in queue + + @app.get("/token") + @app.get("/token/") + def get_token(request: fastapi.Request) -> dict: + token = request.cookies.get("access-token") + return {"token": token, "user": app.tokens.get(token)} + + @app.get("/app_id") + @app.get("/app_id/") + def app_id(request: fastapi.Request) -> dict: + return {"app_id": app.get_blocks().app_id} + + @app.post("/login") + @app.post("/login/") + def login(form_data: OAuth2PasswordRequestForm = Depends()): + username, password = form_data.username, form_data.password + if app.auth is None: + return RedirectResponse(url="/", status_code=status.HTTP_302_FOUND) + if ( + not callable(app.auth) + and username in app.auth + and app.auth[username] == password + ) or (callable(app.auth) and app.auth.__call__(username, password)): + token = secrets.token_urlsafe(16) + app.tokens[token] = username + response = RedirectResponse(url="/", status_code=status.HTTP_302_FOUND) + response.set_cookie(key="access-token", value=token, httponly=True) + return response + else: + raise HTTPException(status_code=400, detail="Incorrect credentials.") + + ############### + # Main Routes + ############### + + @app.head("/", response_class=HTMLResponse) + @app.get("/", response_class=HTMLResponse) + def main(request: fastapi.Request, user: str = Depends(get_current_user)): + mimetypes.add_type("application/javascript", ".js") + blocks = app.get_blocks() + + if app.auth is None or not (user is None): + config = app.get_blocks().config + else: + config = { + "auth_required": True, + "auth_message": blocks.auth_message, + } + + try: + template = ( + "frontend/share.html" if blocks.share else "frontend/index.html" + ) + return templates.TemplateResponse( + template, {"request": request, "config": config} + ) + except TemplateNotFound: + if blocks.share: + raise ValueError( + "Did you install Gradio from source files? Share mode only " + "works when Gradio is installed through the pip package." + ) + else: + raise ValueError( + "Did you install Gradio from source files? You need to build " + "the frontend by running /scripts/build_frontend.sh" + ) + + @app.get("/config/", dependencies=[Depends(login_check)]) + @app.get("/config", dependencies=[Depends(login_check)]) + def get_config(): + return app.get_blocks().config + + @app.get("/static/{path:path}") + def static_resource(path: str): + static_file = safe_join(STATIC_PATH_LIB, path) + if static_file is not None: + return FileResponse(static_file) + raise HTTPException(status_code=404, detail="Static file not found") + + @app.get("/assets/{path:path}") + def build_resource(path: str): + build_file = safe_join(BUILD_PATH_LIB, path) + if build_file is not None: + return FileResponse(build_file) + raise HTTPException(status_code=404, detail="Build file not found") + + @app.get("/favicon.ico") + async def favicon(): + blocks = app.get_blocks() + if blocks.favicon_path is None: + return static_resource("img/logo.svg") + else: + return FileResponse(blocks.favicon_path) + + @app.get("/file={path:path}", dependencies=[Depends(login_check)]) + def file(path: str): + blocks = app.get_blocks() + if utils.validate_url(path): + return RedirectResponse(url=path, status_code=status.HTTP_302_FOUND) + if Path(app.cwd).resolve() in Path(path).resolve().parents or Path( + path + ).resolve() in set().union(*blocks.temp_file_sets): + return FileResponse( + Path(path).resolve(), headers={"Accept-Ranges": "bytes"} + ) + else: + raise ValueError( + f"File cannot be fetched: {path}. All files must contained within the Gradio python app working directory, or be a temp file created by the Gradio python app." + ) + + @app.get("/file/{path:path}", dependencies=[Depends(login_check)]) + def file_deprecated(path: str): + return file(path) + + @app.post("/reset/") + @app.post("/reset") + async def reset_iterator(body: ResetBody): + if body.session_hash not in app.iterators: + return {"success": False} + async with app.lock: + app.iterators[body.session_hash][body.fn_index] = None + app.iterators[body.session_hash]["should_reset"].add(body.fn_index) + return {"success": True} + + async def run_predict( + body: PredictBody, + request: Request | List[Request], + fn_index_inferred: int, + username: str = Depends(get_current_user), + ): + if hasattr(body, "session_hash"): + if body.session_hash not in app.state_holder: + app.state_holder[body.session_hash] = { + _id: deepcopy(getattr(block, "value", None)) + for _id, block in app.get_blocks().blocks.items() + if getattr(block, "stateful", False) + } + session_state = app.state_holder[body.session_hash] + iterators = app.iterators[body.session_hash] + # The should_reset set keeps track of the fn_indices + # that have been cancelled. When a job is cancelled, + # the /reset route will mark the jobs as having been reset. + # That way if the cancel job finishes BEFORE the job being cancelled + # the job being cancelled will not overwrite the state of the iterator. + # In all cases, should_reset will be the empty set the next time + # the fn_index is run. + app.iterators[body.session_hash]["should_reset"] = set([]) + else: + session_state = {} + iterators = {} + event_id = getattr(body, "event_id", None) + raw_input = body.data + fn_index = body.fn_index + batch = app.get_blocks().dependencies[fn_index_inferred]["batch"] + if not (body.batched) and batch: + raw_input = [raw_input] + try: + output = await app.get_blocks().process_api( + fn_index=fn_index_inferred, + inputs=raw_input, + request=request, + state=session_state, + iterators=iterators, + event_id=event_id, + ) + iterator = output.pop("iterator", None) + if hasattr(body, "session_hash"): + if fn_index in app.iterators[body.session_hash]["should_reset"]: + app.iterators[body.session_hash][fn_index] = None + else: + app.iterators[body.session_hash][fn_index] = iterator + if isinstance(output, Error): + raise output + except BaseException as error: + show_error = app.get_blocks().show_error or isinstance(error, Error) + traceback.print_exc() + return JSONResponse( + content={"error": str(error) if show_error else None}, + status_code=500, + ) + + if not (body.batched) and batch: + output["data"] = output["data"][0] + return output + + # had to use '/run' endpoint for Colab compatibility, '/api' supported for backwards compatibility + @app.post("/run/{api_name}", dependencies=[Depends(login_check)]) + @app.post("/run/{api_name}/", dependencies=[Depends(login_check)]) + @app.post("/api/{api_name}", dependencies=[Depends(login_check)]) + @app.post("/api/{api_name}/", dependencies=[Depends(login_check)]) + async def predict( + api_name: str, + body: PredictBody, + request: fastapi.Request, + username: str = Depends(get_current_user), + ): + fn_index_inferred = None + if body.fn_index is None: + for i, fn in enumerate(app.get_blocks().dependencies): + if fn["api_name"] == api_name: + fn_index_inferred = i + break + if fn_index_inferred is None: + return JSONResponse( + content={ + "error": f"This app has no endpoint /api/{api_name}/." + }, + status_code=500, + ) + else: + fn_index_inferred = body.fn_index + if not app.get_blocks().api_open and app.get_blocks().queue_enabled_for_fn( + fn_index_inferred + ): + if f"Bearer {app.queue_token}" != request.headers.get("Authorization"): + raise HTTPException( + status_code=status.HTTP_401_UNAUTHORIZED, + detail="Not authorized to skip the queue", + ) + + # If this fn_index cancels jobs, then the only input we need is the + # current session hash + if app.get_blocks().dependencies[fn_index_inferred]["cancels"]: + body.data = [body.session_hash] + if body.request: + if body.batched: + gr_request = [Request(**req) for req in body.request] + else: + assert isinstance(body.request, dict) + gr_request = Request(**body.request) + else: + gr_request = Request(request) + result = await run_predict( + body=body, + fn_index_inferred=fn_index_inferred, + username=username, + request=gr_request, + ) + return result + + @app.websocket("/queue/join") + async def join_queue( + websocket: WebSocket, + token: Optional[str] = Depends(ws_login_check), + ): + blocks = app.get_blocks() + if app.auth is not None and token is None: + await websocket.close(code=status.WS_1008_POLICY_VIOLATION) + return + if blocks._queue.server_path is None: + app_url = get_server_url_from_ws_url(str(websocket.url)) + blocks._queue.set_url(app_url) + await websocket.accept() + # In order to cancel jobs, we need the session_hash and fn_index + # to create a unique id for each job + await websocket.send_json({"msg": "send_hash"}) + session_info = await websocket.receive_json() + event = Event( + websocket, session_info["session_hash"], session_info["fn_index"] + ) + # set the token into Event to allow using the same token for call_prediction + event.token = token + event.session_hash = session_info["session_hash"] + + # Continuous events are not put in the queue so that they do not + # occupy the queue's resource as they are expected to run forever + if blocks.dependencies[event.fn_index].get("every", 0): + await cancel_tasks(set([f"{event.session_hash}_{event.fn_index}"])) + await blocks._queue.reset_iterators(event.session_hash, event.fn_index) + task = run_coro_in_background( + blocks._queue.process_events, [event], False + ) + set_task_name(task, event.session_hash, event.fn_index, batch=False) + else: + rank = blocks._queue.push(event) + + if rank is None: + await blocks._queue.send_message(event, {"msg": "queue_full"}) + await event.disconnect() + return + estimation = blocks._queue.get_estimation() + await blocks._queue.send_estimation(event, estimation, rank) + while True: + await asyncio.sleep(60) + if websocket.application_state == WebSocketState.DISCONNECTED: + return + + @app.get( + "/queue/status", + dependencies=[Depends(login_check)], + response_model=Estimation, + ) + async def get_queue_status(): + return app.get_blocks()._queue.get_estimation() + + @app.get("/startup-events") + async def startup_events(): + if not app.startup_events_triggered: + app.get_blocks().startup_events() + app.startup_events_triggered = True + return True + return False + + @app.get("/robots.txt", response_class=PlainTextResponse) + def robots_txt(): + if app.get_blocks().share: + return "User-agent: *\nDisallow: /" + else: + return "User-agent: *\nDisallow: " + + return app + + +######## +# Helper functions +######## + + +def safe_join(directory: str, path: str) -> str | None: + """Safely path to a base directory to avoid escaping the base directory. + Borrowed from: werkzeug.security.safe_join""" + _os_alt_seps: List[str] = list( + sep for sep in [os.path.sep, os.path.altsep] if sep is not None and sep != "/" + ) + + if path != "": + filename = posixpath.normpath(path) + else: + return directory + + if ( + any(sep in filename for sep in _os_alt_seps) + or os.path.isabs(filename) + or filename == ".." + or filename.startswith("../") + ): + return None + return posixpath.join(directory, filename) + + +def get_types(cls_set: List[Type]): + docset = [] + types = [] + for cls in cls_set: + doc = inspect.getdoc(cls) or "" + doc_lines = doc.split("\n") + for line in doc_lines: + if "value (" in line: + types.append(line.split("value (")[1].split(")")[0]) + docset.append(doc_lines[1].split(":")[-1]) + return docset, types + + +def get_server_url_from_ws_url(ws_url: str): + ws_url_parsed = urlparse(ws_url) + scheme = "http" if ws_url_parsed.scheme == "ws" else "https" + port = f":{ws_url_parsed.port}" if ws_url_parsed.port else "" + return f"{scheme}://{ws_url_parsed.hostname}{port}{ws_url_parsed.path.replace('queue/join', '')}" + + +set_documentation_group("routes") + + +class Obj: + """ + Using a class to convert dictionaries into objects. Used by the `Request` class. + Credit: https://www.geeksforgeeks.org/convert-nested-python-dictionary-to-object/ + """ + + def __init__(self, dict1): + self.__dict__.update(dict1) + + def __str__(self) -> str: + return str(self.__dict__) + + def __repr__(self) -> str: + return str(self.__dict__) + + +@document() +class Request: + """ + A Gradio request object that can be used to access the request headers, cookies, + query parameters and other information about the request from within the prediction + function. The class is a thin wrapper around the fastapi.Request class. Attributes + of this class include: `headers`, `client`, `query_params`, and `path_params`, + Example: + import gradio as gr + def echo(name, request: gr.Request): + print("Request headers dictionary:", request.headers) + print("IP address:", request.client.host) + return name + io = gr.Interface(echo, "textbox", "textbox").launch() + """ + + def __init__(self, request: fastapi.Request | None = None, **kwargs): + """ + Can be instantiated with either a fastapi.Request or by manually passing in + attributes (needed for websocket-based queueing). + Parameters: + request: A fastapi.Request + """ + self.request = request + self.kwargs: Dict = kwargs + + def dict_to_obj(self, d): + if isinstance(d, dict): + return json.loads(json.dumps(d), object_hook=Obj) + else: + return d + + def __getattr__(self, name): + if self.request: + return self.dict_to_obj(getattr(self.request, name)) + else: + try: + obj = self.kwargs[name] + except KeyError: + raise AttributeError(f"'Request' object has no attribute '{name}'") + return self.dict_to_obj(obj) + + +@document() +def mount_gradio_app( + app: fastapi.FastAPI, + blocks: gradio.Blocks, + path: str, + gradio_api_url: str | None = None, +) -> fastapi.FastAPI: + """Mount a gradio.Blocks to an existing FastAPI application. + + Parameters: + app: The parent FastAPI application. + blocks: The blocks object we want to mount to the parent app. + path: The path at which the gradio application will be mounted. + gradio_api_url: The full url at which the gradio app will run. This is only needed if deploying to Huggingface spaces of if the websocket endpoints of your deployed app are on a different network location than the gradio app. If deploying to spaces, set gradio_api_url to 'http://localhost:7860/' + Example: + from fastapi import FastAPI + import gradio as gr + app = FastAPI() + @app.get("/") + def read_main(): + return {"message": "This is your main app"} + io = gr.Interface(lambda x: "Hello, " + x + "!", "textbox", "textbox") + app = gr.mount_gradio_app(app, io, path="/gradio") + # Then run `uvicorn run:app` from the terminal and navigate to http://localhost:8000/gradio. + """ + blocks.dev_mode = False + blocks.config = blocks.get_config_file() + gradio_app = App.create_app(blocks) + + @app.on_event("startup") + async def start_queue(): + if gradio_app.get_blocks().enable_queue: + if gradio_api_url: + gradio_app.get_blocks()._queue.set_url(gradio_api_url) + gradio_app.get_blocks().startup_events() + + app.mount(path, gradio_app) + return app diff --git a/gradio-modified/gradio/serializing.py b/gradio-modified/gradio/serializing.py new file mode 100644 index 0000000000000000000000000000000000000000..aa5a571ab779194af6b183c4cc145c54dabbc271 --- /dev/null +++ b/gradio-modified/gradio/serializing.py @@ -0,0 +1,208 @@ +from __future__ import annotations + +from abc import ABC, abstractmethod +from pathlib import Path +from typing import Any, Dict + +from gradio import processing_utils, utils + + +class Serializable(ABC): + @abstractmethod + def serialize( + self, x: Any, load_dir: str | Path = "", encryption_key: bytes | None = None + ): + """ + Convert data from human-readable format to serialized format for a browser. + """ + pass + + @abstractmethod + def deserialize( + self, + x: Any, + save_dir: str | Path | None = None, + encryption_key: bytes | None = None, + ): + """ + Convert data from serialized format for a browser to human-readable format. + """ + pass + + +class SimpleSerializable(Serializable): + def serialize( + self, x: Any, load_dir: str | Path = "", encryption_key: bytes | None = None + ) -> Any: + """ + Convert data from human-readable format to serialized format. For SimpleSerializable components, this is a no-op. + Parameters: + x: Input data to serialize + load_dir: Ignored + encryption_key: Ignored + """ + return x + + def deserialize( + self, + x: Any, + save_dir: str | Path | None = None, + encryption_key: bytes | None = None, + ): + """ + Convert data from serialized format to human-readable format. For SimpleSerializable components, this is a no-op. + Parameters: + x: Input data to deserialize + save_dir: Ignored + encryption_key: Ignored + """ + return x + + +class ImgSerializable(Serializable): + def serialize( + self, + x: str | None, + load_dir: str | Path = "", + encryption_key: bytes | None = None, + ) -> str | None: + """ + Convert from human-friendly version of a file (string filepath) to a seralized + representation (base64). + Parameters: + x: String path to file to serialize + load_dir: Path to directory containing x + encryption_key: Used to encrypt the file + """ + if x is None or x == "": + return None + return processing_utils.encode_url_or_file_to_base64( + Path(load_dir) / x, encryption_key=encryption_key + ) + + def deserialize( + self, + x: str | None, + save_dir: str | Path | None = None, + encryption_key: bytes | None = None, + ) -> str | None: + """ + Convert from serialized representation of a file (base64) to a human-friendly + version (string filepath). Optionally, save the file to the directory specified by save_dir + Parameters: + x: Base64 representation of image to deserialize into a string filepath + save_dir: Path to directory to save the deserialized image to + encryption_key: Used to decrypt the file + """ + if x is None or x == "": + return None + file = processing_utils.decode_base64_to_file( + x, dir=save_dir, encryption_key=encryption_key + ) + return file.name + + +class FileSerializable(Serializable): + def serialize( + self, + x: str | None, + load_dir: str | Path = "", + encryption_key: bytes | None = None, + ) -> Dict | None: + """ + Convert from human-friendly version of a file (string filepath) to a + seralized representation (base64) + Parameters: + x: String path to file to serialize + load_dir: Path to directory containing x + encryption_key: Used to encrypt the file + """ + if x is None or x == "": + return None + filename = Path(load_dir) / x + return { + "name": filename, + "data": processing_utils.encode_url_or_file_to_base64( + filename, encryption_key=encryption_key + ), + "orig_name": Path(filename).name, + "is_file": False, + } + + def deserialize( + self, + x: str | Dict | None, + save_dir: Path | str | None = None, + encryption_key: bytes | None = None, + ) -> str | None: + """ + Convert from serialized representation of a file (base64) to a human-friendly + version (string filepath). Optionally, save the file to the directory specified by `save_dir` + Parameters: + x: Base64 representation of file to deserialize into a string filepath + save_dir: Path to directory to save the deserialized file to + encryption_key: Used to decrypt the file + """ + if x is None: + return None + if isinstance(save_dir, Path): + save_dir = str(save_dir) + if isinstance(x, str): + file_name = processing_utils.decode_base64_to_file( + x, dir=save_dir, encryption_key=encryption_key + ).name + elif isinstance(x, dict): + if x.get("is_file", False): + if utils.validate_url(x["name"]): + file_name = x["name"] + else: + file_name = processing_utils.create_tmp_copy_of_file( + x["name"], dir=save_dir + ).name + else: + file_name = processing_utils.decode_base64_to_file( + x["data"], dir=save_dir, encryption_key=encryption_key + ).name + else: + raise ValueError( + f"A FileSerializable component cannot only deserialize a string or a dict, not a: {type(x)}" + ) + return file_name + + +class JSONSerializable(Serializable): + def serialize( + self, + x: str | None, + load_dir: str | Path = "", + encryption_key: bytes | None = None, + ) -> Dict | None: + """ + Convert from a a human-friendly version (string path to json file) to a + serialized representation (json string) + Parameters: + x: String path to json file to read to get json string + load_dir: Path to directory containing x + encryption_key: Ignored + """ + if x is None or x == "": + return None + return processing_utils.file_to_json(Path(load_dir) / x) + + def deserialize( + self, + x: str | Dict, + save_dir: str | Path | None = None, + encryption_key: bytes | None = None, + ) -> str | None: + """ + Convert from serialized representation (json string) to a human-friendly + version (string path to json file). Optionally, save the file to the directory specified by `save_dir` + Parameters: + x: Json string + save_dir: Path to save the deserialized json file to + encryption_key: Ignored + """ + if x is None: + return None + return processing_utils.dict_or_str_to_json_file(x, dir=save_dir).name diff --git a/gradio-modified/gradio/strings.py b/gradio-modified/gradio/strings.py new file mode 100644 index 0000000000000000000000000000000000000000..03ee329e7af486b372fd262b36bcaa5d949f1d50 --- /dev/null +++ b/gradio-modified/gradio/strings.py @@ -0,0 +1,41 @@ +import json + +import requests + +MESSAGING_API_ENDPOINT = "https://api.gradio.app/gradio-messaging/en" + +en = { + "RUNNING_LOCALLY": "Running on local URL: {}", + "RUNNING_LOCALLY_SEPARATED": "Running on local URL: {}://{}:{}", + "SHARE_LINK_DISPLAY": "Running on public URL: {}", + "COULD_NOT_GET_SHARE_LINK": "\nCould not create share link, please check your internet connection.", + "COLAB_NO_LOCAL": "Cannot display local interface on google colab, public link created.", + "PUBLIC_SHARE_TRUE": "\nTo create a public link, set `share=True` in `launch()`.", + "MODEL_PUBLICLY_AVAILABLE_URL": "Model available publicly at: {} (may take up to a minute for link to be usable)", + "GENERATING_PUBLIC_LINK": "Generating public link (may take a few seconds...):", + "BETA_INVITE": "\nThanks for being a Gradio user! If you have questions or feedback, please join our Discord server and chat with us: https://discord.gg/feTf9x3ZSB", + "COLAB_DEBUG_TRUE": "Colab notebook detected. This cell will run indefinitely so that you can see errors and logs. " + "To turn off, set debug=False in launch().", + "COLAB_DEBUG_FALSE": "Colab notebook detected. To show errors in colab notebook, set debug=True in launch()", + "COLAB_WARNING": "Note: opening Chrome Inspector may crash demo inside Colab notebooks.", + "SHARE_LINK_MESSAGE": "\nThis share link expires in 72 hours. For free permanent hosting and GPU upgrades (NEW!), check out Spaces: https://huggingface.co/spaces", + "INLINE_DISPLAY_BELOW": "Interface loading below...", + "TIPS": [ + "You can add authentication to your app with the `auth=` kwarg in the `launch()` command; for example: `gr.Interface(...).launch(auth=('username', 'password'))`", + "Let users specify why they flagged input with the `flagging_options=` kwarg; for example: `gr.Interface(..., flagging_options=['too slow', 'incorrect output', 'other'])`", + "You can show or hide the button for flagging with the `allow_flagging=` kwarg; for example: gr.Interface(..., allow_flagging=False)", + "The inputs and outputs flagged by the users are stored in the flagging directory, specified by the flagging_dir= kwarg. You can view this data through the interface by setting the examples= kwarg to the flagging directory; for example gr.Interface(..., examples='flagged')", + "You can add a title and description to your interface using the `title=` and `description=` kwargs. The `article=` kwarg can be used to add a description under the interface; for example gr.Interface(..., title='My app', description='Lorem ipsum'). Try using Markdown!", + "For a classification or regression model, set `interpretation='default'` to see why the model made a prediction.", + ], +} + +try: + updated_messaging = requests.get(MESSAGING_API_ENDPOINT, timeout=3).json() + en.update(updated_messaging) +except ( + requests.ConnectionError, + requests.exceptions.ReadTimeout, + json.decoder.JSONDecodeError, +): # Use default messaging + pass diff --git a/gradio-modified/gradio/templates.py b/gradio-modified/gradio/templates.py new file mode 100644 index 0000000000000000000000000000000000000000..561a07d38de21f362ea8871549ad8a80926dc375 --- /dev/null +++ b/gradio-modified/gradio/templates.py @@ -0,0 +1,563 @@ +from __future__ import annotations + +import typing +from typing import Any, Callable, Tuple + +import numpy as np +from PIL.Image import Image + +from gradio import components + + +class TextArea(components.Textbox): + """ + Sets: lines=7 + """ + + is_template = True + + def __init__( + self, + value: str | Callable | None = "", + *, + lines: int = 7, + max_lines: int = 20, + placeholder: str | None = None, + label: str | None = None, + show_label: bool = True, + interactive: bool | None = None, + visible: bool = True, + elem_id: str | None = None, + **kwargs, + ): + super().__init__( + value=value, + lines=lines, + max_lines=max_lines, + placeholder=placeholder, + label=label, + show_label=show_label, + interactive=interactive, + visible=visible, + elem_id=elem_id, + **kwargs, + ) + + +class Webcam(components.Image): + """ + Sets: source="webcam", interactive=True + """ + + is_template = True + + def __init__( + self, + value: str | Image | np.ndarray | None = None, + *, + shape: Tuple[int, int] | None = None, + image_mode: str = "RGB", + invert_colors: bool = False, + source: str = "webcam", + tool: str | None = None, + type: str = "numpy", + label: str | None = None, + show_label: bool = True, + interactive: bool | None = True, + visible: bool = True, + streaming: bool = False, + elem_id: str | None = None, + mirror_webcam: bool = True, + **kwargs, + ): + super().__init__( + value=value, + shape=shape, + image_mode=image_mode, + invert_colors=invert_colors, + source=source, + tool=tool, + type=type, + label=label, + show_label=show_label, + interactive=interactive, + visible=visible, + streaming=streaming, + elem_id=elem_id, + mirror_webcam=mirror_webcam, + **kwargs, + ) + + +class Sketchpad(components.Image): + """ + Sets: image_mode="L", source="canvas", shape=(28, 28), invert_colors=True, interactive=True + """ + + is_template = True + + def __init__( + self, + value: str | Image | np.ndarray | None = None, + *, + shape: Tuple[int, int] = (28, 28), + image_mode: str = "L", + invert_colors: bool = True, + source: str = "canvas", + tool: str | None = None, + type: str = "numpy", + label: str | None = None, + show_label: bool = True, + interactive: bool | None = True, + visible: bool = True, + streaming: bool = False, + elem_id: str | None = None, + mirror_webcam: bool = True, + **kwargs, + ): + super().__init__( + value=value, + shape=shape, + image_mode=image_mode, + invert_colors=invert_colors, + source=source, + tool=tool, + type=type, + label=label, + show_label=show_label, + interactive=interactive, + visible=visible, + streaming=streaming, + elem_id=elem_id, + mirror_webcam=mirror_webcam, + **kwargs, + ) + + +class Paint(components.Image): + """ + Sets: source="canvas", tool="color-sketch", interactive=True + """ + + is_template = True + + def __init__( + self, + value: str | Image | np.ndarray | None = None, + *, + shape: Tuple[int, int] | None = None, + image_mode: str = "RGB", + invert_colors: bool = False, + source: str = "canvas", + tool: str = "color-sketch", + type: str = "numpy", + label: str | None = None, + show_label: bool = True, + interactive: bool | None = True, + visible: bool = True, + streaming: bool = False, + elem_id: str | None = None, + mirror_webcam: bool = True, + **kwargs, + ): + super().__init__( + value=value, + shape=shape, + image_mode=image_mode, + invert_colors=invert_colors, + source=source, + tool=tool, + type=type, + label=label, + show_label=show_label, + interactive=interactive, + visible=visible, + streaming=streaming, + elem_id=elem_id, + mirror_webcam=mirror_webcam, + **kwargs, + ) + + +class ImageMask(components.Image): + """ + Sets: source="upload", tool="sketch", interactive=True + """ + + is_template = True + + def __init__( + self, + value: str | Image | np.ndarray | None = None, + *, + shape: Tuple[int, int] | None = None, + image_mode: str = "RGB", + invert_colors: bool = False, + source: str = "upload", + tool: str = "sketch", + type: str = "numpy", + label: str | None = None, + show_label: bool = True, + interactive: bool | None = True, + visible: bool = True, + streaming: bool = False, + elem_id: str | None = None, + mirror_webcam: bool = True, + **kwargs, + ): + super().__init__( + value=value, + shape=shape, + image_mode=image_mode, + invert_colors=invert_colors, + source=source, + tool=tool, + type=type, + label=label, + show_label=show_label, + interactive=interactive, + visible=visible, + streaming=streaming, + elem_id=elem_id, + mirror_webcam=mirror_webcam, + **kwargs, + ) + + +class ImagePaint(components.Image): + """ + Sets: source="upload", tool="color-sketch", interactive=True + """ + + is_template = True + + def __init__( + self, + value: str | Image | np.ndarray | None = None, + *, + shape: Tuple[int, int] | None = None, + image_mode: str = "RGB", + invert_colors: bool = False, + source: str = "upload", + tool: str = "color-sketch", + type: str = "numpy", + label: str | None = None, + show_label: bool = True, + interactive: bool | None = True, + visible: bool = True, + streaming: bool = False, + elem_id: str | None = None, + mirror_webcam: bool = True, + **kwargs, + ): + super().__init__( + value=value, + shape=shape, + image_mode=image_mode, + invert_colors=invert_colors, + source=source, + tool=tool, + type=type, + label=label, + show_label=show_label, + interactive=interactive, + visible=visible, + streaming=streaming, + elem_id=elem_id, + mirror_webcam=mirror_webcam, + **kwargs, + ) + + +class Pil(components.Image): + """ + Sets: type="pil" + """ + + is_template = True + + def __init__( + self, + value: str | Image | np.ndarray | None = None, + *, + shape: Tuple[int, int] | None = None, + image_mode: str = "RGB", + invert_colors: bool = False, + source: str = "upload", + tool: str | None = None, + type: str = "pil", + label: str | None = None, + show_label: bool = True, + interactive: bool | None = None, + visible: bool = True, + streaming: bool = False, + elem_id: str | None = None, + mirror_webcam: bool = True, + **kwargs, + ): + super().__init__( + value=value, + shape=shape, + image_mode=image_mode, + invert_colors=invert_colors, + source=source, + tool=tool, + type=type, + label=label, + show_label=show_label, + interactive=interactive, + visible=visible, + streaming=streaming, + elem_id=elem_id, + mirror_webcam=mirror_webcam, + **kwargs, + ) + + +class PlayableVideo(components.Video): + """ + Sets: format="mp4" + """ + + is_template = True + + def __init__( + self, + value: str | Callable | None = None, + *, + format: str | None = "mp4", + source: str = "upload", + label: str | None = None, + show_label: bool = True, + interactive: bool | None = None, + visible: bool = True, + elem_id: str | None = None, + mirror_webcam: bool = True, + include_audio: bool | None = None, + **kwargs, + ): + super().__init__( + value=value, + format=format, + source=source, + label=label, + show_label=show_label, + interactive=interactive, + visible=visible, + elem_id=elem_id, + mirror_webcam=mirror_webcam, + include_audio=include_audio, + **kwargs, + ) + + +class Microphone(components.Audio): + """ + Sets: source="microphone" + """ + + is_template = True + + def __init__( + self, + value: str | Tuple[int, np.ndarray] | Callable | None = None, + *, + source: str = "microphone", + type: str = "numpy", + label: str | None = None, + show_label: bool = True, + interactive: bool | None = None, + visible: bool = True, + streaming: bool = False, + elem_id: str | None = None, + **kwargs, + ): + super().__init__( + value=value, + source=source, + type=type, + label=label, + show_label=show_label, + interactive=interactive, + visible=visible, + streaming=streaming, + elem_id=elem_id, + **kwargs, + ) + + +class Files(components.File): + """ + Sets: file_count="multiple" + """ + + is_template = True + + def __init__( + self, + value: str | typing.List[str] | Callable | None = None, + *, + file_count: str = "multiple", + type: str = "file", + label: str | None = None, + show_label: bool = True, + interactive: bool | None = None, + visible: bool = True, + elem_id: str | None = None, + **kwargs, + ): + super().__init__( + value=value, + file_count=file_count, + type=type, + label=label, + show_label=show_label, + interactive=interactive, + visible=visible, + elem_id=elem_id, + **kwargs, + ) + + +class Numpy(components.Dataframe): + """ + Sets: type="numpy" + """ + + is_template = True + + def __init__( + self, + value: typing.List[typing.List[Any]] | Callable | None = None, + *, + headers: typing.List[str] | None = None, + row_count: int | Tuple[int, str] = (1, "dynamic"), + col_count: int | Tuple[int, str] | None = None, + datatype: str | typing.List[str] = "str", + type: str = "numpy", + max_rows: int | None = 20, + max_cols: int | None = None, + overflow_row_behaviour: str = "paginate", + label: str | None = None, + show_label: bool = True, + interactive: bool | None = None, + visible: bool = True, + elem_id: str | None = None, + wrap: bool = False, + **kwargs, + ): + super().__init__( + value=value, + headers=headers, + row_count=row_count, + col_count=col_count, + datatype=datatype, + type=type, + max_rows=max_rows, + max_cols=max_cols, + overflow_row_behaviour=overflow_row_behaviour, + label=label, + show_label=show_label, + interactive=interactive, + visible=visible, + elem_id=elem_id, + wrap=wrap, + **kwargs, + ) + + +class Matrix(components.Dataframe): + """ + Sets: type="array" + """ + + is_template = True + + def __init__( + self, + value: typing.List[typing.List[Any]] | Callable | None = None, + *, + headers: typing.List[str] | None = None, + row_count: int | Tuple[int, str] = (1, "dynamic"), + col_count: int | Tuple[int, str] | None = None, + datatype: str | typing.List[str] = "str", + type: str = "array", + max_rows: int | None = 20, + max_cols: int | None = None, + overflow_row_behaviour: str = "paginate", + label: str | None = None, + show_label: bool = True, + interactive: bool | None = None, + visible: bool = True, + elem_id: str | None = None, + wrap: bool = False, + **kwargs, + ): + super().__init__( + value=value, + headers=headers, + row_count=row_count, + col_count=col_count, + datatype=datatype, + type=type, + max_rows=max_rows, + max_cols=max_cols, + overflow_row_behaviour=overflow_row_behaviour, + label=label, + show_label=show_label, + interactive=interactive, + visible=visible, + elem_id=elem_id, + wrap=wrap, + **kwargs, + ) + + +class List(components.Dataframe): + """ + Sets: type="array", col_count=1 + """ + + is_template = True + + def __init__( + self, + value: typing.List[typing.List[Any]] | Callable | None = None, + *, + headers: typing.List[str] | None = None, + row_count: int | Tuple[int, str] = (1, "dynamic"), + col_count: int | Tuple[int, str] = 1, + datatype: str | typing.List[str] = "str", + type: str = "array", + max_rows: int | None = 20, + max_cols: int | None = None, + overflow_row_behaviour: str = "paginate", + label: str | None = None, + show_label: bool = True, + interactive: bool | None = None, + visible: bool = True, + elem_id: str | None = None, + wrap: bool = False, + **kwargs, + ): + super().__init__( + value=value, + headers=headers, + row_count=row_count, + col_count=col_count, + datatype=datatype, + type=type, + max_rows=max_rows, + max_cols=max_cols, + overflow_row_behaviour=overflow_row_behaviour, + label=label, + show_label=show_label, + interactive=interactive, + visible=visible, + elem_id=elem_id, + wrap=wrap, + **kwargs, + ) + + +Mic = Microphone diff --git a/gradio-modified/gradio/templates/frontend/assets/BlockLabel.37da86a3.js b/gradio-modified/gradio/templates/frontend/assets/BlockLabel.37da86a3.js new file mode 100644 index 0000000000000000000000000000000000000000..c3429c5659d28e5431f8a4ab02c9312641658cef --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/BlockLabel.37da86a3.js @@ -0,0 +1,2 @@ +import{S as g,i as m,s as _,e as u,c as h,a as y,t as w,b as f,d as c,f as x,g as d,m as p,h as k,j as I,k as v,n as z,o as B,Z as S}from"./index.396f4a72.js";function j(a){let t,n,s,b,o,r,l;return s=new a[1]({}),{c(){t=u("div"),n=u("span"),h(s.$$.fragment),b=y(),o=w(a[0]),f(n,"class","mr-2 h-[12px] w-[12px] opacity-80"),f(t,"class",r="absolute left-0 top-0 py-1 px-2 rounded-br-lg shadow-sm text-xs text-gray-500 flex items-center pointer-events-none bg-white z-20 border-b border-r border-gray-100 dark:bg-gray-900 "+a[3]),c(t,"h-0",!a[2]),c(t,"sr-only",!a[2])},m(e,i){x(e,t,i),d(t,n),p(s,n,null),d(t,b),d(t,o),l=!0},p(e,[i]){(!l||i&1)&&k(o,e[0]),(!l||i&8&&r!==(r="absolute left-0 top-0 py-1 px-2 rounded-br-lg shadow-sm text-xs text-gray-500 flex items-center pointer-events-none bg-white z-20 border-b border-r border-gray-100 dark:bg-gray-900 "+e[3]))&&f(t,"class",r),i&12&&c(t,"h-0",!e[2]),i&12&&c(t,"sr-only",!e[2])},i(e){l||(I(s.$$.fragment,e),l=!0)},o(e){v(s.$$.fragment,e),l=!1},d(e){e&&z(t),B(s)}}}function q(a,t,n){let s,{label:b=null}=t,{Icon:o}=t,{show_label:r=!0}=t,{disable:l=!1}=t;return a.$$set=e=>{"label"in e&&n(0,b=e.label),"Icon"in e&&n(1,o=e.Icon),"show_label"in e&&n(2,r=e.show_label),"disable"in e&&n(4,l=e.disable)},a.$$.update=()=>{a.$$.dirty&16&&n(3,{classes:s}=S({label_container:!l},["label_container"]),s)},[b,o,r,s,l]}class L extends g{constructor(t){super(),m(this,t,q,j,_,{label:0,Icon:1,show_label:2,disable:4})}}export{L as B}; +//# sourceMappingURL=BlockLabel.37da86a3.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/CarouselItem.svelte_svelte_type_style_lang.cc0aed40.js b/gradio-modified/gradio/templates/frontend/assets/CarouselItem.svelte_svelte_type_style_lang.cc0aed40.js new file mode 100644 index 0000000000000000000000000000000000000000..e812d2d88d7d96dc6837e5da19aa2c3964ecabad --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/CarouselItem.svelte_svelte_type_style_lang.cc0aed40.js @@ -0,0 +1,2 @@ +import{S as B,i as E,s as H,p as I,e as w,a as j,t as M,b as g,d as k,f as T,g as c,l as S,u as D,q as F,r as O,h as q,j as Q,k as R,n as U,A as z,F as G,Q as y,$ as J,a0 as K,a1 as A}from"./index.396f4a72.js";function N(l){let t,o,e,u,L,f,m=l[2]+1+"",v,p,_=l[3].length+"",d,b,i,r,x,n;const C=l[9].default,a=I(C,l,l[8],null);return{c(){t=w("div"),a&&a.c(),o=j(),e=w("div"),u=w("button"),u.innerHTML='',L=j(),f=w("div"),v=M(m),p=M(" / "),d=M(_),b=j(),i=w("button"),i.innerHTML='',g(u,"class","flex items-center justify-center h-6 w-6 hover:text-orange-500"),g(f,"class","carousel_index text-center font-semibold"),g(i,"class","flex items-center justify-center h-6 w-6 hover:text-orange-500"),g(e,"class","carousel-control flex gap-4 justify-center items-center pt-2 text-sm"),g(t,"class","output-carousel flex flex-col relative"),g(t,"id",l[0]),k(t,"!hidden",!l[1])},m(s,h){T(s,t,h),a&&a.m(t,null),c(t,o),c(t,e),c(e,u),c(e,L),c(e,f),c(f,v),c(f,p),c(f,d),c(e,b),c(e,i),r=!0,x||(n=[S(u,"click",l[7]),S(i,"click",l[6])],x=!0)},p(s,[h]){a&&a.p&&(!r||h&256)&&D(a,C,s,s[8],r?O(C,s[8],h,null):F(s[8]),null),(!r||h&4)&&m!==(m=s[2]+1+"")&&q(v,m),(!r||h&8)&&_!==(_=s[3].length+"")&&q(d,_),(!r||h&1)&&g(t,"id",s[0]),h&2&&k(t,"!hidden",!s[1])},i(s){r||(Q(a,s),r=!0)},o(s){R(a,s),r=!1},d(s){s&&U(t),a&&a.d(s),x=!1,z(n)}}}const P={};function V(l,t,o){let e,u,{$$slots:L={},$$scope:f}=t,{elem_id:m=""}=t,{visible:v=!0}=t;const p=G(),_=A([]);y(l,_,n=>o(3,e=n));const d=A();y(l,d,n=>o(11,u=n));let b=-1;J(P,{register:()=>(e.push(++b),_.set(e),b),unregister:n=>{const C=e.findIndex(a=>a===n);e.slice(C,1),_.set(e)},current:d});let i=0;const r=()=>{o(2,i=(i+1)%e.length),p("change")},x=()=>{o(2,i=(i-1+e.length)%e.length),p("change")};return l.$$set=n=>{"elem_id"in n&&o(0,m=n.elem_id),"visible"in n&&o(1,v=n.visible),"$$scope"in n&&o(8,f=n.$$scope)},l.$$.update=()=>{l.$$.dirty&12&&K(d,u=e[i]||0,u)},[m,v,i,e,_,d,r,x,f,L]}class X extends B{constructor(t){super(),E(this,t,V,N,H,{elem_id:0,visible:1})}}export{X as C,P as a}; +//# sourceMappingURL=CarouselItem.svelte_svelte_type_style_lang.cc0aed40.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/CarouselItem.svelte_svelte_type_style_lang.e110d966.css b/gradio-modified/gradio/templates/frontend/assets/CarouselItem.svelte_svelte_type_style_lang.e110d966.css new file mode 100644 index 0000000000000000000000000000000000000000..bae308b630c061938f3cc483ec2e8b6ca907e527 --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/CarouselItem.svelte_svelte_type_style_lang.e110d966.css @@ -0,0 +1 @@ +.carousel-item.svelte-89gglt>img{height:100%;max-height:24rem;width:100%;object-fit:contain;object-position:center} diff --git a/gradio-modified/gradio/templates/frontend/assets/Column.06c172ac.js b/gradio-modified/gradio/templates/frontend/assets/Column.06c172ac.js new file mode 100644 index 0000000000000000000000000000000000000000..e7f01d381f24ca519105fedc549c41e54e053ac2 --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/Column.06c172ac.js @@ -0,0 +1,2 @@ +import{S as g,i as v,s as h,p as w,e as b,b as o,v as r,d as _,f as C,u as q,q as S,r as j,j as k,k as y,n as z}from"./index.396f4a72.js";function A(i){let e,t,m,f;const u=i[7].default,a=w(u,i,i[6],null);return{c(){e=b("div"),a&&a.c(),o(e,"id",i[2]),o(e,"class",t="overflow-hidden flex flex-col relative col "+r(i[5])),o(e,"style",m=`min-width: min(${i[1]}px, 100%); flex-grow: ${i[0]}`),_(e,"gap-4",i[5].gap!==!1),_(e,"gr-compact",i[4]==="compact"),_(e,"gr-panel",i[4]==="panel"),_(e,"!hidden",!i[3])},m(l,s){C(l,e,s),a&&a.m(e,null),f=!0},p(l,[s]){a&&a.p&&(!f||s&64)&&q(a,u,l,l[6],f?j(u,l[6],s,null):S(l[6]),null),(!f||s&4)&&o(e,"id",l[2]),(!f||s&32&&t!==(t="overflow-hidden flex flex-col relative col "+r(l[5])))&&o(e,"class",t),(!f||s&3&&m!==(m=`min-width: min(${l[1]}px, 100%); flex-grow: ${l[0]}`))&&o(e,"style",m),s&32&&_(e,"gap-4",l[5].gap!==!1),s&48&&_(e,"gr-compact",l[4]==="compact"),s&48&&_(e,"gr-panel",l[4]==="panel"),s&40&&_(e,"!hidden",!l[3])},i(l){f||(k(a,l),f=!0)},o(l){y(a,l),f=!1},d(l){l&&z(e),a&&a.d(l)}}}function B(i,e,t){let{$$slots:m={},$$scope:f}=e,{scale:u=1}=e,{min_width:a=0}=e,{elem_id:l=""}=e,{visible:s=!0}=e,{variant:d="default"}=e,{style:c={}}=e;return i.$$set=n=>{"scale"in n&&t(0,u=n.scale),"min_width"in n&&t(1,a=n.min_width),"elem_id"in n&&t(2,l=n.elem_id),"visible"in n&&t(3,s=n.visible),"variant"in n&&t(4,d=n.variant),"style"in n&&t(5,c=n.style),"$$scope"in n&&t(6,f=n.$$scope)},[u,a,l,s,d,c,f,m]}class D extends g{constructor(e){super(),v(this,e,B,A,h,{scale:0,min_width:1,elem_id:2,visible:3,variant:4,style:5})}}var F=D;export{F as C}; +//# sourceMappingURL=Column.06c172ac.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/File.60a988f4.js b/gradio-modified/gradio/templates/frontend/assets/File.60a988f4.js new file mode 100644 index 0000000000000000000000000000000000000000..c90c4209a2035f7c4ead5488dd6b1918e172e8c9 --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/File.60a988f4.js @@ -0,0 +1,2 @@ +import{S as h,i as c,s as f,w as o,b as t,f as d,g as i,x as r,n as u}from"./index.396f4a72.js";function g(l){let e,s,n;return{c(){e=o("svg"),s=o("path"),n=o("polyline"),t(s,"d","M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"),t(n,"points","13 2 13 9 20 9"),t(e,"xmlns","http://www.w3.org/2000/svg"),t(e,"width","100%"),t(e,"height","100%"),t(e,"viewBox","0 0 24 24"),t(e,"fill","none"),t(e,"stroke","currentColor"),t(e,"stroke-width","1.5"),t(e,"stroke-linecap","round"),t(e,"stroke-linejoin","round"),t(e,"class","feather feather-file")},m(a,p){d(a,e,p),i(e,s),i(e,n)},p:r,i:r,o:r,d(a){a&&u(e)}}}class m extends h{constructor(e){super(),c(this,e,null,g,f,{})}}export{m as F}; +//# sourceMappingURL=File.60a988f4.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/Image.4a41f1aa.js b/gradio-modified/gradio/templates/frontend/assets/Image.4a41f1aa.js new file mode 100644 index 0000000000000000000000000000000000000000..6b4d40c12d6763c9f2be6d151edee03fa2f36ef0 --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/Image.4a41f1aa.js @@ -0,0 +1,2 @@ +import{S as h,i as g,s as d,w as n,b as e,f,g as a,x as l,n as m}from"./index.396f4a72.js";function u(c){let t,r,s,o;return{c(){t=n("svg"),r=n("rect"),s=n("circle"),o=n("polyline"),e(r,"x","3"),e(r,"y","3"),e(r,"width","18"),e(r,"height","18"),e(r,"rx","2"),e(r,"ry","2"),e(s,"cx","8.5"),e(s,"cy","8.5"),e(s,"r","1.5"),e(o,"points","21 15 16 10 5 21"),e(t,"xmlns","http://www.w3.org/2000/svg"),e(t,"width","100%"),e(t,"height","100%"),e(t,"viewBox","0 0 24 24"),e(t,"fill","none"),e(t,"stroke","currentColor"),e(t,"stroke-width","1.5"),e(t,"stroke-linecap","round"),e(t,"stroke-linejoin","round"),e(t,"class","feather feather-image")},m(i,p){f(i,t,p),a(t,r),a(t,s),a(t,o)},p:l,i:l,o:l,d(i){i&&m(t)}}}class x extends h{constructor(t){super(),g(this,t,null,u,d,{})}}export{x as I}; +//# sourceMappingURL=Image.4a41f1aa.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/Image.95fa511c.js b/gradio-modified/gradio/templates/frontend/assets/Image.95fa511c.js new file mode 100644 index 0000000000000000000000000000000000000000..8663a917312c06ac5545cee6f6db33ede03f1d9c --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/Image.95fa511c.js @@ -0,0 +1,2 @@ +import{S as c,i as u,s as f,e as o,b as n,M as l,f as _,x as m,n as g}from"./index.396f4a72.js";function d(i){let e,s;return{c(){e=o("img"),n(e,"class","gr-sample-image object-contain h-20 w-20"),l(e.src,s=i[1]+i[0])||n(e,"src",s)},m(a,t){_(a,e,t)},p(a,[t]){t&3&&!l(e.src,s=a[1]+a[0])&&n(e,"src",s)},i:m,o:m,d(a){a&&g(e)}}}function v(i,e,s){let{value:a}=e,{samples_dir:t}=e;return i.$$set=r=>{"value"in r&&s(0,a=r.value),"samples_dir"in r&&s(1,t=r.samples_dir)},[a,t]}class p extends c{constructor(e){super(),u(this,e,v,d,f,{value:0,samples_dir:1})}}var b=p;export{b as E}; +//# sourceMappingURL=Image.95fa511c.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/Model3D.b44fd6f2.js b/gradio-modified/gradio/templates/frontend/assets/Model3D.b44fd6f2.js new file mode 100644 index 0000000000000000000000000000000000000000..729bad5512111c6195647dcf07bb0b1b37126e50 --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/Model3D.b44fd6f2.js @@ -0,0 +1,2 @@ +import{S as l,i as r,s as o,e as u,t as c,b as d,f,g as m,h as p,x as i,n as v}from"./index.396f4a72.js";function x(n){let e,s;return{c(){e=u("div"),s=c(n[0]),d(e,"class","gr-sample-3d")},m(t,a){f(t,e,a),m(e,s)},p(t,[a]){a&1&&p(s,t[0])},i,o:i,d(t){t&&v(e)}}}function _(n,e,s){let{value:t}=e;return n.$$set=a=>{"value"in a&&s(0,t=a.value)},[t]}class g extends l{constructor(e){super(),r(this,e,_,x,o,{value:0})}}var D=g;export{D as E}; +//# sourceMappingURL=Model3D.b44fd6f2.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/ModifyUpload.2cfe71e4.js b/gradio-modified/gradio/templates/frontend/assets/ModifyUpload.2cfe71e4.js new file mode 100644 index 0000000000000000000000000000000000000000..f7df3611d20ed37b209443e3203988be68146707 --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/ModifyUpload.2cfe71e4.js @@ -0,0 +1,2 @@ +import{S as b,i as w,s as k,e as x,c as y,b as s,f as _,g as m,m as I,l as z,j as d,k as h,n as v,o as C,K as M,w as g,Y as u,x as f,a as E,d as p,D as L,E as B,F as D}from"./index.396f4a72.js";function S(o){let e,l,t,r,n,a;return t=new o[0]({}),{c(){e=x("button"),l=x("div"),y(t.$$.fragment),s(l,"class","m-t-1 w-[60%] h-[60%] opacity-80 dark:text-white"),s(e,"class","text-gray-500 bg-white/90 h-5 w-5 flex items-center justify-center rounded shadow-sm hover:shadow-xl hover:ring-1 ring-inset ring-gray-200 z-10 dark:bg-gray-900 dark:ring-gray-600"),s(e,"aria-label",o[1])},m(i,c){_(i,e,c),m(e,l),I(t,l,null),r=!0,n||(a=z(e,"click",o[2]),n=!0)},p(i,[c]){(!r||c&2)&&s(e,"aria-label",i[1])},i(i){r||(d(t.$$.fragment,i),r=!0)},o(i){h(t.$$.fragment,i),r=!1},d(i){i&&v(e),C(t),n=!1,a()}}}function q(o,e,l){let{Icon:t}=e,{label:r=""}=e;function n(a){M.call(this,o,a)}return o.$$set=a=>{"Icon"in a&&l(0,t=a.Icon),"label"in a&&l(1,r=a.label)},[t,r,n]}class j extends b{constructor(e){super(),w(this,e,q,S,k,{Icon:0,label:1})}}function F(o){let e,l,t,r;return{c(){e=g("svg"),l=g("g"),t=g("path"),r=g("path"),s(t,"d","M18,6L6.087,17.913"),u(t,"fill","none"),u(t,"fill-rule","nonzero"),u(t,"stroke-width","2px"),s(l,"transform","matrix(1.14096,-0.140958,-0.140958,1.14096,-0.0559523,0.0559523)"),s(r,"d","M4.364,4.364L19.636,19.636"),u(r,"fill","none"),u(r,"fill-rule","nonzero"),u(r,"stroke-width","2px"),s(e,"width","100%"),s(e,"height","100%"),s(e,"viewBox","0 0 24 24"),s(e,"version","1.1"),s(e,"xmlns","http://www.w3.org/2000/svg"),s(e,"xmlns:xlink","http://www.w3.org/1999/xlink"),s(e,"xml:space","preserve"),s(e,"stroke","currentColor"),u(e,"fill-rule","evenodd"),u(e,"clip-rule","evenodd"),u(e,"stroke-linecap","round"),u(e,"stroke-linejoin","round")},m(n,a){_(n,e,a),m(e,l),m(l,t),m(e,r)},p:f,i:f,o:f,d(n){n&&v(e)}}}class K extends b{constructor(e){super(),w(this,e,null,F,k,{})}}function P(o){let e,l;return{c(){e=g("svg"),l=g("path"),s(l,"d","M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"),s(e,"xmlns","http://www.w3.org/2000/svg"),s(e,"width","100%"),s(e,"height","100%"),s(e,"viewBox","0 0 24 24"),s(e,"fill","none"),s(e,"stroke","currentColor"),s(e,"stroke-width","1.5"),s(e,"stroke-linecap","round"),s(e,"stroke-linejoin","round"),s(e,"class","feather feather-edit-2")},m(t,r){_(t,e,r),m(e,l)},p:f,i:f,o:f,d(t){t&&v(e)}}}class U extends b{constructor(e){super(),w(this,e,null,P,k,{})}}function $(o){let e,l;return e=new j({props:{Icon:U,label:"Edit"}}),e.$on("click",o[3]),{c(){y(e.$$.fragment)},m(t,r){I(e,t,r),l=!0},p:f,i(t){l||(d(e.$$.fragment,t),l=!0)},o(t){h(e.$$.fragment,t),l=!1},d(t){C(e,t)}}}function Y(o){let e,l,t,r,n=o[0]&&$(o);return t=new j({props:{Icon:K,label:"Clear"}}),t.$on("click",o[4]),{c(){e=x("div"),n&&n.c(),l=E(),y(t.$$.fragment),s(e,"class","modify-upload z-10 top-2 right-2 justify-end flex gap-1"),p(e,"absolute",o[1]),p(e,"m-1",!o[1])},m(a,i){_(a,e,i),n&&n.m(e,null),m(e,l),I(t,e,null),r=!0},p(a,[i]){a[0]?n?(n.p(a,i),i&1&&d(n,1)):(n=$(a),n.c(),d(n,1),n.m(e,l)):n&&(L(),h(n,1,1,()=>{n=null}),B()),i&2&&p(e,"absolute",a[1]),i&2&&p(e,"m-1",!a[1])},i(a){r||(d(n),d(t.$$.fragment,a),r=!0)},o(a){h(n),h(t.$$.fragment,a),r=!1},d(a){a&&v(e),n&&n.d(),C(t)}}}function A(o,e,l){let{editable:t=!1}=e,{absolute:r=!0}=e;const n=D(),a=()=>n("edit"),i=c=>{n("clear"),c.stopPropagation()};return o.$$set=c=>{"editable"in c&&l(0,t=c.editable),"absolute"in c&&l(1,r=c.absolute)},[t,r,n,a,i]}class H extends b{constructor(e){super(),w(this,e,A,Y,k,{editable:0,absolute:1})}}export{K as C,j as I,H as M}; +//# sourceMappingURL=ModifyUpload.2cfe71e4.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/Tabs.6b500f1a.js b/gradio-modified/gradio/templates/frontend/assets/Tabs.6b500f1a.js new file mode 100644 index 0000000000000000000000000000000000000000..9cc0dc6c9cbe51f8e9033dcfb727413e9b762cc2 --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/Tabs.6b500f1a.js @@ -0,0 +1,2 @@ +import{S as A,i as D,s as E,B as q,f as h,n as g,p as F,e as v,a as w,b as m,d as S,g as p,ab as I,u as M,q as N,r as Q,j as z,k as G,Q as H,F as J,$ as K,aq as L,a1 as O,a0 as P,t as C,l as R,h as j}from"./index.396f4a72.js";function T(i,e,s){const t=i.slice();return t[11]=e[s],t}function U(i){let e,s=i[11].name+"",t,f,o,a;function n(){return i[9](i[11])}return{c(){e=v("button"),t=C(s),f=w(),m(e,"class","px-4 pb-2 pt-1.5 border-transparent text-gray-400 hover:text-gray-700 -mb-[2px] border-2 border-b-0")},m(d,u){h(d,e,u),p(e,t),p(e,f),o||(a=R(e,"click",n),o=!0)},p(d,u){i=d,u&4&&s!==(s=i[11].name+"")&&j(t,s)},d(d){d&&g(e),o=!1,a()}}}function V(i){let e,s=i[11].name+"",t,f;return{c(){e=v("button"),t=C(s),f=w(),m(e,"class","bg-white px-4 pb-2 pt-1.5 rounded-t-lg border-gray-200 -mb-[2px] border-2 border-b-0")},m(o,a){h(o,e,a),p(e,t),p(e,f)},p(o,a){a&4&&s!==(s=o[11].name+"")&&j(t,s)},d(o){o&&g(e)}}}function B(i,e){let s,t;function f(n,d){return n[11].id===n[3]?V:U}let o=f(e),a=o(e);return{key:i,first:null,c(){s=q(),a.c(),t=q(),this.first=s},m(n,d){h(n,s,d),a.m(n,d),h(n,t,d)},p(n,d){e=n,o===(o=f(e))&&a?a.p(e,d):(a.d(1),a=o(e),a&&(a.c(),a.m(t.parentNode,t)))},d(n){n&&g(s),a.d(n),n&&g(t)}}}function W(i){let e,s,t=[],f=new Map,o,a,n=i[2];const d=l=>l[11].id;for(let l=0;ls(3,t=r));const l=J();K(X,{register_tab:r=>{u.push({name:r.name,id:r.id}),_.update(k=>k??r.id),s(2,u)},unregister_tab:r=>{const k=u.findIndex(y=>y.id===r.id);u.splice(k,1),_.update(y=>y===r.id?u[k]?.id||u[u.length-1]?.id:y)},selected_tab:_});function c(r){P(_,t=r,t),l("change")}const b=r=>c(r.id);return i.$$set=r=>{"visible"in r&&s(0,a=r.visible),"elem_id"in r&&s(1,n=r.elem_id),"selected"in r&&s(6,d=r.selected),"$$scope"in r&&s(7,o=r.$$scope)},i.$$.update=()=>{i.$$.dirty&64&&d!==null&&c(d)},[a,n,u,t,_,c,d,o,f,b]}class x extends A{constructor(e){super(),D(this,e,Y,W,E,{visible:0,elem_id:1,selected:6})}}export{x as T,X as a}; +//# sourceMappingURL=Tabs.6b500f1a.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/Upload.5d0148e8.js b/gradio-modified/gradio/templates/frontend/assets/Upload.5d0148e8.js new file mode 100644 index 0000000000000000000000000000000000000000..e466eef365507ce3f3f55ae30d495651e33e7498 --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/Upload.5d0148e8.js @@ -0,0 +1,2 @@ +import{S as J,i as M,s as N,p as P,e as D,a as Q,b as o,d as p,f as V,g as R,l as s,W as h,z as b,u as X,q as Y,r as Z,j as x,k as $,n as ee,A as le,F as te,K as y,I as ne}from"./index.396f4a72.js";function ie(t){let l,i,a,g,m,c,f,d,k,F;const _=t[14].default,r=P(_,t,t[13],null);return{c(){l=D("div"),r&&r.c(),i=Q(),a=D("input"),o(a,"class","hidden-upload hidden"),o(a,"type","file"),o(a,"accept",t[0]),a.multiple=g=t[4]==="multiple"||void 0,o(a,"webkitdirectory",m=t[4]==="directory"||void 0),o(a,"mozdirectory",c=t[4]==="directory"||void 0),o(l,"class",f="w-full cursor-pointer h-full items-center justify-center text-gray-400 md:text-xl "+(t[1]?"min-h-[10rem] md:min-h-[15rem] max-h-[15rem] xl:max-h-[18rem] 2xl:max-h-[20rem]":"")),p(l,"text-center",t[2]),p(l,"flex",t[3])},m(n,u){V(n,l,u),r&&r.m(l,null),R(l,i),R(l,a),t[22](a),d=!0,k||(F=[s(a,"change",t[8]),s(l,"drag",h(b(t[15]))),s(l,"dragstart",h(b(t[16]))),s(l,"dragend",h(b(t[17]))),s(l,"dragover",h(b(t[18]))),s(l,"dragenter",h(b(t[19]))),s(l,"dragleave",h(b(t[20]))),s(l,"drop",h(b(t[21]))),s(l,"click",t[7]),s(l,"drop",t[9]),s(l,"dragenter",t[6]),s(l,"dragleave",t[6])],k=!0)},p(n,[u]){r&&r.p&&(!d||u&8192)&&X(r,_,n,n[13],d?Z(_,n[13],u,null):Y(n[13]),null),(!d||u&1)&&o(a,"accept",n[0]),(!d||u&16&&g!==(g=n[4]==="multiple"||void 0))&&(a.multiple=g),(!d||u&16&&m!==(m=n[4]==="directory"||void 0))&&o(a,"webkitdirectory",m),(!d||u&16&&c!==(c=n[4]==="directory"||void 0))&&o(a,"mozdirectory",c),(!d||u&2&&f!==(f="w-full cursor-pointer h-full items-center justify-center text-gray-400 md:text-xl "+(n[1]?"min-h-[10rem] md:min-h-[15rem] max-h-[15rem] xl:max-h-[18rem] 2xl:max-h-[20rem]":"")))&&o(l,"class",f),u&6&&p(l,"text-center",n[2]),u&10&&p(l,"flex",n[3])},i(n){d||(x(r,n),d=!0)},o(n){$(r,n),d=!1},d(n){n&&ee(l),r&&r.d(n),t[22](null),k=!1,le(F)}}}function ae(t,l,i){let{$$slots:a={},$$scope:g}=l,{filetype:m=void 0}=l,{include_file_metadata:c=!0}=l,{dragging:f=!1}=l,{boundedheight:d=!0}=l,{center:k=!0}=l,{flex:F=!0}=l,{file_count:_="single"}=l,{disable_click:r=!1}=l,n;const u=te(),A=()=>{i(10,f=!f)},q=()=>{r||(i(5,n.value="",n),n.click())},j=e=>{let w=Array.from(e);if(!(!e.length||!window.FileReader)){_==="single"&&(w=[e[0]]);var z=[];w.forEach((U,G)=>{let v=new FileReader;v.readAsDataURL(U),v.onloadend=function(){z[G]=c?{name:U.name,size:U.size,data:this.result}:this.result,z.filter(H=>H!==void 0).length===e.length&&u("load",_=="single"?z[0]:z)}})}},E=e=>{const w=e.target;!w.files||j(w.files)},S=e=>{i(10,f=!1),e.dataTransfer?.files&&j(e.dataTransfer.files)};function T(e){y.call(this,t,e)}function C(e){y.call(this,t,e)}function I(e){y.call(this,t,e)}function K(e){y.call(this,t,e)}function L(e){y.call(this,t,e)}function O(e){y.call(this,t,e)}function W(e){y.call(this,t,e)}function B(e){ne[e?"unshift":"push"](()=>{n=e,i(5,n)})}return t.$$set=e=>{"filetype"in e&&i(0,m=e.filetype),"include_file_metadata"in e&&i(11,c=e.include_file_metadata),"dragging"in e&&i(10,f=e.dragging),"boundedheight"in e&&i(1,d=e.boundedheight),"center"in e&&i(2,k=e.center),"flex"in e&&i(3,F=e.flex),"file_count"in e&&i(4,_=e.file_count),"disable_click"in e&&i(12,r=e.disable_click),"$$scope"in e&&i(13,g=e.$$scope)},[m,d,k,F,_,n,A,q,E,S,f,c,r,g,a,T,C,I,K,L,O,W,B]}class de extends J{constructor(l){super(),M(this,l,ae,ie,N,{filetype:0,include_file_metadata:11,dragging:10,boundedheight:1,center:2,flex:3,file_count:4,disable_click:12})}}export{de as U}; +//# sourceMappingURL=Upload.5d0148e8.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/Webcam.8816836e.js b/gradio-modified/gradio/templates/frontend/assets/Webcam.8816836e.js new file mode 100644 index 0000000000000000000000000000000000000000..98df507019b5259e0123544e315a5d90b517759c --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/Webcam.8816836e.js @@ -0,0 +1,11 @@ +import{S as bt,i as wt,s as yt,w as H,b as p,f as U,g as Z,x as I,n as j,e as ct,l as je,y as Ve,D as jt,k as G,E as Vt,j as W,a as Ge,d as re,F as qe,ad as Fe,c as Gt,m as qt,o as Ft,B as Ke,I as Qe}from"./index.396f4a72.js";function Ze(a){let t,e,i;return{c(){t=H("svg"),e=H("path"),i=H("circle"),p(e,"d","M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"),p(i,"cx","12"),p(i,"cy","13"),p(i,"r","4"),p(t,"xmlns","http://www.w3.org/2000/svg"),p(t,"width","100%"),p(t,"height","100%"),p(t,"viewBox","0 0 24 24"),p(t,"fill","none"),p(t,"stroke","currentColor"),p(t,"stroke-width","1.5"),p(t,"stroke-linecap","round"),p(t,"stroke-linejoin","round"),p(t,"class","feather feather-camera")},m(n,r){U(n,t,r),Z(t,e),Z(t,i)},p:I,i:I,o:I,d(n){n&&j(t)}}}class Je extends bt{constructor(t){super(),wt(this,t,null,Ze,yt,{})}}function $e(a){let t,e;return{c(){t=H("svg"),e=H("circle"),p(e,"cx","12"),p(e,"cy","12"),p(e,"r","10"),p(t,"xmlns","http://www.w3.org/2000/svg"),p(t,"width","100%"),p(t,"height","100%"),p(t,"viewBox","0 0 24 24"),p(t,"fill","red"),p(t,"stroke","red"),p(t,"stroke-width","1.5"),p(t,"stroke-linecap","round"),p(t,"stroke-linejoin","round"),p(t,"class","feather feather-circle")},m(i,n){U(i,t,n),Z(t,e)},p:I,i:I,o:I,d(i){i&&j(t)}}}class ti extends bt{constructor(t){super(),wt(this,t,null,$e,yt,{})}}function ei(a){let t,e;return{c(){t=H("svg"),e=H("rect"),p(e,"x","3"),p(e,"y","3"),p(e,"width","18"),p(e,"height","18"),p(e,"rx","2"),p(e,"ry","2"),p(t,"xmlns","http://www.w3.org/2000/svg"),p(t,"width","100%"),p(t,"height","100%"),p(t,"viewBox","0 0 24 24"),p(t,"fill","red"),p(t,"stroke","red"),p(t,"stroke-width","1.5"),p(t,"stroke-linecap","round"),p(t,"stroke-linejoin","round"),p(t,"class","feather feather-square")},m(i,n){U(i,t,n),Z(t,e)},p:I,i:I,o:I,d(i){i&&j(t)}}}class ii extends bt{constructor(t){super(),wt(this,t,null,ei,yt,{})}}function ai(a){let t,e,i;return{c(){t=H("svg"),e=H("polyline"),i=H("path"),p(e,"points","1 4 1 10 7 10"),p(i,"d","M3.51 15a9 9 0 1 0 2.13-9.36L1 10"),p(t,"xmlns","http://www.w3.org/2000/svg"),p(t,"width","100%"),p(t,"height","100%"),p(t,"viewBox","0 0 24 24"),p(t,"fill","none"),p(t,"stroke","currentColor"),p(t,"stroke-width","1.5"),p(t,"stroke-linecap","round"),p(t,"stroke-linejoin","round"),p(t,"class","feather feather-rotate-ccw")},m(n,r){U(n,t,r),Z(t,e),Z(t,i)},p:I,i:I,o:I,d(n){n&&j(t)}}}class ga extends bt{constructor(t){super(),wt(this,t,null,ai,yt,{})}}/*! + * Cropper.js v1.5.12 + * https://fengyuanchen.github.io/cropperjs + * + * Copyright 2015-present Chen Fengyuan + * Released under the MIT license + * + * Date: 2021-06-12T08:00:17.411Z + */function ne(a,t){var e=Object.keys(a);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(a);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(a,n).enumerable})),e.push.apply(e,i)}return e}function Ee(a){for(var t=1;ta.length)&&(t=a.length);for(var e=0,i=new Array(t);e
',yi=Number.isNaN||X.isNaN;function b(a){return typeof a=="number"&&!yi(a)}var be=function(t){return t>0&&t<1/0};function kt(a){return typeof a>"u"}function at(a){return Dt(a)==="object"&&a!==null}var xi=Object.prototype.hasOwnProperty;function nt(a){if(!at(a))return!1;try{var t=a.constructor,e=t.prototype;return t&&e&&xi.call(e,"isPrototypeOf")}catch{return!1}}function k(a){return typeof a=="function"}var _i=Array.prototype.slice;function ke(a){return Array.from?Array.from(a):_i.call(a)}function C(a,t){return a&&k(t)&&(Array.isArray(a)||b(a.length)?ke(a).forEach(function(e,i){t.call(a,e,i,a)}):at(a)&&Object.keys(a).forEach(function(e){t.call(a,a[e],e,a)})),a}var D=Object.assign||function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n0&&i.forEach(function(r){at(r)&&Object.keys(r).forEach(function(o){t[o]=r[o]})}),t},Ei=/\.\d*(?:0|9){12}\d*$/;function st(a){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return Ei.test(a)?Math.round(a*t)/t:a}var Di=/^width|height|left|top|marginLeft|marginTop$/;function K(a,t){var e=a.style;C(t,function(i,n){Di.test(n)&&b(i)&&(i="".concat(i,"px")),e[n]=i})}function Mi(a,t){return a.classList?a.classList.contains(t):a.className.indexOf(t)>-1}function A(a,t){if(!!t){if(b(a.length)){C(a,function(i){A(i,t)});return}if(a.classList){a.classList.add(t);return}var e=a.className.trim();e?e.indexOf(t)<0&&(a.className="".concat(e," ").concat(t)):a.className=t}}function Y(a,t){if(!!t){if(b(a.length)){C(a,function(e){Y(e,t)});return}if(a.classList){a.classList.remove(t);return}a.className.indexOf(t)>=0&&(a.className=a.className.replace(t,""))}}function ot(a,t,e){if(!!t){if(b(a.length)){C(a,function(i){ot(i,t,e)});return}e?A(a,t):Y(a,t)}}var Oi=/([a-z\d])([A-Z])/g;function $t(a){return a.replace(Oi,"$1-$2").toLowerCase()}function Xt(a,t){return at(a[t])?a[t]:a.dataset?a.dataset[t]:a.getAttribute("data-".concat($t(t)))}function gt(a,t,e){at(e)?a[t]=e:a.dataset?a.dataset[t]=e:a.setAttribute("data-".concat($t(t)),e)}function Ti(a,t){if(at(a[t]))try{delete a[t]}catch{a[t]=void 0}else if(a.dataset)try{delete a.dataset[t]}catch{a.dataset[t]=void 0}else a.removeAttribute("data-".concat($t(t)))}var Se=/\s\s*/,Ie=function(){var a=!1;if(Ct){var t=!1,e=function(){},i=Object.defineProperty({},"once",{get:function(){return a=!0,t},set:function(r){t=r}});X.addEventListener("test",e,i),X.removeEventListener("test",e,i)}return a}();function z(a,t,e){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},n=e;t.trim().split(Se).forEach(function(r){if(!Ie){var o=a.listeners;o&&o[r]&&o[r][e]&&(n=o[r][e],delete o[r][e],Object.keys(o[r]).length===0&&delete o[r],Object.keys(o).length===0&&delete a.listeners)}a.removeEventListener(r,n,i)})}function B(a,t,e){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},n=e;t.trim().split(Se).forEach(function(r){if(i.once&&!Ie){var o=a.listeners,s=o===void 0?{}:o;n=function(){delete s[r][e],a.removeEventListener(r,n,i);for(var f=arguments.length,h=new Array(f),c=0;cMath.abs(e)&&(e=u)})}),e}function Et(a,t){var e=a.pageX,i=a.pageY,n={endX:e,endY:i};return t?n:Ee({startX:e,startY:i},n)}function Ai(a){var t=0,e=0,i=0;return C(a,function(n){var r=n.startX,o=n.startY;t+=r,e+=o,i+=1}),t/=i,e/=i,{pageX:t,pageY:e}}function Q(a){var t=a.aspectRatio,e=a.height,i=a.width,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"contain",r=be(i),o=be(e);if(r&&o){var s=e*t;n==="contain"&&s>i||n==="cover"&&s90?{width:l,height:s}:{width:s,height:l}}function ki(a,t,e,i){var n=t.aspectRatio,r=t.naturalWidth,o=t.naturalHeight,s=t.rotate,l=s===void 0?0:s,f=t.scaleX,h=f===void 0?1:f,c=t.scaleY,u=c===void 0?1:c,v=e.aspectRatio,m=e.naturalWidth,x=e.naturalHeight,g=i.fillColor,_=g===void 0?"transparent":g,T=i.imageSmoothingEnabled,O=T===void 0?!0:T,w=i.imageSmoothingQuality,M=w===void 0?"low":w,d=i.maxWidth,y=d===void 0?1/0:d,R=i.maxHeight,L=R===void 0?1/0:R,V=i.minWidth,J=V===void 0?0:V,$=i.minHeight,q=$===void 0?0:$,P=document.createElement("canvas"),N=P.getContext("2d"),tt=Q({aspectRatio:v,width:y,height:L}),xt=Q({aspectRatio:v,width:J,height:q},"cover"),At=Math.min(tt.width,Math.max(xt.width,m)),Nt=Math.min(tt.height,Math.max(xt.height,x)),te=Q({aspectRatio:n,width:y,height:L}),ee=Q({aspectRatio:n,width:J,height:q},"cover"),ie=Math.min(te.width,Math.max(ee.width,r)),ae=Math.min(te.height,Math.max(ee.height,o)),Xe=[-ie/2,-ae/2,ie,ae];return P.width=st(At),P.height=st(Nt),N.fillStyle=_,N.fillRect(0,0,At,Nt),N.save(),N.translate(At/2,Nt/2),N.rotate(l*Math.PI/180),N.scale(h,u),N.imageSmoothingEnabled=O,N.imageSmoothingQuality=M,N.drawImage.apply(N,[a].concat(De(Xe.map(function(Ue){return Math.floor(st(Ue))})))),N.restore(),P}var Be=String.fromCharCode;function Si(a,t,e){var i="";e+=t;for(var n=t;n0;)e.push(Be.apply(null,ke(n.subarray(0,i)))),n=n.subarray(i);return"data:".concat(t,";base64,").concat(btoa(e.join("")))}function zi(a){var t=new DataView(a),e;try{var i,n,r;if(t.getUint8(0)===255&&t.getUint8(1)===216)for(var o=t.byteLength,s=2;s+1=8&&(r=f+c)}}}if(r){var u=t.getUint16(r,i),v,m;for(m=0;m=0?r:Ae),height:Math.max(i.offsetHeight,o>=0?o:Ne)};this.containerData=s,K(n,{width:s.width,height:s.height}),A(t,S),Y(n,S)},initCanvas:function(){var t=this.containerData,e=this.imageData,i=this.options.viewMode,n=Math.abs(e.rotate)%180===90,r=n?e.naturalHeight:e.naturalWidth,o=n?e.naturalWidth:e.naturalHeight,s=r/o,l=t.width,f=t.height;t.height*s>t.width?i===3?l=t.height*s:f=t.width/s:i===3?f=t.width/s:l=t.height*s;var h={aspectRatio:s,naturalWidth:r,naturalHeight:o,width:l,height:f};this.canvasData=h,this.limited=i===1||i===2,this.limitCanvas(!0,!0),h.width=Math.min(Math.max(h.width,h.minWidth),h.maxWidth),h.height=Math.min(Math.max(h.height,h.minHeight),h.maxHeight),h.left=(t.width-h.width)/2,h.top=(t.height-h.height)/2,h.oldLeft=h.left,h.oldTop=h.top,this.initialCanvasData=D({},h)},limitCanvas:function(t,e){var i=this.options,n=this.containerData,r=this.canvasData,o=this.cropBoxData,s=i.viewMode,l=r.aspectRatio,f=this.cropped&&o;if(t){var h=Number(i.minCanvasWidth)||0,c=Number(i.minCanvasHeight)||0;s>1?(h=Math.max(h,n.width),c=Math.max(c,n.height),s===3&&(c*l>h?h=c*l:c=h/l)):s>0&&(h?h=Math.max(h,f?o.width:0):c?c=Math.max(c,f?o.height:0):f&&(h=o.width,c=o.height,c*l>h?h=c*l:c=h/l));var u=Q({aspectRatio:l,width:h,height:c});h=u.width,c=u.height,r.minWidth=h,r.minHeight=c,r.maxWidth=1/0,r.maxHeight=1/0}if(e)if(s>(f?0:1)){var v=n.width-r.width,m=n.height-r.height;r.minLeft=Math.min(0,v),r.minTop=Math.min(0,m),r.maxLeft=Math.max(0,v),r.maxTop=Math.max(0,m),f&&this.limited&&(r.minLeft=Math.min(o.left,o.left+(o.width-r.width)),r.minTop=Math.min(o.top,o.top+(o.height-r.height)),r.maxLeft=o.left,r.maxTop=o.top,s===2&&(r.width>=n.width&&(r.minLeft=Math.min(0,v),r.maxLeft=Math.max(0,v)),r.height>=n.height&&(r.minTop=Math.min(0,m),r.maxTop=Math.max(0,m))))}else r.minLeft=-r.width,r.minTop=-r.height,r.maxLeft=n.width,r.maxTop=n.height},renderCanvas:function(t,e){var i=this.canvasData,n=this.imageData;if(e){var r=Ni({width:n.naturalWidth*Math.abs(n.scaleX||1),height:n.naturalHeight*Math.abs(n.scaleY||1),degree:n.rotate||0}),o=r.width,s=r.height,l=i.width*(o/i.naturalWidth),f=i.height*(s/i.naturalHeight);i.left-=(l-i.width)/2,i.top-=(f-i.height)/2,i.width=l,i.height=f,i.aspectRatio=o/s,i.naturalWidth=o,i.naturalHeight=s,this.limitCanvas(!0,!1)}(i.width>i.maxWidth||i.widthi.maxHeight||i.heighte.width?r.height=r.width/i:r.width=r.height*i),this.cropBoxData=r,this.limitCropBox(!0,!0),r.width=Math.min(Math.max(r.width,r.minWidth),r.maxWidth),r.height=Math.min(Math.max(r.height,r.minHeight),r.maxHeight),r.width=Math.max(r.minWidth,r.width*n),r.height=Math.max(r.minHeight,r.height*n),r.left=e.left+(e.width-r.width)/2,r.top=e.top+(e.height-r.height)/2,r.oldLeft=r.left,r.oldTop=r.top,this.initialCropBoxData=D({},r)},limitCropBox:function(t,e){var i=this.options,n=this.containerData,r=this.canvasData,o=this.cropBoxData,s=this.limited,l=i.aspectRatio;if(t){var f=Number(i.minCropBoxWidth)||0,h=Number(i.minCropBoxHeight)||0,c=s?Math.min(n.width,r.width,r.width+r.left,n.width-r.left):n.width,u=s?Math.min(n.height,r.height,r.height+r.top,n.height-r.top):n.height;f=Math.min(f,n.width),h=Math.min(h,n.height),l&&(f&&h?h*l>f?h=f/l:f=h*l:f?h=f/l:h&&(f=h*l),u*l>c?u=c/l:c=u*l),o.minWidth=Math.min(f,c),o.minHeight=Math.min(h,u),o.maxWidth=c,o.maxHeight=u}e&&(s?(o.minLeft=Math.max(0,r.left),o.minTop=Math.max(0,r.top),o.maxLeft=Math.min(n.width,r.left+r.width)-o.width,o.maxTop=Math.min(n.height,r.top+r.height)-o.height):(o.minLeft=0,o.minTop=0,o.maxLeft=n.width-o.width,o.maxTop=n.height-o.height))},renderCropBox:function(){var t=this.options,e=this.containerData,i=this.cropBoxData;(i.width>i.maxWidth||i.widthi.maxHeight||i.height=e.width&&i.height>=e.height?Oe:Zt),K(this.cropBox,D({width:i.width,height:i.height},vt({translateX:i.left,translateY:i.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),ht(this.element,zt,this.getData())}},Wi={initPreview:function(){var t=this.element,e=this.crossOrigin,i=this.options.preview,n=e?this.crossOriginUrl:this.url,r=t.alt||"The image to preview",o=document.createElement("img");if(e&&(o.crossOrigin=e),o.src=n,o.alt=r,this.viewBox.appendChild(o),this.viewBoxImage=o,!!i){var s=i;typeof i=="string"?s=t.ownerDocument.querySelectorAll(i):i.querySelector&&(s=[i]),this.previews=s,C(s,function(l){var f=document.createElement("img");gt(l,_t,{width:l.offsetWidth,height:l.offsetHeight,html:l.innerHTML}),e&&(f.crossOrigin=e),f.src=n,f.alt=r,f.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',l.innerHTML="",l.appendChild(f)})}},resetPreview:function(){C(this.previews,function(t){var e=Xt(t,_t);K(t,{width:e.width,height:e.height}),t.innerHTML=e.html,Ti(t,_t)})},preview:function(){var t=this.imageData,e=this.canvasData,i=this.cropBoxData,n=i.width,r=i.height,o=t.width,s=t.height,l=i.left-e.left-t.left,f=i.top-e.top-t.top;!this.cropped||this.disabled||(K(this.viewBoxImage,D({width:o,height:s},vt(D({translateX:-l,translateY:-f},t)))),C(this.previews,function(h){var c=Xt(h,_t),u=c.width,v=c.height,m=u,x=v,g=1;n&&(g=u/n,x=r*g),r&&x>v&&(g=v/r,m=n*g,x=v),K(h,{width:m,height:x}),K(h.getElementsByTagName("img")[0],D({width:o*g,height:s*g},vt(D({translateX:-l*g,translateY:-f*g},t))))}))}},Yi={bind:function(){var t=this.element,e=this.options,i=this.cropper;k(e.cropstart)&&B(t,Wt,e.cropstart),k(e.cropmove)&&B(t,Ht,e.cropmove),k(e.cropend)&&B(t,Pt,e.cropend),k(e.crop)&&B(t,zt,e.crop),k(e.zoom)&&B(t,Yt,e.zoom),B(i,le,this.onCropStart=this.cropStart.bind(this)),e.zoomable&&e.zoomOnWheel&&B(i,ve,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&B(i,ce,this.onDblclick=this.dblclick.bind(this)),B(t.ownerDocument,fe,this.onCropMove=this.cropMove.bind(this)),B(t.ownerDocument,ue,this.onCropEnd=this.cropEnd.bind(this)),e.responsive&&B(window,pe,this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,e=this.options,i=this.cropper;k(e.cropstart)&&z(t,Wt,e.cropstart),k(e.cropmove)&&z(t,Ht,e.cropmove),k(e.cropend)&&z(t,Pt,e.cropend),k(e.crop)&&z(t,zt,e.crop),k(e.zoom)&&z(t,Yt,e.zoom),z(i,le,this.onCropStart),e.zoomable&&e.zoomOnWheel&&z(i,ve,this.onWheel,{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&z(i,ce,this.onDblclick),z(t.ownerDocument,fe,this.onCropMove),z(t.ownerDocument,ue,this.onCropEnd),e.responsive&&z(window,pe,this.onResize)}},Xi={resize:function(){if(!this.disabled){var t=this.options,e=this.container,i=this.containerData,n=e.offsetWidth/i.width,r=e.offsetHeight/i.height,o=Math.abs(n-1)>Math.abs(r-1)?n:r;if(o!==1){var s,l;t.restore&&(s=this.getCanvasData(),l=this.getCropBoxData()),this.render(),t.restore&&(this.setCanvasData(C(s,function(f,h){s[h]=f*o})),this.setCropBoxData(C(l,function(f,h){l[h]=f*o})))}}},dblclick:function(){this.disabled||this.options.dragMode===Re||this.setDragMode(Mi(this.dragBox,Lt)?Ce:Jt)},wheel:function(t){var e=this,i=Number(this.options.wheelZoomRatio)||.1,n=1;this.disabled||(t.preventDefault(),!this.wheeling&&(this.wheeling=!0,setTimeout(function(){e.wheeling=!1},50),t.deltaY?n=t.deltaY>0?1:-1:t.wheelDelta?n=-t.wheelDelta/120:t.detail&&(n=t.detail>0?1:-1),this.zoom(-n*i,t)))},cropStart:function(t){var e=t.buttons,i=t.button;if(!(this.disabled||(t.type==="mousedown"||t.type==="pointerdown"&&t.pointerType==="mouse")&&(b(e)&&e!==1||b(i)&&i!==0||t.ctrlKey))){var n=this.options,r=this.pointers,o;t.changedTouches?C(t.changedTouches,function(s){r[s.identifier]=Et(s)}):r[t.pointerId||0]=Et(t),Object.keys(r).length>1&&n.zoomable&&n.zoomOnTouch?o=Te:o=Xt(t.target,mt),!!vi.test(o)&&ht(this.element,Wt,{originalEvent:t,action:o})!==!1&&(t.preventDefault(),this.action=o,this.cropping=!1,o===Me&&(this.cropping=!0,A(this.dragBox,Mt)))}},cropMove:function(t){var e=this.action;if(!(this.disabled||!e)){var i=this.pointers;t.preventDefault(),ht(this.element,Ht,{originalEvent:t,action:e})!==!1&&(t.changedTouches?C(t.changedTouches,function(n){D(i[n.identifier]||{},Et(n,!0))}):D(i[t.pointerId||0]||{},Et(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var e=this.action,i=this.pointers;t.changedTouches?C(t.changedTouches,function(n){delete i[n.identifier]}):delete i[t.pointerId||0],e&&(t.preventDefault(),Object.keys(i).length||(this.action=""),this.cropping&&(this.cropping=!1,ot(this.dragBox,Mt,this.cropped&&this.options.modal)),ht(this.element,Pt,{originalEvent:t,action:e}))}}},Ui={change:function(t){var e=this.options,i=this.canvasData,n=this.containerData,r=this.cropBoxData,o=this.pointers,s=this.action,l=e.aspectRatio,f=r.left,h=r.top,c=r.width,u=r.height,v=f+c,m=h+u,x=0,g=0,_=n.width,T=n.height,O=!0,w;!l&&t.shiftKey&&(l=c&&u?c/u:1),this.limited&&(x=r.minLeft,g=r.minTop,_=x+Math.min(n.width,i.width,i.left+i.width),T=g+Math.min(n.height,i.height,i.top+i.height));var M=o[Object.keys(o)[0]],d={x:M.endX-M.startX,y:M.endY-M.startY},y=function(L){switch(L){case et:v+d.x>_&&(d.x=_-v);break;case it:f+d.xT&&(d.y=T-m);break}};switch(s){case Zt:f+=d.x,h+=d.y;break;case et:if(d.x>=0&&(v>=_||l&&(h<=g||m>=T))){O=!1;break}y(et),c+=d.x,c<0&&(s=it,c=-c,f-=c),l&&(u=c/l,h+=(r.height-u)/2);break;case F:if(d.y<=0&&(h<=g||l&&(f<=x||v>=_))){O=!1;break}y(F),u-=d.y,h+=d.y,u<0&&(s=rt,u=-u,h-=u),l&&(c=u*l,f+=(r.width-c)/2);break;case it:if(d.x<=0&&(f<=x||l&&(h<=g||m>=T))){O=!1;break}y(it),c-=d.x,f+=d.x,c<0&&(s=et,c=-c,f-=c),l&&(u=c/l,h+=(r.height-u)/2);break;case rt:if(d.y>=0&&(m>=T||l&&(f<=x||v>=_))){O=!1;break}y(rt),u+=d.y,u<0&&(s=F,u=-u,h-=u),l&&(c=u*l,f+=(r.width-c)/2);break;case ft:if(l){if(d.y<=0&&(h<=g||v>=_)){O=!1;break}y(F),u-=d.y,h+=d.y,c=u*l}else y(F),y(et),d.x>=0?v<_?c+=d.x:d.y<=0&&h<=g&&(O=!1):c+=d.x,d.y<=0?h>g&&(u-=d.y,h+=d.y):(u-=d.y,h+=d.y);c<0&&u<0?(s=pt,u=-u,c=-c,h-=u,f-=c):c<0?(s=ut,c=-c,f-=c):u<0&&(s=dt,u=-u,h-=u);break;case ut:if(l){if(d.y<=0&&(h<=g||f<=x)){O=!1;break}y(F),u-=d.y,h+=d.y,c=u*l,f+=r.width-c}else y(F),y(it),d.x<=0?f>x?(c-=d.x,f+=d.x):d.y<=0&&h<=g&&(O=!1):(c-=d.x,f+=d.x),d.y<=0?h>g&&(u-=d.y,h+=d.y):(u-=d.y,h+=d.y);c<0&&u<0?(s=dt,u=-u,c=-c,h-=u,f-=c):c<0?(s=ft,c=-c,f-=c):u<0&&(s=pt,u=-u,h-=u);break;case pt:if(l){if(d.x<=0&&(f<=x||m>=T)){O=!1;break}y(it),c-=d.x,f+=d.x,u=c/l}else y(rt),y(it),d.x<=0?f>x?(c-=d.x,f+=d.x):d.y>=0&&m>=T&&(O=!1):(c-=d.x,f+=d.x),d.y>=0?m=0&&(v>=_||m>=T)){O=!1;break}y(et),c+=d.x,u=c/l}else y(rt),y(et),d.x>=0?v<_?c+=d.x:d.y>=0&&m>=T&&(O=!1):c+=d.x,d.y>=0?m0?s=d.y>0?dt:ft:d.x<0&&(f-=c,s=d.y>0?pt:ut),d.y<0&&(h-=u),this.cropped||(Y(this.cropBox,S),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0));break}O&&(r.width=c,r.height=u,r.left=f,r.top=h,this.action=s,this.renderCropBox()),C(o,function(R){R.startX=R.endX,R.startY=R.endY})}},ji={crop:function(){return this.ready&&!this.cropped&&!this.disabled&&(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&A(this.dragBox,Mt),Y(this.cropBox,S),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=D({},this.initialImageData),this.canvasData=D({},this.initialCanvasData),this.cropBoxData=D({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(D(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),Y(this.dragBox,Mt),A(this.cropBox,S)),this},replace:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!this.disabled&&t&&(this.isImg&&(this.element.src=t),e?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,C(this.previews,function(i){i.getElementsByTagName("img")[0].src=t}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,Y(this.cropper,se)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,A(this.cropper,se)),this},destroy:function(){var t=this.element;return t[E]?(t[E]=void 0,this.isImg&&this.replaced&&(t.src=this.originalUrl),this.uncreate(),this):this},move:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,i=this.canvasData,n=i.left,r=i.top;return this.moveTo(kt(t)?t:n+Number(t),kt(e)?e:r+Number(e))},moveTo:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,i=this.canvasData,n=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.movable&&(b(t)&&(i.left=t,n=!0),b(e)&&(i.top=e,n=!0),n&&this.renderCanvas(!0)),this},zoom:function(t,e){var i=this.canvasData;return t=Number(t),t<0?t=1/(1-t):t=1+t,this.zoomTo(i.width*t/i.naturalWidth,null,e)},zoomTo:function(t,e,i){var n=this.options,r=this.canvasData,o=r.width,s=r.height,l=r.naturalWidth,f=r.naturalHeight;if(t=Number(t),t>=0&&this.ready&&!this.disabled&&n.zoomable){var h=l*t,c=f*t;if(ht(this.element,Yt,{ratio:t,oldRatio:o/l,originalEvent:i})===!1)return this;if(i){var u=this.pointers,v=Le(this.cropper),m=u&&Object.keys(u).length?Ai(u):{pageX:i.pageX,pageY:i.pageY};r.left-=(h-o)*((m.pageX-v.left-r.left)/o),r.top-=(c-s)*((m.pageY-v.top-r.top)/s)}else nt(e)&&b(e.x)&&b(e.y)?(r.left-=(h-o)*((e.x-r.left)/o),r.top-=(c-s)*((e.y-r.top)/s)):(r.left-=(h-o)/2,r.top-=(c-s)/2);r.width=h,r.height=c,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return t=Number(t),b(t)&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var e=this.imageData.scaleY;return this.scale(t,b(e)?e:1)},scaleY:function(t){var e=this.imageData.scaleX;return this.scale(b(e)?e:1,t)},scale:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,i=this.imageData,n=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.scalable&&(b(t)&&(i.scaleX=t,n=!0),b(e)&&(i.scaleY=e,n=!0),n&&this.renderCanvas(!0,!0)),this},getData:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=this.options,i=this.imageData,n=this.canvasData,r=this.cropBoxData,o;if(this.ready&&this.cropped){o={x:r.left-n.left,y:r.top-n.top,width:r.width,height:r.height};var s=i.width/i.naturalWidth;if(C(o,function(h,c){o[c]=h/s}),t){var l=Math.round(o.y+o.height),f=Math.round(o.x+o.width);o.x=Math.round(o.x),o.y=Math.round(o.y),o.width=f-o.x,o.height=l-o.y}}else o={x:0,y:0,width:0,height:0};return e.rotatable&&(o.rotate=i.rotate||0),e.scalable&&(o.scaleX=i.scaleX||1,o.scaleY=i.scaleY||1),o},setData:function(t){var e=this.options,i=this.imageData,n=this.canvasData,r={};if(this.ready&&!this.disabled&&nt(t)){var o=!1;e.rotatable&&b(t.rotate)&&t.rotate!==i.rotate&&(i.rotate=t.rotate,o=!0),e.scalable&&(b(t.scaleX)&&t.scaleX!==i.scaleX&&(i.scaleX=t.scaleX,o=!0),b(t.scaleY)&&t.scaleY!==i.scaleY&&(i.scaleY=t.scaleY,o=!0)),o&&this.renderCanvas(!0,!0);var s=i.width/i.naturalWidth;b(t.x)&&(r.left=t.x*s+n.left),b(t.y)&&(r.top=t.y*s+n.top),b(t.width)&&(r.width=t.width*s),b(t.height)&&(r.height=t.height*s),this.setCropBoxData(r)}return this},getContainerData:function(){return this.ready?D({},this.containerData):{}},getImageData:function(){return this.sized?D({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,e={};return this.ready&&C(["left","top","width","height","naturalWidth","naturalHeight"],function(i){e[i]=t[i]}),e},setCanvasData:function(t){var e=this.canvasData,i=e.aspectRatio;return this.ready&&!this.disabled&&nt(t)&&(b(t.left)&&(e.left=t.left),b(t.top)&&(e.top=t.top),b(t.width)?(e.width=t.width,e.height=t.width/i):b(t.height)&&(e.height=t.height,e.width=t.height*i),this.renderCanvas(!0)),this},getCropBoxData:function(){var t=this.cropBoxData,e;return this.ready&&this.cropped&&(e={left:t.left,top:t.top,width:t.width,height:t.height}),e||{}},setCropBoxData:function(t){var e=this.cropBoxData,i=this.options.aspectRatio,n,r;return this.ready&&this.cropped&&!this.disabled&&nt(t)&&(b(t.left)&&(e.left=t.left),b(t.top)&&(e.top=t.top),b(t.width)&&t.width!==e.width&&(n=!0,e.width=t.width),b(t.height)&&t.height!==e.height&&(r=!0,e.height=t.height),i&&(n?e.height=e.width/i:r&&(e.width=e.height*i)),this.renderCropBox()),this},getCroppedCanvas:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var e=this.canvasData,i=ki(this.image,this.imageData,e,t);if(!this.cropped)return i;var n=this.getData(),r=n.x,o=n.y,s=n.width,l=n.height,f=i.width/Math.floor(e.naturalWidth);f!==1&&(r*=f,o*=f,s*=f,l*=f);var h=s/l,c=Q({aspectRatio:h,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),u=Q({aspectRatio:h,width:t.minWidth||0,height:t.minHeight||0},"cover"),v=Q({aspectRatio:h,width:t.width||(f!==1?i.width:s),height:t.height||(f!==1?i.height:l)}),m=v.width,x=v.height;m=Math.min(c.width,Math.max(u.width,m)),x=Math.min(c.height,Math.max(u.height,x));var g=document.createElement("canvas"),_=g.getContext("2d");g.width=st(m),g.height=st(x),_.fillStyle=t.fillColor||"transparent",_.fillRect(0,0,m,x);var T=t.imageSmoothingEnabled,O=T===void 0?!0:T,w=t.imageSmoothingQuality;_.imageSmoothingEnabled=O,w&&(_.imageSmoothingQuality=w);var M=i.width,d=i.height,y=r,R=o,L,V,J,$,q,P;y<=-s||y>M?(y=0,L=0,J=0,q=0):y<=0?(J=-y,y=0,L=Math.min(M,s+y),q=L):y<=M&&(J=0,L=Math.min(s,M-y),q=L),L<=0||R<=-l||R>d?(R=0,V=0,$=0,P=0):R<=0?($=-R,R=0,V=Math.min(d,l+R),P=V):R<=d&&($=0,V=Math.min(l,d-R),P=V);var N=[y,R,L,V];if(q>0&&P>0){var tt=m/s;N.push(J*tt,$*tt,q*tt,P*tt)}return _.drawImage.apply(_,[i].concat(De(N.map(function(xt){return Math.floor(st(xt))})))),g},setAspectRatio:function(t){var e=this.options;return!this.disabled&&!kt(t)&&(e.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var e=this.options,i=this.dragBox,n=this.face;if(this.ready&&!this.disabled){var r=t===Jt,o=e.movable&&t===Ce;t=r||o?t:Re,e.dragMode=t,gt(i,mt,t),ot(i,Lt,r),ot(i,Bt,o),e.cropBoxMovable||(gt(n,mt,t),ot(n,Lt,r),ot(n,Bt,o))}return this}},Vi=X.Cropper,Gi=function(){function a(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(ri(this,a),!t||!bi.test(t.tagName))throw new Error("The first argument is required and must be an or element.");this.element=t,this.options=D({},ge,nt(e)&&e),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}return ni(a,[{key:"init",value:function(){var e=this.element,i=e.tagName.toLowerCase(),n;if(!e[E]){if(e[E]=this,i==="img"){if(this.isImg=!0,n=e.getAttribute("src")||"",this.originalUrl=n,!n)return;n=e.src}else i==="canvas"&&window.HTMLCanvasElement&&(n=e.toDataURL());this.load(n)}}},{key:"load",value:function(e){var i=this;if(!!e){this.url=e,this.imageData={};var n=this.element,r=this.options;if(!r.rotatable&&!r.scalable&&(r.checkOrientation=!1),!r.checkOrientation||!window.ArrayBuffer){this.clone();return}if(mi.test(e)){gi.test(e)?this.read(Li(e)):this.clone();return}var o=new XMLHttpRequest,s=this.clone.bind(this);this.reloading=!0,this.xhr=o,o.onabort=s,o.onerror=s,o.ontimeout=s,o.onprogress=function(){o.getResponseHeader("content-type")!==me&&o.abort()},o.onload=function(){i.read(o.response)},o.onloadend=function(){i.reloading=!1,i.xhr=null},r.checkCrossOrigin&&we(e)&&n.crossOrigin&&(e=ye(e)),o.open("GET",e,!0),o.responseType="arraybuffer",o.withCredentials=n.crossOrigin==="use-credentials",o.send()}}},{key:"read",value:function(e){var i=this.options,n=this.imageData,r=zi(e),o=0,s=1,l=1;if(r>1){this.url=Bi(e,me);var f=Pi(r);o=f.rotate,s=f.scaleX,l=f.scaleY}i.rotatable&&(n.rotate=o),i.scalable&&(n.scaleX=s,n.scaleY=l),this.clone()}},{key:"clone",value:function(){var e=this.element,i=this.url,n=e.crossOrigin,r=i;this.options.checkCrossOrigin&&we(i)&&(n||(n="anonymous"),r=ye(i)),this.crossOrigin=n,this.crossOriginUrl=r;var o=document.createElement("img");n&&(o.crossOrigin=n),o.src=r||i,o.alt=e.alt||"The image to crop",this.image=o,o.onload=this.start.bind(this),o.onerror=this.stop.bind(this),A(o,he),e.parentNode.insertBefore(o,e.nextSibling)}},{key:"start",value:function(){var e=this,i=this.image;i.onload=null,i.onerror=null,this.sizing=!0;var n=X.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(X.navigator.userAgent),r=function(f,h){D(e.imageData,{naturalWidth:f,naturalHeight:h,aspectRatio:f/h}),e.initialImageData=D({},e.imageData),e.sizing=!1,e.sized=!0,e.build()};if(i.naturalWidth&&!n){r(i.naturalWidth,i.naturalHeight);return}var o=document.createElement("img"),s=document.body||document.documentElement;this.sizingImage=o,o.onload=function(){r(o.width,o.height),n||s.removeChild(o)},o.src=i.src,n||(o.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",s.appendChild(o))}},{key:"stop",value:function(){var e=this.image;e.onload=null,e.onerror=null,e.parentNode.removeChild(e),this.image=null}},{key:"build",value:function(){if(!(!this.sized||this.ready)){var e=this.element,i=this.options,n=this.image,r=e.parentNode,o=document.createElement("div");o.innerHTML=wi;var s=o.querySelector(".".concat(E,"-container")),l=s.querySelector(".".concat(E,"-canvas")),f=s.querySelector(".".concat(E,"-drag-box")),h=s.querySelector(".".concat(E,"-crop-box")),c=h.querySelector(".".concat(E,"-face"));this.container=r,this.cropper=s,this.canvas=l,this.dragBox=f,this.cropBox=h,this.viewBox=s.querySelector(".".concat(E,"-view-box")),this.face=c,l.appendChild(n),A(e,S),r.insertBefore(s,e.nextSibling),this.isImg||Y(n,he),this.initPreview(),this.bind(),i.initialAspectRatio=Math.max(0,i.initialAspectRatio)||NaN,i.aspectRatio=Math.max(0,i.aspectRatio)||NaN,i.viewMode=Math.max(0,Math.min(3,Math.round(i.viewMode)))||0,A(h,S),i.guides||A(h.getElementsByClassName("".concat(E,"-dashed")),S),i.center||A(h.getElementsByClassName("".concat(E,"-center")),S),i.background&&A(s,"".concat(E,"-bg")),i.highlight||A(c,fi),i.cropBoxMovable&&(A(c,Bt),gt(c,mt,Zt)),i.cropBoxResizable||(A(h.getElementsByClassName("".concat(E,"-line")),S),A(h.getElementsByClassName("".concat(E,"-point")),S)),this.render(),this.ready=!0,this.setDragMode(i.dragMode),i.autoCrop&&this.crop(),this.setData(i.data),k(i.ready)&&B(e,de,i.ready,{once:!0}),ht(e,de)}}},{key:"unbuild",value:function(){!this.ready||(this.ready=!1,this.unbind(),this.resetPreview(),this.cropper.parentNode.removeChild(this.cropper),Y(this.element,S))}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}],[{key:"noConflict",value:function(){return window.Cropper=Vi,a}},{key:"setDefaults",value:function(e){D(ge,nt(e)&&e)}}]),a}();D(Gi.prototype,Hi,Wi,Yi,Xi,Ui,ji);var ze=function(){if(typeof Map<"u")return Map;function a(t,e){var i=-1;return t.some(function(n,r){return n[0]===e?(i=r,!0):!1}),i}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(e){var i=a(this.__entries__,e),n=this.__entries__[i];return n&&n[1]},t.prototype.set=function(e,i){var n=a(this.__entries__,e);~n?this.__entries__[n][1]=i:this.__entries__.push([e,i])},t.prototype.delete=function(e){var i=this.__entries__,n=a(i,e);~n&&i.splice(n,1)},t.prototype.has=function(e){return!!~a(this.__entries__,e)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,i){i===void 0&&(i=null);for(var n=0,r=this.__entries__;n0},a.prototype.connect_=function(){!Ut||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Ji?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},a.prototype.disconnect_=function(){!Ut||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},a.prototype.onTransitionEnd_=function(t){var e=t.propertyName,i=e===void 0?"":e,n=Zi.some(function(r){return!!~i.indexOf(r)});n&&this.refresh()},a.getInstance=function(){return this.instance_||(this.instance_=new a),this.instance_},a.instance_=null,a}(),Pe=function(a,t){for(var e=0,i=Object.keys(t);e"u"||!(Element instanceof Object))){if(!(t instanceof lt(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new sa(t)),this.controller_.addObserver(this),this.controller_.refresh())}},a.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof lt(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;!e.has(t)||(e.delete(t),e.size||this.controller_.removeObserver(this))}},a.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},a.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(e){e.isActive()&&t.activeObservations_.push(e)})},a.prototype.broadcastActive=function(){if(!!this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map(function(i){return new ha(i.target,i.broadcastRect())});this.callback_.call(t,e,t),this.clearActive()}},a.prototype.clearActive=function(){this.activeObservations_.splice(0)},a.prototype.hasActive=function(){return this.activeObservations_.length>0},a}(),We=typeof WeakMap<"u"?new WeakMap:new ze,Ye=function(){function a(t){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var e=$i.getInstance(),i=new ca(t,e,this);We.set(this,i)}return a}();["observe","unobserve","disconnect"].forEach(function(a){Ye.prototype[a]=function(){var t;return(t=We.get(this))[a].apply(t,arguments)}});var ba=function(){return typeof Ot.ResizeObserver<"u"?Ot.ResizeObserver:Ye}();function _e(a){let t,e,i,n,r,o;const s=[fa,la],l=[];function f(h,c){return h[1]==="video"?0:1}return e=f(a),i=l[e]=s[e](a),{c(){t=ct("button"),i.c(),p(t,"class","rounded-xl w-10 h-10 flex justify-center items-center absolute inset-x-0 bottom-2 md:bottom-4 xl:bottom-8 m-auto drop-shadow-lg bg-black/90")},m(h,c){U(h,t,c),l[e].m(t,null),n=!0,r||(o=je(t,"click",function(){Ve(a[1]==="image"?a[5]:a[6])&&(a[1]==="image"?a[5]:a[6]).apply(this,arguments)}),r=!0)},p(h,c){a=h;let u=e;e=f(a),e===u?l[e].p(a,c):(jt(),G(l[u],1,1,()=>{l[u]=null}),Vt(),i=l[e],i?i.p(a,c):(i=l[e]=s[e](a),i.c()),W(i,1),i.m(t,null))},i(h){n||(W(i),n=!0)},o(h){G(i),n=!1},d(h){h&&j(t),l[e].d(),r=!1,o()}}}function la(a){let t,e,i;return e=new Je({}),{c(){t=ct("div"),Gt(e.$$.fragment),p(t,"class","w-2/4 h-2/4 text-white opacity-80")},m(n,r){U(n,t,r),qt(e,t,null),i=!0},p:I,i(n){i||(W(e.$$.fragment,n),i=!0)},o(n){G(e.$$.fragment,n),i=!1},d(n){n&&j(t),Ft(e)}}}function fa(a){let t,e,i,n;const r=[da,ua],o=[];function s(l,f){return l[4]?0:1}return t=s(a),e=o[t]=r[t](a),{c(){e.c(),i=Ke()},m(l,f){o[t].m(l,f),U(l,i,f),n=!0},p(l,f){let h=t;t=s(l),t!==h&&(jt(),G(o[h],1,1,()=>{o[h]=null}),Vt(),e=o[t],e||(e=o[t]=r[t](l),e.c()),W(e,1),e.m(i.parentNode,i))},i(l){n||(W(e),n=!0)},o(l){G(e),n=!1},d(l){o[t].d(l),l&&j(i)}}}function ua(a){let t,e,i;return e=new ti({}),{c(){t=ct("div"),Gt(e.$$.fragment),p(t,"class","w-2/4 h-2/4 dark:text-white opacity-80")},m(n,r){U(n,t,r),qt(e,t,null),i=!0},i(n){i||(W(e.$$.fragment,n),i=!0)},o(n){G(e.$$.fragment,n),i=!1},d(n){n&&j(t),Ft(e)}}}function da(a){let t,e,i;return e=new ii({}),{c(){t=ct("div"),Gt(e.$$.fragment),p(t,"class","w-2/4 h-2/4 dark:text-white opacity-80")},m(n,r){U(n,t,r),qt(e,t,null),i=!0},i(n){i||(W(e.$$.fragment,n),i=!0)},o(n){G(e.$$.fragment,n),i=!1},d(n){n&&j(t),Ft(e)}}}function pa(a){let t,e,i,n,r=!a[0]&&_e(a);return{c(){t=ct("div"),e=ct("video"),i=Ge(),r&&r.c(),p(e,"class","h-full w-full "),re(e,"scale-x-[-1]",a[2]),p(t,"class","h-full min-h-[15rem] w-full relative")},m(o,s){U(o,t,s),Z(t,e),a[9](e),Z(t,i),r&&r.m(t,null),n=!0},p(o,[s]){s&4&&re(e,"scale-x-[-1]",o[2]),o[0]?r&&(jt(),G(r,1,1,()=>{r=null}),Vt()):r?(r.p(o,s),s&1&&W(r,1)):(r=_e(o),r.c(),W(r,1),r.m(t,null))},i(o){n||(W(r),n=!0)},o(o){G(r),n=!1},d(o){o&&j(t),a[9](null),r&&r.d()}}}function va(a,t,e){let i,n,{streaming:r=!1}=t,{pending:o=!1}=t,{mode:s="image"}=t,{mirror_webcam:l}=t,{include_audio:f}=t;const h=qe();Fe(()=>n=document.createElement("canvas"));async function c(){try{x=await navigator.mediaDevices.getUserMedia({video:!0,audio:f}),e(3,i.srcObject=x,i),e(3,i.muted=!0,i),i.play()}catch(w){if(w instanceof DOMException&&w.name=="NotAllowedError")return h("error","Please allow access to the webcam for recording."),null;throw w}}function u(){var w=n.getContext("2d");if(i.videoWidth&&i.videoHeight){n.width=i.videoWidth,n.height=i.videoHeight,w.drawImage(i,0,0,i.videoWidth,i.videoHeight);var M=n.toDataURL("image/png");h(r?"stream":"capture",M)}}let v=!1,m=[],x,g,_;function T(){if(v){_.stop();let w=new Blob(m,{type:g}),M=new FileReader;M.onload=function(d){d.target&&h("capture",{data:d.target.result,name:"sample."+g.substring(6),is_example:!1})},M.readAsDataURL(w)}else{m=[];let w=["video/webm","video/mp4"];for(let M of w)if(MediaRecorder.isTypeSupported(M)){g=M;break}if(g===null){console.error("No supported MediaRecorder mimeType");return}_=new MediaRecorder(x,{mimeType:g}),_.addEventListener("dataavailable",function(M){m.push(M.data)}),_.start(200)}e(4,v=!v)}c(),r&&s==="image"&&window.setInterval(()=>{i&&!o&&u()},500);function O(w){Qe[w?"unshift":"push"](()=>{i=w,e(3,i)})}return a.$$set=w=>{"streaming"in w&&e(0,r=w.streaming),"pending"in w&&e(7,o=w.pending),"mode"in w&&e(1,s=w.mode),"mirror_webcam"in w&&e(2,l=w.mirror_webcam),"include_audio"in w&&e(8,f=w.include_audio)},[r,s,l,i,v,u,T,o,f,O]}class wa extends bt{constructor(t){super(),wt(this,t,va,pa,yt,{streaming:0,pending:7,mode:1,mirror_webcam:2,include_audio:8})}}export{Gi as C,ga as U,wa as W,ba as i}; +//# sourceMappingURL=Webcam.8816836e.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/_commonjsHelpers.88e99c8f.js b/gradio-modified/gradio/templates/frontend/assets/_commonjsHelpers.88e99c8f.js new file mode 100644 index 0000000000000000000000000000000000000000..1e8c60e63103e9e303d5339b78e31fe542190fb2 --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/_commonjsHelpers.88e99c8f.js @@ -0,0 +1,2 @@ +var o=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function r(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}export{r as a,o as c,n as g}; +//# sourceMappingURL=_commonjsHelpers.88e99c8f.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/color.509e5f03.js b/gradio-modified/gradio/templates/frontend/assets/color.509e5f03.js new file mode 100644 index 0000000000000000000000000000000000000000..9e472c0a0fd8a597eab4f863e0cfa0c1f89cc735 --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/color.509e5f03.js @@ -0,0 +1,2 @@ +import{aj as o}from"./index.396f4a72.js";const t=r=>o[r%o.length];export{t as g}; +//# sourceMappingURL=color.509e5f03.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/csv.27f5436c.js b/gradio-modified/gradio/templates/frontend/assets/csv.27f5436c.js new file mode 100644 index 0000000000000000000000000000000000000000..7ee090c69a9158e1331c5630c3dff9699534ab58 --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/csv.27f5436c.js @@ -0,0 +1,2 @@ +import{d as a}from"./dsv.7fe76a93.js";var s=a(","),v=s.parse,o=s.parseRows;export{v as a,o as c}; +//# sourceMappingURL=csv.27f5436c.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/dsv.7fe76a93.js b/gradio-modified/gradio/templates/frontend/assets/dsv.7fe76a93.js new file mode 100644 index 0000000000000000000000000000000000000000..fd7a34bfb56dda82dfbc84dbca32dfe81c5c5b4d --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/dsv.7fe76a93.js @@ -0,0 +1,6 @@ +var D={},A={},E=34,m=10,R=13;function I(r){return new Function("d","return {"+r.map(function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'}).join(",")+"}")}function B(r,t){var e=I(r);return function(a,c){return t(e(a),c,r)}}function F(r){var t=Object.create(null),e=[];return r.forEach(function(a){for(var c in a)c in t||e.push(t[c]=c)}),e}function f(r,t){var e=r+"",a=e.length;return a9999?"+"+f(r,6):f(r,4)}function S(r){var t=r.getUTCHours(),e=r.getUTCMinutes(),a=r.getUTCSeconds(),c=r.getUTCMilliseconds();return isNaN(r)?"Invalid Date":L(r.getUTCFullYear())+"-"+f(r.getUTCMonth()+1,2)+"-"+f(r.getUTCDate(),2)+(c?"T"+f(t,2)+":"+f(e,2)+":"+f(a,2)+"."+f(c,3)+"Z":a?"T"+f(t,2)+":"+f(e,2)+":"+f(a,2)+"Z":e||t?"T"+f(t,2)+":"+f(e,2)+"Z":"")}function Z(r){var t=new RegExp('["'+r+` +\r]`),e=r.charCodeAt(0);function a(n,o){var s,i,u=c(n,function(h,l){if(s)return s(h,l-1);i=h,s=o?B(h,o):I(h)});return u.columns=i||[],u}function c(n,o){var s=[],i=n.length,u=0,h=0,l,v=i<=0,C=!1;n.charCodeAt(i-1)===m&&--i,n.charCodeAt(i-1)===R&&--i;function w(){if(v)return A;if(C)return C=!1,D;var j,d=u,p;if(n.charCodeAt(d)===E){for(;u++=i?v=!0:(p=n.charCodeAt(u++))===m?C=!0:p===R&&(C=!0,n.charCodeAt(u)===m&&++u),n.slice(d+1,j-1).replace(/""/g,'"')}for(;u({type:"string",description:"text string",example_data:t.value||"hello world"});export{r as Component,o as document,e as modes}; +//# sourceMappingURL=index.020a69e0.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/index.03f37f65.js b/gradio-modified/gradio/templates/frontend/assets/index.03f37f65.js new file mode 100644 index 0000000000000000000000000000000000000000..6688a54451dd7cc40d8682c8dc83d8e8a8a2bdf8 --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/index.03f37f65.js @@ -0,0 +1,3744 @@ +import{S as by,i as _y,s as wy,w as Fp,b as Aa,f as uf,g as zf,x as cu,n as cf,e as Gh,F as TG,J as FD,I as gA,O as AG,c as u0,m as c0,L as MG,j as Bh,k as jh,o as f0,K as Z4,ap as Cf,B as SG,D as EG,E as CG,a5 as OG,a6 as M5,M as bC,t as LG,h as PG,a as J4,P as DG,R as IG,T as zG,U as RG,V as FG}from"./index.396f4a72.js";import{c as Ro,a as Jx,g as NG}from"./_commonjsHelpers.88e99c8f.js";import{g as BG}from"./color.509e5f03.js";import{a as Vv,n as jG,b as UG,c as V2,t as b0,f as K4,p as VG,d as qG,e as HG,g as ND,h as $G,i as GG,j as Yo,k as Bm,l as WG,_ as BD,m as jD,x as YG,y as XG,o as Zh,R as q2,r as UD,q as mA,s as vA,C as yA,u as _C,v as wC,w as H2,z as Xp,A as Q4,B as zl,D as ky,E as ZG,F as JG,G as KG,H as QG,I as eW,J as tW,K as $2,L as nW,M as rW,N as iW,O as aW,P as kC,Q as jm,S as xA,T as G2,U as TC,V as Ed,W as W2,X as oW,Y as cp,Z as sW,$ as ek,a0 as lW,a1 as c_,a2 as uW}from"./linear.955f0731.js";import{d as cW}from"./dsv.7fe76a93.js";import{B as fW}from"./BlockLabel.37da86a3.js";function hW(t){let n,e,o,f,r,a,u;return{c(){n=Fp("svg"),e=Fp("circle"),o=Fp("circle"),f=Fp("circle"),r=Fp("circle"),a=Fp("circle"),u=Fp("path"),Aa(e,"cx","20"),Aa(e,"cy","4"),Aa(e,"r","2"),Aa(e,"fill","currentColor"),Aa(o,"cx","8"),Aa(o,"cy","16"),Aa(o,"r","2"),Aa(o,"fill","currentColor"),Aa(f,"cx","28"),Aa(f,"cy","12"),Aa(f,"r","2"),Aa(f,"fill","currentColor"),Aa(r,"cx","11"),Aa(r,"cy","7"),Aa(r,"r","2"),Aa(r,"fill","currentColor"),Aa(a,"cx","16"),Aa(a,"cy","24"),Aa(a,"r","2"),Aa(a,"fill","currentColor"),Aa(u,"fill","currentColor"),Aa(u,"d","M30 3.413L28.586 2L4 26.585V2H2v26a2 2 0 0 0 2 2h26v-2H5.413Z"),Aa(n,"xmlns","http://www.w3.org/2000/svg"),Aa(n,"xmlns:xlink","http://www.w3.org/1999/xlink"),Aa(n,"aria-hidden","true"),Aa(n,"role","img"),Aa(n,"class","iconify iconify--carbon"),Aa(n,"width","100%"),Aa(n,"height","100%"),Aa(n,"preserveAspectRatio","xMidYMid meet"),Aa(n,"viewBox","0 0 32 32")},m(c,i){uf(c,n,i),zf(n,e),zf(n,o),zf(n,f),zf(n,r),zf(n,a),zf(n,u)},p:cu,i:cu,o:cu,d(c){c&&cf(n)}}}class VD extends by{constructor(n){super(),_y(this,n,null,hW,wy,{})}}var qD={exports:{}};(function(t,n){(function(e){t.exports=e()})(function(){return function e(o,f,r){function a(i,s){if(!f[i]){if(!o[i]){var l=typeof Jx=="function"&&Jx;if(!s&&l)return l(i,!0);if(u)return u(i,!0);var d=new Error("Cannot find module '"+i+"'");throw d.code="MODULE_NOT_FOUND",d}var h=f[i]={exports:{}};o[i][0].call(h.exports,function(m){return a(o[i][1][m]||m)},h,h.exports,e,o,f,r)}return f[i].exports}for(var u=typeof Jx=="function"&&Jx,c=0;c:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:transparent;border:6px solid transparent;z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid transparent;border-left-color:#69738a;margin-top:8px;margin-right:-30px;","X .select-outline":"fill:none;stroke-width:1;shape-rendering:crispEdges;","X .select-outline-1":"stroke:#fff;","X .select-outline-2":"stroke:#000;stroke-dasharray:2px 2px;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(var u in a){var c=u.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");r.addStyleRule(c,a[u])}},{"../src/lib":503}],2:[function(e,o,f){o.exports=e("../src/transforms/aggregate")},{"../src/transforms/aggregate":1118}],3:[function(e,o,f){o.exports=e("../src/traces/bar")},{"../src/traces/bar":656}],4:[function(e,o,f){o.exports=e("../src/traces/barpolar")},{"../src/traces/barpolar":669}],5:[function(e,o,f){o.exports=e("../src/traces/box")},{"../src/traces/box":679}],6:[function(e,o,f){o.exports=e("../src/components/calendars")},{"../src/components/calendars":364}],7:[function(e,o,f){o.exports=e("../src/traces/candlestick")},{"../src/traces/candlestick":688}],8:[function(e,o,f){o.exports=e("../src/traces/carpet")},{"../src/traces/carpet":707}],9:[function(e,o,f){o.exports=e("../src/traces/choropleth")},{"../src/traces/choropleth":721}],10:[function(e,o,f){o.exports=e("../src/traces/choroplethmapbox")},{"../src/traces/choroplethmapbox":728}],11:[function(e,o,f){o.exports=e("../src/traces/cone")},{"../src/traces/cone":734}],12:[function(e,o,f){o.exports=e("../src/traces/contour")},{"../src/traces/contour":749}],13:[function(e,o,f){o.exports=e("../src/traces/contourcarpet")},{"../src/traces/contourcarpet":760}],14:[function(e,o,f){o.exports=e("../src/core")},{"../src/core":481}],15:[function(e,o,f){o.exports=e("../src/traces/densitymapbox")},{"../src/traces/densitymapbox":768}],16:[function(e,o,f){o.exports=e("../src/transforms/filter")},{"../src/transforms/filter":1119}],17:[function(e,o,f){o.exports=e("../src/traces/funnel")},{"../src/traces/funnel":778}],18:[function(e,o,f){o.exports=e("../src/traces/funnelarea")},{"../src/traces/funnelarea":787}],19:[function(e,o,f){o.exports=e("../src/transforms/groupby")},{"../src/transforms/groupby":1120}],20:[function(e,o,f){o.exports=e("../src/traces/heatmap")},{"../src/traces/heatmap":800}],21:[function(e,o,f){o.exports=e("../src/traces/heatmapgl")},{"../src/traces/heatmapgl":811}],22:[function(e,o,f){o.exports=e("../src/traces/histogram")},{"../src/traces/histogram":823}],23:[function(e,o,f){o.exports=e("../src/traces/histogram2d")},{"../src/traces/histogram2d":829}],24:[function(e,o,f){o.exports=e("../src/traces/histogram2dcontour")},{"../src/traces/histogram2dcontour":833}],25:[function(e,o,f){o.exports=e("../src/traces/icicle")},{"../src/traces/icicle":839}],26:[function(e,o,f){o.exports=e("../src/traces/image")},{"../src/traces/image":852}],27:[function(e,o,f){var r=e("./core");r.register([e("./bar"),e("./box"),e("./heatmap"),e("./histogram"),e("./histogram2d"),e("./histogram2dcontour"),e("./contour"),e("./scatterternary"),e("./violin"),e("./funnel"),e("./waterfall"),e("./image"),e("./pie"),e("./sunburst"),e("./treemap"),e("./icicle"),e("./funnelarea"),e("./scatter3d"),e("./surface"),e("./isosurface"),e("./volume"),e("./mesh3d"),e("./cone"),e("./streamtube"),e("./scattergeo"),e("./choropleth"),e("./scattergl"),e("./splom"),e("./pointcloud"),e("./heatmapgl"),e("./parcoords"),e("./parcats"),e("./scattermapbox"),e("./choroplethmapbox"),e("./densitymapbox"),e("./sankey"),e("./indicator"),e("./table"),e("./carpet"),e("./scattercarpet"),e("./contourcarpet"),e("./ohlc"),e("./candlestick"),e("./scatterpolar"),e("./scatterpolargl"),e("./barpolar"),e("./scattersmith"),e("./aggregate"),e("./filter"),e("./groupby"),e("./sort"),e("./calendars")]),o.exports=r},{"./aggregate":2,"./bar":3,"./barpolar":4,"./box":5,"./calendars":6,"./candlestick":7,"./carpet":8,"./choropleth":9,"./choroplethmapbox":10,"./cone":11,"./contour":12,"./contourcarpet":13,"./core":14,"./densitymapbox":15,"./filter":16,"./funnel":17,"./funnelarea":18,"./groupby":19,"./heatmap":20,"./heatmapgl":21,"./histogram":22,"./histogram2d":23,"./histogram2dcontour":24,"./icicle":25,"./image":26,"./indicator":28,"./isosurface":29,"./mesh3d":30,"./ohlc":31,"./parcats":32,"./parcoords":33,"./pie":34,"./pointcloud":35,"./sankey":36,"./scatter3d":37,"./scattercarpet":38,"./scattergeo":39,"./scattergl":40,"./scattermapbox":41,"./scatterpolar":42,"./scatterpolargl":43,"./scattersmith":44,"./scatterternary":45,"./sort":46,"./splom":47,"./streamtube":48,"./sunburst":49,"./surface":50,"./table":51,"./treemap":52,"./violin":53,"./volume":54,"./waterfall":55}],28:[function(e,o,f){o.exports=e("../src/traces/indicator")},{"../src/traces/indicator":860}],29:[function(e,o,f){o.exports=e("../src/traces/isosurface")},{"../src/traces/isosurface":866}],30:[function(e,o,f){o.exports=e("../src/traces/mesh3d")},{"../src/traces/mesh3d":871}],31:[function(e,o,f){o.exports=e("../src/traces/ohlc")},{"../src/traces/ohlc":876}],32:[function(e,o,f){o.exports=e("../src/traces/parcats")},{"../src/traces/parcats":885}],33:[function(e,o,f){o.exports=e("../src/traces/parcoords")},{"../src/traces/parcoords":896}],34:[function(e,o,f){o.exports=e("../src/traces/pie")},{"../src/traces/pie":907}],35:[function(e,o,f){o.exports=e("../src/traces/pointcloud")},{"../src/traces/pointcloud":916}],36:[function(e,o,f){o.exports=e("../src/traces/sankey")},{"../src/traces/sankey":922}],37:[function(e,o,f){o.exports=e("../src/traces/scatter3d")},{"../src/traces/scatter3d":960}],38:[function(e,o,f){o.exports=e("../src/traces/scattercarpet")},{"../src/traces/scattercarpet":967}],39:[function(e,o,f){o.exports=e("../src/traces/scattergeo")},{"../src/traces/scattergeo":975}],40:[function(e,o,f){o.exports=e("../src/traces/scattergl")},{"../src/traces/scattergl":989}],41:[function(e,o,f){o.exports=e("../src/traces/scattermapbox")},{"../src/traces/scattermapbox":999}],42:[function(e,o,f){o.exports=e("../src/traces/scatterpolar")},{"../src/traces/scatterpolar":1007}],43:[function(e,o,f){o.exports=e("../src/traces/scatterpolargl")},{"../src/traces/scatterpolargl":1015}],44:[function(e,o,f){o.exports=e("../src/traces/scattersmith")},{"../src/traces/scattersmith":1022}],45:[function(e,o,f){o.exports=e("../src/traces/scatterternary")},{"../src/traces/scatterternary":1030}],46:[function(e,o,f){o.exports=e("../src/transforms/sort")},{"../src/transforms/sort":1122}],47:[function(e,o,f){o.exports=e("../src/traces/splom")},{"../src/traces/splom":1040}],48:[function(e,o,f){o.exports=e("../src/traces/streamtube")},{"../src/traces/streamtube":1048}],49:[function(e,o,f){o.exports=e("../src/traces/sunburst")},{"../src/traces/sunburst":1056}],50:[function(e,o,f){o.exports=e("../src/traces/surface")},{"../src/traces/surface":1065}],51:[function(e,o,f){o.exports=e("../src/traces/table")},{"../src/traces/table":1073}],52:[function(e,o,f){o.exports=e("../src/traces/treemap")},{"../src/traces/treemap":1084}],53:[function(e,o,f){o.exports=e("../src/traces/violin")},{"../src/traces/violin":1097}],54:[function(e,o,f){o.exports=e("../src/traces/volume")},{"../src/traces/volume":1105}],55:[function(e,o,f){o.exports=e("../src/traces/waterfall")},{"../src/traces/waterfall":1113}],56:[function(e,o,f){(function(r,a){typeof f=="object"&&o!==void 0?a(f,e("d3-array"),e("d3-collection"),e("d3-shape"),e("elementary-circuits-directed-graph")):a(r.d3=r.d3||{},r.d3,r.d3,r.d3,null)})(this,function(r,a,u,c,i){function s(ie){return ie.target.depth}function l(ie,ae){return ie.sourceLinks.length?ie.depth:ae-1}function d(ie){return function(){return ie}}i=i&&i.hasOwnProperty("default")?i.default:i;var h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ie){return typeof ie}:function(ie){return ie&&typeof Symbol=="function"&&ie.constructor===Symbol&&ie!==Symbol.prototype?"symbol":typeof ie};function m(ie,ae){return p(ie.source,ae.source)||ie.index-ae.index}function g(ie,ae){return p(ie.target,ae.target)||ie.index-ae.index}function p(ie,ae){return ie.partOfCycle===ae.partOfCycle?ie.y0-ae.y0:ie.circularLinkType==="top"||ae.circularLinkType==="bottom"?-1:1}function v(ie){return ie.value}function y(ie){return(ie.y0+ie.y1)/2}function x(ie){return y(ie.source)}function w(ie){return y(ie.target)}function k(ie){return ie.index}function b(ie){return ie.nodes}function T(ie){return ie.links}function _(ie,ae){var ue=ie.get(ae);if(!ue)throw new Error("missing: "+ae);return ue}function M(ie,ae){return ae(ie)}function A(ie,ae,ue){var le=0;if(ue===null){for(var ge=[],fe=0;fe1||ge>1)}function R(ie,ae,ue){return ie.sort(L),ie.forEach(function(le,ge){var fe,me,_e=0;if(Q(le,ue)&&O(le))le.circularPathData.verticalBuffer=_e+le.width/2;else{for(var we=0;weme.source.column)){var Te=ie[we].circularPathData.verticalBuffer+ie[we].width/2+ae;_e=Te>_e?Te:_e}le.circularPathData.verticalBuffer=_e+le.width/2}}),ie}function z(ie,ae,ue,le){var ge=a.min(ie.links,function(fe){return fe.source.y0});ie.links.forEach(function(fe){fe.circular&&(fe.circularPathData={})}),R(ie.links.filter(function(fe){return fe.circularLinkType=="top"}),ae,le),R(ie.links.filter(function(fe){return fe.circularLinkType=="bottom"}),ae,le),ie.links.forEach(function(fe){if(fe.circular){if(fe.circularPathData.arcRadius=fe.width+10,fe.circularPathData.leftNodeBuffer=5,fe.circularPathData.rightNodeBuffer=5,fe.circularPathData.sourceWidth=fe.source.x1-fe.source.x0,fe.circularPathData.sourceX=fe.source.x0+fe.circularPathData.sourceWidth,fe.circularPathData.targetX=fe.target.x0,fe.circularPathData.sourceY=fe.y0,fe.circularPathData.targetY=fe.y1,Q(fe,le)&&O(fe))fe.circularPathData.leftSmallArcRadius=10+fe.width/2,fe.circularPathData.leftLargeArcRadius=10+fe.width/2,fe.circularPathData.rightSmallArcRadius=10+fe.width/2,fe.circularPathData.rightLargeArcRadius=10+fe.width/2,fe.circularLinkType=="bottom"?(fe.circularPathData.verticalFullExtent=fe.source.y1+25+fe.circularPathData.verticalBuffer,fe.circularPathData.verticalLeftInnerExtent=fe.circularPathData.verticalFullExtent-fe.circularPathData.leftLargeArcRadius,fe.circularPathData.verticalRightInnerExtent=fe.circularPathData.verticalFullExtent-fe.circularPathData.rightLargeArcRadius):(fe.circularPathData.verticalFullExtent=fe.source.y0-25-fe.circularPathData.verticalBuffer,fe.circularPathData.verticalLeftInnerExtent=fe.circularPathData.verticalFullExtent+fe.circularPathData.leftLargeArcRadius,fe.circularPathData.verticalRightInnerExtent=fe.circularPathData.verticalFullExtent+fe.circularPathData.rightLargeArcRadius);else{var me=fe.source.column,_e=fe.circularLinkType,we=ie.links.filter(function(de){return de.source.column==me&&de.circularLinkType==_e});fe.circularLinkType=="bottom"?we.sort(N):we.sort(P);var Te=0;we.forEach(function(de,ye){de.circularLinkID==fe.circularLinkID&&(fe.circularPathData.leftSmallArcRadius=10+fe.width/2+Te,fe.circularPathData.leftLargeArcRadius=10+fe.width/2+ye*ae+Te),Te+=de.width}),me=fe.target.column,we=ie.links.filter(function(de){return de.target.column==me&&de.circularLinkType==_e}),fe.circularLinkType=="bottom"?we.sort(G):we.sort(B),Te=0,we.forEach(function(de,ye){de.circularLinkID==fe.circularLinkID&&(fe.circularPathData.rightSmallArcRadius=10+fe.width/2+Te,fe.circularPathData.rightLargeArcRadius=10+fe.width/2+ye*ae+Te),Te+=de.width}),fe.circularLinkType=="bottom"?(fe.circularPathData.verticalFullExtent=Math.max(ue,fe.source.y1,fe.target.y1)+25+fe.circularPathData.verticalBuffer,fe.circularPathData.verticalLeftInnerExtent=fe.circularPathData.verticalFullExtent-fe.circularPathData.leftLargeArcRadius,fe.circularPathData.verticalRightInnerExtent=fe.circularPathData.verticalFullExtent-fe.circularPathData.rightLargeArcRadius):(fe.circularPathData.verticalFullExtent=ge-25-fe.circularPathData.verticalBuffer,fe.circularPathData.verticalLeftInnerExtent=fe.circularPathData.verticalFullExtent+fe.circularPathData.leftLargeArcRadius,fe.circularPathData.verticalRightInnerExtent=fe.circularPathData.verticalFullExtent+fe.circularPathData.rightLargeArcRadius)}fe.circularPathData.leftInnerExtent=fe.circularPathData.sourceX+fe.circularPathData.leftNodeBuffer,fe.circularPathData.rightInnerExtent=fe.circularPathData.targetX-fe.circularPathData.rightNodeBuffer,fe.circularPathData.leftFullExtent=fe.circularPathData.sourceX+fe.circularPathData.leftLargeArcRadius+fe.circularPathData.leftNodeBuffer,fe.circularPathData.rightFullExtent=fe.circularPathData.targetX-fe.circularPathData.rightLargeArcRadius-fe.circularPathData.rightNodeBuffer}if(fe.circular)fe.path=function(de){var ye="";return ye=de.circularLinkType=="top"?"M"+de.circularPathData.sourceX+" "+de.circularPathData.sourceY+" L"+de.circularPathData.leftInnerExtent+" "+de.circularPathData.sourceY+" A"+de.circularPathData.leftLargeArcRadius+" "+de.circularPathData.leftSmallArcRadius+" 0 0 0 "+de.circularPathData.leftFullExtent+" "+(de.circularPathData.sourceY-de.circularPathData.leftSmallArcRadius)+" L"+de.circularPathData.leftFullExtent+" "+de.circularPathData.verticalLeftInnerExtent+" A"+de.circularPathData.leftLargeArcRadius+" "+de.circularPathData.leftLargeArcRadius+" 0 0 0 "+de.circularPathData.leftInnerExtent+" "+de.circularPathData.verticalFullExtent+" L"+de.circularPathData.rightInnerExtent+" "+de.circularPathData.verticalFullExtent+" A"+de.circularPathData.rightLargeArcRadius+" "+de.circularPathData.rightLargeArcRadius+" 0 0 0 "+de.circularPathData.rightFullExtent+" "+de.circularPathData.verticalRightInnerExtent+" L"+de.circularPathData.rightFullExtent+" "+(de.circularPathData.targetY-de.circularPathData.rightSmallArcRadius)+" A"+de.circularPathData.rightLargeArcRadius+" "+de.circularPathData.rightSmallArcRadius+" 0 0 0 "+de.circularPathData.rightInnerExtent+" "+de.circularPathData.targetY+" L"+de.circularPathData.targetX+" "+de.circularPathData.targetY:"M"+de.circularPathData.sourceX+" "+de.circularPathData.sourceY+" L"+de.circularPathData.leftInnerExtent+" "+de.circularPathData.sourceY+" A"+de.circularPathData.leftLargeArcRadius+" "+de.circularPathData.leftSmallArcRadius+" 0 0 1 "+de.circularPathData.leftFullExtent+" "+(de.circularPathData.sourceY+de.circularPathData.leftSmallArcRadius)+" L"+de.circularPathData.leftFullExtent+" "+de.circularPathData.verticalLeftInnerExtent+" A"+de.circularPathData.leftLargeArcRadius+" "+de.circularPathData.leftLargeArcRadius+" 0 0 1 "+de.circularPathData.leftInnerExtent+" "+de.circularPathData.verticalFullExtent+" L"+de.circularPathData.rightInnerExtent+" "+de.circularPathData.verticalFullExtent+" A"+de.circularPathData.rightLargeArcRadius+" "+de.circularPathData.rightLargeArcRadius+" 0 0 1 "+de.circularPathData.rightFullExtent+" "+de.circularPathData.verticalRightInnerExtent+" L"+de.circularPathData.rightFullExtent+" "+(de.circularPathData.targetY+de.circularPathData.rightSmallArcRadius)+" A"+de.circularPathData.rightLargeArcRadius+" "+de.circularPathData.rightSmallArcRadius+" 0 0 1 "+de.circularPathData.rightInnerExtent+" "+de.circularPathData.targetY+" L"+de.circularPathData.targetX+" "+de.circularPathData.targetY,ye}(fe);else{var Oe=c.linkHorizontal().source(function(de){return[de.source.x0+(de.source.x1-de.source.x0),de.y0]}).target(function(de){return[de.target.x0,de.y1]});fe.path=Oe(fe)}})}function L(ie,ae){return W(ie)==W(ae)?ie.circularLinkType=="bottom"?N(ie,ae):P(ie,ae):W(ae)-W(ie)}function P(ie,ae){return ie.y0-ae.y0}function N(ie,ae){return ae.y0-ie.y0}function B(ie,ae){return ie.y1-ae.y1}function G(ie,ae){return ae.y1-ie.y1}function W(ie){return ie.target.column-ie.source.column}function K(ie){return ie.target.x0-ie.source.x1}function te(ie,ae){var ue=E(ie),le=K(ae)/Math.tan(ue);return H(ie)=="up"?ie.y1+le:ie.y1-le}function Y(ie,ae){var ue=E(ie),le=K(ae)/Math.tan(ue);return H(ie)=="up"?ie.y1-le:ie.y1+le}function Z(ie,ae,ue,le){ie.links.forEach(function(ge){if(!ge.circular&&ge.target.column-ge.source.column>1){var fe=ge.source.column+1,me=ge.target.column-1,_e=1,we=me-fe+1;for(_e=1;fe<=me;fe++,_e++)ie.nodes.forEach(function(Te){if(Te.column==fe){var Oe,de=_e/(we+1),ye=Math.pow(1-de,3),Me=3*de*Math.pow(1-de,2),ke=3*Math.pow(de,2)*(1-de),Ee=Math.pow(de,3),ze=ye*ge.y0+Me*ge.y0+ke*ge.y1+Ee*ge.y1,Fe=ze-ge.width/2,Ve=ze+ge.width/2;Fe>Te.y0&&FeTe.y0&&VeTe.y1)&&(Oe=Ve-Te.y0+10,Te=U(Te,Oe,ae,ue),ie.nodes.forEach(function(Ke){M(Ke,le)!=M(Te,le)&&Ke.column==Te.column&&Ke.y0Te.y1&&U(Ke,Oe,ae,ue)}))}})}})}function re(ie,ae){return ie.y0>ae.y0&&ie.y0ae.y0&&ie.y1ae.y1}function U(ie,ae,ue,le){return ie.y0+ae>=ue&&ie.y1+ae<=le&&(ie.y0=ie.y0+ae,ie.y1=ie.y1+ae,ie.targetLinks.forEach(function(ge){ge.y1=ge.y1+ae}),ie.sourceLinks.forEach(function(ge){ge.y0=ge.y0+ae})),ie}function q(ie,ae,ue,le){ie.nodes.forEach(function(ge){le&&ge.y+(ge.y1-ge.y0)>ae&&(ge.y=ge.y-(ge.y+(ge.y1-ge.y0)-ae));var fe=ie.links.filter(function(we){return M(we.source,ue)==M(ge,ue)}),me=fe.length;me>1&&fe.sort(function(we,Te){if(!we.circular&&!Te.circular){if(we.target.column==Te.target.column||!ne(we,Te))return we.y1-Te.y1;if(we.target.column>Te.target.column){var Oe=Y(Te,we);return we.y1-Oe}if(Te.target.column>we.target.column)return Y(we,Te)-Te.y1}return we.circular&&!Te.circular?we.circularLinkType=="top"?-1:1:Te.circular&&!we.circular?Te.circularLinkType=="top"?1:-1:we.circular&&Te.circular?we.circularLinkType===Te.circularLinkType&&we.circularLinkType=="top"?we.target.column===Te.target.column?we.target.y1-Te.target.y1:Te.target.column-we.target.column:we.circularLinkType===Te.circularLinkType&&we.circularLinkType=="bottom"?we.target.column===Te.target.column?Te.target.y1-we.target.y1:we.target.column-Te.target.column:we.circularLinkType=="top"?-1:1:void 0});var _e=ge.y0;fe.forEach(function(we){we.y0=_e+we.width/2,_e+=we.width}),fe.forEach(function(we,Te){if(we.circularLinkType=="bottom"){for(var Oe=Te+1,de=0;Oe1&&ge.sort(function(_e,we){if(!_e.circular&&!we.circular){if(_e.source.column==we.source.column||!ne(_e,we))return _e.y0-we.y0;if(we.source.column<_e.source.column){var Te=te(we,_e);return _e.y0-Te}if(_e.source.column0?"up":"down"}function Q(ie,ae){return M(ie.source,ae)==M(ie.target,ae)}function ee(ie,ae,ue){var le=ie.nodes,ge=ie.links,fe=!1,me=!1;if(ge.forEach(function(Te){Te.circularLinkType=="top"?fe=!0:Te.circularLinkType=="bottom"&&(me=!0)}),fe==0||me==0){var _e=a.min(le,function(Te){return Te.y0}),we=(ue-ae)/(a.max(le,function(Te){return Te.y1})-_e);le.forEach(function(Te){var Oe=(Te.y1-Te.y0)*we;Te.y0=(Te.y0-_e)*we,Te.y1=Te.y0+Oe}),ge.forEach(function(Te){Te.y0=(Te.y0-_e)*we,Te.y1=(Te.y1-_e)*we,Te.width=Te.width*we})}}r.sankeyCircular=function(){var ie,ae,ue=0,le=0,ge=1,fe=1,me=24,_e=k,we=l,Te=b,Oe=T,de=32,ye=2,Me=null;function ke(){var Re={nodes:Te.apply(null,arguments),links:Oe.apply(null,arguments)};Ee(Re),A(Re,_e,Me),ze(Re),Fe(Re),S(Re,_e),Ve(Re,de,_e),Ke(Re);for(var qe=4,We=0;We0?Be+25+10:Be,bottom:Ge=Ge>0?Ge+25+10:Ge,left:dt=dt>0?dt+25+10:dt,right:Tt=Tt>0?Tt+25+10:Tt}}(Re),Wt=function(Jt,Be){var Ge=a.max(Jt.nodes,function(Ae){return Ae.column}),Tt=ge-ue,dt=fe-le,Pe=Tt/(Tt+Be.right+Be.left),Ie=dt/(dt+Be.top+Be.bottom);return ue=ue*Pe+Be.left,ge=Be.right==0?ge:ge*Pe,le=le*Ie+Be.top,fe*=Ie,Jt.nodes.forEach(function(Ae){Ae.x0=ue+Ae.column*((ge-ue-me)/Ge),Ae.x1=Ae.x0+me}),Ie}(Re,Ot);et*=Wt,Re.links.forEach(function(Jt){Jt.width=Jt.value*et}),Ye.forEach(function(Jt){var Be=Jt.length;Jt.forEach(function(Ge,Tt){Ge.depth==Ye.length-1&&Be==1||Ge.depth==0&&Be==1?(Ge.y0=fe/2-Ge.value*et,Ge.y1=Ge.y0+Ge.value*et):Ge.partOfCycle?D(Ge,At)==0?(Ge.y0=fe/2+Tt,Ge.y1=Ge.y0+Ge.value*et):Ge.circularLinkType=="top"?(Ge.y0=le+Tt,Ge.y1=Ge.y0+Ge.value*et):(Ge.y0=fe-Ge.value*et-Tt,Ge.y1=Ge.y0+Ge.value*et):Ot.top==0||Ot.bottom==0?(Ge.y0=(fe-le)/Be*Tt,Ge.y1=Ge.y0+Ge.value*et):(Ge.y0=(fe-le)/2-Be/2+Tt,Ge.y1=Ge.y0+Ge.value*et)})})})(We),Pt();for(var nt=1,ft=qe;ft>0;--ft)vt(nt*=.99,We),Pt();function vt(At,at){var et=Ye.length;Ye.forEach(function(Ot){var Wt=Ot.length,Jt=Ot[0].depth;Ot.forEach(function(Be){var Ge;if((Be.sourceLinks.length||Be.targetLinks.length)&&!(Be.partOfCycle&&D(Be,at)>0))if(Jt==0&&Wt==1)Ge=Be.y1-Be.y0,Be.y0=fe/2-Ge/2,Be.y1=fe/2+Ge/2;else if(Jt==et-1&&Wt==1)Ge=Be.y1-Be.y0,Be.y0=fe/2-Ge/2,Be.y1=fe/2+Ge/2;else{var Tt=a.mean(Be.sourceLinks,w),dt=a.mean(Be.targetLinks,x),Pe=((Tt&&dt?(Tt+dt)/2:Tt||dt)-y(Be))*At;Be.y0+=Pe,Be.y1+=Pe}})})}function Pt(){Ye.forEach(function(At){var at,et,Ot,Wt=le,Jt=At.length;for(At.sort(p),Ot=0;Ot0&&(at.y0+=et,at.y1+=et),Wt=at.y1+ie;if((et=Wt-ie-fe)>0)for(Wt=at.y0-=et,at.y1-=et,Ot=Jt-2;Ot>=0;--Ot)(et=(at=At[Ot]).y1+ie-Wt)>0&&(at.y0-=et,at.y1-=et),Wt=at.y0})}}function Ke(Re){Re.nodes.forEach(function(qe){qe.sourceLinks.sort(g),qe.targetLinks.sort(m)}),Re.nodes.forEach(function(qe){var We=qe.y0,Ye=We,nt=qe.y1,ft=nt;qe.sourceLinks.forEach(function(vt){vt.circular?(vt.y0=nt-vt.width/2,nt-=vt.width):(vt.y0=We+vt.width/2,We+=vt.width)}),qe.targetLinks.forEach(function(vt){vt.circular?(vt.y1=ft-vt.width/2,ft-=vt.width):(vt.y1=Ye+vt.width/2,Ye+=vt.width)})})}return ke.nodeId=function(Re){return arguments.length?(_e=typeof Re=="function"?Re:d(Re),ke):_e},ke.nodeAlign=function(Re){return arguments.length?(we=typeof Re=="function"?Re:d(Re),ke):we},ke.nodeWidth=function(Re){return arguments.length?(me=+Re,ke):me},ke.nodePadding=function(Re){return arguments.length?(ie=+Re,ke):ie},ke.nodes=function(Re){return arguments.length?(Te=typeof Re=="function"?Re:d(Re),ke):Te},ke.links=function(Re){return arguments.length?(Oe=typeof Re=="function"?Re:d(Re),ke):Oe},ke.size=function(Re){return arguments.length?(ue=le=0,ge=+Re[0],fe=+Re[1],ke):[ge-ue,fe-le]},ke.extent=function(Re){return arguments.length?(ue=+Re[0][0],ge=+Re[1][0],le=+Re[0][1],fe=+Re[1][1],ke):[[ue,le],[ge,fe]]},ke.iterations=function(Re){return arguments.length?(de=+Re,ke):de},ke.circularLinkGap=function(Re){return arguments.length?(ye=+Re,ke):ye},ke.nodePaddingRatio=function(Re){return arguments.length?(ae=+Re,ke):ae},ke.sortNodes=function(Re){return arguments.length?(Me=Re,ke):Me},ke.update=function(Re){return S(Re,_e),Ke(Re),Re.links.forEach(function(qe){qe.circular&&(qe.circularLinkType=qe.y0+qe.y1ee&&(O=ee);var ie=a.min(re,function(ae){return(E-A-(ae.length-1)*O)/a.sum(ae,g)});re.forEach(function(ae){ae.forEach(function(ue,le){ue.y1=(ue.y0=le)+ue.value*ie})}),Z.links.forEach(function(ae){ae.width=ae.value*ie})})(),H();for(var U=1,q=N;q>0;--q)ne(U*=.99),H(),$(U),H();function $(Q){re.forEach(function(ee){ee.forEach(function(ie){if(ie.targetLinks.length){var ae=(a.sum(ie.targetLinks,v)/a.sum(ie.targetLinks,g)-p(ie))*Q;ie.y0+=ae,ie.y1+=ae}})})}function ne(Q){re.slice().reverse().forEach(function(ee){ee.forEach(function(ie){if(ie.sourceLinks.length){var ae=(a.sum(ie.sourceLinks,y)/a.sum(ie.sourceLinks,g)-p(ie))*Q;ie.y0+=ae,ie.y1+=ae}})})}function H(){re.forEach(function(Q){var ee,ie,ae,ue=A,le=Q.length;for(Q.sort(m),ae=0;ae0&&(ee.y0+=ie,ee.y1+=ie),ue=ee.y1+O;if((ie=ue-O-E)>0)for(ue=ee.y0-=ie,ee.y1-=ie,ae=le-2;ae>=0;--ae)(ie=(ee=Q[ae]).y1+O-ue)>0&&(ee.y0-=ie,ee.y1-=ie),ue=ee.y0})}}function Y(Z){Z.nodes.forEach(function(re){re.sourceLinks.sort(h),re.targetLinks.sort(d)}),Z.nodes.forEach(function(re){var U=re.y0,q=U;re.sourceLinks.forEach(function($){$.y0=U+$.width/2,U+=$.width}),re.targetLinks.forEach(function($){$.y1=q+$.width/2,q+=$.width})})}return B.update=function(Z){return Y(Z),Z},B.nodeId=function(Z){return arguments.length?(R=typeof Z=="function"?Z:l(Z),B):R},B.nodeAlign=function(Z){return arguments.length?(z=typeof Z=="function"?Z:l(Z),B):z},B.nodeWidth=function(Z){return arguments.length?(D=+Z,B):D},B.nodePadding=function(Z){return arguments.length?(O=+Z,B):O},B.nodes=function(Z){return arguments.length?(L=typeof Z=="function"?Z:l(Z),B):L},B.links=function(Z){return arguments.length?(P=typeof Z=="function"?Z:l(Z),B):P},B.size=function(Z){return arguments.length?(M=A=0,S=+Z[0],E=+Z[1],B):[S-M,E-A]},B.extent=function(Z){return arguments.length?(M=+Z[0][0],S=+Z[1][0],A=+Z[0][1],E=+Z[1][1],B):[[M,A],[S,E]]},B.iterations=function(Z){return arguments.length?(N=+Z,B):N},B},r.sankeyCenter=function(M){return M.targetLinks.length?M.depth:M.sourceLinks.length?a.min(M.sourceLinks,i)-1:0},r.sankeyLeft=function(M){return M.depth},r.sankeyRight=function(M,A){return A-1-M.height},r.sankeyJustify=s,r.sankeyLinkHorizontal=function(){return c.linkHorizontal().source(T).target(_)},Object.defineProperty(r,"__esModule",{value:!0})})},{"d3-array":107,"d3-collection":108,"d3-shape":119}],58:[function(e,o,f){(function(){var r={version:"3.8.0"},a=[].slice,u=function(ce){return a.call(ce)},c=self.document;function i(ce){return ce&&(ce.ownerDocument||ce.document||ce).documentElement}function s(ce){return ce&&(ce.ownerDocument&&ce.ownerDocument.defaultView||ce.document&&ce||ce.defaultView)}if(c)try{u(c.documentElement.childNodes)[0].nodeType}catch{u=function(I){for(var j=I.length,V=new Array(j);j--;)V[j]=I[j];return V}}if(Date.now||(Date.now=function(){return+new Date}),c)try{c.createElement("DIV").style.setProperty("opacity",0,"")}catch{var l=this.Element.prototype,d=l.setAttribute,h=l.setAttributeNS,m=this.CSSStyleDeclaration.prototype,g=m.setProperty;l.setAttribute=function(I,j){d.call(this,I,j+"")},l.setAttributeNS=function(I,j,V){h.call(this,I,j,V+"")},m.setProperty=function(I,j,V){g.call(this,I,j+"",V)}}function p(ce,I){return ceI?1:ce>=I?0:NaN}function v(ce){return ce===null?NaN:+ce}function y(ce){return!isNaN(ce)}function x(ce){return{left:function(I,j,V,X){for(arguments.length<3&&(V=0),arguments.length<4&&(X=I.length);V>>1;ce(I[se],j)<0?V=se+1:X=se}return V},right:function(I,j,V,X){for(arguments.length<3&&(V=0),arguments.length<4&&(X=I.length);V>>1;ce(I[se],j)>0?X=se:V=se+1}return V}}}r.ascending=p,r.descending=function(ce,I){return Ice?1:I>=ce?0:NaN},r.min=function(ce,I){var j,V,X=-1,se=ce.length;if(arguments.length===1){for(;++X=V){j=V;break}for(;++XV&&(j=V)}else{for(;++X=V){j=V;break}for(;++XV&&(j=V)}return j},r.max=function(ce,I){var j,V,X=-1,se=ce.length;if(arguments.length===1){for(;++X=V){j=V;break}for(;++Xj&&(j=V)}else{for(;++X=V){j=V;break}for(;++Xj&&(j=V)}return j},r.extent=function(ce,I){var j,V,X,se=-1,he=ce.length;if(arguments.length===1){for(;++se=V){j=X=V;break}for(;++seV&&(j=V),X=V){j=X=V;break}for(;++seV&&(j=V),X1)return he/(be-1)},r.deviation=function(){var ce=r.variance.apply(this,arguments);return ce&&Math.sqrt(ce)};var w=x(p);function k(ce){return ce.length}r.bisectLeft=w.left,r.bisect=r.bisectRight=w.right,r.bisector=function(ce){return x(ce.length===1?function(I,j){return p(ce(I),j)}:ce)},r.shuffle=function(ce,I,j){(se=arguments.length)<3&&(j=ce.length,se<2&&(I=0));for(var V,X,se=j-I;se;)X=Math.random()*se--|0,V=ce[se+I],ce[se+I]=ce[X+I],ce[X+I]=V;return ce},r.permute=function(ce,I){for(var j=I.length,V=new Array(j);j--;)V[j]=ce[I[j]];return V},r.pairs=function(ce){for(var I=0,j=ce.length-1,V=ce[0],X=new Array(j<0?0:j);I=0;)for(I=(V=ce[X]).length;--I>=0;)j[--he]=V[I];return j};var b=Math.abs;function T(ce){for(var I=1;ce*I%1;)I*=10;return I}function _(ce,I){for(var j in I)Object.defineProperty(ce.prototype,j,{value:I[j],enumerable:!1})}function M(){this._=Object.create(null)}r.range=function(ce,I,j){if(arguments.length<3&&(j=1,arguments.length<2&&(I=ce,ce=0)),(I-ce)/j==1/0)throw new Error("infinite range");var V,X=[],se=T(b(j)),he=-1;if(ce*=se,I*=se,(j*=se)<0)for(;(V=ce+j*++he)>I;)X.push(V/se);else for(;(V=ce+j*++he)=V.length)return I?I.call(j,ve):ce?ve.sort(ce):ve;for(var Se,Ue,Xe,it,xt=-1,Lt=ve.length,_t=V[be++],Mt=new M;++xt=V.length)return be;var Ue=[],Xe=X[Se++];return be.forEach(function(it,xt){Ue.push({key:it,values:ve(xt,Se)})}),Xe?Ue.sort(function(it,xt){return Xe(it.key,xt.key)}):Ue}(se(r.map,he,0),0)},j.key=function(he){return V.push(he),j},j.sortKeys=function(he){return X[V.length-1]=he,j},j.sortValues=function(he){return ce=he,j},j.rollup=function(he){return I=he,j},j},r.set=function(ce){var I=new L;if(ce)for(var j=0,V=ce.length;j=0&&(V=ce.slice(j+1),ce=ce.slice(0,j)),ce)return arguments.length<2?this[ce].on(V):this[ce].on(V,I);if(arguments.length===2){if(I==null)for(ce in this)this.hasOwnProperty(ce)&&this[ce].on(V,null);return this}},r.event=null,r.requote=function(ce){return ce.replace(U,"\\$&")};var U=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,q=function(ce,I){for(var j in I)ce[j]=I[j]};function $(ce){return q(ce,ee),ce}var ne=function(ce,I){return I.querySelector(ce)},H=function(ce,I){return I.querySelectorAll(ce)},Q=function(ce,I){var j=ce.matches||ce[B(ce,"matchesSelector")];return(Q=function(V,X){return j.call(V,X)})(ce,I)};typeof Sizzle=="function"&&(ne=function(ce,I){return Sizzle(ce,I)[0]||null},H=Sizzle,Q=Sizzle.matchesSelector),r.selection=function(){return r.select(c.documentElement)};var ee=r.selection.prototype=[];function ie(ce){return typeof ce=="function"?ce:function(){return ne(ce,this)}}function ae(ce){return typeof ce=="function"?ce:function(){return H(ce,this)}}ee.select=function(ce){var I,j,V,X,se=[];ce=ie(ce);for(var he=-1,ve=this.length;++he=0&&(j=ce.slice(0,I))!=="xmlns"&&(ce=ce.slice(I+1)),le.hasOwnProperty(j)?{space:le[j],local:ce}:ce}},ee.attr=function(ce,I){if(arguments.length<2){if(typeof ce=="string"){var j=this.node();return(ce=r.ns.qualify(ce)).local?j.getAttributeNS(ce.space,ce.local):j.getAttribute(ce)}for(I in ce)this.each(ge(I,ce[I]));return this}return this.each(ge(ce,I))},ee.classed=function(ce,I){if(arguments.length<2){if(typeof ce=="string"){var j=this.node(),V=(ce=_e(ce)).length,X=-1;if(I=j.classList){for(;++X=0;)(j=V[X])&&(se&&se!==j.nextSibling&&se.parentNode.insertBefore(j,se),se=j);return this},ee.sort=function(ce){ce=ze.apply(this,arguments);for(var I=-1,j=this.length;++I=I&&(I=X+1);!(he=ve[I])&&++I0&&(ce=ce.slice(0,X));var he=We.get(ce);function ve(){var be=this[V];be&&(this.removeEventListener(ce,be,be.$),delete this[V])}return he&&(ce=he,se=nt),X?I?function(){var be=se(I,u(arguments));ve.call(this),this.addEventListener(ce,this[V]=be,be.$=j),be._=I}:ve:I?W:function(){var be,Se=new RegExp("^__on([^.]+)"+r.requote(ce)+"$");for(var Ue in this)if(be=Ue.match(Se)){var Xe=this[Ue];this.removeEventListener(be[1],Xe,Xe.$),delete this[Ue]}}}r.selection.enter=Ve,r.selection.enter.prototype=Ke,Ke.append=ee.append,Ke.empty=ee.empty,Ke.node=ee.node,Ke.call=ee.call,Ke.size=ee.size,Ke.select=function(ce){for(var I,j,V,X,se,he=[],ve=-1,be=this.length;++ve1?Ge:ce<-1?-Ge:Math.asin(ce)}function Ie(ce){return((ce=Math.exp(ce))+1/ce)/2}var Ae=Math.SQRT2;r.interpolateZoom=function(ce,I){var j,V,X=ce[0],se=ce[1],he=ce[2],ve=I[0],be=I[1],Se=I[2],Ue=ve-X,Xe=be-se,it=Ue*Ue+Xe*Xe;if(it<1e-12)V=Math.log(Se/he)/Ae,j=function(Nt){return[X+Nt*Ue,se+Nt*Xe,he*Math.exp(Ae*Nt*V)]};else{var xt=Math.sqrt(it),Lt=(Se*Se-he*he+4*it)/(2*he*2*xt),_t=(Se*Se-he*he-4*it)/(2*Se*2*xt),Mt=Math.log(Math.sqrt(Lt*Lt+1)-Lt),yt=Math.log(Math.sqrt(_t*_t+1)-_t);V=(yt-Mt)/Ae,j=function(Nt){var Rt,qt=Nt*V,rn=Ie(Mt),dn=he/(2*xt)*(rn*(Rt=Ae*qt+Mt,((Rt=Math.exp(2*Rt))-1)/(Rt+1))-function(Sn){return((Sn=Math.exp(Sn))-1/Sn)/2}(Mt));return[X+dn*Ue,se+dn*Xe,he*rn/Ie(Ae*qt+Mt)]}}return j.duration=1e3*V,j},r.behavior.zoom=function(){var ce,I,j,V,X,se,he,ve,be,Se={x:0,y:0,k:1},Ue=[960,500],Xe=rt,it=250,xt=0,Lt="mousedown.zoom",_t="mousemove.zoom",Mt="mouseup.zoom",yt="touchstart.zoom",Nt=re(Rt,"zoomstart","zoom","zoomend");function Rt(Gn){Gn.on(Lt,cr).on(He+".zoom",ii).on("dblclick.zoom",Ti).on(yt,Yr)}function qt(Gn){return[(Gn[0]-Se.x)/Se.k,(Gn[1]-Se.y)/Se.k]}function rn(Gn){Se.k=Math.max(Xe[0],Math.min(Xe[1],Gn))}function dn(Gn,Mr){Mr=function(ai){return[ai[0]*Se.k+Se.x,ai[1]*Se.k+Se.y]}(Mr),Se.x+=Gn[0]-Mr[0],Se.y+=Gn[1]-Mr[1]}function Sn(Gn,Mr,ai,Qr){Gn.__chart__={x:Se.x,y:Se.y,k:Se.k},rn(Math.pow(2,Qr)),dn(I=Mr,ai),Gn=r.select(Gn),it>0&&(Gn=Gn.transition().duration(it)),Gn.call(Rt.event)}function An(){he&&he.domain(se.range().map(function(Gn){return(Gn-Se.x)/Se.k}).map(se.invert)),be&&be.domain(ve.range().map(function(Gn){return(Gn-Se.y)/Se.k}).map(ve.invert))}function tr(Gn){xt++||Gn({type:"zoomstart"})}function er(Gn){An(),Gn({type:"zoom",scale:Se.k,translate:[Se.x,Se.y]})}function gr(Gn){--xt||(Gn({type:"zoomend"}),I=null)}function cr(){var Gn=this,Mr=Nt.of(Gn,arguments),ai=0,Qr=r.select(s(Gn)).on(_t,Yi).on(Mt,ci),gi=qt(r.mouse(Gn)),Mi=Pt(Gn);function Yi(){ai=1,dn(r.mouse(Gn),gi),er(Mr)}function ci(){Qr.on(_t,null).on(Mt,null),Mi(ai),gr(Mr)}Oc.call(Gn),tr(Mr)}function Yr(){var Gn,Mr=this,ai=Nt.of(Mr,arguments),Qr={},gi=0,Mi=".zoom-"+r.event.changedTouches[0].identifier,Yi="touchmove"+Mi,ci="touchend"+Mi,zi=[],Li=r.select(Mr),Qi=Pt(Mr);function Ri(){var xo=r.touches(Mr);return Gn=Se.k,xo.forEach(function(bo){bo.identifier in Qr&&(Qr[bo.identifier]=qt(bo))}),xo}function ea(){var xo=r.event.target;r.select(xo).on(Yi,fa).on(ci,Ha),zi.push(xo);for(var bo=r.event.changedTouches,qa=0,co=bo.length;qa1){Uo=eo[0];var Js=eo[1],sc=Uo[0]-Js[0],Af=Uo[1]-Js[1];gi=sc*sc+Af*Af}}function fa(){var xo,bo,qa,co,eo=r.touches(Mr);Oc.call(Mr);for(var As=0,Uo=eo.length;As360?ve-=360:ve<0&&(ve+=360),ve<60?V+(X-V)*ve/60:ve<180?X:ve<240?V+(X-V)*(240-ve)/60:V}(he))}return ce=isNaN(ce)?0:(ce%=360)<0?ce+360:ce,I=isNaN(I)||I<0?0:I>1?1:I,V=2*(j=j<0?0:j>1?1:j)-(X=j<=.5?j*(1+I):j+I-j*I),new It(se(ce+120),se(ce),se(ce-120))}function Vt(ce,I,j){return this instanceof Vt?(this.h=+ce,this.c=+I,void(this.l=+j)):arguments.length<2?ce instanceof Vt?new Vt(ce.h,ce.c,ce.l):Le(ce instanceof bt?ce.l:(ce=tn((ce=r.rgb(ce)).r,ce.g,ce.b)).l,ce.a,ce.b):new Vt(ce,I,j)}kt.brighter=function(ce){return ce=Math.pow(.7,arguments.length?ce:1),new ot(this.h,this.s,this.l/ce)},kt.darker=function(ce){return ce=Math.pow(.7,arguments.length?ce:1),new ot(this.h,this.s,ce*this.l)},kt.rgb=function(){return wt(this.h,this.s,this.l)},r.hcl=Vt;var Ut=Vt.prototype=new lt;function tt(ce,I,j){return isNaN(ce)&&(ce=0),isNaN(I)&&(I=0),new bt(j,Math.cos(ce*=Tt)*I,Math.sin(ce)*I)}function bt(ce,I,j){return this instanceof bt?(this.l=+ce,this.a=+I,void(this.b=+j)):arguments.length<2?ce instanceof bt?new bt(ce.l,ce.a,ce.b):ce instanceof Vt?tt(ce.h,ce.c,ce.l):tn((ce=It(ce)).r,ce.g,ce.b):new bt(ce,I,j)}Ut.brighter=function(ce){return new Vt(this.h,this.c,Math.min(100,this.l+zt*(arguments.length?ce:1)))},Ut.darker=function(ce){return new Vt(this.h,this.c,Math.max(0,this.l-zt*(arguments.length?ce:1)))},Ut.rgb=function(){return tt(this.h,this.c,this.l).rgb()},r.lab=bt;var zt=18,St=bt.prototype=new lt;function Dt(ce,I,j){var V=(ce+16)/116,X=V+I/500,se=V-j/200;return new It(Et(3.2404542*(X=.95047*Je(X))-1.5371385*(V=1*Je(V))-.4985314*(se=1.08883*Je(se))),Et(-.969266*X+1.8760108*V+.041556*se),Et(.0556434*X-.2040259*V+1.0572252*se))}function Le(ce,I,j){return ce>0?new Vt(Math.atan2(j,I)*dt,Math.sqrt(I*I+j*j),ce):new Vt(NaN,NaN,ce)}function Je(ce){return ce>.206893034?ce*ce*ce:(ce-4/29)/7.787037}function st(ce){return ce>.008856?Math.pow(ce,1/3):7.787037*ce+4/29}function Et(ce){return Math.round(255*(ce<=.00304?12.92*ce:1.055*Math.pow(ce,1/2.4)-.055))}function It(ce,I,j){return this instanceof It?(this.r=~~ce,this.g=~~I,void(this.b=~~j)):arguments.length<2?ce instanceof It?new It(ce.r,ce.g,ce.b):zn(""+ce,It,wt):new It(ce,I,j)}function Zt(ce){return new It(ce>>16,ce>>8&255,255&ce)}function Kt(ce){return Zt(ce)+""}St.brighter=function(ce){return new bt(Math.min(100,this.l+zt*(arguments.length?ce:1)),this.a,this.b)},St.darker=function(ce){return new bt(Math.max(0,this.l-zt*(arguments.length?ce:1)),this.a,this.b)},St.rgb=function(){return Dt(this.l,this.a,this.b)},r.rgb=It;var Ht=It.prototype=new lt;function mn(ce){return ce<16?"0"+Math.max(0,ce).toString(16):Math.min(255,ce).toString(16)}function zn(ce,I,j){var V,X,se,he=0,ve=0,be=0;if(V=/([a-z]+)\((.*)\)/.exec(ce=ce.toLowerCase()))switch(X=V[2].split(","),V[1]){case"hsl":return j(parseFloat(X[0]),parseFloat(X[1])/100,parseFloat(X[2])/100);case"rgb":return I(sn(X[0]),sn(X[1]),sn(X[2]))}return(se=gn.get(ce))?I(se.r,se.g,se.b):(ce==null||ce.charAt(0)!=="#"||isNaN(se=parseInt(ce.slice(1),16))||(ce.length===4?(he=(3840&se)>>4,he|=he>>4,ve=240&se,ve|=ve>>4,be=15&se,be|=be<<4):ce.length===7&&(he=(16711680&se)>>16,ve=(65280&se)>>8,be=255&se)),I(he,ve,be))}function pn(ce,I,j){var V,X,se=Math.min(ce/=255,I/=255,j/=255),he=Math.max(ce,I,j),ve=he-se,be=(he+se)/2;return ve?(X=be<.5?ve/(he+se):ve/(2-he-se),V=ce==he?(I-j)/ve+(I0&&be<1?0:V),new ot(V,X,be)}function tn(ce,I,j){var V=st((.4124564*(ce=nn(ce))+.3575761*(I=nn(I))+.1804375*(j=nn(j)))/.95047),X=st((.2126729*ce+.7151522*I+.072175*j)/1);return bt(116*X-16,500*(V-X),200*(X-st((.0193339*ce+.119192*I+.9503041*j)/1.08883)))}function nn(ce){return(ce/=255)<=.04045?ce/12.92:Math.pow((ce+.055)/1.055,2.4)}function sn(ce){var I=parseFloat(ce);return ce.charAt(ce.length-1)==="%"?Math.round(2.55*I):I}Ht.brighter=function(ce){ce=Math.pow(.7,arguments.length?ce:1);var I=this.r,j=this.g,V=this.b,X=30;return I||j||V?(I&&I=200&&Xe<300||Xe===304){try{Ue=j.call(X,ve)}catch(it){return void se.error.call(X,it)}se.load.call(X,Ue)}else se.error.call(X,ve)}return self.XDomainRequest&&!("withCredentials"in ve)&&/^(http(s)?:)?\/\//.test(ce)&&(ve=new XDomainRequest),"onload"in ve?ve.onload=ve.onerror=Se:ve.onreadystatechange=function(){ve.readyState>3&&Se()},ve.onprogress=function(Ue){var Xe=r.event;r.event=Ue;try{se.progress.call(X,ve)}finally{r.event=Xe}},X.header=function(Ue,Xe){return Ue=(Ue+"").toLowerCase(),arguments.length<2?he[Ue]:(Xe==null?delete he[Ue]:he[Ue]=Xe+"",X)},X.mimeType=function(Ue){return arguments.length?(I=Ue==null?null:Ue+"",X):I},X.responseType=function(Ue){return arguments.length?(be=Ue,X):be},X.response=function(Ue){return j=Ue,X},["get","post"].forEach(function(Ue){X[Ue]=function(){return X.send.apply(X,[Ue].concat(u(arguments)))}}),X.send=function(Ue,Xe,it){if(arguments.length===2&&typeof Xe=="function"&&(it=Xe,Xe=null),ve.open(Ue,ce,!0),I==null||"accept"in he||(he.accept=I+",*/*"),ve.setRequestHeader)for(var xt in he)ve.setRequestHeader(xt,he[xt]);return I!=null&&ve.overrideMimeType&&ve.overrideMimeType(I),be!=null&&(ve.responseType=be),it!=null&&X.on("error",it).on("load",function(Lt){it(null,Lt)}),se.beforesend.call(X,ve),ve.send(Xe??null),X},X.abort=function(){return ve.abort(),X},r.rebind(X,se,"on"),V==null?X:X.get(function(Ue){return Ue.length===1?function(Xe,it){Ue(Xe==null?it:null)}:Ue}(V))}gn.forEach(function(ce,I){gn.set(ce,Zt(I))}),r.functor=bn,r.xhr=In(P),r.dsv=function(ce,I){var j=new RegExp('["'+ce+` +]`),V=ce.charCodeAt(0);function X(Se,Ue,Xe){arguments.length<3&&(Xe=Ue,Ue=null);var it=Hn(Se,I,Ue==null?se:he(Ue),Xe);return it.row=function(xt){return arguments.length?it.response((Ue=xt)==null?se:he(xt)):Ue},it}function se(Se){return X.parse(Se.responseText)}function he(Se){return function(Ue){return X.parse(Ue.responseText,Se)}}function ve(Se){return Se.map(be).join(ce)}function be(Se){return j.test(Se)?'"'+Se.replace(/\"/g,'""')+'"':Se}return X.parse=function(Se,Ue){var Xe;return X.parseRows(Se,function(it,xt){if(Xe)return Xe(it,xt-1);var Lt=function(_t){for(var Mt={},yt=it.length,Nt=0;Nt=Mt)return Lt;if(it)return it=!1,xt;var rn=yt;if(Se.charCodeAt(rn)===34){for(var dn=rn;dn++24?(isFinite(I)&&(clearTimeout(vr),vr=setTimeout(Ln,I)),Or=0):(Or=1,Er(Ln))}function lr(){for(var ce=Date.now(),I=Wn;I;)ce>=I.t&&I.c(ce-I.t)&&(I.c=null),I=I.n;return ce}function Wr(){for(var ce,I=Wn,j=1/0;I;)I.c?(I.t1&&(I=ce[se[he-2]],j=ce[se[he-1]],V=ce[ve],(j[0]-I[0])*(V[1]-I[1])-(j[1]-I[1])*(V[0]-I[0])<=0);)--he;se[he++]=ve}return se.slice(0,he)}function Bn(ce,I){return ce[0]-I[0]||ce[1]-I[1]}r.timer=function(){Kn.apply(this,arguments)},r.timer.flush=function(){lr(),Wr()},r.round=function(ce,I){return I?Math.round(ce*(I=Math.pow(10,I)))/I:Math.round(ce)},r.geom={},r.geom.hull=function(ce){var I=Mn,j=rr;if(arguments.length)return V(ce);function V(X){if(X.length<3)return[];var se,he=bn(I),ve=bn(j),be=X.length,Se=[],Ue=[];for(se=0;se=0;--se)_t.push(X[Se[Xe[se]][2]]);for(se=+xt;seOt)ve=ve.L;else{if(!((X=se-Dn(ve,he))>Ot)){V>-Ot?(I=ve.P,j=ve):X>-Ot?(I=ve,j=ve.N):I=j=ve;break}if(!ve.R){I=ve;break}ve=ve.R}var be=Nn(ce);if(jn.insert(I,be),I||j){if(I===j)return xr(I),j=Nn(I.site),jn.insert(be,j),be.edge=j.edge=Dr(I.site,be.site),or(I),void or(j);if(j){xr(I),xr(j);var Se=I.site,Ue=Se.x,Xe=Se.y,it=ce.x-Ue,xt=ce.y-Xe,Lt=j.site,_t=Lt.x-Ue,Mt=Lt.y-Xe,yt=2*(it*Mt-xt*_t),Nt=it*it+xt*xt,Rt=_t*_t+Mt*Mt,qt={x:(Mt*Nt-xt*Rt)/yt+Ue,y:(it*Rt-_t*Nt)/yt+Xe};ri(j.edge,Se,Lt,qt),be.edge=Dr(Se,ce,null,qt),j.edge=Dr(ce,Lt,null,qt),or(I),or(j)}else be.edge=Dr(I.site,be.site)}}function Tn(ce,I){var j=ce.site,V=j.x,X=j.y,se=X-I;if(!se)return V;var he=ce.P;if(!he)return-1/0;var ve=(j=he.site).x,be=j.y,Se=be-I;if(!Se)return ve;var Ue=ve-V,Xe=1/se-1/Se,it=Ue/Se;return Xe?(-it+Math.sqrt(it*it-2*Xe*(Ue*Ue/(-2*Se)-be+Se/2+X-se/2)))/Xe+V:(V+ve)/2}function Dn(ce,I){var j=ce.N;if(j)return Tn(j,I);var V=ce.site;return V.y===I?V.x:1/0}function Zn(ce){this.site=ce,this.edges=[]}function Yn(ce,I){return I.angle-ce.angle}function ir(){Sr(this),this.x=this.y=this.arc=this.site=this.cy=null}function or(ce){var I=ce.P,j=ce.N;if(I&&j){var V=I.site,X=ce.site,se=j.site;if(V!==se){var he=X.x,ve=X.y,be=V.x-he,Se=V.y-ve,Ue=se.x-he,Xe=2*(be*(Mt=se.y-ve)-Se*Ue);if(!(Xe>=-1e-12)){var it=be*be+Se*Se,xt=Ue*Ue+Mt*Mt,Lt=(Mt*it-Se*xt)/Xe,_t=(be*xt-Ue*it)/Xe,Mt=_t+ve,yt=$n.pop()||new ir;yt.arc=ce,yt.site=X,yt.x=Lt+he,yt.y=Mt+Math.sqrt(Lt*Lt+_t*_t),yt.cy=Mt,ce.circle=yt;for(var Nt=null,Rt=fn._;Rt;)if(yt.y=ve)return;if(it>Lt){if(se){if(se.y>=Se)return}else se={x:Mt,y:be};j={x:Mt,y:Se}}else{if(se){if(se.y1)if(it>Lt){if(se){if(se.y>=Se)return}else se={x:(be-X)/V,y:be};j={x:(Se-X)/V,y:Se}}else{if(se){if(se.y=ve)return}else se={x:he,y:V*he+X};j={x:ve,y:V*ve+X}}else{if(se){if(se.x0)){if(yt/=An,An<0){if(yt0){if(yt>Sn)return;yt>dn&&(dn=yt)}if(yt=Xe-qt,An||!(yt<0)){if(yt/=An,An<0){if(yt>Sn)return;yt>dn&&(dn=yt)}else if(An>0){if(yt0)){if(yt/=tr,tr<0){if(yt0){if(yt>Sn)return;yt>dn&&(dn=yt)}if(yt=it-rn,tr||!(yt<0)){if(yt/=tr,tr<0){if(yt>Sn)return;yt>dn&&(dn=yt)}else if(tr>0){if(yt0&&(Mt.a={x:qt+dn*An,y:rn+dn*tr}),Sn<1&&(Mt.b={x:qt+Sn*An,y:rn+Sn*tr}),Mt}}}}}),_t=xt.length;_t--;)(!wr(be=xt[_t],ve)||!Lt(be)||b(be.a.x-be.b.x)Ot||b(Xe-Se)>Ot)&&(Lt.splice(xt,0,new ji(Nr(it.site,yt,b(Ue-Nt)Ot?{x:Nt,y:b(be-Nt)Ot?{x:b(Se-rn)Ot?{x:Rt,y:b(be-Rt)Ot?{x:b(Se-qt)=Ue&&yt.x<=it&&yt.y>=Xe&&yt.y<=xt?[[Ue,xt],[it,xt],[it,Xe],[Ue,Xe]]:[]).point=be[_t]}),Se}function ve(be){return be.map(function(Se,Ue){return{x:Math.round(V(Se,Ue)/Ot)*Ot,y:Math.round(X(Se,Ue)/Ot)*Ot,i:Ue}})}return he.links=function(be){return Ja(ve(be)).edges.filter(function(Se){return Se.l&&Se.r}).map(function(Se){return{source:be[Se.l.i],target:be[Se.r.i]}})},he.triangles=function(be){var Se=[];return Ja(ve(be)).cells.forEach(function(Ue,Xe){for(var it,xt,Lt,_t,Mt=Ue.site,yt=Ue.edges.sort(Yn),Nt=-1,Rt=yt.length,qt=yt[Rt-1].edge,rn=qt.l===Mt?qt.r:qt.l;++Ntse||it>he||xt=dn)<<1|I>=rn,An=Sn+4;Snse&&(X=I.slice(se,X),ve[he]?ve[he]+=X:ve[++he]=X),(j=j[0])===(V=V[0])?ve[he]?ve[he]+=V:ve[++he]=V:(ve[++he]=null,be.push({i:he,x:so(j,V)})),se=Ls.lastIndex;return seyt&&(yt=Ue.x),Ue.y>Nt&&(Nt=Ue.y),Xe.push(Ue.x),it.push(Ue.y);else for(xt=0;xtyt&&(yt=rn),dn>Nt&&(Nt=dn),Xe.push(rn),it.push(dn)}var Sn=yt-_t,An=Nt-Mt;function tr(cr,Yr,ii,Ti,Gn,Mr,ai,Qr){if(!isNaN(ii)&&!isNaN(Ti))if(cr.leaf){var gi=cr.x,Mi=cr.y;if(gi!=null)if(b(gi-ii)+b(Mi-Ti)<.01)er(cr,Yr,ii,Ti,Gn,Mr,ai,Qr);else{var Yi=cr.point;cr.x=cr.y=cr.point=null,er(cr,Yi,gi,Mi,Gn,Mr,ai,Qr),er(cr,Yr,ii,Ti,Gn,Mr,ai,Qr)}else cr.x=ii,cr.y=Ti,cr.point=Yr}else er(cr,Yr,ii,Ti,Gn,Mr,ai,Qr)}function er(cr,Yr,ii,Ti,Gn,Mr,ai,Qr){var gi=.5*(Gn+ai),Mi=.5*(Mr+Qr),Yi=ii>=gi,ci=Ti>=Mi,zi=ci<<1|Yi;cr.leaf=!1,Yi?Gn=gi:ai=gi,ci?Mr=Mi:Qr=Mi,tr(cr=cr.nodes[zi]||(cr.nodes[zi]={leaf:!0,nodes:[],point:null,x:null,y:null}),Yr,ii,Ti,Gn,Mr,ai,Qr)}Sn>An?Nt=Mt+Sn:yt=_t+An;var gr={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(cr){tr(gr,cr,+Rt(cr,++xt),+qt(cr,xt),_t,Mt,yt,Nt)},visit:function(cr){Zo(cr,gr,_t,Mt,yt,Nt)},find:function(cr){return oa(gr,cr[0],cr[1],_t,Mt,yt,Nt)}};if(xt=-1,I==null){for(;++xt=0&&!(j=r.interpolators[V](ce,I)););return j}function Ka(ce,I){var j,V=[],X=[],se=ce.length,he=I.length,ve=Math.min(ce.length,I.length);for(j=0;j=1?1:ce(I)}}function ju(ce){return function(I){return 1-ce(1-I)}}function Wl(ce){return function(I){return .5*(I<.5?ce(2*I):2-ce(2-2*I))}}function Sc(ce){return ce*ce}function Ec(ce){return ce*ce*ce}function ac(ce){if(ce<=0)return 0;if(ce>=1)return 1;var I=ce*ce,j=I*ce;return 4*(ce<.5?j:3*(ce-I)+j-.75)}function Cc(ce){return 1-Math.cos(ce*Ge)}function Ns(ce){return Math.pow(2,10*(ce-1))}function Bs(ce){return 1-Math.sqrt(1-ce*ce)}function fl(ce){return ce<1/2.75?7.5625*ce*ce:ce<2/2.75?7.5625*(ce-=1.5/2.75)*ce+.75:ce<2.5/2.75?7.5625*(ce-=2.25/2.75)*ce+.9375:7.5625*(ce-=2.625/2.75)*ce+.984375}function hl(ce,I){return I-=ce,function(j){return Math.round(ce+I*j)}}function dl(ce){var I,j,V,X=[ce.a,ce.b],se=[ce.c,ce.d],he=ws(X),ve=Yl(X,se),be=ws(((I=se)[0]+=(V=-ve)*(j=X)[0],I[1]+=V*j[1],I))||0;X[0]*se[1]=0?ce.slice(0,I):ce,V=I>=0?ce.slice(I+1):"in";return j=ic.get(j)||$o,ba((V=Mc.get(V)||P)(j.apply(null,a.call(arguments,1))))},r.interpolateHcl=function(ce,I){ce=r.hcl(ce),I=r.hcl(I);var j=ce.h,V=ce.c,X=ce.l,se=I.h-j,he=I.c-V,ve=I.l-X;return isNaN(he)&&(he=0,V=isNaN(V)?I.c:V),isNaN(se)?(se=0,j=isNaN(j)?I.h:j):se>180?se-=360:se<-180&&(se+=360),function(be){return tt(j+se*be,V+he*be,X+ve*be)+""}},r.interpolateHsl=function(ce,I){ce=r.hsl(ce),I=r.hsl(I);var j=ce.h,V=ce.s,X=ce.l,se=I.h-j,he=I.s-V,ve=I.l-X;return isNaN(he)&&(he=0,V=isNaN(V)?I.s:V),isNaN(se)?(se=0,j=isNaN(j)?I.h:j):se>180?se-=360:se<-180&&(se+=360),function(be){return wt(j+se*be,V+he*be,X+ve*be)+""}},r.interpolateLab=function(ce,I){ce=r.lab(ce),I=r.lab(I);var j=ce.l,V=ce.a,X=ce.b,se=I.l-j,he=I.a-V,ve=I.b-X;return function(be){return Dt(j+se*be,V+he*be,X+ve*be)+""}},r.interpolateRound=hl,r.transform=function(ce){var I=c.createElementNS(r.ns.prefix.svg,"g");return(r.transform=function(j){if(j!=null){I.setAttribute("transform",j);var V=I.transform.baseVal.consolidate()}return new dl(V?V.matrix:Uu)})(ce)},dl.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var Uu={a:1,b:0,c:0,d:1,e:0,f:0};function ds(ce){return ce.length?ce.pop()+",":""}function pl(ce,I){var j=[],V=[];return ce=r.transform(ce),I=r.transform(I),function(X,se,he,ve){if(X[0]!==se[0]||X[1]!==se[1]){var be=he.push("translate(",null,",",null,")");ve.push({i:be-4,x:so(X[0],se[0])},{i:be-2,x:so(X[1],se[1])})}else(se[0]||se[1])&&he.push("translate("+se+")")}(ce.translate,I.translate,j,V),function(X,se,he,ve){X!==se?(X-se>180?se+=360:se-X>180&&(X+=360),ve.push({i:he.push(ds(he)+"rotate(",null,")")-2,x:so(X,se)})):se&&he.push(ds(he)+"rotate("+se+")")}(ce.rotate,I.rotate,j,V),function(X,se,he,ve){X!==se?ve.push({i:he.push(ds(he)+"skewX(",null,")")-2,x:so(X,se)}):se&&he.push(ds(he)+"skewX("+se+")")}(ce.skew,I.skew,j,V),function(X,se,he,ve){if(X[0]!==se[0]||X[1]!==se[1]){var be=he.push(ds(he)+"scale(",null,",",null,")");ve.push({i:be-4,x:so(X[0],se[0])},{i:be-2,x:so(X[1],se[1])})}else se[0]===1&&se[1]===1||he.push(ds(he)+"scale("+se+")")}(ce.scale,I.scale,j,V),ce=I=null,function(X){for(var se,he=-1,ve=V.length;++he0?j=qt:(ce.c=null,ce.t=NaN,ce=null,ve.end({type:"end",alpha:j=0})):qt>0&&(ve.start({type:"start",alpha:j=qt}),ce=Kn(he.tick)),he):j},he.start=function(){var qt,rn,dn,Sn=Mt.length,An=yt.length,tr=be[0],er=be[1];for(qt=0;qt=0;)j.push(X[V])}function an(ce,I){for(var j=[ce],V=[];(ce=j.pop())!=null;)if(V.push(ce),(se=ce.children)&&(X=se.length))for(var X,se,he=-1;++he=0;)he.push(Ue=Se[be]),Ue.parent=se,Ue.depth=se.depth+1;j&&(se.value=0),se.children=Se}else j&&(se.value=+j.call(V,se,se.depth)||0),delete se.children;return an(X,function(Xe){var it,xt;ce&&(it=Xe.children)&&it.sort(ce),j&&(xt=Xe.parent)&&(xt.value+=Xe.value)}),ve}return V.sort=function(X){return arguments.length?(ce=X,V):ce},V.children=function(X){return arguments.length?(I=X,V):I},V.value=function(X){return arguments.length?(j=X,V):j},V.revalue=function(X){return j&&(Yt(X,function(se){se.children&&(se.value=0)}),an(X,function(se){var he;se.children||(se.value=+j.call(V,se,se.depth)||0),(he=se.parent)&&(he.value+=se.value)})),X},V},r.layout.partition=function(){var ce=r.layout.hierarchy(),I=[1,1];function j(V,X){var se=ce.call(this,V,X);return function he(ve,be,Se,Ue){var Xe=ve.children;if(ve.x=be,ve.y=ve.depth*Ue,ve.dx=Se,ve.dy=Ue,Xe&&(it=Xe.length)){var it,xt,Lt,_t=-1;for(Se=ve.value?Se/ve.value:0;++_tve&&(ve=V),he.push(V)}for(j=0;jX&&(V=j,X=I);return V}function sa(ce){return ce.reduce(ca,0)}function ca(ce,I){return ce+I[1]}function lo(ce,I){return io(ce,Math.ceil(Math.log(I.length)/Math.LN2+1))}function io(ce,I){for(var j=-1,V=+ce[0],X=(ce[1]-V)/I,se=[];++j<=I;)se[j]=X*j+V;return se}function za(ce){return[r.min(ce),r.max(ce)]}function Ra(ce,I){return ce.value-I.value}function ao(ce,I){var j=ce._pack_next;ce._pack_next=I,I._pack_prev=ce,I._pack_next=j,j._pack_prev=I}function Lo(ce,I){ce._pack_next=I,I._pack_prev=ce}function Ko(ce,I){var j=I.x-ce.x,V=I.y-ce.y,X=ce.r+I.r;return .999*X*X>j*j+V*V}function Qo(ce){if((I=ce.children)&&(be=I.length)){var I,j,V,X,se,he,ve,be,Se=1/0,Ue=-1/0,Xe=1/0,it=-1/0;if(I.forEach(es),(j=I[0]).x=-j.r,j.y=0,Rt(j),be>1&&((V=I[1]).x=V.r,V.y=0,Rt(V),be>2))for(na(j,V,X=I[2]),Rt(X),ao(j,X),j._pack_prev=X,ao(X,V),V=j._pack_next,se=3;se0)for(he=-1;++he=Xe[0]&&be<=Xe[1]&&((ve=Se[r.bisect(it,be,1,Lt)-1]).y+=_t,ve.push(se[he]));return Se}return X.value=function(se){return arguments.length?(I=se,X):I},X.range=function(se){return arguments.length?(j=bn(se),X):j},X.bins=function(se){return arguments.length?(V=typeof se=="number"?function(he){return io(he,se)}:bn(se),X):V},X.frequency=function(se){return arguments.length?(ce=!!se,X):ce},X},r.layout.pack=function(){var ce,I=r.layout.hierarchy().sort(Ra),j=0,V=[1,1];function X(se,he){var ve=I.call(this,se,he),be=ve[0],Se=V[0],Ue=V[1],Xe=ce==null?Math.sqrt:typeof ce=="function"?ce:function(){return ce};if(be.x=be.y=0,an(be,function(xt){xt.r=+Xe(xt.value)}),an(be,Qo),j){var it=j*(ce?1:Math.max(2*be.r/Se,2*be.r/Ue))/2;an(be,function(xt){xt.r+=it}),an(be,Qo),an(be,function(xt){xt.r-=it})}return function xt(Lt,_t,Mt,yt){var Nt=Lt.children;if(Lt.x=_t+=yt*Lt.x,Lt.y=Mt+=yt*Lt.y,Lt.r*=yt,Nt)for(var Rt=-1,qt=Nt.length;++RtLt.x&&(Lt=Rt),Rt.depth>_t.depth&&(_t=Rt)});var Mt=I(xt,Lt)/2-xt.x,yt=j[0]/(Lt.x+I(Lt,xt)/2+Mt),Nt=j[1]/(_t.depth||1);Yt(Xe,function(Rt){Rt.x=(Rt.x+Mt)*yt,Rt.y=Rt.depth*Nt})}return Ue}function se(be){var Se=be.children,Ue=be.parent.children,Xe=be.i?Ue[be.i-1]:null;if(Se.length){(function(xt){for(var Lt,_t=0,Mt=0,yt=xt.children,Nt=yt.length;--Nt>=0;)(Lt=yt[Nt]).z+=_t,Lt.m+=_t,_t+=Lt.s+(Mt+=Lt.c)})(be);var it=(Se[0].z+Se[Se.length-1].z)/2;Xe?(be.z=Xe.z+I(be._,Xe._),be.m=be.z-it):be.z=it}else Xe&&(be.z=Xe.z+I(be._,Xe._));be.parent.A=function(xt,Lt,_t){if(Lt){for(var Mt,yt=xt,Nt=xt,Rt=Lt,qt=yt.parent.children[0],rn=yt.m,dn=Nt.m,Sn=Rt.m,An=qt.m;Rt=ln(Rt),yt=Ft(yt),Rt&&yt;)qt=Ft(qt),(Nt=ln(Nt)).a=xt,(Mt=Rt.z+Sn-yt.z-rn+I(Rt._,yt._))>0&&($t(un(Rt,xt,_t),xt,Mt),rn+=Mt,dn+=Mt),Sn+=Rt.m,rn+=yt.m,An+=qt.m,dn+=Nt.m;Rt&&!ln(Nt)&&(Nt.t=Rt,Nt.m+=Sn-dn),yt&&!Ft(qt)&&(qt.t=yt,qt.m+=rn-An,_t=xt)}return _t}(be,Xe,be.parent.A||Ue[0])}function he(be){be._.x=be.z+be.parent.m,be.m+=be.parent.m}function ve(be){be.x*=j[0],be.y=be.depth*j[1]}return X.separation=function(be){return arguments.length?(I=be,X):I},X.size=function(be){return arguments.length?(V=(j=be)==null?ve:null,X):V?null:j},X.nodeSize=function(be){return arguments.length?(V=(j=be)==null?null:ve,X):V?j:null},en(X,ce)},r.layout.cluster=function(){var ce=r.layout.hierarchy().sort(null).value(null),I=ht,j=[1,1],V=!1;function X(se,he){var ve,be=ce.call(this,se,he),Se=be[0],Ue=0;an(Se,function(_t){var Mt=_t.children;Mt&&Mt.length?(_t.x=function(yt){return yt.reduce(function(Nt,Rt){return Nt+Rt.x},0)/yt.length}(Mt),_t.y=function(yt){return 1+r.max(yt,function(Nt){return Nt.y})}(Mt)):(_t.x=ve?Ue+=I(_t,ve):0,_t.y=0,ve=_t)});var Xe=function _t(Mt){var yt=Mt.children;return yt&&yt.length?_t(yt[0]):Mt}(Se),it=function _t(Mt){var yt,Nt=Mt.children;return Nt&&(yt=Nt.length)?_t(Nt[yt-1]):Mt}(Se),xt=Xe.x-I(Xe,it)/2,Lt=it.x+I(it,Xe)/2;return an(Se,V?function(_t){_t.x=(_t.x-Se.x)*j[0],_t.y=(Se.y-_t.y)*j[1]}:function(_t){_t.x=(_t.x-xt)/(Lt-xt)*j[0],_t.y=(1-(Se.y?_t.y/Se.y:1))*j[1]}),be}return X.separation=function(se){return arguments.length?(I=se,X):I},X.size=function(se){return arguments.length?(V=(j=se)==null,X):V?null:j},X.nodeSize=function(se){return arguments.length?(V=(j=se)!=null,X):V?j:null},en(X,ce)},r.layout.treemap=function(){var ce,I=r.layout.hierarchy(),j=Math.round,V=[1,1],X=null,se=On,he=!1,ve="squarify",be=.5*(1+Math.sqrt(5));function Se(_t,Mt){for(var yt,Nt,Rt=-1,qt=_t.length;++Rt0;)rn.push(yt=dn[Rt-1]),rn.area+=yt.area,ve!=="squarify"||(Nt=it(rn,An))<=Sn?(dn.pop(),Sn=Nt):(rn.area-=rn.pop().area,xt(rn,An,qt,!1),An=Math.min(qt.dx,qt.dy),rn.length=rn.area=0,Sn=1/0);rn.length&&(xt(rn,An,qt,!0),rn.length=rn.area=0),Mt.forEach(Ue)}}function Xe(_t){var Mt=_t.children;if(Mt&&Mt.length){var yt,Nt=se(_t),Rt=Mt.slice(),qt=[];for(Se(Rt,Nt.dx*Nt.dy/_t.value),qt.area=0;yt=Rt.pop();)qt.push(yt),qt.area+=yt.area,yt.z!=null&&(xt(qt,yt.z?Nt.dx:Nt.dy,Nt,!Rt.length),qt.length=qt.area=0);Mt.forEach(Xe)}}function it(_t,Mt){for(var yt,Nt=_t.area,Rt=0,qt=1/0,rn=-1,dn=_t.length;++rnRt&&(Rt=yt));return Mt*=Mt,(Nt*=Nt)?Math.max(Mt*Rt*be/Nt,Nt/(Mt*qt*be)):1/0}function xt(_t,Mt,yt,Nt){var Rt,qt=-1,rn=_t.length,dn=yt.x,Sn=yt.y,An=Mt?j(_t.area/Mt):0;if(Mt==yt.dx){for((Nt||An>yt.dy)&&(An=yt.dy);++qtyt.dx)&&(An=yt.dx);++qt1);return ce+I*V*Math.sqrt(-2*Math.log(se)/se)}},logNormal:function(){var ce=r.random.normal.apply(r,arguments);return function(){return Math.exp(ce())}},bates:function(ce){var I=r.random.irwinHall(ce);return function(){return I()/ce}},irwinHall:function(ce){return function(){for(var I=0,j=0;j2?Ar:ur,Ue=X?js:Vu;return se=Se(I,j,Ue,V),he=Se(j,I,Ue,Oo),be}function be(Se){return se(Se)}return be.invert=function(Se){return he(Se)},be.domain=function(Se){return arguments.length?(I=Se.map(Number),ve()):I},be.range=function(Se){return arguments.length?(j=Se,ve()):j},be.rangeRound=function(Se){return be.range(Se).interpolate(hl)},be.clamp=function(Se){return arguments.length?(X=Se,ve()):X},be.interpolate=function(Se){return arguments.length?(V=Se,ve()):V},be.ticks=function(Se){return Qn(I,Se)},be.tickFormat=function(Se,Ue){return d3_scale_linearTickFormat(I,Se,Ue)},be.nice=function(Se){return Zr(I,Se),ve()},be.copy=function(){return ce(I,j,V,X)},ve()}([0,1],[0,1],Oo,!1)},r.scale.log=function(){return function ce(I,j,V,X){function se(be){return(V?Math.log(be<0?0:be):-Math.log(be>0?0:-be))/Math.log(j)}function he(be){return V?Math.pow(j,be):-Math.pow(j,-be)}function ve(be){return I(se(be))}return ve.invert=function(be){return he(I.invert(be))},ve.domain=function(be){return arguments.length?(V=be[0]>=0,I.domain((X=be.map(Number)).map(se)),ve):X},ve.base=function(be){return arguments.length?(j=+be,I.domain(X.map(se)),ve):j},ve.nice=function(){var be=yr(X.map(se),V?Math:di);return I.domain(be),X=be.map(he),ve},ve.ticks=function(){var be=Jn(X),Se=[],Ue=be[0],Xe=be[1],it=Math.floor(se(Ue)),xt=Math.ceil(se(Xe)),Lt=j%1?2:j;if(isFinite(xt-it)){if(V){for(;it0;_t--)Se.push(he(it)*_t);for(it=0;Se[it]Xe;xt--);Se=Se.slice(it,xt)}return Se},ve.copy=function(){return ce(I.copy(),j,V,X)},Ur(ve,I)}(r.scale.linear().domain([0,1]),10,!0,[1,10])};var di={floor:function(ce){return-Math.ceil(-ce)},ceil:function(ce){return-Math.floor(-ce)}};function Rr(ce){return function(I){return I<0?-Math.pow(-I,ce):Math.pow(I,ce)}}r.scale.pow=function(){return function ce(I,j,V){var X=Rr(j),se=Rr(1/j);function he(ve){return I(X(ve))}return he.invert=function(ve){return se(I.invert(ve))},he.domain=function(ve){return arguments.length?(I.domain((V=ve.map(Number)).map(X)),he):V},he.ticks=function(ve){return Qn(V,ve)},he.tickFormat=function(ve,be){return d3_scale_linearTickFormat(V,ve,be)},he.nice=function(ve){return he.domain(Zr(V,ve))},he.exponent=function(ve){return arguments.length?(X=Rr(j=ve),se=Rr(1/j),I.domain(V.map(X)),he):j},he.copy=function(){return ce(I.copy(),j,V)},Ur(he,I)}(r.scale.linear(),1,[0,1])},r.scale.sqrt=function(){return r.scale.pow().exponent(.5)},r.scale.ordinal=function(){return function ce(I,j){var V,X,se;function he(be){return X[((V.get(be)||(j.t==="range"?V.set(be,I.push(be)):NaN))-1)%X.length]}function ve(be,Se){return r.range(I.length).map(function(Ue){return be+Se*Ue})}return he.domain=function(be){if(!arguments.length)return I;I=[],V=new M;for(var Se,Ue=-1,Xe=be.length;++Ue0?V[he-1]:I[0],heit?0:1;if(Ue=Be)return be(Ue,Lt)+(Se?be(Se,1-Lt):"")+"Z";var _t,Mt,yt,Nt,Rt,qt,rn,dn,Sn,An,tr,er,gr=0,cr=0,Yr=[];if((Nt=(+he.apply(this,arguments)||0)/2)&&(yt=V===ra?Math.sqrt(Se*Se+Ue*Ue):+V.apply(this,arguments),Lt||(cr*=-1),Ue&&(cr=Pe(yt/Ue*Math.sin(Nt))),Se&&(gr=Pe(yt/Se*Math.sin(Nt)))),Ue){Rt=Ue*Math.cos(Xe+cr),qt=Ue*Math.sin(Xe+cr),rn=Ue*Math.cos(it-cr),dn=Ue*Math.sin(it-cr);var ii=Math.abs(it-Xe-2*cr)<=Wt?0:1;if(cr&&pi(Rt,qt,rn,dn)===Lt^ii){var Ti=(Xe+it)/2;Rt=Ue*Math.cos(Ti),qt=Ue*Math.sin(Ti),rn=dn=null}}else Rt=qt=0;if(Se){Sn=Se*Math.cos(it-gr),An=Se*Math.sin(it-gr),tr=Se*Math.cos(Xe+gr),er=Se*Math.sin(Xe+gr);var Gn=Math.abs(Xe-it+2*gr)<=Wt?0:1;if(gr&&pi(Sn,An,tr,er)===1-Lt^Gn){var Mr=(Xe+it)/2;Sn=Se*Math.cos(Mr),An=Se*Math.sin(Mr),tr=er=null}}else Sn=An=0;if(xt>Ot&&(_t=Math.min(Math.abs(Ue-Se)/2,+j.apply(this,arguments)))>.001){Mt=Se0?0:1}function _a(ce,I,j,V,X){var se=ce[0]-I[0],he=ce[1]-I[1],ve=(X?V:-V)/Math.sqrt(se*se+he*he),be=ve*he,Se=-ve*se,Ue=ce[0]+be,Xe=ce[1]+Se,it=I[0]+be,xt=I[1]+Se,Lt=(Ue+it)/2,_t=(Xe+xt)/2,Mt=it-Ue,yt=xt-Xe,Nt=Mt*Mt+yt*yt,Rt=j-V,qt=Ue*xt-it*Xe,rn=(yt<0?-1:1)*Math.sqrt(Math.max(0,Rt*Rt*Nt-qt*qt)),dn=(qt*yt-Mt*rn)/Nt,Sn=(-qt*Mt-yt*rn)/Nt,An=(qt*yt+Mt*rn)/Nt,tr=(-qt*Mt+yt*rn)/Nt,er=dn-Lt,gr=Sn-_t,cr=An-Lt,Yr=tr-_t;return er*er+gr*gr>cr*cr+Yr*Yr&&(dn=An,Sn=tr),[[dn-be,Sn-Se],[dn*j/Rt,Sn*j/Rt]]}function Po(){return!0}function Al(ce){var I=Mn,j=rr,V=Po,X=ks,se=X.key,he=.7;function ve(be){var Se,Ue=[],Xe=[],it=-1,xt=be.length,Lt=bn(I),_t=bn(j);function Mt(){Ue.push("M",X(ce(Xe),he))}for(;++it1&&X.push("H",V[0]),X.join("")},"step-before":Qa,"step-after":Ts,basis:jo,"basis-open":function(ce){if(ce.length<4)return ks(ce);for(var I,j=[],V=-1,X=ce.length,se=[0],he=[0];++V<3;)I=ce[V],se.push(I[0]),he.push(I[1]);for(j.push(La(ns,se)+","+La(ns,he)),--V;++V9&&(se=3*j/Math.sqrt(se),ve[be]=se*V,ve[be+1]=se*X));for(be=-1;++be<=Se;)se=(I[Math.min(Se,be+1)][0]-I[Math.max(0,be-1)][0])/(6*(1+ve[be]*ve[be])),he.push([se||0,ve[be]*se||0]);return he}(ce))}});function ks(ce){return ce.length>1?ce.join("L"):ce+"Z"}function Pi(ce){return ce.join("L")+"Z"}function Qa(ce){for(var I=0,j=ce.length,V=ce[0],X=[V[0],",",V[1]];++I1){ve=I[1],se=ce[be],be++,V+="C"+(X[0]+he[0])+","+(X[1]+he[1])+","+(se[0]-ve[0])+","+(se[1]-ve[1])+","+se[0]+","+se[1];for(var Se=2;SeWt)+",1 "+Ue}function be(Se,Ue,Xe,it){return"Q 0,0 "+it}return se.radius=function(Se){return arguments.length?(j=bn(Se),se):j},se.source=function(Se){return arguments.length?(ce=bn(Se),se):ce},se.target=function(Se){return arguments.length?(I=bn(Se),se):I},se.startAngle=function(Se){return arguments.length?(V=bn(Se),se):V},se.endAngle=function(Se){return arguments.length?(X=bn(Se),se):X},se},r.svg.diagonal=function(){var ce=wf,I=So,j=wi;function V(X,se){var he=ce.call(this,X,se),ve=I.call(this,X,se),be=(he.y+ve.y)/2,Se=[he,{x:he.x,y:be},{x:ve.x,y:be},ve];return"M"+(Se=Se.map(j))[0]+"C"+Se[1]+" "+Se[2]+" "+Se[3]}return V.source=function(X){return arguments.length?(ce=bn(X),V):ce},V.target=function(X){return arguments.length?(I=bn(X),V):I},V.projection=function(X){return arguments.length?(j=X,V):j},V},r.svg.diagonal.radial=function(){var ce=r.svg.diagonal(),I=wi,j=ce.projection;return ce.projection=function(V){return arguments.length?j(Di(I=V)):I},ce},r.svg.symbol=function(){var ce=Tf,I=kf;function j(V,X){return(Us.get(ce.call(this,V,X))||Jl)(I.call(this,V,X))}return j.type=function(V){return arguments.length?(ce=bn(V),j):ce},j.size=function(V){return arguments.length?(I=bn(V),j):I},j};var Us=r.map({circle:Jl,cross:function(ce){var I=Math.sqrt(ce/5)/2;return"M"+-3*I+","+-I+"H"+-I+"V"+-3*I+"H"+I+"V"+-I+"H"+3*I+"V"+I+"H"+I+"V"+3*I+"H"+-I+"V"+I+"H"+-3*I+"Z"},diamond:function(ce){var I=Math.sqrt(ce/(2*od)),j=I*od;return"M0,"+-I+"L"+j+",0 0,"+I+" "+-j+",0Z"},square:function(ce){var I=Math.sqrt(ce)/2;return"M"+-I+","+-I+"L"+I+","+-I+" "+I+","+I+" "+-I+","+I+"Z"},"triangle-down":function(ce){var I=Math.sqrt(ce/ml),j=I*ml/2;return"M0,"+j+"L"+I+","+-j+" "+-I+","+-j+"Z"},"triangle-up":function(ce){var I=Math.sqrt(ce/ml),j=I*ml/2;return"M0,"+-j+"L"+I+","+j+" "+-I+","+j+"Z"}});r.svg.symbolTypes=Us.keys();var ml=Math.sqrt(3),od=Math.tan(30*Tt);ee.transition=function(ce){for(var I,j,V=qu||++Hu,X=Pc(ce),se=[],he=yu||{time:Date.now(),ease:ac,delay:0,duration:250},ve=-1,be=this.length;++ve0;)Se[--yt].call(ce,Mt);if(_t>=1)return Xe.event&&Xe.event.end.call(ce,ce.__data__,I),--Ue.count?delete Ue[V]:delete ce[j],1}Xe||(se=X.time,he=Kn(function(Lt){var _t=Xe.delay;if(he.t=_t+se,_t<=Lt)return it(Lt-_t);he.c=it},0,se),Xe=Ue[V]={tween:new M,time:se,timer:he,delay:X.delay,duration:X.duration,ease:X.ease,index:I},X=null,++Ue.count)}yo.call=ee.call,yo.empty=ee.empty,yo.node=ee.node,yo.size=ee.size,r.transition=function(ce,I){return ce&&ce.transition?qu?ce.transition(I):ce:r.selection().transition(ce)},r.transition.prototype=yo,yo.select=function(ce){var I,j,V,X=this.id,se=this.namespace,he=[];ce=ie(ce);for(var ve=-1,be=this.length;++verect,.s>rect").attr("width",se[1]-se[0])}function xt(_t){_t.select(".extent").attr("y",he[0]),_t.selectAll(".extent,.e>rect,.w>rect").attr("height",he[1]-he[0])}function Lt(){var _t,Mt,yt=this,Nt=r.select(r.event.target),Rt=j.of(yt,arguments),qt=r.select(yt),rn=Nt.datum(),dn=!/^(n|s)$/.test(rn)&&V,Sn=!/^(e|w)$/.test(rn)&&X,An=Nt.classed("extent"),tr=Pt(yt),er=r.mouse(yt),gr=r.select(s(yt)).on("keydown.brush",ii).on("keyup.brush",Ti);if(r.event.changedTouches?gr.on("touchmove.brush",Gn).on("touchend.brush",ai):gr.on("mousemove.brush",Gn).on("mouseup.brush",ai),qt.interrupt().selectAll("*").interrupt(),An)er[0]=se[0]-er[0],er[1]=he[0]-er[1];else if(rn){var cr=+/w$/.test(rn),Yr=+/^n/.test(rn);Mt=[se[1-cr]-er[0],he[1-Yr]-er[1]],er[0]=se[cr],er[1]=he[Yr]}else r.event.altKey&&(_t=er.slice());function ii(){r.event.keyCode==32&&(An||(_t=null,er[0]-=se[1],er[1]-=he[1],An=2),Y())}function Ti(){r.event.keyCode==32&&An==2&&(er[0]+=se[1],er[1]+=he[1],An=0,Y())}function Gn(){var Qr=r.mouse(yt),gi=!1;Mt&&(Qr[0]+=Mt[0],Qr[1]+=Mt[1]),An||(r.event.altKey?(_t||(_t=[(se[0]+se[1])/2,(he[0]+he[1])/2]),er[0]=se[+(Qr[0]<_t[0])],er[1]=he[+(Qr[1]<_t[1])]):_t=null),dn&&Mr(Qr,V,0)&&(it(qt),gi=!0),Sn&&Mr(Qr,X,1)&&(xt(qt),gi=!0),gi&&(Xe(qt),Rt({type:"brush",mode:An?"move":"resize"}))}function Mr(Qr,gi,Mi){var Yi,ci,zi=fr(gi),Li=zi[0],Qi=zi[1],Ri=er[Mi],ea=Mi?he:se,fa=ea[1]-ea[0];if(An&&(Li-=Ri,Qi-=fa+Ri),Yi=(Mi?be:ve)?Math.max(Li,Math.min(Qi,Qr[Mi])):Qr[Mi],An?ci=(Yi+=Ri)+fa:(_t&&(Ri=Math.max(Li,Math.min(Qi,2*_t[Mi]-Yi))),Ri>>1;v.dtype||(v.dtype="array"),typeof v.dtype=="string"?w=new(h(v.dtype))(b):v.dtype&&(w=v.dtype,Array.isArray(w)&&(w.length=b));for(var T=0;Ty||Z>1073741824){for(var ne=0;nefe+_e||H>me+_e||Q=ie||Te===Oe)){var de=_[we];Oe===void 0&&(Oe=de.length);for(var ye=Te;ye=Z&&ke<=U&&Ee>=re&&Ee<=q&&ue.push(Me)}var ze=M[we],Fe=ze[4*Te+0],Ve=ze[4*Te+1],Ke=ze[4*Te+2],Re=ze[4*Te+3],qe=ge(ze,Te+1),We=.5*_e,Ye=we+1;le(fe,me,We,Ye,Fe,Ve||Ke||Re||qe),le(fe,me+We,We,Ye,Ve,Ke||Re||qe),le(fe+We,me,We,Ye,Ke,Re||qe),le(fe+We,me+We,We,Ye,Re,qe)}}function ge(fe,me){for(var _e=null,we=0;_e===null;)if(_e=fe[4*me+we],++we>fe.length)return null;return _e}return le(0,0,1,0,0,1),ue},w;function P(B,G,W,K,te){for(var Y=[],Z=0;Z0){s+=Math.abs(u(i[0]));for(var l=1;l2){for(g=0;g=0))throw new Error("precision must be a positive number");var x=Math.pow(10,y||0);return Math.round(v*x)/x},f.radiansToLength=h,f.lengthToRadians=m,f.lengthToDegrees=function(v,y){return g(m(v,y))},f.bearingToAzimuth=function(v){var y=v%360;return y<0&&(y+=360),y},f.radiansToDegrees=g,f.degreesToRadians=function(v){return v%360*Math.PI/180},f.convertLength=function(v,y,x){if(y===void 0&&(y="kilometers"),x===void 0&&(x="kilometers"),!(v>=0))throw new Error("length must be a positive number");return h(m(v,y),x)},f.convertArea=function(v,y,x){if(y===void 0&&(y="meters"),x===void 0&&(x="kilometers"),!(v>=0))throw new Error("area must be a positive number");var w=f.areaFactors[y];if(!w)throw new Error("invalid original units");var k=f.areaFactors[x];if(!k)throw new Error("invalid final units");return v/w*k},f.isNumber=p,f.isObject=function(v){return!!v&&v.constructor===Object},f.validateBBox=function(v){if(!v)throw new Error("bbox is required");if(!Array.isArray(v))throw new Error("bbox must be an Array");if(v.length!==4&&v.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");v.forEach(function(y){if(!p(y))throw new Error("bbox must only contain numbers")})},f.validateId=function(v){if(!v)throw new Error("id is required");if(["string","number"].indexOf(typeof v)===-1)throw new Error("id must be a number or a string")}},{}],63:[function(e,o,f){Object.defineProperty(f,"__esModule",{value:!0});var r=e("@turf/helpers");function a(h,m,g){if(h!==null)for(var p,v,y,x,w,k,b,T,_=0,M=0,A=h.type,S=A==="FeatureCollection",E=A==="Feature",D=S?h.features.length:1,O=0;Ok||S>b||E>T)return w=_,k=p,b=S,T=E,void(y=0);var D=r.lineString([w,_],g.properties);if(m(D,p,v,E,y)===!1)return!1;y++,w=_})!==!1&&void 0}}})}function d(h,m){if(!h)throw new Error("geojson is required");s(h,function(g,p,v){if(g.geometry!==null){var y=g.geometry.type,x=g.geometry.coordinates;switch(y){case"LineString":if(m(g,p,v,0,0)===!1)return!1;break;case"Polygon":for(var w=0;wi[0]&&(c[0]=i[0]),c[1]>i[1]&&(c[1]=i[1]),c[2]=0))throw new Error("precision must be a positive number");var x=Math.pow(10,y||0);return Math.round(v*x)/x},f.radiansToLength=h,f.lengthToRadians=m,f.lengthToDegrees=function(v,y){return g(m(v,y))},f.bearingToAzimuth=function(v){var y=v%360;return y<0&&(y+=360),y},f.radiansToDegrees=g,f.degreesToRadians=function(v){return v%360*Math.PI/180},f.convertLength=function(v,y,x){if(y===void 0&&(y="kilometers"),x===void 0&&(x="kilometers"),!(v>=0))throw new Error("length must be a positive number");return h(m(v,y),x)},f.convertArea=function(v,y,x){if(y===void 0&&(y="meters"),x===void 0&&(x="kilometers"),!(v>=0))throw new Error("area must be a positive number");var w=f.areaFactors[y];if(!w)throw new Error("invalid original units");var k=f.areaFactors[x];if(!k)throw new Error("invalid final units");return v/w*k},f.isNumber=p,f.isObject=function(v){return!!v&&v.constructor===Object},f.validateBBox=function(v){if(!v)throw new Error("bbox is required");if(!Array.isArray(v))throw new Error("bbox must be an Array");if(v.length!==4&&v.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");v.forEach(function(y){if(!p(y))throw new Error("bbox must only contain numbers")})},f.validateId=function(v){if(!v)throw new Error("id is required");if(["string","number"].indexOf(typeof v)===-1)throw new Error("id must be a number or a string")},f.radians2degrees=function(){throw new Error("method has been renamed to `radiansToDegrees`")},f.degrees2radians=function(){throw new Error("method has been renamed to `degreesToRadians`")},f.distanceToDegrees=function(){throw new Error("method has been renamed to `lengthToDegrees`")},f.distanceToRadians=function(){throw new Error("method has been renamed to `lengthToRadians`")},f.radiansToDistance=function(){throw new Error("method has been renamed to `radiansToLength`")},f.bearingToAngle=function(){throw new Error("method has been renamed to `bearingToAzimuth`")},f.convertDistance=function(){throw new Error("method has been renamed to `convertLength`")}},{}],69:[function(e,o,f){Object.defineProperty(f,"__esModule",{value:!0});var r=e("@turf/helpers");function a(h,m,g){if(h!==null)for(var p,v,y,x,w,k,b,T,_=0,M=0,A=h.type,S=A==="FeatureCollection",E=A==="Feature",D=S?h.features.length:1,O=0;Ok||S>b||E>T)return w=_,k=p,b=S,T=E,void(y=0);var D=r.lineString([w,_],g.properties);if(m(D,p,v,E,y)===!1)return!1;y++,w=_})!==!1&&void 0}}})}function d(h,m){if(!h)throw new Error("geojson is required");s(h,function(g,p,v){if(g.geometry!==null){var y=g.geometry.type,x=g.geometry.coordinates;switch(y){case"LineString":if(m(g,p,v,0,0)===!1)return!1;break;case"Polygon":for(var w=0;wi&&(i=r[l]),r[l] + * @license MIT + */function u(S,E){if(S===E)return 0;for(var D=S.length,O=E.length,R=0,z=Math.min(D,O);R=0;K--)if(te[K]!==Y[K])return!1;for(K=te.length-1;K>=0;K--)if(W=te[K],!b(z[W],L[W],P,N))return!1;return!0}(S,E,D,O))}return D?S===E:S==E}function T(S){return Object.prototype.toString.call(S)=="[object Arguments]"}function _(S,E){if(!S||!E)return!1;if(Object.prototype.toString.call(E)=="[object RegExp]")return E.test(S);try{if(S instanceof E)return!0}catch{}return!Error.isPrototypeOf(E)&&E.call({},S)===!0}function M(S,E,D,O){var R;if(typeof E!="function")throw new TypeError('"block" argument must be a function');typeof D=="string"&&(O=D,D=null),R=function(P){var N;try{P()}catch(B){N=B}return N}(E),O=(D&&D.name?" ("+D.name+").":".")+(O?" "+O:"."),S&&!R&&w(R,D,"Missing expected exception"+O);var z=typeof O=="string",L=!S&&R&&!D;if((!S&&i.isError(R)&&z&&_(R,D)||L)&&w(R,D,"Got unwanted exception"+O),S&&R&&D&&!_(R,D)||!S&&R)throw R}g.AssertionError=function(S){this.name="AssertionError",this.actual=S.actual,this.expected=S.expected,this.operator=S.operator,S.message?(this.message=S.message,this.generatedMessage=!1):(this.message=function(P){return y(x(P.actual),128)+" "+P.operator+" "+y(x(P.expected),128)}(this),this.generatedMessage=!0);var E=S.stackStartFunction||w;if(Error.captureStackTrace)Error.captureStackTrace(this,E);else{var D=new Error;if(D.stack){var O=D.stack,R=v(E),z=O.indexOf(` +`+R);if(z>=0){var L=O.indexOf(` +`,z+1);O=O.substring(L+1)}this.stack=O}}},i.inherits(g.AssertionError,Error),g.fail=w,g.ok=k,g.equal=function(S,E,D){S!=E&&w(S,E,D,"==",g.equal)},g.notEqual=function(S,E,D){S==E&&w(S,E,D,"!=",g.notEqual)},g.deepEqual=function(S,E,D){b(S,E,!1)||w(S,E,D,"deepEqual",g.deepEqual)},g.deepStrictEqual=function(S,E,D){b(S,E,!0)||w(S,E,D,"deepStrictEqual",g.deepStrictEqual)},g.notDeepEqual=function(S,E,D){b(S,E,!1)&&w(S,E,D,"notDeepEqual",g.notDeepEqual)},g.notDeepStrictEqual=function S(E,D,O){b(E,D,!0)&&w(E,D,O,"notDeepStrictEqual",S)},g.strictEqual=function(S,E,D){S!==E&&w(S,E,D,"===",g.strictEqual)},g.notStrictEqual=function(S,E,D){S===E&&w(S,E,D,"!==",g.notStrictEqual)},g.throws=function(S,E,D){M(!0,S,E,D)},g.doesNotThrow=function(S,E,D){M(!1,S,E,D)},g.ifError=function(S){if(S)throw S},g.strict=a(function S(E,D){E||w(E,!0,D,"==",S)},g,{equal:g.strictEqual,deepEqual:g.deepStrictEqual,notEqual:g.notStrictEqual,notDeepEqual:g.notDeepStrictEqual}),g.strict.strict=g.strict;var A=Object.keys||function(S){var E=[];for(var D in S)s.call(S,D)&&E.push(D);return E}}).call(this)}).call(this,typeof Ro<"u"?Ro:typeof self<"u"?self:typeof window<"u"?window:{})},{"object-assign":247,"util/":78}],76:[function(e,o,f){typeof Object.create=="function"?o.exports=function(r,a){r.super_=a,r.prototype=Object.create(a.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}})}:o.exports=function(r,a){r.super_=a;var u=function(){};u.prototype=a.prototype,r.prototype=new u,r.prototype.constructor=r}},{}],77:[function(e,o,f){o.exports=function(r){return r&&typeof r=="object"&&typeof r.copy=="function"&&typeof r.fill=="function"&&typeof r.readUInt8=="function"}},{}],78:[function(e,o,f){(function(r,a){(function(){var u=/%[sdj%]/g;f.format=function(z){if(!w(z)){for(var L=[],P=0;P=B)return K;switch(K){case"%s":return String(N[P++]);case"%d":return Number(N[P++]);case"%j":try{return JSON.stringify(N[P++])}catch{return"[Circular]"}default:return K}}),W=N[P];P=3&&(P.depth=arguments[2]),arguments.length>=4&&(P.colors=arguments[3]),v(L)?P.showHidden=L:L&&f._extend(P,L),k(P.showHidden)&&(P.showHidden=!1),k(P.depth)&&(P.depth=2),k(P.colors)&&(P.colors=!1),k(P.customInspect)&&(P.customInspect=!0),P.colors&&(P.stylize=l),h(P,z,P.depth)}function l(z,L){var P=s.styles[L];return P?"\x1B["+s.colors[P][0]+"m"+z+"\x1B["+s.colors[P][1]+"m":z}function d(z,L){return z}function h(z,L,P){if(z.customInspect&&L&&A(L.inspect)&&L.inspect!==f.inspect&&(!L.constructor||L.constructor.prototype!==L)){var N=L.inspect(P,z);return w(N)||(N=h(z,N,P)),N}var B=function(U,q){if(k(q))return U.stylize("undefined","undefined");if(w(q)){var $="'"+JSON.stringify(q).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return U.stylize($,"string")}if(x(q))return U.stylize(""+q,"number");if(v(q))return U.stylize(""+q,"boolean");if(y(q))return U.stylize("null","null")}(z,L);if(B)return B;var G=Object.keys(L),W=function(U){var q={};return U.forEach(function($,ne){q[$]=!0}),q}(G);if(z.showHidden&&(G=Object.getOwnPropertyNames(L)),M(L)&&(G.indexOf("message")>=0||G.indexOf("description")>=0))return m(L);if(G.length===0){if(A(L)){var K=L.name?": "+L.name:"";return z.stylize("[Function"+K+"]","special")}if(b(L))return z.stylize(RegExp.prototype.toString.call(L),"regexp");if(_(L))return z.stylize(Date.prototype.toString.call(L),"date");if(M(L))return m(L)}var te,Y="",Z=!1,re=["{","}"];return p(L)&&(Z=!0,re=["[","]"]),A(L)&&(Y=" [Function"+(L.name?": "+L.name:"")+"]"),b(L)&&(Y=" "+RegExp.prototype.toString.call(L)),_(L)&&(Y=" "+Date.prototype.toUTCString.call(L)),M(L)&&(Y=" "+m(L)),G.length!==0||Z&&L.length!=0?P<0?b(L)?z.stylize(RegExp.prototype.toString.call(L),"regexp"):z.stylize("[Object]","special"):(z.seen.push(L),te=Z?function(U,q,$,ne,H){for(var Q=[],ee=0,ie=q.length;ee=0,ne+H.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?$[0]+(q===""?"":q+` + `)+" "+U.join(`, + `)+" "+$[1]:$[0]+q+" "+U.join(", ")+" "+$[1]}(te,Y,re)):re[0]+Y+re[1]}function m(z){return"["+Error.prototype.toString.call(z)+"]"}function g(z,L,P,N,B,G){var W,K,te;if((te=Object.getOwnPropertyDescriptor(L,B)||{value:L[B]}).get?K=te.set?z.stylize("[Getter/Setter]","special"):z.stylize("[Getter]","special"):te.set&&(K=z.stylize("[Setter]","special")),R(N,B)||(W="["+B+"]"),K||(z.seen.indexOf(te.value)<0?(K=y(P)?h(z,te.value,null):h(z,te.value,P-1)).indexOf(` +`)>-1&&(K=G?K.split(` +`).map(function(Y){return" "+Y}).join(` +`).substr(2):` +`+K.split(` +`).map(function(Y){return" "+Y}).join(` +`)):K=z.stylize("[Circular]","special")),k(W)){if(G&&B.match(/^\d+$/))return K;(W=JSON.stringify(""+B)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(W=W.substr(1,W.length-2),W=z.stylize(W,"name")):(W=W.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),W=z.stylize(W,"string"))}return W+": "+K}function p(z){return Array.isArray(z)}function v(z){return typeof z=="boolean"}function y(z){return z===null}function x(z){return typeof z=="number"}function w(z){return typeof z=="string"}function k(z){return z===void 0}function b(z){return T(z)&&S(z)==="[object RegExp]"}function T(z){return typeof z=="object"&&z!==null}function _(z){return T(z)&&S(z)==="[object Date]"}function M(z){return T(z)&&(S(z)==="[object Error]"||z instanceof Error)}function A(z){return typeof z=="function"}function S(z){return Object.prototype.toString.call(z)}function E(z){return z<10?"0"+z.toString(10):z.toString(10)}f.debuglog=function(z){if(k(c)&&(c=r.env.NODE_DEBUG||""),z=z.toUpperCase(),!i[z])if(new RegExp("\\b"+z+"\\b","i").test(c)){var L=r.pid;i[z]=function(){var P=f.format.apply(f,arguments);console.error("%s %d: %s",z,L,P)}}else i[z]=function(){};return i[z]},f.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},f.isArray=p,f.isBoolean=v,f.isNull=y,f.isNullOrUndefined=function(z){return z==null},f.isNumber=x,f.isString=w,f.isSymbol=function(z){return typeof z=="symbol"},f.isUndefined=k,f.isRegExp=b,f.isObject=T,f.isDate=_,f.isError=M,f.isFunction=A,f.isPrimitive=function(z){return z===null||typeof z=="boolean"||typeof z=="number"||typeof z=="string"||typeof z=="symbol"||z===void 0},f.isBuffer=e("./support/isBuffer");var D=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function O(){var z=new Date,L=[E(z.getHours()),E(z.getMinutes()),E(z.getSeconds())].join(":");return[z.getDate(),D[z.getMonth()],L].join(" ")}function R(z,L){return Object.prototype.hasOwnProperty.call(z,L)}f.log=function(){console.log("%s - %s",O(),f.format.apply(f,arguments))},f.inherits=e("inherits"),f._extend=function(z,L){if(!L||!T(L))return z;for(var P=Object.keys(L),N=P.length;N--;)z[P[N]]=L[P[N]];return z}}).call(this)}).call(this,e("_process"),typeof Ro<"u"?Ro:typeof self<"u"?self:typeof window<"u"?window:{})},{"./support/isBuffer":77,_process:277,inherits:76}],79:[function(e,o,f){f.byteLength=function(h){var m=l(h),g=m[0],p=m[1];return 3*(g+p)/4-p},f.toByteArray=function(h){var m,g,p=l(h),v=p[0],y=p[1],x=new u(function(b,T,_){return 3*(T+_)/4-_}(0,v,y)),w=0,k=y>0?v-4:v;for(g=0;g>16&255,x[w++]=m>>8&255,x[w++]=255&m;return y===2&&(m=a[h.charCodeAt(g)]<<2|a[h.charCodeAt(g+1)]>>4,x[w++]=255&m),y===1&&(m=a[h.charCodeAt(g)]<<10|a[h.charCodeAt(g+1)]<<4|a[h.charCodeAt(g+2)]>>2,x[w++]=m>>8&255,x[w++]=255&m),x},f.fromByteArray=function(h){for(var m,g=h.length,p=g%3,v=[],y=0,x=g-p;yx?x:y+16383));return p===1?(m=h[g-1],v.push(r[m>>2]+r[m<<4&63]+"==")):p===2&&(m=(h[g-2]<<8)+h[g-1],v.push(r[m>>10]+r[m>>4&63]+r[m<<2&63]+"=")),v.join("")};for(var r=[],a=[],u=typeof Uint8Array<"u"?Uint8Array:Array,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,s=c.length;i0)throw new Error("Invalid string. Length must be a multiple of 4");var g=h.indexOf("=");return g===-1&&(g=m),[g,g===m?0:4-g%4]}function d(h,m,g){for(var p,v,y=[],x=m;x>18&63]+r[v>>12&63]+r[v>>6&63]+r[63&v]);return y.join("")}a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63},{}],80:[function(e,o,f){function r(l,d,h,m,g){for(var p=g+1;m<=g;){var v=m+g>>>1,y=l[v];(h!==void 0?h(y,d):y-d)>=0?(p=v,g=v-1):m=v+1}return p}function a(l,d,h,m,g){for(var p=g+1;m<=g;){var v=m+g>>>1,y=l[v];(h!==void 0?h(y,d):y-d)>0?(p=v,g=v-1):m=v+1}return p}function u(l,d,h,m,g){for(var p=m-1;m<=g;){var v=m+g>>>1,y=l[v];(h!==void 0?h(y,d):y-d)<0?(p=v,m=v+1):g=v-1}return p}function c(l,d,h,m,g){for(var p=m-1;m<=g;){var v=m+g>>>1,y=l[v];(h!==void 0?h(y,d):y-d)<=0?(p=v,m=v+1):g=v-1}return p}function i(l,d,h,m,g){for(;m<=g;){var p=m+g>>>1,v=l[p],y=h!==void 0?h(v,d):v-d;if(y===0)return p;y<=0?m=p+1:g=p-1}return-1}function s(l,d,h,m,g,p){return typeof h=="function"?p(l,d,h,m===void 0?0:0|m,g===void 0?l.length-1:0|g):p(l,d,void 0,h===void 0?0:0|h,m===void 0?l.length-1:0|m)}o.exports={ge:function(l,d,h,m,g){return s(l,d,h,m,g,r)},gt:function(l,d,h,m,g){return s(l,d,h,m,g,a)},lt:function(l,d,h,m,g){return s(l,d,h,m,g,u)},le:function(l,d,h,m,g){return s(l,d,h,m,g,c)},eq:function(l,d,h,m,g){return s(l,d,h,m,g,i)}}},{}],81:[function(e,o,f){function r(u){var c=32;return(u&=-u)&&c--,65535&u&&(c-=16),16711935&u&&(c-=8),252645135&u&&(c-=4),858993459&u&&(c-=2),1431655765&u&&(c-=1),c}f.INT_BITS=32,f.INT_MAX=2147483647,f.INT_MIN=-1<<31,f.sign=function(u){return(u>0)-(u<0)},f.abs=function(u){var c=u>>31;return(u^c)-c},f.min=function(u,c){return c^(u^c)&-(u65535)<<4,c|=i=((u>>>=c)>255)<<3,c|=i=((u>>>=i)>15)<<2,(c|=i=((u>>>=i)>3)<<1)|(u>>>=i)>>1},f.log10=function(u){return u>=1e9?9:u>=1e8?8:u>=1e7?7:u>=1e6?6:u>=1e5?5:u>=1e4?4:u>=1e3?3:u>=100?2:u>=10?1:0},f.popCount=function(u){return 16843009*((u=(858993459&(u-=u>>>1&1431655765))+(u>>>2&858993459))+(u>>>4)&252645135)>>>24},f.countTrailingZeros=r,f.nextPow2=function(u){return u+=u===0,--u,u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,(u|=u>>>16)+1},f.prevPow2=function(u){return u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,(u|=u>>>16)-(u>>>1)},f.parity=function(u){return u^=u>>>16,u^=u>>>8,u^=u>>>4,27030>>>(u&=15)&1};var a=new Array(256);(function(u){for(var c=0;c<256;++c){var i=c,s=c,l=7;for(i>>>=1;i;i>>>=1)s<<=1,s|=1&i,--l;u[c]=s<>>8&255]<<16|a[u>>>16&255]<<8|a[u>>>24&255]},f.interleave2=function(u,c){return(u=1431655765&((u=858993459&((u=252645135&((u=16711935&((u&=65535)|u<<8))|u<<4))|u<<2))|u<<1))|(c=1431655765&((c=858993459&((c=252645135&((c=16711935&((c&=65535)|c<<8))|c<<4))|c<<2))|c<<1))<<1},f.deinterleave2=function(u,c){return(u=65535&((u=16711935&((u=252645135&((u=858993459&((u=u>>>c&1431655765)|u>>>1))|u>>>2))|u>>>4))|u>>>16))<<16>>16},f.interleave3=function(u,c,i){return u=1227133513&((u=3272356035&((u=251719695&((u=4278190335&((u&=1023)|u<<16))|u<<8))|u<<4))|u<<2),(u|=(c=1227133513&((c=3272356035&((c=251719695&((c=4278190335&((c&=1023)|c<<16))|c<<8))|c<<4))|c<<2))<<1)|(i=1227133513&((i=3272356035&((i=251719695&((i=4278190335&((i&=1023)|i<<16))|i<<8))|i<<4))|i<<2))<<2},f.deinterleave3=function(u,c){return(u=1023&((u=4278190335&((u=251719695&((u=3272356035&((u=u>>>c&1227133513)|u>>>2))|u>>>4))|u>>>8))|u>>>16))<<22>>22},f.nextCombination=function(u){var c=u|u-1;return c+1|(~c&-~c)-1>>>r(u)+1}},{}],82:[function(e,o,f){var r=e("clamp");o.exports=function(i,s){s||(s={});var l,d,h,m,g,p,v,y,x,w,k,b=s.cutoff==null?.25:s.cutoff,T=s.radius==null?8:s.radius,_=s.channel||0;if(ArrayBuffer.isView(i)||Array.isArray(i)){if(!s.width||!s.height)throw Error("For raw data width and height should be provided by options");l=s.width,d=s.height,m=i,p=s.stride?s.stride:Math.floor(i.length/l/d)}else window.HTMLCanvasElement&&i instanceof window.HTMLCanvasElement?(v=(y=i).getContext("2d"),l=y.width,d=y.height,x=v.getImageData(0,0,l,d),m=x.data,p=4):window.CanvasRenderingContext2D&&i instanceof window.CanvasRenderingContext2D?(y=i.canvas,v=i,l=y.width,d=y.height,x=v.getImageData(0,0,l,d),m=x.data,p=4):window.ImageData&&i instanceof window.ImageData&&(x=i,l=i.width,d=i.height,m=x.data,p=4);if(h=Math.max(l,d),window.Uint8ClampedArray&&m instanceof window.Uint8ClampedArray||window.Uint8Array&&m instanceof window.Uint8Array)for(g=m,m=Array(l*d),w=0,k=g.length;w0&&M.length>T&&!M.warned){M.warned=!0;var S=new Error("Possible EventEmitter memory leak detected. "+M.length+" "+String(w)+" listeners added. Use emitter.setMaxListeners() to increase limit");S.name="MaxListenersExceededWarning",S.emitter=x,S.type=w,S.count=M.length,A=S,console&&console.warn&&console.warn(A)}return x}function m(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function g(x,w,k){var b={fired:!1,wrapFn:void 0,target:x,type:w,listener:k},T=m.bind(b);return T.listener=k,b.wrapFn=T,T}function p(x,w,k){var b=x._events;if(b===void 0)return[];var T=b[w];return T===void 0?[]:typeof T=="function"?k?[T.listener||T]:[T]:k?function(_){for(var M=new Array(_.length),A=0;A0&&(_=w[0]),_ instanceof Error)throw _;var M=new Error("Unhandled error."+(_?" ("+_.message+")":""));throw M.context=_,M}var A=T[x];if(A===void 0)return!1;if(typeof A=="function")u(A,this,w);else{var S=A.length,E=y(A,S);for(k=0;k=0;_--)if(k[_]===w||k[_].listener===w){M=k[_].listener,T=_;break}if(T<0)return this;T===0?k.shift():function(A,S){for(;S+1=0;b--)this.removeListener(x,w[b]);return this},i.prototype.listeners=function(x){return p(this,x,!0)},i.prototype.rawListeners=function(x){return p(this,x,!1)},i.listenerCount=function(x,w){return typeof x.listenerCount=="function"?x.listenerCount(w):v.call(x,w)},i.prototype.listenerCount=v,i.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},{}],85:[function(e,o,f){(function(r){(function(){var a=e("base64-js"),u=e("ieee754");f.Buffer=i,f.SlowBuffer=function(U){return+U!=U&&(U=0),i.alloc(+U)},f.INSPECT_MAX_BYTES=50;function c(U){if(U>2147483647)throw new RangeError('The value "'+U+'" is invalid for option "size"');var q=new Uint8Array(U);return q.__proto__=i.prototype,q}function i(U,q,$){if(typeof U=="number"){if(typeof q=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return d(U)}return s(U,q,$)}function s(U,q,$){if(typeof U=="string")return function(Q,ee){if(typeof ee=="string"&&ee!==""||(ee="utf8"),!i.isEncoding(ee))throw new TypeError("Unknown encoding: "+ee);var ie=0|g(Q,ee),ae=c(ie),ue=ae.write(Q,ee);return ue!==ie&&(ae=ae.slice(0,ue)),ae}(U,q);if(ArrayBuffer.isView(U))return h(U);if(U==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof U);if(Z(U,ArrayBuffer)||U&&Z(U.buffer,ArrayBuffer))return function(Q,ee,ie){if(ee<0||Q.byteLength=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+2147483647 .toString(16)+" bytes");return 0|U}function g(U,q){if(i.isBuffer(U))return U.length;if(ArrayBuffer.isView(U)||Z(U,ArrayBuffer))return U.byteLength;if(typeof U!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof U);var $=U.length,ne=arguments.length>2&&arguments[2]===!0;if(!ne&&$===0)return 0;for(var H=!1;;)switch(q){case"ascii":case"latin1":case"binary":return $;case"utf8":case"utf-8":return K(U).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*$;case"hex":return $>>>1;case"base64":return te(U).length;default:if(H)return ne?-1:K(U).length;q=(""+q).toLowerCase(),H=!0}}function p(U,q,$){var ne=!1;if((q===void 0||q<0)&&(q=0),q>this.length||(($===void 0||$>this.length)&&($=this.length),$<=0)||($>>>=0)<=(q>>>=0))return"";for(U||(U="utf8");;)switch(U){case"hex":return O(this,q,$);case"utf8":case"utf-8":return S(this,q,$);case"ascii":return E(this,q,$);case"latin1":case"binary":return D(this,q,$);case"base64":return A(this,q,$);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,q,$);default:if(ne)throw new TypeError("Unknown encoding: "+U);U=(U+"").toLowerCase(),ne=!0}}function v(U,q,$){var ne=U[q];U[q]=U[$],U[$]=ne}function y(U,q,$,ne,H){if(U.length===0)return-1;if(typeof $=="string"?(ne=$,$=0):$>2147483647?$=2147483647:$<-2147483648&&($=-2147483648),re($=+$)&&($=H?0:U.length-1),$<0&&($=U.length+$),$>=U.length){if(H)return-1;$=U.length-1}else if($<0){if(!H)return-1;$=0}if(typeof q=="string"&&(q=i.from(q,ne)),i.isBuffer(q))return q.length===0?-1:x(U,q,$,ne,H);if(typeof q=="number")return q&=255,typeof Uint8Array.prototype.indexOf=="function"?H?Uint8Array.prototype.indexOf.call(U,q,$):Uint8Array.prototype.lastIndexOf.call(U,q,$):x(U,[q],$,ne,H);throw new TypeError("val must be string, number or Buffer")}function x(U,q,$,ne,H){var Q,ee=1,ie=U.length,ae=q.length;if(ne!==void 0&&((ne=String(ne).toLowerCase())==="ucs2"||ne==="ucs-2"||ne==="utf16le"||ne==="utf-16le")){if(U.length<2||q.length<2)return-1;ee=2,ie/=2,ae/=2,$/=2}function ue(me,_e){return ee===1?me[_e]:me.readUInt16BE(_e*ee)}if(H){var le=-1;for(Q=$;Qie&&($=ie-ae),Q=$;Q>=0;Q--){for(var ge=!0,fe=0;feH&&(ne=H):ne=H;var Q=q.length;ne>Q/2&&(ne=Q/2);for(var ee=0;ee>8,ae=ee%256,ue.push(ae),ue.push(ie);return ue}(q,U.length-$),U,$,ne)}function A(U,q,$){return q===0&&$===U.length?a.fromByteArray(U):a.fromByteArray(U.slice(q,$))}function S(U,q,$){$=Math.min(U.length,$);for(var ne=[],H=q;H<$;){var Q,ee,ie,ae,ue=U[H],le=null,ge=ue>239?4:ue>223?3:ue>191?2:1;if(H+ge<=$)switch(ge){case 1:ue<128&&(le=ue);break;case 2:(192&(Q=U[H+1]))==128&&(ae=(31&ue)<<6|63&Q)>127&&(le=ae);break;case 3:Q=U[H+1],ee=U[H+2],(192&Q)==128&&(192&ee)==128&&(ae=(15&ue)<<12|(63&Q)<<6|63&ee)>2047&&(ae<55296||ae>57343)&&(le=ae);break;case 4:Q=U[H+1],ee=U[H+2],ie=U[H+3],(192&Q)==128&&(192&ee)==128&&(192&ie)==128&&(ae=(15&ue)<<18|(63&Q)<<12|(63&ee)<<6|63&ie)>65535&&ae<1114112&&(le=ae)}le===null?(le=65533,ge=1):le>65535&&(le-=65536,ne.push(le>>>10&1023|55296),le=56320|1023&le),ne.push(le),H+=ge}return function(fe){var me=fe.length;if(me<=4096)return String.fromCharCode.apply(String,fe);for(var _e="",we=0;we"u"||typeof console.error!="function"||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(i.prototype,"parent",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.buffer}}),Object.defineProperty(i.prototype,"offset",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.byteOffset}}),typeof Symbol<"u"&&Symbol.species!=null&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),i.poolSize=8192,i.from=function(U,q,$){return s(U,q,$)},i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,i.alloc=function(U,q,$){return function(ne,H,Q){return l(ne),ne<=0?c(ne):H!==void 0?typeof Q=="string"?c(ne).fill(H,Q):c(ne).fill(H):c(ne)}(U,q,$)},i.allocUnsafe=function(U){return d(U)},i.allocUnsafeSlow=function(U){return d(U)},i.isBuffer=function(U){return U!=null&&U._isBuffer===!0&&U!==i.prototype},i.compare=function(U,q){if(Z(U,Uint8Array)&&(U=i.from(U,U.offset,U.byteLength)),Z(q,Uint8Array)&&(q=i.from(q,q.offset,q.byteLength)),!i.isBuffer(U)||!i.isBuffer(q))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(U===q)return 0;for(var $=U.length,ne=q.length,H=0,Q=Math.min($,ne);Hq&&(U+=" ... "),""},i.prototype.compare=function(U,q,$,ne,H){if(Z(U,Uint8Array)&&(U=i.from(U,U.offset,U.byteLength)),!i.isBuffer(U))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof U);if(q===void 0&&(q=0),$===void 0&&($=U?U.length:0),ne===void 0&&(ne=0),H===void 0&&(H=this.length),q<0||$>U.length||ne<0||H>this.length)throw new RangeError("out of range index");if(ne>=H&&q>=$)return 0;if(ne>=H)return-1;if(q>=$)return 1;if(this===U)return 0;for(var Q=(H>>>=0)-(ne>>>=0),ee=($>>>=0)-(q>>>=0),ie=Math.min(Q,ee),ae=this.slice(ne,H),ue=U.slice(q,$),le=0;le>>=0,isFinite($)?($>>>=0,ne===void 0&&(ne="utf8")):(ne=$,$=void 0)}var H=this.length-q;if(($===void 0||$>H)&&($=H),U.length>0&&($<0||q<0)||q>this.length)throw new RangeError("Attempt to write outside buffer bounds");ne||(ne="utf8");for(var Q=!1;;)switch(ne){case"hex":return w(this,U,q,$);case"utf8":case"utf-8":return k(this,U,q,$);case"ascii":return b(this,U,q,$);case"latin1":case"binary":return T(this,U,q,$);case"base64":return _(this,U,q,$);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,U,q,$);default:if(Q)throw new TypeError("Unknown encoding: "+ne);ne=(""+ne).toLowerCase(),Q=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function E(U,q,$){var ne="";$=Math.min(U.length,$);for(var H=q;H<$;++H)ne+=String.fromCharCode(127&U[H]);return ne}function D(U,q,$){var ne="";$=Math.min(U.length,$);for(var H=q;H<$;++H)ne+=String.fromCharCode(U[H]);return ne}function O(U,q,$){var ne=U.length;(!q||q<0)&&(q=0),(!$||$<0||$>ne)&&($=ne);for(var H="",Q=q;Q<$;++Q)H+=W(U[Q]);return H}function R(U,q,$){for(var ne=U.slice(q,$),H="",Q=0;Q$)throw new RangeError("Trying to access beyond buffer length")}function L(U,q,$,ne,H,Q){if(!i.isBuffer(U))throw new TypeError('"buffer" argument must be a Buffer instance');if(q>H||qU.length)throw new RangeError("Index out of range")}function P(U,q,$,ne,H,Q){if($+ne>U.length)throw new RangeError("Index out of range");if($<0)throw new RangeError("Index out of range")}function N(U,q,$,ne,H){return q=+q,$>>>=0,H||P(U,0,$,4),u.write(U,q,$,ne,23,4),$+4}function B(U,q,$,ne,H){return q=+q,$>>>=0,H||P(U,0,$,8),u.write(U,q,$,ne,52,8),$+8}i.prototype.slice=function(U,q){var $=this.length;(U=~~U)<0?(U+=$)<0&&(U=0):U>$&&(U=$),(q=q===void 0?$:~~q)<0?(q+=$)<0&&(q=0):q>$&&(q=$),q>>=0,q>>>=0,$||z(U,q,this.length);for(var ne=this[U],H=1,Q=0;++Q>>=0,q>>>=0,$||z(U,q,this.length);for(var ne=this[U+--q],H=1;q>0&&(H*=256);)ne+=this[U+--q]*H;return ne},i.prototype.readUInt8=function(U,q){return U>>>=0,q||z(U,1,this.length),this[U]},i.prototype.readUInt16LE=function(U,q){return U>>>=0,q||z(U,2,this.length),this[U]|this[U+1]<<8},i.prototype.readUInt16BE=function(U,q){return U>>>=0,q||z(U,2,this.length),this[U]<<8|this[U+1]},i.prototype.readUInt32LE=function(U,q){return U>>>=0,q||z(U,4,this.length),(this[U]|this[U+1]<<8|this[U+2]<<16)+16777216*this[U+3]},i.prototype.readUInt32BE=function(U,q){return U>>>=0,q||z(U,4,this.length),16777216*this[U]+(this[U+1]<<16|this[U+2]<<8|this[U+3])},i.prototype.readIntLE=function(U,q,$){U>>>=0,q>>>=0,$||z(U,q,this.length);for(var ne=this[U],H=1,Q=0;++Q=(H*=128)&&(ne-=Math.pow(2,8*q)),ne},i.prototype.readIntBE=function(U,q,$){U>>>=0,q>>>=0,$||z(U,q,this.length);for(var ne=q,H=1,Q=this[U+--ne];ne>0&&(H*=256);)Q+=this[U+--ne]*H;return Q>=(H*=128)&&(Q-=Math.pow(2,8*q)),Q},i.prototype.readInt8=function(U,q){return U>>>=0,q||z(U,1,this.length),128&this[U]?-1*(255-this[U]+1):this[U]},i.prototype.readInt16LE=function(U,q){U>>>=0,q||z(U,2,this.length);var $=this[U]|this[U+1]<<8;return 32768&$?4294901760|$:$},i.prototype.readInt16BE=function(U,q){U>>>=0,q||z(U,2,this.length);var $=this[U+1]|this[U]<<8;return 32768&$?4294901760|$:$},i.prototype.readInt32LE=function(U,q){return U>>>=0,q||z(U,4,this.length),this[U]|this[U+1]<<8|this[U+2]<<16|this[U+3]<<24},i.prototype.readInt32BE=function(U,q){return U>>>=0,q||z(U,4,this.length),this[U]<<24|this[U+1]<<16|this[U+2]<<8|this[U+3]},i.prototype.readFloatLE=function(U,q){return U>>>=0,q||z(U,4,this.length),u.read(this,U,!0,23,4)},i.prototype.readFloatBE=function(U,q){return U>>>=0,q||z(U,4,this.length),u.read(this,U,!1,23,4)},i.prototype.readDoubleLE=function(U,q){return U>>>=0,q||z(U,8,this.length),u.read(this,U,!0,52,8)},i.prototype.readDoubleBE=function(U,q){return U>>>=0,q||z(U,8,this.length),u.read(this,U,!1,52,8)},i.prototype.writeUIntLE=function(U,q,$,ne){U=+U,q>>>=0,$>>>=0,ne||L(this,U,q,$,Math.pow(2,8*$)-1,0);var H=1,Q=0;for(this[q]=255&U;++Q<$&&(H*=256);)this[q+Q]=U/H&255;return q+$},i.prototype.writeUIntBE=function(U,q,$,ne){U=+U,q>>>=0,$>>>=0,ne||L(this,U,q,$,Math.pow(2,8*$)-1,0);var H=$-1,Q=1;for(this[q+H]=255&U;--H>=0&&(Q*=256);)this[q+H]=U/Q&255;return q+$},i.prototype.writeUInt8=function(U,q,$){return U=+U,q>>>=0,$||L(this,U,q,1,255,0),this[q]=255&U,q+1},i.prototype.writeUInt16LE=function(U,q,$){return U=+U,q>>>=0,$||L(this,U,q,2,65535,0),this[q]=255&U,this[q+1]=U>>>8,q+2},i.prototype.writeUInt16BE=function(U,q,$){return U=+U,q>>>=0,$||L(this,U,q,2,65535,0),this[q]=U>>>8,this[q+1]=255&U,q+2},i.prototype.writeUInt32LE=function(U,q,$){return U=+U,q>>>=0,$||L(this,U,q,4,4294967295,0),this[q+3]=U>>>24,this[q+2]=U>>>16,this[q+1]=U>>>8,this[q]=255&U,q+4},i.prototype.writeUInt32BE=function(U,q,$){return U=+U,q>>>=0,$||L(this,U,q,4,4294967295,0),this[q]=U>>>24,this[q+1]=U>>>16,this[q+2]=U>>>8,this[q+3]=255&U,q+4},i.prototype.writeIntLE=function(U,q,$,ne){if(U=+U,q>>>=0,!ne){var H=Math.pow(2,8*$-1);L(this,U,q,$,H-1,-H)}var Q=0,ee=1,ie=0;for(this[q]=255&U;++Q<$&&(ee*=256);)U<0&&ie===0&&this[q+Q-1]!==0&&(ie=1),this[q+Q]=(U/ee>>0)-ie&255;return q+$},i.prototype.writeIntBE=function(U,q,$,ne){if(U=+U,q>>>=0,!ne){var H=Math.pow(2,8*$-1);L(this,U,q,$,H-1,-H)}var Q=$-1,ee=1,ie=0;for(this[q+Q]=255&U;--Q>=0&&(ee*=256);)U<0&&ie===0&&this[q+Q+1]!==0&&(ie=1),this[q+Q]=(U/ee>>0)-ie&255;return q+$},i.prototype.writeInt8=function(U,q,$){return U=+U,q>>>=0,$||L(this,U,q,1,127,-128),U<0&&(U=255+U+1),this[q]=255&U,q+1},i.prototype.writeInt16LE=function(U,q,$){return U=+U,q>>>=0,$||L(this,U,q,2,32767,-32768),this[q]=255&U,this[q+1]=U>>>8,q+2},i.prototype.writeInt16BE=function(U,q,$){return U=+U,q>>>=0,$||L(this,U,q,2,32767,-32768),this[q]=U>>>8,this[q+1]=255&U,q+2},i.prototype.writeInt32LE=function(U,q,$){return U=+U,q>>>=0,$||L(this,U,q,4,2147483647,-2147483648),this[q]=255&U,this[q+1]=U>>>8,this[q+2]=U>>>16,this[q+3]=U>>>24,q+4},i.prototype.writeInt32BE=function(U,q,$){return U=+U,q>>>=0,$||L(this,U,q,4,2147483647,-2147483648),U<0&&(U=4294967295+U+1),this[q]=U>>>24,this[q+1]=U>>>16,this[q+2]=U>>>8,this[q+3]=255&U,q+4},i.prototype.writeFloatLE=function(U,q,$){return N(this,U,q,!0,$)},i.prototype.writeFloatBE=function(U,q,$){return N(this,U,q,!1,$)},i.prototype.writeDoubleLE=function(U,q,$){return B(this,U,q,!0,$)},i.prototype.writeDoubleBE=function(U,q,$){return B(this,U,q,!1,$)},i.prototype.copy=function(U,q,$,ne){if(!i.isBuffer(U))throw new TypeError("argument should be a Buffer");if($||($=0),ne||ne===0||(ne=this.length),q>=U.length&&(q=U.length),q||(q=0),ne>0&&ne<$&&(ne=$),ne===$||U.length===0||this.length===0)return 0;if(q<0)throw new RangeError("targetStart out of bounds");if($<0||$>=this.length)throw new RangeError("Index out of range");if(ne<0)throw new RangeError("sourceEnd out of bounds");ne>this.length&&(ne=this.length),U.length-q=0;--Q)U[Q+q]=this[Q+$];else Uint8Array.prototype.set.call(U,this.subarray($,ne),q);return H},i.prototype.fill=function(U,q,$,ne){if(typeof U=="string"){if(typeof q=="string"?(ne=q,q=0,$=this.length):typeof $=="string"&&(ne=$,$=this.length),ne!==void 0&&typeof ne!="string")throw new TypeError("encoding must be a string");if(typeof ne=="string"&&!i.isEncoding(ne))throw new TypeError("Unknown encoding: "+ne);if(U.length===1){var H=U.charCodeAt(0);(ne==="utf8"&&H<128||ne==="latin1")&&(U=H)}}else typeof U=="number"&&(U&=255);if(q<0||this.length>>=0,$=$===void 0?this.length:$>>>0,U||(U=0),typeof U=="number")for(Q=q;Q<$;++Q)this[Q]=U;else{var ee=i.isBuffer(U)?U:i.from(U,ne),ie=ee.length;if(ie===0)throw new TypeError('The value "'+U+'" is invalid for argument "value"');for(Q=0;Q<$-q;++Q)this[Q+q]=ee[Q%ie]}return this};var G=/[^+/0-9A-Za-z-_]/g;function W(U){return U<16?"0"+U.toString(16):U.toString(16)}function K(U,q){var $;q=q||1/0;for(var ne=U.length,H=null,Q=[],ee=0;ee55295&&$<57344){if(!H){if($>56319){(q-=3)>-1&&Q.push(239,191,189);continue}if(ee+1===ne){(q-=3)>-1&&Q.push(239,191,189);continue}H=$;continue}if($<56320){(q-=3)>-1&&Q.push(239,191,189),H=$;continue}$=65536+(H-55296<<10|$-56320)}else H&&(q-=3)>-1&&Q.push(239,191,189);if(H=null,$<128){if((q-=1)<0)break;Q.push($)}else if($<2048){if((q-=2)<0)break;Q.push($>>6|192,63&$|128)}else if($<65536){if((q-=3)<0)break;Q.push($>>12|224,$>>6&63|128,63&$|128)}else{if(!($<1114112))throw new Error("Invalid code point");if((q-=4)<0)break;Q.push($>>18|240,$>>12&63|128,$>>6&63|128,63&$|128)}}return Q}function te(U){return a.toByteArray(function(q){if((q=(q=q.split("=")[0]).trim().replace(G,"")).length<2)return"";for(;q.length%4!=0;)q+="=";return q}(U))}function Y(U,q,$,ne){for(var H=0;H=q.length||H>=U.length);++H)q[H+$]=U[H];return H}function Z(U,q){return U instanceof q||U!=null&&U.constructor!=null&&U.constructor.name!=null&&U.constructor.name===q.name}function re(U){return U!=U}}).call(this)}).call(this,e("buffer").Buffer)},{"base64-js":79,buffer:85,ieee754:230}],86:[function(e,o,f){o.exports=function(r,a,u){return au?u:r:ra?a:r}},{}],87:[function(e,o,f){var r=e("clamp");function a(u,c){c==null&&(c=!0);var i=u[0],s=u[1],l=u[2],d=u[3];return d==null&&(d=c?1:255),c&&(i*=255,s*=255,l*=255,d*=255),16777216*(i=255&r(i,0,255))+((s=255&r(s,0,255))<<16)+((l=255&r(l,0,255))<<8)+(d=255&r(d,0,255))}o.exports=a,o.exports.to=a,o.exports.from=function(u,c){var i=(u=+u)>>>24,s=(16711680&u)>>>16,l=(65280&u)>>>8,d=255&u;return c===!1?[i,s,l,d]:[i/255,s/255,l/255,d/255]}},{clamp:86}],88:[function(e,o,f){o.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},{}],89:[function(e,o,f){var r=e("color-rgba"),a=e("clamp"),u=e("dtype");o.exports=function(c,i){i!=="float"&&i||(i="array"),i==="uint"&&(i="uint8"),i==="uint_clamped"&&(i="uint8_clamped");var s=new(u(i))(4),l=i!=="uint8"&&i!=="uint8_clamped";return c.length&&typeof c!="string"||((c=r(c))[0]/=255,c[1]/=255,c[2]/=255),function(d){return d instanceof Uint8Array||d instanceof Uint8ClampedArray||!!(Array.isArray(d)&&(d[0]>1||d[0]===0)&&(d[1]>1||d[1]===0)&&(d[2]>1||d[2]===0)&&(!d[3]||d[3]>1))}(c)?(s[0]=c[0],s[1]=c[1],s[2]=c[2],s[3]=c[3]!=null?c[3]:255,l&&(s[0]/=255,s[1]/=255,s[2]/=255,s[3]/=255),s):(l?(s[0]=c[0],s[1]=c[1],s[2]=c[2],s[3]=c[3]!=null?c[3]:1):(s[0]=a(Math.floor(255*c[0]),0,255),s[1]=a(Math.floor(255*c[1]),0,255),s[2]=a(Math.floor(255*c[2]),0,255),s[3]=c[3]==null?255:a(Math.floor(255*c[3]),0,255)),s)}},{clamp:86,"color-rgba":91,dtype:127}],90:[function(e,o,f){(function(r){(function(){var a=e("color-name"),u=e("is-plain-obj"),c=e("defined");o.exports=function(s){var l,d,h=[],m=1;if(typeof s=="string")if(a[s])h=a[s].slice(),d="rgb";else if(s==="transparent")m=0,d="rgb",h=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(s)){var g=(y=s.slice(1)).length;m=1,g<=4?(h=[parseInt(y[0]+y[0],16),parseInt(y[1]+y[1],16),parseInt(y[2]+y[2],16)],g===4&&(m=parseInt(y[3]+y[3],16)/255)):(h=[parseInt(y[0]+y[1],16),parseInt(y[2]+y[3],16),parseInt(y[4]+y[5],16)],g===8&&(m=parseInt(y[6]+y[7],16)/255)),h[0]||(h[0]=0),h[1]||(h[1]=0),h[2]||(h[2]=0),d="rgb"}else if(l=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(s)){var p=l[1],v=p==="rgb",y=p.replace(/a$/,"");d=y,g=y==="cmyk"?4:y==="gray"?1:3,h=l[2].trim().split(/\s*,\s*/).map(function(w,k){if(/%$/.test(w))return k===g?parseFloat(w)/100:y==="rgb"?255*parseFloat(w)/100:parseFloat(w);if(y[k]==="h"){if(/deg$/.test(w))return parseFloat(w);if(i[w]!==void 0)return i[w]}return parseFloat(w)}),p===y&&h.push(1),m=v||h[g]===void 0?1:h[g],h=h.slice(0,g)}else s.length>10&&/[0-9](?:\s|\/)/.test(s)&&(h=s.match(/([0-9]+)/g).map(function(w){return parseFloat(w)}),d=s.match(/([a-z])/gi).join("").toLowerCase());else if(isNaN(s))if(u(s)){var x=c(s.r,s.red,s.R,null);x!==null?(d="rgb",h=[x,c(s.g,s.green,s.G),c(s.b,s.blue,s.B)]):(d="hsl",h=[c(s.h,s.hue,s.H),c(s.s,s.saturation,s.S),c(s.l,s.lightness,s.L,s.b,s.brightness)]),m=c(s.a,s.alpha,s.opacity,1),s.opacity!=null&&(m/=100)}else(Array.isArray(s)||r.ArrayBuffer&&ArrayBuffer.isView&&ArrayBuffer.isView(s))&&(h=[s[0],s[1],s[2]],d="rgb",m=s.length===4?s[3]:1);else d="rgb",h=[s>>>16,(65280&s)>>>8,255&s];return{space:d,values:h,alpha:m}};var i={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}).call(this)}).call(this,typeof Ro<"u"?Ro:typeof self<"u"?self:typeof window<"u"?window:{})},{"color-name":88,defined:124,"is-plain-obj":236}],91:[function(e,o,f){var r=e("color-parse"),a=e("color-space/hsl"),u=e("clamp");o.exports=function(c){var i,s=r(c);return s.space?((i=Array(3))[0]=u(s.values[0],0,255),i[1]=u(s.values[1],0,255),i[2]=u(s.values[2],0,255),s.space[0]==="h"&&(i=a.rgb(i)),i.push(u(s.alpha,0,1)),i):[]}},{clamp:86,"color-parse":90,"color-space/hsl":92}],92:[function(e,o,f){var r=e("./rgb");o.exports={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(a){var u,c,i,s,l,d=a[0]/360,h=a[1]/100,m=a[2]/100;if(h===0)return[l=255*m,l,l];u=2*m-(c=m<.5?m*(1+h):m+h-m*h),s=[0,0,0];for(var g=0;g<3;g++)(i=d+1/3*-(g-1))<0?i++:i>1&&i--,l=6*i<1?u+6*(c-u)*i:2*i<1?c:3*i<2?u+(c-u)*(2/3-i)*6:u,s[g]=255*l;return s}},r.hsl=function(a){var u,c,i=a[0]/255,s=a[1]/255,l=a[2]/255,d=Math.min(i,s,l),h=Math.max(i,s,l),m=h-d;return h===d?u=0:i===h?u=(s-l)/m:s===h?u=2+(l-i)/m:l===h&&(u=4+(i-s)/m),(u=Math.min(60*u,360))<0&&(u+=360),c=(d+h)/2,[u,100*(h===d?0:c<=.5?m/(h+d):m/(2-h-d)),100*c]}},{"./rgb":93}],93:[function(e,o,f){o.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}},{}],94:[function(e,o,f){o.exports={AFG:"afghan",ALA:"\\b\\wland",ALB:"albania",DZA:"algeria",ASM:"^(?=.*americ).*samoa",AND:"andorra",AGO:"angola",AIA:"anguill?a",ATA:"antarctica",ATG:"antigua",ARG:"argentin",ARM:"armenia",ABW:"^(?!.*bonaire).*\\baruba",AUS:"australia",AUT:"^(?!.*hungary).*austria|\\baustri.*\\bemp",AZE:"azerbaijan",BHS:"bahamas",BHR:"bahrain",BGD:"bangladesh|^(?=.*east).*paki?stan",BRB:"barbados",BLR:"belarus|byelo",BEL:"^(?!.*luxem).*belgium",BLZ:"belize|^(?=.*british).*honduras",BEN:"benin|dahome",BMU:"bermuda",BTN:"bhutan",BOL:"bolivia",BES:"^(?=.*bonaire).*eustatius|^(?=.*carib).*netherlands|\\bbes.?islands",BIH:"herzegovina|bosnia",BWA:"botswana|bechuana",BVT:"bouvet",BRA:"brazil",IOT:"british.?indian.?ocean",BRN:"brunei",BGR:"bulgaria",BFA:"burkina|\\bfaso|upper.?volta",BDI:"burundi",CPV:"verde",KHM:"cambodia|kampuchea|khmer",CMR:"cameroon",CAN:"canada",CYM:"cayman",CAF:"\\bcentral.african.republic",TCD:"\\bchad",CHL:"\\bchile",CHN:"^(?!.*\\bmac)(?!.*\\bhong)(?!.*\\btai)(?!.*\\brep).*china|^(?=.*peo)(?=.*rep).*china",CXR:"christmas",CCK:"\\bcocos|keeling",COL:"colombia",COM:"comoro",COG:"^(?!.*\\bdem)(?!.*\\bd[\\.]?r)(?!.*kinshasa)(?!.*zaire)(?!.*belg)(?!.*l.opoldville)(?!.*free).*\\bcongo",COK:"\\bcook",CRI:"costa.?rica",CIV:"ivoire|ivory",HRV:"croatia",CUB:"\\bcuba",CUW:"^(?!.*bonaire).*\\bcura(c|\xE7)ao",CYP:"cyprus",CSK:"czechoslovakia",CZE:"^(?=.*rep).*czech|czechia|bohemia",COD:"\\bdem.*congo|congo.*\\bdem|congo.*\\bd[\\.]?r|\\bd[\\.]?r.*congo|belgian.?congo|congo.?free.?state|kinshasa|zaire|l.opoldville|drc|droc|rdc",DNK:"denmark",DJI:"djibouti",DMA:"dominica(?!n)",DOM:"dominican.rep",ECU:"ecuador",EGY:"egypt",SLV:"el.?salvador",GNQ:"guine.*eq|eq.*guine|^(?=.*span).*guinea",ERI:"eritrea",EST:"estonia",ETH:"ethiopia|abyssinia",FLK:"falkland|malvinas",FRO:"faroe|faeroe",FJI:"fiji",FIN:"finland",FRA:"^(?!.*\\bdep)(?!.*martinique).*france|french.?republic|\\bgaul",GUF:"^(?=.*french).*guiana",PYF:"french.?polynesia|tahiti",ATF:"french.?southern",GAB:"gabon",GMB:"gambia",GEO:"^(?!.*south).*georgia",DDR:"german.?democratic.?republic|democratic.?republic.*germany|east.germany",DEU:"^(?!.*east).*germany|^(?=.*\\bfed.*\\brep).*german",GHA:"ghana|gold.?coast",GIB:"gibraltar",GRC:"greece|hellenic|hellas",GRL:"greenland",GRD:"grenada",GLP:"guadeloupe",GUM:"\\bguam",GTM:"guatemala",GGY:"guernsey",GIN:"^(?!.*eq)(?!.*span)(?!.*bissau)(?!.*portu)(?!.*new).*guinea",GNB:"bissau|^(?=.*portu).*guinea",GUY:"guyana|british.?guiana",HTI:"haiti",HMD:"heard.*mcdonald",VAT:"holy.?see|vatican|papal.?st",HND:"^(?!.*brit).*honduras",HKG:"hong.?kong",HUN:"^(?!.*austr).*hungary",ISL:"iceland",IND:"india(?!.*ocea)",IDN:"indonesia",IRN:"\\biran|persia",IRQ:"\\biraq|mesopotamia",IRL:"(^ireland)|(^republic.*ireland)",IMN:"^(?=.*isle).*\\bman",ISR:"israel",ITA:"italy",JAM:"jamaica",JPN:"japan",JEY:"jersey",JOR:"jordan",KAZ:"kazak",KEN:"kenya|british.?east.?africa|east.?africa.?prot",KIR:"kiribati",PRK:"^(?=.*democrat|people|north|d.*p.*.r).*\\bkorea|dprk|korea.*(d.*p.*r)",KWT:"kuwait",KGZ:"kyrgyz|kirghiz",LAO:"\\blaos?\\b",LVA:"latvia",LBN:"lebanon",LSO:"lesotho|basuto",LBR:"liberia",LBY:"libya",LIE:"liechtenstein",LTU:"lithuania",LUX:"^(?!.*belg).*luxem",MAC:"maca(o|u)",MDG:"madagascar|malagasy",MWI:"malawi|nyasa",MYS:"malaysia",MDV:"maldive",MLI:"\\bmali\\b",MLT:"\\bmalta",MHL:"marshall",MTQ:"martinique",MRT:"mauritania",MUS:"mauritius",MYT:"\\bmayotte",MEX:"\\bmexic",FSM:"fed.*micronesia|micronesia.*fed",MCO:"monaco",MNG:"mongolia",MNE:"^(?!.*serbia).*montenegro",MSR:"montserrat",MAR:"morocco|\\bmaroc",MOZ:"mozambique",MMR:"myanmar|burma",NAM:"namibia",NRU:"nauru",NPL:"nepal",NLD:"^(?!.*\\bant)(?!.*\\bcarib).*netherlands",ANT:"^(?=.*\\bant).*(nether|dutch)",NCL:"new.?caledonia",NZL:"new.?zealand",NIC:"nicaragua",NER:"\\bniger(?!ia)",NGA:"nigeria",NIU:"niue",NFK:"norfolk",MNP:"mariana",NOR:"norway",OMN:"\\boman|trucial",PAK:"^(?!.*east).*paki?stan",PLW:"palau",PSE:"palestin|\\bgaza|west.?bank",PAN:"panama",PNG:"papua|new.?guinea",PRY:"paraguay",PER:"peru",PHL:"philippines",PCN:"pitcairn",POL:"poland",PRT:"portugal",PRI:"puerto.?rico",QAT:"qatar",KOR:"^(?!.*d.*p.*r)(?!.*democrat)(?!.*people)(?!.*north).*\\bkorea(?!.*d.*p.*r)",MDA:"moldov|b(a|e)ssarabia",REU:"r(e|\xE9)union",ROU:"r(o|u|ou)mania",RUS:"\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics",RWA:"rwanda",BLM:"barth(e|\xE9)lemy",SHN:"helena",KNA:"kitts|\\bnevis",LCA:"\\blucia",MAF:"^(?=.*collectivity).*martin|^(?=.*france).*martin(?!ique)|^(?=.*french).*martin(?!ique)",SPM:"miquelon",VCT:"vincent",WSM:"^(?!.*amer).*samoa",SMR:"san.?marino",STP:"\\bs(a|\xE3)o.?tom(e|\xE9)",SAU:"\\bsa\\w*.?arabia",SEN:"senegal",SRB:"^(?!.*monte).*serbia",SYC:"seychell",SLE:"sierra",SGP:"singapore",SXM:"^(?!.*martin)(?!.*saba).*maarten",SVK:"^(?!.*cze).*slovak",SVN:"slovenia",SLB:"solomon",SOM:"somali",ZAF:"south.africa|s\\\\..?africa",SGS:"south.?georgia|sandwich",SSD:"\\bs\\w*.?sudan",ESP:"spain",LKA:"sri.?lanka|ceylon",SDN:"^(?!.*\\bs(?!u)).*sudan",SUR:"surinam|dutch.?guiana",SJM:"svalbard",SWZ:"swaziland",SWE:"sweden",CHE:"switz|swiss",SYR:"syria",TWN:"taiwan|taipei|formosa|^(?!.*peo)(?=.*rep).*china",TJK:"tajik",THA:"thailand|\\bsiam",MKD:"macedonia|fyrom",TLS:"^(?=.*leste).*timor|^(?=.*east).*timor",TGO:"togo",TKL:"tokelau",TON:"tonga",TTO:"trinidad|tobago",TUN:"tunisia",TUR:"turkey",TKM:"turkmen",TCA:"turks",TUV:"tuvalu",UGA:"uganda",UKR:"ukrain",ARE:"emirates|^u\\.?a\\.?e\\.?$|united.?arab.?em",GBR:"united.?kingdom|britain|^u\\.?k\\.?$",TZA:"tanzania",USA:"united.?states\\b(?!.*islands)|\\bu\\.?s\\.?a\\.?\\b|^\\s*u\\.?s\\.?\\b(?!.*islands)",UMI:"minor.?outlying.?is",URY:"uruguay",UZB:"uzbek",VUT:"vanuatu|new.?hebrides",VEN:"venezuela",VNM:"^(?!.*republic).*viet.?nam|^(?=.*socialist).*viet.?nam",VGB:"^(?=.*\\bu\\.?\\s?k).*virgin|^(?=.*brit).*virgin|^(?=.*kingdom).*virgin",VIR:"^(?=.*\\bu\\.?\\s?s).*virgin|^(?=.*states).*virgin",WLF:"futuna|wallis",ESH:"western.sahara",YEM:"^(?!.*arab)(?!.*north)(?!.*sana)(?!.*peo)(?!.*dem)(?!.*south)(?!.*aden)(?!.*\\bp\\.?d\\.?r).*yemen",YMD:"^(?=.*peo).*yemen|^(?!.*rep)(?=.*dem).*yemen|^(?=.*south).*yemen|^(?=.*aden).*yemen|^(?=.*\\bp\\.?d\\.?r).*yemen",YUG:"yugoslavia",ZMB:"zambia|northern.?rhodesia",EAZ:"zanzibar",ZWE:"zimbabwe|^(?!.*northern).*rhodesia"}},{}],95:[function(e,o,f){o.exports=["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]},{}],96:[function(e,o,f){o.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]},{}],97:[function(e,o,f){o.exports=["normal","italic","oblique"]},{}],98:[function(e,o,f){o.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]},{}],99:[function(e,o,f){o.exports={parse:e("./parse"),stringify:e("./stringify")}},{"./parse":101,"./stringify":102}],100:[function(e,o,f){var r=e("css-font-size-keywords");o.exports={isSize:function(a){return/^[\d\.]/.test(a)||a.indexOf("/")!==-1||r.indexOf(a)!==-1}}},{"css-font-size-keywords":95}],101:[function(e,o,f){var r=e("unquote"),a=e("css-global-keywords"),u=e("css-system-font-keywords"),c=e("css-font-weight-keywords"),i=e("css-font-style-keywords"),s=e("css-font-stretch-keywords"),l=e("string-split-by"),d=e("./lib/util").isSize;o.exports=m;var h=m.cache={};function m(p){if(typeof p!="string")throw new Error("Font argument must be a string.");if(h[p])return h[p];if(p==="")throw new Error("Cannot parse an empty string.");if(u.indexOf(p)!==-1)return h[p]={system:p};for(var v,y={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},x=l(p,/\s+/);v=x.shift();){if(a.indexOf(v)!==-1)return["style","variant","weight","stretch"].forEach(function(k){y[k]=v}),h[p]=y;if(i.indexOf(v)===-1)if(v!=="normal"&&v!=="small-caps")if(s.indexOf(v)===-1){if(c.indexOf(v)===-1){if(d(v)){var w=l(v,"/");if(y.size=w[0],w[1]!=null?y.lineHeight=g(w[1]):x[0]==="/"&&(x.shift(),y.lineHeight=g(x.shift())),!x.length)throw new Error("Missing required font-family.");return y.family=l(x.join(" "),/\s*,\s*/).map(r),h[p]=y}throw new Error("Unknown or unsupported font token: "+v)}y.weight=v}else y.stretch=v;else y.variant=v;else y.style=v}throw new Error("Missing required font-size.")}function g(p){var v=parseFloat(p);return v.toString()===p?v:p}},{"./lib/util":100,"css-font-stretch-keywords":96,"css-font-style-keywords":97,"css-font-weight-keywords":98,"css-global-keywords":103,"css-system-font-keywords":104,"string-split-by":305,unquote:328}],102:[function(e,o,f){var r=e("pick-by-alias"),a=e("./lib/util").isSize,u=v(e("css-global-keywords")),c=v(e("css-system-font-keywords")),i=v(e("css-font-weight-keywords")),s=v(e("css-font-style-keywords")),l=v(e("css-font-stretch-keywords")),d={normal:1,"small-caps":1},h={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},m="1rem",g="serif";function p(y,x){if(y&&!x[y]&&!u[y])throw Error("Unknown keyword `"+y+"`");return y}function v(y){for(var x={},w=0;wL?1:z>=L?0:NaN}function u(z){var L;return z.length===1&&(L=z,z=function(P,N){return a(L(P),N)}),{left:function(P,N,B,G){for(B==null&&(B=0),G==null&&(G=P.length);B>>1;z(P[W],N)<0?B=W+1:G=W}return B},right:function(P,N,B,G){for(B==null&&(B=0),G==null&&(G=P.length);B>>1;z(P[W],N)>0?G=W:B=W+1}return B}}}var c=u(a),i=c.right,s=c.left;function l(z,L){return[z,L]}function d(z){return z===null?NaN:+z}function h(z,L){var P,N,B=z.length,G=0,W=-1,K=0,te=0;if(L==null)for(;++W1)return te/(G-1)}function m(z,L){var P=h(z,L);return P&&Math.sqrt(P)}function g(z,L){var P,N,B,G=z.length,W=-1;if(L==null){for(;++W=P)for(N=B=P;++WP&&(N=P),B=P)for(N=B=P;++WP&&(N=P),B=0?(G>=b?10:G>=T?5:G>=_?2:1)*Math.pow(10,B):-Math.pow(10,-B)/(G>=b?10:G>=T?5:G>=_?2:1)}function A(z,L,P){var N=Math.abs(L-z)/Math.max(0,P),B=Math.pow(10,Math.floor(Math.log(N)/Math.LN10)),G=N/B;return G>=b?B*=10:G>=T?B*=5:G>=_&&(B*=2),L=1)return+P(z[N-1],N-1,z);var N,B=(N-1)*L,G=Math.floor(B),W=+P(z[G],G,z);return W+(+P(z[G+1],G+1,z)-W)*(B-G)}}function D(z,L){var P,N,B=z.length,G=-1;if(L==null){for(;++G=P)for(N=P;++GP&&(N=P)}else for(;++G=P)for(N=P;++GP&&(N=P);return N}function O(z){if(!(B=z.length))return[];for(var L=-1,P=D(z,R),N=new Array(P);++Lz?1:L>=z?0:NaN},r.deviation=m,r.extent=g,r.histogram=function(){var z=w,L=g,P=S;function N(B){var G,W,K=B.length,te=new Array(K);for(G=0;Gre;)U.pop(),--q;var $,ne=new Array(q+1);for(G=0;G<=q;++G)($=ne[G]=[]).x0=G>0?U[G-1]:Z,$.x1=G=P)for(N=P;++GN&&(N=P)}else for(;++G=P)for(N=P;++GN&&(N=P);return N},r.mean=function(z,L){var P,N=z.length,B=N,G=-1,W=0;if(L==null)for(;++G=0;)for(L=(N=z[B]).length;--L>=0;)P[--W]=N[L];return P},r.min=D,r.pairs=function(z,L){L==null&&(L=l);for(var P=0,N=z.length-1,B=z[0],G=new Array(N<0?0:N);P0)return[z];if((N=L0)for(z=Math.ceil(z/W),L=Math.floor(L/W),G=new Array(B=Math.ceil(L-z+1));++K=y.length)return g!=null&&k.sort(g),p!=null?p(k):k;for(var M,A,S,E=-1,D=k.length,O=y[b++],R=u(),z=T();++Ey.length)return T;var M,A=x[_-1];return p!=null&&_>=y.length?M=T.entries():(M=[],T.each(function(S,E){M.push({key:E,values:b(S,_)})})),A!=null?M.sort(function(S,E){return A(S.key,E.key)}):M}(w(k,0,s,l),0)},key:function(k){return y.push(k),v},sortKeys:function(k){return x[y.length-1]=k,v},sortValues:function(k){return g=k,v},rollup:function(k){return p=k,v}}},r.set=m,r.map=u,r.keys=function(g){var p=[];for(var v in g)p.push(v);return p},r.values=function(g){var p=[];for(var v in g)p.push(g[v]);return p},r.entries=function(g){var p=[];for(var v in g)p.push({key:v,value:g[v]});return p},Object.defineProperty(r,"__esModule",{value:!0})})},{}],109:[function(e,o,f){(function(r,a){a(typeof f=="object"&&o!==void 0?f:(r=r||self).d3=r.d3||{})})(this,function(r){function a(de,ye,Me){de.prototype=ye.prototype=Me,Me.constructor=de}function u(de,ye){var Me=Object.create(de.prototype);for(var ke in ye)Me[ke]=ye[ke];return Me}function c(){}var i="\\s*([+-]?\\d+)\\s*",s="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",l="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",d=/^#([0-9a-f]{3,8})$/,h=new RegExp("^rgb\\("+[i,i,i]+"\\)$"),m=new RegExp("^rgb\\("+[l,l,l]+"\\)$"),g=new RegExp("^rgba\\("+[i,i,i,s]+"\\)$"),p=new RegExp("^rgba\\("+[l,l,l,s]+"\\)$"),v=new RegExp("^hsl\\("+[s,l,l]+"\\)$"),y=new RegExp("^hsla\\("+[s,l,l,s]+"\\)$"),x={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function w(){return this.rgb().formatHex()}function k(){return this.rgb().formatRgb()}function b(de){var ye,Me;return de=(de+"").trim().toLowerCase(),(ye=d.exec(de))?(Me=ye[1].length,ye=parseInt(ye[1],16),Me===6?T(ye):Me===3?new S(ye>>8&15|ye>>4&240,ye>>4&15|240&ye,(15&ye)<<4|15&ye,1):Me===8?_(ye>>24&255,ye>>16&255,ye>>8&255,(255&ye)/255):Me===4?_(ye>>12&15|ye>>8&240,ye>>8&15|ye>>4&240,ye>>4&15|240&ye,((15&ye)<<4|15&ye)/255):null):(ye=h.exec(de))?new S(ye[1],ye[2],ye[3],1):(ye=m.exec(de))?new S(255*ye[1]/100,255*ye[2]/100,255*ye[3]/100,1):(ye=g.exec(de))?_(ye[1],ye[2],ye[3],ye[4]):(ye=p.exec(de))?_(255*ye[1]/100,255*ye[2]/100,255*ye[3]/100,ye[4]):(ye=v.exec(de))?R(ye[1],ye[2]/100,ye[3]/100,1):(ye=y.exec(de))?R(ye[1],ye[2]/100,ye[3]/100,ye[4]):x.hasOwnProperty(de)?T(x[de]):de==="transparent"?new S(NaN,NaN,NaN,0):null}function T(de){return new S(de>>16&255,de>>8&255,255&de,1)}function _(de,ye,Me,ke){return ke<=0&&(de=ye=Me=NaN),new S(de,ye,Me,ke)}function M(de){return de instanceof c||(de=b(de)),de?new S((de=de.rgb()).r,de.g,de.b,de.opacity):new S}function A(de,ye,Me,ke){return arguments.length===1?M(de):new S(de,ye,Me,ke??1)}function S(de,ye,Me,ke){this.r=+de,this.g=+ye,this.b=+Me,this.opacity=+ke}function E(){return"#"+O(this.r)+O(this.g)+O(this.b)}function D(){var de=this.opacity;return((de=isNaN(de)?1:Math.max(0,Math.min(1,de)))===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(de===1?")":", "+de+")")}function O(de){return((de=Math.max(0,Math.min(255,Math.round(de)||0)))<16?"0":"")+de.toString(16)}function R(de,ye,Me,ke){return ke<=0?de=ye=Me=NaN:Me<=0||Me>=1?de=ye=NaN:ye<=0&&(de=NaN),new P(de,ye,Me,ke)}function z(de){if(de instanceof P)return new P(de.h,de.s,de.l,de.opacity);if(de instanceof c||(de=b(de)),!de)return new P;if(de instanceof P)return de;var ye=(de=de.rgb()).r/255,Me=de.g/255,ke=de.b/255,Ee=Math.min(ye,Me,ke),ze=Math.max(ye,Me,ke),Fe=NaN,Ve=ze-Ee,Ke=(ze+Ee)/2;return Ve?(Fe=ye===ze?(Me-ke)/Ve+6*(Me0&&Ke<1?0:Fe,new P(Fe,Ve,Ke,de.opacity)}function L(de,ye,Me,ke){return arguments.length===1?z(de):new P(de,ye,Me,ke??1)}function P(de,ye,Me,ke){this.h=+de,this.s=+ye,this.l=+Me,this.opacity=+ke}function N(de,ye,Me){return 255*(de<60?ye+(Me-ye)*de/60:de<180?Me:de<240?ye+(Me-ye)*(240-de)/60:ye)}a(c,b,{copy:function(de){return Object.assign(new this.constructor,this,de)},displayable:function(){return this.rgb().displayable()},hex:w,formatHex:w,formatHsl:function(){return z(this).formatHsl()},formatRgb:k,toString:k}),a(S,A,u(c,{brighter:function(de){return de=de==null?1/.7:Math.pow(1/.7,de),new S(this.r*de,this.g*de,this.b*de,this.opacity)},darker:function(de){return de=de==null?.7:Math.pow(.7,de),new S(this.r*de,this.g*de,this.b*de,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:E,formatHex:E,formatRgb:D,toString:D})),a(P,L,u(c,{brighter:function(de){return de=de==null?1/.7:Math.pow(1/.7,de),new P(this.h,this.s,this.l*de,this.opacity)},darker:function(de){return de=de==null?.7:Math.pow(.7,de),new P(this.h,this.s,this.l*de,this.opacity)},rgb:function(){var de=this.h%360+360*(this.h<0),ye=isNaN(de)||isNaN(this.s)?0:this.s,Me=this.l,ke=Me+(Me<.5?Me:1-Me)*ye,Ee=2*Me-ke;return new S(N(de>=240?de-240:de+120,Ee,ke),N(de,Ee,ke),N(de<120?de+240:de-120,Ee,ke),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var de=this.opacity;return((de=isNaN(de)?1:Math.max(0,Math.min(1,de)))===1?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(de===1?")":", "+de+")")}}));var B=Math.PI/180,G=180/Math.PI,W=6/29,K=3*W*W;function te(de){if(de instanceof Z)return new Z(de.l,de.a,de.b,de.opacity);if(de instanceof Q)return ee(de);de instanceof S||(de=M(de));var ye,Me,ke=$(de.r),Ee=$(de.g),ze=$(de.b),Fe=re((.2225045*ke+.7168786*Ee+.0606169*ze)/1);return ke===Ee&&Ee===ze?ye=Me=Fe:(ye=re((.4360747*ke+.3850649*Ee+.1430804*ze)/.96422),Me=re((.0139322*ke+.0971045*Ee+.7141733*ze)/.82521)),new Z(116*Fe-16,500*(ye-Fe),200*(Fe-Me),de.opacity)}function Y(de,ye,Me,ke){return arguments.length===1?te(de):new Z(de,ye,Me,ke??1)}function Z(de,ye,Me,ke){this.l=+de,this.a=+ye,this.b=+Me,this.opacity=+ke}function re(de){return de>.008856451679035631?Math.pow(de,1/3):de/K+4/29}function U(de){return de>W?de*de*de:K*(de-4/29)}function q(de){return 255*(de<=.0031308?12.92*de:1.055*Math.pow(de,1/2.4)-.055)}function $(de){return(de/=255)<=.04045?de/12.92:Math.pow((de+.055)/1.055,2.4)}function ne(de){if(de instanceof Q)return new Q(de.h,de.c,de.l,de.opacity);if(de instanceof Z||(de=te(de)),de.a===0&&de.b===0)return new Q(NaN,0=0&&(g=m.slice(p+1),m=m.slice(0,p)),m&&!h.hasOwnProperty(m))throw new Error("unknown type: "+m);return{type:m,name:g}})}function s(d,h){for(var m,g=0,p=d.length;g0)for(var m,g,p=new Array(m),v=0;vO+U||teR+U||YD.index){var q=O-Z.x-Z.vx,$=R-Z.y-Z.vy,ne=q*q+$*$;neS.r&&(S.r=S[E].r)}function A(){if(w){var S,E,D=w.length;for(k=new Array(D),S=0;S=M)){(R.data!==w||R.next)&&(N===0&&(W+=(N=l())*N),B===0&&(W+=(B=l())*B),W<_&&(W=Math.sqrt(_*W)));do R.data!==w&&(G=b[R.data.index]*k/W,w.vx+=N*G,w.vy+=B*G);while(R=R.next)}}return S.initialize=function(R){x=R,E()},S.strength=function(R){return arguments.length?(T=typeof R=="function"?R:s(+R),E(),S):T},S.distanceMin=function(R){return arguments.length?(_=R*R,S):Math.sqrt(_)},S.distanceMax=function(R){return arguments.length?(M=R*R,S):Math.sqrt(M)},S.theta=function(R){return arguments.length?(A=R*R,S):Math.sqrt(A)},S},r.forceRadial=function(x,w,k){var b,T,_,M=s(.1);function A(E){for(var D=0,O=b.length;D1?(P==null?A.remove(L):A.set(L,z(P)),w):A.get(L)},find:function(L,P,N){var B,G,W,K,te,Y=0,Z=x.length;for(N==null?N=1/0:N*=N,Y=0;Y1?(E.on(L,P),w):E.on(L)}}},r.forceX=function(x){var w,k,b,T=s(.1);function _(A){for(var S,E=0,D=w.length;E1?T[0]+T.slice(2):T,+w.slice(b+1)]}function u(w){return(w=a(Math.abs(w)))?w[1]:NaN}var c,i=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function s(w){if(!(k=i.exec(w)))throw new Error("invalid format: "+w);var k;return new l({fill:k[1],align:k[2],sign:k[3],symbol:k[4],zero:k[5],width:k[6],comma:k[7],precision:k[8]&&k[8].slice(1),trim:k[9],type:k[10]})}function l(w){this.fill=w.fill===void 0?" ":w.fill+"",this.align=w.align===void 0?">":w.align+"",this.sign=w.sign===void 0?"-":w.sign+"",this.symbol=w.symbol===void 0?"":w.symbol+"",this.zero=!!w.zero,this.width=w.width===void 0?void 0:+w.width,this.comma=!!w.comma,this.precision=w.precision===void 0?void 0:+w.precision,this.trim=!!w.trim,this.type=w.type===void 0?"":w.type+""}function d(w,k){var b=a(w,k);if(!b)return w+"";var T=b[0],_=b[1];return _<0?"0."+new Array(-_).join("0")+T:T.length>_+1?T.slice(0,_+1)+"."+T.slice(_+1):T+new Array(_-T.length+2).join("0")}s.prototype=l.prototype,l.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,0|this.width))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var h={"%":function(w,k){return(100*w).toFixed(k)},b:function(w){return Math.round(w).toString(2)},c:function(w){return w+""},d:function(w){return Math.abs(w=Math.round(w))>=1e21?w.toLocaleString("en").replace(/,/g,""):w.toString(10)},e:function(w,k){return w.toExponential(k)},f:function(w,k){return w.toFixed(k)},g:function(w,k){return w.toPrecision(k)},o:function(w){return Math.round(w).toString(8)},p:function(w,k){return d(100*w,k)},r:d,s:function(w,k){var b=a(w,k);if(!b)return w+"";var T=b[0],_=b[1],M=_-(c=3*Math.max(-8,Math.min(8,Math.floor(_/3))))+1,A=T.length;return M===A?T:M>A?T+new Array(M-A+1).join("0"):M>0?T.slice(0,M)+"."+T.slice(M):"0."+new Array(1-M).join("0")+a(w,Math.max(0,k+M-1))[0]},X:function(w){return Math.round(w).toString(16).toUpperCase()},x:function(w){return Math.round(w).toString(16)}};function m(w){return w}var g,p=Array.prototype.map,v=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function y(w){var k,b,T=w.grouping===void 0||w.thousands===void 0?m:(k=p.call(w.grouping,Number),b=w.thousands+"",function(z,L){for(var P=z.length,N=[],B=0,G=k[0],W=0;P>0&&G>0&&(W+G+1>L&&(G=Math.max(1,L-W)),N.push(z.substring(P-=G,P+G)),!((W+=G+1)>L));)G=k[B=(B+1)%k.length];return N.reverse().join(b)}),_=w.currency===void 0?"":w.currency[0]+"",M=w.currency===void 0?"":w.currency[1]+"",A=w.decimal===void 0?".":w.decimal+"",S=w.numerals===void 0?m:function(z){return function(L){return L.replace(/[0-9]/g,function(P){return z[+P]})}}(p.call(w.numerals,String)),E=w.percent===void 0?"%":w.percent+"",D=w.minus===void 0?"-":w.minus+"",O=w.nan===void 0?"NaN":w.nan+"";function R(z){var L=(z=s(z)).fill,P=z.align,N=z.sign,B=z.symbol,G=z.zero,W=z.width,K=z.comma,te=z.precision,Y=z.trim,Z=z.type;Z==="n"?(K=!0,Z="g"):h[Z]||(te===void 0&&(te=12),Y=!0,Z="g"),(G||L==="0"&&P==="=")&&(G=!0,L="0",P="=");var re=B==="$"?_:B==="#"&&/[boxX]/.test(Z)?"0"+Z.toLowerCase():"",U=B==="$"?M:/[%p]/.test(Z)?E:"",q=h[Z],$=/[defgprs%]/.test(Z);function ne(H){var Q,ee,ie,ae=re,ue=U;if(Z==="c")ue=q(H)+ue,H="";else{var le=(H=+H)<0||1/H<0;if(H=isNaN(H)?O:q(Math.abs(H),te),Y&&(H=function(me){e:for(var _e,we=me.length,Te=1,Oe=-1;Te0&&(Oe=0)}return Oe>0?me.slice(0,Oe)+me.slice(_e+1):me}(H)),le&&+H==0&&N!=="+"&&(le=!1),ae=(le?N==="("?N:D:N==="-"||N==="("?"":N)+ae,ue=(Z==="s"?v[8+c/3]:"")+ue+(le&&N==="("?")":""),$){for(Q=-1,ee=H.length;++Q(ie=H.charCodeAt(Q))||ie>57){ue=(ie===46?A+H.slice(Q+1):H.slice(Q))+ue,H=H.slice(0,Q);break}}}K&&!G&&(H=T(H,1/0));var ge=ae.length+H.length+ue.length,fe=ge>1)+ae+H+ue+fe.slice(ge);break;default:H=fe+ae+H+ue}return S(H)}return te=te===void 0?6:/[gprs]/.test(Z)?Math.max(1,Math.min(21,te)):Math.max(0,Math.min(20,te)),ne.toString=function(){return z+""},ne}return{format:R,formatPrefix:function(z,L){var P=R(((z=s(z)).type="f",z)),N=3*Math.max(-8,Math.min(8,Math.floor(u(L)/3))),B=Math.pow(10,-N),G=v[8+N/3];return function(W){return P(B*W)+G}}}}function x(w){return g=y(w),r.format=g.format,r.formatPrefix=g.formatPrefix,g}x({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),r.FormatSpecifier=l,r.formatDefaultLocale=x,r.formatLocale=y,r.formatSpecifier=s,r.precisionFixed=function(w){return Math.max(0,-u(Math.abs(w)))},r.precisionPrefix=function(w,k){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(u(k)/3)))-u(Math.abs(w)))},r.precisionRound=function(w,k){return w=Math.abs(w),k=Math.abs(k)-w,Math.max(0,u(k)-u(w))+1},Object.defineProperty(r,"__esModule",{value:!0})})},{}],113:[function(e,o,f){(function(r,a){typeof f=="object"&&o!==void 0?a(f,e("d3-geo"),e("d3-array")):a(r.d3=r.d3||{},r.d3,r.d3)})(this,function(r,a,u){var c=Math.abs,i=Math.atan,s=Math.atan2,l=Math.cos,d=Math.exp,h=Math.floor,m=Math.log,g=Math.max,p=Math.min,v=Math.pow,y=Math.round,x=Math.sign||function(je){return je>0?1:je<0?-1:0},w=Math.sin,k=Math.tan,b=1e-6,T=Math.PI,_=T/2,M=T/4,A=Math.SQRT1_2,S=P(2),E=P(T),D=2*T,O=180/T,R=T/180;function z(je){return je>1?_:je<-1?-_:Math.asin(je)}function L(je){return je>1?0:je<-1?T:Math.acos(je)}function P(je){return je>0?Math.sqrt(je):0}function N(je){return(d(je)-d(-je))/2}function B(je){return(d(je)+d(-je))/2}function G(je){var $e=k(je/2),Qe=2*m(l(je/2))/($e*$e);function ut(mt,pt){var Ct=l(mt),Qt=l(pt),en=w(pt),Yt=Qt*Ct,an=-((1-Yt?m((1+Yt)/2)/(1-Yt):-.5)+Qe/(1+Yt));return[an*Qt*w(mt),an*en]}return ut.invert=function(mt,pt){var Ct,Qt=P(mt*mt+pt*pt),en=-je/2,Yt=50;if(!Qt)return[0,0];do{var an=en/2,hn=l(an),xn=w(an),_n=xn/hn,Pn=-m(c(hn));en-=Ct=(2/_n*Pn-Qe*_n-Qt)/(-Pn/(xn*xn)+1-Qe/(2*hn*hn))*(hn<0?.7:1)}while(c(Ct)>b&&--Yt>0);var sr=w(en);return[s(mt*sr,Qt*l(en)),z(pt*sr/Qt)]},ut}function W(je,$e){var Qe=l($e),ut=function(mt){return mt?mt/Math.sin(mt):1}(L(Qe*l(je/=2)));return[2*Qe*w(je)*ut,w($e)*ut]}function K(je){var $e=w(je),Qe=l(je),ut=je>=0?1:-1,mt=k(ut*je),pt=(1+$e-Qe)/2;function Ct(Qt,en){var Yt=l(en),an=l(Qt/=2);return[(1+Yt)*w(Qt),(ut*en>-s(an,mt)-.001?0:10*-ut)+pt+w(en)*Qe-(1+Yt)*$e*an]}return Ct.invert=function(Qt,en){var Yt=0,an=0,hn=50;do{var xn=l(Yt),_n=w(Yt),Pn=l(an),sr=w(an),mr=1+Pn,zr=mr*_n-Qt,Br=pt+sr*Qe-mr*$e*xn-en,Jr=mr*xn/2,jr=-_n*sr,Oi=$e*mr*_n/2,Ui=Qe*Pn+$e*xn*sr,ua=jr*Oi-Ui*Jr,sa=(Br*jr-zr*Ui)/ua/2,ca=(zr*Oi-Br*Jr)/ua;c(ca)>2&&(ca/=2),Yt-=sa,an-=ca}while((c(sa)>b||c(ca)>b)&&--hn>0);return ut*an>-s(l(Yt),mt)-.001?[2*Yt,an]:null},Ct}function te(je,$e){var Qe=k($e/2),ut=P(1-Qe*Qe),mt=1+ut*l(je/=2),pt=w(je)*ut/mt,Ct=Qe/mt,Qt=pt*pt,en=Ct*Ct;return[4/3*pt*(3+Qt-3*en),4/3*Ct*(3+3*Qt-en)]}W.invert=function(je,$e){if(!(je*je+4*$e*$e>T*T+b)){var Qe=je,ut=$e,mt=25;do{var pt,Ct=w(Qe),Qt=w(Qe/2),en=l(Qe/2),Yt=w(ut),an=l(ut),hn=w(2*ut),xn=Yt*Yt,_n=an*an,Pn=Qt*Qt,sr=1-_n*en*en,mr=sr?L(an*en)*P(pt=1/sr):pt=0,zr=2*mr*an*Qt-je,Br=mr*Yt-$e,Jr=pt*(_n*Pn+mr*an*en*xn),jr=pt*(.5*Ct*hn-2*mr*Yt*Qt),Oi=.25*pt*(hn*Qt-mr*Yt*_n*Ct),Ui=pt*(xn*en+mr*Pn*an),ua=jr*Oi-Ui*Jr;if(!ua)break;var sa=(Br*jr-zr*Ui)/ua,ca=(zr*Oi-Br*Jr)/ua;Qe-=sa,ut-=ca}while((c(sa)>b||c(ca)>b)&&--mt>0);return[Qe,ut]}},te.invert=function(je,$e){if($e*=3/8,!(je*=3/8)&&c($e)>1)return null;var Qe=1+je*je+$e*$e,ut=P((Qe-P(Qe*Qe-4*$e*$e))/2),mt=z(ut)/3,pt=ut?function(Yt){return m(Yt+P(Yt*Yt-1))}(c($e/ut))/3:function(Yt){return m(Yt+P(Yt*Yt+1))}(c(je))/3,Ct=l(mt),Qt=B(pt),en=Qt*Qt-Ct*Ct;return[2*x(je)*s(N(pt)*Ct,.25-en),2*x($e)*s(Qt*w(mt),.25+en)]};var Y=P(8),Z=m(1+S);function re(je,$e){var Qe=c($e);return Qe_){var Ct=s(pt[1],pt[0]),Qt=P(pt[0]*pt[0]+pt[1]*pt[1]),en=$e*y((Ct-_)/$e)+_,Yt=s(w(Ct-=en),2-l(Ct));Ct=en+z(T/Qt*w(Yt))-Yt,pt[0]=Qt*l(Ct),pt[1]=Qt*w(Ct)}return pt}return Qe.invert=function(ut,mt){var pt=P(ut*ut+mt*mt);if(pt>_){var Ct=s(mt,ut),Qt=$e*y((Ct-_)/$e)+_,en=Ct>Qt?-1:1,Yt=pt*l(Qt-Ct),an=1/k(en*L((Yt-T)/P(T*(T-2*Yt)+pt*pt)));Ct=Qt+2*i((an+en*P(an*an-3))/3),ut=pt*l(Ct),mt=pt*w(Ct)}return a.geoAzimuthalEquidistantRaw.invert(ut,mt)},Qe}function q(je,$e){if(arguments.length<2&&($e=je),$e===1)return a.geoAzimuthalEqualAreaRaw;if($e===1/0)return $;function Qe(ut,mt){var pt=a.geoAzimuthalEqualAreaRaw(ut/$e,mt);return pt[0]*=je,pt}return Qe.invert=function(ut,mt){var pt=a.geoAzimuthalEqualAreaRaw.invert(ut/je,mt);return pt[0]*=$e,pt},Qe}function $(je,$e){return[je*l($e)/l($e/=2),2*w($e)]}function ne(je,$e,Qe){var ut,mt,pt,Ct=100;Qe=Qe===void 0?0:+Qe,$e=+$e;do(mt=je(Qe))===(pt=je(Qe+b))&&(pt=mt+b),Qe-=ut=-1*b*(mt-$e)/(mt-pt);while(Ct-- >0&&c(ut)>b);return Ct<0?NaN:Qe}function H(je,$e,Qe){return $e===void 0&&($e=40),Qe===void 0&&(Qe=1e-12),function(ut,mt,pt,Ct){var Qt,en,Yt;pt=pt===void 0?0:+pt,Ct=Ct===void 0?0:+Ct;for(var an=0;an<$e;an++){var hn=je(pt,Ct),xn=hn[0]-ut,_n=hn[1]-mt;if(c(xn)Qt)pt-=en/=2,Ct-=Yt/=2;else{Qt=Pn;var sr=(pt>0?-1:1)*Qe,mr=(Ct>0?-1:1)*Qe,zr=je(pt+sr,Ct),Br=je(pt,Ct+mr),Jr=(zr[0]-hn[0])/sr,jr=(zr[1]-hn[1])/sr,Oi=(Br[0]-hn[0])/mr,Ui=(Br[1]-hn[1])/mr,ua=Ui*Jr-jr*Oi,sa=(c(ua)<.5?.5:1)/ua;if(pt+=en=(_n*Oi-xn*Ui)*sa,Ct+=Yt=(xn*jr-_n*Jr)*sa,c(en)0&&(pt[1]*=1+Ct/1.5*pt[0]*pt[0]),pt}return $e.invert=H($e),$e}function ee(je,$e){var Qe,ut=je*w($e),mt=30;do $e-=Qe=($e+w($e)-ut)/(1+l($e));while(c(Qe)>b&&--mt>0);return $e/2}function ie(je,$e,Qe){function ut(mt,pt){return[je*mt*l(pt=ee(Qe,pt)),$e*w(pt)]}return ut.invert=function(mt,pt){return pt=z(pt/$e),[mt/(je*l(pt)),z((2*pt+w(2*pt))/Qe)]},ut}re.invert=function(je,$e){if((ut=c($e))1e-12&&--pt>0);return[je/(l(mt)*(Y-1/w(mt))),x($e)*mt]},$.invert=function(je,$e){var Qe=2*z($e/2);return[je*l(Qe/2)/l(Qe),Qe]};var ae=ie(S/_,S,T),ue=2.00276,le=1.11072;function ge(je,$e){var Qe=ee(T,$e);return[ue*je/(1/l($e)+le/l(Qe)),($e+S*w(Qe))/ue]}function fe(je){var $e=0,Qe=a.geoProjectionMutator(je),ut=Qe($e);return ut.parallel=function(mt){return arguments.length?Qe($e=mt*R):$e*O},ut}function me(je,$e){return[je*l($e),$e]}function _e(je){if(!je)return me;var $e=1/k(je);function Qe(ut,mt){var pt=$e+je-mt,Ct=pt&&ut*l(mt)/pt;return[pt*w(Ct),$e-pt*l(Ct)]}return Qe.invert=function(ut,mt){var pt=P(ut*ut+(mt=$e-mt)*mt),Ct=$e+je-pt;return[pt/l(Ct)*s(ut,mt),Ct]},Qe}function we(je){function $e(Qe,ut){var mt=_-ut,pt=mt&&Qe*je*w(mt)/mt;return[mt*w(pt)/je,_-mt*l(pt)]}return $e.invert=function(Qe,ut){var mt=Qe*je,pt=_-ut,Ct=P(mt*mt+pt*pt),Qt=s(mt,pt);return[(Ct?Ct/w(Ct):1)*Qt/je,_-Ct]},$e}ge.invert=function(je,$e){var Qe,ut,mt=ue*$e,pt=$e<0?-M:M,Ct=25;do ut=mt-S*w(pt),pt-=Qe=(w(2*pt)+2*pt-T*w(ut))/(2*l(2*pt)+2+T*l(ut)*S*l(pt));while(c(Qe)>b&&--Ct>0);return ut=mt-S*w(pt),[je*(1/l(ut)+le/l(pt))/ue,ut]},me.invert=function(je,$e){return[je/l($e),$e]};var Te=ie(1,4/T,T);function Oe(je,$e,Qe,ut,mt,pt){var Ct,Qt=l(pt);if(c(je)>1||c(pt)>1)Ct=L(Qe*mt+$e*ut*Qt);else{var en=w(je/2),Yt=w(pt/2);Ct=2*z(P(en*en+$e*ut*Yt*Yt))}return c(Ct)>b?[Ct,s(ut*w(pt),$e*mt-Qe*ut*Qt)]:[0,0]}function de(je,$e,Qe){return L((je*je+$e*$e-Qe*Qe)/(2*je*$e))}function ye(je){return je-2*T*h((je+T)/(2*T))}function Me(je,$e,Qe){for(var ut,mt=[[je[0],je[1],w(je[1]),l(je[1])],[$e[0],$e[1],w($e[1]),l($e[1])],[Qe[0],Qe[1],w(Qe[1]),l(Qe[1])]],pt=mt[2],Ct=0;Ct<3;++Ct,pt=ut)ut=mt[Ct],pt.v=Oe(ut[1]-pt[1],pt[3],pt[2],ut[3],ut[2],ut[0]-pt[0]),pt.point=[0,0];var Qt=de(mt[0].v[0],mt[2].v[0],mt[1].v[0]),en=de(mt[0].v[0],mt[1].v[0],mt[2].v[0]),Yt=T-Qt;mt[2].point[1]=0,mt[0].point[0]=-(mt[1].point[0]=mt[0].v[0]/2);var an=[mt[2].point[0]=mt[0].point[0]+mt[2].v[0]*l(Qt),2*(mt[0].point[1]=mt[1].point[1]=mt[2].v[0]*w(Qt))];return function(hn,xn){var _n,Pn=w(xn),sr=l(xn),mr=new Array(3);for(_n=0;_n<3;++_n){var zr=mt[_n];if(mr[_n]=Oe(xn-zr[1],zr[3],zr[2],sr,Pn,hn-zr[0]),!mr[_n][0])return zr.point;mr[_n][1]=ye(mr[_n][1]-zr.v[1])}var Br=an.slice();for(_n=0;_n<3;++_n){var Jr=_n==2?0:_n+1,jr=de(mt[_n].v[0],mr[_n][0],mr[Jr][0]);mr[_n][1]<0&&(jr=-jr),_n?_n==1?(jr=en-jr,Br[0]-=mr[_n][0]*l(jr),Br[1]-=mr[_n][0]*w(jr)):(jr=Yt-jr,Br[0]+=mr[_n][0]*l(jr),Br[1]+=mr[_n][0]*w(jr)):(Br[0]+=mr[_n][0]*l(jr),Br[1]-=mr[_n][0]*w(jr))}return Br[0]/=3,Br[1]/=3,Br}}function ke(je){return je[0]*=R,je[1]*=R,je}function Ee(je,$e,Qe){var ut=a.geoCentroid({type:"MultiPoint",coordinates:[je,$e,Qe]}),mt=[-ut[0],-ut[1]],pt=a.geoRotation(mt),Ct=Me(ke(pt(je)),ke(pt($e)),ke(pt(Qe)));Ct.invert=H(Ct);var Qt=a.geoProjection(Ct).rotate(mt),en=Qt.center;return delete Qt.rotate,Qt.center=function(Yt){return arguments.length?en(pt(Yt)):pt.invert(en())},Qt.clipAngle(90)}function ze(je,$e){var Qe=P(1-w($e));return[2/E*je*Qe,E*(1-Qe)]}function Fe(je){var $e=k(je);function Qe(ut,mt){return[ut,(ut?ut/w(ut):1)*(w(mt)*l(ut)-$e*l(mt))]}return Qe.invert=$e?function(ut,mt){ut&&(mt*=w(ut)/ut);var pt=l(ut);return[ut,2*s(P(pt*pt+$e*$e-mt*mt)-pt,$e-mt)]}:function(ut,mt){return[ut,z(ut?mt*k(ut)/ut:mt)]},Qe}ze.invert=function(je,$e){var Qe=(Qe=$e/E-1)*Qe;return[Qe>0?je*P(T/Qe)/2:0,z(1-Qe)]};var Ve=P(3);function Ke(je,$e){return[Ve*je*(2*l(2*$e/3)-1)/E,Ve*E*w($e/3)]}function Re(je){var $e=l(je);function Qe(ut,mt){return[ut*$e,w(mt)/$e]}return Qe.invert=function(ut,mt){return[ut/$e,z(mt*$e)]},Qe}function qe(je){var $e=l(je);function Qe(ut,mt){return[ut*$e,(1+$e)*k(mt/2)]}return Qe.invert=function(ut,mt){return[ut/$e,2*i(mt/(1+$e))]},Qe}function We(je,$e){var Qe=P(8/(3*T));return[Qe*je*(1-c($e)/T),Qe*$e]}function Ye(je,$e){var Qe=P(4-3*w(c($e)));return[2/P(6*T)*je*Qe,x($e)*P(2*T/3)*(2-Qe)]}function nt(je,$e){var Qe=P(T*(4+T));return[2/Qe*je*(1+P(1-4*$e*$e/(T*T))),4/Qe*$e]}function ft(je,$e){var Qe=(2+_)*w($e);$e/=2;for(var ut=0,mt=1/0;ut<10&&c(mt)>b;ut++){var pt=l($e);$e-=mt=($e+w($e)*(pt+2)-Qe)/(2*pt*(1+pt))}return[2/P(T*(4+T))*je*(1+l($e)),2*P(T/(4+T))*w($e)]}function vt(je,$e){return[je*(1+l($e))/P(2+T),2*$e/P(2+T)]}function Pt(je,$e){for(var Qe=(1+_)*w($e),ut=0,mt=1/0;ut<10&&c(mt)>b;ut++)$e-=mt=($e+w($e)-Qe)/(1+l($e));return Qe=P(2+T),[je*(1+l($e))/Qe,2*$e/Qe]}Ke.invert=function(je,$e){var Qe=3*z($e/(Ve*E));return[E*je/(Ve*(2*l(2*Qe/3)-1)),Qe]},We.invert=function(je,$e){var Qe=P(8/(3*T)),ut=$e/Qe;return[je/(Qe*(1-c(ut)/T)),ut]},Ye.invert=function(je,$e){var Qe=2-c($e)/P(2*T/3);return[je*P(6*T)/(2*Qe),x($e)*z((4-Qe*Qe)/3)]},nt.invert=function(je,$e){var Qe=P(T*(4+T))/2;return[je*Qe/(1+P(1-$e*$e*(4+T)/(4*T))),$e*Qe/2]},ft.invert=function(je,$e){var Qe=$e*P((4+T)/T)/2,ut=z(Qe),mt=l(ut);return[je/(2/P(T*(4+T))*(1+mt)),z((ut+Qe*(mt+2))/(2+_))]},vt.invert=function(je,$e){var Qe=P(2+T),ut=$e*Qe/2;return[Qe*je/(1+l(ut)),ut]},Pt.invert=function(je,$e){var Qe=1+_,ut=P(Qe/2);return[2*je*ut/(1+l($e*=ut)),z(($e+w($e))/Qe)]};var At=3+2*S;function at(je,$e){var Qe=w(je/=2),ut=l(je),mt=P(l($e)),pt=l($e/=2),Ct=w($e)/(pt+S*ut*mt),Qt=P(2/(1+Ct*Ct)),en=P((S*pt+(ut+Qe)*mt)/(S*pt+(ut-Qe)*mt));return[At*(Qt*(en-1/en)-2*m(en)),At*(Qt*Ct*(en+1/en)-2*i(Ct))]}at.invert=function(je,$e){if(!(Qe=te.invert(je/1.2,1.065*$e)))return null;var Qe,ut=Qe[0],mt=Qe[1],pt=20;je/=At,$e/=At;do{var Ct=ut/2,Qt=mt/2,en=w(Ct),Yt=l(Ct),an=w(Qt),hn=l(Qt),xn=l(mt),_n=P(xn),Pn=an/(hn+S*Yt*_n),sr=Pn*Pn,mr=P(2/(1+sr)),zr=(S*hn+(Yt+en)*_n)/(S*hn+(Yt-en)*_n),Br=P(zr),Jr=Br-1/Br,jr=Br+1/Br,Oi=mr*Jr-2*m(Br)-je,Ui=mr*Pn*jr-2*i(Pn)-$e,ua=an&&A*_n*en*sr/an,sa=(S*Yt*hn+_n)/(2*(hn+S*Yt*_n)*(hn+S*Yt*_n)*_n),ca=-.5*Pn*mr*mr*mr,lo=ca*ua,io=ca*sa,za=(za=2*hn+S*_n*(Yt-en))*za*Br,Ra=(S*Yt*hn*_n+xn)/za,ao=-S*en*an/(_n*za),Lo=Jr*lo-2*Ra/Br+mr*(Ra+Ra/zr),Ko=Jr*io-2*ao/Br+mr*(ao+ao/zr),Qo=Pn*jr*lo-2*ua/(1+sr)+mr*jr*ua+mr*Pn*(Ra-Ra/zr),es=Pn*jr*io-2*sa/(1+sr)+mr*jr*sa+mr*Pn*(ao-ao/zr),ts=Ko*Qo-es*Lo;if(!ts)break;var na=(Ui*Ko-Oi*es)/ts,ht=(Oi*Qo-Ui*Lo)/ts;ut-=na,mt=g(-_,p(_,mt-ht))}while((c(na)>b||c(ht)>b)&&--pt>0);return c(c(mt)-_)ut){var hn=P(an),xn=s(Yt,en),_n=Qe*y(xn/Qe),Pn=xn-_n,sr=je*l(Pn),mr=(je*w(Pn)-Pn*w(sr))/(_-sr),zr=dt(Pn,mr),Br=(T-je)/Pe(zr,sr,T);en=hn;var Jr,jr=50;do en-=Jr=(je+Pe(zr,sr,en)*Br-hn)/(zr(en)*Br);while(c(Jr)>b&&--jr>0);Yt=Pn*w(en),en<_&&(Yt-=mr*(en-_));var Oi=w(_n),Ui=l(_n);Qt[0]=en*Ui-Yt*Oi,Qt[1]=en*Oi+Yt*Ui}return Qt}return mt.invert=function(pt,Ct){var Qt=pt*pt+Ct*Ct;if(Qt>ut){var en=P(Qt),Yt=s(Ct,pt),an=Qe*y(Yt/Qe),hn=Yt-an;pt=en*l(hn),Ct=en*w(hn);for(var xn=pt-_,_n=w(pt),Pn=Ct/_n,sr=pt<_?1/0:0,mr=10;;){var zr=je*w(Pn),Br=je*l(Pn),Jr=w(Br),jr=_-Br,Oi=(zr-Pn*Jr)/jr,Ui=dt(Pn,Oi);if(c(sr)<1e-12||!--mr)break;Pn-=sr=(Pn*_n-Oi*xn-Ct)/(_n-2*xn*(jr*(Br+Pn*zr*l(Br)-Jr)-zr*(zr-Pn*Jr))/(jr*jr))}pt=(en=je+Pe(Ui,Br,pt)*(T-je)/Pe(Ui,Br,T))*l(Yt=an+Pn),Ct=en*w(Yt)}return a.geoAzimuthalEquidistantRaw.invert(pt,Ct)},mt}function dt(je,$e){return function(Qe){var ut=je*l(Qe);return Qe<_&&(ut-=$e),P(1+ut*ut)}}function Pe(je,$e,Qe){for(var ut=(Qe-$e)/50,mt=je($e)+je(Qe),pt=1,Ct=$e;pt<50;++pt)mt+=2*je(Ct+=ut);return .5*mt*ut}function Ie(je,$e,Qe,ut,mt,pt,Ct,Qt){function en(Yt,an){if(!an)return[je*Yt/T,0];var hn=an*an,xn=je+hn*($e+hn*(Qe+hn*ut)),_n=an*(mt-1+hn*(pt-Qt+hn*Ct)),Pn=(xn*xn+_n*_n)/(2*_n),sr=Yt*z(xn/Pn)/T;return[Pn*w(sr),an*(1+hn*Qt)+Pn*(1-l(sr))]}return arguments.length<8&&(Qt=0),en.invert=function(Yt,an){var hn,xn,_n=T*Yt/je,Pn=an,sr=50;do{var mr=Pn*Pn,zr=je+mr*($e+mr*(Qe+mr*ut)),Br=Pn*(mt-1+mr*(pt-Qt+mr*Ct)),Jr=zr*zr+Br*Br,jr=2*Br,Oi=Jr/jr,Ui=Oi*Oi,ua=z(zr/Oi)/T,sa=_n*ua,ca=zr*zr,lo=(2*$e+mr*(4*Qe+6*mr*ut))*Pn,io=mt+mr*(3*pt+5*mr*Ct),za=(2*(zr*lo+Br*(io-1))*jr-Jr*(2*(io-1)))/(jr*jr),Ra=l(sa),ao=w(sa),Lo=Oi*Ra,Ko=Oi*ao,Qo=_n/T*(1/P(1-ca/Ui))*(lo*Oi-zr*za)/Ui,es=Ko-Yt,ts=Pn*(1+mr*Qt)+Oi-Lo-an,na=za*ao+Lo*Qo,ht=Lo*ua,Ft=1+za-(za*Ra-Ko*Qo),ln=Ko*ua,$t=na*ln-Ft*ht;if(!$t)break;_n-=hn=(ts*na-es*Ft)/$t,Pn-=xn=(es*ln-ts*ht)/$t}while((c(hn)>b||c(xn)>b)&&--sr>0);return[_n,Pn]},en}Ot.invert=function(je,$e){var Qe=$e/(1+et);return[je&&je/(et*P(1-Qe*Qe)),2*i(Qe)]},Wt.invert=function(je,$e){var Qe=i($e/E),ut=l(Qe),mt=2*Qe;return[je*E/2/(l(mt)*ut*ut),mt]};var Ae=Ie(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555),De=Ie(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742),He=Ie(5/6*T,-.62636,-.0344,0,1.3493,-.05524,0,.045);function rt(je,$e){var Qe=je*je,ut=$e*$e;return[je*(1-.162388*ut)*(.87-952426e-9*Qe*Qe),$e*(1+ut/12)]}rt.invert=function(je,$e){var Qe,ut=je,mt=$e,pt=50;do{var Ct=mt*mt;mt-=Qe=(mt*(1+Ct/12)-$e)/(1+Ct/4)}while(c(Qe)>b&&--pt>0);pt=50,je/=1-.162388*Ct;do{var Qt=(Qt=ut*ut)*Qt;ut-=Qe=(ut*(.87-952426e-9*Qt)-je)/(.87-.00476213*Qt)}while(c(Qe)>b&&--pt>0);return[ut,mt]};var lt=Ie(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function ot(je){var $e=je(_,0)[0]-je(-_,0)[0];function Qe(ut,mt){var pt=ut>0?-.5:.5,Ct=je(ut+pt*T,mt);return Ct[0]-=pt*$e,Ct}return je.invert&&(Qe.invert=function(ut,mt){var pt=ut>0?-.5:.5,Ct=je.invert(ut+pt*$e,mt),Qt=Ct[0]-pt*T;return Qt<-T?Qt+=2*T:Qt>T&&(Qt-=2*T),Ct[0]=Qt,Ct}),Qe}function kt(je,$e){var Qe=x(je),ut=x($e),mt=l($e),pt=l(je)*mt,Ct=w(je)*mt,Qt=w(ut*$e);je=c(s(Ct,Qt)),$e=z(pt),c(je-_)>b&&(je%=_);var en=function(Yt,an){if(an===_)return[0,0];var hn,xn,_n=w(an),Pn=_n*_n,sr=Pn*Pn,mr=1+sr,zr=1+3*sr,Br=1-sr,Jr=z(1/P(mr)),jr=Br+Pn*mr*Jr,Oi=(1-_n)/jr,Ui=P(Oi),ua=Oi*mr,sa=P(ua),ca=Ui*Br;if(Yt===0)return[0,-(ca+Pn*sa)];var lo,io=l(an),za=1/io,Ra=2*_n*io,ao=(-jr*io-(-3*Pn+Jr*zr)*Ra*(1-_n))/(jr*jr),Lo=-za*Ra,Ko=-za*(Pn*mr*ao+Oi*zr*Ra),Qo=-2*za*(Br*(.5*ao/Ui)-2*Pn*Ui*Ra),es=4*Yt/T;if(Yt>.222*T||an.175*T){if(hn=(ca+Pn*P(ua*(1+sr)-ca*ca))/(1+sr),Yt>T/4)return[hn,hn];var ts=hn,na=.5*hn;hn=.5*(na+ts),xn=50;do{var ht=P(ua-hn*hn),Ft=hn*(Qo+Lo*ht)+Ko*z(hn/sa)-es;if(!Ft)break;Ft<0?na=hn:ts=hn,hn=.5*(na+ts)}while(c(ts-na)>b&&--xn>0)}else{hn=b,xn=25;do{var ln=hn*hn,$t=P(ua-ln),un=Qo+Lo*$t,On=hn*un+Ko*z(hn/sa)-es,Fn=un+(Ko-Lo*ln)/$t;hn-=lo=$t?On/Fn:0}while(c(lo)>b&&--xn>0)}return[hn,-ca-Pn*P(ua-hn*hn)]}(je>T/4?_-je:je,$e);return je>T/4&&(Qt=en[0],en[0]=-en[1],en[1]=-Qt),en[0]*=Qe,en[1]*=-ut,en}function wt(je,$e){var Qe,ut,mt,pt,Ct,Qt;if($e=1-b)return Qe=(1-$e)/4,mt=1/(ut=B(je)),[(pt=((Qt=d(2*(Qt=je)))-1)/(Qt+1))+Qe*((Ct=ut*N(je))-je)/(ut*ut),mt-Qe*pt*mt*(Ct-je),mt+Qe*pt*mt*(Ct+je),2*i(d(je))-_+Qe*(Ct-je)/ut];var en=[1,0,0,0,0,0,0,0,0],Yt=[P($e),0,0,0,0,0,0,0,0],an=0;for(ut=P(1-$e),Ct=1;c(Yt[an]/en[an])>b&&an<8;)Qe=en[an++],Yt[an]=(Qe-ut)/2,en[an]=(Qe+ut)/2,ut=P(Qe*ut),Ct*=2;mt=Ct*en[an]*je;do mt=(z(pt=Yt[an]*w(ut=mt)/en[an])+mt)/2;while(--an);return[w(mt),pt=l(mt),pt/l(mt-ut),mt]}function Vt(je,$e){if(!$e)return je;if($e===1)return m(k(je/2+M));for(var Qe=1,ut=P(1-$e),mt=P($e),pt=0;c(mt)>b;pt++){if(je%T){var Ct=i(ut*k(je)/Qe);Ct<0&&(Ct+=T),je+=Ct+~~(je/T)*T}else je+=je;mt=(Qe+ut)/2,ut=P(Qe*ut),mt=((Qe=mt)-ut)/2}return je/(v(2,pt)*Qe)}function Ut(je,$e){var Qe=(S-1)/(S+1),ut=P(1-Qe*Qe),mt=Vt(_,ut*ut),pt=m(k(T/4+c($e)/2)),Ct=d(-1*pt)/P(Qe),Qt=function(Yt,an){var hn=Yt*Yt,xn=an+1,_n=1-hn-an*an;return[.5*((Yt>=0?_:-_)-s(_n,2*Yt)),-.25*m(_n*_n+4*hn)+.5*m(xn*xn+hn)]}(Ct*l(-1*je),Ct*w(-1*je)),en=function(Yt,an,hn){var xn=c(Yt),_n=N(c(an));if(xn){var Pn=1/w(xn),sr=1/(k(xn)*k(xn)),mr=-(sr+hn*(_n*_n*Pn*Pn)-1+hn),zr=(-mr+P(mr*mr-4*((hn-1)*sr)))/2;return[Vt(i(1/P(zr)),hn)*x(Yt),Vt(i(P((zr/sr-1)/hn)),1-hn)*x(an)]}return[0,Vt(i(_n),1-hn)*x(an)]}(Qt[0],Qt[1],ut*ut);return[-en[1],($e>=0?1:-1)*(.5*mt-en[0])]}function tt(je){var $e=w(je),Qe=l(je),ut=bt(je);function mt(pt,Ct){var Qt=ut(pt,Ct);pt=Qt[0],Ct=Qt[1];var en=w(Ct),Yt=l(Ct),an=l(pt),hn=L($e*en+Qe*Yt*an),xn=w(hn),_n=c(xn)>b?hn/xn:1;return[_n*Qe*w(pt),(c(pt)>_?_n:-_n)*($e*Yt-Qe*en*an)]}return ut.invert=bt(-je),mt.invert=function(pt,Ct){var Qt=P(pt*pt+Ct*Ct),en=-w(Qt),Yt=l(Qt),an=Qt*Yt,hn=-Ct*en,xn=Qt*$e,_n=P(an*an+hn*hn-xn*xn),Pn=s(an*xn+hn*_n,hn*xn-an*_n),sr=(Qt>_?-1:1)*s(pt*en,Qt*l(Pn)*Yt+Ct*w(Pn)*en);return ut.invert(sr,Pn)},mt}function bt(je){var $e=w(je),Qe=l(je);return function(ut,mt){var pt=l(mt),Ct=l(ut)*pt,Qt=w(ut)*pt,en=w(mt);return[s(Qt,Ct*Qe-en*$e),z(en*Qe+Ct*$e)]}}kt.invert=function(je,$e){c(je)>1&&(je=2*x(je)-je),c($e)>1&&($e=2*x($e)-$e);var Qe=x(je),ut=x($e),mt=-Qe*je,pt=-ut*$e,Ct=pt/mt<1,Qt=function(hn,xn){for(var _n=0,Pn=1,sr=.5,mr=50;;){var zr=sr*sr,Br=P(sr),Jr=z(1/P(1+zr)),jr=1-zr+sr*(1+zr)*Jr,Oi=(1-Br)/jr,Ui=P(Oi),ua=Oi*(1+zr),sa=Ui*(1-zr),ca=P(ua-hn*hn),lo=xn+sa+sr*ca;if(c(Pn-_n)<1e-12||--mr==0||lo===0)break;lo>0?_n=sr:Pn=sr,sr=.5*(_n+Pn)}if(!mr)return null;var io=z(Br),za=l(io),Ra=1/za,ao=2*Br*za,Lo=(-jr*za-(-3*sr+Jr*(1+3*zr))*ao*(1-Br))/(jr*jr);return[T/4*(hn*(-2*Ra*(.5*Lo/Ui*(1-zr)-2*sr*Ui*ao)+-Ra*ao*ca)+-Ra*(sr*(1+zr)*Lo+Oi*(1+3*zr)*ao)*z(hn/P(ua))),io]}(Ct?pt:mt,Ct?mt:pt),en=Qt[0],Yt=Qt[1],an=l(Yt);return Ct&&(en=-_-en),[Qe*(s(w(en)*an,-w(Yt))+T),ut*z(l(en)*an)]},Ut.invert=function(je,$e){var Qe,ut,mt,pt,Ct,Qt,en=(S-1)/(S+1),Yt=P(1-en*en),an=Vt(_,Yt*Yt),hn=(ut=-je,mt=Yt*Yt,(Qe=.5*an-$e)?(pt=wt(Qe,mt),ut?(Qt=(Ct=wt(ut,1-mt))[1]*Ct[1]+mt*pt[0]*pt[0]*Ct[0]*Ct[0],[[pt[0]*Ct[2]/Qt,pt[1]*pt[2]*Ct[0]*Ct[1]/Qt],[pt[1]*Ct[1]/Qt,-pt[0]*pt[2]*Ct[0]*Ct[2]/Qt],[pt[2]*Ct[1]*Ct[2]/Qt,-mt*pt[0]*pt[1]*Ct[0]/Qt]]):[[pt[0],0],[pt[1],0],[pt[2],0]]):[[0,(Ct=wt(ut,1-mt))[0]/Ct[1]],[1/Ct[1],0],[Ct[2]/Ct[1],0]]),xn=function(_n,Pn){var sr=Pn[0]*Pn[0]+Pn[1]*Pn[1];return[(_n[0]*Pn[0]+_n[1]*Pn[1])/sr,(_n[1]*Pn[0]-_n[0]*Pn[1])/sr]}(hn[0],hn[1]);return[s(xn[1],xn[0])/-1,2*i(d(-.5*m(en*xn[0]*xn[0]+en*xn[1]*xn[1])))-_]};var zt=z(1-1/3)*O,St=Re(0);function Dt(je){var $e=zt*R,Qe=ze(T,$e)[0]-ze(-T,$e)[0],ut=St(0,$e)[1],mt=ze(0,$e)[1],pt=E-mt,Ct=D/je,Qt=4/D,en=ut+pt*pt*4/D;function Yt(an,hn){var xn,_n=c(hn);if(_n>$e){var Pn=p(je-1,g(0,h((an+T)/Ct)));(xn=ze(an+=T*(je-1)/je-Pn*Ct,_n))[0]=xn[0]*D/Qe-D*(je-1)/(2*je)+Pn*D/je,xn[1]=ut+4*(xn[1]-mt)*pt/D,hn<0&&(xn[1]=-xn[1])}else xn=St(an,hn);return xn[0]*=Qt,xn[1]/=en,xn}return Yt.invert=function(an,hn){an/=Qt;var xn=c(hn*=en);if(xn>ut){var _n=p(je-1,g(0,h((an+T)/Ct)));an=(an+T*(je-1)/je-_n*Ct)*Qe/D;var Pn=ze.invert(an,.25*(xn-ut)*D/pt+mt);return Pn[0]-=T*(je-1)/je-_n*Ct,hn<0&&(Pn[1]=-Pn[1]),Pn}return St.invert(an,hn)},Yt}function Le(je,$e){return[je,1&$e?90-b:zt]}function Je(je,$e){return[je,1&$e?-90+b:-zt]}function st(je){return[je[0]*(1-b),je[1]]}function Et(je){var $e,Qe=1+je,ut=z(w(1/Qe)),mt=2*P(T/($e=T+4*ut*Qe)),pt=.5*mt*(Qe+P(je*(2+je))),Ct=je*je,Qt=Qe*Qe;function en(Yt,an){var hn,xn,_n=1-w(an);if(_n&&_n<2){var Pn,sr=_-an,mr=25;do{var zr=w(sr),Br=l(sr),Jr=ut+s(zr,Qe-Br),jr=1+Qt-2*Qe*Br;sr-=Pn=(sr-Ct*ut-Qe*zr+jr*Jr-.5*_n*$e)/(2*Qe*zr*Jr)}while(c(Pn)>1e-12&&--mr>0);hn=mt*P(jr),xn=Yt*Jr/T}else hn=mt*(je+_n),xn=Yt*ut/T;return[hn*w(xn),pt-hn*l(xn)]}return en.invert=function(Yt,an){var hn=Yt*Yt+(an-=pt)*an,xn=(1+Qt-hn/(mt*mt))/(2*Qe),_n=L(xn),Pn=w(_n),sr=ut+s(Pn,Qe-xn);return[z(Yt/P(hn))*T/sr,z(1-2*(_n-Ct*ut-Qe*Pn+(1+Qt-2*Qe*xn)*sr)/$e)]},en}function It(je,$e){return $e>-.7109889596207567?((je=ae(je,$e))[1]+=.0528035274542,je):me(je,$e)}function Zt(je,$e){return c($e)>.7109889596207567?((je=ae(je,$e))[1]-=$e>0?.0528035274542:-.0528035274542,je):me(je,$e)}function Kt(je,$e,Qe,ut){var mt=P(4*T/(2*Qe+(1+je-$e/2)*w(2*Qe)+(je+$e)/2*w(4*Qe)+$e/2*w(6*Qe))),pt=P(ut*w(Qe)*P((1+je*l(2*Qe)+$e*l(4*Qe))/(1+je+$e))),Ct=Qe*en(1);function Qt(hn){return P(1+je*l(2*hn)+$e*l(4*hn))}function en(hn){var xn=hn*Qe;return(2*xn+(1+je-$e/2)*w(2*xn)+(je+$e)/2*w(4*xn)+$e/2*w(6*xn))/Qe}function Yt(hn){return Qt(hn)*w(hn)}var an=function(hn,xn){var _n=Qe*ne(en,Ct*w(xn)/Qe,xn/T);isNaN(_n)&&(_n=Qe*x(xn));var Pn=mt*Qt(_n);return[Pn*pt*hn/T*l(_n),Pn/pt*w(_n)]};return an.invert=function(hn,xn){var _n=ne(Yt,xn*pt/mt);return[hn*T/(l(_n)*mt*pt*Qt(_n)),z(Qe*en(_n/Qe)/Ct)]},Qe===0&&(mt=P(ut/T),(an=function(hn,xn){return[hn*mt,w(xn)/mt]}).invert=function(hn,xn){return[hn/mt,z(xn*mt)]}),an}function Ht(je,$e,Qe,ut,mt){ut===void 0&&(ut=1e-8),mt===void 0&&(mt=20);var pt=je($e),Ct=je(.5*($e+Qe)),Qt=je(Qe);return function en(Yt,an,hn,xn,_n,Pn,sr,mr,zr,Br,Jr){if(Jr.nanEncountered)return NaN;var jr,Oi,Ui,ua,sa,ca,lo,io,za,Ra;if(Oi=Yt(an+.25*(jr=hn-an)),Ui=Yt(hn-.25*jr),isNaN(Oi))Jr.nanEncountered=!0;else{if(!isNaN(Ui))return Ra=((ca=(ua=jr*(xn+4*Oi+_n)/12)+(sa=jr*(_n+4*Ui+Pn)/12))-sr)/15,Br>zr?(Jr.maxDepthCount++,ca+Ra):Math.abs(Ra)_n?sr=mr:Pn=mr,mr=Pn+sr>>1;while(mr>Pn);var zr=en[mr+1]-en[mr];return zr&&(zr=(_n-en[mr+1])/zr),(mr+1+zr)/Ct}var hn=2*an(1)/T*pt/Qe,xn=function(_n,Pn){var sr=an(c(w(Pn))),mr=ut(sr)*_n;return sr/=hn,[mr,Pn>=0?sr:-sr]};return xn.invert=function(_n,Pn){var sr;return c(Pn*=hn)<1&&(sr=x(Pn)*z(mt(c(Pn))*pt)),[_n/ut(c(Pn)),sr]},xn}function zn(je,$e){return c(je[0]-$e[0])=0;--Qt)Qe=($e=je[1][Qt])[0][0],ut=$e[0][1],mt=$e[1][1],pt=$e[2][0],Ct=$e[2][1],en.push(pn([[pt-b,Ct-b],[pt-b,mt+b],[Qe+b,mt+b],[Qe+b,ut-b]],30));return{type:"Polygon",coordinates:[u.merge(en)]}}function nn(je,$e,Qe){var ut,mt;function pt(en,Yt){for(var an=Yt<0?-1:1,hn=$e[+(Yt<0)],xn=0,_n=hn.length-1;xn<_n&&en>hn[xn][2][0];++xn);var Pn=je(en-hn[xn][1][0],Yt);return Pn[0]+=je(hn[xn][1][0],an*Yt>an*hn[xn][0][1]?hn[xn][0][1]:Yt)[0],Pn}Qe?pt.invert=Qe(pt):je.invert&&(pt.invert=function(en,Yt){for(var an=mt[+(Yt<0)],hn=$e[+(Yt<0)],xn=0,_n=an.length;xn<_n;++xn){var Pn=an[xn];if(Pn[0][0]<=en&&ensr&&(hn=Pn,Pn=sr,sr=hn),[[xn,Pn],[_n,sr]]})}),Ct):$e.map(function(Yt){return Yt.map(function(an){return[[an[0][0]*O,an[0][1]*O],[an[1][0]*O,an[1][1]*O],[an[2][0]*O,an[2][1]*O]]})})},$e!=null&&Ct.lobes($e),Ct}It.invert=function(je,$e){return $e>-.7109889596207567?ae.invert(je,$e-.0528035274542):me.invert(je,$e)},Zt.invert=function(je,$e){return c($e)>.7109889596207567?ae.invert(je,$e+($e>0?.0528035274542:-.0528035274542)):me.invert(je,$e)};var sn=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]],gn=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]],bn=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]],In=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]],Hn=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]],Wn=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function ar(je,$e){return[3/D*je*P(T*T/3-$e*$e),$e]}function Or(je){function $e(Qe,ut){if(c(c(ut)-_)2)return null;var pt=(Qe/=2)*Qe,Ct=(ut/=2)*ut,Qt=2*ut/(1+pt+Ct);return Qt=v((1+Qt)/(1-Qt),1/je),[s(2*Qe,1-pt-Ct)/je,z((Qt-1)/(Qt+1))]},$e}ar.invert=function(je,$e){return[D/3*je/P(T*T/3-$e*$e),$e]};var vr=T/S;function Er(je,$e){return[je*(1+P(l($e)))/2,$e/(l($e/2)*l(je/6))]}function Kn(je,$e){var Qe=je*je,ut=$e*$e;return[je*(.975534+ut*(-.0143059*Qe-.119161+-.0547009*ut)),$e*(1.00384+Qe*(.0802894+-.02855*ut+199025e-9*Qe)+ut*(.0998909+-.0491032*ut))]}function Ln(je,$e){return[w(je)/l($e),k($e)*l(je)]}function lr(je){var $e=l(je),Qe=k(M+je/2);function ut(mt,pt){var Ct=pt-je,Qt=c(Ct)=0;)xn=(hn=je[an])[0]+en*(pt=xn)-Yt*_n,_n=hn[1]+en*_n+Yt*pt;return[xn=en*(pt=xn)-Yt*_n,_n=en*_n+Yt*pt]}return Qe.invert=function(ut,mt){var pt=20,Ct=ut,Qt=mt;do{for(var en,Yt=$e,an=je[Yt],hn=an[0],xn=an[1],_n=0,Pn=0;--Yt>=0;)_n=hn+Ct*(en=_n)-Qt*Pn,Pn=xn+Ct*Pn+Qt*en,hn=(an=je[Yt])[0]+Ct*(en=hn)-Qt*xn,xn=an[1]+Ct*xn+Qt*en;var sr,mr,zr=(_n=hn+Ct*(en=_n)-Qt*Pn)*_n+(Pn=xn+Ct*Pn+Qt*en)*Pn;Ct-=sr=((hn=Ct*(en=hn)-Qt*xn-ut)*_n+(xn=Ct*xn+Qt*en-mt)*Pn)/zr,Qt-=mr=(xn*_n-hn*Pn)/zr}while(c(sr)+c(mr)>1e-12&&--pt>0);if(pt){var Br=P(Ct*Ct+Qt*Qt),Jr=2*i(.5*Br),jr=w(Jr);return[s(Ct*jr,Br*l(Jr)),Br?z(Qt*jr/Br):0]}},Qe}Er.invert=function(je,$e){var Qe=c(je),ut=c($e),mt=b,pt=_;utb||c(mr)>b)&&--mt>0);return mt&&[Qe,ut]},Ln.invert=function(je,$e){var Qe=je*je,ut=$e*$e+1,mt=Qe+ut,pt=je?A*P((mt-P(mt*mt-4*Qe))/Qe):1/P(ut);return[z(je*pt),x($e)*L(pt)]},Wr.invert=function(je,$e){return[je,2.5*i(d(.8*$e))-.625*T]};var rr=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],nr=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Bn=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],Fr=[[.9245,0],[0,0],[.01943,0]],$r=[[.721316,0],[0,0],[-.00881625,-.00617325]];function pr(je,$e){var Qe=a.geoProjection(Mn(je)).rotate($e).clipAngle(90),ut=a.geoRotation($e),mt=Qe.center;return delete Qe.rotate,Qe.center=function(pt){return arguments.length?mt(ut(pt)):ut.invert(mt())},Qe}var qr=P(6),_i=P(7);function cn(je,$e){var Qe=z(7*w($e)/(3*qr));return[qr*je*(2*l(2*Qe/3)-1)/_i,9*w(Qe/3)/_i]}function jn(je,$e){for(var Qe,ut=(1+A)*w($e),mt=$e,pt=0;pt<25&&(mt-=Qe=(w(mt/2)+w(mt)-ut)/(.5*l(mt/2)+l(mt)),!(c(Qe)1e-12&&--Qt>0);return[je/(.84719-.13063*(ut=Ct*Ct)+(pt=ut*(mt=ut*ut))*pt*(.05494*ut-.04515-.02326*mt+.00331*pt)),Ct]},yn.invert=function(je,$e){for(var Qe=$e/2,ut=0,mt=1/0;ut<10&&c(mt)>b;++ut){var pt=l($e/2);$e-=mt=($e-k($e/2)-Qe)/(1-.5/(pt*pt))}return[2*je/(1+l($e)),$e]};var $n=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function Un(je,$e){var Qe=w($e),ut=l($e),mt=x(je);if(je===0||c($e)===_)return[0,$e];if($e===0)return[je,0];if(c(je)===_)return[je*ut,_*Qe];var pt=T/(2*je)-2*je/T,Ct=2*$e/T,Qt=(1-Ct*Ct)/(Qe-Ct),en=pt*pt,Yt=Qt*Qt,an=1+en/Yt,hn=1+Yt/en,xn=(pt*Qe/Qt-pt/2)/an,_n=(Yt*Qe/en+Qt/2)/hn,Pn=_n*_n-(Yt*Qe*Qe/en+Qt*Qe-1)/hn;return[_*(xn+P(xn*xn+ut*ut/an)*mt),_*(_n+P(Pn<0?0:Pn)*x(-$e*pt)*mt)]}Un.invert=function(je,$e){var Qe=(je/=_)*je,ut=Qe+($e/=_)*$e,mt=T*T;return[je?(ut-1+P((1-ut)*(1-ut)+4*Qe))/(2*je)*_:0,ne(function(pt){return ut*(T*w(pt)-2*pt)*T+4*pt*pt*($e-w(pt))+2*T*pt-mt*$e},0)]};function Nn(je,$e){var Qe=$e*$e;return[je,$e*(1.0148+Qe*Qe*(.23185+Qe*(.02406*Qe-.14499)))]}function Rn(je,$e){if(c($e)=0;)if(zr=sr[Oi],mr[0]===zr[0]&&mr[1]===zr[1]){if(Jr)return[Jr,mr];Jr=mr}}}(Qt.face,en.face),an=wn(Yt.map(en.project),Yt.map(Qt.project));Qt.transform=en.transform?kn(en.transform,an):an;for(var hn=en.edges,xn=0,_n=hn.length;xn<_n;++xn)Yn(Yt[0],hn[xn][1])&&Yn(Yt[1],hn[xn][0])&&(hn[xn]=Qt),Yn(Yt[0],hn[xn][0])&&Yn(Yt[1],hn[xn][1])&&(hn[xn]=Qt);for(hn=Qt.edges,xn=0,_n=hn.length;xn<_n;++xn)Yn(Yt[0],hn[xn][0])&&Yn(Yt[1],hn[xn][1])&&(hn[xn]=en),Yn(Yt[0],hn[xn][1])&&Yn(Yt[1],hn[xn][0])&&(hn[xn]=en)}else Qt.transform=en.transform;return Qt.children&&Qt.children.forEach(function(Pn){Ct(Pn,Qt)}),Qt})(je,{transform:null}),ir(je)&&(ut.invert=function(Ct,Qt){var en=function Yt(an,hn){var xn=an.project.invert,_n=an.transform,Pn=hn;if(_n&&(_n=function(Jr){var jr=1/(Jr[0]*Jr[4]-Jr[1]*Jr[3]);return[jr*Jr[4],-jr*Jr[1],jr*(Jr[1]*Jr[5]-Jr[2]*Jr[4]),-jr*Jr[3],jr*Jr[0],jr*(Jr[2]*Jr[3]-Jr[0]*Jr[5])]}(_n),Pn=[_n[0]*Pn[0]+_n[1]*Pn[1]+_n[2],_n[3]*Pn[0]+_n[4]*Pn[1]+_n[5]]),xn&&an===function(Jr){return $e(Jr[0]*R,Jr[1]*R)}(sr=xn(Pn)))return sr;for(var sr,mr=an.children,zr=0,Br=mr&&mr.length;zr1.790857183?$e=1.790857183:$e<-1.790857183&&($e=-1.790857183);var Qe,ut=$e;do{var mt=ut*ut;ut-=Qe=(ut*(1.0148+mt*mt*(.23185+mt*(.02406*mt-.14499)))-$e)/(1.0148+mt*mt*(5*.23185+mt*(.21654*mt-1.01493)))}while(c(Qe)>b);return[je,ut]},Rn.invert=function(je,$e){if(c($e)b&&--pt>0);return Ct=k(mt),[(c($e)en^Br>en&&Qt<(zr-Pn)*(en-sr)/(Br-sr)+Pn&&(Yt=!Yt)}return Yt}(mt[0],ut))return mt.push(Qe),!0})||je.push([Qe])}),ta=[],je.length?je.length>1?{type:"MultiPolygon",coordinates:je}:{type:"Polygon",coordinates:je[0]}:null}};function ya(je){var $e=je(_,0)[0]-je(-_,0)[0];function Qe(ut,mt){var pt=c(ut)<_,Ct=je(pt?ut:ut>0?ut-T:ut+T,mt),Qt=(Ct[0]-Ct[1])*A,en=(Ct[0]+Ct[1])*A;if(pt)return[Qt,en];var Yt=$e*A,an=Qt>0^en>0?-1:1;return[an*Qt-x(en)*Yt,an*en-x(Qt)*Yt]}return je.invert&&(Qe.invert=function(ut,mt){var pt=(ut+mt)*A,Ct=(mt-ut)*A,Qt=c(pt)<.5*$e&&c(Ct)<.5*$e;if(!Qt){var en=$e*A,Yt=pt>0^Ct>0?-1:1,an=-Yt*ut+(Ct>0?1:-1)*en,hn=-Yt*mt+(pt>0?1:-1)*en;pt=(-an-hn)*A,Ct=(an-hn)*A}var xn=je.invert(pt,Ct);return Qt||(xn[0]+=pt>0?T:-T),xn}),a.geoProjection(Qe).rotate([-90,-90,45]).clipAngle(179.999)}function xa(){return ya(Ut).scale(111.48)}function Zo(je){var $e=w(je);function Qe(ut,mt){var pt=$e?k(ut*$e/2)/$e:ut/2;if(!mt)return[2*pt,-je];var Ct=2*i(pt*w(mt)),Qt=1/k(mt);return[w(Ct)*Qt,mt+(1-l(Ct))*Qt-je]}return Qe.invert=function(ut,mt){if(c(mt+=je)b&&--en>0);var xn=ut*(Yt=k(Qt)),_n=k(c(mt)0?_:-_)*(Yt+pt*(hn-Qt)/2+pt*pt*(hn-2*Yt+Qt)/2)]}function bs(je,$e){var Qe=function(Ct){function Qt(en,Yt){var an=l(Yt),hn=(Ct-1)/(Ct-an*l(en));return[hn*an*w(en),hn*w(Yt)]}return Qt.invert=function(en,Yt){var an=en*en+Yt*Yt,hn=P(an),xn=(Ct-P(1-an*(Ct+1)/(Ct-1)))/((Ct-1)/hn+hn/(Ct-1));return[s(en*xn,hn*P(1-xn*xn)),hn?z(Yt*xn/hn):0]},Qt}(je);if(!$e)return Qe;var ut=l($e),mt=w($e);function pt(Ct,Qt){var en=Qe(Ct,Qt),Yt=en[1],an=Yt*mt/(je-1)+ut;return[en[0]*ut/an,Yt/an]}return pt.invert=function(Ct,Qt){var en=(je-1)/(je-1-Qt*mt);return Qe.invert(en*Ct,en*Qt*ut)},pt}oa.forEach(function(je){je[1]*=1.0144}),hs.invert=function(je,$e){var Qe=$e/_,ut=90*Qe,mt=p(18,c(ut/5)),pt=g(0,h(mt));do{var Ct=oa[pt][1],Qt=oa[pt+1][1],en=oa[p(19,pt+2)][1],Yt=en-Ct,an=en-2*Qt+Ct,hn=2*(c(Qe)-Qt)/Yt,xn=an/Yt,_n=hn*(1-xn*hn*(1-2*xn*hn));if(_n>=0||pt===1){ut=($e>=0?5:-5)*(_n+mt);var Pn,sr=50;do _n=(mt=p(18,c(ut)/5))-(pt=h(mt)),Ct=oa[pt][1],Qt=oa[pt+1][1],en=oa[p(19,pt+2)][1],ut-=(Pn=($e>=0?_:-_)*(Qt+_n*(en-Ct)/2+_n*_n*(en-2*Qt+Ct)/2)-$e)*O;while(c(Pn)>1e-12&&--sr>0);break}}while(--pt>=0);var mr=oa[pt][0],zr=oa[pt+1][0],Br=oa[p(19,pt+2)][0];return[je/(zr+_n*(Br-mr)/2+_n*_n*(Br-2*zr+mr)/2),ut*R]};var so=-179.9999,Jo=179.9999,_s=-89.9999;function Ls(je){return je.length>0}function Oo(je){return je===-90||je===90?[0,je]:[-180,($e=je,Math.floor(1e4*$e)/1e4)];var $e}function Ka(je){var $e=je[0],Qe=je[1],ut=!1;return $e<=so?($e=-180,ut=!0):$e>=Jo&&($e=180,ut=!0),Qe<=_s?(Qe=-90,ut=!0):Qe>=89.9999&&(Qe=90,ut=!0),ut?[$e,Qe]:je}function $o(je){return je.map(Ka)}function ic(je,$e,Qe){for(var ut=0,mt=je.length;ut=Jo||an<=_s||an>=89.9999){pt[Ct]=Ka(en);for(var hn=Ct+1;hnso&&_n_s&&Pn<89.9999)break}if(hn===Ct+1)continue;if(Ct){var sr={index:-1,polygon:$e,ring:pt.slice(0,Ct+1)};sr.ring[sr.ring.length-1]=Oo(an),Qe[Qe.length-1]=sr}else Qe.pop();if(hn>=Qt)break;Qe.push({index:-1,polygon:$e,ring:pt=pt.slice(hn-1)}),pt[0]=Oo(pt[0][1]),Ct=-1,Qt=pt.length}}}}function Mc(je){var $e,Qe,ut,mt,pt,Ct,Qt=je.length,en={},Yt={};for($e=0;$e0?T-Qt:Qt)*O],Yt=a.geoProjection(je(Ct)).rotate(en),an=a.geoRotation(en),hn=Yt.center;return delete Yt.rotate,Yt.center=function(xn){return arguments.length?hn(an(xn)):an.invert(hn())},Yt.clipAngle(90)}function Ec(je){var $e=l(je);function Qe(ut,mt){var pt=a.geoGnomonicRaw(ut,mt);return pt[0]*=$e,pt}return Qe.invert=function(ut,mt){return a.geoGnomonicRaw.invert(ut/$e,mt)},Qe}function ac(je,$e){return Sc(Ec,je,$e)}function Cc(je){if(!(je*=2))return a.geoAzimuthalEquidistantRaw;var $e=-je/2,Qe=-$e,ut=je*je,mt=k(Qe),pt=.5/w(Qe);function Ct(Qt,en){var Yt=L(l(en)*l(Qt-$e)),an=L(l(en)*l(Qt-Qe));return[((Yt*=Yt)-(an*=an))/(2*je),(en<0?-1:1)*P(4*ut*an-(ut-Yt+an)*(ut-Yt+an))/(2*je)]}return Ct.invert=function(Qt,en){var Yt,an,hn=en*en,xn=l(P(hn+(Yt=Qt+$e)*Yt)),_n=l(P(hn+(Yt=Qt+Qe)*Yt));return[s(an=xn-_n,Yt=(xn+_n)*mt),(en<0?-1:1)*L(P(Yt*Yt+an*an)*pt)]},Ct}function Ns(je,$e){return Sc(Cc,je,$e)}function Bs(je,$e){if(c($e)b&&--Qt>0);return[x(je)*(P(mt*mt+4)+mt)*T/4,_*Ct]};var Uu=4*T+3*P(3),ds=2*P(2*T*P(3)/Uu),pl=ie(ds*P(3)/T,ds,Uu/6);function Vu(je,$e){return[je*P(1-3*$e*$e/(T*T)),$e]}function js(je,$e){var Qe=l($e),ut=l(je)*Qe,mt=1-ut,pt=l(je=s(w(je)*Qe,-w($e))),Ct=w(je);return[Ct*(Qe=P(1-ut*ut))-pt*mt,-pt*Qe-Ct*mt]}function ma(je,$e){var Qe=W(je,$e);return[(Qe[0]+je/_)/2,(Qe[1]+$e)/2]}Vu.invert=function(je,$e){return[je/P(1-3*$e*$e/(T*T)),$e]},js.invert=function(je,$e){var Qe=(je*je+$e*$e)/-2,ut=P(-Qe*(2+Qe)),mt=$e*Qe+je*ut,pt=je*Qe-$e*ut,Ct=P(pt*pt+mt*mt);return[s(ut*mt,Ct*(1+Qe)),Ct?-z(ut*pt/Ct):0]},ma.invert=function(je,$e){var Qe=je,ut=$e,mt=25;do{var pt,Ct=l(ut),Qt=w(ut),en=w(2*ut),Yt=Qt*Qt,an=Ct*Ct,hn=w(Qe),xn=l(Qe/2),_n=w(Qe/2),Pn=_n*_n,sr=1-an*xn*xn,mr=sr?L(Ct*xn)*P(pt=1/sr):pt=0,zr=.5*(2*mr*Ct*_n+Qe/_)-je,Br=.5*(mr*Qt+ut)-$e,Jr=.5*pt*(an*Pn+mr*Ct*xn*Yt)+.5/_,jr=pt*(hn*en/4-mr*Qt*_n),Oi=.125*pt*(en*_n-mr*Qt*an*hn),Ui=.5*pt*(Yt*xn+mr*Pn*Ct)+.5,ua=jr*Oi-Ui*Jr,sa=(Br*jr-zr*Ui)/ua,ca=(zr*Oi-Br*Jr)/ua;Qe-=sa,ut-=ca}while((c(sa)>b||c(ca)>b)&&--mt>0);return[Qe,ut]},r.geoNaturalEarth=a.geoNaturalEarth1,r.geoNaturalEarthRaw=a.geoNaturalEarth1Raw,r.geoAiry=function(){var je=_,$e=a.geoProjectionMutator(G),Qe=$e(je);return Qe.radius=function(ut){return arguments.length?$e(je=ut*R):je*O},Qe.scale(179.976).clipAngle(147)},r.geoAiryRaw=G,r.geoAitoff=function(){return a.geoProjection(W).scale(152.63)},r.geoAitoffRaw=W,r.geoArmadillo=function(){var je=20*R,$e=je>=0?1:-1,Qe=k($e*je),ut=a.geoProjectionMutator(K),mt=ut(je),pt=mt.stream;return mt.parallel=function(Ct){return arguments.length?(Qe=k(($e=(je=Ct*R)>=0?1:-1)*je),ut(je)):je*O},mt.stream=function(Ct){var Qt=mt.rotate(),en=pt(Ct),Yt=(mt.rotate([0,0]),pt(Ct)),an=mt.precision();return mt.rotate(Qt),en.sphere=function(){Yt.polygonStart(),Yt.lineStart();for(var hn=-180*$e;$e*hn<180;hn+=90*$e)Yt.point(hn,90*$e);if(je)for(;$e*(hn-=3*$e*an)>=-180;)Yt.point(hn,$e*-s(l(hn*R/2),Qe)*O);Yt.lineEnd(),Yt.polygonEnd()},en},mt.scale(218.695).center([0,28.0974])},r.geoArmadilloRaw=K,r.geoAugust=function(){return a.geoProjection(te).scale(66.1603)},r.geoAugustRaw=te,r.geoBaker=function(){return a.geoProjection(re).scale(112.314)},r.geoBakerRaw=re,r.geoBerghaus=function(){var je=5,$e=a.geoProjectionMutator(U),Qe=$e(je),ut=Qe.stream,mt=-l(.01*R),pt=w(.01*R);return Qe.lobes=function(Ct){return arguments.length?$e(je=+Ct):je},Qe.stream=function(Ct){var Qt=Qe.rotate(),en=ut(Ct),Yt=(Qe.rotate([0,0]),ut(Ct));return Qe.rotate(Qt),en.sphere=function(){Yt.polygonStart(),Yt.lineStart();for(var an=0,hn=360/je,xn=2*T/je,_n=90-180/je,Pn=_;an=0;)Ct.point((Qt=en[an])[0],Qt[1]);Ct.lineEnd(),Ct.polygonEnd()},Ct},Qe.scale(79.4187).parallel(45).clipAngle(179.999)},r.geoHammerRetroazimuthalRaw=tt,r.geoHealpix=function(){var je=4,$e=a.geoProjectionMutator(Dt),Qe=$e(je),ut=Qe.stream;return Qe.lobes=function(mt){return arguments.length?$e(je=+mt):je},Qe.stream=function(mt){var pt=Qe.rotate(),Ct=ut(mt),Qt=(Qe.rotate([0,0]),ut(mt));return Qe.rotate(pt),Ct.sphere=function(){var en,Yt;a.geoStream((en=180/je,Yt=[].concat(u.range(-180,180+en/2,en).map(Le),u.range(180,-180-en/2,-en).map(Je)),{type:"Polygon",coordinates:[en===180?Yt.map(st):Yt]}),Qt)},Ct},Qe.scale(239.75)},r.geoHealpixRaw=Dt,r.geoHill=function(){var je=1,$e=a.geoProjectionMutator(Et),Qe=$e(je);return Qe.ratio=function(ut){return arguments.length?$e(je=+ut):je},Qe.scale(167.774).center([0,18.67])},r.geoHillRaw=Et,r.geoHomolosine=function(){return a.geoProjection(Zt).scale(152.63)},r.geoHomolosineRaw=Zt,r.geoHufnagel=function(){var je=1,$e=0,Qe=45*R,ut=2,mt=a.geoProjectionMutator(Kt),pt=mt(je,$e,Qe,ut);return pt.a=function(Ct){return arguments.length?mt(je=+Ct,$e,Qe,ut):je},pt.b=function(Ct){return arguments.length?mt(je,$e=+Ct,Qe,ut):$e},pt.psiMax=function(Ct){return arguments.length?mt(je,$e,Qe=+Ct*R,ut):Qe*O},pt.ratio=function(Ct){return arguments.length?mt(je,$e,Qe,ut=+Ct):ut},pt.scale(180.739)},r.geoHufnagelRaw=Kt,r.geoHyperelliptical=function(){var je=0,$e=2.5,Qe=1.183136,ut=a.geoProjectionMutator(mn),mt=ut(je,$e,Qe);return mt.alpha=function(pt){return arguments.length?ut(je=+pt,$e,Qe):je},mt.k=function(pt){return arguments.length?ut(je,$e=+pt,Qe):$e},mt.gamma=function(pt){return arguments.length?ut(je,$e,Qe=+pt):Qe},mt.scale(152.63)},r.geoHyperellipticalRaw=mn,r.geoInterrupt=nn,r.geoInterruptedBoggs=function(){return nn(ge,sn).scale(160.857)},r.geoInterruptedHomolosine=function(){return nn(Zt,gn).scale(152.63)},r.geoInterruptedMollweide=function(){return nn(ae,bn).scale(169.529)},r.geoInterruptedMollweideHemispheres=function(){return nn(ae,In).scale(169.529).rotate([20,0])},r.geoInterruptedSinuMollweide=function(){return nn(It,Hn,H).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},r.geoInterruptedSinusoidal=function(){return nn(me,Wn).scale(152.63).rotate([-20,0])},r.geoKavrayskiy7=function(){return a.geoProjection(ar).scale(158.837)},r.geoKavrayskiy7Raw=ar,r.geoLagrange=function(){var je=.5,$e=a.geoProjectionMutator(Or),Qe=$e(je);return Qe.spacing=function(ut){return arguments.length?$e(je=+ut):je},Qe.scale(124.75)},r.geoLagrangeRaw=Or,r.geoLarrivee=function(){return a.geoProjection(Er).scale(97.2672)},r.geoLarriveeRaw=Er,r.geoLaskowski=function(){return a.geoProjection(Kn).scale(139.98)},r.geoLaskowskiRaw=Kn,r.geoLittrow=function(){return a.geoProjection(Ln).scale(144.049).clipAngle(89.999)},r.geoLittrowRaw=Ln,r.geoLoximuthal=function(){return fe(lr).parallel(40).scale(158.837)},r.geoLoximuthalRaw=lr,r.geoMiller=function(){return a.geoProjection(Wr).scale(108.318)},r.geoMillerRaw=Wr,r.geoModifiedStereographic=pr,r.geoModifiedStereographicRaw=Mn,r.geoModifiedStereographicAlaska=function(){return pr(rr,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)},r.geoModifiedStereographicGs48=function(){return pr(nr,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])},r.geoModifiedStereographicGs50=function(){return pr(Bn,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])},r.geoModifiedStereographicMiller=function(){return pr(Fr,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)},r.geoModifiedStereographicLee=function(){return pr($r,[165,10]).scale(250).clipAngle(130).center([-165,-10])},r.geoMollweide=function(){return a.geoProjection(ae).scale(169.529)},r.geoMollweideRaw=ae,r.geoMtFlatPolarParabolic=function(){return a.geoProjection(cn).scale(164.859)},r.geoMtFlatPolarParabolicRaw=cn,r.geoMtFlatPolarQuartic=function(){return a.geoProjection(jn).scale(188.209)},r.geoMtFlatPolarQuarticRaw=jn,r.geoMtFlatPolarSinusoidal=function(){return a.geoProjection(jt).scale(166.518)},r.geoMtFlatPolarSinusoidalRaw=jt,r.geoNaturalEarth2=function(){return a.geoProjection(fn).scale(175.295)},r.geoNaturalEarth2Raw=fn,r.geoNellHammer=function(){return a.geoProjection(yn).scale(152.63)},r.geoNellHammerRaw=yn,r.geoInterruptedQuarticAuthalic=function(){return nn(q(1/0),$n).rotate([20,0]).scale(152.63)},r.geoNicolosi=function(){return a.geoProjection(Un).scale(127.267)},r.geoNicolosiRaw=Un,r.geoPatterson=function(){return a.geoProjection(Nn).scale(139.319)},r.geoPattersonRaw=Nn,r.geoPolyconic=function(){return a.geoProjection(Rn).scale(103.74)},r.geoPolyconicRaw=Rn,r.geoPolyhedral=Zn,r.geoPolyhedralButterfly=function(je){je=je||function(Qe){var ut=a.geoCentroid({type:"MultiPoint",coordinates:Qe});return a.geoGnomonic().scale(1).translate([0,0]).rotate([-ut[0],-ut[1]])};var $e=xr.map(function(Qe){return{face:Qe,project:je(Qe)}});return[-1,0,0,1,0,1,4,5].forEach(function(Qe,ut){var mt=$e[Qe];mt&&(mt.children||(mt.children=[])).push($e[ut])}),Zn($e[0],function(Qe,ut){return $e[Qe<-T/2?ut<0?6:4:Qe<0?ut<0?2:0:Qe0?[-ut[0],0]:[180-ut[0],180])};var $e=xr.map(function(Qe){return{face:Qe,project:je(Qe)}});return[-1,0,0,1,0,1,4,5].forEach(function(Qe,ut){var mt=$e[Qe];mt&&(mt.children||(mt.children=[])).push($e[ut])}),Zn($e[0],function(Qe,ut){return $e[Qe<-T/2?ut<0?6:4:Qe<0?ut<0?2:0:Qe2||_n[0]!=an[0]||_n[1]!=an[1])&&(hn.push(_n),an=_n)}return hn.length===1&&Yt.length>1&&hn.push(Qe(Yt[Yt.length-1])),hn}function pt(Yt){return Yt.map(mt)}function Ct(Yt){if(Yt==null)return Yt;var an;switch(Yt.type){case"GeometryCollection":an={type:"GeometryCollection",geometries:Yt.geometries.map(Ct)};break;case"Point":an={type:"Point",coordinates:Qe(Yt.coordinates)};break;case"MultiPoint":an={type:Yt.type,coordinates:ut(Yt.coordinates)};break;case"LineString":an={type:Yt.type,coordinates:mt(Yt.coordinates)};break;case"MultiLineString":case"Polygon":an={type:Yt.type,coordinates:pt(Yt.coordinates)};break;case"MultiPolygon":an={type:"MultiPolygon",coordinates:Yt.coordinates.map(pt)};break;default:return Yt}return Yt.bbox!=null&&(an.bbox=Yt.bbox),an}function Qt(Yt){var an={type:"Feature",properties:Yt.properties,geometry:Ct(Yt.geometry)};return Yt.id!=null&&(an.id=Yt.id),Yt.bbox!=null&&(an.bbox=Yt.bbox),an}if(je!=null)switch(je.type){case"Feature":return Qt(je);case"FeatureCollection":var en={type:"FeatureCollection",features:je.features.map(Qt)};return je.bbox!=null&&(en.bbox=je.bbox),en;default:return Ct(je)}return je},r.geoQuincuncial=ya,r.geoRectangularPolyconic=function(){return fe(Zo).scale(131.215)},r.geoRectangularPolyconicRaw=Zo,r.geoRobinson=function(){return a.geoProjection(hs).scale(152.63)},r.geoRobinsonRaw=hs,r.geoSatellite=function(){var je=2,$e=0,Qe=a.geoProjectionMutator(bs),ut=Qe(je,$e);return ut.distance=function(mt){return arguments.length?Qe(je=+mt,$e):je},ut.tilt=function(mt){return arguments.length?Qe(je,$e=mt*R):$e*O},ut.scale(432.147).clipAngle(L(1/je)*O-1e-6)},r.geoSatelliteRaw=bs,r.geoSinuMollweide=function(){return a.geoProjection(It).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},r.geoSinuMollweideRaw=It,r.geoSinusoidal=function(){return a.geoProjection(me).scale(152.63)},r.geoSinusoidalRaw=me,r.geoStitch=function(je){if(je==null)return je;switch(je.type){case"Feature":return ba(je);case"FeatureCollection":var $e={type:"FeatureCollection",features:je.features.map(ba)};return je.bbox!=null&&($e.bbox=je.bbox),$e;default:return ju(je)}},r.geoTimes=function(){return a.geoProjection(Wl).scale(146.153)},r.geoTimesRaw=Wl,r.geoTwoPointAzimuthal=ac,r.geoTwoPointAzimuthalRaw=Ec,r.geoTwoPointAzimuthalUsa=function(){return ac([-158,21.5],[-77,39]).clipAngle(60).scale(400)},r.geoTwoPointEquidistant=Ns,r.geoTwoPointEquidistantRaw=Cc,r.geoTwoPointEquidistantUsa=function(){return Ns([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)},r.geoVanDerGrinten=function(){return a.geoProjection(Bs).scale(79.4183)},r.geoVanDerGrintenRaw=Bs,r.geoVanDerGrinten2=function(){return a.geoProjection(fl).scale(79.4183)},r.geoVanDerGrinten2Raw=fl,r.geoVanDerGrinten3=function(){return a.geoProjection(hl).scale(79.4183)},r.geoVanDerGrinten3Raw=hl,r.geoVanDerGrinten4=function(){return a.geoProjection(dl).scale(127.16)},r.geoVanDerGrinten4Raw=dl,r.geoWagner=ws,r.geoWagner7=function(){return ws().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)},r.geoWagnerRaw=Yl,r.geoWagner4=function(){return a.geoProjection(pl).scale(176.84)},r.geoWagner4Raw=pl,r.geoWagner6=function(){return a.geoProjection(Vu).scale(152.63)},r.geoWagner6Raw=Vu,r.geoWiechel=function(){return a.geoProjection(js).rotate([0,-90,45]).scale(124.75).clipAngle(179.999)},r.geoWiechelRaw=js,r.geoWinkel3=function(){return a.geoProjection(ma).scale(158.837)},r.geoWinkel3Raw=ma,Object.defineProperty(r,"__esModule",{value:!0})})},{"d3-array":107,"d3-geo":114}],114:[function(e,o,f){(function(r,a){typeof f=="object"&&o!==void 0?a(f,e("d3-array")):a((r=r||self).d3=r.d3||{},r.d3)})(this,function(r,a){function u(){return new c}function c(){this.reset()}c.prototype={constructor:c,reset:function(){this.s=this.t=0},add:function(ht){s(i,ht,this.t),s(this,i.s,this.s),this.s?this.t+=i.t:this.s=i.t},valueOf:function(){return this.s}};var i=new c;function s(ht,Ft,ln){var $t=ht.s=Ft+ln,un=$t-Ft,On=$t-un;ht.t=Ft-On+(ln-un)}var l=1e-6,d=Math.PI,h=d/2,m=d/4,g=2*d,p=180/d,v=d/180,y=Math.abs,x=Math.atan,w=Math.atan2,k=Math.cos,b=Math.ceil,T=Math.exp,_=Math.log,M=Math.pow,A=Math.sin,S=Math.sign||function(ht){return ht>0?1:ht<0?-1:0},E=Math.sqrt,D=Math.tan;function O(ht){return ht>1?0:ht<-1?d:Math.acos(ht)}function R(ht){return ht>1?h:ht<-1?-h:Math.asin(ht)}function z(ht){return(ht=A(ht/2))*ht}function L(){}function P(ht,Ft){ht&&B.hasOwnProperty(ht.type)&&B[ht.type](ht,Ft)}var N={Feature:function(ht,Ft){P(ht.geometry,Ft)},FeatureCollection:function(ht,Ft){for(var ln=ht.features,$t=-1,un=ln.length;++$t=0?1:-1,un=$t*ln,On=k(Ft=(Ft*=v)/2+m),Fn=A(Ft),Jn=U*Fn,fr=re*On+Jn*k(un),ur=Jn*$t*A(un);q.add(w(ur,fr)),Z=ht,re=On,U=Fn}function ae(ht){return[w(ht[1],ht[0]),R(ht[2])]}function ue(ht){var Ft=ht[0],ln=ht[1],$t=k(ln);return[$t*k(Ft),$t*A(Ft),A(ln)]}function le(ht,Ft){return ht[0]*Ft[0]+ht[1]*Ft[1]+ht[2]*Ft[2]}function ge(ht,Ft){return[ht[1]*Ft[2]-ht[2]*Ft[1],ht[2]*Ft[0]-ht[0]*Ft[2],ht[0]*Ft[1]-ht[1]*Ft[0]]}function fe(ht,Ft){ht[0]+=Ft[0],ht[1]+=Ft[1],ht[2]+=Ft[2]}function me(ht,Ft){return[ht[0]*Ft,ht[1]*Ft,ht[2]*Ft]}function _e(ht){var Ft=E(ht[0]*ht[0]+ht[1]*ht[1]+ht[2]*ht[2]);ht[0]/=Ft,ht[1]/=Ft,ht[2]/=Ft}var we,Te,Oe,de,ye,Me,ke,Ee,ze,Fe,Ve,Ke,Re,qe,We,Ye,nt,ft,vt,Pt,At,at,et,Ot,Wt,Jt,Be=u(),Ge={point:Tt,lineStart:Pe,lineEnd:Ie,polygonStart:function(){Ge.point=Ae,Ge.lineStart=De,Ge.lineEnd=He,Be.reset(),ne.polygonStart()},polygonEnd:function(){ne.polygonEnd(),Ge.point=Tt,Ge.lineStart=Pe,Ge.lineEnd=Ie,q<0?(we=-(Oe=180),Te=-(de=90)):Be>l?de=90:Be<-l&&(Te=-90),Fe[0]=we,Fe[1]=Oe},sphere:function(){we=-(Oe=180),Te=-(de=90)}};function Tt(ht,Ft){ze.push(Fe=[we=ht,Oe=ht]),Ftde&&(de=Ft)}function dt(ht,Ft){var ln=ue([ht*v,Ft*v]);if(Ee){var $t=ge(Ee,ln),un=ge([$t[1],-$t[0],0],$t);_e(un),un=ae(un);var On,Fn=ht-ye,Jn=Fn>0?1:-1,fr=un[0]*p*Jn,ur=y(Fn)>180;ur^(Jn*yede&&(de=On):ur^(Jn*ye<(fr=(fr+360)%360-180)&&frde&&(de=Ft)),ur?htrt(we,Oe)&&(Oe=ht):rt(ht,Oe)>rt(we,Oe)&&(we=ht):Oe>=we?(htOe&&(Oe=ht)):ht>ye?rt(we,ht)>rt(we,Oe)&&(Oe=ht):rt(ht,Oe)>rt(we,Oe)&&(we=ht)}else ze.push(Fe=[we=ht,Oe=ht]);Ftde&&(de=Ft),Ee=ln,ye=ht}function Pe(){Ge.point=dt}function Ie(){Fe[0]=we,Fe[1]=Oe,Ge.point=Tt,Ee=null}function Ae(ht,Ft){if(Ee){var ln=ht-ye;Be.add(y(ln)>180?ln+(ln>0?360:-360):ln)}else Me=ht,ke=Ft;ne.point(ht,Ft),dt(ht,Ft)}function De(){ne.lineStart()}function He(){Ae(Me,ke),ne.lineEnd(),y(Be)>l&&(we=-(Oe=180)),Fe[0]=we,Fe[1]=Oe,Ee=null}function rt(ht,Ft){return(Ft-=ht)<0?Ft+360:Ft}function lt(ht,Ft){return ht[0]-Ft[0]}function ot(ht,Ft){return ht[0]<=ht[1]?ht[0]<=Ft&&Ft<=ht[1]:Ftd?ht+Math.round(-ht/g)*g:ht,Ft]}function Zt(ht,Ft,ln){return(ht%=g)?Ft||ln?Et(Ht(ht),mn(Ft,ln)):Ht(ht):Ft||ln?mn(Ft,ln):It}function Kt(ht){return function(Ft,ln){return[(Ft+=ht)>d?Ft-g:Ft<-d?Ft+g:Ft,ln]}}function Ht(ht){var Ft=Kt(ht);return Ft.invert=Kt(-ht),Ft}function mn(ht,Ft){var ln=k(ht),$t=A(ht),un=k(Ft),On=A(Ft);function Fn(Jn,fr){var ur=k(fr),yr=k(Jn)*ur,Tr=A(Jn)*ur,hr=A(fr),Ar=hr*ln+yr*$t;return[w(Tr*un-Ar*On,yr*ln-hr*$t),R(Ar*un+Tr*On)]}return Fn.invert=function(Jn,fr){var ur=k(fr),yr=k(Jn)*ur,Tr=A(Jn)*ur,hr=A(fr),Ar=hr*un-Tr*On;return[w(Tr*un+hr*On,yr*ln+Ar*$t),R(Ar*ln-yr*$t)]},Fn}function zn(ht){function Ft(ln){return(ln=ht(ln[0]*v,ln[1]*v))[0]*=p,ln[1]*=p,ln}return ht=Zt(ht[0]*v,ht[1]*v,ht.length>2?ht[2]*v:0),Ft.invert=function(ln){return(ln=ht.invert(ln[0]*v,ln[1]*v))[0]*=p,ln[1]*=p,ln},Ft}function pn(ht,Ft,ln,$t,un,On){if(ln){var Fn=k(Ft),Jn=A(Ft),fr=$t*ln;un==null?(un=Ft+$t*g,On=Ft-fr/2):(un=tn(Fn,un),On=tn(Fn,On),($t>0?unOn)&&(un+=$t*g));for(var ur,yr=un;$t>0?yr>On:yr1&&Ft.push(Ft.pop().concat(Ft.shift()))},result:function(){var ln=Ft;return Ft=[],ht=null,ln}}}function sn(ht,Ft){return y(ht[0]-Ft[0])=0;--On)un.point((yr=ur[On])[0],yr[1]);else $t(hr.x,hr.p.x,-1,un);hr=hr.p}ur=(hr=hr.o).z,Ar=!Ar}while(!hr.v);un.lineEnd()}}}function In(ht){if(Ft=ht.length){for(var Ft,ln,$t=0,un=ht[0];++$t=0?1:-1,ra=Lr*Ki,Ji=ra>d,Ci=Zr*fi;if(Hn.add(w(Ci*Lr*A(ra),mi*Ni+Ci*k(ra))),Fn+=Ji?Ki+Lr*g:Ki,Ji^Ar>=ln^Rr>=ln){var ia=ge(ue(hr),ue(di));_e(ia);var Wi=ge(On,ia);_e(Wi);var Ca=(Ji^Ki>=0?-1:1)*R(Wi[2]);($t>Ca||$t===Ca&&(ia[0]||ia[1]))&&(Jn+=Ji^Ki>=0?1:-1)}}return(Fn<-l||Fn0){for(Tr||(un.polygonStart(),Tr=!0),un.lineStart(),Gr=0;Gr1&&2&Lr&&ra.push(ra.pop().concat(ra.shift())),Fn.push(ra.filter(vr))}return hr}}function vr(ht){return ht.length>1}function Er(ht,Ft){return((ht=ht.x)[0]<0?ht[1]-h-l:h-ht[1])-((Ft=Ft.x)[0]<0?Ft[1]-h-l:h-Ft[1])}var Kn=Or(function(){return!0},function(ht){var Ft,ln=NaN,$t=NaN,un=NaN;return{lineStart:function(){ht.lineStart(),Ft=1},point:function(On,Fn){var Jn=On>0?d:-d,fr=y(On-ln);y(fr-d)0?h:-h),ht.point(un,$t),ht.lineEnd(),ht.lineStart(),ht.point(Jn,$t),ht.point(On,$t),Ft=0):un!==Jn&&fr>=d&&(y(ln-un)l?x((A(yr)*(Ur=k(hr))*A(Tr)-A(hr)*(Ar=k(yr))*A(ur))/(Ar*Ur*Zr)):(yr+hr)/2}(ln,$t,On,Fn),ht.point(un,$t),ht.lineEnd(),ht.lineStart(),ht.point(Jn,$t),Ft=0),ht.point(ln=On,$t=Fn),un=Jn},lineEnd:function(){ht.lineEnd(),ln=$t=NaN},clean:function(){return 2-Ft}}},function(ht,Ft,ln,$t){var un;if(ht==null)un=ln*h,$t.point(-d,un),$t.point(0,un),$t.point(d,un),$t.point(d,0),$t.point(d,-un),$t.point(0,-un),$t.point(-d,-un),$t.point(-d,0),$t.point(-d,un);else if(y(ht[0]-Ft[0])>l){var On=ht[0]0,un=y(Ft)>l;function On(fr,ur){return k(fr)*k(ur)>Ft}function Fn(fr,ur,yr){var Tr=[1,0,0],hr=ge(ue(fr),ue(ur)),Ar=le(hr,hr),Ur=hr[0],Zr=Ar-Ur*Ur;if(!Zr)return!yr&&fr;var mi=Ft*Ar/Zr,Qn=-Ft*Ur/Zr,di=ge(Tr,hr),Rr=me(Tr,mi);fe(Rr,me(hr,Qn));var Gr=di,fi=le(Rr,Gr),Ni=le(Gr,Gr),Ki=fi*fi-Ni*(le(Rr,Rr)-1);if(!(Ki<0)){var Lr=E(Ki),ra=me(Gr,(-fi-Lr)/Ni);if(fe(ra,Rr),ra=ae(ra),!yr)return ra;var Ji,Ci=fr[0],ia=ur[0],Wi=fr[1],Ca=ur[1];ia0^ra[1]<(y(ra[0]-Ci)d^(Ci<=ra[0]&&ra[0]<=ia)){var Po=me(Gr,(-fi+Lr)/Ni);return fe(Po,Rr),[ra,ae(Po)]}}}function Jn(fr,ur){var yr=$t?ht:d-ht,Tr=0;return fr<-yr?Tr|=1:fr>yr&&(Tr|=2),ur<-yr?Tr|=4:ur>yr&&(Tr|=8),Tr}return Or(On,function(fr){var ur,yr,Tr,hr,Ar;return{lineStart:function(){hr=Tr=!1,Ar=1},point:function(Ur,Zr){var mi,Qn=[Ur,Zr],di=On(Ur,Zr),Rr=$t?di?0:Jn(Ur,Zr):di?Jn(Ur+(Ur<0?d:-d),Zr):0;if(!ur&&(hr=Tr=di)&&fr.lineStart(),di!==Tr&&(!(mi=Fn(ur,Qn))||sn(ur,mi)||sn(Qn,mi))&&(Qn[2]=1),di!==Tr)Ar=0,di?(fr.lineStart(),mi=Fn(Qn,ur),fr.point(mi[0],mi[1])):(mi=Fn(ur,Qn),fr.point(mi[0],mi[1],2),fr.lineEnd()),ur=mi;else if(un&&ur&&$t^di){var Gr;Rr&yr||!(Gr=Fn(Qn,ur,!0))||(Ar=0,$t?(fr.lineStart(),fr.point(Gr[0][0],Gr[0][1]),fr.point(Gr[1][0],Gr[1][1]),fr.lineEnd()):(fr.point(Gr[1][0],Gr[1][1]),fr.lineEnd(),fr.lineStart(),fr.point(Gr[0][0],Gr[0][1],3)))}!di||ur&&sn(ur,Qn)||fr.point(Qn[0],Qn[1]),ur=Qn,Tr=di,yr=Rr},lineEnd:function(){Tr&&fr.lineEnd(),ur=null},clean:function(){return Ar|(hr&&Tr)<<1}}},function(fr,ur,yr,Tr){pn(Tr,ht,ln,yr,fr,ur)},$t?[0,-ht]:[-d,ht-d])}function lr(ht,Ft,ln,$t){function un(ur,yr){return ht<=ur&&ur<=ln&&Ft<=yr&&yr<=$t}function On(ur,yr,Tr,hr){var Ar=0,Ur=0;if(ur==null||(Ar=Fn(ur,Tr))!==(Ur=Fn(yr,Tr))||fr(ur,yr)<0^Tr>0)do hr.point(Ar===0||Ar===3?ht:ln,Ar>1?$t:Ft);while((Ar=(Ar+Tr+4)%4)!==Ur);else hr.point(yr[0],yr[1])}function Fn(ur,yr){return y(ur[0]-ht)0?0:3:y(ur[0]-ln)0?2:1:y(ur[1]-Ft)0?1:0:yr>0?3:2}function Jn(ur,yr){return fr(ur.x,yr.x)}function fr(ur,yr){var Tr=Fn(ur,1),hr=Fn(yr,1);return Tr!==hr?Tr-hr:Tr===0?yr[1]-ur[1]:Tr===1?ur[0]-yr[0]:Tr===2?ur[1]-yr[1]:yr[0]-ur[0]}return function(ur){var yr,Tr,hr,Ar,Ur,Zr,mi,Qn,di,Rr,Gr,fi=ur,Ni=nn(),Ki={point:Lr,lineStart:function(){Ki.point=ra,Tr&&Tr.push(hr=[]),Rr=!0,di=!1,mi=Qn=NaN},lineEnd:function(){yr&&(ra(Ar,Ur),Zr&&di&&Ni.rejoin(),yr.push(Ni.result())),Ki.point=Lr,di&&fi.lineEnd()},polygonStart:function(){fi=Ni,yr=[],Tr=[],Gr=!0},polygonEnd:function(){var Ji=function(){for(var Wi=0,Ca=0,pi=Tr.length;Ca$t&&(Qa-_a)*($t-Po)>(Ts-Po)*(ht-_a)&&++Wi:Ts<=$t&&(Qa-_a)*($t-Po)<(Ts-Po)*(ht-_a)&&--Wi;return Wi}(),Ci=Gr&&Ji,ia=(yr=a.merge(yr)).length;(Ci||ia)&&(ur.polygonStart(),Ci&&(ur.lineStart(),On(null,null,1,ur),ur.lineEnd()),ia&&bn(yr,Jn,Ji,On,ur),ur.polygonEnd()),fi=ur,yr=Tr=hr=null}};function Lr(Ji,Ci){un(Ji,Ci)&&fi.point(Ji,Ci)}function ra(Ji,Ci){var ia=un(Ji,Ci);if(Tr&&hr.push([Ji,Ci]),Rr)Ar=Ji,Ur=Ci,Zr=ia,Rr=!1,ia&&(fi.lineStart(),fi.point(Ji,Ci));else if(ia&&di)fi.point(Ji,Ci);else{var Wi=[mi=Math.max(-1e9,Math.min(1e9,mi)),Qn=Math.max(-1e9,Math.min(1e9,Qn))],Ca=[Ji=Math.max(-1e9,Math.min(1e9,Ji)),Ci=Math.max(-1e9,Math.min(1e9,Ci))];(function(pi,_a,Po,Al,Zs,ks){var Pi,Qa=pi[0],Ts=pi[1],wa=0,uo=1,jo=_a[0]-Qa,La=_a[1]-Ts;if(Pi=Po-Qa,jo||!(Pi>0)){if(Pi/=jo,jo<0){if(Pi0){if(Pi>uo)return;Pi>wa&&(wa=Pi)}if(Pi=Zs-Qa,jo||!(Pi<0)){if(Pi/=jo,jo<0){if(Pi>uo)return;Pi>wa&&(wa=Pi)}else if(jo>0){if(Pi0)){if(Pi/=La,La<0){if(Pi0){if(Pi>uo)return;Pi>wa&&(wa=Pi)}if(Pi=ks-Ts,La||!(Pi<0)){if(Pi/=La,La<0){if(Pi>uo)return;Pi>wa&&(wa=Pi)}else if(La>0){if(Pi0&&(pi[0]=Qa+wa*jo,pi[1]=Ts+wa*La),uo<1&&(_a[0]=Qa+uo*jo,_a[1]=Ts+uo*La),!0}}}}})(Wi,Ca,ht,Ft,ln,$t)?(di||(fi.lineStart(),fi.point(Wi[0],Wi[1])),fi.point(Ca[0],Ca[1]),ia||fi.lineEnd(),Gr=!1):ia&&(fi.lineStart(),fi.point(Ji,Ci),Gr=!1)}mi=Ji,Qn=Ci,di=ia}return Ki}}var Wr,Mn,rr,nr=u(),Bn={sphere:L,point:L,lineStart:function(){Bn.point=$r,Bn.lineEnd=Fr},lineEnd:L,polygonStart:L,polygonEnd:L};function Fr(){Bn.point=Bn.lineEnd=L}function $r(ht,Ft){Wr=ht*=v,Mn=A(Ft*=v),rr=k(Ft),Bn.point=pr}function pr(ht,Ft){ht*=v;var ln=A(Ft*=v),$t=k(Ft),un=y(ht-Wr),On=k(un),Fn=$t*A(un),Jn=rr*ln-Mn*$t*On,fr=Mn*ln+rr*$t*On;nr.add(w(E(Fn*Fn+Jn*Jn),fr)),Wr=ht,Mn=ln,rr=$t}function qr(ht){return nr.reset(),K(ht,Bn),+nr}var _i=[null,null],cn={type:"LineString",coordinates:_i};function jn(ht,Ft){return _i[0]=ht,_i[1]=Ft,qr(cn)}var jt={Feature:function(ht,Ft){return yn(ht.geometry,Ft)},FeatureCollection:function(ht,Ft){for(var ln=ht.features,$t=-1,un=ln.length;++$t0&&(un=jn(ht[On],ht[On-1]))>0&&ln<=un&&$t<=un&&(ln+$t-un)*(1-Math.pow((ln-$t)/un,2))<1e-12*un)return!0;ln=$t}return!1}function Nn(ht,Ft){return!!ar(ht.map(Rn),wn(Ft))}function Rn(ht){return(ht=ht.map(wn)).pop(),ht}function wn(ht){return[ht[0]*v,ht[1]*v]}function kn(ht,Ft,ln){var $t=a.range(ht,Ft-l,ln).concat(Ft);return function(un){return $t.map(function(On){return[un,On]})}}function Tn(ht,Ft,ln){var $t=a.range(ht,Ft-l,ln).concat(Ft);return function(un){return $t.map(function(On){return[On,un]})}}function Dn(){var ht,Ft,ln,$t,un,On,Fn,Jn,fr,ur,yr,Tr,hr=10,Ar=hr,Ur=90,Zr=360,mi=2.5;function Qn(){return{type:"MultiLineString",coordinates:di()}}function di(){return a.range(b($t/Ur)*Ur,ln,Ur).map(yr).concat(a.range(b(Jn/Zr)*Zr,Fn,Zr).map(Tr)).concat(a.range(b(Ft/hr)*hr,ht,hr).filter(function(Rr){return y(Rr%Ur)>l}).map(fr)).concat(a.range(b(On/Ar)*Ar,un,Ar).filter(function(Rr){return y(Rr%Zr)>l}).map(ur))}return Qn.lines=function(){return di().map(function(Rr){return{type:"LineString",coordinates:Rr}})},Qn.outline=function(){return{type:"Polygon",coordinates:[yr($t).concat(Tr(Fn).slice(1),yr(ln).reverse().slice(1),Tr(Jn).reverse().slice(1))]}},Qn.extent=function(Rr){return arguments.length?Qn.extentMajor(Rr).extentMinor(Rr):Qn.extentMinor()},Qn.extentMajor=function(Rr){return arguments.length?($t=+Rr[0][0],ln=+Rr[1][0],Jn=+Rr[0][1],Fn=+Rr[1][1],$t>ln&&(Rr=$t,$t=ln,ln=Rr),Jn>Fn&&(Rr=Jn,Jn=Fn,Fn=Rr),Qn.precision(mi)):[[$t,Jn],[ln,Fn]]},Qn.extentMinor=function(Rr){return arguments.length?(Ft=+Rr[0][0],ht=+Rr[1][0],On=+Rr[0][1],un=+Rr[1][1],Ft>ht&&(Rr=Ft,Ft=ht,ht=Rr),On>un&&(Rr=On,On=un,un=Rr),Qn.precision(mi)):[[Ft,On],[ht,un]]},Qn.step=function(Rr){return arguments.length?Qn.stepMajor(Rr).stepMinor(Rr):Qn.stepMinor()},Qn.stepMajor=function(Rr){return arguments.length?(Ur=+Rr[0],Zr=+Rr[1],Qn):[Ur,Zr]},Qn.stepMinor=function(Rr){return arguments.length?(hr=+Rr[0],Ar=+Rr[1],Qn):[hr,Ar]},Qn.precision=function(Rr){return arguments.length?(mi=+Rr,fr=kn(On,un,90),ur=Tn(Ft,ht,mi),yr=kn(Jn,Fn,90),Tr=Tn($t,ln,mi),Qn):mi},Qn.extentMajor([[-180,-90+l],[180,90-l]]).extentMinor([[-180,-80-l],[180,80+l]])}function Zn(ht){return ht}var Yn,ir,or,xr,wr=u(),kr=u(),Dr={point:L,lineStart:L,lineEnd:L,polygonStart:function(){Dr.lineStart=Nr,Dr.lineEnd=Bi},polygonEnd:function(){Dr.lineStart=Dr.lineEnd=Dr.point=L,wr.add(y(kr)),kr.reset()},result:function(){var ht=wr/2;return wr.reset(),ht}};function Nr(){Dr.point=ri}function ri(ht,Ft){Dr.point=ji,Yn=or=ht,ir=xr=Ft}function ji(ht,Ft){kr.add(xr*ht-or*Ft),or=ht,xr=Ft}function Bi(){ji(Yn,ir)}var Sr=1/0,ui=Sr,si=-Sr,ta=si,Ja={point:function(ht,Ft){htsi&&(si=ht),Ftta&&(ta=Ft)},lineStart:L,lineEnd:L,polygonStart:L,polygonEnd:L,result:function(){var ht=[[Sr,ui],[si,ta]];return si=ta=-(ui=Sr=1/0),ht}},Ao,fs,ya,xa,Zo=0,oa=0,hs=0,bs=0,so=0,Jo=0,_s=0,Ls=0,Oo=0,Ka={point:$o,lineStart:ic,lineEnd:ju,polygonStart:function(){Ka.lineStart=Wl,Ka.lineEnd=Sc},polygonEnd:function(){Ka.point=$o,Ka.lineStart=ic,Ka.lineEnd=ju},result:function(){var ht=Oo?[_s/Oo,Ls/Oo]:Jo?[bs/Jo,so/Jo]:hs?[Zo/hs,oa/hs]:[NaN,NaN];return Zo=oa=hs=bs=so=Jo=_s=Ls=Oo=0,ht}};function $o(ht,Ft){Zo+=ht,oa+=Ft,++hs}function ic(){Ka.point=Mc}function Mc(ht,Ft){Ka.point=ba,$o(ya=ht,xa=Ft)}function ba(ht,Ft){var ln=ht-ya,$t=Ft-xa,un=E(ln*ln+$t*$t);bs+=un*(ya+ht)/2,so+=un*(xa+Ft)/2,Jo+=un,$o(ya=ht,xa=Ft)}function ju(){Ka.point=$o}function Wl(){Ka.point=Ec}function Sc(){ac(Ao,fs)}function Ec(ht,Ft){Ka.point=ac,$o(Ao=ya=ht,fs=xa=Ft)}function ac(ht,Ft){var ln=ht-ya,$t=Ft-xa,un=E(ln*ln+$t*$t);bs+=un*(ya+ht)/2,so+=un*(xa+Ft)/2,Jo+=un,_s+=(un=xa*ht-ya*Ft)*(ya+ht),Ls+=un*(xa+Ft),Oo+=3*un,$o(ya=ht,xa=Ft)}function Cc(ht){this._context=ht}Cc.prototype={_radius:4.5,pointRadius:function(ht){return this._radius=ht,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(ht,Ft){switch(this._point){case 0:this._context.moveTo(ht,Ft),this._point=1;break;case 1:this._context.lineTo(ht,Ft);break;default:this._context.moveTo(ht+this._radius,Ft),this._context.arc(ht,Ft,this._radius,0,g)}},result:L};var Ns,Bs,fl,hl,dl,Yl=u(),ws={point:L,lineStart:function(){ws.point=Uu},lineEnd:function(){Ns&&ds(Bs,fl),ws.point=L},polygonStart:function(){Ns=!0},polygonEnd:function(){Ns=null},result:function(){var ht=+Yl;return Yl.reset(),ht}};function Uu(ht,Ft){ws.point=ds,Bs=hl=ht,fl=dl=Ft}function ds(ht,Ft){hl-=ht,dl-=Ft,Yl.add(E(hl*hl+dl*dl)),hl=ht,dl=Ft}function pl(){this._string=[]}function Vu(ht){return"m0,"+ht+"a"+ht+","+ht+" 0 1,1 0,"+-2*ht+"a"+ht+","+ht+" 0 1,1 0,"+2*ht+"z"}function js(ht){return function(Ft){var ln=new ma;for(var $t in ht)ln[$t]=ht[$t];return ln.stream=Ft,ln}}function ma(){}function je(ht,Ft,ln){var $t=ht.clipExtent&&ht.clipExtent();return ht.scale(150).translate([0,0]),$t!=null&&ht.clipExtent(null),K(ln,ht.stream(Ja)),Ft(Ja.result()),$t!=null&&ht.clipExtent($t),ht}function $e(ht,Ft,ln){return je(ht,function($t){var un=Ft[1][0]-Ft[0][0],On=Ft[1][1]-Ft[0][1],Fn=Math.min(un/($t[1][0]-$t[0][0]),On/($t[1][1]-$t[0][1])),Jn=+Ft[0][0]+(un-Fn*($t[1][0]+$t[0][0]))/2,fr=+Ft[0][1]+(On-Fn*($t[1][1]+$t[0][1]))/2;ht.scale(150*Fn).translate([Jn,fr])},ln)}function Qe(ht,Ft,ln){return $e(ht,[[0,0],Ft],ln)}function ut(ht,Ft,ln){return je(ht,function($t){var un=+Ft,On=un/($t[1][0]-$t[0][0]),Fn=(un-On*($t[1][0]+$t[0][0]))/2,Jn=-On*$t[0][1];ht.scale(150*On).translate([Fn,Jn])},ln)}function mt(ht,Ft,ln){return je(ht,function($t){var un=+Ft,On=un/($t[1][1]-$t[0][1]),Fn=-On*$t[0][0],Jn=(un-On*($t[1][1]+$t[0][1]))/2;ht.scale(150*On).translate([Fn,Jn])},ln)}pl.prototype={_radius:4.5,_circle:Vu(4.5),pointRadius:function(ht){return(ht=+ht)!==this._radius&&(this._radius=ht,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._string.push("Z"),this._point=NaN},point:function(ht,Ft){switch(this._point){case 0:this._string.push("M",ht,",",Ft),this._point=1;break;case 1:this._string.push("L",ht,",",Ft);break;default:this._circle==null&&(this._circle=Vu(this._radius)),this._string.push("M",ht,",",Ft,this._circle)}},result:function(){if(this._string.length){var ht=this._string.join("");return this._string=[],ht}return null}},ma.prototype={constructor:ma,point:function(ht,Ft){this.stream.point(ht,Ft)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var pt=k(30*v);function Ct(ht,Ft){return+Ft?function(ln,$t){function un(On,Fn,Jn,fr,ur,yr,Tr,hr,Ar,Ur,Zr,mi,Qn,di){var Rr=Tr-On,Gr=hr-Fn,fi=Rr*Rr+Gr*Gr;if(fi>4*$t&&Qn--){var Ni=fr+Ur,Ki=ur+Zr,Lr=yr+mi,ra=E(Ni*Ni+Ki*Ki+Lr*Lr),Ji=R(Lr/=ra),Ci=y(y(Lr)-1)$t||y((Rr*pi+Gr*_a)/fi-.5)>.3||fr*Ur+ur*Zr+yr*mi2?pi[2]%360*v:0,Wi()):[mi*p,Qn*p,di*p]},Ci.angle=function(pi){return arguments.length?(Rr=pi%360*v,Wi()):Rr*p},Ci.reflectX=function(pi){return arguments.length?(Gr=pi?-1:1,Wi()):Gr<0},Ci.reflectY=function(pi){return arguments.length?(fi=pi?-1:1,Wi()):fi<0},Ci.precision=function(pi){return arguments.length?(Fn=Ct(Jn,Ji=pi*pi),Ca()):E(Ji)},Ci.fitExtent=function(pi,_a){return $e(Ci,pi,_a)},Ci.fitSize=function(pi,_a){return Qe(Ci,pi,_a)},Ci.fitWidth=function(pi,_a){return ut(Ci,pi,_a)},Ci.fitHeight=function(pi,_a){return mt(Ci,pi,_a)},function(){return Ft=ht.apply(this,arguments),Ci.invert=Ft.invert&&ia,Wi()}}function xn(ht){var Ft=0,ln=d/3,$t=hn(ht),un=$t(Ft,ln);return un.parallels=function(On){return arguments.length?$t(Ft=On[0]*v,ln=On[1]*v):[Ft*p,ln*p]},un}function _n(ht,Ft){var ln=A(ht),$t=(ln+A(Ft))/2;if(y($t)0?Jn<-h+l&&(Jn=-h+l):Jn>h-l&&(Jn=h-l);var fr=un/M(Ui(Jn),$t);return[fr*A($t*Fn),un-fr*k($t*Fn)]}return On.invert=function(Fn,Jn){var fr=un-Jn,ur=S($t)*E(Fn*Fn+fr*fr),yr=w(Fn,y(fr))*S(fr);return fr*$t<0&&(yr-=d*S(Fn)*S(fr)),[yr/$t,2*x(M(un/ur,1/$t))-h]},On}function sa(ht,Ft){return[ht,Ft]}function ca(ht,Ft){var ln=k(ht),$t=ht===Ft?A(ht):(ln-k(Ft))/(Ft-ht),un=ln/$t+ht;if(y($t)l&&--un>0);return[ht/(.8707+(On=$t*$t)*(On*(On*On*On*(.003971-.001529*On)-.013791)-.131979)),$t]},es.invert=zr(R),ts.invert=zr(function(ht){return 2*x(ht)}),na.invert=function(ht,Ft){return[-Ft,2*x(T(ht))-h]},r.geoAlbers=sr,r.geoAlbersUsa=function(){var ht,Ft,ln,$t,un,On,Fn=sr(),Jn=Pn().rotate([154,0]).center([-2,58.5]).parallels([55,65]),fr=Pn().rotate([157,0]).center([-3,19.9]).parallels([8,18]),ur={point:function(hr,Ar){On=[hr,Ar]}};function yr(hr){var Ar=hr[0],Ur=hr[1];return On=null,ln.point(Ar,Ur),On||($t.point(Ar,Ur),On)||(un.point(Ar,Ur),On)}function Tr(){return ht=Ft=null,yr}return yr.invert=function(hr){var Ar=Fn.scale(),Ur=Fn.translate(),Zr=(hr[0]-Ur[0])/Ar,mi=(hr[1]-Ur[1])/Ar;return(mi>=.12&&mi<.234&&Zr>=-.425&&Zr<-.214?Jn:mi>=.166&&mi<.234&&Zr>=-.214&&Zr<-.115?fr:Fn).invert(hr)},yr.stream=function(hr){return ht&&Ft===hr?ht:(Ar=[Fn.stream(Ft=hr),Jn.stream(hr),fr.stream(hr)],Ur=Ar.length,ht={point:function(Zr,mi){for(var Qn=-1;++Qnrt($t[0],$t[1])&&($t[1]=un[1]),rt(un[0],$t[1])>rt($t[0],$t[1])&&($t[0]=un[0])):On.push($t=un);for(Fn=-1/0,Ft=0,$t=On[ln=On.length-1];Ft<=ln;$t=un,++Ft)un=On[Ft],(Jn=rt($t[1],un[0]))>Fn&&(Fn=Jn,we=un[0],Oe=$t[1])}return ze=Fe=null,we===1/0||Te===1/0?[[NaN,NaN],[NaN,NaN]]:[[we,Te],[Oe,de]]},r.geoCentroid=function(ht){Ve=Ke=Re=qe=We=Ye=nt=ft=vt=Pt=At=0,K(ht,kt);var Ft=vt,ln=Pt,$t=At,un=Ft*Ft+ln*ln+$t*$t;return un<1e-12&&(Ft=Ye,ln=nt,$t=ft,Ke2?$t[2]+90:90]):[($t=ln())[0],$t[1],$t[2]-90]},ln([0,0,90]).scale(159.155)},r.geoTransverseMercatorRaw=na,Object.defineProperty(r,"__esModule",{value:!0})})},{"d3-array":107}],115:[function(e,o,f){(function(r,a){a(typeof f=="object"&&o!==void 0?f:(r=r||self).d3=r.d3||{})})(this,function(r){function a(le,ge){return le.parent===ge.parent?1:2}function u(le,ge){return le+ge.x}function c(le,ge){return Math.max(le,ge.y)}function i(le){var ge=0,fe=le.children,me=fe&&fe.length;if(me)for(;--me>=0;)ge+=fe[me].value;else ge=1;le.value=ge}function s(le,ge){var fe,me,_e,we,Te,Oe=new m(le),de=+le.value&&(Oe.value=le.value),ye=[Oe];for(ge==null&&(ge=l);fe=ye.pop();)if(de&&(fe.value=+fe.data.value),(_e=ge(fe.data))&&(Te=_e.length))for(fe.children=new Array(Te),we=Te-1;we>=0;--we)ye.push(me=fe.children[we]=new m(_e[we])),me.parent=fe,me.depth=fe.depth+1;return Oe.eachBefore(h)}function l(le){return le.children}function d(le){le.data=le.data.data}function h(le){var ge=0;do le.height=ge;while((le=le.parent)&&le.height<++ge)}function m(le){this.data=le,this.depth=this.height=0,this.parent=null}m.prototype=s.prototype={constructor:m,count:function(){return this.eachAfter(i)},each:function(le){var ge,fe,me,_e,we=this,Te=[we];do for(ge=Te.reverse(),Te=[];we=ge.pop();)if(le(we),fe=we.children)for(me=0,_e=fe.length;me<_e;++me)Te.push(fe[me]);while(Te.length);return this},eachAfter:function(le){for(var ge,fe,me,_e=this,we=[_e],Te=[];_e=we.pop();)if(Te.push(_e),ge=_e.children)for(fe=0,me=ge.length;fe=0;--fe)_e.push(ge[fe]);return this},sum:function(le){return this.eachAfter(function(ge){for(var fe=+le(ge.data)||0,me=ge.children,_e=me&&me.length;--_e>=0;)fe+=me[_e].value;ge.value=fe})},sort:function(le){return this.eachBefore(function(ge){ge.children&&ge.children.sort(le)})},path:function(le){for(var ge=this,fe=function(we,Te){if(we===Te)return we;var Oe=we.ancestors(),de=Te.ancestors(),ye=null;for(we=Oe.pop(),Te=de.pop();we===Te;)ye=we,we=Oe.pop(),Te=de.pop();return ye}(ge,le),me=[ge];ge!==fe;)ge=ge.parent,me.push(ge);for(var _e=me.length;le!==fe;)me.splice(_e,0,le),le=le.parent;return me},ancestors:function(){for(var le=this,ge=[le];le=le.parent;)ge.push(le);return ge},descendants:function(){var le=[];return this.each(function(ge){le.push(ge)}),le},leaves:function(){var le=[];return this.eachBefore(function(ge){ge.children||le.push(ge)}),le},links:function(){var le=this,ge=[];return le.each(function(fe){fe!==le&&ge.push({source:fe.parent,target:fe})}),ge},copy:function(){return s(this).eachBefore(d)}};var g=Array.prototype.slice;function p(le){for(var ge,fe,me=0,_e=(le=function(Te){for(var Oe,de,ye=Te.length;ye;)de=Math.random()*ye--|0,Oe=Te[ye],Te[ye]=Te[de],Te[de]=Oe;return Te}(g.call(le))).length,we=[];me<_e;)ge=le[me],fe&&x(fe,ge)?++me:(fe=k(we=v(we,ge)),me=0);return fe}function v(le,ge){var fe,me;if(w(ge,le))return[ge];for(fe=0;fe0&&fe*fe>me*me+_e*_e}function w(le,ge){for(var fe=0;fe(Te*=Te)?(me=(ye+Te-_e)/(2*ye),we=Math.sqrt(Math.max(0,Te/ye-me*me)),fe.x=le.x-me*Oe-we*de,fe.y=le.y-me*de+we*Oe):(me=(ye+_e-Te)/(2*ye),we=Math.sqrt(Math.max(0,_e/ye-me*me)),fe.x=ge.x+me*Oe-we*de,fe.y=ge.y+me*de+we*Oe)):(fe.x=ge.x+fe.r,fe.y=ge.y)}function M(le,ge){var fe=le.r+ge.r-1e-6,me=ge.x-le.x,_e=ge.y-le.y;return fe>0&&fe*fe>me*me+_e*_e}function A(le){var ge=le._,fe=le.next._,me=ge.r+fe.r,_e=(ge.x*fe.r+fe.x*ge.r)/me,we=(ge.y*fe.r+fe.y*ge.r)/me;return _e*_e+we*we}function S(le){this._=le,this.next=null,this.previous=null}function E(le){if(!(_e=le.length))return 0;var ge,fe,me,_e,we,Te,Oe,de,ye,Me,ke;if((ge=le[0]).x=0,ge.y=0,!(_e>1))return ge.r;if(fe=le[1],ge.x=-fe.r,fe.x=ge.r,fe.y=0,!(_e>2))return ge.r+fe.r;_(fe,ge,me=le[2]),ge=new S(ge),fe=new S(fe),me=new S(me),ge.next=me.previous=fe,fe.next=ge.previous=me,me.next=fe.previous=ge;e:for(Oe=3;Oe<_e;++Oe){_(ge._,fe._,me=le[Oe]),me=new S(me),de=fe.next,ye=ge.previous,Me=fe._.r,ke=ge._.r;do if(Me<=ke){if(M(de._,me._)){fe=de,ge.next=fe,fe.previous=ge,--Oe;continue e}Me+=de._.r,de=de.next}else{if(M(ye._,me._)){(ge=ye).next=fe,fe.previous=ge,--Oe;continue e}ke+=ye._.r,ye=ye.previous}while(de!==ye.next);for(me.previous=ge,me.next=fe,ge.next=fe.previous=fe=me,we=A(ge);(me=me.next)!==fe;)(Te=A(me))Ee&&(Ee=Oe),Ke=Me*Me*Ve,(ze=Math.max(Ee/Ke,Ke/ke))>Fe){Me-=Oe;break}Fe=ze}Re.push(Te={value:Me,dice:de1?me:1)},fe}(ee),ue=function le(ge){function fe(me,_e,we,Te,Oe){if((de=me._squarify)&&de.ratio===ge)for(var de,ye,Me,ke,Ee,ze=-1,Fe=de.length,Ve=me.value;++ze1?me:1)},fe}(ee);r.cluster=function(){var le=a,ge=1,fe=1,me=!1;function _e(we){var Te,Oe=0;we.eachAfter(function(Ee){var ze=Ee.children;ze?(Ee.x=function(Fe){return Fe.reduce(u,0)/Fe.length}(ze),Ee.y=function(Fe){return 1+Fe.reduce(c,0)}(ze)):(Ee.x=Te?Oe+=le(Ee,Te):0,Ee.y=0,Te=Ee)});var de=function(Ee){for(var ze;ze=Ee.children;)Ee=ze[0];return Ee}(we),ye=function(Ee){for(var ze;ze=Ee.children;)Ee=ze[ze.length-1];return Ee}(we),Me=de.x-le(de,ye)/2,ke=ye.x+le(ye,de)/2;return we.eachAfter(me?function(Ee){Ee.x=(Ee.x-we.x)*ge,Ee.y=(we.y-Ee.y)*fe}:function(Ee){Ee.x=(Ee.x-Me)/(ke-Me)*ge,Ee.y=(1-(we.y?Ee.y/we.y:1))*fe})}return _e.separation=function(we){return arguments.length?(le=we,_e):le},_e.size=function(we){return arguments.length?(me=!1,ge=+we[0],fe=+we[1],_e):me?null:[ge,fe]},_e.nodeSize=function(we){return arguments.length?(me=!0,ge=+we[0],fe=+we[1],_e):me?[ge,fe]:null},_e},r.hierarchy=s,r.pack=function(){var le=null,ge=1,fe=1,me=R;function _e(we){return we.x=ge/2,we.y=fe/2,le?we.eachBefore(P(le)).eachAfter(N(me,.5)).eachBefore(B(1)):we.eachBefore(P(L)).eachAfter(N(R,1)).eachAfter(N(me,we.r/Math.min(ge,fe))).eachBefore(B(Math.min(ge,fe)/(2*we.r))),we}return _e.radius=function(we){return arguments.length?(le=D(we),_e):le},_e.size=function(we){return arguments.length?(ge=+we[0],fe=+we[1],_e):[ge,fe]},_e.padding=function(we){return arguments.length?(me=typeof we=="function"?we:z(+we),_e):me},_e},r.packEnclose=p,r.packSiblings=function(le){return E(le),le},r.partition=function(){var le=1,ge=1,fe=0,me=!1;function _e(we){var Te=we.height+1;return we.x0=we.y0=fe,we.x1=le,we.y1=ge/Te,we.eachBefore(function(Oe,de){return function(ye){ye.children&&W(ye,ye.x0,Oe*(ye.depth+1)/de,ye.x1,Oe*(ye.depth+2)/de);var Me=ye.x0,ke=ye.y0,Ee=ye.x1-fe,ze=ye.y1-fe;Ee0)throw new Error("cycle");return Te}return fe.id=function(me){return arguments.length?(le=O(me),fe):le},fe.parentId=function(me){return arguments.length?(ge=O(me),fe):ge},fe},r.tree=function(){var le=re,ge=1,fe=1,me=null;function _e(de){var ye=function(Re){for(var qe,We,Ye,nt,ft,vt=new H(Re,0),Pt=[vt];qe=Pt.pop();)if(Ye=qe._.children)for(qe.children=new Array(ft=Ye.length),nt=ft-1;nt>=0;--nt)Pt.push(We=qe.children[nt]=new H(Ye[nt],nt)),We.parent=qe;return(vt.parent=new H(null,0)).children=[vt],vt}(de);if(ye.eachAfter(we),ye.parent.m=-ye.z,ye.eachBefore(Te),me)de.eachBefore(Oe);else{var Me=de,ke=de,Ee=de;de.eachBefore(function(Re){Re.xke.x&&(ke=Re),Re.depth>Ee.depth&&(Ee=Re)});var ze=Me===ke?1:le(Me,ke)/2,Fe=ze-Me.x,Ve=ge/(ke.x+ze+Fe),Ke=fe/(Ee.depth||1);de.eachBefore(function(Re){Re.x=(Re.x+Fe)*Ve,Re.y=Re.depth*Ke})}return de}function we(de){var ye=de.children,Me=de.parent.children,ke=de.i?Me[de.i-1]:null;if(ye){(function(ze){for(var Fe,Ve=0,Ke=0,Re=ze.children,qe=Re.length;--qe>=0;)(Fe=Re[qe]).z+=Ve,Fe.m+=Ve,Ve+=Fe.s+(Ke+=Fe.c)})(de);var Ee=(ye[0].z+ye[ye.length-1].z)/2;ke?(de.z=ke.z+le(de._,ke._),de.m=de.z-Ee):de.z=Ee}else ke&&(de.z=ke.z+le(de._,ke._));de.parent.A=function(ze,Fe,Ve){if(Fe){for(var Ke,Re=ze,qe=ze,We=Fe,Ye=Re.parent.children[0],nt=Re.m,ft=qe.m,vt=We.m,Pt=Ye.m;We=q(We),Re=U(Re),We&ℜ)Ye=U(Ye),(qe=q(qe)).a=ze,(Ke=We.z+vt-Re.z-nt+le(We._,Re._))>0&&($(ne(We,ze,Ve),ze,Ke),nt+=Ke,ft+=Ke),vt+=We.m,nt+=Re.m,Pt+=Ye.m,ft+=qe.m;We&&!q(qe)&&(qe.t=We,qe.m+=vt-ft),Re&&!U(Ye)&&(Ye.t=Re,Ye.m+=nt-Pt,Ve=ze)}return Ve}(de,ke,de.parent.A||Me[0])}function Te(de){de._.x=de.z+de.parent.m,de.m+=de.parent.m}function Oe(de){de.x*=ge,de.y=de.depth*fe}return _e.separation=function(de){return arguments.length?(le=de,_e):le},_e.size=function(de){return arguments.length?(me=!1,ge=+de[0],fe=+de[1],_e):me?null:[ge,fe]},_e.nodeSize=function(de){return arguments.length?(me=!0,ge=+de[0],fe=+de[1],_e):me?[ge,fe]:null},_e},r.treemap=function(){var le=ae,ge=!1,fe=1,me=1,_e=[0],we=R,Te=R,Oe=R,de=R,ye=R;function Me(Ee){return Ee.x0=Ee.y0=0,Ee.x1=fe,Ee.y1=me,Ee.eachBefore(ke),_e=[0],ge&&Ee.eachBefore(G),Ee}function ke(Ee){var ze=_e[Ee.depth],Fe=Ee.x0+ze,Ve=Ee.y0+ze,Ke=Ee.x1-ze,Re=Ee.y1-ze;Ke=Ee-1){var qe=Oe[ke];return qe.x0=Fe,qe.y0=Ve,qe.x1=Ke,void(qe.y1=Re)}for(var We=ye[ke],Ye=ze/2+We,nt=ke+1,ft=Ee-1;nt>>1;ye[vt]Re-Ve){var at=(Fe*At+Ke*Pt)/ze;Me(ke,nt,Pt,Fe,Ve,at,Re),Me(nt,Ee,At,at,Ve,Ke,Re)}else{var et=(Ve*At+Re*Pt)/ze;Me(ke,nt,Pt,Fe,Ve,Ke,et),Me(nt,Ee,At,Fe,et,Ke,Re)}})(0,de,le.value,ge,fe,me,_e)},r.treemapDice=W,r.treemapResquarify=ue,r.treemapSlice=Q,r.treemapSliceDice=function(le,ge,fe,me,_e){(1&le.depth?Q:W)(le,ge,fe,me,_e)},r.treemapSquarify=ae,Object.defineProperty(r,"__esModule",{value:!0})})},{}],116:[function(e,o,f){(function(r,a){typeof f=="object"&&o!==void 0?a(f,e("d3-color")):a((r=r||self).d3=r.d3||{},r.d3)})(this,function(r,a){function u(ee,ie,ae,ue,le){var ge=ee*ee,fe=ge*ee;return((1-3*ee+3*ge-fe)*ie+(4-6*ge+3*fe)*ae+(1+3*ee+3*ge-3*fe)*ue+fe*le)/6}function c(ee){var ie=ee.length-1;return function(ae){var ue=ae<=0?ae=0:ae>=1?(ae=1,ie-1):Math.floor(ae*ie),le=ee[ue],ge=ee[ue+1],fe=ue>0?ee[ue-1]:2*le-ge,me=ue180||ae<-180?ae-360*Math.round(ae/360):ae):s(isNaN(ee)?ie:ee)}function h(ee){return(ee=+ee)==1?m:function(ie,ae){return ae-ie?function(ue,le,ge){return ue=Math.pow(ue,ge),le=Math.pow(le,ge)-ue,ge=1/ge,function(fe){return Math.pow(ue+fe*le,ge)}}(ie,ae,ee):s(isNaN(ie)?ae:ie)}}function m(ee,ie){var ae=ie-ee;return ae?l(ee,ae):s(isNaN(ee)?ie:ee)}var g=function ee(ie){var ae=h(ie);function ue(le,ge){var fe=ae((le=a.rgb(le)).r,(ge=a.rgb(ge)).r),me=ae(le.g,ge.g),_e=ae(le.b,ge.b),we=m(le.opacity,ge.opacity);return function(Te){return le.r=fe(Te),le.g=me(Te),le.b=_e(Te),le.opacity=we(Te),le+""}}return ue.gamma=ee,ue}(1);function p(ee){return function(ie){var ae,ue,le=ie.length,ge=new Array(le),fe=new Array(le),me=new Array(le);for(ae=0;aege&&(le=ie.slice(ge,le),me[fe]?me[fe]+=le:me[++fe]=le),(ae=ae[0])===(ue=ue[0])?me[fe]?me[fe]+=ue:me[++fe]=ue:(me[++fe]=null,_e.push({i:fe,x:T(ae,ue)})),ge=A.lastIndex;return ge180?Te+=360:Te-we>180&&(we+=360),de.push({i:Oe.push(le(Oe)+"rotate(",null,ue)-2,x:T(we,Te)})):Te&&Oe.push(le(Oe)+"rotate("+Te+ue)}(ge.rotate,fe.rotate,me,_e),function(we,Te,Oe,de){we!==Te?de.push({i:Oe.push(le(Oe)+"skewX(",null,ue)-2,x:T(we,Te)}):Te&&Oe.push(le(Oe)+"skewX("+Te+ue)}(ge.skewX,fe.skewX,me,_e),function(we,Te,Oe,de,ye,Me){if(we!==Oe||Te!==de){var ke=ye.push(le(ye)+"scale(",null,",",null,")");Me.push({i:ke-4,x:T(we,Oe)},{i:ke-2,x:T(Te,de)})}else Oe===1&&de===1||ye.push(le(ye)+"scale("+Oe+","+de+")")}(ge.scaleX,ge.scaleY,fe.scaleX,fe.scaleY,me,_e),ge=fe=null,function(we){for(var Te,Oe=-1,de=_e.length;++Oe1e-6)if(Math.abs(k*y-x*w)>1e-6&&g){var T=h-p,_=m-v,M=y*y+x*x,A=T*T+_*_,S=Math.sqrt(M),E=Math.sqrt(b),D=g*Math.tan((a-Math.acos((M+b-A)/(2*S*E)))/2),O=D/E,R=D/S;Math.abs(O-1)>1e-6&&(this._+="L"+(l+O*w)+","+(d+O*k)),this._+="A"+g+","+g+",0,0,"+ +(k*T>w*_)+","+(this._x1=l+R*y)+","+(this._y1=d+R*x)}else this._+="L"+(this._x1=l)+","+(this._y1=d)},arc:function(l,d,h,m,g,p){l=+l,d=+d,p=!!p;var v=(h=+h)*Math.cos(m),y=h*Math.sin(m),x=l+v,w=d+y,k=1^p,b=p?m-g:g-m;if(h<0)throw new Error("negative radius: "+h);this._x1===null?this._+="M"+x+","+w:(Math.abs(this._x1-x)>1e-6||Math.abs(this._y1-w)>1e-6)&&(this._+="L"+x+","+w),h&&(b<0&&(b=b%u+u),b>c?this._+="A"+h+","+h+",0,1,"+k+","+(l-v)+","+(d-y)+"A"+h+","+h+",0,1,"+k+","+(this._x1=x)+","+(this._y1=w):b>1e-6&&(this._+="A"+h+","+h+",0,"+ +(b>=a)+","+k+","+(this._x1=l+h*Math.cos(g))+","+(this._y1=d+h*Math.sin(g))))},rect:function(l,d,h,m){this._+="M"+(this._x0=this._x1=+l)+","+(this._y0=this._y1=+d)+"h"+ +h+"v"+ +m+"h"+-h+"Z"},toString:function(){return this._}},r.path=s,Object.defineProperty(r,"__esModule",{value:!0})})},{}],118:[function(e,o,f){(function(r,a){a(typeof f=="object"&&o!==void 0?f:(r=r||self).d3=r.d3||{})})(this,function(r){function a(m,g,p,v){if(isNaN(g)||isNaN(p))return m;var y,x,w,k,b,T,_,M,A,S=m._root,E={data:v},D=m._x0,O=m._y0,R=m._x1,z=m._y1;if(!S)return m._root=E,m;for(;S.length;)if((T=g>=(x=(D+R)/2))?D=x:R=x,(_=p>=(w=(O+z)/2))?O=w:z=w,y=S,!(S=S[M=_<<1|T]))return y[M]=E,m;if(k=+m._x.call(null,S.data),b=+m._y.call(null,S.data),g===k&&p===b)return E.next=S,y?y[M]=E:m._root=E,m;do y=y?y[M]=new Array(4):m._root=new Array(4),(T=g>=(x=(D+R)/2))?D=x:R=x,(_=p>=(w=(O+z)/2))?O=w:z=w;while((M=_<<1|T)==(A=(b>=w)<<1|k>=x));return y[A]=S,y[M]=E,m}function u(m,g,p,v,y){this.node=m,this.x0=g,this.y0=p,this.x1=v,this.y1=y}function c(m){return m[0]}function i(m){return m[1]}function s(m,g,p){var v=new l(g??c,p??i,NaN,NaN,NaN,NaN);return m==null?v:v.addAll(m)}function l(m,g,p,v,y,x){this._x=m,this._y=g,this._x0=p,this._y0=v,this._x1=y,this._y1=x,this._root=void 0}function d(m){for(var g={data:m.data},p=g;m=m.next;)p=p.next={data:m.data};return g}var h=s.prototype=l.prototype;h.copy=function(){var m,g,p=new l(this._x,this._y,this._x0,this._y0,this._x1,this._y1),v=this._root;if(!v)return p;if(!v.length)return p._root=d(v),p;for(m=[{source:v,target:p._root=new Array(4)}];v=m.pop();)for(var y=0;y<4;++y)(g=v.source[y])&&(g.length?m.push({source:g,target:v.target[y]=new Array(4)}):v.target[y]=d(g));return p},h.add=function(m){var g=+this._x.call(null,m),p=+this._y.call(null,m);return a(this.cover(g,p),g,p,m)},h.addAll=function(m){var g,p,v,y,x=m.length,w=new Array(x),k=new Array(x),b=1/0,T=1/0,_=-1/0,M=-1/0;for(p=0;p_&&(_=v),yM&&(M=y));if(b>_||T>M)return this;for(this.cover(b,T).cover(_,M),p=0;pm||m>=y||v>g||g>=x;)switch(k=(gA||(x=b.y0)>S||(w=b.x1)<_||(k=b.y1)=R)<<1|m>=O)&&(b=E[E.length-1],E[E.length-1]=E[E.length-1-T],E[E.length-1-T]=b)}else{var z=m-+this._x.call(null,D.data),L=g-+this._y.call(null,D.data),P=z*z+L*L;if(P=(k=(E+O)/2))?E=k:O=k,(_=w>=(b=(D+R)/2))?D=b:R=b,g=S,!(S=S[M=_<<1|T]))return this;if(!S.length)break;(g[M+1&3]||g[M+2&3]||g[M+3&3])&&(p=g,A=M)}for(;S.data!==m;)if(v=S,!(S=S.next))return this;return(y=S.next)&&delete S.next,v?(y?v.next=y:delete v.next,this):g?(y?g[M]=y:delete g[M],(S=g[0]||g[1]||g[2]||g[3])&&S===(g[3]||g[2]||g[1]||g[0])&&!S.length&&(p?p[A]=S:this._root=S),this):(this._root=y,this)},h.removeAll=function(m){for(var g=0,p=m.length;g1?0:Le<-1?g:Math.acos(Le)}function x(Le){return Le>=1?p:Le<=-1?-p:Math.asin(Le)}function w(Le){return Le.innerRadius}function k(Le){return Le.outerRadius}function b(Le){return Le.startAngle}function T(Le){return Le.endAngle}function _(Le){return Le&&Le.padAngle}function M(Le,Je,st,Et,It,Zt,Kt,Ht){var mn=st-Le,zn=Et-Je,pn=Kt-It,tn=Ht-Zt,nn=tn*mn-pn*zn;if(!(nn*nn<1e-12))return[Le+(nn=(pn*(Je-Zt)-tn*(Le-It))/nn)*mn,Je+nn*zn]}function A(Le,Je,st,Et,It,Zt,Kt){var Ht=Le-st,mn=Je-Et,zn=(Kt?Zt:-Zt)/m(Ht*Ht+mn*mn),pn=zn*mn,tn=-zn*Ht,nn=Le+pn,sn=Je+tn,gn=st+pn,bn=Et+tn,In=(nn+gn)/2,Hn=(sn+bn)/2,Wn=gn-nn,ar=bn-sn,Or=Wn*Wn+ar*ar,vr=It-Zt,Er=nn*bn-gn*sn,Kn=(ar<0?-1:1)*m(l(0,vr*vr*Or-Er*Er)),Ln=(Er*ar-Wn*Kn)/Or,lr=(-Er*Wn-ar*Kn)/Or,Wr=(Er*ar+Wn*Kn)/Or,Mn=(-Er*Wn+ar*Kn)/Or,rr=Ln-In,nr=lr-Hn,Bn=Wr-In,Fr=Mn-Hn;return rr*rr+nr*nr>Bn*Bn+Fr*Fr&&(Ln=Wr,lr=Mn),{cx:Ln,cy:lr,x01:-pn,y01:-tn,x11:Ln*(It/vr-1),y11:lr*(It/vr-1)}}function S(Le){this._context=Le}function E(Le){return new S(Le)}function D(Le){return Le[0]}function O(Le){return Le[1]}function R(){var Le=D,Je=O,st=u(!0),Et=null,It=E,Zt=null;function Kt(Ht){var mn,zn,pn,tn=Ht.length,nn=!1;for(Et==null&&(Zt=It(pn=a.path())),mn=0;mn<=tn;++mn)!(mn=nn;--sn)Ht.point(Wn[sn],ar[sn]);Ht.lineEnd(),Ht.areaEnd()}Hn&&(Wn[tn]=+Le(gn,tn,pn),ar[tn]=+st(gn,tn,pn),Ht.point(Je?+Je(gn,tn,pn):Wn[tn],Et?+Et(gn,tn,pn):ar[tn]))}if(bn)return Ht=null,bn+""||null}function zn(){return R().defined(It).curve(Kt).context(Zt)}return mn.x=function(pn){return arguments.length?(Le=typeof pn=="function"?pn:u(+pn),Je=null,mn):Le},mn.x0=function(pn){return arguments.length?(Le=typeof pn=="function"?pn:u(+pn),mn):Le},mn.x1=function(pn){return arguments.length?(Je=pn==null?null:typeof pn=="function"?pn:u(+pn),mn):Je},mn.y=function(pn){return arguments.length?(st=typeof pn=="function"?pn:u(+pn),Et=null,mn):st},mn.y0=function(pn){return arguments.length?(st=typeof pn=="function"?pn:u(+pn),mn):st},mn.y1=function(pn){return arguments.length?(Et=pn==null?null:typeof pn=="function"?pn:u(+pn),mn):Et},mn.lineX0=mn.lineY0=function(){return zn().x(Le).y(st)},mn.lineY1=function(){return zn().x(Le).y(Et)},mn.lineX1=function(){return zn().x(Je).y(st)},mn.defined=function(pn){return arguments.length?(It=typeof pn=="function"?pn:u(!!pn),mn):It},mn.curve=function(pn){return arguments.length?(Kt=pn,Zt!=null&&(Ht=Kt(Zt)),mn):Kt},mn.context=function(pn){return arguments.length?(pn==null?Zt=Ht=null:Ht=Kt(Zt=pn),mn):Zt},mn}function L(Le,Je){return JeLe?1:Je>=Le?0:NaN}function P(Le){return Le}S.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Le,Je){switch(Le=+Le,Je=+Je,this._point){case 0:this._point=1,this._line?this._context.lineTo(Le,Je):this._context.moveTo(Le,Je);break;case 1:this._point=2;default:this._context.lineTo(Le,Je)}}};var N=G(E);function B(Le){this._curve=Le}function G(Le){function Je(st){return new B(Le(st))}return Je._curve=Le,Je}function W(Le){var Je=Le.curve;return Le.angle=Le.x,delete Le.x,Le.radius=Le.y,delete Le.y,Le.curve=function(st){return arguments.length?Je(G(st)):Je()._curve},Le}function K(){return W(R().curve(N))}function te(){var Le=z().curve(N),Je=Le.curve,st=Le.lineX0,Et=Le.lineX1,It=Le.lineY0,Zt=Le.lineY1;return Le.angle=Le.x,delete Le.x,Le.startAngle=Le.x0,delete Le.x0,Le.endAngle=Le.x1,delete Le.x1,Le.radius=Le.y,delete Le.y,Le.innerRadius=Le.y0,delete Le.y0,Le.outerRadius=Le.y1,delete Le.y1,Le.lineStartAngle=function(){return W(st())},delete Le.lineX0,Le.lineEndAngle=function(){return W(Et())},delete Le.lineX1,Le.lineInnerRadius=function(){return W(It())},delete Le.lineY0,Le.lineOuterRadius=function(){return W(Zt())},delete Le.lineY1,Le.curve=function(Kt){return arguments.length?Je(G(Kt)):Je()._curve},Le}function Y(Le,Je){return[(Je=+Je)*Math.cos(Le-=Math.PI/2),Je*Math.sin(Le)]}B.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(Le,Je){this._curve.point(Je*Math.sin(Le),Je*-Math.cos(Le))}};var Z=Array.prototype.slice;function re(Le){return Le.source}function U(Le){return Le.target}function q(Le){var Je=re,st=U,Et=D,It=O,Zt=null;function Kt(){var Ht,mn=Z.call(arguments),zn=Je.apply(this,mn),pn=st.apply(this,mn);if(Zt||(Zt=Ht=a.path()),Le(Zt,+Et.apply(this,(mn[0]=zn,mn)),+It.apply(this,mn),+Et.apply(this,(mn[0]=pn,mn)),+It.apply(this,mn)),Ht)return Zt=null,Ht+""||null}return Kt.source=function(Ht){return arguments.length?(Je=Ht,Kt):Je},Kt.target=function(Ht){return arguments.length?(st=Ht,Kt):st},Kt.x=function(Ht){return arguments.length?(Et=typeof Ht=="function"?Ht:u(+Ht),Kt):Et},Kt.y=function(Ht){return arguments.length?(It=typeof Ht=="function"?Ht:u(+Ht),Kt):It},Kt.context=function(Ht){return arguments.length?(Zt=Ht??null,Kt):Zt},Kt}function $(Le,Je,st,Et,It){Le.moveTo(Je,st),Le.bezierCurveTo(Je=(Je+Et)/2,st,Je,It,Et,It)}function ne(Le,Je,st,Et,It){Le.moveTo(Je,st),Le.bezierCurveTo(Je,st=(st+It)/2,Et,st,Et,It)}function H(Le,Je,st,Et,It){var Zt=Y(Je,st),Kt=Y(Je,st=(st+It)/2),Ht=Y(Et,st),mn=Y(Et,It);Le.moveTo(Zt[0],Zt[1]),Le.bezierCurveTo(Kt[0],Kt[1],Ht[0],Ht[1],mn[0],mn[1])}var Q={draw:function(Le,Je){var st=Math.sqrt(Je/g);Le.moveTo(st,0),Le.arc(0,0,st,0,v)}},ee={draw:function(Le,Je){var st=Math.sqrt(Je/5)/2;Le.moveTo(-3*st,-st),Le.lineTo(-st,-st),Le.lineTo(-st,-3*st),Le.lineTo(st,-3*st),Le.lineTo(st,-st),Le.lineTo(3*st,-st),Le.lineTo(3*st,st),Le.lineTo(st,st),Le.lineTo(st,3*st),Le.lineTo(-st,3*st),Le.lineTo(-st,st),Le.lineTo(-3*st,st),Le.closePath()}},ie=Math.sqrt(1/3),ae=2*ie,ue={draw:function(Le,Je){var st=Math.sqrt(Je/ae),Et=st*ie;Le.moveTo(0,-st),Le.lineTo(Et,0),Le.lineTo(0,st),Le.lineTo(-Et,0),Le.closePath()}},le=Math.sin(g/10)/Math.sin(7*g/10),ge=Math.sin(v/10)*le,fe=-Math.cos(v/10)*le,me={draw:function(Le,Je){var st=Math.sqrt(.8908130915292852*Je),Et=ge*st,It=fe*st;Le.moveTo(0,-st),Le.lineTo(Et,It);for(var Zt=1;Zt<5;++Zt){var Kt=v*Zt/5,Ht=Math.cos(Kt),mn=Math.sin(Kt);Le.lineTo(mn*st,-Ht*st),Le.lineTo(Ht*Et-mn*It,mn*Et+Ht*It)}Le.closePath()}},_e={draw:function(Le,Je){var st=Math.sqrt(Je),Et=-st/2;Le.rect(Et,Et,st,st)}},we=Math.sqrt(3),Te={draw:function(Le,Je){var st=-Math.sqrt(Je/(3*we));Le.moveTo(0,2*st),Le.lineTo(-we*st,-st),Le.lineTo(we*st,-st),Le.closePath()}},Oe=-.5,de=Math.sqrt(3)/2,ye=1/Math.sqrt(12),Me=3*(ye/2+1),ke={draw:function(Le,Je){var st=Math.sqrt(Je/Me),Et=st/2,It=st*ye,Zt=Et,Kt=st*ye+st,Ht=-Zt,mn=Kt;Le.moveTo(Et,It),Le.lineTo(Zt,Kt),Le.lineTo(Ht,mn),Le.lineTo(Oe*Et-de*It,de*Et+Oe*It),Le.lineTo(Oe*Zt-de*Kt,de*Zt+Oe*Kt),Le.lineTo(Oe*Ht-de*mn,de*Ht+Oe*mn),Le.lineTo(Oe*Et+de*It,Oe*It-de*Et),Le.lineTo(Oe*Zt+de*Kt,Oe*Kt-de*Zt),Le.lineTo(Oe*Ht+de*mn,Oe*mn-de*Ht),Le.closePath()}},Ee=[Q,ee,ue,_e,me,Te,ke];function ze(){}function Fe(Le,Je,st){Le._context.bezierCurveTo((2*Le._x0+Le._x1)/3,(2*Le._y0+Le._y1)/3,(Le._x0+2*Le._x1)/3,(Le._y0+2*Le._y1)/3,(Le._x0+4*Le._x1+Je)/6,(Le._y0+4*Le._y1+st)/6)}function Ve(Le){this._context=Le}function Ke(Le){this._context=Le}function Re(Le){this._context=Le}function qe(Le,Je){this._basis=new Ve(Le),this._beta=Je}Ve.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Fe(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Le,Je){switch(Le=+Le,Je=+Je,this._point){case 0:this._point=1,this._line?this._context.lineTo(Le,Je):this._context.moveTo(Le,Je);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Fe(this,Le,Je)}this._x0=this._x1,this._x1=Le,this._y0=this._y1,this._y1=Je}},Ke.prototype={areaStart:ze,areaEnd:ze,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(Le,Je){switch(Le=+Le,Je=+Je,this._point){case 0:this._point=1,this._x2=Le,this._y2=Je;break;case 1:this._point=2,this._x3=Le,this._y3=Je;break;case 2:this._point=3,this._x4=Le,this._y4=Je,this._context.moveTo((this._x0+4*this._x1+Le)/6,(this._y0+4*this._y1+Je)/6);break;default:Fe(this,Le,Je)}this._x0=this._x1,this._x1=Le,this._y0=this._y1,this._y1=Je}},Re.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(Le,Je){switch(Le=+Le,Je=+Je,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var st=(this._x0+4*this._x1+Le)/6,Et=(this._y0+4*this._y1+Je)/6;this._line?this._context.lineTo(st,Et):this._context.moveTo(st,Et);break;case 3:this._point=4;default:Fe(this,Le,Je)}this._x0=this._x1,this._x1=Le,this._y0=this._y1,this._y1=Je}},qe.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var Le=this._x,Je=this._y,st=Le.length-1;if(st>0)for(var Et,It=Le[0],Zt=Je[0],Kt=Le[st]-It,Ht=Je[st]-Zt,mn=-1;++mn<=st;)Et=mn/st,this._basis.point(this._beta*Le[mn]+(1-this._beta)*(It+Et*Kt),this._beta*Je[mn]+(1-this._beta)*(Zt+Et*Ht));this._x=this._y=null,this._basis.lineEnd()},point:function(Le,Je){this._x.push(+Le),this._y.push(+Je)}};var We=function Le(Je){function st(Et){return Je===1?new Ve(Et):new qe(Et,Je)}return st.beta=function(Et){return Le(+Et)},st}(.85);function Ye(Le,Je,st){Le._context.bezierCurveTo(Le._x1+Le._k*(Le._x2-Le._x0),Le._y1+Le._k*(Le._y2-Le._y0),Le._x2+Le._k*(Le._x1-Je),Le._y2+Le._k*(Le._y1-st),Le._x2,Le._y2)}function nt(Le,Je){this._context=Le,this._k=(1-Je)/6}nt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Ye(this,this._x1,this._y1)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Le,Je){switch(Le=+Le,Je=+Je,this._point){case 0:this._point=1,this._line?this._context.lineTo(Le,Je):this._context.moveTo(Le,Je);break;case 1:this._point=2,this._x1=Le,this._y1=Je;break;case 2:this._point=3;default:Ye(this,Le,Je)}this._x0=this._x1,this._x1=this._x2,this._x2=Le,this._y0=this._y1,this._y1=this._y2,this._y2=Je}};var ft=function Le(Je){function st(Et){return new nt(Et,Je)}return st.tension=function(Et){return Le(+Et)},st}(0);function vt(Le,Je){this._context=Le,this._k=(1-Je)/6}vt.prototype={areaStart:ze,areaEnd:ze,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(Le,Je){switch(Le=+Le,Je=+Je,this._point){case 0:this._point=1,this._x3=Le,this._y3=Je;break;case 1:this._point=2,this._context.moveTo(this._x4=Le,this._y4=Je);break;case 2:this._point=3,this._x5=Le,this._y5=Je;break;default:Ye(this,Le,Je)}this._x0=this._x1,this._x1=this._x2,this._x2=Le,this._y0=this._y1,this._y1=this._y2,this._y2=Je}};var Pt=function Le(Je){function st(Et){return new vt(Et,Je)}return st.tension=function(Et){return Le(+Et)},st}(0);function At(Le,Je){this._context=Le,this._k=(1-Je)/6}At.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(Le,Je){switch(Le=+Le,Je=+Je,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ye(this,Le,Je)}this._x0=this._x1,this._x1=this._x2,this._x2=Le,this._y0=this._y1,this._y1=this._y2,this._y2=Je}};var at=function Le(Je){function st(Et){return new At(Et,Je)}return st.tension=function(Et){return Le(+Et)},st}(0);function et(Le,Je,st){var Et=Le._x1,It=Le._y1,Zt=Le._x2,Kt=Le._y2;if(Le._l01_a>1e-12){var Ht=2*Le._l01_2a+3*Le._l01_a*Le._l12_a+Le._l12_2a,mn=3*Le._l01_a*(Le._l01_a+Le._l12_a);Et=(Et*Ht-Le._x0*Le._l12_2a+Le._x2*Le._l01_2a)/mn,It=(It*Ht-Le._y0*Le._l12_2a+Le._y2*Le._l01_2a)/mn}if(Le._l23_a>1e-12){var zn=2*Le._l23_2a+3*Le._l23_a*Le._l12_a+Le._l12_2a,pn=3*Le._l23_a*(Le._l23_a+Le._l12_a);Zt=(Zt*zn+Le._x1*Le._l23_2a-Je*Le._l12_2a)/pn,Kt=(Kt*zn+Le._y1*Le._l23_2a-st*Le._l12_2a)/pn}Le._context.bezierCurveTo(Et,It,Zt,Kt,Le._x2,Le._y2)}function Ot(Le,Je){this._context=Le,this._alpha=Je}Ot.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Le,Je){if(Le=+Le,Je=+Je,this._point){var st=this._x2-Le,Et=this._y2-Je;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(st*st+Et*Et,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(Le,Je):this._context.moveTo(Le,Je);break;case 1:this._point=2;break;case 2:this._point=3;default:et(this,Le,Je)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=Le,this._y0=this._y1,this._y1=this._y2,this._y2=Je}};var Wt=function Le(Je){function st(Et){return Je?new Ot(Et,Je):new nt(Et,0)}return st.alpha=function(Et){return Le(+Et)},st}(.5);function Jt(Le,Je){this._context=Le,this._alpha=Je}Jt.prototype={areaStart:ze,areaEnd:ze,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(Le,Je){if(Le=+Le,Je=+Je,this._point){var st=this._x2-Le,Et=this._y2-Je;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(st*st+Et*Et,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=Le,this._y3=Je;break;case 1:this._point=2,this._context.moveTo(this._x4=Le,this._y4=Je);break;case 2:this._point=3,this._x5=Le,this._y5=Je;break;default:et(this,Le,Je)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=Le,this._y0=this._y1,this._y1=this._y2,this._y2=Je}};var Be=function Le(Je){function st(Et){return Je?new Jt(Et,Je):new vt(Et,0)}return st.alpha=function(Et){return Le(+Et)},st}(.5);function Ge(Le,Je){this._context=Le,this._alpha=Je}Ge.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(Le,Je){if(Le=+Le,Je=+Je,this._point){var st=this._x2-Le,Et=this._y2-Je;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(st*st+Et*Et,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:et(this,Le,Je)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=Le,this._y0=this._y1,this._y1=this._y2,this._y2=Je}};var Tt=function Le(Je){function st(Et){return Je?new Ge(Et,Je):new At(Et,0)}return st.alpha=function(Et){return Le(+Et)},st}(.5);function dt(Le){this._context=Le}function Pe(Le){return Le<0?-1:1}function Ie(Le,Je,st){var Et=Le._x1-Le._x0,It=Je-Le._x1,Zt=(Le._y1-Le._y0)/(Et||It<0&&-0),Kt=(st-Le._y1)/(It||Et<0&&-0),Ht=(Zt*It+Kt*Et)/(Et+It);return(Pe(Zt)+Pe(Kt))*Math.min(Math.abs(Zt),Math.abs(Kt),.5*Math.abs(Ht))||0}function Ae(Le,Je){var st=Le._x1-Le._x0;return st?(3*(Le._y1-Le._y0)/st-Je)/2:Je}function De(Le,Je,st){var Et=Le._x0,It=Le._y0,Zt=Le._x1,Kt=Le._y1,Ht=(Zt-Et)/3;Le._context.bezierCurveTo(Et+Ht,It+Ht*Je,Zt-Ht,Kt-Ht*st,Zt,Kt)}function He(Le){this._context=Le}function rt(Le){this._context=new lt(Le)}function lt(Le){this._context=Le}function ot(Le){this._context=Le}function kt(Le){var Je,st,Et=Le.length-1,It=new Array(Et),Zt=new Array(Et),Kt=new Array(Et);for(It[0]=0,Zt[0]=2,Kt[0]=Le[0]+2*Le[1],Je=1;Je=0;--Je)It[Je]=(Kt[Je]-It[Je+1])/Zt[Je];for(Zt[Et-1]=(Le[Et]+It[Et-1])/2,Je=0;Je1)for(var st,Et,It,Zt=1,Kt=Le[Je[0]],Ht=Kt.length;Zt=0;)st[Je]=Je;return st}function tt(Le,Je){return Le[Je]}function bt(Le){var Je=Le.map(zt);return Ut(Le).sort(function(st,Et){return Je[st]-Je[Et]})}function zt(Le){for(var Je,st=-1,Et=0,It=Le.length,Zt=-1/0;++stZt&&(Zt=Je,Et=st);return Et}function St(Le){var Je=Le.map(Dt);return Ut(Le).sort(function(st,Et){return Je[st]-Je[Et]})}function Dt(Le){for(var Je,st=0,Et=-1,It=Le.length;++Et=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(Le,Je){switch(Le=+Le,Je=+Je,this._point){case 0:this._point=1,this._line?this._context.lineTo(Le,Je):this._context.moveTo(Le,Je);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,Je),this._context.lineTo(Le,Je);else{var st=this._x*(1-this._t)+Le*this._t;this._context.lineTo(st,this._y),this._context.lineTo(st,Je)}}this._x=Le,this._y=Je}},r.arc=function(){var Le=w,Je=k,st=u(0),Et=null,It=b,Zt=T,Kt=_,Ht=null;function mn(){var zn,pn,tn=+Le.apply(this,arguments),nn=+Je.apply(this,arguments),sn=It.apply(this,arguments)-p,gn=Zt.apply(this,arguments)-p,bn=c(gn-sn),In=gn>sn;if(Ht||(Ht=zn=a.path()),nn1e-12)if(bn>v-1e-12)Ht.moveTo(nn*s(sn),nn*h(sn)),Ht.arc(0,0,nn,sn,gn,!In),tn>1e-12&&(Ht.moveTo(tn*s(gn),tn*h(gn)),Ht.arc(0,0,tn,gn,sn,In));else{var Hn,Wn,ar=sn,Or=gn,vr=sn,Er=gn,Kn=bn,Ln=bn,lr=Kt.apply(this,arguments)/2,Wr=lr>1e-12&&(Et?+Et.apply(this,arguments):m(tn*tn+nn*nn)),Mn=d(c(nn-tn)/2,+st.apply(this,arguments)),rr=Mn,nr=Mn;if(Wr>1e-12){var Bn=x(Wr/tn*h(lr)),Fr=x(Wr/nn*h(lr));(Kn-=2*Bn)>1e-12?(vr+=Bn*=In?1:-1,Er-=Bn):(Kn=0,vr=Er=(sn+gn)/2),(Ln-=2*Fr)>1e-12?(ar+=Fr*=In?1:-1,Or-=Fr):(Ln=0,ar=Or=(sn+gn)/2)}var $r=nn*s(ar),pr=nn*h(ar),qr=tn*s(Er),_i=tn*h(Er);if(Mn>1e-12){var cn,jn=nn*s(Or),jt=nn*h(Or),fn=tn*s(vr),yn=tn*h(vr);if(bn1e-12?nr>1e-12?(Hn=A(fn,yn,$r,pr,nn,nr,In),Wn=A(jn,jt,qr,_i,nn,nr,In),Ht.moveTo(Hn.cx+Hn.x01,Hn.cy+Hn.y01),nr1e-12&&Kn>1e-12?rr>1e-12?(Hn=A(qr,_i,jn,jt,tn,-rr,In),Wn=A($r,pr,fn,yn,tn,-rr,In),Ht.lineTo(Hn.cx+Hn.x01,Hn.cy+Hn.y01),rr0&&(gn+=nn);for(Je!=null?bn.sort(function(vr,Er){return Je(In[vr],In[Er])}):st!=null&&bn.sort(function(vr,Er){return st(Ht[vr],Ht[Er])}),mn=0,pn=gn?(Wn-sn*Or)/gn:0;mn0?nn*pn:0)+Or,In[zn]={data:Ht[zn],index:mn,value:nn,startAngle:Hn,endAngle:tn,padAngle:ar};return In}return Kt.value=function(Ht){return arguments.length?(Le=typeof Ht=="function"?Ht:u(+Ht),Kt):Le},Kt.sortValues=function(Ht){return arguments.length?(Je=Ht,st=null,Kt):Je},Kt.sort=function(Ht){return arguments.length?(st=Ht,Je=null,Kt):st},Kt.startAngle=function(Ht){return arguments.length?(Et=typeof Ht=="function"?Ht:u(+Ht),Kt):Et},Kt.endAngle=function(Ht){return arguments.length?(It=typeof Ht=="function"?Ht:u(+Ht),Kt):It},Kt.padAngle=function(Ht){return arguments.length?(Zt=typeof Ht=="function"?Ht:u(+Ht),Kt):Zt},Kt},r.pointRadial=Y,r.radialArea=te,r.radialLine=K,r.stack=function(){var Le=u([]),Je=Ut,st=Vt,Et=tt;function It(Zt){var Kt,Ht,mn=Le.apply(this,arguments),zn=Zt.length,pn=mn.length,tn=new Array(pn);for(Kt=0;Kt0)for(var st,Et,It,Zt,Kt,Ht,mn=0,zn=Le[Je[0]].length;mn0?(Et[0]=Zt,Et[1]=Zt+=It):It<0?(Et[1]=Kt,Et[0]=Kt+=It):(Et[0]=0,Et[1]=It)},r.stackOffsetExpand=function(Le,Je){if((Et=Le.length)>0){for(var st,Et,It,Zt=0,Kt=Le[0].length;Zt0){for(var st,Et=0,It=Le[Je[0]],Zt=It.length;Et0&&(Et=(st=Le[Je[0]]).length)>0){for(var st,Et,It,Zt=0,Kt=1;Kt=12)]},q:function(Dt){return 1+~~(Dt.getMonth()/3)},Q:nt,s:ft,S:H,u:Q,U:ee,V:ie,w:ae,W:ue,x:null,X:null,y:le,Y:ge,Z:fe,"%":Ye},Ut={a:function(Dt){return Ge[Dt.getUTCDay()]},A:function(Dt){return Be[Dt.getUTCDay()]},b:function(Dt){return dt[Dt.getUTCMonth()]},B:function(Dt){return Tt[Dt.getUTCMonth()]},c:null,d:me,e:me,f:de,H:_e,I:we,j:Te,L:Oe,m:ye,M:Me,p:function(Dt){return Jt[+(Dt.getUTCHours()>=12)]},q:function(Dt){return 1+~~(Dt.getUTCMonth()/3)},Q:nt,s:ft,S:ke,u:Ee,U:ze,V:Fe,w:Ve,W:Ke,x:null,X:null,y:Re,Y:qe,Z:We,"%":Ye},tt={a:function(Dt,Le,Je){var st=He.exec(Le.slice(Je));return st?(Dt.w=rt[st[0].toLowerCase()],Je+st[0].length):-1},A:function(Dt,Le,Je){var st=Ae.exec(Le.slice(Je));return st?(Dt.w=De[st[0].toLowerCase()],Je+st[0].length):-1},b:function(Dt,Le,Je){var st=kt.exec(Le.slice(Je));return st?(Dt.m=wt[st[0].toLowerCase()],Je+st[0].length):-1},B:function(Dt,Le,Je){var st=lt.exec(Le.slice(Je));return st?(Dt.m=ot[st[0].toLowerCase()],Je+st[0].length):-1},c:function(Dt,Le,Je){return St(Dt,et,Le,Je)},d:O,e:O,f:B,H:z,I:z,j:R,L:N,m:D,M:L,p:function(Dt,Le,Je){var st=Pe.exec(Le.slice(Je));return st?(Dt.p=Ie[st[0].toLowerCase()],Je+st[0].length):-1},q:E,Q:W,s:K,S:P,u:k,U:b,V:T,w,W:_,x:function(Dt,Le,Je){return St(Dt,Ot,Le,Je)},X:function(Dt,Le,Je){return St(Dt,Wt,Le,Je)},y:A,Y:M,Z:S,"%":G};function bt(Dt,Le){return function(Je){var st,Et,It,Zt=[],Kt=-1,Ht=0,mn=Dt.length;for(Je instanceof Date||(Je=new Date(+Je));++Kt53)return null;"w"in It||(It.w=1),"Z"in It?(Et=(st=c(i(It.y,0,1))).getUTCDay(),st=Et>4||Et===0?a.utcMonday.ceil(st):a.utcMonday(st),st=a.utcDay.offset(st,7*(It.V-1)),It.y=st.getUTCFullYear(),It.m=st.getUTCMonth(),It.d=st.getUTCDate()+(It.w+6)%7):(Et=(st=u(i(It.y,0,1))).getDay(),st=Et>4||Et===0?a.timeMonday.ceil(st):a.timeMonday(st),st=a.timeDay.offset(st,7*(It.V-1)),It.y=st.getFullYear(),It.m=st.getMonth(),It.d=st.getDate()+(It.w+6)%7)}else("W"in It||"U"in It)&&("w"in It||(It.w="u"in It?It.u%7:"W"in It?1:0),Et="Z"in It?c(i(It.y,0,1)).getUTCDay():u(i(It.y,0,1)).getDay(),It.m=0,It.d="W"in It?(It.w+6)%7+7*It.W-(Et+5)%7:It.w+7*It.U-(Et+6)%7);return"Z"in It?(It.H+=It.Z/100|0,It.M+=It.Z%100,c(It)):u(It)}}function St(Dt,Le,Je,st){for(var Et,It,Zt=0,Kt=Le.length,Ht=Je.length;Zt=Ht)return-1;if((Et=Le.charCodeAt(Zt++))===37){if(Et=Le.charAt(Zt++),!(It=tt[Et in d?Le.charAt(Zt++):Et])||(st=It(Dt,Je,st))<0)return-1}else if(Et!=Je.charCodeAt(st++))return-1}return st}return Vt.x=bt(Ot,Vt),Vt.X=bt(Wt,Vt),Vt.c=bt(et,Vt),Ut.x=bt(Ot,Ut),Ut.X=bt(Wt,Ut),Ut.c=bt(et,Ut),{format:function(Dt){var Le=bt(Dt+="",Vt);return Le.toString=function(){return Dt},Le},parse:function(Dt){var Le=zt(Dt+="",!1);return Le.toString=function(){return Dt},Le},utcFormat:function(Dt){var Le=bt(Dt+="",Ut);return Le.toString=function(){return Dt},Le},utcParse:function(Dt){var Le=zt(Dt+="",!0);return Le.toString=function(){return Dt},Le}}}var l,d={"-":"",_:" ",0:"0"},h=/^\s*\d+/,m=/^%/,g=/[\\^$*+?|[\]().{}]/g;function p(at,et,Ot){var Wt=at<0?"-":"",Jt=(Wt?-at:at)+"",Be=Jt.length;return Wt+(Be68?1900:2e3),Ot+Wt[0].length):-1}function S(at,et,Ot){var Wt=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(et.slice(Ot,Ot+6));return Wt?(at.Z=Wt[1]?0:-(Wt[2]+(Wt[3]||"00")),Ot+Wt[0].length):-1}function E(at,et,Ot){var Wt=h.exec(et.slice(Ot,Ot+1));return Wt?(at.q=3*Wt[0]-3,Ot+Wt[0].length):-1}function D(at,et,Ot){var Wt=h.exec(et.slice(Ot,Ot+2));return Wt?(at.m=Wt[0]-1,Ot+Wt[0].length):-1}function O(at,et,Ot){var Wt=h.exec(et.slice(Ot,Ot+2));return Wt?(at.d=+Wt[0],Ot+Wt[0].length):-1}function R(at,et,Ot){var Wt=h.exec(et.slice(Ot,Ot+3));return Wt?(at.m=0,at.d=+Wt[0],Ot+Wt[0].length):-1}function z(at,et,Ot){var Wt=h.exec(et.slice(Ot,Ot+2));return Wt?(at.H=+Wt[0],Ot+Wt[0].length):-1}function L(at,et,Ot){var Wt=h.exec(et.slice(Ot,Ot+2));return Wt?(at.M=+Wt[0],Ot+Wt[0].length):-1}function P(at,et,Ot){var Wt=h.exec(et.slice(Ot,Ot+2));return Wt?(at.S=+Wt[0],Ot+Wt[0].length):-1}function N(at,et,Ot){var Wt=h.exec(et.slice(Ot,Ot+3));return Wt?(at.L=+Wt[0],Ot+Wt[0].length):-1}function B(at,et,Ot){var Wt=h.exec(et.slice(Ot,Ot+6));return Wt?(at.L=Math.floor(Wt[0]/1e3),Ot+Wt[0].length):-1}function G(at,et,Ot){var Wt=m.exec(et.slice(Ot,Ot+1));return Wt?Ot+Wt[0].length:-1}function W(at,et,Ot){var Wt=h.exec(et.slice(Ot));return Wt?(at.Q=+Wt[0],Ot+Wt[0].length):-1}function K(at,et,Ot){var Wt=h.exec(et.slice(Ot));return Wt?(at.s=+Wt[0],Ot+Wt[0].length):-1}function te(at,et){return p(at.getDate(),et,2)}function Y(at,et){return p(at.getHours(),et,2)}function Z(at,et){return p(at.getHours()%12||12,et,2)}function re(at,et){return p(1+a.timeDay.count(a.timeYear(at),at),et,3)}function U(at,et){return p(at.getMilliseconds(),et,3)}function q(at,et){return U(at,et)+"000"}function $(at,et){return p(at.getMonth()+1,et,2)}function ne(at,et){return p(at.getMinutes(),et,2)}function H(at,et){return p(at.getSeconds(),et,2)}function Q(at){var et=at.getDay();return et===0?7:et}function ee(at,et){return p(a.timeSunday.count(a.timeYear(at)-1,at),et,2)}function ie(at,et){var Ot=at.getDay();return at=Ot>=4||Ot===0?a.timeThursday(at):a.timeThursday.ceil(at),p(a.timeThursday.count(a.timeYear(at),at)+(a.timeYear(at).getDay()===4),et,2)}function ae(at){return at.getDay()}function ue(at,et){return p(a.timeMonday.count(a.timeYear(at)-1,at),et,2)}function le(at,et){return p(at.getFullYear()%100,et,2)}function ge(at,et){return p(at.getFullYear()%1e4,et,4)}function fe(at){var et=at.getTimezoneOffset();return(et>0?"-":(et*=-1,"+"))+p(et/60|0,"0",2)+p(et%60,"0",2)}function me(at,et){return p(at.getUTCDate(),et,2)}function _e(at,et){return p(at.getUTCHours(),et,2)}function we(at,et){return p(at.getUTCHours()%12||12,et,2)}function Te(at,et){return p(1+a.utcDay.count(a.utcYear(at),at),et,3)}function Oe(at,et){return p(at.getUTCMilliseconds(),et,3)}function de(at,et){return Oe(at,et)+"000"}function ye(at,et){return p(at.getUTCMonth()+1,et,2)}function Me(at,et){return p(at.getUTCMinutes(),et,2)}function ke(at,et){return p(at.getUTCSeconds(),et,2)}function Ee(at){var et=at.getUTCDay();return et===0?7:et}function ze(at,et){return p(a.utcSunday.count(a.utcYear(at)-1,at),et,2)}function Fe(at,et){var Ot=at.getUTCDay();return at=Ot>=4||Ot===0?a.utcThursday(at):a.utcThursday.ceil(at),p(a.utcThursday.count(a.utcYear(at),at)+(a.utcYear(at).getUTCDay()===4),et,2)}function Ve(at){return at.getUTCDay()}function Ke(at,et){return p(a.utcMonday.count(a.utcYear(at)-1,at),et,2)}function Re(at,et){return p(at.getUTCFullYear()%100,et,2)}function qe(at,et){return p(at.getUTCFullYear()%1e4,et,4)}function We(){return"+0000"}function Ye(){return"%"}function nt(at){return+at}function ft(at){return Math.floor(+at/1e3)}function vt(at){return l=s(at),r.timeFormat=l.format,r.timeParse=l.parse,r.utcFormat=l.utcFormat,r.utcParse=l.utcParse,l}vt({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var Pt=Date.prototype.toISOString?function(at){return at.toISOString()}:r.utcFormat("%Y-%m-%dT%H:%M:%S.%LZ"),At=+new Date("2000-01-01T00:00:00.000Z")?function(at){var et=new Date(at);return isNaN(et)?null:et}:r.utcParse("%Y-%m-%dT%H:%M:%S.%LZ");r.isoFormat=Pt,r.isoParse=At,r.timeFormatDefaultLocale=vt,r.timeFormatLocale=s,Object.defineProperty(r,"__esModule",{value:!0})})},{"d3-time":121}],121:[function(e,o,f){(function(r,a){a(typeof f=="object"&&o!==void 0?f:(r=r||self).d3=r.d3||{})})(this,function(r){var a=new Date,u=new Date;function c(ye,Me,ke,Ee){function ze(Fe){return ye(Fe=arguments.length===0?new Date:new Date(+Fe)),Fe}return ze.floor=function(Fe){return ye(Fe=new Date(+Fe)),Fe},ze.ceil=function(Fe){return ye(Fe=new Date(Fe-1)),Me(Fe,1),ye(Fe),Fe},ze.round=function(Fe){var Ve=ze(Fe),Ke=ze.ceil(Fe);return Fe-Ve0))return qe;do qe.push(Re=new Date(+Fe)),Me(Fe,Ke),ye(Fe);while(Re=Ve)for(;ye(Ve),!Fe(Ve);)Ve.setTime(Ve-1)},function(Ve,Ke){if(Ve>=Ve)if(Ke<0)for(;++Ke<=0;)for(;Me(Ve,-1),!Fe(Ve););else for(;--Ke>=0;)for(;Me(Ve,1),!Fe(Ve););})},ke&&(ze.count=function(Fe,Ve){return a.setTime(+Fe),u.setTime(+Ve),ye(a),ye(u),Math.floor(ke(a,u))},ze.every=function(Fe){return Fe=Math.floor(Fe),isFinite(Fe)&&Fe>0?Fe>1?ze.filter(Ee?function(Ve){return Ee(Ve)%Fe==0}:function(Ve){return ze.count(0,Ve)%Fe==0}):ze:null}),ze}var i=c(function(){},function(ye,Me){ye.setTime(+ye+Me)},function(ye,Me){return Me-ye});i.every=function(ye){return ye=Math.floor(ye),isFinite(ye)&&ye>0?ye>1?c(function(Me){Me.setTime(Math.floor(Me/ye)*ye)},function(Me,ke){Me.setTime(+Me+ke*ye)},function(Me,ke){return(ke-Me)/ye}):i:null};var s=i.range,l=c(function(ye){ye.setTime(ye-ye.getMilliseconds())},function(ye,Me){ye.setTime(+ye+1e3*Me)},function(ye,Me){return(Me-ye)/1e3},function(ye){return ye.getUTCSeconds()}),d=l.range,h=c(function(ye){ye.setTime(ye-ye.getMilliseconds()-1e3*ye.getSeconds())},function(ye,Me){ye.setTime(+ye+6e4*Me)},function(ye,Me){return(Me-ye)/6e4},function(ye){return ye.getMinutes()}),m=h.range,g=c(function(ye){ye.setTime(ye-ye.getMilliseconds()-1e3*ye.getSeconds()-6e4*ye.getMinutes())},function(ye,Me){ye.setTime(+ye+36e5*Me)},function(ye,Me){return(Me-ye)/36e5},function(ye){return ye.getHours()}),p=g.range,v=c(function(ye){ye.setHours(0,0,0,0)},function(ye,Me){ye.setDate(ye.getDate()+Me)},function(ye,Me){return(Me-ye-6e4*(Me.getTimezoneOffset()-ye.getTimezoneOffset()))/864e5},function(ye){return ye.getDate()-1}),y=v.range;function x(ye){return c(function(Me){Me.setDate(Me.getDate()-(Me.getDay()+7-ye)%7),Me.setHours(0,0,0,0)},function(Me,ke){Me.setDate(Me.getDate()+7*ke)},function(Me,ke){return(ke-Me-6e4*(ke.getTimezoneOffset()-Me.getTimezoneOffset()))/6048e5})}var w=x(0),k=x(1),b=x(2),T=x(3),_=x(4),M=x(5),A=x(6),S=w.range,E=k.range,D=b.range,O=T.range,R=_.range,z=M.range,L=A.range,P=c(function(ye){ye.setDate(1),ye.setHours(0,0,0,0)},function(ye,Me){ye.setMonth(ye.getMonth()+Me)},function(ye,Me){return Me.getMonth()-ye.getMonth()+12*(Me.getFullYear()-ye.getFullYear())},function(ye){return ye.getMonth()}),N=P.range,B=c(function(ye){ye.setMonth(0,1),ye.setHours(0,0,0,0)},function(ye,Me){ye.setFullYear(ye.getFullYear()+Me)},function(ye,Me){return Me.getFullYear()-ye.getFullYear()},function(ye){return ye.getFullYear()});B.every=function(ye){return isFinite(ye=Math.floor(ye))&&ye>0?c(function(Me){Me.setFullYear(Math.floor(Me.getFullYear()/ye)*ye),Me.setMonth(0,1),Me.setHours(0,0,0,0)},function(Me,ke){Me.setFullYear(Me.getFullYear()+ke*ye)}):null};var G=B.range,W=c(function(ye){ye.setUTCSeconds(0,0)},function(ye,Me){ye.setTime(+ye+6e4*Me)},function(ye,Me){return(Me-ye)/6e4},function(ye){return ye.getUTCMinutes()}),K=W.range,te=c(function(ye){ye.setUTCMinutes(0,0,0)},function(ye,Me){ye.setTime(+ye+36e5*Me)},function(ye,Me){return(Me-ye)/36e5},function(ye){return ye.getUTCHours()}),Y=te.range,Z=c(function(ye){ye.setUTCHours(0,0,0,0)},function(ye,Me){ye.setUTCDate(ye.getUTCDate()+Me)},function(ye,Me){return(Me-ye)/864e5},function(ye){return ye.getUTCDate()-1}),re=Z.range;function U(ye){return c(function(Me){Me.setUTCDate(Me.getUTCDate()-(Me.getUTCDay()+7-ye)%7),Me.setUTCHours(0,0,0,0)},function(Me,ke){Me.setUTCDate(Me.getUTCDate()+7*ke)},function(Me,ke){return(ke-Me)/6048e5})}var q=U(0),$=U(1),ne=U(2),H=U(3),Q=U(4),ee=U(5),ie=U(6),ae=q.range,ue=$.range,le=ne.range,ge=H.range,fe=Q.range,me=ee.range,_e=ie.range,we=c(function(ye){ye.setUTCDate(1),ye.setUTCHours(0,0,0,0)},function(ye,Me){ye.setUTCMonth(ye.getUTCMonth()+Me)},function(ye,Me){return Me.getUTCMonth()-ye.getUTCMonth()+12*(Me.getUTCFullYear()-ye.getUTCFullYear())},function(ye){return ye.getUTCMonth()}),Te=we.range,Oe=c(function(ye){ye.setUTCMonth(0,1),ye.setUTCHours(0,0,0,0)},function(ye,Me){ye.setUTCFullYear(ye.getUTCFullYear()+Me)},function(ye,Me){return Me.getUTCFullYear()-ye.getUTCFullYear()},function(ye){return ye.getUTCFullYear()});Oe.every=function(ye){return isFinite(ye=Math.floor(ye))&&ye>0?c(function(Me){Me.setUTCFullYear(Math.floor(Me.getUTCFullYear()/ye)*ye),Me.setUTCMonth(0,1),Me.setUTCHours(0,0,0,0)},function(Me,ke){Me.setUTCFullYear(Me.getUTCFullYear()+ke*ye)}):null};var de=Oe.range;r.timeDay=v,r.timeDays=y,r.timeFriday=M,r.timeFridays=z,r.timeHour=g,r.timeHours=p,r.timeInterval=c,r.timeMillisecond=i,r.timeMilliseconds=s,r.timeMinute=h,r.timeMinutes=m,r.timeMonday=k,r.timeMondays=E,r.timeMonth=P,r.timeMonths=N,r.timeSaturday=A,r.timeSaturdays=L,r.timeSecond=l,r.timeSeconds=d,r.timeSunday=w,r.timeSundays=S,r.timeThursday=_,r.timeThursdays=R,r.timeTuesday=b,r.timeTuesdays=D,r.timeWednesday=T,r.timeWednesdays=O,r.timeWeek=w,r.timeWeeks=S,r.timeYear=B,r.timeYears=G,r.utcDay=Z,r.utcDays=re,r.utcFriday=ee,r.utcFridays=me,r.utcHour=te,r.utcHours=Y,r.utcMillisecond=i,r.utcMilliseconds=s,r.utcMinute=W,r.utcMinutes=K,r.utcMonday=$,r.utcMondays=ue,r.utcMonth=we,r.utcMonths=Te,r.utcSaturday=ie,r.utcSaturdays=_e,r.utcSecond=l,r.utcSeconds=d,r.utcSunday=q,r.utcSundays=ae,r.utcThursday=Q,r.utcThursdays=fe,r.utcTuesday=ne,r.utcTuesdays=le,r.utcWednesday=H,r.utcWednesdays=ge,r.utcWeek=q,r.utcWeeks=ae,r.utcYear=Oe,r.utcYears=de,Object.defineProperty(r,"__esModule",{value:!0})})},{}],122:[function(e,o,f){arguments[4][121][0].apply(f,arguments)},{dup:121}],123:[function(e,o,f){(function(r,a){a(typeof f=="object"&&o!==void 0?f:(r=r||self).d3=r.d3||{})})(this,function(r){var a,u,c=0,i=0,s=0,l=0,d=0,h=0,m=typeof performance=="object"&&performance.now?performance:Date,g=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(_){setTimeout(_,17)};function p(){return d||(g(v),d=m.now()+h)}function v(){d=0}function y(){this._call=this._time=this._next=null}function x(_,M,A){var S=new y;return S.restart(_,M,A),S}function w(){p(),++c;for(var _,M=a;M;)(_=d-M._time)>=0&&M._call.call(null,_),M=M._next;--c}function k(){d=(l=m.now())+h,c=i=0;try{w()}finally{c=0,function(){for(var _,M,A=a,S=1/0;A;)A._call?(S>A._time&&(S=A._time),_=A,A=A._next):(M=A._next,A._next=null,A=_?_._next=M:a=M);u=_,T(S)}(),d=0}}function b(){var _=m.now(),M=_-l;M>1e3&&(h-=M,l=_)}function T(_){c||(i&&(i=clearTimeout(i)),_-d>24?(_<1/0&&(i=setTimeout(k,_-m.now()-h)),s&&(s=clearInterval(s))):(s||(l=m.now(),s=setInterval(b,1e3)),c=1,g(k)))}y.prototype=x.prototype={constructor:y,restart:function(_,M,A){if(typeof _!="function")throw new TypeError("callback is not a function");A=(A==null?p():+A)+(M==null?0:+M),this._next||u===this||(u?u._next=this:a=this,u=this),this._call=_,this._time=A,T()},stop:function(){this._call&&(this._call=null,this._time=1/0,T())}},r.interval=function(_,M,A){var S=new y,E=M;return M==null?(S.restart(_,M,A),S):(M=+M,A=A==null?p():+A,S.restart(function D(O){O+=E,S.restart(D,E+=M,A),_(O)},M,A),S)},r.now=p,r.timeout=function(_,M,A){var S=new y;return M=M==null?0:+M,S.restart(function(E){S.stop(),_(E+M)},M,A),S},r.timer=x,r.timerFlush=w,Object.defineProperty(r,"__esModule",{value:!0})})},{}],124:[function(e,o,f){o.exports=function(){for(var r=0;rh*m){var x=(y-v)/h;d[p]=1e3*x}}return d}function c(i){for(var s=[],l=i[0];l<=i[1];l++)for(var d=String.fromCharCode(l),h=i[0];h0)return function(u,c){var i,s;for(i=new Array(u),s=0;s80*L){P=B=R[0],N=G=R[1];for(var q=L;qB&&(B=W),K>G&&(G=K);te=(te=Math.max(B-P,G-N))!==0?1/te:0}return c(re,U,L,P,N,te),U}function a(R,z,L,P,N){var B,G;if(N===O(R,z,L,P)>0)for(B=z;B=z;B-=P)G=S(B,R[B],R[B+1],G);return G&&k(G,G.next)&&(E(G),G=G.next),G}function u(R,z){if(!R)return R;z||(z=R);var L,P=R;do if(L=!1,P.steiner||!k(P,P.next)&&w(P.prev,P,P.next)!==0)P=P.next;else{if(E(P),(P=z=P.prev)===P.next)break;L=!0}while(L||P!==z);return z}function c(R,z,L,P,N,B,G){if(R){!G&&B&&function(Y,Z,re,U){var q=Y;do q.z===null&&(q.z=p(q.x,q.y,Z,re,U)),q.prevZ=q.prev,q.nextZ=q.next,q=q.next;while(q!==Y);q.prevZ.nextZ=null,q.prevZ=null,function($){var ne,H,Q,ee,ie,ae,ue,le,ge=1;do{for(H=$,$=null,ie=null,ae=0;H;){for(ae++,Q=H,ue=0,ne=0;ne0||le>0&&Q;)ue!==0&&(le===0||!Q||H.z<=Q.z)?(ee=H,H=H.nextZ,ue--):(ee=Q,Q=Q.nextZ,le--),ie?ie.nextZ=ee:$=ee,ee.prevZ=ie,ie=ee;H=Q}ie.nextZ=null,ge*=2}while(ae>1)}(q)}(R,P,N,B);for(var W,K,te=R;R.prev!==R.next;)if(W=R.prev,K=R.next,B?s(R,P,N,B):i(R))z.push(W.i/L),z.push(R.i/L),z.push(K.i/L),E(R),R=K.next,te=K.next;else if((R=K)===te){G?G===1?c(R=l(u(R),z,L),z,L,P,N,B,2):G===2&&d(R,z,L,P,N,B):c(u(R),z,L,P,N,B,1);break}}}function i(R){var z=R.prev,L=R,P=R.next;if(w(z,L,P)>=0)return!1;for(var N=R.next.next;N!==R.prev;){if(y(z.x,z.y,L.x,L.y,P.x,P.y,N.x,N.y)&&w(N.prev,N,N.next)>=0)return!1;N=N.next}return!0}function s(R,z,L,P){var N=R.prev,B=R,G=R.next;if(w(N,B,G)>=0)return!1;for(var W=N.xB.x?N.x>G.x?N.x:G.x:B.x>G.x?B.x:G.x,Y=N.y>B.y?N.y>G.y?N.y:G.y:B.y>G.y?B.y:G.y,Z=p(W,K,z,L,P),re=p(te,Y,z,L,P),U=R.prevZ,q=R.nextZ;U&&U.z>=Z&&q&&q.z<=re;){if(U!==R.prev&&U!==R.next&&y(N.x,N.y,B.x,B.y,G.x,G.y,U.x,U.y)&&w(U.prev,U,U.next)>=0||(U=U.prevZ,q!==R.prev&&q!==R.next&&y(N.x,N.y,B.x,B.y,G.x,G.y,q.x,q.y)&&w(q.prev,q,q.next)>=0))return!1;q=q.nextZ}for(;U&&U.z>=Z;){if(U!==R.prev&&U!==R.next&&y(N.x,N.y,B.x,B.y,G.x,G.y,U.x,U.y)&&w(U.prev,U,U.next)>=0)return!1;U=U.prevZ}for(;q&&q.z<=re;){if(q!==R.prev&&q!==R.next&&y(N.x,N.y,B.x,B.y,G.x,G.y,q.x,q.y)&&w(q.prev,q,q.next)>=0)return!1;q=q.nextZ}return!0}function l(R,z,L){var P=R;do{var N=P.prev,B=P.next.next;!k(N,B)&&b(N,P,P.next,B)&&M(N,B)&&M(B,N)&&(z.push(N.i/L),z.push(P.i/L),z.push(B.i/L),E(P),E(P.next),P=R=B),P=P.next}while(P!==R);return u(P)}function d(R,z,L,P,N,B){var G=R;do{for(var W=G.next.next;W!==G.prev;){if(G.i!==W.i&&x(G,W)){var K=A(G,W);return G=u(G,G.next),K=u(K,K.next),c(G,z,L,P,N,B),void c(K,z,L,P,N,B)}W=W.next}G=G.next}while(G!==R)}function h(R,z){return R.x-z.x}function m(R,z){if(z=function(P,N){var B,G=N,W=P.x,K=P.y,te=-1/0;do{if(K<=G.y&&K>=G.next.y&&G.next.y!==G.y){var Y=G.x+(K-G.y)*(G.next.x-G.x)/(G.next.y-G.y);if(Y<=W&&Y>te){if(te=Y,Y===W){if(K===G.y)return G;if(K===G.next.y)return G.next}B=G.x=G.x&&G.x>=U&&W!==G.x&&y(KB.x||G.x===B.x&&g(B,G)))&&(B=G,$=Z)),G=G.next;while(G!==re);return B}(R,z)){var L=A(z,R);u(z,z.next),u(L,L.next)}}function g(R,z){return w(R.prev,R,z.prev)<0&&w(z.next,R,R.next)<0}function p(R,z,L,P,N){return(R=1431655765&((R=858993459&((R=252645135&((R=16711935&((R=32767*(R-L)*N)|R<<8))|R<<4))|R<<2))|R<<1))|(z=1431655765&((z=858993459&((z=252645135&((z=16711935&((z=32767*(z-P)*N)|z<<8))|z<<4))|z<<2))|z<<1))<<1}function v(R){var z=R,L=R;do(z.x=0&&(R-G)*(P-W)-(L-G)*(z-W)>=0&&(L-G)*(B-W)-(N-G)*(P-W)>=0}function x(R,z){return R.next.i!==z.i&&R.prev.i!==z.i&&!function(L,P){var N=L;do{if(N.i!==L.i&&N.next.i!==L.i&&N.i!==P.i&&N.next.i!==P.i&&b(N,N.next,L,P))return!0;N=N.next}while(N!==L);return!1}(R,z)&&(M(R,z)&&M(z,R)&&function(L,P){var N=L,B=!1,G=(L.x+P.x)/2,W=(L.y+P.y)/2;do N.y>W!=N.next.y>W&&N.next.y!==N.y&&G<(N.next.x-N.x)*(W-N.y)/(N.next.y-N.y)+N.x&&(B=!B),N=N.next;while(N!==L);return B}(R,z)&&(w(R.prev,R,z.prev)||w(R,z.prev,z))||k(R,z)&&w(R.prev,R,R.next)>0&&w(z.prev,z,z.next)>0)}function w(R,z,L){return(z.y-R.y)*(L.x-z.x)-(z.x-R.x)*(L.y-z.y)}function k(R,z){return R.x===z.x&&R.y===z.y}function b(R,z,L,P){var N=_(w(R,z,L)),B=_(w(R,z,P)),G=_(w(L,P,R)),W=_(w(L,P,z));return N!==B&&G!==W||!(N!==0||!T(R,L,z))||!(B!==0||!T(R,P,z))||!(G!==0||!T(L,R,P))||!(W!==0||!T(L,z,P))}function T(R,z,L){return z.x<=Math.max(R.x,L.x)&&z.x>=Math.min(R.x,L.x)&&z.y<=Math.max(R.y,L.y)&&z.y>=Math.min(R.y,L.y)}function _(R){return R>0?1:R<0?-1:0}function M(R,z){return w(R.prev,R,R.next)<0?w(R,z,R.next)>=0&&w(R,R.prev,z)>=0:w(R,z,R.prev)<0||w(R,R.next,z)<0}function A(R,z){var L=new D(R.i,R.x,R.y),P=new D(z.i,z.x,z.y),N=R.next,B=z.prev;return R.next=z,z.prev=R,L.next=N,N.prev=L,P.next=L,L.prev=P,B.next=P,P.prev=B,P}function S(R,z,L,P){var N=new D(R,z,L);return P?(N.next=P.next,N.prev=P,P.next.prev=N,P.next=N):(N.prev=N,N.next=N),N}function E(R){R.next.prev=R.prev,R.prev.next=R.next,R.prevZ&&(R.prevZ.nextZ=R.nextZ),R.nextZ&&(R.nextZ.prevZ=R.prevZ)}function D(R,z,L){this.i=R,this.x=z,this.y=L,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function O(R,z,L,P){for(var N=0,B=z,G=L-P;B0&&(P+=R[N-1].length,L.holes.push(P))}return L}},{}],130:[function(e,o,f){var r=e("strongly-connected-components");o.exports=function(a,u){var c,i=[],s=[],l=[],d={},h=[];function m(b){var T,_,M=!1;for(s.push(b),l[b]=!0,T=0;T=D})})(b);for(var T,_=r(a).components.filter(function(D){return D.length>1}),M=1/0,A=0;A<_.length;A++)for(var S=0;S<_[A].length;S++)_[A][S]=55296&&T<=56319&&(S+=v[++x]),S=E?m.call(E,D,S,w):S,y?(g.value=S,p(k,w,g)):k[w]=S,++w;b=w}}if(b===void 0)for(b=c(v.length),y&&(k=new y(b)),x=0;x0?1:-1}},{}],141:[function(e,o,f){var r=e("../math/sign"),a=Math.abs,u=Math.floor;o.exports=function(c){return isNaN(c)?0:(c=Number(c))!==0&&isFinite(c)?r(c)*u(a(c)):c}},{"../math/sign":138}],142:[function(e,o,f){var r=e("./to-integer"),a=Math.max;o.exports=function(u){return a(0,r(u))}},{"./to-integer":141}],143:[function(e,o,f){var r=e("./valid-callable"),a=e("./valid-value"),u=Function.prototype.bind,c=Function.prototype.call,i=Object.keys,s=Object.prototype.propertyIsEnumerable;o.exports=function(l,d){return function(h,m){var g,p=arguments[2],v=arguments[3];return h=Object(a(h)),r(m),g=i(h),v&&g.sort(typeof v=="function"?u.call(v,h):void 0),typeof l!="function"&&(l=g[l]),c.call(l,g,function(y,x){return s.call(h,y)?c.call(m,p,h[y],y,h,x):d})}}},{"./valid-callable":160,"./valid-value":162}],144:[function(e,o,f){o.exports=e("./is-implemented")()?Object.assign:e("./shim")},{"./is-implemented":145,"./shim":146}],145:[function(e,o,f){o.exports=function(){var r,a=Object.assign;return typeof a=="function"&&(a(r={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),r.foo+r.bar+r.trzy==="razdwatrzy")}},{}],146:[function(e,o,f){var r=e("../keys"),a=e("../valid-value"),u=Math.max;o.exports=function(c,i){var s,l,d,h=u(arguments.length,2);for(c=Object(a(c)),d=function(m){try{c[m]=i[m]}catch(g){s||(s=g)}},l=1;l-1}},{}],166:[function(e,o,f){var r=Object.prototype.toString,a=r.call("");o.exports=function(u){return typeof u=="string"||u&&typeof u=="object"&&(u instanceof String||r.call(u)===a)||!1}},{}],167:[function(e,o,f){var r=Object.create(null),a=Math.random;o.exports=function(){var u;do u=a().toString(36).slice(2);while(r[u]);return u}},{}],168:[function(e,o,f){var r,a=e("es5-ext/object/set-prototype-of"),u=e("es5-ext/string/#/contains"),c=e("d"),i=e("es6-symbol"),s=e("./"),l=Object.defineProperty;r=o.exports=function(d,h){if(!(this instanceof r))throw new TypeError("Constructor requires 'new'");s.call(this,d),h=h?u.call(h,"key+value")?"key+value":u.call(h,"key")?"key":"value":"value",l(this,"__kind__",c("",h))},a&&a(r,s),delete r.prototype.constructor,r.prototype=Object.create(s.prototype,{_resolve:c(function(d){return this.__kind__==="value"?this.__list__[d]:this.__kind__==="key+value"?[d,this.__list__[d]]:d})}),l(r.prototype,i.toStringTag,c("c","Array Iterator"))},{"./":171,d:106,"es5-ext/object/set-prototype-of":157,"es5-ext/string/#/contains":163,"es6-symbol":175}],169:[function(e,o,f){var r=e("es5-ext/function/is-arguments"),a=e("es5-ext/object/valid-callable"),u=e("es5-ext/string/is-string"),c=e("./get"),i=Array.isArray,s=Function.prototype.call,l=Array.prototype.some;o.exports=function(d,h){var m,g,p,v,y,x,w,k,b=arguments[2];if(i(d)||r(d)?m="array":u(d)?m="string":d=c(d),a(h),p=function(){v=!0},m!=="array")if(m!=="string")for(g=d.next();!g.done;){if(s.call(h,b,g.value,p),v)return;g=d.next()}else for(x=d.length,y=0;y=55296&&k<=56319&&(w+=d[++y]),s.call(h,b,w,p),!v);++y);else l.call(d,function(T){return s.call(h,b,T,p),v})}},{"./get":170,"es5-ext/function/is-arguments":135,"es5-ext/object/valid-callable":160,"es5-ext/string/is-string":166}],170:[function(e,o,f){var r=e("es5-ext/function/is-arguments"),a=e("es5-ext/string/is-string"),u=e("./array"),c=e("./string"),i=e("./valid-iterable"),s=e("es6-symbol").iterator;o.exports=function(l){return typeof i(l)[s]=="function"?l[s]():r(l)?new u(l):a(l)?new c(l):new u(l)}},{"./array":168,"./string":173,"./valid-iterable":174,"es5-ext/function/is-arguments":135,"es5-ext/string/is-string":166,"es6-symbol":175}],171:[function(e,o,f){var r,a=e("es5-ext/array/#/clear"),u=e("es5-ext/object/assign"),c=e("es5-ext/object/valid-callable"),i=e("es5-ext/object/valid-value"),s=e("d"),l=e("d/auto-bind"),d=e("es6-symbol"),h=Object.defineProperty,m=Object.defineProperties;o.exports=r=function(g,p){if(!(this instanceof r))throw new TypeError("Constructor requires 'new'");m(this,{__list__:s("w",i(g)),__context__:s("w",p),__nextIndex__:s("w",0)}),p&&(c(p.on),p.on("_add",this._onAdd),p.on("_delete",this._onDelete),p.on("_clear",this._onClear))},delete r.prototype.constructor,m(r.prototype,u({_next:s(function(){var g;if(this.__list__)return this.__redo__&&(g=this.__redo__.shift())!==void 0?g:this.__nextIndex__=this.__nextIndex__||(++this.__nextIndex__,this.__redo__?(this.__redo__.forEach(function(p,v){p>=g&&(this.__redo__[v]=++p)},this),this.__redo__.push(g)):h(this,"__redo__",s("c",[g])))}),_onDelete:s(function(g){var p;g>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&((p=this.__redo__.indexOf(g))!==-1&&this.__redo__.splice(p,1),this.__redo__.forEach(function(v,y){v>g&&(this.__redo__[y]=--v)},this)))}),_onClear:s(function(){this.__redo__&&a.call(this.__redo__),this.__nextIndex__=0})}))),h(r.prototype,d.iterator,s(function(){return this}))},{d:106,"d/auto-bind":105,"es5-ext/array/#/clear":131,"es5-ext/object/assign":144,"es5-ext/object/valid-callable":160,"es5-ext/object/valid-value":162,"es6-symbol":175}],172:[function(e,o,f){var r=e("es5-ext/function/is-arguments"),a=e("es5-ext/object/is-value"),u=e("es5-ext/string/is-string"),c=e("es6-symbol").iterator,i=Array.isArray;o.exports=function(s){return!!a(s)&&(!!i(s)||!!u(s)||!!r(s)||typeof s[c]=="function")}},{"es5-ext/function/is-arguments":135,"es5-ext/object/is-value":151,"es5-ext/string/is-string":166,"es6-symbol":175}],173:[function(e,o,f){var r,a=e("es5-ext/object/set-prototype-of"),u=e("d"),c=e("es6-symbol"),i=e("./"),s=Object.defineProperty;r=o.exports=function(l){if(!(this instanceof r))throw new TypeError("Constructor requires 'new'");l=String(l),i.call(this,l),s(this,"__length__",u("",l.length))},a&&a(r,i),delete r.prototype.constructor,r.prototype=Object.create(i.prototype,{_next:u(function(){if(this.__list__)return this.__nextIndex__=55296&&d<=56319?h+this.__list__[this.__nextIndex__++]:h})}),s(r.prototype,c.toStringTag,u("c","String Iterator"))},{"./":171,d:106,"es5-ext/object/set-prototype-of":157,"es6-symbol":175}],174:[function(e,o,f){var r=e("./is-iterable");o.exports=function(a){if(!r(a))throw new TypeError(a+" is not iterable");return a}},{"./is-iterable":172}],175:[function(e,o,f){o.exports=e("./is-implemented")()?e("ext/global-this").Symbol:e("./polyfill")},{"./is-implemented":176,"./polyfill":181,"ext/global-this":188}],176:[function(e,o,f){var r=e("ext/global-this"),a={object:!0,symbol:!0};o.exports=function(){var u,c=r.Symbol;if(typeof c!="function")return!1;u=c("test symbol");try{String(u)}catch{return!1}return!!a[typeof c.iterator]&&!!a[typeof c.toPrimitive]&&!!a[typeof c.toStringTag]}},{"ext/global-this":188}],177:[function(e,o,f){o.exports=function(r){return!!r&&(typeof r=="symbol"||!!r.constructor&&r.constructor.name==="Symbol"&&r[r.constructor.toStringTag]==="Symbol")}},{}],178:[function(e,o,f){var r=e("d"),a=Object.create,u=Object.defineProperty,c=Object.prototype,i=a(null);o.exports=function(s){for(var l,d,h=0;i[s+(h||"")];)++h;return i[s+=h||""]=!0,u(c,l="@@"+s,r.gs(null,function(m){d||(d=!0,u(this,l,r(m)),d=!1)})),l}},{d:106}],179:[function(e,o,f){var r=e("d"),a=e("ext/global-this").Symbol;o.exports=function(u){return Object.defineProperties(u,{hasInstance:r("",a&&a.hasInstance||u("hasInstance")),isConcatSpreadable:r("",a&&a.isConcatSpreadable||u("isConcatSpreadable")),iterator:r("",a&&a.iterator||u("iterator")),match:r("",a&&a.match||u("match")),replace:r("",a&&a.replace||u("replace")),search:r("",a&&a.search||u("search")),species:r("",a&&a.species||u("species")),split:r("",a&&a.split||u("split")),toPrimitive:r("",a&&a.toPrimitive||u("toPrimitive")),toStringTag:r("",a&&a.toStringTag||u("toStringTag")),unscopables:r("",a&&a.unscopables||u("unscopables"))})}},{d:106,"ext/global-this":188}],180:[function(e,o,f){var r=e("d"),a=e("../../../validate-symbol"),u=Object.create(null);o.exports=function(c){return Object.defineProperties(c,{for:r(function(i){return u[i]?u[i]:u[i]=c(String(i))}),keyFor:r(function(i){var s;for(s in a(i),u)if(u[s]===i)return s})})}},{"../../../validate-symbol":182,d:106}],181:[function(e,o,f){var r,a,u,c=e("d"),i=e("./validate-symbol"),s=e("ext/global-this").Symbol,l=e("./lib/private/generate-name"),d=e("./lib/private/setup/standard-symbols"),h=e("./lib/private/setup/symbol-registry"),m=Object.create,g=Object.defineProperties,p=Object.defineProperty;if(typeof s=="function")try{String(s()),u=!0}catch{}else s=null;a=function(v){if(this instanceof a)throw new TypeError("Symbol is not a constructor");return r(v)},o.exports=r=function v(y){var x;if(this instanceof v)throw new TypeError("Symbol is not a constructor");return u?s(y):(x=m(a.prototype),y=y===void 0?"":String(y),g(x,{__description__:c("",y),__name__:c("",l(y))}))},d(r),h(r),g(a.prototype,{constructor:c(r),toString:c("",function(){return this.__name__})}),g(r.prototype,{toString:c(function(){return"Symbol ("+i(this).__description__+")"}),valueOf:c(function(){return i(this)})}),p(r.prototype,r.toPrimitive,c("",function(){var v=i(this);return typeof v=="symbol"?v:v.toString()})),p(r.prototype,r.toStringTag,c("c","Symbol")),p(a.prototype,r.toStringTag,c("c",r.prototype[r.toStringTag])),p(a.prototype,r.toPrimitive,c("c",r.prototype[r.toPrimitive]))},{"./lib/private/generate-name":178,"./lib/private/setup/standard-symbols":179,"./lib/private/setup/symbol-registry":180,"./validate-symbol":182,d:106,"ext/global-this":188}],182:[function(e,o,f){var r=e("./is-symbol");o.exports=function(a){if(!r(a))throw new TypeError(a+" is not a symbol");return a}},{"./is-symbol":177}],183:[function(e,o,f){o.exports=e("./is-implemented")()?WeakMap:e("./polyfill")},{"./is-implemented":184,"./polyfill":186}],184:[function(e,o,f){o.exports=function(){var r,a;if(typeof WeakMap!="function")return!1;try{r=new WeakMap([[a={},"one"],[{},"two"],[{},"three"]])}catch{return!1}return String(r)==="[object WeakMap]"&&typeof r.set=="function"&&r.set({},1)===r&&typeof r.delete=="function"&&typeof r.has=="function"&&r.get(a)==="one"}},{}],185:[function(e,o,f){o.exports=typeof WeakMap=="function"&&Object.prototype.toString.call(new WeakMap)==="[object WeakMap]"},{}],186:[function(e,o,f){var r,a=e("es5-ext/object/is-value"),u=e("es5-ext/object/set-prototype-of"),c=e("es5-ext/object/valid-object"),i=e("es5-ext/object/valid-value"),s=e("es5-ext/string/random-uniq"),l=e("d"),d=e("es6-iterator/get"),h=e("es6-iterator/for-of"),m=e("es6-symbol").toStringTag,g=e("./is-native-implemented"),p=Array.isArray,v=Object.defineProperty,y=Object.prototype.hasOwnProperty,x=Object.getPrototypeOf;o.exports=r=function(){var w,k=arguments[0];if(!(this instanceof r))throw new TypeError("Constructor requires 'new'");return w=g&&u&&WeakMap!==r?u(new WeakMap,x(this)):this,a(k)&&(p(k)||(k=d(k))),v(w,"__weakMapData__",l("c","$weakMap$"+s())),k&&h(k,function(b){i(b),w.set(b[0],b[1])}),w},g&&(u&&u(r,WeakMap),r.prototype=Object.create(WeakMap.prototype,{constructor:l(r)})),Object.defineProperties(r.prototype,{delete:l(function(w){return!!y.call(c(w),this.__weakMapData__)&&(delete w[this.__weakMapData__],!0)}),get:l(function(w){if(y.call(c(w),this.__weakMapData__))return w[this.__weakMapData__]}),has:l(function(w){return y.call(c(w),this.__weakMapData__)}),set:l(function(w,k){return v(c(w),this.__weakMapData__,l("c",k)),this}),toString:l(function(){return"[object WeakMap]"})}),v(r.prototype,m,l("c","WeakMap"))},{"./is-native-implemented":185,d:106,"es5-ext/object/is-value":151,"es5-ext/object/set-prototype-of":157,"es5-ext/object/valid-object":161,"es5-ext/object/valid-value":162,"es5-ext/string/random-uniq":167,"es6-iterator/for-of":169,"es6-iterator/get":170,"es6-symbol":175}],187:[function(e,o,f){var r=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};o.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch{return r()}try{return __global__||r()}finally{delete Object.prototype.__global__}}()},{}],188:[function(e,o,f){o.exports=e("./is-implemented")()?globalThis:e("./implementation")},{"./implementation":187,"./is-implemented":189}],189:[function(e,o,f){o.exports=function(){return typeof globalThis=="object"&&!!globalThis&&globalThis.Array===Array}},{}],190:[function(e,o,f){var r=e("is-string-blank");o.exports=function(a){var u=typeof a;if(u==="string"){var c=a;if((a=+a)==0&&r(c))return!1}else if(u!=="number")return!1;return a-a<1}},{"is-string-blank":237}],191:[function(e,o,f){var r=e("dtype");o.exports=function(a,u,c){if(!a)throw new TypeError("must specify data as first parameter");if(c=0|+(c||0),Array.isArray(a)&&a[0]&&typeof a[0][0]=="number"){var i,s,l,d,h=a[0].length,m=a.length*h;u&&typeof u!="string"||(u=new(r(u||"float32"))(m+c));var g=u.length-c;if(m!==g)throw new Error("source length "+m+" ("+h+"x"+a.length+") does not match destination length "+g);for(i=0,l=c;ic[0]-l[0]/2&&(v=l[0]/2,y+=l[1]);return i}},{"css-font/stringify":102}],193:[function(e,o,f){function r(i,s){s||(s={}),(typeof i=="string"||Array.isArray(i))&&(s.family=i);var l=Array.isArray(s.family)?s.family.join(", "):s.family;if(!l)throw Error("`family` must be defined");var d=s.size||s.fontSize||s.em||48,h=s.weight||s.fontWeight||"",m=(i=[s.style||s.fontStyle||"",h,d].join(" ")+"px "+l,s.origin||"top");if(r.cache[l]&&d<=r.cache[l].em)return a(r.cache[l],m);var g=s.canvas||r.canvas,p=g.getContext("2d"),v={upper:s.upper!==void 0?s.upper:"H",lower:s.lower!==void 0?s.lower:"x",descent:s.descent!==void 0?s.descent:"p",ascent:s.ascent!==void 0?s.ascent:"h",tittle:s.tittle!==void 0?s.tittle:"i",overshoot:s.overshoot!==void 0?s.overshoot:"O"},y=Math.ceil(1.5*d);g.height=y,g.width=.5*y,p.font=i;var x={top:0};p.clearRect(0,0,y,y),p.textBaseline="top",p.fillStyle="black",p.fillText("H",0,0);var w=u(p.getImageData(0,0,y,y));p.clearRect(0,0,y,y),p.textBaseline="bottom",p.fillText("H",0,y);var k=u(p.getImageData(0,0,y,y));x.lineHeight=x.bottom=y-k+w,p.clearRect(0,0,y,y),p.textBaseline="alphabetic",p.fillText("H",0,y);var b=y-u(p.getImageData(0,0,y,y))-1+w;x.baseline=x.alphabetic=b,p.clearRect(0,0,y,y),p.textBaseline="middle",p.fillText("H",0,.5*y);var T=u(p.getImageData(0,0,y,y));x.median=x.middle=y-T-1+w-.5*y,p.clearRect(0,0,y,y),p.textBaseline="hanging",p.fillText("H",0,.5*y);var _=u(p.getImageData(0,0,y,y));x.hanging=y-_-1+w-.5*y,p.clearRect(0,0,y,y),p.textBaseline="ideographic",p.fillText("H",0,y);var M=u(p.getImageData(0,0,y,y));if(x.ideographic=y-M-1+w,v.upper&&(p.clearRect(0,0,y,y),p.textBaseline="top",p.fillText(v.upper,0,0),x.upper=u(p.getImageData(0,0,y,y)),x.capHeight=x.baseline-x.upper),v.lower&&(p.clearRect(0,0,y,y),p.textBaseline="top",p.fillText(v.lower,0,0),x.lower=u(p.getImageData(0,0,y,y)),x.xHeight=x.baseline-x.lower),v.tittle&&(p.clearRect(0,0,y,y),p.textBaseline="top",p.fillText(v.tittle,0,0),x.tittle=u(p.getImageData(0,0,y,y))),v.ascent&&(p.clearRect(0,0,y,y),p.textBaseline="top",p.fillText(v.ascent,0,0),x.ascent=u(p.getImageData(0,0,y,y))),v.descent&&(p.clearRect(0,0,y,y),p.textBaseline="top",p.fillText(v.descent,0,0),x.descent=c(p.getImageData(0,0,y,y))),v.overshoot){p.clearRect(0,0,y,y),p.textBaseline="top",p.fillText(v.overshoot,0,0);var A=c(p.getImageData(0,0,y,y));x.overshoot=A-b}for(var S in x)x[S]/=d;return x.em=d,r.cache[l]=x,a(x,m)}function a(i,s){var l={};for(var d in typeof s=="string"&&(s=i[s]),i)d!=="em"&&(l[d]=i[d]-s);return l}function u(i){for(var s=i.height,l=i.data,d=3;d0;d-=4)if(l[d]!==0)return Math.floor(.25*(d-3)/s)}o.exports=r,r.canvas=document.createElement("canvas"),r.cache={}},{}],194:[function(e,o,f){o.exports=function(r,a){if(typeof r!="string")throw new TypeError("must specify type string");if(a=a||{},typeof document>"u"&&!a.canvas)return null;var u=a.canvas||document.createElement("canvas");typeof a.width=="number"&&(u.width=a.width),typeof a.height=="number"&&(u.height=a.height);var c,i=a;try{var s=[r];r.indexOf("webgl")===0&&s.push("experimental-"+r);for(var l=0;l halfCharStep + halfCharWidth || + floor(uv.x) < halfCharStep - halfCharWidth) return; + + uv += charId * charStep; + uv = uv / atlasSize; + + vec4 color = fontColor; + vec4 mask = texture2D(atlas, uv); + + float maskY = lightness(mask); + // float colorY = lightness(color); + color.a *= maskY; + color.a *= opacity; + + // color.a += .1; + + // antialiasing, see yiq color space y-channel formula + // color.rgb += (1. - color.rgb) * (1. - mask.rgb); + + gl_FragColor = color; + }`});return{regl:A,draw:S,atlas:{}}},M.prototype.update=function(A){var S=this;if(typeof A=="string")A={text:A};else if(!A)return;(A=a(A,{position:"position positions coord coords coordinates",font:"font fontFace fontface typeface cssFont css-font family fontFamily",fontSize:"fontSize fontsize size font-size",text:"text texts chars characters value values symbols",align:"align alignment textAlign textbaseline",baseline:"baseline textBaseline textbaseline",direction:"dir direction textDirection",color:"color colour fill fill-color fillColor textColor textcolor",kerning:"kerning kern",range:"range dataBox",viewport:"vp viewport viewBox viewbox viewPort",opacity:"opacity alpha transparency visible visibility opaque",offset:"offset positionOffset padding shift indent indentation"},!0)).opacity!=null&&(Array.isArray(A.opacity)?this.opacity=A.opacity.map(function(ye){return parseFloat(ye)}):this.opacity=parseFloat(A.opacity)),A.viewport!=null&&(this.viewport=h(A.viewport),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),this.viewport==null&&(this.viewport={x:0,y:0,width:this.gl.drawingBufferWidth,height:this.gl.drawingBufferHeight},this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),A.kerning!=null&&(this.kerning=A.kerning),A.offset!=null&&(typeof A.offset=="number"&&(A.offset=[A.offset,0]),this.positionOffset=w(A.offset)),A.direction&&(this.direction=A.direction),A.range&&(this.range=A.range,this.scale=[1/(A.range[2]-A.range[0]),1/(A.range[3]-A.range[1])],this.translate=[-A.range[0],-A.range[1]]),A.scale&&(this.scale=A.scale),A.translate&&(this.translate=A.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),this.font.length||A.font||(A.font=M.baseFontSize+"px sans-serif");var E,D=!1,O=!1;if(A.font&&(Array.isArray(A.font)?A.font:[A.font]).forEach(function(ye,Me){if(typeof ye=="string")try{ye=r.parse(ye)}catch{ye=r.parse(M.baseFontSize+"px "+ye)}else ye=r.parse(r.stringify(ye));var ke=r.stringify({size:M.baseFontSize,family:ye.family,stretch:T?ye.stretch:void 0,variant:ye.variant,weight:ye.weight,style:ye.style}),Ee=g(ye.size),ze=Math.round(Ee[0]*p(Ee[1]));if(ze!==S.fontSize[Me]&&(O=!0,S.fontSize[Me]=ze),!(S.font[Me]&&ke==S.font[Me].baseString||(D=!0,S.font[Me]=M.fonts[ke],S.font[Me]))){var Fe=ye.family.join(", "),Ve=[ye.style];ye.style!=ye.variant&&Ve.push(ye.variant),ye.variant!=ye.weight&&Ve.push(ye.weight),T&&ye.weight!=ye.stretch&&Ve.push(ye.stretch),S.font[Me]={baseString:ke,family:Fe,weight:ye.weight,stretch:ye.stretch,style:ye.style,variant:ye.variant,width:{},kerning:{},metrics:x(Fe,{origin:"top",fontSize:M.baseFontSize,fontStyle:Ve.join(" ")})},M.fonts[ke]=S.font[Me]}}),(D||O)&&this.font.forEach(function(ye,Me){var ke=r.stringify({size:S.fontSize[Me],family:ye.family,stretch:T?ye.stretch:void 0,variant:ye.variant,weight:ye.weight,style:ye.style});if(S.fontAtlas[Me]=S.shader.atlas[ke],!S.fontAtlas[Me]){var Ee=ye.metrics;S.shader.atlas[ke]=S.fontAtlas[Me]={fontString:ke,step:2*Math.ceil(S.fontSize[Me]*Ee.bottom*.5),em:S.fontSize[Me],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:S.regl.texture()}}A.text==null&&(A.text=S.text)}),typeof A.text=="string"&&A.position&&A.position.length>2){for(var R=Array(.5*A.position.length),z=0;z2){for(var P=!A.position[0].length,N=d.mallocFloat(2*this.count),B=0,G=0;B1?S.align[Me]:S.align[0]:S.align;if(typeof ke=="number")return ke;switch(ke){case"right":case"end":return-ye;case"center":case"centre":case"middle":return .5*-ye}return 0})),this.baseline==null&&A.baseline==null&&(A.baseline=0),A.baseline!=null&&(this.baseline=A.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(ye,Me){var ke=(S.font[Me]||S.font[0]).metrics,Ee=0;return Ee+=.5*ke.bottom,Ee+=typeof ye=="number"?ye-ke.baseline:-ke[ye],Ee*=-1})),A.color!=null)if(A.color||(A.color="transparent"),typeof A.color!="string"&&isNaN(A.color)){var ge;if(typeof A.color[0]=="number"&&A.color.length>this.counts.length){var fe=A.color.length;ge=d.mallocUint8(fe);for(var me=(A.color.subarray||A.color.slice).bind(A.color),_e=0;_e4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2){var Oe=Math.max(.5*this.position.length||0,.25*this.color.length||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,.5*this.positionOffset.length||0);this.batch=Array(Oe);for(var de=0;de1?this.counts[de]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[de]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(4*de,4*de+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[de]:this.opacity,baseline:this.baselineOffset[de]!=null?this.baselineOffset[de]:this.baselineOffset[0],align:this.align?this.alignOffset[de]!=null?this.alignOffset[de]:this.alignOffset[0]:0,atlas:this.fontAtlas[de]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(2*de,2*de+2):this.positionOffset}}else this.count?this.batch=[{count:this.count,offset:0,color:this.color||[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[0]:this.opacity,baseline:this.baselineOffset[0],align:this.alignOffset?this.alignOffset[0]:0,atlas:this.fontAtlas[0],positionOffset:this.positionOffset}]:this.batch=[]},M.prototype.destroy=function(){},M.prototype.kerning=!0,M.prototype.position={constant:new Float32Array(2)},M.prototype.translate=null,M.prototype.scale=null,M.prototype.font=null,M.prototype.text="",M.prototype.positionOffset=[0,0],M.prototype.opacity=1,M.prototype.color=new Uint8Array([0,0,0,255]),M.prototype.alignOffset=[0,0],M.maxAtlasSize=1024,M.atlasCanvas=document.createElement("canvas"),M.atlasContext=M.atlasCanvas.getContext("2d",{alpha:!1}),M.baseFontSize=64,M.fonts={},o.exports=M},{"bit-twiddle":81,"color-normalize":89,"css-font":99,"detect-kerning":125,"es6-weak-map":183,"flatten-vertex-data":191,"font-atlas":192,"font-measure":193,"gl-util/context":226,"is-plain-obj":236,"object-assign":247,"parse-rect":249,"parse-unit":251,"pick-by-alias":253,regl:283,"to-px":314,"typedarray-pool":327}],226:[function(e,o,f){(function(r){(function(){var a=e("pick-by-alias");function u(s){if(s.container)if(s.container==document.body)document.body.style.width||(s.canvas.width=s.width||s.pixelRatio*r.innerWidth),document.body.style.height||(s.canvas.height=s.height||s.pixelRatio*r.innerHeight);else{var l=s.container.getBoundingClientRect();s.canvas.width=s.width||l.right-l.left,s.canvas.height=s.height||l.bottom-l.top}}function c(s){return typeof s.getContext=="function"&&"width"in s&&"height"in s}function i(){var s=document.createElement("canvas");return s.style.position="absolute",s.style.top=0,s.style.left=0,s}o.exports=function(s){var l;if(s?typeof s=="string"&&(s={container:s}):s={},c(s)?s={container:s}:s=typeof(l=s).nodeName=="string"&&typeof l.appendChild=="function"&&typeof l.getBoundingClientRect=="function"?{container:s}:function(h){return typeof h.drawArrays=="function"||typeof h.drawElements=="function"}(s)?{gl:s}:a(s,{container:"container target element el canvas holder parent parentNode wrapper use ref root node",gl:"gl context webgl glContext",attrs:"attributes attrs contextAttributes",pixelRatio:"pixelRatio pxRatio px ratio pxratio pixelratio",width:"w width",height:"h height"},!0),s.pixelRatio||(s.pixelRatio=r.pixelRatio||1),s.gl)return s.gl;if(s.canvas&&(s.container=s.canvas.parentNode),s.container){if(typeof s.container=="string"){var d=document.querySelector(s.container);if(!d)throw Error("Element "+s.container+" is not found");s.container=d}c(s.container)?(s.canvas=s.container,s.container=s.canvas.parentNode):s.canvas||(s.canvas=i(),s.container.appendChild(s.canvas),u(s))}else if(!s.canvas){if(typeof document>"u")throw Error("Not DOM environment. Use headless-gl.");s.container=document.body||document.documentElement,s.canvas=i(),s.container.appendChild(s.canvas),u(s)}return s.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(h){try{s.gl=s.canvas.getContext(h,s.attrs)}catch{}return s.gl}),s.gl}}).call(this)}).call(this,typeof Ro<"u"?Ro:typeof self<"u"?self:typeof window<"u"?window:{})},{"pick-by-alias":253}],227:[function(e,o,f){o.exports=function(r){typeof r=="string"&&(r=[r]);for(var a=[].slice.call(arguments,1),u=[],c=0;c>1,g=-7,p=u?i-1:0,v=u?-1:1,y=r[a+p];for(p+=v,s=y&(1<<-g)-1,y>>=-g,g+=d;g>0;s=256*s+r[a+p],p+=v,g-=8);for(l=s&(1<<-g)-1,s>>=-g,g+=c;g>0;l=256*l+r[a+p],p+=v,g-=8);if(s===0)s=1-m;else{if(s===h)return l?NaN:1/0*(y?-1:1);l+=Math.pow(2,c),s-=m}return(y?-1:1)*l*Math.pow(2,s-c)},f.write=function(r,a,u,c,i,s){var l,d,h,m=8*s-i-1,g=(1<>1,v=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,y=c?0:s-1,x=c?1:-1,w=a<0||a===0&&1/a<0?1:0;for(a=Math.abs(a),isNaN(a)||a===1/0?(d=isNaN(a)?1:0,l=g):(l=Math.floor(Math.log(a)/Math.LN2),a*(h=Math.pow(2,-l))<1&&(l--,h*=2),(a+=l+p>=1?v/h:v*Math.pow(2,1-p))*h>=2&&(l++,h/=2),l+p>=g?(d=0,l=g):l+p>=1?(d=(a*h-1)*Math.pow(2,i),l+=p):(d=a*Math.pow(2,p-1)*Math.pow(2,i),l=0));i>=8;r[u+y]=255&d,y+=x,d/=256,i-=8);for(l=l<0;r[u+y]=255&l,y+=x,l/=256,m-=8);r[u+y-x]|=128*w}},{}],231:[function(e,o,f){typeof Object.create=="function"?o.exports=function(r,a){a&&(r.super_=a,r.prototype=Object.create(a.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:o.exports=function(r,a){if(a){r.super_=a;var u=function(){};u.prototype=a.prototype,r.prototype=new u,r.prototype.constructor=r}}},{}],232:[function(e,o,f){o.exports=!0},{}],233:[function(e,o,f){o.exports=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))},{}],234:[function(e,o,f){o.exports=u,o.exports.isMobile=u,o.exports.default=u;var r=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,a=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino|android|ipad|playbook|silk/i;function u(c){c||(c={});var i=c.ua;if(i||typeof navigator>"u"||(i=navigator.userAgent),i&&i.headers&&typeof i.headers["user-agent"]=="string"&&(i=i.headers["user-agent"]),typeof i!="string")return!1;var s=c.tablet?a.test(i):r.test(i);return!s&&c.tablet&&c.featureDetect&&navigator&&navigator.maxTouchPoints>1&&i.indexOf("Macintosh")!==-1&&i.indexOf("Safari")!==-1&&(s=!0),s}},{}],235:[function(e,o,f){o.exports=function(r){var a=typeof r;return r!==null&&(a==="object"||a==="function")}},{}],236:[function(e,o,f){var r=Object.prototype.toString;o.exports=function(a){var u;return r.call(a)==="[object Object]"&&((u=Object.getPrototypeOf(a))===null||u===Object.getPrototypeOf({}))}},{}],237:[function(e,o,f){o.exports=function(r){for(var a,u=r.length,c=0;c13)&&a!==32&&a!==133&&a!==160&&a!==5760&&a!==6158&&(a<8192||a>8205)&&a!==8232&&a!==8233&&a!==8239&&a!==8287&&a!==8288&&a!==12288&&a!==65279)return!1;return!0}},{}],238:[function(e,o,f){o.exports=function(r){return typeof r=="string"&&(r=r.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(r)&&/[\dz]$/i.test(r)&&r.length>4))}},{}],239:[function(e,o,f){(function(r,a){typeof f=="object"&&o!==void 0?o.exports=a():(r=r||self).mapboxgl=a()})(this,function(){var r,a,u;function c(i,s){if(r)if(a){var l="var sharedChunk = {}; ("+r+")(sharedChunk); ("+a+")(sharedChunk);",d={};r(d),(u=s(d)).workerUrl=window.URL.createObjectURL(new Blob([l],{type:"text/javascript"}))}else a=s;else r=s}return c(0,function(i){function s(C,F){return C(F={exports:{}},F.exports),F.exports}var l=d;function d(C,F,J,oe){this.cx=3*C,this.bx=3*(J-C)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*F,this.by=3*(oe-F)-this.cy,this.ay=1-this.cy-this.by,this.p1x=C,this.p1y=oe,this.p2x=J,this.p2y=oe}d.prototype.sampleCurveX=function(C){return((this.ax*C+this.bx)*C+this.cx)*C},d.prototype.sampleCurveY=function(C){return((this.ay*C+this.by)*C+this.cy)*C},d.prototype.sampleCurveDerivativeX=function(C){return(3*this.ax*C+2*this.bx)*C+this.cx},d.prototype.solveCurveX=function(C,F){var J,oe,pe,xe,Ce;for(F===void 0&&(F=1e-6),pe=C,Ce=0;Ce<8;Ce++){if(xe=this.sampleCurveX(pe)-C,Math.abs(xe)(oe=1))return oe;for(;Jxe?J=pe:oe=pe,pe=.5*(oe-J)+J}return pe},d.prototype.solve=function(C,F){return this.sampleCurveY(this.solveCurveX(C,F))};var h=m;function m(C,F){this.x=C,this.y=F}function g(C,F,J,oe){var pe=new l(C,F,J,oe);return function(xe){return pe.solve(xe)}}m.prototype={clone:function(){return new m(this.x,this.y)},add:function(C){return this.clone()._add(C)},sub:function(C){return this.clone()._sub(C)},multByPoint:function(C){return this.clone()._multByPoint(C)},divByPoint:function(C){return this.clone()._divByPoint(C)},mult:function(C){return this.clone()._mult(C)},div:function(C){return this.clone()._div(C)},rotate:function(C){return this.clone()._rotate(C)},rotateAround:function(C,F){return this.clone()._rotateAround(C,F)},matMult:function(C){return this.clone()._matMult(C)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(C){return this.x===C.x&&this.y===C.y},dist:function(C){return Math.sqrt(this.distSqr(C))},distSqr:function(C){var F=C.x-this.x,J=C.y-this.y;return F*F+J*J},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(C){return Math.atan2(this.y-C.y,this.x-C.x)},angleWith:function(C){return this.angleWithSep(C.x,C.y)},angleWithSep:function(C,F){return Math.atan2(this.x*F-this.y*C,this.x*C+this.y*F)},_matMult:function(C){var F=C[0]*this.x+C[1]*this.y,J=C[2]*this.x+C[3]*this.y;return this.x=F,this.y=J,this},_add:function(C){return this.x+=C.x,this.y+=C.y,this},_sub:function(C){return this.x-=C.x,this.y-=C.y,this},_mult:function(C){return this.x*=C,this.y*=C,this},_div:function(C){return this.x/=C,this.y/=C,this},_multByPoint:function(C){return this.x*=C.x,this.y*=C.y,this},_divByPoint:function(C){return this.x/=C.x,this.y/=C.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var C=this.y;return this.y=this.x,this.x=-C,this},_rotate:function(C){var F=Math.cos(C),J=Math.sin(C),oe=F*this.x-J*this.y,pe=J*this.x+F*this.y;return this.x=oe,this.y=pe,this},_rotateAround:function(C,F){var J=Math.cos(C),oe=Math.sin(C),pe=F.x+J*(this.x-F.x)-oe*(this.y-F.y),xe=F.y+oe*(this.x-F.x)+J*(this.y-F.y);return this.x=pe,this.y=xe,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},m.convert=function(C){return C instanceof m?C:Array.isArray(C)?new m(C[0],C[1]):C};var p=g(.25,.1,.25,1);function v(C,F,J){return Math.min(J,Math.max(F,C))}function y(C,F,J){var oe=J-F,pe=((C-F)%oe+oe)%oe+F;return pe===F?J:pe}function x(C){for(var F=[],J=arguments.length-1;J-- >0;)F[J]=arguments[J+1];for(var oe=0,pe=F;oe>F/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,C)}()}function T(C){return!!C&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(C)}function _(C,F){C.forEach(function(J){F[J]&&(F[J]=F[J].bind(F))})}function M(C,F){return C.indexOf(F,C.length-F.length)!==-1}function A(C,F,J){var oe={};for(var pe in C)oe[pe]=F.call(J||this,C[pe],pe,C);return oe}function S(C,F,J){var oe={};for(var pe in C)F.call(J||this,C[pe],pe,C)&&(oe[pe]=C[pe]);return oe}function E(C){return Array.isArray(C)?C.map(E):typeof C=="object"&&C?A(C,E):C}var D={};function O(C){D[C]||(typeof console<"u"&&console.warn(C),D[C]=!0)}function R(C,F,J){return(J.y-C.y)*(F.x-C.x)>(F.y-C.y)*(J.x-C.x)}function z(C){for(var F=0,J=0,oe=C.length,pe=oe-1,xe=void 0,Ce=void 0;J@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,function(oe,pe,xe,Ce){var Ne=xe||Ce;return F[pe]=!Ne||Ne.toLowerCase(),""}),F["max-age"]){var J=parseInt(F["max-age"],10);isNaN(J)?delete F["max-age"]:F["max-age"]=J}return F}var N=null;function B(C){if(N==null){var F=C.navigator?C.navigator.userAgent:null;N=!!C.safari||!(!F||!(/\b(iPad|iPhone|iPod)\b/.test(F)||F.match("Safari")&&!F.match("Chrome")))}return N}function G(C){try{var F=self[C];return F.setItem("_mapbox_test_",1),F.removeItem("_mapbox_test_"),!0}catch{return!1}}var W,K,te,Y,Z=self.performance&&self.performance.now?self.performance.now.bind(self.performance):Date.now.bind(Date),re=self.requestAnimationFrame||self.mozRequestAnimationFrame||self.webkitRequestAnimationFrame||self.msRequestAnimationFrame,U=self.cancelAnimationFrame||self.mozCancelAnimationFrame||self.webkitCancelAnimationFrame||self.msCancelAnimationFrame,q={now:Z,frame:function(C){var F=re(C);return{cancel:function(){return U(F)}}},getImageData:function(C,F){F===void 0&&(F=0);var J=self.document.createElement("canvas"),oe=J.getContext("2d");if(!oe)throw new Error("failed to create canvas 2d context");return J.width=C.width,J.height=C.height,oe.drawImage(C,0,0,C.width,C.height),oe.getImageData(-F,-F,C.width+2*F,C.height+2*F)},resolveURL:function(C){return W||(W=self.document.createElement("a")),W.href=C,W.href},hardwareConcurrency:self.navigator.hardwareConcurrency||4,get devicePixelRatio(){return self.devicePixelRatio},get prefersReducedMotion(){return!!self.matchMedia&&(K==null&&(K=self.matchMedia("(prefers-reduced-motion: reduce)")),K.matches)}},$={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?this.API_URL.indexOf("https://api.mapbox.cn")===0?"https://events.mapbox.cn/events/v2":this.API_URL.indexOf("https://api.mapbox.com")===0?"https://events.mapbox.com/events/v2":null:null},FEEDBACK_URL:"https://apps.mapbox.com/feedback",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},ne={supported:!1,testSupport:function(C){H||!Y||(Q?ee(C):te=C)}},H=!1,Q=!1;function ee(C){var F=C.createTexture();C.bindTexture(C.TEXTURE_2D,F);try{if(C.texImage2D(C.TEXTURE_2D,0,C.RGBA,C.RGBA,C.UNSIGNED_BYTE,Y),C.isContextLost())return;ne.supported=!0}catch{}C.deleteTexture(F),H=!0}self.document&&((Y=self.document.createElement("img")).onload=function(){te&&ee(te),te=null,Q=!0},Y.onerror=function(){H=!0,te=null},Y.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var ie="01",ae=function(C,F){this._transformRequestFn=C,this._customAccessToken=F,this._createSkuToken()};function ue(C){return C.indexOf("mapbox:")===0}ae.prototype._createSkuToken=function(){var C=function(){for(var F="",J=0;J<10;J++)F+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return{token:["1",ie,F].join(""),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=C.token,this._skuTokenExpiresAt=C.tokenExpiresAt},ae.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},ae.prototype.transformRequest=function(C,F){return this._transformRequestFn&&this._transformRequestFn(C,F)||{url:C}},ae.prototype.normalizeStyleURL=function(C,F){if(!ue(C))return C;var J=me(C);return J.path="/styles/v1"+J.path,this._makeAPIURL(J,this._customAccessToken||F)},ae.prototype.normalizeGlyphsURL=function(C,F){if(!ue(C))return C;var J=me(C);return J.path="/fonts/v1"+J.path,this._makeAPIURL(J,this._customAccessToken||F)},ae.prototype.normalizeSourceURL=function(C,F){if(!ue(C))return C;var J=me(C);return J.path="/v4/"+J.authority+".json",J.params.push("secure"),this._makeAPIURL(J,this._customAccessToken||F)},ae.prototype.normalizeSpriteURL=function(C,F,J,oe){var pe=me(C);return ue(C)?(pe.path="/styles/v1"+pe.path+"/sprite"+F+J,this._makeAPIURL(pe,this._customAccessToken||oe)):(pe.path+=""+F+J,_e(pe))},ae.prototype.normalizeTileURL=function(C,F){if(this._isSkuTokenExpired()&&this._createSkuToken(),C&&!ue(C))return C;var J=me(C),oe=q.devicePixelRatio>=2||F===512?"@2x":"",pe=ne.supported?".webp":"$1";J.path=J.path.replace(/(\.(png|jpg)\d*)(?=$)/,""+oe+pe),J.path=J.path.replace(/^.+\/v4\//,"/"),J.path="/v4"+J.path;var xe=this._customAccessToken||function(Ce){for(var Ne=0,Ze=Ce;Ne=1&&self.localStorage.setItem(F,JSON.stringify(this.eventData))}catch{O("Unable to write to LocalStorage")}},Te.prototype.processRequests=function(C){},Te.prototype.postEvent=function(C,F,J,oe){var pe=this;if($.EVENTS_URL){var xe=me($.EVENTS_URL);xe.params.push("access_token="+(oe||$.ACCESS_TOKEN||""));var Ce={event:this.type,created:new Date(C).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:"1.10.1",skuId:ie,userId:this.anonId},Ne=F?x(Ce,F):Ce,Ze={url:_e(xe),headers:{"Content-Type":"text/plain"},body:JSON.stringify([Ne])};this.pendingRequest=Wt(Ze,function(ct){pe.pendingRequest=null,J(ct),pe.saveEventData(),pe.processRequests(oe)})}},Te.prototype.queueRequest=function(C,F){this.queue.push(C),this.processRequests(F)};var Oe,de,ye=function(C){function F(){C.call(this,"map.load"),this.success={},this.skuToken=""}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype.postMapLoadEvent=function(J,oe,pe,xe){this.skuToken=pe,($.EVENTS_URL&&xe||$.ACCESS_TOKEN&&Array.isArray(J)&&J.some(function(Ce){return ue(Ce)||ge(Ce)}))&&this.queueRequest({id:oe,timestamp:Date.now()},xe)},F.prototype.processRequests=function(J){var oe=this;if(!this.pendingRequest&&this.queue.length!==0){var pe=this.queue.shift(),xe=pe.id,Ce=pe.timestamp;xe&&this.success[xe]||(this.anonId||this.fetchEventData(),T(this.anonId)||(this.anonId=b()),this.postEvent(Ce,{skuToken:this.skuToken},function(Ne){Ne||xe&&(oe.success[xe]=!0)},J))}},F}(Te),Me=new(function(C){function F(J){C.call(this,"appUserTurnstile"),this._customAccessToken=J}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype.postTurnstileEvent=function(J,oe){$.EVENTS_URL&&$.ACCESS_TOKEN&&Array.isArray(J)&&J.some(function(pe){return ue(pe)||ge(pe)})&&this.queueRequest(Date.now(),oe)},F.prototype.processRequests=function(J){var oe=this;if(!this.pendingRequest&&this.queue.length!==0){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var pe=we($.ACCESS_TOKEN),xe=pe?pe.u:$.ACCESS_TOKEN,Ce=xe!==this.eventData.tokenU;T(this.anonId)||(this.anonId=b(),Ce=!0);var Ne=this.queue.shift();if(this.eventData.lastSuccess){var Ze=new Date(this.eventData.lastSuccess),ct=new Date(Ne),gt=(Ne-this.eventData.lastSuccess)/864e5;Ce=Ce||gt>=1||gt<-1||Ze.getDate()!==ct.getDate()}else Ce=!0;if(!Ce)return this.processRequests();this.postEvent(Ne,{"enabled.telemetry":!1},function(Bt){Bt||(oe.eventData.lastSuccess=Ne,oe.eventData.tokenU=xe)},J)}},F}(Te)),ke=Me.postTurnstileEvent.bind(Me),Ee=new ye,ze=Ee.postMapLoadEvent.bind(Ee),Fe=500,Ve=50;function Ke(){self.caches&&!Oe&&(Oe=self.caches.open("mapbox-tiles"))}function Re(C,F,J){if(Ke(),Oe){var oe={status:F.status,statusText:F.statusText,headers:new self.Headers};F.headers.forEach(function(xe,Ce){return oe.headers.set(Ce,xe)});var pe=P(F.headers.get("Cache-Control")||"");pe["no-store"]||(pe["max-age"]&&oe.headers.set("Expires",new Date(J+1e3*pe["max-age"]).toUTCString()),new Date(oe.headers.get("Expires")).getTime()-J<42e4||function(xe,Ce){if(de===void 0)try{new Response(new ReadableStream),de=!0}catch{de=!1}de?Ce(xe.body):xe.blob().then(Ce)}(F,function(xe){var Ce=new self.Response(xe,oe);Ke(),Oe&&Oe.then(function(Ne){return Ne.put(qe(C.url),Ce)}).catch(function(Ne){return O(Ne.message)})}))}}function qe(C){var F=C.indexOf("?");return F<0?C:C.slice(0,F)}function We(C,F){if(Ke(),!Oe)return F(null);var J=qe(C.url);Oe.then(function(oe){oe.match(J).then(function(pe){var xe=function(Ce){if(!Ce)return!1;var Ne=new Date(Ce.headers.get("Expires")||0),Ze=P(Ce.headers.get("Cache-Control")||"");return Ne>Date.now()&&!Ze["no-cache"]}(pe);oe.delete(J),xe&&oe.put(J,pe.clone()),F(null,pe,xe)}).catch(F)}).catch(F)}var Ye,nt=1/0;function ft(){return Ye==null&&(Ye=self.OffscreenCanvas&&new self.OffscreenCanvas(1,1).getContext("2d")&&typeof self.createImageBitmap=="function"),Ye}var vt={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};typeof Object.freeze=="function"&&Object.freeze(vt);var Pt=function(C){function F(J,oe,pe){oe===401&&ge(pe)&&(J+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),C.call(this,J),this.status=oe,this.url=pe,this.name=this.constructor.name,this.message=J}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},F}(Error),At=L()?function(){return self.worker&&self.worker.referrer}:function(){return(self.location.protocol==="blob:"?self.parent:self).location.href};function at(C,F){var J,oe=new self.AbortController,pe=new self.Request(C.url,{method:C.method||"GET",body:C.body,credentials:C.credentials,headers:C.headers,referrer:At(),signal:oe.signal}),xe=!1,Ce=!1,Ne=(J=pe.url).indexOf("sku=")>0&&ge(J);C.type==="json"&&pe.headers.set("Accept","application/json");var Ze=function(gt,Bt,Xt){if(!Ce){if(gt&>.message!=="SecurityError"&&O(gt),Bt&&Xt)return ct(Bt);var Gt=Date.now();self.fetch(pe).then(function(on){if(on.ok){var vn=Ne?on.clone():null;return ct(on,vn,Gt)}return F(new Pt(on.statusText,on.status,C.url))}).catch(function(on){on.code!==20&&F(new Error(on.message))})}},ct=function(gt,Bt,Xt){(C.type==="arrayBuffer"?gt.arrayBuffer():C.type==="json"?gt.json():gt.text()).then(function(Gt){Ce||(Bt&&Xt&&Re(pe,Bt,Xt),xe=!0,F(null,Gt,gt.headers.get("Cache-Control"),gt.headers.get("Expires")))}).catch(function(Gt){Ce||F(new Error(Gt.message))})};return Ne?We(pe,Ze):Ze(null,null),{cancel:function(){Ce=!0,xe||oe.abort()}}}var et=function(C,F){if(J=C.url,!(/^file:/.test(J)||/^file:/.test(At())&&!/^\w+:/.test(J))){if(self.fetch&&self.Request&&self.AbortController&&self.Request.prototype.hasOwnProperty("signal"))return at(C,F);if(L()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",C,F,void 0,!0)}var J;return function(oe,pe){var xe=new self.XMLHttpRequest;for(var Ce in xe.open(oe.method||"GET",oe.url,!0),oe.type==="arrayBuffer"&&(xe.responseType="arraybuffer"),oe.headers)xe.setRequestHeader(Ce,oe.headers[Ce]);return oe.type==="json"&&(xe.responseType="text",xe.setRequestHeader("Accept","application/json")),xe.withCredentials=oe.credentials==="include",xe.onerror=function(){pe(new Error(xe.statusText))},xe.onload=function(){if((xe.status>=200&&xe.status<300||xe.status===0)&&xe.response!==null){var Ne=xe.response;if(oe.type==="json")try{Ne=JSON.parse(xe.response)}catch(Ze){return pe(Ze)}pe(null,Ne,xe.getResponseHeader("Cache-Control"),xe.getResponseHeader("Expires"))}else pe(new Pt(xe.statusText,xe.status,oe.url))},xe.send(oe.body),{cancel:function(){return xe.abort()}}}(C,F)},Ot=function(C,F){return et(x(C,{type:"arrayBuffer"}),F)},Wt=function(C,F){return et(x(C,{method:"POST"}),F)},Jt,Be;Jt=[],Be=0;var Ge=function(C,F){if(ne.supported&&(C.headers||(C.headers={}),C.headers.accept="image/webp,*/*"),Be>=$.MAX_PARALLEL_IMAGE_REQUESTS){var J={requestParameters:C,callback:F,cancelled:!1,cancel:function(){this.cancelled=!0}};return Jt.push(J),J}Be++;var oe=!1,pe=function(){if(!oe)for(oe=!0,Be--;Jt.length&&Be<$.MAX_PARALLEL_IMAGE_REQUESTS;){var Ce=Jt.shift(),Ne=Ce.requestParameters,Ze=Ce.callback;Ce.cancelled||(Ce.cancel=Ge(Ne,Ze).cancel)}},xe=Ot(C,function(Ce,Ne,Ze,ct){pe(),Ce?F(Ce):Ne&&(ft()?function(gt,Bt){var Xt=new self.Blob([new Uint8Array(gt)],{type:"image/png"});self.createImageBitmap(Xt).then(function(Gt){Bt(null,Gt)}).catch(function(Gt){Bt(new Error("Could not load image because of "+Gt.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))})}(Ne,F):function(gt,Bt,Xt,Gt){var on=new self.Image,vn=self.URL;on.onload=function(){Bt(null,on),vn.revokeObjectURL(on.src)},on.onerror=function(){return Bt(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))};var Cn=new self.Blob([new Uint8Array(gt)],{type:"image/png"});on.cacheControl=Xt,on.expires=Gt,on.src=gt.byteLength?vn.createObjectURL(Cn):"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII="}(Ne,F,Ze,ct))});return{cancel:function(){xe.cancel(),pe()}}};function Tt(C,F,J){J[C]&&J[C].indexOf(F)!==-1||(J[C]=J[C]||[],J[C].push(F))}function dt(C,F,J){if(J&&J[C]){var oe=J[C].indexOf(F);oe!==-1&&J[C].splice(oe,1)}}var Pe=function(C,F){F===void 0&&(F={}),x(this,F),this.type=C},Ie=function(C){function F(J,oe){oe===void 0&&(oe={}),C.call(this,"error",x({error:J},oe))}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F}(Pe),Ae=function(){};Ae.prototype.on=function(C,F){return this._listeners=this._listeners||{},Tt(C,F,this._listeners),this},Ae.prototype.off=function(C,F){return dt(C,F,this._listeners),dt(C,F,this._oneTimeListeners),this},Ae.prototype.once=function(C,F){return this._oneTimeListeners=this._oneTimeListeners||{},Tt(C,F,this._oneTimeListeners),this},Ae.prototype.fire=function(C,F){typeof C=="string"&&(C=new Pe(C,F||{}));var J=C.type;if(this.listens(J)){C.target=this;for(var oe=0,pe=this._listeners&&this._listeners[J]?this._listeners[J].slice():[];oe0||this._oneTimeListeners&&this._oneTimeListeners[C]&&this._oneTimeListeners[C].length>0||this._eventedParent&&this._eventedParent.listens(C)},Ae.prototype.setEventedParent=function(C,F){return this._eventedParent=C,this._eventedParentData=F,this};var De={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},expression_name:{type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},in:{group:"Lookup"},"index-of":{group:"Lookup"},slice:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},image:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Zoom"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},distance:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},within:{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}},He=function(C,F,J,oe){this.message=(C?C+": ":"")+J,oe&&(this.identifier=oe),F!=null&&F.__line__&&(this.line=F.__line__)};function rt(C){var F=C.key,J=C.value;return J?[new He(F,J,"constants have been deprecated as of v8")]:[]}function lt(C){for(var F=[],J=arguments.length-1;J-- >0;)F[J]=arguments[J+1];for(var oe=0,pe=F;oe":C.itemType.kind==="value"?"array":"array<"+F+">"}return C.kind}var Kt=[Ut,tt,bt,zt,St,st,Dt,It(Le),Et];function Ht(C,F){if(F.kind==="error")return null;if(C.kind==="array"){if(F.kind==="array"&&(F.N===0&&F.itemType.kind==="value"||!Ht(C.itemType,F.itemType))&&(typeof C.N!="number"||C.N===F.N))return null}else{if(C.kind===F.kind)return null;if(C.kind==="value"){for(var J=0,oe=Kt;J255?255:Ze}function pe(Ze){return Ze<0?0:Ze>1?1:Ze}function xe(Ze){return Ze[Ze.length-1]==="%"?oe(parseFloat(Ze)/100*255):oe(parseInt(Ze))}function Ce(Ze){return Ze[Ze.length-1]==="%"?pe(parseFloat(Ze)/100):pe(parseFloat(Ze))}function Ne(Ze,ct,gt){return gt<0?gt+=1:gt>1&&(gt-=1),6*gt<1?Ze+(ct-Ze)*gt*6:2*gt<1?ct:3*gt<2?Ze+(ct-Ze)*(2/3-gt)*6:Ze}try{F.parseCSSColor=function(Ze){var ct,gt=Ze.replace(/ /g,"").toLowerCase();if(gt in J)return J[gt].slice();if(gt[0]==="#")return gt.length===4?(ct=parseInt(gt.substr(1),16))>=0&&ct<=4095?[(3840&ct)>>4|(3840&ct)>>8,240&ct|(240&ct)>>4,15&ct|(15&ct)<<4,1]:null:gt.length===7&&(ct=parseInt(gt.substr(1),16))>=0&&ct<=16777215?[(16711680&ct)>>16,(65280&ct)>>8,255&ct,1]:null;var Bt=gt.indexOf("("),Xt=gt.indexOf(")");if(Bt!==-1&&Xt+1===gt.length){var Gt=gt.substr(0,Bt),on=gt.substr(Bt+1,Xt-(Bt+1)).split(","),vn=1;switch(Gt){case"rgba":if(on.length!==4)return null;vn=Ce(on.pop());case"rgb":return on.length!==3?null:[xe(on[0]),xe(on[1]),xe(on[2]),vn];case"hsla":if(on.length!==4)return null;vn=Ce(on.pop());case"hsl":if(on.length!==3)return null;var Cn=(parseFloat(on[0])%360+360)%360/360,En=Ce(on[1]),Vn=Ce(on[2]),qn=Vn<=.5?Vn*(En+1):Vn+En-Vn*En,Xn=2*Vn-qn;return[oe(255*Ne(Xn,qn,Cn+1/3)),oe(255*Ne(Xn,qn,Cn)),oe(255*Ne(Xn,qn,Cn-1/3)),vn];default:return null}}return null}}catch{}}).parseCSSColor,tn=function(C,F,J,oe){oe===void 0&&(oe=1),this.r=C,this.g=F,this.b=J,this.a=oe};tn.parse=function(C){if(C){if(C instanceof tn)return C;if(typeof C=="string"){var F=pn(C);if(F)return new tn(F[0]/255*F[3],F[1]/255*F[3],F[2]/255*F[3],F[3])}}},tn.prototype.toString=function(){var C=this.toArray(),F=C[0],J=C[1],oe=C[2],pe=C[3];return"rgba("+Math.round(F)+","+Math.round(J)+","+Math.round(oe)+","+pe+")"},tn.prototype.toArray=function(){var C=this.r,F=this.g,J=this.b,oe=this.a;return oe===0?[0,0,0,0]:[255*C/oe,255*F/oe,255*J/oe,oe]},tn.black=new tn(0,0,0,1),tn.white=new tn(1,1,1,1),tn.transparent=new tn(0,0,0,0),tn.red=new tn(1,0,0,1);var nn=function(C,F,J){this.sensitivity=C?F?"variant":"case":F?"accent":"base",this.locale=J,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};nn.prototype.compare=function(C,F){return this.collator.compare(C,F)},nn.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var sn=function(C,F,J,oe,pe){this.text=C,this.image=F,this.scale=J,this.fontStack=oe,this.textColor=pe},gn=function(C){this.sections=C};gn.fromString=function(C){return new gn([new sn(C,null,null,null,null)])},gn.prototype.isEmpty=function(){return this.sections.length===0||!this.sections.some(function(C){return C.text.length!==0||C.image&&C.image.name.length!==0})},gn.factory=function(C){return C instanceof gn?C:gn.fromString(C)},gn.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(C){return C.text}).join("")},gn.prototype.serialize=function(){for(var C=["format"],F=0,J=this.sections;F=0&&C<=255&&typeof F=="number"&&F>=0&&F<=255&&typeof J=="number"&&J>=0&&J<=255?oe===void 0||typeof oe=="number"&&oe>=0&&oe<=1?null:"Invalid rgba value ["+[C,F,J,oe].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+(typeof oe=="number"?[C,F,J,oe]:[C,F,J]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function Hn(C){if(C===null||typeof C=="string"||typeof C=="boolean"||typeof C=="number"||C instanceof tn||C instanceof nn||C instanceof gn||C instanceof bn)return!0;if(Array.isArray(C)){for(var F=0,J=C;F2){var Ne=C[1];if(typeof Ne!="string"||!(Ne in Er)||Ne==="object")return F.error('The item type argument of "array" must be one of string, number, boolean',1);xe=Er[Ne],oe++}else xe=Le;if(C.length>3){if(C[2]!==null&&(typeof C[2]!="number"||C[2]<0||C[2]!==Math.floor(C[2])))return F.error('The length argument to "array" must be a positive integer literal',2);Ce=C[2],oe++}J=It(xe,Ce)}else J=Er[pe];for(var Ze=[];oe1)&&F.push(oe)}}return F.concat(this.args.map(function(pe){return pe.serialize()}))};var Ln=function(C){this.type=st,this.sections=C};Ln.parse=function(C,F){if(C.length<2)return F.error("Expected at least one argument.");var J=C[1];if(!Array.isArray(J)&&typeof J=="object")return F.error("First argument must be an image or text section.");for(var oe=[],pe=!1,xe=1;xe<=C.length-1;++xe){var Ce=C[xe];if(pe&&typeof Ce=="object"&&!Array.isArray(Ce)){pe=!1;var Ne=null;if(Ce["font-scale"]&&!(Ne=F.parse(Ce["font-scale"],1,tt)))return null;var Ze=null;if(Ce["text-font"]&&!(Ze=F.parse(Ce["text-font"],1,It(bt))))return null;var ct=null;if(Ce["text-color"]&&!(ct=F.parse(Ce["text-color"],1,St)))return null;var gt=oe[oe.length-1];gt.scale=Ne,gt.font=Ze,gt.textColor=ct}else{var Bt=F.parse(C[xe],1,Le);if(!Bt)return null;var Xt=Bt.type.kind;if(Xt!=="string"&&Xt!=="value"&&Xt!=="null"&&Xt!=="resolvedImage")return F.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");pe=!0,oe.push({content:Bt,scale:null,font:null,textColor:null})}}return new Ln(oe)},Ln.prototype.evaluate=function(C){return new gn(this.sections.map(function(F){var J=F.content.evaluate(C);return Wn(J)===Et?new sn("",J,null,null,null):new sn(ar(J),null,F.scale?F.scale.evaluate(C):null,F.font?F.font.evaluate(C).join(","):null,F.textColor?F.textColor.evaluate(C):null)}))},Ln.prototype.eachChild=function(C){for(var F=0,J=this.sections;F-1),J},lr.prototype.eachChild=function(C){C(this.input)},lr.prototype.outputDefined=function(){return!1},lr.prototype.serialize=function(){return["image",this.input.serialize()]};var Wr={"to-boolean":zt,"to-color":St,"to-number":tt,"to-string":bt},Mn=function(C,F){this.type=C,this.args=F};Mn.parse=function(C,F){if(C.length<2)return F.error("Expected at least one argument.");var J=C[0];if((J==="to-boolean"||J==="to-string")&&C.length!==2)return F.error("Expected one argument.");for(var oe=Wr[J],pe=[],xe=1;xe4?"Invalid rbga value "+JSON.stringify(F)+": expected an array containing either three or four numeric values.":In(F[0],F[1],F[2],F[3])))return new tn(F[0]/255,F[1]/255,F[2]/255,F[3])}throw new vr(J||"Could not parse color from value '"+(typeof F=="string"?F:String(JSON.stringify(F)))+"'")}if(this.type.kind==="number"){for(var Ce=null,Ne=0,Ze=this.args;Ne=F[2])&&!(C[1]<=F[1])&&!(C[3]>=F[3])}function qr(C,F){var J,oe=(180+C[0])/360,pe=(J=C[1],(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+J*Math.PI/360)))/360),xe=Math.pow(2,F.z);return[Math.round(oe*xe*8192),Math.round(pe*xe*8192)]}function _i(C,F,J){return F[1]>C[1]!=J[1]>C[1]&&C[0]<(J[0]-F[0])*(C[1]-F[1])/(J[1]-F[1])+F[0]}function cn(C,F){for(var J,oe,pe,xe,Ce,Ne,Ze,ct=!1,gt=0,Bt=F.length;gt0&&Bt<0||gt<0&&Bt>0}function fn(C,F,J){for(var oe=0,pe=J;oeJ[2]){var pe=.5*oe,xe=C[0]-J[0]>pe?-oe:J[0]-C[0]>pe?oe:0;xe===0&&(xe=C[0]-J[2]>pe?-oe:J[2]-C[0]>pe?oe:0),C[0]+=xe}$r(F,C)}function wn(C,F,J,oe){for(var pe=8192*Math.pow(2,oe.z),xe=[8192*oe.x,8192*oe.y],Ce=[],Ne=0,Ze=C;Ne=0)return!1;var J=!0;return C.eachChild(function(oe){J&&!Yn(oe,F)&&(J=!1)}),J}Tn.parse=function(C,F){if(C.length!==2)return F.error("'within' expression requires exactly one argument, but found "+(C.length-1)+" instead.");if(Hn(C[1])){var J=C[1];if(J.type==="FeatureCollection")for(var oe=0;oeF))throw new vr("Input is not a number.");Ce=Ne-1}return 0}or.prototype.parse=function(C,F,J,oe,pe){return pe===void 0&&(pe={}),F?this.concat(F,J,oe)._parse(C,pe):this._parse(C,pe)},or.prototype._parse=function(C,F){function J(ct,gt,Bt){return Bt==="assert"?new Kn(gt,[ct]):Bt==="coerce"?new Mn(gt,[ct]):ct}if(C!==null&&typeof C!="string"&&typeof C!="boolean"&&typeof C!="number"||(C=["literal",C]),Array.isArray(C)){if(C.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var oe=C[0];if(typeof oe!="string")return this.error("Expression name must be a string, but found "+typeof oe+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var pe=this.registry[oe];if(pe){var xe=pe.parse(C,this);if(!xe)return null;if(this.expectedType){var Ce=this.expectedType,Ne=xe.type;if(Ce.kind!=="string"&&Ce.kind!=="number"&&Ce.kind!=="boolean"&&Ce.kind!=="object"&&Ce.kind!=="array"||Ne.kind!=="value")if(Ce.kind!=="color"&&Ce.kind!=="formatted"&&Ce.kind!=="resolvedImage"||Ne.kind!=="value"&&Ne.kind!=="string"){if(this.checkSubtype(Ce,Ne))return null}else xe=J(xe,Ce,F.typeAnnotation||"coerce");else xe=J(xe,Ce,F.typeAnnotation||"assert")}if(!(xe instanceof Or)&&xe.type.kind!=="resolvedImage"&&function ct(gt){if(gt instanceof ir)return ct(gt.boundExpression);if(gt instanceof Bn&>.name==="error"||gt instanceof Fr||gt instanceof Tn)return!1;var Bt=gt instanceof Mn||gt instanceof Kn,Xt=!0;return gt.eachChild(function(Gt){Xt=Bt?Xt&&ct(Gt):Xt&&Gt instanceof Or}),Xt?Dn(gt)&&Yn(gt,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"]):!1}(xe)){var Ze=new nr;try{xe=new Or(xe.type,xe.evaluate(Ze))}catch(ct){return this.error(ct.message),null}}return xe}return this.error('Unknown expression "'+oe+'". If you wanted a literal array, use ["literal", [...]].',0)}return C===void 0?this.error("'undefined' value invalid. Use null instead."):typeof C=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof C+" instead.")},or.prototype.concat=function(C,F,J){var oe=typeof C=="number"?this.path.concat(C):this.path,pe=J?this.scope.concat(J):this.scope;return new or(this.registry,oe,F||null,pe,this.errors)},or.prototype.error=function(C){for(var F=[],J=arguments.length-1;J-- >0;)F[J]=arguments[J+1];var oe=""+this.key+F.map(function(pe){return"["+pe+"]"}).join("");this.errors.push(new wt(oe,C))},or.prototype.checkSubtype=function(C,F){var J=Ht(C,F);return J&&this.error(J),J};var wr=function(C,F,J){this.type=C,this.input=F,this.labels=[],this.outputs=[];for(var oe=0,pe=J;oe=Ce)return F.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',Ze);var gt=F.parse(Ne,ct,pe);if(!gt)return null;pe=pe||gt.type,oe.push([Ce,gt])}return new wr(pe,J,oe)},wr.prototype.evaluate=function(C){var F=this.labels,J=this.outputs;if(F.length===1)return J[0].evaluate(C);var oe=this.input.evaluate(C);if(oe<=F[0])return J[0].evaluate(C);var pe=F.length;return oe>=F[pe-1]?J[pe-1].evaluate(C):J[xr(F,oe)].evaluate(C)},wr.prototype.eachChild=function(C){C(this.input);for(var F=0,J=this.outputs;F0&&C.push(this.labels[F]),C.push(this.outputs[F].serialize());return C};var Dr=Object.freeze({__proto__:null,number:kr,color:function(C,F,J){return new tn(kr(C.r,F.r,J),kr(C.g,F.g,J),kr(C.b,F.b,J),kr(C.a,F.a,J))},array:function(C,F,J){return C.map(function(oe,pe){return kr(oe,F[pe],J)})}}),Nr=6/29,ri=3*Nr*Nr,ji=Math.PI/180,Bi=180/Math.PI;function Sr(C){return C>.008856451679035631?Math.pow(C,1/3):C/ri+4/29}function ui(C){return C>Nr?C*C*C:ri*(C-4/29)}function si(C){return 255*(C<=.0031308?12.92*C:1.055*Math.pow(C,1/2.4)-.055)}function ta(C){return(C/=255)<=.04045?C/12.92:Math.pow((C+.055)/1.055,2.4)}function Ja(C){var F=ta(C.r),J=ta(C.g),oe=ta(C.b),pe=Sr((.4124564*F+.3575761*J+.1804375*oe)/.95047),xe=Sr((.2126729*F+.7151522*J+.072175*oe)/1);return{l:116*xe-16,a:500*(pe-xe),b:200*(xe-Sr((.0193339*F+.119192*J+.9503041*oe)/1.08883)),alpha:C.a}}function Ao(C){var F=(C.l+16)/116,J=isNaN(C.a)?F:F+C.a/500,oe=isNaN(C.b)?F:F-C.b/200;return F=1*ui(F),J=.95047*ui(J),oe=1.08883*ui(oe),new tn(si(3.2404542*J-1.5371385*F-.4985314*oe),si(-.969266*J+1.8760108*F+.041556*oe),si(.0556434*J-.2040259*F+1.0572252*oe),C.alpha)}function fs(C,F,J){var oe=F-C;return C+J*(oe>180||oe<-180?oe-360*Math.round(oe/360):oe)}var ya={forward:Ja,reverse:Ao,interpolate:function(C,F,J){return{l:kr(C.l,F.l,J),a:kr(C.a,F.a,J),b:kr(C.b,F.b,J),alpha:kr(C.alpha,F.alpha,J)}}},xa={forward:function(C){var F=Ja(C),J=F.l,oe=F.a,pe=F.b,xe=Math.atan2(pe,oe)*Bi;return{h:xe<0?xe+360:xe,c:Math.sqrt(oe*oe+pe*pe),l:J,alpha:C.a}},reverse:function(C){var F=C.h*ji,J=C.c;return Ao({l:C.l,a:Math.cos(F)*J,b:Math.sin(F)*J,alpha:C.alpha})},interpolate:function(C,F,J){return{h:fs(C.h,F.h,J),c:kr(C.c,F.c,J),l:kr(C.l,F.l,J),alpha:kr(C.alpha,F.alpha,J)}}},Zo=Object.freeze({__proto__:null,lab:ya,hcl:xa}),oa=function(C,F,J,oe,pe){this.type=C,this.operator=F,this.interpolation=J,this.input=oe,this.labels=[],this.outputs=[];for(var xe=0,Ce=pe;xe1}))return F.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);oe={name:"cubic-bezier",controlPoints:Ne}}if(C.length-1<4)return F.error("Expected at least 4 arguments, but found only "+(C.length-1)+".");if((C.length-1)%2!=0)return F.error("Expected an even number of arguments.");if(!(pe=F.parse(pe,2,tt)))return null;var Ze=[],ct=null;J==="interpolate-hcl"||J==="interpolate-lab"?ct=St:F.expectedType&&F.expectedType.kind!=="value"&&(ct=F.expectedType);for(var gt=0;gt=Bt)return F.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',Gt);var vn=F.parse(Xt,on,ct);if(!vn)return null;ct=ct||vn.type,Ze.push([Bt,vn])}return ct.kind==="number"||ct.kind==="color"||ct.kind==="array"&&ct.itemType.kind==="number"&&typeof ct.N=="number"?new oa(ct,J,oe,pe,Ze):F.error("Type "+Zt(ct)+" is not interpolatable.")},oa.prototype.evaluate=function(C){var F=this.labels,J=this.outputs;if(F.length===1)return J[0].evaluate(C);var oe=this.input.evaluate(C);if(oe<=F[0])return J[0].evaluate(C);var pe=F.length;if(oe>=F[pe-1])return J[pe-1].evaluate(C);var xe=xr(F,oe),Ce=F[xe],Ne=F[xe+1],Ze=oa.interpolationFactor(this.interpolation,oe,Ce,Ne),ct=J[xe].evaluate(C),gt=J[xe+1].evaluate(C);return this.operator==="interpolate"?Dr[this.type.kind.toLowerCase()](ct,gt,Ze):this.operator==="interpolate-hcl"?xa.reverse(xa.interpolate(xa.forward(ct),xa.forward(gt),Ze)):ya.reverse(ya.interpolate(ya.forward(ct),ya.forward(gt),Ze))},oa.prototype.eachChild=function(C){C(this.input);for(var F=0,J=this.outputs;F=J.length)throw new vr("Array index out of bounds: "+F+" > "+(J.length-1)+".");if(F!==Math.floor(F))throw new vr("Array index must be an integer, but found "+F+" instead.");return J[F]},Jo.prototype.eachChild=function(C){C(this.index),C(this.input)},Jo.prototype.outputDefined=function(){return!1},Jo.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var _s=function(C,F){this.type=zt,this.needle=C,this.haystack=F};_s.parse=function(C,F){if(C.length!==3)return F.error("Expected 2 arguments, but found "+(C.length-1)+" instead.");var J=F.parse(C[1],1,Le),oe=F.parse(C[2],2,Le);return J&&oe?mn(J.type,[zt,bt,tt,Ut,Le])?new _s(J,oe):F.error("Expected first argument to be of type boolean, string, number or null, but found "+Zt(J.type)+" instead"):null},_s.prototype.evaluate=function(C){var F=this.needle.evaluate(C),J=this.haystack.evaluate(C);if(!J)return!1;if(!zn(F,["boolean","string","number","null"]))throw new vr("Expected first argument to be of type boolean, string, number or null, but found "+Zt(Wn(F))+" instead.");if(!zn(J,["string","array"]))throw new vr("Expected second argument to be of type array or string, but found "+Zt(Wn(J))+" instead.");return J.indexOf(F)>=0},_s.prototype.eachChild=function(C){C(this.needle),C(this.haystack)},_s.prototype.outputDefined=function(){return!0},_s.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var Ls=function(C,F,J){this.type=tt,this.needle=C,this.haystack=F,this.fromIndex=J};Ls.parse=function(C,F){if(C.length<=2||C.length>=5)return F.error("Expected 3 or 4 arguments, but found "+(C.length-1)+" instead.");var J=F.parse(C[1],1,Le),oe=F.parse(C[2],2,Le);if(!J||!oe)return null;if(!mn(J.type,[zt,bt,tt,Ut,Le]))return F.error("Expected first argument to be of type boolean, string, number or null, but found "+Zt(J.type)+" instead");if(C.length===4){var pe=F.parse(C[3],3,tt);return pe?new Ls(J,oe,pe):null}return new Ls(J,oe)},Ls.prototype.evaluate=function(C){var F=this.needle.evaluate(C),J=this.haystack.evaluate(C);if(!zn(F,["boolean","string","number","null"]))throw new vr("Expected first argument to be of type boolean, string, number or null, but found "+Zt(Wn(F))+" instead.");if(!zn(J,["string","array"]))throw new vr("Expected second argument to be of type array or string, but found "+Zt(Wn(J))+" instead.");if(this.fromIndex){var oe=this.fromIndex.evaluate(C);return J.indexOf(F,oe)}return J.indexOf(F)},Ls.prototype.eachChild=function(C){C(this.needle),C(this.haystack),this.fromIndex&&C(this.fromIndex)},Ls.prototype.outputDefined=function(){return!1},Ls.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var C=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),C]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var Oo=function(C,F,J,oe,pe,xe){this.inputType=C,this.type=F,this.input=J,this.cases=oe,this.outputs=pe,this.otherwise=xe};Oo.parse=function(C,F){if(C.length<5)return F.error("Expected at least 4 arguments, but found only "+(C.length-1)+".");if(C.length%2!=1)return F.error("Expected an even number of arguments.");var J,oe;F.expectedType&&F.expectedType.kind!=="value"&&(oe=F.expectedType);for(var pe={},xe=[],Ce=2;CeNumber.MAX_SAFE_INTEGER)return ct.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof Xt=="number"&&Math.floor(Xt)!==Xt)return ct.error("Numeric branch labels must be integer values.");if(J){if(ct.checkSubtype(J,Wn(Xt)))return null}else J=Wn(Xt);if(pe[String(Xt)]!==void 0)return ct.error("Branch labels must be unique.");pe[String(Xt)]=xe.length}var Gt=F.parse(Ze,Ce,oe);if(!Gt)return null;oe=oe||Gt.type,xe.push(Gt)}var on=F.parse(C[1],1,Le);if(!on)return null;var vn=F.parse(C[C.length-1],C.length-1,oe);return vn?on.type.kind!=="value"&&F.concat(1).checkSubtype(J,on.type)?null:new Oo(J,oe,on,pe,xe,vn):null},Oo.prototype.evaluate=function(C){var F=this.input.evaluate(C);return(Wn(F)===this.inputType&&this.outputs[this.cases[F]]||this.otherwise).evaluate(C)},Oo.prototype.eachChild=function(C){C(this.input),this.outputs.forEach(C),C(this.otherwise)},Oo.prototype.outputDefined=function(){return this.outputs.every(function(C){return C.outputDefined()})&&this.otherwise.outputDefined()},Oo.prototype.serialize=function(){for(var C=this,F=["match",this.input.serialize()],J=[],oe={},pe=0,xe=Object.keys(this.cases).sort();pe=5)return F.error("Expected 3 or 4 arguments, but found "+(C.length-1)+" instead.");var J=F.parse(C[1],1,Le),oe=F.parse(C[2],2,tt);if(!J||!oe)return null;if(!mn(J.type,[It(Le),bt,Le]))return F.error("Expected first argument to be of type array or string, but found "+Zt(J.type)+" instead");if(C.length===4){var pe=F.parse(C[3],3,tt);return pe?new $o(J.type,J,oe,pe):null}return new $o(J.type,J,oe)},$o.prototype.evaluate=function(C){var F=this.input.evaluate(C),J=this.beginIndex.evaluate(C);if(!zn(F,["string","array"]))throw new vr("Expected first argument to be of type array or string, but found "+Zt(Wn(F))+" instead.");if(this.endIndex){var oe=this.endIndex.evaluate(C);return F.slice(J,oe)}return F.slice(J)},$o.prototype.eachChild=function(C){C(this.input),C(this.beginIndex),this.endIndex&&C(this.endIndex)},$o.prototype.outputDefined=function(){return!1},$o.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var C=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),C]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};var ju=ba("==",function(C,F,J){return F===J},Mc),Wl=ba("!=",function(C,F,J){return F!==J},function(C,F,J,oe){return!Mc(0,F,J,oe)}),Sc=ba("<",function(C,F,J){return F",function(C,F,J){return F>J},function(C,F,J,oe){return oe.compare(F,J)>0}),ac=ba("<=",function(C,F,J){return F<=J},function(C,F,J,oe){return oe.compare(F,J)<=0}),Cc=ba(">=",function(C,F,J){return F>=J},function(C,F,J,oe){return oe.compare(F,J)>=0}),Ns=function(C,F,J,oe,pe){this.type=bt,this.number=C,this.locale=F,this.currency=J,this.minFractionDigits=oe,this.maxFractionDigits=pe};Ns.parse=function(C,F){if(C.length!==3)return F.error("Expected two arguments.");var J=F.parse(C[1],1,tt);if(!J)return null;var oe=C[2];if(typeof oe!="object"||Array.isArray(oe))return F.error("NumberFormat options argument must be an object.");var pe=null;if(oe.locale&&!(pe=F.parse(oe.locale,1,bt)))return null;var xe=null;if(oe.currency&&!(xe=F.parse(oe.currency,1,bt)))return null;var Ce=null;if(oe["min-fraction-digits"]&&!(Ce=F.parse(oe["min-fraction-digits"],1,tt)))return null;var Ne=null;return oe["max-fraction-digits"]&&!(Ne=F.parse(oe["max-fraction-digits"],1,tt))?null:new Ns(J,pe,xe,Ce,Ne)},Ns.prototype.evaluate=function(C){return new Intl.NumberFormat(this.locale?this.locale.evaluate(C):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(C):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(C):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(C):void 0}).format(this.number.evaluate(C))},Ns.prototype.eachChild=function(C){C(this.number),this.locale&&C(this.locale),this.currency&&C(this.currency),this.minFractionDigits&&C(this.minFractionDigits),this.maxFractionDigits&&C(this.maxFractionDigits)},Ns.prototype.outputDefined=function(){return!1},Ns.prototype.serialize=function(){var C={};return this.locale&&(C.locale=this.locale.serialize()),this.currency&&(C.currency=this.currency.serialize()),this.minFractionDigits&&(C["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(C["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),C]};var Bs=function(C){this.type=tt,this.input=C};Bs.parse=function(C,F){if(C.length!==2)return F.error("Expected 1 argument, but found "+(C.length-1)+" instead.");var J=F.parse(C[1],1);return J?J.type.kind!=="array"&&J.type.kind!=="string"&&J.type.kind!=="value"?F.error("Expected argument of type string or array, but found "+Zt(J.type)+" instead."):new Bs(J):null},Bs.prototype.evaluate=function(C){var F=this.input.evaluate(C);if(typeof F=="string"||Array.isArray(F))return F.length;throw new vr("Expected value to be of type string or array, but found "+Zt(Wn(F))+" instead.")},Bs.prototype.eachChild=function(C){C(this.input)},Bs.prototype.outputDefined=function(){return!1},Bs.prototype.serialize=function(){var C=["length"];return this.eachChild(function(F){C.push(F.serialize())}),C};var fl={"==":ju,"!=":Wl,">":Ec,"<":Sc,">=":Cc,"<=":ac,array:Kn,at:Jo,boolean:Kn,case:Ka,coalesce:bs,collator:Fr,format:Ln,image:lr,in:_s,"index-of":Ls,interpolate:oa,"interpolate-hcl":oa,"interpolate-lab":oa,length:Bs,let:so,literal:Or,match:Oo,number:Kn,"number-format":Ns,object:Kn,slice:$o,step:wr,string:Kn,"to-boolean":Mn,"to-color":Mn,"to-number":Mn,"to-string":Mn,var:ir,within:Tn};function hl(C,F){var J=F[0],oe=F[1],pe=F[2],xe=F[3];J=J.evaluate(C),oe=oe.evaluate(C),pe=pe.evaluate(C);var Ce=xe?xe.evaluate(C):1,Ne=In(J,oe,pe,Ce);if(Ne)throw new vr(Ne);return new tn(J/255*Ce,oe/255*Ce,pe/255*Ce,Ce)}function dl(C,F){return C in F}function Yl(C,F){var J=F[C];return J===void 0?null:J}function ws(C){return{type:C}}function Uu(C){return{result:"success",value:C}}function ds(C){return{result:"error",value:C}}function pl(C){return C["property-type"]==="data-driven"||C["property-type"]==="cross-faded-data-driven"}function Vu(C){return!!C.expression&&C.expression.parameters.indexOf("zoom")>-1}function js(C){return!!C.expression&&C.expression.interpolated}function ma(C){return C instanceof Number?"number":C instanceof String?"string":C instanceof Boolean?"boolean":Array.isArray(C)?"array":C===null?"null":typeof C}function je(C){return typeof C=="object"&&C!==null&&!Array.isArray(C)}function $e(C){return C}function Qe(C,F,J){return C!==void 0?C:F!==void 0?F:J!==void 0?J:void 0}function ut(C,F,J,oe,pe){return Qe(typeof J===pe?oe[J]:void 0,C.default,F.default)}function mt(C,F,J){if(ma(J)!=="number")return Qe(C.default,F.default);var oe=C.stops.length;if(oe===1||J<=C.stops[0][0])return C.stops[0][1];if(J>=C.stops[oe-1][0])return C.stops[oe-1][1];var pe=xr(C.stops.map(function(xe){return xe[0]}),J);return C.stops[pe][1]}function pt(C,F,J){var oe=C.base!==void 0?C.base:1;if(ma(J)!=="number")return Qe(C.default,F.default);var pe=C.stops.length;if(pe===1||J<=C.stops[0][0])return C.stops[0][1];if(J>=C.stops[pe-1][0])return C.stops[pe-1][1];var xe=xr(C.stops.map(function(Bt){return Bt[0]}),J),Ce=function(Bt,Xt,Gt,on){var vn=on-Gt,Cn=Bt-Gt;return vn===0?0:Xt===1?Cn/vn:(Math.pow(Xt,Cn)-1)/(Math.pow(Xt,vn)-1)}(J,oe,C.stops[xe][0],C.stops[xe+1][0]),Ne=C.stops[xe][1],Ze=C.stops[xe+1][1],ct=Dr[F.type]||$e;if(C.colorSpace&&C.colorSpace!=="rgb"){var gt=Zo[C.colorSpace];ct=function(Bt,Xt){return gt.reverse(gt.interpolate(gt.forward(Bt),gt.forward(Xt),Ce))}}return typeof Ne.evaluate=="function"?{evaluate:function(){for(var Bt=[],Xt=arguments.length;Xt--;)Bt[Xt]=arguments[Xt];var Gt=Ne.evaluate.apply(void 0,Bt),on=Ze.evaluate.apply(void 0,Bt);if(Gt!==void 0&&on!==void 0)return ct(Gt,on,Ce)}}:ct(Ne,Ze,Ce)}function Ct(C,F,J){return F.type==="color"?J=tn.parse(J):F.type==="formatted"?J=gn.fromString(J.toString()):F.type==="resolvedImage"?J=bn.fromString(J.toString()):ma(J)===F.type||F.type==="enum"&&F.values[J]||(J=void 0),Qe(J,C.default,F.default)}Bn.register(fl,{error:[{kind:"error"},[bt],function(C,F){var J=F[0];throw new vr(J.evaluate(C))}],typeof:[bt,[Le],function(C,F){return Zt(Wn(F[0].evaluate(C)))}],"to-rgba":[It(tt,4),[St],function(C,F){return F[0].evaluate(C).toArray()}],rgb:[St,[tt,tt,tt],hl],rgba:[St,[tt,tt,tt,tt],hl],has:{type:zt,overloads:[[[bt],function(C,F){return dl(F[0].evaluate(C),C.properties())}],[[bt,Dt],function(C,F){var J=F[0],oe=F[1];return dl(J.evaluate(C),oe.evaluate(C))}]]},get:{type:Le,overloads:[[[bt],function(C,F){return Yl(F[0].evaluate(C),C.properties())}],[[bt,Dt],function(C,F){var J=F[0],oe=F[1];return Yl(J.evaluate(C),oe.evaluate(C))}]]},"feature-state":[Le,[bt],function(C,F){return Yl(F[0].evaluate(C),C.featureState||{})}],properties:[Dt,[],function(C){return C.properties()}],"geometry-type":[bt,[],function(C){return C.geometryType()}],id:[Le,[],function(C){return C.id()}],zoom:[tt,[],function(C){return C.globals.zoom}],"heatmap-density":[tt,[],function(C){return C.globals.heatmapDensity||0}],"line-progress":[tt,[],function(C){return C.globals.lineProgress||0}],accumulated:[Le,[],function(C){return C.globals.accumulated===void 0?null:C.globals.accumulated}],"+":[tt,ws(tt),function(C,F){for(var J=0,oe=0,pe=F;oe":[zt,[bt,Le],function(C,F){var J=F[0],oe=F[1],pe=C.properties()[J.value],xe=oe.value;return typeof pe==typeof xe&&pe>xe}],"filter-id->":[zt,[Le],function(C,F){var J=F[0],oe=C.id(),pe=J.value;return typeof oe==typeof pe&&oe>pe}],"filter-<=":[zt,[bt,Le],function(C,F){var J=F[0],oe=F[1],pe=C.properties()[J.value],xe=oe.value;return typeof pe==typeof xe&&pe<=xe}],"filter-id-<=":[zt,[Le],function(C,F){var J=F[0],oe=C.id(),pe=J.value;return typeof oe==typeof pe&&oe<=pe}],"filter->=":[zt,[bt,Le],function(C,F){var J=F[0],oe=F[1],pe=C.properties()[J.value],xe=oe.value;return typeof pe==typeof xe&&pe>=xe}],"filter-id->=":[zt,[Le],function(C,F){var J=F[0],oe=C.id(),pe=J.value;return typeof oe==typeof pe&&oe>=pe}],"filter-has":[zt,[Le],function(C,F){return F[0].value in C.properties()}],"filter-has-id":[zt,[],function(C){return C.id()!==null&&C.id()!==void 0}],"filter-type-in":[zt,[It(bt)],function(C,F){return F[0].value.indexOf(C.geometryType())>=0}],"filter-id-in":[zt,[It(Le)],function(C,F){return F[0].value.indexOf(C.id())>=0}],"filter-in-small":[zt,[bt,It(Le)],function(C,F){var J=F[0];return F[1].value.indexOf(C.properties()[J.value])>=0}],"filter-in-large":[zt,[bt,It(Le)],function(C,F){var J=F[0],oe=F[1];return function(pe,xe,Ce,Ne){for(;Ce<=Ne;){var Ze=Ce+Ne>>1;if(xe[Ze]===pe)return!0;xe[Ze]>pe?Ne=Ze-1:Ce=Ze+1}return!1}(C.properties()[J.value],oe.value,0,oe.value.length-1)}],all:{type:zt,overloads:[[[zt,zt],function(C,F){var J=F[0],oe=F[1];return J.evaluate(C)&&oe.evaluate(C)}],[ws(zt),function(C,F){for(var J=0,oe=F;J0&&typeof C[0]=="string"&&C[0]in fl}function Yt(C,F){var J=new or(fl,[],F?function(pe){var xe={color:St,string:bt,number:tt,enum:bt,boolean:zt,formatted:st,resolvedImage:Et};return pe.type==="array"?It(xe[pe.value]||Le,pe.length):xe[pe.type]}(F):void 0),oe=J.parse(C,void 0,void 0,void 0,F&&F.type==="string"?{typeAnnotation:"coerce"}:void 0);return oe?Uu(new Qt(oe,F)):ds(J.errors)}Qt.prototype.evaluateWithoutErrorHandling=function(C,F,J,oe,pe,xe){return this._evaluator.globals=C,this._evaluator.feature=F,this._evaluator.featureState=J,this._evaluator.canonical=oe,this._evaluator.availableImages=pe||null,this._evaluator.formattedSection=xe,this.expression.evaluate(this._evaluator)},Qt.prototype.evaluate=function(C,F,J,oe,pe,xe){this._evaluator.globals=C,this._evaluator.feature=F||null,this._evaluator.featureState=J||null,this._evaluator.canonical=oe,this._evaluator.availableImages=pe||null,this._evaluator.formattedSection=xe||null;try{var Ce=this.expression.evaluate(this._evaluator);if(Ce==null||typeof Ce=="number"&&Ce!=Ce)return this._defaultValue;if(this._enumValues&&!(Ce in this._enumValues))throw new vr("Expected value to be one of "+Object.keys(this._enumValues).map(function(Ne){return JSON.stringify(Ne)}).join(", ")+", but found "+JSON.stringify(Ce)+" instead.");return Ce}catch(Ne){return this._warningHistory[Ne.message]||(this._warningHistory[Ne.message]=!0,typeof console<"u"&&console.warn(Ne.message)),this._defaultValue}};var an=function(C,F){this.kind=C,this._styleExpression=F,this.isStateDependent=C!=="constant"&&!Zn(F.expression)};an.prototype.evaluateWithoutErrorHandling=function(C,F,J,oe,pe,xe){return this._styleExpression.evaluateWithoutErrorHandling(C,F,J,oe,pe,xe)},an.prototype.evaluate=function(C,F,J,oe,pe,xe){return this._styleExpression.evaluate(C,F,J,oe,pe,xe)};var hn=function(C,F,J,oe){this.kind=C,this.zoomStops=J,this._styleExpression=F,this.isStateDependent=C!=="camera"&&!Zn(F.expression),this.interpolationType=oe};function xn(C,F){if((C=Yt(C,F)).result==="error")return C;var J=C.value.expression,oe=Dn(J);if(!oe&&!pl(F))return ds([new wt("","data expressions not supported")]);var pe=Yn(J,["zoom"]);if(!pe&&!Vu(F))return ds([new wt("","zoom expressions not supported")]);var xe=function Ne(Ze){var ct=null;if(Ze instanceof so)ct=Ne(Ze.result);else if(Ze instanceof bs)for(var gt=0,Bt=Ze.args;gtoe.maximum?[new He(F,J,J+" is greater than the maximum value "+oe.maximum)]:[]}function zr(C){var F,J,oe,pe=C.valueSpec,xe=ot(C.value.type),Ce={},Ne=xe!=="categorical"&&C.value.property===void 0,Ze=!Ne,ct=ma(C.value.stops)==="array"&&ma(C.value.stops[0])==="array"&&ma(C.value.stops[0][0])==="object",gt=Pn({key:C.key,value:C.value,valueSpec:C.styleSpec.function,style:C.style,styleSpec:C.styleSpec,objectElementValidators:{stops:function(Gt){if(xe==="identity")return[new He(Gt.key,Gt.value,'identity function may not have a "stops" property')];var on=[],vn=Gt.value;return on=on.concat(sr({key:Gt.key,value:vn,valueSpec:Gt.valueSpec,style:Gt.style,styleSpec:Gt.styleSpec,arrayElementValidator:Bt})),ma(vn)==="array"&&vn.length===0&&on.push(new He(Gt.key,vn,"array must have at least one stop")),on},default:function(Gt){return ln({key:Gt.key,value:Gt.value,valueSpec:pe,style:Gt.style,styleSpec:Gt.styleSpec})}}});return xe==="identity"&&Ne&>.push(new He(C.key,C.value,'missing required property "property"')),xe==="identity"||C.value.stops||gt.push(new He(C.key,C.value,'missing required property "stops"')),xe==="exponential"&&C.valueSpec.expression&&!js(C.valueSpec)&>.push(new He(C.key,C.value,"exponential functions not supported")),C.styleSpec.$version>=8&&(Ze&&!pl(C.valueSpec)?gt.push(new He(C.key,C.value,"property functions not supported")):Ne&&!Vu(C.valueSpec)&>.push(new He(C.key,C.value,"zoom functions not supported"))),xe!=="categorical"&&!ct||C.value.property!==void 0||gt.push(new He(C.key,C.value,'"property" property is required')),gt;function Bt(Gt){var on=[],vn=Gt.value,Cn=Gt.key;if(ma(vn)!=="array")return[new He(Cn,vn,"array expected, "+ma(vn)+" found")];if(vn.length!==2)return[new He(Cn,vn,"array length 2 expected, length "+vn.length+" found")];if(ct){if(ma(vn[0])!=="object")return[new He(Cn,vn,"object expected, "+ma(vn[0])+" found")];if(vn[0].zoom===void 0)return[new He(Cn,vn,"object stop key must have zoom")];if(vn[0].value===void 0)return[new He(Cn,vn,"object stop key must have value")];if(oe&&oe>ot(vn[0].zoom))return[new He(Cn,vn[0].zoom,"stop zoom values must appear in ascending order")];ot(vn[0].zoom)!==oe&&(oe=ot(vn[0].zoom),J=void 0,Ce={}),on=on.concat(Pn({key:Cn+"[0]",value:vn[0],valueSpec:{zoom:{}},style:Gt.style,styleSpec:Gt.styleSpec,objectElementValidators:{zoom:mr,value:Xt}}))}else on=on.concat(Xt({key:Cn+"[0]",value:vn[0],valueSpec:{},style:Gt.style,styleSpec:Gt.styleSpec},vn));return en(kt(vn[1]))?on.concat([new He(Cn+"[1]",vn[1],"expressions are not allowed in function stops.")]):on.concat(ln({key:Cn+"[1]",value:vn[1],valueSpec:pe,style:Gt.style,styleSpec:Gt.styleSpec}))}function Xt(Gt,on){var vn=ma(Gt.value),Cn=ot(Gt.value),En=Gt.value!==null?Gt.value:on;if(F){if(vn!==F)return[new He(Gt.key,En,vn+" stop domain type must match previous stop domain type "+F)]}else F=vn;if(vn!=="number"&&vn!=="string"&&vn!=="boolean")return[new He(Gt.key,En,"stop domain value must be a number, string, or boolean")];if(vn!=="number"&&xe!=="categorical"){var Vn="number expected, "+vn+" found";return pl(pe)&&xe===void 0&&(Vn+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new He(Gt.key,En,Vn)]}return xe!=="categorical"||vn!=="number"||isFinite(Cn)&&Math.floor(Cn)===Cn?xe!=="categorical"&&vn==="number"&&J!==void 0&&Cn=2&&C[1]!=="$id"&&C[1]!=="$type";case"in":return C.length>=3&&(typeof C[1]!="string"||Array.isArray(C[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return C.length!==3||Array.isArray(C[1])||Array.isArray(C[2]);case"any":case"all":for(var F=0,J=C.slice(1);FF?1:0}function sa(C){if(!C)return!0;var F,J=C[0];return C.length<=1?J!=="any":J==="=="?ca(C[1],C[2],"=="):J==="!="?za(ca(C[1],C[2],"==")):J==="<"||J===">"||J==="<="||J===">="?ca(C[1],C[2],J):J==="any"?(F=C.slice(1),["any"].concat(F.map(sa))):J==="all"?["all"].concat(C.slice(1).map(sa)):J==="none"?["all"].concat(C.slice(1).map(sa).map(za)):J==="in"?lo(C[1],C.slice(2)):J==="!in"?za(lo(C[1],C.slice(2))):J==="has"?io(C[1]):J==="!has"?za(io(C[1])):J!=="within"||C}function ca(C,F,J){switch(C){case"$type":return["filter-type-"+J,F];case"$id":return["filter-id-"+J,F];default:return["filter-"+J,C,F]}}function lo(C,F){if(F.length===0)return!1;switch(C){case"$type":return["filter-type-in",["literal",F]];case"$id":return["filter-id-in",["literal",F]];default:return F.length>200&&!F.some(function(J){return typeof J!=typeof F[0]})?["filter-in-large",C,["literal",F.sort(ua)]]:["filter-in-small",C,["literal",F]]}}function io(C){switch(C){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",C]}}function za(C){return["!",C]}function Ra(C){return jr(kt(C.value))?Br(lt({},C,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function F(J){var oe=J.value,pe=J.key;if(ma(oe)!=="array")return[new He(pe,oe,"array expected, "+ma(oe)+" found")];var xe,Ce=J.styleSpec,Ne=[];if(oe.length<1)return[new He(pe,oe,"filter array must have at least 1 element")];switch(Ne=Ne.concat(Jr({key:pe+"[0]",value:oe[0],valueSpec:Ce.filter_operator,style:J.style,styleSpec:J.styleSpec})),ot(oe[0])){case"<":case"<=":case">":case">=":oe.length>=2&&ot(oe[1])==="$type"&&Ne.push(new He(pe,oe,'"$type" cannot be use with operator "'+oe[0]+'"'));case"==":case"!=":oe.length!==3&&Ne.push(new He(pe,oe,'filter array for operator "'+oe[0]+'" must have 3 elements'));case"in":case"!in":oe.length>=2&&(xe=ma(oe[1]))!=="string"&&Ne.push(new He(pe+"[1]",oe[1],"string expected, "+xe+" found"));for(var Ze=2;Ze=gt[Gt+0]&&oe>=gt[Gt+1])?(Ce[Xt]=!0,xe.push(ct[Xt])):Ce[Xt]=!1}}},Ar.prototype._forEachCell=function(C,F,J,oe,pe,xe,Ce,Ne){for(var Ze=this._convertToCellCoord(C),ct=this._convertToCellCoord(F),gt=this._convertToCellCoord(J),Bt=this._convertToCellCoord(oe),Xt=Ze;Xt<=gt;Xt++)for(var Gt=ct;Gt<=Bt;Gt++){var on=this.d*Gt+Xt;if((!Ne||Ne(this._convertFromCellCoord(Xt),this._convertFromCellCoord(Gt),this._convertFromCellCoord(Xt+1),this._convertFromCellCoord(Gt+1)))&&pe.call(this,C,F,J,oe,on,xe,Ce,Ne))return}},Ar.prototype._convertFromCellCoord=function(C){return(C-this.padding)/this.scale},Ar.prototype._convertToCellCoord=function(C){return Math.max(0,Math.min(this.d-1,Math.floor(C*this.scale)+this.padding))},Ar.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var C=this.cells,F=3+this.cells.length+1+1,J=0,oe=0;oe=0)){var Bt=C[gt];ct[gt]=mi[Ze].shallow.indexOf(gt)>=0?Bt:fi(Bt,F)}C instanceof Error&&(ct.message=C.message)}if(ct.$name)throw new Error("$name property is reserved for worker serialization logic.");return Ze!=="Object"&&(ct.$name=Ze),ct}throw new Error("can't serialize object of type "+typeof C)}function Ni(C){if(C==null||typeof C=="boolean"||typeof C=="number"||typeof C=="string"||C instanceof Boolean||C instanceof Number||C instanceof String||C instanceof Date||C instanceof RegExp||Rr(C)||Gr(C)||ArrayBuffer.isView(C)||C instanceof Ur)return C;if(Array.isArray(C))return C.map(Ni);if(typeof C=="object"){var F=C.$name||"Object",J=mi[F].klass;if(!J)throw new Error("can't deserialize unregistered class "+F);if(J.deserialize)return J.deserialize(C);for(var oe=Object.create(J.prototype),pe=0,xe=Object.keys(C);pe=0?Ne:Ni(Ne)}}return oe}throw new Error("can't deserialize object of type "+typeof C)}var Ki=function(){this.first=!0};Ki.prototype.update=function(C,F){var J=Math.floor(C);return this.first?(this.first=!1,this.lastIntegerZoom=J,this.lastIntegerZoomTime=0,this.lastZoom=C,this.lastFloorZoom=J,!0):(this.lastFloorZoom>J?(this.lastIntegerZoom=J+1,this.lastIntegerZoomTime=F):this.lastFloorZoom=128&&C<=255},Arabic:function(C){return C>=1536&&C<=1791},"Arabic Supplement":function(C){return C>=1872&&C<=1919},"Arabic Extended-A":function(C){return C>=2208&&C<=2303},"Hangul Jamo":function(C){return C>=4352&&C<=4607},"Unified Canadian Aboriginal Syllabics":function(C){return C>=5120&&C<=5759},Khmer:function(C){return C>=6016&&C<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(C){return C>=6320&&C<=6399},"General Punctuation":function(C){return C>=8192&&C<=8303},"Letterlike Symbols":function(C){return C>=8448&&C<=8527},"Number Forms":function(C){return C>=8528&&C<=8591},"Miscellaneous Technical":function(C){return C>=8960&&C<=9215},"Control Pictures":function(C){return C>=9216&&C<=9279},"Optical Character Recognition":function(C){return C>=9280&&C<=9311},"Enclosed Alphanumerics":function(C){return C>=9312&&C<=9471},"Geometric Shapes":function(C){return C>=9632&&C<=9727},"Miscellaneous Symbols":function(C){return C>=9728&&C<=9983},"Miscellaneous Symbols and Arrows":function(C){return C>=11008&&C<=11263},"CJK Radicals Supplement":function(C){return C>=11904&&C<=12031},"Kangxi Radicals":function(C){return C>=12032&&C<=12255},"Ideographic Description Characters":function(C){return C>=12272&&C<=12287},"CJK Symbols and Punctuation":function(C){return C>=12288&&C<=12351},Hiragana:function(C){return C>=12352&&C<=12447},Katakana:function(C){return C>=12448&&C<=12543},Bopomofo:function(C){return C>=12544&&C<=12591},"Hangul Compatibility Jamo":function(C){return C>=12592&&C<=12687},Kanbun:function(C){return C>=12688&&C<=12703},"Bopomofo Extended":function(C){return C>=12704&&C<=12735},"CJK Strokes":function(C){return C>=12736&&C<=12783},"Katakana Phonetic Extensions":function(C){return C>=12784&&C<=12799},"Enclosed CJK Letters and Months":function(C){return C>=12800&&C<=13055},"CJK Compatibility":function(C){return C>=13056&&C<=13311},"CJK Unified Ideographs Extension A":function(C){return C>=13312&&C<=19903},"Yijing Hexagram Symbols":function(C){return C>=19904&&C<=19967},"CJK Unified Ideographs":function(C){return C>=19968&&C<=40959},"Yi Syllables":function(C){return C>=40960&&C<=42127},"Yi Radicals":function(C){return C>=42128&&C<=42191},"Hangul Jamo Extended-A":function(C){return C>=43360&&C<=43391},"Hangul Syllables":function(C){return C>=44032&&C<=55215},"Hangul Jamo Extended-B":function(C){return C>=55216&&C<=55295},"Private Use Area":function(C){return C>=57344&&C<=63743},"CJK Compatibility Ideographs":function(C){return C>=63744&&C<=64255},"Arabic Presentation Forms-A":function(C){return C>=64336&&C<=65023},"Vertical Forms":function(C){return C>=65040&&C<=65055},"CJK Compatibility Forms":function(C){return C>=65072&&C<=65103},"Small Form Variants":function(C){return C>=65104&&C<=65135},"Arabic Presentation Forms-B":function(C){return C>=65136&&C<=65279},"Halfwidth and Fullwidth Forms":function(C){return C>=65280&&C<=65519}};function ra(C){for(var F=0,J=C;F=65097&&C<=65103)||!!Lr["CJK Compatibility Ideographs"](C)||!!Lr["CJK Compatibility"](C)||!!Lr["CJK Radicals Supplement"](C)||!!Lr["CJK Strokes"](C)||!(!Lr["CJK Symbols and Punctuation"](C)||C>=12296&&C<=12305||C>=12308&&C<=12319||C===12336)||!!Lr["CJK Unified Ideographs Extension A"](C)||!!Lr["CJK Unified Ideographs"](C)||!!Lr["Enclosed CJK Letters and Months"](C)||!!Lr["Hangul Compatibility Jamo"](C)||!!Lr["Hangul Jamo Extended-A"](C)||!!Lr["Hangul Jamo Extended-B"](C)||!!Lr["Hangul Jamo"](C)||!!Lr["Hangul Syllables"](C)||!!Lr.Hiragana(C)||!!Lr["Ideographic Description Characters"](C)||!!Lr.Kanbun(C)||!!Lr["Kangxi Radicals"](C)||!!Lr["Katakana Phonetic Extensions"](C)||!(!Lr.Katakana(C)||C===12540)||!(!Lr["Halfwidth and Fullwidth Forms"](C)||C===65288||C===65289||C===65293||C>=65306&&C<=65310||C===65339||C===65341||C===65343||C>=65371&&C<=65503||C===65507||C>=65512&&C<=65519)||!(!Lr["Small Form Variants"](C)||C>=65112&&C<=65118||C>=65123&&C<=65126)||!!Lr["Unified Canadian Aboriginal Syllabics"](C)||!!Lr["Unified Canadian Aboriginal Syllabics Extended"](C)||!!Lr["Vertical Forms"](C)||!!Lr["Yijing Hexagram Symbols"](C)||!!Lr["Yi Syllables"](C)||!!Lr["Yi Radicals"](C))}function ia(C){return!(Ci(C)||function(F){return!(!Lr["Latin-1 Supplement"](F)||F!==167&&F!==169&&F!==174&&F!==177&&F!==188&&F!==189&&F!==190&&F!==215&&F!==247)||!(!Lr["General Punctuation"](F)||F!==8214&&F!==8224&&F!==8225&&F!==8240&&F!==8241&&F!==8251&&F!==8252&&F!==8258&&F!==8263&&F!==8264&&F!==8265&&F!==8273)||!!Lr["Letterlike Symbols"](F)||!!Lr["Number Forms"](F)||!(!Lr["Miscellaneous Technical"](F)||!(F>=8960&&F<=8967||F>=8972&&F<=8991||F>=8996&&F<=9e3||F===9003||F>=9085&&F<=9114||F>=9150&&F<=9165||F===9167||F>=9169&&F<=9179||F>=9186&&F<=9215))||!(!Lr["Control Pictures"](F)||F===9251)||!!Lr["Optical Character Recognition"](F)||!!Lr["Enclosed Alphanumerics"](F)||!!Lr["Geometric Shapes"](F)||!(!Lr["Miscellaneous Symbols"](F)||F>=9754&&F<=9759)||!(!Lr["Miscellaneous Symbols and Arrows"](F)||!(F>=11026&&F<=11055||F>=11088&&F<=11097||F>=11192&&F<=11243))||!!Lr["CJK Symbols and Punctuation"](F)||!!Lr.Katakana(F)||!!Lr["Private Use Area"](F)||!!Lr["CJK Compatibility Forms"](F)||!!Lr["Small Form Variants"](F)||!!Lr["Halfwidth and Fullwidth Forms"](F)||F===8734||F===8756||F===8757||F>=9984&&F<=10087||F>=10102&&F<=10131||F===65532||F===65533}(C))}function Wi(C){return C>=1424&&C<=2303||Lr["Arabic Presentation Forms-A"](C)||Lr["Arabic Presentation Forms-B"](C)}function Ca(C,F){return!(!F&&Wi(C))&&!(C>=2304&&C<=3583||C>=3840&&C<=4255||Lr.Khmer(C))}function pi(C){for(var F=0,J=C;F-1&&(Pi=Zs),ks&&ks(C)};function wa(){uo.fire(new Pe("pluginStateChange",{pluginStatus:Pi,pluginURL:Qa}))}var uo=new Ae,jo=function(){return Pi},La=function(){if(Pi!==_a||!Qa)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");Pi=Po,wa(),Qa&&Ot({url:Qa},function(C){C?Ts(C):(Pi=Al,wa())})},ps={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return Pi===Al||ps.applyArabicShaping!=null},isLoading:function(){return Pi===Po},setState:function(C){Pi=C.pluginStatus,Qa=C.pluginURL},isParsed:function(){return ps.applyArabicShaping!=null&&ps.processBidirectionalText!=null&&ps.processStyledBidirectionalText!=null},getPluginURL:function(){return Qa}},Pa=function(C,F){this.zoom=C,F?(this.now=F.now,this.fadeDuration=F.fadeDuration,this.zoomHistory=F.zoomHistory,this.transition=F.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Ki,this.transition={})};Pa.prototype.isSupportedScript=function(C){return function(F,J){for(var oe=0,pe=F;oethis.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:F+(1-F)*J}:{fromScale:.5,toScale:1,t:1-(1-J)*F}};var ns=function(C,F){this.property=C,this.value=F,this.expression=function(J,oe){if(je(J))return new _n(J,oe);if(en(J)){var pe=xn(J,oe);if(pe.result==="error")throw new Error(pe.value.map(function(Ce){return Ce.key+": "+Ce.message}).join(", "));return pe.value}var xe=J;return typeof J=="string"&&oe.type==="color"&&(xe=tn.parse(J)),{kind:"constant",evaluate:function(){return xe}}}(F===void 0?C.specification.default:F,C.specification)};ns.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},ns.prototype.possiblyEvaluate=function(C,F,J){return this.property.possiblyEvaluate(this,C,F,J)};var vu=function(C){this.property=C,this.value=new ns(C,void 0)};vu.prototype.transitioned=function(C,F){return new _f(this.property,this.value,F,x({},C.transition,this.transition),C.now)},vu.prototype.untransitioned=function(){return new _f(this.property,this.value,null,{},0)};var Xl=function(C){this._properties=C,this._values=Object.create(C.defaultTransitionablePropertyValues)};Xl.prototype.getValue=function(C){return E(this._values[C].value.value)},Xl.prototype.setValue=function(C,F){this._values.hasOwnProperty(C)||(this._values[C]=new vu(this._values[C].property)),this._values[C].value=new ns(this._values[C].property,F===null?void 0:E(F))},Xl.prototype.getTransition=function(C){return E(this._values[C].transition)},Xl.prototype.setTransition=function(C,F){this._values.hasOwnProperty(C)||(this._values[C]=new vu(this._values[C].property)),this._values[C].transition=E(F)||void 0},Xl.prototype.serialize=function(){for(var C={},F=0,J=Object.keys(this._values);Fthis.end)return this.prior=null,pe;if(this.value.isDataDriven())return this.prior=null,pe;if(oe=1)return 1;var Ze=Ne*Ne,ct=Ze*Ne;return 4*(Ne<.5?ct:3*(Ne-Ze)+ct-.75)}(Ce))}return pe};var Mo=function(C){this._properties=C,this._values=Object.create(C.defaultTransitioningPropertyValues)};Mo.prototype.possiblyEvaluate=function(C,F,J){for(var oe=new Zl(this._properties),pe=0,xe=Object.keys(this._values);pexe.zoomHistory.lastIntegerZoom?{from:J,to:oe}:{from:pe,to:oe}},F.prototype.interpolate=function(J){return J},F}(Di),Tf=function(C){this.specification=C};Tf.prototype.possiblyEvaluate=function(C,F,J,oe){if(C.value!==void 0){if(C.expression.kind==="constant"){var pe=C.expression.evaluate(F,null,{},J,oe);return this._calculate(pe,pe,pe,F)}return this._calculate(C.expression.evaluate(new Pa(Math.floor(F.zoom-1),F)),C.expression.evaluate(new Pa(Math.floor(F.zoom),F)),C.expression.evaluate(new Pa(Math.floor(F.zoom+1),F)),F)}},Tf.prototype._calculate=function(C,F,J,oe){return oe.zoom>oe.zoomHistory.lastIntegerZoom?{from:C,to:F}:{from:J,to:F}},Tf.prototype.interpolate=function(C){return C};var Jl=function(C){this.specification=C};Jl.prototype.possiblyEvaluate=function(C,F,J,oe){return!!C.expression.evaluate(F,null,{},J,oe)},Jl.prototype.interpolate=function(){return!1};var Us=function(C){for(var F in this.properties=C,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],C){var J=C[F];J.specification.overridable&&this.overridableProperties.push(F);var oe=this.defaultPropertyValues[F]=new ns(J,void 0),pe=this.defaultTransitionablePropertyValues[F]=new vu(J);this.defaultTransitioningPropertyValues[F]=pe.untransitioned(),this.defaultPossiblyEvaluatedValues[F]=oe.possiblyEvaluate({})}};Qn("DataDrivenProperty",Di),Qn("DataConstantProperty",wi),Qn("CrossFadedDataDrivenProperty",kf),Qn("CrossFadedProperty",Tf),Qn("ColorRampProperty",Jl);var ml=function(C){function F(J,oe){if(C.call(this),this.id=J.id,this.type=J.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},J.type!=="custom"&&(J=J,this.metadata=J.metadata,this.minzoom=J.minzoom,this.maxzoom=J.maxzoom,J.type!=="background"&&(this.source=J.source,this.sourceLayer=J["source-layer"],this.filter=J.filter),oe.layout&&(this._unevaluatedLayout=new wf(oe.layout)),oe.paint)){for(var pe in this._transitionablePaint=new Xl(oe.paint),J.paint)this.setPaintProperty(pe,J.paint[pe],{validate:!1});for(var xe in J.layout)this.setLayoutProperty(xe,J.layout[xe],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Zl(oe.paint)}}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},F.prototype.getLayoutProperty=function(J){return J==="visibility"?this.visibility:this._unevaluatedLayout.getValue(J)},F.prototype.setLayoutProperty=function(J,oe,pe){if(pe===void 0&&(pe={}),oe!=null){var xe="layers."+this.id+".layout."+J;if(this._validate(yr,xe,J,oe,pe))return}J!=="visibility"?this._unevaluatedLayout.setValue(J,oe):this.visibility=oe},F.prototype.getPaintProperty=function(J){return M(J,"-transition")?this._transitionablePaint.getTransition(J.slice(0,-11)):this._transitionablePaint.getValue(J)},F.prototype.setPaintProperty=function(J,oe,pe){if(pe===void 0&&(pe={}),oe!=null){var xe="layers."+this.id+".paint."+J;if(this._validate(ur,xe,J,oe,pe))return!1}if(M(J,"-transition"))return this._transitionablePaint.setTransition(J.slice(0,-11),oe||void 0),!1;var Ce=this._transitionablePaint._values[J],Ne=Ce.property.specification["property-type"]==="cross-faded-data-driven",Ze=Ce.value.isDataDriven(),ct=Ce.value;this._transitionablePaint.setValue(J,oe),this._handleSpecialPaintPropertyUpdate(J);var gt=this._transitionablePaint._values[J].value;return gt.isDataDriven()||Ze||Ne||this._handleOverridablePaintPropertyUpdate(J,ct,gt)},F.prototype._handleSpecialPaintPropertyUpdate=function(J){},F.prototype._handleOverridablePaintPropertyUpdate=function(J,oe,pe){return!1},F.prototype.isHidden=function(J){return!!(this.minzoom&&J=this.maxzoom)||this.visibility==="none"},F.prototype.updateTransitions=function(J){this._transitioningPaint=this._transitionablePaint.transitioned(J,this._transitioningPaint)},F.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},F.prototype.recalculate=function(J,oe){J.getCrossfadeParameters&&(this._crossfadeParameters=J.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(J,void 0,oe)),this.paint=this._transitioningPaint.possiblyEvaluate(J,void 0,oe)},F.prototype.serialize=function(){var J={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(J.layout=J.layout||{},J.layout.visibility=this.visibility),S(J,function(oe,pe){return!(oe===void 0||pe==="layout"&&!Object.keys(oe).length||pe==="paint"&&!Object.keys(oe).length)})},F.prototype._validate=function(J,oe,pe,xe,Ce){return Ce===void 0&&(Ce={}),(!Ce||Ce.validate!==!1)&&Tr(this,J.call(Jn,{key:oe,layerType:this.type,objectKey:pe,value:xe,styleSpec:De,style:{glyphs:!0,sprite:!0}}))},F.prototype.is3D=function(){return!1},F.prototype.isTileClipped=function(){return!1},F.prototype.hasOffscreenPass=function(){return!1},F.prototype.resize=function(){},F.prototype.isStateDependent=function(){for(var J in this.paint._values){var oe=this.paint.get(J);if(oe instanceof So&&pl(oe.property.specification)&&(oe.value.kind==="source"||oe.value.kind==="composite")&&oe.value.isStateDependent)return!0}return!1},F}(Ae),od={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},Oc=function(C,F){this._structArray=C,this._pos1=F*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},ka=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function Da(C,F){F===void 0&&(F=1);var J=0,oe=0;return{members:C.map(function(pe){var xe,Ce=(xe=pe.type,od[xe].BYTES_PER_ELEMENT),Ne=J=qu(J,Math.max(F,Ce)),Ze=pe.components||1;return oe=Math.max(oe,Ce),J+=Ce*Ze,{name:pe.name,type:pe.type,components:Ze,offset:Ne}}),size:qu(J,Math.max(oe,F)),alignment:F}}function qu(C,F){return Math.ceil(C/F)*F}ka.serialize=function(C,F){return C._trim(),F&&(C.isTransferred=!0,F.push(C.arrayBuffer)),{length:C.length,arrayBuffer:C.arrayBuffer}},ka.deserialize=function(C){var F=Object.create(this.prototype);return F.arrayBuffer=C.arrayBuffer,F.length=C.length,F.capacity=C.arrayBuffer.byteLength/F.bytesPerElement,F._refreshViews(),F},ka.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},ka.prototype.clear=function(){this.length=0},ka.prototype.resize=function(C){this.reserve(C),this.length=C},ka.prototype.reserve=function(C){if(C>this.capacity){this.capacity=Math.max(C,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var F=this.uint8;this._refreshViews(),F&&this.uint8.set(F)}},ka.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var yu=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},F.prototype.emplaceBack=function(J,oe){var pe=this.length;return this.resize(pe+1),this.emplace(pe,J,oe)},F.prototype.emplace=function(J,oe,pe){var xe=2*J;return this.int16[xe+0]=oe,this.int16[xe+1]=pe,J},F}(ka);yu.prototype.bytesPerElement=4,Qn("StructArrayLayout2i4",yu);var yo=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},F.prototype.emplaceBack=function(J,oe,pe,xe){var Ce=this.length;return this.resize(Ce+1),this.emplace(Ce,J,oe,pe,xe)},F.prototype.emplace=function(J,oe,pe,xe,Ce){var Ne=4*J;return this.int16[Ne+0]=oe,this.int16[Ne+1]=pe,this.int16[Ne+2]=xe,this.int16[Ne+3]=Ce,J},F}(ka);yo.prototype.bytesPerElement=8,Qn("StructArrayLayout4i8",yo);var Hu=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},F.prototype.emplaceBack=function(J,oe,pe,xe,Ce,Ne){var Ze=this.length;return this.resize(Ze+1),this.emplace(Ze,J,oe,pe,xe,Ce,Ne)},F.prototype.emplace=function(J,oe,pe,xe,Ce,Ne,Ze){var ct=6*J;return this.int16[ct+0]=oe,this.int16[ct+1]=pe,this.int16[ct+2]=xe,this.int16[ct+3]=Ce,this.int16[ct+4]=Ne,this.int16[ct+5]=Ze,J},F}(ka);Hu.prototype.bytesPerElement=12,Qn("StructArrayLayout2i4i12",Hu);var Lc=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},F.prototype.emplaceBack=function(J,oe,pe,xe,Ce,Ne){var Ze=this.length;return this.resize(Ze+1),this.emplace(Ze,J,oe,pe,xe,Ce,Ne)},F.prototype.emplace=function(J,oe,pe,xe,Ce,Ne,Ze){var ct=4*J,gt=8*J;return this.int16[ct+0]=oe,this.int16[ct+1]=pe,this.uint8[gt+4]=xe,this.uint8[gt+5]=Ce,this.uint8[gt+6]=Ne,this.uint8[gt+7]=Ze,J},F}(ka);Lc.prototype.bytesPerElement=8,Qn("StructArrayLayout2i4ub8",Lc);var oc=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},F.prototype.emplaceBack=function(J,oe,pe,xe,Ce,Ne,Ze,ct,gt,Bt){var Xt=this.length;return this.resize(Xt+1),this.emplace(Xt,J,oe,pe,xe,Ce,Ne,Ze,ct,gt,Bt)},F.prototype.emplace=function(J,oe,pe,xe,Ce,Ne,Ze,ct,gt,Bt,Xt){var Gt=9*J,on=18*J;return this.uint16[Gt+0]=oe,this.uint16[Gt+1]=pe,this.uint16[Gt+2]=xe,this.uint16[Gt+3]=Ce,this.uint16[Gt+4]=Ne,this.uint16[Gt+5]=Ze,this.uint16[Gt+6]=ct,this.uint16[Gt+7]=gt,this.uint8[on+16]=Bt,this.uint8[on+17]=Xt,J},F}(ka);oc.prototype.bytesPerElement=18,Qn("StructArrayLayout8ui2ub18",oc);var Pc=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},F.prototype.emplaceBack=function(J,oe,pe,xe,Ce,Ne,Ze,ct,gt,Bt,Xt,Gt){var on=this.length;return this.resize(on+1),this.emplace(on,J,oe,pe,xe,Ce,Ne,Ze,ct,gt,Bt,Xt,Gt)},F.prototype.emplace=function(J,oe,pe,xe,Ce,Ne,Ze,ct,gt,Bt,Xt,Gt,on){var vn=12*J;return this.int16[vn+0]=oe,this.int16[vn+1]=pe,this.int16[vn+2]=xe,this.int16[vn+3]=Ce,this.uint16[vn+4]=Ne,this.uint16[vn+5]=Ze,this.uint16[vn+6]=ct,this.uint16[vn+7]=gt,this.int16[vn+8]=Bt,this.int16[vn+9]=Xt,this.int16[vn+10]=Gt,this.int16[vn+11]=on,J},F}(ka);Pc.prototype.bytesPerElement=24,Qn("StructArrayLayout4i4ui4i24",Pc);var xu=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},F.prototype.emplaceBack=function(J,oe,pe){var xe=this.length;return this.resize(xe+1),this.emplace(xe,J,oe,pe)},F.prototype.emplace=function(J,oe,pe,xe){var Ce=3*J;return this.float32[Ce+0]=oe,this.float32[Ce+1]=pe,this.float32[Ce+2]=xe,J},F}(ka);xu.prototype.bytesPerElement=12,Qn("StructArrayLayout3f12",xu);var sd=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},F.prototype.emplaceBack=function(J){var oe=this.length;return this.resize(oe+1),this.emplace(oe,J)},F.prototype.emplace=function(J,oe){var pe=1*J;return this.uint32[pe+0]=oe,J},F}(ka);sd.prototype.bytesPerElement=4,Qn("StructArrayLayout1ul4",sd);var Tp=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},F.prototype.emplaceBack=function(J,oe,pe,xe,Ce,Ne,Ze,ct,gt){var Bt=this.length;return this.resize(Bt+1),this.emplace(Bt,J,oe,pe,xe,Ce,Ne,Ze,ct,gt)},F.prototype.emplace=function(J,oe,pe,xe,Ce,Ne,Ze,ct,gt,Bt){var Xt=10*J,Gt=5*J;return this.int16[Xt+0]=oe,this.int16[Xt+1]=pe,this.int16[Xt+2]=xe,this.int16[Xt+3]=Ce,this.int16[Xt+4]=Ne,this.int16[Xt+5]=Ze,this.uint32[Gt+3]=ct,this.uint16[Xt+8]=gt,this.uint16[Xt+9]=Bt,J},F}(ka);Tp.prototype.bytesPerElement=20,Qn("StructArrayLayout6i1ul2ui20",Tp);var $u=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},F.prototype.emplaceBack=function(J,oe,pe,xe,Ce,Ne){var Ze=this.length;return this.resize(Ze+1),this.emplace(Ze,J,oe,pe,xe,Ce,Ne)},F.prototype.emplace=function(J,oe,pe,xe,Ce,Ne,Ze){var ct=6*J;return this.int16[ct+0]=oe,this.int16[ct+1]=pe,this.int16[ct+2]=xe,this.int16[ct+3]=Ce,this.int16[ct+4]=Ne,this.int16[ct+5]=Ze,J},F}(ka);$u.prototype.bytesPerElement=12,Qn("StructArrayLayout2i2i2i12",$u);var ld=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},F.prototype.emplaceBack=function(J,oe,pe,xe,Ce){var Ne=this.length;return this.resize(Ne+1),this.emplace(Ne,J,oe,pe,xe,Ce)},F.prototype.emplace=function(J,oe,pe,xe,Ce,Ne){var Ze=4*J,ct=8*J;return this.float32[Ze+0]=oe,this.float32[Ze+1]=pe,this.float32[Ze+2]=xe,this.int16[ct+6]=Ce,this.int16[ct+7]=Ne,J},F}(ka);ld.prototype.bytesPerElement=16,Qn("StructArrayLayout2f1f2i16",ld);var Dc=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},F.prototype.emplaceBack=function(J,oe,pe,xe){var Ce=this.length;return this.resize(Ce+1),this.emplace(Ce,J,oe,pe,xe)},F.prototype.emplace=function(J,oe,pe,xe,Ce){var Ne=12*J,Ze=3*J;return this.uint8[Ne+0]=oe,this.uint8[Ne+1]=pe,this.float32[Ze+1]=xe,this.float32[Ze+2]=Ce,J},F}(ka);Dc.prototype.bytesPerElement=12,Qn("StructArrayLayout2ub2f12",Dc);var rs=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},F.prototype.emplaceBack=function(J,oe,pe){var xe=this.length;return this.resize(xe+1),this.emplace(xe,J,oe,pe)},F.prototype.emplace=function(J,oe,pe,xe){var Ce=3*J;return this.uint16[Ce+0]=oe,this.uint16[Ce+1]=pe,this.uint16[Ce+2]=xe,J},F}(ka);rs.prototype.bytesPerElement=6,Qn("StructArrayLayout3ui6",rs);var Ap=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},F.prototype.emplaceBack=function(J,oe,pe,xe,Ce,Ne,Ze,ct,gt,Bt,Xt,Gt,on,vn,Cn,En,Vn){var qn=this.length;return this.resize(qn+1),this.emplace(qn,J,oe,pe,xe,Ce,Ne,Ze,ct,gt,Bt,Xt,Gt,on,vn,Cn,En,Vn)},F.prototype.emplace=function(J,oe,pe,xe,Ce,Ne,Ze,ct,gt,Bt,Xt,Gt,on,vn,Cn,En,Vn,qn){var Xn=24*J,dr=12*J,br=48*J;return this.int16[Xn+0]=oe,this.int16[Xn+1]=pe,this.uint16[Xn+2]=xe,this.uint16[Xn+3]=Ce,this.uint32[dr+2]=Ne,this.uint32[dr+3]=Ze,this.uint32[dr+4]=ct,this.uint16[Xn+10]=gt,this.uint16[Xn+11]=Bt,this.uint16[Xn+12]=Xt,this.float32[dr+7]=Gt,this.float32[dr+8]=on,this.uint8[br+36]=vn,this.uint8[br+37]=Cn,this.uint8[br+38]=En,this.uint32[dr+10]=Vn,this.int16[Xn+22]=qn,J},F}(ka);Ap.prototype.bytesPerElement=48,Qn("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Ap);var Mp=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},F.prototype.emplaceBack=function(J,oe,pe,xe,Ce,Ne,Ze,ct,gt,Bt,Xt,Gt,on,vn,Cn,En,Vn,qn,Xn,dr,br,Hr,Vr,ei,vi,yi,li,Si){var Ai=this.length;return this.resize(Ai+1),this.emplace(Ai,J,oe,pe,xe,Ce,Ne,Ze,ct,gt,Bt,Xt,Gt,on,vn,Cn,En,Vn,qn,Xn,dr,br,Hr,Vr,ei,vi,yi,li,Si)},F.prototype.emplace=function(J,oe,pe,xe,Ce,Ne,Ze,ct,gt,Bt,Xt,Gt,on,vn,Cn,En,Vn,qn,Xn,dr,br,Hr,Vr,ei,vi,yi,li,Si,Ai){var xi=34*J,Ta=17*J;return this.int16[xi+0]=oe,this.int16[xi+1]=pe,this.int16[xi+2]=xe,this.int16[xi+3]=Ce,this.int16[xi+4]=Ne,this.int16[xi+5]=Ze,this.int16[xi+6]=ct,this.int16[xi+7]=gt,this.uint16[xi+8]=Bt,this.uint16[xi+9]=Xt,this.uint16[xi+10]=Gt,this.uint16[xi+11]=on,this.uint16[xi+12]=vn,this.uint16[xi+13]=Cn,this.uint16[xi+14]=En,this.uint16[xi+15]=Vn,this.uint16[xi+16]=qn,this.uint16[xi+17]=Xn,this.uint16[xi+18]=dr,this.uint16[xi+19]=br,this.uint16[xi+20]=Hr,this.uint16[xi+21]=Vr,this.uint16[xi+22]=ei,this.uint32[Ta+12]=vi,this.float32[Ta+13]=yi,this.float32[Ta+14]=li,this.float32[Ta+15]=Si,this.float32[Ta+16]=Ai,J},F}(ka);Mp.prototype.bytesPerElement=68,Qn("StructArrayLayout8i15ui1ul4f68",Mp);var ce=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},F.prototype.emplaceBack=function(J){var oe=this.length;return this.resize(oe+1),this.emplace(oe,J)},F.prototype.emplace=function(J,oe){var pe=1*J;return this.float32[pe+0]=oe,J},F}(ka);ce.prototype.bytesPerElement=4,Qn("StructArrayLayout1f4",ce);var I=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},F.prototype.emplaceBack=function(J,oe,pe){var xe=this.length;return this.resize(xe+1),this.emplace(xe,J,oe,pe)},F.prototype.emplace=function(J,oe,pe,xe){var Ce=3*J;return this.int16[Ce+0]=oe,this.int16[Ce+1]=pe,this.int16[Ce+2]=xe,J},F}(ka);I.prototype.bytesPerElement=6,Qn("StructArrayLayout3i6",I);var j=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},F.prototype.emplaceBack=function(J,oe,pe){var xe=this.length;return this.resize(xe+1),this.emplace(xe,J,oe,pe)},F.prototype.emplace=function(J,oe,pe,xe){var Ce=2*J,Ne=4*J;return this.uint32[Ce+0]=oe,this.uint16[Ne+2]=pe,this.uint16[Ne+3]=xe,J},F}(ka);j.prototype.bytesPerElement=8,Qn("StructArrayLayout1ul2ui8",j);var V=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},F.prototype.emplaceBack=function(J,oe){var pe=this.length;return this.resize(pe+1),this.emplace(pe,J,oe)},F.prototype.emplace=function(J,oe,pe){var xe=2*J;return this.uint16[xe+0]=oe,this.uint16[xe+1]=pe,J},F}(ka);V.prototype.bytesPerElement=4,Qn("StructArrayLayout2ui4",V);var X=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},F.prototype.emplaceBack=function(J){var oe=this.length;return this.resize(oe+1),this.emplace(oe,J)},F.prototype.emplace=function(J,oe){var pe=1*J;return this.uint16[pe+0]=oe,J},F}(ka);X.prototype.bytesPerElement=2,Qn("StructArrayLayout1ui2",X);var se=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},F.prototype.emplaceBack=function(J,oe){var pe=this.length;return this.resize(pe+1),this.emplace(pe,J,oe)},F.prototype.emplace=function(J,oe,pe){var xe=2*J;return this.float32[xe+0]=oe,this.float32[xe+1]=pe,J},F}(ka);se.prototype.bytesPerElement=8,Qn("StructArrayLayout2f8",se);var he=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},F.prototype.emplaceBack=function(J,oe,pe,xe){var Ce=this.length;return this.resize(Ce+1),this.emplace(Ce,J,oe,pe,xe)},F.prototype.emplace=function(J,oe,pe,xe,Ce){var Ne=4*J;return this.float32[Ne+0]=oe,this.float32[Ne+1]=pe,this.float32[Ne+2]=xe,this.float32[Ne+3]=Ce,J},F}(ka);he.prototype.bytesPerElement=16,Qn("StructArrayLayout4f16",he);var ve=function(C){function F(){C.apply(this,arguments)}C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F;var J={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},anchorPoint:{configurable:!0}};return J.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},J.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},J.x1.get=function(){return this._structArray.int16[this._pos2+2]},J.y1.get=function(){return this._structArray.int16[this._pos2+3]},J.x2.get=function(){return this._structArray.int16[this._pos2+4]},J.y2.get=function(){return this._structArray.int16[this._pos2+5]},J.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},J.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},J.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},J.anchorPoint.get=function(){return new h(this.anchorPointX,this.anchorPointY)},Object.defineProperties(F.prototype,J),F}(Oc);ve.prototype.size=20;var be=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype.get=function(J){return new ve(this,J)},F}(Tp);Qn("CollisionBoxArray",be);var Se=function(C){function F(){C.apply(this,arguments)}C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F;var J={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return J.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},J.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},J.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},J.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},J.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},J.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},J.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},J.segment.get=function(){return this._structArray.uint16[this._pos2+10]},J.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},J.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},J.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},J.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},J.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},J.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},J.placedOrientation.set=function(oe){this._structArray.uint8[this._pos1+37]=oe},J.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},J.hidden.set=function(oe){this._structArray.uint8[this._pos1+38]=oe},J.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},J.crossTileID.set=function(oe){this._structArray.uint32[this._pos4+10]=oe},J.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(F.prototype,J),F}(Oc);Se.prototype.size=48;var Ue=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype.get=function(J){return new Se(this,J)},F}(Ap);Qn("PlacedSymbolArray",Ue);var Xe=function(C){function F(){C.apply(this,arguments)}C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F;var J={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return J.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},J.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},J.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},J.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},J.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},J.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},J.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},J.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},J.key.get=function(){return this._structArray.uint16[this._pos2+8]},J.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},J.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},J.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},J.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},J.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},J.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},J.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},J.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},J.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},J.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},J.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},J.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},J.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},J.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},J.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},J.crossTileID.set=function(oe){this._structArray.uint32[this._pos4+12]=oe},J.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},J.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},J.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},J.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(F.prototype,J),F}(Oc);Xe.prototype.size=68;var it=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype.get=function(J){return new Xe(this,J)},F}(Mp);Qn("SymbolInstanceArray",it);var xt=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype.getoffsetX=function(J){return this.float32[1*J+0]},F}(ce);Qn("GlyphOffsetArray",xt);var Lt=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype.getx=function(J){return this.int16[3*J+0]},F.prototype.gety=function(J){return this.int16[3*J+1]},F.prototype.gettileUnitDistanceFromAnchor=function(J){return this.int16[3*J+2]},F}(I);Qn("SymbolLineVertexArray",Lt);var _t=function(C){function F(){C.apply(this,arguments)}C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F;var J={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return J.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},J.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},J.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(F.prototype,J),F}(Oc);_t.prototype.size=8;var Mt=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype.get=function(J){return new _t(this,J)},F}(j);Qn("FeatureIndexArray",Mt);var yt=Da([{name:"a_pos",components:2,type:"Int16"}],4).members,Nt=function(C){C===void 0&&(C=[]),this.segments=C};function Rt(C,F){return 256*(C=v(Math.floor(C),0,255))+(F=v(Math.floor(F),0,255))}Nt.prototype.prepareSegment=function(C,F,J,oe){var pe=this.segments[this.segments.length-1];return C>Nt.MAX_VERTEX_ARRAY_LENGTH&&O("Max vertices per segment is "+Nt.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+C),(!pe||pe.vertexLength+C>Nt.MAX_VERTEX_ARRAY_LENGTH||pe.sortKey!==oe)&&(pe={vertexOffset:F.length,primitiveOffset:J.length,vertexLength:0,primitiveLength:0},oe!==void 0&&(pe.sortKey=oe),this.segments.push(pe)),pe},Nt.prototype.get=function(){return this.segments},Nt.prototype.destroy=function(){for(var C=0,F=this.segments;C>>16)*Ne&65535)<<16)&4294967295)<<15|ct>>>17))*Ze+(((ct>>>16)*Ze&65535)<<16)&4294967295)<<13|xe>>>19))+((5*(xe>>>16)&65535)<<16)&4294967295))+((58964+(Ce>>>16)&65535)<<16);switch(ct=0,oe){case 3:ct^=(255&F.charCodeAt(gt+2))<<16;case 2:ct^=(255&F.charCodeAt(gt+1))<<8;case 1:xe^=ct=(65535&(ct=(ct=(65535&(ct^=255&F.charCodeAt(gt)))*Ne+(((ct>>>16)*Ne&65535)<<16)&4294967295)<<15|ct>>>17))*Ze+(((ct>>>16)*Ze&65535)<<16)&4294967295}return xe^=F.length,xe=2246822507*(65535&(xe^=xe>>>16))+((2246822507*(xe>>>16)&65535)<<16)&4294967295,xe=3266489909*(65535&(xe^=xe>>>13))+((3266489909*(xe>>>16)&65535)<<16)&4294967295,(xe^=xe>>>16)>>>0}}),dn=s(function(C){C.exports=function(F,J){for(var oe,pe=F.length,xe=J^pe,Ce=0;pe>=4;)oe=1540483477*(65535&(oe=255&F.charCodeAt(Ce)|(255&F.charCodeAt(++Ce))<<8|(255&F.charCodeAt(++Ce))<<16|(255&F.charCodeAt(++Ce))<<24))+((1540483477*(oe>>>16)&65535)<<16),xe=1540483477*(65535&xe)+((1540483477*(xe>>>16)&65535)<<16)^(oe=1540483477*(65535&(oe^=oe>>>24))+((1540483477*(oe>>>16)&65535)<<16)),pe-=4,++Ce;switch(pe){case 3:xe^=(255&F.charCodeAt(Ce+2))<<16;case 2:xe^=(255&F.charCodeAt(Ce+1))<<8;case 1:xe=1540483477*(65535&(xe^=255&F.charCodeAt(Ce)))+((1540483477*(xe>>>16)&65535)<<16)}return xe=1540483477*(65535&(xe^=xe>>>13))+((1540483477*(xe>>>16)&65535)<<16),(xe^=xe>>>15)>>>0}}),Sn=rn,An=rn,tr=dn;Sn.murmur3=An,Sn.murmur2=tr;var er=function(){this.ids=[],this.positions=[],this.indexed=!1};er.prototype.add=function(C,F,J,oe){this.ids.push(cr(C)),this.positions.push(F,J,oe)},er.prototype.getPositions=function(C){for(var F=cr(C),J=0,oe=this.ids.length-1;J>1;this.ids[pe]>=F?oe=pe:J=pe+1}for(var xe=[];this.ids[J]===F;){var Ce=this.positions[3*J],Ne=this.positions[3*J+1],Ze=this.positions[3*J+2];xe.push({index:Ce,start:Ne,end:Ze}),J++}return xe},er.serialize=function(C,F){var J=new Float64Array(C.ids),oe=new Uint32Array(C.positions);return function pe(xe,Ce,Ne,Ze){for(;Ne>1],gt=Ne-1,Bt=Ze+1;;){do gt++;while(xe[gt]ct);if(gt>=Bt)break;Yr(xe,gt,Bt),Yr(Ce,3*gt,3*Bt),Yr(Ce,3*gt+1,3*Bt+1),Yr(Ce,3*gt+2,3*Bt+2)}Bt-Neco.max||Ce.yco.max)&&(O("Geometry exceeds allowed extent, reduce your vector tile buffer size"),Ce.x=v(Ce.x,co.min,co.max),Ce.y=v(Ce.y,co.min,co.max))}return J}function As(C,F,J,oe,pe){C.emplaceBack(2*F+(oe+1)/2,2*J+(pe+1)/2)}var Uo=function(C){this.zoom=C.zoom,this.overscaling=C.overscaling,this.layers=C.layers,this.layerIds=this.layers.map(function(F){return F.id}),this.index=C.index,this.hasPattern=!1,this.layoutVertexArray=new yu,this.indexArray=new rs,this.segments=new Nt,this.programConfigurations=new Ha(yt,C.layers,C.zoom),this.stateDependentLayerIds=this.layers.filter(function(F){return F.isStateDependent()}).map(function(F){return F.id})};function Js(C,F){for(var J=0;J1){if(ud(C,F))return!0;for(var oe=0;oe1?C.distSqr(J):C.distSqr(J.sub(F)._mult(pe)._add(F))}function Ep(C,F){for(var J,oe,pe,xe=!1,Ce=0;CeF.y!=pe.y>F.y&&F.x<(pe.x-oe.x)*(F.y-oe.y)/(pe.y-oe.y)+oe.x&&(xe=!xe);return xe}function Kl(C,F){for(var J=!1,oe=0,pe=C.length-1;oeF.y!=Ce.y>F.y&&F.x<(Ce.x-xe.x)*(F.y-xe.y)/(Ce.y-xe.y)+xe.x&&(J=!J)}return J}function Cp(C,F,J){var oe=J[0],pe=J[2];if(C.xpe.x&&F.x>pe.x||C.ype.y&&F.y>pe.y)return!1;var xe=R(C,F,J[0]);return xe!==R(C,F,J[1])||xe!==R(C,F,J[2])||xe!==R(C,F,J[3])}function fo(C,F,J){var oe=F.paint.get(C).value;return oe.kind==="constant"?oe.value:J.programConfigurations.get(F.id).getMaxValue(C)}function Vs(C){return Math.sqrt(C[0]*C[0]+C[1]*C[1])}function qs(C,F,J,oe,pe){if(!F[0]&&!F[1])return C;var xe=h.convert(F)._mult(pe);J==="viewport"&&xe._rotate(-oe);for(var Ce=[],Ne=0;Ne=8192||gt<0||gt>=8192)){var Bt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,C.sortKey),Xt=Bt.vertexLength;As(this.layoutVertexArray,ct,gt,-1,-1),As(this.layoutVertexArray,ct,gt,1,-1),As(this.layoutVertexArray,ct,gt,1,1),As(this.layoutVertexArray,ct,gt,-1,1),this.indexArray.emplaceBack(Xt,Xt+1,Xt+2),this.indexArray.emplaceBack(Xt,Xt+3,Xt+2),Bt.vertexLength+=4,Bt.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,C,J,{},oe)},Qn("CircleBucket",Uo,{omit:["layers"]});var rg=new Us({"circle-sort-key":new Di(De.layout_circle["circle-sort-key"])}),V3={paint:new Us({"circle-radius":new Di(De.paint_circle["circle-radius"]),"circle-color":new Di(De.paint_circle["circle-color"]),"circle-blur":new Di(De.paint_circle["circle-blur"]),"circle-opacity":new Di(De.paint_circle["circle-opacity"]),"circle-translate":new wi(De.paint_circle["circle-translate"]),"circle-translate-anchor":new wi(De.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new wi(De.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new wi(De.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Di(De.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Di(De.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Di(De.paint_circle["circle-stroke-opacity"])}),layout:rg},Ml=typeof Float32Array<"u"?Float32Array:Array;function c1(C){return C[0]=1,C[1]=0,C[2]=0,C[3]=0,C[4]=0,C[5]=1,C[6]=0,C[7]=0,C[8]=0,C[9]=0,C[10]=1,C[11]=0,C[12]=0,C[13]=0,C[14]=0,C[15]=1,C}function Op(C,F,J){var oe=F[0],pe=F[1],xe=F[2],Ce=F[3],Ne=F[4],Ze=F[5],ct=F[6],gt=F[7],Bt=F[8],Xt=F[9],Gt=F[10],on=F[11],vn=F[12],Cn=F[13],En=F[14],Vn=F[15],qn=J[0],Xn=J[1],dr=J[2],br=J[3];return C[0]=qn*oe+Xn*Ne+dr*Bt+br*vn,C[1]=qn*pe+Xn*Ze+dr*Xt+br*Cn,C[2]=qn*xe+Xn*ct+dr*Gt+br*En,C[3]=qn*Ce+Xn*gt+dr*on+br*Vn,qn=J[4],Xn=J[5],dr=J[6],br=J[7],C[4]=qn*oe+Xn*Ne+dr*Bt+br*vn,C[5]=qn*pe+Xn*Ze+dr*Xt+br*Cn,C[6]=qn*xe+Xn*ct+dr*Gt+br*En,C[7]=qn*Ce+Xn*gt+dr*on+br*Vn,qn=J[8],Xn=J[9],dr=J[10],br=J[11],C[8]=qn*oe+Xn*Ne+dr*Bt+br*vn,C[9]=qn*pe+Xn*Ze+dr*Xt+br*Cn,C[10]=qn*xe+Xn*ct+dr*Gt+br*En,C[11]=qn*Ce+Xn*gt+dr*on+br*Vn,qn=J[12],Xn=J[13],dr=J[14],br=J[15],C[12]=qn*oe+Xn*Ne+dr*Bt+br*vn,C[13]=qn*pe+Xn*Ze+dr*Xt+br*Cn,C[14]=qn*xe+Xn*ct+dr*Gt+br*En,C[15]=qn*Ce+Xn*gt+dr*on+br*Vn,C}Math.hypot||(Math.hypot=function(){for(var C=arguments,F=0,J=arguments.length;J--;)F+=C[J]*C[J];return Math.sqrt(F)});var q3=Op,yh,H3=function(C,F,J){return C[0]=F[0]-J[0],C[1]=F[1]-J[1],C[2]=F[2]-J[2],C};yh=new Ml(3),Ml!=Float32Array&&(yh[0]=0,yh[1]=0,yh[2]=0);function ig(C,F,J){var oe=F[0],pe=F[1],xe=F[2],Ce=F[3];return C[0]=J[0]*oe+J[4]*pe+J[8]*xe+J[12]*Ce,C[1]=J[1]*oe+J[5]*pe+J[9]*xe+J[13]*Ce,C[2]=J[2]*oe+J[6]*pe+J[10]*xe+J[14]*Ce,C[3]=J[3]*oe+J[7]*pe+J[11]*xe+J[15]*Ce,C}(function(){(function(){var C=new Ml(4);return Ml!=Float32Array&&(C[0]=0,C[1]=0,C[2]=0,C[3]=0),C})()})();var f1=function(C){var F=C[0],J=C[1];return F*F+J*J},WH=(function(){(function(){var C=new Ml(2);return Ml!=Float32Array&&(C[0]=0,C[1]=0),C})()}(),function(C){function F(J){C.call(this,J,V3)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype.createBucket=function(J){return new Uo(J)},F.prototype.queryRadius=function(J){var oe=J;return fo("circle-radius",this,oe)+fo("circle-stroke-width",this,oe)+Vs(this.paint.get("circle-translate"))},F.prototype.queryIntersectsFeature=function(J,oe,pe,xe,Ce,Ne,Ze,ct){for(var gt=qs(J,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),Ne.angle,Ze),Bt=this.paint.get("circle-radius").evaluate(oe,pe)+this.paint.get("circle-stroke-width").evaluate(oe,pe),Xt=this.paint.get("circle-pitch-alignment")==="map",Gt=Xt?gt:function(Hr,Vr){return Hr.map(function(ei){return Y8(ei,Vr)})}(gt,ct),on=Xt?Bt*Ze:Bt,vn=0,Cn=xe;vnC.width||pe.height>C.height||J.x>C.width-pe.width||J.y>C.height-pe.height)throw new RangeError("out of range source coordinates for image copy");if(pe.width>F.width||pe.height>F.height||oe.x>F.width-pe.width||oe.y>F.height-pe.height)throw new RangeError("out of range destination coordinates for image copy");for(var Ce=C.data,Ne=F.data,Ze=0;Ze80*J){oe=xe=C[0],pe=Ce=C[1];for(var on=J;onxe&&(xe=Ne),Ze>Ce&&(Ce=Ze);ct=(ct=Math.max(xe-oe,Ce-pe))!==0?1/ct:0}return h1(Xt,Gt,J,oe,pe,ct),Gt}function Q8(C,F,J,oe,pe){var xe,Ce;if(pe===Z3(C,F,J,oe)>0)for(xe=F;xe=F;xe-=oe)Ce=n9(xe,C[xe],C[xe+1],Ce);return Ce&&gx(Ce,Ce.next)&&(p1(Ce),Ce=Ce.next),Ce}function fd(C,F){if(!C)return C;F||(F=C);var J,oe=C;do if(J=!1,oe.steiner||!gx(oe,oe.next)&&is(oe.prev,oe,oe.next)!==0)oe=oe.next;else{if(p1(oe),(oe=F=oe.prev)===oe.next)break;J=!0}while(J||oe!==F);return F}function h1(C,F,J,oe,pe,xe,Ce){if(C){!Ce&&xe&&function(gt,Bt,Xt,Gt){var on=gt;do on.z===null&&(on.z=Y3(on.x,on.y,Bt,Xt,Gt)),on.prevZ=on.prev,on.nextZ=on.next,on=on.next;while(on!==gt);on.prevZ.nextZ=null,on.prevZ=null,function(vn){var Cn,En,Vn,qn,Xn,dr,br,Hr,Vr=1;do{for(En=vn,vn=null,Xn=null,dr=0;En;){for(dr++,Vn=En,br=0,Cn=0;Cn0||Hr>0&&Vn;)br!==0&&(Hr===0||!Vn||En.z<=Vn.z)?(qn=En,En=En.nextZ,br--):(qn=Vn,Vn=Vn.nextZ,Hr--),Xn?Xn.nextZ=qn:vn=qn,qn.prevZ=Xn,Xn=qn;En=Vn}Xn.nextZ=null,Vr*=2}while(dr>1)}(on)}(C,oe,pe,xe);for(var Ne,Ze,ct=C;C.prev!==C.next;)if(Ne=C.prev,Ze=C.next,xe?e$(C,oe,pe,xe):QH(C))F.push(Ne.i/J),F.push(C.i/J),F.push(Ze.i/J),p1(C),C=Ze.next,ct=Ze.next;else if((C=Ze)===ct){Ce?Ce===1?h1(C=t$(fd(C),F,J),F,J,oe,pe,xe,2):Ce===2&&n$(C,F,J,oe,pe,xe):h1(fd(C),F,J,oe,pe,xe,1);break}}}function QH(C){var F=C.prev,J=C,oe=C.next;if(is(F,J,oe)>=0)return!1;for(var pe=C.next.next;pe!==C.prev;){if(ag(F.x,F.y,J.x,J.y,oe.x,oe.y,pe.x,pe.y)&&is(pe.prev,pe,pe.next)>=0)return!1;pe=pe.next}return!0}function e$(C,F,J,oe){var pe=C.prev,xe=C,Ce=C.next;if(is(pe,xe,Ce)>=0)return!1;for(var Ne=pe.xxe.x?pe.x>Ce.x?pe.x:Ce.x:xe.x>Ce.x?xe.x:Ce.x,gt=pe.y>xe.y?pe.y>Ce.y?pe.y:Ce.y:xe.y>Ce.y?xe.y:Ce.y,Bt=Y3(Ne,Ze,F,J,oe),Xt=Y3(ct,gt,F,J,oe),Gt=C.prevZ,on=C.nextZ;Gt&&Gt.z>=Bt&&on&&on.z<=Xt;){if(Gt!==C.prev&&Gt!==C.next&&ag(pe.x,pe.y,xe.x,xe.y,Ce.x,Ce.y,Gt.x,Gt.y)&&is(Gt.prev,Gt,Gt.next)>=0||(Gt=Gt.prevZ,on!==C.prev&&on!==C.next&&ag(pe.x,pe.y,xe.x,xe.y,Ce.x,Ce.y,on.x,on.y)&&is(on.prev,on,on.next)>=0))return!1;on=on.nextZ}for(;Gt&&Gt.z>=Bt;){if(Gt!==C.prev&&Gt!==C.next&&ag(pe.x,pe.y,xe.x,xe.y,Ce.x,Ce.y,Gt.x,Gt.y)&&is(Gt.prev,Gt,Gt.next)>=0)return!1;Gt=Gt.prevZ}for(;on&&on.z<=Xt;){if(on!==C.prev&&on!==C.next&&ag(pe.x,pe.y,xe.x,xe.y,Ce.x,Ce.y,on.x,on.y)&&is(on.prev,on,on.next)>=0)return!1;on=on.nextZ}return!0}function t$(C,F,J){var oe=C;do{var pe=oe.prev,xe=oe.next.next;!gx(pe,xe)&&e9(pe,oe,oe.next,xe)&&d1(pe,xe)&&d1(xe,pe)&&(F.push(pe.i/J),F.push(oe.i/J),F.push(xe.i/J),p1(oe),p1(oe.next),oe=C=xe),oe=oe.next}while(oe!==C);return fd(oe)}function n$(C,F,J,oe,pe,xe){var Ce=C;do{for(var Ne=Ce.next.next;Ne!==Ce.prev;){if(Ce.i!==Ne.i&&s$(Ce,Ne)){var Ze=t9(Ce,Ne);return Ce=fd(Ce,Ce.next),Ze=fd(Ze,Ze.next),h1(Ce,F,J,oe,pe,xe),void h1(Ze,F,J,oe,pe,xe)}Ne=Ne.next}Ce=Ce.next}while(Ce!==C)}function r$(C,F){return C.x-F.x}function i$(C,F){if(F=function(oe,pe){var xe,Ce=pe,Ne=oe.x,Ze=oe.y,ct=-1/0;do{if(Ze<=Ce.y&&Ze>=Ce.next.y&&Ce.next.y!==Ce.y){var gt=Ce.x+(Ze-Ce.y)*(Ce.next.x-Ce.x)/(Ce.next.y-Ce.y);if(gt<=Ne&>>ct){if(ct=gt,gt===Ne){if(Ze===Ce.y)return Ce;if(Ze===Ce.next.y)return Ce.next}xe=Ce.x=Ce.x&&Ce.x>=Gt&&Ne!==Ce.x&&ag(Zexe.x||Ce.x===xe.x&&a$(xe,Ce)))&&(xe=Ce,vn=Bt)),Ce=Ce.next;while(Ce!==Xt);return xe}(C,F)){var J=t9(F,C);fd(F,F.next),fd(J,J.next)}}function a$(C,F){return is(C.prev,C,F.prev)<0&&is(F.next,C,C.next)<0}function Y3(C,F,J,oe,pe){return(C=1431655765&((C=858993459&((C=252645135&((C=16711935&((C=32767*(C-J)*pe)|C<<8))|C<<4))|C<<2))|C<<1))|(F=1431655765&((F=858993459&((F=252645135&((F=16711935&((F=32767*(F-oe)*pe)|F<<8))|F<<4))|F<<2))|F<<1))<<1}function o$(C){var F=C,J=C;do(F.x=0&&(C-Ce)*(oe-Ne)-(J-Ce)*(F-Ne)>=0&&(J-Ce)*(xe-Ne)-(pe-Ce)*(oe-Ne)>=0}function s$(C,F){return C.next.i!==F.i&&C.prev.i!==F.i&&!function(J,oe){var pe=J;do{if(pe.i!==J.i&&pe.next.i!==J.i&&pe.i!==oe.i&&pe.next.i!==oe.i&&e9(pe,pe.next,J,oe))return!0;pe=pe.next}while(pe!==J);return!1}(C,F)&&(d1(C,F)&&d1(F,C)&&function(J,oe){var pe=J,xe=!1,Ce=(J.x+oe.x)/2,Ne=(J.y+oe.y)/2;do pe.y>Ne!=pe.next.y>Ne&&pe.next.y!==pe.y&&Ce<(pe.next.x-pe.x)*(Ne-pe.y)/(pe.next.y-pe.y)+pe.x&&(xe=!xe),pe=pe.next;while(pe!==J);return xe}(C,F)&&(is(C.prev,C,F.prev)||is(C,F.prev,F))||gx(C,F)&&is(C.prev,C,C.next)>0&&is(F.prev,F,F.next)>0)}function is(C,F,J){return(F.y-C.y)*(J.x-F.x)-(F.x-C.x)*(J.y-F.y)}function gx(C,F){return C.x===F.x&&C.y===F.y}function e9(C,F,J,oe){var pe=vx(is(C,F,J)),xe=vx(is(C,F,oe)),Ce=vx(is(J,oe,C)),Ne=vx(is(J,oe,F));return pe!==xe&&Ce!==Ne||!(pe!==0||!mx(C,J,F))||!(xe!==0||!mx(C,oe,F))||!(Ce!==0||!mx(J,C,oe))||!(Ne!==0||!mx(J,F,oe))}function mx(C,F,J){return F.x<=Math.max(C.x,J.x)&&F.x>=Math.min(C.x,J.x)&&F.y<=Math.max(C.y,J.y)&&F.y>=Math.min(C.y,J.y)}function vx(C){return C>0?1:C<0?-1:0}function d1(C,F){return is(C.prev,C,C.next)<0?is(C,F,C.next)>=0&&is(C,C.prev,F)>=0:is(C,F,C.prev)<0||is(C,C.next,F)<0}function t9(C,F){var J=new X3(C.i,C.x,C.y),oe=new X3(F.i,F.x,F.y),pe=C.next,xe=F.prev;return C.next=F,F.prev=C,J.next=pe,pe.prev=J,oe.next=J,J.prev=oe,xe.next=oe,oe.prev=xe,oe}function n9(C,F,J,oe){var pe=new X3(C,F,J);return oe?(pe.next=oe.next,pe.prev=oe,oe.next.prev=pe,oe.next=pe):(pe.prev=pe,pe.next=pe),pe}function p1(C){C.next.prev=C.prev,C.prev.next=C.next,C.prevZ&&(C.prevZ.nextZ=C.nextZ),C.nextZ&&(C.nextZ.prevZ=C.prevZ)}function X3(C,F,J){this.i=C,this.x=F,this.y=J,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Z3(C,F,J,oe){for(var pe=0,xe=F,Ce=J-oe;xeZe;){if(ct-Ze>600){var Bt=ct-Ze+1,Xt=Ne-Ze+1,Gt=Math.log(Bt),on=.5*Math.exp(2*Gt/3),vn=.5*Math.sqrt(Gt*on*(Bt-on)/Bt)*(Xt-Bt/2<0?-1:1),Cn=Math.max(Ze,Math.floor(Ne-Xt*on/Bt+vn)),En=Math.min(ct,Math.floor(Ne+(Bt-Xt)*on/Bt+vn));xe(Ce,Ne,Cn,En,gt)}var Vn=Ce[Ne],qn=Ze,Xn=ct;for(g1(Ce,Ze,Ne),gt(Ce[ct],Vn)>0&&g1(Ce,Ze,ct);qn0;)Xn--}gt(Ce[Ze],Vn)===0?g1(Ce,Ze,Xn):(Xn++,g1(Ce,Xn,ct)),Xn<=Ne&&(Ze=Xn+1),Ne<=Xn&&(ct=Xn-1)}})(C,F,J||0,oe||C.length-1,pe||u$)}function g1(C,F,J){var oe=C[F];C[F]=C[J],C[J]=oe}function u$(C,F){return CF?1:0}function J3(C,F){var J=C.length;if(J<=1)return[C];for(var oe,pe,xe=[],Ce=0;Ce1)for(var Ze=0;Ze0&&(oe+=C[pe-1].length,J.holes.push(oe))}return J},W3.default=KH;var Ic=function(C){this.zoom=C.zoom,this.overscaling=C.overscaling,this.layers=C.layers,this.layerIds=this.layers.map(function(F){return F.id}),this.index=C.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new yu,this.indexArray=new rs,this.indexArray2=new V,this.programConfigurations=new Ha(K8,C.layers,C.zoom),this.segments=new Nt,this.segments2=new Nt,this.stateDependentLayerIds=this.layers.filter(function(F){return F.isStateDependent()}).map(function(F){return F.id})};Ic.prototype.populate=function(C,F,J){this.hasPattern=K3("fill",this.layers,F);for(var oe=this.layers[0].layout.get("fill-sort-key"),pe=[],xe=0,Ce=C;xe>3}if(pe--,oe===1||oe===2)xe+=C.readSVarint(),Ce+=C.readSVarint(),oe===1&&(F&&Ne.push(F),F=[]),F.push(new h(xe,Ce));else{if(oe!==7)throw new Error("unknown command "+oe);F&&F.push(F[0].clone())}}return F&&Ne.push(F),Ne},og.prototype.bbox=function(){var C=this._pbf;C.pos=this._geometry;for(var F=C.readVarint()+C.pos,J=1,oe=0,pe=0,xe=0,Ce=1/0,Ne=-1/0,Ze=1/0,ct=-1/0;C.pos>3}if(oe--,J===1||J===2)(pe+=C.readSVarint())Ne&&(Ne=pe),(xe+=C.readSVarint())ct&&(ct=xe);else if(J!==7)throw new Error("unknown command "+J)}return[Ce,Ze,Ne,ct]},og.prototype.toGeoJSON=function(C,F,J){var oe,pe,xe=this.extent*Math.pow(2,J),Ce=this.extent*C,Ne=this.extent*F,Ze=this.loadGeometry(),ct=og.types[this.type];function gt(Gt){for(var on=0;on>3;pe=Ce===1?oe.readString():Ce===2?oe.readFloat():Ce===3?oe.readDouble():Ce===4?oe.readVarint64():Ce===5?oe.readVarint():Ce===6?oe.readSVarint():Ce===7?oe.readBoolean():null}return pe}(J))}function v$(C,F,J){if(C===3){var oe=new a9(J,J.readVarint()+J.pos);oe.length&&(F[oe.name]=oe)}}o9.prototype.feature=function(C){if(C<0||C>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[C];var F=this._pbf.readVarint()+this._pbf.pos;return new i9(this._pbf,F,this.extent,this._keys,this._values)};var sg={VectorTile:function(C,F){this.layers=C.readFields(v$,{},F)},VectorTileFeature:i9,VectorTileLayer:a9},y$=sg.VectorTileFeature.types,e5=Math.pow(2,13);function m1(C,F,J,oe,pe,xe,Ce,Ne){C.emplaceBack(F,J,2*Math.floor(oe*e5)+Ce,pe*e5*2,xe*e5*2,Math.round(Ne))}var zc=function(C){this.zoom=C.zoom,this.overscaling=C.overscaling,this.layers=C.layers,this.layerIds=this.layers.map(function(F){return F.id}),this.index=C.index,this.hasPattern=!1,this.layoutVertexArray=new Hu,this.indexArray=new rs,this.programConfigurations=new Ha(r9,C.layers,C.zoom),this.segments=new Nt,this.stateDependentLayerIds=this.layers.filter(function(F){return F.isStateDependent()}).map(function(F){return F.id})};function x$(C,F){return C.x===F.x&&(C.x<0||C.x>8192)||C.y===F.y&&(C.y<0||C.y>8192)}function b$(C){return C.every(function(F){return F.x<0})||C.every(function(F){return F.x>8192})||C.every(function(F){return F.y<0})||C.every(function(F){return F.y>8192})}zc.prototype.populate=function(C,F,J){this.features=[],this.hasPattern=K3("fill-extrusion",this.layers,F);for(var oe=0,pe=C;oe=1){var Vn=on[Cn-1];if(!x$(En,Vn)){Bt.vertexLength+4>Nt.MAX_VERTEX_ARRAY_LENGTH&&(Bt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var qn=En.sub(Vn)._perp()._unit(),Xn=Vn.dist(En);vn+Xn>32768&&(vn=0),m1(this.layoutVertexArray,En.x,En.y,qn.x,qn.y,0,0,vn),m1(this.layoutVertexArray,En.x,En.y,qn.x,qn.y,0,1,vn),vn+=Xn,m1(this.layoutVertexArray,Vn.x,Vn.y,qn.x,qn.y,0,0,vn),m1(this.layoutVertexArray,Vn.x,Vn.y,qn.x,qn.y,0,1,vn);var dr=Bt.vertexLength;this.indexArray.emplaceBack(dr,dr+2,dr+1),this.indexArray.emplaceBack(dr+1,dr+2,dr+3),Bt.vertexLength+=4,Bt.primitiveLength+=2}}}}if(Bt.vertexLength+Ze>Nt.MAX_VERTEX_ARRAY_LENGTH&&(Bt=this.segments.prepareSegment(Ze,this.layoutVertexArray,this.indexArray)),y$[C.type]==="Polygon"){for(var br=[],Hr=[],Vr=Bt.vertexLength,ei=0,vi=Ne;ei=2&&C[Ze-1].equals(C[Ze-2]);)Ze--;for(var ct=0;ct0;if(Hr&&En>ct){var ei=gt.dist(Gt);if(ei>2*Bt){var vi=gt.sub(gt.sub(Gt)._mult(Bt/ei)._round());this.updateDistance(Gt,vi),this.addCurrentVertex(vi,vn,0,0,Xt),Gt=vi}}var yi=Gt&&on,li=yi?J:Ne?"butt":oe;if(yi&&li==="round"&&(drpe&&(li="bevel"),li==="bevel"&&(dr>2&&(li="flipbevel"),dr100)Vn=Cn.mult(-1);else{var Si=dr*vn.add(Cn).mag()/vn.sub(Cn).mag();Vn._perp()._mult(Si*(Vr?-1:1))}this.addCurrentVertex(gt,Vn,0,0,Xt),this.addCurrentVertex(gt,Vn.mult(-1),0,0,Xt)}else if(li==="bevel"||li==="fakeround"){var Ai=-Math.sqrt(dr*dr-1),xi=Vr?Ai:0,Ta=Vr?0:Ai;if(Gt&&this.addCurrentVertex(gt,vn,xi,Ta,Xt),li==="fakeround")for(var da=Math.round(180*br/Math.PI/20),Oa=1;Oa2*Bt){var Ga=gt.add(on.sub(gt)._mult(Bt/po)._round());this.updateDistance(gt,Ga),this.addCurrentVertex(Ga,Cn,0,0,Xt),gt=Ga}}}}},El.prototype.addCurrentVertex=function(C,F,J,oe,pe,xe){xe===void 0&&(xe=!1);var Ce=F.x+F.y*J,Ne=F.y-F.x*J,Ze=-F.x+F.y*oe,ct=-F.y-F.x*oe;this.addHalfVertex(C,Ce,Ne,xe,!1,J,pe),this.addHalfVertex(C,Ze,ct,xe,!0,-oe,pe),this.distance>u9/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(C,F,J,oe,pe,xe))},El.prototype.addHalfVertex=function(C,F,J,oe,pe,xe,Ce){var Ne=C.x,Ze=C.y,ct=.5*this.scaledDistance;this.layoutVertexArray.emplaceBack((Ne<<1)+(oe?1:0),(Ze<<1)+(pe?1:0),Math.round(63*F)+128,Math.round(63*J)+128,1+(xe===0?0:xe<0?-1:1)|(63&ct)<<2,ct>>6);var gt=Ce.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,gt),Ce.primitiveLength++),pe?this.e2=gt:this.e1=gt},El.prototype.updateScaledDistance=function(){this.scaledDistance=this.totalDistance>0?(this.clipStart+(this.clipEnd-this.clipStart)*this.distance/this.totalDistance)*(u9-1):this.distance},El.prototype.updateDistance=function(C,F){this.distance+=C.dist(F),this.updateScaledDistance()},Qn("LineBucket",El,{omit:["layers","patternFeatures"]});var A$=new Us({"line-cap":new wi(De.layout_line["line-cap"]),"line-join":new Di(De.layout_line["line-join"]),"line-miter-limit":new wi(De.layout_line["line-miter-limit"]),"line-round-limit":new wi(De.layout_line["line-round-limit"]),"line-sort-key":new Di(De.layout_line["line-sort-key"])}),c9={paint:new Us({"line-opacity":new Di(De.paint_line["line-opacity"]),"line-color":new Di(De.paint_line["line-color"]),"line-translate":new wi(De.paint_line["line-translate"]),"line-translate-anchor":new wi(De.paint_line["line-translate-anchor"]),"line-width":new Di(De.paint_line["line-width"]),"line-gap-width":new Di(De.paint_line["line-gap-width"]),"line-offset":new Di(De.paint_line["line-offset"]),"line-blur":new Di(De.paint_line["line-blur"]),"line-dasharray":new Tf(De.paint_line["line-dasharray"]),"line-pattern":new kf(De.paint_line["line-pattern"]),"line-gradient":new Jl(De.paint_line["line-gradient"])}),layout:A$},f9=new(function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype.possiblyEvaluate=function(J,oe){return oe=new Pa(Math.floor(oe.zoom),{now:oe.now,fadeDuration:oe.fadeDuration,zoomHistory:oe.zoomHistory,transition:oe.transition}),C.prototype.possiblyEvaluate.call(this,J,oe)},F.prototype.evaluate=function(J,oe,pe,xe){return oe=x({},oe,{zoom:Math.floor(oe.zoom)}),C.prototype.evaluate.call(this,J,oe,pe,xe)},F}(Di))(c9.paint.properties["line-width"].specification);f9.useIntegerZoom=!0;var M$=function(C){function F(J){C.call(this,J,c9)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype._handleSpecialPaintPropertyUpdate=function(J){J==="line-gradient"&&this._updateGradient()},F.prototype._updateGradient=function(){var J=this._transitionablePaint._values["line-gradient"].value.expression;this.gradient=J8(J,"lineProgress"),this.gradientTexture=null},F.prototype.recalculate=function(J,oe){C.prototype.recalculate.call(this,J,oe),this.paint._values["line-floorwidth"]=f9.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,J)},F.prototype.createBucket=function(J){return new El(J)},F.prototype.queryRadius=function(J){var oe=J,pe=h9(fo("line-width",this,oe),fo("line-gap-width",this,oe)),xe=fo("line-offset",this,oe);return pe/2+Math.abs(xe)+Vs(this.paint.get("line-translate"))},F.prototype.queryIntersectsFeature=function(J,oe,pe,xe,Ce,Ne,Ze){var ct=qs(J,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),Ne.angle,Ze),gt=Ze/2*h9(this.paint.get("line-width").evaluate(oe,pe),this.paint.get("line-gap-width").evaluate(oe,pe)),Bt=this.paint.get("line-offset").evaluate(oe,pe);return Bt&&(xe=function(Xt,Gt){for(var on=[],vn=new h(0,0),Cn=0;Cn=3){for(var En=0;En0?F+2*C:C}var t5=Da([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),S$=Da([{name:"a_projected_pos",components:3,type:"Float32"}],4),E$=(Da([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),Da([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}])),d9=(Da([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]),Da([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),C$=Da([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);Da([{name:"triangle",components:3,type:"Uint16"}]),Da([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),Da([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",components:2,name:"textOffset"},{type:"Float32",name:"collisionCircleDiameter"}]),Da([{type:"Float32",name:"offsetX"}]),Da([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);function O$(C,F,J){return C.sections.forEach(function(oe){oe.text=function(pe,xe,Ce){var Ne=xe.layout.get("text-transform").evaluate(Ce,{});return Ne==="uppercase"?pe=pe.toLocaleUpperCase():Ne==="lowercase"&&(pe=pe.toLocaleLowerCase()),ps.applyArabicShaping&&(pe=ps.applyArabicShaping(pe)),pe}(oe.text,F,J)}),C}var y1={"!":"\uFE15","#":"\uFF03",$:"\uFF04","%":"\uFF05","&":"\uFF06","(":"\uFE35",")":"\uFE36","*":"\uFF0A","+":"\uFF0B",",":"\uFE10","-":"\uFE32",".":"\u30FB","/":"\uFF0F",":":"\uFE13",";":"\uFE14","<":"\uFE3F","=":"\uFF1D",">":"\uFE40","?":"\uFE16","@":"\uFF20","[":"\uFE47","\\":"\uFF3C","]":"\uFE48","^":"\uFF3E",_:"\uFE33","`":"\uFF40","{":"\uFE37","|":"\u2015","}":"\uFE38","~":"\uFF5E","\xA2":"\uFFE0","\xA3":"\uFFE1","\xA5":"\uFFE5","\xA6":"\uFFE4","\xAC":"\uFFE2","\xAF":"\uFFE3","\u2013":"\uFE32","\u2014":"\uFE31","\u2018":"\uFE43","\u2019":"\uFE44","\u201C":"\uFE41","\u201D":"\uFE42","\u2026":"\uFE19","\u2027":"\u30FB","\u20A9":"\uFFE6","\u3001":"\uFE11","\u3002":"\uFE12","\u3008":"\uFE3F","\u3009":"\uFE40","\u300A":"\uFE3D","\u300B":"\uFE3E","\u300C":"\uFE41","\u300D":"\uFE42","\u300E":"\uFE43","\u300F":"\uFE44","\u3010":"\uFE3B","\u3011":"\uFE3C","\u3014":"\uFE39","\u3015":"\uFE3A","\u3016":"\uFE17","\u3017":"\uFE18","\uFF01":"\uFE15","\uFF08":"\uFE35","\uFF09":"\uFE36","\uFF0C":"\uFE10","\uFF0D":"\uFE32","\uFF0E":"\u30FB","\uFF1A":"\uFE13","\uFF1B":"\uFE14","\uFF1C":"\uFE3F","\uFF1E":"\uFE40","\uFF1F":"\uFE16","\uFF3B":"\uFE47","\uFF3D":"\uFE48","\uFF3F":"\uFE33","\uFF5B":"\uFE37","\uFF5C":"\u2015","\uFF5D":"\uFE38","\uFF5F":"\uFE35","\uFF60":"\uFE36","\uFF61":"\uFE12","\uFF62":"\uFE41","\uFF63":"\uFE42"},p9=function(C,F,J,oe,pe){var xe,Ce,Ne=8*pe-oe-1,Ze=(1<>1,gt=-7,Bt=J?pe-1:0,Xt=J?-1:1,Gt=C[F+Bt];for(Bt+=Xt,xe=Gt&(1<<-gt)-1,Gt>>=-gt,gt+=Ne;gt>0;xe=256*xe+C[F+Bt],Bt+=Xt,gt-=8);for(Ce=xe&(1<<-gt)-1,xe>>=-gt,gt+=oe;gt>0;Ce=256*Ce+C[F+Bt],Bt+=Xt,gt-=8);if(xe===0)xe=1-ct;else{if(xe===Ze)return Ce?NaN:1/0*(Gt?-1:1);Ce+=Math.pow(2,oe),xe-=ct}return(Gt?-1:1)*Ce*Math.pow(2,xe-oe)},g9=function(C,F,J,oe,pe,xe){var Ce,Ne,Ze,ct=8*xe-pe-1,gt=(1<>1,Xt=pe===23?Math.pow(2,-24)-Math.pow(2,-77):0,Gt=oe?0:xe-1,on=oe?1:-1,vn=F<0||F===0&&1/F<0?1:0;for(F=Math.abs(F),isNaN(F)||F===1/0?(Ne=isNaN(F)?1:0,Ce=gt):(Ce=Math.floor(Math.log(F)/Math.LN2),F*(Ze=Math.pow(2,-Ce))<1&&(Ce--,Ze*=2),(F+=Ce+Bt>=1?Xt/Ze:Xt*Math.pow(2,1-Bt))*Ze>=2&&(Ce++,Ze/=2),Ce+Bt>=gt?(Ne=0,Ce=gt):Ce+Bt>=1?(Ne=(F*Ze-1)*Math.pow(2,pe),Ce+=Bt):(Ne=F*Math.pow(2,Bt-1)*Math.pow(2,pe),Ce=0));pe>=8;C[J+Gt]=255&Ne,Gt+=on,Ne/=256,pe-=8);for(Ce=Ce<0;C[J+Gt]=255&Ce,Gt+=on,Ce/=256,ct-=8);C[J+Gt-on]|=128*vn},yx=to;function to(C){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(C)?C:new Uint8Array(C||0),this.pos=0,this.type=0,this.length=this.buf.length}to.Varint=0,to.Fixed64=1,to.Bytes=2,to.Fixed32=5;var m9=typeof TextDecoder>"u"?null:new TextDecoder("utf8");function xh(C){return C.type===to.Bytes?C.readVarint()+C.pos:C.pos+1}function lg(C,F,J){return J?4294967296*F+(C>>>0):4294967296*(F>>>0)+(C>>>0)}function v9(C,F,J){var oe=F<=16383?1:F<=2097151?2:F<=268435455?3:Math.floor(Math.log(F)/(7*Math.LN2));J.realloc(oe);for(var pe=J.pos-1;pe>=C;pe--)J.buf[pe+oe]=J.buf[pe]}function L$(C,F){for(var J=0;J>>8,C[J+2]=F>>>16,C[J+3]=F>>>24}function y9(C,F){return(C[F]|C[F+1]<<8|C[F+2]<<16)+(C[F+3]<<24)}to.prototype={destroy:function(){this.buf=null},readFields:function(C,F,J){for(J=J||this.length;this.pos>3,xe=this.pos;this.type=7&oe,C(pe,F,this),this.pos===xe&&this.skip(oe)}return F},readMessage:function(C,F){return this.readFields(C,F,this.readVarint()+this.pos)},readFixed32:function(){var C=xx(this.buf,this.pos);return this.pos+=4,C},readSFixed32:function(){var C=y9(this.buf,this.pos);return this.pos+=4,C},readFixed64:function(){var C=xx(this.buf,this.pos)+4294967296*xx(this.buf,this.pos+4);return this.pos+=8,C},readSFixed64:function(){var C=xx(this.buf,this.pos)+4294967296*y9(this.buf,this.pos+4);return this.pos+=8,C},readFloat:function(){var C=p9(this.buf,this.pos,!0,23,4);return this.pos+=4,C},readDouble:function(){var C=p9(this.buf,this.pos,!0,52,8);return this.pos+=8,C},readVarint:function(C){var F,J,oe=this.buf;return F=127&(J=oe[this.pos++]),J<128?F:(F|=(127&(J=oe[this.pos++]))<<7,J<128?F:(F|=(127&(J=oe[this.pos++]))<<14,J<128?F:(F|=(127&(J=oe[this.pos++]))<<21,J<128?F:function(pe,xe,Ce){var Ne,Ze,ct=Ce.buf;if(Ze=ct[Ce.pos++],Ne=(112&Ze)>>4,Ze<128||(Ze=ct[Ce.pos++],Ne|=(127&Ze)<<3,Ze<128)||(Ze=ct[Ce.pos++],Ne|=(127&Ze)<<10,Ze<128)||(Ze=ct[Ce.pos++],Ne|=(127&Ze)<<17,Ze<128)||(Ze=ct[Ce.pos++],Ne|=(127&Ze)<<24,Ze<128)||(Ze=ct[Ce.pos++],Ne|=(1&Ze)<<31,Ze<128))return lg(pe,Ne,xe);throw new Error("Expected varint not more than 10 bytes")}(F|=(15&(J=oe[this.pos]))<<28,C,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var C=this.readVarint();return C%2==1?(C+1)/-2:C/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var C=this.readVarint()+this.pos,F=this.pos;return this.pos=C,C-F>=12&&m9?function(J,oe,pe){return m9.decode(J.subarray(oe,pe))}(this.buf,F,C):function(J,oe,pe){for(var xe="",Ce=oe;Ce239?4:gt>223?3:gt>191?2:1;if(Ce+Xt>pe)break;Xt===1?gt<128&&(Bt=gt):Xt===2?(192&(Ne=J[Ce+1]))==128&&(Bt=(31>)<<6|63&Ne)<=127&&(Bt=null):Xt===3?(Ne=J[Ce+1],Ze=J[Ce+2],(192&Ne)==128&&(192&Ze)==128&&((Bt=(15>)<<12|(63&Ne)<<6|63&Ze)<=2047||Bt>=55296&&Bt<=57343)&&(Bt=null)):Xt===4&&(Ne=J[Ce+1],Ze=J[Ce+2],ct=J[Ce+3],(192&Ne)==128&&(192&Ze)==128&&(192&ct)==128&&((Bt=(15>)<<18|(63&Ne)<<12|(63&Ze)<<6|63&ct)<=65535||Bt>=1114112)&&(Bt=null)),Bt===null?(Bt=65533,Xt=1):Bt>65535&&(Bt-=65536,xe+=String.fromCharCode(Bt>>>10&1023|55296),Bt=56320|1023&Bt),xe+=String.fromCharCode(Bt),Ce+=Xt}return xe}(this.buf,F,C)},readBytes:function(){var C=this.readVarint()+this.pos,F=this.buf.subarray(this.pos,C);return this.pos=C,F},readPackedVarint:function(C,F){if(this.type!==to.Bytes)return C.push(this.readVarint(F));var J=xh(this);for(C=C||[];this.pos127;);else if(F===to.Bytes)this.pos=this.readVarint()+this.pos;else if(F===to.Fixed32)this.pos+=4;else{if(F!==to.Fixed64)throw new Error("Unimplemented type: "+F);this.pos+=8}},writeTag:function(C,F){this.writeVarint(C<<3|F)},realloc:function(C){for(var F=this.length||16;F268435455||C<0?function(F,J){var oe,pe;if(F>=0?(oe=F%4294967296|0,pe=F/4294967296|0):(pe=~(-F/4294967296),4294967295^(oe=~(-F%4294967296))?oe=oe+1|0:(oe=0,pe=pe+1|0)),F>=18446744073709552e3||F<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");J.realloc(10),function(xe,Ce,Ne){Ne.buf[Ne.pos++]=127&xe|128,xe>>>=7,Ne.buf[Ne.pos++]=127&xe|128,xe>>>=7,Ne.buf[Ne.pos++]=127&xe|128,xe>>>=7,Ne.buf[Ne.pos++]=127&xe|128,xe>>>=7,Ne.buf[Ne.pos]=127&xe}(oe,0,J),function(xe,Ce){var Ne=(7&xe)<<4;Ce.buf[Ce.pos++]|=Ne|((xe>>>=3)?128:0),xe&&(Ce.buf[Ce.pos++]=127&xe|((xe>>>=7)?128:0),xe&&(Ce.buf[Ce.pos++]=127&xe|((xe>>>=7)?128:0),xe&&(Ce.buf[Ce.pos++]=127&xe|((xe>>>=7)?128:0),xe&&(Ce.buf[Ce.pos++]=127&xe|((xe>>>=7)?128:0),xe&&(Ce.buf[Ce.pos++]=127&xe)))))}(pe,J)}(C,this):(this.realloc(4),this.buf[this.pos++]=127&C|(C>127?128:0),C<=127||(this.buf[this.pos++]=127&(C>>>=7)|(C>127?128:0),C<=127||(this.buf[this.pos++]=127&(C>>>=7)|(C>127?128:0),C<=127||(this.buf[this.pos++]=C>>>7&127))))},writeSVarint:function(C){this.writeVarint(C<0?2*-C-1:2*C)},writeBoolean:function(C){this.writeVarint(Boolean(C))},writeString:function(C){C=String(C),this.realloc(4*C.length),this.pos++;var F=this.pos;this.pos=function(oe,pe,xe){for(var Ce,Ne,Ze=0;Ze55295&&Ce<57344){if(!Ne){Ce>56319||Ze+1===pe.length?(oe[xe++]=239,oe[xe++]=191,oe[xe++]=189):Ne=Ce;continue}if(Ce<56320){oe[xe++]=239,oe[xe++]=191,oe[xe++]=189,Ne=Ce;continue}Ce=Ne-55296<<10|Ce-56320|65536,Ne=null}else Ne&&(oe[xe++]=239,oe[xe++]=191,oe[xe++]=189,Ne=null);Ce<128?oe[xe++]=Ce:(Ce<2048?oe[xe++]=Ce>>6|192:(Ce<65536?oe[xe++]=Ce>>12|224:(oe[xe++]=Ce>>18|240,oe[xe++]=Ce>>12&63|128),oe[xe++]=Ce>>6&63|128),oe[xe++]=63&Ce|128)}return xe}(this.buf,C,this.pos);var J=this.pos-F;J>=128&&v9(F,J,this),this.pos=F-1,this.writeVarint(J),this.pos+=J},writeFloat:function(C){this.realloc(4),g9(this.buf,C,this.pos,!0,23,4),this.pos+=4},writeDouble:function(C){this.realloc(8),g9(this.buf,C,this.pos,!0,52,8),this.pos+=8},writeBytes:function(C){var F=C.length;this.writeVarint(F),this.realloc(F);for(var J=0;J=128&&v9(J,oe,this),this.pos=J-1,this.writeVarint(oe),this.pos+=oe},writeMessage:function(C,F,J){this.writeTag(C,to.Bytes),this.writeRawMessage(F,J)},writePackedVarint:function(C,F){F.length&&this.writeMessage(C,L$,F)},writePackedSVarint:function(C,F){F.length&&this.writeMessage(C,P$,F)},writePackedBoolean:function(C,F){F.length&&this.writeMessage(C,z$,F)},writePackedFloat:function(C,F){F.length&&this.writeMessage(C,D$,F)},writePackedDouble:function(C,F){F.length&&this.writeMessage(C,I$,F)},writePackedFixed32:function(C,F){F.length&&this.writeMessage(C,R$,F)},writePackedSFixed32:function(C,F){F.length&&this.writeMessage(C,F$,F)},writePackedFixed64:function(C,F){F.length&&this.writeMessage(C,N$,F)},writePackedSFixed64:function(C,F){F.length&&this.writeMessage(C,B$,F)},writeBytesField:function(C,F){this.writeTag(C,to.Bytes),this.writeBytes(F)},writeFixed32Field:function(C,F){this.writeTag(C,to.Fixed32),this.writeFixed32(F)},writeSFixed32Field:function(C,F){this.writeTag(C,to.Fixed32),this.writeSFixed32(F)},writeFixed64Field:function(C,F){this.writeTag(C,to.Fixed64),this.writeFixed64(F)},writeSFixed64Field:function(C,F){this.writeTag(C,to.Fixed64),this.writeSFixed64(F)},writeVarintField:function(C,F){this.writeTag(C,to.Varint),this.writeVarint(F)},writeSVarintField:function(C,F){this.writeTag(C,to.Varint),this.writeSVarint(F)},writeStringField:function(C,F){this.writeTag(C,to.Bytes),this.writeString(F)},writeFloatField:function(C,F){this.writeTag(C,to.Fixed32),this.writeFloat(F)},writeDoubleField:function(C,F){this.writeTag(C,to.Fixed64),this.writeDouble(F)},writeBooleanField:function(C,F){this.writeVarintField(C,Boolean(F))}};function j$(C,F,J){C===1&&J.readMessage(U$,F)}function U$(C,F,J){if(C===3){var oe=J.readMessage(V$,{}),pe=oe.id,xe=oe.bitmap,Ce=oe.width,Ne=oe.height,Ze=oe.left,ct=oe.top,gt=oe.advance;F.push({id:pe,bitmap:new Lp({width:Ce+6,height:Ne+6},xe),metrics:{width:Ce,height:Ne,left:Ze,top:ct,advance:gt}})}}function V$(C,F,J){C===1?F.id=J.readVarint():C===2?F.bitmap=J.readBytes():C===3?F.width=J.readVarint():C===4?F.height=J.readVarint():C===5?F.left=J.readSVarint():C===6?F.top=J.readSVarint():C===7&&(F.advance=J.readVarint())}function x9(C){for(var F=0,J=0,oe=0,pe=C;oe=0;Xt--){var Gt=Ce[Xt];if(!(Bt.w>Gt.w||Bt.h>Gt.h)){if(Bt.x=Gt.x,Bt.y=Gt.y,Ze=Math.max(Ze,Bt.y+Bt.h),Ne=Math.max(Ne,Bt.x+Bt.w),Bt.w===Gt.w&&Bt.h===Gt.h){var on=Ce.pop();Xt0&&yg>Eo&&(Eo=yg)}else{var Lx=da[Ia.fontStack],zp=Lx&&Lx[yl];if(zp&&zp.rect)Rc=zp.rect,el=zp.metrics;else{var Px=Ta[Ia.fontStack],Dx=Px&&Px[yl];if(!Dx)continue;el=Dx.metrics}eu=24*(aa-Ia.scale)}Fc?(xi.verticalizable=!0,Io.push({glyph:yl,imageName:wh,x:Hs,y:Es+eu,vertical:Fc,scale:Ia.scale,fontStack:Ia.fontStack,sectionIndex:zo,metrics:el,rect:Rc}),Hs+=Cs*Ia.scale+Ga):(Io.push({glyph:yl,imageName:wh,x:Hs,y:Es+eu,vertical:Fc,scale:Ia.scale,fontStack:Ia.fontStack,sectionIndex:zo,metrics:el,rect:Rc}),Hs+=el.advance*Ia.scale+Ga)}if(Io.length!==0){var Ix=Hs-Ga;Ps=Math.max(Ix,Ps),H$(Io,0,Io.length-1,Qs,Eo)}Hs=0;var zx=va*aa+Eo;Do.lineOffset=Math.max(Eo,Ma),Es+=zx,vl=Math.max(zx,vl),++ls}else Es+=va,++ls}var dd,xg=Es- -17,Rx=r5(no),bg=Rx.horizontalAlign,pd=Rx.verticalAlign;(function(k1,Fx,Nx,Bx,T1,jx,A1,Ux,M1){var Vx=(Fx-Nx)*T1,_g=0;_g=jx!==A1?-Ux*Bx- -17:(-Bx*M1+.5)*A1;for(var wg=0,kg=k1;wg=0&&oe>=C&&wx[this.text.charCodeAt(oe)];oe--)J--;this.text=this.text.substring(C,J),this.sectionIndex=this.sectionIndex.slice(C,J)},Ks.prototype.substring=function(C,F){var J=new Ks;return J.text=this.text.substring(C,F),J.sectionIndex=this.sectionIndex.slice(C,F),J.sections=this.sections,J},Ks.prototype.toString=function(){return this.text},Ks.prototype.getMaxScale=function(){var C=this;return this.sectionIndex.reduce(function(F,J){return Math.max(F,C.sections[J].scale)},0)},Ks.prototype.addTextSection=function(C,F){this.text+=C.text,this.sections.push(cg.forText(C.scale,C.fontStack||F));for(var J=this.sections.length-1,oe=0;oe=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)};var wx={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},Ql={};function b9(C,F,J,oe,pe,xe){if(F.imageName){var Ce=oe[F.imageName];return Ce?Ce.displaySize[0]*F.scale*24/xe+pe:0}var Ne=J[F.fontStack],Ze=Ne&&Ne[C];return Ze?Ze.metrics.advance*F.scale+pe:0}function _9(C,F,J,oe){var pe=Math.pow(C-F,2);return oe?C=0,Bt=0,Xt=0;Xt-J/2;){if(--Ce<0)return!1;Ne-=C[Ce].dist(xe),xe=C[Ce]}Ne+=C[Ce].dist(C[Ce+1]),Ce++;for(var Ze=[],ct=0;Neoe;)ct-=Ze.shift().angleDelta;if(ct>pe)return!1;Ce++,Ne+=Bt.dist(Xt)}return!0}function S9(C){for(var F=0,J=0;Jct){var on=(ct-Ze)/Gt,vn=kr(Bt.x,Xt.x,on),Cn=kr(Bt.y,Xt.y,on),En=new fg(vn,Cn,Xt.angleTo(Bt),gt);return En._round(),!Ce||M9(C,En,Ne,Ce,F)?En:void 0}Ze+=Gt}}function W$(C,F,J,oe,pe,xe,Ce,Ne,Ze){var ct=E9(oe,xe,Ce),gt=C9(oe,pe),Bt=gt*Ce,Xt=C[0].x===0||C[0].x===Ze||C[0].y===0||C[0].y===Ze;return F-Bt=0&&Oa=0&&Fi=0&&vi+Hr<=Vr){var va=new fg(Oa,Fi,Ta,li);va._round(),En&&!M9(on,va,qn,En,Vn)||yi.push(va)}}ei+=xi}return dr||yi.length||Xn||(yi=Gt(on,ei/2,Cn,En,Vn,qn,Xn,!0,br)),yi}(C,Xt?F/2*Ne%F:(gt/2+2*xe)*Ce*Ne%F,F,ct,J,Bt,Xt,!1,Ze)}function O9(C,F,J,oe,pe){for(var xe=[],Ce=0;Ce=oe&&Bt.x>=oe||(gt.x>=oe?gt=new h(oe,gt.y+(Bt.y-gt.y)*((oe-gt.x)/(Bt.x-gt.x)))._round():Bt.x>=oe&&(Bt=new h(oe,gt.y+(Bt.y-gt.y)*((oe-gt.x)/(Bt.x-gt.x)))._round()),gt.y>=pe&&Bt.y>=pe||(gt.y>=pe?gt=new h(gt.x+(Bt.x-gt.x)*((pe-gt.y)/(Bt.y-gt.y)),pe)._round():Bt.y>=pe&&(Bt=new h(gt.x+(Bt.x-gt.x)*((pe-gt.y)/(Bt.y-gt.y)),pe)._round()),Ze&>.equals(Ze[Ze.length-1])||(Ze=[gt],xe.push(Ze)),Ze.push(Bt)))))}return xe}function L9(C,F,J,oe){var pe=[],xe=C.image,Ce=xe.pixelRatio,Ne=xe.paddedRect.w-2,Ze=xe.paddedRect.h-2,ct=C.right-C.left,gt=C.bottom-C.top,Bt=xe.stretchX||[[0,Ne]],Xt=xe.stretchY||[[0,Ze]],Gt=function(va,no){return va+no[1]-no[0]},on=Bt.reduce(Gt,0),vn=Xt.reduce(Gt,0),Cn=Ne-on,En=Ze-vn,Vn=0,qn=on,Xn=0,dr=vn,br=0,Hr=Cn,Vr=0,ei=En;if(xe.content&&oe){var vi=xe.content;Vn=kx(Bt,0,vi[0]),Xn=kx(Xt,0,vi[1]),qn=kx(Bt,vi[0],vi[2]),dr=kx(Xt,vi[1],vi[3]),br=vi[0]-Vn,Vr=vi[1]-Xn,Hr=vi[2]-vi[0]-qn,ei=vi[3]-vi[1]-dr}var yi=function(va,no,$a,po){var Ga=Tx(va.stretch-Vn,qn,ct,C.left),ss=Ax(va.fixed-br,Hr,va.stretch,on),go=Tx(no.stretch-Xn,dr,gt,C.top),Hs=Ax(no.fixed-Vr,ei,no.stretch,vn),Es=Tx($a.stretch-Vn,qn,ct,C.left),Ps=Ax($a.fixed-br,Hr,$a.stretch,on),vl=Tx(po.stretch-Xn,dr,gt,C.top),Qs=Ax(po.fixed-Vr,ei,po.stretch,vn),ls=new h(Ga,go),Ds=new h(Es,go),Go=new h(Es,vl),gs=new h(Ga,vl),aa=new h(ss/Ce,Hs/Ce),Ma=new h(Ps/Ce,Qs/Ce),Do=F*Math.PI/180;if(Do){var Io=Math.sin(Do),Eo=Math.cos(Do),mo=[Eo,-Io,Io,Eo];ls._matMult(mo),Ds._matMult(mo),gs._matMult(mo),Go._matMult(mo)}var Ia=va.stretch+va.fixed,zo=$a.stretch+$a.fixed,yl=no.stretch+no.fixed,eu=po.stretch+po.fixed;return{tl:ls,tr:Ds,bl:gs,br:Go,tex:{x:xe.paddedRect.x+1+Ia,y:xe.paddedRect.y+1+yl,w:zo-Ia,h:eu-yl},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:aa,pixelOffsetBR:Ma,minFontScaleX:Hr/Ce/ct,minFontScaleY:ei/Ce/gt,isSDF:J}};if(oe&&(xe.stretchX||xe.stretchY))for(var li=P9(Bt,Cn,on),Si=P9(Xt,En,vn),Ai=0;Ai0&&(Gt=Math.max(10,Gt),this.circleDiameter=Gt)}else{var on=xe.top*Ce-Ne,vn=xe.bottom*Ce+Ne,Cn=xe.left*Ce-Ne,En=xe.right*Ce+Ne,Vn=xe.collisionPadding;if(Vn&&(Cn-=Vn[0]*Ce,on-=Vn[1]*Ce,En+=Vn[2]*Ce,vn+=Vn[3]*Ce),ct){var qn=new h(Cn,on),Xn=new h(En,on),dr=new h(Cn,vn),br=new h(En,vn),Hr=ct*Math.PI/180;qn._rotate(Hr),Xn._rotate(Hr),dr._rotate(Hr),br._rotate(Hr),Cn=Math.min(qn.x,Xn.x,dr.x,br.x),En=Math.max(qn.x,Xn.x,dr.x,br.x),on=Math.min(qn.y,Xn.y,dr.y,br.y),vn=Math.max(qn.y,Xn.y,dr.y,br.y)}C.emplaceBack(F.x,F.y,Cn,on,En,vn,J,oe,pe)}this.boxEndIndex=C.length},hg=function(C,F){if(C===void 0&&(C=[]),F===void 0&&(F=Y$),this.data=C,this.length=this.data.length,this.compare=F,this.length>0)for(var J=(this.length>>1)-1;J>=0;J--)this._down(J)};function Y$(C,F){return CF?1:0}function X$(C,F,J){F===void 0&&(F=1),J===void 0&&(J=!1);for(var oe=1/0,pe=1/0,xe=-1/0,Ce=-1/0,Ne=C[0],Ze=0;Zexe)&&(xe=ct.x),(!Ze||ct.y>Ce)&&(Ce=ct.y)}var gt=xe-oe,Bt=Ce-pe,Xt=Math.min(gt,Bt),Gt=Xt/2,on=new hg([],Z$);if(Xt===0)return new h(oe,pe);for(var vn=oe;vnEn.d||!En.d)&&(En=qn,J&&console.log("found best %d after %d probes",Math.round(1e4*qn.d)/1e4,Vn)),qn.max-En.d<=F||(Gt=qn.h/2,on.push(new dg(qn.p.x-Gt,qn.p.y-Gt,Gt,C)),on.push(new dg(qn.p.x+Gt,qn.p.y-Gt,Gt,C)),on.push(new dg(qn.p.x-Gt,qn.p.y+Gt,Gt,C)),on.push(new dg(qn.p.x+Gt,qn.p.y+Gt,Gt,C)),Vn+=4)}return J&&(console.log("num probes: "+Vn),console.log("best distance: "+En.d)),En.p}function Z$(C,F){return F.max-C.max}function dg(C,F,J,oe){this.p=new h(C,F),this.h=J,this.d=function(pe,xe){for(var Ce=!1,Ne=1/0,Ze=0;Zepe.y!=on.y>pe.y&&pe.x<(on.x-Gt.x)*(pe.y-Gt.y)/(on.y-Gt.y)+Gt.x&&(Ce=!Ce),Ne=Math.min(Ne,vh(pe,Gt,on))}return(Ce?1:-1)*Math.sqrt(Ne)}(this.p,oe),this.max=this.d+this.h*Math.SQRT2}hg.prototype.push=function(C){this.data.push(C),this.length++,this._up(this.length-1)},hg.prototype.pop=function(){if(this.length!==0){var C=this.data[0],F=this.data.pop();return this.length--,this.length>0&&(this.data[0]=F,this._down(0)),C}},hg.prototype.peek=function(){return this.data[0]},hg.prototype._up=function(C){for(var F=this.data,J=this.compare,oe=F[C];C>0;){var pe=C-1>>1,xe=F[pe];if(J(oe,xe)>=0)break;F[C]=xe,C=pe}F[C]=oe},hg.prototype._down=function(C){for(var F=this.data,J=this.compare,oe=this.length>>1,pe=F[C];C=0)break;F[C]=Ce,C=xe}F[C]=pe};var a5=Number.POSITIVE_INFINITY;function D9(C,F){return F[1]!==a5?function(J,oe,pe){var xe=0,Ce=0;switch(oe=Math.abs(oe),pe=Math.abs(pe),J){case"top-right":case"top-left":case"top":Ce=pe-7;break;case"bottom-right":case"bottom-left":case"bottom":Ce=7-pe}switch(J){case"top-right":case"bottom-right":case"right":xe=-oe;break;case"top-left":case"bottom-left":case"left":xe=oe}return[xe,Ce]}(C,F[0],F[1]):function(J,oe){var pe=0,xe=0;oe<0&&(oe=0);var Ce=oe/Math.sqrt(2);switch(J){case"top-right":case"top-left":xe=Ce-7;break;case"bottom-right":case"bottom-left":xe=7-Ce;break;case"bottom":xe=7-oe;break;case"top":xe=oe-7}switch(J){case"top-right":case"bottom-right":pe=-Ce;break;case"top-left":case"bottom-left":pe=Ce;break;case"left":pe=oe;break;case"right":pe=-oe}return[pe,xe]}(C,F[0])}function o5(C){switch(C){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function I9(C,F,J,oe,pe,xe,Ce,Ne,Ze,ct,gt,Bt,Xt,Gt,on){var vn=function(Xn,dr,br,Hr,Vr,ei,vi,yi){for(var li=Hr.layout.get("text-rotate").evaluate(ei,{})*Math.PI/180,Si=[],Ai=0,xi=dr.positionedLines;Ai32640&&O(C.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'):Cn.kind==="composite"&&((En=[128*Gt.compositeTextSizes[0].evaluate(Ce,{},on),128*Gt.compositeTextSizes[1].evaluate(Ce,{},on)])[0]>32640||En[1]>32640)&&O(C.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'),C.addSymbols(C.text,vn,En,Ne,xe,Ce,ct,F,Ze.lineStartIndex,Ze.lineLength,Xt,on);for(var Vn=0,qn=gt;Vn=0;Ce--)if(oe.dist(xe[Ce])0)&&(xe.value.kind!=="constant"||xe.value.value.length>0),ct=Ne.value.kind!=="constant"||!!Ne.value.value||Object.keys(Ne.parameters).length>0,gt=pe.get("symbol-sort-key");if(this.features=[],Ze||ct){for(var Bt=F.iconDependencies,Xt=F.glyphDependencies,Gt=F.availableImages,on=new Pa(this.zoom),vn=0,Cn=C;vn=0;for(var da=0,Oa=Vr.sections;da=0;Ne--)xe[Ne]={x:F[Ne].x,y:F[Ne].y,tileUnitDistanceFromAnchor:pe},Ne>0&&(pe+=F[Ne-1].dist(F[Ne]));for(var Ze=0;Ze0},ja.prototype.hasIconData=function(){return this.icon.segments.get().length>0},ja.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},ja.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},ja.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},ja.prototype.addIndicesForPlacedSymbol=function(C,F){for(var J=C.placedSymbolArray.get(F),oe=J.vertexStartIndex+4*J.numGlyphs,pe=J.vertexStartIndex;pe1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(C),this.sortedAngle=C,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var J=0,oe=this.symbolInstanceIndexes;J=0&&Ze.indexOf(Ce)===Ne&&F.addIndicesForPlacedSymbol(F.text,Ce)}),xe.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,xe.verticalPlacedTextSymbolIndex),xe.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,xe.placedIconSymbolIndex),xe.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,xe.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},Qn("SymbolBucket",ja,{omit:["layers","collisionBoxArray","features","compareText"]}),ja.MAX_GLYPHS=65535,ja.addDynamicAttributes=s5;var tG=new Us({"symbol-placement":new wi(De.layout_symbol["symbol-placement"]),"symbol-spacing":new wi(De.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new wi(De.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Di(De.layout_symbol["symbol-sort-key"]),"symbol-z-order":new wi(De.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new wi(De.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new wi(De.layout_symbol["icon-ignore-placement"]),"icon-optional":new wi(De.layout_symbol["icon-optional"]),"icon-rotation-alignment":new wi(De.layout_symbol["icon-rotation-alignment"]),"icon-size":new Di(De.layout_symbol["icon-size"]),"icon-text-fit":new wi(De.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new wi(De.layout_symbol["icon-text-fit-padding"]),"icon-image":new Di(De.layout_symbol["icon-image"]),"icon-rotate":new Di(De.layout_symbol["icon-rotate"]),"icon-padding":new wi(De.layout_symbol["icon-padding"]),"icon-keep-upright":new wi(De.layout_symbol["icon-keep-upright"]),"icon-offset":new Di(De.layout_symbol["icon-offset"]),"icon-anchor":new Di(De.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new wi(De.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new wi(De.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new wi(De.layout_symbol["text-rotation-alignment"]),"text-field":new Di(De.layout_symbol["text-field"]),"text-font":new Di(De.layout_symbol["text-font"]),"text-size":new Di(De.layout_symbol["text-size"]),"text-max-width":new Di(De.layout_symbol["text-max-width"]),"text-line-height":new wi(De.layout_symbol["text-line-height"]),"text-letter-spacing":new Di(De.layout_symbol["text-letter-spacing"]),"text-justify":new Di(De.layout_symbol["text-justify"]),"text-radial-offset":new Di(De.layout_symbol["text-radial-offset"]),"text-variable-anchor":new wi(De.layout_symbol["text-variable-anchor"]),"text-anchor":new Di(De.layout_symbol["text-anchor"]),"text-max-angle":new wi(De.layout_symbol["text-max-angle"]),"text-writing-mode":new wi(De.layout_symbol["text-writing-mode"]),"text-rotate":new Di(De.layout_symbol["text-rotate"]),"text-padding":new wi(De.layout_symbol["text-padding"]),"text-keep-upright":new wi(De.layout_symbol["text-keep-upright"]),"text-transform":new Di(De.layout_symbol["text-transform"]),"text-offset":new Di(De.layout_symbol["text-offset"]),"text-allow-overlap":new wi(De.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new wi(De.layout_symbol["text-ignore-placement"]),"text-optional":new wi(De.layout_symbol["text-optional"])}),l5={paint:new Us({"icon-opacity":new Di(De.paint_symbol["icon-opacity"]),"icon-color":new Di(De.paint_symbol["icon-color"]),"icon-halo-color":new Di(De.paint_symbol["icon-halo-color"]),"icon-halo-width":new Di(De.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Di(De.paint_symbol["icon-halo-blur"]),"icon-translate":new wi(De.paint_symbol["icon-translate"]),"icon-translate-anchor":new wi(De.paint_symbol["icon-translate-anchor"]),"text-opacity":new Di(De.paint_symbol["text-opacity"]),"text-color":new Di(De.paint_symbol["text-color"],{runtimeType:St,getOverride:function(C){return C.textColor},hasOverride:function(C){return!!C.textColor}}),"text-halo-color":new Di(De.paint_symbol["text-halo-color"]),"text-halo-width":new Di(De.paint_symbol["text-halo-width"]),"text-halo-blur":new Di(De.paint_symbol["text-halo-blur"]),"text-translate":new wi(De.paint_symbol["text-translate"]),"text-translate-anchor":new wi(De.paint_symbol["text-translate-anchor"])}),layout:tG},gg=function(C){this.type=C.property.overrides?C.property.overrides.runtimeType:Ut,this.defaultValue=C};gg.prototype.evaluate=function(C){if(C.formattedSection){var F=this.defaultValue.property.overrides;if(F&&F.hasOverride(C.formattedSection))return F.getOverride(C.formattedSection)}return C.feature&&C.featureState?this.defaultValue.evaluate(C.feature,C.featureState):this.defaultValue.property.specification.default},gg.prototype.eachChild=function(C){this.defaultValue.isConstant()||C(this.defaultValue.value._styleExpression.expression)},gg.prototype.outputDefined=function(){return!1},gg.prototype.serialize=function(){return null},Qn("FormatSectionOverride",gg,{omit:["defaultValue"]});var nG=function(C){function F(J){C.call(this,J,l5)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype.recalculate=function(J,oe){if(C.prototype.recalculate.call(this,J,oe),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")!=="point"?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")!=="point"?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){var pe=this.layout.get("text-writing-mode");if(pe){for(var xe=[],Ce=0,Ne=pe;Ce",targetMapId:oe,sourceMapId:xe.mapId})}}},mg.prototype.receive=function(C){var F=C.data,J=F.id;if(J&&(!F.targetMapId||this.mapId===F.targetMapId))if(F.type===""){delete this.tasks[J];var oe=this.cancelCallbacks[J];delete this.cancelCallbacks[J],oe&&oe()}else L()||F.mustQueue?(this.tasks[J]=F,this.taskQueue.push(J),this.invoker.trigger()):this.processTask(J,F)},mg.prototype.process=function(){if(this.taskQueue.length){var C=this.taskQueue.shift(),F=this.tasks[C];delete this.tasks[C],this.taskQueue.length&&this.invoker.trigger(),F&&this.processTask(C,F)}},mg.prototype.processTask=function(C,F){var J=this;if(F.type===""){var oe=this.callbacks[C];delete this.callbacks[C],oe&&(F.error?oe(Ni(F.error)):oe(null,Ni(F.data)))}else{var pe=!1,xe=B(this.globalScope)?void 0:[],Ce=F.hasCallback?function(gt,Bt){pe=!0,delete J.cancelCallbacks[C],J.target.postMessage({id:C,type:"",sourceMapId:J.mapId,error:gt?fi(gt):null,data:fi(Bt,xe)},xe)}:function(gt){pe=!0},Ne=null,Ze=Ni(F.data);if(this.parent[F.type])Ne=this.parent[F.type](F.sourceMapId,Ze,Ce);else if(this.parent.getWorkerSource){var ct=F.type.split(".");Ne=this.parent.getWorkerSource(F.sourceMapId,ct[0],Ze.source)[ct[1]](Ze,Ce)}else Ce(new Error("Could not find function "+F.type));!pe&&Ne&&Ne.cancel&&(this.cancelCallbacks[C]=Ne.cancel)}},mg.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};var as=function(C,F){C&&(F?this.setSouthWest(C).setNorthEast(F):C.length===4?this.setSouthWest([C[0],C[1]]).setNorthEast([C[2],C[3]]):this.setSouthWest(C[0]).setNorthEast(C[1]))};as.prototype.setNorthEast=function(C){return this._ne=C instanceof ho?new ho(C.lng,C.lat):ho.convert(C),this},as.prototype.setSouthWest=function(C){return this._sw=C instanceof ho?new ho(C.lng,C.lat):ho.convert(C),this},as.prototype.extend=function(C){var F,J,oe=this._sw,pe=this._ne;if(C instanceof ho)F=C,J=C;else{if(!(C instanceof as)){if(Array.isArray(C)){if(C.length===4||C.every(Array.isArray)){var xe=C;return this.extend(as.convert(xe))}var Ce=C;return this.extend(ho.convert(Ce))}return this}if(F=C._sw,J=C._ne,!F||!J)return this}return oe||pe?(oe.lng=Math.min(F.lng,oe.lng),oe.lat=Math.min(F.lat,oe.lat),pe.lng=Math.max(J.lng,pe.lng),pe.lat=Math.max(J.lat,pe.lat)):(this._sw=new ho(F.lng,F.lat),this._ne=new ho(J.lng,J.lat)),this},as.prototype.getCenter=function(){return new ho((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},as.prototype.getSouthWest=function(){return this._sw},as.prototype.getNorthEast=function(){return this._ne},as.prototype.getNorthWest=function(){return new ho(this.getWest(),this.getNorth())},as.prototype.getSouthEast=function(){return new ho(this.getEast(),this.getSouth())},as.prototype.getWest=function(){return this._sw.lng},as.prototype.getSouth=function(){return this._sw.lat},as.prototype.getEast=function(){return this._ne.lng},as.prototype.getNorth=function(){return this._ne.lat},as.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},as.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},as.prototype.isEmpty=function(){return!(this._sw&&this._ne)},as.prototype.contains=function(C){var F=ho.convert(C),J=F.lng,oe=F.lat,pe=this._sw.lat<=oe&&oe<=this._ne.lat,xe=this._sw.lng<=J&&J<=this._ne.lng;return this._sw.lng>this._ne.lng&&(xe=this._sw.lng>=J&&J>=this._ne.lng),pe&&xe},as.convert=function(C){return!C||C instanceof as?C:new as(C)};var ho=function(C,F){if(isNaN(C)||isNaN(F))throw new Error("Invalid LngLat object: ("+C+", "+F+")");if(this.lng=+C,this.lat=+F,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};ho.prototype.wrap=function(){return new ho(y(this.lng,-180,180),this.lat)},ho.prototype.toArray=function(){return[this.lng,this.lat]},ho.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},ho.prototype.distanceTo=function(C){var F=Math.PI/180,J=this.lat*F,oe=C.lat*F,pe=Math.sin(J)*Math.sin(oe)+Math.cos(J)*Math.cos(oe)*Math.cos((C.lng-this.lng)*F);return 63710088e-1*Math.acos(Math.min(pe,1))},ho.prototype.toBounds=function(C){C===void 0&&(C=0);var F=360*C/40075017,J=F/Math.cos(Math.PI/180*this.lat);return new as(new ho(this.lng-J,this.lat-F),new ho(this.lng+J,this.lat+F))},ho.convert=function(C){if(C instanceof ho)return C;if(Array.isArray(C)&&(C.length===2||C.length===3))return new ho(Number(C[0]),Number(C[1]));if(!Array.isArray(C)&&typeof C=="object"&&C!==null)return new ho(Number("lng"in C?C.lng:C.lon),Number(C.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")};var U9=2*Math.PI*63710088e-1;function V9(C){return U9*Math.cos(C*Math.PI/180)}function q9(C){return(180+C)/360}function H9(C){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+C*Math.PI/360)))/360}function $9(C,F){return C/V9(F)}function c5(C){var F=180-360*C;return 360/Math.PI*Math.atan(Math.exp(F*Math.PI/180))-90}var Dp=function(C,F,J){J===void 0&&(J=0),this.x=+C,this.y=+F,this.z=+J};Dp.fromLngLat=function(C,F){F===void 0&&(F=0);var J=ho.convert(C);return new Dp(q9(J.lng),H9(J.lat),$9(F,J.lat))},Dp.prototype.toLngLat=function(){return new ho(360*this.x-180,c5(this.y))},Dp.prototype.toAltitude=function(){return C=this.z,F=this.y,C*V9(c5(F));var C,F},Dp.prototype.meterInMercatorCoordinateUnits=function(){return 1/U9*(C=c5(this.y),1/Math.cos(C*Math.PI/180));var C};var Ip=function(C,F,J){this.z=C,this.x=F,this.y=J,this.key=w1(0,C,C,F,J)};Ip.prototype.equals=function(C){return this.z===C.z&&this.x===C.x&&this.y===C.y},Ip.prototype.url=function(C,F){var J,oe,pe,xe,Ce,Ne=(J=this.x,oe=this.y,pe=this.z,xe=j9(256*J,256*(oe=Math.pow(2,pe)-oe-1),pe),Ce=j9(256*(J+1),256*(oe+1),pe),xe[0]+","+xe[1]+","+Ce[0]+","+Ce[1]),Ze=function(ct,gt,Bt){for(var Xt,Gt="",on=ct;on>0;on--)Gt+=(gt&(Xt=1<this.canonical.z?new os(C,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new os(C,this.wrap,C,this.canonical.x>>F,this.canonical.y>>F)},os.prototype.calculateScaledKey=function(C,F){var J=this.canonical.z-C;return C>this.canonical.z?w1(this.wrap*+F,C,this.canonical.z,this.canonical.x,this.canonical.y):w1(this.wrap*+F,C,C,this.canonical.x>>J,this.canonical.y>>J)},os.prototype.isChildOf=function(C){if(C.wrap!==this.wrap)return!1;var F=this.canonical.z-C.canonical.z;return C.overscaledZ===0||C.overscaledZ>F&&C.canonical.y===this.canonical.y>>F},os.prototype.children=function(C){if(this.overscaledZ>=C)return[new os(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var F=this.canonical.z+1,J=2*this.canonical.x,oe=2*this.canonical.y;return[new os(F,this.wrap,F,J,oe),new os(F,this.wrap,F,J+1,oe),new os(F,this.wrap,F,J,oe+1),new os(F,this.wrap,F,J+1,oe+1)]},os.prototype.isLessThan=function(C){return this.wrapC.wrap)&&(this.overscaledZC.overscaledZ)&&(this.canonical.xC.canonical.x)&&this.canonical.y=this.dim+1||F<-1||F>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(F+1)*this.stride+(C+1)},bh.prototype._unpackMapbox=function(C,F,J){return(256*C*256+256*F+J)/10-1e4},bh.prototype._unpackTerrarium=function(C,F,J){return 256*C+F+J/256-32768},bh.prototype.getPixels=function(){return new Sl({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},bh.prototype.backfillBorder=function(C,F,J){if(this.dim!==C.dim)throw new Error("dem dimension mismatch");var oe=F*this.dim,pe=F*this.dim+this.dim,xe=J*this.dim,Ce=J*this.dim+this.dim;switch(F){case-1:oe=pe-1;break;case 1:pe=oe+1}switch(J){case-1:xe=Ce-1;break;case 1:Ce=xe+1}for(var Ne=-F*this.dim,Ze=-J*this.dim,ct=xe;ct=0&>[3]>=0&&Ne.insert(Ce,gt[0],gt[1],gt[2],gt[3])}},_h.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new sg.VectorTile(new yx(this.rawTileData)).layers,this.sourceLayerCoder=new Cx(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},_h.prototype.query=function(C,F,J,oe){var pe=this;this.loadVTLayers();for(var xe=C.params||{},Ce=8192/C.tileSize/C.scale,Ne=Ui(xe.filter),Ze=C.queryGeometry,ct=C.queryPadding*Ce,gt=Y9(Ze),Bt=this.grid.query(gt.minX-ct,gt.minY-ct,gt.maxX+ct,gt.maxY+ct),Xt=Y9(C.cameraQueryGeometry),Gt=this.grid3D.query(Xt.minX-ct,Xt.minY-ct,Xt.maxX+ct,Xt.maxY+ct,function(dr,br,Hr,Vr){return function(ei,vi,yi,li,Si){for(var Ai=0,xi=ei;Ai=Ta.x&&Si>=Ta.y)return!0}var da=[new h(vi,yi),new h(vi,Si),new h(li,Si),new h(li,yi)];if(ei.length>2){for(var Oa=0,Fi=da;Oa=0)return!0;return!1}(xe,Bt)){var Xt=this.sourceLayerCoder.decode(J),Gt=this.vtLayers[Xt].feature(oe);if(pe.filter(new Pa(this.tileID.overscaledZ),Gt))for(var on=this.getId(Gt,Xt),vn=0;vnoe)pe=!1;else if(F)if(this.expirationTimeVe&&(C.getActor().send("enforceCacheSizeLimit",Fe),nt=0)},i.clamp=v,i.clearTileCache=function(C){var F=self.caches.delete("mapbox-tiles");C&&F.catch(C).then(function(){return C()})},i.clipLine=O9,i.clone=function(C){var F=new Ml(16);return F[0]=C[0],F[1]=C[1],F[2]=C[2],F[3]=C[3],F[4]=C[4],F[5]=C[5],F[6]=C[6],F[7]=C[7],F[8]=C[8],F[9]=C[9],F[10]=C[10],F[11]=C[11],F[12]=C[12],F[13]=C[13],F[14]=C[14],F[15]=C[15],F},i.clone$1=E,i.clone$2=function(C){var F=new Ml(3);return F[0]=C[0],F[1]=C[1],F[2]=C[2],F},i.collisionCircleLayout=C$,i.config=$,i.create=function(){var C=new Ml(16);return Ml!=Float32Array&&(C[1]=0,C[2]=0,C[3]=0,C[4]=0,C[6]=0,C[7]=0,C[8]=0,C[9]=0,C[11]=0,C[12]=0,C[13]=0,C[14]=0),C[0]=1,C[5]=1,C[10]=1,C[15]=1,C},i.create$1=function(){var C=new Ml(9);return Ml!=Float32Array&&(C[1]=0,C[2]=0,C[3]=0,C[5]=0,C[6]=0,C[7]=0),C[0]=1,C[4]=1,C[8]=1,C},i.create$2=function(){var C=new Ml(4);return Ml!=Float32Array&&(C[1]=0,C[2]=0),C[0]=1,C[3]=1,C},i.createCommonjsModule=s,i.createExpression=Yt,i.createLayout=Da,i.createStyleLayer=function(C){return C.type==="custom"?new sG(C):new lG[C.type](C)},i.cross=function(C,F,J){var oe=F[0],pe=F[1],xe=F[2],Ce=J[0],Ne=J[1],Ze=J[2];return C[0]=pe*Ze-xe*Ne,C[1]=xe*Ce-oe*Ze,C[2]=oe*Ne-pe*Ce,C},i.deepEqual=function C(F,J){if(Array.isArray(F)){if(!Array.isArray(J)||F.length!==J.length)return!1;for(var oe=0;oe0&&(xe=1/Math.sqrt(xe)),C[0]=F[0]*xe,C[1]=F[1]*xe,C[2]=F[2]*xe,C},i.number=kr,i.offscreenCanvasSupported=ft,i.ortho=function(C,F,J,oe,pe,xe,Ce){var Ne=1/(F-J),Ze=1/(oe-pe),ct=1/(xe-Ce);return C[0]=-2*Ne,C[1]=0,C[2]=0,C[3]=0,C[4]=0,C[5]=-2*Ze,C[6]=0,C[7]=0,C[8]=0,C[9]=0,C[10]=2*ct,C[11]=0,C[12]=(F+J)*Ne,C[13]=(pe+oe)*Ze,C[14]=(Ce+xe)*ct,C[15]=1,C},i.parseGlyphPBF=function(C){return new yx(C).readFields(j$,[])},i.pbf=yx,i.performSymbolLayout=function(C,F,J,oe,pe,xe,Ce){C.createArrays();var Ne=512*C.overscaling;C.tilePixelRatio=8192/Ne,C.compareText={},C.iconsNeedLinear=!1;var Ze=C.layers[0].layout,ct=C.layers[0]._unevaluatedLayout._values,gt={};if(C.textSizeData.kind==="composite"){var Bt=C.textSizeData,Xt=Bt.minZoom,Gt=Bt.maxZoom;gt.compositeTextSizes=[ct["text-size"].possiblyEvaluate(new Pa(Xt),Ce),ct["text-size"].possiblyEvaluate(new Pa(Gt),Ce)]}if(C.iconSizeData.kind==="composite"){var on=C.iconSizeData,vn=on.minZoom,Cn=on.maxZoom;gt.compositeIconSizes=[ct["icon-size"].possiblyEvaluate(new Pa(vn),Ce),ct["icon-size"].possiblyEvaluate(new Pa(Cn),Ce)]}gt.layoutTextSize=ct["text-size"].possiblyEvaluate(new Pa(C.zoom+1),Ce),gt.layoutIconSize=ct["icon-size"].possiblyEvaluate(new Pa(C.zoom+1),Ce),gt.textMaxSize=ct["text-size"].possiblyEvaluate(new Pa(18));for(var En=24*Ze.get("text-line-height"),Vn=Ze.get("text-rotation-alignment")==="map"&&Ze.get("symbol-placement")!=="point",qn=Ze.get("text-keep-upright"),Xn=Ze.get("text-size"),dr=function(){var Vr=Hr[br],ei=Ze.get("text-font").evaluate(Vr,{},Ce).join(","),vi=Xn.evaluate(Vr,{},Ce),yi=gt.layoutTextSize.evaluate(Vr,{},Ce),li=gt.layoutIconSize.evaluate(Vr,{},Ce),Si={horizontal:{},vertical:void 0},Ai=Vr.text,xi=[0,0];if(Ai){var Ta=Ai.toString(),da=24*Ze.get("text-letter-spacing").evaluate(Vr,{},Ce),Oa=function(aa){for(var Ma=0,Do=aa;Ma=8192||E1.y<0||E1.y>=8192||function(Vo,jc,hG,gd,v5,Q9,Hx,Mf,$x,C1,Gx,Wx,y5,eC,O1,tC,nC,rC,iC,aC,_u,Yx,oC,Sf,dG){var x5,Rp,Mg,Sg,Eg,Cg=Vo.addToLineVertexArray(jc,hG),sC=0,lC=0,uC=0,cC=0,b5=-1,_5=-1,kh={},fC=Sn(""),w5=0,k5=0;if(Mf._unevaluatedLayout.getValue("text-radial-offset")===void 0?(x5=Mf.layout.get("text-offset").evaluate(_u,{},Sf).map(function(P1){return 24*P1}),w5=x5[0],k5=x5[1]):(w5=24*Mf.layout.get("text-radial-offset").evaluate(_u,{},Sf),k5=a5),Vo.allowVerticalPlacement&&gd.vertical){var hC=Mf.layout.get("text-rotate").evaluate(_u,{},Sf)+90,pG=gd.vertical;Sg=new Mx($x,jc,C1,Gx,Wx,pG,y5,eC,O1,hC),Hx&&(Eg=new Mx($x,jc,C1,Gx,Wx,Hx,nC,rC,O1,hC))}if(v5){var T5=Mf.layout.get("icon-rotate").evaluate(_u,{}),dC=Mf.layout.get("icon-text-fit")!=="none",pC=L9(v5,T5,oC,dC),A5=Hx?L9(Hx,T5,oC,dC):void 0;Mg=new Mx($x,jc,C1,Gx,Wx,v5,nC,rC,!1,T5),sC=4*pC.length;var gC=Vo.iconSizeData,L1=null;gC.kind==="source"?(L1=[128*Mf.layout.get("icon-size").evaluate(_u,{})])[0]>32640&&O(Vo.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'):gC.kind==="composite"&&((L1=[128*Yx.compositeIconSizes[0].evaluate(_u,{},Sf),128*Yx.compositeIconSizes[1].evaluate(_u,{},Sf)])[0]>32640||L1[1]>32640)&&O(Vo.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'),Vo.addSymbols(Vo.icon,pC,L1,aC,iC,_u,!1,jc,Cg.lineStartIndex,Cg.lineLength,-1,Sf),b5=Vo.icon.placedSymbolArray.length-1,A5&&(lC=4*A5.length,Vo.addSymbols(Vo.icon,A5,L1,aC,iC,_u,bu.vertical,jc,Cg.lineStartIndex,Cg.lineLength,-1,Sf),_5=Vo.icon.placedSymbolArray.length-1)}for(var mC in gd.horizontal){var Xx=gd.horizontal[mC];if(!Rp){fC=Sn(Xx.text);var gG=Mf.layout.get("text-rotate").evaluate(_u,{},Sf);Rp=new Mx($x,jc,C1,Gx,Wx,Xx,y5,eC,O1,gG)}var vC=Xx.positionedLines.length===1;if(uC+=I9(Vo,jc,Xx,Q9,Mf,O1,_u,tC,Cg,gd.vertical?bu.horizontal:bu.horizontalOnly,vC?Object.keys(gd.horizontal):[mC],kh,b5,Yx,Sf),vC)break}gd.vertical&&(cC+=I9(Vo,jc,gd.vertical,Q9,Mf,O1,_u,tC,Cg,bu.vertical,["vertical"],kh,_5,Yx,Sf));var mG=Rp?Rp.boxStartIndex:Vo.collisionBoxArray.length,vG=Rp?Rp.boxEndIndex:Vo.collisionBoxArray.length,yG=Sg?Sg.boxStartIndex:Vo.collisionBoxArray.length,xG=Sg?Sg.boxEndIndex:Vo.collisionBoxArray.length,bG=Mg?Mg.boxStartIndex:Vo.collisionBoxArray.length,_G=Mg?Mg.boxEndIndex:Vo.collisionBoxArray.length,wG=Eg?Eg.boxStartIndex:Vo.collisionBoxArray.length,kG=Eg?Eg.boxEndIndex:Vo.collisionBoxArray.length,Ef=-1,Zx=function(P1,xC){return P1&&P1.circleDiameter?Math.max(P1.circleDiameter,xC):xC};Ef=Zx(Rp,Ef),Ef=Zx(Sg,Ef),Ef=Zx(Mg,Ef);var yC=(Ef=Zx(Eg,Ef))>-1?1:0;yC&&(Ef*=dG/24),Vo.glyphOffsetArray.length>=ja.MAX_GLYPHS&&O("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),_u.sortKey!==void 0&&Vo.addToSortKeyRanges(Vo.symbolInstances.length,_u.sortKey),Vo.symbolInstances.emplaceBack(jc.x,jc.y,kh.right>=0?kh.right:-1,kh.center>=0?kh.center:-1,kh.left>=0?kh.left:-1,kh.vertical||-1,b5,_5,fC,mG,vG,yG,xG,bG,_G,wG,kG,C1,uC,cC,sC,lC,yC,0,y5,w5,k5,Ef)}(aa,E1,fG,Do,Io,Eo,wh,aa.layers[0],aa.collisionBoxArray,Ma.index,Ma.sourceLayerIndex,aa.index,h5,Px,zx,yl,Lx,Dx,dd,Fc,Ma,mo,eu,el,Ia)};if(xg==="line")for(var k1=0,Fx=O9(Ma.geometry,0,0,8192,8192);k11){var wg=G$(_g,Ix,Do.vertical||Nc,Io,24,yg);wg&&pd(_g,wg)}}else if(Ma.type==="Polygon")for(var kg=0,qx=J3(Ma.geometry,0);kg=mn.maxzoom||mn.visibility!=="none"&&(g(Ht,this.zoom,Ae),(tt[mn.id]=mn.createBucket({index:ot.bucketLayerIDs.length,layers:Ht,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Le,sourceID:this.source})).populate(Je,bt,this.tileID.canonical),ot.bucketLayerIDs.push(Ht.map(function(sn){return sn.id})))}}}var zn=i.mapObject(bt.glyphDependencies,function(sn){return Object.keys(sn).map(Number)});Object.keys(zn).length?De.send("getGlyphs",{uid:this.uid,stacks:zn},function(sn,gn){kt||(kt=sn,wt=gn,nn.call(rt))}):wt={};var pn=Object.keys(bt.iconDependencies);pn.length?De.send("getImages",{icons:pn,source:this.source,tileID:this.tileID,type:"icons"},function(sn,gn){kt||(kt=sn,Vt=gn,nn.call(rt))}):Vt={};var tn=Object.keys(bt.patternDependencies);function nn(){if(kt)return He(kt);if(wt&&Vt&&Ut){var sn=new h(wt),gn=new i.ImageAtlas(Vt,Ut);for(var bn in tt){var In=tt[bn];In instanceof i.SymbolBucket?(g(In.layers,this.zoom,Ae),i.performSymbolLayout(In,wt,sn.positions,Vt,gn.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):In.hasPattern&&(In instanceof i.LineBucket||In instanceof i.FillBucket||In instanceof i.FillExtrusionBucket)&&(g(In.layers,this.zoom,Ae),In.addFeatures(bt,this.tileID.canonical,gn.patternPositions))}this.status="done",He(null,{buckets:i.values(tt).filter(function(Hn){return!Hn.isEmpty()}),featureIndex:ot,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:sn.image,imageAtlas:gn,glyphMap:this.returnDependencies?wt:null,iconMap:this.returnDependencies?Vt:null,glyphPositions:this.returnDependencies?sn.positions:null})}}tn.length?De.send("getImages",{icons:tn,source:this.source,tileID:this.tileID,type:"patterns"},function(sn,gn){kt||(kt=sn,Ut=gn,nn.call(rt))}):Ut={},nn.call(this)};var v=function(Pe,Ie,Ae,De){this.actor=Pe,this.layerIndex=Ie,this.availableImages=Ae,this.loadVectorData=De||p,this.loading={},this.loaded={}};v.prototype.loadTile=function(Pe,Ie){var Ae=this,De=Pe.uid;this.loading||(this.loading={});var He=!!(Pe&&Pe.request&&Pe.request.collectResourceTiming)&&new i.RequestPerformance(Pe.request),rt=this.loading[De]=new m(Pe);rt.abort=this.loadVectorData(Pe,function(lt,ot){if(delete Ae.loading[De],lt||!ot)return rt.status="done",Ae.loaded[De]=rt,Ie(lt);var kt=ot.rawData,wt={};ot.expires&&(wt.expires=ot.expires),ot.cacheControl&&(wt.cacheControl=ot.cacheControl);var Vt={};if(He){var Ut=He.finish();Ut&&(Vt.resourceTiming=JSON.parse(JSON.stringify(Ut)))}rt.vectorTile=ot.vectorTile,rt.parse(ot.vectorTile,Ae.layerIndex,Ae.availableImages,Ae.actor,function(tt,bt){if(tt||!bt)return Ie(tt);Ie(null,i.extend({rawTileData:kt.slice(0)},bt,wt,Vt))}),Ae.loaded=Ae.loaded||{},Ae.loaded[De]=rt})},v.prototype.reloadTile=function(Pe,Ie){var Ae=this,De=this.loaded,He=Pe.uid,rt=this;if(De&&De[He]){var lt=De[He];lt.showCollisionBoxes=Pe.showCollisionBoxes;var ot=function(kt,wt){var Vt=lt.reloadCallback;Vt&&(delete lt.reloadCallback,lt.parse(lt.vectorTile,rt.layerIndex,Ae.availableImages,rt.actor,Vt)),Ie(kt,wt)};lt.status==="parsing"?lt.reloadCallback=ot:lt.status==="done"&&(lt.vectorTile?lt.parse(lt.vectorTile,this.layerIndex,this.availableImages,this.actor,ot):ot())}},v.prototype.abortTile=function(Pe,Ie){var Ae=this.loading,De=Pe.uid;Ae&&Ae[De]&&Ae[De].abort&&(Ae[De].abort(),delete Ae[De]),Ie()},v.prototype.removeTile=function(Pe,Ie){var Ae=this.loaded,De=Pe.uid;Ae&&Ae[De]&&delete Ae[De],Ie()};var y=i.window.ImageBitmap,x=function(){this.loaded={}};x.prototype.loadTile=function(Pe,Ie){var Ae=Pe.uid,De=Pe.encoding,He=Pe.rawImageData,rt=y&&He instanceof y?this.getImageData(He):He,lt=new i.DEMData(Ae,rt,De);this.loaded=this.loaded||{},this.loaded[Ae]=lt,Ie(null,lt)},x.prototype.getImageData=function(Pe){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(Pe.width,Pe.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=Pe.width,this.offscreenCanvas.height=Pe.height,this.offscreenCanvasContext.drawImage(Pe,0,0,Pe.width,Pe.height);var Ie=this.offscreenCanvasContext.getImageData(-1,-1,Pe.width+2,Pe.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new i.RGBAImage({width:Ie.width,height:Ie.height},Ie.data)},x.prototype.removeTile=function(Pe){var Ie=this.loaded,Ae=Pe.uid;Ie&&Ie[Ae]&&delete Ie[Ae]};var w=function Pe(Ie,Ae){var De,He=Ie&&Ie.type;if(He==="FeatureCollection")for(De=0;De=0!=!!Ie&&Pe.reverse()}var T=i.vectorTile.VectorTileFeature.prototype.toGeoJSON,_=function(Pe){this._feature=Pe,this.extent=i.EXTENT,this.type=Pe.type,this.properties=Pe.tags,"id"in Pe&&!isNaN(Pe.id)&&(this.id=parseInt(Pe.id,10))};_.prototype.loadGeometry=function(){if(this._feature.type===1){for(var Pe=[],Ie=0,Ae=this._feature.geometry;Ie>31}function te(Pe,Ie){for(var Ae=Pe.loadGeometry(),De=Pe.type,He=0,rt=0,lt=Ae.length,ot=0;ot>1;(function ot(kt,wt,Vt,Ut,tt,bt){for(;tt>Ut;){if(tt-Ut>600){var zt=tt-Ut+1,St=Vt-Ut+1,Dt=Math.log(zt),Le=.5*Math.exp(2*Dt/3),Je=.5*Math.sqrt(Dt*Le*(zt-Le)/zt)*(St-zt/2<0?-1:1),st=Math.max(Ut,Math.floor(Vt-St*Le/zt+Je)),Et=Math.min(tt,Math.floor(Vt+(zt-St)*Le/zt+Je));ot(kt,wt,Vt,st,Et,bt)}var It=wt[2*Vt+bt],Zt=Ut,Kt=tt;for(re(kt,wt,Ut,Vt),wt[2*tt+bt]>It&&re(kt,wt,Ut,tt);ZtIt;)Kt--}wt[2*Ut+bt]===It?re(kt,wt,Ut,Kt):(Kt++,re(kt,wt,Kt,tt)),Kt<=Vt&&(Ut=Kt+1),Vt<=Kt&&(tt=Kt-1)}})(Pe,Ie,lt,De,He,rt%2),Z(Pe,Ie,Ae,De,lt-1,rt+1),Z(Pe,Ie,Ae,lt+1,He,rt+1)}}function re(Pe,Ie,Ae,De){U(Pe,Ae,De),U(Ie,2*Ae,2*De),U(Ie,2*Ae+1,2*De+1)}function U(Pe,Ie,Ae){var De=Pe[Ie];Pe[Ie]=Pe[Ae],Pe[Ae]=De}function q(Pe,Ie,Ae,De){var He=Pe-Ae,rt=Ie-De;return He*He+rt*rt}O.fromVectorTileJs=R,O.fromGeojsonVt=z,O.GeoJSONWrapper=L;var $=function(Pe){return Pe[0]},ne=function(Pe){return Pe[1]},H=function(Pe,Ie,Ae,De,He){Ie===void 0&&(Ie=$),Ae===void 0&&(Ae=ne),De===void 0&&(De=64),He===void 0&&(He=Float64Array),this.nodeSize=De,this.points=Pe;for(var rt=Pe.length<65536?Uint16Array:Uint32Array,lt=this.ids=new rt(Pe.length),ot=this.coords=new He(2*Pe.length),kt=0;kt=lt&&Ut<=kt&&tt>=ot&&tt<=wt&&zt.push(He[Je]);else{var st=Math.floor((Le+Dt)/2);Ut=rt[2*st],tt=rt[2*st+1],Ut>=lt&&Ut<=kt&&tt>=ot&&tt<=wt&&zt.push(He[st]);var Et=(St+1)%2;(St===0?lt<=Ut:ot<=tt)&&(bt.push(Le),bt.push(st-1),bt.push(Et)),(St===0?kt>=Ut:wt>=tt)&&(bt.push(st+1),bt.push(Dt),bt.push(Et))}}return zt}(this.ids,this.coords,Pe,Ie,Ae,De,this.nodeSize)},H.prototype.within=function(Pe,Ie,Ae){return function(De,He,rt,lt,ot,kt){for(var wt=[0,De.length-1,0],Vt=[],Ut=ot*ot;wt.length;){var tt=wt.pop(),bt=wt.pop(),zt=wt.pop();if(bt-zt<=kt)for(var St=zt;St<=bt;St++)q(He[2*St],He[2*St+1],rt,lt)<=Ut&&Vt.push(De[St]);else{var Dt=Math.floor((zt+bt)/2),Le=He[2*Dt],Je=He[2*Dt+1];q(Le,Je,rt,lt)<=Ut&&Vt.push(De[Dt]);var st=(tt+1)%2;(tt===0?rt-ot<=Le:lt-ot<=Je)&&(wt.push(zt),wt.push(Dt-1),wt.push(st)),(tt===0?rt+ot>=Le:lt+ot>=Je)&&(wt.push(Dt+1),wt.push(bt),wt.push(st))}}return Vt}(this.ids,this.coords,Pe,Ie,Ae,this.nodeSize)};var Q={minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(Pe){return Pe}},ee=function(Pe){this.options=me(Object.create(Q),Pe),this.trees=new Array(this.options.maxZoom+1)};function ie(Pe,Ie,Ae,De,He){return{x:Pe,y:Ie,zoom:1/0,id:Ae,parentId:-1,numPoints:De,properties:He}}function ae(Pe,Ie){var Ae=Pe.geometry.coordinates,De=Ae[0],He=Ae[1];return{x:ge(De),y:fe(He),zoom:1/0,index:Ie,parentId:-1}}function ue(Pe){return{type:"Feature",id:Pe.id,properties:le(Pe),geometry:{type:"Point",coordinates:[(De=Pe.x,360*(De-.5)),(Ie=Pe.y,Ae=(180-360*Ie)*Math.PI/180,360*Math.atan(Math.exp(Ae))/Math.PI-90)]}};var Ie,Ae,De}function le(Pe){var Ie=Pe.numPoints,Ae=Ie>=1e4?Math.round(Ie/1e3)+"k":Ie>=1e3?Math.round(Ie/100)/10+"k":Ie;return me(me({},Pe.properties),{cluster:!0,cluster_id:Pe.id,point_count:Ie,point_count_abbreviated:Ae})}function ge(Pe){return Pe/360+.5}function fe(Pe){var Ie=Math.sin(Pe*Math.PI/180),Ae=.5-.25*Math.log((1+Ie)/(1-Ie))/Math.PI;return Ae<0?0:Ae>1?1:Ae}function me(Pe,Ie){for(var Ae in Ie)Pe[Ae]=Ie[Ae];return Pe}function _e(Pe){return Pe.x}function we(Pe){return Pe.y}function Te(Pe,Ie,Ae,De,He,rt){var lt=He-Ae,ot=rt-De;if(lt!==0||ot!==0){var kt=((Pe-Ae)*lt+(Ie-De)*ot)/(lt*lt+ot*ot);kt>1?(Ae=He,De=rt):kt>0&&(Ae+=lt*kt,De+=ot*kt)}return(lt=Pe-Ae)*lt+(ot=Ie-De)*ot}function Oe(Pe,Ie,Ae,De){var He={id:Pe===void 0?null:Pe,type:Ie,geometry:Ae,tags:De,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(rt){var lt=rt.geometry,ot=rt.type;if(ot==="Point"||ot==="MultiPoint"||ot==="LineString")de(rt,lt);else if(ot==="Polygon"||ot==="MultiLineString")for(var kt=0;kt0&&(lt+=De?(He*wt-kt*rt)/2:Math.sqrt(Math.pow(kt-He,2)+Math.pow(wt-rt,2))),He=kt,rt=wt}var Vt=Ie.length-3;Ie[2]=1,function Ut(tt,bt,zt,St){for(var Dt,Le=St,Je=zt-bt>>1,st=zt-bt,Et=tt[bt],It=tt[bt+1],Zt=tt[zt],Kt=tt[zt+1],Ht=bt+3;HtLe)Dt=Ht,Le=mn;else if(mn===Le){var zn=Math.abs(Ht-Je);znSt&&(Dt-bt>3&&Ut(tt,bt,Dt,St),tt[Dt+2]=Le,zt-Dt>3&&Ut(tt,Dt,zt,St))}(Ie,0,Vt,Ae),Ie[Vt+2]=1,Ie.size=Math.abs(lt),Ie.start=0,Ie.end=Ie.size}function Ee(Pe,Ie,Ae,De){for(var He=0;He1?1:Ae}function Ve(Pe,Ie,Ae,De,He,rt,lt,ot){if(De/=Ie,rt>=(Ae/=Ie)&<=De)return null;for(var kt=[],wt=0;wt=Ae&&zt=De)){var St=[];if(tt==="Point"||tt==="MultiPoint")Ke(Ut,St,Ae,De,He);else if(tt==="LineString")Re(Ut,St,Ae,De,He,!1,ot.lineMetrics);else if(tt==="MultiLineString")We(Ut,St,Ae,De,He,!1);else if(tt==="Polygon")We(Ut,St,Ae,De,He,!0);else if(tt==="MultiPolygon")for(var Dt=0;Dt=Ae&<<=De&&(Ie.push(Pe[rt]),Ie.push(Pe[rt+1]),Ie.push(Pe[rt+2]))}}function Re(Pe,Ie,Ae,De,He,rt,lt){for(var ot,kt,wt=qe(Pe),Vt=He===0?nt:ft,Ut=Pe.start,tt=0;ttAe&&(kt=Vt(wt,bt,zt,Dt,Le,Ae),lt&&(wt.start=Ut+ot*kt)):Je>De?st=Ae&&(kt=Vt(wt,bt,zt,Dt,Le,Ae),Et=!0),st>De&&Je<=De&&(kt=Vt(wt,bt,zt,Dt,Le,De),Et=!0),!rt&&Et&&(lt&&(wt.end=Ut+ot*kt),Ie.push(wt),wt=qe(Pe)),lt&&(Ut+=ot)}var It=Pe.length-3;bt=Pe[It],zt=Pe[It+1],St=Pe[It+2],(Je=He===0?bt:zt)>=Ae&&Je<=De&&Ye(wt,bt,zt,St),It=wt.length-3,rt&&It>=3&&(wt[It]!==wt[0]||wt[It+1]!==wt[1])&&Ye(wt,wt[0],wt[1],wt[2]),wt.length&&Ie.push(wt)}function qe(Pe){var Ie=[];return Ie.size=Pe.size,Ie.start=Pe.start,Ie.end=Pe.end,Ie}function We(Pe,Ie,Ae,De,He,rt){for(var lt=0;ltlt.maxX&&(lt.maxX=Vt),Ut>lt.maxY&&(lt.maxY=Ut)}return lt}function Ot(Pe,Ie,Ae,De){var He=Ie.geometry,rt=Ie.type,lt=[];if(rt==="Point"||rt==="MultiPoint")for(var ot=0;ot0&&Ie.size<(He?lt:De))Ae.numPoints+=Ie.length/3;else{for(var ot=[],kt=0;ktlt)&&(Ae.numSimplified++,ot.push(Ie[kt]),ot.push(Ie[kt+1])),Ae.numPoints++;He&&function(wt,Vt){for(var Ut=0,tt=0,bt=wt.length,zt=bt-2;tt0===Vt)for(tt=0,bt=wt.length;tt24)throw new Error("maxZoom should be in the 0-24 range");if(Ie.promoteId&&Ie.generateId)throw new Error("promoteId and generateId cannot be used together.");var De=function(He,rt){var lt=[];if(He.type==="FeatureCollection")for(var ot=0;ot=De;wt--){var Vt=+Date.now();ot=this._cluster(ot,wt),this.trees[wt]=new H(ot,_e,we,rt,Float32Array),Ae&&console.log("z%d: %d clusters in %dms",wt,ot.length,+Date.now()-Vt)}return Ae&&console.timeEnd("total time"),this},ee.prototype.getClusters=function(Pe,Ie){var Ae=((Pe[0]+180)%360+360)%360-180,De=Math.max(-90,Math.min(90,Pe[1])),He=Pe[2]===180?180:((Pe[2]+180)%360+360)%360-180,rt=Math.max(-90,Math.min(90,Pe[3]));if(Pe[2]-Pe[0]>=360)Ae=-180,He=180;else if(Ae>He){var lt=this.getClusters([Ae,De,180,rt],Ie),ot=this.getClusters([-180,De,He,rt],Ie);return lt.concat(ot)}for(var kt=this.trees[this._limitZoom(Ie)],wt=[],Vt=0,Ut=kt.range(ge(Ae),fe(rt),ge(He),fe(De));Vt1?this._map(wt,!0):null,Dt=(kt<<5)+(Ie+1)+this.points.length,Le=0,Je=Ut;Le>5},ee.prototype._getOriginZoom=function(Pe){return(Pe-this.points.length)%32},ee.prototype._map=function(Pe,Ie){if(Pe.numPoints)return Ie?me({},Pe.properties):Pe.properties;var Ae=this.points[Pe.index].properties,De=this.options.map(Ae);return Ie&&De===Ae?me({},De):De},Jt.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Jt.prototype.splitTile=function(Pe,Ie,Ae,De,He,rt,lt){for(var ot=[Pe,Ie,Ae,De],kt=this.options,wt=kt.debug;ot.length;){De=ot.pop(),Ae=ot.pop(),Ie=ot.pop(),Pe=ot.pop();var Vt=1<1&&console.time("creation"),tt=this.tiles[Ut]=et(Pe,Ie,Ae,De,kt),this.tileCoords.push({z:Ie,x:Ae,y:De}),wt)){wt>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Ie,Ae,De,tt.numFeatures,tt.numPoints,tt.numSimplified),console.timeEnd("creation"));var bt="z"+Ie;this.stats[bt]=(this.stats[bt]||0)+1,this.total++}if(tt.source=Pe,He){if(Ie===kt.maxZoom||Ie===He)continue;var zt=1<1&&console.time("clipping");var St,Dt,Le,Je,st,Et,It=.5*kt.buffer/kt.extent,Zt=.5-It,Kt=.5+It,Ht=1+It;St=Dt=Le=Je=null,st=Ve(Pe,Vt,Ae-It,Ae+Kt,0,tt.minX,tt.maxX,kt),Et=Ve(Pe,Vt,Ae+Zt,Ae+Ht,0,tt.minX,tt.maxX,kt),Pe=null,st&&(St=Ve(st,Vt,De-It,De+Kt,1,tt.minY,tt.maxY,kt),Dt=Ve(st,Vt,De+Zt,De+Ht,1,tt.minY,tt.maxY,kt),st=null),Et&&(Le=Ve(Et,Vt,De-It,De+Kt,1,tt.minY,tt.maxY,kt),Je=Ve(Et,Vt,De+Zt,De+Ht,1,tt.minY,tt.maxY,kt),Et=null),wt>1&&console.timeEnd("clipping"),ot.push(St||[],Ie+1,2*Ae,2*De),ot.push(Dt||[],Ie+1,2*Ae,2*De+1),ot.push(Le||[],Ie+1,2*Ae+1,2*De),ot.push(Je||[],Ie+1,2*Ae+1,2*De+1)}}},Jt.prototype.getTile=function(Pe,Ie,Ae){var De=this.options,He=De.extent,rt=De.debug;if(Pe<0||Pe>24)return null;var lt=1<1&&console.log("drilling down to z%d-%d-%d",Pe,Ie,Ae);for(var kt,wt=Pe,Vt=Ie,Ut=Ae;!kt&&wt>0;)wt--,Vt=Math.floor(Vt/2),Ut=Math.floor(Ut/2),kt=this.tiles[Be(wt,Vt,Ut)];return kt&&kt.source?(rt>1&&console.log("found parent tile z%d-%d-%d",wt,Vt,Ut),rt>1&&console.time("drilling down"),this.splitTile(kt.source,wt,Vt,Ut,Pe,Ie,Ae),rt>1&&console.timeEnd("drilling down"),this.tiles[ot]?At(this.tiles[ot],He):null):null};var Tt=function(Pe){function Ie(Ae,De,He,rt){Pe.call(this,Ae,De,He,Ge),rt&&(this.loadGeoJSON=rt)}return Pe&&(Ie.__proto__=Pe),Ie.prototype=Object.create(Pe&&Pe.prototype),Ie.prototype.constructor=Ie,Ie.prototype.loadData=function(Ae,De){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=De,this._pendingLoadDataParams=Ae,this._state&&this._state!=="Idle"?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},Ie.prototype._loadData=function(){var Ae=this;if(this._pendingCallback&&this._pendingLoadDataParams){var De=this._pendingCallback,He=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var rt=!!(He&&He.request&&He.request.collectResourceTiming)&&new i.RequestPerformance(He.request);this.loadGeoJSON(He,function(lt,ot){if(lt||!ot)return De(lt);if(typeof ot!="object")return De(new Error("Input data given to '"+He.source+"' is not a valid GeoJSON object."));w(ot,!0);try{Ae._geoJSONIndex=He.cluster?new ee(function(Vt){var Ut=Vt.superclusterOptions,tt=Vt.clusterProperties;if(!tt||!Ut)return Ut;for(var bt={},zt={},St={accumulated:null,zoom:0},Dt={properties:null},Le=Object.keys(tt),Je=0,st=Le;Je"u"||typeof document>"u"?"not a browser":Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray?Function.prototype&&Function.prototype.bind?Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions?"JSON"in window&&"parse"in JSON&&"stringify"in JSON?function(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var he,ve,be=new Blob([""],{type:"text/javascript"}),Se=URL.createObjectURL(be);try{ve=new Worker(Se),he=!0}catch{he=!1}return ve&&ve.terminate(),URL.revokeObjectURL(Se),he}()?"Uint8ClampedArray"in window?ArrayBuffer.isView?function(){var he=document.createElement("canvas");he.width=he.height=1;var ve=he.getContext("2d");if(!ve)return!1;var be=ve.getImageData(0,0,1,1);return be&&be.width===he.width}()?function(he){return X[he]===void 0&&(X[he]=function(ve){var be=function(Ue){var Xe=document.createElement("canvas"),it=Object.create(j.webGLContextAttributes);return it.failIfMajorPerformanceCaveat=Ue,Xe.probablySupportsContext?Xe.probablySupportsContext("webgl",it)||Xe.probablySupportsContext("experimental-webgl",it):Xe.supportsContext?Xe.supportsContext("webgl",it)||Xe.supportsContext("experimental-webgl",it):Xe.getContext("webgl",it)||Xe.getContext("experimental-webgl",it)}(ve);if(!be)return!1;var Se=be.createShader(be.VERTEX_SHADER);return!Se||be.isContextLost()?!1:(be.shaderSource(Se,"void main() {}"),be.compileShader(Se),be.getShaderParameter(Se,be.COMPILE_STATUS)===!0)}(he)),X[he]}(se&&se.failIfMajorPerformanceCaveat)?void 0:"insufficient WebGL support":"insufficient Canvas/getImageData support":"insufficient ArrayBuffer support":"insufficient Uint8ClampedArray support":"insufficient worker support":"insufficient JSON support":"insufficient Object support":"insufficient Function support":"insufficent Array support"}I.exports?I.exports=j:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=j,window.mapboxgl.notSupportedReason=V);var X={};j.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}}),l={create:function(I,j,V){var X=i.window.document.createElement(I);return j!==void 0&&(X.className=j),V&&V.appendChild(X),X},createNS:function(I,j){return i.window.document.createElementNS(I,j)}},d=i.window.document.documentElement.style;function h(I){if(!d)return I[0];for(var j=0;j=0?0:I.button},l.remove=function(I){I.parentNode&&I.parentNode.removeChild(I)};var k=function(I){function j(){I.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new i.RGBAImage({width:1,height:1}),this.dirty=!0}return I&&(j.__proto__=I),j.prototype=Object.create(I&&I.prototype),j.prototype.constructor=j,j.prototype.isLoaded=function(){return this.loaded},j.prototype.setLoaded=function(V){if(this.loaded!==V&&(this.loaded=V,V)){for(var X=0,se=this.requestors;X=0?1.2:1))}function A(I,j,V,X,se,he,ve){for(var be=0;be65535)Ue(new Error("glyphs > 65535 not supported"));else if(xt.ranges[_t])Ue(null,{stack:Xe,id:it,glyph:Lt});else{var Mt=xt.requests[_t];Mt||(Mt=xt.requests[_t]=[],E.loadGlyphRange(Xe,_t,V.url,V.requestManager,function(yt,Nt){if(Nt){for(var Rt in Nt)V._doesCharSupportLocalGlyph(+Rt)||(xt.glyphs[+Rt]=Nt[+Rt]);xt.ranges[_t]=!0}for(var qt=0,rn=Mt;qt1&&(Se=I[++be]);var Xe=Math.abs(Ue-Se.left),it=Math.abs(Ue-Se.right),xt=Math.min(Xe,it),Lt=void 0,_t=se/V*(X+1);if(Se.isDash){var Mt=X-Math.abs(_t);Lt=Math.sqrt(xt*xt+Mt*Mt)}else Lt=X-Math.sqrt(xt*xt+_t*_t);this.data[ve+Ue]=Math.max(0,Math.min(255,Lt+128))}},z.prototype.addRegularDash=function(I){for(var j=I.length-1;j>=0;--j){var V=I[j],X=I[j+1];V.zeroLength?I.splice(j,1):X&&X.isDash===V.isDash&&(X.left=V.left,I.splice(j,1))}var se=I[0],he=I[I.length-1];se.isDash===he.isDash&&(se.left=he.left-this.width,he.right=se.right+this.width);for(var ve=this.width*this.nextRow,be=0,Se=I[be],Ue=0;Ue1&&(Se=I[++be]);var Xe=Math.abs(Ue-Se.left),it=Math.abs(Ue-Se.right),xt=Math.min(Xe,it),Lt=Se.isDash?xt:-xt;this.data[ve+Ue]=Math.max(0,Math.min(255,Lt+128))}},z.prototype.addDash=function(I,j){var V=j?7:0,X=2*V+1;if(this.nextRow+X>this.height)return i.warnOnce("LineAtlas out of space"),null;for(var se=0,he=0;he=V&&I.x=X&&I.y0&&(Ue[new i.OverscaledTileID(V.overscaledZ,ve,X.z,he,X.y-1).key]={backfilled:!1},Ue[new i.OverscaledTileID(V.overscaledZ,V.wrap,X.z,X.x,X.y-1).key]={backfilled:!1},Ue[new i.OverscaledTileID(V.overscaledZ,Se,X.z,be,X.y-1).key]={backfilled:!1}),X.y+10&&(se.resourceTiming=V._resourceTiming,V._resourceTiming=[]),V.fire(new i.Event("data",se))}})},j.prototype.onAdd=function(V){this.map=V,this.load()},j.prototype.setData=function(V){var X=this;return this._data=V,this.fire(new i.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(se){if(se)X.fire(new i.ErrorEvent(se));else{var he={dataType:"source",sourceDataType:"content"};X._collectResourceTiming&&X._resourceTiming&&X._resourceTiming.length>0&&(he.resourceTiming=X._resourceTiming,X._resourceTiming=[]),X.fire(new i.Event("data",he))}}),this},j.prototype.getClusterExpansionZoom=function(V,X){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:V,source:this.id},X),this},j.prototype.getClusterChildren=function(V,X){return this.actor.send("geojson.getClusterChildren",{clusterId:V,source:this.id},X),this},j.prototype.getClusterLeaves=function(V,X,se,he){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:V,limit:X,offset:se},he),this},j.prototype._updateWorkerData=function(V){var X=this;this._loaded=!1;var se=i.extend({},this.workerOptions),he=this._data;typeof he=="string"?(se.request=this.map._requestManager.transformRequest(i.browser.resolveURL(he),i.ResourceType.Source),se.request.collectResourceTiming=this._collectResourceTiming):se.data=JSON.stringify(he),this.actor.send(this.type+".loadData",se,function(ve,be){X._removed||be&&be.abandoned||(X._loaded=!0,be&&be.resourceTiming&&be.resourceTiming[X.id]&&(X._resourceTiming=be.resourceTiming[X.id].slice(0)),X.actor.send(X.type+".coalesce",{source:se.source},null),V(ve))})},j.prototype.loaded=function(){return this._loaded},j.prototype.loadTile=function(V,X){var se=this,he=V.actor?"reloadTile":"loadTile";V.actor=this.actor;var ve={type:this.type,uid:V.uid,tileID:V.tileID,zoom:V.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:i.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};V.request=this.actor.send(he,ve,function(be,Se){return delete V.request,V.unloadVectorData(),V.aborted?X(null):be?X(be):(V.loadVectorData(Se,se.map.painter,he==="reloadTile"),X(null))})},j.prototype.abortTile=function(V){V.request&&(V.request.cancel(),delete V.request),V.aborted=!0},j.prototype.unloadTile=function(V){V.unloadVectorData(),this.actor.send("removeTile",{uid:V.uid,type:this.type,source:this.id})},j.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},j.prototype.serialize=function(){return i.extend({},this._options,{type:this.type,data:this._data})},j.prototype.hasTransition=function(){return!1},j}(i.Evented),te=i.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),Y=function(I){function j(V,X,se,he){I.call(this),this.id=V,this.dispatcher=se,this.coordinates=X.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(he),this.options=X}return I&&(j.__proto__=I),j.prototype=Object.create(I&&I.prototype),j.prototype.constructor=j,j.prototype.load=function(V,X){var se=this;this._loaded=!1,this.fire(new i.Event("dataloading",{dataType:"source"})),this.url=this.options.url,i.getImage(this.map._requestManager.transformRequest(this.url,i.ResourceType.Image),function(he,ve){se._loaded=!0,he?se.fire(new i.ErrorEvent(he)):ve&&(se.image=ve,V&&(se.coordinates=V),X&&X(),se._finishLoading())})},j.prototype.loaded=function(){return this._loaded},j.prototype.updateImage=function(V){var X=this;return this.image&&V.url?(this.options.url=V.url,this.load(V.coordinates,function(){X.texture=null}),this):this},j.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new i.Event("data",{dataType:"source",sourceDataType:"metadata"})))},j.prototype.onAdd=function(V){this.map=V,this.load()},j.prototype.setCoordinates=function(V){var X=this;this.coordinates=V;var se=V.map(i.MercatorCoordinate.fromLngLat);this.tileID=function(ve){for(var be=1/0,Se=1/0,Ue=-1/0,Xe=-1/0,it=0,xt=ve;itX.end(0)?this.fire(new i.ErrorEvent(new i.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+X.start(0)+" and "+X.end(0)+"-second mark."))):this.video.currentTime=V}},j.prototype.getVideo=function(){return this.video},j.prototype.onAdd=function(V){this.map||(this.map=V,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},j.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var V=this.map.painter.context,X=V.gl;for(var se in this.boundsBuffer||(this.boundsBuffer=V.createVertexBuffer(this._boundsArray,te.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(X.LINEAR,X.CLAMP_TO_EDGE),X.texSubImage2D(X.TEXTURE_2D,0,0,0,X.RGBA,X.UNSIGNED_BYTE,this.video)):(this.texture=new i.Texture(V,this.video,X.RGBA),this.texture.bind(X.LINEAR,X.CLAMP_TO_EDGE)),this.tiles){var he=this.tiles[se];he.state!=="loaded"&&(he.state="loaded",he.texture=this.texture)}}},j.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},j.prototype.hasTransition=function(){return this.video&&!this.video.paused},j}(Y),re=function(I){function j(V,X,se,he){I.call(this,V,X,se,he),X.coordinates?Array.isArray(X.coordinates)&&X.coordinates.length===4&&!X.coordinates.some(function(ve){return!Array.isArray(ve)||ve.length!==2||ve.some(function(be){return typeof be!="number"})})||this.fire(new i.ErrorEvent(new i.ValidationError("sources."+V,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new i.ErrorEvent(new i.ValidationError("sources."+V,null,'missing required property "coordinates"'))),X.animate&&typeof X.animate!="boolean"&&this.fire(new i.ErrorEvent(new i.ValidationError("sources."+V,null,'optional "animate" property must be a boolean value'))),X.canvas?typeof X.canvas=="string"||X.canvas instanceof i.window.HTMLCanvasElement||this.fire(new i.ErrorEvent(new i.ValidationError("sources."+V,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new i.ErrorEvent(new i.ValidationError("sources."+V,null,'missing required property "canvas"'))),this.options=X,this.animate=X.animate===void 0||X.animate}return I&&(j.__proto__=I),j.prototype=Object.create(I&&I.prototype),j.prototype.constructor=j,j.prototype.load=function(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof i.window.HTMLCanvasElement?this.options.canvas:i.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new i.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())},j.prototype.getCanvas=function(){return this.canvas},j.prototype.onAdd=function(V){this.map=V,this.load(),this.canvas&&this.animate&&this.play()},j.prototype.onRemove=function(){this.pause()},j.prototype.prepare=function(){var V=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,V=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,V=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var X=this.map.painter.context,se=X.gl;for(var he in this.boundsBuffer||(this.boundsBuffer=X.createVertexBuffer(this._boundsArray,te.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(V||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new i.Texture(X,this.canvas,se.RGBA,{premultiply:!0}),this.tiles){var ve=this.tiles[he];ve.state!=="loaded"&&(ve.state="loaded",ve.texture=this.texture)}}},j.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},j.prototype.hasTransition=function(){return this._playing},j.prototype._hasInvalidDimensions=function(){for(var V=0,X=[this.canvas.width,this.canvas.height];Vthis.max){var ve=this._getAndRemoveByKey(this.order[0]);ve&&this.onRemove(ve)}return this},H.prototype.has=function(I){return I.wrapped().key in this.data},H.prototype.getAndRemove=function(I){return this.has(I)?this._getAndRemoveByKey(I.wrapped().key):null},H.prototype._getAndRemoveByKey=function(I){var j=this.data[I].shift();return j.timeout&&clearTimeout(j.timeout),this.data[I].length===0&&delete this.data[I],this.order.splice(this.order.indexOf(I),1),j.value},H.prototype.getByKey=function(I){var j=this.data[I];return j?j[0].value:null},H.prototype.get=function(I){return this.has(I)?this.data[I.wrapped().key][0].value:null},H.prototype.remove=function(I,j){if(!this.has(I))return this;var V=I.wrapped().key,X=j===void 0?0:this.data[V].indexOf(j),se=this.data[V][X];return this.data[V].splice(X,1),se.timeout&&clearTimeout(se.timeout),this.data[V].length===0&&delete this.data[V],this.onRemove(se.value),this.order.splice(this.order.indexOf(V),1),this},H.prototype.setMaxSize=function(I){for(this.max=I;this.order.length>this.max;){var j=this._getAndRemoveByKey(this.order[0]);j&&this.onRemove(j)}return this},H.prototype.filter=function(I){var j=[];for(var V in this.data)for(var X=0,se=this.data[V];X1||(Math.abs(Xe)>1&&(Math.abs(Xe+xt)===1?Xe+=xt:Math.abs(Xe-xt)===1&&(Xe-=xt)),Ue.dem&&Se.dem&&(Se.dem.backfillBorder(Ue.dem,Xe,it),Se.neighboringTiles&&Se.neighboringTiles[Lt]&&(Se.neighboringTiles[Lt].backfilled=!0)))}},j.prototype.getTile=function(V){return this.getTileByID(V.key)},j.prototype.getTileByID=function(V){return this._tiles[V]},j.prototype._retainLoadedChildren=function(V,X,se,he){for(var ve in this._tiles){var be=this._tiles[ve];if(!(he[ve]||!be.hasData()||be.tileID.overscaledZ<=X||be.tileID.overscaledZ>se)){for(var Se=be.tileID;be&&be.tileID.overscaledZ>X+1;){var Ue=be.tileID.scaledTo(be.tileID.overscaledZ-1);(be=this._tiles[Ue.key])&&be.hasData()&&(Se=Ue)}for(var Xe=Se;Xe.overscaledZ>X;)if(V[(Xe=Xe.scaledTo(Xe.overscaledZ-1)).key]){he[Se.key]=Se;break}}}},j.prototype.findLoadedParent=function(V,X){if(V.key in this._loadedParentTiles){var se=this._loadedParentTiles[V.key];return se&&se.tileID.overscaledZ>=X?se:null}for(var he=V.overscaledZ-1;he>=X;he--){var ve=V.scaledTo(he),be=this._getLoadedTile(ve);if(be)return be}},j.prototype._getLoadedTile=function(V){var X=this._tiles[V.key];return X&&X.hasData()?X:this._cache.getByKey(V.wrapped().key)},j.prototype.updateCacheSize=function(V){var X=(Math.ceil(V.width/this._source.tileSize)+1)*(Math.ceil(V.height/this._source.tileSize)+1),se=Math.floor(5*X),he=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,se):se;this._cache.setMaxSize(he)},j.prototype.handleWrapJump=function(V){var X=(V-(this._prevLng===void 0?V:this._prevLng))/360,se=Math.round(X);if(this._prevLng=V,se){var he={};for(var ve in this._tiles){var be=this._tiles[ve];be.tileID=be.tileID.unwrapTo(be.tileID.wrap+se),he[be.tileID.key]=be}for(var Se in this._tiles=he,this._timers)clearTimeout(this._timers[Se]),delete this._timers[Se];for(var Ue in this._tiles){var Xe=this._tiles[Ue];this._setTileReloadTimer(Ue,Xe)}}},j.prototype.update=function(V){var X=this;if(this.transform=V,this._sourceLoaded&&!this._paused){var se;this.updateCacheSize(V),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?se=V.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(An){return new i.OverscaledTileID(An.canonical.z,An.wrap,An.canonical.z,An.canonical.x,An.canonical.y)}):(se=V.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(se=se.filter(function(An){return X._source.hasTile(An)}))):se=[];var he=V.coveringZoomLevel(this._source),ve=Math.max(he-j.maxOverzooming,this._source.minzoom),be=Math.max(he+j.maxUnderzooming,this._source.minzoom),Se=this._updateRetainedTiles(se,he);if(lt(this._source.type)){for(var Ue={},Xe={},it=0,xt=Object.keys(Se);itthis._source.maxzoom){var Nt=Mt.children(this._source.maxzoom)[0],Rt=this.getTile(Nt);if(Rt&&Rt.hasData()){se[Nt.key]=Nt;continue}}else{var qt=Mt.children(this._source.maxzoom);if(se[qt[0].key]&&se[qt[1].key]&&se[qt[2].key]&&se[qt[3].key])continue}for(var rn=yt.wasRequested(),dn=Mt.overscaledZ-1;dn>=ve;--dn){var Sn=Mt.scaledTo(dn);if(he[Sn.key]||(he[Sn.key]=!0,!(yt=this.getTile(Sn))&&rn&&(yt=this._addTile(Sn)),yt&&(se[Sn.key]=Sn,rn=yt.wasRequested(),yt.hasData())))break}}}return se},j.prototype._updateLoadedParentTileCache=function(){for(var V in this._loadedParentTiles={},this._tiles){for(var X=[],se=void 0,he=this._tiles[V].tileID;he.overscaledZ>0;){if(he.key in this._loadedParentTiles){se=this._loadedParentTiles[he.key];break}X.push(he.key);var ve=he.scaledTo(he.overscaledZ-1);if(se=this._getLoadedTile(ve))break;he=ve}for(var be=0,Se=X;be0||(X.hasData()&&X.state!=="reloading"?this._cache.add(X.tileID,X,X.getExpiryTimeout()):(X.aborted=!0,this._abortTile(X),this._unloadTile(X))))},j.prototype.clearTiles=function(){for(var V in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(V);this._cache.reset()},j.prototype.tilesIn=function(V,X,se){var he=this,ve=[],be=this.transform;if(!be)return ve;for(var Se=se?be.getCameraQueryGeometry(V):V,Ue=V.map(function(dn){return be.pointCoordinate(dn)}),Xe=Se.map(function(dn){return be.pointCoordinate(dn)}),it=this.getIds(),xt=1/0,Lt=1/0,_t=-1/0,Mt=-1/0,yt=0,Nt=Xe;yt=0&&gr[1].y+er>=0){var cr=Ue.map(function(ii){return An.getTilePoint(ii)}),Yr=Xe.map(function(ii){return An.getTilePoint(ii)});ve.push({tile:Sn,tileID:An,queryGeometry:cr,cameraQueryGeometry:Yr,scale:tr})}}},rn=0;rn=i.browser.now())return!0}return!1},j.prototype.setFeatureState=function(V,X,se){V=V||"_geojsonTileLayer",this._state.updateState(V,X,se)},j.prototype.removeFeatureState=function(V,X,se){V=V||"_geojsonTileLayer",this._state.removeFeatureState(V,X,se)},j.prototype.getFeatureState=function(V,X){return V=V||"_geojsonTileLayer",this._state.getState(V,X)},j.prototype.setDependencies=function(V,X,se){var he=this._tiles[V];he&&he.setDependencies(X,se)},j.prototype.reloadTilesForDependencies=function(V,X){for(var se in this._tiles)this._tiles[se].hasDependency(V,X)&&this._reloadTile(se,"reloading");this._cache.filter(function(he){return!he.hasDependency(V,X)})},j}(i.Evented);function rt(I,j){var V=Math.abs(2*I.wrap)-+(I.wrap<0),X=Math.abs(2*j.wrap)-+(j.wrap<0);return I.overscaledZ-j.overscaledZ||X-V||j.canonical.y-I.canonical.y||j.canonical.x-I.canonical.x}function lt(I){return I==="raster"||I==="image"||I==="video"}function ot(){return new i.window.Worker(ce.workerUrl)}He.maxOverzooming=10,He.maxUnderzooming=3;var kt="mapboxgl_preloaded_worker_pool",wt=function(){this.active={}};wt.prototype.acquire=function(I){if(!this.workers)for(this.workers=[];this.workers.length0?(X-he)/ve:0;return this.points[se].mult(1-be).add(this.points[j].mult(be))};var mn=function(I,j,V){var X=this.boxCells=[],se=this.circleCells=[];this.xCellCount=Math.ceil(I/V),this.yCellCount=Math.ceil(j/V);for(var he=0;he=-j[0]&&V<=j[0]&&X>=-j[1]&&X<=j[1]}function gn(I,j,V,X,se,he,ve,be){var Se=X?I.textSizeData:I.iconSizeData,Ue=i.evaluateSizeForZoom(Se,V.transform.zoom),Xe=[256/V.width*2+1,256/V.height*2+1],it=X?I.text.dynamicLayoutVertexArray:I.icon.dynamicLayoutVertexArray;it.clear();for(var xt=I.lineVertexArray,Lt=X?I.text.placedSymbolArray:I.icon.placedSymbolArray,_t=V.transform.width/V.transform.height,Mt=!1,yt=0;ytMath.abs(V.x-j.x)*X?{useVertical:!0}:(I===i.WritingMode.vertical?j.yV.x)?{needsFlipping:!0}:null}function Hn(I,j,V,X,se,he,ve,be,Se,Ue,Xe,it,xt,Lt){var _t,Mt=j/24,yt=I.lineOffsetX*Mt,Nt=I.lineOffsetY*Mt;if(I.numGlyphs>1){var Rt=I.glyphStartIndex+I.numGlyphs,qt=I.lineStartIndex,rn=I.lineStartIndex+I.lineLength,dn=bn(Mt,be,yt,Nt,V,Xe,it,I,Se,he,xt);if(!dn)return{notEnoughRoom:!0};var Sn=tn(dn.first.point,ve).point,An=tn(dn.last.point,ve).point;if(X&&!V){var tr=In(I.writingMode,Sn,An,Lt);if(tr)return tr}_t=[dn.first];for(var er=I.glyphStartIndex+1;er0?ii.point:Wn(it,Yr,gr,1,se),Gn=In(I.writingMode,gr,Ti,Lt);if(Gn)return Gn}var Mr=ar(Mt*be.getoffsetX(I.glyphStartIndex),yt,Nt,V,Xe,it,I.segment,I.lineStartIndex,I.lineStartIndex+I.lineLength,Se,he,xt);if(!Mr)return{notEnoughRoom:!0};_t=[Mr]}for(var ai=0,Qr=_t;ai0?1:-1,_t=0;X&&(Lt*=-1,_t=Math.PI),Lt<0&&(_t+=Math.PI);for(var Mt=Lt>0?be+ve:be+ve+1,yt=se,Nt=se,Rt=0,qt=0,rn=Math.abs(xt),dn=[];Rt+qt<=rn;){if((Mt+=Lt)=Se)return null;if(Nt=yt,dn.push(yt),(yt=it[Mt])===void 0){var Sn=new i.Point(Ue.getx(Mt),Ue.gety(Mt)),An=tn(Sn,Xe);if(An.signedDistanceFromCamera>0)yt=it[Mt]=An.point;else{var tr=Mt-Lt;yt=Wn(Rt===0?he:new i.Point(Ue.getx(tr),Ue.gety(tr)),Sn,Nt,rn-Rt+1,Xe)}}Rt+=qt,qt=Nt.dist(yt)}var er=(rn-Rt)/qt,gr=yt.sub(Nt),cr=gr.mult(er)._add(Nt);cr._add(gr._unit()._perp()._mult(V*Lt));var Yr=_t+Math.atan2(yt.y-Nt.y,yt.x-Nt.x);return dn.push(cr),{point:cr,angle:Yr,path:dn}}mn.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},mn.prototype.insert=function(I,j,V,X,se){this._forEachCell(j,V,X,se,this._insertBoxCell,this.boxUid++),this.boxKeys.push(I),this.bboxes.push(j),this.bboxes.push(V),this.bboxes.push(X),this.bboxes.push(se)},mn.prototype.insertCircle=function(I,j,V,X){this._forEachCell(j-X,V-X,j+X,V+X,this._insertCircleCell,this.circleUid++),this.circleKeys.push(I),this.circles.push(j),this.circles.push(V),this.circles.push(X)},mn.prototype._insertBoxCell=function(I,j,V,X,se,he){this.boxCells[se].push(he)},mn.prototype._insertCircleCell=function(I,j,V,X,se,he){this.circleCells[se].push(he)},mn.prototype._query=function(I,j,V,X,se,he){if(V<0||I>this.width||X<0||j>this.height)return!se&&[];var ve=[];if(I<=0&&j<=0&&this.width<=V&&this.height<=X){if(se)return!0;for(var be=0;be0:ve},mn.prototype._queryCircle=function(I,j,V,X,se){var he=I-V,ve=I+V,be=j-V,Se=j+V;if(ve<0||he>this.width||Se<0||be>this.height)return!X&&[];var Ue=[],Xe={hitTest:X,circle:{x:I,y:j,radius:V},seenUids:{box:{},circle:{}}};return this._forEachCell(he,be,ve,Se,this._queryCellCircle,Ue,Xe,se),X?Ue.length>0:Ue},mn.prototype.query=function(I,j,V,X,se){return this._query(I,j,V,X,!1,se)},mn.prototype.hitTest=function(I,j,V,X,se){return this._query(I,j,V,X,!0,se)},mn.prototype.hitTestCircle=function(I,j,V,X){return this._queryCircle(I,j,V,!0,X)},mn.prototype._queryCell=function(I,j,V,X,se,he,ve,be){var Se=ve.seenUids,Ue=this.boxCells[se];if(Ue!==null)for(var Xe=this.bboxes,it=0,xt=Ue;it=Xe[_t+0]&&X>=Xe[_t+1]&&(!be||be(this.boxKeys[Lt]))){if(ve.hitTest)return he.push(!0),!0;he.push({key:this.boxKeys[Lt],x1:Xe[_t],y1:Xe[_t+1],x2:Xe[_t+2],y2:Xe[_t+3]})}}}var Mt=this.circleCells[se];if(Mt!==null)for(var yt=this.circles,Nt=0,Rt=Mt;Ntve*ve+be*be},mn.prototype._circleAndRectCollide=function(I,j,V,X,se,he,ve){var be=(he-X)/2,Se=Math.abs(I-(X+be));if(Se>be+V)return!1;var Ue=(ve-se)/2,Xe=Math.abs(j-(se+Ue));if(Xe>Ue+V)return!1;if(Se<=be||Xe<=Ue)return!0;var it=Se-be,xt=Xe-Ue;return it*it+xt*xt<=V*V};var Or=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function vr(I,j){for(var V=0;V=1;Ti--)ii.push(cr.path[Ti]);for(var Gn=1;Gn0){for(var gi=ii[0].clone(),Mi=ii[0].clone(),Yi=1;Yi=tr.x&&Mi.x<=er.x&&gi.y>=tr.y&&Mi.y<=er.y?[ii]:Mi.xer.x||Mi.yer.y?[]:i.clipLine([ii],tr.x,tr.y,er.x,er.y)}for(var ci=0,zi=Qr;ci=this.screenRightBoundary||X<100||j>this.screenBottomBoundary},Kn.prototype.isInsideGrid=function(I,j,V,X){return V>=0&&I=0&&j0)return this.prevPlacement&&this.prevPlacement.variableOffsets[it.crossTileID]&&this.prevPlacement.placements[it.crossTileID]&&this.prevPlacement.placements[it.crossTileID].text&&(Mt=this.prevPlacement.variableOffsets[it.crossTileID].anchor),this.variableOffsets[it.crossTileID]={textOffset:yt,width:V,height:X,anchor:I,textBoxScale:se,prevAnchor:Mt},this.markUsedJustification(xt,I,it,Lt),xt.allowVerticalPlacement&&(this.markUsedOrientation(xt,Lt,it),this.placedOrientations[it.crossTileID]=Lt),{shift:Nt,placedGlyphBoxes:Rt}},pr.prototype.placeLayerBucketPart=function(I,j,V){var X=this,se=I.parameters,he=se.bucket,ve=se.layout,be=se.posMatrix,Se=se.textLabelPlaneMatrix,Ue=se.labelToScreenMatrix,Xe=se.textPixelRatio,it=se.holdingForFade,xt=se.collisionBoxArray,Lt=se.partiallyEvaluatedTextSize,_t=se.collisionGroup,Mt=ve.get("text-optional"),yt=ve.get("icon-optional"),Nt=ve.get("text-allow-overlap"),Rt=ve.get("icon-allow-overlap"),qt=ve.get("text-rotation-alignment")==="map",rn=ve.get("text-pitch-alignment")==="map",dn=ve.get("icon-text-fit")!=="none",Sn=ve.get("symbol-z-order")==="viewport-y",An=Nt&&(Rt||!he.hasIconData()||yt),tr=Rt&&(Nt||!he.hasTextData()||Mt);!he.collisionArrays&&xt&&he.deserializeCollisionBoxes(xt);var er=function(Gn,Mr){if(!j[Gn.crossTileID])if(it)X.placements[Gn.crossTileID]=new Mn(!1,!1,!1);else{var ai,Qr=!1,gi=!1,Mi=!0,Yi=null,ci={box:null,offscreen:null},zi={box:null,offscreen:null},Li=null,Qi=null,Ri=0,ea=0,fa=0;Mr.textFeatureIndex?Ri=Mr.textFeatureIndex:Gn.useRuntimeCollisionCircles&&(Ri=Gn.featureIndex),Mr.verticalTextFeatureIndex&&(ea=Mr.verticalTextFeatureIndex);var Ha=Mr.textBox;if(Ha){var xo=function(fo){var Vs=i.WritingMode.horizontal;if(he.allowVerticalPlacement&&!fo&&X.prevPlacement){var qs=X.prevPlacement.placedOrientations[Gn.crossTileID];qs&&(X.placedOrientations[Gn.crossTileID]=qs,Vs=qs,X.markUsedOrientation(he,Vs,Gn))}return Vs},bo=function(fo,Vs){if(he.allowVerticalPlacement&&Gn.numVerticalGlyphVertices>0&&Mr.verticalTextBox)for(var qs=0,rg=he.writingModes;qs0&&(qa=qa.filter(function(fo){return fo!==co.anchor})).unshift(co.anchor)}var eo=function(fo,Vs,qs){for(var rg=fo.x2-fo.x1,V3=fo.y2-fo.y1,Ml=Gn.textBoxScale,c1=dn&&!Rt?Vs:null,Op={box:[],offscreen:!1},q3=Nt?2*qa.length:qa.length,yh=0;yh=qa.length,f1=X.attemptAnchorPlacement(H3,fo,rg,V3,Ml,qt,rn,Xe,be,_t,ig,Gn,he,qs,c1);if(f1&&(Op=f1.placedGlyphBoxes)&&Op.box&&Op.box.length){Qr=!0,Yi=f1.shift;break}}return Op};bo(function(){return eo(Ha,Mr.iconBox,i.WritingMode.horizontal)},function(){var fo=Mr.verticalTextBox,Vs=ci&&ci.box&&ci.box.length;return he.allowVerticalPlacement&&!Vs&&Gn.numVerticalGlyphVertices>0&&fo?eo(fo,Mr.verticalIconBox,i.WritingMode.vertical):{box:null,offscreen:null}}),ci&&(Qr=ci.box,Mi=ci.offscreen);var As=xo(ci&&ci.box);if(!Qr&&X.prevPlacement){var Uo=X.prevPlacement.variableOffsets[Gn.crossTileID];Uo&&(X.variableOffsets[Gn.crossTileID]=Uo,X.markUsedJustification(he,Uo.anchor,Gn,As))}}else{var Js=function(fo,Vs){var qs=X.collisionIndex.placeCollisionBox(fo,Nt,Xe,be,_t.predicate);return qs&&qs.box&&qs.box.length&&(X.markUsedOrientation(he,Vs,Gn),X.placedOrientations[Gn.crossTileID]=Vs),qs};bo(function(){return Js(Ha,i.WritingMode.horizontal)},function(){var fo=Mr.verticalTextBox;return he.allowVerticalPlacement&&Gn.numVerticalGlyphVertices>0&&fo?Js(fo,i.WritingMode.vertical):{box:null,offscreen:null}}),xo(ci&&ci.box&&ci.box.length)}}if(Qr=(ai=ci)&&ai.box&&ai.box.length>0,Mi=ai&&ai.offscreen,Gn.useRuntimeCollisionCircles){var sc=he.text.placedSymbolArray.get(Gn.centerJustifiedTextSymbolIndex),Af=i.evaluateSizeForFeature(he.textSizeData,Lt,sc),Sp=ve.get("text-padding"),ud=Gn.collisionCircleDiameter;Li=X.collisionIndex.placeCollisionCircles(Nt,sc,he.lineVertexArray,he.glyphOffsetArray,Af,be,Se,Ue,V,rn,_t.predicate,ud,Sp),Qr=Nt||Li.circles.length>0&&!Li.collisionDetected,Mi=Mi&&Li.offscreen}if(Mr.iconFeatureIndex&&(fa=Mr.iconFeatureIndex),Mr.iconBox){var cd=function(fo){var Vs=dn&&Yi?$r(fo,Yi.x,Yi.y,qt,rn,X.transform.angle):fo;return X.collisionIndex.placeCollisionBox(Vs,Rt,Xe,be,_t.predicate)};gi=zi&&zi.box&&zi.box.length&&Mr.verticalIconBox?(Qi=cd(Mr.verticalIconBox)).box.length>0:(Qi=cd(Mr.iconBox)).box.length>0,Mi=Mi&&Qi.offscreen}var Ms=Mt||Gn.numHorizontalGlyphVertices===0&&Gn.numVerticalGlyphVertices===0,vh=yt||Gn.numIconVertices===0;if(Ms||vh?vh?Ms||(gi=gi&&Qr):Qr=gi&&Qr:gi=Qr=gi&&Qr,Qr&&ai&&ai.box&&(zi&&zi.box&&ea?X.collisionIndex.insertCollisionBox(ai.box,ve.get("text-ignore-placement"),he.bucketInstanceId,ea,_t.ID):X.collisionIndex.insertCollisionBox(ai.box,ve.get("text-ignore-placement"),he.bucketInstanceId,Ri,_t.ID)),gi&&Qi&&X.collisionIndex.insertCollisionBox(Qi.box,ve.get("icon-ignore-placement"),he.bucketInstanceId,fa,_t.ID),Li&&(Qr&&X.collisionIndex.insertCollisionCircles(Li.circles,ve.get("text-ignore-placement"),he.bucketInstanceId,Ri,_t.ID),V)){var Ep=he.bucketInstanceId,Kl=X.collisionCircleArrays[Ep];Kl===void 0&&(Kl=X.collisionCircleArrays[Ep]=new rr);for(var Cp=0;Cp=0;--cr){var Yr=gr[cr];er(he.symbolInstances.get(Yr),he.collisionArrays[Yr])}else for(var ii=I.symbolInstanceStart;ii=0&&(I.text.placedSymbolArray.get(Se).crossTileID=se>=0&&Se!==se?0:V.crossTileID)}},pr.prototype.markUsedOrientation=function(I,j,V){for(var X=j===i.WritingMode.horizontal||j===i.WritingMode.horizontalOnly?j:0,se=j===i.WritingMode.vertical?j:0,he=0,ve=[V.leftJustifiedTextSymbolIndex,V.centerJustifiedTextSymbolIndex,V.rightJustifiedTextSymbolIndex];he0||rn>0,er=Rt.numIconVertices>0,gr=X.placedOrientations[Rt.crossTileID],cr=gr===i.WritingMode.vertical,Yr=gr===i.WritingMode.horizontal||gr===i.WritingMode.horizontalOnly;if(tr){var ii=Un(An.text),Ti=cr?Nn:ii;Lt(I.text,qt,Ti);var Gn=Yr?Nn:ii;Lt(I.text,rn,Gn);var Mr=An.text.isHidden();[Rt.rightJustifiedTextSymbolIndex,Rt.centerJustifiedTextSymbolIndex,Rt.leftJustifiedTextSymbolIndex].forEach(function(fa){fa>=0&&(I.text.placedSymbolArray.get(fa).hidden=Mr||cr?1:0)}),Rt.verticalPlacedTextSymbolIndex>=0&&(I.text.placedSymbolArray.get(Rt.verticalPlacedTextSymbolIndex).hidden=Mr||Yr?1:0);var ai=X.variableOffsets[Rt.crossTileID];ai&&X.markUsedJustification(I,ai.anchor,Rt,gr);var Qr=X.placedOrientations[Rt.crossTileID];Qr&&(X.markUsedJustification(I,"left",Rt,Qr),X.markUsedOrientation(I,Qr,Rt))}if(er){var gi=Un(An.icon),Mi=!(it&&Rt.verticalPlacedIconSymbolIndex&&cr);if(Rt.placedIconSymbolIndex>=0){var Yi=Mi?gi:Nn;Lt(I.icon,Rt.numIconVertices,Yi),I.icon.placedSymbolArray.get(Rt.placedIconSymbolIndex).hidden=An.icon.isHidden()}if(Rt.verticalPlacedIconSymbolIndex>=0){var ci=Mi?Nn:gi;Lt(I.icon,Rt.numVerticalIconVertices,ci),I.icon.placedSymbolArray.get(Rt.verticalPlacedIconSymbolIndex).hidden=An.icon.isHidden()}}if(I.hasIconCollisionBoxData()||I.hasTextCollisionBoxData()){var zi=I.collisionArrays[Nt];if(zi){var Li=new i.Point(0,0);if(zi.textBox||zi.verticalTextBox){var Qi=!0;if(Se){var Ri=X.variableOffsets[dn];Ri?(Li=Fr(Ri.anchor,Ri.width,Ri.height,Ri.textOffset,Ri.textBoxScale),Ue&&Li._rotate(Xe?X.transform.angle:-X.transform.angle)):Qi=!1}zi.textBox&&qr(I.textCollisionBox.collisionVertexArray,An.text.placed,!Qi||cr,Li.x,Li.y),zi.verticalTextBox&&qr(I.textCollisionBox.collisionVertexArray,An.text.placed,!Qi||Yr,Li.x,Li.y)}var ea=Boolean(!Yr&&zi.verticalIconBox);zi.iconBox&&qr(I.iconCollisionBox.collisionVertexArray,An.icon.placed,ea,it?Li.x:0,it?Li.y:0),zi.verticalIconBox&&qr(I.iconCollisionBox.collisionVertexArray,An.icon.placed,!ea,it?Li.x:0,it?Li.y:0)}}},Mt=0;MtI},pr.prototype.setStale=function(){this.stale=!0};var _i=Math.pow(2,25),cn=Math.pow(2,24),jn=Math.pow(2,17),jt=Math.pow(2,16),fn=Math.pow(2,9),yn=Math.pow(2,8),$n=Math.pow(2,1);function Un(I){if(I.opacity===0&&!I.placed)return 0;if(I.opacity===1&&I.placed)return 4294967295;var j=I.placed?1:0,V=Math.floor(127*I.opacity);return V*_i+j*cn+V*jn+j*jt+V*fn+j*yn+V*$n+j}var Nn=0,Rn=function(I){this._sortAcrossTiles=I.layout.get("symbol-z-order")!=="viewport-y"&&I.layout.get("symbol-sort-key").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};Rn.prototype.continuePlacement=function(I,j,V,X,se){for(var he=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var ve=j[I[this._currentPlacementIndex]],be=this.placement.collisionIndex.transform.zoom;if(ve.type==="symbol"&&(!ve.minzoom||ve.minzoom<=be)&&(!ve.maxzoom||ve.maxzoom>be)){if(this._inProgressLayer||(this._inProgressLayer=new Rn(ve)),this._inProgressLayer.continuePlacement(V[ve.source],this.placement,this._showCollisionBoxes,ve,he))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},wn.prototype.commit=function(I){return this.placement.commit(I),this.placement};var kn=512/i.EXTENT/2,Tn=function(I,j,V){this.tileID=I,this.indexedSymbolInstances={},this.bucketInstanceId=V;for(var X=0;XI.overscaledZ)for(var be in ve){var Se=ve[be];Se.tileID.isChildOf(I)&&Se.findMatches(j.symbolInstances,I,se)}else{var Ue=ve[I.scaledTo(Number(he)).key];Ue&&Ue.findMatches(j.symbolInstances,I,se)}}for(var Xe=0;Xe1?"@2x":"",it=i.getJSON(he.transformRequest(he.normalizeSpriteURL(se,Xe,".json"),i.ResourceType.SpriteJSON),function(_t,Mt){it=null,Ue||(Ue=_t,be=Mt,Lt())}),xt=i.getImage(he.transformRequest(he.normalizeSpriteURL(se,Xe,".png"),i.ResourceType.SpriteImage),function(_t,Mt){xt=null,Ue||(Ue=_t,Se=Mt,Lt())});function Lt(){if(Ue)ve(Ue);else if(be&&Se){var _t=i.browser.getImageData(Se),Mt={};for(var yt in be){var Nt=be[yt],Rt=Nt.width,qt=Nt.height,rn=Nt.x,dn=Nt.y,Sn=Nt.sdf,An=Nt.pixelRatio,tr=Nt.stretchX,er=Nt.stretchY,gr=Nt.content,cr=new i.RGBAImage({width:Rt,height:qt});i.RGBAImage.copy(_t,cr,{x:rn,y:dn},{x:0,y:0},{width:Rt,height:qt}),Mt[yt]={data:cr,pixelRatio:An,sdf:Sn,stretchX:tr,stretchY:er,content:gr}}ve(null,Mt)}}return{cancel:function(){it&&(it.cancel(),it=null),xt&&(xt.cancel(),xt=null)}}}(V,this.map._requestManager,function(se,he){if(X._spriteRequest=null,se)X.fire(new i.ErrorEvent(se));else if(he)for(var ve in he)X.imageManager.addImage(ve,he[ve]);X.imageManager.setLoaded(!0),X._availableImages=X.imageManager.listImages(),X.dispatcher.broadcast("setImages",X._availableImages),X.fire(new i.Event("data",{dataType:"style"}))})},j.prototype._validateLayer=function(V){var X=this.sourceCaches[V.source];if(X){var se=V.sourceLayer;if(se){var he=X.getSource();(he.type==="geojson"||he.vectorLayerIds&&he.vectorLayerIds.indexOf(se)===-1)&&this.fire(new i.ErrorEvent(new Error('Source layer "'+se+'" does not exist on source "'+he.id+'" as specified by style layer "'+V.id+'"')))}}},j.prototype.loaded=function(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(var V in this.sourceCaches)if(!this.sourceCaches[V].loaded())return!1;return!!this.imageManager.isLoaded()},j.prototype._serializeLayers=function(V){for(var X=[],se=0,he=V;se0)throw new Error("Unimplemented: "+he.map(function(ve){return ve.command}).join(", ")+".");return se.forEach(function(ve){ve.command!=="setTransition"&&X[ve.command].apply(X,ve.args)}),this.stylesheet=V,!0},j.prototype.addImage=function(V,X){if(this.getImage(V))return this.fire(new i.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(V,X),this._availableImages=this.imageManager.listImages(),this._changedImages[V]=!0,this._changed=!0,this.fire(new i.Event("data",{dataType:"style"}))},j.prototype.updateImage=function(V,X){this.imageManager.updateImage(V,X)},j.prototype.getImage=function(V){return this.imageManager.getImage(V)},j.prototype.removeImage=function(V){if(!this.getImage(V))return this.fire(new i.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(V),this._availableImages=this.imageManager.listImages(),this._changedImages[V]=!0,this._changed=!0,this.fire(new i.Event("data",{dataType:"style"}))},j.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},j.prototype.addSource=function(V,X,se){var he=this;if(se===void 0&&(se={}),this._checkLoaded(),this.sourceCaches[V]!==void 0)throw new Error("There is already a source with this ID");if(!X.type)throw new Error("The type property must be defined, but the only the following properties were given: "+Object.keys(X).join(", ")+".");if(!(["vector","raster","geojson","video","image"].indexOf(X.type)>=0)||!this._validate(i.validateStyle.source,"sources."+V,X,null,se)){this.map&&this.map._collectResourceTiming&&(X.collectResourceTiming=!0);var ve=this.sourceCaches[V]=new He(V,X,this.dispatcher);ve.style=this,ve.setEventedParent(this,function(){return{isSourceLoaded:he.loaded(),source:ve.serialize(),sourceId:V}}),ve.onAdd(this.map),this._changed=!0}},j.prototype.removeSource=function(V){if(this._checkLoaded(),this.sourceCaches[V]===void 0)throw new Error("There is no source with this ID");for(var X in this._layers)if(this._layers[X].source===V)return this.fire(new i.ErrorEvent(new Error('Source "'+V+'" cannot be removed while layer "'+X+'" is using it.')));var se=this.sourceCaches[V];delete this.sourceCaches[V],delete this._updatedSources[V],se.fire(new i.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:V})),se.setEventedParent(null),se.clearTiles(),se.onRemove&&se.onRemove(this.map),this._changed=!0},j.prototype.setGeoJSONSourceData=function(V,X){this._checkLoaded(),this.sourceCaches[V].getSource().setData(X),this._changed=!0},j.prototype.getSource=function(V){return this.sourceCaches[V]&&this.sourceCaches[V].getSource()},j.prototype.addLayer=function(V,X,se){se===void 0&&(se={}),this._checkLoaded();var he=V.id;if(this.getLayer(he))this.fire(new i.ErrorEvent(new Error('Layer with id "'+he+'" already exists on this map')));else{var ve;if(V.type==="custom"){if(ir(this,i.validateCustomStyleLayer(V)))return;ve=i.createStyleLayer(V)}else{if(typeof V.source=="object"&&(this.addSource(he,V.source),V=i.clone$1(V),V=i.extend(V,{source:he})),this._validate(i.validateStyle.layer,"layers."+he,V,{arrayIndex:-1},se))return;ve=i.createStyleLayer(V),this._validateLayer(ve),ve.setEventedParent(this,{layer:{id:he}}),this._serializedLayers[ve.id]=ve.serialize()}var be=X?this._order.indexOf(X):this._order.length;if(X&&be===-1)this.fire(new i.ErrorEvent(new Error('Layer with id "'+X+'" does not exist on this map.')));else{if(this._order.splice(be,0,he),this._layerOrderChanged=!0,this._layers[he]=ve,this._removedLayers[he]&&ve.source&&ve.type!=="custom"){var Se=this._removedLayers[he];delete this._removedLayers[he],Se.type!==ve.type?this._updatedSources[ve.source]="clear":(this._updatedSources[ve.source]="reload",this.sourceCaches[ve.source].pause())}this._updateLayer(ve),ve.onAdd&&ve.onAdd(this.map)}}},j.prototype.moveLayer=function(V,X){if(this._checkLoaded(),this._changed=!0,this._layers[V]){if(V!==X){var se=this._order.indexOf(V);this._order.splice(se,1);var he=X?this._order.indexOf(X):this._order.length;X&&he===-1?this.fire(new i.ErrorEvent(new Error('Layer with id "'+X+'" does not exist on this map.'))):(this._order.splice(he,0,V),this._layerOrderChanged=!0)}}else this.fire(new i.ErrorEvent(new Error("The layer '"+V+"' does not exist in the map's style and cannot be moved.")))},j.prototype.removeLayer=function(V){this._checkLoaded();var X=this._layers[V];if(X){X.setEventedParent(null);var se=this._order.indexOf(V);this._order.splice(se,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[V]=X,delete this._layers[V],delete this._serializedLayers[V],delete this._updatedLayers[V],delete this._updatedPaintProps[V],X.onRemove&&X.onRemove(this.map)}else this.fire(new i.ErrorEvent(new Error("The layer '"+V+"' does not exist in the map's style and cannot be removed.")))},j.prototype.getLayer=function(V){return this._layers[V]},j.prototype.hasLayer=function(V){return V in this._layers},j.prototype.setLayerZoomRange=function(V,X,se){this._checkLoaded();var he=this.getLayer(V);he?he.minzoom===X&&he.maxzoom===se||(X!=null&&(he.minzoom=X),se!=null&&(he.maxzoom=se),this._updateLayer(he)):this.fire(new i.ErrorEvent(new Error("The layer '"+V+"' does not exist in the map's style and cannot have zoom extent.")))},j.prototype.setFilter=function(V,X,se){se===void 0&&(se={}),this._checkLoaded();var he=this.getLayer(V);if(he){if(!i.deepEqual(he.filter,X))return X==null?(he.filter=void 0,void this._updateLayer(he)):void(this._validate(i.validateStyle.filter,"layers."+he.id+".filter",X,null,se)||(he.filter=i.clone$1(X),this._updateLayer(he)))}else this.fire(new i.ErrorEvent(new Error("The layer '"+V+"' does not exist in the map's style and cannot be filtered.")))},j.prototype.getFilter=function(V){return i.clone$1(this.getLayer(V).filter)},j.prototype.setLayoutProperty=function(V,X,se,he){he===void 0&&(he={}),this._checkLoaded();var ve=this.getLayer(V);ve?i.deepEqual(ve.getLayoutProperty(X),se)||(ve.setLayoutProperty(X,se,he),this._updateLayer(ve)):this.fire(new i.ErrorEvent(new Error("The layer '"+V+"' does not exist in the map's style and cannot be styled.")))},j.prototype.getLayoutProperty=function(V,X){var se=this.getLayer(V);if(se)return se.getLayoutProperty(X);this.fire(new i.ErrorEvent(new Error("The layer '"+V+"' does not exist in the map's style.")))},j.prototype.setPaintProperty=function(V,X,se,he){he===void 0&&(he={}),this._checkLoaded();var ve=this.getLayer(V);ve?i.deepEqual(ve.getPaintProperty(X),se)||(ve.setPaintProperty(X,se,he)&&this._updateLayer(ve),this._changed=!0,this._updatedPaintProps[V]=!0):this.fire(new i.ErrorEvent(new Error("The layer '"+V+"' does not exist in the map's style and cannot be styled.")))},j.prototype.getPaintProperty=function(V,X){return this.getLayer(V).getPaintProperty(X)},j.prototype.setFeatureState=function(V,X){this._checkLoaded();var se=V.source,he=V.sourceLayer,ve=this.sourceCaches[se];if(ve!==void 0){var be=ve.getSource().type;be==="geojson"&&he?this.fire(new i.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):be!=="vector"||he?(V.id===void 0&&this.fire(new i.ErrorEvent(new Error("The feature id parameter must be provided."))),ve.setFeatureState(he,V.id,X)):this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new i.ErrorEvent(new Error("The source '"+se+"' does not exist in the map's style.")))},j.prototype.removeFeatureState=function(V,X){this._checkLoaded();var se=V.source,he=this.sourceCaches[se];if(he!==void 0){var ve=he.getSource().type,be=ve==="vector"?V.sourceLayer:void 0;ve!=="vector"||be?X&&typeof V.id!="string"&&typeof V.id!="number"?this.fire(new i.ErrorEvent(new Error("A feature id is requred to remove its specific state property."))):he.removeFeatureState(be,V.id,X):this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new i.ErrorEvent(new Error("The source '"+se+"' does not exist in the map's style.")))},j.prototype.getFeatureState=function(V){this._checkLoaded();var X=V.source,se=V.sourceLayer,he=this.sourceCaches[X];if(he!==void 0){if(he.getSource().type!=="vector"||se)return V.id===void 0&&this.fire(new i.ErrorEvent(new Error("The feature id parameter must be provided."))),he.getFeatureState(se,V.id);this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new i.ErrorEvent(new Error("The source '"+X+"' does not exist in the map's style.")))},j.prototype.getTransition=function(){return i.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},j.prototype.serialize=function(){return i.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:i.mapObject(this.sourceCaches,function(V){return V.serialize()}),layers:this._serializeLayers(this._order)},function(V){return V!==void 0})},j.prototype._updateLayer=function(V){this._updatedLayers[V.id]=!0,V.source&&!this._updatedSources[V.source]&&this.sourceCaches[V.source].getSource().type!=="raster"&&(this._updatedSources[V.source]="reload",this.sourceCaches[V.source].pause()),this._changed=!0},j.prototype._flattenAndSortRenderedFeatures=function(V){for(var X=this,se=function(gr){return X._layers[gr].type==="fill-extrusion"},he={},ve=[],be=this._order.length-1;be>=0;be--){var Se=this._order[be];if(se(Se)){he[Se]=be;for(var Ue=0,Xe=V;Ue=0;yt--){var Nt=this._order[yt];if(se(Nt))for(var Rt=ve.length-1;Rt>=0;Rt--){var qt=ve[Rt].feature;if(he[qt.layer.id] 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}"),Ja=ba("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),Ao=ba("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,0,1);}"),fs=ba(`#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float opacity +gl_FragColor=color*opacity; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`attribute vec2 a_pos;uniform mat4 u_matrix; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float opacity +gl_Position=u_matrix*vec4(a_pos,0,1);}`),ya=ba(`varying vec2 v_pos; +#pragma mapbox: define highp vec4 outline_color +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 outline_color +#pragma mapbox: initialize lowp float opacity +float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos; +#pragma mapbox: define highp vec4 outline_color +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 outline_color +#pragma mapbox: initialize lowp float opacity +gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),xa=ba(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos; +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +void main() { +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos; +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),Zo=ba(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b; +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +void main() { +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b; +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`),oa=ba(`varying vec4 v_color;void main() {gl_FragColor=v_color; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec4 v_color; +#pragma mapbox: define highp float base +#pragma mapbox: define highp float height +#pragma mapbox: define highp vec4 color +void main() { +#pragma mapbox: initialize highp float base +#pragma mapbox: initialize highp float height +#pragma mapbox: initialize highp vec4 color +vec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`),hs=ba(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; +#pragma mapbox: define lowp float base +#pragma mapbox: define lowp float height +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float base +#pragma mapbox: initialize lowp float height +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; +#pragma mapbox: define lowp float base +#pragma mapbox: define lowp float height +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float base +#pragma mapbox: initialize lowp float height +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0 +? a_pos +: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`),bs=ba(`#ifdef GL_ES +precision highp float; +#endif +uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform float u_maxzoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggeration=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/ pow(2.0,(u_zoom-u_maxzoom)*exaggeration+19.2562-u_zoom);gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,"uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),so=ba(`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent; +#define PI 3.141592653589793 +void main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,"uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),Jo=ba(`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,` +#define scale 0.015873016 +attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float width +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float width +float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`),_s=ba(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp float v_lineprogress; +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,vec2(v_lineprogress,0.5));gl_FragColor=color*(alpha*opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,` +#define MAX_LINE_DISTANCE 32767.0 +#define scale 0.015873016 +attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_lineprogress; +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float width +void main() { +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float width +float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_lineprogress=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0/MAX_LINE_DISTANCE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`),Ls=ba(`uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,` +#define scale 0.015873016 +#define LINE_DISTANCE_SCALE 2.0 +attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),Oo=ba(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,` +#define scale 0.015873016 +#define LINE_DISTANCE_SCALE 2.0 +attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`),Ka=ba(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,"uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),$o=ba(`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity; +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize lowp float opacity +lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity; +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize lowp float opacity +vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +camera_to_anchor_distance/u_camera_to_center_distance : +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}`),ic=ba(`#define SDF_PX 8.0 +uniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +float EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +camera_to_anchor_distance/u_camera_to_center_distance : +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`),Mc=ba(`#define SDF_PX 8.0 +#define SDF 1.0 +#define ICON 0.0 +uniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +camera_to_anchor_distance/u_camera_to_center_distance : +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`);function ba(I,j){var V=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,X={};return{fragmentSource:I=I.replace(V,function(se,he,ve,be,Se){return X[Se]=!0,he==="define"?` +#ifndef HAS_UNIFORM_u_`+Se+` +varying `+ve+" "+be+" "+Se+`; +#else +uniform `+ve+" "+be+" u_"+Se+`; +#endif +`:` +#ifdef HAS_UNIFORM_u_`+Se+` + `+ve+" "+be+" "+Se+" = u_"+Se+`; +#endif +`}),vertexSource:j=j.replace(V,function(se,he,ve,be,Se){var Ue=be==="float"?"vec2":"vec4",Xe=Se.match(/color/)?"color":Ue;return X[Se]?he==="define"?` +#ifndef HAS_UNIFORM_u_`+Se+` +uniform lowp float u_`+Se+`_t; +attribute `+ve+" "+Ue+" a_"+Se+`; +varying `+ve+" "+be+" "+Se+`; +#else +uniform `+ve+" "+be+" u_"+Se+`; +#endif +`:Xe==="vec4"?` +#ifndef HAS_UNIFORM_u_`+Se+` + `+Se+" = a_"+Se+`; +#else + `+ve+" "+be+" "+Se+" = u_"+Se+`; +#endif +`:` +#ifndef HAS_UNIFORM_u_`+Se+` + `+Se+" = unpack_mix_"+Xe+"(a_"+Se+", u_"+Se+`_t); +#else + `+ve+" "+be+" "+Se+" = u_"+Se+`; +#endif +`:he==="define"?` +#ifndef HAS_UNIFORM_u_`+Se+` +uniform lowp float u_`+Se+`_t; +attribute `+ve+" "+Ue+" a_"+Se+`; +#else +uniform `+ve+" "+be+" u_"+Se+`; +#endif +`:Xe==="vec4"?` +#ifndef HAS_UNIFORM_u_`+Se+` + `+ve+" "+be+" "+Se+" = a_"+Se+`; +#else + `+ve+" "+be+" "+Se+" = u_"+Se+`; +#endif +`:` +#ifndef HAS_UNIFORM_u_`+Se+` + `+ve+" "+be+" "+Se+" = unpack_mix_"+Xe+"(a_"+Se+", u_"+Se+`_t); +#else + `+ve+" "+be+" "+Se+" = u_"+Se+`; +#endif +`})}}var ju=Object.freeze({__proto__:null,prelude:Nr,background:ri,backgroundPattern:ji,circle:Bi,clippingMask:Sr,heatmap:ui,heatmapTexture:si,collisionBox:ta,collisionCircle:Ja,debug:Ao,fill:fs,fillOutline:ya,fillOutlinePattern:xa,fillPattern:Zo,fillExtrusion:oa,fillExtrusionPattern:hs,hillshadePrepare:bs,hillshade:so,line:Jo,lineGradient:_s,linePattern:Ls,lineSDF:Oo,raster:Ka,symbolIcon:$o,symbolSDF:ic,symbolTextAndIcon:Mc}),Wl=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};Wl.prototype.bind=function(I,j,V,X,se,he,ve,be){this.context=I;for(var Se=this.boundPaintVertexBuffers.length!==X.length,Ue=0;!Se&&Ue>16,be>>16],u_pixel_coord_lower:[65535&ve,65535&be]}}Sc.prototype.draw=function(I,j,V,X,se,he,ve,be,Se,Ue,Xe,it,xt,Lt,_t,Mt){var yt,Nt=I.gl;if(!this.failedToCreate){for(var Rt in I.program.set(this.program),I.setDepthMode(V),I.setStencilMode(X),I.setColorMode(se),I.setCullFace(he),this.fixedUniforms)this.fixedUniforms[Rt].set(ve[Rt]);Lt&&Lt.setUniforms(I,this.binderUniforms,it,{zoom:xt});for(var qt=(yt={},yt[Nt.LINES]=2,yt[Nt.TRIANGLES]=3,yt[Nt.LINE_STRIP]=1,yt)[j],rn=0,dn=Xe.get();rn0?1-1/(1.001-ve):-ve),u_contrast_factor:(he=se.paint.get("raster-contrast"),he>0?1/(1-he):1+he),u_spin_weights:pt(se.paint.get("raster-hue-rotate"))};var he,ve};function pt(I){I*=Math.PI/180;var j=Math.sin(I),V=Math.cos(I);return[(2*V+1)/3,(-Math.sqrt(3)*j-V+1)/3,(Math.sqrt(3)*j-V+1)/3]}var Ct,Qt=function(I,j,V,X,se,he,ve,be,Se,Ue){var Xe=se.transform;return{u_is_size_zoom_constant:+(I==="constant"||I==="source"),u_is_size_feature_constant:+(I==="constant"||I==="camera"),u_size_t:j?j.uSizeT:0,u_size:j?j.uSize:0,u_camera_to_center_distance:Xe.cameraToCenterDistance,u_pitch:Xe.pitch/360*2*Math.PI,u_rotate_symbol:+V,u_aspect_ratio:Xe.width/Xe.height,u_fade_change:se.options.fadeDuration?se.symbolFadeChange:1,u_matrix:he,u_label_plane_matrix:ve,u_coord_matrix:be,u_is_text:+Se,u_pitch_with_map:+X,u_texsize:Ue,u_texture:0}},en=function(I,j,V,X,se,he,ve,be,Se,Ue,Xe){var it=se.transform;return i.extend(Qt(I,j,V,X,se,he,ve,be,Se,Ue),{u_gamma_scale:X?Math.cos(it._pitch)*it.cameraToCenterDistance:1,u_device_pixel_ratio:i.browser.devicePixelRatio,u_is_halo:+Xe})},Yt=function(I,j,V,X,se,he,ve,be,Se,Ue){return i.extend(en(I,j,V,X,se,he,ve,be,!0,Se,!0),{u_texsize_icon:Ue,u_texture_icon:1})},an=function(I,j,V){return{u_matrix:I,u_opacity:j,u_color:V}},hn=function(I,j,V,X,se,he){return i.extend(function(ve,be,Se,Ue){var Xe=Se.imageManager.getPattern(ve.from.toString()),it=Se.imageManager.getPattern(ve.to.toString()),xt=Se.imageManager.getPixelSize(),Lt=xt.width,_t=xt.height,Mt=Math.pow(2,Ue.tileID.overscaledZ),yt=Ue.tileSize*Math.pow(2,Se.transform.tileZoom)/Mt,Nt=yt*(Ue.tileID.canonical.x+Ue.tileID.wrap*Mt),Rt=yt*Ue.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Xe.tl,u_pattern_br_a:Xe.br,u_pattern_tl_b:it.tl,u_pattern_br_b:it.br,u_texsize:[Lt,_t],u_mix:be.t,u_pattern_size_a:Xe.displaySize,u_pattern_size_b:it.displaySize,u_scale_a:be.fromScale,u_scale_b:be.toScale,u_tile_units_to_pixels:1/Ln(Ue,1,Se.transform.tileZoom),u_pixel_coord_upper:[Nt>>16,Rt>>16],u_pixel_coord_lower:[65535&Nt,65535&Rt]}}(X,he,V,se),{u_matrix:I,u_opacity:j})},xn={fillExtrusion:function(I,j){return{u_matrix:new i.UniformMatrix4f(I,j.u_matrix),u_lightpos:new i.Uniform3f(I,j.u_lightpos),u_lightintensity:new i.Uniform1f(I,j.u_lightintensity),u_lightcolor:new i.Uniform3f(I,j.u_lightcolor),u_vertical_gradient:new i.Uniform1f(I,j.u_vertical_gradient),u_opacity:new i.Uniform1f(I,j.u_opacity)}},fillExtrusionPattern:function(I,j){return{u_matrix:new i.UniformMatrix4f(I,j.u_matrix),u_lightpos:new i.Uniform3f(I,j.u_lightpos),u_lightintensity:new i.Uniform1f(I,j.u_lightintensity),u_lightcolor:new i.Uniform3f(I,j.u_lightcolor),u_vertical_gradient:new i.Uniform1f(I,j.u_vertical_gradient),u_height_factor:new i.Uniform1f(I,j.u_height_factor),u_image:new i.Uniform1i(I,j.u_image),u_texsize:new i.Uniform2f(I,j.u_texsize),u_pixel_coord_upper:new i.Uniform2f(I,j.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(I,j.u_pixel_coord_lower),u_scale:new i.Uniform3f(I,j.u_scale),u_fade:new i.Uniform1f(I,j.u_fade),u_opacity:new i.Uniform1f(I,j.u_opacity)}},fill:function(I,j){return{u_matrix:new i.UniformMatrix4f(I,j.u_matrix)}},fillPattern:function(I,j){return{u_matrix:new i.UniformMatrix4f(I,j.u_matrix),u_image:new i.Uniform1i(I,j.u_image),u_texsize:new i.Uniform2f(I,j.u_texsize),u_pixel_coord_upper:new i.Uniform2f(I,j.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(I,j.u_pixel_coord_lower),u_scale:new i.Uniform3f(I,j.u_scale),u_fade:new i.Uniform1f(I,j.u_fade)}},fillOutline:function(I,j){return{u_matrix:new i.UniformMatrix4f(I,j.u_matrix),u_world:new i.Uniform2f(I,j.u_world)}},fillOutlinePattern:function(I,j){return{u_matrix:new i.UniformMatrix4f(I,j.u_matrix),u_world:new i.Uniform2f(I,j.u_world),u_image:new i.Uniform1i(I,j.u_image),u_texsize:new i.Uniform2f(I,j.u_texsize),u_pixel_coord_upper:new i.Uniform2f(I,j.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(I,j.u_pixel_coord_lower),u_scale:new i.Uniform3f(I,j.u_scale),u_fade:new i.Uniform1f(I,j.u_fade)}},circle:function(I,j){return{u_camera_to_center_distance:new i.Uniform1f(I,j.u_camera_to_center_distance),u_scale_with_map:new i.Uniform1i(I,j.u_scale_with_map),u_pitch_with_map:new i.Uniform1i(I,j.u_pitch_with_map),u_extrude_scale:new i.Uniform2f(I,j.u_extrude_scale),u_device_pixel_ratio:new i.Uniform1f(I,j.u_device_pixel_ratio),u_matrix:new i.UniformMatrix4f(I,j.u_matrix)}},collisionBox:function(I,j){return{u_matrix:new i.UniformMatrix4f(I,j.u_matrix),u_camera_to_center_distance:new i.Uniform1f(I,j.u_camera_to_center_distance),u_pixels_to_tile_units:new i.Uniform1f(I,j.u_pixels_to_tile_units),u_extrude_scale:new i.Uniform2f(I,j.u_extrude_scale),u_overscale_factor:new i.Uniform1f(I,j.u_overscale_factor)}},collisionCircle:function(I,j){return{u_matrix:new i.UniformMatrix4f(I,j.u_matrix),u_inv_matrix:new i.UniformMatrix4f(I,j.u_inv_matrix),u_camera_to_center_distance:new i.Uniform1f(I,j.u_camera_to_center_distance),u_viewport_size:new i.Uniform2f(I,j.u_viewport_size)}},debug:function(I,j){return{u_color:new i.UniformColor(I,j.u_color),u_matrix:new i.UniformMatrix4f(I,j.u_matrix),u_overlay:new i.Uniform1i(I,j.u_overlay),u_overlay_scale:new i.Uniform1f(I,j.u_overlay_scale)}},clippingMask:function(I,j){return{u_matrix:new i.UniformMatrix4f(I,j.u_matrix)}},heatmap:function(I,j){return{u_extrude_scale:new i.Uniform1f(I,j.u_extrude_scale),u_intensity:new i.Uniform1f(I,j.u_intensity),u_matrix:new i.UniformMatrix4f(I,j.u_matrix)}},heatmapTexture:function(I,j){return{u_matrix:new i.UniformMatrix4f(I,j.u_matrix),u_world:new i.Uniform2f(I,j.u_world),u_image:new i.Uniform1i(I,j.u_image),u_color_ramp:new i.Uniform1i(I,j.u_color_ramp),u_opacity:new i.Uniform1f(I,j.u_opacity)}},hillshade:function(I,j){return{u_matrix:new i.UniformMatrix4f(I,j.u_matrix),u_image:new i.Uniform1i(I,j.u_image),u_latrange:new i.Uniform2f(I,j.u_latrange),u_light:new i.Uniform2f(I,j.u_light),u_shadow:new i.UniformColor(I,j.u_shadow),u_highlight:new i.UniformColor(I,j.u_highlight),u_accent:new i.UniformColor(I,j.u_accent)}},hillshadePrepare:function(I,j){return{u_matrix:new i.UniformMatrix4f(I,j.u_matrix),u_image:new i.Uniform1i(I,j.u_image),u_dimension:new i.Uniform2f(I,j.u_dimension),u_zoom:new i.Uniform1f(I,j.u_zoom),u_maxzoom:new i.Uniform1f(I,j.u_maxzoom),u_unpack:new i.Uniform4f(I,j.u_unpack)}},line:function(I,j){return{u_matrix:new i.UniformMatrix4f(I,j.u_matrix),u_ratio:new i.Uniform1f(I,j.u_ratio),u_device_pixel_ratio:new i.Uniform1f(I,j.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(I,j.u_units_to_pixels)}},lineGradient:function(I,j){return{u_matrix:new i.UniformMatrix4f(I,j.u_matrix),u_ratio:new i.Uniform1f(I,j.u_ratio),u_device_pixel_ratio:new i.Uniform1f(I,j.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(I,j.u_units_to_pixels),u_image:new i.Uniform1i(I,j.u_image)}},linePattern:function(I,j){return{u_matrix:new i.UniformMatrix4f(I,j.u_matrix),u_texsize:new i.Uniform2f(I,j.u_texsize),u_ratio:new i.Uniform1f(I,j.u_ratio),u_device_pixel_ratio:new i.Uniform1f(I,j.u_device_pixel_ratio),u_image:new i.Uniform1i(I,j.u_image),u_units_to_pixels:new i.Uniform2f(I,j.u_units_to_pixels),u_scale:new i.Uniform3f(I,j.u_scale),u_fade:new i.Uniform1f(I,j.u_fade)}},lineSDF:function(I,j){return{u_matrix:new i.UniformMatrix4f(I,j.u_matrix),u_ratio:new i.Uniform1f(I,j.u_ratio),u_device_pixel_ratio:new i.Uniform1f(I,j.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(I,j.u_units_to_pixels),u_patternscale_a:new i.Uniform2f(I,j.u_patternscale_a),u_patternscale_b:new i.Uniform2f(I,j.u_patternscale_b),u_sdfgamma:new i.Uniform1f(I,j.u_sdfgamma),u_image:new i.Uniform1i(I,j.u_image),u_tex_y_a:new i.Uniform1f(I,j.u_tex_y_a),u_tex_y_b:new i.Uniform1f(I,j.u_tex_y_b),u_mix:new i.Uniform1f(I,j.u_mix)}},raster:function(I,j){return{u_matrix:new i.UniformMatrix4f(I,j.u_matrix),u_tl_parent:new i.Uniform2f(I,j.u_tl_parent),u_scale_parent:new i.Uniform1f(I,j.u_scale_parent),u_buffer_scale:new i.Uniform1f(I,j.u_buffer_scale),u_fade_t:new i.Uniform1f(I,j.u_fade_t),u_opacity:new i.Uniform1f(I,j.u_opacity),u_image0:new i.Uniform1i(I,j.u_image0),u_image1:new i.Uniform1i(I,j.u_image1),u_brightness_low:new i.Uniform1f(I,j.u_brightness_low),u_brightness_high:new i.Uniform1f(I,j.u_brightness_high),u_saturation_factor:new i.Uniform1f(I,j.u_saturation_factor),u_contrast_factor:new i.Uniform1f(I,j.u_contrast_factor),u_spin_weights:new i.Uniform3f(I,j.u_spin_weights)}},symbolIcon:function(I,j){return{u_is_size_zoom_constant:new i.Uniform1i(I,j.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(I,j.u_is_size_feature_constant),u_size_t:new i.Uniform1f(I,j.u_size_t),u_size:new i.Uniform1f(I,j.u_size),u_camera_to_center_distance:new i.Uniform1f(I,j.u_camera_to_center_distance),u_pitch:new i.Uniform1f(I,j.u_pitch),u_rotate_symbol:new i.Uniform1i(I,j.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(I,j.u_aspect_ratio),u_fade_change:new i.Uniform1f(I,j.u_fade_change),u_matrix:new i.UniformMatrix4f(I,j.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(I,j.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(I,j.u_coord_matrix),u_is_text:new i.Uniform1i(I,j.u_is_text),u_pitch_with_map:new i.Uniform1i(I,j.u_pitch_with_map),u_texsize:new i.Uniform2f(I,j.u_texsize),u_texture:new i.Uniform1i(I,j.u_texture)}},symbolSDF:function(I,j){return{u_is_size_zoom_constant:new i.Uniform1i(I,j.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(I,j.u_is_size_feature_constant),u_size_t:new i.Uniform1f(I,j.u_size_t),u_size:new i.Uniform1f(I,j.u_size),u_camera_to_center_distance:new i.Uniform1f(I,j.u_camera_to_center_distance),u_pitch:new i.Uniform1f(I,j.u_pitch),u_rotate_symbol:new i.Uniform1i(I,j.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(I,j.u_aspect_ratio),u_fade_change:new i.Uniform1f(I,j.u_fade_change),u_matrix:new i.UniformMatrix4f(I,j.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(I,j.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(I,j.u_coord_matrix),u_is_text:new i.Uniform1i(I,j.u_is_text),u_pitch_with_map:new i.Uniform1i(I,j.u_pitch_with_map),u_texsize:new i.Uniform2f(I,j.u_texsize),u_texture:new i.Uniform1i(I,j.u_texture),u_gamma_scale:new i.Uniform1f(I,j.u_gamma_scale),u_device_pixel_ratio:new i.Uniform1f(I,j.u_device_pixel_ratio),u_is_halo:new i.Uniform1i(I,j.u_is_halo)}},symbolTextAndIcon:function(I,j){return{u_is_size_zoom_constant:new i.Uniform1i(I,j.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(I,j.u_is_size_feature_constant),u_size_t:new i.Uniform1f(I,j.u_size_t),u_size:new i.Uniform1f(I,j.u_size),u_camera_to_center_distance:new i.Uniform1f(I,j.u_camera_to_center_distance),u_pitch:new i.Uniform1f(I,j.u_pitch),u_rotate_symbol:new i.Uniform1i(I,j.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(I,j.u_aspect_ratio),u_fade_change:new i.Uniform1f(I,j.u_fade_change),u_matrix:new i.UniformMatrix4f(I,j.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(I,j.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(I,j.u_coord_matrix),u_is_text:new i.Uniform1i(I,j.u_is_text),u_pitch_with_map:new i.Uniform1i(I,j.u_pitch_with_map),u_texsize:new i.Uniform2f(I,j.u_texsize),u_texsize_icon:new i.Uniform2f(I,j.u_texsize_icon),u_texture:new i.Uniform1i(I,j.u_texture),u_texture_icon:new i.Uniform1i(I,j.u_texture_icon),u_gamma_scale:new i.Uniform1f(I,j.u_gamma_scale),u_device_pixel_ratio:new i.Uniform1f(I,j.u_device_pixel_ratio),u_is_halo:new i.Uniform1i(I,j.u_is_halo)}},background:function(I,j){return{u_matrix:new i.UniformMatrix4f(I,j.u_matrix),u_opacity:new i.Uniform1f(I,j.u_opacity),u_color:new i.UniformColor(I,j.u_color)}},backgroundPattern:function(I,j){return{u_matrix:new i.UniformMatrix4f(I,j.u_matrix),u_opacity:new i.Uniform1f(I,j.u_opacity),u_image:new i.Uniform1i(I,j.u_image),u_pattern_tl_a:new i.Uniform2f(I,j.u_pattern_tl_a),u_pattern_br_a:new i.Uniform2f(I,j.u_pattern_br_a),u_pattern_tl_b:new i.Uniform2f(I,j.u_pattern_tl_b),u_pattern_br_b:new i.Uniform2f(I,j.u_pattern_br_b),u_texsize:new i.Uniform2f(I,j.u_texsize),u_mix:new i.Uniform1f(I,j.u_mix),u_pattern_size_a:new i.Uniform2f(I,j.u_pattern_size_a),u_pattern_size_b:new i.Uniform2f(I,j.u_pattern_size_b),u_scale_a:new i.Uniform1f(I,j.u_scale_a),u_scale_b:new i.Uniform1f(I,j.u_scale_b),u_pixel_coord_upper:new i.Uniform2f(I,j.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(I,j.u_pixel_coord_lower),u_tile_units_to_pixels:new i.Uniform1f(I,j.u_tile_units_to_pixels)}}};function _n(I,j,V,X,se,he,ve){for(var be=I.context,Se=be.gl,Ue=I.useProgram("collisionBox"),Xe=[],it=0,xt=0,Lt=0;Lt0){var rn=i.create(),dn=Nt;i.mul(rn,yt.placementInvProjMatrix,I.transform.glCoordMatrix),i.mul(rn,rn,yt.placementViewportMatrix),Xe.push({circleArray:qt,circleOffset:xt,transform:dn,invTransform:rn}),xt=it+=qt.length/4}Rt&&Ue.draw(be,Se.LINES,dt.disabled,Pe.disabled,I.colorModeForRenderPass(),Ae.disabled,Yl(Nt,I.transform,Mt),V.id,Rt.layoutVertexBuffer,Rt.indexBuffer,Rt.segments,null,I.transform.zoom,null,null,Rt.collisionVertexBuffer)}}if(ve&&Xe.length){var Sn=I.useProgram("collisionCircle"),An=new i.StructArrayLayout2f1f2i16;An.resize(4*it),An._trim();for(var tr=0,er=0,gr=Xe;er=0&&(_t[yt.associatedIconIndex]={shiftedAnchor:gr,angle:cr})}else vr(yt.numGlyphs,xt)}if(Xe){Lt.clear();for(var ii=I.icon.placedSymbolArray,Ti=0;Ti0){var ve=i.browser.now(),be=(ve-I.timeAdded)/he,Se=j?(ve-j.timeAdded)/he:-1,Ue=V.getSource(),Xe=se.coveringZoomLevel({tileSize:Ue.tileSize,roundZoom:Ue.roundZoom}),it=!j||Math.abs(j.tileID.overscaledZ-Xe)>Math.abs(I.tileID.overscaledZ-Xe),xt=it&&I.refreshedUponExpiration?1:i.clamp(it?be:1-Se,0,1);return I.refreshedUponExpiration&&be>=1&&(I.refreshedUponExpiration=!1),j?{opacity:1,mix:1-xt}:{opacity:xt,mix:0}}return{opacity:1,mix:0}}var ca=new i.Color(1,0,0,1),lo=new i.Color(0,1,0,1),io=new i.Color(0,0,1,1),za=new i.Color(1,0,1,1),Ra=new i.Color(0,1,1,1);function ao(I){var j=I.transform.padding;Lo(I,I.transform.height-(j.top||0),3,ca),Lo(I,j.bottom||0,3,lo),Ko(I,j.left||0,3,io),Ko(I,I.transform.width-(j.right||0),3,za);var V=I.transform.centerPoint;(function(X,se,he,ve){Qo(X,se-1,he-10,2,20,ve),Qo(X,se-10,he-1,20,2,ve)})(I,V.x,I.transform.height-V.y,Ra)}function Lo(I,j,V,X){Qo(I,0,j+V/2,I.transform.width,V,X)}function Ko(I,j,V,X){Qo(I,j-V/2,0,V,I.transform.height,X)}function Qo(I,j,V,X,se,he){var ve=I.context,be=ve.gl;be.enable(be.SCISSOR_TEST),be.scissor(j*i.browser.devicePixelRatio,V*i.browser.devicePixelRatio,X*i.browser.devicePixelRatio,se*i.browser.devicePixelRatio),ve.clear({color:he}),be.disable(be.SCISSOR_TEST)}function es(I,j,V){var X=I.context,se=X.gl,he=V.posMatrix,ve=I.useProgram("debug"),be=dt.disabled,Se=Pe.disabled,Ue=I.colorModeForRenderPass();X.activeTexture.set(se.TEXTURE0),I.emptyTexture.bind(se.LINEAR,se.CLAMP_TO_EDGE),ve.draw(X,se.LINE_STRIP,be,Se,Ue,Ae.disabled,Uu(he,i.Color.red),"$debug",I.debugBuffer,I.tileBorderIndexBuffer,I.debugSegments);var Xe=j.getTileByID(V.key).latestRawTileData,it=Xe&&Xe.byteLength||0,xt=Math.floor(it/1024),Lt=j.getTile(V).tileSize,_t=512/Math.min(Lt,512)*(V.overscaledZ/I.transform.zoom)*.5,Mt=V.canonical.toString();V.overscaledZ!==V.canonical.z&&(Mt+=" => "+V.overscaledZ),function(yt,Nt){yt.initDebugOverlayCanvas();var Rt=yt.debugOverlayCanvas,qt=yt.context.gl,rn=yt.debugOverlayCanvas.getContext("2d");rn.clearRect(0,0,Rt.width,Rt.height),rn.shadowColor="white",rn.shadowBlur=2,rn.lineWidth=1.5,rn.strokeStyle="white",rn.textBaseline="top",rn.font="bold 36px Open Sans, sans-serif",rn.fillText(Nt,5,5),rn.strokeText(Nt,5,5),yt.debugOverlayTexture.update(Rt),yt.debugOverlayTexture.bind(qt.LINEAR,qt.CLAMP_TO_EDGE)}(I,Mt+" "+xt+"kb"),ve.draw(X,se.TRIANGLES,be,Se,Ie.alphaBlended,Ae.disabled,Uu(he,i.Color.transparent,_t),"$debug",I.debugBuffer,I.quadTriangleIndexBuffer,I.debugSegments)}var ts={symbol:function(I,j,V,X,se){if(I.renderPass==="translucent"){var he=Pe.disabled,ve=I.colorModeForRenderPass();V.layout.get("text-variable-anchor")&&function(be,Se,Ue,Xe,it,xt,Lt){for(var _t=Se.transform,Mt=it==="map",yt=xt==="map",Nt=0,Rt=be;Nt256&&this.clearStencil(),V.setColorMode(Ie.disabled),V.setDepthMode(dt.disabled);var se=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var he=0,ve=j;he256&&this.clearStencil();var I=this.nextStencilID++,j=this.context.gl;return new Pe({func:j.NOTEQUAL,mask:255},I,255,j.KEEP,j.KEEP,j.REPLACE)},na.prototype.stencilModeForClipping=function(I){var j=this.context.gl;return new Pe({func:j.EQUAL,mask:255},this._tileClippingMaskIDs[I.key],0,j.KEEP,j.KEEP,j.REPLACE)},na.prototype.stencilConfigForOverlap=function(I){var j,V=this.context.gl,X=I.sort(function(Se,Ue){return Ue.overscaledZ-Se.overscaledZ}),se=X[X.length-1].overscaledZ,he=X[0].overscaledZ-se+1;if(he>1){this.currentStencilSource=void 0,this.nextStencilID+he>256&&this.clearStencil();for(var ve={},be=0;be=0;this.currentLayer--){var dn=this.style._layers[X[this.currentLayer]],Sn=se[dn.source],An=Ue[dn.source];this._renderTileClippingMasks(dn,An),this.renderLayer(this,Sn,dn,An)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?j.pop():null},na.prototype.isPatternMissing=function(I){if(!I)return!1;if(!I.from||!I.to)return!0;var j=this.imageManager.getPattern(I.from.toString()),V=this.imageManager.getPattern(I.to.toString());return!j||!V},na.prototype.useProgram=function(I,j){this.cache=this.cache||{};var V=""+I+(j?j.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[V]||(this.cache[V]=new Sc(this.context,ju[I],j,xn[I],this._showOverdrawInspector)),this.cache[V]},na.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},na.prototype.setBaseState=function(){var I=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(I.FUNC_ADD)},na.prototype.initDebugOverlayCanvas=function(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=i.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var I=this.context.gl;this.debugOverlayTexture=new i.Texture(this.context,this.debugOverlayCanvas,I.RGBA)}},na.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var ht=function(I,j){this.points=I,this.planes=j};ht.fromInvProjectionMatrix=function(I,j,V){var X=Math.pow(2,V),se=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(function(ve){return i.transformMat4([],ve,I)}).map(function(ve){return i.scale$1([],ve,1/ve[3]/j*X)}),he=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(function(ve){var be=i.sub([],se[ve[0]],se[ve[1]]),Se=i.sub([],se[ve[2]],se[ve[1]]),Ue=i.normalize([],i.cross([],be,Se)),Xe=-i.dot(Ue,se[ve[1]]);return Ue.concat(Xe)});return new ht(se,he)};var Ft=function(I,j){this.min=I,this.max=j,this.center=i.scale$2([],i.add([],this.min,this.max),.5)};Ft.prototype.quadrant=function(I){for(var j=[I%2==0,I<2],V=i.clone$2(this.min),X=i.clone$2(this.max),se=0;se=0;if(he===0)return 0;he!==j.length&&(V=!1)}if(V)return 2;for(var be=0;be<3;be++){for(var Se=Number.MAX_VALUE,Ue=-Number.MAX_VALUE,Xe=0;Xethis.max[be]-this.min[be])return 0}return 1};var ln=function(I,j,V,X){if(I===void 0&&(I=0),j===void 0&&(j=0),V===void 0&&(V=0),X===void 0&&(X=0),isNaN(I)||I<0||isNaN(j)||j<0||isNaN(V)||V<0||isNaN(X)||X<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=I,this.bottom=j,this.left=V,this.right=X};ln.prototype.interpolate=function(I,j,V){return j.top!=null&&I.top!=null&&(this.top=i.number(I.top,j.top,V)),j.bottom!=null&&I.bottom!=null&&(this.bottom=i.number(I.bottom,j.bottom,V)),j.left!=null&&I.left!=null&&(this.left=i.number(I.left,j.left,V)),j.right!=null&&I.right!=null&&(this.right=i.number(I.right,j.right,V)),this},ln.prototype.getCenter=function(I,j){var V=i.clamp((this.left+I-this.right)/2,0,I),X=i.clamp((this.top+j-this.bottom)/2,0,j);return new i.Point(V,X)},ln.prototype.equals=function(I){return this.top===I.top&&this.bottom===I.bottom&&this.left===I.left&&this.right===I.right},ln.prototype.clone=function(){return new ln(this.top,this.bottom,this.left,this.right)},ln.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var $t=function(I,j,V,X,se){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=se===void 0||se,this._minZoom=I||0,this._maxZoom=j||22,this._minPitch=V??0,this._maxPitch=X??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new i.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new ln,this._posMatrixCache={},this._alignedPosMatrixCache={}},un={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};$t.prototype.clone=function(){var I=new $t(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return I.tileSize=this.tileSize,I.latRange=this.latRange,I.width=this.width,I.height=this.height,I._center=this._center,I.zoom=this.zoom,I.angle=this.angle,I._fov=this._fov,I._pitch=this._pitch,I._unmodified=this._unmodified,I._edgeInsets=this._edgeInsets.clone(),I._calcMatrices(),I},un.minZoom.get=function(){return this._minZoom},un.minZoom.set=function(I){this._minZoom!==I&&(this._minZoom=I,this.zoom=Math.max(this.zoom,I))},un.maxZoom.get=function(){return this._maxZoom},un.maxZoom.set=function(I){this._maxZoom!==I&&(this._maxZoom=I,this.zoom=Math.min(this.zoom,I))},un.minPitch.get=function(){return this._minPitch},un.minPitch.set=function(I){this._minPitch!==I&&(this._minPitch=I,this.pitch=Math.max(this.pitch,I))},un.maxPitch.get=function(){return this._maxPitch},un.maxPitch.set=function(I){this._maxPitch!==I&&(this._maxPitch=I,this.pitch=Math.min(this.pitch,I))},un.renderWorldCopies.get=function(){return this._renderWorldCopies},un.renderWorldCopies.set=function(I){I===void 0?I=!0:I===null&&(I=!1),this._renderWorldCopies=I},un.worldSize.get=function(){return this.tileSize*this.scale},un.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},un.size.get=function(){return new i.Point(this.width,this.height)},un.bearing.get=function(){return-this.angle/Math.PI*180},un.bearing.set=function(I){var j=-i.wrap(I,-180,180)*Math.PI/180;this.angle!==j&&(this._unmodified=!1,this.angle=j,this._calcMatrices(),this.rotationMatrix=i.create$2(),i.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},un.pitch.get=function(){return this._pitch/Math.PI*180},un.pitch.set=function(I){var j=i.clamp(I,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==j&&(this._unmodified=!1,this._pitch=j,this._calcMatrices())},un.fov.get=function(){return this._fov/Math.PI*180},un.fov.set=function(I){I=Math.max(.01,Math.min(60,I)),this._fov!==I&&(this._unmodified=!1,this._fov=I/180*Math.PI,this._calcMatrices())},un.zoom.get=function(){return this._zoom},un.zoom.set=function(I){var j=Math.min(Math.max(I,this.minZoom),this.maxZoom);this._zoom!==j&&(this._unmodified=!1,this._zoom=j,this.scale=this.zoomScale(j),this.tileZoom=Math.floor(j),this.zoomFraction=j-this.tileZoom,this._constrain(),this._calcMatrices())},un.center.get=function(){return this._center},un.center.set=function(I){I.lat===this._center.lat&&I.lng===this._center.lng||(this._unmodified=!1,this._center=I,this._constrain(),this._calcMatrices())},un.padding.get=function(){return this._edgeInsets.toJSON()},un.padding.set=function(I){this._edgeInsets.equals(I)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,I,1),this._calcMatrices())},un.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},$t.prototype.isPaddingEqual=function(I){return this._edgeInsets.equals(I)},$t.prototype.interpolatePadding=function(I,j,V){this._unmodified=!1,this._edgeInsets.interpolate(I,j,V),this._constrain(),this._calcMatrices()},$t.prototype.coveringZoomLevel=function(I){var j=(I.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/I.tileSize));return Math.max(0,j)},$t.prototype.getVisibleUnwrappedCoordinates=function(I){var j=[new i.UnwrappedTileID(0,I)];if(this._renderWorldCopies)for(var V=this.pointCoordinate(new i.Point(0,0)),X=this.pointCoordinate(new i.Point(this.width,0)),se=this.pointCoordinate(new i.Point(this.width,this.height)),he=this.pointCoordinate(new i.Point(0,this.height)),ve=Math.floor(Math.min(V.x,X.x,se.x,he.x)),be=Math.floor(Math.max(V.x,X.x,se.x,he.x)),Se=ve-1;Se<=be+1;Se++)Se!==0&&j.push(new i.UnwrappedTileID(Se,I));return j},$t.prototype.coveringTiles=function(I){var j=this.coveringZoomLevel(I),V=j;if(I.minzoom!==void 0&&jI.maxzoom&&(j=I.maxzoom);var X=i.MercatorCoordinate.fromLngLat(this.center),se=Math.pow(2,j),he=[se*X.x,se*X.y,0],ve=ht.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,j),be=I.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(be=j);var Se=function(gr){return{aabb:new Ft([gr*se,0,0],[(gr+1)*se,se,0]),zoom:0,x:0,y:0,wrap:gr,fullyVisible:!1}},Ue=[],Xe=[],it=j,xt=I.reparseOverscaled?V:j;if(this._renderWorldCopies)for(var Lt=1;Lt<=3;Lt++)Ue.push(Se(-Lt)),Ue.push(Se(Lt));for(Ue.push(Se(0));Ue.length>0;){var _t=Ue.pop(),Mt=_t.x,yt=_t.y,Nt=_t.fullyVisible;if(!Nt){var Rt=_t.aabb.intersects(ve);if(Rt===0)continue;Nt=Rt===2}var qt=_t.aabb.distanceX(he),rn=_t.aabb.distanceY(he),dn=Math.max(Math.abs(qt),Math.abs(rn)),Sn=3+(1<Sn&&_t.zoom>=be)Xe.push({tileID:new i.OverscaledTileID(_t.zoom===it?xt:_t.zoom,_t.wrap,_t.zoom,Mt,yt),distanceSq:i.sqrLen([he[0]-.5-Mt,he[1]-.5-yt])});else for(var An=0;An<4;An++){var tr=(Mt<<1)+An%2,er=(yt<<1)+(An>>1);Ue.push({aabb:_t.aabb.quadrant(An),zoom:_t.zoom+1,x:tr,y:er,wrap:_t.wrap,fullyVisible:Nt})}}return Xe.sort(function(gr,cr){return gr.distanceSq-cr.distanceSq}).map(function(gr){return gr.tileID})},$t.prototype.resize=function(I,j){this.width=I,this.height=j,this.pixelsToGLUnits=[2/I,-2/j],this._constrain(),this._calcMatrices()},un.unmodified.get=function(){return this._unmodified},$t.prototype.zoomScale=function(I){return Math.pow(2,I)},$t.prototype.scaleZoom=function(I){return Math.log(I)/Math.LN2},$t.prototype.project=function(I){var j=i.clamp(I.lat,-this.maxValidLatitude,this.maxValidLatitude);return new i.Point(i.mercatorXfromLng(I.lng)*this.worldSize,i.mercatorYfromLat(j)*this.worldSize)},$t.prototype.unproject=function(I){return new i.MercatorCoordinate(I.x/this.worldSize,I.y/this.worldSize).toLngLat()},un.point.get=function(){return this.project(this.center)},$t.prototype.setLocationAtPoint=function(I,j){var V=this.pointCoordinate(j),X=this.pointCoordinate(this.centerPoint),se=this.locationCoordinate(I),he=new i.MercatorCoordinate(se.x-(V.x-X.x),se.y-(V.y-X.y));this.center=this.coordinateLocation(he),this._renderWorldCopies&&(this.center=this.center.wrap())},$t.prototype.locationPoint=function(I){return this.coordinatePoint(this.locationCoordinate(I))},$t.prototype.pointLocation=function(I){return this.coordinateLocation(this.pointCoordinate(I))},$t.prototype.locationCoordinate=function(I){return i.MercatorCoordinate.fromLngLat(I)},$t.prototype.coordinateLocation=function(I){return I.toLngLat()},$t.prototype.pointCoordinate=function(I){var j=[I.x,I.y,0,1],V=[I.x,I.y,1,1];i.transformMat4(j,j,this.pixelMatrixInverse),i.transformMat4(V,V,this.pixelMatrixInverse);var X=j[3],se=V[3],he=j[0]/X,ve=V[0]/se,be=j[1]/X,Se=V[1]/se,Ue=j[2]/X,Xe=V[2]/se,it=Ue===Xe?0:(0-Ue)/(Xe-Ue);return new i.MercatorCoordinate(i.number(he,ve,it)/this.worldSize,i.number(be,Se,it)/this.worldSize)},$t.prototype.coordinatePoint=function(I){var j=[I.x*this.worldSize,I.y*this.worldSize,0,1];return i.transformMat4(j,j,this.pixelMatrix),new i.Point(j[0]/j[3],j[1]/j[3])},$t.prototype.getBounds=function(){return new i.LngLatBounds().extend(this.pointLocation(new i.Point(0,0))).extend(this.pointLocation(new i.Point(this.width,0))).extend(this.pointLocation(new i.Point(this.width,this.height))).extend(this.pointLocation(new i.Point(0,this.height)))},$t.prototype.getMaxBounds=function(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new i.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},$t.prototype.setMaxBounds=function(I){I?(this.lngRange=[I.getWest(),I.getEast()],this.latRange=[I.getSouth(),I.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},$t.prototype.calculatePosMatrix=function(I,j){j===void 0&&(j=!1);var V=I.key,X=j?this._alignedPosMatrixCache:this._posMatrixCache;if(X[V])return X[V];var se=I.canonical,he=this.worldSize/this.zoomScale(se.z),ve=se.x+Math.pow(2,se.z)*I.wrap,be=i.identity(new Float64Array(16));return i.translate(be,be,[ve*he,se.y*he,0]),i.scale(be,be,[he/i.EXTENT,he/i.EXTENT,1]),i.multiply(be,j?this.alignedProjMatrix:this.projMatrix,be),X[V]=new Float32Array(be),X[V]},$t.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},$t.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var I,j,V,X,se=-90,he=90,ve=-180,be=180,Se=this.size,Ue=this._unmodified;if(this.latRange){var Xe=this.latRange;se=i.mercatorYfromLat(Xe[1])*this.worldSize,I=(he=i.mercatorYfromLat(Xe[0])*this.worldSize)-sehe&&(X=he-Mt)}if(this.lngRange){var yt=xt.x,Nt=Se.x/2;yt-Ntbe&&(V=be-Nt)}V===void 0&&X===void 0||(this.center=this.unproject(new i.Point(V!==void 0?V:xt.x,X!==void 0?X:xt.y))),this._unmodified=Ue,this._constraining=!1}},$t.prototype._calcMatrices=function(){if(this.height){var I=this._fov/2,j=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(I)*this.height;var V=Math.PI/2+this._pitch,X=this._fov*(.5+j.y/this.height),se=Math.sin(X)*this.cameraToCenterDistance/Math.sin(i.clamp(Math.PI-V-X,.01,Math.PI-.01)),he=this.point,ve=he.x,be=he.y,Se=1.01*(Math.cos(Math.PI/2-this._pitch)*se+this.cameraToCenterDistance),Ue=this.height/50,Xe=new Float64Array(16);i.perspective(Xe,this._fov,this.width/this.height,Ue,Se),Xe[8]=2*-j.x/this.width,Xe[9]=2*j.y/this.height,i.scale(Xe,Xe,[1,-1,1]),i.translate(Xe,Xe,[0,0,-this.cameraToCenterDistance]),i.rotateX(Xe,Xe,this._pitch),i.rotateZ(Xe,Xe,this.angle),i.translate(Xe,Xe,[-ve,-be,0]),this.mercatorMatrix=i.scale([],Xe,[this.worldSize,this.worldSize,this.worldSize]),i.scale(Xe,Xe,[1,1,i.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=Xe,this.invProjMatrix=i.invert([],this.projMatrix);var it=this.width%2/2,xt=this.height%2/2,Lt=Math.cos(this.angle),_t=Math.sin(this.angle),Mt=ve-Math.round(ve)+Lt*it+_t*xt,yt=be-Math.round(be)+Lt*xt+_t*it,Nt=new Float64Array(Xe);if(i.translate(Nt,Nt,[Mt>.5?Mt-1:Mt,yt>.5?yt-1:yt,0]),this.alignedProjMatrix=Nt,Xe=i.create(),i.scale(Xe,Xe,[this.width/2,-this.height/2,1]),i.translate(Xe,Xe,[1,-1,0]),this.labelPlaneMatrix=Xe,Xe=i.create(),i.scale(Xe,Xe,[1,-1,1]),i.translate(Xe,Xe,[-1,-1,0]),i.scale(Xe,Xe,[2/this.width,2/this.height,1]),this.glCoordMatrix=Xe,this.pixelMatrix=i.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(Xe=i.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=Xe,this._posMatrixCache={},this._alignedPosMatrixCache={}}},$t.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var I=this.pointCoordinate(new i.Point(0,0)),j=[I.x*this.worldSize,I.y*this.worldSize,0,1];return i.transformMat4(j,j,this.pixelMatrix)[3]/this.cameraToCenterDistance},$t.prototype.getCameraPoint=function(){var I=this._pitch,j=Math.tan(I)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new i.Point(0,j))},$t.prototype.getCameraQueryGeometry=function(I){var j=this.getCameraPoint();if(I.length===1)return[I[0],j];for(var V=j.x,X=j.y,se=j.x,he=j.y,ve=0,be=I;ve=3&&!I.some(function(V){return isNaN(V)})){var j=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(I[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+I[2],+I[1]],zoom:+I[0],bearing:j,pitch:+(I[4]||0)}),!0}return!1},On.prototype._updateHashUnthrottled=function(){var I=this.getHashString();try{i.window.history.replaceState(i.window.history.state,"",I)}catch{}};var Fn={linearity:.3,easing:i.bezier(0,0,.3,1)},Jn=i.extend({deceleration:2500,maxSpeed:1400},Fn),fr=i.extend({deceleration:20,maxSpeed:1400},Fn),ur=i.extend({deceleration:1e3,maxSpeed:360},Fn),yr=i.extend({deceleration:1e3,maxSpeed:90},Fn),Tr=function(I){this._map=I,this.clear()};function hr(I,j){(!I.duration||I.duration0&&j-I[0].time>160;)I.shift()},Tr.prototype._onMoveEnd=function(I){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var j={zoom:0,bearing:0,pitch:0,pan:new i.Point(0,0),pinchAround:void 0,around:void 0},V=0,X=this._inertiaBuffer;V=this._clickTolerance||this._map.fire(new Ur(I.type,this._map,I))},Qn.prototype.dblclick=function(I){return this._firePreventable(new Ur(I.type,this._map,I))},Qn.prototype.mouseover=function(I){this._map.fire(new Ur(I.type,this._map,I))},Qn.prototype.mouseout=function(I){this._map.fire(new Ur(I.type,this._map,I))},Qn.prototype.touchstart=function(I){return this._firePreventable(new Zr(I.type,this._map,I))},Qn.prototype.touchmove=function(I){this._map.fire(new Zr(I.type,this._map,I))},Qn.prototype.touchend=function(I){this._map.fire(new Zr(I.type,this._map,I))},Qn.prototype.touchcancel=function(I){this._map.fire(new Zr(I.type,this._map,I))},Qn.prototype._firePreventable=function(I){if(this._map.fire(I),I.defaultPrevented)return{}},Qn.prototype.isEnabled=function(){return!0},Qn.prototype.isActive=function(){return!1},Qn.prototype.enable=function(){},Qn.prototype.disable=function(){};var di=function(I){this._map=I};di.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},di.prototype.mousemove=function(I){this._map.fire(new Ur(I.type,this._map,I))},di.prototype.mousedown=function(){this._delayContextMenu=!0},di.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Ur("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},di.prototype.contextmenu=function(I){this._delayContextMenu?this._contextMenuEvent=I:this._map.fire(new Ur(I.type,this._map,I)),this._map.listens("contextmenu")&&I.preventDefault()},di.prototype.isEnabled=function(){return!0},di.prototype.isActive=function(){return!1},di.prototype.enable=function(){},di.prototype.disable=function(){};var Rr=function(I,j){this._map=I,this._el=I.getCanvasContainer(),this._container=I.getContainer(),this._clickTolerance=j.clickTolerance||1};function Gr(I,j){for(var V={},X=0;Xthis.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=I.timeStamp),V.length===this.numTouches&&(this.centroid=function(X){for(var se=new i.Point(0,0),he=0,ve=X;he30)&&(this.aborted=!0)}}},fi.prototype.touchend=function(I,j,V){if((!this.centroid||I.timeStamp-this.startTime>500)&&(this.aborted=!0),V.length===0){var X=!this.aborted&&this.centroid;if(this.reset(),X)return X}};var Ni=function(I){this.singleTap=new fi(I),this.numTaps=I.numTaps,this.reset()};Ni.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},Ni.prototype.touchstart=function(I,j,V){this.singleTap.touchstart(I,j,V)},Ni.prototype.touchmove=function(I,j,V){this.singleTap.touchmove(I,j,V)},Ni.prototype.touchend=function(I,j,V){var X=this.singleTap.touchend(I,j,V);if(X){var se=I.timeStamp-this.lastTime<500,he=!this.lastTap||this.lastTap.dist(X)<30;if(se&&he||this.reset(),this.count++,this.lastTime=I.timeStamp,this.lastTap=X,this.count===this.numTaps)return this.reset(),X}};var Ki=function(){this._zoomIn=new Ni({numTouches:1,numTaps:2}),this._zoomOut=new Ni({numTouches:2,numTaps:1}),this.reset()};Ki.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},Ki.prototype.touchstart=function(I,j,V){this._zoomIn.touchstart(I,j,V),this._zoomOut.touchstart(I,j,V)},Ki.prototype.touchmove=function(I,j,V){this._zoomIn.touchmove(I,j,V),this._zoomOut.touchmove(I,j,V)},Ki.prototype.touchend=function(I,j,V){var X=this,se=this._zoomIn.touchend(I,j,V),he=this._zoomOut.touchend(I,j,V);return se?(this._active=!0,I.preventDefault(),setTimeout(function(){return X.reset()},0),{cameraAnimation:function(ve){return ve.easeTo({duration:300,zoom:ve.getZoom()+1,around:ve.unproject(se)},{originalEvent:I})}}):he?(this._active=!0,I.preventDefault(),setTimeout(function(){return X.reset()},0),{cameraAnimation:function(ve){return ve.easeTo({duration:300,zoom:ve.getZoom()-1,around:ve.unproject(he)},{originalEvent:I})}}):void 0},Ki.prototype.touchcancel=function(){this.reset()},Ki.prototype.enable=function(){this._enabled=!0},Ki.prototype.disable=function(){this._enabled=!1,this.reset()},Ki.prototype.isEnabled=function(){return this._enabled},Ki.prototype.isActive=function(){return this._active};var Lr=function(I){this.reset(),this._clickTolerance=I.clickTolerance||1};Lr.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},Lr.prototype._correctButton=function(I,j){return!1},Lr.prototype._move=function(I,j){return{}},Lr.prototype.mousedown=function(I,j){if(!this._lastPoint){var V=l.mouseButton(I);this._correctButton(I,V)&&(this._lastPoint=j,this._eventButton=V)}},Lr.prototype.mousemoveWindow=function(I,j){var V=this._lastPoint;if(V&&(I.preventDefault(),this._moved||!(j.dist(V)0&&(this._active=!0);var X=Gr(V,j),se=new i.Point(0,0),he=new i.Point(0,0),ve=0;for(var be in X){var Se=X[be],Ue=this._touches[be];Ue&&(se._add(Se),he._add(Se.sub(Ue)),ve++,X[be]=Se)}if(this._touches=X,!(veMath.abs(I.x)}var ks=function(I){function j(){I.apply(this,arguments)}return I&&(j.__proto__=I),j.prototype=Object.create(I&&I.prototype),j.prototype.constructor=j,j.prototype.reset=function(){I.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},j.prototype._start=function(V){this._lastPoints=V,Zs(V[0].sub(V[1]))&&(this._valid=!1)},j.prototype._move=function(V,X,se){var he=V[0].sub(this._lastPoints[0]),ve=V[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(he,ve,se.timeStamp),this._valid)return this._lastPoints=V,this._active=!0,{pitchDelta:-.5*((he.y+ve.y)/2)}},j.prototype.gestureBeginsVertically=function(V,X,se){if(this._valid!==void 0)return this._valid;var he=V.mag()>=2,ve=X.mag()>=2;if(he||ve){if(!he||!ve)return this._firstMove===void 0&&(this._firstMove=se),se-this._firstMove<100&&void 0;var be=V.y>0==X.y>0;return Zs(V)&&Zs(X)&&be}},j}(Wi),Pi={panStep:100,bearingStep:15,pitchStep:10},Qa=function(){var I=Pi;this._panStep=I.panStep,this._bearingStep=I.bearingStep,this._pitchStep=I.pitchStep};function Ts(I){return I*(2-I)}Qa.prototype.reset=function(){this._active=!1},Qa.prototype.keydown=function(I){var j=this;if(!(I.altKey||I.ctrlKey||I.metaKey)){var V=0,X=0,se=0,he=0,ve=0;switch(I.keyCode){case 61:case 107:case 171:case 187:V=1;break;case 189:case 109:case 173:V=-1;break;case 37:I.shiftKey?X=-1:(I.preventDefault(),he=-1);break;case 39:I.shiftKey?X=1:(I.preventDefault(),he=1);break;case 38:I.shiftKey?se=1:(I.preventDefault(),ve=-1);break;case 40:I.shiftKey?se=-1:(I.preventDefault(),ve=1);break;default:return}return{cameraAnimation:function(be){var Se=be.getZoom();be.easeTo({duration:300,easeId:"keyboardHandler",easing:Ts,zoom:V?Math.round(Se)+V*(I.shiftKey?2:1):Se,bearing:be.getBearing()+X*j._bearingStep,pitch:be.getPitch()+se*j._pitchStep,offset:[-he*j._panStep,-ve*j._panStep],center:be.getCenter()},{originalEvent:I})}}}},Qa.prototype.enable=function(){this._enabled=!0},Qa.prototype.disable=function(){this._enabled=!1,this.reset()},Qa.prototype.isEnabled=function(){return this._enabled},Qa.prototype.isActive=function(){return this._active};var wa=function(I,j){this._map=I,this._el=I.getCanvasContainer(),this._handler=j,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=1/450,i.bindAll(["_onWheel","_onTimeout","_onScrollFrame","_onScrollFinished"],this)};wa.prototype.setZoomRate=function(I){this._defaultZoomRate=I},wa.prototype.setWheelZoomRate=function(I){this._wheelZoomRate=I},wa.prototype.isEnabled=function(){return!!this._enabled},wa.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},wa.prototype.isZooming=function(){return!!this._zooming},wa.prototype.enable=function(I){this.isEnabled()||(this._enabled=!0,this._aroundCenter=I&&I.around==="center")},wa.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},wa.prototype.wheel=function(I){if(this.isEnabled()){var j=I.deltaMode===i.window.WheelEvent.DOM_DELTA_LINE?40*I.deltaY:I.deltaY,V=i.browser.now(),X=V-(this._lastWheelEventTime||0);this._lastWheelEventTime=V,j!==0&&j%4.000244140625==0?this._type="wheel":j!==0&&Math.abs(j)<4?this._type="trackpad":X>400?(this._type=null,this._lastValue=j,this._timeout=setTimeout(this._onTimeout,40,I)):this._type||(this._type=Math.abs(X*j)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,j+=this._lastValue)),I.shiftKey&&j&&(j/=4),this._type&&(this._lastWheelEvent=I,this._delta-=j,this._active||this._start(I)),I.preventDefault()}},wa.prototype._onTimeout=function(I){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(I)},wa.prototype._start=function(I){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var j=l.mousePos(this._el,I);this._around=i.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(j)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},wa.prototype.renderFrame=function(){return this._onScrollFrame()},wa.prototype._onScrollFrame=function(){var I=this;if(this._frameId&&(this._frameId=null,this.isActive())){var j=this._map.transform;if(this._delta!==0){var V=this._type==="wheel"&&Math.abs(this._delta)>4.000244140625?this._wheelZoomRate:this._defaultZoomRate,X=2/(1+Math.exp(-Math.abs(this._delta*V)));this._delta<0&&X!==0&&(X=1/X);var se=typeof this._targetZoom=="number"?j.zoomScale(this._targetZoom):j.scale;this._targetZoom=Math.min(j.maxZoom,Math.max(j.minZoom,j.scaleZoom(se*X))),this._type==="wheel"&&(this._startZoom=j.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var he,ve=typeof this._targetZoom=="number"?this._targetZoom:j.zoom,be=this._startZoom,Se=this._easing,Ue=!1;if(this._type==="wheel"&&be&&Se){var Xe=Math.min((i.browser.now()-this._lastWheelEventTime)/200,1),it=Se(Xe);he=i.number(be,ve,it),Xe<1?this._frameId||(this._frameId=!0):Ue=!0}else he=ve,Ue=!0;return this._active=!0,Ue&&(this._active=!1,this._finishTimeout=setTimeout(function(){I._zooming=!1,I._handler._triggerRenderFrame(),delete I._targetZoom,delete I._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!Ue,zoomDelta:he-j.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},wa.prototype._smoothOutEasing=function(I){var j=i.ease;if(this._prevEase){var V=this._prevEase,X=(i.browser.now()-V.start)/V.duration,se=V.easing(X+.01)-V.easing(X),he=.27/Math.sqrt(se*se+1e-4)*.01,ve=Math.sqrt(.0729-he*he);j=i.bezier(he,ve,.25,1)}return this._prevEase={start:i.browser.now(),duration:I,easing:j},j},wa.prototype.reset=function(){this._active=!1};var uo=function(I,j){this._clickZoom=I,this._tapZoom=j};uo.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},uo.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},uo.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},uo.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var jo=function(){this.reset()};jo.prototype.reset=function(){this._active=!1},jo.prototype.dblclick=function(I,j){return I.preventDefault(),{cameraAnimation:function(V){V.easeTo({duration:300,zoom:V.getZoom()+(I.shiftKey?-1:1),around:V.unproject(j)},{originalEvent:I})}}},jo.prototype.enable=function(){this._enabled=!0},jo.prototype.disable=function(){this._enabled=!1,this.reset()},jo.prototype.isEnabled=function(){return this._enabled},jo.prototype.isActive=function(){return this._active};var La=function(){this._tap=new Ni({numTouches:1,numTaps:1}),this.reset()};La.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},La.prototype.touchstart=function(I,j,V){this._swipePoint||(this._tapTime&&I.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?V.length>0&&(this._swipePoint=j[0],this._swipeTouch=V[0].identifier):this._tap.touchstart(I,j,V))},La.prototype.touchmove=function(I,j,V){if(this._tapTime){if(this._swipePoint){if(V[0].identifier!==this._swipeTouch)return;var X=j[0],se=X.y-this._swipePoint.y;return this._swipePoint=X,I.preventDefault(),this._active=!0,{zoomDelta:se/128}}}else this._tap.touchmove(I,j,V)},La.prototype.touchend=function(I,j,V){this._tapTime?this._swipePoint&&V.length===0&&this.reset():this._tap.touchend(I,j,V)&&(this._tapTime=I.timeStamp)},La.prototype.touchcancel=function(){this.reset()},La.prototype.enable=function(){this._enabled=!0},La.prototype.disable=function(){this._enabled=!1,this.reset()},La.prototype.isEnabled=function(){return this._enabled},La.prototype.isActive=function(){return this._active};var ps=function(I,j,V){this._el=I,this._mousePan=j,this._touchPan=V};ps.prototype.enable=function(I){this._inertiaOptions=I||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},ps.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},ps.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},ps.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var Pa=function(I,j,V){this._pitchWithRotate=I.pitchWithRotate,this._mouseRotate=j,this._mousePitch=V};Pa.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},Pa.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},Pa.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},Pa.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var ns=function(I,j,V,X){this._el=I,this._touchZoom=j,this._touchRotate=V,this._tapDragZoom=X,this._rotationDisabled=!1,this._enabled=!0};ns.prototype.enable=function(I){this._touchZoom.enable(I),this._rotationDisabled||this._touchRotate.enable(I),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},ns.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},ns.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},ns.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},ns.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},ns.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var vu=function(I){return I.zoom||I.drag||I.pitch||I.rotate},Xl=function(I){function j(){I.apply(this,arguments)}return I&&(j.__proto__=I),j.prototype=Object.create(I&&I.prototype),j.prototype.constructor=j,j}(i.Event);function _f(I){return I.panDelta&&I.panDelta.mag()||I.zoomDelta||I.bearingDelta||I.pitchDelta}var Mo=function(I,j){this._map=I,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Tr(I),this._bearingSnap=j.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(j),i.bindAll(["handleEvent","handleWindowEvent"],this);var V=this._el;this._listeners=[[V,"touchstart",{passive:!1}],[V,"touchmove",{passive:!1}],[V,"touchend",void 0],[V,"touchcancel",void 0],[V,"mousedown",void 0],[V,"mousemove",void 0],[V,"mouseup",void 0],[i.window.document,"mousemove",{capture:!0}],[i.window.document,"mouseup",void 0],[V,"mouseover",void 0],[V,"mouseout",void 0],[V,"dblclick",void 0],[V,"click",void 0],[V,"keydown",{capture:!1}],[V,"keyup",void 0],[V,"wheel",{passive:!1}],[V,"contextmenu",void 0],[i.window,"blur",void 0]];for(var X=0,se=this._listeners;Xve?Math.min(2,Sn):Math.max(.5,Sn),cr=Math.pow(gr,1-tr),Yr=he.unproject(rn.add(dn.mult(tr*cr)).mult(er));he.setLocationAtPoint(he.renderWorldCopies?Yr.wrap():Yr,Mt)}se._fireMoveEvents(X)},function(tr){se._afterEase(X,tr)},V),this},j.prototype._prepareEase=function(V,X,se){se===void 0&&(se={}),this._moving=!0,X||se.moving||this.fire(new i.Event("movestart",V)),this._zooming&&!se.zooming&&this.fire(new i.Event("zoomstart",V)),this._rotating&&!se.rotating&&this.fire(new i.Event("rotatestart",V)),this._pitching&&!se.pitching&&this.fire(new i.Event("pitchstart",V))},j.prototype._fireMoveEvents=function(V){this.fire(new i.Event("move",V)),this._zooming&&this.fire(new i.Event("zoom",V)),this._rotating&&this.fire(new i.Event("rotate",V)),this._pitching&&this.fire(new i.Event("pitch",V))},j.prototype._afterEase=function(V,X){if(!this._easeId||!X||this._easeId!==X){delete this._easeId;var se=this._zooming,he=this._rotating,ve=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,se&&this.fire(new i.Event("zoomend",V)),he&&this.fire(new i.Event("rotateend",V)),ve&&this.fire(new i.Event("pitchend",V)),this.fire(new i.Event("moveend",V))}},j.prototype.flyTo=function(V,X){var se=this;if(!V.essential&&i.browser.prefersReducedMotion){var he=i.pick(V,["center","zoom","bearing","pitch","around"]);return this.jumpTo(he,X)}this.stop(),V=i.extend({offset:[0,0],speed:1.2,curve:1.42,easing:i.ease},V);var ve=this.transform,be=this.getZoom(),Se=this.getBearing(),Ue=this.getPitch(),Xe=this.getPadding(),it="zoom"in V?i.clamp(+V.zoom,ve.minZoom,ve.maxZoom):be,xt="bearing"in V?this._normalizeBearing(V.bearing,Se):Se,Lt="pitch"in V?+V.pitch:Ue,_t="padding"in V?V.padding:ve.padding,Mt=ve.zoomScale(it-be),yt=i.Point.convert(V.offset),Nt=ve.centerPoint.add(yt),Rt=ve.pointLocation(Nt),qt=i.LngLat.convert(V.center||Rt);this._normalizeCenter(qt);var rn=ve.project(Rt),dn=ve.project(qt).sub(rn),Sn=V.curve,An=Math.max(ve.width,ve.height),tr=An/Mt,er=dn.mag();if("minZoom"in V){var gr=i.clamp(Math.min(V.minZoom,be,it),ve.minZoom,ve.maxZoom),cr=An/ve.zoomScale(gr-be);Sn=Math.sqrt(cr/er*2)}var Yr=Sn*Sn;function ii(ci){var zi=(tr*tr-An*An+(ci?-1:1)*Yr*Yr*er*er)/(2*(ci?tr:An)*Yr*er);return Math.log(Math.sqrt(zi*zi+1)-zi)}function Ti(ci){return(Math.exp(ci)-Math.exp(-ci))/2}function Gn(ci){return(Math.exp(ci)+Math.exp(-ci))/2}var Mr=ii(0),ai=function(ci){return Gn(Mr)/Gn(Mr+Sn*ci)},Qr=function(ci){return An*((Gn(Mr)*(Ti(zi=Mr+Sn*ci)/Gn(zi))-Ti(Mr))/Yr)/er;var zi},gi=(ii(1)-Mr)/Sn;if(Math.abs(er)<1e-6||!isFinite(gi)){if(Math.abs(An-tr)<1e-6)return this.easeTo(V,X);var Mi=trV.maxDuration&&(V.duration=0),this._zooming=!0,this._rotating=Se!==xt,this._pitching=Lt!==Ue,this._padding=!ve.isPaddingEqual(_t),this._prepareEase(X,!1),this._ease(function(ci){var zi=ci*gi,Li=1/ai(zi);ve.zoom=ci===1?it:be+ve.scaleZoom(Li),se._rotating&&(ve.bearing=i.number(Se,xt,ci)),se._pitching&&(ve.pitch=i.number(Ue,Lt,ci)),se._padding&&(ve.interpolatePadding(Xe,_t,ci),Nt=ve.centerPoint.add(yt));var Qi=ci===1?qt:ve.unproject(rn.add(dn.mult(Qr(zi))).mult(Li));ve.setLocationAtPoint(ve.renderWorldCopies?Qi.wrap():Qi,Nt),se._fireMoveEvents(X)},function(){return se._afterEase(X)},V),this},j.prototype.isEasing=function(){return!!this._easeFrameId},j.prototype.stop=function(){return this._stop()},j.prototype._stop=function(V,X){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var se=this._onEaseEnd;delete this._onEaseEnd,se.call(this,X)}if(!V){var he=this.handlers;he&&he.stop()}return this},j.prototype._ease=function(V,X,se){se.animate===!1||se.duration===0?(V(1),X()):(this._easeStart=i.browser.now(),this._easeOptions=se,this._onEaseFrame=V,this._onEaseEnd=X,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},j.prototype._renderFrameCallback=function(){var V=Math.min((i.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(V)),V<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},j.prototype._normalizeBearing=function(V,X){V=i.wrap(V,-180,180);var se=Math.abs(V-X);return Math.abs(V-360-X)180?-360:se<-180?360:0}},j}(i.Evented),So=function(I){I===void 0&&(I={}),this.options=I,i.bindAll(["_updateEditLink","_updateData","_updateCompact"],this)};So.prototype.getDefaultPosition=function(){return"bottom-right"},So.prototype.onAdd=function(I){var j=this.options&&this.options.compact;return this._map=I,this._container=l.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._innerContainer=l.create("div","mapboxgl-ctrl-attrib-inner",this._container),j&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),j===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},So.prototype.onRemove=function(){l.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0,this._attribHTML=void 0},So.prototype._updateEditLink=function(){var I=this._editLink;I||(I=this._editLink=this._container.querySelector(".mapbox-improve-map"));var j=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||i.config.ACCESS_TOKEN}];if(I){var V=j.reduce(function(X,se,he){return se.value&&(X+=se.key+"="+se.value+(he=0)return!1;return!0})).join(" | ");ve!==this._attribHTML&&(this._attribHTML=ve,I.length?(this._innerContainer.innerHTML=ve,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},So.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact")};var Zl=function(){i.bindAll(["_updateLogo"],this),i.bindAll(["_updateCompact"],this)};Zl.prototype.onAdd=function(I){this._map=I,this._container=l.create("div","mapboxgl-ctrl");var j=l.create("a","mapboxgl-ctrl-logo");return j.target="_blank",j.rel="noopener nofollow",j.href="https://www.mapbox.com/",j.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),j.setAttribute("rel","noopener nofollow"),this._container.appendChild(j),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},Zl.prototype.onRemove=function(){l.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},Zl.prototype.getDefaultPosition=function(){return"bottom-left"},Zl.prototype._updateLogo=function(I){I&&I.sourceDataType!=="metadata"||(this._container.style.display=this._logoRequired()?"block":"none")},Zl.prototype._logoRequired=function(){if(this._map.style){var I=this._map.style.sourceCaches;for(var j in I)if(I[j].getSource().mapbox_logo)return!0;return!1}},Zl.prototype._updateCompact=function(){var I=this._container.children;if(I.length){var j=I[0];this._map.getCanvasContainer().offsetWidth<250?j.classList.add("mapboxgl-compact"):j.classList.remove("mapboxgl-compact")}};var wi=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};wi.prototype.add=function(I){var j=++this._id;return this._queue.push({callback:I,id:j,cancelled:!1}),j},wi.prototype.remove=function(I){for(var j=this._currentlyRunning,V=0,X=j?this._queue.concat(j):this._queue;VX.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(X.minPitch!=null&&X.maxPitch!=null&&X.minPitch>X.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(X.minPitch!=null&&X.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(X.maxPitch!=null&&X.maxPitch>60)throw new Error("maxPitch must be less than or equal to 60");var he=new $t(X.minZoom,X.maxZoom,X.minPitch,X.maxPitch,X.renderWorldCopies);if(I.call(this,he,X),this._interactive=X.interactive,this._maxTileCacheSize=X.maxTileCacheSize,this._failIfMajorPerformanceCaveat=X.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=X.preserveDrawingBuffer,this._antialias=X.antialias,this._trackResize=X.trackResize,this._bearingSnap=X.bearingSnap,this._refreshExpiredTiles=X.refreshExpiredTiles,this._fadeDuration=X.fadeDuration,this._crossSourceCollisions=X.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=X.collectResourceTiming,this._renderTaskQueue=new wi,this._controls=[],this._mapId=i.uniqueId(),this._locale=i.extend({},Di,X.locale),this._requestManager=new i.RequestManager(X.transformRequest,X.accessToken),typeof X.container=="string"){if(this._container=i.window.document.getElementById(X.container),!this._container)throw new Error("Container '"+X.container+"' not found.")}else{if(!(X.container instanceof Tf))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=X.container}if(X.maxBounds&&this.setMaxBounds(X.maxBounds),i.bindAll(["_onWindowOnline","_onWindowResize","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),this.painter===void 0)throw new Error("Failed to initialize WebGL.");this.on("move",function(){return se._update(!1)}),this.on("moveend",function(){return se._update(!1)}),this.on("zoom",function(){return se._update(!0)}),i.window!==void 0&&(i.window.addEventListener("online",this._onWindowOnline,!1),i.window.addEventListener("resize",this._onWindowResize,!1)),this.handlers=new Mo(this,X);var ve=typeof X.hash=="string"&&X.hash||void 0;this._hash=X.hash&&new On(ve).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:X.center,zoom:X.zoom,bearing:X.bearing,pitch:X.pitch}),X.bounds&&(this.resize(),this.fitBounds(X.bounds,i.extend({},X.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=X.localIdeographFontFamily,X.style&&this.setStyle(X.style,{localIdeographFontFamily:X.localIdeographFontFamily}),X.attributionControl&&this.addControl(new So({customAttribution:X.customAttribution})),this.addControl(new Zl,X.logoPosition),this.on("style.load",function(){se.transform.unmodified&&se.jumpTo(se.style.stylesheet)}),this.on("data",function(be){se._update(be.dataType==="style"),se.fire(new i.Event(be.dataType+"data",be))}),this.on("dataloading",function(be){se.fire(new i.Event(be.dataType+"dataloading",be))})}I&&(j.__proto__=I),j.prototype=Object.create(I&&I.prototype),j.prototype.constructor=j;var V={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return j.prototype._getMapId=function(){return this._mapId},j.prototype.addControl=function(X,se){if(se===void 0&&X.getDefaultPosition&&(se=X.getDefaultPosition()),se===void 0&&(se="top-right"),!X||!X.onAdd)return this.fire(new i.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var he=X.onAdd(this);this._controls.push(X);var ve=this._controlPositions[se];return se.indexOf("bottom")!==-1?ve.insertBefore(he,ve.firstChild):ve.appendChild(he),this},j.prototype.removeControl=function(X){if(!X||!X.onRemove)return this.fire(new i.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var se=this._controls.indexOf(X);return se>-1&&this._controls.splice(se,1),X.onRemove(this),this},j.prototype.resize=function(X){var se=this._containerDimensions(),he=se[0],ve=se[1];this._resizeCanvas(he,ve),this.transform.resize(he,ve),this.painter.resize(he,ve);var be=!this._moving;return be&&(this.stop(),this.fire(new i.Event("movestart",X)).fire(new i.Event("move",X))),this.fire(new i.Event("resize",X)),be&&this.fire(new i.Event("moveend",X)),this},j.prototype.getBounds=function(){return this.transform.getBounds()},j.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},j.prototype.setMaxBounds=function(X){return this.transform.setMaxBounds(i.LngLatBounds.convert(X)),this._update()},j.prototype.setMinZoom=function(X){if((X=X??-2)>=-2&&X<=this.transform.maxZoom)return this.transform.minZoom=X,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=X,this._update(),this.getZoom()>X&&this.setZoom(X),this;throw new Error("maxZoom must be greater than the current minZoom")},j.prototype.getMaxZoom=function(){return this.transform.maxZoom},j.prototype.setMinPitch=function(X){if((X=X??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(X>=0&&X<=this.transform.maxPitch)return this.transform.minPitch=X,this._update(),this.getPitch()60)throw new Error("maxPitch must be less than or equal to 60");if(X>=this.transform.minPitch)return this.transform.maxPitch=X,this._update(),this.getPitch()>X&&this.setPitch(X),this;throw new Error("maxPitch must be greater than the current minPitch")},j.prototype.getMaxPitch=function(){return this.transform.maxPitch},j.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},j.prototype.setRenderWorldCopies=function(X){return this.transform.renderWorldCopies=X,this._update()},j.prototype.project=function(X){return this.transform.locationPoint(i.LngLat.convert(X))},j.prototype.unproject=function(X){return this.transform.pointLocation(i.Point.convert(X))},j.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},j.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},j.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},j.prototype._createDelegatedListener=function(X,se,he){var ve,be=this;if(X==="mouseenter"||X==="mouseover"){var Se=!1;return{layer:se,listener:he,delegates:{mousemove:function(Xe){var it=be.getLayer(se)?be.queryRenderedFeatures(Xe.point,{layers:[se]}):[];it.length?Se||(Se=!0,he.call(be,new Ur(X,be,Xe.originalEvent,{features:it}))):Se=!1},mouseout:function(){Se=!1}}}}if(X==="mouseleave"||X==="mouseout"){var Ue=!1;return{layer:se,listener:he,delegates:{mousemove:function(Xe){(be.getLayer(se)?be.queryRenderedFeatures(Xe.point,{layers:[se]}):[]).length?Ue=!0:Ue&&(Ue=!1,he.call(be,new Ur(X,be,Xe.originalEvent)))},mouseout:function(Xe){Ue&&(Ue=!1,he.call(be,new Ur(X,be,Xe.originalEvent)))}}}}return{layer:se,listener:he,delegates:(ve={},ve[X]=function(Xe){var it=be.getLayer(se)?be.queryRenderedFeatures(Xe.point,{layers:[se]}):[];it.length&&(Xe.features=it,he.call(be,Xe),delete Xe.features)},ve)}},j.prototype.on=function(X,se,he){if(he===void 0)return I.prototype.on.call(this,X,se);var ve=this._createDelegatedListener(X,se,he);for(var be in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[X]=this._delegatedListeners[X]||[],this._delegatedListeners[X].push(ve),ve.delegates)this.on(be,ve.delegates[be]);return this},j.prototype.once=function(X,se,he){if(he===void 0)return I.prototype.once.call(this,X,se);var ve=this._createDelegatedListener(X,se,he);for(var be in ve.delegates)this.once(be,ve.delegates[be]);return this},j.prototype.off=function(X,se,he){var ve=this;return he===void 0?I.prototype.off.call(this,X,se):(this._delegatedListeners&&this._delegatedListeners[X]&&function(be){for(var Se=be[X],Ue=0;Ue180;){var ve=V.locationPoint(I);if(ve.x>=0&&ve.y>=0&&ve.x<=V.width&&ve.y<=V.height)break;I.lng>V.center.lng?I.lng-=360:I.lng+=360}return I}Da.prototype.down=function(I,j){this.mouseRotate.mousedown(I,j),this.mousePitch&&this.mousePitch.mousedown(I,j),l.disableDrag()},Da.prototype.move=function(I,j){var V=this.map,X=this.mouseRotate.mousemoveWindow(I,j);if(X&&X.bearingDelta&&V.setBearing(V.getBearing()+X.bearingDelta),this.mousePitch){var se=this.mousePitch.mousemoveWindow(I,j);se&&se.pitchDelta&&V.setPitch(V.getPitch()+se.pitchDelta)}},Da.prototype.off=function(){var I=this.element;l.removeEventListener(I,"mousedown",this.mousedown),l.removeEventListener(I,"touchstart",this.touchstart,{passive:!1}),l.removeEventListener(I,"touchmove",this.touchmove),l.removeEventListener(I,"touchend",this.touchend),l.removeEventListener(I,"touchcancel",this.reset),this.offTemp()},Da.prototype.offTemp=function(){l.enableDrag(),l.removeEventListener(i.window,"mousemove",this.mousemove),l.removeEventListener(i.window,"mouseup",this.mouseup)},Da.prototype.mousedown=function(I){this.down(i.extend({},I,{ctrlKey:!0,preventDefault:function(){return I.preventDefault()}}),l.mousePos(this.element,I)),l.addEventListener(i.window,"mousemove",this.mousemove),l.addEventListener(i.window,"mouseup",this.mouseup)},Da.prototype.mousemove=function(I){this.move(I,l.mousePos(this.element,I))},Da.prototype.mouseup=function(I){this.mouseRotate.mouseupWindow(I),this.mousePitch&&this.mousePitch.mouseupWindow(I),this.offTemp()},Da.prototype.touchstart=function(I){I.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=l.touchPos(this.element,I.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return I.preventDefault()}},this._startPos))},Da.prototype.touchmove=function(I){I.targetTouches.length!==1?this.reset():(this._lastPos=l.touchPos(this.element,I.targetTouches)[0],this.move({preventDefault:function(){return I.preventDefault()}},this._lastPos))},Da.prototype.touchend=function(I){I.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)X.getEast()||se.latitudeX.getNorth())},j.prototype._setErrorState=function(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting")}},j.prototype._onSuccess=function(V){if(this._map){if(this._isOutOfMapMaxBounds(V))return this._setErrorState(),this.fire(new i.Event("outofmaxbounds",V)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=V,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(V),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(V),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new i.Event("geolocate",V)),this._finish()}},j.prototype._updateCamera=function(V){var X=new i.LngLat(V.coords.longitude,V.coords.latitude),se=V.coords.accuracy,he=this._map.getBearing(),ve=i.extend({bearing:he},this.options.fitBoundsOptions);this._map.fitBounds(X.toBounds(se),ve,{geolocateSource:!0})},j.prototype._updateMarker=function(V){if(V){var X=new i.LngLat(V.coords.longitude,V.coords.latitude);this._accuracyCircleMarker.setLngLat(X).addTo(this._map),this._userLocationDotMarker.setLngLat(X).addTo(this._map),this._accuracy=V.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},j.prototype._updateCircleRadius=function(){var V=this._map._container.clientHeight/2,X=this._map.unproject([0,V]),se=this._map.unproject([1,V]),he=X.distanceTo(se),ve=Math.ceil(2*this._accuracy/he);this._circleElement.style.width=ve+"px",this._circleElement.style.height=ve+"px"},j.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},j.prototype._onError=function(V){if(this._map){if(this.options.trackUserLocation)if(V.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;var X=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=X,this._geolocateButton.setAttribute("aria-label",X),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(V.code===3&&xu)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new i.Event("error",V)),this._finish()}},j.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},j.prototype._setupUI=function(V){var X=this;if(this._container.addEventListener("contextmenu",function(ve){return ve.preventDefault()}),this._geolocateButton=l.create("button","mapboxgl-ctrl-geolocate",this._container),l.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",V===!1){i.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var se=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=se,this._geolocateButton.setAttribute("aria-label",se)}else{var he=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=he,this._geolocateButton.setAttribute("aria-label",he)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=l.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new Lc(this._dotElement),this._circleElement=l.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Lc({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",function(ve){var be=ve.originalEvent&&ve.originalEvent.type==="resize";ve.geolocateSource||X._watchState!=="ACTIVE_LOCK"||be||(X._watchState="BACKGROUND",X._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),X._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),X.fire(new i.Event("trackuserlocationend")))})},j.prototype.trigger=function(){if(!this._setup)return i.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new i.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Pc--,xu=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new i.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new i.Event("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){var V;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),++Pc>1?(V={maximumAge:6e5,timeout:0},xu=!0):(V=this.options.positionOptions,xu=!1),this._geolocationWatchID=i.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,V)}}else i.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},j.prototype._clearWatch=function(){i.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},j}(i.Evented),Tp={maxWidth:100,unit:"metric"},$u=function(I){this.options=i.extend({},Tp,I),i.bindAll(["_onMove","setUnit"],this)};function ld(I,j,V){var X=V&&V.maxWidth||100,se=I._container.clientHeight/2,he=I.unproject([0,se]),ve=I.unproject([X,se]),be=he.distanceTo(ve);if(V&&V.unit==="imperial"){var Se=3.2808*be;Se>5280?Dc(j,X,Se/5280,I._getUIString("ScaleControl.Miles")):Dc(j,X,Se,I._getUIString("ScaleControl.Feet"))}else V&&V.unit==="nautical"?Dc(j,X,be/1852,I._getUIString("ScaleControl.NauticalMiles")):be>=1e3?Dc(j,X,be/1e3,I._getUIString("ScaleControl.Kilometers")):Dc(j,X,be,I._getUIString("ScaleControl.Meters"))}function Dc(I,j,V,X){var se,he,ve,be=(se=V,he=Math.pow(10,(""+Math.floor(se)).length-1),ve=(ve=se/he)>=10?10:ve>=5?5:ve>=3?3:ve>=2?2:ve>=1?1:function(Ue){var Xe=Math.pow(10,Math.ceil(-Math.log(Ue)/Math.LN10));return Math.round(Ue*Xe)/Xe}(ve),he*ve),Se=be/V;I.style.width=j*Se+"px",I.innerHTML=be+" "+X}$u.prototype.getDefaultPosition=function(){return"bottom-left"},$u.prototype._onMove=function(){ld(this._map,this._container,this.options)},$u.prototype.onAdd=function(I){return this._map=I,this._container=l.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",I.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},$u.prototype.onRemove=function(){l.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},$u.prototype.setUnit=function(I){this.options.unit=I,ld(this._map,this._container,this.options)};var rs=function(I){this._fullscreen=!1,I&&I.container&&(I.container instanceof i.window.HTMLElement?this._container=I.container:i.warnOnce("Full screen control 'container' must be a DOM element.")),i.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in i.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in i.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in i.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in i.window.document&&(this._fullscreenchange="MSFullscreenChange")};rs.prototype.onAdd=function(I){return this._map=I,this._container||(this._container=this._map.getContainer()),this._controlContainer=l.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",i.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},rs.prototype.onRemove=function(){l.remove(this._controlContainer),this._map=null,i.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},rs.prototype._checkFullscreenSupport=function(){return!!(i.window.document.fullscreenEnabled||i.window.document.mozFullScreenEnabled||i.window.document.msFullscreenEnabled||i.window.document.webkitFullscreenEnabled)},rs.prototype._setupUI=function(){var I=this._fullscreenButton=l.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);l.create("span","mapboxgl-ctrl-icon",I).setAttribute("aria-hidden",!0),I.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),i.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},rs.prototype._updateTitle=function(){var I=this._getTitle();this._fullscreenButton.setAttribute("aria-label",I),this._fullscreenButton.title=I},rs.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},rs.prototype._isFullscreen=function(){return this._fullscreen},rs.prototype._changeIcon=function(){(i.window.document.fullscreenElement||i.window.document.mozFullScreenElement||i.window.document.webkitFullscreenElement||i.window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},rs.prototype._onClickFullscreen=function(){this._isFullscreen()?i.window.document.exitFullscreen?i.window.document.exitFullscreen():i.window.document.mozCancelFullScreen?i.window.document.mozCancelFullScreen():i.window.document.msExitFullscreen?i.window.document.msExitFullscreen():i.window.document.webkitCancelFullScreen&&i.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var Ap={closeButton:!0,closeOnClick:!0,className:"",maxWidth:"240px"},Mp=function(I){function j(V){I.call(this),this.options=i.extend(Object.create(Ap),V),i.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return I&&(j.__proto__=I),j.prototype=Object.create(I&&I.prototype),j.prototype.constructor=j,j.prototype.addTo=function(V){return this._map&&this.remove(),this._map=V,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new i.Event("open")),this},j.prototype.isOpen=function(){return!!this._map},j.prototype.remove=function(){return this._content&&l.remove(this._content),this._container&&(l.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new i.Event("close")),this},j.prototype.getLngLat=function(){return this._lngLat},j.prototype.setLngLat=function(V){return this._lngLat=i.LngLat.convert(V),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},j.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")),this},j.prototype.getElement=function(){return this._container},j.prototype.setText=function(V){return this.setDOMContent(i.window.document.createTextNode(V))},j.prototype.setHTML=function(V){var X,se=i.window.document.createDocumentFragment(),he=i.window.document.createElement("body");for(he.innerHTML=V;X=he.firstChild;)se.appendChild(X);return this.setDOMContent(se)},j.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},j.prototype.setMaxWidth=function(V){return this.options.maxWidth=V,this._update(),this},j.prototype.setDOMContent=function(V){return this._createContent(),this._content.appendChild(V),this._update(),this},j.prototype.addClassName=function(V){this._container&&this._container.classList.add(V)},j.prototype.removeClassName=function(V){this._container&&this._container.classList.remove(V)},j.prototype.toggleClassName=function(V){if(this._container)return this._container.classList.toggle(V)},j.prototype._createContent=function(){this._content&&l.remove(this._content),this._content=l.create("div","mapboxgl-popup-content",this._container),this.options.closeButton&&(this._closeButton=l.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))},j.prototype._onMouseUp=function(V){this._update(V.point)},j.prototype._onMouseMove=function(V){this._update(V.point)},j.prototype._onDrag=function(V){this._update(V.point)},j.prototype._update=function(V){var X=this,se=this._lngLat||this._trackPointer;if(this._map&&se&&this._content&&(this._container||(this._container=l.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=l.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(xt){return X._container.classList.add(xt)}),this._trackPointer&&this._container.classList.add("mapboxgl-popup-track-pointer")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=qu(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||V)){var he=this._pos=this._trackPointer&&V?V:this._map.project(this._lngLat),ve=this.options.anchor,be=function xt(Lt){if(Lt){if(typeof Lt=="number"){var _t=Math.round(Math.sqrt(.5*Math.pow(Lt,2)));return{center:new i.Point(0,0),top:new i.Point(0,Lt),"top-left":new i.Point(_t,_t),"top-right":new i.Point(-_t,_t),bottom:new i.Point(0,-Lt),"bottom-left":new i.Point(_t,-_t),"bottom-right":new i.Point(-_t,-_t),left:new i.Point(Lt,0),right:new i.Point(-Lt,0)}}if(Lt instanceof i.Point||Array.isArray(Lt)){var Mt=i.Point.convert(Lt);return{center:Mt,top:Mt,"top-left":Mt,"top-right":Mt,bottom:Mt,"bottom-left":Mt,"bottom-right":Mt,left:Mt,right:Mt}}return{center:i.Point.convert(Lt.center||[0,0]),top:i.Point.convert(Lt.top||[0,0]),"top-left":i.Point.convert(Lt["top-left"]||[0,0]),"top-right":i.Point.convert(Lt["top-right"]||[0,0]),bottom:i.Point.convert(Lt.bottom||[0,0]),"bottom-left":i.Point.convert(Lt["bottom-left"]||[0,0]),"bottom-right":i.Point.convert(Lt["bottom-right"]||[0,0]),left:i.Point.convert(Lt.left||[0,0]),right:i.Point.convert(Lt.right||[0,0])}}return xt(new i.Point(0,0))}(this.options.offset);if(!ve){var Se,Ue=this._container.offsetWidth,Xe=this._container.offsetHeight;Se=he.y+be.bottom.ythis._map.transform.height-Xe?["bottom"]:[],he.xthis._map.transform.width-Ue/2&&Se.push("right"),ve=Se.length===0?"bottom":Se.join("-")}var it=he.add(be[ve]).round();l.setTransform(this._container,yu[ve]+" translate("+it.x+"px,"+it.y+"px)"),yo(this._container,ve,"popup")}},j.prototype._onClose=function(){this.remove()},j}(i.Evented),ce={version:i.version,supported:s,setRTLTextPlugin:i.setRTLTextPlugin,getRTLTextPluginStatus:i.getRTLTextPluginStatus,Map:ml,NavigationControl:ka,GeolocateControl:sd,AttributionControl:So,ScaleControl:$u,FullscreenControl:rs,Popup:Mp,Marker:Lc,Style:kr,LngLat:i.LngLat,LngLatBounds:i.LngLatBounds,Point:i.Point,MercatorCoordinate:i.MercatorCoordinate,Evented:i.Evented,config:i.config,prewarm:function(){tt().acquire(kt)},clearPrewarmedResources:function(){var I=Vt;I&&(I.isPreloaded()&&I.numActive()===1?(I.release(kt),Vt=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},get accessToken(){return i.config.ACCESS_TOKEN},set accessToken(I){i.config.ACCESS_TOKEN=I},get baseApiUrl(){return i.config.API_URL},set baseApiUrl(I){i.config.API_URL=I},get workerCount(){return wt.workerCount},set workerCount(I){wt.workerCount=I},get maxParallelImageRequests(){return i.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(I){i.config.MAX_PARALLEL_IMAGE_REQUESTS=I},clearStorage:function(I){i.clearTileCache(I)},workerUrl:""};return ce}),u})},{}],240:[function(e,o,f){o.exports=Math.log2||function(r){return Math.log(r)*Math.LOG2E}},{}],241:[function(e,o,f){o.exports=function(a,u){u||(u=a,a=window);var c=0,i=0,s=0,l={shift:!1,alt:!1,control:!1,meta:!1},d=!1;function h(T){var _=!1;return"altKey"in T&&(_=_||T.altKey!==l.alt,l.alt=!!T.altKey),"shiftKey"in T&&(_=_||T.shiftKey!==l.shift,l.shift=!!T.shiftKey),"ctrlKey"in T&&(_=_||T.ctrlKey!==l.control,l.control=!!T.ctrlKey),"metaKey"in T&&(_=_||T.metaKey!==l.meta,l.meta=!!T.metaKey),_}function m(T,_){var M=r.x(_),A=r.y(_);"buttons"in _&&(T=0|_.buttons),(T!==c||M!==i||A!==s||h(_))&&(c=0|T,i=M||0,s=A||0,u&&u(c,i,s,l))}function g(T){m(0,T)}function p(){(c||i||s||l.shift||l.alt||l.meta||l.control)&&(i=s=0,c=0,l.shift=l.alt=l.control=l.meta=!1,u&&u(0,0,0,l))}function v(T){h(T)&&u&&u(c,i,s,l)}function y(T){r.buttons(T)===0?m(0,T):m(c,T)}function x(T){m(c|r.buttons(T),T)}function w(T){m(c&~r.buttons(T),T)}function k(){d||(d=!0,a.addEventListener("mousemove",y),a.addEventListener("mousedown",x),a.addEventListener("mouseup",w),a.addEventListener("mouseleave",g),a.addEventListener("mouseenter",g),a.addEventListener("mouseout",g),a.addEventListener("mouseover",g),a.addEventListener("blur",p),a.addEventListener("keyup",v),a.addEventListener("keydown",v),a.addEventListener("keypress",v),a!==window&&(window.addEventListener("blur",p),window.addEventListener("keyup",v),window.addEventListener("keydown",v),window.addEventListener("keypress",v)))}k();var b={element:a};return Object.defineProperties(b,{enabled:{get:function(){return d},set:function(T){T?k():function(){!d||(d=!1,a.removeEventListener("mousemove",y),a.removeEventListener("mousedown",x),a.removeEventListener("mouseup",w),a.removeEventListener("mouseleave",g),a.removeEventListener("mouseenter",g),a.removeEventListener("mouseout",g),a.removeEventListener("mouseover",g),a.removeEventListener("blur",p),a.removeEventListener("keyup",v),a.removeEventListener("keydown",v),a.removeEventListener("keypress",v),a!==window&&(window.removeEventListener("blur",p),window.removeEventListener("keyup",v),window.removeEventListener("keydown",v),window.removeEventListener("keypress",v)))}()},enumerable:!0},buttons:{get:function(){return c},enumerable:!0},x:{get:function(){return i},enumerable:!0},y:{get:function(){return s},enumerable:!0},mods:{get:function(){return l},enumerable:!0}}),b};var r=e("mouse-event")},{"mouse-event":243}],242:[function(e,o,f){var r={left:0,top:0};o.exports=function(a,u,c){u=u||a.currentTarget||a.srcElement,Array.isArray(c)||(c=[0,0]);var i=a.clientX||0,s=a.clientY||0,l=(d=u,d===window||d===document||d===document.body?r:d.getBoundingClientRect()),d;return c[0]=i-l.left,c[1]=s-l.top,c}},{}],243:[function(e,o,f){function r(a){return a.target||a.srcElement||window}f.buttons=function(a){if(typeof a=="object"){if("buttons"in a)return a.buttons;if("which"in a){if((u=a.which)===2)return 4;if(u===3)return 2;if(u>0)return 1<=0)return 1<0&&d(m,M))}catch(A){v.call(new x(M),A)}}}function v(T){var _=this;_.triggered||(_.triggered=!0,_.def&&(_=_.def),_.msg=T,_.state=2,_.chain.length>0&&d(m,_))}function y(T,_,M,A){for(var S=0;S<_.length;S++)(function(E){T.resolve(_[E]).then(function(D){M(E,D)},A)})(S)}function x(T){this.def=T,this.triggered=!1}function w(T){this.promise=T,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function k(T){if(typeof T!="function")throw TypeError("Not a function");if(this.__NPO__!==0)throw TypeError("Not a promise");this.__NPO__=1;var _=new w(this);this.then=function(M,A){var S={success:typeof M!="function"||M,failure:typeof A=="function"&&A};return S.promise=new this.constructor(function(E,D){if(typeof E!="function"||typeof D!="function")throw TypeError("Not a function");S.resolve=E,S.reject=D}),_.chain.push(S),_.state!==0&&d(m,_),S.promise},this.catch=function(M){return this.then(void 0,M)};try{T.call(void 0,function(M){p.call(_,M)},function(M){v.call(_,M)})}catch(M){v.call(_,M)}}i=function(){var T,_,M;function A(S,E){this.fn=S,this.self=E,this.next=void 0}return{add:function(S,E){M=new A(S,E),_?_.next=M:T=M,_=M,M=void 0},drain:function(){var S=T;for(T=_=c=void 0;S;)S.fn.call(S.self),S=S.next}}}();var b=u({},"constructor",k,!1);return k.prototype=b,u(b,"__NPO__",0,!1),u(k,"resolve",function(T){return T&&typeof T=="object"&&T.__NPO__===1?T:new this(function(_,M){if(typeof _!="function"||typeof M!="function")throw TypeError("Not a function");_(T)})}),u(k,"reject",function(T){return new this(function(_,M){if(typeof _!="function"||typeof M!="function")throw TypeError("Not a function");M(T)})}),u(k,"all",function(T){var _=this;return s.call(T)!="[object Array]"?_.reject(TypeError("Not an array")):T.length===0?_.resolve([]):new _(function(M,A){if(typeof M!="function"||typeof A!="function")throw TypeError("Not a function");var S=T.length,E=Array(S),D=0;y(_,T,function(O,R){E[O]=R,++D===S&&M(E)},A)})}),u(k,"race",function(T){var _=this;return s.call(T)!="[object Array]"?_.reject(TypeError("Not an array")):new _(function(M,A){if(typeof M!="function"||typeof A!="function")throw TypeError("Not a function");y(_,T,function(S,E){M(E)},A)})}),k})}).call(this)}).call(this,typeof Ro<"u"?Ro:typeof self<"u"?self:typeof window<"u"?window:{},e("timers").setImmediate)},{timers:311}],246:[function(e,o,f){var r=Math.PI,a=l(120);function u(d,h,m,g){return["C",d,h,m,g,m,g]}function c(d,h,m,g,p,v){return["C",d/3+2/3*m,h/3+2/3*g,p/3+2/3*m,v/3+2/3*g,p,v]}function i(d,h,m,g,p,v,y,x,w,k){if(k)R=k[0],z=k[1],D=k[2],O=k[3];else{var b=s(d,h,-p);d=b.x,h=b.y;var T=(d-(x=(b=s(x,w,-p)).x))/2,_=(h-(w=b.y))/2,M=T*T/(m*m)+_*_/(g*g);M>1&&(m*=M=Math.sqrt(M),g*=M);var A=m*m,S=g*g,E=(v==y?-1:1)*Math.sqrt(Math.abs((A*S-A*_*_-S*T*T)/(A*_*_+S*T*T)));E==1/0&&(E=1);var D=E*m*_/g+(d+x)/2,O=E*-g*T/m+(h+w)/2,R=Math.asin(((h-O)/g).toFixed(9)),z=Math.asin(((w-O)/g).toFixed(9));(R=dz&&(R-=2*r),!y&&z>R&&(z-=2*r)}if(Math.abs(z-R)>a){var L=z,P=x,N=w;z=R+a*(y&&z>R?1:-1);var B=i(x=D+m*Math.cos(z),w=O+g*Math.sin(z),m,g,p,0,y,P,N,[z,L,D,O])}var G=Math.tan((z-R)/4),W=4/3*m*G,K=4/3*g*G,te=[2*d-(d+W*Math.sin(R)),2*h-(h-K*Math.cos(R)),x+W*Math.sin(z),w-K*Math.cos(z),x,w];if(k)return te;B&&(te=te.concat(B));for(var Y=0;Y7&&(m.push(M.splice(0,7)),M.unshift("C"));break;case"S":var S=k,E=b;h!="C"&&h!="S"||(S+=S-g,E+=E-p),M=["C",S,E,M[1],M[2],M[3],M[4]];break;case"T":h=="Q"||h=="T"?(x=2*k-x,w=2*b-w):(x=k,w=b),M=c(k,b,x,w,M[1],M[2]);break;case"Q":x=M[1],w=M[2],M=c(k,b,M[1],M[2],M[3],M[4]);break;case"L":M=u(k,b,M[1],M[2]);break;case"H":M=u(k,b,M[1],b);break;case"V":M=u(k,b,k,M[1]);break;case"Z":M=u(k,b,v,y)}h=A,k=M[M.length-2],b=M[M.length-1],M.length>4?(g=M[M.length-4],p=M[M.length-3]):(g=k,p=b),m.push(M)}return m}},{}],247:[function(e,o,f){var r=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable;function c(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}o.exports=function(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var s={},l=0;l<10;l++)s["_"+String.fromCharCode(l)]=l;if(Object.getOwnPropertyNames(s).map(function(h){return s[h]}).join("")!=="0123456789")return!1;var d={};return"abcdefghijklmnopqrst".split("").forEach(function(h){d[h]=h}),Object.keys(Object.assign({},d)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}()?Object.assign:function(i,s){for(var l,d,h=c(i),m=1;m1e4)throw Error("References have circular dependency. Please, check them.");s[w]=x}),v=v.reverse(),s=s.map(function(x){return v.forEach(function(w){x=x.replace(new RegExp("(\\"+d+w+"\\"+d+")","g"),g[0]+"$1"+g[1])}),x})});var m=new RegExp("\\"+d+"([0-9]+)\\"+d);return h?s:function g(p,v,y){for(var x,w=[],k=0;x=m.exec(p);){if(k++>1e4)throw Error("Circular references in parenthesis");w.push(p.slice(0,x.index)),w.push(g(v[x[1]],v)),p=p.slice(x.index+x[0].length)}return w.push(p),w}(s[0],s)}function a(c,i){if(i&&i.flat){var s,l=i&&i.escape||"___",d=c[0];if(!d)return"";for(var h=new RegExp("\\"+l+"([0-9]+)\\"+l),m=0;d!=s;){if(m++>1e4)throw Error("Circular references in "+c);s=d,d=d.replace(h,g)}return d}return c.reduce(function p(v,y){return Array.isArray(y)&&(y=y.reduce(p,"")),v+y},"");function g(p,v){if(c[v]==null)throw Error("Reference "+v+"is undefined");return c[v]}}function u(c,i){return Array.isArray(c)?a(c,i):r(c,i)}u.parse=r,u.stringify=a,o.exports=u},{}],249:[function(e,o,f){var r=e("pick-by-alias");o.exports=function(a){var u;return arguments.length>1&&(a=arguments),typeof a=="string"?a=a.split(/\s/).map(parseFloat):typeof a=="number"&&(a=[a]),a.length&&typeof a[0]=="number"?u=a.length===1?{width:a[0],height:a[0],x:0,y:0}:a.length===2?{width:a[0],height:a[1],x:0,y:0}:{x:a[0],y:a[1],width:a[2]-a[0]||0,height:a[3]-a[1]||0}:a&&(a=r(a,{left:"x l left Left",top:"y t top Top",width:"w width W Width",height:"h height W Width",bottom:"b bottom Bottom",right:"r right Right"}),u={x:a.left||0,y:a.top||0},a.width==null?a.right?u.width=a.right-u.x:u.width=0:u.width=a.width,a.height==null?a.bottom?u.height=a.bottom-u.y:u.height=0:u.height=a.height),u}},{"pick-by-alias":253}],250:[function(e,o,f){o.exports=function(c){var i=[];return c.replace(a,function(s,l,d){var h=l.toLowerCase();for(d=function(m){var g=m.match(u);return g?g.map(Number):[]}(d),h=="m"&&d.length>2&&(i.push([l].concat(d.splice(0,2))),h="l",l=l=="m"?"l":"L");;){if(d.length==r[h])return d.unshift(l),i.push(d);if(d.length=-r},pointBetween:function(u,c,i){var s=u[1]-c[1],l=i[0]-c[0],d=u[0]-c[0],h=i[1]-c[1],m=d*l+s*h;return!(m-r)},pointsSameX:function(u,c){return Math.abs(u[0]-c[0])r!=d-s>r&&(l-g)*(s-p)/(d-p)+g-i>r&&(h=!h),l=g,d=p}return h}};return a}},{}],257:[function(e,o,f){var r={toPolygon:function(a,u){function c(l){if(l.length<=0)return a.segments({inverted:!1,regions:[]});function d(g){var p=g.slice(0,g.length-1);return a.segments({inverted:!1,regions:[p]})}for(var h=d(l[0]),m=1;m0})}function x(O,R){var z=O.seg,L=R.seg,P=z.start,N=z.end,B=L.start,G=L.end;c&&c.checkIntersection(z,L);var W=u.linesIntersect(P,N,B,G);if(W===!1){if(!u.pointsCollinear(P,N,B)||u.pointsSame(P,G)||u.pointsSame(N,B))return!1;var K=u.pointsSame(P,B),te=u.pointsSame(N,G);if(K&&te)return R;var Y=!K&&u.pointBetween(P,B,G),Z=!te&&u.pointBetween(N,B,G);if(K)return Z?h(R,N):h(O,G),R;Y&&(te||(Z?h(R,N):h(O,G)),h(R,P))}else W.alongA===0&&(W.alongB===-1?h(O,B):W.alongB===0?h(O,W.pt):W.alongB===1&&h(O,G)),W.alongB===0&&(W.alongA===-1?h(R,P):W.alongA===0?h(R,W.pt):W.alongA===1&&h(R,N));return!1}for(var w=[];!s.isEmpty();){var k=s.getHead();if(c&&c.vert(k.pt[0]),k.isStart){let O=function(){if(T){var R=x(k,T);if(R)return R}return!!_&&x(k,_)};c&&c.segmentNew(k.seg,k.primary);var b=y(k),T=b.before?b.before.ev:null,_=b.after?b.after.ev:null;c&&c.tempStatus(k.seg,!!T&&T.seg,!!_&&_.seg);var M,A=O();if(A){var S;a?(S=k.seg.myFill.below===null||k.seg.myFill.above!==k.seg.myFill.below)&&(A.seg.myFill.above=!A.seg.myFill.above):A.seg.otherFill=k.seg.myFill,c&&c.segmentUpdate(A.seg),k.other.remove(),k.remove()}if(s.getHead()!==k){c&&c.rewind(k.seg);continue}a?(S=k.seg.myFill.below===null||k.seg.myFill.above!==k.seg.myFill.below,k.seg.myFill.below=_?_.seg.myFill.above:g,k.seg.myFill.above=S?!k.seg.myFill.below:k.seg.myFill.below):k.seg.otherFill===null&&(M=_?k.primary===_.primary?_.seg.otherFill.above:_.seg.myFill.above:k.primary?p:g,k.seg.otherFill={above:M,below:M}),c&&c.status(k.seg,!!T&&T.seg,!!_&&_.seg),k.other.status=b.insert(r.node({ev:k}))}else{var E=k.status;if(E===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(v.exists(E.prev)&&v.exists(E.next)&&x(E.prev.ev,E.next.ev),c&&c.statusRemove(E.ev.seg),E.remove(),!k.primary){var D=k.seg.myFill;k.seg.myFill=k.seg.otherFill,k.seg.otherFill=D}w.push(k.seg)}s.getHead().remove()}return c&&c.done(),w}return a?{addRegion:function(g){for(var p,v,y,x=g[g.length-1],w=0;w0&&!this.aborted;){var s=this.ifds_to_read.shift();s.offset&&this.scan_ifd(s.id,s.offset,c)}},u.prototype.read_uint16=function(c){var i=this.input;if(c+2>i.length)throw r("unexpected EOF","EBADDATA");return this.big_endian?256*i[c]+i[c+1]:i[c]+256*i[c+1]},u.prototype.read_uint32=function(c){var i=this.input;if(c+4>i.length)throw r("unexpected EOF","EBADDATA");return this.big_endian?16777216*i[c]+65536*i[c+1]+256*i[c+2]+i[c+3]:i[c]+256*i[c+1]+65536*i[c+2]+16777216*i[c+3]},u.prototype.is_subifd_link=function(c,i){return c===0&&i===34665||c===0&&i===34853||c===34665&&i===40965},u.prototype.exif_format_length=function(c){switch(c){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}},u.prototype.exif_format_read=function(c,i){var s;switch(c){case 1:case 2:return s=this.input[i];case 6:return(s=this.input[i])|33554430*(128&s);case 3:return s=this.read_uint16(i);case 8:return(s=this.read_uint16(i))|131070*(32768&s);case 4:return s=this.read_uint32(i);case 9:return 0|(s=this.read_uint32(i));case 5:case 10:case 11:case 12:case 7:default:return null}},u.prototype.scan_ifd=function(c,i,s){var l=this.read_uint16(i);i+=2;for(var d=0;dthis.input.length)throw r("unexpected EOF","EBADDATA");for(var w=[],k=y,b=0;b0&&(this.ifds_to_read.push({id:h,offset:w[0]}),x=!0),s({is_big_endian:this.big_endian,ifd:c,tag:h,format:m,count:g,entry_offset:i+this.start,data_length:v,data_offset:y+this.start,value:w,is_subifd_link:x})===!1)return void(this.aborted=!0);i+=12}c===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(i)})},o.exports.ExifParser=u,o.exports.get_orientation=function(c){var i=0;try{return new u(c,0,c.length).each(function(s){if(s.ifd===0&&s.tag===274&&Array.isArray(s.value))return i=s.value[0],!1}),i}catch{return-1}}},{}],264:[function(e,o,f){var r=e("./common").readUInt16BE,a=e("./common").readUInt32BE;function u(h,m){if(h.length<4+m)return null;var g=a(h,m);return h.length>4&15,p=15&h[4],v=h[5]>>4&15,y=r(h,6),x=8,w=0;wb.width||k.width===b.width&&k.height>b.height?k:b}),v=g.reduce(function(k,b){return k.height>b.height||k.height===b.height&&k.width>b.width?k:b}),p.width>v.height||p.width===v.height&&p.height>v.width?p:v),x=1;m.transforms.forEach(function(k){var b={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},T={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(k.type==="imir"&&(x=k.value===0?T[x]:b[x=b[x=T[x]]]),k.type==="irot")for(var _=0;_1&&(y.variants=v.variants),v.orientation&&(y.orientation=v.orientation),v.exif_location&&v.exif_location.offset+v.exif_location.length<=l.length){var x=u(l,v.exif_location.offset),w=l.slice(v.exif_location.offset+x+4,v.exif_location.offset+v.exif_location.length),k=i.get_orientation(w);k>0&&(y.orientation=k)}return y}}}}}}},{"../common":262,"../exif_utils":263,"../miaf_utils":264}],266:[function(e,o,f){var r=e("../common").str2arr,a=e("../common").sliceEq,u=e("../common").readUInt16LE,c=r("BM");o.exports=function(i){if(!(i.length<26)&&a(i,0,c))return{width:u(i,18),height:u(i,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}},{"../common":262}],267:[function(e,o,f){var r=e("../common").str2arr,a=e("../common").sliceEq,u=e("../common").readUInt16LE,c=r("GIF87a"),i=r("GIF89a");o.exports=function(s){if(!(s.length<10)&&(a(s,0,c)||a(s,0,i)))return{width:u(s,6),height:u(s,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}},{"../common":262}],268:[function(e,o,f){var r=e("../common").readUInt16LE;o.exports=function(a){var u=r(a,0),c=r(a,2),i=r(a,4);if(u===0&&c===1&&i){for(var s=[],l={width:0,height:0},d=0;dl.width||m>l.height)&&(l=g)}return{width:l.width,height:l.height,variants:s,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}},{"../common":262}],269:[function(e,o,f){var r=e("../common").readUInt16BE,a=e("../common").str2arr,u=e("../common").sliceEq,c=e("../exif_utils"),i=a("Exif\0\0");o.exports=function(s){if(!(s.length<2)&&s[0]===255&&s[1]===216&&s[2]===255)for(var l=2;;){for(;;){if(s.length-l<2)return;if(s[l++]===255)break}for(var d,h,m=s[l++];m===255;)m=s[l++];if(208<=m&&m<=217||m===1)d=0;else{if(!(192<=m&&m<=254)||s.length-l<2)return;d=r(s,l)-2,l+=2}if(m===217||m===218)return;if(m===225&&d>=10&&u(s,l,i)&&(h=c.get_orientation(s.slice(l+6,l+d))),d>=5&&192<=m&&m<=207&&m!==196&&m!==200&&m!==204){if(s.length-l0&&(g.orientation=h),g}l+=d}}},{"../common":262,"../exif_utils":263}],270:[function(e,o,f){var r=e("../common").str2arr,a=e("../common").sliceEq,u=e("../common").readUInt32BE,c=r(`\x89PNG\r + +`),i=r("IHDR");o.exports=function(s){if(!(s.length<24)&&a(s,0,c)&&a(s,12,i))return{width:u(s,16),height:u(s,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}},{"../common":262}],271:[function(e,o,f){var r=e("../common").str2arr,a=e("../common").sliceEq,u=e("../common").readUInt32BE,c=r("8BPS\0");o.exports=function(i){if(!(i.length<22)&&a(i,0,c))return{width:u(i,18),height:u(i,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}},{"../common":262}],272:[function(e,o,f){function r(h){return typeof h=="number"&&isFinite(h)&&h>0}var a=/<[-_.:a-zA-Z0-9][^>]*>/,u=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,c=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,i=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,s=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,l=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function d(h){return l.test(h)?h.match(l)[0]:"px"}o.exports=function(h){if(function(M){var A,S=0,E=M.length;for(M[0]===239&&M[1]===187&&M[2]===191&&(S=3);S>14&16383),type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function m(g,p){return{width:1+(g[p+6]<<16|g[p+5]<<8|g[p+4]),height:1+(g[p+9]<g.length)){for(;p+8=10?v=v||d(g,p+8):w==="VP8L"&&k>=9?v=v||h(g,p+8):w==="VP8X"&&k>=10?v=v||m(g,p+8):w==="EXIF"&&(y=i.get_orientation(g.slice(p+8,p+8+k)),p=1/0),p+=8+k}else p++;if(v)return y>0&&(v.orientation=y),v}}}},{"../common":262,"../exif_utils":263}],275:[function(e,o,f){o.exports={avif:e("./parse_sync/avif"),bmp:e("./parse_sync/bmp"),gif:e("./parse_sync/gif"),ico:e("./parse_sync/ico"),jpeg:e("./parse_sync/jpeg"),png:e("./parse_sync/png"),psd:e("./parse_sync/psd"),svg:e("./parse_sync/svg"),tiff:e("./parse_sync/tiff"),webp:e("./parse_sync/webp")}},{"./parse_sync/avif":265,"./parse_sync/bmp":266,"./parse_sync/gif":267,"./parse_sync/ico":268,"./parse_sync/jpeg":269,"./parse_sync/png":270,"./parse_sync/psd":271,"./parse_sync/svg":272,"./parse_sync/tiff":273,"./parse_sync/webp":274}],276:[function(e,o,f){var r=e("./lib/parsers_sync");o.exports=function(a){return function(u){for(var c=Object.keys(r),i=0;i1)for(var k=1;k"u"?r:window,c=["moz","webkit"],i="AnimationFrame",s=u["request"+i],l=u["cancel"+i]||u["cancelRequest"+i],d=0;!s&&d1&&(R.scaleRatio=[R.scale[0]*R.viewport.width,R.scale[1]*R.viewport.height],v(R),R.after&&R.after(R))}function D(R){if(R){R.length!=null?typeof R[0]=="number"&&(R=[{positions:R}]):Array.isArray(R)||(R=[R]);var z=0,L=0;if(A.groups=M=R.map(function(te,Y){var Z=M[Y];return te&&(typeof te=="function"?te={after:te}:typeof te[0]=="number"&&(te={positions:te}),te=c(te,{color:"color colors fill",capSize:"capSize cap capsize cap-size",lineWidth:"lineWidth line-width width line thickness",opacity:"opacity alpha",range:"range dataBox",viewport:"viewport viewBox",errors:"errors error",positions:"positions position data points"}),Z||(M[Y]=Z={id:Y,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},te=i({},_,te)),u(Z,te,[{lineWidth:function(re){return .5*+re},capSize:function(re){return .5*+re},opacity:parseFloat,errors:function(re){return re=s(re),L+=re.length,re},positions:function(re,U){return re=s(re,"float64"),U.count=Math.floor(re.length/2),U.bounds=r(re,2),U.offset=z,z+=U.count,re}},{color:function(re,U){var q=U.count;if(re||(re="transparent"),!Array.isArray(re)||typeof re[0]=="number"){var $=re;re=Array(q);for(var ne=0;ne 0. && baClipping < length(normalWidth * endBotJoin)) { + //handle miter clipping + bTopCoord -= normalWidth * endTopJoin; + bTopCoord += normalize(endTopJoin * normalWidth) * baClipping; + } + + if (nextReverse) { + //make join rectangular + vec2 miterShift = normalWidth * endJoinDirection * miterLimit * .5; + float normalAdjust = 1. - min(miterLimit / endMiterRatio, 1.); + bBotCoord = bCoord + miterShift - normalAdjust * normalWidth * currNormal * .5; + bTopCoord = bCoord + miterShift + normalAdjust * normalWidth * currNormal * .5; + } + else if (!prevReverse && abClipping > 0. && abClipping < length(normalWidth * startBotJoin)) { + //handle miter clipping + aBotCoord -= normalWidth * startBotJoin; + aBotCoord += normalize(startBotJoin * normalWidth) * abClipping; + } + + vec2 aTopPosition = (aTopCoord) * adjustedScale + translate; + vec2 aBotPosition = (aBotCoord) * adjustedScale + translate; + + vec2 bTopPosition = (bTopCoord) * adjustedScale + translate; + vec2 bBotPosition = (bBotCoord) * adjustedScale + translate; + + //position is normalized 0..1 coord on the screen + vec2 position = (aTopPosition * lineTop + aBotPosition * lineBot) * lineStart + (bTopPosition * lineTop + bBotPosition * lineBot) * lineEnd; + + startCoord = aCoord * scaleRatio + translate * viewport.zw + viewport.xy; + endCoord = bCoord * scaleRatio + translate * viewport.zw + viewport.xy; + + gl_Position = vec4(position * 2.0 - 1.0, depth, 1); + + enableStartMiter = step(dot(currTangent, prevTangent), .5); + enableEndMiter = step(dot(currTangent, nextTangent), .5); + + //bevel miter cutoffs + if (miterMode == 1.) { + if (enableStartMiter == 1.) { + vec2 startMiterWidth = vec2(startJoinDirection) * thickness * miterLimit * .5; + startCutoff = vec4(aCoord, aCoord); + startCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio; + startCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; + startCutoff += viewport.xyxy; + startCutoff += startMiterWidth.xyxy; + } + + if (enableEndMiter == 1.) { + vec2 endMiterWidth = vec2(endJoinDirection) * thickness * miterLimit * .5; + endCutoff = vec4(bCoord, bCoord); + endCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio; + endCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; + endCutoff += viewport.xyxy; + endCutoff += endMiterWidth.xyxy; + } + } + + //round miter cutoffs + else if (miterMode == 2.) { + if (enableStartMiter == 1.) { + vec2 startMiterWidth = vec2(startJoinDirection) * thickness * abs(dot(startJoinDirection, currNormal)) * .5; + startCutoff = vec4(aCoord, aCoord); + startCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio; + startCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; + startCutoff += viewport.xyxy; + startCutoff += startMiterWidth.xyxy; + } + + if (enableEndMiter == 1.) { + vec2 endMiterWidth = vec2(endJoinDirection) * thickness * abs(dot(endJoinDirection, currNormal)) * .5; + endCutoff = vec4(bCoord, bCoord); + endCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio; + endCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; + endCutoff += viewport.xyxy; + endCutoff += endMiterWidth.xyxy; + } + } +} +`]),frag:c([`precision highp float; +#define GLSLIFY 1 + +uniform float dashLength, pixelRatio, thickness, opacity, id, miterMode; +uniform sampler2D dashTexture; + +varying vec4 fragColor; +varying vec2 tangent; +varying vec4 startCutoff, endCutoff; +varying vec2 startCoord, endCoord; +varying float enableStartMiter, enableEndMiter; + +float distToLine(vec2 p, vec2 a, vec2 b) { + vec2 diff = b - a; + vec2 perp = normalize(vec2(-diff.y, diff.x)); + return dot(p - a, perp); +} + +void main() { + float alpha = 1., distToStart, distToEnd; + float cutoff = thickness * .5; + + //bevel miter + if (miterMode == 1.) { + if (enableStartMiter == 1.) { + distToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw); + if (distToStart < -1.) { + discard; + return; + } + alpha *= min(max(distToStart + 1., 0.), 1.); + } + + if (enableEndMiter == 1.) { + distToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw); + if (distToEnd < -1.) { + discard; + return; + } + alpha *= min(max(distToEnd + 1., 0.), 1.); + } + } + + // round miter + else if (miterMode == 2.) { + if (enableStartMiter == 1.) { + distToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw); + if (distToStart < 0.) { + float radius = length(gl_FragCoord.xy - startCoord); + + if(radius > cutoff + .5) { + discard; + return; + } + + alpha -= smoothstep(cutoff - .5, cutoff + .5, radius); + } + } + + if (enableEndMiter == 1.) { + distToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw); + if (distToEnd < 0.) { + float radius = length(gl_FragCoord.xy - endCoord); + + if(radius > cutoff + .5) { + discard; + return; + } + + alpha -= smoothstep(cutoff - .5, cutoff + .5, radius); + } + } + } + + float t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25; + float dash = texture2D(dashTexture, vec2(t, .5)).r; + + gl_FragColor = fragColor; + gl_FragColor.a *= alpha * opacity * dash; +} +`]),attributes:{lineEnd:{buffer:b,divisor:0,stride:8,offset:0},lineTop:{buffer:b,divisor:0,stride:8,offset:4},aColor:{buffer:w.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:w.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:w.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:w.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:w.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:w.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},T))}catch{k=_}return{fill:w({primitive:"triangle",elements:function(M,A){return A.triangles},offset:0,vert:c([`precision highp float; +#define GLSLIFY 1 + +attribute vec2 position, positionFract; + +uniform vec4 color; +uniform vec2 scale, scaleFract, translate, translateFract; +uniform float pixelRatio, id; +uniform vec4 viewport; +uniform float opacity; + +varying vec4 fragColor; + +const float MAX_LINES = 256.; + +void main() { + float depth = (MAX_LINES - 4. - id) / (MAX_LINES); + + vec2 position = position * scale + translate + + positionFract * scale + translateFract + + position * scaleFract + + positionFract * scaleFract; + + gl_Position = vec4(position * 2.0 - 1.0, depth, 1); + + fragColor = color / 255.; + fragColor.a *= opacity; +} +`]),frag:c([`precision highp float; +#define GLSLIFY 1 + +varying vec4 fragColor; + +void main() { + gl_FragColor = fragColor; +} +`]),uniforms:{scale:w.prop("scale"),color:w.prop("fill"),scaleFract:w.prop("scaleFract"),translateFract:w.prop("translateFract"),translate:w.prop("translate"),opacity:w.prop("opacity"),pixelRatio:w.context("pixelRatio"),id:w.prop("id"),viewport:function(M,A){return[A.viewport.x,A.viewport.y,M.viewportWidth,M.viewportHeight]}},attributes:{position:{buffer:w.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:w.prop("positionFractBuffer"),stride:8,offset:8}},blend:T.blend,depth:{enable:!1},scissor:T.scissor,stencil:T.stencil,viewport:T.viewport}),rect:_,miter:k}},x.defaults={dashes:null,join:"miter",miterLimit:1,thickness:10,cap:"square",color:"black",opacity:1,overlay:!1,viewport:null,range:null,close:!1,fill:null},x.prototype.render=function(){for(var w,k=[],b=arguments.length;b--;)k[b]=arguments[b];k.length&&(w=this).update.apply(w,k),this.draw()},x.prototype.draw=function(){for(var w=this,k=[],b=arguments.length;b--;)k[b]=arguments[b];return(k.length?k:this.passes).forEach(function(T,_){var M;if(T&&Array.isArray(T))return(M=w).draw.apply(M,T);typeof T=="number"&&(T=w.passes[T]),T&&T.count>1&&T.opacity&&(w.regl._refresh(),T.fill&&T.triangles&&T.triangles.length>2&&w.shaders.fill(T),T.thickness&&(T.scale[0]*T.viewport.width>x.precisionThreshold||T.scale[1]*T.viewport.height>x.precisionThreshold||T.join==="rect"||!T.join&&(T.thickness<=2||T.count>=x.maxPoints)?w.shaders.rect(T):w.shaders.miter(T)))}),this},x.prototype.update=function(w){var k=this;if(w){w.length!=null?typeof w[0]=="number"&&(w=[{positions:w}]):Array.isArray(w)||(w=[w]);var b=this.regl,T=this.gl;if(w.forEach(function(E,D){var O=k.passes[D];if(E!==void 0)if(E!==null){if(typeof E[0]=="number"&&(E={positions:E}),E=i(E,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow",splitNull:"splitNull"}),O||(k.passes[D]=O={id:D,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:b.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:b.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:b.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:b.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},E=u({},x.defaults,E)),E.thickness!=null&&(O.thickness=parseFloat(E.thickness)),E.opacity!=null&&(O.opacity=parseFloat(E.opacity)),E.miterLimit!=null&&(O.miterLimit=parseFloat(E.miterLimit)),E.overlay!=null&&(O.overlay=!!E.overlay,D=H});(q=q.slice(0,Q)).push(H)}for(var ee=function(Ot){var Wt=G.slice(2*ne,2*q[Ot]).concat(H?G.slice(2*H):[]),Jt=(O.hole||[]).map(function(Ge){return Ge-H+(q[Ot]-ne)}),Be=l(Wt,Jt);Be=Be.map(function(Ge){return Ge+ne+(Ge+ne_.length)&&(M=_.length);for(var A=0,S=new Array(M);A 1.0 + delta) { + discard; + } + + alpha -= smoothstep(1.0 - delta, 1.0 + delta, radius); + + float borderRadius = fragBorderRadius; + float ratio = smoothstep(borderRadius - delta, borderRadius + delta, radius); + vec4 color = mix(fragColor, fragBorderColor, ratio); + color.a *= alpha * opacity; + gl_FragColor = color; +} +`]),z.vert=m([`precision highp float; +#define GLSLIFY 1 + +attribute float x, y, xFract, yFract; +attribute float size, borderSize; +attribute vec4 colorId, borderColorId; +attribute float isActive; + +uniform bool constPointSize; +uniform float pixelRatio; +uniform vec2 paletteSize, scale, scaleFract, translate, translateFract; +uniform sampler2D paletteTexture; + +const float maxSize = 100.; + +varying vec4 fragColor, fragBorderColor; +varying float fragBorderRadius, fragWidth; + +float pointSizeScale = (constPointSize) ? 2. : pixelRatio; + +bool isDirect = (paletteSize.x < 1.); + +vec4 getColor(vec4 id) { + return isDirect ? id / 255. : texture2D(paletteTexture, + vec2( + (id.x + .5) / paletteSize.x, + (id.y + .5) / paletteSize.y + ) + ); +} + +void main() { + // ignore inactive points + if (isActive == 0.) return; + + vec2 position = vec2(x, y); + vec2 positionFract = vec2(xFract, yFract); + + vec4 color = getColor(colorId); + vec4 borderColor = getColor(borderColorId); + + float size = size * maxSize / 255.; + float borderSize = borderSize * maxSize / 255.; + + gl_PointSize = (size + borderSize) * pointSizeScale; + + vec2 pos = (position + translate) * scale + + (positionFract + translateFract) * scale + + (position + translate) * scaleFract + + (positionFract + translateFract) * scaleFract; + + gl_Position = vec4(pos * 2. - 1., 0., 1.); + + fragBorderRadius = 1. - 2. * borderSize / (size + borderSize); + fragColor = color; + fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor; + fragWidth = 1. / gl_PointSize; +} +`]),y&&(z.frag=z.frag.replace("smoothstep","smoothStep"),R.frag=R.frag.replace("smoothstep","smoothStep")),this.drawCircle=_(z)}b.defaults={color:"black",borderColor:"transparent",borderSize:0,size:12,opacity:1,marker:void 0,viewport:null,range:null,pixelSize:null,count:0,offset:0,bounds:null,positions:[],snap:1e4},b.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},b.prototype.draw=function(){for(var _=this,M=arguments.length,A=new Array(M),S=0;Swe)?me.tree=d(fe,{bounds:Me}):we&&we.length&&(me.tree=we),me.tree){var ke={primitive:"points",usage:"static",data:me.tree,type:"uint32"};me.elements?me.elements(ke):me.elements=O.elements(ke)}var Ee=x.float32(fe);return Te({data:Ee,usage:"dynamic"}),Oe({data:x.fract32(fe,Ee),usage:"dynamic"}),de({data:new Uint8Array(ye),type:"uint8",usage:"stream"}),fe}},{marker:function(fe,me,_e){var we=me.activation;if(we.forEach(function(Ee){return Ee&&Ee.destroy&&Ee.destroy()}),we.length=0,fe&&typeof fe[0]!="number"){for(var Te=[],Oe=0,de=Math.min(fe.length,me.count);Oe=0)return D;if(_ instanceof Uint8Array||_ instanceof Uint8ClampedArray)M=_;else{M=new Uint8Array(_.length);for(var O=0,R=_.length;O4*S&&(this.tooManyColors=!0),this.updatePalette(A),E.length===1?E[0]:E},b.prototype.updatePalette=function(_){if(!this.tooManyColors){var M=this.maxColors,A=this.paletteTexture,S=Math.ceil(.25*_.length/M);if(S>1)for(var E=.25*(_=_.slice()).length%M;E2?(T[0],T[2],x=T[1],w=T[3]):T.length?(x=T[0],w=T[1]):(T.x,x=T.y,T.x+T.width,w=T.y+T.height),_.length>2?(k=_[0],b=_[2],_[1],_[3]):_.length?(k=_[0],b=_[1]):(k=_.x,_.y,b=_.x+_.width,_.y+_.height),[k,x,b,w]}function g(p){if(typeof p=="number")return[p,p,p,p];if(p.length===2)return[p[0],p[1],p[0],p[1]];var v=s(p);return[v.x,v.y,v.x+v.width,v.y+v.height]}o.exports=d,d.prototype.render=function(){for(var p,v=this,y=[],x=arguments.length;x--;)y[x]=arguments[x];return y.length&&(p=this).update.apply(p,y),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?this.planned==null&&(this.planned=c(function(){v.draw(),v.dirty=!0,v.planned=null})):(this.draw(),this.dirty=!0,c(function(){v.dirty=!1})),this)},d.prototype.update=function(){for(var p,v=[],y=arguments.length;y--;)v[y]=arguments[y];if(v.length){for(var x=0;xL))&&(k.lower||!(z"u"?1:window.devicePixelRatio,Ut=!1,tt={},bt=function(St){},zt=function(){};if(typeof ot=="string"?De=document.querySelector(ot):typeof ot=="object"&&(typeof ot.nodeName=="string"&&typeof ot.appendChild=="function"&&typeof ot.getBoundingClientRect=="function"?De=ot:typeof ot.drawArrays=="function"||typeof ot.drawElements=="function"?rt=(lt=ot).canvas:("gl"in ot?lt=ot.gl:"canvas"in ot?rt=c(ot.canvas):"container"in ot&&(He=c(ot.container)),"attributes"in ot&&(Ae=ot.attributes),"extensions"in ot&&(kt=u(ot.extensions)),"optionalExtensions"in ot&&(wt=u(ot.optionalExtensions)),"onDone"in ot&&(bt=ot.onDone),"profile"in ot&&(Ut=!!ot.profile),"pixelRatio"in ot&&(Vt=+ot.pixelRatio),"cachedCode"in ot&&(tt=ot.cachedCode))),De&&(De.nodeName.toLowerCase()==="canvas"?rt=De:He=De),!lt){if(!rt){if(!(De=function(St,Dt,Le){function Je(){var It=window.innerWidth,Zt=window.innerHeight;St!==document.body&&(It=(Zt=Et.getBoundingClientRect()).right-Zt.left,Zt=Zt.bottom-Zt.top),Et.width=Le*It,Et.height=Le*Zt}var st,Et=document.createElement("canvas");return H(Et.style,{border:0,margin:0,padding:0,top:0,left:0,width:"100%",height:"100%"}),St.appendChild(Et),St===document.body&&(Et.style.position="absolute",H(St.style,{margin:0,padding:0})),St!==document.body&&typeof ResizeObserver=="function"?(st=new ResizeObserver(function(){setTimeout(Je)})).observe(St):window.addEventListener("resize",Je,!1),Je(),{canvas:Et,onDestroy:function(){st?st.disconnect():window.removeEventListener("resize",Je),St.removeChild(Et)}}}(He||document.body,0,Vt)))return null;rt=De.canvas,zt=De.onDestroy}Ae.premultipliedAlpha===void 0&&(Ae.premultipliedAlpha=!0),lt=function(St,Dt){function Le(Je){try{return St.getContext(Je,Dt)}catch{return null}}return Le("webgl")||Le("experimental-webgl")||Le("webgl-experimental")}(rt,Ae)}return lt?{gl:lt,canvas:rt,container:He,extensions:kt,optionalExtensions:wt,pixelRatio:Vt,profile:Ut,cachedCode:tt,onDone:bt,onDestroy:zt}:(zt(),bt("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function s(Ae,De){for(var He=Array(Ae),rt=0;rt>>=De))<<3,(De|=He=(15<(Ae>>>=He))<<2)|(He=(3<(Ae>>>=He))<<1)|Ae>>>He>>1}function d(){function Ae(rt){e:{for(var lt=16;268435456>=lt;lt*=16)if(rt<=lt){rt=lt;break e}rt=0}return 0<(lt=He[l(rt)>>2]).length?lt.pop():new ArrayBuffer(rt)}function De(rt){He[l(rt.byteLength)>>2].push(rt)}var He=s(8,function(){return[]});return{alloc:Ae,free:De,allocType:function(rt,lt){var ot=null;switch(rt){case 5120:ot=new Int8Array(Ae(lt),0,lt);break;case 5121:ot=new Uint8Array(Ae(lt),0,lt);break;case 5122:ot=new Int16Array(Ae(2*lt),0,lt);break;case 5123:ot=new Uint16Array(Ae(2*lt),0,lt);break;case 5124:ot=new Int32Array(Ae(4*lt),0,lt);break;case 5125:ot=new Uint32Array(Ae(4*lt),0,lt);break;case 5126:ot=new Float32Array(Ae(4*lt),0,lt);break;default:return null}return ot.length!==lt?ot.subarray(0,lt):ot},freeType:function(rt){De(rt.buffer)}}}function h(Ae){return!!Ae&&typeof Ae=="object"&&Array.isArray(Ae.shape)&&Array.isArray(Ae.stride)&&typeof Ae.offset=="number"&&Ae.shape.length===Ae.stride.length&&(Array.isArray(Ae.data)||ge(Ae.data))}function m(Ae,De,He,rt,lt,ot){for(var kt=0;kt(zt=Le)&&(zt=bt.buffer.byteLength,Et===5123?zt>>=1:Et===5125&&(zt>>=2)),bt.vertCount=zt,zt=Dt,0>Dt&&(zt=4,(Dt=bt.buffer.dimension)===1&&(zt=0),Dt===2&&(zt=1),Dt===3&&(zt=4)),bt.primType=zt}function kt(bt){rt.elementsCount--,delete wt[bt.id],bt.buffer.destroy(),bt.buffer=null}var wt={},Vt=0,Ut={uint8:5121,uint16:5123};De.oes_element_index_uint&&(Ut.uint32=5125),lt.prototype.bind=function(){this.buffer.bind()};var tt=[];return{create:function(bt,zt){function St(Je){if(Je)if(typeof Je=="number")Dt(Je),Le.primType=4,Le.vertCount=0|Je,Le.type=5121;else{var st=null,Et=35044,It=-1,Zt=-1,Kt=0,Ht=0;Array.isArray(Je)||ge(Je)||h(Je)?st=Je:("data"in Je&&(st=Je.data),"usage"in Je&&(Et=Te[Je.usage]),"primitive"in Je&&(It=Me[Je.primitive]),"count"in Je&&(Zt=0|Je.count),"type"in Je&&(Ht=Ut[Je.type]),"length"in Je?Kt=0|Je.length:(Kt=Zt,Ht===5123||Ht===5122?Kt*=2:Ht!==5125&&Ht!==5124||(Kt*=4))),ot(Le,st,Et,It,Zt,Kt,Ht)}else Dt(),Le.primType=4,Le.vertCount=0,Le.type=5121;return St}var Dt=He.create(null,34963,!0),Le=new lt(Dt._buffer);return rt.elementsCount++,St(bt),St._reglType="elements",St._elements=Le,St.subdata=function(Je,st){return Dt.subdata(Je,st),St},St.destroy=function(){kt(Le)},St},createStream:function(bt){var zt=tt.pop();return zt||(zt=new lt(He.create(null,34963,!0,!1)._buffer)),ot(zt,bt,35040,-1,-1,0,0),zt},destroyStream:function(bt){tt.push(bt)},getElements:function(bt){return typeof bt=="function"&&bt._elements instanceof lt?bt._elements:null},clear:function(){fe(wt).forEach(kt)}}}function w(Ae){for(var De=ue.allocType(5123,Ae.length),He=0;He>>31<<15,lt=(ot<<1>>>24)-127,ot=ot>>13&1023;De[He]=-24>lt?rt:-14>lt?rt+(ot+1024>>-14-lt):15>=yn,jt.height>>=yn,zt(jt,fn[yn]),cn.mipmask|=1<jn;++jn)cn.images[jn]=null;return cn}function Kt(cn){for(var jn=cn.images,jt=0;jtcn){for(var jn=0;jn=--this.refCount&&sn(this)}}),kt.profile&&(ot.getTotalTextureSize=function(){var cn=0;return Object.keys(pr).forEach(function(jn){cn+=pr[jn].stats.size}),cn}),{create2D:function(cn,jn){function jt(yn,$n){var Un=fn.texInfo;Ht.call(Un);var Nn=Zt();return typeof yn=="number"?st(Nn,0|yn,typeof $n=="number"?0|$n:0|yn):yn?(mn(Un,yn),Et(Nn,yn)):st(Nn,1,1),Un.genMipmaps&&(Nn.mipmask=(Nn.width<<1)-1),fn.mipmask=Nn.mipmask,Vt(fn,Nn),fn.internalformat=Nn.internalformat,jt.width=Nn.width,jt.height=Nn.height,tn(fn),It(Nn,3553),zn(Un,3553),nn(),Kt(Nn),kt.profile&&(fn.stats.size=E(fn.internalformat,fn.type,Nn.width,Nn.height,Un.genMipmaps,!1)),jt.format=Ln[fn.internalformat],jt.type=lr[fn.type],jt.mag=Wr[Un.magFilter],jt.min=Mn[Un.minFilter],jt.wrapS=rr[Un.wrapS],jt.wrapT=rr[Un.wrapT],jt}var fn=new pn(3553);return pr[fn.id]=fn,ot.textureCount++,jt(cn,jn),jt.subimage=function(yn,$n,Un,Nn){$n|=0,Un|=0,Nn|=0;var Rn=Dt();return Vt(Rn,fn),Rn.width=0,Rn.height=0,zt(Rn,yn),Rn.width=Rn.width||(fn.width>>Nn)-$n,Rn.height=Rn.height||(fn.height>>Nn)-Un,tn(fn),St(Rn,3553,$n,Un,Nn),nn(),Le(Rn),jt},jt.resize=function(yn,$n){var Un=0|yn,Nn=0|$n||Un;if(Un===fn.width&&Nn===fn.height)return jt;jt.width=fn.width=Un,jt.height=fn.height=Nn,tn(fn);for(var Rn=0;fn.mipmask>>Rn;++Rn){var wn=Un>>Rn,kn=Nn>>Rn;if(!wn||!kn)break;Ae.texImage2D(3553,Rn,fn.format,wn,kn,0,fn.format,fn.type,null)}return nn(),kt.profile&&(fn.stats.size=E(fn.internalformat,fn.type,Un,Nn,!1,!1)),jt},jt._reglType="texture2d",jt._texture=fn,kt.profile&&(jt.stats=fn.stats),jt.destroy=function(){fn.decRef()},jt},createCube:function(cn,jn,jt,fn,yn,$n){function Un(wn,kn,Tn,Dn,Zn,Yn){var ir,or=Nn.texInfo;for(Ht.call(or),ir=0;6>ir;++ir)Rn[ir]=Zt();if(typeof wn!="number"&&wn){if(typeof wn=="object")if(kn)Et(Rn[0],wn),Et(Rn[1],kn),Et(Rn[2],Tn),Et(Rn[3],Dn),Et(Rn[4],Zn),Et(Rn[5],Yn);else if(mn(or,wn),Ut(Nn,wn),"faces"in wn)for(wn=wn.faces,ir=0;6>ir;++ir)Vt(Rn[ir],Nn),Et(Rn[ir],wn[ir]);else for(ir=0;6>ir;++ir)Et(Rn[ir],wn)}else for(wn=0|wn||1,ir=0;6>ir;++ir)st(Rn[ir],wn,wn);for(Vt(Nn,Rn[0]),Nn.mipmask=or.genMipmaps?(Rn[0].width<<1)-1:Rn[0].mipmask,Nn.internalformat=Rn[0].internalformat,Un.width=Rn[0].width,Un.height=Rn[0].height,tn(Nn),ir=0;6>ir;++ir)It(Rn[ir],34069+ir);for(zn(or,34067),nn(),kt.profile&&(Nn.stats.size=E(Nn.internalformat,Nn.type,Un.width,Un.height,or.genMipmaps,!0)),Un.format=Ln[Nn.internalformat],Un.type=lr[Nn.type],Un.mag=Wr[or.magFilter],Un.min=Mn[or.minFilter],Un.wrapS=rr[or.wrapS],Un.wrapT=rr[or.wrapT],ir=0;6>ir;++ir)Kt(Rn[ir]);return Un}var Nn=new pn(34067);pr[Nn.id]=Nn,ot.cubeCount++;var Rn=Array(6);return Un(cn,jn,jt,fn,yn,$n),Un.subimage=function(wn,kn,Tn,Dn,Zn){Tn|=0,Dn|=0,Zn|=0;var Yn=Dt();return Vt(Yn,Nn),Yn.width=0,Yn.height=0,zt(Yn,kn),Yn.width=Yn.width||(Nn.width>>Zn)-Tn,Yn.height=Yn.height||(Nn.height>>Zn)-Dn,tn(Nn),St(Yn,34069+wn,Tn,Dn,Zn),nn(),Le(Yn),Un},Un.resize=function(wn){if((wn|=0)!==Nn.width){Un.width=Nn.width=wn,Un.height=Nn.height=wn,tn(Nn);for(var kn=0;6>kn;++kn)for(var Tn=0;Nn.mipmask>>Tn;++Tn)Ae.texImage2D(34069+kn,Tn,Nn.format,wn>>Tn,wn>>Tn,0,Nn.format,Nn.type,null);return nn(),kt.profile&&(Nn.stats.size=E(Nn.internalformat,Nn.type,Un.width,Un.height,!1,!0)),Un}},Un._reglType="textureCube",Un._texture=Nn,kt.profile&&(Un.stats=Nn.stats),Un.destroy=function(){Nn.decRef()},Un},clear:function(){for(var cn=0;cnfn;++fn)if((jt.mipmask&1<>fn,jt.height>>fn,0,jt.internalformat,jt.type,null);else for(var yn=0;6>yn;++yn)Ae.texImage2D(34069+yn,fn,jt.internalformat,jt.width>>fn,jt.height>>fn,0,jt.internalformat,jt.type,null);zn(jt.texInfo,jt.target)})},refresh:function(){for(var cn=0;cngn;++gn){for(ar=0;arsn;++sn)nn[sn].resize(gn);return tn.width=tn.height=gn,tn},_reglType:"framebufferCube",destroy:function(){nn.forEach(function(sn){sn.destroy()})}})},clear:function(){fe(zn).forEach(Je)},restore:function(){It.cur=null,It.next=null,It.dirty=!0,fe(zn).forEach(function(pn){pn.framebuffer=Ae.createFramebuffer(),st(pn)})}})}function R(){this.w=this.z=this.y=this.x=this.state=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=5126,this.divisor=this.stride=this.offset=0}function z(Ae,De,He,rt,lt,ot,kt){function wt(){this.id=++tt,this.attributes=[],this.elements=null,this.ownsElements=!1,this.offset=this.count=0,this.instances=-1,this.primitive=4;var St=De.oes_vertex_array_object;this.vao=St?St.createVertexArrayOES():null,bt[this.id]=this,this.buffers=[]}var Vt=He.maxAttributes,Ut=Array(Vt);for(He=0;He=mn.byteLength?Zt.subdata(mn):(Zt.destroy(),Le.buffers[It]=null)),Le.buffers[It]||(Zt=Le.buffers[It]=lt.create(Kt,34962,!1,!0)),Ht.buffer=lt.getBuffer(Zt),Ht.size=0|Ht.buffer.dimension,Ht.normalized=!1,Ht.type=Ht.buffer.dtype,Ht.offset=0,Ht.stride=0,Ht.divisor=0,Ht.state=1,Je[It]=1):lt.getBuffer(Kt)?(Ht.buffer=lt.getBuffer(Kt),Ht.size=0|Ht.buffer.dimension,Ht.normalized=!1,Ht.type=Ht.buffer.dtype,Ht.offset=0,Ht.stride=0,Ht.divisor=0,Ht.state=1):lt.getBuffer(Kt.buffer)?(Ht.buffer=lt.getBuffer(Kt.buffer),Ht.size=0|(+Kt.size||Ht.buffer.dimension),Ht.normalized=!!Kt.normalized||!1,Ht.type="type"in Kt?we[Kt.type]:Ht.buffer.dtype,Ht.offset=0|(Kt.offset||0),Ht.stride=0|(Kt.stride||0),Ht.divisor=0|(Kt.divisor||0),Ht.state=1):"x"in Kt&&(Ht.x=+Kt.x||0,Ht.y=+Kt.y||0,Ht.z=+Kt.z||0,Ht.w=+Kt.w||0,Ht.state=2)}for(Zt=0;ZtDt&&(Dt=Le.stats.uniformsCount)}),Dt},He.getMaxAttributesCount=function(){var Dt=0;return zt.forEach(function(Le){Le.stats.attributesCount>Dt&&(Dt=Le.stats.attributesCount)}),Dt}),{clear:function(){var Dt=Ae.deleteShader.bind(Ae);fe(Ut).forEach(Dt),Ut={},fe(tt).forEach(Dt),tt={},zt.forEach(function(Le){Ae.deleteProgram(Le.program)}),zt.length=0,bt={},He.shaderCount=0},program:function(Dt,Le,Je,st){var Et=bt[Le];Et||(Et=bt[Le]={});var It=Et[Dt];if(It&&(It.refCount++,!st))return It;var Zt=new wt(Le,Dt);return He.shaderCount++,Vt(Zt,Je,st),It||(Et[Dt]=Zt),zt.push(Zt),H(Zt,{destroy:function(){if(Zt.refCount--,0>=Zt.refCount){Ae.deleteProgram(Zt.program);var Kt=zt.indexOf(Zt);zt.splice(Kt,1),He.shaderCount--}0>=Et[Zt.vertId].refCount&&(Ae.deleteShader(tt[Zt.vertId]),delete tt[Zt.vertId],delete bt[Zt.fragId][Zt.vertId]),Object.keys(bt[Zt.fragId]).length||(Ae.deleteShader(Ut[Zt.fragId]),delete Ut[Zt.fragId],delete bt[Zt.fragId])}})},restore:function(){Ut={},tt={};for(var Dt=0;Dt>>De|Ae<<32-De}function B(Ae,De){var He=(65535&Ae)+(65535&De);return(Ae>>16)+(De>>16)+(He>>16)<<16|65535&He}function G(Ae){return Array.prototype.slice.call(Ae)}function W(Ae){return G(Ae).join("")}function K(Ae){function De(){var tt=[],bt=[];return H(function(){tt.push.apply(tt,G(arguments))},{def:function(){var zt="v"+lt++;return bt.push(zt),0>>4&15)+"0123456789abcdef".charAt(15&Dt);return Le}(function(St){for(var Dt=Array(St.length>>2),Le=0;Le>5]|=(255&St.charCodeAt(Le/8))<<24-Le%32;var Je,st,Et,It,Zt,Kt,Ht,mn,zn,pn,tn,nn=8*St.length;for(St=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],Le=Array(64),Dt[nn>>5]|=128<<24-nn%32,Dt[15+(nn+64>>9<<4)]=nn,mn=0;mnzn;zn++){var sn;16>zn?Le[zn]=Dt[zn+mn]:(pn=zn,tn=B(tn=N(tn=Le[zn-2],17)^N(tn,19)^tn>>>10,Le[zn-7]),sn=N(sn=Le[zn-15],7)^N(sn,18)^sn>>>3,Le[pn]=B(B(tn,sn),Le[zn-16])),pn=B(B(B(B(Ht,pn=N(pn=It,6)^N(pn,11)^N(pn,25)),It&Zt^~It&Kt),Wt[zn]),Le[zn]),tn=B(Ht=N(Ht=nn,2)^N(Ht,13)^N(Ht,22),nn&Je^nn&st^Je&st),Ht=Kt,Kt=Zt,Zt=It,It=B(Et,pn),Et=st,st=Je,Je=nn,nn=B(pn,tn)}St[0]=B(nn,St[0]),St[1]=B(Je,St[1]),St[2]=B(st,St[2]),St[3]=B(Et,St[3]),St[4]=B(It,St[4]),St[5]=B(Zt,St[5]),St[6]=B(Kt,St[6]),St[7]=B(Ht,St[7])}for(Dt="",Le=0;Le<32*St.length;Le+=8)Dt+=String.fromCharCode(St[Le>>5]>>>24-Le%32&255);return Dt}(function(St){for(var Dt,Le,Je="",st=-1;++st=Dt&&56320<=Le&&57343>=Le&&(Dt=65536+((1023&Dt)<<10)+(1023&Le),st++),127>=Dt?Je+=String.fromCharCode(Dt):2047>=Dt?Je+=String.fromCharCode(192|Dt>>>6&31,128|63&Dt):65535>=Dt?Je+=String.fromCharCode(224|Dt>>>12&15,128|Dt>>>6&63,128|63&Dt):2097151>=Dt&&(Je+=String.fromCharCode(240|Dt>>>18&7,128|Dt>>>12&63,128|Dt>>>6&63,128|63&Dt));return Je}(zt))),rt[bt])?rt[bt].apply(null,kt):(zt=Function.apply(null,ot.concat(zt)),rt&&(rt[bt]=zt),zt.apply(null,kt))}}}function te(Ae){return Array.isArray(Ae)||ge(Ae)||h(Ae)}function Y(Ae){return Ae.sort(function(De,He){return De==="viewport"?-1:He==="viewport"?1:De"+Nr+"?"+Dn+".constant["+Nr+"]:0;"}).join(""),"}}else{","if(",ir,"(",Dn,".buffer)){",wr,"=",Zn,".createStream(",34962,",",Dn,".buffer);","}else{",wr,"=",Zn,".getBuffer(",Dn,".buffer);","}",kr,'="type" in ',Dn,"?",Yn.glTypes,"[",Dn,".type]:",wr,".dtype;",or.normalized,"=!!",Dn,".normalized;"),Tn("size"),Tn("offset"),Tn("stride"),Tn("divisor"),kn("}}"),kn.exit("if(",or.isStream,"){",Zn,".destroyStream(",wr,");","}"),or})}),Un}function zn(jt,fn,yn,$n,Un){function Nn(xr){var wr=wn[xr];wr&&(Tn[xr]=wr)}var Rn=function(xr,wr){if(typeof(kr=xr.static).frag=="string"&&typeof kr.vert=="string"){if(0"u"?"Date.now()":"performance.now()"}function Rn(xr){xr(Tn=fn.def(),"=",Nn(),";"),typeof Un=="string"?xr(Yn,".count+=",Un,";"):xr(Yn,".count++;"),St&&($n?xr(Dn=fn.def(),"=",or,".getNumPendingQueries();"):xr(or,".beginQuery(",Yn,");"))}function wn(xr){xr(Yn,".cpuTime+=",Nn(),"-",Tn,";"),St&&($n?xr(or,".pushScopeStats(",Dn,",",or,".getNumPendingQueries(),",Yn,");"):xr(or,".endQuery();"))}function kn(xr){var wr=fn.def(ir,".profile");fn(ir,".profile=",xr,";"),fn.exit(ir,".profile=",wr,";")}var Tn,Dn,Zn=jt.shared,Yn=jt.stats,ir=Zn.current,or=Zn.timer;if(yn=yn.profile){if(re(yn))return void(yn.enable?(Rn(fn),wn(fn.exit),kn("true")):kn("false"));kn(yn=yn.append(jt,fn))}else yn=fn.def(ir,".profile");Rn(Zn=jt.block()),fn("if(",yn,"){",Zn,"}"),wn(jt=jt.block()),fn.exit("if(",yn,"){",jt,"}")}function In(jt,fn,yn,$n,Un){function Nn(wn,kn,Tn){function Dn(){fn("if(!",or,".buffer){",Yn,".enableVertexAttribArray(",ir,");}");var Dr,Nr=Tn.type;Dr=Tn.size?fn.def(Tn.size,"||",kn):kn,fn("if(",or,".type!==",Nr,"||",or,".size!==",Dr,"||",kr.map(function(ri){return or+"."+ri+"!=="+Tn[ri]}).join("||"),"){",Yn,".bindBuffer(",34962,",",xr,".buffer);",Yn,".vertexAttribPointer(",[ir,Dr,Nr,Tn.normalized,Tn.stride,Tn.offset],");",or,".type=",Nr,";",or,".size=",Dr,";",kr.map(function(ri){return or+"."+ri+"="+Tn[ri]+";"}).join(""),"}"),Mn&&(Nr=Tn.divisor,fn("if(",or,".divisor!==",Nr,"){",jt.instancing,".vertexAttribDivisorANGLE(",[ir,Nr],");",or,".divisor=",Nr,";}"))}function Zn(){fn("if(",or,".buffer){",Yn,".disableVertexAttribArray(",ir,");",or,".buffer=null;","}if(",Jt.map(function(Dr,Nr){return or+"."+Dr+"!=="+wr[Nr]}).join("||"),"){",Yn,".vertexAttrib4f(",ir,",",wr,");",Jt.map(function(Dr,Nr){return or+"."+Dr+"="+wr[Nr]+";"}).join(""),"}")}var Yn=Rn.gl,ir=fn.def(wn,".location"),or=fn.def(Rn.attributes,"[",ir,"]");wn=Tn.state;var xr=Tn.buffer,wr=[Tn.x,Tn.y,Tn.z,Tn.w],kr=["buffer","normalized","offset","stride"];wn===1?Dn():wn===2?Zn():(fn("if(",wn,"===",1,"){"),Dn(),fn("}else{"),Zn(),fn("}"))}var Rn=jt.shared;$n.forEach(function(wn){var kn,Tn=wn.name,Dn=yn.attributes[Tn];if(Dn){if(!Un(Dn))return;kn=Dn.append(jt,fn)}else{if(!Un(Ie))return;var Zn=jt.scopeAttrib(Tn);kn={},Object.keys(new lr).forEach(function(Yn){kn[Yn]=fn.def(Zn,".",Yn)})}Nn(jt.link(wn),function(Yn){switch(Yn){case 35664:case 35667:case 35671:return 2;case 35665:case 35668:case 35672:return 3;case 35666:case 35669:case 35673:return 4;default:return 1}}(wn.info.type),kn)})}function Hn(jt,fn,yn,$n,Un,Nn){for(var Rn,wn=jt.shared,kn=wn.gl,Tn=0;Tn<$n.length;++Tn){var Dn,Zn=(or=$n[Tn]).name,Yn=or.info.type,ir=yn.uniforms[Zn],or=jt.link(or)+".location";if(ir){if(!Un(ir))continue;if(re(ir)){if(Zn=ir.value,Yn===35678||Yn===35680)fn(kn,".uniform1i(",or,",",(Yn=jt.link(Zn._texture||Zn.color[0]._texture))+".bind());"),fn.exit(Yn,".unbind();");else if(Yn===35674||Yn===35675||Yn===35676)ir=2,Yn===35675?ir=3:Yn===35676&&(ir=4),fn(kn,".uniformMatrix",ir,"fv(",or,",false,",Zn=jt.global.def("new Float32Array(["+Array.prototype.slice.call(Zn)+"])"),");");else{switch(Yn){case 5126:Rn="1f";break;case 35664:Rn="2f";break;case 35665:Rn="3f";break;case 35666:Rn="4f";break;case 35670:case 5124:Rn="1i";break;case 35671:case 35667:Rn="2i";break;case 35672:case 35668:Rn="3i";break;case 35673:Rn="4i";break;case 35669:Rn="4i"}fn(kn,".uniform",Rn,"(",or,",",k(Zn)?Array.prototype.slice.call(Zn):Zn,");")}continue}Dn=ir.append(jt,fn)}else{if(!Un(Ie))continue;Dn=fn.def(wn.uniforms,"[",De.id(Zn),"]")}switch(Yn===35678?fn("if(",Dn,"&&",Dn,'._reglType==="framebuffer"){',Dn,"=",Dn,".color[0];","}"):Yn===35680&&fn("if(",Dn,"&&",Dn,'._reglType==="framebufferCube"){',Dn,"=",Dn,".color[0];","}"),Zn=1,Yn){case 35678:case 35680:Yn=fn.def(Dn,"._texture"),fn(kn,".uniform1i(",or,",",Yn,".bind());"),fn.exit(Yn,".unbind();");continue;case 5124:case 35670:Rn="1i";break;case 35667:case 35671:Rn="2i",Zn=2;break;case 35668:case 35672:Rn="3i",Zn=3;break;case 35669:case 35673:Rn="4i",Zn=4;break;case 5126:Rn="1f";break;case 35664:Rn="2f",Zn=2;break;case 35665:Rn="3f",Zn=3;break;case 35666:Rn="4f",Zn=4;break;case 35674:Rn="Matrix2fv";break;case 35675:Rn="Matrix3fv";break;case 35676:Rn="Matrix4fv"}if(Rn.charAt(0)==="M"){fn(kn,".uniform",Rn,"(",or,","),or=Math.pow(Yn-35674+2,2);var xr=jt.global.def("new Float32Array(",or,")");Array.isArray(Dn)?fn("false,(",s(or,function(kr){return xr+"["+kr+"]="+Dn[kr]}),",",xr,")"):fn("false,(Array.isArray(",Dn,")||",Dn," instanceof Float32Array)?",Dn,":(",s(or,function(kr){return xr+"["+kr+"]="+Dn+"["+kr+"]"}),",",xr,")"),fn(");")}else{if(1>1)",wn],");")}function ri(){yn(kn,".drawArraysInstancedANGLE(",[or,xr,wr,wn],");")}ir&&ir!=="null"?Dr?Nr():(yn("if(",ir,"){"),Nr(),yn("}else{"),ri(),yn("}")):ri()}function Rn(){function Nr(){yn(Dn+".drawElements("+[or,wr,kr,xr+"<<(("+kr+"-5121)>>1)"]+");")}function ri(){yn(Dn+".drawArrays("+[or,xr,wr]+");")}ir&&ir!=="null"?Dr?Nr():(yn("if(",ir,"){"),Nr(),yn("}else{"),ri(),yn("}")):ri()}var wn,kn,Tn=jt.shared,Dn=Tn.gl,Zn=Tn.draw,Yn=$n.draw,ir=function(){var Nr=Yn.elements,ri=fn;return Nr?((Nr.contextDep&&$n.contextDynamic||Nr.propDep)&&(ri=yn),Nr=Nr.append(jt,ri),Yn.elementsActive&&ri("if("+Nr+")"+Dn+".bindBuffer(34963,"+Nr+".buffer.buffer);")):(Nr=ri.def(),ri(Nr,"=",Zn,".","elements",";","if(",Nr,"){",Dn,".bindBuffer(",34963,",",Nr,".buffer.buffer);}","else if(",Tn.vao,".currentVAO){",Nr,"=",jt.shared.elements+".getElements("+Tn.vao,".currentVAO.elements);",nr?"":"if("+Nr+")"+Dn+".bindBuffer(34963,"+Nr+".buffer.buffer);","}")),Nr}(),or=Un("primitive"),xr=Un("offset"),wr=function(){var Nr=Yn.count,ri=fn;return Nr?((Nr.contextDep&&$n.contextDynamic||Nr.propDep)&&(ri=yn),Nr=Nr.append(jt,ri)):Nr=ri.def(Zn,".","count"),Nr}();if(typeof wr=="number"){if(wr===0)return}else yn("if(",wr,"){"),yn.exit("}");Mn&&(wn=Un("instances"),kn=jt.instancing);var kr=ir+".type",Dr=Yn.elements&&re(Yn.elements)&&!Yn.vaoActive;Mn&&(typeof wn!="number"||0<=wn)?typeof wn=="string"?(yn("if(",wn,">0){"),Nn(),yn("}else if(",wn,"<0){"),Rn(),yn("}")):Nn():Rn()}function ar(jt,fn,yn,$n,Un){return Un=(fn=It()).proc("body",Un),Mn&&(fn.instancing=Un.def(fn.shared.extensions,".angle_instanced_arrays")),jt(fn,Un,yn,$n),fn.compile().body}function Or(jt,fn,yn,$n){gn(jt,fn),yn.useVAO?yn.drawVAO?fn(jt.shared.vao,".setVAO(",yn.drawVAO.append(jt,fn),");"):fn(jt.shared.vao,".setVAO(",jt.shared.vao,".targetVAO);"):(fn(jt.shared.vao,".setVAO(null);"),In(jt,fn,yn,$n.attributes,function(){return!0})),Hn(jt,fn,yn,$n.uniforms,function(){return!0},!1),Wn(jt,fn,fn,yn)}function vr(jt,fn,yn,$n){function Un(){return!0}jt.batchId="a1",gn(jt,fn),In(jt,fn,yn,$n.attributes,Un),Hn(jt,fn,yn,$n.uniforms,Un,!1),Wn(jt,fn,fn,yn)}function Er(jt,fn,yn,$n){function Un(Zn){return Zn.contextDep&&Rn||Zn.propDep}function Nn(Zn){return!Un(Zn)}gn(jt,fn);var Rn=yn.contextDep,wn=fn.def(),kn=fn.def();jt.shared.props=kn,jt.batchId=wn;var Tn=jt.scope(),Dn=jt.scope();fn(Tn.entry,"for(",wn,"=0;",wn,"<","a1",";++",wn,"){",kn,"=","a0","[",wn,"];",Dn,"}",Tn.exit),yn.needsContext&&pn(jt,Dn,yn.context),yn.needsFramebuffer&&tn(jt,Dn,yn.framebuffer),sn(jt,Dn,yn.state,Un),yn.profile&&Un(yn.profile)&&bn(jt,Dn,yn,!1,!0),$n?(yn.useVAO?yn.drawVAO?Un(yn.drawVAO)?Dn(jt.shared.vao,".setVAO(",yn.drawVAO.append(jt,Dn),");"):Tn(jt.shared.vao,".setVAO(",yn.drawVAO.append(jt,Tn),");"):Tn(jt.shared.vao,".setVAO(",jt.shared.vao,".targetVAO);"):(Tn(jt.shared.vao,".setVAO(null);"),In(jt,Tn,yn,$n.attributes,Nn),In(jt,Dn,yn,$n.attributes,Un)),Hn(jt,Tn,yn,$n.uniforms,Nn,!1),Hn(jt,Dn,yn,$n.uniforms,Un,!0),Wn(jt,Tn,Dn,yn)):(fn=jt.global.def("{}"),$n=yn.shader.progVar.append(jt,Dn),kn=Dn.def($n,".id"),Tn=Dn.def(fn,"[",kn,"]"),Dn(jt.shared.gl,".useProgram(",$n,".program);","if(!",Tn,"){",Tn,"=",fn,"[",kn,"]=",jt.link(function(Zn){return ar(vr,jt,yn,Zn,2)}),"(",$n,");}",Tn,".call(this,a0[",wn,"],",wn,");"))}function Kn(jt,fn){function yn(wn){var kn=fn.shader[wn];kn&&(kn=kn.append(jt,$n),isNaN(kn)?$n.set(Un.shader,"."+wn,kn):$n.set(Un.shader,"."+wn,jt.link(kn,{stable:!0})))}var $n=jt.proc("scope",3);jt.batchId="a2";var Un=jt.shared,Nn=Un.current;if(pn(jt,$n,fn.context),fn.framebuffer&&fn.framebuffer.append(jt,$n),Y(Object.keys(fn.state)).forEach(function(wn){var kn=fn.state[wn],Tn=kn.append(jt,$n);k(Tn)?Tn.forEach(function(Dn,Zn){isNaN(Dn)?$n.set(jt.next[wn],"["+Zn+"]",Dn):$n.set(jt.next[wn],"["+Zn+"]",jt.link(Dn,{stable:!0}))}):re(kn)?$n.set(Un.next,"."+wn,jt.link(Tn,{stable:!0})):$n.set(Un.next,"."+wn,Tn)}),bn(jt,$n,fn,!0,!0),["elements","offset","count","instances","primitive"].forEach(function(wn){var kn=fn.draw[wn];kn&&(kn=kn.append(jt,$n),isNaN(kn)?$n.set(Un.draw,"."+wn,kn):$n.set(Un.draw,"."+wn,jt.link(kn),{stable:!0}))}),Object.keys(fn.uniforms).forEach(function(wn){var kn=fn.uniforms[wn].append(jt,$n);Array.isArray(kn)&&(kn="["+kn.map(function(Tn){return isNaN(Tn)?Tn:jt.link(Tn,{stable:!0})})+"]"),$n.set(Un.uniforms,"["+jt.link(De.id(wn),{stable:!0})+"]",kn)}),Object.keys(fn.attributes).forEach(function(wn){var kn=fn.attributes[wn].append(jt,$n),Tn=jt.scopeAttrib(wn);Object.keys(new lr).forEach(function(Dn){$n.set(Tn,"."+Dn,kn[Dn])})}),fn.scopeVAO){var Rn=fn.scopeVAO.append(jt,$n);isNaN(Rn)?$n.set(Un.vao,".targetVAO",Rn):$n.set(Un.vao,".targetVAO",jt.link(Rn,{stable:!0}))}yn("vert"),yn("frag"),0=--this.refCount&&kt(this)},lt.profile&&(rt.getTotalRenderbufferSize=function(){var bt=0;return Object.keys(tt).forEach(function(zt){bt+=tt[zt].stats.size}),bt}),{create:function(bt,zt){function St(Le,Je){var st=0,Et=0,It=32854;if(typeof Le=="object"&&Le?("shape"in Le?(st=0|(Et=Le.shape)[0],Et=0|Et[1]):("radius"in Le&&(st=Et=0|Le.radius),"width"in Le&&(st=0|Le.width),"height"in Le&&(Et=0|Le.height)),"format"in Le&&(It=wt[Le.format])):typeof Le=="number"?(st=0|Le,Et=typeof Je=="number"?0|Je:st):Le||(st=Et=1),st!==Dt.width||Et!==Dt.height||It!==Dt.format)return St.width=Dt.width=st,St.height=Dt.height=Et,Dt.format=It,Ae.bindRenderbuffer(36161,Dt.renderbuffer),Ae.renderbufferStorage(36161,It,st,Et),lt.profile&&(Dt.stats.size=At[Dt.format]*Dt.width*Dt.height),St.format=Vt[Dt.format],St}var Dt=new ot(Ae.createRenderbuffer());return tt[Dt.id]=Dt,rt.renderbufferCount++,St(bt,zt),St.resize=function(Le,Je){var st=0|Le,Et=0|Je||st;return st===Dt.width&&Et===Dt.height||(St.width=Dt.width=st,St.height=Dt.height=Et,Ae.bindRenderbuffer(36161,Dt.renderbuffer),Ae.renderbufferStorage(36161,Dt.format,st,Et),lt.profile&&(Dt.stats.size=At[Dt.format]*Dt.width*Dt.height)),St},St._reglType="renderbuffer",St._renderbuffer=Dt,lt.profile&&(St.stats=Dt.stats),St.destroy=function(){Dt.decRef()},St},clear:function(){fe(tt).forEach(kt)},restore:function(){fe(tt).forEach(function(bt){bt.renderbuffer=Ae.createRenderbuffer(),Ae.bindRenderbuffer(36161,bt.renderbuffer),Ae.renderbufferStorage(36161,bt.format,bt.width,bt.height)}),Ae.bindRenderbuffer(36161,null)}}},et=[];et[6408]=4,et[6407]=3;var Ot=[];Ot[5121]=1,Ot[5126]=4,Ot[36193]=2;var Wt=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],Jt=["x","y","z","w"],Be="blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset".split(" "),Ge={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Tt={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},dt={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Pe={cw:2304,ccw:2305},Ie=new Z(!1,!1,!1,function(){});return function(Ae){function De(){if(vr.length===0)Zt&&Zt.update(),lr=null;else{lr=ie.next(De),tt();for(var Mn=vr.length-1;0<=Mn;--Mn){var rr=vr[Mn];rr&&rr(zn,null,0)}St.flush(),Zt&&Zt.update()}}function He(){!lr&&0=vr.length&&rt()}}}}function Ut(){var Mn=ar.viewport,rr=ar.scissor_box;Mn[0]=Mn[1]=rr[0]=rr[1]=0,zn.viewportWidth=zn.framebufferWidth=zn.drawingBufferWidth=Mn[2]=rr[2]=St.drawingBufferWidth,zn.viewportHeight=zn.framebufferHeight=zn.drawingBufferHeight=Mn[3]=rr[3]=St.drawingBufferHeight}function tt(){zn.tick+=1,zn.time=zt(),Ut(),Wn.procs.poll()}function bt(){bn.refresh(),Ut(),Wn.procs.refresh(),Zt&&Zt.update()}function zt(){return(ae()-Kt)/1e3}if(!(Ae=i(Ae)))return null;var St=Ae.gl,Dt=St.getContextAttributes();St.isContextLost();var Le=function(Mn,rr){function nr(pr){var qr;pr=pr.toLowerCase();try{qr=Bn[pr]=Mn.getExtension(pr)}catch{}return!!qr}for(var Bn={},Fr=0;Frrr;++rr)Wr(H({framebuffer:Mn.framebuffer.faces[rr]},Mn),wt);else Wr(Mn,wt);else wt(0,Mn)},prop:ee.define.bind(null,1),context:ee.define.bind(null,2),this:ee.define.bind(null,3),draw:kt({}),buffer:function(Mn){return tn.create(Mn,34962,!1,!1)},elements:function(Mn){return nn.create(Mn,!1)},texture:bn.create2D,cube:bn.createCube,renderbuffer:In.create,framebuffer:Hn.create,framebufferCube:Hn.createCube,vao:sn.createVAO,attributes:Dt,frame:Vt,on:function(Mn,rr){var nr;switch(Mn){case"frame":return Vt(rr);case"lost":nr=Er;break;case"restore":nr=Kn;break;case"destroy":nr=Ln}return nr.push(rr),{cancel:function(){for(var Bn=0;Bn2?"one of ".concat(i," ").concat(c.slice(0,s-1).join(", "),", or ")+c[s-1]:s===2?"one of ".concat(i," ").concat(c[0]," or ").concat(c[1]):"of ".concat(i," ").concat(c[0])}return"of ".concat(i," ").concat(String(c))}a("ERR_INVALID_OPT_VALUE",function(c,i){return'The value "'+i+'" is invalid for option "'+c+'"'},TypeError),a("ERR_INVALID_ARG_TYPE",function(c,i,s){var l,d,h;if(typeof i=="string"&&(d="not ",i.substr(0,d.length)===d)?(l="must not be",i=i.replace(/^not /,"")):l="must be",function(g,p,v){return(v===void 0||v>g.length)&&(v=g.length),g.substring(v-p.length,v)===p}(c," argument"))h="The ".concat(c," ").concat(l," ").concat(u(i,"type"));else{var m=function(g,p,v){return typeof v!="number"&&(v=0),!(v+p.length>g.length)&&g.indexOf(p,v)!==-1}(c,".")?"property":"argument";h='The "'.concat(c,'" ').concat(m," ").concat(l," ").concat(u(i,"type"))}return h+=". Received type ".concat(typeof s)},TypeError),a("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),a("ERR_METHOD_NOT_IMPLEMENTED",function(c){return"The "+c+" method is not implemented"}),a("ERR_STREAM_PREMATURE_CLOSE","Premature close"),a("ERR_STREAM_DESTROYED",function(c){return"Cannot call "+c+" after a stream was destroyed"}),a("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),a("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),a("ERR_STREAM_WRITE_AFTER_END","write after end"),a("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),a("ERR_UNKNOWN_ENCODING",function(c){return"Unknown encoding: "+c},TypeError),a("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),o.exports.codes=r},{}],287:[function(e,o,f){(function(r){(function(){var a=Object.keys||function(g){var p=[];for(var v in g)p.push(v);return p};o.exports=d;var u=e("./_stream_readable"),c=e("./_stream_writable");e("inherits")(d,u);for(var i=a(c.prototype),s=0;s0)if(typeof q=="string"||ee.objectMode||Object.getPrototypeOf(q)===s.prototype||(q=function(ie){return s.from(ie)}(q)),ne)ee.endEmitted?M(U,new _):O(U,ee,q,!0);else if(ee.ended)M(U,new b);else{if(ee.destroyed)return!1;ee.reading=!1,ee.decoder&&!$?(q=ee.decoder.write(q),ee.objectMode||q.length!==0?O(U,ee,q,!1):P(U,ee)):O(U,ee,q,!1)}else ne||(ee.reading=!1,P(U,ee));return!ee.ended&&(ee.lengthq.highWaterMark&&(q.highWaterMark=function($){return $>=1073741824?$=1073741824:($--,$|=$>>>1,$|=$>>>2,$|=$>>>4,$|=$>>>8,$|=$>>>16,$++),$}(U)),U<=q.length?U:q.ended?q.length:(q.needReadable=!0,0))}function z(U){var q=U._readableState;d("emitReadable",q.needReadable,q.emittedReadable),q.needReadable=!1,q.emittedReadable||(d("emitReadable",q.flowing),q.emittedReadable=!0,r.nextTick(L,U))}function L(U){var q=U._readableState;d("emitReadable_",q.destroyed,q.length,q.ended),q.destroyed||!q.length&&!q.ended||(U.emit("readable"),q.emittedReadable=!1),q.needReadable=!q.flowing&&!q.ended&&q.length<=q.highWaterMark,K(U)}function P(U,q){q.readingMore||(q.readingMore=!0,r.nextTick(N,U,q))}function N(U,q){for(;!q.reading&&!q.ended&&(q.length0,q.resumeScheduled&&!q.paused?q.flowing=!0:U.listenerCount("data")>0&&U.resume()}function G(U){d("readable nexttick read 0"),U.read(0)}function W(U,q){d("resume",q.reading),q.reading||U.read(0),q.resumeScheduled=!1,U.emit("resume"),K(U),q.flowing&&!q.reading&&U.read(0)}function K(U){var q=U._readableState;for(d("flow",q.flowing);q.flowing&&U.read()!==null;);}function te(U,q){return q.length===0?null:(q.objectMode?$=q.buffer.shift():!U||U>=q.length?($=q.decoder?q.buffer.join(""):q.buffer.length===1?q.buffer.first():q.buffer.concat(q.length),q.buffer.clear()):$=q.buffer.consume(U,q.decoder),$);var $}function Y(U){var q=U._readableState;d("endReadable",q.endEmitted),q.endEmitted||(q.ended=!0,r.nextTick(Z,q,U))}function Z(U,q){if(d("endReadableNT",U.endEmitted,U.length),!U.endEmitted&&U.length===0&&(U.endEmitted=!0,q.readable=!1,q.emit("end"),U.autoDestroy)){var $=q._writableState;(!$||$.autoDestroy&&$.finished)&&q.destroy()}}function re(U,q){for(var $=0,ne=U.length;$=q.highWaterMark:q.length>0)||q.ended))return d("read: emitReadable",q.length,q.ended),q.length===0&&q.ended?Y(this):z(this),null;if((U=R(U,q))===0&&q.ended)return q.length===0&&Y(this),null;var ne,H=q.needReadable;return d("need readable",H),(q.length===0||q.length-U0?te(U,q):null)===null?(q.needReadable=q.length<=q.highWaterMark,U=0):(q.length-=U,q.awaitDrain=0),q.length===0&&(q.ended||(q.needReadable=!0),$!==U&&q.ended&&Y(this)),ne!==null&&this.emit("data",ne),ne},E.prototype._read=function(U){M(this,new T("_read()"))},E.prototype.pipe=function(U,q){var $=this,ne=this._readableState;switch(ne.pipesCount){case 0:ne.pipes=U;break;case 1:ne.pipes=[ne.pipes,U];break;default:ne.pipes.push(U)}ne.pipesCount+=1,d("pipe count=%d opts=%j",ne.pipesCount,q);var H=(!q||q.end!==!1)&&U!==r.stdout&&U!==r.stderr?ee:me;function Q(_e,we){d("onunpipe"),_e===$&&we&&we.hasUnpiped===!1&&(we.hasUnpiped=!0,d("cleanup"),U.removeListener("close",ge),U.removeListener("finish",fe),U.removeListener("drain",ie),U.removeListener("error",le),U.removeListener("unpipe",Q),$.removeListener("end",ee),$.removeListener("end",me),$.removeListener("data",ue),ae=!0,!ne.awaitDrain||U._writableState&&!U._writableState.needDrain||ie())}function ee(){d("onend"),U.end()}ne.endEmitted?r.nextTick(H):$.once("end",H),U.on("unpipe",Q);var ie=function(_e){return function(){var we=_e._readableState;d("pipeOnDrain",we.awaitDrain),we.awaitDrain&&we.awaitDrain--,we.awaitDrain===0&&c(_e,"data")&&(we.flowing=!0,K(_e))}}($);U.on("drain",ie);var ae=!1;function ue(_e){d("ondata");var we=U.write(_e);d("dest.write",we),we===!1&&((ne.pipesCount===1&&ne.pipes===U||ne.pipesCount>1&&re(ne.pipes,U)!==-1)&&!ae&&(d("false write response, pause",ne.awaitDrain),ne.awaitDrain++),$.pause())}function le(_e){d("onerror",_e),me(),U.removeListener("error",le),c(U,"error")===0&&M(U,_e)}function ge(){U.removeListener("finish",fe),me()}function fe(){d("onfinish"),U.removeListener("close",ge),me()}function me(){d("unpipe"),$.unpipe(U)}return $.on("data",ue),function(_e,we,Te){if(typeof _e.prependListener=="function")return _e.prependListener(we,Te);_e._events&&_e._events[we]?Array.isArray(_e._events[we])?_e._events[we].unshift(Te):_e._events[we]=[Te,_e._events[we]]:_e.on(we,Te)}(U,"error",le),U.once("close",ge),U.once("finish",fe),U.emit("pipe",$),ne.flowing||(d("pipe resume"),$.resume()),U},E.prototype.unpipe=function(U){var q=this._readableState,$={hasUnpiped:!1};if(q.pipesCount===0)return this;if(q.pipesCount===1)return U&&U!==q.pipes||(U||(U=q.pipes),q.pipes=null,q.pipesCount=0,q.flowing=!1,U&&U.emit("unpipe",this,$)),this;if(!U){var ne=q.pipes,H=q.pipesCount;q.pipes=null,q.pipesCount=0,q.flowing=!1;for(var Q=0;Q0,ne.flowing!==!1&&this.resume()):U==="readable"&&(ne.endEmitted||ne.readableListening||(ne.readableListening=ne.needReadable=!0,ne.flowing=!1,ne.emittedReadable=!1,d("on readable",ne.length,ne.reading),ne.length?z(this):ne.reading||r.nextTick(G,this))),$},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(U,q){var $=i.prototype.removeListener.call(this,U,q);return U==="readable"&&r.nextTick(B,this),$},E.prototype.removeAllListeners=function(U){var q=i.prototype.removeAllListeners.apply(this,arguments);return U!=="readable"&&U!==void 0||r.nextTick(B,this),q},E.prototype.resume=function(){var U=this._readableState;return U.flowing||(d("resume"),U.flowing=!U.readableListening,function(q,$){$.resumeScheduled||($.resumeScheduled=!0,r.nextTick(W,q,$))}(this,U)),U.paused=!1,this},E.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},E.prototype.wrap=function(U){var q=this,$=this._readableState,ne=!1;for(var H in U.on("end",function(){if(d("wrapped end"),$.decoder&&!$.ended){var ee=$.decoder.end();ee&&ee.length&&q.push(ee)}q.push(null)}),U.on("data",function(ee){d("wrapped data"),$.decoder&&(ee=$.decoder.write(ee)),$.objectMode&&ee==null||($.objectMode||ee&&ee.length)&&(q.push(ee)||(ne=!0,U.pause()))}),U)this[H]===void 0&&typeof U[H]=="function"&&(this[H]=function(ee){return function(){return U[ee].apply(U,arguments)}}(H));for(var Q=0;Q-1))throw new _(N);return this._writableState.defaultEncoding=N,this},Object.defineProperty(E.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(E.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),E.prototype._write=function(N,B,G){G(new y("_write()"))},E.prototype._writev=null,E.prototype.end=function(N,B,G){var W=this._writableState;return typeof N=="function"?(G=N,N=null,B=null):typeof B=="function"&&(G=B,B=null),N!=null&&this.write(N,B),W.corked&&(W.corked=1,this.uncork()),W.ending||function(K,te,Y){te.ending=!0,P(K,te),Y&&(te.finished?r.nextTick(Y):K.once("finish",Y)),te.ended=!0,K.writable=!1}(this,W,G),this},Object.defineProperty(E.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(N){this._writableState&&(this._writableState.destroyed=N)}}),E.prototype.destroy=m.destroy,E.prototype._undestroy=m.undestroy,E.prototype._destroy=function(N,B){B(N)}}).call(this)}).call(this,e("_process"),typeof Ro<"u"?Ro:typeof self<"u"?self:typeof window<"u"?window:{})},{"../errors":286,"./_stream_duplex":287,"./internal/streams/destroy":294,"./internal/streams/state":298,"./internal/streams/stream":299,_process:277,buffer:85,inherits:231,"util-deprecate":330}],292:[function(e,o,f){(function(r){(function(){var a;function u(k,b,T){return b in k?Object.defineProperty(k,b,{value:T,enumerable:!0,configurable:!0,writable:!0}):k[b]=T,k}var c=e("./end-of-stream"),i=Symbol("lastResolve"),s=Symbol("lastReject"),l=Symbol("error"),d=Symbol("ended"),h=Symbol("lastPromise"),m=Symbol("handlePromise"),g=Symbol("stream");function p(k,b){return{value:k,done:b}}function v(k){var b=k[i];if(b!==null){var T=k[g].read();T!==null&&(k[h]=null,k[i]=null,k[s]=null,b(p(T,!1)))}}function y(k){r.nextTick(v,k)}var x=Object.getPrototypeOf(function(){}),w=Object.setPrototypeOf((u(a={get stream(){return this[g]},next:function(){var k=this,b=this[l];if(b!==null)return Promise.reject(b);if(this[d])return Promise.resolve(p(void 0,!0));if(this[g].destroyed)return new Promise(function(A,S){r.nextTick(function(){k[l]?S(k[l]):A(p(void 0,!0))})});var T,_=this[h];if(_)T=new Promise(function(A,S){return function(E,D){A.then(function(){S[d]?E(p(void 0,!0)):S[m](E,D)},D)}}(_,this));else{var M=this[g].read();if(M!==null)return Promise.resolve(p(M,!1));T=new Promise(this[m])}return this[h]=T,T}},Symbol.asyncIterator,function(){return this}),u(a,"return",function(){var k=this;return new Promise(function(b,T){k[g].destroy(null,function(_){_?T(_):b(p(void 0,!0))})})}),a),x);o.exports=function(k){var b,T=Object.create(w,(u(b={},g,{value:k,writable:!0}),u(b,i,{value:null,writable:!0}),u(b,s,{value:null,writable:!0}),u(b,l,{value:null,writable:!0}),u(b,d,{value:k._readableState.endEmitted,writable:!0}),u(b,m,{value:function(_,M){var A=T[g].read();A?(T[h]=null,T[i]=null,T[s]=null,_(p(A,!1))):(T[i]=_,T[s]=M)},writable:!0}),b));return T[h]=null,c(k,function(_){if(_&&_.code!=="ERR_STREAM_PREMATURE_CLOSE"){var M=T[s];return M!==null&&(T[h]=null,T[i]=null,T[s]=null,M(_)),void(T[l]=_)}var A=T[i];A!==null&&(T[h]=null,T[i]=null,T[s]=null,A(p(void 0,!0))),T[d]=!0}),k.on("readable",y.bind(null,T)),T}}).call(this)}).call(this,e("_process"))},{"./end-of-stream":295,_process:277}],293:[function(e,o,f){function r(l,d){var h=Object.keys(l);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(l);d&&(m=m.filter(function(g){return Object.getOwnPropertyDescriptor(l,g).enumerable})),h.push.apply(h,m)}return h}function a(l,d,h){return d in l?Object.defineProperty(l,d,{value:h,enumerable:!0,configurable:!0,writable:!0}):l[d]=h,l}function u(l,d){for(var h=0;h0?this.tail.next=g:this.head=g,this.tail=g,++this.length}},{key:"unshift",value:function(m){var g={data:m,next:this.head};this.length===0&&(this.tail=g),this.head=g,++this.length}},{key:"shift",value:function(){if(this.length!==0){var m=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,m}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(m){if(this.length===0)return"";for(var g=this.head,p=""+g.data;g=g.next;)p+=m+g.data;return p}},{key:"concat",value:function(m){if(this.length===0)return c.alloc(0);for(var g,p,v,y=c.allocUnsafe(m>>>0),x=this.head,w=0;x;)g=x.data,p=y,v=w,c.prototype.copy.call(g,p,v),w+=x.data.length,x=x.next;return y}},{key:"consume",value:function(m,g){var p;return my.length?y.length:m;if(x===y.length?v+=y:v+=y.slice(0,m),(m-=x)==0){x===y.length?(++p,g.next?this.head=g.next:this.head=this.tail=null):(this.head=g,g.data=y.slice(x));break}++p}return this.length-=p,v}},{key:"_getBuffer",value:function(m){var g=c.allocUnsafe(m),p=this.head,v=1;for(p.data.copy(g),m-=p.data.length;p=p.next;){var y=p.data,x=m>y.length?y.length:m;if(y.copy(g,g.length-m,0,x),(m-=x)==0){x===y.length?(++v,p.next?this.head=p.next:this.head=this.tail=null):(this.head=p,p.data=y.slice(x));break}++v}return this.length-=v,g}},{key:s,value:function(m,g){return i(this,function(p){for(var v=1;v0,function(T){v||(v=T),T&&x.forEach(l),b||(x.forEach(l),y(v))})});return g.reduce(d)}},{"../../../errors":286,"./end-of-stream":295}],298:[function(e,o,f){var r=e("../../../errors").codes.ERR_INVALID_OPT_VALUE;o.exports={getHighWaterMark:function(a,u,c,i){var s=function(l,d,h){return l.highWaterMark!=null?l.highWaterMark:d?l[h]:null}(u,i,c);if(s!=null){if(!isFinite(s)||Math.floor(s)!==s||s<0)throw new r(i?c:"highWaterMark",s);return Math.floor(s)}return a.objectMode?16:16384}}},{"../../../errors":286}],299:[function(e,o,f){o.exports=e("events").EventEmitter},{events:84}],300:[function(e,o,f){var r=e("safe-buffer").Buffer,a=r.isEncoding||function(p){switch((p=""+p)&&p.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function u(p){var v;switch(this.encoding=function(y){var x=function(w){if(!w)return"utf8";for(var k;;)switch(w){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return w;default:if(k)return;w=(""+w).toLowerCase(),k=!0}}(y);if(typeof x!="string"&&(r.isEncoding===a||!a(y)))throw new Error("Unknown encoding: "+y);return x||y}(p),this.encoding){case"utf16le":this.text=s,this.end=l,v=4;break;case"utf8":this.fillLast=i,v=4;break;case"base64":this.text=d,this.end=h,v=3;break;default:return this.write=m,void(this.end=g)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(v)}function c(p){return p<=127?0:p>>5==6?2:p>>4==14?3:p>>3==30?4:p>>6==2?-1:-2}function i(p){var v=this.lastTotal-this.lastNeed,y=function(x,w,k){if((192&w[0])!=128)return x.lastNeed=0,"\uFFFD";if(x.lastNeed>1&&w.length>1){if((192&w[1])!=128)return x.lastNeed=1,"\uFFFD";if(x.lastNeed>2&&w.length>2&&(192&w[2])!=128)return x.lastNeed=2,"\uFFFD"}}(this,p);return y!==void 0?y:this.lastNeed<=p.length?(p.copy(this.lastChar,v,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(p.copy(this.lastChar,v,0,p.length),void(this.lastNeed-=p.length))}function s(p,v){if((p.length-v)%2==0){var y=p.toString("utf16le",v);if(y){var x=y.charCodeAt(y.length-1);if(x>=55296&&x<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=p[p.length-2],this.lastChar[1]=p[p.length-1],y.slice(0,-1)}return y}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=p[p.length-1],p.toString("utf16le",v,p.length-1)}function l(p){var v=p&&p.length?this.write(p):"";if(this.lastNeed){var y=this.lastTotal-this.lastNeed;return v+this.lastChar.toString("utf16le",0,y)}return v}function d(p,v){var y=(p.length-v)%3;return y===0?p.toString("base64",v):(this.lastNeed=3-y,this.lastTotal=3,y===1?this.lastChar[0]=p[p.length-1]:(this.lastChar[0]=p[p.length-2],this.lastChar[1]=p[p.length-1]),p.toString("base64",v,p.length-y))}function h(p){var v=p&&p.length?this.write(p):"";return this.lastNeed?v+this.lastChar.toString("base64",0,3-this.lastNeed):v}function m(p){return p.toString(this.encoding)}function g(p){return p&&p.length?this.write(p):""}f.StringDecoder=u,u.prototype.write=function(p){if(p.length===0)return"";var v,y;if(this.lastNeed){if((v=this.fillLast(p))===void 0)return"";y=this.lastNeed,this.lastNeed=0}else y=0;return y=0?(_>0&&(w.lastNeed=_-1),_):--T=0?(_>0&&(w.lastNeed=_-2),_):--T=0?(_>0&&(_===2?_=0:w.lastNeed=_-3),_):0}(this,p,v);if(!this.lastNeed)return p.toString("utf8",v);this.lastTotal=y;var x=p.length-(y-this.lastNeed);return p.copy(this.lastChar,0,x),p.toString("utf8",v,x)},u.prototype.fillLast=function(p){if(this.lastNeed<=p.length)return p.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);p.copy(this.lastChar,this.lastTotal-this.lastNeed,0,p.length),this.lastNeed-=p.length}},{"safe-buffer":284}],301:[function(e,o,f){(function(r,a){(function(){var u=e("assert"),c=e("debug")("stream-parser");o.exports=function(y){var x=y&&typeof y._transform=="function",w=y&&typeof y._write=="function";if(!x&&!w)throw new Error("must pass a Writable or Transform stream in");c("extending Parser into stream"),y._bytes=s,y._skipBytes=l,x&&(y._passthrough=d),x?y._transform=m:y._write=h};function i(y){c("initializing parser stream"),y._parserBytesLeft=0,y._parserBuffers=[],y._parserBuffered=0,y._parserState=-1,y._parserCallback=null,typeof y.push=="function"&&(y._parserOutput=y.push.bind(y)),y._parserInit=!0}function s(y,x){u(!this._parserCallback,'there is already a "callback" set!'),u(isFinite(y)&&y>0,'can only buffer a finite number of bytes > 0, got "'+y+'"'),this._parserInit||i(this),c("buffering %o bytes",y),this._parserBytesLeft=y,this._parserCallback=x,this._parserState=0}function l(y,x){u(!this._parserCallback,'there is already a "callback" set!'),u(y>0,'can only skip > 0 bytes, got "'+y+'"'),this._parserInit||i(this),c("skipping %o bytes",y),this._parserBytesLeft=y,this._parserCallback=x,this._parserState=1}function d(y,x){u(!this._parserCallback,'There is already a "callback" set!'),u(y>0,'can only pass through > 0 bytes, got "'+y+'"'),this._parserInit||i(this),c("passing through %o bytes",y),this._parserBytesLeft=y,this._parserCallback=x,this._parserState=2}function h(y,x,w){this._parserInit||i(this),c("write(%o bytes)",y.length),typeof x=="function"&&(w=x),p(this,y,null,w)}function m(y,x,w){this._parserInit||i(this),c("transform(%o bytes)",y.length),typeof x!="function"&&(x=this._parserOutput),p(this,y,x,w)}function g(y,x,w,k){if(y._parserBytesLeft-=x.length,c("%o bytes left for stream piece",y._parserBytesLeft),y._parserState===0?(y._parserBuffers.push(x),y._parserBuffered+=x.length):y._parserState===2&&w(x),y._parserBytesLeft!==0)return k;var b=y._parserCallback;if(b&&y._parserState===0&&y._parserBuffers.length>1&&(x=a.concat(y._parserBuffers,y._parserBuffered)),y._parserState!==0&&(x=null),y._parserCallback=null,y._parserBuffered=0,y._parserState=-1,y._parserBuffers.splice(0),b){var T=[];x&&T.push(x),w&&T.push(w);var _=b.length>T.length;_&&T.push(v(k));var M=b.apply(y,T);if(!_||k===M)return k}}var p=v(function y(x,w,k,b){return x._parserBytesLeft<=0?b(new Error("got data but not currently parsing anything")):w.length<=x._parserBytesLeft?function(){return g(x,w,k,b)}:function(){var T=w.slice(0,x._parserBytesLeft);return g(x,T,k,function(_){return _?b(_):w.length>T.length?function(){return y(x,w.slice(T.length),k,b)}:void 0})}});function v(y){return function(){for(var x=y.apply(this,arguments);typeof x=="function";)x=x();return x}}}).call(this)}).call(this,e("_process"),e("buffer").Buffer)},{_process:277,assert:75,buffer:85,debug:302}],302:[function(e,o,f){(function(r){(function(){function a(){var u;try{u=f.storage.debug}catch{}return!u&&r!==void 0&&"env"in r&&(u=r.env.DEBUG),u}(f=o.exports=e("./debug")).log=function(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},f.formatArgs=function(u){var c=this.useColors;if(u[0]=(c?"%c":"")+this.namespace+(c?" %c":" ")+u[0]+(c?"%c ":" ")+"+"+f.humanize(this.diff),!!c){var i="color: "+this.color;u.splice(1,0,i,"color: inherit");var s=0,l=0;u[0].replace(/%[a-zA-Z%]/g,function(d){d!=="%%"&&(s++,d==="%c"&&(l=s))}),u.splice(l,0,i)}},f.save=function(u){try{u==null?f.storage.removeItem("debug"):f.storage.debug=u}catch{}},f.load=a,f.useColors=function(){return typeof window<"u"&&window.process&&window.process.type==="renderer"?!0:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},f.storage=typeof chrome<"u"&&chrome.storage!==void 0?chrome.storage.local:function(){try{return window.localStorage}catch{}}(),f.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],f.formatters.j=function(u){try{return JSON.stringify(u)}catch(c){return"[UnexpectedJSONParseError]: "+c.message}},f.enable(a())}).call(this)}).call(this,e("_process"))},{"./debug":303,_process:277}],303:[function(e,o,f){var r;function a(u){function c(){if(c.enabled){var i=c,s=+new Date,l=s-(r||s);i.diff=l,i.prev=r,i.curr=s,r=s;for(var d=new Array(arguments.length),h=0;h0)return function(m){if(!((m=String(m)).length>100)){var g=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(m);if(!!g){var p=parseFloat(g[1]);switch((g[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*p;case"days":case"day":case"d":return p*c;case"hours":case"hour":case"hrs":case"hr":case"h":return p*u;case"minutes":case"minute":case"mins":case"min":case"m":return p*a;case"seconds":case"second":case"secs":case"sec":case"s":return p*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return p;default:return}}}}(s);if(h==="number"&&isNaN(s)===!1)return l.long?i(d=s,c,"day")||i(d,u,"hour")||i(d,a,"minute")||i(d,r,"second")||d+" ms":function(m){return m>=c?Math.round(m/c)+"d":m>=u?Math.round(m/u)+"h":m>=a?Math.round(m/a)+"m":m>=r?Math.round(m/r)+"s":m+"ms"}(s);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(s))}},{}],305:[function(e,o,f){var r=e("parenthesis");o.exports=function(a,u,c){if(a==null)throw Error("First argument should be a string");if(u==null)throw Error("Separator should be a string or a RegExp");c?(typeof c=="string"||Array.isArray(c))&&(c={ignore:c}):c={},c.escape==null&&(c.escape=!0),c.ignore==null?c.ignore=["[]","()","{}","<>",'""',"''","``","\u201C\u201D","\xAB\xBB"]:(typeof c.ignore=="string"&&(c.ignore=[c.ignore]),c.ignore=c.ignore.map(function(g){return g.length===1&&(g+=g),g}));var i=r.parse(a,{flat:!0,brackets:c.ignore}),s=i[0].split(u);if(c.escape){for(var l=[],d=0;d0;){k=T[T.length-1];var _=r[k];if(s[k]<_.length){for(var M=s[k];M<_.length;++M){var A=_[M];if(u[A]<0){u[A]=c[A]=g,i[A]=!0,g+=1,b.push(A),T.push(A);break}i[A]&&(c[k]=0|Math.min(c[k],c[A])),l[A]>=0&&d[k].push(l[A])}s[k]=M}else{if(c[k]===u[k]){var S=[],E=[],D=0;for(M=b.length-1;M>=0;--M){var O=b[M];if(i[O]=!1,S.push(O),E.push(d[O]),D+=d[O].length,l[O]=p.length,O===k){b.length=M;break}}p.push(S);var R=new Array(D);for(M=0;M1&&(m=1),m<-1&&(m=-1),(s*h-l*d<0?-1:1)*Math.acos(m)};f.default=function(s){var l=s.px,d=s.py,h=s.cx,m=s.cy,g=s.rx,p=s.ry,v=s.xAxisRotation,y=v===void 0?0:v,x=s.largeArcFlag,w=x===void 0?0:x,k=s.sweepFlag,b=k===void 0?0:k,T=[];if(g===0||p===0)return[];var _=Math.sin(y*a/360),M=Math.cos(y*a/360),A=M*(l-h)/2+_*(d-m)/2,S=-_*(l-h)/2+M*(d-m)/2;if(A===0&&S===0)return[];g=Math.abs(g),p=Math.abs(p);var E=Math.pow(A,2)/Math.pow(g,2)+Math.pow(S,2)/Math.pow(p,2);E>1&&(g*=Math.sqrt(E),p*=Math.sqrt(E));var D=function(W,K,te,Y,Z,re,U,q,$,ne,H,Q){var ee=Math.pow(Z,2),ie=Math.pow(re,2),ae=Math.pow(H,2),ue=Math.pow(Q,2),le=ee*ie-ee*ue-ie*ae;le<0&&(le=0),le/=ee*ue+ie*ae;var ge=(le=Math.sqrt(le)*(U===q?-1:1))*Z/re*Q,fe=le*-re/Z*H,me=ne*ge-$*fe+(W+te)/2,_e=$*ge+ne*fe+(K+Y)/2,we=(H-ge)/Z,Te=(Q-fe)/re,Oe=(-H-ge)/Z,de=(-Q-fe)/re,ye=i(1,0,we,Te),Me=i(we,Te,Oe,de);return q===0&&Me>0&&(Me-=a),q===1&&Me<0&&(Me+=a),[me,_e,ye,Me]}(l,d,h,m,g,p,w,b,_,M,A,S),O=r(D,4),R=O[0],z=O[1],L=O[2],P=O[3],N=Math.abs(P)/(a/4);Math.abs(1-N)<1e-7&&(N=1);var B=Math.max(Math.ceil(N),1);P/=B;for(var G=0;Gl[2]&&(l[2]=m[g+0]),m[g+1]>l[3]&&(l[3]=m[g+1]);return l}},{"abs-svg-path":70,assert:75,"is-svg-path":238,"normalize-svg-path":309,"parse-svg-path":250}],309:[function(e,o,f){o.exports=function(c){for(var i,s=[],l=0,d=0,h=0,m=0,g=null,p=null,v=0,y=0,x=0,w=c.length;x4?(l=k[k.length-4],d=k[k.length-3]):(l=v,d=y),s.push(k)}return s};var r=e("svg-arc-to-cubic-bezier");function a(c,i,s,l){return["C",c,i,s,l,s,l]}function u(c,i,s,l,d,h){return["C",c/3+2/3*s,i/3+2/3*l,d/3+2/3*s,h/3+2/3*l,d,h]}},{"svg-arc-to-cubic-bezier":307}],310:[function(e,o,f){var r,a=e("svg-path-bounds"),u=e("parse-svg-path"),c=e("draw-svg-path"),i=e("is-svg-path"),s=e("bitmap-sdf"),l=document.createElement("canvas"),d=l.getContext("2d");o.exports=function(h,m){if(!i(h))throw Error("Argument should be valid svg path string");m||(m={});var g,p;m.shape?(g=m.shape[0],p=m.shape[1]):(g=l.width=m.w||m.width||200,p=l.height=m.h||m.height||200);var v=Math.min(g,p),y=m.stroke||0,x=m.viewbox||m.viewBox||a(h),w=[g/(x[2]-x[0]),p/(x[3]-x[1])],k=Math.min(w[0]||0,w[1]||0)/2;if(d.fillStyle="black",d.fillRect(0,0,g,p),d.fillStyle="white",y&&(typeof y!="number"&&(y=1),d.strokeStyle=y>0?"white":"black",d.lineWidth=Math.abs(y)),d.translate(.5*g,.5*p),d.scale(k,k),function(){if(r!=null)return r;var _=document.createElement("canvas").getContext("2d");if(_.canvas.width=_.canvas.height=1,!window.Path2D)return r=!1;var M=new Path2D("M0,0h1v1h-1v-1Z");_.fillStyle="black",_.fill(M);var A=_.getImageData(0,0,1,1);return r=A&&A.data&&A.data[3]===255}()){var b=new Path2D(h);d.fill(b),y&&d.stroke(b)}else{var T=u(h);c(d,T),d.fill(),y&&d.stroke()}return d.setTransform(1,0,0,1,0,0),s(d,{cutoff:m.cutoff!=null?m.cutoff:.5,radius:m.radius!=null?m.radius:.5*v})}},{"bitmap-sdf":82,"draw-svg-path":126,"is-svg-path":238,"parse-svg-path":250,"svg-path-bounds":308}],311:[function(e,o,f){(function(r,a){(function(){var u=e("process/browser.js").nextTick,c=Function.prototype.apply,i=Array.prototype.slice,s={},l=0;function d(h,m){this._id=h,this._clearFn=m}f.setTimeout=function(){return new d(c.call(setTimeout,window,arguments),clearTimeout)},f.setInterval=function(){return new d(c.call(setInterval,window,arguments),clearInterval)},f.clearTimeout=f.clearInterval=function(h){h.close()},d.prototype.unref=d.prototype.ref=function(){},d.prototype.close=function(){this._clearFn.call(window,this._id)},f.enroll=function(h,m){clearTimeout(h._idleTimeoutId),h._idleTimeout=m},f.unenroll=function(h){clearTimeout(h._idleTimeoutId),h._idleTimeout=-1},f._unrefActive=f.active=function(h){clearTimeout(h._idleTimeoutId);var m=h._idleTimeout;m>=0&&(h._idleTimeoutId=setTimeout(function(){h._onTimeout&&h._onTimeout()},m))},f.setImmediate=typeof r=="function"?r:function(h){var m=l++,g=!(arguments.length<2)&&i.call(arguments,1);return s[m]=!0,u(function(){s[m]&&(g?h.apply(null,g):h.call(null),f.clearImmediate(m))}),m},f.clearImmediate=typeof a=="function"?a:function(h){delete s[h]}}).call(this)}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":277,timers:311}],312:[function(e,o,f){(function(r){var a=/^\s+/,u=/\s+$/,c=0,i=r.round,s=r.min,l=r.max,d=r.random;function h($,ne){if(ne=ne||{},($=$||"")instanceof h)return $;if(!(this instanceof h))return new h($,ne);var H=function(Q){var ee={r:0,g:0,b:0},ie=1,ae=null,ue=null,le=null,ge=!1,fe=!1;typeof Q=="string"&&(Q=function(Te){Te=Te.replace(a,"").replace(u,"").toLowerCase();var Oe,de=!1;if(R[Te])Te=R[Te],de=!0;else if(Te=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};return(Oe=U.rgb.exec(Te))?{r:Oe[1],g:Oe[2],b:Oe[3]}:(Oe=U.rgba.exec(Te))?{r:Oe[1],g:Oe[2],b:Oe[3],a:Oe[4]}:(Oe=U.hsl.exec(Te))?{h:Oe[1],s:Oe[2],l:Oe[3]}:(Oe=U.hsla.exec(Te))?{h:Oe[1],s:Oe[2],l:Oe[3],a:Oe[4]}:(Oe=U.hsv.exec(Te))?{h:Oe[1],s:Oe[2],v:Oe[3]}:(Oe=U.hsva.exec(Te))?{h:Oe[1],s:Oe[2],v:Oe[3],a:Oe[4]}:(Oe=U.hex8.exec(Te))?{r:B(Oe[1]),g:B(Oe[2]),b:B(Oe[3]),a:te(Oe[4]),format:de?"name":"hex8"}:(Oe=U.hex6.exec(Te))?{r:B(Oe[1]),g:B(Oe[2]),b:B(Oe[3]),format:de?"name":"hex"}:(Oe=U.hex4.exec(Te))?{r:B(Oe[1]+""+Oe[1]),g:B(Oe[2]+""+Oe[2]),b:B(Oe[3]+""+Oe[3]),a:te(Oe[4]+""+Oe[4]),format:de?"name":"hex8"}:(Oe=U.hex3.exec(Te))?{r:B(Oe[1]+""+Oe[1]),g:B(Oe[2]+""+Oe[2]),b:B(Oe[3]+""+Oe[3]),format:de?"name":"hex"}:!1}(Q)),typeof Q=="object"&&(q(Q.r)&&q(Q.g)&&q(Q.b)?(me=Q.r,_e=Q.g,we=Q.b,ee={r:255*P(me,255),g:255*P(_e,255),b:255*P(we,255)},ge=!0,fe=String(Q.r).substr(-1)==="%"?"prgb":"rgb"):q(Q.h)&&q(Q.s)&&q(Q.v)?(ae=W(Q.s),ue=W(Q.v),ee=function(Te,Oe,de){Te=6*P(Te,360),Oe=P(Oe,100),de=P(de,100);var ye=r.floor(Te),Me=Te-ye,ke=de*(1-Oe),Ee=de*(1-Me*Oe),ze=de*(1-(1-Me)*Oe),Fe=ye%6;return{r:255*[de,Ee,ke,ke,ze,de][Fe],g:255*[ze,de,de,Ee,ke,ke][Fe],b:255*[ke,ke,ze,de,de,Ee][Fe]}}(Q.h,ae,ue),ge=!0,fe="hsv"):q(Q.h)&&q(Q.s)&&q(Q.l)&&(ae=W(Q.s),le=W(Q.l),ee=function(Te,Oe,de){var ye,Me,ke;function Ee(Ve,Ke,Re){return Re<0&&(Re+=1),Re>1&&(Re-=1),Re<1/6?Ve+6*(Ke-Ve)*Re:Re<.5?Ke:Re<2/3?Ve+(Ke-Ve)*(2/3-Re)*6:Ve}if(Te=P(Te,360),Oe=P(Oe,100),de=P(de,100),Oe===0)ye=Me=ke=de;else{var ze=de<.5?de*(1+Oe):de+Oe-de*Oe,Fe=2*de-ze;ye=Ee(Fe,ze,Te+1/3),Me=Ee(Fe,ze,Te),ke=Ee(Fe,ze,Te-1/3)}return{r:255*ye,g:255*Me,b:255*ke}}(Q.h,ae,le),ge=!0,fe="hsl"),Q.hasOwnProperty("a")&&(ie=Q.a));var me,_e,we;return ie=L(ie),{ok:ge,format:Q.format||fe,r:s(255,l(ee.r,0)),g:s(255,l(ee.g,0)),b:s(255,l(ee.b,0)),a:ie}}($);this._originalInput=$,this._r=H.r,this._g=H.g,this._b=H.b,this._a=H.a,this._roundA=i(100*this._a)/100,this._format=ne.format||H.format,this._gradientType=ne.gradientType,this._r<1&&(this._r=i(this._r)),this._g<1&&(this._g=i(this._g)),this._b<1&&(this._b=i(this._b)),this._ok=H.ok,this._tc_id=c++}function m($,ne,H){$=P($,255),ne=P(ne,255),H=P(H,255);var Q,ee,ie=l($,ne,H),ae=s($,ne,H),ue=(ie+ae)/2;if(ie==ae)Q=ee=0;else{var le=ie-ae;switch(ee=ue>.5?le/(2-ie-ae):le/(ie+ae),ie){case $:Q=(ne-H)/le+(ne>1)+720)%360;--ne;)Q.h=(Q.h+ee)%360,ie.push(h(Q));return ie}function O($,ne){ne=ne||6;for(var H=h($).toHsv(),Q=H.h,ee=H.s,ie=H.v,ae=[],ue=1/ne;ne--;)ae.push(h({h:Q,s:ee,v:ie})),ie=(ie+ue)%1;return ae}h.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var $=this.toRgb();return(299*$.r+587*$.g+114*$.b)/1e3},getLuminance:function(){var $,ne,H,Q=this.toRgb();return $=Q.r/255,ne=Q.g/255,H=Q.b/255,.2126*($<=.03928?$/12.92:r.pow(($+.055)/1.055,2.4))+.7152*(ne<=.03928?ne/12.92:r.pow((ne+.055)/1.055,2.4))+.0722*(H<=.03928?H/12.92:r.pow((H+.055)/1.055,2.4))},setAlpha:function($){return this._a=L($),this._roundA=i(100*this._a)/100,this},toHsv:function(){var $=g(this._r,this._g,this._b);return{h:360*$.h,s:$.s,v:$.v,a:this._a}},toHsvString:function(){var $=g(this._r,this._g,this._b),ne=i(360*$.h),H=i(100*$.s),Q=i(100*$.v);return this._a==1?"hsv("+ne+", "+H+"%, "+Q+"%)":"hsva("+ne+", "+H+"%, "+Q+"%, "+this._roundA+")"},toHsl:function(){var $=m(this._r,this._g,this._b);return{h:360*$.h,s:$.s,l:$.l,a:this._a}},toHslString:function(){var $=m(this._r,this._g,this._b),ne=i(360*$.h),H=i(100*$.s),Q=i(100*$.l);return this._a==1?"hsl("+ne+", "+H+"%, "+Q+"%)":"hsla("+ne+", "+H+"%, "+Q+"%, "+this._roundA+")"},toHex:function($){return p(this._r,this._g,this._b,$)},toHexString:function($){return"#"+this.toHex($)},toHex8:function($){return function(ne,H,Q,ee,ie){var ae=[G(i(ne).toString(16)),G(i(H).toString(16)),G(i(Q).toString(16)),G(K(ee))];return ie&&ae[0].charAt(0)==ae[0].charAt(1)&&ae[1].charAt(0)==ae[1].charAt(1)&&ae[2].charAt(0)==ae[2].charAt(1)&&ae[3].charAt(0)==ae[3].charAt(1)?ae[0].charAt(0)+ae[1].charAt(0)+ae[2].charAt(0)+ae[3].charAt(0):ae.join("")}(this._r,this._g,this._b,this._a,$)},toHex8String:function($){return"#"+this.toHex8($)},toRgb:function(){return{r:i(this._r),g:i(this._g),b:i(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+i(this._r)+", "+i(this._g)+", "+i(this._b)+")":"rgba("+i(this._r)+", "+i(this._g)+", "+i(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:i(100*P(this._r,255))+"%",g:i(100*P(this._g,255))+"%",b:i(100*P(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+i(100*P(this._r,255))+"%, "+i(100*P(this._g,255))+"%, "+i(100*P(this._b,255))+"%)":"rgba("+i(100*P(this._r,255))+"%, "+i(100*P(this._g,255))+"%, "+i(100*P(this._b,255))+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":!(this._a<1)&&(z[p(this._r,this._g,this._b,!0)]||!1)},toFilter:function($){var ne="#"+v(this._r,this._g,this._b,this._a),H=ne,Q=this._gradientType?"GradientType = 1, ":"";if($){var ee=h($);H="#"+v(ee._r,ee._g,ee._b,ee._a)}return"progid:DXImageTransform.Microsoft.gradient("+Q+"startColorstr="+ne+",endColorstr="+H+")"},toString:function($){var ne=!!$;$=$||this._format;var H=!1,Q=this._a<1&&this._a>=0;return ne||!Q||$!=="hex"&&$!=="hex6"&&$!=="hex3"&&$!=="hex4"&&$!=="hex8"&&$!=="name"?($==="rgb"&&(H=this.toRgbString()),$==="prgb"&&(H=this.toPercentageRgbString()),$!=="hex"&&$!=="hex6"||(H=this.toHexString()),$==="hex3"&&(H=this.toHexString(!0)),$==="hex4"&&(H=this.toHex8String(!0)),$==="hex8"&&(H=this.toHex8String()),$==="name"&&(H=this.toName()),$==="hsl"&&(H=this.toHslString()),$==="hsv"&&(H=this.toHsvString()),H||this.toHexString()):$==="name"&&this._a===0?this.toName():this.toRgbString()},clone:function(){return h(this.toString())},_applyModification:function($,ne){var H=$.apply(null,[this].concat([].slice.call(ne)));return this._r=H._r,this._g=H._g,this._b=H._b,this.setAlpha(H._a),this},lighten:function(){return this._applyModification(k,arguments)},brighten:function(){return this._applyModification(b,arguments)},darken:function(){return this._applyModification(T,arguments)},desaturate:function(){return this._applyModification(y,arguments)},saturate:function(){return this._applyModification(x,arguments)},greyscale:function(){return this._applyModification(w,arguments)},spin:function(){return this._applyModification(_,arguments)},_applyCombination:function($,ne){return $.apply(null,[this].concat([].slice.call(ne)))},analogous:function(){return this._applyCombination(D,arguments)},complement:function(){return this._applyCombination(M,arguments)},monochromatic:function(){return this._applyCombination(O,arguments)},splitcomplement:function(){return this._applyCombination(E,arguments)},triad:function(){return this._applyCombination(A,arguments)},tetrad:function(){return this._applyCombination(S,arguments)}},h.fromRatio=function($,ne){if(typeof $=="object"){var H={};for(var Q in $)$.hasOwnProperty(Q)&&(H[Q]=Q==="a"?$[Q]:W($[Q]));$=H}return h($,ne)},h.equals=function($,ne){return!(!$||!ne)&&h($).toRgbString()==h(ne).toRgbString()},h.random=function(){return h.fromRatio({r:d(),g:d(),b:d()})},h.mix=function($,ne,H){H=H===0?0:H||50;var Q=h($).toRgb(),ee=h(ne).toRgb(),ie=H/100;return h({r:(ee.r-Q.r)*ie+Q.r,g:(ee.g-Q.g)*ie+Q.g,b:(ee.b-Q.b)*ie+Q.b,a:(ee.a-Q.a)*ie+Q.a})},h.readability=function($,ne){var H=h($),Q=h(ne);return(r.max(H.getLuminance(),Q.getLuminance())+.05)/(r.min(H.getLuminance(),Q.getLuminance())+.05)},h.isReadable=function($,ne,H){var Q,ee,ie=h.readability($,ne);switch(ee=!1,(Q=function(ae){var ue,le;return ue=((ae=ae||{level:"AA",size:"small"}).level||"AA").toUpperCase(),le=(ae.size||"small").toLowerCase(),ue!=="AA"&&ue!=="AAA"&&(ue="AA"),le!=="small"&&le!=="large"&&(le="small"),{level:ue,size:le}}(H)).level+Q.size){case"AAsmall":case"AAAlarge":ee=ie>=4.5;break;case"AAlarge":ee=ie>=3;break;case"AAAsmall":ee=ie>=7}return ee},h.mostReadable=function($,ne,H){var Q,ee,ie,ae,ue=null,le=0;ee=(H=H||{}).includeFallbackColors,ie=H.level,ae=H.size;for(var ge=0;gele&&(le=Q,ue=h(ne[ge]));return h.isReadable($,ue,{level:ie,size:ae})||!ee?ue:(H.includeFallbackColors=!1,h.mostReadable($,["#fff","#000"],H))};var R=h.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},z=h.hexNames=function($){var ne={};for(var H in $)$.hasOwnProperty(H)&&(ne[$[H]]=H);return ne}(R);function L($){return $=parseFloat($),(isNaN($)||$<0||$>1)&&($=1),$}function P($,ne){(function(Q){return typeof Q=="string"&&Q.indexOf(".")!=-1&&parseFloat(Q)===1})($)&&($="100%");var H=function(Q){return typeof Q=="string"&&Q.indexOf("%")!=-1}($);return $=s(ne,l(0,parseFloat($))),H&&($=parseInt($*ne,10)/100),r.abs($-ne)<1e-6?1:$%ne/parseFloat(ne)}function N($){return s(1,l(0,$))}function B($){return parseInt($,16)}function G($){return $.length==1?"0"+$:""+$}function W($){return $<=1&&($=100*$+"%"),$}function K($){return r.round(255*parseFloat($)).toString(16)}function te($){return B($)/255}var Y,Z,re,U=(Z="[\\s|\\(]+("+(Y="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+Y+")[,|\\s]+("+Y+")\\s*\\)?",re="[\\s|\\(]+("+Y+")[,|\\s]+("+Y+")[,|\\s]+("+Y+")[,|\\s]+("+Y+")\\s*\\)?",{CSS_UNIT:new RegExp(Y),rgb:new RegExp("rgb"+Z),rgba:new RegExp("rgba"+re),hsl:new RegExp("hsl"+Z),hsla:new RegExp("hsla"+re),hsv:new RegExp("hsv"+Z),hsva:new RegExp("hsva"+re),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function q($){return!!U.CSS_UNIT.exec($)}o!==void 0&&o.exports?o.exports=h:window.tinycolor=h})(Math)},{}],313:[function(e,o,f){o.exports=a,o.exports.float32=o.exports.float=a,o.exports.fract32=o.exports.fract=function(u,c){if(u.length){if(u instanceof Float32Array)return new Float32Array(u.length);c instanceof Float32Array||(c=a(u));for(var i=0,s=c.length;ib&&(b=A[0]),A[1]T&&(T=A[1])}function M(A){switch(A.type){case"GeometryCollection":A.geometries.forEach(M);break;case"Point":_(A.coordinates);break;case"MultiPoint":A.coordinates.forEach(_)}}for(y in v.arcs.forEach(function(A){for(var S,E=-1,D=A.length;++Eb&&(b=S[0]),S[1]T&&(T=S[1])}),v.objects)M(v.objects[y]);return[w,k,b,T]}function i(v,y){var x=y.id,w=y.bbox,k=y.properties==null?{}:y.properties,b=s(v,y);return x==null&&w==null?{type:"Feature",properties:k,geometry:b}:w==null?{type:"Feature",id:x,properties:k,geometry:b}:{type:"Feature",id:x,bbox:w,properties:k,geometry:b}}function s(v,y){var x=u(v.transform),w=v.arcs;function k(A,S){S.length&&S.pop();for(var E=w[A<0?~A:A],D=0,O=E.length;D1)w=h(v,y,x);else for(k=0,w=new Array(b=v.arcs.length);k1)for(var S,E,D=1,O=T(A[0]);DO&&(E=A[0],A[0]=A[D],A[D]=E,O=S);return A}).filter(function(_){return _.length>0})}}function g(v,y){for(var x=0,w=v.length;x>>1;v[k]=2))throw new Error("n must be \u22652");var x,w=(_=v.bbox||c(v))[0],k=_[1],b=_[2],T=_[3];y={scale:[b-w?(b-w)/(x-1):1,T-k?(T-k)/(x-1):1],translate:[w,k]}}var _,M,A=p(y),S=v.objects,E={};function D(R){return A(R)}function O(R){var z;switch(R.type){case"GeometryCollection":z={type:"GeometryCollection",geometries:R.geometries.map(O)};break;case"Point":z={type:"Point",coordinates:D(R.coordinates)};break;case"MultiPoint":z={type:"MultiPoint",coordinates:R.coordinates.map(D)};break;default:return R}return R.id!=null&&(z.id=R.id),R.bbox!=null&&(z.bbox=R.bbox),R.properties!=null&&(z.properties=R.properties),z}for(M in S)E[M]=O(S[M]);return{type:"Topology",bbox:_,transform:y,objects:E,arcs:v.arcs.map(function(R){var z,L=0,P=1,N=R.length,B=new Array(N);for(B[0]=A(R[0],0);++L":(c.length>100&&(c=c.slice(0,99)+"\u2026"),c=c.replace(a,function(i){switch(i){case` +`:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}))}},{"./safe-to-string":318}],320:[function(e,o,f){var r=e("../value/is"),a={object:!0,function:!0,undefined:!0};o.exports=function(u){return!!r(u)&&hasOwnProperty.call(a,typeof u)}},{"../value/is":326}],321:[function(e,o,f){var r=e("../lib/resolve-exception"),a=e("./is");o.exports=function(u){return a(u)?u:r(u,"%v is not a plain function",arguments[1])}},{"../lib/resolve-exception":317,"./is":322}],322:[function(e,o,f){var r=e("../function/is"),a=/^\s*class[\s{/}]/,u=Function.prototype.toString;o.exports=function(c){return!!r(c)&&!a.test(u.call(c))}},{"../function/is":316}],323:[function(e,o,f){var r=e("../object/is");o.exports=function(a){if(!r(a))return!1;try{return!!a.constructor&&a.constructor.prototype===a}catch{return!1}}},{"../object/is":320}],324:[function(e,o,f){var r=e("../value/is"),a=e("../object/is"),u=Object.prototype.toString;o.exports=function(c){if(!r(c))return null;if(a(c)){var i=c.toString;if(typeof i!="function"||i===u)return null}try{return""+c}catch{return null}}},{"../object/is":320,"../value/is":326}],325:[function(e,o,f){var r=e("../lib/resolve-exception"),a=e("./is");o.exports=function(u){return a(u)?u:r(u,"Cannot use %v",arguments[1])}},{"../lib/resolve-exception":317,"./is":326}],326:[function(e,o,f){o.exports=function(r){return r!=null}},{}],327:[function(e,o,f){(function(r){(function(){var a=e("bit-twiddle"),u=e("dup"),c=e("buffer").Buffer;r.__TYPEDARRAY_POOL||(r.__TYPEDARRAY_POOL={UINT8:u([32,0]),UINT16:u([32,0]),UINT32:u([32,0]),BIGUINT64:u([32,0]),INT8:u([32,0]),INT16:u([32,0]),INT32:u([32,0]),BIGINT64:u([32,0]),FLOAT:u([32,0]),DOUBLE:u([32,0]),DATA:u([32,0]),UINT8C:u([32,0]),BUFFER:u([32,0])});var i=typeof Uint8ClampedArray<"u",s=typeof BigUint64Array<"u",l=typeof BigInt64Array<"u",d=r.__TYPEDARRAY_POOL;d.UINT8C||(d.UINT8C=u([32,0])),d.BIGUINT64||(d.BIGUINT64=u([32,0])),d.BIGINT64||(d.BIGINT64=u([32,0])),d.BUFFER||(d.BUFFER=u([32,0]));var h=d.DATA,m=d.BUFFER;function g(O){if(O){var R=O.length||O.byteLength,z=a.log2(R);h[z].push(O)}}function p(O){O=a.nextPow2(O);var R=a.log2(O),z=h[R];return z.length>0?z.pop():new ArrayBuffer(O)}function v(O){return new Uint8Array(p(O),0,O)}function y(O){return new Uint16Array(p(2*O),0,O)}function x(O){return new Uint32Array(p(4*O),0,O)}function w(O){return new Int8Array(p(O),0,O)}function k(O){return new Int16Array(p(2*O),0,O)}function b(O){return new Int32Array(p(4*O),0,O)}function T(O){return new Float32Array(p(4*O),0,O)}function _(O){return new Float64Array(p(8*O),0,O)}function M(O){return i?new Uint8ClampedArray(p(O),0,O):v(O)}function A(O){return s?new BigUint64Array(p(8*O),0,O):null}function S(O){return l?new BigInt64Array(p(8*O),0,O):null}function E(O){return new DataView(p(O),0,O)}function D(O){O=a.nextPow2(O);var R=a.log2(O),z=m[R];return z.length>0?z.pop():new c(O)}f.free=function(O){if(c.isBuffer(O))m[a.log2(O.length)].push(O);else{if(Object.prototype.toString.call(O)!=="[object ArrayBuffer]"&&(O=O.buffer),!O)return;var R=O.length||O.byteLength,z=0|a.log2(R);h[z].push(O)}},f.freeUint8=f.freeUint16=f.freeUint32=f.freeBigUint64=f.freeInt8=f.freeInt16=f.freeInt32=f.freeBigInt64=f.freeFloat32=f.freeFloat=f.freeFloat64=f.freeDouble=f.freeUint8Clamped=f.freeDataView=function(O){g(O.buffer)},f.freeArrayBuffer=g,f.freeBuffer=function(O){m[a.log2(O.length)].push(O)},f.malloc=function(O,R){if(R===void 0||R==="arraybuffer")return p(O);switch(R){case"uint8":return v(O);case"uint16":return y(O);case"uint32":return x(O);case"int8":return w(O);case"int16":return k(O);case"int32":return b(O);case"float":case"float32":return T(O);case"double":case"float64":return _(O);case"uint8_clamped":return M(O);case"bigint64":return S(O);case"biguint64":return A(O);case"buffer":return D(O);case"data":case"dataview":return E(O);default:return null}return null},f.mallocArrayBuffer=p,f.mallocUint8=v,f.mallocUint16=y,f.mallocUint32=x,f.mallocInt8=w,f.mallocInt16=k,f.mallocInt32=b,f.mallocFloat32=f.mallocFloat=T,f.mallocFloat64=f.mallocDouble=_,f.mallocUint8Clamped=M,f.mallocBigUint64=A,f.mallocBigInt64=S,f.mallocDataView=E,f.mallocBuffer=D,f.clearCache=function(){for(var O=0;O<32;++O)d.UINT8[O].length=0,d.UINT16[O].length=0,d.UINT32[O].length=0,d.INT8[O].length=0,d.INT16[O].length=0,d.INT32[O].length=0,d.FLOAT[O].length=0,d.DOUBLE[O].length=0,d.BIGUINT64[O].length=0,d.BIGINT64[O].length=0,d.UINT8C[O].length=0,h[O].length=0,m[O].length=0}}).call(this)}).call(this,typeof Ro<"u"?Ro:typeof self<"u"?self:typeof window<"u"?window:{})},{"bit-twiddle":81,buffer:85,dup:128}],328:[function(e,o,f){var r=/[\'\"]/;o.exports=function(a){return a?(r.test(a.charAt(0))&&(a=a.substr(1)),r.test(a.charAt(a.length-1))&&(a=a.substr(0,a.length-1)),a):""}},{}],329:[function(e,o,f){o.exports=function(r,a,u){Array.isArray(u)||(u=[].slice.call(arguments,2));for(var c=0,i=u.length;c2111)throw p.replace(/\{0\}/,this.local.name);return g},toMonthIndex:function(g,p,v){var y=this.intercalaryMonth(g);if(v&&p!==y||p<1||p>12)throw r.local.invalidMonth.replace(/\{0\}/,this.local.name);return y?!v&&p<=y?p-1:p:p-1},toChineseMonth:function(g,p){g.year&&(p=(g=g.year()).month());var v=this.intercalaryMonth(g);if(p<0||p>(v?12:11))throw r.local.invalidMonth.replace(/\{0\}/,this.local.name);return v?p>13},isIntercalaryMonth:function(g,p){g.year&&(p=(g=g.year()).month());var v=this.intercalaryMonth(g);return!!v&&v===p},leapYear:function(g){return this.intercalaryMonth(g)!==0},weekOfYear:function(g,p,v){var y,x=this._validateYear(g,r.local.invalidyear),w=m[x-m[0]],k=w>>9&4095,b=w>>5&15,T=31&w;(y=u.newDate(k,b,T)).add(4-(y.dayOfWeek()||7),"d");var _=this.toJD(g,p,v)-y.toJD();return 1+Math.floor(_/7)},monthsInYear:function(g){return this.leapYear(g)?13:12},daysInMonth:function(g,p){g.year&&(p=g.month(),g=g.year()),g=this._validateYear(g);var v=h[g-h[0]];if(p>(v>>13?12:11))throw r.local.invalidMonth.replace(/\{0\}/,this.local.name);return v&1<<12-p?30:29},weekDay:function(g,p,v){return(this.dayOfWeek(g,p,v)||7)<6},toJD:function(g,p,v){var y=this._validate(g,w,v,r.local.invalidDate);g=this._validateYear(y.year()),p=y.month(),v=y.day();var x=this.isIntercalaryMonth(g,p),w=this.toChineseMonth(g,p),k=function(b,T,_,M,A){var S,E,D;if(typeof b=="object")E=b,S=T||{};else{var O;if(!(typeof b=="number"&&b>=1888&&b<=2111))throw new Error("Lunar year outside range 1888-2111");if(!(typeof T=="number"&&T>=1&&T<=12))throw new Error("Lunar month outside range 1 - 12");if(!(typeof _=="number"&&_>=1&&_<=30))throw new Error("Lunar day outside range 1 - 30");typeof M=="object"?(O=!1,S=M):(O=!!M,S=A||{}),E={year:b,month:T,day:_,isIntercalary:O}}D=E.day-1;var R,z=h[E.year-h[0]],L=z>>13;R=L&&(E.month>L||E.isIntercalary)?E.month:E.month-1;for(var P=0;P>9&4095,(N>>5&15)-1,(31&N)+D);return S.year=B.getFullYear(),S.month=1+B.getMonth(),S.day=B.getDate(),S}(g,w,v,x);return u.toJD(k.year,k.month,k.day)},fromJD:function(g){var p=u.fromJD(g),v=function(x,w,k,b){var T,_;if(typeof x=="object")T=x,_=w||{};else{if(!(typeof x=="number"&&x>=1888&&x<=2111))throw new Error("Solar year outside range 1888-2111");if(!(typeof w=="number"&&w>=1&&w<=12))throw new Error("Solar month outside range 1 - 12");if(!(typeof k=="number"&&k>=1&&k<=31))throw new Error("Solar day outside range 1 - 31");T={year:x,month:w,day:k},_=b||{}}var M=m[T.year-m[0]],A=T.year<<9|T.month<<5|T.day;_.year=A>=M?T.year:T.year-1,M=m[_.year-m[0]];var S,E=new Date(M>>9&4095,(M>>5&15)-1,31&M),D=new Date(T.year,T.month-1,T.day);S=Math.round((D-E)/864e5);var O,R=h[_.year-h[0]];for(O=0;O<13;O++){var z=R&1<<12-O?30:29;if(S>13;return!L||O=2&&d<=6},extraInfo:function(i,s,l){var d=this._validate(i,s,l,r.local.invalidDate);return{century:c[Math.floor((d.year()-1)/100)+1]||""}},toJD:function(i,s,l){var d=this._validate(i,s,l,r.local.invalidDate);return i=d.year()+(d.year()<0?1:0),s=d.month(),(l=d.day())+(s>1?16:0)+(s>2?32*(s-2):0)+400*(i-1)+this.jdEpoch-1},fromJD:function(i){i=Math.floor(i+.5)-Math.floor(this.jdEpoch)-1;var s=Math.floor(i/400)+1;i-=400*(s-1),i+=i>15?16:0;var l=Math.floor(i/32)+1,d=i-32*(l-1)+1;return this.newDate(s<=0?s-1:s,l,d)}});var c={20:"Fruitbat",21:"Anchovy"};r.calendars.discworld=u},{"../main":346,"object-assign":247}],335:[function(e,o,f){var r=e("../main"),a=e("object-assign");function u(c){this.local=this.regionalOptions[c||""]||this.regionalOptions[""]}u.prototype=new r.baseCalendar,a(u.prototype,{name:"Ethiopian",jdEpoch:17242205e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Ethiopian",epochs:["BEE","EE"],monthNames:["Meskerem","Tikemet","Hidar","Tahesas","Tir","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehase","Pagume"],monthNamesShort:["Mes","Tik","Hid","Tah","Tir","Yek","Meg","Mia","Gen","Sen","Ham","Neh","Pag"],dayNames:["Ehud","Segno","Maksegno","Irob","Hamus","Arb","Kidame"],dayNamesShort:["Ehu","Seg","Mak","Iro","Ham","Arb","Kid"],dayNamesMin:["Eh","Se","Ma","Ir","Ha","Ar","Ki"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(c){var i=this._validate(c,this.minMonth,this.minDay,r.local.invalidYear);return(c=i.year()+(i.year()<0?1:0))%4==3||c%4==-1},monthsInYear:function(c){return this._validate(c,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear),13},weekOfYear:function(c,i,s){var l=this.newDate(c,i,s);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(c,i){var s=this._validate(c,i,this.minDay,r.local.invalidMonth);return this.daysPerMonth[s.month()-1]+(s.month()===13&&this.leapYear(s.year())?1:0)},weekDay:function(c,i,s){return(this.dayOfWeek(c,i,s)||7)<6},toJD:function(c,i,s){var l=this._validate(c,i,s,r.local.invalidDate);return(c=l.year())<0&&c++,l.day()+30*(l.month()-1)+365*(c-1)+Math.floor(c/4)+this.jdEpoch-1},fromJD:function(c){var i=Math.floor(c)+.5-this.jdEpoch,s=Math.floor((i-Math.floor((i+366)/1461))/365)+1;s<=0&&s--,i=Math.floor(c)+.5-this.newDate(s,1,1).toJD();var l=Math.floor(i/30)+1,d=i-30*(l-1)+1;return this.newDate(s,l,d)}}),r.calendars.ethiopian=u},{"../main":346,"object-assign":247}],336:[function(e,o,f){var r=e("../main"),a=e("object-assign");function u(i){this.local=this.regionalOptions[i||""]||this.regionalOptions[""]}function c(i,s){return i-s*Math.floor(i/s)}u.prototype=new r.baseCalendar,a(u.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(i){var s=this._validate(i,this.minMonth,this.minDay,r.local.invalidYear);return this._leapYear(s.year())},_leapYear:function(i){return c(7*(i=i<0?i+1:i)+1,19)<7},monthsInYear:function(i){return this._validate(i,this.minMonth,this.minDay,r.local.invalidYear),this._leapYear(i.year?i.year():i)?13:12},weekOfYear:function(i,s,l){var d=this.newDate(i,s,l);return d.add(-d.dayOfWeek(),"d"),Math.floor((d.dayOfYear()-1)/7)+1},daysInYear:function(i){return i=this._validate(i,this.minMonth,this.minDay,r.local.invalidYear).year(),this.toJD(i===-1?1:i+1,7,1)-this.toJD(i,7,1)},daysInMonth:function(i,s){return i.year&&(s=i.month(),i=i.year()),this._validate(i,s,this.minDay,r.local.invalidMonth),s===12&&this.leapYear(i)||s===8&&c(this.daysInYear(i),10)===5?30:s===9&&c(this.daysInYear(i),10)===3?29:this.daysPerMonth[s-1]},weekDay:function(i,s,l){return this.dayOfWeek(i,s,l)!==6},extraInfo:function(i,s,l){var d=this._validate(i,s,l,r.local.invalidDate);return{yearType:(this.leapYear(d)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(d)%10-3]}},toJD:function(i,s,l){var d=this._validate(i,s,l,r.local.invalidDate);i=d.year(),s=d.month(),l=d.day();var h=i<=0?i+1:i,m=this.jdEpoch+this._delay1(h)+this._delay2(h)+l+1;if(s<7){for(var g=7;g<=this.monthsInYear(i);g++)m+=this.daysInMonth(i,g);for(g=1;g=this.toJD(s===-1?1:s+1,7,1);)s++;for(var l=ithis.toJD(s,l,this.daysInMonth(s,l));)l++;var d=i-this.toJD(s,l,1)+1;return this.newDate(s,l,d)}}),r.calendars.hebrew=u},{"../main":346,"object-assign":247}],337:[function(e,o,f){var r=e("../main"),a=e("object-assign");function u(c){this.local=this.regionalOptions[c||""]||this.regionalOptions[""]}u.prototype=new r.baseCalendar,a(u.prototype,{name:"Islamic",jdEpoch:19484395e-1,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-kham\u012Bs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(c){return(11*this._validate(c,this.minMonth,this.minDay,r.local.invalidYear).year()+14)%30<11},weekOfYear:function(c,i,s){var l=this.newDate(c,i,s);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInYear:function(c){return this.leapYear(c)?355:354},daysInMonth:function(c,i){var s=this._validate(c,i,this.minDay,r.local.invalidMonth);return this.daysPerMonth[s.month()-1]+(s.month()===12&&this.leapYear(s.year())?1:0)},weekDay:function(c,i,s){return this.dayOfWeek(c,i,s)!==5},toJD:function(c,i,s){var l=this._validate(c,i,s,r.local.invalidDate);return c=l.year(),i=l.month(),c=c<=0?c+1:c,(s=l.day())+Math.ceil(29.5*(i-1))+354*(c-1)+Math.floor((3+11*c)/30)+this.jdEpoch-1},fromJD:function(c){c=Math.floor(c)+.5;var i=Math.floor((30*(c-this.jdEpoch)+10646)/10631);i=i<=0?i-1:i;var s=Math.min(12,Math.ceil((c-29-this.toJD(i,1,1))/29.5)+1),l=c-this.toJD(i,s,1)+1;return this.newDate(i,s,l)}}),r.calendars.islamic=u},{"../main":346,"object-assign":247}],338:[function(e,o,f){var r=e("../main"),a=e("object-assign");function u(c){this.local=this.regionalOptions[c||""]||this.regionalOptions[""]}u.prototype=new r.baseCalendar,a(u.prototype,{name:"Julian",jdEpoch:17214235e-1,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Julian",epochs:["BC","AD"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(c){var i=this._validate(c,this.minMonth,this.minDay,r.local.invalidYear);return(c=i.year()<0?i.year()+1:i.year())%4==0},weekOfYear:function(c,i,s){var l=this.newDate(c,i,s);return l.add(4-(l.dayOfWeek()||7),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(c,i){var s=this._validate(c,i,this.minDay,r.local.invalidMonth);return this.daysPerMonth[s.month()-1]+(s.month()===2&&this.leapYear(s.year())?1:0)},weekDay:function(c,i,s){return(this.dayOfWeek(c,i,s)||7)<6},toJD:function(c,i,s){var l=this._validate(c,i,s,r.local.invalidDate);return c=l.year(),i=l.month(),s=l.day(),c<0&&c++,i<=2&&(c--,i+=12),Math.floor(365.25*(c+4716))+Math.floor(30.6001*(i+1))+s-1524.5},fromJD:function(c){var i=Math.floor(c+.5)+1524,s=Math.floor((i-122.1)/365.25),l=Math.floor(365.25*s),d=Math.floor((i-l)/30.6001),h=d-Math.floor(d<14?1:13),m=s-Math.floor(h>2?4716:4715),g=i-l-Math.floor(30.6001*d);return m<=0&&m--,this.newDate(m,h,g)}}),r.calendars.julian=u},{"../main":346,"object-assign":247}],339:[function(e,o,f){var r=e("../main"),a=e("object-assign");function u(s){this.local=this.regionalOptions[s||""]||this.regionalOptions[""]}function c(s,l){return s-l*Math.floor(s/l)}function i(s,l){return c(s-1,l)+1}u.prototype=new r.baseCalendar,a(u.prototype,{name:"Mayan",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{"":{name:"Mayan",epochs:["",""],monthNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],monthNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],dayNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesMin:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],digits:null,dateFormat:"YYYY.m.d",firstDay:0,isRTL:!1,haabMonths:["Pop","Uo","Zip","Zotz","Tzec","Xul","Yaxkin","Mol","Chen","Yax","Zac","Ceh","Mac","Kankin","Muan","Pax","Kayab","Cumku","Uayeb"],tzolkinMonths:["Imix","Ik","Akbal","Kan","Chicchan","Cimi","Manik","Lamat","Muluc","Oc","Chuen","Eb","Ben","Ix","Men","Cib","Caban","Etznab","Cauac","Ahau"]}},leapYear:function(s){return this._validate(s,this.minMonth,this.minDay,r.local.invalidYear),!1},formatYear:function(s){s=this._validate(s,this.minMonth,this.minDay,r.local.invalidYear).year();var l=Math.floor(s/400);return s%=400,s+=s<0?400:0,l+"."+Math.floor(s/20)+"."+s%20},forYear:function(s){if((s=s.split(".")).length<3)throw"Invalid Mayan year";for(var l=0,d=0;d19||d>0&&h<0)throw"Invalid Mayan year";l=20*l+h}return l},monthsInYear:function(s){return this._validate(s,this.minMonth,this.minDay,r.local.invalidYear),18},weekOfYear:function(s,l,d){return this._validate(s,l,d,r.local.invalidDate),0},daysInYear:function(s){return this._validate(s,this.minMonth,this.minDay,r.local.invalidYear),360},daysInMonth:function(s,l){return this._validate(s,l,this.minDay,r.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(s,l,d){return this._validate(s,l,d,r.local.invalidDate).day()},weekDay:function(s,l,d){return this._validate(s,l,d,r.local.invalidDate),!0},extraInfo:function(s,l,d){var h=this._validate(s,l,d,r.local.invalidDate).toJD(),m=this._toHaab(h),g=this._toTzolkin(h);return{haabMonthName:this.local.haabMonths[m[0]-1],haabMonth:m[0],haabDay:m[1],tzolkinDayName:this.local.tzolkinMonths[g[0]-1],tzolkinDay:g[0],tzolkinTrecena:g[1]}},_toHaab:function(s){var l=c((s-=this.jdEpoch)+8+340,365);return[Math.floor(l/20)+1,c(l,20)]},_toTzolkin:function(s){return[i((s-=this.jdEpoch)+20,20),i(s+4,13)]},toJD:function(s,l,d){var h=this._validate(s,l,d,r.local.invalidDate);return h.day()+20*h.month()+360*h.year()+this.jdEpoch},fromJD:function(s){s=Math.floor(s)+.5-this.jdEpoch;var l=Math.floor(s/360);s%=360,s+=s<0?360:0;var d=Math.floor(s/20),h=s%20;return this.newDate(l,d,h)}}),r.calendars.mayan=u},{"../main":346,"object-assign":247}],340:[function(e,o,f){var r=e("../main"),a=e("object-assign");function u(i){this.local=this.regionalOptions[i||""]||this.regionalOptions[""]}u.prototype=new r.baseCalendar;var c=r.instance("gregorian");a(u.prototype,{name:"Nanakshahi",jdEpoch:22576735e-1,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Nanakshahi",epochs:["BN","AN"],monthNames:["Chet","Vaisakh","Jeth","Harh","Sawan","Bhadon","Assu","Katak","Maghar","Poh","Magh","Phagun"],monthNamesShort:["Che","Vai","Jet","Har","Saw","Bha","Ass","Kat","Mgr","Poh","Mgh","Pha"],dayNames:["Somvaar","Mangalvar","Budhvaar","Veervaar","Shukarvaar","Sanicharvaar","Etvaar"],dayNamesShort:["Som","Mangal","Budh","Veer","Shukar","Sanichar","Et"],dayNamesMin:["So","Ma","Bu","Ve","Sh","Sa","Et"],digits:null,dateFormat:"dd-mm-yyyy",firstDay:0,isRTL:!1}},leapYear:function(i){var s=this._validate(i,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear);return c.leapYear(s.year()+(s.year()<1?1:0)+1469)},weekOfYear:function(i,s,l){var d=this.newDate(i,s,l);return d.add(1-(d.dayOfWeek()||7),"d"),Math.floor((d.dayOfYear()-1)/7)+1},daysInMonth:function(i,s){var l=this._validate(i,s,this.minDay,r.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===12&&this.leapYear(l.year())?1:0)},weekDay:function(i,s,l){return(this.dayOfWeek(i,s,l)||7)<6},toJD:function(i,s,l){var d=this._validate(i,s,l,r.local.invalidMonth);(i=d.year())<0&&i++;for(var h=d.day(),m=1;m=this.toJD(s+1,1,1);)s++;for(var l=i-Math.floor(this.toJD(s,1,1)+.5)+1,d=1;l>this.daysInMonth(s,d);)l-=this.daysInMonth(s,d),d++;return this.newDate(s,d,l)}}),r.calendars.nanakshahi=u},{"../main":346,"object-assign":247}],341:[function(e,o,f){var r=e("../main"),a=e("object-assign");function u(c){this.local=this.regionalOptions[c||""]||this.regionalOptions[""]}u.prototype=new r.baseCalendar,a(u.prototype,{name:"Nepali",jdEpoch:17007095e-1,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(c){return this.daysInYear(c)!==this.daysPerYear},weekOfYear:function(c,i,s){var l=this.newDate(c,i,s);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInYear:function(c){if(c=this._validate(c,this.minMonth,this.minDay,r.local.invalidYear).year(),this.NEPALI_CALENDAR_DATA[c]===void 0)return this.daysPerYear;for(var i=0,s=this.minMonth;s<=12;s++)i+=this.NEPALI_CALENDAR_DATA[c][s];return i},daysInMonth:function(c,i){return c.year&&(i=c.month(),c=c.year()),this._validate(c,i,this.minDay,r.local.invalidMonth),this.NEPALI_CALENDAR_DATA[c]===void 0?this.daysPerMonth[i-1]:this.NEPALI_CALENDAR_DATA[c][i]},weekDay:function(c,i,s){return this.dayOfWeek(c,i,s)!==6},toJD:function(c,i,s){var l=this._validate(c,i,s,r.local.invalidDate);c=l.year(),i=l.month(),s=l.day();var d=r.instance(),h=0,m=i,g=c;this._createMissingCalendarData(c);var p=c-(m>9||m===9&&s>=this.NEPALI_CALENDAR_DATA[g][0]?56:57);for(i!==9&&(h=s,m--);m!==9;)m<=0&&(m=12,g--),h+=this.NEPALI_CALENDAR_DATA[g][m],m--;return i===9?(h+=s-this.NEPALI_CALENDAR_DATA[g][0])<0&&(h+=d.daysInYear(p)):h+=this.NEPALI_CALENDAR_DATA[g][9]-this.NEPALI_CALENDAR_DATA[g][0],d.newDate(p,1,1).add(h,"d").toJD()},fromJD:function(c){var i=r.instance().fromJD(c),s=i.year(),l=i.dayOfYear(),d=s+56;this._createMissingCalendarData(d);for(var h=9,m=this.NEPALI_CALENDAR_DATA[d][0],g=this.NEPALI_CALENDAR_DATA[d][h]-m+1;l>g;)++h>12&&(h=1,d++),g+=this.NEPALI_CALENDAR_DATA[d][h];var p=this.NEPALI_CALENDAR_DATA[d][h]-(g-l);return this.newDate(d,h,p)},_createMissingCalendarData:function(c){var i=this.daysPerMonth.slice(0);i.unshift(17);for(var s=c-1;s0?474:473))%2820+474+38)%2816<682},weekOfYear:function(i,s,l){var d=this.newDate(i,s,l);return d.add(-(d.dayOfWeek()+1)%7,"d"),Math.floor((d.dayOfYear()-1)/7)+1},daysInMonth:function(i,s){var l=this._validate(i,s,this.minDay,r.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===12&&this.leapYear(l.year())?1:0)},weekDay:function(i,s,l){return this.dayOfWeek(i,s,l)!==5},toJD:function(i,s,l){var d=this._validate(i,s,l,r.local.invalidDate);i=d.year(),s=d.month(),l=d.day();var h=i-(i>=0?474:473),m=474+c(h,2820);return l+(s<=7?31*(s-1):30*(s-1)+6)+Math.floor((682*m-110)/2816)+365*(m-1)+1029983*Math.floor(h/2820)+this.jdEpoch-1},fromJD:function(i){var s=(i=Math.floor(i)+.5)-this.toJD(475,1,1),l=Math.floor(s/1029983),d=c(s,1029983),h=2820;if(d!==1029982){var m=Math.floor(d/366),g=c(d,366);h=Math.floor((2134*m+2816*g+2815)/1028522)+m+1}var p=h+2820*l+474;p=p<=0?p-1:p;var v=i-this.toJD(p,1,1)+1,y=v<=186?Math.ceil(v/31):Math.ceil((v-6)/30),x=i-this.toJD(p,y,1)+1;return this.newDate(p,y,x)}}),r.calendars.persian=u,r.calendars.jalali=u},{"../main":346,"object-assign":247}],343:[function(e,o,f){var r=e("../main"),a=e("object-assign"),u=r.instance();function c(i){this.local=this.regionalOptions[i||""]||this.regionalOptions[""]}c.prototype=new r.baseCalendar,a(c.prototype,{name:"Taiwan",jdEpoch:24194025e-1,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Taiwan",epochs:["BROC","ROC"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},leapYear:function(i){var s=this._validate(i,this.minMonth,this.minDay,r.local.invalidYear);return i=this._t2gYear(s.year()),u.leapYear(i)},weekOfYear:function(i,s,l){var d=this._validate(i,this.minMonth,this.minDay,r.local.invalidYear);return i=this._t2gYear(d.year()),u.weekOfYear(i,d.month(),d.day())},daysInMonth:function(i,s){var l=this._validate(i,s,this.minDay,r.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===2&&this.leapYear(l.year())?1:0)},weekDay:function(i,s,l){return(this.dayOfWeek(i,s,l)||7)<6},toJD:function(i,s,l){var d=this._validate(i,s,l,r.local.invalidDate);return i=this._t2gYear(d.year()),u.toJD(i,d.month(),d.day())},fromJD:function(i){var s=u.fromJD(i),l=this._g2tYear(s.year());return this.newDate(l,s.month(),s.day())},_t2gYear:function(i){return i+this.yearsOffset+(i>=-this.yearsOffset&&i<=-1?1:0)},_g2tYear:function(i){return i-this.yearsOffset-(i>=1&&i<=this.yearsOffset?1:0)}}),r.calendars.taiwan=c},{"../main":346,"object-assign":247}],344:[function(e,o,f){var r=e("../main"),a=e("object-assign"),u=r.instance();function c(i){this.local=this.regionalOptions[i||""]||this.regionalOptions[""]}c.prototype=new r.baseCalendar,a(c.prototype,{name:"Thai",jdEpoch:15230985e-1,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Thai",epochs:["BBE","BE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(i){var s=this._validate(i,this.minMonth,this.minDay,r.local.invalidYear);return i=this._t2gYear(s.year()),u.leapYear(i)},weekOfYear:function(i,s,l){var d=this._validate(i,this.minMonth,this.minDay,r.local.invalidYear);return i=this._t2gYear(d.year()),u.weekOfYear(i,d.month(),d.day())},daysInMonth:function(i,s){var l=this._validate(i,s,this.minDay,r.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===2&&this.leapYear(l.year())?1:0)},weekDay:function(i,s,l){return(this.dayOfWeek(i,s,l)||7)<6},toJD:function(i,s,l){var d=this._validate(i,s,l,r.local.invalidDate);return i=this._t2gYear(d.year()),u.toJD(i,d.month(),d.day())},fromJD:function(i){var s=u.fromJD(i),l=this._g2tYear(s.year());return this.newDate(l,s.month(),s.day())},_t2gYear:function(i){return i-this.yearsOffset-(i>=1&&i<=this.yearsOffset?1:0)},_g2tYear:function(i){return i+this.yearsOffset+(i>=-this.yearsOffset&&i<=-1?1:0)}}),r.calendars.thai=c},{"../main":346,"object-assign":247}],345:[function(e,o,f){var r=e("../main"),a=e("object-assign");function u(i){this.local=this.regionalOptions[i||""]||this.regionalOptions[""]}u.prototype=new r.baseCalendar,a(u.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thal\u0101th\u0101\u2019","Yawm al-Arba\u2018\u0101\u2019","Yawm al-Kham\u012Bs","Yawm al-Jum\u2018a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(i){var s=this._validate(i,this.minMonth,this.minDay,r.local.invalidYear);return this.daysInYear(s.year())===355},weekOfYear:function(i,s,l){var d=this.newDate(i,s,l);return d.add(-d.dayOfWeek(),"d"),Math.floor((d.dayOfYear()-1)/7)+1},daysInYear:function(i){for(var s=0,l=1;l<=12;l++)s+=this.daysInMonth(i,l);return s},daysInMonth:function(i,s){for(var l=this._validate(i,s,this.minDay,r.local.invalidMonth).toJD()-24e5+.5,d=0,h=0;hl)return c[d]-c[d-1];d++}return 30},weekDay:function(i,s,l){return this.dayOfWeek(i,s,l)!==5},toJD:function(i,s,l){var d=this._validate(i,s,l,r.local.invalidDate),h=12*(d.year()-1)+d.month()-15292;return d.day()+c[h-1]-1+24e5-.5},fromJD:function(i){for(var s=i-24e5+.5,l=0,d=0;ds);d++)l++;var h=l+15292,m=Math.floor((h-1)/12),g=m+1,p=h-12*m,v=s-c[l-1]+1;return this.newDate(g,p,v)},isValid:function(i,s,l){var d=r.baseCalendar.prototype.isValid.apply(this,arguments);return d&&(d=(i=i.year!=null?i.year:i)>=1276&&i<=1500),d},_validate:function(i,s,l,d){var h=r.baseCalendar.prototype._validate.apply(this,arguments);if(h.year<1276||h.year>1500)throw d.replace(/\{0\}/,this.local.name);return h}}),r.calendars.ummalqura=u;var c=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]},{"../main":346,"object-assign":247}],346:[function(e,o,f){var r=e("object-assign");function a(){this.regionalOptions=[],this.regionalOptions[""]={invalidCalendar:"Calendar {0} not found",invalidDate:"Invalid {0} date",invalidMonth:"Invalid {0} month",invalidYear:"Invalid {0} year",differentCalendars:"Cannot mix {0} and {1} dates"},this.local=this.regionalOptions[""],this.calendars={},this._localCals={}}function u(d,h,m,g){if(this._calendar=d,this._year=h,this._month=m,this._day=g,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(l.local.invalidDate||l.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function c(d,h){return"000000".substring(0,h-(d=""+d).length)+d}function i(){this.shortYearCutoff="+10"}function s(d){this.local=this.regionalOptions[d]||this.regionalOptions[""]}r(a.prototype,{instance:function(d,h){d=(d||"gregorian").toLowerCase(),h=h||"";var m=this._localCals[d+"-"+h];if(!m&&this.calendars[d]&&(m=new this.calendars[d](h),this._localCals[d+"-"+h]=m),!m)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,d);return m},newDate:function(d,h,m,g,p){return(g=(d!=null&&d.year?d.calendar():typeof g=="string"?this.instance(g,p):g)||this.instance()).newDate(d,h,m)},substituteDigits:function(d){return function(h){return(h+"").replace(/[0-9]/g,function(m){return d[m]})}},substituteChineseDigits:function(d,h){return function(m){for(var g="",p=0;m>0;){var v=m%10;g=(v===0?"":d[v]+h[p])+g,p++,m=Math.floor(m/10)}return g.indexOf(d[1]+h[1])===0&&(g=g.substr(1)),g||d[0]}}}),r(u.prototype,{newDate:function(d,h,m){return this._calendar.newDate(d??this,h,m)},year:function(d){return arguments.length===0?this._year:this.set(d,"y")},month:function(d){return arguments.length===0?this._month:this.set(d,"m")},day:function(d){return arguments.length===0?this._day:this.set(d,"d")},date:function(d,h,m){if(!this._calendar.isValid(d,h,m))throw(l.local.invalidDate||l.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=d,this._month=h,this._day=m,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(d,h){return this._calendar.add(this,d,h)},set:function(d,h){return this._calendar.set(this,d,h)},compareTo:function(d){if(this._calendar.name!==d._calendar.name)throw(l.local.differentCalendars||l.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,d._calendar.local.name);var h=this._year!==d._year?this._year-d._year:this._month!==d._month?this.monthOfYear()-d.monthOfYear():this._day-d._day;return h===0?0:h<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(d){return this._calendar.fromJD(d)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(d){return this._calendar.fromJSDate(d)},toString:function(){return(this.year()<0?"-":"")+c(Math.abs(this.year()),4)+"-"+c(this.month(),2)+"-"+c(this.day(),2)}}),r(i.prototype,{_validateLevel:0,newDate:function(d,h,m){return d==null?this.today():(d.year&&(this._validate(d,h,m,l.local.invalidDate||l.regionalOptions[""].invalidDate),m=d.day(),h=d.month(),d=d.year()),new u(this,d,h,m))},today:function(){return this.fromJSDate(new Date)},epoch:function(d){return this._validate(d,this.minMonth,this.minDay,l.local.invalidYear||l.regionalOptions[""].invalidYear).year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(d){var h=this._validate(d,this.minMonth,this.minDay,l.local.invalidYear||l.regionalOptions[""].invalidYear);return(h.year()<0?"-":"")+c(Math.abs(h.year()),4)},monthsInYear:function(d){return this._validate(d,this.minMonth,this.minDay,l.local.invalidYear||l.regionalOptions[""].invalidYear),12},monthOfYear:function(d,h){var m=this._validate(d,h,this.minDay,l.local.invalidMonth||l.regionalOptions[""].invalidMonth);return(m.month()+this.monthsInYear(m)-this.firstMonth)%this.monthsInYear(m)+this.minMonth},fromMonthOfYear:function(d,h){var m=(h+this.firstMonth-2*this.minMonth)%this.monthsInYear(d)+this.minMonth;return this._validate(d,m,this.minDay,l.local.invalidMonth||l.regionalOptions[""].invalidMonth),m},daysInYear:function(d){var h=this._validate(d,this.minMonth,this.minDay,l.local.invalidYear||l.regionalOptions[""].invalidYear);return this.leapYear(h)?366:365},dayOfYear:function(d,h,m){var g=this._validate(d,h,m,l.local.invalidDate||l.regionalOptions[""].invalidDate);return g.toJD()-this.newDate(g.year(),this.fromMonthOfYear(g.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(d,h,m){var g=this._validate(d,h,m,l.local.invalidDate||l.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(g))+2)%this.daysInWeek()},extraInfo:function(d,h,m){return this._validate(d,h,m,l.local.invalidDate||l.regionalOptions[""].invalidDate),{}},add:function(d,h,m){return this._validate(d,this.minMonth,this.minDay,l.local.invalidDate||l.regionalOptions[""].invalidDate),this._correctAdd(d,this._add(d,h,m),h,m)},_add:function(d,h,m){if(this._validateLevel++,m==="d"||m==="w"){var g=d.toJD()+h*(m==="w"?this.daysInWeek():1),p=d.calendar().fromJD(g);return this._validateLevel--,[p.year(),p.month(),p.day()]}try{var v=d.year()+(m==="y"?h:0),y=d.monthOfYear()+(m==="m"?h:0);p=d.day(),m==="y"?(d.month()!==this.fromMonthOfYear(v,y)&&(y=this.newDate(v,d.month(),this.minDay).monthOfYear()),y=Math.min(y,this.monthsInYear(v)),p=Math.min(p,this.daysInMonth(v,this.fromMonthOfYear(v,y)))):m==="m"&&(function(w){for(;yk-1+w.minMonth;)v++,y-=k,k=w.monthsInYear(v)}(this),p=Math.min(p,this.daysInMonth(v,this.fromMonthOfYear(v,y))));var x=[v,this.fromMonthOfYear(v,y),p];return this._validateLevel--,x}catch(w){throw this._validateLevel--,w}},_correctAdd:function(d,h,m,g){if(!(this.hasYearZero||g!=="y"&&g!=="m"||h[0]!==0&&d.year()>0==h[0]>0)){var p={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[g],v=m<0?-1:1;h=this._add(d,m*p[0]+v*p[1],p[2])}return d.date(h[0],h[1],h[2])},set:function(d,h,m){this._validate(d,this.minMonth,this.minDay,l.local.invalidDate||l.regionalOptions[""].invalidDate);var g=m==="y"?h:d.year(),p=m==="m"?h:d.month(),v=m==="d"?h:d.day();return m!=="y"&&m!=="m"||(v=Math.min(v,this.daysInMonth(g,p))),d.date(g,p,v)},isValid:function(d,h,m){this._validateLevel++;var g=this.hasYearZero||d!==0;if(g){var p=this.newDate(d,h,this.minDay);g=h>=this.minMonth&&h-this.minMonth=this.minDay&&m-this.minDay13.5?13:1),k=p-(w>2.5?4716:4715);return k<=0&&k--,this.newDate(k,w,x)},toJSDate:function(d,h,m){var g=this._validate(d,h,m,l.local.invalidDate||l.regionalOptions[""].invalidDate),p=new Date(g.year(),g.month()-1,g.day());return p.setHours(0),p.setMinutes(0),p.setSeconds(0),p.setMilliseconds(0),p.setHours(p.getHours()>12?p.getHours()+2:0),p},fromJSDate:function(d){return this.newDate(d.getFullYear(),d.getMonth()+1,d.getDate())}});var l=o.exports=new a;l.cdate=u,l.baseCalendar=i,l.calendars.gregorian=s},{"object-assign":247}],347:[function(e,o,f){var r=e("object-assign"),a=e("./main");r(a.regionalOptions[""],{invalidArguments:"Invalid arguments",invalidFormat:"Cannot format a date from another calendar",missingNumberAt:"Missing number at position {0}",unknownNameAt:"Unknown name at position {0}",unexpectedLiteralAt:"Unexpected literal at position {0}",unexpectedText:"Additional text found at end"}),a.local=a.regionalOptions[""],r(a.cdate.prototype,{formatDate:function(u,c){return typeof u!="string"&&(c=u,u=""),this._calendar.formatDate(u||"",this,c)}}),r(a.baseCalendar.prototype,{UNIX_EPOCH:a.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:a.instance().jdEpoch,TICKS_PER_DAY:864e9,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(u,c,i){if(typeof u!="string"&&(i=c,c=u,u=""),!c)return"";if(c.calendar()!==this)throw a.local.invalidFormat||a.regionalOptions[""].invalidFormat;u=u||this.local.dateFormat;for(var s,l,d,h,m=(i=i||{}).dayNamesShort||this.local.dayNamesShort,g=i.dayNames||this.local.dayNames,p=i.monthNumbers||this.local.monthNumbers,v=i.monthNamesShort||this.local.monthNamesShort,y=i.monthNames||this.local.monthNames,x=(i.calculateWeek||this.local.calculateWeek,function(D,O){for(var R=1;E+R1}),w=function(D,O,R,z){var L=""+O;if(x(D,z))for(;L.length1},M=function(N,B){var G=_(N,B),W=[2,3,G?4:2,G?4:2,10,11,20]["oyYJ@!".indexOf(N)+1],K=new RegExp("^-?\\d{1,"+W+"}"),te=c.substring(R).match(K);if(!te)throw(a.local.missingNumberAt||a.regionalOptions[""].missingNumberAt).replace(/\{0\}/,R);return R+=te[0].length,parseInt(te[0],10)},A=this,S=function(){if(typeof m=="function"){_("m");var N=m.call(A,c.substring(R));return R+=N.length,N}return M("m")},E=function(N,B,G,W){for(var K=_(N,W)?G:B,te=0;te-1){x=1,w=k;for(var P=this.daysInMonth(y,x);w>P;P=this.daysInMonth(y,x))x++,w-=P}return v>-1?this.fromJD(v):this.newDate(y,x,w)},determineDate:function(u,c,i,s,l){i&&typeof i!="object"&&(l=s,s=i,i=null),typeof s!="string"&&(l=s,s="");var d=this;return c=c?c.newDate():null,u=u==null?c:typeof u=="string"?function(h){try{return d.parseDate(s,h,l)}catch{}for(var m=((h=h.toLowerCase()).match(/^c/)&&i?i.newDate():null)||d.today(),g=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,p=g.exec(h);p;)m.add(parseInt(p[1],10),p[2]||"d"),p=g.exec(h);return m}(u):typeof u=="number"?isNaN(u)||u===1/0||u===-1/0?c:d.today().add(u,"d"):d.newDate(u)}})},{"./main":346,"object-assign":247}],348:[function(e,o,f){o.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0,noRotate:!0},{path:"M2,2V-2H-2V2Z",backoff:0,noRotate:!0}]},{}],349:[function(e,o,f){var r=e("./arrow_paths"),a=e("../../plots/font_attributes"),u=e("../../plots/cartesian/constants"),c=e("../../plot_api/plot_template").templatedArray;e("../../constants/axis_placeable_objects"),o.exports=c("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:a({editType:"calc+arraydraw",colorEditType:"arraydraw"}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw"},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},arrowcolor:{valType:"color",editType:"arraydraw"},arrowhead:{valType:"integer",min:0,max:r.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:r.length,dflt:1,editType:"arraydraw"},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw"},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw"},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},ax:{valType:"any",editType:"calc+arraydraw"},ay:{valType:"any",editType:"calc+arraydraw"},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",u.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",u.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",u.idRegex.x.toString()],editType:"calc"},x:{valType:"any",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},yref:{valType:"enumerated",values:["paper",u.idRegex.y.toString()],editType:"calc"},y:{valType:"any",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw"},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw"},xclick:{valType:"any",editType:"arraydraw"},yclick:{valType:"any",editType:"arraydraw"},hovertext:{valType:"string",editType:"arraydraw"},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw"},bordercolor:{valType:"color",editType:"arraydraw"},font:a({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc"}}})},{"../../constants/axis_placeable_objects":472,"../../plot_api/plot_template":543,"../../plots/cartesian/constants":561,"../../plots/font_attributes":585,"./arrow_paths":348}],350:[function(e,o,f){var r=e("../../lib"),a=e("../../plots/cartesian/axes"),u=e("./draw").draw;function c(s){var l=s._fullLayout;r.filterVisible(l.annotations).forEach(function(d){var h=a.getFromId(s,d.xref),m=a.getFromId(s,d.yref),g=a.getRefType(d.xref),p=a.getRefType(d.yref);d._extremes={},g==="range"&&i(d,h),p==="range"&&i(d,m)})}function i(s,l){var d,h=l._id,m=h.charAt(0),g=s[m],p=s["a"+m],v=s[m+"ref"],y=s["a"+m+"ref"],x=s["_"+m+"padplus"],w=s["_"+m+"padminus"],k={x:1,y:-1}[m]*s[m+"shift"],b=3*s.arrowsize*s.arrowwidth||0,T=b+k,_=b-k,M=3*s.startarrowsize*s.arrowwidth||0,A=M+k,S=M-k;if(y===v){var E=a.findExtremes(l,[l.r2c(g)],{ppadplus:T,ppadminus:_}),D=a.findExtremes(l,[l.r2c(p)],{ppadplus:Math.max(x,A),ppadminus:Math.max(w,S)});d={min:[E.min[0],D.min[0]],max:[E.max[0],D.max[0]]}}else A=p?A+p:A,S=p?S-p:S,d=a.findExtremes(l,[l.r2c(g)],{ppadplus:Math.max(x,T,A),ppadminus:Math.max(w,_,S)});s._extremes[h]=d}o.exports=function(s){var l=s._fullLayout;if(r.filterVisible(l.annotations).length&&s._fullData.length)return r.syncOrAsync([u,c],s)}},{"../../lib":503,"../../plots/cartesian/axes":554,"./draw":355}],351:[function(e,o,f){var r=e("../../lib"),a=e("../../registry"),u=e("../../plot_api/plot_template").arrayEditor;function c(s,l){var d,h,m,g,p,v,y,x=s._fullLayout.annotations,w=[],k=[],b=[],T=(l||[]).length;for(d=0;d0||d.explicitOff.length>0},onClick:function(s,l){var d,h,m=c(s,l),g=m.on,p=m.off.concat(m.explicitOff),v={},y=s._fullLayout.annotations;if(!(!g.length&&!p.length)){for(d=0;d2/3?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[bt]}for(var Fe=!1,Ve=["x","y"],Ke=0;Ke1)&&(Pt===vt?((dt=At.r2fraction(T["a"+ft]))<0||dt>1)&&(Fe=!0):Fe=!0),Re=At._offset+At.r2p(T[ft]),Ye=.5}else{var Pe=Tt==="domain";ft==="x"?(We=T[ft],Re=Pe?At._offset+At._length*We:Re=R.l+R.w*We):(We=1-T[ft],Re=Pe?At._offset+At._length*We:Re=R.t+R.h*We),Ye=T.showarrow?.5:We}if(T.showarrow){Ge.head=Re;var Ie=T["a"+ft];if(nt=et*ze(.5,T.xanchor)-Ot*ze(.5,T.yanchor),Pt===vt){var Ae=s.getRefType(Pt);Ae==="domain"?(ft==="y"&&(Ie=1-Ie),Ge.tail=At._offset+At._length*Ie):Ae==="paper"?ft==="y"?(Ie=1-Ie,Ge.tail=R.t+R.h*Ie):Ge.tail=R.l+R.w*Ie:Ge.tail=At._offset+At.r2p(Ie),qe=nt}else Ge.tail=Re+Ie,qe=nt+Ie;Ge.text=Ge.tail+nt;var De=O[ft==="x"?"width":"height"];if(vt==="paper"&&(Ge.head=c.constrain(Ge.head,1,De-1)),Pt==="pixel"){var He=-Math.max(Ge.tail-3,Ge.text),rt=Math.min(Ge.tail+3,Ge.text)-De;He>0?(Ge.tail+=He,Ge.text+=He):rt>0&&(Ge.tail-=rt,Ge.text-=rt)}Ge.tail+=Be,Ge.head+=Be}else qe=nt=Wt*ze(Ye,Jt),Ge.text=Re+nt;Ge.text+=Be,nt+=Be,qe+=Be,T["_"+ft+"padplus"]=Wt/2+qe,T["_"+ft+"padminus"]=Wt/2-qe,T["_"+ft+"size"]=Wt,T["_"+ft+"shift"]=nt}if(Fe)U.remove();else{var lt=0,ot=0;if(T.align!=="left"&&(lt=(ye-Oe)*(T.align==="center"?.5:1)),T.valign!=="top"&&(ot=(Me-de)*(T.valign==="middle"?.5:1)),we)_e.select("svg").attr({x:ne+lt-1,y:ne+ot}).call(d.setClipUrl,Q?G:null,b);else{var kt=ne+ot-Te.top,wt=ne+lt-Te.left;ue.call(m.positionText,wt,kt).call(d.setClipUrl,Q?G:null,b)}ee.select("rect").call(d.setRect,ne,ne,ye,Me),H.call(d.setRect,q/2,q/2,ke-q,Ee-q),U.call(d.setTranslate,Math.round(W.x.text-ke/2),Math.round(W.y.text-Ee/2)),Y.attr({transform:"rotate("+K+","+W.x.text+","+W.y.text+")"});var Vt,Ut=function(tt,bt){te.selectAll(".annotation-arrow-g").remove();var zt=W.x.head,St=W.y.head,Dt=W.x.tail+tt,Le=W.y.tail+bt,Je=W.x.text+tt,st=W.y.text+bt,Et=c.rotationXYMatrix(K,Je,st),It=c.apply2DTransform(Et),Zt=c.apply2DTransform2(Et),Kt=+H.attr("width"),Ht=+H.attr("height"),mn=Je-.5*Kt,zn=mn+Kt,pn=st-.5*Ht,tn=pn+Ht,nn=[[mn,pn,mn,tn],[mn,tn,zn,tn],[zn,tn,zn,pn],[zn,pn,mn,pn]].map(Zt);if(!nn.reduce(function(Ln,lr){return Ln^!!c.segmentsIntersect(zt,St,zt+1e6,St+1e6,lr[0],lr[1],lr[2],lr[3])},!1)){nn.forEach(function(Ln){var lr=c.segmentsIntersect(Dt,Le,zt,St,Ln[0],Ln[1],Ln[2],Ln[3]);lr&&(Dt=lr.x,Le=lr.y)});var sn=T.arrowwidth,gn=T.arrowcolor,bn=T.arrowside,In=te.append("g").style({opacity:l.opacity(gn)}).classed("annotation-arrow-g",!0),Hn=In.append("path").attr("d","M"+Dt+","+Le+"L"+zt+","+St).style("stroke-width",sn+"px").call(l.stroke,l.rgb(gn));if(y(Hn,bn,T),z.annotationPosition&&Hn.node().parentNode&&!M){var Wn=zt,ar=St;if(T.standoff){var Or=Math.sqrt(Math.pow(zt-Dt,2)+Math.pow(St-Le,2));Wn+=T.standoff*(Dt-zt)/Or,ar+=T.standoff*(Le-St)/Or}var vr,Er,Kn=In.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(Dt-Wn)+","+(Le-ar),transform:i(Wn,ar)}).style("stroke-width",sn+6+"px").call(l.stroke,"rgba(0,0,0,0)").call(l.fill,"rgba(0,0,0,0)");p.init({element:Kn.node(),gd:b,prepFn:function(){var Ln=d.getTranslate(U);vr=Ln.x,Er=Ln.y,A&&A.autorange&&P(A._name+".autorange",!0),S&&S.autorange&&P(S._name+".autorange",!0)},moveFn:function(Ln,lr){var Wr=It(vr,Er),Mn=Wr[0]+Ln,rr=Wr[1]+lr;U.call(d.setTranslate,Mn,rr),N("x",w(A,Ln,"x",R,T)),N("y",w(S,lr,"y",R,T)),T.axref===T.xref&&N("ax",w(A,Ln,"ax",R,T)),T.ayref===T.yref&&N("ay",w(S,lr,"ay",R,T)),In.attr("transform",i(Ln,lr)),Y.attr({transform:"rotate("+K+","+Mn+","+rr+")"})},doneFn:function(){a.call("_guiRelayout",b,B());var Ln=document.querySelector(".js-notes-box-panel");Ln&&Ln.redraw(Ln.selectedObj)}})}}};T.showarrow&&Ut(0,0),Z&&p.init({element:U.node(),gd:b,prepFn:function(){Vt=Y.attr("transform")},moveFn:function(tt,bt){var zt="pointer";if(T.showarrow)T.axref===T.xref?N("ax",w(A,tt,"ax",R,T)):N("ax",T.ax+tt),T.ayref===T.yref?N("ay",w(S,bt,"ay",R.w,T)):N("ay",T.ay+bt),Ut(tt,bt);else{if(M)return;var St,Dt;if(A)St=w(A,tt,"x",R,T);else{var Le=T._xsize/R.w,Je=T.x+(T._xshift-T.xshift)/R.w-Le/2;St=p.align(Je+tt/R.w,Le,0,1,T.xanchor)}if(S)Dt=w(S,bt,"y",R,T);else{var st=T._ysize/R.h,Et=T.y-(T._yshift+T.yshift)/R.h-st/2;Dt=p.align(Et-bt/R.h,st,0,1,T.yanchor)}N("x",St),N("y",Dt),A&&S||(zt=p.getCursor(A?.5:St,S?.5:Dt,T.xanchor,T.yanchor))}Y.attr({transform:i(tt,bt)+Vt}),g(U,zt)},clickFn:function(tt,bt){T.captureevents&&b.emit("plotly_clickannotation",le(bt))},doneFn:function(){g(U),a.call("_guiRelayout",b,B());var tt=document.querySelector(".js-notes-box-panel");tt&&tt.redraw(tt.selectedObj)}})}}}o.exports={draw:function(b){var T=b._fullLayout;T._infolayer.selectAll(".annotation").remove();for(var _=0;_=0,M=h.indexOf("end")>=0,A=w.backoff*b+m.standoff,S=k.backoff*T+m.startstandoff;if(x.nodeName==="line"){g={x:+d.attr("x1"),y:+d.attr("y1")},p={x:+d.attr("x2"),y:+d.attr("y2")};var E=g.x-p.x,D=g.y-p.y;if(y=(v=Math.atan2(D,E))+Math.PI,A&&S&&A+S>Math.sqrt(E*E+D*D))return void te();if(A){if(A*A>E*E+D*D)return void te();var O=A*Math.cos(v),R=A*Math.sin(v);p.x+=O,p.y+=R,d.attr({x2:p.x,y2:p.y})}if(S){if(S*S>E*E+D*D)return void te();var z=S*Math.cos(v),L=S*Math.sin(v);g.x-=z,g.y-=L,d.attr({x1:g.x,y1:g.y})}}else if(x.nodeName==="path"){var P=x.getTotalLength(),N="";if(P1){m=!0;break}}m?c.fullLayout._infolayer.select(".annotation-"+c.id+'[data-index="'+d+'"]').remove():(h._pdata=a(c.glplot.cameraParams,[i.xaxis.r2l(h.x)*s[0],i.yaxis.r2l(h.y)*s[1],i.zaxis.r2l(h.z)*s[2]]),r(c.graphDiv,h,d,c.id,h._xa,h._ya))}}},{"../../plots/gl3d/project":607,"../annotations/draw":355}],362:[function(e,o,f){var r=e("../../registry"),a=e("../../lib");o.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:e("./attributes")}}},layoutAttributes:e("./attributes"),handleDefaults:e("./defaults"),includeBasePlot:function(u,c){var i=r.subplotsRegistry.gl3d;if(!!i)for(var s=i.attrRegex,l=Object.keys(u),d=0;d=0)))return h;if(y===3)p[y]>1&&(p[y]=1);else if(p[y]>=1)return h}var x=Math.round(255*p[0])+", "+Math.round(255*p[1])+", "+Math.round(255*p[2]);return v?"rgba("+x+", "+p[3]+")":"rgb("+x+")"}c.tinyRGB=function(h){var m=h.toRgb();return"rgb("+Math.round(m.r)+", "+Math.round(m.g)+", "+Math.round(m.b)+")"},c.rgb=function(h){return c.tinyRGB(r(h))},c.opacity=function(h){return h?r(h).getAlpha():0},c.addOpacity=function(h,m){var g=r(h).toRgb();return"rgba("+Math.round(g.r)+", "+Math.round(g.g)+", "+Math.round(g.b)+", "+m+")"},c.combine=function(h,m){var g=r(h).toRgb();if(g.a===1)return r(h).toRgbString();var p=r(m||l).toRgb(),v=p.a===1?p:{r:255*(1-p.a)+p.r*p.a,g:255*(1-p.a)+p.g*p.a,b:255*(1-p.a)+p.b*p.a},y={r:v.r*(1-g.a)+g.r*g.a,g:v.g*(1-g.a)+g.g*g.a,b:v.b*(1-g.a)+g.b*g.a};return r(y).toRgbString()},c.contrast=function(h,m,g){var p=r(h);return p.getAlpha()!==1&&(p=r(c.combine(h,l))),(p.isDark()?m?p.lighten(m):l:g?p.darken(g):s).toString()},c.stroke=function(h,m){var g=r(m);h.style({stroke:c.tinyRGB(g),"stroke-opacity":g.getAlpha()})},c.fill=function(h,m){var g=r(m);h.style({fill:c.tinyRGB(g),"fill-opacity":g.getAlpha()})},c.clean=function(h){if(h&&typeof h=="object"){var m,g,p,v,y=Object.keys(h);for(m=0;m0?Ie>=lt:Ie<=lt));Ae++)Ie>kt&&Ie0?Ie>=lt:Ie<=lt));Ae++)Ie>Pe[0]&&Ie1){var Pt=Math.pow(10,Math.floor(Math.log(vt)/Math.LN10));nt*=Pt*l.roundUp(vt/Pt,[2,5,10]),(Math.abs(we.start)/we.size+1e-6)%1<2e-6&&(We.tick0=0)}We.dtick=nt}We.domain=B?[Re+ne/ie.h,Re+Ee-ne/ie.h]:[Re+$/ie.w,Re+Ee-$/ie.w],We.setScale(),L.attr("transform",d(Math.round(ie.l),Math.round(ie.t)));var At,at=L.select("."+S.cbtitleunshift).attr("transform",d(-Math.round(ie.l),-Math.round(ie.t))),et=We.ticklabelposition,Ot=We.title.font.size,Wt=L.select("."+S.cbaxis),Jt=0,Be=0;function Ge(Tt,dt){var Pe={propContainer:We,propName:P._propPrefix+"title",traceIndex:P._traceIndex,_meta:P._meta,placeholder:ee._dfltTitle.colorbar,containerGroup:L.select("."+S.cbtitle)},Ie=Tt.charAt(0)==="h"?Tt.substr(1):"h"+Tt;L.selectAll("."+Ie+",."+Ie+"-math-group").remove(),v.draw(N,Tt,h(Pe,dt||{}))}return l.syncOrAsync([u.previousPromises,function(){var Tt,dt;(B&&Ye||!B&&!Ye)&&(ge==="top"&&(Tt=$+ie.l+ie.w*H,dt=ne+ie.t+ie.h*(1-Re-Ee)+3+.75*Ot),ge==="bottom"&&(Tt=$+ie.l+ie.w*H,dt=ne+ie.t+ie.h*(1-Re)-3-.25*Ot),ge==="right"&&(dt=ne+ie.t+ie.h*Q+3+.75*Ot,Tt=$+ie.l+ie.w*Re),Ge(We._id+"title",{attributes:{x:Tt,y:dt,"text-anchor":B?"start":"middle"}}))},function(){if(!B&&!Ye||B&&Ye){var Tt,dt=L.select("."+S.cbtitle),Pe=dt.select("text"),Ie=[-Y/2,Y/2],Ae=dt.select(".h"+We._id+"title-math-group").node(),De=15.6;if(Pe.node()&&(De=parseInt(Pe.node().style.fontSize,10)*_),Ae?(Tt=g.bBox(Ae),Be=Tt.width,(Jt=Tt.height)>De&&(Ie[1]-=(Jt-De)/2)):Pe.node()&&!Pe.classed(S.jsPlaceholder)&&(Tt=g.bBox(Pe.node()),Be=Tt.width,Jt=Tt.height),B){if(Jt){if(Jt+=5,ge==="top")We.domain[1]-=Jt/ie.h,Ie[1]*=-1;else{We.domain[0]+=Jt/ie.h;var He=y.lineCount(Pe);Ie[1]+=(1-He)*De}dt.attr("transform",d(Ie[0],Ie[1])),We.setScale()}}else Be&&(ge==="right"&&(We.domain[0]+=(Be+Ot/2)/ie.w),dt.attr("transform",d(Ie[0],Ie[1])),We.setScale())}L.selectAll("."+S.cbfills+",."+S.cblines).attr("transform",B?d(0,Math.round(ie.h*(1-We.domain[1]))):d(Math.round(ie.w*We.domain[0]),0)),Wt.attr("transform",B?d(0,Math.round(-ie.t)):d(Math.round(-ie.l),0));var rt=L.select("."+S.cbfills).selectAll("rect."+S.cbfill).attr("style","").data(Oe);rt.enter().append("rect").classed(S.cbfill,!0).style("stroke","none"),rt.exit().remove();var lt=fe.map(We.c2p).map(Math.round).sort(function(Ut,tt){return Ut-tt});rt.each(function(Ut,tt){var bt=[tt===0?fe[0]:(Oe[tt]+Oe[tt-1])/2,tt===Oe.length-1?fe[1]:(Oe[tt]+Oe[tt+1])/2].map(We.c2p).map(Math.round);B&&(bt[1]=l.constrain(bt[1]+(bt[1]>bt[0])?1:-1,lt[0],lt[1]));var zt=r.select(this).attr(B?"x":"y",ze).attr(B?"y":"x",r.min(bt)).attr(B?"width":"height",Math.max(ye,2)).attr(B?"height":"width",Math.max(r.max(bt)-r.min(bt),2));if(P._fillgradient)g.gradient(zt,N,P._id,B?"vertical":"horizontalreversed",P._fillgradient,"fill");else{var St=_e(Ut).replace("e-","");zt.attr("fill",a(St).toHexString())}});var ot=L.select("."+S.cblines).selectAll("path."+S.cbline).data(ue.color&&ue.width?de:[]);ot.enter().append("path").classed(S.cbline,!0),ot.exit().remove(),ot.each(function(Ut){var tt=ze,bt=Math.round(We.c2p(Ut))+ue.width/2%1;r.select(this).attr("d","M"+(B?tt+","+bt:bt+","+tt)+(B?"h":"v")+ye).call(g.lineGroupStyle,ue.width,me(Ut),ue.dash)}),Wt.selectAll("g."+We._id+"tick,path").remove();var kt=ze+ye+(Y||0)/2-(P.ticks==="outside"?1:0),wt=i.calcTicks(We),Vt=i.getTickSigns(We)[2];return i.drawTicks(N,We,{vals:We.ticks==="inside"?i.clipEnds(We,wt):wt,layer:Wt,path:i.makeTickPath(We,kt,Vt),transFn:i.makeTransTickFn(We)}),i.drawLabels(N,We,{vals:wt,layer:Wt,transFn:i.makeTransTickLabelFn(We),labelFns:i.makeLabelFns(We,kt)})},function(){if(B&&!Ye||!B&&Ye){var Tt,dt,Pe=We.position||0,Ie=We._offset+We._length/2;if(ge==="right")dt=Ie,Tt=ie.l+ie.w*Pe+10+Ot*(We.showticklabels?1:.5);else if(Tt=Ie,ge==="bottom"&&(dt=ie.t+ie.h*Pe+10+(et.indexOf("inside")===-1?We.tickfont.size:0)+(We.ticks!=="intside"&&P.ticklen||0)),ge==="top"){var Ae=le.text.split("
").length;dt=ie.t+ie.h*Pe+10-ye-_*Ot*Ae}Ge((B?"h":"v")+We._id+"title",{avoid:{selection:r.select(N).selectAll("g."+We._id+"tick"),side:ge,offsetTop:B?0:ie.t,offsetLeft:B?ie.l:0,maxShift:B?ee.width:ee.height},attributes:{x:Tt,y:dt,"text-anchor":"middle"},transform:{rotate:B?-90:0,offset:0}})}},u.previousPromises,function(){var Tt,dt=ye+Y/2;et.indexOf("inside")===-1&&(Tt=g.bBox(Wt.node()),dt+=B?Tt.width:Tt.height),At=at.select("text");var Pe=0,Ie=B&&ge==="top",Ae=!B&&ge==="right",De=0;if(At.node()&&!At.classed(S.jsPlaceholder)){var He,rt=at.select(".h"+We._id+"title-math-group").node();rt&&(B&&Ye||!B&&!Ye)?(Pe=(Tt=g.bBox(rt)).width,He=Tt.height):(Pe=(Tt=g.bBox(at.node())).right-ie.l-(B?ze:qe),He=Tt.bottom-ie.t-(B?qe:ze),B||ge!=="top"||(dt+=Tt.height,De=Tt.height)),Ae&&(At.attr("transform",d(Pe/2+Ot/2,0)),Pe*=2),dt=Math.max(dt,B?Pe:He)}var lt=2*(B?$:ne)+dt+Z+Y/2,ot=0;!B&&le.text&&q==="bottom"&&Q<=0&&(lt+=ot=lt/2,De+=ot),ee._hColorbarMoveTitle=ot,ee._hColorbarMoveCBTitle=De;var kt=Z+Y;L.select("."+S.cbbg).attr("x",(B?ze:qe)-kt/2-(B?$:0)).attr("y",(B?qe:ze)-(B?ke:ne+De-ot)).attr(B?"width":"height",Math.max(lt-ot,2)).attr(B?"height":"width",Math.max(ke+kt,2)).call(p.fill,re).call(p.stroke,P.bordercolor).style("stroke-width",Z);var wt=Ae?Math.max(Pe-10,0):0;if(L.selectAll("."+S.cboutline).attr("x",(B?ze:qe+$)+wt).attr("y",(B?qe+ne-ke:ze)+(Ie?Jt:0)).attr(B?"width":"height",Math.max(ye,2)).attr(B?"height":"width",Math.max(ke-(B?2*ne+Jt:2*$+wt),2)).call(p.stroke,P.outlinecolor).style({fill:"none","stroke-width":Y}),L.attr("transform",d(ie.l-(B?Fe*lt:0),ie.t-(B?0:(1-Ve)*lt-De))),!B&&(Z||a(re).getAlpha()&&!a.equals(ee.paper_bgcolor,re))){var Vt=Wt.selectAll("text"),Ut=Vt[0].length,tt=L.select("."+S.cbbg).node(),bt=g.bBox(tt),zt=g.getTranslate(L);Vt.each(function(It,Zt){var Kt=Ut-1;if(Zt===0||Zt===Kt){var Ht,mn=g.bBox(this),zn=g.getTranslate(this);if(Zt===Kt){var pn=mn.right+zn.x;(Ht=bt.right+zt.x+qe-Z-2+H-pn)>0&&(Ht=0)}else if(Zt===0){var tn=mn.left+zn.x;(Ht=bt.left+zt.x+qe+Z+2-tn)<0&&(Ht=0)}Ht&&(Ut<3?this.setAttribute("transform","translate("+Ht+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var St={},Dt=M[U],Le=A[U],Je=M[q],st=A[q],Et=lt-ye;B?(W==="pixels"?(St.y=Q,St.t=ke*Je,St.b=ke*st):(St.t=St.b=0,St.yt=Q+G*Je,St.yb=Q-G*st),te==="pixels"?(St.x=H,St.l=lt*Dt,St.r=lt*Le):(St.l=Et*Dt,St.r=Et*Le,St.xl=H-K*Dt,St.xr=H+K*Le)):(W==="pixels"?(St.x=H,St.l=ke*Dt,St.r=ke*Le):(St.l=St.r=0,St.xl=H+G*Dt,St.xr=H-G*Le),te==="pixels"?(St.y=1-Q,St.t=lt*Je,St.b=lt*st):(St.t=Et*Je,St.b=Et*st,St.yt=Q-K*Je,St.yb=Q+K*st)),u.autoMargin(N,P._id,St)}],N)}(R,O,E);z&&z.then&&(E._promises||[]).push(z),E._context.edits.colorbarPosition&&function(L,P,N){var B,G,W,K=P.orientation==="v",te=N._fullLayout._size;s.init({element:L.node(),gd:N,prepFn:function(){B=L.attr("transform"),m(L)},moveFn:function(Y,Z){L.attr("transform",B+d(Y,Z)),G=s.align((K?P._uFrac:P._vFrac)+Y/te.w,K?P._thickFrac:P._lenFrac,0,1,P.xanchor),W=s.align((K?P._vFrac:1-P._uFrac)-Z/te.h,K?P._lenFrac:P._thickFrac,0,1,P.yanchor);var re=s.getCursor(G,W,P.xanchor,P.yanchor);m(L,re)},doneFn:function(){if(m(L),G!==void 0&&W!==void 0){var Y={};Y[P._propPrefix+"x"]=G,Y[P._propPrefix+"y"]=W,P._traceIndex!==void 0?c.call("_guiRestyle",N,Y,P._traceIndex):c.call("_guiRelayout",N,Y)}}})}(R,O,E)}),D.exit().each(function(O){u.autoMargin(E,O._id)}).remove(),D.order()}}},{"../../constants/alignment":471,"../../lib":503,"../../lib/extend":493,"../../lib/setcursor":524,"../../lib/svg_text_utils":529,"../../plots/cartesian/axes":554,"../../plots/cartesian/axis_defaults":556,"../../plots/cartesian/layout_attributes":569,"../../plots/cartesian/position_defaults":572,"../../plots/plots":619,"../../registry":638,"../color":366,"../colorscale/helpers":377,"../dragelement":385,"../drawing":388,"../titles":464,"./constants":368,"@plotly/d3":58,tinycolor2:312}],371:[function(e,o,f){var r=e("../../lib");o.exports=function(a){return r.isPlainObject(a.colorbar)}},{"../../lib":503}],372:[function(e,o,f){o.exports={moduleType:"component",name:"colorbar",attributes:e("./attributes"),supplyDefaults:e("./defaults"),draw:e("./draw").draw,hasColorbar:e("./has_colorbar")}},{"./attributes":367,"./defaults":369,"./draw":370,"./has_colorbar":371}],373:[function(e,o,f){var r=e("../colorbar/attributes"),a=e("../../lib/regex").counter,u=e("../../lib/sort_object_keys"),c=e("./scales.js").scales;u(c);function i(s){return"`"+s+"`"}o.exports=function(s,l){s=s||"";var d,h=(l=l||{}).cLetter||"c",m=("onlyIfNumerical"in l?l.onlyIfNumerical:Boolean(s),"noScale"in l?l.noScale:s==="marker.line"),g="showScaleDflt"in l?l.showScaleDflt:h==="z",p=typeof l.colorscaleDflt=="string"?c[l.colorscaleDflt]:null,v=l.editTypeOverride||"",y=s?s+".":"";"colorAttr"in l?(d=l.colorAttr,l.colorAttr):i(y+(d={z:"z",c:"color"}[h]));var x=h+"auto",w=h+"min",k=h+"max",b=h+"mid",T={};T[w]=T[k]=void 0;var _={};_[x]=!1;var M={};return d==="color"&&(M.color={valType:"color",arrayOk:!0,editType:v||"style"},l.anim&&(M.color.anim=!0)),M[x]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:T},M[w]={valType:"number",dflt:null,editType:v||"plot",impliedEdits:_},M[k]={valType:"number",dflt:null,editType:v||"plot",impliedEdits:_},M[b]={valType:"number",dflt:null,editType:"calc",impliedEdits:T},M.colorscale={valType:"colorscale",editType:"calc",dflt:p,impliedEdits:{autocolorscale:!1}},M.autocolorscale={valType:"boolean",dflt:l.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0}},M.reversescale={valType:"boolean",dflt:!1,editType:"plot"},m||(M.showscale={valType:"boolean",dflt:g,editType:"calc"},M.colorbar=r),l.noColorAxis||(M.coloraxis={valType:"subplotid",regex:a("coloraxis"),dflt:null,editType:"calc"}),M}},{"../../lib/regex":520,"../../lib/sort_object_keys":526,"../colorbar/attributes":367,"./scales.js":381}],374:[function(e,o,f){var r=e("fast-isnumeric"),a=e("../../lib"),u=e("./helpers").extractOpts;o.exports=function(c,i,s){var l,d=c._fullLayout,h=s.vals,m=s.containerStr,g=m?a.nestedProperty(i,m).get():i,p=u(g),v=p.auto!==!1,y=p.min,x=p.max,w=p.mid,k=function(){return a.aggNums(Math.min,null,h)},b=function(){return a.aggNums(Math.max,null,h)};y===void 0?y=k():v&&(y=g._colorAx&&r(y)?Math.min(y,k()):k()),x===void 0?x=b():v&&(x=g._colorAx&&r(x)?Math.max(x,b()):b()),v&&w!==void 0&&(x-w>w-y?y=w-(x-w):x-w=0?d.colorscale.sequential:d.colorscale.sequentialminus,p._sync("colorscale",l))}},{"../../lib":503,"./helpers":377,"fast-isnumeric":190}],375:[function(e,o,f){var r=e("../../lib"),a=e("./helpers").hasColorscale,u=e("./helpers").extractOpts;o.exports=function(c,i){function s(v,y){var x=v["_"+y];x!==void 0&&(v[y]=x)}function l(v,y){var x=y.container?r.nestedProperty(v,y.container).get():v;if(x)if(x.coloraxis)x._colorAx=i[x.coloraxis];else{var w=u(x),k=w.auto;(k||w.min===void 0)&&s(x,y.min),(k||w.max===void 0)&&s(x,y.max),w.autocolorscale&&s(x,"colorscale")}}for(var d=0;d=0;k--,b++){var T=y[k];w[b]=[1-T[0],T[1]]}return w}function p(y,x){x=x||{};for(var w=y.domain,k=y.range,b=k.length,T=new Array(b),_=0;_4/3-d?l:d}},{}],383:[function(e,o,f){var r=e("../../lib"),a=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];o.exports=function(u,c,i,s){return u=i==="left"?0:i==="center"?1:i==="right"?2:r.constrain(Math.floor(3*u),0,2),c=s==="bottom"?0:s==="middle"?1:s==="top"?2:r.constrain(Math.floor(3*c),0,2),a[c][u]}},{"../../lib":503}],384:[function(e,o,f){f.selectMode=function(r){return r==="lasso"||r==="select"},f.drawMode=function(r){return r==="drawclosedpath"||r==="drawopenpath"||r==="drawline"||r==="drawrect"||r==="drawcircle"},f.openMode=function(r){return r==="drawline"||r==="drawopenpath"},f.rectMode=function(r){return r==="select"||r==="drawline"||r==="drawrect"||r==="drawcircle"},f.freeMode=function(r){return r==="lasso"||r==="drawclosedpath"||r==="drawopenpath"},f.selectingOrDrawing=function(r){return f.freeMode(r)||f.rectMode(r)}},{}],385:[function(e,o,f){var r=e("mouse-event-offset"),a=e("has-hover"),u=e("has-passive-events"),c=e("../../lib").removeElement,i=e("../../plots/cartesian/constants"),s=o.exports={};s.align=e("./align"),s.getCursor=e("./cursor");var l=e("./unhover");function d(){var m=document.createElement("div");m.className="dragcover";var g=m.style;return g.position="fixed",g.left=0,g.right=0,g.top=0,g.bottom=0,g.zIndex=999999999,g.background="none",document.body.appendChild(m),m}function h(m){return r(m.changedTouches?m.changedTouches[0]:m,document.body)}s.unhover=l.wrapped,s.unhoverRaw=l.raw,s.init=function(m){var g,p,v,y,x,w,k,b,T=m.gd,_=1,M=T._context.doubleClickDelay,A=m.element;T._mouseDownTime||(T._mouseDownTime=0),A.style.pointerEvents="all",A.onmousedown=E,u?(A._ontouchstart&&A.removeEventListener("touchstart",A._ontouchstart),A._ontouchstart=E,A.addEventListener("touchstart",E,{passive:!1})):A.ontouchstart=E;var S=m.clampFn||function(R,z,L){return Math.abs(R)M&&(_=Math.max(_-1,1)),T._dragged)m.doneFn&&m.doneFn();else if(m.clickFn&&m.clickFn(_,w),!b){var z;try{z=new MouseEvent("click",R)}catch{var L=h(R);(z=document.createEvent("MouseEvents")).initMouseEvent("click",R.bubbles,R.cancelable,R.view,R.detail,R.screenX,R.screenY,L[0],L[1],R.ctrlKey,R.altKey,R.shiftKey,R.metaKey,R.button,R.relatedTarget)}k.dispatchEvent(z)}T._dragging=!1,T._dragged=!1}else T._dragged=!1}},s.coverSlip=d},{"../../lib":503,"../../plots/cartesian/constants":561,"./align":382,"./cursor":383,"./unhover":386,"has-hover":228,"has-passive-events":229,"mouse-event-offset":242}],386:[function(e,o,f){var r=e("../../lib/events"),a=e("../../lib/throttle"),u=e("../../lib/dom").getGraphDiv,c=e("../fx/constants"),i=o.exports={};i.wrapped=function(s,l,d){(s=u(s))._fullLayout&&a.clear(s._fullLayout._uid+c.HOVERID),i.raw(s,l,d)},i.raw=function(s,l){var d=s._fullLayout,h=s._hoverdata;l||(l={}),l.target&&!s._dragged&&r.triggerHandler(s,"plotly_beforehover",l)===!1||(d._hoverlayer.selectAll("g").remove(),d._hoverlayer.selectAll("line").remove(),d._hoverlayer.selectAll("circle").remove(),s._hoverdata=void 0,l.target&&h&&s.emit("plotly_unhover",{event:l,points:h}))}},{"../../lib/dom":491,"../../lib/events":492,"../../lib/throttle":530,"../fx/constants":400}],387:[function(e,o,f){f.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},f.pattern={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style"},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style"},bgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgopacity:{valType:"number",editType:"style",min:0,max:1},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style"},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style"},editType:"style"}},{}],388:[function(e,o,f){var r=e("@plotly/d3"),a=e("../../lib"),u=a.numberFormat,c=e("fast-isnumeric"),i=e("tinycolor2"),s=e("../../registry"),l=e("../color"),d=e("../colorscale"),h=a.strTranslate,m=e("../../lib/svg_text_utils"),g=e("../../constants/xmlns_namespaces"),p=e("../../constants/alignment").LINE_SPACING,v=e("../../constants/interactions").DESELECTDIM,y=e("../../traces/scatter/subtypes"),x=e("../../traces/scatter/make_bubble_size_func"),w=e("../../components/fx/helpers").appendArrayPointValue,k=o.exports={};function b(Y,Z,re){var U=Z.fillpattern,q=U&&k.getPatternAttr(U.shape,0,"");if(q){var $=k.getPatternAttr(U.bgcolor,0,null),ne=k.getPatternAttr(U.fgcolor,0,null),H=U.fgopacity,Q=k.getPatternAttr(U.size,0,8),ee=k.getPatternAttr(U.solidity,0,.3),ie=Z.uid;k.pattern(Y,"point",re,ie,q,Q,ee,void 0,U.fillmode,$,ne,H)}else Z.fillcolor&&Y.call(l.fill,Z.fillcolor)}k.font=function(Y,Z,re,U){a.isPlainObject(Z)&&(U=Z.color,re=Z.size,Z=Z.family),Z&&Y.style("font-family",Z),re+1&&Y.style("font-size",re+"px"),U&&Y.call(l.fill,U)},k.setPosition=function(Y,Z,re){Y.attr("x",Z).attr("y",re)},k.setSize=function(Y,Z,re){Y.attr("width",Z).attr("height",re)},k.setRect=function(Y,Z,re,U,q){Y.call(k.setPosition,Z,re).call(k.setSize,U,q)},k.translatePoint=function(Y,Z,re,U){var q=re.c2p(Y.x),$=U.c2p(Y.y);return!!(c(q)&&c($)&&Z.node())&&(Z.node().nodeName==="text"?Z.attr("x",q).attr("y",$):Z.attr("transform",h(q,$)),!0)},k.translatePoints=function(Y,Z,re){Y.each(function(U){var q=r.select(this);k.translatePoint(U,q,Z,re)})},k.hideOutsideRangePoint=function(Y,Z,re,U,q,$){Z.attr("display",re.isPtWithinRange(Y,q)&&U.isPtWithinRange(Y,$)?null:"none")},k.hideOutsideRangePoints=function(Y,Z){if(Z._hasClipOnAxisFalse){var re=Z.xaxis,U=Z.yaxis;Y.each(function(q){var $=q[0].trace,ne=$.xcalendar,H=$.ycalendar,Q=s.traceIs($,"bar-like")?".bartext":".point,.textpoint";Y.selectAll(Q).each(function(ee){k.hideOutsideRangePoint(ee,r.select(this),re,U,ne,H)})})}},k.crispRound=function(Y,Z,re){return Z&&c(Z)?Y._context.staticPlot?Z:Z<1?1:Math.round(Z):re||0},k.singleLineStyle=function(Y,Z,re,U,q){Z.style("fill","none");var $=(((Y||[])[0]||{}).trace||{}).line||{},ne=re||$.width||0,H=q||$.dash||"";l.stroke(Z,U||$.color),k.dashLine(Z,H,ne)},k.lineGroupStyle=function(Y,Z,re,U){Y.style("fill","none").each(function(q){var $=(((q||[])[0]||{}).trace||{}).line||{},ne=Z||$.width||0,H=U||$.dash||"";r.select(this).call(l.stroke,re||$.color).call(k.dashLine,H,ne)})},k.dashLine=function(Y,Z,re){re=+re||0,Z=k.dashStyle(Z,re),Y.style({"stroke-dasharray":Z,"stroke-width":re+"px"})},k.dashStyle=function(Y,Z){Z=+Z||1;var re=Math.max(Z,3);return Y==="solid"?Y="":Y==="dot"?Y=re+"px,"+re+"px":Y==="dash"?Y=3*re+"px,"+3*re+"px":Y==="longdash"?Y=5*re+"px,"+5*re+"px":Y==="dashdot"?Y=3*re+"px,"+re+"px,"+re+"px,"+re+"px":Y==="longdashdot"&&(Y=5*re+"px,"+2*re+"px,"+re+"px,"+2*re+"px"),Y},k.singleFillStyle=function(Y,Z){var re=r.select(Y.node());b(Y,((re.data()[0]||[])[0]||{}).trace||{},Z)},k.fillGroupStyle=function(Y,Z){Y.style("stroke-width",0).each(function(re){var U=r.select(this);re[0].trace&&b(U,re[0].trace,Z)})};var T=e("./symbol_defs");k.symbolNames=[],k.symbolFuncs=[],k.symbolNeedLines={},k.symbolNoDot={},k.symbolNoFill={},k.symbolList=[],Object.keys(T).forEach(function(Y){var Z=T[Y],re=Z.n;k.symbolList.push(re,String(re),Y,re+100,String(re+100),Y+"-open"),k.symbolNames[re]=Y,k.symbolFuncs[re]=Z.f,Z.needLine&&(k.symbolNeedLines[re]=!0),Z.noDot?k.symbolNoDot[re]=!0:k.symbolList.push(re+200,String(re+200),Y+"-dot",re+300,String(re+300),Y+"-open-dot"),Z.noFill&&(k.symbolNoFill[re]=!0)});var _=k.symbolNames.length;function M(Y,Z){var re=Y%100;return k.symbolFuncs[re](Z)+(Y>=200?"M0,0.5L0.5,0L0,-0.5L-0.5,0Z":"")}k.symbolNumber=function(Y){if(c(Y))Y=+Y;else if(typeof Y=="string"){var Z=0;Y.indexOf("-open")>0&&(Z=100,Y=Y.replace("-open","")),Y.indexOf("-dot")>0&&(Z+=200,Y=Y.replace("-dot","")),(Y=k.symbolNames.indexOf(Y))>=0&&(Y+=Z)}return Y%100>=_||Y>=400?0:Math.floor(Math.max(Y,0))};var A={x1:1,x2:0,y1:0,y2:0},S={x1:0,x2:0,y1:1,y2:0},E=u("~f"),D={radial:{node:"radialGradient"},radialreversed:{node:"radialGradient",reversed:!0},horizontal:{node:"linearGradient",attrs:A},horizontalreversed:{node:"linearGradient",attrs:A,reversed:!0},vertical:{node:"linearGradient",attrs:S},verticalreversed:{node:"linearGradient",attrs:S,reversed:!0}};k.gradient=function(Y,Z,re,U,q,$){for(var ne=q.length,H=D[U],Q=new Array(ne),ee=0;ee=100,Z.attr("d",M(Q,H))}var ee,ie,ae,ue=!1;if(Y.so)ae=ne.outlierwidth,ie=ne.outliercolor,ee=$.outliercolor;else{var le=(ne||{}).width;ae=(Y.mlw+1||le+1||(Y.trace?(Y.trace.marker.line||{}).width:0)+1)-1||0,ie="mlc"in Y?Y.mlcc=U.lineScale(Y.mlc):a.isArrayOrTypedArray(ne.color)?l.defaultLine:ne.color,a.isArrayOrTypedArray($.color)&&(ee=l.defaultLine,ue=!0),ee="mc"in Y?Y.mcc=U.markerScale(Y.mc):$.color||"rgba(0,0,0,0)",U.selectedColorFn&&(ee=U.selectedColorFn(Y))}if(Y.om)Z.call(l.stroke,ee).style({"stroke-width":(ae||1)+"px",fill:"none"});else{Z.style("stroke-width",(Y.isBlank?0:ae)+"px");var ge=$.gradient,fe=Y.mgt;fe?ue=!0:fe=ge&&ge.type,a.isArrayOrTypedArray(fe)&&(fe=fe[0],D[fe]||(fe=0));var me=$.pattern,_e=me&&k.getPatternAttr(me.shape,Y.i,"");if(fe&&fe!=="none"){var we=Y.mgc;we?ue=!0:we=ge.color;var Te=re.uid;ue&&(Te+="-"+Y.i),k.gradient(Z,q,Te,fe,[[0,we],[1,ee]],"fill")}else if(_e){var Oe=k.getPatternAttr(me.bgcolor,Y.i,null),de=k.getPatternAttr(me.fgcolor,Y.i,null),ye=me.fgopacity,Me=k.getPatternAttr(me.size,Y.i,8),ke=k.getPatternAttr(me.solidity,Y.i,.3),Ee=Y.mcc||a.isArrayOrTypedArray(me.shape)||a.isArrayOrTypedArray(me.bgcolor)||a.isArrayOrTypedArray(me.size)||a.isArrayOrTypedArray(me.solidity),ze=re.uid;Ee&&(ze+="-"+Y.i),k.pattern(Z,"point",q,ze,_e,Me,ke,Y.mcc,me.fillmode,Oe,de,ye)}else l.fill(Z,ee);ae&&l.stroke(Z,ie)}},k.makePointStyleFns=function(Y){var Z={},re=Y.marker;return Z.markerScale=k.tryColorscale(re,""),Z.lineScale=k.tryColorscale(re,"line"),s.traceIs(Y,"symbols")&&(Z.ms2mrc=y.isBubble(Y)?x(Y):function(){return(re.size||6)/2}),Y.selectedpoints&&a.extendFlat(Z,k.makeSelectedPointStyleFns(Y)),Z},k.makeSelectedPointStyleFns=function(Y){var Z={},re=Y.selected||{},U=Y.unselected||{},q=Y.marker||{},$=re.marker||{},ne=U.marker||{},H=q.opacity,Q=$.opacity,ee=ne.opacity,ie=Q!==void 0,ae=ee!==void 0;(a.isArrayOrTypedArray(H)||ie||ae)&&(Z.selectedOpacityFn=function(Oe){var de=Oe.mo===void 0?q.opacity:Oe.mo;return Oe.selected?ie?Q:de:ae?ee:v*de});var ue=q.color,le=$.color,ge=ne.color;(le||ge)&&(Z.selectedColorFn=function(Oe){var de=Oe.mcc||ue;return Oe.selected?le||de:ge||de});var fe=q.size,me=$.size,_e=ne.size,we=me!==void 0,Te=_e!==void 0;return s.traceIs(Y,"symbols")&&(we||Te)&&(Z.selectedSizeFn=function(Oe){var de=Oe.mrc||fe/2;return Oe.selected?we?me/2:de:Te?_e/2:de}),Z},k.makeSelectedTextStyleFns=function(Y){var Z={},re=Y.selected||{},U=Y.unselected||{},q=Y.textfont||{},$=re.textfont||{},ne=U.textfont||{},H=q.color,Q=$.color,ee=ne.color;return Z.selectedTextColorFn=function(ie){var ae=ie.tc||H;return ie.selected?Q||ae:ee||(Q?ae:l.addOpacity(ae,v))},Z},k.selectedPointStyle=function(Y,Z){if(Y.size()&&Z.selectedpoints){var re=k.makeSelectedPointStyleFns(Z),U=Z.marker||{},q=[];re.selectedOpacityFn&&q.push(function($,ne){$.style("opacity",re.selectedOpacityFn(ne))}),re.selectedColorFn&&q.push(function($,ne){l.fill($,re.selectedColorFn(ne))}),re.selectedSizeFn&&q.push(function($,ne){var H=ne.mx||U.symbol||0,Q=re.selectedSizeFn(ne);$.attr("d",M(k.symbolNumber(H),Q)),ne.mrc2=Q}),q.length&&Y.each(function($){for(var ne=r.select(this),H=0;H0?re:0}k.textPointStyle=function(Y,Z,re){if(Y.size()){var U;if(Z.selectedpoints){var q=k.makeSelectedTextStyleFns(Z);U=q.selectedTextColorFn}var $=Z.texttemplate,ne=re._fullLayout;Y.each(function(H){var Q=r.select(this),ee=$?a.extractOption(H,Z,"txt","texttemplate"):a.extractOption(H,Z,"tx","text");if(ee||ee===0){if($){var ie=Z._module.formatLabels,ae=ie?ie(H,Z,ne):{},ue={};w(ue,Z,H.i);var le=Z._meta||{};ee=a.texttemplateString(ee,ae,ne._d3locale,ue,H,le)}var ge=H.tp||Z.textposition,fe=z(H,Z),me=U?U(H):H.tc||Z.textfont.color;Q.call(k.font,H.tf||Z.textfont.family,fe,me).text(ee).call(m.convertToTspans,re).call(R,ge,fe,H.mrc)}else Q.remove()})}},k.selectedTextStyle=function(Y,Z){if(Y.size()&&Z.selectedpoints){var re=k.makeSelectedTextStyleFns(Z);Y.each(function(U){var q=r.select(this),$=re.selectedTextColorFn(U),ne=U.tp||Z.textposition,H=z(U,Z);l.fill(q,$);var Q=s.traceIs(Z,"bar-like");R(q,ne,H,U.mrc2||U.mrc,Q)})}};function L(Y,Z,re,U){var q=Y[0]-Z[0],$=Y[1]-Z[1],ne=re[0]-Z[0],H=re[1]-Z[1],Q=Math.pow(q*q+$*$,.25),ee=Math.pow(ne*ne+H*H,.25),ie=(ee*ee*q-Q*Q*ne)*U,ae=(ee*ee*$-Q*Q*H)*U,ue=3*ee*(Q+ee),le=3*Q*(Q+ee);return[[r.round(Z[0]+(ue&&ie/ue),2),r.round(Z[1]+(ue&&ae/ue),2)],[r.round(Z[0]-(le&&ie/le),2),r.round(Z[1]-(le&&ae/le),2)]]}k.smoothopen=function(Y,Z){if(Y.length<3)return"M"+Y.join("L");var re,U="M"+Y[0],q=[];for(re=1;re=1e4&&(k.savedBBoxes={},B=0),re&&(k.savedBBoxes[re]=le),B++,a.extendFlat({},le)},k.setClipUrl=function(Y,Z,re){Y.attr("clip-path",W(Z,re))},k.getTranslate=function(Y){var Z=(Y[Y.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,function(re,U,q){return[U,q].join(" ")}).split(" ");return{x:+Z[0]||0,y:+Z[1]||0}},k.setTranslate=function(Y,Z,re){var U=Y.attr?"attr":"getAttribute",q=Y.attr?"attr":"setAttribute",$=Y[U]("transform")||"";return Z=Z||0,re=re||0,$=$.replace(/(\btranslate\(.*?\);?)/,"").trim(),$=($+=h(Z,re)).trim(),Y[q]("transform",$),$},k.getScale=function(Y){var Z=(Y[Y.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,function(re,U,q){return[U,q].join(" ")}).split(" ");return{x:+Z[0]||1,y:+Z[1]||1}},k.setScale=function(Y,Z,re){var U=Y.attr?"attr":"getAttribute",q=Y.attr?"attr":"setAttribute",$=Y[U]("transform")||"";return Z=Z||1,re=re||1,$=$.replace(/(\bscale\(.*?\);?)/,"").trim(),$=($+="scale("+Z+","+re+")").trim(),Y[q]("transform",$),$};var K=/\s*sc.*/;k.setPointGroupScale=function(Y,Z,re){if(Z=Z||1,re=re||1,Y){var U=Z===1&&re===1?"":"scale("+Z+","+re+")";Y.each(function(){var q=(this.getAttribute("transform")||"").replace(K,"");q=(q+=U).trim(),this.setAttribute("transform",q)})}};var te=/translate\([^)]*\)\s*$/;k.setTextPointsScale=function(Y,Z,re){Y&&Y.each(function(){var U,q=r.select(this),$=q.select("text");if($.node()){var ne=parseFloat($.attr("x")||0),H=parseFloat($.attr("y")||0),Q=(q.attr("transform")||"").match(te);U=Z===1&&re===1?[]:[h(ne,H),"scale("+Z+","+re+")",h(-ne,-H)],Q&&U.push(Q),q.attr("transform",U.join(""))}})}},{"../../components/fx/helpers":402,"../../constants/alignment":471,"../../constants/interactions":478,"../../constants/xmlns_namespaces":480,"../../lib":503,"../../lib/svg_text_utils":529,"../../registry":638,"../../traces/scatter/make_bubble_size_func":944,"../../traces/scatter/subtypes":952,"../color":366,"../colorscale":378,"./symbol_defs":389,"@plotly/d3":58,"fast-isnumeric":190,tinycolor2:312}],389:[function(e,o,f){var r=e("@plotly/d3");o.exports={circle:{n:0,f:function(a){var u=r.round(a,2);return"M"+u+",0A"+u+","+u+" 0 1,1 0,-"+u+"A"+u+","+u+" 0 0,1 "+u+",0Z"}},square:{n:1,f:function(a){var u=r.round(a,2);return"M"+u+","+u+"H-"+u+"V-"+u+"H"+u+"Z"}},diamond:{n:2,f:function(a){var u=r.round(1.3*a,2);return"M"+u+",0L0,"+u+"L-"+u+",0L0,-"+u+"Z"}},cross:{n:3,f:function(a){var u=r.round(.4*a,2),c=r.round(1.2*a,2);return"M"+c+","+u+"H"+u+"V"+c+"H-"+u+"V"+u+"H-"+c+"V-"+u+"H-"+u+"V-"+c+"H"+u+"V-"+u+"H"+c+"Z"}},x:{n:4,f:function(a){var u=r.round(.8*a/Math.sqrt(2),2),c="l"+u+","+u,i="l"+u+",-"+u,s="l-"+u+",-"+u,l="l-"+u+","+u;return"M0,"+u+c+i+s+i+s+l+s+l+c+l+c+"Z"}},"triangle-up":{n:5,f:function(a){var u=r.round(2*a/Math.sqrt(3),2);return"M-"+u+","+r.round(a/2,2)+"H"+u+"L0,-"+r.round(a,2)+"Z"}},"triangle-down":{n:6,f:function(a){var u=r.round(2*a/Math.sqrt(3),2);return"M-"+u+",-"+r.round(a/2,2)+"H"+u+"L0,"+r.round(a,2)+"Z"}},"triangle-left":{n:7,f:function(a){var u=r.round(2*a/Math.sqrt(3),2);return"M"+r.round(a/2,2)+",-"+u+"V"+u+"L-"+r.round(a,2)+",0Z"}},"triangle-right":{n:8,f:function(a){var u=r.round(2*a/Math.sqrt(3),2);return"M-"+r.round(a/2,2)+",-"+u+"V"+u+"L"+r.round(a,2)+",0Z"}},"triangle-ne":{n:9,f:function(a){var u=r.round(.6*a,2),c=r.round(1.2*a,2);return"M-"+c+",-"+u+"H"+u+"V"+c+"Z"}},"triangle-se":{n:10,f:function(a){var u=r.round(.6*a,2),c=r.round(1.2*a,2);return"M"+u+",-"+c+"V"+u+"H-"+c+"Z"}},"triangle-sw":{n:11,f:function(a){var u=r.round(.6*a,2),c=r.round(1.2*a,2);return"M"+c+","+u+"H-"+u+"V-"+c+"Z"}},"triangle-nw":{n:12,f:function(a){var u=r.round(.6*a,2),c=r.round(1.2*a,2);return"M-"+u+","+c+"V-"+u+"H"+c+"Z"}},pentagon:{n:13,f:function(a){var u=r.round(.951*a,2),c=r.round(.588*a,2),i=r.round(-a,2),s=r.round(-.309*a,2);return"M"+u+","+s+"L"+c+","+r.round(.809*a,2)+"H-"+c+"L-"+u+","+s+"L0,"+i+"Z"}},hexagon:{n:14,f:function(a){var u=r.round(a,2),c=r.round(a/2,2),i=r.round(a*Math.sqrt(3)/2,2);return"M"+i+",-"+c+"V"+c+"L0,"+u+"L-"+i+","+c+"V-"+c+"L0,-"+u+"Z"}},hexagon2:{n:15,f:function(a){var u=r.round(a,2),c=r.round(a/2,2),i=r.round(a*Math.sqrt(3)/2,2);return"M-"+c+","+i+"H"+c+"L"+u+",0L"+c+",-"+i+"H-"+c+"L-"+u+",0Z"}},octagon:{n:16,f:function(a){var u=r.round(.924*a,2),c=r.round(.383*a,2);return"M-"+c+",-"+u+"H"+c+"L"+u+",-"+c+"V"+c+"L"+c+","+u+"H-"+c+"L-"+u+","+c+"V-"+c+"Z"}},star:{n:17,f:function(a){var u=1.4*a,c=r.round(.225*u,2),i=r.round(.951*u,2),s=r.round(.363*u,2),l=r.round(.588*u,2),d=r.round(-u,2),h=r.round(-.309*u,2),m=r.round(.118*u,2),g=r.round(.809*u,2);return"M"+c+","+h+"H"+i+"L"+s+","+m+"L"+l+","+g+"L0,"+r.round(.382*u,2)+"L-"+l+","+g+"L-"+s+","+m+"L-"+i+","+h+"H-"+c+"L0,"+d+"Z"}},hexagram:{n:18,f:function(a){var u=r.round(.66*a,2),c=r.round(.38*a,2),i=r.round(.76*a,2);return"M-"+i+",0l-"+c+",-"+u+"h"+i+"l"+c+",-"+u+"l"+c+","+u+"h"+i+"l-"+c+","+u+"l"+c+","+u+"h-"+i+"l-"+c+","+u+"l-"+c+",-"+u+"h-"+i+"Z"}},"star-triangle-up":{n:19,f:function(a){var u=r.round(a*Math.sqrt(3)*.8,2),c=r.round(.8*a,2),i=r.round(1.6*a,2),s=r.round(4*a,2),l="A "+s+","+s+" 0 0 1 ";return"M-"+u+","+c+l+u+","+c+l+"0,-"+i+l+"-"+u+","+c+"Z"}},"star-triangle-down":{n:20,f:function(a){var u=r.round(a*Math.sqrt(3)*.8,2),c=r.round(.8*a,2),i=r.round(1.6*a,2),s=r.round(4*a,2),l="A "+s+","+s+" 0 0 1 ";return"M"+u+",-"+c+l+"-"+u+",-"+c+l+"0,"+i+l+u+",-"+c+"Z"}},"star-square":{n:21,f:function(a){var u=r.round(1.1*a,2),c=r.round(2*a,2),i="A "+c+","+c+" 0 0 1 ";return"M-"+u+",-"+u+i+"-"+u+","+u+i+u+","+u+i+u+",-"+u+i+"-"+u+",-"+u+"Z"}},"star-diamond":{n:22,f:function(a){var u=r.round(1.4*a,2),c=r.round(1.9*a,2),i="A "+c+","+c+" 0 0 1 ";return"M-"+u+",0"+i+"0,"+u+i+u+",0"+i+"0,-"+u+i+"-"+u+",0Z"}},"diamond-tall":{n:23,f:function(a){var u=r.round(.7*a,2),c=r.round(1.4*a,2);return"M0,"+c+"L"+u+",0L0,-"+c+"L-"+u+",0Z"}},"diamond-wide":{n:24,f:function(a){var u=r.round(1.4*a,2),c=r.round(.7*a,2);return"M0,"+c+"L"+u+",0L0,-"+c+"L-"+u+",0Z"}},hourglass:{n:25,f:function(a){var u=r.round(a,2);return"M"+u+","+u+"H-"+u+"L"+u+",-"+u+"H-"+u+"Z"},noDot:!0},bowtie:{n:26,f:function(a){var u=r.round(a,2);return"M"+u+","+u+"V-"+u+"L-"+u+","+u+"V-"+u+"Z"},noDot:!0},"circle-cross":{n:27,f:function(a){var u=r.round(a,2);return"M0,"+u+"V-"+u+"M"+u+",0H-"+u+"M"+u+",0A"+u+","+u+" 0 1,1 0,-"+u+"A"+u+","+u+" 0 0,1 "+u+",0Z"},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(a){var u=r.round(a,2),c=r.round(a/Math.sqrt(2),2);return"M"+c+","+c+"L-"+c+",-"+c+"M"+c+",-"+c+"L-"+c+","+c+"M"+u+",0A"+u+","+u+" 0 1,1 0,-"+u+"A"+u+","+u+" 0 0,1 "+u+",0Z"},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(a){var u=r.round(a,2);return"M0,"+u+"V-"+u+"M"+u+",0H-"+u+"M"+u+","+u+"H-"+u+"V-"+u+"H"+u+"Z"},needLine:!0,noDot:!0},"square-x":{n:30,f:function(a){var u=r.round(a,2);return"M"+u+","+u+"L-"+u+",-"+u+"M"+u+",-"+u+"L-"+u+","+u+"M"+u+","+u+"H-"+u+"V-"+u+"H"+u+"Z"},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(a){var u=r.round(1.3*a,2);return"M"+u+",0L0,"+u+"L-"+u+",0L0,-"+u+"ZM0,-"+u+"V"+u+"M-"+u+",0H"+u},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(a){var u=r.round(1.3*a,2),c=r.round(.65*a,2);return"M"+u+",0L0,"+u+"L-"+u+",0L0,-"+u+"ZM-"+c+",-"+c+"L"+c+","+c+"M-"+c+","+c+"L"+c+",-"+c},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(a){var u=r.round(1.4*a,2);return"M0,"+u+"V-"+u+"M"+u+",0H-"+u},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(a){var u=r.round(a,2);return"M"+u+","+u+"L-"+u+",-"+u+"M"+u+",-"+u+"L-"+u+","+u},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(a){var u=r.round(1.2*a,2),c=r.round(.85*a,2);return"M0,"+u+"V-"+u+"M"+u+",0H-"+u+"M"+c+","+c+"L-"+c+",-"+c+"M"+c+",-"+c+"L-"+c+","+c},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(a){var u=r.round(a/2,2),c=r.round(a,2);return"M"+u+","+c+"V-"+c+"m-"+c+",0V"+c+"M"+c+","+u+"H-"+c+"m0,-"+c+"H"+c},needLine:!0,noFill:!0},"y-up":{n:37,f:function(a){var u=r.round(1.2*a,2),c=r.round(1.6*a,2),i=r.round(.8*a,2);return"M-"+u+","+i+"L0,0M"+u+","+i+"L0,0M0,-"+c+"L0,0"},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(a){var u=r.round(1.2*a,2),c=r.round(1.6*a,2),i=r.round(.8*a,2);return"M-"+u+",-"+i+"L0,0M"+u+",-"+i+"L0,0M0,"+c+"L0,0"},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(a){var u=r.round(1.2*a,2),c=r.round(1.6*a,2),i=r.round(.8*a,2);return"M"+i+","+u+"L0,0M"+i+",-"+u+"L0,0M-"+c+",0L0,0"},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(a){var u=r.round(1.2*a,2),c=r.round(1.6*a,2),i=r.round(.8*a,2);return"M-"+i+","+u+"L0,0M-"+i+",-"+u+"L0,0M"+c+",0L0,0"},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(a){var u=r.round(1.4*a,2);return"M"+u+",0H-"+u},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(a){var u=r.round(1.4*a,2);return"M0,"+u+"V-"+u},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(a){var u=r.round(a,2);return"M"+u+",-"+u+"L-"+u+","+u},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(a){var u=r.round(a,2);return"M"+u+","+u+"L-"+u+",-"+u},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(a){var u=r.round(a,2);return"M0,0L-"+u+","+r.round(2*a,2)+"H"+u+"Z"},noDot:!0},"arrow-down":{n:46,f:function(a){var u=r.round(a,2);return"M0,0L-"+u+",-"+r.round(2*a,2)+"H"+u+"Z"},noDot:!0},"arrow-left":{n:47,f:function(a){var u=r.round(2*a,2),c=r.round(a,2);return"M0,0L"+u+",-"+c+"V"+c+"Z"},noDot:!0},"arrow-right":{n:48,f:function(a){var u=r.round(2*a,2),c=r.round(a,2);return"M0,0L-"+u+",-"+c+"V"+c+"Z"},noDot:!0},"arrow-bar-up":{n:49,f:function(a){var u=r.round(a,2);return"M-"+u+",0H"+u+"M0,0L-"+u+","+r.round(2*a,2)+"H"+u+"Z"},needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(a){var u=r.round(a,2);return"M-"+u+",0H"+u+"M0,0L-"+u+",-"+r.round(2*a,2)+"H"+u+"Z"},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(a){var u=r.round(2*a,2),c=r.round(a,2);return"M0,-"+c+"V"+c+"M0,0L"+u+",-"+c+"V"+c+"Z"},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(a){var u=r.round(2*a,2),c=r.round(a,2);return"M0,-"+c+"V"+c+"M0,0L-"+u+",-"+c+"V"+c+"Z"},needLine:!0,noDot:!0}}},{"@plotly/d3":58}],390:[function(e,o,f){o.exports={visible:{valType:"boolean",editType:"calc"},type:{valType:"enumerated",values:["percent","constant","sqrt","data"],editType:"calc"},symmetric:{valType:"boolean",editType:"calc"},array:{valType:"data_array",editType:"calc"},arrayminus:{valType:"data_array",editType:"calc"},value:{valType:"number",min:0,dflt:10,editType:"calc"},valueminus:{valType:"number",min:0,dflt:10,editType:"calc"},traceref:{valType:"integer",min:0,dflt:0,editType:"style"},tracerefminus:{valType:"integer",min:0,dflt:0,editType:"style"},copy_ystyle:{valType:"boolean",editType:"plot"},copy_zstyle:{valType:"boolean",editType:"style"},color:{valType:"color",editType:"style"},thickness:{valType:"number",min:0,dflt:2,editType:"style"},width:{valType:"number",min:0,editType:"plot"},editType:"calc",_deprecated:{opacity:{valType:"number",editType:"style"}}}},{}],391:[function(e,o,f){var r=e("fast-isnumeric"),a=e("../../registry"),u=e("../../plots/cartesian/axes"),c=e("../../lib"),i=e("./compute_error");function s(l,d,h,m){var g=d["error_"+m]||{},p=[];if(g.visible&&["linear","log"].indexOf(h.type)!==-1){for(var v=i(g),y=0;y0;s.each(function(p){var v,y=p[0].trace,x=y.error_x||{},w=y.error_y||{};y.ids&&(v=function(_){return _.id});var k=c.hasMarkers(y)&&y.marker.maxdisplayed>0;w.visible||x.visible||(p=[]);var b=r.select(this).selectAll("g.errorbar").data(p,v);if(b.exit().remove(),p.length){x.visible||b.selectAll("path.xerror").remove(),w.visible||b.selectAll("path.yerror").remove(),b.style("opacity",1);var T=b.enter().append("g").classed("errorbar",!0);g&&T.style("opacity",0).transition().duration(d.duration).style("opacity",1),u.setClipUrl(b,l.layerClipId,i),b.each(function(_){var M=r.select(this),A=function(z,L,P){var N={x:L.c2p(z.x),y:P.c2p(z.y)};return z.yh!==void 0&&(N.yh=P.c2p(z.yh),N.ys=P.c2p(z.ys),a(N.ys)||(N.noYS=!0,N.ys=P.c2p(z.ys,!0))),z.xh!==void 0&&(N.xh=L.c2p(z.xh),N.xs=L.c2p(z.xs),a(N.xs)||(N.noXS=!0,N.xs=L.c2p(z.xs,!0))),N}(_,h,m);if(!k||_.vis){var S,E=M.select("path.yerror");if(w.visible&&a(A.x)&&a(A.yh)&&a(A.ys)){var D=w.width;S="M"+(A.x-D)+","+A.yh+"h"+2*D+"m-"+D+",0V"+A.ys,A.noYS||(S+="m-"+D+",0h"+2*D),E.size()?g&&(E=E.transition().duration(d.duration).ease(d.easing)):E=M.append("path").style("vector-effect","non-scaling-stroke").classed("yerror",!0),E.attr("d",S)}else E.remove();var O=M.select("path.xerror");if(x.visible&&a(A.y)&&a(A.xh)&&a(A.xs)){var R=(x.copy_ystyle?w:x).width;S="M"+A.xh+","+(A.y-R)+"v"+2*R+"m0,-"+R+"H"+A.xs,A.noXS||(S+="m0,-"+R+"v"+2*R),O.size()?g&&(O=O.transition().duration(d.duration).ease(d.easing)):O=M.append("path").style("vector-effect","non-scaling-stroke").classed("xerror",!0),O.attr("d",S)}else O.remove()}})}})}},{"../../traces/scatter/subtypes":952,"../drawing":388,"@plotly/d3":58,"fast-isnumeric":190}],396:[function(e,o,f){var r=e("@plotly/d3"),a=e("../color");o.exports=function(u){u.each(function(c){var i=c[0].trace,s=i.error_y||{},l=i.error_x||{},d=r.select(this);d.selectAll("path.yerror").style("stroke-width",s.thickness+"px").call(a.stroke,s.color),l.copy_ystyle&&(l=s),d.selectAll("path.xerror").style("stroke-width",l.thickness+"px").call(a.stroke,l.color)})}},{"../color":366,"@plotly/d3":58}],397:[function(e,o,f){var r=e("../../plots/font_attributes"),a=e("./layout_attributes").hoverlabel,u=e("../../lib/extend").extendFlat;o.exports={hoverlabel:{bgcolor:u({},a.bgcolor,{arrayOk:!0}),bordercolor:u({},a.bordercolor,{arrayOk:!0}),font:r({arrayOk:!0,editType:"none"}),align:u({},a.align,{arrayOk:!0}),namelength:u({},a.namelength,{arrayOk:!0}),editType:"none"}}},{"../../lib/extend":493,"../../plots/font_attributes":585,"./layout_attributes":407}],398:[function(e,o,f){var r=e("../../lib"),a=e("../../registry");function u(c,i,s,l){l=l||r.identity,Array.isArray(c)&&(i[0][s]=l(c))}o.exports=function(c){var i=c.calcdata,s=c._fullLayout;function l(p){return function(v){return r.coerceHoverinfo({hoverinfo:v},{_module:p._module},s)}}for(var d=0;d=0&&h.indexde[0]._length||Pe<0||Pe>ye[0]._length)return p.unhoverRaw(ee,ie)}if(ie.pointerX=dt+de[0]._offset,ie.pointerY=Pe+ye[0]._offset,Re="xval"in ie?x.flat(ge,ie.xval):x.p2c(de,dt),qe="yval"in ie?x.flat(ge,ie.yval):x.p2c(ye,Pe),!a(Re[0])||!a(qe[0]))return c.warn("Fx.hover failed",ie,ee),p.unhoverRaw(ee,ie)}var De=1/0;function He(Mn,rr){for(Ye=0;YeWt&&(Jt.splice(0,Wt),De=Jt[0].distance),we&&Ke!==0&&Jt.length===0){Ot.distance=Ke,Ot.index=!1;var pr=ft._module.hoverPoints(Ot,at,et,"closest",{hoverLayer:fe._hoverlayer});if(pr&&(pr=pr.filter(function(fn){return fn.spikeDistance<=Ke})),pr&&pr.length){var qr,_i=pr.filter(function(fn){return fn.xa.showspikes&&fn.xa.spikesnap!=="hovered data"});if(_i.length){var cn=_i[0];a(cn.x0)&&a(cn.y0)&&(qr=lt(cn),(!Ge.vLinePoint||Ge.vLinePoint.spikeDistance>qr.spikeDistance)&&(Ge.vLinePoint=qr))}var jn=pr.filter(function(fn){return fn.ya.showspikes&&fn.ya.spikesnap!=="hovered data"});if(jn.length){var jt=jn[0];a(jt.x0)&&a(jt.y0)&&(qr=lt(jt),(!Ge.hLinePoint||Ge.hLinePoint.spikeDistance>qr.spikeDistance)&&(Ge.hLinePoint=qr))}}}}}function rt(Mn,rr,nr){for(var Bn,Fr=null,$r=1/0,pr=0;pr0&&Math.abs(Mn.distance)Le-1;Et--)Ht(Jt[Et]);Jt=It,Vt()}var mn=ee._hoverdata,zn=[],pn=Z(ee),tn=re(ee);for(We=0;We1||Jt.length>1)||Fe==="closest"&&Tt&&Jt.length>1,Ln=g.combine(fe.plot_bgcolor||g.background,fe.paper_bgcolor),lr=P(Jt,{gd:ee,hovermode:Fe,rotateLabels:Kn,bgColor:Ln,container:fe._hoverlayer,outerContainer:fe._paper.node(),commonLabelOpts:fe.hoverlabel,hoverdistance:fe.hoverdistance});if(x.isUnifiedHover(Fe)||(function(Mn,rr,nr){var Bn,Fr,$r,pr,qr,_i,cn,jn=0,jt=1,fn=Mn.size(),yn=new Array(fn),$n=0;function Un(Yn){var ir=Yn[0],or=Yn[Yn.length-1];if(Fr=ir.pmin-ir.pos-ir.dp+ir.size,$r=or.pos+or.dp+or.size-ir.pmax,Fr>.01){for(qr=Yn.length-1;qr>=0;qr--)Yn[qr].dp+=Fr;Bn=!1}if(!($r<.01)){if(Fr<-.01){for(qr=Yn.length-1;qr>=0;qr--)Yn[qr].dp-=$r;Bn=!1}if(Bn){var xr=0;for(pr=0;prir.pmax&&xr++;for(pr=Yn.length-1;pr>=0&&!(xr<=0);pr--)(_i=Yn[pr]).pos>ir.pmax-1&&(_i.del=!0,xr--);for(pr=0;pr=0;qr--)Yn[qr].dp-=$r;for(pr=Yn.length-1;pr>=0&&!(xr<=0);pr--)(_i=Yn[pr]).pos+_i.dp+_i.size>ir.pmax&&(_i.del=!0,xr--)}}}for(Mn.each(function(Yn){var ir=Yn[rr],or=ir._id.charAt(0)==="x",xr=ir.range;$n===0&&xr&&xr[0]>xr[1]!==or&&(jt=-1),yn[$n++]=[{datum:Yn,traceIndex:Yn.trace.index,dp:0,pos:Yn.pos,posref:Yn.posref,size:Yn.by*(or?M:1)/2,pmin:0,pmax:or?nr.width:nr.height}]}),yn.sort(function(Yn,ir){return Yn[0].posref-ir[0].posref||jt*(ir[0].traceIndex-Yn[0].traceIndex)});!Bn&&jn<=fn;){for(jn++,Bn=!0,pr=0;pr.01&&wn.pmin===kn.pmin&&wn.pmax===kn.pmax){for(qr=Rn.length-1;qr>=0;qr--)Rn[qr].dp+=Fr;for(Nn.push.apply(Nn,Rn),yn.splice(pr+1,1),cn=0,qr=Nn.length-1;qr>=0;qr--)cn+=Nn[qr].dp;for($r=cn/Nn.length,qr=Nn.length-1;qr>=0;qr--)Nn[qr].dp-=$r;Bn=!1}else pr++}yn.forEach(Un)}for(pr=yn.length-1;pr>=0;pr--){var Tn=yn[pr];for(qr=Tn.length-1;qr>=0;qr--){var Dn=Tn[qr],Zn=Dn.datum;Zn.offset=Dn.dp,Zn.del=Dn.del}}}(lr,Kn?"xa":"ya",fe),B(lr,Kn,fe._invScaleX,fe._invScaleY)),le&&le.tagName){var Wr=y.getComponentMethod("annotations","hasClickToShow")(ee,zn);h(r.select(le),Wr?"pointer":"")}!le||ue||!function(Mn,rr,nr){if(!nr||nr.length!==Mn._hoverdata.length)return!0;for(var Bn=nr.length-1;Bn>=0;Bn--){var Fr=nr[Bn],$r=Mn._hoverdata[Bn];if(Fr.curveNumber!==$r.curveNumber||String(Fr.pointNumber)!==String($r.pointNumber)||String(Fr.pointNumbers)!==String($r.pointNumbers))return!0}return!1}(ee,0,mn)||(mn&&ee.emit("plotly_unhover",{event:ie,points:mn}),ee.emit("plotly_hover",{event:ie,points:ee._hoverdata,xaxes:de,yaxes:ye,xvals:Re,yvals:qe}))})(q,$,ne,H,Q)})},f.loneHover=function(q,$){var ne=!0;Array.isArray(q)||(ne=!1,q=[q]);var H=$.gd,Q=Z(H),ee=re(H),ie=P(q.map(function(le){var ge=le._x0||le.x0||le.x||0,fe=le._x1||le.x1||le.x||0,me=le._y0||le.y0||le.y||0,_e=le._y1||le.y1||le.y||0,we=le.eventData;if(we){var Te=Math.min(ge,fe),Oe=Math.max(ge,fe),de=Math.min(me,_e),ye=Math.max(me,_e),Me=le.trace;if(y.traceIs(Me,"gl3d")){var ke=H._fullLayout[Me.scene]._scene.container,Ee=ke.offsetLeft,ze=ke.offsetTop;Te+=Ee,Oe+=Ee,de+=ze,ye+=ze}we.bbox={x0:Te+ee,x1:Oe+ee,y0:de+Q,y1:ye+Q},$.inOut_bbox&&$.inOut_bbox.push(we.bbox)}else we=!1;return{color:le.color||g.defaultLine,x0:le.x0||le.x||0,x1:le.x1||le.x||0,y0:le.y0||le.y||0,y1:le.y1||le.y||0,xLabel:le.xLabel,yLabel:le.yLabel,zLabel:le.zLabel,text:le.text,name:le.name,idealAlign:le.idealAlign,borderColor:le.borderColor,fontFamily:le.fontFamily,fontSize:le.fontSize,fontColor:le.fontColor,nameLength:le.nameLength,textAlign:le.textAlign,trace:le.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:le.hovertemplate||!1,hovertemplateLabels:le.hovertemplateLabels||!1,eventData:we}}),{gd:H,hovermode:"closest",rotateLabels:!1,bgColor:$.bgColor||g.background,container:r.select($.container),outerContainer:$.outerContainer||$.container}),ae=0,ue=0;return ie.sort(function(le,ge){return le.y0-ge.y0}).each(function(le,ge){var fe=le.y0-le.by/2;le.offset=fe-5([\s\S]*)<\/extra>/;function P(q,$){var ne=$.gd,H=ne._fullLayout,Q=$.hovermode,ee=$.rotateLabels,ie=$.bgColor,ae=$.container,ue=$.outerContainer,le=$.commonLabelOpts||{};if(q.length===0)return[[]];var ge=$.fontFamily||w.HOVERFONT,fe=$.fontSize||w.HOVERFONTSIZE,me=q[0],_e=me.xa,we=me.ya,Te=Q.charAt(0),Oe=me[Te+"Label"],de=U(ne,ue),ye=de.top,Me=de.width,ke=de.height,Ee=Oe!==void 0&&me.distance<=$.hoverdistance&&(Q==="x"||Q==="y");if(Ee){var ze,Fe,Ve=!0;for(ze=0;zeH.width-Kt?(st=H.width-Kt,bt.attr("d","M"+(Kt-E)+",0L"+Kt+","+Zt+E+"v"+Zt+(2*D+It.height)+"H-"+Kt+"V"+Zt+E+"H"+(Kt-2*E)+"Z")):bt.attr("d","M0,0L"+E+","+Zt+E+"H"+(D+It.width/2)+"v"+Zt+(2*D+It.height)+"H-"+(D+It.width/2)+"V"+Zt+E+"H-"+E+"Z")}else{var Ht,mn,zn;we.side==="right"?(Ht="start",mn=1,zn="",st=_e._offset+_e._length):(Ht="end",mn=-1,zn="-",st=_e._offset),Et=we._offset+(me.y0+me.y1)/2,zt.attr("text-anchor",Ht),bt.attr("d","M0,0L"+zn+E+","+E+"V"+(D+It.height/2)+"h"+zn+(2*D+It.width)+"V-"+(D+It.height/2)+"H"+zn+E+"V-"+E+"Z");var pn,tn=It.height/2,nn=ye-It.top-tn,sn="clip"+H._uid+"commonlabel"+we._id;if(st=0?Ge:Tt+Ie=0?Tt:wt+Ie=0?Jt:Be+Ae=0?Be:Vt+Ae=0,tt.idealAlign!=="top"&&Hn||!Wn?Hn?(tn+=sn/2,tt.anchor="start"):tt.anchor="middle":(tn-=sn/2,tt.anchor="end");else if(tt.pos=tn,Hn=pn+nn/2+ar<=Me,Wn=pn-nn/2-ar>=0,tt.idealAlign!=="left"&&Hn||!Wn)if(Hn)pn+=nn/2,tt.anchor="start";else{tt.anchor="middle";var Or=ar/2,vr=pn+Or-Me,Er=pn-Or;vr>0&&(pn-=vr),Er<0&&(pn+=-Er)}else pn-=nn/2,tt.anchor="end";Zt.attr("text-anchor",tt.anchor),Ht&&Kt.attr("text-anchor",tt.anchor),bt.attr("transform",i(pn,tn)+(ee?s(T):""))}),Ut}function N(q,$,ne,H,Q,ee){var ie="",ae="";q.nameOverride!==void 0&&(q.name=q.nameOverride),q.name&&(q.trace._meta&&(q.name=c.templateString(q.name,q.trace._meta)),ie=te(q.name,q.nameLength));var ue=ne.charAt(0),le=ue==="x"?"y":"x";q.zLabel!==void 0?(q.xLabel!==void 0&&(ae+="x: "+q.xLabel+"
"),q.yLabel!==void 0&&(ae+="y: "+q.yLabel+"
"),q.trace.type!=="choropleth"&&q.trace.type!=="choroplethmapbox"&&(ae+=(ae?"z: ":"")+q.zLabel)):$&&q[ue+"Label"]===Q?ae=q[le+"Label"]||"":q.xLabel===void 0?q.yLabel!==void 0&&q.trace.type!=="scattercarpet"&&(ae=q.yLabel):ae=q.yLabel===void 0?q.xLabel:"("+q.xLabel+", "+q.yLabel+")",!q.text&&q.text!==0||Array.isArray(q.text)||(ae+=(ae?"
":"")+q.text),q.extraText!==void 0&&(ae+=(ae?"
":"")+q.extraText),ee&&ae===""&&!q.hovertemplate&&(ie===""&&ee.remove(),ae=ie);var ge=q.hovertemplate||!1;if(ge){var fe=q.hovertemplateLabels||q;q[ue+"Label"]!==Q&&(fe[ue+"other"]=fe[ue+"Val"],fe[ue+"otherLabel"]=fe[ue+"Label"]),ae=(ae=c.hovertemplateString(ge,fe,H._d3locale,q.eventData[0]||{},q.trace._meta)).replace(L,function(me,_e){return ie=te(_e,q.nameLength),""})}return[ae,ie]}function B(q,$,ne,H){var Q=function(ie){return ie*ne},ee=function(ie){return ie*H};q.each(function(ie){var ae=r.select(this);if(ie.del)return ae.remove();var ue=ae.select("text.nums"),le=ie.anchor,ge=le==="end"?-1:1,fe={start:1,end:-1,middle:0}[le],me=fe*(E+D),_e=me+fe*(ie.txwidth+D),we=0,Te=ie.offset,Oe=le==="middle";Oe&&(me-=ie.tx2width/2,_e+=ie.txwidth/2+D),$&&(Te*=-S,we=ie.offset*A),ae.select("path").attr("d",Oe?"M-"+Q(ie.bx/2+ie.tx2width/2)+","+ee(Te-ie.by/2)+"h"+Q(ie.bx)+"v"+ee(ie.by)+"h-"+Q(ie.bx)+"Z":"M0,0L"+Q(ge*E+we)+","+ee(E+Te)+"v"+ee(ie.by/2-E)+"h"+Q(ge*ie.bx)+"v-"+ee(ie.by)+"H"+Q(ge*E+we)+"V"+ee(Te-E)+"Z");var de=we+me,ye=Te+ie.ty0-ie.by/2+D,Me=ie.textAlign||"auto";Me!=="auto"&&(Me==="left"&&le!=="start"?(ue.attr("text-anchor","start"),de=Oe?-ie.bx/2-ie.tx2width/2+D:-ie.bx-D):Me==="right"&&le!=="end"&&(ue.attr("text-anchor","end"),de=Oe?ie.bx/2-ie.tx2width/2-D:ie.bx+D)),ue.call(d.positionText,Q(de),ee(ye)),ie.tx2width&&(ae.select("text.name").call(d.positionText,Q(_e+fe*D+we),ee(Te+ie.ty0-ie.by/2+D)),ae.select("rect").call(m.setRect,Q(_e+(fe-1)*ie.tx2width/2+we),ee(Te-ie.by/2-1),Q(ie.tx2width),ee(ie.by+2)))})}function G(q,$){var ne=q.index,H=q.trace||{},Q=q.cd[0],ee=q.cd[ne]||{};function ie(me){return me||a(me)&&me===0}var ae=Array.isArray(ne)?function(me,_e){var we=c.castOption(Q,ne,me);return ie(we)?we:c.extractOption({},H,"",_e)}:function(me,_e){return c.extractOption(ee,H,me,_e)};function ue(me,_e,we){var Te=ae(_e,we);ie(Te)&&(q[me]=Te)}if(ue("hoverinfo","hi","hoverinfo"),ue("bgcolor","hbg","hoverlabel.bgcolor"),ue("borderColor","hbc","hoverlabel.bordercolor"),ue("fontFamily","htf","hoverlabel.font.family"),ue("fontSize","hts","hoverlabel.font.size"),ue("fontColor","htc","hoverlabel.font.color"),ue("nameLength","hnl","hoverlabel.namelength"),ue("textAlign","hta","hoverlabel.align"),q.posref=$==="y"||$==="closest"&&H.orientation==="h"?q.xa._offset+(q.x0+q.x1)/2:q.ya._offset+(q.y0+q.y1)/2,q.x0=c.constrain(q.x0,0,q.xa._length),q.x1=c.constrain(q.x1,0,q.xa._length),q.y0=c.constrain(q.y0,0,q.ya._length),q.y1=c.constrain(q.y1,0,q.ya._length),q.xLabelVal!==void 0&&(q.xLabel="xLabel"in q?q.xLabel:v.hoverLabelText(q.xa,q.xLabelVal,H.xhoverformat),q.xVal=q.xa.c2d(q.xLabelVal)),q.yLabelVal!==void 0&&(q.yLabel="yLabel"in q?q.yLabel:v.hoverLabelText(q.ya,q.yLabelVal,H.yhoverformat),q.yVal=q.ya.c2d(q.yLabelVal)),q.zLabelVal!==void 0&&q.zLabel===void 0&&(q.zLabel=String(q.zLabelVal)),!(isNaN(q.xerr)||q.xa.type==="log"&&q.xerr<=0)){var le=v.tickText(q.xa,q.xa.c2l(q.xerr),"hover").text;q.xerrneg!==void 0?q.xLabel+=" +"+le+" / -"+v.tickText(q.xa,q.xa.c2l(q.xerrneg),"hover").text:q.xLabel+=" \xB1 "+le,$==="x"&&(q.distance+=1)}if(!(isNaN(q.yerr)||q.ya.type==="log"&&q.yerr<=0)){var ge=v.tickText(q.ya,q.ya.c2l(q.yerr),"hover").text;q.yerrneg!==void 0?q.yLabel+=" +"+ge+" / -"+v.tickText(q.ya,q.ya.c2l(q.yerrneg),"hover").text:q.yLabel+=" \xB1 "+ge,$==="y"&&(q.distance+=1)}var fe=q.hoverinfo||q.trace.hoverinfo;return fe&&fe!=="all"&&((fe=Array.isArray(fe)?fe:fe.split("+")).indexOf("x")===-1&&(q.xLabel=void 0),fe.indexOf("y")===-1&&(q.yLabel=void 0),fe.indexOf("z")===-1&&(q.zLabel=void 0),fe.indexOf("text")===-1&&(q.text=void 0),fe.indexOf("name")===-1&&(q.name=void 0)),q}function W(q,$,ne){var H,Q,ee=ne.container,ie=ne.fullLayout,ae=ie._size,ue=ne.event,le=!!$.hLinePoint,ge=!!$.vLinePoint;if(ee.selectAll(".spikeline").remove(),ge||le){var fe=g.combine(ie.plot_bgcolor,ie.paper_bgcolor);if(le){var me,_e,we=$.hLinePoint;H=we&&we.xa,(Q=we&&we.ya).spikesnap==="cursor"?(me=ue.pointerX,_e=ue.pointerY):(me=H._offset+we.x,_e=Q._offset+we.y);var Te,Oe,de=u.readability(we.color,fe)<1.5?g.contrast(fe):we.color,ye=Q.spikemode,Me=Q.spikethickness,ke=Q.spikecolor||de,Ee=v.getPxPosition(q,Q);if(ye.indexOf("toaxis")!==-1||ye.indexOf("across")!==-1){if(ye.indexOf("toaxis")!==-1&&(Te=Ee,Oe=me),ye.indexOf("across")!==-1){var ze=Q._counterDomainMin,Fe=Q._counterDomainMax;Q.anchor==="free"&&(ze=Math.min(ze,Q.position),Fe=Math.max(Fe,Q.position)),Te=ae.l+ze*ae.w,Oe=ae.l+Fe*ae.w}ee.insert("line",":first-child").attr({x1:Te,x2:Oe,y1:_e,y2:_e,"stroke-width":Me,stroke:ke,"stroke-dasharray":m.dashStyle(Q.spikedash,Me)}).classed("spikeline",!0).classed("crisp",!0),ee.insert("line",":first-child").attr({x1:Te,x2:Oe,y1:_e,y2:_e,"stroke-width":Me+2,stroke:fe}).classed("spikeline",!0).classed("crisp",!0)}ye.indexOf("marker")!==-1&&ee.insert("circle",":first-child").attr({cx:Ee+(Q.side!=="right"?Me:-Me),cy:_e,r:Me,fill:ke}).classed("spikeline",!0)}if(ge){var Ve,Ke,Re=$.vLinePoint;H=Re&&Re.xa,Q=Re&&Re.ya,H.spikesnap==="cursor"?(Ve=ue.pointerX,Ke=ue.pointerY):(Ve=H._offset+Re.x,Ke=Q._offset+Re.y);var qe,We,Ye=u.readability(Re.color,fe)<1.5?g.contrast(fe):Re.color,nt=H.spikemode,ft=H.spikethickness,vt=H.spikecolor||Ye,Pt=v.getPxPosition(q,H);if(nt.indexOf("toaxis")!==-1||nt.indexOf("across")!==-1){if(nt.indexOf("toaxis")!==-1&&(qe=Pt,We=Ke),nt.indexOf("across")!==-1){var At=H._counterDomainMin,at=H._counterDomainMax;H.anchor==="free"&&(At=Math.min(At,H.position),at=Math.max(at,H.position)),qe=ae.t+(1-at)*ae.h,We=ae.t+(1-At)*ae.h}ee.insert("line",":first-child").attr({x1:Ve,x2:Ve,y1:qe,y2:We,"stroke-width":ft,stroke:vt,"stroke-dasharray":m.dashStyle(H.spikedash,ft)}).classed("spikeline",!0).classed("crisp",!0),ee.insert("line",":first-child").attr({x1:Ve,x2:Ve,y1:qe,y2:We,"stroke-width":ft+2,stroke:fe}).classed("spikeline",!0).classed("crisp",!0)}nt.indexOf("marker")!==-1&&ee.insert("circle",":first-child").attr({cx:Ve,cy:Pt-(H.side!=="top"?ft:-ft),r:ft,fill:vt}).classed("spikeline",!0)}}}function K(q,$){return!$||$.vLinePoint!==q._spikepoints.vLinePoint||$.hLinePoint!==q._spikepoints.hLinePoint}function te(q,$){return d.plainText(q||"",{len:$,allowedTags:["br","sub","sup","b","i","em"]})}function Y(q,$,ne){var H=$[q+"a"],Q=$[q+"Val"],ee=$.cd[0];if(H.type==="category")Q=H._categoriesMap[Q];else if(H.type==="date"){var ie=$.trace[q+"periodalignment"];if(ie){var ae=$.cd[$.index],ue=ae[q+"Start"];ue===void 0&&(ue=ae[q]);var le=ae[q+"End"];le===void 0&&(le=ae[q]);var ge=le-ue;ie==="end"?Q+=ge:ie==="middle"&&(Q+=ge/2)}Q=H.d2c(Q)}return ee&&ee.t&&ee.t.posLetter===H._id&&(ne.boxmode!=="group"&&ne.violinmode!=="group"||(Q+=ee.t.dPos)),Q}function Z(q){return q.offsetTop+q.clientTop}function re(q){return q.offsetLeft+q.clientLeft}function U(q,$){var ne=q._fullLayout,H=$.getBoundingClientRect(),Q=H.x,ee=H.y,ie=Q+H.width,ae=ee+H.height,ue=c.apply3DTransform(ne._invTransform)(Q,ee),le=c.apply3DTransform(ne._invTransform)(ie,ae),ge=ue[0],fe=ue[1],me=le[0],_e=le[1];return{x:ge,y:fe,width:me-ge,height:_e-fe,top:Math.min(fe,_e),left:Math.min(ge,me),right:Math.max(ge,me),bottom:Math.max(fe,_e)}}},{"../../lib":503,"../../lib/events":492,"../../lib/override_cursor":514,"../../lib/svg_text_utils":529,"../../plots/cartesian/axes":554,"../../registry":638,"../color":366,"../dragelement":385,"../drawing":388,"../legend/defaults":418,"../legend/draw":419,"./constants":400,"./helpers":402,"@plotly/d3":58,"fast-isnumeric":190,tinycolor2:312}],404:[function(e,o,f){var r=e("../../lib"),a=e("../color"),u=e("./helpers").isUnifiedHover;o.exports=function(c,i,s,l){l=l||{};var d=i.legend;function h(m){l.font[m]||(l.font[m]=d?i.legend.font[m]:i.font[m])}i&&u(i.hovermode)&&(l.font||(l.font={}),h("size"),h("family"),h("color"),d?(l.bgcolor||(l.bgcolor=a.combine(i.legend.bgcolor,i.paper_bgcolor)),l.bordercolor||(l.bordercolor=i.legend.bordercolor)):l.bgcolor||(l.bgcolor=i.paper_bgcolor)),s("hoverlabel.bgcolor",l.bgcolor),s("hoverlabel.bordercolor",l.bordercolor),s("hoverlabel.namelength",l.namelength),r.coerceFont(s,"hoverlabel.font",l.font),s("hoverlabel.align",l.align)}},{"../../lib":503,"../color":366,"./helpers":402}],405:[function(e,o,f){var r=e("../../lib"),a=e("./layout_attributes");o.exports=function(u,c){function i(s,l){return c[s]!==void 0?c[s]:r.coerce(u,c,a,s,l)}return i("clickmode"),i("hovermode")}},{"../../lib":503,"./layout_attributes":407}],406:[function(e,o,f){var r=e("@plotly/d3"),a=e("../../lib"),u=e("../dragelement"),c=e("./helpers"),i=e("./layout_attributes"),s=e("./hover");o.exports={moduleType:"component",name:"fx",constants:e("./constants"),schema:{layout:i},attributes:e("./attributes"),layoutAttributes:i,supplyLayoutGlobalDefaults:e("./layout_global_defaults"),supplyDefaults:e("./defaults"),supplyLayoutDefaults:e("./layout_defaults"),calc:e("./calc"),getDistanceFunction:c.getDistanceFunction,getClosest:c.getClosest,inbox:c.inbox,quadrature:c.quadrature,appendArrayPointValue:c.appendArrayPointValue,castHoverOption:function(l,d,h){return a.castOption(l,d,"hoverlabel."+h)},castHoverinfo:function(l,d,h){return a.castOption(l,h,"hoverinfo",function(m){return a.coerceHoverinfo({hoverinfo:m},{_module:l._module},d)})},hover:s.hover,unhover:u.unhover,loneHover:s.loneHover,loneUnhover:function(l){var d=a.isD3Selection(l)?l:r.select(l);d.selectAll("g.hovertext").remove(),d.selectAll(".spikeline").remove()},click:e("./click")}},{"../../lib":503,"../dragelement":385,"./attributes":397,"./calc":398,"./click":399,"./constants":400,"./defaults":401,"./helpers":402,"./hover":403,"./layout_attributes":407,"./layout_defaults":408,"./layout_global_defaults":409,"@plotly/d3":58}],407:[function(e,o,f){var r=e("./constants"),a=e("../../plots/font_attributes"),u=a({editType:"none"});u.family.dflt=r.HOVERFONT,u.size.dflt=r.HOVERFONTSIZE,o.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"]},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar"},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none"},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none"},hoverlabel:{bgcolor:{valType:"color",editType:"none"},bordercolor:{valType:"color",editType:"none"},font:u,grouptitlefont:a({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}},{"../../plots/font_attributes":585,"./constants":400}],408:[function(e,o,f){var r=e("../../lib"),a=e("./layout_attributes"),u=e("./hovermode_defaults"),c=e("./hoverlabel_defaults");o.exports=function(i,s){function l(g,p){return r.coerce(i,s,a,g,p)}u(i,s)&&(l("hoverdistance"),l("spikedistance")),l("dragmode")==="select"&&l("selectdirection");var d=s._has("mapbox"),h=s._has("geo"),m=s._basePlotModules.length;s.dragmode==="zoom"&&((d||h)&&m===1||d&&h&&m===2)&&(s.dragmode="pan"),c(i,s,l),r.coerceFont(l,"hoverlabel.grouptitlefont",s.hoverlabel.font)}},{"../../lib":503,"./hoverlabel_defaults":404,"./hovermode_defaults":405,"./layout_attributes":407}],409:[function(e,o,f){var r=e("../../lib"),a=e("./hoverlabel_defaults"),u=e("./layout_attributes");o.exports=function(c,i){a(c,i,function(s,l){return r.coerce(c,i,u,s,l)})}},{"../../lib":503,"./hoverlabel_defaults":404,"./layout_attributes":407}],410:[function(e,o,f){var r=e("../../lib"),a=e("../../lib/regex").counter,u=e("../../plots/domain").attributes,c=e("../../plots/cartesian/constants").idRegex,i=e("../../plot_api/plot_template"),s={rows:{valType:"integer",min:1,editType:"plot"},roworder:{valType:"enumerated",values:["top to bottom","bottom to top"],dflt:"top to bottom",editType:"plot"},columns:{valType:"integer",min:1,editType:"plot"},subplots:{valType:"info_array",freeLength:!0,dimensions:2,items:{valType:"enumerated",values:[a("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[c.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[c.y.toString(),""],editType:"plot"},editType:"plot"},pattern:{valType:"enumerated",values:["independent","coupled"],dflt:"coupled",editType:"plot"},xgap:{valType:"number",min:0,max:1,editType:"plot"},ygap:{valType:"number",min:0,max:1,editType:"plot"},domain:u({name:"grid",editType:"plot",noGridCell:!0},{}),xside:{valType:"enumerated",values:["bottom","bottom plot","top plot","top"],dflt:"bottom plot",editType:"plot"},yside:{valType:"enumerated",values:["left","left plot","right plot","right"],dflt:"left plot",editType:"plot"},editType:"plot"};function l(m,g,p){var v=g[p+"axes"],y=Object.keys((m._splomAxes||{})[p]||{});return Array.isArray(v)?v:y.length?y:void 0}function d(m,g,p,v,y,x){var w=g(m+"gap",p),k=g("domain."+m);g(m+"side",v);for(var b=new Array(y),T=k[0],_=(k[1]-T)/(y-w),M=_*(1-w),A=0;A1){!k&&!b&&!T&&L("pattern")==="independent"&&(k=!0),M._hasSubplotGrid=k;var E,D,O=L("roworder")==="top to bottom",R=k?.2:.1,z=k?.3:.1;_&&g._splomGridDflt&&(E=g._splomGridDflt.xside,D=g._splomGridDflt.yside),M._domains={x:d("x",L,R,E,S),y:d("y",L,z,D,A,O)}}else delete g.grid}function L(P,N){return r.coerce(p,M,s,P,N)}},contentDefaults:function(m,g){var p=g.grid;if(p&&p._domains){var v,y,x,w,k,b,T,_=m.grid||{},M=g._subplots,A=p._hasSubplotGrid,S=p.rows,E=p.columns,D=p.pattern==="independent",O=p._axisMap={};if(A){var R=_.subplots||[];b=p.subplots=new Array(S);var z=1;for(v=0;v1);if(A===!1&&(h.legend=void 0),(A!==!1||p.uirevision)&&(y("uirevision",h.uirevision),A!==!1)){y("bgcolor",h.paper_bgcolor),y("bordercolor"),y("borderwidth");var S,E,D,O=a.coerceFont(y,"font",h.font),R=y("orientation")==="h";if(R?(S=0,r.getComponentMethod("rangeslider","isVisible")(d.xaxis)?(E=1.1,D="bottom"):(E=-.1,D="top")):(S=1.02,E=1,D="auto"),y("traceorder",_),l.isGrouped(h.legend)&&y("tracegroupgap"),y("itemsizing"),y("itemwidth"),y("itemclick"),y("itemdoubleclick"),y("groupclick"),y("x",S),y("xanchor"),y("y",E),y("yanchor",D),y("valign"),a.noneOrAll(p,v,["x","y"]),y("title.text")){y("title.side",R?"left":"top");var z=a.extendFlat({},O,{size:a.bigFont(O.size)});a.coerceFont(y,"title.font",z)}}}},{"../../lib":503,"../../plot_api/plot_template":543,"../../plots/attributes":550,"../../plots/layout_attributes":610,"../../registry":638,"./attributes":416,"./helpers":422}],419:[function(e,o,f){var r=e("@plotly/d3"),a=e("../../lib"),u=e("../../plots/plots"),c=e("../../registry"),i=e("../../lib/events"),s=e("../dragelement"),l=e("../drawing"),d=e("../color"),h=e("../../lib/svg_text_utils"),m=e("./handle_click"),g=e("./constants"),p=e("../../constants/alignment"),v=p.LINE_SPACING,y=p.FROM_TL,x=p.FROM_BR,w=e("./get_legend_data"),k=e("./style"),b=e("./helpers");function T(O,R,z,L,P){var N=z.data()[0][0].trace,B={event:P,node:z.node(),curveNumber:N.index,expandedIndex:N._expandedIndex,data:O.data,layout:O.layout,frames:O._transitionData._frames,config:O._context,fullData:O._fullData,fullLayout:O._fullLayout};N._group&&(B.group=N._group),c.traceIs(N,"pie-like")&&(B.label=z.datum()[0].label),i.triggerHandler(O,"plotly_legendclick",B)!==!1&&(L===1?R._clickTimeout=setTimeout(function(){O._fullLayout&&m(z,O,L)},O._context.doubleClickDelay):L===2&&(R._clickTimeout&&clearTimeout(R._clickTimeout),O._legendMouseDownTime=0,i.triggerHandler(O,"plotly_legenddoubleclick",B)!==!1&&m(z,O,L)))}function _(O,R,z){var L,P,N=O.data()[0][0],B=N.trace,G=c.traceIs(B,"pie-like"),W=!z._inHover&&R._context.edits.legendText&&!G,K=z._maxNameLength;N.groupTitle?(L=N.groupTitle.text,P=N.groupTitle.font):(P=z.font,z.entries?L=N.text:(L=G?N.label:B.name,B._meta&&(L=a.templateString(L,B._meta))));var te=a.ensureSingle(O,"text","legendtext");te.attr("text-anchor","start").call(l.font,P).text(W?M(L,K):L);var Y=z.itemwidth+2*g.itemGap;h.positionText(te,Y,0),W?te.call(h.makeEditable,{gd:R,text:L}).call(S,O,R,z).on("edit",function(Z){this.text(M(Z,K)).call(S,O,R,z);var re=N.trace._fullInput||{},U={};if(c.hasTransform(re,"groupby")){var q=c.getTransformIndices(re,"groupby"),$=q[q.length-1],ne=a.keyedContainer(re,"transforms["+$+"].styles","target","value.name");ne.set(N.trace._group,Z),U=ne.constructUpdate()}else U.name=Z;return c.call("_guiRestyle",R,U,B.index)}):S(te,O,R,z)}function M(O,R){var z=Math.max(4,R);if(O&&O.trim().length>=z/2)return O;for(var L=z-(O=O||"").length;L>0;L--)O+=" ";return O}function A(O,R){var z,L=R._context.doubleClickDelay,P=1,N=a.ensureSingle(O,"rect","legendtoggle",function(B){R._context.staticPlot||B.style("cursor","pointer").attr("pointer-events","all"),B.call(d.fill,"rgba(0,0,0,0)")});R._context.staticPlot||(N.on("mousedown",function(){(z=new Date().getTime())-R._legendMouseDownTimeL&&(P=Math.max(P-1,1)),T(R,B,O,P,r.event)}}))}function S(O,R,z,L,P){L._inHover&&O.attr("data-notex",!0),h.convertToTspans(O,z,function(){(function(N,B,G,W){var K=N.data()[0][0];if(!G._inHover&&K&&!K.trace.showlegend)return void N.remove();var te=N.select("g[class*=math-group]"),Y=te.node();G||(G=B._fullLayout.legend);var Z,re=G.borderwidth;Z=W===1?G.title.font:K.groupTitle?K.groupTitle.font:G.font;var U,q,$=Z.size*v;if(Y){var ne=l.bBox(Y);U=ne.height,q=ne.width,W===1?l.setTranslate(te,re,re+.75*U):l.setTranslate(te,0,.25*U)}else{var H=N.select(W===1?".legendtitletext":".legendtext"),Q=h.lineCount(H),ee=H.node();if(U=$*Q,q=ee?l.bBox(ee).width:0,W===1)G.title.side==="left"&&(q+=2*g.itemGap),h.positionText(H,re+g.titlePad,re+$);else{var ie=2*g.itemGap+G.itemwidth;K.groupTitle&&(ie=g.itemGap,q-=G.itemwidth),h.positionText(H,ie,-$*((Q-1)/2-.3))}}W===1?(G._titleWidth=q,G._titleHeight=U):(K.lineHeight=$,K.height=Math.max(U,16)+3,K.width=q)})(R,z,L,P)})}function E(O){return a.isRightAnchor(O)?"right":a.isCenterAnchor(O)?"center":"left"}function D(O){return a.isBottomAnchor(O)?"bottom":a.isMiddleAnchor(O)?"middle":"top"}o.exports=function(O,R){return R||(R=O._fullLayout.legend||{}),function(z,L){var P,N,B=z._fullLayout,G="legend"+B._uid,W=L._inHover;if(W?(P=L.layer,G+="-hover"):P=B._infolayer,!!P){if(z._legendMouseDownTime||(z._legendMouseDownTime=0),W){if(!L.entries)return;N=w(L.entries,L)}else{if(!z.calcdata)return;N=B.showlegend&&w(z.calcdata,L)}var K=B.hiddenlabels||[];if(!(W||B.showlegend&&N.length))return P.selectAll(".legend").remove(),B._topdefs.select("#"+G).remove(),u.autoMargin(z,"legend");var te=a.ensureSingle(P,"g","legend",function(Q){W||Q.attr("pointer-events","all")}),Y=a.ensureSingleById(B._topdefs,"clipPath",G,function(Q){Q.append("rect")}),Z=a.ensureSingle(te,"rect","bg",function(Q){Q.attr("shape-rendering","crispEdges")});Z.call(d.stroke,L.bordercolor).call(d.fill,L.bgcolor).style("stroke-width",L.borderwidth+"px");var re=a.ensureSingle(te,"g","scrollbox"),U=L.title;if(L._titleWidth=0,L._titleHeight=0,U.text){var q=a.ensureSingle(re,"text","legendtitletext");q.attr("text-anchor","start").call(l.font,U.font).text(U.text),S(q,re,z,L,1)}else re.selectAll(".legendtitletext").remove();var $=a.ensureSingle(te,"rect","scrollbar",function(Q){Q.attr(g.scrollBarEnterAttrs).call(d.fill,g.scrollBarColor)}),ne=re.selectAll("g.groups").data(N);ne.enter().append("g").attr("class","groups"),ne.exit().remove();var H=ne.selectAll("g.traces").data(a.identity);H.enter().append("g").attr("class","traces"),H.exit().remove(),H.style("opacity",function(Q){var ee=Q[0].trace;return c.traceIs(ee,"pie-like")?K.indexOf(Q[0].label)!==-1?.5:1:ee.visible==="legendonly"?.5:1}).each(function(){r.select(this).call(_,z,L)}).call(k,z,L).each(function(){W||r.select(this).call(A,z)}),a.syncOrAsync([u.previousPromises,function(){return function(Q,ee,ie,ae){var ue=Q._fullLayout;ae||(ae=ue.legend);var le=ue._size,ge=b.isVertical(ae),fe=b.isGrouped(ae),me=ae.borderwidth,_e=2*me,we=g.itemGap,Te=ae.itemwidth+2*we,Oe=2*(me+we),de=D(ae),ye=ae.y<0||ae.y===0&&de==="top",Me=ae.y>1||ae.y===1&&de==="bottom",ke=ae.tracegroupgap;ae._maxHeight=Math.max(ye||Me?ue.height/2:le.h,30);var Ee=0;ae._width=0,ae._height=0;var ze=function(Tt){var dt=0,Pe=0,Ie=Tt.title.side;return Ie&&(Ie.indexOf("left")!==-1&&(dt=Tt._titleWidth),Ie.indexOf("top")!==-1&&(Pe=Tt._titleHeight)),[dt,Pe]}(ae);if(ge)ie.each(function(Tt){var dt=Tt[0].height;l.setTranslate(this,me+ze[0],me+ze[1]+ae._height+dt/2+we),ae._height+=dt,ae._width=Math.max(ae._width,Tt[0].width)}),Ee=Te+ae._width,ae._width+=we+Te+_e,ae._height+=Oe,fe&&(ee.each(function(Tt,dt){l.setTranslate(this,0,dt*ae.tracegroupgap)}),ae._height+=(ae._lgroupsLength-1)*ae.tracegroupgap);else{var Fe=E(ae),Ve=ae.x<0||ae.x===0&&Fe==="right",Ke=ae.x>1||ae.x===1&&Fe==="left",Re=Me||ye,qe=ue.width/2;ae._maxWidth=Math.max(Ve?Re&&Fe==="left"?le.l+le.w:qe:Ke?Re&&Fe==="right"?le.r+le.w:qe:le.w,2*Te);var We=0,Ye=0;ie.each(function(Tt){var dt=Tt[0].width+Te;We=Math.max(We,dt),Ye+=dt}),Ee=null;var nt=0;if(fe){var ft=0,vt=0,Pt=0;ee.each(function(){var Tt=0,dt=0;r.select(this).selectAll("g.traces").each(function(Ie){var Ae=Ie[0].width,De=Ie[0].height;l.setTranslate(this,ze[0],ze[1]+me+we+De/2+dt),dt+=De,Tt=Math.max(Tt,Te+Ae)});var Pe=Tt+we;vt>0&&Pe+me+vt>ae._maxWidth?(nt=Math.max(nt,vt),vt=0,Pt+=ft+ke,ft=dt):ft=Math.max(ft,dt),l.setTranslate(this,vt,Pt),vt+=Pe}),ae._width=Math.max(nt,vt)+me,ae._height=Pt+ft+Oe}else{var At=ie.size(),at=Ye+_e+(At-1)*we=ae._maxWidth&&(nt=Math.max(nt,Jt),Ot=0,Wt+=et,ae._height+=et,et=0),l.setTranslate(this,ze[0]+me+Ot,ze[1]+me+Wt+dt/2+we),Jt=Ot+Pe+we,Ot+=Ie,et=Math.max(et,dt)}),at?(ae._width=Ot+_e,ae._height=et+Oe):(ae._width=Math.max(nt,Jt)+_e,ae._height+=et+Oe)}}ae._width=Math.ceil(Math.max(ae._width+ze[0],ae._titleWidth+2*(me+g.titlePad))),ae._height=Math.ceil(Math.max(ae._height+ze[1],ae._titleHeight+2*(me+g.itemGap))),ae._effHeight=Math.min(ae._height,ae._maxHeight);var Be=Q._context.edits,Ge=Be.legendText||Be.legendPosition;ie.each(function(Tt){var dt=r.select(this).select(".legendtoggle"),Pe=Tt[0].height,Ie=Ge?Te:Ee||Te+Tt[0].width;ge||(Ie+=we/2),l.setRect(dt,0,-Pe/2,Ie,Pe)})}(z,ne,H,L)},function(){var Q,ee,ie,ae,ue=B._size,le=L.borderwidth;if(!W){if(function(Re){var qe=Re._fullLayout.legend,We=E(qe),Ye=D(qe);return u.autoMargin(Re,"legend",{x:qe.x,y:qe.y,l:qe._width*y[We],r:qe._width*x[We],b:qe._effHeight*x[Ye],t:qe._effHeight*y[Ye]})}(z))return;var ge=ue.l+ue.w*L.x-y[E(L)]*L._width,fe=ue.t+ue.h*(1-L.y)-y[D(L)]*L._effHeight;if(B.margin.autoexpand){var me=ge,_e=fe;ge=a.constrain(ge,0,B.width-L._width),fe=a.constrain(fe,0,B.height-L._effHeight),ge!==me&&a.log("Constrain legend.x to make legend fit inside graph"),fe!==_e&&a.log("Constrain legend.y to make legend fit inside graph")}l.setTranslate(te,ge,fe)}if($.on(".drag",null),te.on("wheel",null),W||L._height<=L._maxHeight||z._context.staticPlot){var we=L._effHeight;W&&(we=L._height),Z.attr({width:L._width-le,height:we-le,x:le/2,y:le/2}),l.setTranslate(re,0,0),Y.select("rect").attr({width:L._width-2*le,height:we-2*le,x:le,y:le}),l.setClipUrl(re,G,z),l.setRect($,0,0,0,0),delete L._scrollY}else{var Te,Oe,de,ye=Math.max(g.scrollBarMinHeight,L._effHeight*L._effHeight/L._height),Me=L._effHeight-ye-2*g.scrollBarMargin,ke=L._height-L._effHeight,Ee=Me/ke,ze=Math.min(L._scrollY||0,ke);Z.attr({width:L._width-2*le+g.scrollBarWidth+g.scrollBarMargin,height:L._effHeight-le,x:le/2,y:le/2}),Y.select("rect").attr({width:L._width-2*le+g.scrollBarWidth+g.scrollBarMargin,height:L._effHeight-2*le,x:le,y:le+ze}),l.setClipUrl(re,G,z),Ke(ze,ye,Ee),te.on("wheel",function(){Ke(ze=a.constrain(L._scrollY+r.event.deltaY/Me*ke,0,ke),ye,Ee),ze!==0&&ze!==ke&&r.event.preventDefault()});var Fe=r.behavior.drag().on("dragstart",function(){var Re=r.event.sourceEvent;Te=Re.type==="touchstart"?Re.changedTouches[0].clientY:Re.clientY,de=ze}).on("drag",function(){var Re=r.event.sourceEvent;Re.buttons===2||Re.ctrlKey||(Oe=Re.type==="touchmove"?Re.changedTouches[0].clientY:Re.clientY,Ke(ze=function(qe,We,Ye){var nt=(Ye-We)/Ee+qe;return a.constrain(nt,0,ke)}(de,Te,Oe),ye,Ee))});$.call(Fe);var Ve=r.behavior.drag().on("dragstart",function(){var Re=r.event.sourceEvent;Re.type==="touchstart"&&(Te=Re.changedTouches[0].clientY,de=ze)}).on("drag",function(){var Re=r.event.sourceEvent;Re.type==="touchmove"&&(Oe=Re.changedTouches[0].clientY,Ke(ze=function(qe,We,Ye){var nt=(We-Ye)/Ee+qe;return a.constrain(nt,0,ke)}(de,Te,Oe),ye,Ee))});re.call(Ve)}function Ke(Re,qe,We){L._scrollY=z._fullLayout.legend._scrollY=Re,l.setTranslate(re,0,-Re),l.setRect($,L._width,g.scrollBarMargin+Re*We,g.scrollBarWidth,qe),Y.select("rect").attr("y",le+Re)}z._context.edits.legendPosition&&(te.classed("cursor-move",!0),s.init({element:te.node(),gd:z,prepFn:function(){var Re=l.getTranslate(te);ie=Re.x,ae=Re.y},moveFn:function(Re,qe){var We=ie+Re,Ye=ae+qe;l.setTranslate(te,We,Ye),Q=s.align(We,0,ue.l,ue.l+ue.w,L.xanchor),ee=s.align(Ye,0,ue.t+ue.h,ue.t,L.yanchor)},doneFn:function(){Q!==void 0&&ee!==void 0&&c.call("_guiRelayout",z,{"legend.x":Q,"legend.y":ee})},clickFn:function(Re,qe){var We=P.selectAll("g.traces").filter(function(){var Ye=this.getBoundingClientRect();return qe.clientX>=Ye.left&&qe.clientX<=Ye.right&&qe.clientY>=Ye.top&&qe.clientY<=Ye.bottom});We.size()>0&&T(z,te,We,Re,qe)}}))}],z)}}(O,R)}},{"../../constants/alignment":471,"../../lib":503,"../../lib/events":492,"../../lib/svg_text_utils":529,"../../plots/plots":619,"../../registry":638,"../color":366,"../dragelement":385,"../drawing":388,"./constants":417,"./get_legend_data":420,"./handle_click":421,"./helpers":422,"./style":424,"@plotly/d3":58}],420:[function(e,o,f){var r=e("../../registry"),a=e("./helpers");o.exports=function(u,c){var i,s,l=c._inHover,d=a.isGrouped(c),h=a.isReversed(c),m={},g=[],p=!1,v={},y=0,x=0;function w(B,G){if(B!==""&&a.isGrouped(c))g.indexOf(B)===-1?(g.push(B),p=!0,m[B]=[G]):m[B].push(G);else{var W="~~i"+y;g.push(W),m[W]=[G],y++}}for(i=0;iO&&(D=O)}S[i][0]._groupMinRank=D,S[i][0]._preGroupSort=i}var R=function(B,G){return B.trace.legendrank-G.trace.legendrank||B._preSort-G._preSort};for(S.forEach(function(B,G){B[0]._preGroupSort=G}),S.sort(function(B,G){return B[0]._groupMinRank-G[0]._groupMinRank||B[0]._preGroupSort-G[0]._preGroupSort}),i=0;ik?k:x}o.exports=function(x,w,k){var b=w._fullLayout;k||(k=b.legend);var T=k.itemsizing==="constant",_=k.itemwidth,M=(_+2*g.itemGap)/2,A=c(M,0),S=function(O,R,z,L){var P;if(O+1)P=O;else{if(!(R&&R.width>0))return 0;P=R.width}return T?L:Math.min(P,z)};function E(O,R,z){var L=O[0].trace,P=L.marker||{},N=P.line||{},B=z?L.visible&&L.type===z:a.traceIs(L,"bar"),G=r.select(R).select("g.legendpoints").selectAll("path.legend"+z).data(B?[O]:[]);G.enter().append("path").classed("legend"+z,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",A),G.exit().remove(),G.each(function(W){var K=r.select(this),te=W[0],Y=S(te.mlw,P.line,5,2);K.style("stroke-width",Y+"px");var Z=te.mcc;if(!k._inHover&&"mc"in te){var re=l(P),U=re.mid;U===void 0&&(U=(re.max+re.min)/2),Z=i.tryColorscale(P,"")(U)}var q=Z||te.mc||P.color,$=P.pattern,ne=$&&i.getPatternAttr($.shape,0,"");if(ne){var H=i.getPatternAttr($.bgcolor,0,null),Q=i.getPatternAttr($.fgcolor,0,null),ee=$.fgopacity,ie=y($.size,8,10),ae=y($.solidity,.5,1),ue="legend-"+L.uid;K.call(i.pattern,"legend",w,ue,ne,ie,ae,Z,$.fillmode,H,Q,ee)}else K.call(s.fill,q);Y&&s.stroke(K,te.mlc||N.color)})}function D(O,R,z){var L=O[0],P=L.trace,N=z?P.visible&&P.type===z:a.traceIs(P,z),B=r.select(R).select("g.legendpoints").selectAll("path.legend"+z).data(N?[O]:[]);if(B.enter().append("path").classed("legend"+z,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",A),B.exit().remove(),B.size()){var G=(P.marker||{}).line,W=S(m(G.width,L.pts),G,5,2),K=u.minExtend(P,{marker:{line:{width:W}}});K.marker.line.color=G.color;var te=u.minExtend(L,{trace:K});h(B,te,K)}}x.each(function(O){var R=r.select(this),z=u.ensureSingle(R,"g","layers");z.style("opacity",O[0].trace.opacity);var L=k.valign,P=O[0].lineHeight,N=O[0].height;if(L!=="middle"&&P&&N){var B={top:1,bottom:-1}[L]*(.5*(P-N+3));z.attr("transform",c(0,B))}else z.attr("transform",null);z.selectAll("g.legendfill").data([O]).enter().append("g").classed("legendfill",!0),z.selectAll("g.legendlines").data([O]).enter().append("g").classed("legendlines",!0);var G=z.selectAll("g.legendsymbols").data([O]);G.enter().append("g").classed("legendsymbols",!0),G.selectAll("g.legendpoints").data([O]).enter().append("g").classed("legendpoints",!0)}).each(function(O){var R,z=O[0].trace,L=[];if(z.visible)switch(z.type){case"histogram2d":case"heatmap":L=[["M-15,-2V4H15V-2Z"]],R=!0;break;case"choropleth":case"choroplethmapbox":L=[["M-6,-6V6H6V-6Z"]],R=!0;break;case"densitymapbox":L=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],R="radial";break;case"cone":L=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],R=!1;break;case"streamtube":L=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],R=!1;break;case"surface":L=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],R=!0;break;case"mesh3d":L=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],R=!1;break;case"volume":L=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],R=!0;break;case"isosurface":L=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],R=!1}var P=r.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(L);P.enter().append("path").classed("legend3dandfriends",!0).attr("transform",A).style("stroke-miterlimit",1),P.exit().remove(),P.each(function(N,B){var G,W=r.select(this),K=l(z),te=K.colorscale,Y=K.reversescale;if(te){if(!R){var Z=te.length;G=B===0?te[Y?Z-1:0][1]:B===1?te[Y?0:Z-1][1]:te[Math.floor((Z-1)/2)][1]}}else{var re=z.vertexcolor||z.facecolor||z.color;G=u.isArrayOrTypedArray(re)?re[B]||re[0]:re}W.attr("d",N[0]),G?W.call(s.fill,G):W.call(function(U){if(U.size()){var q="legendfill-"+z.uid;i.gradient(U,w,q,p(Y,R==="radial"),te,"fill")}})})}).each(function(O){var R=O[0].trace,z=R.type==="waterfall";if(O[0]._distinct&&z){var L=O[0].trace[O[0].dir].marker;return O[0].mc=L.color,O[0].mlw=L.line.width,O[0].mlc=L.line.color,E(O,this,"waterfall")}var P=[];R.visible&&z&&(P=O[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var N=r.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(P);N.enter().append("path").classed("legendwaterfall",!0).attr("transform",A).style("stroke-miterlimit",1),N.exit().remove(),N.each(function(B){var G=r.select(this),W=R[B[0]].marker,K=S(void 0,W.line,5,2);G.attr("d",B[1]).style("stroke-width",K+"px").call(s.fill,W.color),K&&G.call(s.stroke,W.line.color)})}).each(function(O){E(O,this,"funnel")}).each(function(O){E(O,this)}).each(function(O){var R=O[0].trace,z=r.select(this).select("g.legendpoints").selectAll("path.legendbox").data(R.visible&&a.traceIs(R,"box-violin")?[O]:[]);z.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",A),z.exit().remove(),z.each(function(){var L=r.select(this);if(R.boxpoints!=="all"&&R.points!=="all"||s.opacity(R.fillcolor)!==0||s.opacity((R.line||{}).color)!==0){var P=S(void 0,R.line,5,2);L.style("stroke-width",P+"px").call(s.fill,R.fillcolor),P&&s.stroke(L,R.line.color)}else{var N=u.minExtend(R,{marker:{size:T?12:u.constrain(R.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});z.call(i.pointStyle,N,w)}})}).each(function(O){D(O,this,"funnelarea")}).each(function(O){D(O,this,"pie")}).each(function(O){var R,z,L=v(O),P=L.showFill,N=L.showLine,B=L.showGradientLine,G=L.showGradientFill,W=L.anyFill,K=L.anyLine,te=O[0],Y=te.trace,Z=l(Y),re=Z.colorscale,U=Z.reversescale,q=d.hasMarkers(Y)||!W?"M5,0":K?"M5,-2":"M5,-3",$=r.select(this),ne=$.select(".legendfill").selectAll("path").data(P||G?[O]:[]);if(ne.enter().append("path").classed("js-fill",!0),ne.exit().remove(),ne.attr("d",q+"h"+_+"v6h-"+_+"z").call(function(ee){if(ee.size())if(P)i.fillGroupStyle(ee,w);else{var ie="legendfill-"+Y.uid;i.gradient(ee,w,ie,p(U),re,"fill")}}),N||B){var H=S(void 0,Y.line,10,5);z=u.minExtend(Y,{line:{width:H}}),R=[u.minExtend(te,{trace:z})]}var Q=$.select(".legendlines").selectAll("path").data(N||B?[R]:[]);Q.enter().append("path").classed("js-line",!0),Q.exit().remove(),Q.attr("d",q+(B?"l"+_+",0.0001":"h"+_)).call(N?i.lineGroupStyle:function(ee){if(ee.size()){var ie="legendline-"+Y.uid;i.lineGroupStyle(ee),i.gradient(ee,w,ie,p(U),re,"stroke")}})}).each(function(O){var R,z,L=v(O),P=L.anyFill,N=L.anyLine,B=L.showLine,G=L.showMarker,W=O[0],K=W.trace,te=!G&&!N&&!P&&d.hasText(K);function Y(Q,ee,ie,ae){var ue=u.nestedProperty(K,Q).get(),le=u.isArrayOrTypedArray(ue)&&ee?ee(ue):ue;if(T&&le&&ae!==void 0&&(le=ae),ie){if(leie[1])return ie[1]}return le}function Z(Q){return W._distinct&&W.index&&Q[W.index]?Q[W.index]:Q[0]}if(G||te||B){var re={},U={};if(G){re.mc=Y("marker.color",Z),re.mx=Y("marker.symbol",Z),re.mo=Y("marker.opacity",u.mean,[.2,1]),re.mlc=Y("marker.line.color",Z),re.mlw=Y("marker.line.width",u.mean,[0,5],2),U.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var q=Y("marker.size",u.mean,[2,16],12);re.ms=q,U.marker.size=q}B&&(U.line={width:Y("line.width",Z,[0,10],5)}),te&&(re.tx="Aa",re.tp=Y("textposition",Z),re.ts=10,re.tc=Y("textfont.color",Z),re.tf=Y("textfont.family",Z)),R=[u.minExtend(W,re)],(z=u.minExtend(K,U)).selectedpoints=null,z.texttemplate=null}var $=r.select(this).select("g.legendpoints"),ne=$.selectAll("path.scatterpts").data(G?R:[]);ne.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",A),ne.exit().remove(),ne.call(i.pointStyle,z,w),G&&(R[0].mrc=3);var H=$.selectAll("g.pointtext").data(te?R:[]);H.enter().append("g").classed("pointtext",!0).append("text").attr("transform",A),H.exit().remove(),H.selectAll("text").call(i.textPointStyle,z,w)}).each(function(O){var R=O[0].trace,z=r.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(R.visible&&R.type==="candlestick"?[O,O]:[]);z.enter().append("path").classed("legendcandle",!0).attr("d",function(L,P){return P?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",A).style("stroke-miterlimit",1),z.exit().remove(),z.each(function(L,P){var N=r.select(this),B=R[P?"increasing":"decreasing"],G=S(void 0,B.line,5,2);N.style("stroke-width",G+"px").call(s.fill,B.fillcolor),G&&s.stroke(N,B.line.color)})}).each(function(O){var R=O[0].trace,z=r.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(R.visible&&R.type==="ohlc"?[O,O]:[]);z.enter().append("path").classed("legendohlc",!0).attr("d",function(L,P){return P?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",A).style("stroke-miterlimit",1),z.exit().remove(),z.each(function(L,P){var N=r.select(this),B=R[P?"increasing":"decreasing"],G=S(void 0,B.line,5,2);N.style("fill","none").call(i.dashLine,B.line.dash,G),G&&s.stroke(N,B.line.color)})})}},{"../../lib":503,"../../registry":638,"../../traces/pie/helpers":906,"../../traces/pie/style_one":912,"../../traces/scatter/subtypes":952,"../color":366,"../colorscale/helpers":377,"../drawing":388,"./constants":417,"@plotly/d3":58}],425:[function(e,o,f){e("./constants"),o.exports={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar"},bgcolor:{valType:"color",editType:"modebar"},color:{valType:"color",editType:"modebar"},activecolor:{valType:"color",editType:"modebar"},uirevision:{valType:"any",editType:"none"},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"}}},{"./constants":427}],426:[function(e,o,f){var r=e("../../registry"),a=e("../../plots/plots"),u=e("../../plots/cartesian/axis_ids"),c=e("../../fonts/ploticon"),i=e("../shapes/draw").eraseActiveShape,s=e("../../lib"),l=s._,d=o.exports={};function h(b,T){var _,M,A=T.currentTarget,S=A.getAttribute("data-attr"),E=A.getAttribute("data-val")||!0,D=b._fullLayout,O={},R=u.list(b,null,!0),z=D._cartesianSpikesEnabled;if(S==="zoom"){var L,P=E==="in"?.5:2,N=(1+P)/2,B=(1-P)/2;for(M=0;M1?(U=["toggleHover"],q=["resetViews"]):D?(re=["zoomInGeo","zoomOutGeo"],U=["hoverClosestGeo"],q=["resetGeo"]):E?(U=["hoverClosest3d"],q=["resetCameraDefault3d","resetCameraLastSave3d"]):P?(re=["zoomInMapbox","zoomOutMapbox"],U=["toggleHover"],q=["resetViewMapbox"]):z?U=["hoverClosestGl2d"]:O?U=["hoverClosestPie"]:G?(U=["hoverClosestCartesian","hoverCompareCartesian"],q=["resetViewSankey"]):U=["toggleHover"],S&&(U=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]),(function(ae){for(var ue=0;ue0)){var w=function(b,T,_){for(var M=_.filter(function(D){return T[D].anchor===b._id}),A=0,S=0;S=fe.max)le=ee[ge+1];else if(ue=fe.pmax)le=ee[ge+1];else if(ue0?b+x:x;return{ppad:x,ppadplus:w?_:M,ppadminus:w?M:_}}return{ppad:x}}function d(h,m,g,p,v){var y=h.type==="category"||h.type==="multicategory"?h.r2c:h.d2c;if(m!==void 0)return[y(m),y(g)];if(p){var x,w,k,b,T=1/0,_=-1/0,M=p.match(u.segmentRE);for(h.type==="date"&&(y=c.decodeDate(y)),x=0;x_&&(_=b)));return _>=T?[T,_]:void 0}}o.exports=function(h){var m=h._fullLayout,g=r.filterVisible(m.shapes);if(g.length&&h._fullData.length)for(var p=0;pge?(_e=ue,de="y0",we=ge,ye="y1"):(_e=ge,de="y1",we=ue,ye="y0"),Wt(dt),Ge(ee,H),function(Pe,Ie,Ae){var De=Ie.xref,He=Ie.yref,rt=u.getFromId(Ae,De),lt=u.getFromId(Ae,He),ot="";De==="paper"||rt.autorange||(ot+=De),He==="paper"||lt.autorange||(ot+=He),d.setClipUrl(Pe,ot?"clip"+Ae._fullLayout._uid+ot:null,Ae)}(ne,H,$),Ot.moveFn=ze==="move"?Jt:Be,Ot.altKey=dt.altKey)},doneFn:function(){x($)||(g(ne),Tt(ee),b(ne,$,H),r.call("_guiRelayout",$,ie.getUpdateObj()))},clickFn:function(){x($)||Tt(ee)}};function Wt(dt){if(x($))ze=null;else if(Ke)ze=dt.target.tagName==="path"?"move":dt.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var Pe=Ot.element.getBoundingClientRect(),Ie=Pe.right-Pe.left,Ae=Pe.bottom-Pe.top,De=dt.clientX-Pe.left,He=dt.clientY-Pe.top,rt=!Re&&Ie>10&&Ae>10&&!dt.shiftKey?m.getCursor(De/Ie,1-He/Ae):"move";g(ne,rt),ze=rt.split("-")[0]}}function Jt(dt,Pe){if(H.type==="path"){var Ie=function(He){return He},Ae=Ie,De=Ie;Fe?qe("xanchor",H.xanchor=At(fe+dt)):(Ae=function(He){return At(vt(He)+dt)},We&&We.type==="date"&&(Ae=v.encodeDate(Ae))),Ve?qe("yanchor",H.yanchor=at(me+Pe)):(De=function(He){return at(Pt(He)+Pe)},nt&&nt.type==="date"&&(De=v.encodeDate(De))),qe("path",H.path=_(Ee,Ae,De))}else Fe?qe("xanchor",H.xanchor=At(fe+dt)):(qe("x0",H.x0=At(ae+dt)),qe("x1",H.x1=At(le+dt))),Ve?qe("yanchor",H.yanchor=at(me+Pe)):(qe("y0",H.y0=at(ue+Pe)),qe("y1",H.y1=at(ge+Pe)));ne.attr("d",T($,H)),Ge(ee,H)}function Be(dt,Pe){if(Re){var Ie=function(Le){return Le},Ae=Ie,De=Ie;Fe?qe("xanchor",H.xanchor=At(fe+dt)):(Ae=function(Le){return At(vt(Le)+dt)},We&&We.type==="date"&&(Ae=v.encodeDate(Ae))),Ve?qe("yanchor",H.yanchor=at(me+Pe)):(De=function(Le){return at(Pt(Le)+Pe)},nt&&nt.type==="date"&&(De=v.encodeDate(De))),qe("path",H.path=_(Ee,Ae,De))}else if(Ke){if(ze==="resize-over-start-point"){var He=ae+dt,rt=Ve?ue-Pe:ue+Pe;qe("x0",H.x0=Fe?He:At(He)),qe("y0",H.y0=Ve?rt:at(rt))}else if(ze==="resize-over-end-point"){var lt=le+dt,ot=Ve?ge-Pe:ge+Pe;qe("x1",H.x1=Fe?lt:At(lt)),qe("y1",H.y1=Ve?ot:at(ot))}}else{var kt=function(Le){return ze.indexOf(Le)!==-1},wt=kt("n"),Vt=kt("s"),Ut=kt("w"),tt=kt("e"),bt=wt?_e+Pe:_e,zt=Vt?we+Pe:we,St=Ut?Te+dt:Te,Dt=tt?Oe+dt:Oe;Ve&&(wt&&(bt=_e-Pe),Vt&&(zt=we-Pe)),(!Ve&&zt-bt>10||Ve&&bt-zt>10)&&(qe(de,H[de]=Ve?bt:at(bt)),qe(ye,H[ye]=Ve?zt:at(zt))),Dt-St>10&&(qe(Me,H[Me]=Fe?St:At(St)),qe(ke,H[ke]=Fe?Dt:At(Dt)))}ne.attr("d",T($,H)),Ge(ee,H)}function Ge(dt,Pe){(Fe||Ve)&&function(){var Ie=Pe.type!=="path",Ae=dt.selectAll(".visual-cue").data([0]);Ae.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":1}).classed("visual-cue",!0);var De=vt(Fe?Pe.xanchor:a.midRange(Ie?[Pe.x0,Pe.x1]:v.extractPathCoords(Pe.path,p.paramIsX))),He=Pt(Ve?Pe.yanchor:a.midRange(Ie?[Pe.y0,Pe.y1]:v.extractPathCoords(Pe.path,p.paramIsY)));if(De=v.roundPositionForSharpStrokeRendering(De,1),He=v.roundPositionForSharpStrokeRendering(He,1),Fe&&Ve){var rt="M"+(De-1-1)+","+(He-1-1)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";Ae.attr("d",rt)}else if(Fe){var lt="M"+(De-1-1)+","+(He-9-1)+"v18 h2 v-18 Z";Ae.attr("d",lt)}else{var ot="M"+(De-9-1)+","+(He-1-1)+"h18 v2 h-18 Z";Ae.attr("d",ot)}}()}function Tt(dt){dt.selectAll(".visual-cue").remove()}m.init(Ot),et.node().onmousemove=Wt}(A,re,D,S,z,Z):D.editable===!0&&re.style("pointer-events",te||l.opacity(B)*N<=.5?"stroke":"all");re.node().addEventListener("click",function(){return function($,ne){if(!!w($)){var H=+ne.node().getAttribute("data-index");if(H>=0){if(H===$._fullLayout._activeShapeIndex)return void M($);$._fullLayout._activeShapeIndex=H,$._fullLayout._deactivateShape=M,y($)}}}(A,re)})}}function b(A,S,E){var D=(E.xref+E.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");d.setClipUrl(A,D?"clip"+S._fullLayout._uid+D:null,S)}function T(A,S){var E,D,O,R,z,L,P,N,B=S.type,G=u.getRefType(S.xref),W=u.getRefType(S.yref),K=u.getFromId(A,S.xref),te=u.getFromId(A,S.yref),Y=A._fullLayout._size;if(K?G==="domain"?D=function(ee){return K._offset+K._length*ee}:(E=v.shapePositionToRange(K),D=function(ee){return K._offset+K.r2p(E(ee,!0))}):D=function(ee){return Y.l+Y.w*ee},te?W==="domain"?R=function(ee){return te._offset+te._length*(1-ee)}:(O=v.shapePositionToRange(te),R=function(ee){return te._offset+te.r2p(O(ee,!0))}):R=function(ee){return Y.t+Y.h*(1-ee)},B==="path")return K&&K.type==="date"&&(D=v.decodeDate(D)),te&&te.type==="date"&&(R=v.decodeDate(R)),function(ee,ie,ae){var ue=ee.path,le=ee.xsizemode,ge=ee.ysizemode,fe=ee.xanchor,me=ee.yanchor;return ue.replace(p.segmentRE,function(_e){var we=0,Te=_e.charAt(0),Oe=p.paramIsX[Te],de=p.paramIsY[Te],ye=p.numParams[Te],Me=_e.substr(1).replace(p.paramRE,function(ke){return Oe[we]?ke=le==="pixel"?ie(fe)+Number(ke):ie(ke):de[we]&&(ke=ge==="pixel"?ae(me)-Number(ke):ae(ke)),++we>ye&&(ke="X"),ke});return we>ye&&(Me=Me.replace(/[\s,]*X.*/,""),a.log("Ignoring extra params in segment "+_e)),Te+Me})}(S,D,R);if(S.xsizemode==="pixel"){var Z=D(S.xanchor);z=Z+S.x0,L=Z+S.x1}else z=D(S.x0),L=D(S.x1);if(S.ysizemode==="pixel"){var re=R(S.yanchor);P=re-S.y0,N=re-S.y1}else P=R(S.y0),N=R(S.y1);if(B==="line")return"M"+z+","+P+"L"+L+","+N;if(B==="rect")return"M"+z+","+P+"H"+L+"V"+N+"H"+z+"Z";var U=(z+L)/2,q=(P+N)/2,$=Math.abs(U-z),ne=Math.abs(q-P),H="A"+$+","+ne,Q=U+$+","+q;return"M"+Q+H+" 0 1,1 "+(U+","+(q-ne))+H+" 0 0,1 "+Q+"Z"}function _(A,S,E){return A.replace(p.segmentRE,function(D){var O=0,R=D.charAt(0),z=p.paramIsX[R],L=p.paramIsY[R],P=p.numParams[R];return R+D.substr(1).replace(p.paramRE,function(N){return O>=P||(z[O]?N=S(N):L[O]&&(N=E(N)),O++),N})})}function M(A){w(A)&&A._fullLayout._activeShapeIndex>=0&&(s(A),delete A._fullLayout._activeShapeIndex,y(A))}o.exports={draw:y,drawOne:k,eraseActiveShape:function(A){if(!!w(A)){s(A);var S=A._fullLayout._activeShapeIndex,E=(A.layout||{}).shapes||[];if(S=0&&h(_),k.attr("d",v(w)),z&&!T&&(R=function(Z,re){for(var U=0;U1&&(q.length!==2||q[1][0]!=="Z")&&(O===0&&(q[0][0]="M"),w[D]=q,M(),A())}}()}}function K(Z,re){(function(U,q){if(w.length)for(var $=0;$0&&_0&&(Y=Y.transition().duration(N.transition.duration).ease(N.transition.easing)),Y.attr("transform",s(te-.5*h.gripWidth,N._dims.currentValueTotalHeight))}}function O(P,N){var B=P._dims;return B.inputAreaStart+h.stepInset+(B.inputAreaLength-2*h.stepInset)*Math.min(1,Math.max(0,N))}function R(P,N){var B=P._dims;return Math.min(1,Math.max(0,(N-h.stepInset-B.inputAreaStart)/(B.inputAreaLength-2*h.stepInset-2*B.inputAreaStart)))}function z(P,N,B){var G=B._dims,W=i.ensureSingle(P,"rect",h.railTouchRectClass,function(K){K.call(S,N,P,B).style("pointer-events","all")});W.attr({width:G.inputAreaLength,height:Math.max(G.inputAreaWidth,h.tickOffset+B.ticklen+G.labelHeight)}).call(u.fill,B.bgcolor).attr("opacity",0),c.setTranslate(W,0,G.currentValueTotalHeight)}function L(P,N){var B=N._dims,G=B.inputAreaLength-2*h.railInset,W=i.ensureSingle(P,"rect",h.railRectClass);W.attr({width:G,height:h.railWidth,rx:h.railRadius,ry:h.railRadius,"shape-rendering":"crispEdges"}).call(u.stroke,N.bordercolor).call(u.fill,N.bgcolor).style("stroke-width",N.borderwidth+"px"),c.setTranslate(W,h.railInset,.5*(B.inputAreaWidth-h.railWidth)+B.currentValueTotalHeight)}o.exports=function(P){var N=P._fullLayout,B=function(Z,re){for(var U=Z[h.name],q=[],$=0;$0?[0]:[]);function W(Z){Z._commandObserver&&(Z._commandObserver.remove(),delete Z._commandObserver),a.autoMargin(P,y(Z))}if(G.enter().append("g").classed(h.containerClassName,!0).style("cursor","ew-resize"),G.exit().each(function(){r.select(this).selectAll("g."+h.groupClassName).each(W)}).remove(),B.length!==0){var K=G.selectAll("g."+h.groupClassName).data(B,x);K.enter().append("g").classed(h.groupClassName,!0),K.exit().each(W).remove();for(var te=0;te0||ae<0){var fe={left:[-ue,0],right:[ue,0],top:[0,-ue],bottom:[0,ue]}[M.side];$.attr("transform",s(fe[0],fe[1]))}}}return Y.call(Z),W&&(L?Y.on(".opacity",null):(O=0,R=!0,Y.text(T).on("mouseover.opacity",function(){r.select(this).transition().duration(m.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){r.select(this).transition().duration(m.HIDE_PLACEHOLDER).style("opacity",0)})),Y.call(h.makeEditable,{gd:v}).on("edit",function(q){_!==void 0?c.call("_guiRestyle",v,b,q,_):c.call("_guiRelayout",v,b,q)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Z)}).on("input",function(q){this.text(q||" ").call(h.positionText,A.x,A.y)})),Y.classed("js-placeholder",R),E}}},{"../../constants/alignment":471,"../../constants/interactions":478,"../../lib":503,"../../lib/svg_text_utils":529,"../../plots/plots":619,"../../registry":638,"../color":366,"../drawing":388,"@plotly/d3":58,"fast-isnumeric":190}],465:[function(e,o,f){var r=e("../../plots/font_attributes"),a=e("../color/attributes"),u=e("../../lib/extend").extendFlat,c=e("../../plot_api/edit_types").overrideAll,i=e("../../plots/pad_attributes"),s=e("../../plot_api/plot_template").templatedArray,l=s("button",{visible:{valType:"boolean"},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},args2:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""},execute:{valType:"boolean",dflt:!0}});o.exports=c(s("updatemenu",{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean"},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown"},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down"},active:{valType:"integer",min:-1,dflt:0},showactive:{valType:"boolean",dflt:!0},buttons:l,x:{valType:"number",min:-2,max:3,dflt:-.05},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},pad:u(i({editType:"arraydraw"}),{}),font:r({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:a.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")},{"../../lib/extend":493,"../../plot_api/edit_types":536,"../../plot_api/plot_template":543,"../../plots/font_attributes":585,"../../plots/pad_attributes":618,"../color/attributes":365}],466:[function(e,o,f){o.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF",arrowSymbol:{left:"\u25C4",right:"\u25BA",up:"\u25B2",down:"\u25BC"}}},{}],467:[function(e,o,f){var r=e("../../lib"),a=e("../../plots/array_container_defaults"),u=e("./attributes"),c=e("./constants").name,i=u.buttons;function s(d,h,m){function g(p,v){return r.coerce(d,h,u,p,v)}g("visible",a(d,h,{name:"buttons",handleItemDefaults:l}).length>0)&&(g("active"),g("direction"),g("type"),g("showactive"),g("x"),g("y"),r.noneOrAll(d,h,["x","y"]),g("xanchor"),g("yanchor"),g("pad.t"),g("pad.r"),g("pad.b"),g("pad.l"),r.coerceFont(g,"font",m.font),g("bgcolor",m.paper_bgcolor),g("bordercolor"),g("borderwidth"))}function l(d,h){function m(g,p){return r.coerce(d,h,i,g,p)}m("visible",d.method==="skip"||Array.isArray(d.args))&&(m("method"),m("args"),m("args2"),m("label"),m("execute"))}o.exports=function(d,h){a(d,h,{name:c,handleItemDefaults:s})}},{"../../lib":503,"../../plots/array_container_defaults":549,"./attributes":465,"./constants":466}],468:[function(e,o,f){var r=e("@plotly/d3"),a=e("../../plots/plots"),u=e("../color"),c=e("../drawing"),i=e("../../lib"),s=e("../../lib/svg_text_utils"),l=e("../../plot_api/plot_template").arrayEditor,d=e("../../constants/alignment").LINE_SPACING,h=e("./constants"),m=e("./scrollbox");function g(O){return O._index}function p(O,R){return+O.attr(h.menuIndexAttrName)===R._index}function v(O,R,z,L,P,N,B,G){R.active=B,l(O.layout,h.name,R).applyUpdate("active",B),R.type==="buttons"?x(O,L,null,null,R):R.type==="dropdown"&&(P.attr(h.menuIndexAttrName,"-1"),y(O,L,P,N,R),G||x(O,L,P,N,R))}function y(O,R,z,L,P){var N=i.ensureSingle(R,"g",h.headerClassName,function(Y){Y.style("pointer-events","all")}),B=P._dims,G=P.active,W=P.buttons[G]||h.blankHeaderOpts,K={y:P.pad.t,yPad:0,x:P.pad.l,xPad:0,index:0},te={width:B.headerWidth,height:B.headerHeight};N.call(w,P,W,O).call(E,P,K,te),i.ensureSingle(R,"text",h.headerArrowClassName,function(Y){Y.attr("text-anchor","end").call(c.font,P.font).text(h.arrowSymbol[P.direction])}).attr({x:B.headerWidth-h.arrowOffsetX+P.pad.l,y:B.headerHeight/2+h.textOffsetY+P.pad.t}),N.on("click",function(){z.call(D,String(p(z,P)?-1:P._index)),x(O,R,z,L,P)}),N.on("mouseover",function(){N.call(_)}),N.on("mouseout",function(){N.call(M,P)}),c.setTranslate(R,B.lx,B.ly)}function x(O,R,z,L,P){z||(z=R).attr("pointer-events","all");var N=function($){return+$.attr(h.menuIndexAttrName)==-1}(z)&&P.type!=="buttons"?[]:P.buttons,B=P.type==="dropdown"?h.dropdownButtonClassName:h.buttonClassName,G=z.selectAll("g."+B).data(i.filterVisible(N)),W=G.enter().append("g").classed(B,!0),K=G.exit();P.type==="dropdown"?(W.attr("opacity","0").transition().attr("opacity","1"),K.transition().attr("opacity","0").remove()):K.remove();var te=0,Y=0,Z=P._dims,re=["up","down"].indexOf(P.direction)!==-1;P.type==="dropdown"&&(re?Y=Z.headerHeight+h.gapButtonHeader:te=Z.headerWidth+h.gapButtonHeader),P.type==="dropdown"&&P.direction==="up"&&(Y=-h.gapButtonHeader+h.gapButton-Z.openHeight),P.type==="dropdown"&&P.direction==="left"&&(te=-h.gapButtonHeader+h.gapButton-Z.openWidth);var U={x:Z.lx+te+P.pad.l,y:Z.ly+Y+P.pad.t,yPad:h.gapButton,xPad:h.gapButton,index:0},q={l:U.x+P.borderwidth,t:U.y+P.borderwidth};G.each(function($,ne){var H=r.select(this);H.call(w,P,$,O).call(E,P,U),H.on("click",function(){r.event.defaultPrevented||($.execute&&($.args2&&P.active===ne?(v(O,P,0,R,z,L,-1),a.executeAPICommand(O,$.method,$.args2)):(v(O,P,0,R,z,L,ne),a.executeAPICommand(O,$.method,$.args))),O.emit("plotly_buttonclicked",{menu:P,button:$,active:P.active}))}),H.on("mouseover",function(){H.call(_)}),H.on("mouseout",function(){H.call(M,P),G.call(T,P)})}),G.call(T,P),re?(q.w=Math.max(Z.openWidth,Z.headerWidth),q.h=U.y-q.t):(q.w=U.x-q.l,q.h=Math.max(Z.openHeight,Z.headerHeight)),q.direction=P.direction,L&&(G.size()?function($,ne,H,Q,ee,ie){var ae,ue,le,ge=ee.direction,fe=ge==="up"||ge==="down",me=ee._dims,_e=ee.active;if(fe)for(ue=0,le=0;le<_e;le++)ue+=me.heights[le]+h.gapButton;else for(ae=0,le=0;le<_e;le++)ae+=me.widths[le]+h.gapButton;Q.enable(ie,ae,ue),Q.hbar&&Q.hbar.attr("opacity","0").transition().attr("opacity","1"),Q.vbar&&Q.vbar.attr("opacity","0").transition().attr("opacity","1")}(0,0,0,L,P,q):function($){var ne=!!$.hbar,H=!!$.vbar;ne&&$.hbar.transition().attr("opacity","0").each("end",function(){ne=!1,H||$.disable()}),H&&$.vbar.transition().attr("opacity","0").each("end",function(){H=!1,ne||$.disable()})}(L))}function w(O,R,z,L){O.call(k,R).call(b,R,z,L)}function k(O,R){i.ensureSingle(O,"rect",h.itemRectClassName,function(z){z.attr({rx:h.rx,ry:h.ry,"shape-rendering":"crispEdges"})}).call(u.stroke,R.bordercolor).call(u.fill,R.bgcolor).style("stroke-width",R.borderwidth+"px")}function b(O,R,z,L){var P=i.ensureSingle(O,"text",h.itemTextClassName,function(G){G.attr({"text-anchor":"start","data-notex":1})}),N=z.label,B=L._fullLayout._meta;B&&(N=i.templateString(N,B)),P.call(c.font,R.font).text(N).call(s.convertToTspans,L)}function T(O,R){var z=R.active;O.each(function(L,P){var N=r.select(this);P===z&&R.showactive&&N.select("rect."+h.itemRectClassName).call(u.fill,h.activeColor)})}function _(O){O.select("rect."+h.itemRectClassName).call(u.fill,h.hoverColor)}function M(O,R){O.select("rect."+h.itemRectClassName).call(u.fill,R.bgcolor)}function A(O,R){var z=R._dims={width1:0,height1:0,heights:[],widths:[],totalWidth:0,totalHeight:0,openWidth:0,openHeight:0,lx:0,ly:0},L=c.tester.selectAll("g."+h.dropdownButtonClassName).data(i.filterVisible(R.buttons));L.enter().append("g").classed(h.dropdownButtonClassName,!0);var P=["up","down"].indexOf(R.direction)!==-1;L.each(function(te,Y){var Z=r.select(this);Z.call(w,R,te,O);var re=Z.select("."+h.itemTextClassName),U=re.node()&&c.bBox(re.node()).width,q=Math.max(U+h.textPadX,h.minWidth),$=R.font.size*d,ne=s.lineCount(re),H=Math.max($*ne,h.minHeight)+h.textOffsetY;H=Math.ceil(H),q=Math.ceil(q),z.widths[Y]=q,z.heights[Y]=H,z.height1=Math.max(z.height1,H),z.width1=Math.max(z.width1,q),P?(z.totalWidth=Math.max(z.totalWidth,q),z.openWidth=z.totalWidth,z.totalHeight+=H+h.gapButton,z.openHeight+=H+h.gapButton):(z.totalWidth+=q+h.gapButton,z.openWidth+=q+h.gapButton,z.totalHeight=Math.max(z.totalHeight,H),z.openHeight=z.totalHeight)}),P?z.totalHeight-=h.gapButton:z.totalWidth-=h.gapButton,z.headerWidth=z.width1+h.arrowPadX,z.headerHeight=z.height1,R.type==="dropdown"&&(P?(z.width1+=h.arrowPadX,z.totalHeight=z.height1):z.totalWidth=z.width1,z.totalWidth+=h.arrowPadX),L.remove();var N=z.totalWidth+R.pad.l+R.pad.r,B=z.totalHeight+R.pad.t+R.pad.b,G=O._fullLayout._size;z.lx=G.l+G.w*R.x,z.ly=G.t+G.h*(1-R.y);var W="left";i.isRightAnchor(R)&&(z.lx-=N,W="right"),i.isCenterAnchor(R)&&(z.lx-=N/2,W="center");var K="top";i.isBottomAnchor(R)&&(z.ly-=B,K="bottom"),i.isMiddleAnchor(R)&&(z.ly-=B/2,K="middle"),z.totalWidth=Math.ceil(z.totalWidth),z.totalHeight=Math.ceil(z.totalHeight),z.lx=Math.round(z.lx),z.ly=Math.round(z.ly),a.autoMargin(O,S(R),{x:R.x,y:R.y,l:N*({right:1,center:.5}[W]||0),r:N*({left:1,center:.5}[W]||0),b:B*({top:1,middle:.5}[K]||0),t:B*({bottom:1,middle:.5}[K]||0)})}function S(O){return h.autoMarginIdRoot+O._index}function E(O,R,z,L){L=L||{};var P=O.select("."+h.itemRectClassName),N=O.select("."+h.itemTextClassName),B=R.borderwidth,G=z.index,W=R._dims;c.setTranslate(O,B+z.x,B+z.y);var K=["up","down"].indexOf(R.direction)!==-1,te=L.height||(K?W.heights[G]:W.height1);P.attr({x:0,y:0,width:L.width||(K?W.width1:W.widths[G]),height:te});var Y=R.font.size*d,Z=(s.lineCount(N)-1)*Y/2;s.positionText(N,h.textOffsetX,te/2-Z+h.textOffsetY),K?z.y+=W.heights[G]+z.yPad:z.x+=W.widths[G]+z.xPad,z.index++}function D(O,R){O.attr(h.menuIndexAttrName,R||"-1").selectAll("g."+h.dropdownButtonClassName).remove()}o.exports=function(O){var R=O._fullLayout,z=i.filterVisible(R[h.name]);function L(Y){a.autoMargin(O,S(Y))}var P=R._menulayer.selectAll("g."+h.containerClassName).data(z.length>0?[0]:[]);if(P.enter().append("g").classed(h.containerClassName,!0).style("cursor","pointer"),P.exit().each(function(){r.select(this).selectAll("g."+h.headerGroupClassName).each(L)}).remove(),z.length!==0){var N=P.selectAll("g."+h.headerGroupClassName).data(z,g);N.enter().append("g").classed(h.headerGroupClassName,!0);for(var B=i.ensureSingle(P,"g",h.dropdownButtonGroupClassName,function(Y){Y.style("pointer-events","all")}),G=0;GE,R=i.barLength+2*i.barPad,z=i.barWidth+2*i.barPad,L=w,P=b+T;P+z>g&&(P=g-z);var N=this.container.selectAll("rect.scrollbar-horizontal").data(O?[0]:[]);N.exit().on(".drag",null).remove(),N.enter().append("rect").classed("scrollbar-horizontal",!0).call(a.fill,i.barColor),O?(this.hbar=N.attr({rx:i.barRadius,ry:i.barRadius,x:L,y:P,width:R,height:z}),this._hbarXMin=L+R/2,this._hbarTranslateMax=E-R):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var B=T>D,G=i.barWidth+2*i.barPad,W=i.barLength+2*i.barPad,K=w+k,te=b;K+G>m&&(K=m-G);var Y=this.container.selectAll("rect.scrollbar-vertical").data(B?[0]:[]);Y.exit().on(".drag",null).remove(),Y.enter().append("rect").classed("scrollbar-vertical",!0).call(a.fill,i.barColor),B?(this.vbar=Y.attr({rx:i.barRadius,ry:i.barRadius,x:K,y:te,width:G,height:W}),this._vbarYMin=te+W/2,this._vbarTranslateMax=D-W):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var Z=this.id,re=p-.5,U=B?v+G+.5:v+.5,q=y-.5,$=O?x+z+.5:x+.5,ne=h._topdefs.selectAll("#"+Z).data(O||B?[0]:[]);if(ne.exit().remove(),ne.enter().append("clipPath").attr("id",Z).append("rect"),O||B?(this._clipRect=ne.select("rect").attr({x:Math.floor(re),y:Math.floor(q),width:Math.ceil(U)-Math.floor(re),height:Math.ceil($)-Math.floor(q)}),this.container.call(u.setClipUrl,Z,this.gd),this.bg.attr({x:w,y:b,width:k,height:T})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(u.setClipUrl,null),delete this._clipRect),O||B){var H=r.behavior.drag().on("dragstart",function(){r.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(H);var Q=r.behavior.drag().on("dragstart",function(){r.event.sourceEvent.preventDefault(),r.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));O&&this.hbar.on(".drag",null).call(Q),B&&this.vbar.on(".drag",null).call(Q)}this.setTranslate(l,d)},i.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(u.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},i.prototype._onBoxDrag=function(){var s=this.translateX,l=this.translateY;this.hbar&&(s-=r.event.dx),this.vbar&&(l-=r.event.dy),this.setTranslate(s,l)},i.prototype._onBoxWheel=function(){var s=this.translateX,l=this.translateY;this.hbar&&(s+=r.event.deltaY),this.vbar&&(l+=r.event.deltaY),this.setTranslate(s,l)},i.prototype._onBarDrag=function(){var s=this.translateX,l=this.translateY;if(this.hbar){var d=s+this._hbarXMin,h=d+this._hbarTranslateMax;s=(c.constrain(r.event.x,d,h)-d)/(h-d)*(this.position.w-this._box.w)}if(this.vbar){var m=l+this._vbarYMin,g=m+this._vbarTranslateMax;l=(c.constrain(r.event.y,m,g)-m)/(g-m)*(this.position.h-this._box.h)}this.setTranslate(s,l)},i.prototype.setTranslate=function(s,l){var d=this.position.w-this._box.w,h=this.position.h-this._box.h;if(s=c.constrain(s||0,0,d),l=c.constrain(l||0,0,h),this.translateX=s,this.translateY=l,this.container.call(u.setTranslate,this._box.l-this.position.l-s,this._box.t-this.position.t-l),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+s-.5),y:Math.floor(this.position.t+l-.5)}),this.hbar){var m=s/d;this.hbar.call(u.setTranslate,s+m*this._hbarTranslateMax,l)}if(this.vbar){var g=l/h;this.vbar.call(u.setTranslate,s,l+g*this._vbarTranslateMax)}}},{"../../lib":503,"../color":366,"../drawing":388,"@plotly/d3":58}],471:[function(e,o,f){o.exports={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},FROM_BR:{left:1,center:.5,right:0,bottom:0,middle:.5,top:1},LINE_SPACING:1.3,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:"right",right:"left",top:"bottom",bottom:"top"}}},{}],472:[function(e,o,f){o.exports={axisRefDescription:function(r,a,u){return["If set to a",r,"axis id (e.g. *"+r+"* or","*"+r+"2*), the `"+r+"` position refers to a",r,"coordinate. If set to *paper*, the `"+r+"`","position refers to the distance from the",a,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",a,"("+u+"). If set to a",r,"axis ID followed by","*domain* (separated by a space), the position behaves like for","*paper*, but refers to the distance in fractions of the domain","length from the",a,"of the domain of that axis: e.g.,","*"+r+"2 domain* refers to the domain of the second",r," axis and a",r,"position of 0.5 refers to the","point between the",a,"and the",u,"of the domain of the","second",r,"axis."].join(" ")}}},{}],473:[function(e,o,f){o.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25B2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25BC"}}},{}],474:[function(e,o,f){o.exports={FORMAT_LINK:"https://github.com/d3/d3-format/tree/v1.4.5#d3-format",DATE_FORMAT_LINK:"https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format"}},{}],475:[function(e,o,f){o.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},{}],476:[function(e,o,f){o.exports={solid:[[],0],dot:[[.5,1],200],dash:[[.5,1],50],longdash:[[.5,1],10],dashdot:[[.5,.625,.875,1],50],longdashdot:[[.5,.7,.8,1],10]}},{}],477:[function(e,o,f){o.exports={circle:"\u25CF","circle-open":"\u25CB",square:"\u25A0","square-open":"\u25A1",diamond:"\u25C6","diamond-open":"\u25C7",cross:"+",x:"\u274C"}},{}],478:[function(e,o,f){o.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},{}],479:[function(e,o,f){o.exports={BADNUM:void 0,FP_SAFE:1e-4*Number.MAX_VALUE,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:24405875e-1,ALMOST_EQUAL:.999999,LOG_CLIP:10,MINUS_SIGN:"\u2212"}},{}],480:[function(e,o,f){f.xmlns="http://www.w3.org/2000/xmlns/",f.svg="http://www.w3.org/2000/svg",f.xlink="http://www.w3.org/1999/xlink",f.svgAttrs={xmlns:f.svg,"xmlns:xlink":f.xlink}},{}],481:[function(e,o,f){f.version=e("./version").version,e("native-promise-only"),e("../build/plotcss");for(var r=e("./registry"),a=f.register=r.register,u=e("./plot_api"),c=Object.keys(u),i=0;iplotly-logomark"}}},{}],483:[function(e,o,f){f.isLeftAnchor=function(r){return r.xanchor==="left"||r.xanchor==="auto"&&r.x<=1/3},f.isCenterAnchor=function(r){return r.xanchor==="center"||r.xanchor==="auto"&&r.x>1/3&&r.x<2/3},f.isRightAnchor=function(r){return r.xanchor==="right"||r.xanchor==="auto"&&r.x>=2/3},f.isTopAnchor=function(r){return r.yanchor==="top"||r.yanchor==="auto"&&r.y>=2/3},f.isMiddleAnchor=function(r){return r.yanchor==="middle"||r.yanchor==="auto"&&r.y>1/3&&r.y<2/3},f.isBottomAnchor=function(r){return r.yanchor==="bottom"||r.yanchor==="auto"&&r.y<=1/3}},{}],484:[function(e,o,f){var r=e("./mod"),a=r.mod,u=r.modHalf,c=Math.PI,i=2*c;function s(m){return Math.abs(m[1]-m[0])>i-1e-14}function l(m,g){return u(g-m,i)}function d(m,g){if(s(g))return!0;var p,v;g[0](v=a(v,i))&&(v+=i);var y=a(m,i),x=y+i;return y>=p&&y<=v||x>=p&&x<=v}function h(m,g,p,v,y,x,w){y=y||0,x=x||0;var k,b,T,_,M,A=s([p,v]);function S(R,z){return[R*Math.cos(z)+y,x-R*Math.sin(z)]}A?(k=0,b=c,T=i):p=y&&m<=x);var y,x},pathArc:function(m,g,p,v,y){return h(null,m,g,p,v,y,0)},pathSector:function(m,g,p,v,y){return h(null,m,g,p,v,y,1)},pathAnnulus:function(m,g,p,v,y,x){return h(m,g,p,v,y,x,1)}}},{"./mod":510}],485:[function(e,o,f){var r=Array.isArray,a=ArrayBuffer,u=DataView;function c(l){return a.isView(l)&&!(l instanceof u)}function i(l){return r(l)||c(l)}function s(l,d,h){if(i(l)){if(i(l[0])){for(var m=h,g=0;gx.max?v.set(y):v.set(+p)}},integer:{coerceFunction:function(p,v,y,x){p%1||!r(p)||x.min!==void 0&&px.max?v.set(y):v.set(+p)}},string:{coerceFunction:function(p,v,y,x){if(typeof p!="string"){var w=typeof p=="number";x.strict!==!0&&w?v.set(String(p)):v.set(y)}else x.noBlank&&!p?v.set(y):v.set(p)}},color:{coerceFunction:function(p,v,y){a(p).isValid()?v.set(p):v.set(y)}},colorlist:{coerceFunction:function(p,v,y){Array.isArray(p)&&p.length&&p.every(function(x){return a(x).isValid()})?v.set(p):v.set(y)}},colorscale:{coerceFunction:function(p,v,y){v.set(c.get(p,y))}},angle:{coerceFunction:function(p,v,y){p==="auto"?v.set("auto"):r(p)?v.set(h(+p,360)):v.set(y)}},subplotid:{coerceFunction:function(p,v,y,x){var w=x.regex||d(y);typeof p=="string"&&w.test(p)?v.set(p):v.set(y)},validateFunction:function(p,v){var y=v.dflt;return p===y||typeof p=="string"&&!!d(y).test(p)}},flaglist:{coerceFunction:function(p,v,y,x){if(typeof p=="string")if((x.extras||[]).indexOf(p)===-1){for(var w=p.split("+"),k=0;k=r&&N<=a?N:d}if(typeof N!="string"&&typeof N!="number")return d;N=String(N);var te=T(B),Y=N.charAt(0);!te||Y!=="G"&&Y!=="g"||(N=N.substr(1),B="");var Z=te&&B.substr(0,7)==="chinese",re=N.match(Z?k:w);if(!re)return d;var U=re[1],q=re[3]||"1",$=Number(re[5]||1),ne=Number(re[7]||0),H=Number(re[9]||0),Q=Number(re[11]||0);if(te){if(U.length===2)return d;var ee;U=Number(U);try{var ie=y.getComponentMethod("calendars","getCal")(B);if(Z){var ae=q.charAt(q.length-1)==="i";q=parseInt(q,10),ee=ie.newDate(U,ie.toMonthIndex(U,q,ae),$)}else ee=ie.newDate(U,Number(q),$)}catch{return d}return ee?(ee.toJD()-v)*h+ne*m+H*g+Q*p:d}U=U.length===2?(Number(U)+2e3-b)%100+b:Number(U),q-=1;var ue=new Date(Date.UTC(2e3,q,$,ne,H));return ue.setUTCFullYear(U),ue.getUTCMonth()!==q||ue.getUTCDate()!==$?d:ue.getTime()+Q*p},r=f.MIN_MS=f.dateTime2ms("-9999"),a=f.MAX_MS=f.dateTime2ms("9999-12-31 23:59:59.9999"),f.isDateTime=function(N,B){return f.dateTime2ms(N,B)!==d};var M=90*h,A=3*m,S=5*g;function E(N,B,G,W,K){if((B||G||W||K)&&(N+=" "+_(B,2)+":"+_(G,2),(W||K)&&(N+=":"+_(W,2),K))){for(var te=4;K%10==0;)te-=1,K/=10;N+="."+_(K,te)}return N}f.ms2DateTime=function(N,B,G){if(typeof N!="number"||!(N>=r&&N<=a))return d;B||(B=0);var W,K,te,Y,Z,re,U=Math.floor(10*s(N+.05,1)),q=Math.round(N-U/10);if(T(G)){var $=Math.floor(q/h)+v,ne=Math.floor(s(N,h));try{W=y.getComponentMethod("calendars","getCal")(G).fromJD($).formatDate("yyyy-mm-dd")}catch{W=x("G%Y-%m-%d")(new Date(q))}if(W.charAt(0)==="-")for(;W.length<11;)W="-0"+W.substr(1);else for(;W.length<10;)W="0"+W;K=B=r+h&&N<=a-h))return d;var B=Math.floor(10*s(N+.05,1)),G=new Date(Math.round(N-B/10));return E(u("%Y-%m-%d")(G),G.getHours(),G.getMinutes(),G.getSeconds(),10*G.getUTCMilliseconds()+B)},f.cleanDate=function(N,B,G){if(N===d)return B;if(f.isJSDate(N)||typeof N=="number"&&isFinite(N)){if(T(G))return i.error("JS Dates and milliseconds are incompatible with world calendars",N),B;if(!(N=f.ms2DateTimeLocal(+N))&&B!==void 0)return B}else if(!f.isDateTime(N,G))return i.error("unrecognized date",N),B;return N};var D=/%\d?f/g,O=/%h/g,R={1:"1",2:"1",3:"2",4:"2"};function z(N,B,G,W){N=N.replace(D,function(te){var Y=Math.min(+te.charAt(1)||6,6);return(B/1e3%1+2).toFixed(Y).substr(2).replace(/0+$/,"")||"0"});var K=new Date(Math.floor(B+.05));if(N=N.replace(O,function(){return R[G("%q")(K)]}),T(W))try{N=y.getComponentMethod("calendars","worldCalFmt")(N,B,W)}catch{return"Invalid"}return G(N)(K)}var L=[59,59.9,59.99,59.999,59.9999];f.formatDate=function(N,B,G,W,K,te){if(K=T(K)&&K,!B)if(G==="y")B=te.year;else if(G==="m")B=te.month;else{if(G!=="d")return function(Y,Z){var re=s(Y+.05,h),U=_(Math.floor(re/m),2)+":"+_(s(Math.floor(re/g),60),2);if(Z!=="M"){c(Z)||(Z=0);var q=(100+Math.min(s(Y/p,60),L[Z])).toFixed(Z).substr(1);Z>0&&(q=q.replace(/0+$/,"").replace(/[\.]$/,"")),U+=":"+q}return U}(N,G)+` +`+z(te.dayMonthYear,N,W,K);B=te.dayMonth+` +`+te.year}return z(B,N,W,K)};var P=3*h;f.incrementMonth=function(N,B,G){G=T(G)&&G;var W=s(N,h);if(N=Math.round(N-W),G)try{var K=Math.round(N/h)+v,te=y.getComponentMethod("calendars","getCal")(G),Y=te.fromJD(K);return B%12?te.add(Y,B,"m"):te.add(Y,B/12,"y"),(Y.toJD()-v)*h+W}catch{i.error("invalid ms "+N+" in calendar "+G)}var Z=new Date(N+P);return Z.setUTCMonth(Z.getUTCMonth()+B)+W-P},f.findExactDates=function(N,B){for(var G,W,K=0,te=0,Y=0,Z=0,re=T(B)&&y.getComponentMethod("calendars","getCal")(B),U=0;U0&&E[D+1][0]<0)return D;return null}switch(x=M==="RUS"||M==="FJI"?function(E){var D;if(S(E)===null)D=E;else for(D=new Array(E.length),b=0;bD?O[R++]=[E[b][0]+360,E[b][1]]:b===D?(O[R++]=E[b],O[R++]=[E[b][0],-90]):O[R++]=E[b];var z=m.tester(O);z.pts.pop(),A.push(z)}:function(E){A.push(m.tester(E))},T.type){case"MultiPolygon":for(w=0;w<_.length;w++)for(k=0;k<_[w].length;k++)x(_[w][k]);break;case"Polygon":for(w=0;w<_.length;w++)x(_[w])}return A},getTraceGeojson:v,extractTraceFeature:function(y){var x=y[0].trace,w=v(x);if(!w)return!1;var k,b={},T=[];for(k=0;kG&&(G=te,P=K)}else P=N;return c.default(P).geometry.coordinates}(z),O.fIn=E,O.fOut=z,T.push(z)}else l.log(["Location",O.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete b[D]}switch(w.type){case"FeatureCollection":var A=w.features;for(k=0;k100?(clearInterval(D),S("Unexpected error while fetching from "+M)):void E++},50)})}for(var T=0;T0&&(c.push(i),i=[])}return i.length>0&&c.push(i),c},f.makeLine=function(a){return a.length===1?{type:"LineString",coordinates:a[0]}:{type:"MultiLineString",coordinates:a}},f.makePolygon=function(a){if(a.length===1)return{type:"Polygon",coordinates:a};for(var u=new Array(a.length),c=0;c1||A<0||A>1?null:{x:l+x*A,y:d+b*A}}function s(l,d,h,m,g){var p=m*l+g*d;if(p<0)return m*m+g*g;if(p>h){var v=m-l,y=g-d;return v*v+y*y}var x=m*d-g*l;return x*x/h}f.segmentsIntersect=i,f.segmentDistance=function(l,d,h,m,g,p,v,y){if(i(l,d,h,m,g,p,v,y))return 0;var x=h-l,w=m-d,k=v-g,b=y-p,T=x*x+w*w,_=k*k+b*b,M=Math.min(s(x,w,T,g-l,p-d),s(x,w,T,v-l,y-d),s(k,b,_,l-g,d-p),s(k,b,_,h-g,m-p));return Math.sqrt(M)},f.getTextLocation=function(l,d,h,m){if(l===a&&m===u||(r={},a=l,u=m),r[h])return r[h];var g=l.getPointAtLength(c(h-m/2,d)),p=l.getPointAtLength(c(h+m/2,d)),v=Math.atan((p.y-g.y)/(p.x-g.x)),y=l.getPointAtLength(c(h,d)),x={x:(4*y.x+g.x+p.x)/6,y:(4*y.y+g.y+p.y)/6,theta:v};return r[h]=x,x},f.clearLocationCache=function(){a=null},f.getVisibleSegment=function(l,d,h){var m,g,p=d.left,v=d.right,y=d.top,x=d.bottom,w=0,k=l.getTotalLength(),b=k;function T(M){var A=l.getPointAtLength(M);M===0?m=A:M===k&&(g=A);var S=A.xv?A.x-v:0,E=A.yx?A.y-x:0;return Math.sqrt(S*S+E*E)}for(var _=T(w);_;){if((w+=_+h)>b)return;_=T(w)}for(_=T(b);_;){if(w>(b-=_+h))return;_=T(b)}return{min:w,max:b,len:b-w,total:k,isClosed:w===0&&b===k&&Math.abs(m.x-g.x)<.1&&Math.abs(m.y-g.y)<.1}},f.findPointOnPath=function(l,d,h,m){for(var g,p,v,y=(m=m||{}).pathLength||l.getTotalLength(),x=m.tolerance||.001,w=m.iterationLimit||30,k=l.getPointAtLength(0)[h]>l.getPointAtLength(y)[h]?-1:1,b=0,T=0,_=y;b0?_=g:T=g,b++}return p}},{"./mod":510}],499:[function(e,o,f){var r=e("fast-isnumeric"),a=e("tinycolor2"),u=e("color-normalize"),c=e("../components/colorscale"),i=e("../components/color/attributes").defaultLine,s=e("./array").isArrayOrTypedArray,l=u(i);function d(g,p){var v=g;return v[3]*=p,v}function h(g){if(r(g))return l;var p=u(g);return p.length?p:l}function m(g){return r(g)?g:1}o.exports={formatColor:function(g,p,v){var y,x,w,k,b,T=g.color,_=s(T),M=s(p),A=c.extractOpts(g),S=[];if(y=A.colorscale!==void 0?c.makeColorScaleFuncFromTrace(g):h,x=_?function(D,O){return D[O]===void 0?l:u(y(D[O]))}:h,w=M?function(D,O){return D[O]===void 0?1:m(D[O])}:m,_||M)for(var E=0;E1?(u*r+u*a)/u:r+a,i=String(c).length;if(i>16){var s=String(a).length;if(i>=String(r).length+s){var l=parseFloat(c).toPrecision(12);l.indexOf("e+")===-1&&(c=+l)}}return c}},{}],503:[function(e,o,f){var r=e("@plotly/d3"),a=e("d3-time-format").utcFormat,u=e("d3-format").format,c=e("fast-isnumeric"),i=e("../constants/numerical"),s=i.FP_SAFE,l=-s,d=i.BADNUM,h=o.exports={};h.adjustFormat=function(U){return!U||/^\d[.]\df/.test(U)||/[.]\d%/.test(U)?U:U==="0.f"?"~f":/^\d%/.test(U)?"~%":/^\ds/.test(U)?"~s":!/^[~,.0$]/.test(U)&&/[&fps]/.test(U)?"~"+U:U};var m={};h.warnBadFormat=function(U){var q=String(U);m[q]||(m[q]=1,h.warn('encountered bad format: "'+q+'"'))},h.noFormat=function(U){return String(U)},h.numberFormat=function(U){var q;try{q=u(h.adjustFormat(U))}catch{return h.warnBadFormat(U),h.noFormat}return q},h.nestedProperty=e("./nested_property"),h.keyedContainer=e("./keyed_container"),h.relativeAttr=e("./relative_attr"),h.isPlainObject=e("./is_plain_object"),h.toLogRange=e("./to_log_range"),h.relinkPrivateKeys=e("./relink_private");var g=e("./array");h.isTypedArray=g.isTypedArray,h.isArrayOrTypedArray=g.isArrayOrTypedArray,h.isArray1D=g.isArray1D,h.ensureArray=g.ensureArray,h.concat=g.concat,h.maxRowLength=g.maxRowLength,h.minRowLength=g.minRowLength;var p=e("./mod");h.mod=p.mod,h.modHalf=p.modHalf;var v=e("./coerce");h.valObjectMeta=v.valObjectMeta,h.coerce=v.coerce,h.coerce2=v.coerce2,h.coerceFont=v.coerceFont,h.coercePattern=v.coercePattern,h.coerceHoverinfo=v.coerceHoverinfo,h.coerceSelectionMarkerOpacity=v.coerceSelectionMarkerOpacity,h.validate=v.validate;var y=e("./dates");h.dateTime2ms=y.dateTime2ms,h.isDateTime=y.isDateTime,h.ms2DateTime=y.ms2DateTime,h.ms2DateTimeLocal=y.ms2DateTimeLocal,h.cleanDate=y.cleanDate,h.isJSDate=y.isJSDate,h.formatDate=y.formatDate,h.incrementMonth=y.incrementMonth,h.dateTick0=y.dateTick0,h.dfltRange=y.dfltRange,h.findExactDates=y.findExactDates,h.MIN_MS=y.MIN_MS,h.MAX_MS=y.MAX_MS;var x=e("./search");h.findBin=x.findBin,h.sorterAsc=x.sorterAsc,h.sorterDes=x.sorterDes,h.distinctVals=x.distinctVals,h.roundUp=x.roundUp,h.sort=x.sort,h.findIndexOfMin=x.findIndexOfMin,h.sortObjectKeys=e("./sort_object_keys");var w=e("./stats");h.aggNums=w.aggNums,h.len=w.len,h.mean=w.mean,h.median=w.median,h.midRange=w.midRange,h.variance=w.variance,h.stdev=w.stdev,h.interp=w.interp;var k=e("./matrix");h.init2dArray=k.init2dArray,h.transposeRagged=k.transposeRagged,h.dot=k.dot,h.translationMatrix=k.translationMatrix,h.rotationMatrix=k.rotationMatrix,h.rotationXYMatrix=k.rotationXYMatrix,h.apply3DTransform=k.apply3DTransform,h.apply2DTransform=k.apply2DTransform,h.apply2DTransform2=k.apply2DTransform2,h.convertCssMatrix=k.convertCssMatrix,h.inverseTransformMatrix=k.inverseTransformMatrix;var b=e("./angles");h.deg2rad=b.deg2rad,h.rad2deg=b.rad2deg,h.angleDelta=b.angleDelta,h.angleDist=b.angleDist,h.isFullCircle=b.isFullCircle,h.isAngleInsideSector=b.isAngleInsideSector,h.isPtInsideSector=b.isPtInsideSector,h.pathArc=b.pathArc,h.pathSector=b.pathSector,h.pathAnnulus=b.pathAnnulus;var T=e("./anchor_utils");h.isLeftAnchor=T.isLeftAnchor,h.isCenterAnchor=T.isCenterAnchor,h.isRightAnchor=T.isRightAnchor,h.isTopAnchor=T.isTopAnchor,h.isMiddleAnchor=T.isMiddleAnchor,h.isBottomAnchor=T.isBottomAnchor;var _=e("./geometry2d");h.segmentsIntersect=_.segmentsIntersect,h.segmentDistance=_.segmentDistance,h.getTextLocation=_.getTextLocation,h.clearLocationCache=_.clearLocationCache,h.getVisibleSegment=_.getVisibleSegment,h.findPointOnPath=_.findPointOnPath;var M=e("./extend");h.extendFlat=M.extendFlat,h.extendDeep=M.extendDeep,h.extendDeepAll=M.extendDeepAll,h.extendDeepNoArrays=M.extendDeepNoArrays;var A=e("./loggers");h.log=A.log,h.warn=A.warn,h.error=A.error;var S=e("./regex");h.counterRegex=S.counter;var E=e("./throttle");h.throttle=E.throttle,h.throttleDone=E.done,h.clearThrottle=E.clear;var D=e("./dom");function O(U){var q={};for(var $ in U)for(var ne=U[$],H=0;Hs||U=q)&&c(U)&&U>=0&&U%1==0},h.noop=e("./noop"),h.identity=e("./identity"),h.repeat=function(U,q){for(var $=new Array(q),ne=0;ne$?Math.max($,Math.min(q,U)):Math.max(q,Math.min($,U))},h.bBoxIntersect=function(U,q,$){return $=$||0,U.left<=q.right+$&&q.left<=U.right+$&&U.top<=q.bottom+$&&q.top<=U.bottom+$},h.simpleMap=function(U,q,$,ne,H){for(var Q=U.length,ee=new Array(Q),ie=0;ie=Math.pow(2,$)?H>10?(h.warn("randstr failed uniqueness"),ae):U(q,$,ne,(H||0)+1):ae},h.OptionControl=function(U,q){U||(U={}),q||(q="opt");var $={optionList:[],_newoption:function(ne){ne[q]=U,$[ne.name]=ne,$.optionList.push(ne)}};return $["_"+q]=U,$},h.smooth=function(U,q){if((q=Math.round(q)||0)<2)return U;var $,ne,H,Q,ee=U.length,ie=2*ee,ae=2*q-1,ue=new Array(ae),le=new Array(ee);for($=0;$=ie&&(H-=ie*Math.floor(H/ie)),H<0?H=-1-H:H>=ee&&(H=ie-1-H),Q+=U[H]*ue[ne];le[$]=Q}return le},h.syncOrAsync=function(U,q,$){var ne;function H(){return h.syncOrAsync(U,q,$)}for(;U.length;)if((ne=(0,U.splice(0,1)[0])(q))&&ne.then)return ne.then(H);return $&&$(q)},h.stripTrailingSlash=function(U){return U.substr(-1)==="/"?U.substr(0,U.length-1):U},h.noneOrAll=function(U,q,$){if(U){var ne,H=!1,Q=!0;for(ne=0;ne<$.length;ne++)U[$[ne]]!=null?H=!0:Q=!1;if(H&&!Q)for(ne=0;ne<$.length;ne++)U[$[ne]]=q[$[ne]]}},h.mergeArray=function(U,q,$,ne){var H=typeof ne=="function";if(h.isArrayOrTypedArray(U))for(var Q=Math.min(U.length,q.length),ee=0;ee0?H:0})},h.fillArray=function(U,q,$,ne){if(ne=ne||h.identity,h.isArrayOrTypedArray(U))for(var H=0;H1?H+ee[1]:"";if(Q&&(ee.length>1||ie.length>4||$))for(;ne.test(ie);)ie=ie.replace(ne,"$1"+Q+"$2");return ie+ae},h.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var B=/^\w*$/;h.templateString=function(U,q){var $={};return U.replace(h.TEMPLATE_STRING_REGEX,function(ne,H){var Q;return B.test(H)?Q=q[H]:($[H]=$[H]||h.nestedProperty(q,H).get,Q=$[H]()),h.isValidTextValue(Q)?Q:""})};var G={max:10,count:0,name:"hovertemplate"};h.hovertemplateString=function(){return te.apply(G,arguments)};var W={max:10,count:0,name:"texttemplate"};h.texttemplateString=function(){return te.apply(W,arguments)};var K=/^[:|\|]/;function te(U,q,$){var ne=this,H=arguments;q||(q={});var Q={};return U.replace(h.TEMPLATE_STRING_REGEX,function(ee,ie,ae){var ue,le,ge,fe=ie==="_xother"||ie==="_yother",me=ie==="_xother_"||ie==="_yother_",_e=ie==="xother_"||ie==="yother_",we=ie==="xother"||ie==="yother"||fe||_e||me,Te=ie;if((fe||me)&&(Te=Te.substring(1)),(_e||me)&&(Te=Te.substring(0,Te.length-1)),we){if((ue=q[Te])===void 0)return""}else for(ge=3;ge=48&&ee<=57,ue=ie>=48&&ie<=57;if(ae&&(ne=10*ne+ee-48),ue&&(H=10*H+ie-48),!ae||!ue){if(ne!==H)return ne-H;if(ee!==ie)return ee-ie}}return H-ne};var Y=2e9;h.seedPseudoRandom=function(){Y=2e9},h.pseudoRandom=function(){var U=Y;return Y=(69069*Y+1)%4294967296,Math.abs(Y-U)<429496729?h.pseudoRandom():Y/4294967296},h.fillText=function(U,q,$){var ne=Array.isArray($)?function(ee){$.push(ee)}:function(ee){$.text=ee},H=h.extractOption(U,q,"htx","hovertext");if(h.isValidTextValue(H))return ne(H);var Q=h.extractOption(U,q,"tx","text");return h.isValidTextValue(Q)?ne(Q):void 0},h.isValidTextValue=function(U){return U||U===0},h.formatPercent=function(U,q){q=q||0;for(var $=(Math.round(100*U*Math.pow(10,q))*Math.pow(.1,q)).toFixed(q)+"%",ne=0;ne1&&(ue=1):ue=0,h.strTranslate(H-ue*($+ee),Q-ue*(ne+ie))+h.strScale(ue)+(ae?"rotate("+ae+(q?"":" "+$+" "+ne)+")":"")},h.ensureUniformFontSize=function(U,q){var $=h.extendFlat({},q);return $.size=Math.max(q.size,U._fullLayout.uniformtext.minsize||0),$},h.join2=function(U,q,$){var ne=U.length;return ne>1?U.slice(0,-1).join(q)+$+U[ne-1]:U.join(q)},h.bigFont=function(U){return Math.round(1.2*U)};var Z=h.getFirefoxVersion(),re=Z!==null&&Z<86;h.getPositionFromD3Event=function(){return re?[r.event.layerX,r.event.layerY]:[r.event.offsetX,r.event.offsetY]}},{"../constants/numerical":479,"./anchor_utils":483,"./angles":484,"./array":485,"./clean_number":486,"./clear_responsive":488,"./coerce":489,"./dates":490,"./dom":491,"./extend":493,"./filter_unique":494,"./filter_visible":495,"./geometry2d":498,"./identity":501,"./increment":502,"./is_plain_object":504,"./keyed_container":505,"./localize":506,"./loggers":507,"./make_trace_groups":508,"./matrix":509,"./mod":510,"./nested_property":511,"./noop":512,"./notifier":513,"./preserve_drawing_buffer":517,"./push_unique":518,"./regex":520,"./relative_attr":521,"./relink_private":522,"./search":523,"./sort_object_keys":526,"./stats":527,"./throttle":530,"./to_log_range":531,"@plotly/d3":58,"d3-format":112,"d3-time-format":120,"fast-isnumeric":190}],504:[function(e,o,f){o.exports=function(r){return window&&window.process&&window.process.versions?Object.prototype.toString.call(r)==="[object Object]":Object.prototype.toString.call(r)==="[object Object]"&&Object.getPrototypeOf(r).hasOwnProperty("hasOwnProperty")}},{}],505:[function(e,o,f){var r=e("./nested_property"),a=/^\w*$/;o.exports=function(u,c,i,s){var l,d,h;i=i||"name",s=s||"value";var m={};c&&c.length?(h=r(u,c),d=h.get()):d=u,c=c||"";var g={};if(d)for(l=0;l2)return m[x]=2|m[x],v.set(y,null);if(p){for(l=x;l1){var i=["LOG:"];for(c=0;c1){var s=[];for(c=0;c"),"long")}},u.warn=function(){var c;if(r.logging>0){var i=["WARN:"];for(c=0;c0){var s=[];for(c=0;c"),"stick")}},u.error=function(){var c;if(r.logging>0){var i=["ERROR:"];for(c=0;c0){var s=[];for(c=0;c"),"stick")}}},{"../plot_api/plot_config":541,"./notifier":513}],508:[function(e,o,f){var r=e("@plotly/d3");o.exports=function(a,u,c){var i=a.selectAll("g."+c.replace(/\s/g,".")).data(u,function(l){return l[0].trace.uid});i.exit().remove(),i.enter().append("g").attr("class",c),i.order();var s=a.classed("rangeplot")?"nodeRangePlot3":"node3";return i.each(function(l){l[0][s]=r.select(this)}),i}},{"@plotly/d3":58}],509:[function(e,o,f){var r=e("gl-mat4");f.init2dArray=function(a,u){for(var c=new Array(a),i=0;ia/2?r-Math.round(r/a)*a:r}}},{}],511:[function(e,o,f){var r=e("fast-isnumeric"),a=e("./array").isArrayOrTypedArray;function u(m,g){return function(){var p,v,y,x,w,k=m;for(x=0;x/g),v=0;vd||b===a||bm)&&(!w||!g(x))}:function(x,w){var k=x[0],b=x[1];if(k===a||kd||b===a||bm)return!1;var T,_,M,A,S,E=s.length,D=s[0][0],O=s[0][1],R=0;for(T=1;TMath.max(_,D)||b>Math.max(M,O)))if(bv||Math.abs(r(h,x))>l)return!0;return!1},u.filter=function(c,i){var s=[c[0]],l=0,d=0;function h(m){c.push(m);var g=s.length,p=l;s.splice(d+1);for(var v=p+1;v1&&h(c.pop()),{addPt:h,raw:c,filtered:s}}},{"../constants/numerical":479,"./matrix":509}],516:[function(e,o,f){(function(r){(function(){var a=e("./show_no_webgl_msg"),u=e("regl");o.exports=function(c,i,s){var l=c._fullLayout,d=!0;return l._glcanvas.each(function(h){if(h.regl)h.regl.preloadCachedCode(s);else if(!h.pick||l._has("parcoords")){try{h.regl=u({canvas:this,attributes:{antialias:!h.pick,preserveDrawingBuffer:!0},pixelRatio:c._context.plotGlPixelRatio||r.devicePixelRatio,extensions:i||[],cachedCode:s||{}})}catch{d=!1}h.regl||(d=!1),d&&this.addEventListener("webglcontextlost",function(m){c&&c.emit&&c.emit("plotly_webglcontextlost",{event:m,layer:h.key})},!1)}}),d||a({container:l._glcontainer.node()}),d}}).call(this)}).call(this,typeof Ro<"u"?Ro:typeof self<"u"?self:typeof window<"u"?window:{})},{"./show_no_webgl_msg":525,regl:283}],517:[function(e,o,f){var r=e("fast-isnumeric"),a=e("is-mobile");o.exports=function(u){var c;if(typeof(c=u&&u.hasOwnProperty("userAgent")?u.userAgent:function(){var g;return typeof navigator<"u"&&(g=navigator.userAgent),g&&g.headers&&typeof g.headers["user-agent"]=="string"&&(g=g.headers["user-agent"]),g}())!="string")return!0;var i=a({ua:{headers:{"user-agent":c}},tablet:!0,featureDetect:!1});if(!i){for(var s=c.split(" "),l=1;l-1;d--){var h=s[d];if(h.substr(0,8)==="Version/"){var m=h.substr(8).split(".")[0];if(r(m)&&(m=+m),m>=13)return!0}}}return i}},{"fast-isnumeric":190,"is-mobile":234}],518:[function(e,o,f){o.exports=function(r,a){if(a instanceof RegExp){for(var u=a.toString(),c=0;ca.queueLength&&(c.undoQueue.queue.shift(),c.undoQueue.index--))},startSequence:function(c){c.undoQueue=c.undoQueue||{index:0,queue:[],sequence:!1},c.undoQueue.sequence=!0,c.undoQueue.beginSequence=!0},stopSequence:function(c){c.undoQueue=c.undoQueue||{index:0,queue:[],sequence:!1},c.undoQueue.sequence=!1,c.undoQueue.beginSequence=!1},undo:function(c){var i,s;if(!(c.undoQueue===void 0||isNaN(c.undoQueue.index)||c.undoQueue.index<=0)){for(c.undoQueue.index--,i=c.undoQueue.queue[c.undoQueue.index],c.undoQueue.inSequence=!0,s=0;s=c.undoQueue.queue.length)){for(i=c.undoQueue.queue[c.undoQueue.index],c.undoQueue.inSequence=!0,s=0;sm}function d(h,m){return h>=m}f.findBin=function(h,m,g){if(r(m.start))return g?Math.ceil((h-m.start)/m.size-1e-9)-1:Math.floor((h-m.start)/m.size+1e-9);var p,v,y=0,x=m.length,w=0,k=x>1?(m[x-1]-m[0])/(x-1):1;for(v=k>=0?g?i:s:g?d:l,h+=1e-9*k*(g?-1:1)*(k>=0?1:-1);y90&&a.log("Long binary search..."),y-1},f.sorterAsc=function(h,m){return h-m},f.sorterDes=function(h,m){return m-h},f.distinctVals=function(h){var m,g=h.slice();for(g.sort(f.sorterAsc),m=g.length-1;m>-1&&g[m]===c;m--);for(var p,v=g[m]-g[0]||1,y=v/(m||1)/1e4,x=[],w=0;w<=m;w++){var k=g[w],b=k-p;p===void 0?(x.push(k),p=k):b>y&&(v=Math.min(v,b),x.push(k),p=k)}return{vals:x,minDiff:v}},f.roundUp=function(h,m,g){for(var p,v=0,y=m.length-1,x=0,w=g?0:1,k=g?1:0,b=g?Math.ceil:Math.floor;v0&&(p=1),g&&p)return h.sort(m)}return p?h:h.reverse()},f.findIndexOfMin=function(h,m){m=m||u;for(var g,p=1/0,v=0;vi.length)&&(s=i.length),r(c)||(c=!1),a(i[0])){for(d=new Array(s),l=0;lu.length-1)return u[u.length-1];var i=c%1;return i*u[Math.ceil(c)]+(1-i)*u[Math.floor(c)]}},{"./array":485,"fast-isnumeric":190}],528:[function(e,o,f){var r=e("color-normalize");o.exports=function(a){return a?r(a):[0,0,0,1]}},{"color-normalize":89}],529:[function(e,o,f){var r=e("@plotly/d3"),a=e("../lib"),u=a.strTranslate,c=e("../constants/xmlns_namespaces"),i=e("../constants/alignment").LINE_SPACING,s=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;f.convertToTspans=function(L,P,N){var B=L.text(),G=!L.attr("data-notex")&&P&&P._context.typesetMath&&typeof MathJax<"u"&&B.match(s),W=r.select(L.node().parentNode);if(!W.empty()){var K=L.attr("class")?L.attr("class").split(" ")[0]:"text";return K+="-math",W.selectAll("svg."+K).remove(),W.selectAll("g."+K+"-group").remove(),L.style("display",null).attr({"data-unformatted":B,"data-math":"N"}),G?(P&&P._promises||[]).push(new Promise(function(Y){L.style("display","none");var Z=parseInt(L.node().style.fontSize,10),re={fontSize:Z};(function(U,q,$){var ne,H,Q,ee,ie=parseInt((MathJax.version||"").split(".")[0]);if(ie!==2&&ie!==3)return void a.warn("No MathJax version:",MathJax.version);var ae=function(){var le="math-output-"+a.randstr({},64),ge=(ee=r.select("body").append("div").attr({id:le}).style({visibility:"hidden",position:"absolute","font-size":q.fontSize+"px"}).text(U.replace(l,"\\lt ").replace(d,"\\gt "))).node();return ie===2?MathJax.Hub.Typeset(ge):MathJax.typeset([ge])},ue=function(){var le=ee.select(ie===2?".MathJax_SVG":".MathJax"),ge=!le.empty()&&ee.select("svg").node();if(ge){var fe,me=ge.getBoundingClientRect();fe=ie===2?r.select("body").select("#MathJax_SVG_glyphs"):le.select("defs"),$(le,fe,me)}else a.log("There was an error in the tex syntax.",U),$();ee.remove()};ie===2?MathJax.Hub.Queue(function(){return H=a.extendDeepAll({},MathJax.Hub.config),Q=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:h},displayAlign:"left"})},function(){if((ne=MathJax.Hub.config.menuSettings.renderer)!=="SVG")return MathJax.Hub.setRenderer("SVG")},ae,ue,function(){if(ne!=="SVG")return MathJax.Hub.setRenderer(ne)},function(){return Q!==void 0&&(MathJax.Hub.processSectionDelay=Q),MathJax.Hub.Config(H)}):ie===3&&(H=a.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=h,(ne=MathJax.config.startup.output)!=="svg"&&(MathJax.config.startup.output="svg"),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){ae(),ue(),ne!=="svg"&&(MathJax.config.startup.output=ne),MathJax.config=H}))})(G[2],re,function(U,q,$){W.selectAll("svg."+K).remove(),W.selectAll("g."+K+"-group").remove();var ne=U&&U.select("svg");if(!ne||!ne.node())return te(),void Y();var H=W.append("g").classed(K+"-group",!0).attr({"pointer-events":"none","data-unformatted":B,"data-math":"Y"});H.node().appendChild(ne.node()),q&&q.node()&&ne.node().insertBefore(q.node().cloneNode(!0),ne.node().firstChild);var Q=$.width,ee=$.height;ne.attr({class:K,height:ee,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var ie=L.node().style.fill||"black",ae=ne.select("g");ae.attr({fill:ie,stroke:ie});var ue=ae.node().getBoundingClientRect(),le=ue.width,ge=ue.height;(le>Q||ge>ee)&&(ne.style("overflow","hidden"),le=(ue=ne.node().getBoundingClientRect()).width,ge=ue.height);var fe=+L.attr("x"),me=+L.attr("y"),_e=-(Z||L.node().getBoundingClientRect().height)/4;if(K[0]==="y")H.attr({transform:"rotate("+[-90,fe,me]+")"+u(-le/2,_e-ge/2)});else if(K[0]==="l")me=_e-ge/2;else if(K[0]==="a"&&K.indexOf("atitle")!==0)fe=0,me=_e;else{var we=L.attr("text-anchor");fe-=le*(we==="middle"?.5:we==="end"?1:0),me=me+_e-ge/2}ne.attr({x:fe,y:me}),N&&N.call(L,H),Y(H)})})):te(),L}function te(){W.empty()||(K=L.attr("class")+"-math",W.select("svg."+K).remove()),L.text("").style("white-space","pre"),function(Y,Z){Z=Z.replace(y," ");var re,U=!1,q=[],$=-1;function ne(){$++;var de=document.createElementNS(c.svg,"tspan");r.select(de).attr({class:"line",dy:$*i+"em"}),Y.appendChild(de),re=de;var ye=q;if(q=[{node:de}],ye.length>1)for(var Me=1;Me doesnt match end tag <"+de+">. Pretending it did match.",Z),re=q[q.length-1].node}else a.log("Ignoring unexpected end tag .",Z)}k.test(Z)?ne():(re=Y,q=[{node:Y}]);for(var ie=Z.split(x),ae=0;ae|>|>)/g,h=[["$","$"],["\\(","\\)"]],m={sup:"font-size:70%",sub:"font-size:70%",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},g={sub:"0.3em",sup:"-0.6em"},p={sub:"-0.21em",sup:"0.42em"},v=["http:","https:","mailto:","",void 0,":"],y=f.NEWLINES=/(\r\n?|\n)/g,x=/(<[^<>]*>)/,w=/<(\/?)([^ >]*)(\s+(.*))?>/i,k=//i;f.BR_TAG_ALL=//gi;var b=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,T=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,_=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,M=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function A(L,P){if(!L)return null;var N=L.match(P),B=N&&(N[3]||N[4]);return B&&O(B)}var S=/(^|;)\s*color:/;f.plainText=function(L,P){for(var N=(P=P||{}).len!==void 0&&P.len!==-1?P.len:1/0,B=P.allowedTags!==void 0?P.allowedTags:["br"],G=3,W=L.split(x),K=[],te="",Y=0,Z=0;ZG?K.push(re.substr(0,ne-G)+"..."):K.push(re.substr(0,ne));break}te=""}}return K.join("")};var E={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},D=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function O(L){return L.replace(D,function(P,N){return(N.charAt(0)==="#"?function(B){if(!(B>1114111)){var G=String.fromCodePoint;if(G)return G(B);var W=String.fromCharCode;return B<=65535?W(B):W(55232+(B>>10),B%1024+56320)}}(N.charAt(1)==="x"?parseInt(N.substr(2),16):parseInt(N.substr(1),10)):E[N])||P})}function R(L){var P=encodeURI(decodeURI(L)),N=document.createElement("a"),B=document.createElement("a");N.href=L,B.href=P;var G=N.protocol,W=B.protocol;return v.indexOf(G)!==-1&&v.indexOf(W)!==-1?P:""}function z(L,P,N){var B,G,W,K=N.horizontalAlign,te=N.verticalAlign||"top",Y=L.node().getBoundingClientRect(),Z=P.node().getBoundingClientRect();return G=te==="bottom"?function(){return Y.bottom-B.height}:te==="middle"?function(){return Y.top+(Y.height-B.height)/2}:function(){return Y.top},W=K==="right"?function(){return Y.right-B.width}:K==="center"?function(){return Y.left+(Y.width-B.width)/2}:function(){return Y.left},function(){B=this.node().getBoundingClientRect();var re=W()-Z.left,U=G()-Z.top,q=N.gd||{};if(N.gd){q._fullLayout._calcInverseTransform(q);var $=a.apply3DTransform(q._fullLayout._invTransform)(re,U);re=$[0],U=$[1]}return this.style({top:U+"px",left:re+"px","z-index":1e3}),this}}f.convertEntities=O,f.sanitizeHTML=function(L){L=L.replace(y," ");for(var P=document.createElement("p"),N=P,B=[],G=L.split(x),W=0;Ws.ts+c?h():s.timer=setTimeout(function(){h(),s.timer=null},c)},f.done=function(u){var c=r[u];return c&&c.timer?new Promise(function(i){var s=c.onDone;c.onDone=function(){s&&s(),i(),c.onDone=null}}):Promise.resolve()},f.clear=function(u){if(u)a(r[u]),delete r[u];else for(var c in r)f.clear(c)}},{}],531:[function(e,o,f){var r=e("fast-isnumeric");o.exports=function(a,u){if(a>0)return Math.log(a)/Math.LN10;var c=Math.log(Math.min(u[0],u[1]))/Math.LN10;return r(c)||(c=Math.log(Math.max(u[0],u[1]))/Math.LN10-6),c}},{"fast-isnumeric":190}],532:[function(e,o,f){var r=o.exports={},a=e("../plots/geo/constants").locationmodeToLayer,u=e("topojson-client").feature;r.getTopojsonName=function(c){return[c.scope.replace(/ /g,"-"),"_",c.resolution.toString(),"m"].join("")},r.getTopojsonPath=function(c,i){return c+i+".json"},r.getTopojsonFeatures=function(c,i){var s=a[c.locationmode],l=i.objects[s];return u(i,l).features}},{"../plots/geo/constants":587,"topojson-client":315}],533:[function(e,o,f){o.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}},{}],534:[function(e,o,f){o.exports={moduleType:"locale",name:"en",dictionary:{"Click to enter Colorscale title":"Click to enter Colourscale title"},format:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],periods:["AM","PM"],dateTime:"%a %b %e %X %Y",date:"%d/%m/%Y",time:"%H:%M:%S",decimal:".",thousands:",",grouping:[3],currency:["$",""],year:"%Y",month:"%b %Y",dayMonth:"%b %-d",dayMonthYear:"%b %-d, %Y"}}},{}],535:[function(e,o,f){var r=e("../registry");o.exports=function(a){for(var u,c,i=r.layoutArrayContainers,s=r.layoutArrayRegexes,l=a.split("[")[0],d=0;d0&&c.log("Clearing previous rejected promises from queue."),_._promises=[]},f.cleanLayout=function(_){var M,A;_||(_={}),_.xaxis1&&(_.xaxis||(_.xaxis=_.xaxis1),delete _.xaxis1),_.yaxis1&&(_.yaxis||(_.yaxis=_.yaxis1),delete _.yaxis1),_.scene1&&(_.scene||(_.scene=_.scene1),delete _.scene1);var S=(i.subplotsRegistry.cartesian||{}).attrRegex,E=(i.subplotsRegistry.polar||{}).attrRegex,D=(i.subplotsRegistry.ternary||{}).attrRegex,O=(i.subplotsRegistry.gl3d||{}).attrRegex,R=Object.keys(_);for(M=0;M3?(H.x=1.02,H.xanchor="left"):H.x<-2&&(H.x=-.02,H.xanchor="right"),H.y>3?(H.y=1.02,H.yanchor="bottom"):H.y<-2&&(H.y=-.02,H.yanchor="top")),p(_),_.dragmode==="rotate"&&(_.dragmode="orbit"),l.clean(_),_.template&&_.template.layout&&f.cleanLayout(_.template.layout),_},f.cleanData=function(_){for(var M=0;M<_.length;M++){var A,S=_[M];if(S.type==="histogramy"&&"xbins"in S&&!("ybins"in S)&&(S.ybins=S.xbins,delete S.xbins),S.error_y&&"opacity"in S.error_y){var E=l.defaults,D=S.error_y.color||(m(S,"bar")?l.defaultLine:E[M%E.length]);S.error_y.color=l.addOpacity(l.rgb(D),l.opacity(D)*S.error_y.opacity),delete S.error_y.opacity}if("bardir"in S&&(S.bardir!=="h"||!m(S,"bar")&&S.type.substr(0,9)!=="histogram"||(S.orientation="h",f.swapXYData(S)),delete S.bardir),S.type==="histogramy"&&f.swapXYData(S),S.type!=="histogramx"&&S.type!=="histogramy"||(S.type="histogram"),"scl"in S&&!("colorscale"in S)&&(S.colorscale=S.scl,delete S.scl),"reversescl"in S&&!("reversescale"in S)&&(S.reversescale=S.reversescl,delete S.reversescl),S.xaxis&&(S.xaxis=d(S.xaxis,"x")),S.yaxis&&(S.yaxis=d(S.yaxis,"y")),m(S,"gl3d")&&S.scene&&(S.scene=i.subplotsRegistry.gl3d.cleanId(S.scene)),!m(S,"pie-like")&&!m(S,"bar-like"))if(Array.isArray(S.textposition))for(A=0;A0)return _.substr(0,M)}f.hasParent=function(_,M){for(var A=b(M);A;){if(A in _)return!0;A=b(A)}return!1};var T=["x","y","z"];f.clearAxisTypes=function(_,M,A){for(var S=0;S1&&u.warn("Full array edits are incompatible with other edits",v);var _=m[""][""];if(l(_))h.set(null);else{if(!Array.isArray(_))return u.warn("Unrecognized full array edit value",v,_),!0;h.set(_)}return!k&&(y(b,T),x(d),!0)}var M,A,S,E,D,O,R,z,L=Object.keys(m).map(Number).sort(c),P=h.get(),N=P||[],B=p(T,v).get(),G=[],W=-1,K=N.length;for(M=0;MN.length-(R?0:1))u.warn("index out of range",v,S);else if(O!==void 0)D.length>1&&u.warn("Insertion & removal are incompatible with edits to the same index.",v,S),l(O)?G.push(S):R?(O==="add"&&(O={}),N.splice(S,0,O),B&&B.splice(S,0,{})):u.warn("Unrecognized full object edit value",v,S,O),W===-1&&(W=S);else for(A=0;A=0;M--)N.splice(G[M],1),B&&B.splice(G[M],1);if(N.length?P||h.set(N):h.set(null),k)return!1;if(y(b,T),w!==a){var te;if(W===-1)te=L;else{for(K=Math.max(N.length,K),te=[],M=0;M=W);M++)te.push(S);for(M=W;M=de.data.length||Ee<-de.data.length)throw new Error(Me+" must be valid indices for gd.data.");if(ye.indexOf(Ee,ke+1)>-1||Ee>=0&&ye.indexOf(-de.data.length+Ee)>-1||Ee<0&&ye.indexOf(de.data.length+Ee)>-1)throw new Error("each index in "+Me+" must be unique.")}}function P(de,ye,Me){if(!Array.isArray(de.data))throw new Error("gd.data must be an array.");if(ye===void 0)throw new Error("currentIndices is a required argument.");if(Array.isArray(ye)||(ye=[ye]),L(de,ye,"currentIndices"),Me===void 0||Array.isArray(Me)||(Me=[Me]),Me!==void 0&&L(de,Me,"newIndices"),Me!==void 0&&ye.length!==Me.length)throw new Error("current and new indices must be of equal length.")}function N(de,ye,Me,ke,Ee){(function(Ye,nt,ft,vt){var Pt=c.isPlainObject(vt);if(!Array.isArray(Ye.data))throw new Error("gd.data must be an array");if(!c.isPlainObject(nt))throw new Error("update must be a key:value object");if(ft===void 0)throw new Error("indices must be an integer or array of integers");for(var At in L(Ye,ft,"indices"),nt){if(!Array.isArray(nt[At])||nt[At].length!==ft.length)throw new Error("attribute "+At+" must be an array of length equal to indices array length");if(Pt&&(!(At in vt)||!Array.isArray(vt[At])||vt[At].length!==nt[At].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 corrispondence with the keys and number of traces in the update object")}})(de,ye,Me,ke);for(var ze=function(Ye,nt,ft,vt){var Pt,At,at,et,Ot,Wt=c.isPlainObject(vt),Jt=[];for(var Be in Array.isArray(ft)||(ft=[ft]),ft=z(ft,Ye.data.length-1),nt)for(var Ge=0;Ge-1&&Me.indexOf("grouptitlefont")===-1?Ve(Me,Me.replace("titlefont","title.font")):Me.indexOf("titleposition")>-1?Ve(Me,Me.replace("titleposition","title.position")):Me.indexOf("titleside")>-1?Ve(Me,Me.replace("titleside","title.side")):Me.indexOf("titleoffset")>-1&&Ve(Me,Me.replace("titleoffset","title.offset")):Ve(Me,Me.replace("title","title.text"));function Ve(Ke,Re){de[Re]=de[Ke],delete de[Ke]}}function re(de,ye,Me){de=c.getGraphDiv(de),T.clearPromiseQueue(de);var ke={};if(typeof ye=="string")ke[ye]=Me;else{if(!c.isPlainObject(ye))return c.warn("Relayout fail.",ye,Me),Promise.reject();ke=c.extendFlat({},ye)}Object.keys(ke).length&&(de.changed=!0);var Ee=Q(de,ke),ze=Ee.flags;ze.calc&&(de.calcdata=void 0);var Fe=[m.previousPromises];ze.layoutReplot?Fe.push(_.layoutReplot):Object.keys(ke).length&&(U(de,ze,Ee)||m.supplyDefaults(de),ze.legend&&Fe.push(_.doLegend),ze.layoutstyle&&Fe.push(_.layoutStyles),ze.axrange&&q(Fe,Ee.rangesAltered),ze.ticks&&Fe.push(_.doTicksRelayout),ze.modebar&&Fe.push(_.doModeBar),ze.camera&&Fe.push(_.doCamera),ze.colorbars&&Fe.push(_.doColorBars),Fe.push(E)),Fe.push(m.rehover,m.redrag),l.add(de,re,[de,Ee.undoit],re,[de,Ee.redoit]);var Ve=c.syncOrAsync(Fe,de);return Ve&&Ve.then||(Ve=Promise.resolve(de)),Ve.then(function(){return de.emit("plotly_relayout",Ee.eventData),de})}function U(de,ye,Me){var ke=de._fullLayout;if(!ye.axrange)return!1;for(var Ee in ye)if(Ee!=="axrange"&&ye[Ee])return!1;for(var ze in Me.rangesAltered){var Fe=g.id2name(ze),Ve=de.layout[Fe],Ke=ke[Fe];if(Ke.autorange=Ve.autorange,Ve.range&&(Ke.range=Ve.range.slice()),Ke.cleanRange(),Ke._matchGroup){for(var Re in Ke._matchGroup)if(Re!==ze){var qe=ke[g.id2name(Re)];qe.autorange=Ke.autorange,qe.range=Ke.range.slice(),qe._input.range=Ke.range.slice()}}}return!0}function q(de,ye){var Me=ye?function(ke){var Ee=[],ze=!0;for(var Fe in ye){var Ve=g.getFromId(ke,Fe);if(Ee.push(Fe),(Ve.ticklabelposition||"").indexOf("inside")!==-1&&Ve._anchorAxis&&Ee.push(Ve._anchorAxis._id),Ve._matchGroup)for(var Ke in Ve._matchGroup)ye[Ke]||Ee.push(Ke);Ve.automargin&&(ze=!1)}return g.draw(ke,Ee,{skipTitle:ze})}:function(ke){return g.draw(ke,"redraw")};de.push(w,_.doAutoRangeAndConstraints,Me,_.drawData,_.finalDraw)}var $=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,ne=/^[xyz]axis[0-9]*\.autorange$/,H=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function Q(de,ye){var Me,ke,Ee,ze=de.layout,Fe=de._fullLayout,Ve=Fe._guiEditing,Ke=K(Fe._preGUI,Ve),Re=Object.keys(ye),qe=g.list(de),We=c.extendDeepAll({},ye),Ye={};for(Z(ye),Re=Object.keys(ye),ke=0;ke0&&typeof Ge.parts[dt]!="string";)dt--;var Pe=Ge.parts[dt],Ie=Ge.parts[dt-1]+"."+Pe,Ae=Ge.parts.slice(0,dt).join("."),De=i(de.layout,Ae).get(),He=i(Fe,Ae).get(),rt=Ge.get();if(Tt!==void 0){At[Be]=Tt,at[Be]=Pe==="reverse"?Tt:W(rt);var lt=h.getLayoutValObject(Fe,Ge.parts);if(lt&<.impliedEdits&&Tt!==null)for(var ot in lt.impliedEdits)et(c.relativeAttr(Be,ot),lt.impliedEdits[ot]);if(["width","height"].indexOf(Be)!==-1)if(Tt){et("autosize",null);var kt=Be==="height"?"width":"height";et(kt,Fe[kt])}else Fe[Be]=de._initialAutoSize[Be];else if(Be==="autosize")et("width",Tt?null:Fe.width),et("height",Tt?null:Fe.height);else if(Ie.match($))Jt(Ie),i(Fe,Ae+"._inputRange").set(null);else if(Ie.match(ne)){Jt(Ie),i(Fe,Ae+"._inputRange").set(null);var wt=i(Fe,Ae).get();wt._inputDomain&&(wt._input.domain=wt._inputDomain.slice())}else Ie.match(H)&&i(Fe,Ae+"._inputDomain").set(null);if(Pe==="type"){Ot=De;var Vt=He.type==="linear"&&Tt==="log",Ut=He.type==="log"&&Tt==="linear";if(Vt||Ut){if(Ot&&Ot.range)if(He.autorange)Vt&&(Ot.range=Ot.range[1]>Ot.range[0]?[1,2]:[2,1]);else{var tt=Ot.range[0],bt=Ot.range[1];Vt?(tt<=0&&bt<=0&&et(Ae+".autorange",!0),tt<=0?tt=bt/1e6:bt<=0&&(bt=tt/1e6),et(Ae+".range[0]",Math.log(tt)/Math.LN10),et(Ae+".range[1]",Math.log(bt)/Math.LN10)):(et(Ae+".range[0]",Math.pow(10,tt)),et(Ae+".range[1]",Math.pow(10,bt)))}else et(Ae+".autorange",!0);Array.isArray(Fe._subplots.polar)&&Fe._subplots.polar.length&&Fe[Ge.parts[0]]&&Ge.parts[1]==="radialaxis"&&delete Fe[Ge.parts[0]]._subplot.viewInitial["radialaxis.range"],d.getComponentMethod("annotations","convertCoords")(de,He,Tt,et),d.getComponentMethod("images","convertCoords")(de,He,Tt,et)}else et(Ae+".autorange",!0),et(Ae+".range",null);i(Fe,Ae+"._inputRange").set(null)}else if(Pe.match(A)){var zt=i(Fe,Be).get(),St=(Tt||{}).type;St&&St!=="-"||(St="linear"),d.getComponentMethod("annotations","convertCoords")(de,zt,St,et),d.getComponentMethod("images","convertCoords")(de,zt,St,et)}var Dt=b.containerArrayMatch(Be);if(Dt){Me=Dt.array,ke=Dt.index;var Le=Dt.property,Je=lt||{editType:"calc"};ke!==""&&Le===""&&(b.isAddVal(Tt)?at[Be]=null:b.isRemoveVal(Tt)?at[Be]=(i(ze,Me).get()||[])[ke]:c.warn("unrecognized full object value",ye)),M.update(Pt,Je),Ye[Me]||(Ye[Me]={});var st=Ye[Me][ke];st||(st=Ye[Me][ke]={}),st[Le]=Tt,delete ye[Be]}else Pe==="reverse"?(De.range?De.range.reverse():(et(Ae+".autorange",!0),De.range=[1,0]),He.autorange?Pt.calc=!0:Pt.plot=!0):(Fe._has("scatter-like")&&Fe._has("regl")&&Be==="dragmode"&&(Tt==="lasso"||Tt==="select")&&rt!=="lasso"&&rt!=="select"||Fe._has("gl2d")?Pt.plot=!0:lt?M.update(Pt,lt):Pt.calc=!0,Ge.set(Tt))}}for(Me in Ye)b.applyContainerArrayChanges(de,Ke(ze,Me),Ye[Me],Pt,Ke)||(Pt.plot=!0);for(var Et in Wt){var It=(Ot=g.getFromId(de,Et))&&Ot._constraintGroup;if(It)for(var Zt in Pt.calc=!0,It)Wt[Zt]||(g.getFromId(de,Zt)._constraintShrinkable=!0)}return(ee(de)||ye.height||ye.width)&&(Pt.plot=!0),(Pt.plot||Pt.calc)&&(Pt.layoutReplot=!0),{flags:Pt,rangesAltered:Wt,undoit:at,redoit:At,eventData:We}}function ee(de){var ye=de._fullLayout,Me=ye.width,ke=ye.height;return de.layout.autosize&&m.plotAutoSize(de,de.layout,ye),ye.width!==Me||ye.height!==ke}function ie(de,ye,Me,ke){de=c.getGraphDiv(de),T.clearPromiseQueue(de),c.isPlainObject(ye)||(ye={}),c.isPlainObject(Me)||(Me={}),Object.keys(ye).length&&(de.changed=!0),Object.keys(Me).length&&(de.changed=!0);var Ee=T.coerceTraceIndices(de,ke),ze=Y(de,c.extendFlat({},ye),Ee),Fe=ze.flags,Ve=Q(de,c.extendFlat({},Me)),Ke=Ve.flags;(Fe.calc||Ke.calc)&&(de.calcdata=void 0),Fe.clearAxisTypes&&T.clearAxisTypes(de,Ee,Me);var Re=[];Ke.layoutReplot?Re.push(_.layoutReplot):Fe.fullReplot?Re.push(f._doPlot):(Re.push(m.previousPromises),U(de,Ke,Ve)||m.supplyDefaults(de),Fe.style&&Re.push(_.doTraceStyle),(Fe.colorbars||Ke.colorbars)&&Re.push(_.doColorBars),Ke.legend&&Re.push(_.doLegend),Ke.layoutstyle&&Re.push(_.layoutStyles),Ke.axrange&&q(Re,Ve.rangesAltered),Ke.ticks&&Re.push(_.doTicksRelayout),Ke.modebar&&Re.push(_.doModeBar),Ke.camera&&Re.push(_.doCamera),Re.push(E)),Re.push(m.rehover,m.redrag),l.add(de,ie,[de,ze.undoit,Ve.undoit,ze.traces],ie,[de,ze.redoit,Ve.redoit,ze.traces]);var qe=c.syncOrAsync(Re,de);return qe&&qe.then||(qe=Promise.resolve(de)),qe.then(function(){return de.emit("plotly_update",{data:ze.eventData,layout:Ve.eventData}),de})}function ae(de){return function(ye){ye._fullLayout._guiEditing=!0;var Me=de.apply(null,arguments);return ye._fullLayout._guiEditing=!1,Me}}var ue=[{pattern:/^hiddenlabels/,attr:"legend.uirevision"},{pattern:/^((x|y)axis\d*)\.((auto)?range|title\.text)/},{pattern:/axis\d*\.showspikes$/,attr:"modebar.uirevision"},{pattern:/(hover|drag)mode$/,attr:"modebar.uirevision"},{pattern:/^(scene\d*)\.camera/},{pattern:/^(geo\d*)\.(projection|center|fitbounds)/},{pattern:/^(ternary\d*\.[abc]axis)\.(min|title\.text)$/},{pattern:/^(polar\d*\.radialaxis)\.((auto)?range|angle|title\.text)/},{pattern:/^(polar\d*\.angularaxis)\.rotation/},{pattern:/^(mapbox\d*)\.(center|zoom|bearing|pitch)/},{pattern:/^legend\.(x|y)$/,attr:"editrevision"},{pattern:/^(shapes|annotations)/,attr:"editrevision"},{pattern:/^title\.text$/,attr:"editrevision"}],le=[{pattern:/^selectedpoints$/,attr:"selectionrevision"},{pattern:/(^|value\.)visible$/,attr:"legend.uirevision"},{pattern:/^dimensions\[\d+\]\.constraintrange/},{pattern:/^node\.(x|y|groups)/},{pattern:/^level$/},{pattern:/(^|value\.)name$/},{pattern:/colorbar\.title\.text$/},{pattern:/colorbar\.(x|y)$/,attr:"editrevision"}];function ge(de,ye){for(var Me=0;Me1;)if(ke.pop(),(Me=i(ye,ke.join(".")+".uirevision").get())!==void 0)return Me;return ye.uirevision}function me(de,ye){for(var Me=0;Me=Ee.length?Ee[0]:Ee[Re]:Ee}function Ve(Re){return Array.isArray(ze)?Re>=ze.length?ze[0]:ze[Re]:ze}function Ke(Re,qe){var We=0;return function(){if(Re&&++We===qe)return Re()}}return ke._frameWaitingCnt===void 0&&(ke._frameWaitingCnt=0),new Promise(function(Re,qe){function We(){ke._currentFrame&&ke._currentFrame.onComplete&&ke._currentFrame.onComplete();var Ge=ke._currentFrame=ke._frameQueue.shift();if(Ge){var Tt=Ge.name?Ge.name.toString():null;de._fullLayout._currentFrame=Tt,ke._lastFrameAt=Date.now(),ke._timeToNext=Ge.frameOpts.duration,m.transition(de,Ge.frame.data,Ge.frame.layout,T.coerceTraceIndices(de,Ge.frame.traces),Ge.frameOpts,Ge.transitionOpts).then(function(){Ge.onComplete&&Ge.onComplete()}),de.emit("plotly_animatingframe",{name:Tt,frame:Ge.frame,animation:{frame:Ge.frameOpts,transition:Ge.transitionOpts}})}else de.emit("plotly_animated"),window.cancelAnimationFrame(ke._animationRaf),ke._animationRaf=null}function Ye(){de.emit("plotly_animating"),ke._lastFrameAt=-1/0,ke._timeToNext=0,ke._runningTransitions=0,ke._currentFrame=null;var Ge=function(){ke._animationRaf=window.requestAnimationFrame(Ge),Date.now()-ke._lastFrameAt>ke._timeToNext&&We()};Ge()}var nt,ft,vt=0;function Pt(Ge){return Array.isArray(Ee)?vt>=Ee.length?Ge.transitionOpts=Ee[vt]:Ge.transitionOpts=Ee[0]:Ge.transitionOpts=Ee,vt++,Ge}var At=[],at=ye==null,et=Array.isArray(ye);if(!at&&!et&&c.isPlainObject(ye))At.push({type:"object",data:Pt(c.extendFlat({},ye))});else if(at||["string","number"].indexOf(typeof ye)!==-1)for(nt=0;nt0&&JtJt)&&Be.push(ft);At=Be}}At.length>0?function(Ge){if(Ge.length!==0){for(var Tt=0;Tt=0;ke--)if(c.isPlainObject(ye[ke])){var Ye=ye[ke].name,nt=(Ke[Ye]||We[Ye]||{}).name,ft=ye[ke].name,vt=Ke[nt]||We[nt];nt&&ft&&typeof ft=="number"&&vt&&S<5&&(S++,c.warn('addFrames: overwriting frame "'+(Ke[nt]||We[nt]).name+'" with a frame whose name of type "number" also equates to "'+nt+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),S===5&&c.warn("addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),We[Ye]={name:Ye},qe.push({frame:m.supplyFrameDefaults(ye[ke]),index:Me&&Me[ke]!==void 0&&Me[ke]!==null?Me[ke]:Re+ke})}qe.sort(function(Be,Ge){return Be.index>Ge.index?-1:Be.index=0;ke--){if(typeof(Ee=qe[ke].frame).name=="number"&&c.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!Ee.name)for(;Ke[Ee.name="frame "+de._transitionData._counter++];);if(Ke[Ee.name]){for(ze=0;ze=0;Me--)ke=ye[Me],ze.push({type:"delete",index:ke}),Fe.unshift({type:"insert",index:ke,value:Ee[ke]});var Ve=m.modifyFrames,Ke=m.modifyFrames,Re=[de,Fe],qe=[de,ze];return l&&l.add(de,Ve,Re,Ke,qe),m.modifyFrames(de,ze)},f.addTraces=function de(ye,Me,ke){ye=c.getGraphDiv(ye);var Ee,ze,Fe=[],Ve=f.deleteTraces,Ke=de,Re=[ye,Fe],qe=[ye,Me];for(function(We,Ye,nt){var ft,vt;if(!Array.isArray(We.data))throw new Error("gd.data must be an array.");if(Ye===void 0)throw new Error("traces must be defined.");for(Array.isArray(Ye)||(Ye=[Ye]),ft=0;ft=0&&We=0&&We=R.length)return!1;if(A.dimensions===2){if(E++,S.length===E)return A;var z=S[E];if(!w(z))return!1;A=R[O][z]}else A=R[O]}else A=R}}return A}function w(A){return A===Math.round(A)&&A>=0}function k(){var A,S,E={};for(A in h(E,c),r.subplotsRegistry)if((S=r.subplotsRegistry[A]).layoutAttributes)if(Array.isArray(S.attr))for(var D=0;D=z.length)return!1;D=(E=(r.transformsRegistry[z[L].type]||{}).attributes)&&E[S[2]],R=3}else{var P=A._module;if(P||(P=(r.modules[A.type||u.type.dflt]||{})._module),!P)return!1;if(!(D=(E=P.attributes)&&E[O])){var N=P.basePlotModule;N&&N.attributes&&(D=N.attributes[O])}D||(D=u[O])}return x(D,S,R)},f.getLayoutValObject=function(A,S){return x(function(E,D){var O,R,z,L,P=E._basePlotModules;if(P){var N;for(O=0;O=h&&(d._input||{})._templateitemname;g&&(m=h);var p,v=l+"["+m+"]";function y(){p={},g&&(p[v]={},p[v].templateitemname=g)}function x(k,b){g?r.nestedProperty(p[v],k).set(b):p[v+"."+k]=b}function w(){var k=p;return y(),k}return y(),{modifyBase:function(k,b){p[k]=b},modifyItem:x,getUpdateObj:w,applyUpdate:function(k,b){k&&x(k,b);var T=w();for(var _ in T)r.nestedProperty(s,_).set(T[_])}}}},{"../lib":503,"../plots/attributes":550}],544:[function(e,o,f){var r=e("@plotly/d3"),a=e("../registry"),u=e("../plots/plots"),c=e("../lib"),i=e("../lib/clear_gl_canvases"),s=e("../components/color"),l=e("../components/drawing"),d=e("../components/titles"),h=e("../components/modebar"),m=e("../plots/cartesian/axes"),g=e("../constants/alignment"),p=e("../plots/cartesian/constraints"),v=p.enforce,y=p.clean,x=e("../plots/cartesian/autorange").doAutoRange;function w(S,E,D){for(var O=0;O=S[1]||R[1]<=S[0])&&z[0]E[0])return!0}return!1}function k(S){var E,D,O,R,z,L,P=S._fullLayout,N=P._size,B=N.p,G=m.list(S,"",!0);if(P._paperdiv.style({width:S._context.responsive&&P.autosize&&!S._context._hasZeroWidth&&!S.layout.width?"100%":P.width+"px",height:S._context.responsive&&P.autosize&&!S._context._hasZeroHeight&&!S.layout.height?"100%":P.height+"px"}).selectAll(".main-svg").call(l.setSize,P.width,P.height),S._context.setBackground(S,P.paper_bgcolor),f.drawMainTitle(S),h.manage(S),!P._has("cartesian"))return u.previousPromises(S);function W(Ye,nt,ft){var vt=Ye._lw/2;return Ye._id.charAt(0)==="x"?nt?ft==="top"?nt._offset-B-vt:nt._offset+nt._length+B+vt:N.t+N.h*(1-(Ye.position||0))+vt%1:nt?ft==="right"?nt._offset+nt._length+B+vt:nt._offset-B-vt:N.l+N.w*(Ye.position||0)+vt%1}for(E=0;EN?A.push({code:"unused",traceType:O,templateCount:P,dataCount:N}):N>P&&A.push({code:"reused",traceType:O,templateCount:P,dataCount:N})}}else A.push({code:"data"});if(function B(G,W){for(var K in G)if(K.charAt(0)!=="_"){var te=G[K],Y=v(G,K,W);a(te)?(Array.isArray(G)&&te._template===!1&&te.templateitemname&&A.push({code:"missing",path:Y,templateitemname:te.templateitemname}),B(te,Y)):Array.isArray(te)&&y(te)&&B(te,Y)}}({data:E,layout:S},""),A.length)return A.map(x)}},{"../lib":503,"../plots/attributes":550,"../plots/plots":619,"./plot_config":541,"./plot_schema":542,"./plot_template":543}],546:[function(e,o,f){var r=e("fast-isnumeric"),a=e("./plot_api"),u=e("../plots/plots"),c=e("../lib"),i=e("../snapshot/helpers"),s=e("../snapshot/tosvg"),l=e("../snapshot/svgtoimg"),d=e("../version").version,h={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],dflt:"png"},width:{valType:"number",min:1},height:{valType:"number",min:1},scale:{valType:"number",min:0,dflt:1},setBackground:{valType:"any",dflt:!1},imageDataOnly:{valType:"boolean",dflt:!1}};o.exports=function(m,g){var p,v,y,x;function w(N){return!(N in g)||c.validate(g[N],h[N])}if(g=g||{},c.isPlainObject(m)?(p=m.data||[],v=m.layout||{},y=m.config||{},x={}):(m=c.getGraphDiv(m),p=c.extendDeep([],m.data),v=c.extendDeep({},m.layout),y=m._context,x=m._fullLayout||{}),!w("width")&&g.width!==null||!w("height")&&g.height!==null)throw new Error("Height and width should be pixel values.");if(!w("format"))throw new Error("Export format is not "+c.join2(h.format.values,", "," or ")+".");var k={};function b(N,B){return c.coerce(g,k,h,N,B)}var T=b("format"),_=b("width"),M=b("height"),A=b("scale"),S=b("setBackground"),E=b("imageDataOnly"),D=document.createElement("div");D.style.position="absolute",D.style.left="-5000px",document.body.appendChild(D);var O=c.extendFlat({},v);_?O.width=_:g.width===null&&r(x.width)&&(O.width=x.width),M?O.height=M:g.height===null&&r(x.height)&&(O.height=x.height);var R=c.extendFlat({},y,{_exportedPlot:!0,staticPlot:!0,setBackground:S}),z=i.getRedrawFunc(D);function L(){return new Promise(function(N){setTimeout(N,i.getDelay(D._fullLayout))})}function P(){return new Promise(function(N,B){var G=s(D,T,A),W=D._fullLayout.width,K=D._fullLayout.height;function te(){a.purge(D),document.body.removeChild(D)}if(T==="full-json"){var Y=u.graphJson(D,!1,"keepdata","object",!0,!0);return Y.version=d,Y=JSON.stringify(Y),te(),N(E?Y:i.encodeJSON(Y))}if(te(),T==="svg")return N(E?G:i.encodeSVG(G));var Z=document.createElement("canvas");Z.id=c.randstr(),l({format:T,width:W,height:K,scale:A,canvas:Z,svg:G,promise:!0}).then(N).catch(B)})}return new Promise(function(N,B){a.newPlot(D,p,O,R).then(z).then(L).then(P).then(function(G){N(function(W){return E?W.replace(i.IMAGE_URL_PREFIX,""):W}(G))}).catch(function(G){B(G)})})}},{"../lib":503,"../plots/plots":619,"../snapshot/helpers":642,"../snapshot/svgtoimg":644,"../snapshot/tosvg":646,"../version":1123,"./plot_api":540,"fast-isnumeric":190}],547:[function(e,o,f){var r=e("../lib"),a=e("../plots/plots"),u=e("./plot_schema"),c=e("./plot_config").dfltConfig,i=r.isPlainObject,s=Array.isArray,l=r.isArrayOrTypedArray;function d(k,b,T,_,M,A){A=A||[];for(var S=Object.keys(k),E=0;Ez.length&&_.push(p("unused",M,O.concat(z.length)));var W,K,te,Y,Z,re=z.length,U=Array.isArray(G);if(U&&(re=Math.min(re,G.length)),L.dimensions===2)for(K=0;Kz[K].length&&_.push(p("unused",M,O.concat(K,z[K].length)));var q=z[K].length;for(W=0;W<(U?Math.min(q,G[K].length):q);W++)te=U?G[K][W]:G,Y=R[K][W],Z=z[K][W],r.validate(Y,te)?Z!==Y&&Z!==+Y&&_.push(p("dynamic",M,O.concat(K,W),Y,Z)):_.push(p("value",M,O.concat(K,W),Y))}else _.push(p("array",M,O.concat(K),R[K]));else for(K=0;K1&&A.push(p("object","layout"))),a.supplyDefaults(S);for(var E=S._fullData,D=T.length,O=0;O0&&Math.round(v)===v))return{vals:h};g=v}for(var y=l.calendar,x=m==="start",w=m==="end",k=s[d+"period0"],b=u(k,y)||0,T=[],_=[],M=[],A=h.length,S=0;SR;)O=c(O,-g,y);for(;O<=R;)O=c(O,g,y);D=c(O,-g,y)}else{for(O=b+(E=Math.round((R-b)/p))*p;O>R;)O-=p;for(;O<=R;)O+=p;D=O-p}T[S]=x?D:w?O:(D+O)/2,_[S]=D,M[S]=O}return{vals:T,starts:_,ends:M}}},{"../../constants/numerical":479,"../../lib":503,"fast-isnumeric":190}],552:[function(e,o,f){o.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}},{}],553:[function(e,o,f){var r=e("@plotly/d3"),a=e("fast-isnumeric"),u=e("../../lib"),c=e("../../constants/numerical").FP_SAFE,i=e("../../registry"),s=e("../../components/drawing"),l=e("./axis_ids"),d=l.getFromId,h=l.isLinked;function m(_,M){var A,S,E=[],D=_._fullLayout,O=p(D,M,0),R=p(D,M,1),z=v(_,M),L=z.min,P=z.max;if(L.length===0||P.length===0)return u.simpleMap(M.range,M.r2l);var N=L[0].val,B=P[0].val;for(A=1;A0&&((re=H-O(K)-R(te))>Q?U/re>ee&&(Y=K,Z=te,ee=U/re):U/H>ee&&(Y={val:K.val,nopad:1},Z={val:te.val,nopad:1},ee=U/H));if(N===B){var ie=N-1,ae=N+1;if($)if(N===0)E=[0,1];else{var ue=(N>0?P:L).reduce(function(ge,fe){return Math.max(ge,R(fe))},0),le=N/(1-Math.min(.5,ue/H));E=N>0?[0,le]:[le,0]}else E=ne?[Math.max(0,ie),Math.max(1,ae)]:[ie,ae]}else $?(Y.val>=0&&(Y={val:0,nopad:1}),Z.val<=0&&(Z={val:0,nopad:1})):ne&&(Y.val-ee*O(Y)<0&&(Y={val:0,nopad:1}),Z.val<=0&&(Z={val:1,nopad:1})),ee=(Z.val-Y.val-g(M,K.val,te.val))/(H-O(Y)-R(Z)),E=[Y.val-ee*O(Y),Z.val+ee*R(Z)];return G&&E.reverse(),u.simpleMap(E,M.l2r||Number)}function g(_,M,A){var S=0;if(_.rangebreaks)for(var E=_.locateBreaks(M,A),D=0;D0?A.ppadplus:A.ppadminus)||A.ppad||0),$=U((_._m>0?A.ppadminus:A.ppadplus)||A.ppad||0),ne=U(A.vpadplus||A.vpad),H=U(A.vpadminus||A.vpad);if(!Z){if(P=1/0,N=-1/0,Y)for(S=0;S0&&(P=E),E>N&&E-c&&(P=E),E>N&&E=ie;S--)ee(S);return{min:B,max:G,opts:A}},concatExtremes:v};function v(_,M,A){var S,E,D,O=M._id,R=_._fullData,z=_._fullLayout,L=[],P=[];function N(te,Y){for(S=0;S=A&&(L.extrapad||!O)){R=!1;break}E(M,L.val)&&L.pad<=A&&(O||!L.extrapad)&&(_.splice(z,1),z--)}if(R){var P=D&&M===0;_.push({val:M,pad:P?0:A,extrapad:!P&&O})}}function k(_){return a(_)&&Math.abs(_)=M}},{"../../components/drawing":388,"../../constants/numerical":479,"../../lib":503,"../../registry":638,"./axis_ids":558,"@plotly/d3":58,"fast-isnumeric":190}],554:[function(e,o,f){var r=e("@plotly/d3"),a=e("fast-isnumeric"),u=e("../../plots/plots"),c=e("../../registry"),i=e("../../lib"),s=i.strTranslate,l=e("../../lib/svg_text_utils"),d=e("../../components/titles"),h=e("../../components/color"),m=e("../../components/drawing"),g=e("./layout_attributes"),p=e("./clean_ticks"),v=e("../../constants/numerical"),y=v.ONEMAXYEAR,x=v.ONEAVGYEAR,w=v.ONEMINYEAR,k=v.ONEMAXQUARTER,b=v.ONEAVGQUARTER,T=v.ONEMINQUARTER,_=v.ONEMAXMONTH,M=v.ONEAVGMONTH,A=v.ONEMINMONTH,S=v.ONEWEEK,E=v.ONEDAY,D=E/2,O=v.ONEHOUR,R=v.ONEMIN,z=v.ONESEC,L=v.MINUS_SIGN,P=v.BADNUM,N={K:"zeroline"},B={K:"gridline",L:"path"},G={K:"tick",L:"path"},W={K:"tick",L:"text"},K=e("../../constants/alignment"),te=K.MID_SHIFT,Y=K.CAP_SHIFT,Z=K.LINE_SPACING,re=K.OPPOSITE_SIDE,U=o.exports={};U.setConvert=e("./set_convert");var q=e("./axis_autotype"),$=e("./axis_ids"),ne=$.idSort,H=$.isLinked;U.id2name=$.id2name,U.name2id=$.name2id,U.cleanId=$.cleanId,U.list=$.list,U.listIds=$.listIds,U.getFromId=$.getFromId,U.getFromTrace=$.getFromTrace;var Q=e("./autorange");U.getAutoRange=Q.getAutoRange,U.findExtremes=Q.findExtremes;function ee(Be){var Ge=1e-4*(Be[1]-Be[0]);return[Be[0]-Ge,Be[1]+Ge]}U.coerceRef=function(Be,Ge,Tt,dt,Pe,Ie){var Ae=dt.charAt(dt.length-1),De=Tt._fullLayout._subplots[Ae+"axis"],He=dt+"ref",rt={};return Pe||(Pe=De[0]||(typeof Ie=="string"?Ie:Ie[0])),Ie||(Ie=Pe),De=De.concat(De.map(function(lt){return lt+" domain"})),rt[He]={valType:"enumerated",values:De.concat(Ie?typeof Ie=="string"?[Ie]:Ie:[]),dflt:Pe},i.coerce(Be,Ge,rt,He)},U.getRefType=function(Be){return Be===void 0?Be:Be==="paper"?"paper":Be==="pixel"?"pixel":/( domain)$/.test(Be)?"domain":"range"},U.coercePosition=function(Be,Ge,Tt,dt,Pe,Ie){var Ae,De;if(U.getRefType(dt)!=="range")Ae=i.ensureNumber,De=Tt(Pe,Ie);else{var He=U.getFromId(Ge,dt);De=Tt(Pe,Ie=He.fraction2r(Ie)),Ae=He.cleanPos}Be[Pe]=Ae(De)},U.cleanPosition=function(Be,Ge,Tt){return(Tt==="paper"||Tt==="pixel"?i.ensureNumber:U.getFromId(Ge,Tt).cleanPos)(Be)},U.redrawComponents=function(Be,Ge){Ge=Ge||U.listIds(Be);var Tt=Be._fullLayout;function dt(Pe,Ie,Ae,De){for(var He=c.getComponentMethod(Pe,Ie),rt={},lt=0;lt2e-6||((Tt-Be._forceTick0)/Be._minDtick%1+1.000001)%1>2e-6)&&(Be._minDtick=0)):Be._minDtick=0},U.saveRangeInitial=function(Be,Ge){for(var Tt=U.list(Be,"",!0),dt=!1,Pe=0;Pe.3*Kt||It(St)||It(Dt))){var Ht=zt.dtick/2;tt+=tt+Ht.8){var Je=Number(zt.substr(1));Le.exactYears>.8&&Je%12==0?tt=U.tickIncrement(tt,"M6","reverse")+1.5*E:Le.exactMonths>.8?tt=U.tickIncrement(tt,"M1","reverse")+15.5*E:tt-=D;var st=U.tickIncrement(tt,zt);if(st<=St)return st}return tt}(Ut,Be,Vt,De,Pe)),wt=Ut,0;wt<=He;)wt=U.tickIncrement(wt,Vt,!1,Pe);return{start:Ge.c2r(Ut,0,Pe),end:Ge.c2r(wt,0,Pe),size:Vt,_dataSpan:He-De}},U.prepTicks=function(Be,Ge){var Tt=i.simpleMap(Be.range,Be.r2l,void 0,void 0,Ge);if(Be._dtickInit=Be.dtick,Be._tick0Init=Be.tick0,Be.tickmode==="auto"||!Be.dtick){var dt,Pe=Be.nticks;Pe||(Be.type==="category"||Be.type==="multicategory"?(dt=Be.tickfont?i.bigFont(Be.tickfont.size||12):15,Pe=Be._length/dt):(dt=Be._id.charAt(0)==="y"?40:80,Pe=i.constrain(Be._length/dt,4,9)+1),Be._name==="radialaxis"&&(Pe*=2)),Be.tickmode==="array"&&(Pe*=100),Be._roughDTick=Math.abs(Tt[1]-Tt[0])/Pe,U.autoTicks(Be,Be._roughDTick),Be._minDtick>0&&Be.dtick<2*Be._minDtick&&(Be.dtick=Be._minDtick,Be.tick0=Be.l2r(Be._forceTick0))}Be.ticklabelmode==="period"&&function(Ie){var Ae;function De(){return!(a(Ie.dtick)||Ie.dtick.charAt(0)!=="M")}var He=De(),rt=U.getTickFormat(Ie);if(rt){var lt=Ie._dtickInit!==Ie.dtick;/%[fLQsSMX]/.test(rt)||(/%[HI]/.test(rt)?(Ae=O,lt&&!He&&Ie.dtickHn&&Er=Ie:kt<=Ie;kt=U.tickIncrement(kt,Be.dtick,Ae,Be.calendar)){if(Dt++,Be.rangebreaks&&!Ae){if(kt=He)break}if(tt.length>Ut||kt===bt)break;bt=kt;var Le=!1;lt&&kt!==(0|kt)&&(Le=!0);var Je={minor:Le,value:kt};Vt>1&&Dt%Vt&&(Je.skipLabel=!0),tt.push(Je)}if(ot&&function(nn,sn,gn){for(var bn=0;bn0?(Hn=bn-1,Wn=bn):(Hn=bn,Wn=bn);var ar,Or=nn[Hn].value,vr=nn[Wn].value,Er=Math.abs(vr-Or),Kn=gn||Er,Ln=0;Kn>=w?Ln=Er>=w&&Er<=y?Er:x:gn===b&&Kn>=T?Ln=Er>=T&&Er<=k?Er:b:Kn>=A?Ln=Er>=A&&Er<=_?Er:M:gn===S&&Kn>=S?Ln=S:Kn>=E?Ln=E:gn===D&&Kn>=D?Ln=D:gn===O&&Kn>=O&&(Ln=O),Ln>=Er&&(Ln=Er,ar=!0);var lr=In+Ln;if(sn.rangebreaks&&Ln>0){for(var Wr=0,Mn=0;Mn<84;Mn++){var rr=(Mn+.5)/84;sn.maskBreaks(In*(1-rr)+rr*lr)!==P&&Wr++}(Ln*=Wr/84)||(nn[bn].drop=!0),ar&&Er>S&&(Ln=Er)}(Ln>0||bn===0)&&(nn[bn].periodX=In+Ln/2)}}(tt,Be,Be._definedDelta),Be.rangebreaks){var st=Be._id.charAt(0)==="y",Et=1;Be.tickmode==="auto"&&(Et=Be.tickfont?Be.tickfont.size:12);var It=NaN;for(zt=tt.length-1;zt>-1;zt--)if(tt[zt].drop)tt.splice(zt,1);else{tt[zt].value=Ot(tt[zt].value,Be);var Zt=Be.c2p(tt[zt].value);(st?It>Zt-Et:ItHe||HtHe&&(Kt.periodX=He),Ht10||dt.substr(5)!=="01-01"?Be._tickround="d":Be._tickround=+Ge.substr(1)%12==0?"y":"m";else if(Ge>=E&&Pe<=10||Ge>=15*E)Be._tickround="d";else if(Ge>=R&&Pe<=16||Ge>=O)Be._tickround="M";else if(Ge>=z&&Pe<=19||Ge>=R)Be._tickround="S";else{var Ie=Be.l2r(Tt+Ge).replace(/^-/,"").length;Be._tickround=Math.max(Pe,Ie)-20,Be._tickround<0&&(Be._tickround=4)}}else if(a(Ge)||Ge.charAt(0)==="L"){var Ae=Be.range.map(Be.r2d||Number);a(Ge)||(Ge=Number(Ge.substr(1))),Be._tickround=2-Math.floor(Math.log(Ge)/Math.LN10+.01);var De=Math.max(Math.abs(Ae[0]),Math.abs(Ae[1])),He=Math.floor(Math.log(De)/Math.LN10+.01),rt=Be.minexponent===void 0?3:Be.minexponent;Math.abs(He)>rt&&(Ee(Be.exponentformat)&&!ze(He)?Be._tickexponent=3*Math.round((He-1)/3):Be._tickexponent=He)}else Be._tickround=null}function Me(Be,Ge,Tt){var dt=Be.tickfont||{};return{x:Ge,dx:0,dy:0,text:Tt||"",fontSize:dt.size,font:dt.family,fontColor:dt.color}}U.autoTicks=function(Be,Ge){var Tt;function dt(lt){return Math.pow(lt,Math.floor(Math.log(Ge)/Math.LN10))}if(Be.type==="date"){Be.tick0=i.dateTick0(Be.calendar,0);var Pe=2*Ge;if(Pe>x)Ge/=x,Tt=dt(10),Be.dtick="M"+12*de(Ge,Tt,ge);else if(Pe>M)Ge/=M,Be.dtick="M"+de(Ge,1,fe);else if(Pe>E){Be.dtick=de(Ge,E,Be._hasDayOfWeekBreaks?[1,2,7,14]:_e);var Ie=U.getTickFormat(Be),Ae=Be.ticklabelmode==="period";Ae&&(Be._rawTick0=Be.tick0),/%[uVW]/.test(Ie)?Be.tick0=i.dateTick0(Be.calendar,2):Be.tick0=i.dateTick0(Be.calendar,1),Ae&&(Be._dowTick0=Be.tick0)}else Pe>O?Be.dtick=de(Ge,O,fe):Pe>R?Be.dtick=de(Ge,R,me):Pe>z?Be.dtick=de(Ge,z,me):(Tt=dt(10),Be.dtick=de(Ge,Tt,ge))}else if(Be.type==="log"){Be.tick0=0;var De=i.simpleMap(Be.range,Be.r2l);if(Ge>.7)Be.dtick=Math.ceil(Ge);else if(Math.abs(De[1]-De[0])<1){var He=1.5*Math.abs((De[1]-De[0])/Ge);Ge=Math.abs(Math.pow(10,De[1])-Math.pow(10,De[0]))/He,Tt=dt(10),Be.dtick="L"+de(Ge,Tt,ge)}else Be.dtick=Ge>.3?"D2":"D1"}else Be.type==="category"||Be.type==="multicategory"?(Be.tick0=0,Be.dtick=Math.ceil(Math.max(Ge,1))):et(Be)?(Be.tick0=0,Tt=1,Be.dtick=de(Ge,Tt,Oe)):(Be.tick0=0,Tt=dt(10),Be.dtick=de(Ge,Tt,ge));if(Be.dtick===0&&(Be.dtick=1),!a(Be.dtick)&&typeof Be.dtick!="string"){var rt=Be.dtick;throw Be.dtick=1,"ax.dtick error: "+String(rt)}},U.tickIncrement=function(Be,Ge,Tt,dt){var Pe=Tt?-1:1;if(a(Ge))return i.increment(Be,Pe*Ge);var Ie=Ge.charAt(0),Ae=Pe*Number(Ge.substr(1));if(Ie==="M")return i.incrementMonth(Be,Ae,dt);if(Ie==="L")return Math.log(Math.pow(10,Be)+Ae)/Math.LN10;if(Ie==="D"){var De=Ge==="D2"?Te:we,He=Be+.01*Pe,rt=i.roundUp(i.mod(He,1),De,Tt);return Math.floor(He)+Math.log(r.round(Math.pow(10,rt),1))/Math.LN10}throw"unrecognized dtick "+String(Ge)},U.tickFirst=function(Be,Ge){var Tt=Be.r2l||Number,dt=i.simpleMap(Be.range,Tt,void 0,void 0,Ge),Pe=dt[1] ")}else Ut._prevDateHead=Le,Je+="
"+Le;tt.text=Je}(Be,Ie,Tt,De):He==="log"?function(Ut,tt,bt,zt,St){var Dt=Ut.dtick,Le=tt.x,Je=Ut.tickformat,st=typeof Dt=="string"&&Dt.charAt(0);if(St==="never"&&(St=""),zt&&st!=="L"&&(Dt="L3",st="L"),Je||st==="L")tt.text=Fe(Math.pow(10,Le),Ut,St,zt);else if(a(Dt)||st==="D"&&i.mod(Le+.01,1)<.1){var Et=Math.round(Le),It=Math.abs(Et),Zt=Ut.exponentformat;Zt==="power"||Ee(Zt)&&ze(Et)?(tt.text=Et===0?1:Et===1?"10":"10"+(Et>1?"":L)+It+"",tt.fontSize*=1.25):(Zt==="e"||Zt==="E")&&It>2?tt.text="1"+Zt+(Et>0?"+":L)+It:(tt.text=Fe(Math.pow(10,Le),Ut,"","fakehover"),Dt==="D1"&&Ut._id.charAt(0)==="y"&&(tt.dy-=tt.fontSize/6))}else{if(st!=="D")throw"unrecognized dtick "+String(Dt);tt.text=String(Math.round(Math.pow(10,i.mod(Le,1)))),tt.fontSize*=.75}if(Ut.dtick==="D1"){var Kt=String(tt.text).charAt(0);Kt!=="0"&&Kt!=="1"||(Ut._id.charAt(0)==="y"?tt.dx-=tt.fontSize/4:(tt.dy+=tt.fontSize/2,tt.dx+=(Ut.range[1]>Ut.range[0]?1:-1)*tt.fontSize*(Le<0?.5:.25)))}}(Be,Ie,0,De,wt):He==="category"?function(Ut,tt){var bt=Ut._categories[Math.round(tt.x)];bt===void 0&&(bt=""),tt.text=String(bt)}(Be,Ie):He==="multicategory"?function(Ut,tt,bt){var zt=Math.round(tt.x),St=Ut._categories[zt]||[],Dt=St[1]===void 0?"":String(St[1]),Le=St[0]===void 0?"":String(St[0]);bt?tt.text=Le+" - "+Dt:(tt.text=Dt,tt.text2=Le)}(Be,Ie,Tt):et(Be)?function(Ut,tt,bt,zt,St){if(Ut.thetaunit!=="radians"||bt)tt.text=Fe(tt.x,Ut,St,zt);else{var Dt=tt.x/180;if(Dt===0)tt.text="0";else{var Le=function(st){function Et(Ht,mn){return Math.abs(Ht-mn)<=1e-6}var It=function(Ht){for(var mn=1;!Et(Math.round(Ht*mn)/mn,Ht);)mn*=10;return mn}(st),Zt=st*It,Kt=Math.abs(function Ht(mn,zn){return Et(zn,0)?mn:Ht(zn,mn%zn)}(Zt,It));return[Math.round(Zt/Kt),Math.round(It/Kt)]}(Dt);if(Le[1]>=100)tt.text=Fe(i.deg2rad(tt.x),Ut,St,zt);else{var Je=tt.x<0;Le[1]===1?Le[0]===1?tt.text="\u03C0":tt.text=Le[0]+"\u03C0":tt.text=["",Le[0],"","\u2044","",Le[1],"","\u03C0"].join(""),Je&&(tt.text=L+tt.text)}}}}(Be,Ie,Tt,De,wt):function(Ut,tt,bt,zt,St){St==="never"?St="":Ut.showexponent==="all"&&Math.abs(tt.x/Ut.dtick)<1e-6&&(St="hide"),tt.text=Fe(tt.x,Ut,St,zt)}(Be,Ie,0,De,wt),dt||(Be.tickprefix&&!kt(Be.showtickprefix)&&(Ie.text=Be.tickprefix+Ie.text),Be.ticksuffix&&!kt(Be.showticksuffix)&&(Ie.text+=Be.ticksuffix)),Be.tickson==="boundaries"||Be.showdividers){var Vt=function(Ut){var tt=Be.l2p(Ut);return tt>=0&&tt<=Be._length?Ut:null};Ie.xbnd=[Vt(Ie.x-.5),Vt(Ie.x+Be.dtick-.5)]}return Ie},U.hoverLabelText=function(Be,Ge,Tt){Tt&&(Be=i.extendFlat({},Be,{hoverformat:Tt}));var dt=Array.isArray(Ge)?Ge[0]:Ge,Pe=Array.isArray(Ge)?Ge[1]:void 0;if(Pe!==void 0&&Pe!==dt)return U.hoverLabelText(Be,dt,Tt)+" - "+U.hoverLabelText(Be,Pe,Tt);var Ie=Be.type==="log"&&dt<=0,Ae=U.tickText(Be,Be.c2l(Ie?-dt:dt),"hover").text;return Ie?dt===0?"0":L+Ae:Ae};var ke=["f","p","n","\u03BC","m","","k","M","G","T"];function Ee(Be){return Be==="SI"||Be==="B"}function ze(Be){return Be>14||Be<-15}function Fe(Be,Ge,Tt,dt){var Pe=Be<0,Ie=Ge._tickround,Ae=Tt||Ge.exponentformat||"B",De=Ge._tickexponent,He=U.getTickFormat(Ge),rt=Ge.separatethousands;if(dt){var lt={exponentformat:Ae,minexponent:Ge.minexponent,dtick:Ge.showexponent==="none"?Ge.dtick:a(Be)&&Math.abs(Be)||1,range:Ge.showexponent==="none"?Ge.range.map(Ge.r2d):[0,Be||1]};ye(lt),Ie=(Number(lt._tickround)||0)+4,De=lt._tickexponent,Ge.hoverformat&&(He=Ge.hoverformat)}if(He)return Ge._numFormat(He)(Be).replace(/-/g,L);var ot,kt=Math.pow(10,-Ie)/2;if(Ae==="none"&&(De=0),(Be=Math.abs(Be))"+ot+"":Ae==="B"&&De===9?Be+="B":Ee(Ae)&&(Be+=ke[De/3+5])),Pe?L+Be:Be}function Ve(Be,Ge){for(var Tt=[],dt={},Pe=0;Pe1&&Tt=Pe.min&&Be=0,bt=lt(kt,wt[1])<=0;return(Vt||tt)&&(Ut||bt)}if(Be.tickformatstops&&Be.tickformatstops.length>0)switch(Be.type){case"date":case"linear":for(Ge=0;Ge=Ae(Pe)))){Tt=dt;break}break;case"log":for(Ge=0;Ge0?Kn.bottom-nr:0,Bn)))),Ge.automargin){Ln={x:0,y:0,r:0,l:0,t:0,b:0};var Fr=[0,1];if(He==="x"){if(Mn==="b"?Ln[Mn]=Ge._depth:(Ln[Mn]=Ge._depth=Math.max(Kn.width>0?nr-Kn.top:0,Bn),Fr.reverse()),Kn.width>0){var $r=Kn.right-(Ge._offset+Ge._length);$r>0&&(Ln.xr=1,Ln.r=$r);var pr=Ge._offset-Kn.left;pr>0&&(Ln.xl=0,Ln.l=pr)}}else if(Mn==="l"?Ln[Mn]=Ge._depth=Math.max(Kn.height>0?nr-Kn.left:0,Bn):(Ln[Mn]=Ge._depth=Math.max(Kn.height>0?Kn.right-nr:0,Bn),Fr.reverse()),Kn.height>0){var qr=Kn.bottom-(Ge._offset+Ge._length);qr>0&&(Ln.yb=0,Ln.b=qr);var _i=Ge._offset-Kn.top;_i>0&&(Ln.yt=1,Ln.t=_i)}Ln[rt]=Ge.anchor==="free"?Ge.position:Ge._anchorAxis.domain[Fr[0]],Ge.title.text!==Ae._dfltTitle[He]&&(Ln[Mn]+=qe(Ge)+(Ge.title.standoff||0)),Ge.mirror&&Ge.anchor!=="free"&&((lr={x:0,y:0,r:0,l:0,t:0,b:0})[rr]=Ge.linewidth,Ge.mirror&&Ge.mirror!==!0&&(lr[rr]+=Bn),Ge.mirror===!0||Ge.mirror==="ticks"?lr[rt]=Ge._anchorAxis.domain[Fr[1]]:Ge.mirror!=="all"&&Ge.mirror!=="allticks"||(lr[rt]=[Ge._counterDomainMin,Ge._counterDomainMax][Fr[1]]))}vr&&(Wr=c.getComponentMethod("rangeslider","autoMarginOpts")(Be,Ge)),u.autoMargin(Be,nt(Ge),Ln),u.autoMargin(Be,ft(Ge),lr),u.autoMargin(Be,vt(Ge),Wr)}),Tt.skipTitle||vr&&Ge.side==="bottom"||ar.push(function(){return function(Kn,Ln){var lr,Wr=Kn._fullLayout,Mn=Ln._id,rr=Mn.charAt(0),nr=Ln.title.font.size;if(Ln.title.hasOwnProperty("standoff"))lr=Ln._depth+Ln.title.standoff+qe(Ln);else{var Bn=Wt(Ln);if(Ln.type==="multicategory")lr=Ln._depth;else{var Fr=1.5*nr;Bn&&(Fr=.5*nr,Ln.ticks==="outside"&&(Fr+=Ln.ticklen)),lr=10+Fr+(Ln.linewidth?Ln.linewidth-1:0)}Bn||(lr+=rr==="x"?Ln.side==="top"?nr*(Ln.showticklabels?1:0):nr*(Ln.showticklabels?1.5:.5):Ln.side==="right"?nr*(Ln.showticklabels?1:.5):nr*(Ln.showticklabels?.5:0))}var $r,pr,qr,_i,cn=U.getPxPosition(Kn,Ln);if(rr==="x"?(pr=Ln._offset+Ln._length/2,qr=Ln.side==="top"?cn-lr:cn+lr):(qr=Ln._offset+Ln._length/2,pr=Ln.side==="right"?cn+lr:cn-lr,$r={rotate:"-90",offset:0}),Ln.type!=="multicategory"){var jn=Ln._selections[Ln._id+"tick"];if(_i={selection:jn,side:Ln.side},jn&&jn.node()&&jn.node().parentNode){var jt=m.getTranslate(jn.node().parentNode);_i.offsetLeft=jt.x,_i.offsetTop=jt.y}Ln.title.hasOwnProperty("standoff")&&(_i.pad=0)}return d.draw(Kn,Mn+"title",{propContainer:Ln,propName:Ln._name+".title.text",placeholder:Wr._dfltTitle[rr],avoid:_i,transform:$r,attributes:{x:pr,y:qr,"text-anchor":"middle"}})}(Be,Ge)}),i.syncOrAsync(ar)}}function Er(Kn){var Ln=De+(Kn||"tick");return tt[Ln]||(tt[Ln]=function(lr,Wr){var Mn,rr,nr,Bn;return lr._selections[Wr].size()?(Mn=1/0,rr=-1/0,nr=1/0,Bn=-1/0,lr._selections[Wr].each(function(){var Fr=Ye(this),$r=m.bBox(Fr.node().parentNode);Mn=Math.min(Mn,$r.top),rr=Math.max(rr,$r.bottom),nr=Math.min(nr,$r.left),Bn=Math.max(Bn,$r.right)})):(Mn=0,rr=0,nr=0,Bn=0),{top:Mn,bottom:rr,left:nr,right:Bn,height:rr-Mn,width:Bn-nr}}(Ge,Ln)),tt[Ln]}},U.getTickSigns=function(Be){var Ge=Be._id.charAt(0),Tt={x:"top",y:"right"}[Ge],dt=Be.side===Tt?1:-1,Pe=[-1,1,dt,-dt];return Be.ticks!=="inside"==(Ge==="x")&&(Pe=Pe.map(function(Ie){return-Ie})),Be.side&&Pe.push({l:-1,t:-1,r:1,b:1}[Be.side.charAt(0)]),Pe},U.makeTransTickFn=function(Be){return Be._id.charAt(0)==="x"?function(Ge){return s(Be._offset+Be.l2p(Ge.x),0)}:function(Ge){return s(0,Be._offset+Be.l2p(Ge.x))}},U.makeTransTickLabelFn=function(Be){var Ge=function(Pe){var Ie=Pe.ticklabelposition||"",Ae=function(bt){return Ie.indexOf(bt)!==-1},De=Ae("top"),He=Ae("left"),rt=Ae("right"),lt=Ae("bottom"),ot=Ae("inside"),kt=lt||He||De||rt;if(!kt&&!ot)return[0,0];var wt=Pe.side,Vt=kt?(Pe.tickwidth||0)/2:0,Ut=3,tt=Pe.tickfont?Pe.tickfont.size:12;return(lt||De)&&(Vt+=tt*Y,Ut+=(Pe.linewidth||0)/2),(He||rt)&&(Vt+=(Pe.linewidth||0)/2,Ut+=3),ot&&wt==="top"&&(Ut-=tt*(1-Y)),(He||De)&&(Vt=-Vt),wt!=="bottom"&&wt!=="right"||(Ut=-Ut),[kt?Vt:0,ot?Ut:0]}(Be),Tt=Ge[0],dt=Ge[1];return Be._id.charAt(0)==="x"?function(Pe){return s(Tt+Be._offset+Be.l2p(Ke(Pe)),dt)}:function(Pe){return s(dt,Tt+Be._offset+Be.l2p(Ke(Pe)))}},U.makeTickPath=function(Be,Ge,Tt,dt){dt=dt!==void 0?dt:Be.ticklen;var Pe=Be._id.charAt(0),Ie=(Be.linewidth||1)/2;return Pe==="x"?"M0,"+(Ge+Ie*Tt)+"v"+dt*Tt:"M"+(Ge+Ie*Tt)+",0h"+dt*Tt},U.makeLabelFns=function(Be,Ge,Tt){var dt=Be.ticklabelposition||"",Pe=function(Kt){return dt.indexOf(Kt)!==-1},Ie=Pe("top"),Ae=Pe("left"),De=Pe("right"),He=Pe("bottom")||Ae||Ie||De,rt=Pe("inside"),lt=dt==="inside"&&Be.ticks==="inside"||!rt&&Be.ticks==="outside"&&Be.tickson!=="boundaries",ot=0,kt=0,wt=lt?Be.ticklen:0;if(rt?wt*=-1:He&&(wt=0),lt&&(ot+=wt,Tt)){var Vt=i.deg2rad(Tt);ot=wt*Math.cos(Vt)+1,kt=wt*Math.sin(Vt)}Be.showticklabels&&(lt||Be.showline)&&(ot+=.2*Be.tickfont.size);var Ut,tt,bt,zt,St,Dt={labelStandoff:ot+=(Be.linewidth||1)/2*(rt?-1:1),labelShift:kt},Le=0,Je=Be.side,st=Be._id.charAt(0),Et=Be.tickangle;if(st==="x")zt=(St=!rt&&Je==="bottom"||rt&&Je==="top")?1:-1,rt&&(zt*=-1),Ut=kt*zt,tt=Ge+ot*zt,bt=St?1:-.2,Math.abs(Et)===90&&(rt?bt+=te:bt=Et===-90&&Je==="bottom"?Y:Et===90&&Je==="top"?te:.5,Le=te/2*(Et/90)),Dt.xFn=function(Kt){return Kt.dx+Ut+Le*Kt.fontSize},Dt.yFn=function(Kt){return Kt.dy+tt+Kt.fontSize*bt},Dt.anchorFn=function(Kt,Ht){if(He){if(Ae)return"end";if(De)return"start"}return a(Ht)&&Ht!==0&&Ht!==180?Ht*zt<0!==rt?"end":"start":"middle"},Dt.heightFn=function(Kt,Ht,mn){return Ht<-60||Ht>60?-.5*mn:Be.side==="top"!==rt?-mn:0};else if(st==="y"){if(zt=(St=!rt&&Je==="left"||rt&&Je==="right")?1:-1,rt&&(zt*=-1),Ut=ot,tt=kt*zt,bt=0,rt||Math.abs(Et)!==90||(bt=Et===-90&&Je==="left"||Et===90&&Je==="right"?Y:.5),rt){var It=a(Et)?+Et:0;if(It!==0){var Zt=i.deg2rad(It);Le=Math.abs(Math.sin(Zt))*Y*zt,bt=0}}Dt.xFn=function(Kt){return Kt.dx+Ge-(Ut+Kt.fontSize*bt)*zt+Le*Kt.fontSize},Dt.yFn=function(Kt){return Kt.dy+tt+Kt.fontSize*te},Dt.anchorFn=function(Kt,Ht){return a(Ht)&&Math.abs(Ht)===90?"middle":St?"end":"start"},Dt.heightFn=function(Kt,Ht,mn){return Be.side==="right"&&(Ht*=-1),Ht<-30?-mn:Ht<30?-.5*mn:0}}return Dt},U.drawTicks=function(Be,Ge,Tt){Tt=Tt||{};var dt=Ge._id+"tick",Pe=Tt.vals;Ge.ticklabelmode==="period"&&(Pe=Pe.slice()).shift();var Ie=Tt.layer.selectAll("path."+dt).data(Ge.ticks?Pe:[],Re);Ie.exit().remove(),Ie.enter().append("path").classed(dt,1).classed("ticks",1).classed("crisp",Tt.crisp!==!1).call(h.stroke,Ge.tickcolor).style("stroke-width",m.crispRound(Be,Ge.tickwidth,1)+"px").attr("d",Tt.path).style("display",null),Jt(Ge,[G]),Ie.attr("transform",Tt.transFn)},U.drawGrid=function(Be,Ge,Tt){Tt=Tt||{};var dt=Ge._id+"grid",Pe=Tt.vals,Ie=Tt.counterAxis;if(Ge.showgrid===!1)Pe=[];else if(Ie&&U.shouldShowZeroLine(Be,Ge,Ie))for(var Ae=Ge.tickmode==="array",De=0;DeIt||sn.leftIt||sn.top+(Ge.tickangle?0:tn.fontSize/4)Ge["_visibleLabelMin_"+st._id]?pn.style("display","none"):It.K!=="tick"||Et||pn.style("display",null)})})})})},wt(ot,lt+1?lt:rt);var Vt=null;Ge._selections&&(Ge._selections[Ae]=ot);var Ut=[function(){return kt.length&&Promise.all(kt)}];Ge.automargin&&dt._redrawFromAutoMarginCount&<===90?(Vt=90,Ut.push(function(){wt(ot,lt)})):Ut.push(function(){if(wt(ot,rt),De.length&&Ie==="x"&&!a(rt)&&(Ge.type!=="log"||String(Ge.dtick).charAt(0)!=="D")){Vt=0;var zt,St=0,Dt=[];if(ot.each(function(nn){St=Math.max(St,nn.fontSize);var sn=Ge.l2p(nn.x),gn=Ye(this),bn=m.bBox(gn.node());Dt.push({top:0,bottom:10,height:10,left:sn-bn.width/2,right:sn+bn.width/2+2,width:bn.width+2})}),Ge.tickson!=="boundaries"&&!Ge.showdividers||Tt.secondary){var Le=De.length,Je=Math.abs((De[Le-1].x-De[0].x)*Ge._m)/(Le-1),st=Ge.ticklabelposition||"",Et=function(nn){return st.indexOf(nn)!==-1},It=Et("top"),Zt=Et("left"),Kt=Et("right"),Ht=Et("bottom")||Zt||It||Kt?(Ge.tickwidth||0)+6:0,mn=Je<2.5*St||Ge.type==="multicategory"||Ge._name==="realaxis";for(zt=0;zt1)for(De=1;De2*E}(v,g))return"date";var b=p.autotypenumbers!=="strict";return function(T,_){for(var M=T.length,A=h(M),S=0,E=0,D={},O=0;O2*S}(v,b)?"category":function(T,_){for(var M=T.length,A=0;A=2){var S,E,D="";if(A.length===2){for(S=0;S<2;S++)if(E=k(A[S])){D=v;break}}var O=M("pattern",D);if(O===v)for(S=0;S<2;S++)(E=k(A[S]))&&(T.bounds[S]=A[S]=E-1);if(O)for(S=0;S<2;S++)switch(E=A[S],O){case v:if(!r(E)||(E=+E)!==Math.floor(E)||E<0||E>=7)return void(T.enabled=!1);T.bounds[S]=A[S]=E;break;case y:if(!r(E)||(E=+E)<0||E>24)return void(T.enabled=!1);T.bounds[S]=A[S]=E}if(_.autorange===!1){var R=_.range;if(R[0]R[1])return void(T.enabled=!1)}else if(A[0]>R[0]&&A[1]l?1:-1:+(c.substr(1)||1)-+(i.substr(1)||1)},f.ref2id=function(c){return!!/^[xyz]/.test(c)&&c.split(" ")[0]},f.isLinked=function(c,i){return u(i,c._axisMatchGroups)||u(i,c._axisConstraintGroups)}},{"../../registry":638,"./constants":561}],559:[function(e,o,f){o.exports=function(r,a,u,c){if(a.type==="category"){var i,s=r.categoryarray,l=Array.isArray(s)&&s.length>0;l&&(i="array");var d,h=u("categoryorder",i);h==="array"&&(d=u("categoryarray")),l||h!=="array"||(h=a.categoryorder="trace"),h==="trace"?a._initialCategories=[]:h==="array"?a._initialCategories=d.slice():(d=function(m,g){var p,v,y,x=g.dataAttr||m._id.charAt(0),w={};if(g.axData)p=g.axData;else for(p=[],v=0;vT?_.substr(T):M.substr(b))+A:_+M+w*k:A}function y(w,k){for(var b=k._size,T=b.h/b.w,_={},M=Object.keys(w),A=0;Al*L)||G){for(b=0;bne&&ieq&&(q=ie);E/=(q-U)/(2*$),U=M.l2r(U),q=M.l2r(q),M.range=M._input.range=Y=0?Math.min(ie,.9):1/(1/Math.max(ie,-.3)+3.222))}function Y(ie,ae,ue,le,ge){return ie.append("path").attr("class","zoombox").style({fill:ae>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",l(ue,le)).attr("d",ge+"Z")}function Z(ie,ae,ue){return ie.append("path").attr("class","zoombox-corners").style({fill:h.background,stroke:h.defaultLine,"stroke-width":1,opacity:0}).attr("transform",l(ae,ue)).attr("d","M0,0Z")}function re(ie,ae,ue,le,ge,fe){ie.attr("d",le+"M"+ue.l+","+ue.t+"v"+ue.h+"h"+ue.w+"v-"+ue.h+"h-"+ue.w+"Z"),U(ie,ae,ge,fe)}function U(ie,ae,ue,le){ue||(ie.transition().style("fill",le>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),ae.transition().style("opacity",1).duration(200))}function q(ie){r.select(ie).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function $(ie){P&&ie.data&&ie._context.showTips&&(a.notifier(a._(ie,"Double-click to zoom back out"),"long"),P=!1)}function ne(ie){var ae=Math.floor(Math.min(ie.b-ie.t,ie.r-ie.l,L)/2);return"M"+(ie.l-3.5)+","+(ie.t-.5+ae)+"h3v"+-ae+"h"+ae+"v-3h-"+(ae+3)+"ZM"+(ie.r+3.5)+","+(ie.t-.5+ae)+"h-3v"+-ae+"h"+-ae+"v-3h"+(ae+3)+"ZM"+(ie.r+3.5)+","+(ie.b+.5-ae)+"h-3v"+ae+"h"+-ae+"v3h"+(ae+3)+"ZM"+(ie.l-3.5)+","+(ie.b+.5-ae)+"h3v"+ae+"h"+ae+"v3h-"+(ae+3)+"Z"}function H(ie,ae,ue,le,ge){for(var fe,me,_e,we,Te=!1,Oe={},de={},ye=(ge||{}).xaHash,Me=(ge||{}).yaHash,ke=0;ke=0)sn._fullLayout._deactivateShape(sn);else{var gn=sn._fullLayout.clickmode;if(q(sn),tn!==2||Jt||Zt(),Wt)gn.indexOf("select")>-1&&D(nn,sn,ye,Me,ae.id,wt),gn.indexOf("event")>-1&&g.click(sn,nn,ae.id);else if(tn===1&&Jt){var bn=me?Te:we,In=me==="s"||_e==="w"?0:1,Hn=bn._name+".range["+In+"]",Wn=function(vr,Er){var Kn,Ln=vr.range[Er],lr=Math.abs(Ln-vr.range[1-Er]);return vr.type==="date"?Ln:vr.type==="log"?(Kn=Math.ceil(Math.max(0,-Math.log(lr)/Math.LN10))+3,u("."+Kn+"g")(Math.pow(10,Ln))):(Kn=Math.floor(Math.log(Math.abs(Ln))/Math.LN10)-Math.floor(Math.log(lr)/Math.LN10)+4,u("."+String(Kn)+"g")(Ln))}(bn,In),ar="left",Or="middle";if(bn.fixedrange)return;me?(Or=me==="n"?"top":"bottom",bn.side==="right"&&(ar="right")):_e==="e"&&(ar="right"),sn._context.showAxisRangeEntryBoxes&&r.select(Tt).call(d.makeEditable,{gd:sn,immediate:!0,background:sn._fullLayout.paper_bgcolor,text:String(Wn),fill:bn.tickfont?bn.tickfont.color:"#444",horizontalAlign:ar,verticalAlign:Or}).on("edit",function(vr){var Er=bn.d2r(vr);Er!==void 0&&s.call("_guiRelayout",sn,Hn,Er)})}}}function tt(tn,nn){if(ie._transitioningWithDuration)return!1;var sn=Math.max(0,Math.min(ze,at*tn+dt)),gn=Math.max(0,Math.min(Fe,et*nn+Pe)),bn=Math.abs(sn-dt),In=Math.abs(gn-Pe);function Hn(){rt="",Ie.r=Ie.l,Ie.t=Ie.b,ot.attr("d","M0,0Z")}if(Ie.l=Math.min(dt,sn),Ie.r=Math.max(dt,sn),Ie.t=Math.min(Pe,gn),Ie.b=Math.max(Pe,gn),Ve.isSubplotConstrained)bn>L||In>L?(rt="xy",bn/ze>In/Fe?(In=bn*Fe/ze,Pe>gn?Ie.t=Pe-In:Ie.b=Pe+In):(bn=In*ze/Fe,dt>sn?Ie.l=dt-bn:Ie.r=dt+bn),ot.attr("d",ne(Ie))):Hn();else if(Ke.isSubplotConstrained)if(bn>L||In>L){rt="xy";var Wn=Math.min(Ie.l/ze,(Fe-Ie.b)/Fe),ar=Math.max(Ie.r/ze,(Fe-Ie.t)/Fe);Ie.l=Wn*ze,Ie.r=ar*ze,Ie.b=(1-Wn)*Fe,Ie.t=(1-ar)*Fe,ot.attr("d",ne(Ie))}else Hn();else!qe||In0){var Or;if(Ke.isSubplotConstrained||!Re&&qe.length===1){for(Or=0;Orw[1]-1/4096&&(c.domain=d),a.noneOrAll(u.domain,c.domain,d)}return i("layer"),c}},{"../../lib":503,"fast-isnumeric":190}],573:[function(e,o,f){var r=e("./show_dflt");o.exports=function(a,u,c,i,s){s||(s={});var l=s.tickSuffixDflt,d=r(a);c("tickprefix")&&c("showtickprefix",d),c("ticksuffix",l)&&c("showticksuffix",d)}},{"./show_dflt":577}],574:[function(e,o,f){var r=e("../../constants/alignment").FROM_BL;o.exports=function(a,u,c){c===void 0&&(c=r[a.constraintoward||"center"]);var i=[a.r2l(a.range[0]),a.r2l(a.range[1])],s=i[0]+(i[1]-i[0])*c;a.range=a._input.range=[a.l2r(s+(i[0]-s)*u),a.l2r(s+(i[1]-s)*u)],a.setScale()}},{"../../constants/alignment":471}],575:[function(e,o,f){var r=e("polybooljs"),a=e("../../registry"),u=e("../../components/drawing").dashStyle,c=e("../../components/color"),i=e("../../components/fx"),s=e("../../components/fx/helpers").makeEventData,l=e("../../components/dragelement/helpers"),d=l.freeMode,h=l.rectMode,m=l.drawMode,g=l.openMode,p=l.selectMode,v=e("../../components/shapes/draw_newshape/display_outlines"),y=e("../../components/shapes/draw_newshape/helpers").handleEllipse,x=e("../../components/shapes/draw_newshape/newshapes"),w=e("../../lib"),k=e("../../lib/polygon"),b=e("../../lib/throttle"),T=e("./axis_ids").getFromId,_=e("../../lib/clear_gl_canvases"),M=e("../../plot_api/subroutines").redrawReglTraces,A=e("./constants"),S=A.MINSELECT,E=k.filter,D=k.tester,O=e("./handle_outline").clearSelect,R=e("./helpers"),z=R.p2r,L=R.axValue,P=R.getTransform;function N($,ne,H,Q,ee,ie,ae){var ue,le,ge,fe,me,_e,we,Te,Oe,de=ne._hoverdata,ye=ne._fullLayout.clickmode.indexOf("event")>-1,Me=[];if(function(Ve){return Ve&&Array.isArray(Ve)&&Ve[0].hoverOnBox!==!0}(de)){K($,ne,ie);var ke=function(Ve,Ke){var Re,qe,We=Ve[0],Ye=-1,nt=[];for(qe=0;qe0?function(Ve,Ke){var Re,qe,We,Ye=[];for(We=0;We0&&Ye.push(Re);if(Ye.length===1&&Ye[0]===Ke.searchInfo&&(qe=Ke.searchInfo.cd[0].trace).selectedpoints.length===Ke.pointNumbers.length){for(We=0;We1||(We+=Re.selectedpoints.length)>1))return!1;return We===1}(ue)&&(_e=Z(ke))){for(ae&&ae.remove(),Oe=0;Oe=0&&Q._fullLayout._deactivateShape(Q),m(ne)){var ee=Q._fullLayout._zoomlayer.selectAll(".select-outline-"+H.id);if(ee&&Q._fullLayout._drawing){var ie=x(ee,$);ie&&a.call("_guiRelayout",Q,{shapes:ie}),Q._fullLayout._drawing=!1}}H.selection={},H.selection.selectionDefs=$.selectionDefs=[],H.selection.mergedPolygons=$.mergedPolygons=[]}function Y($,ne,H,Q){var ee,ie,ae,ue=[],le=ne.map(function(we){return we._id}),ge=H.map(function(we){return we._id});for(ae=0;ae<$.calcdata.length;ae++)if((ie=(ee=$.calcdata[ae])[0].trace).visible===!0&&ie._module&&ie._module.selectPoints)if(!Q||ie.subplot!==Q&&ie.geo!==Q)if(ie.type==="splom"&&ie._xaxes[le[0]]&&ie._yaxes[ge[0]]){var fe=_e(ie._module,ee,ne[0],H[0]);fe.scene=$._fullLayout._splomScenes[ie.uid],ue.push(fe)}else if(ie.type==="sankey"){var me=_e(ie._module,ee,ne[0],H[0]);ue.push(me)}else{if(le.indexOf(ie.xaxis)===-1||ge.indexOf(ie.yaxis)===-1)continue;ue.push(_e(ie._module,ee,T($,ie.xaxis),T($,ie.yaxis)))}else ue.push(_e(ie._module,ee,ne[0],H[0]));return ue;function _e(we,Te,Oe,de){return{_module:we,cd:Te,xaxis:Oe,yaxis:de}}}function Z($){var ne=$.searchInfo.cd[0].trace,H=$.pointNumber,Q=$.pointNumbers,ee=Q.length>0?Q[0]:H;return!!ne.selectedpoints&&ne.selectedpoints.indexOf(ee)>-1}function re($,ne,H){var Q,ee,ie,ae;for(Q=0;Q=0)_e._fullLayout._deactivateShape(_e);else if(!le){var He=we.clickmode;b.done(Tt).then(function(){if(b.clear(Tt),Ae===2){for(Wt.remove(),Re=0;Re-1&&N(De,_e,Q.xaxes,Q.yaxes,Q.subplot,Q,Wt),He==="event"&&_e.emit("plotly_selected",void 0);i.click(_e,De)}).catch(w.error)}},Q.doneFn=function(){Ge.remove(),b.done(Tt).then(function(){b.clear(Tt),Q.gd.emit("plotly_selected",We),Ke&&Q.selectionDefs&&(Ke.subtract=Ot,Q.selectionDefs.push(Ke),Q.mergedPolygons.length=0,[].push.apply(Q.mergedPolygons,Ve)),Q.doneFnCompleted&&Q.doneFnCompleted(dt)}).catch(w.error),le&&te(Q)}},clearSelect:O,clearSelectionsCache:te,selectOnClick:N}},{"../../components/color":366,"../../components/dragelement/helpers":384,"../../components/drawing":388,"../../components/fx":406,"../../components/fx/helpers":402,"../../components/shapes/draw_newshape/display_outlines":454,"../../components/shapes/draw_newshape/helpers":455,"../../components/shapes/draw_newshape/newshapes":456,"../../lib":503,"../../lib/clear_gl_canvases":487,"../../lib/polygon":515,"../../lib/throttle":530,"../../plot_api/subroutines":544,"../../registry":638,"./axis_ids":558,"./constants":561,"./handle_outline":565,"./helpers":566,polybooljs:254}],576:[function(e,o,f){var r=e("@plotly/d3"),a=e("d3-time-format").utcFormat,u=e("../../lib"),c=u.numberFormat,i=e("fast-isnumeric"),s=u.cleanNumber,l=u.ms2DateTime,d=u.dateTime2ms,h=u.ensureNumber,m=u.isArrayOrTypedArray,g=e("../../constants/numerical"),p=g.FP_SAFE,v=g.BADNUM,y=g.LOG_CLIP,x=g.ONEWEEK,w=g.ONEDAY,k=g.ONEHOUR,b=g.ONEMIN,T=g.ONESEC,_=e("./axis_ids"),M=e("./constants"),A=M.HOUR_PATTERN,S=M.WEEKDAY_PATTERN;function E(O){return Math.pow(10,O)}function D(O){return O!=null}o.exports=function(O,R){R=R||{};var z=O._id||"x",L=z.charAt(0);function P(H,Q){if(H>0)return Math.log(H)/Math.LN10;if(H<=0&&Q&&O.range&&O.range.length===2){var ee=O.range[0],ie=O.range[1];return .5*(ee+ie-2*y*Math.abs(ee-ie))}return v}function N(H,Q,ee,ie){if((ie||{}).msUTC&&i(H))return+H;var ae=d(H,ee||O.calendar);if(ae===v){if(!i(H))return v;H=+H;var ue=Math.floor(10*u.mod(H+.05,1)),le=Math.round(H-ue/10);ae=d(new Date(le))+ue/10}return ae}function B(H,Q,ee){return l(H,Q,ee||O.calendar)}function G(H){return O._categories[Math.round(H)]}function W(H){if(D(H)){if(O._categoriesMap===void 0&&(O._categoriesMap={}),O._categoriesMap[H]!==void 0)return O._categoriesMap[H];O._categories.push(typeof H=="number"?String(H):H);var Q=O._categories.length-1;return O._categoriesMap[H]=Q,Q}return v}function K(H){if(O._categoriesMap)return O._categoriesMap[H]}function te(H){var Q=K(H);return Q!==void 0?Q:i(H)?+H:void 0}function Y(H){return i(H)?+H:K(H)}function Z(H,Q,ee){return r.round(ee+Q*H,2)}function re(H,Q,ee){return(H-ee)/Q}var U=function(H){return i(H)?Z(H,O._m,O._b):v},q=function(H){return re(H,O._m,O._b)};if(O.rangebreaks){var $=L==="y";U=function(H){if(!i(H))return v;var Q=O._rangebreaks.length;if(!Q)return Z(H,O._m,O._b);var ee=$;O.range[0]>O.range[1]&&(ee=!ee);for(var ie=ee?-1:1,ae=ie*H,ue=0,le=0;lefe)){ue=ae<(ge+fe)/2?le:le+1;break}ue=le+1}var me=O._B[ue]||0;return isFinite(me)?Z(H,O._m2,me):0},q=function(H){var Q=O._rangebreaks.length;if(!Q)return re(H,O._m,O._b);for(var ee=0,ie=0;ieO._rangebreaks[ie].pmax&&(ee=ie+1);return re(H,O._m2,O._B[ee])}}O.c2l=O.type==="log"?P:h,O.l2c=O.type==="log"?E:h,O.l2p=U,O.p2l=q,O.c2p=O.type==="log"?function(H,Q){return U(P(H,Q))}:U,O.p2c=O.type==="log"?function(H){return E(q(H))}:q,["linear","-"].indexOf(O.type)!==-1?(O.d2r=O.r2d=O.d2c=O.r2c=O.d2l=O.r2l=s,O.c2d=O.c2r=O.l2d=O.l2r=h,O.d2p=O.r2p=function(H){return O.l2p(s(H))},O.p2d=O.p2r=q,O.cleanPos=h):O.type==="log"?(O.d2r=O.d2l=function(H,Q){return P(s(H),Q)},O.r2d=O.r2c=function(H){return E(s(H))},O.d2c=O.r2l=s,O.c2d=O.l2r=h,O.c2r=P,O.l2d=E,O.d2p=function(H,Q){return O.l2p(O.d2r(H,Q))},O.p2d=function(H){return E(q(H))},O.r2p=function(H){return O.l2p(s(H))},O.p2r=q,O.cleanPos=h):O.type==="date"?(O.d2r=O.r2d=u.identity,O.d2c=O.r2c=O.d2l=O.r2l=N,O.c2d=O.c2r=O.l2d=O.l2r=B,O.d2p=O.r2p=function(H,Q,ee){return O.l2p(N(H,0,ee))},O.p2d=O.p2r=function(H,Q,ee){return B(q(H),Q,ee)},O.cleanPos=function(H){return u.cleanDate(H,v,O.calendar)}):O.type==="category"?(O.d2c=O.d2l=W,O.r2d=O.c2d=O.l2d=G,O.d2r=O.d2l_noadd=te,O.r2c=function(H){var Q=Y(H);return Q!==void 0?Q:O.fraction2r(.5)},O.l2r=O.c2r=h,O.r2l=Y,O.d2p=function(H){return O.l2p(O.r2c(H))},O.p2d=function(H){return G(q(H))},O.r2p=O.d2p,O.p2r=q,O.cleanPos=function(H){return typeof H=="string"&&H!==""?H:h(H)}):O.type==="multicategory"&&(O.r2d=O.c2d=O.l2d=G,O.d2r=O.d2l_noadd=te,O.r2c=function(H){var Q=te(H);return Q!==void 0?Q:O.fraction2r(.5)},O.r2c_just_indices=K,O.l2r=O.c2r=h,O.r2l=te,O.d2p=function(H){return O.l2p(O.r2c(H))},O.p2d=function(H){return G(q(H))},O.r2p=O.d2p,O.p2r=q,O.cleanPos=function(H){return Array.isArray(H)||typeof H=="string"&&H!==""?H:h(H)},O.setupMultiCategory=function(H){var Q,ee,ie=O._traceIndices,ae=O._matchGroup;if(ae&&O._categories.length===0){for(var ue in ae)if(ue!==z){var le=R[_.id2name(ue)];ie=ie.concat(le._traceIndices)}}var ge=[[0,{}],[0,{}]],fe=[];for(Q=0;Qp&&(ae[ee]=p),ae[0]===ae[1]){var le=Math.max(1,Math.abs(1e-6*ae[0]));ae[0]-=le,ae[1]+=le}}else u.nestedProperty(O,H).set(ie)},O.setScale=function(H){var Q=R._size;if(O.overlaying){var ee=_.getFromId({_fullLayout:R},O.overlaying);O.domain=ee.domain}var ie=H&&O._r?"_r":"range",ae=O.calendar;O.cleanRange(ie);var ue,le,ge=O.r2l(O[ie][0],ae),fe=O.r2l(O[ie][1],ae),me=L==="y";if(me?(O._offset=Q.t+(1-O.domain[1])*Q.h,O._length=Q.h*(O.domain[1]-O.domain[0]),O._m=O._length/(ge-fe),O._b=-O._m*fe):(O._offset=Q.l+O.domain[0]*Q.w,O._length=Q.w*(O.domain[1]-O.domain[0]),O._m=O._length/(fe-ge),O._b=-O._m*ge),O._rangebreaks=[],O._lBreaks=0,O._m2=0,O._B=[],O.rangebreaks&&(O._rangebreaks=O.locateBreaks(Math.min(ge,fe),Math.max(ge,fe)),O._rangebreaks.length)){for(ue=0;uefe&&(_e=!_e),_e&&O._rangebreaks.reverse();var we=_e?-1:1;for(O._m2=we*O._length/(Math.abs(fe-ge)-O._lBreaks),O._B.push(-O._m2*(me?fe:ge)),ue=0;ueie&&(ie+=7,aeie&&(ie+=24,ae=ee&&ae=ee&&H=Ke.min&&(EeKe.max&&(Ke.max=ze),Fe=!1)}Fe&&le.push({min:Ee,max:ze})}};for(ee=0;eed.duration?(function(){for(var A={},S=0;S rect").call(c.setTranslate,0,0).call(c.setScale,1,1),b.plot.call(c.setTranslate,T._offset,_._offset).call(c.setScale,1,1);var M=b.plot.selectAll(".scatterlayer .trace");M.selectAll(".point").call(c.setPointGroupScale,1,1),M.selectAll(".textpoint").call(c.setTextPointsScale,1,1),M.call(c.hideOutsideRangePoints,b)}function k(b,T){var _=b.plotinfo,M=_.xaxis,A=_.yaxis,S=M._length,E=A._length,D=!!b.xr1,O=!!b.yr1,R=[];if(D){var z=u.simpleMap(b.xr0,M.r2l),L=u.simpleMap(b.xr1,M.r2l),P=z[1]-z[0],N=L[1]-L[0];R[0]=(z[0]*(1-T)+T*L[0]-z[0])/(z[1]-z[0])*S,R[2]=S*(1-T+T*N/P),M.range[0]=M.l2r(z[0]*(1-T)+T*L[0]),M.range[1]=M.l2r(z[1]*(1-T)+T*L[1])}else R[0]=0,R[2]=S;if(O){var B=u.simpleMap(b.yr0,A.r2l),G=u.simpleMap(b.yr1,A.r2l),W=B[1]-B[0],K=G[1]-G[0];R[1]=(B[1]*(1-T)+T*G[1]-B[1])/(B[0]-B[1])*E,R[3]=E*(1-T+T*K/W),A.range[0]=M.l2r(B[0]*(1-T)+T*G[0]),A.range[1]=A.l2r(B[1]*(1-T)+T*G[1])}else R[1]=0,R[3]=E;i.drawOne(s,M,{skipTitle:!0}),i.drawOne(s,A,{skipTitle:!0}),i.redrawComponents(s,[M._id,A._id]);var te=D?S/R[2]:1,Y=O?E/R[3]:1,Z=D?R[0]:0,re=O?R[1]:0,U=D?R[0]/R[2]*S:0,q=O?R[1]/R[3]*E:0,$=M._offset-U,ne=A._offset-q;_.clipRect.call(c.setTranslate,Z,re).call(c.setScale,1/te,1/Y),_.plot.call(c.setTranslate,$,ne).call(c.setScale,te,Y),c.setPointGroupScale(_.zoomScalePts,1/te,1/Y),c.setTextPointsScale(_.zoomScaleTxt,1/te,1/Y)}i.redrawComponents(s)}},{"../../components/drawing":388,"../../lib":503,"../../registry":638,"./axes":554,"@plotly/d3":58}],582:[function(e,o,f){var r=e("../../registry").traceIs,a=e("./axis_autotype");function u(i){return{v:"x",h:"y"}[i.orientation||"v"]}function c(i,s){var l=u(i),d=r(i,"box-violin"),h=r(i._fullInput||{},"candlestick");return d&&!h&&s===l&&i[l]===void 0&&i[l+"0"]===void 0}o.exports=function(i,s,l,d){l("autotypenumbers",d.autotypenumbersDflt),l("type",(d.splomStash||{}).type)==="-"&&(function(h,m){if(h.type==="-"){var g,p=h._id,v=p.charAt(0);p.indexOf("scene")!==-1&&(p=v);var y=function(A,S,E){for(var D=0;D0&&(O["_"+E+"axes"]||{})[S]||(O[E+"axis"]||E)===S&&(c(O,E)||(O[E]||[]).length||O[E+"0"]))return O}}(m,p,v);if(!!y){if(y.type==="histogram"&&v==={v:"y",h:"x"}[y.orientation||"v"])return void(h.type="linear");var x=v+"calendar",w=y[x],k={noMultiCategory:!r(y,"cartesian")||r(y,"noMultiCategory")};if(y.type==="box"&&y._hasPreCompStats&&v==={h:"x",v:"y"}[y.orientation||"v"]&&(k.noMultiCategory=!0),k.autotypenumbers=h.autotypenumbers,c(y,v)){var b=u(y),T=[];for(g=0;g0?".":"")+g;a.isPlainObject(p)?s(p,d,v,m+1):d(v,g,p)}})}f.manageCommandObserver=function(l,d,h,m){var g={},p=!0;d&&d._commandObserver&&(g=d._commandObserver),g.cache||(g.cache={}),g.lookupTable={};var v=f.hasSimpleAPICommandBindings(l,h,g.lookupTable);if(d&&d._commandObserver){if(v)return g;if(d._commandObserver.remove)return d._commandObserver.remove(),d._commandObserver=null,g}if(v){u(l,v,g.cache),g.check=function(){if(p){var w=u(l,v,g.cache);return w.changed&&m&&g.lookupTable[w.value]!==void 0&&(g.disable(),Promise.resolve(m({value:w.value,type:v.type,prop:v.prop,traces:v.traces,index:g.lookupTable[w.value]})).then(g.enable,g.enable)),w.changed}};for(var y=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],x=0;x0&&N<0&&(N+=360);var W=(N-P)/4;return{type:"Polygon",coordinates:[[[P,B],[P,G],[P+W,G],[P+2*W,G],[P+3*W,G],[N,G],[N,B],[N-W,B],[N-2*W,B],[N-3*W,B],[P,B]]]}}o.exports=function(R){return new E(R)},D.plot=function(R,z,L){var P=this,N=z[this.id],B=[],G=!1;for(var W in _.layerNameToAdjective)if(W!=="frame"&&N["show"+W]){G=!0;break}for(var K=0;K0&&B._module.calcGeoJSON(N,z)}if(!this.updateProjection(R,z)){this.viewInitial&&this.scope===L.scope||this.saveViewInitial(L),this.scope=L.scope,this.updateBaseLayers(z,L),this.updateDims(z,L),this.updateFx(z,L),p.generalUpdatePerTraceModule(this.graphDiv,this,R,L);var G=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=G.selectAll(".point"),this.dataPoints.text=G.selectAll("text"),this.dataPaths.line=G.selectAll(".js-line");var W=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=W.selectAll("path"),this.render()}},D.updateProjection=function(R,z){var L=this.graphDiv,P=z[this.id],N=z._size,B=P.domain,G=P.projection,W=P.lonaxis,K=P.lataxis,te=W._ax,Y=K._ax,Z=this.projection=function(de){var ye=de.projection,Me=ye.type,ke=_.projNames[Me];ke="geo"+l.titleCase(ke);for(var Ee=(a[ke]||i[ke])(),ze=de._isSatellite?180*Math.acos(1/ye.distance)/Math.PI:de._isClipped?_.lonaxisSpan[Me]/2:null,Fe=["center","rotate","parallels","clipExtent"],Ve=function(qe){return qe?Ee:[]},Ke=0;Keze*Math.PI/180}return!1},Ee.getPath=function(){return u().projection(Ee)},Ee.getBounds=function(qe){return Ee.getPath().bounds(qe)},Ee.precision(_.precision),de._isSatellite&&Ee.tilt(ye.tilt).distance(ye.distance),ze&&Ee.clipAngle(ze-_.clipPad),Ee}(P),re=[[N.l+N.w*B.x[0],N.t+N.h*(1-B.y[1])],[N.l+N.w*B.x[1],N.t+N.h*(1-B.y[0])]],U=P.center||{},q=G.rotation||{},$=W.range||[],ne=K.range||[];if(P.fitbounds){te._length=re[1][0]-re[0][0],Y._length=re[1][1]-re[0][1],te.range=y(L,te),Y.range=y(L,Y);var H=(te.range[0]+te.range[1])/2,Q=(Y.range[0]+Y.range[1])/2;if(P._isScoped)U={lon:H,lat:Q};else if(P._isClipped){U={lon:H,lat:Q},q={lon:H,lat:Q,roll:q.roll};var ee=G.type,ie=_.lonaxisSpan[ee]/2||180,ae=_.lataxisSpan[ee]/2||90;$=[H-ie,H+ie],ne=[Q-ae,Q+ae]}else U={lon:H,lat:Q},q={lon:H,lat:q.lat,roll:q.roll}}Z.center([U.lon-q.lon,U.lat-q.lat]).rotate([-q.lon,-q.lat,q.roll]).parallels(G.parallels);var ue=O($,ne);Z.fitExtent(re,ue);var le=this.bounds=Z.getBounds(ue),ge=this.fitScale=Z.scale(),fe=Z.translate();if(P.fitbounds){var me=Z.getBounds(O(te.range,Y.range)),_e=Math.min((le[1][0]-le[0][0])/(me[1][0]-me[0][0]),(le[1][1]-le[0][1])/(me[1][1]-me[0][1]));isFinite(_e)?Z.scale(_e*ge):l.warn("Something went wrong during"+this.id+"fitbounds computations.")}else Z.scale(G.scale*ge);var we=this.midPt=[(le[0][0]+le[1][0])/2,(le[0][1]+le[1][1])/2];if(Z.translate([fe[0]+(we[0]-fe[0]),fe[1]+(we[1]-fe[1])]).clipExtent(le),P._isAlbersUsa){var Te=Z([U.lon,U.lat]),Oe=Z.translate();Z.translate([Oe[0]-(Te[0]-Oe[0]),Oe[1]-(Te[1]-Oe[1])])}},D.updateBaseLayers=function(R,z){var L=this,P=L.topojson,N=L.layers,B=L.basePaths;function G(Z){return Z==="lonaxis"||Z==="lataxis"}function W(Z){return Boolean(_.lineLayers[Z])}function K(Z){return Boolean(_.fillLayers[Z])}var te=(this.hasChoropleth?_.layersForChoropleth:_.layers).filter(function(Z){return W(Z)||K(Z)?z["show"+Z]:!G(Z)||z[Z].showgrid}),Y=L.framework.selectAll(".layer").data(te,String);Y.exit().each(function(Z){delete N[Z],delete B[Z],r.select(this).remove()}),Y.enter().append("g").attr("class",function(Z){return"layer "+Z}).each(function(Z){var re=N[Z]=r.select(this);Z==="bg"?L.bgRect=re.append("rect").style("pointer-events","all"):G(Z)?B[Z]=re.append("path").style("fill","none"):Z==="backplot"?re.append("g").classed("choroplethlayer",!0):Z==="frontplot"?re.append("g").classed("scatterlayer",!0):W(Z)?B[Z]=re.append("path").style("fill","none").style("stroke-miterlimit",2):K(Z)&&(B[Z]=re.append("path").style("stroke","none"))}),Y.order(),Y.each(function(Z){var re=B[Z],U=_.layerNameToAdjective[Z];Z==="frame"?re.datum(_.sphereSVG):W(Z)||K(Z)?re.datum(S(P,P.objects[Z])):G(Z)&&re.datum(function(q,$,ne){var H,Q,ee,ie=$[q],ae=_.scopeDefaults[$.scope];q==="lonaxis"?(H=ae.lonaxisRange,Q=ae.lataxisRange,ee=function(Oe,de){return[Oe,de]}):q==="lataxis"&&(H=ae.lataxisRange,Q=ae.lonaxisRange,ee=function(Oe,de){return[de,Oe]});var ue={type:"linear",range:[H[0],H[1]-1e-6],tick0:ie.tick0,dtick:ie.dtick};v.setConvert(ue,ne);var le=v.calcTicks(ue);$.isScoped||q!=="lonaxis"||le.pop();for(var ge=le.length,fe=new Array(ge),me=0;me-1&&b(r.event,P,[L.xaxis],[L.yaxis],L.id,K),G.indexOf("event")>-1&&g.click(P,r.event))})}function te(Y){return L.projection.invert([Y[0]+L.xaxis._offset,Y[1]+L.yaxis._offset])}},D.makeFramework=function(){var R=this,z=R.graphDiv,L=z._fullLayout,P="clip"+L._uid+R.id;R.clipDef=L._clips.append("clipPath").attr("id",P),R.clipRect=R.clipDef.append("rect"),R.framework=r.select(R.container).append("g").attr("class","geo "+R.id).call(m.setClipUrl,P,z),R.project=function(N){var B=R.projection(N);return B?[B[0]-R.xaxis._offset,B[1]-R.yaxis._offset]:[null,null]},R.xaxis={_id:"x",c2p:function(N){return R.project(N)[0]}},R.yaxis={_id:"y",c2p:function(N){return R.project(N)[1]}},R.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},v.setConvert(R.mockAxis,L)},D.saveViewInitial=function(R){var z,L=R.center||{},P=R.projection,N=P.rotation||{};this.viewInitial={fitbounds:R.fitbounds,"projection.scale":P.scale},z=R._isScoped?{"center.lon":L.lon,"center.lat":L.lat}:R._isClipped?{"projection.rotation.lon":N.lon,"projection.rotation.lat":N.lat}:{"center.lon":L.lon,"center.lat":L.lat,"projection.rotation.lon":N.lon},l.extendFlat(this.viewInitial,z)},D.render=function(){var R,z=this.projection,L=z.getPath();function P(B){var G=z(B.lonlat);return G?d(G[0],G[1]):null}function N(B){return z.isLonLatOverEdges(B.lonlat)?"none":null}for(R in this.basePaths)this.basePaths[R].attr("d",L);for(R in this.dataPaths)this.dataPaths[R].attr("d",function(B){return L(B.geojson)});for(R in this.dataPoints)this.dataPoints[R].attr("display",N).attr("transform",P)}},{"../../components/color":366,"../../components/dragelement":385,"../../components/drawing":388,"../../components/fx":406,"../../lib":503,"../../lib/geo_location_utils":496,"../../lib/topojson_utils":532,"../../registry":638,"../cartesian/autorange":553,"../cartesian/axes":554,"../cartesian/select":575,"../plots":619,"./constants":587,"./zoom":592,"@plotly/d3":58,"d3-geo":114,"d3-geo-projection":113,"topojson-client":315}],589:[function(e,o,f){var r=e("../../plots/get_data").getSubplotCalcData,a=e("../../lib").counterRegex,u=e("./geo"),c="geo",i=a(c),s={};s.geo={valType:"subplotid",dflt:c,editType:"calc"},o.exports={attr:c,name:c,idRoot:c,idRegex:i,attrRegex:i,attributes:s,layoutAttributes:e("./layout_attributes"),supplyLayoutDefaults:e("./layout_defaults"),plot:function(l){for(var d=l._fullLayout,h=l.calcdata,m=d._subplots.geo,g=0;g0&&K<0&&(K+=360);var te,Y,Z,re=(W+K)/2;if(!k){var U=b?x.projRotate:[re,0,0];te=m("projection.rotation.lon",U[0]),m("projection.rotation.lat",U[1]),m("projection.rotation.roll",U[2]),m("showcoastlines",!b&&S)&&(m("coastlinecolor"),m("coastlinewidth")),m("showocean",!!S&&void 0)&&m("oceancolor")}k?(Y=-96.6,Z=38.7):(Y=b?re:te,Z=(G[0]+G[1])/2),m("center.lon",Y),m("center.lat",Z),T&&(m("projection.tilt"),m("projection.distance")),_&&m("projection.parallels",x.projParallels||[0,60]),m("projection.scale"),m("showland",!!S&&void 0)&&m("landcolor"),m("showlakes",!!S&&void 0)&&m("lakecolor"),m("showrivers",!!S&&void 0)&&(m("rivercolor"),m("riverwidth")),m("showcountries",b&&y!=="usa"&&S)&&(m("countrycolor"),m("countrywidth")),(y==="usa"||y==="north america"&&v===50)&&(m("showsubunits",S),m("subunitcolor"),m("subunitwidth")),b||m("showframe",S)&&(m("framecolor"),m("framewidth")),m("bgcolor"),m("fitbounds")&&(delete h.projection.scale,b?(delete h.center.lon,delete h.center.lat):M?(delete h.center.lon,delete h.center.lat,delete h.projection.rotation.lon,delete h.projection.rotation.lat,delete h.lonaxis.range,delete h.lataxis.range):(delete h.center.lon,delete h.center.lat,delete h.projection.rotation.lon))}o.exports=function(d,h,m){a(d,h,m,{type:"geo",attributes:i,handleDefaults:l,fullData:m,partition:"y"})}},{"../../lib":503,"../get_data":593,"../subplot_defaults":632,"./constants":587,"./layout_attributes":590}],592:[function(e,o,f){var r=e("@plotly/d3"),a=e("../../lib"),u=e("../../registry"),c=Math.PI/180,i=180/Math.PI,s={cursor:"pointer"},l={cursor:"auto"};function d(S,E){return r.behavior.zoom().translate(E.translate()).scale(E.scale())}function h(S,E,D){var O=S.id,R=S.graphDiv,z=R.layout,L=z[O],P=R._fullLayout,N=P[O],B={},G={};function W(K,te){B[O+"."+K]=a.nestedProperty(L,K).get(),u.call("_storeDirectGUIEdit",z,P._preGUI,B);var Y=a.nestedProperty(N,K);Y.get()!==te&&(Y.set(te),a.nestedProperty(L,K).set(te),G[O+"."+K]=te)}D(W),W("projection.scale",E.scale()/S.fitScale),W("fitbounds",!1),R.emit("plotly_relayout",G)}function m(S,E){var D=d(0,E);function O(R){var z=E.invert(S.midPt);R("center.lon",z[0]),R("center.lat",z[1])}return D.on("zoomstart",function(){r.select(this).style(s)}).on("zoom",function(){E.scale(r.event.scale).translate(r.event.translate),S.render();var R=E.invert(S.midPt);S.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":E.scale()/S.fitScale,"geo.center.lon":R[0],"geo.center.lat":R[1]})}).on("zoomend",function(){r.select(this).style(l),h(S,E,O)}),D}function g(S,E){var D,O,R,z,L,P,N,B,G,W=d(0,E);function K(Y){return E.invert(Y)}function te(Y){var Z=E.rotate(),re=E.invert(S.midPt);Y("projection.rotation.lon",-Z[0]),Y("center.lon",re[0]),Y("center.lat",re[1])}return W.on("zoomstart",function(){r.select(this).style(s),D=r.mouse(this),O=E.rotate(),R=E.translate(),z=O,L=K(D)}).on("zoom",function(){if(P=r.mouse(this),function(re){var U=K(re);if(!U)return!0;var q=E(U);return Math.abs(q[0]-re[0])>2||Math.abs(q[1]-re[1])>2}(D))return W.scale(E.scale()),void W.translate(E.translate());E.scale(r.event.scale),E.translate([R[0],r.event.translate[1]]),L?K(P)&&(B=K(P),N=[z[0]+(B[0]-L[0]),O[1],O[2]],E.rotate(N),z=N):L=K(D=P),G=!0,S.render();var Y=E.rotate(),Z=E.invert(S.midPt);S.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":E.scale()/S.fitScale,"geo.center.lon":Z[0],"geo.center.lat":Z[1],"geo.projection.rotation.lon":-Y[0]})}).on("zoomend",function(){r.select(this).style(l),G&&h(S,E,te)}),W}function p(S,E){var D,O={r:E.rotate(),k:E.scale()},R=d(0,E),z=function(K){for(var te=0,Y=arguments.length,Z=[];++tete?(z=(G>0?90:-90)-K,R=0):(z=Math.asin(G/te)*i-K,R=Math.sqrt(te*te-G*G));var Y=180-z-2*K,Z=(Math.atan2(W,B)-Math.atan2(N,R))*i,re=(Math.atan2(W,B)-Math.atan2(N,-R))*i;return b(D[0],D[1],z,Z)<=b(D[0],D[1],Y,re)?[z,Z,D[2]]:[Y,re,D[2]]}function b(S,E,D,O){var R=T(D-S),z=T(O-E);return Math.sqrt(R*R+z*z)}function T(S){return(S%360+540)%360-180}function _(S,E,D){var O=D*c,R=S.slice(),z=E===0?1:0,L=E===2?1:2,P=Math.cos(O),N=Math.sin(O);return R[z]=S[z]*P-S[L]*N,R[L]=S[L]*P+S[z]*N,R}function M(S){return[Math.atan2(2*(S[0]*S[1]+S[2]*S[3]),1-2*(S[1]*S[1]+S[2]*S[2]))*i,Math.asin(Math.max(-1,Math.min(1,2*(S[0]*S[2]-S[3]*S[1]))))*i,Math.atan2(2*(S[0]*S[3]+S[1]*S[2]),1-2*(S[2]*S[2]+S[3]*S[3]))*i]}function A(S,E){for(var D=0,O=0,R=S.length;OMath.abs(k)?(m.boxEnd[1]=m.boxStart[1]+Math.abs(w)*L*(k>=0?1:-1),m.boxEnd[1]b[3]&&(m.boxEnd[1]=b[3],m.boxEnd[0]=m.boxStart[0]+(b[3]-m.boxStart[1])/Math.abs(L))):(m.boxEnd[0]=m.boxStart[0]+Math.abs(k)/L*(w>=0?1:-1),m.boxEnd[0]b[2]&&(m.boxEnd[0]=b[2],m.boxEnd[1]=m.boxStart[1]+(b[2]-m.boxStart[0])*Math.abs(L)))}}else m.boxEnabled?(w=m.boxStart[0]!==m.boxEnd[0],k=m.boxStart[1]!==m.boxEnd[1],w||k?(w&&(E(0,m.boxStart[0],m.boxEnd[0]),l.xaxis.autorange=!1),k&&(E(1,m.boxStart[1],m.boxEnd[1]),l.yaxis.autorange=!1),l.relayoutCallback()):l.glplot.setDirty(),m.boxEnabled=!1,m.boxInited=!1):m.boxInited&&(m.boxInited=!1);break;case"pan":m.boxEnabled=!1,m.boxInited=!1,v?(m.panning||(m.dragStart[0]=y,m.dragStart[1]=x),Math.abs(m.dragStart[0]-y).999&&(_="turntable"):_="turntable")}else _="turntable";g("dragmode",_),g("hovermode",p.getDfltFromLayout("hovermode"))}o.exports=function(h,m,g){var p=m._basePlotModules.length>1;c(h,m,g,{type:"gl3d",attributes:s,handleDefaults:d,fullLayout:m,font:m.font,fullData:g,getDfltFromLayout:function(v){if(!p)return r.validate(h[v],s[v])?h[v]:void 0},autotypenumbersDflt:m.autotypenumbers,paper_bgcolor:m.paper_bgcolor,calendar:m.calendar})}},{"../../../components/color":366,"../../../lib":503,"../../../registry":638,"../../get_data":593,"../../subplot_defaults":632,"./axis_defaults":601,"./layout_attributes":604}],604:[function(e,o,f){var r=e("./axis_attributes"),a=e("../../domain").attributes,u=e("../../../lib/extend").extendFlat,c=e("../../../lib").counterRegex;function i(s,l,d){return{x:{valType:"number",dflt:s,editType:"camera"},y:{valType:"number",dflt:l,editType:"camera"},z:{valType:"number",dflt:d,editType:"camera"},editType:"camera"}}o.exports={_arrayAttrRegexps:[c("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:u(i(0,0,1),{}),center:u(i(0,0,0),{}),eye:u(i(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:a({name:"scene",editType:"plot"}),aspectmode:{valType:"enumerated",values:["auto","cube","data","manual"],dflt:"auto",editType:"plot",impliedEdits:{"aspectratio.x":void 0,"aspectratio.y":void 0,"aspectratio.z":void 0}},aspectratio:{x:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},y:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},z:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},editType:"plot",impliedEdits:{aspectmode:"manual"}},xaxis:r,yaxis:r,zaxis:r,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],editType:"plot"},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest",editType:"modebar"},uirevision:{valType:"any",editType:"none"},editType:"plot",_deprecated:{cameraposition:{valType:"info_array",editType:"camera"}}}},{"../../../lib":503,"../../../lib/extend":493,"../../domain":584,"./axis_attributes":600}],605:[function(e,o,f){var r=e("../../../lib/str2rgbarray"),a=["xaxis","yaxis","zaxis"];function u(){this.enabled=[!0,!0,!0],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.drawSides=[!0,!0,!0],this.lineWidth=[1,1,1]}u.prototype.merge=function(c){for(var i=0;i<3;++i){var s=c[a[i]];s.visible?(this.enabled[i]=s.showspikes,this.colors[i]=r(s.spikecolor),this.drawSides[i]=s.spikesides,this.lineWidth[i]=s.spikethickness):(this.enabled[i]=!1,this.drawSides[i]=!1)}},o.exports=function(c){var i=new u;return i.merge(c),i}},{"../../../lib/str2rgbarray":528}],606:[function(e,o,f){o.exports=function(i){for(var s=i.axesOptions,l=i.glplot.axesPixels,d=i.fullSceneLayout,h=[[],[],[]],m=0;m<3;++m){var g=d[u[m]];if(g._length=(l[m].hi-l[m].lo)*l[m].pixelsPerDataUnit/i.dataScale[m],Math.abs(g._length)===1/0||isNaN(g._length))h[m]=[];else{g._input_range=g.range.slice(),g.range[0]=l[m].lo/i.dataScale[m],g.range[1]=l[m].hi/i.dataScale[m],g._m=1/(i.dataScale[m]*l[m].pixelsPerDataUnit),g.range[0]===g.range[1]&&(g.range[0]-=1,g.range[1]+=1);var p=g.tickmode;if(g.tickmode==="auto"){g.tickmode="linear";var v=g.nticks||a.constrain(g._length/40,4,9);r.autoTicks(g,Math.abs(g.range[1]-g.range[0])/v)}for(var y=r.calcTicks(g,{msUTC:!0}),x=0;x/g," "));h[m]=y,g.tickmode=p}}for(s.ticks=h,m=0;m<3;++m)for(c[m]=.5*(i.glplot.bounds[0][m]+i.glplot.bounds[1][m]),x=0;x<2;++x)s.bounds[x][m]=i.glplot.bounds[x][m];i.contourLevels=function(w){for(var k=new Array(3),b=0;b<3;++b){for(var T=w[b],_=new Array(T.length),M=0;ML.deltaY?1.1:.9090909090909091,N=E.glplot.getAspectratio();E.glplot.setAspectratio({x:P*N.x,y:P*N.y,z:P*N.z})}z(E)}},!!l&&{passive:!1}),E.glplot.canvas.addEventListener("mousemove",function(){if(E.fullSceneLayout.dragmode!==!1&&E.camera.mouseListener.buttons!==0){var L=R();E.graphDiv.emit("plotly_relayouting",L)}}),E.staticMode||E.glplot.canvas.addEventListener("webglcontextlost",function(L){D&&D.emit&&D.emit("plotly_webglcontextlost",{event:L,layer:E.id})},!1)),E.glplot.oncontextloss=function(){E.recoverContext()},E.glplot.onrender=function(){E.render()},!0},_.render=function(){var E,D=this,O=D.graphDiv,R=D.svgContainer,z=D.container.getBoundingClientRect();O._fullLayout._calcInverseTransform(O);var L=O._fullLayout._invScaleX,P=O._fullLayout._invScaleY,N=z.width*L,B=z.height*P;R.setAttributeNS(null,"viewBox","0 0 "+N+" "+B),R.setAttributeNS(null,"width",N),R.setAttributeNS(null,"height",B),b(D),D.glplot.axes.update(D.axesOptions);for(var G=Object.keys(D.traces),W=null,K=D.glplot.selection,te=0;te")):E.type==="isosurface"||E.type==="volume"?($.valueLabel=g.hoverLabelText(D._mockAxis,D._mockAxis.d2l(K.traceCoordinate[3]),E.valuehoverformat),ee.push("value: "+$.valueLabel),K.textLabel&&ee.push(K.textLabel),re=ee.join("
")):re=K.textLabel;var ie={x:K.traceCoordinate[0],y:K.traceCoordinate[1],z:K.traceCoordinate[2],data:U._input,fullData:U,curveNumber:U.index,pointNumber:q};p.appendArrayPointValue(ie,U,q),E._module.eventData&&(ie=U._module.eventData(ie,K,U,{},q));var ae={points:[ie]};if(D.fullSceneLayout.hovermode){var ue=[];p.loneHover({trace:U,x:(.5+.5*Z[0]/Z[3])*N,y:(.5-.5*Z[1]/Z[3])*B,xLabel:$.xLabel,yLabel:$.yLabel,zLabel:$.zLabel,text:re,name:W.name,color:p.castHoverOption(U,q,"bgcolor")||W.color,borderColor:p.castHoverOption(U,q,"bordercolor"),fontFamily:p.castHoverOption(U,q,"font.family"),fontSize:p.castHoverOption(U,q,"font.size"),fontColor:p.castHoverOption(U,q,"font.color"),nameLength:p.castHoverOption(U,q,"namelength"),textAlign:p.castHoverOption(U,q,"align"),hovertemplate:h.castOption(U,q,"hovertemplate"),hovertemplateLabels:h.extendFlat({},ie,$),eventData:[ie]},{container:R,gd:O,inOut_bbox:ue}),ie.bbox=ue[0]}K.buttons&&K.distance<5?O.emit("plotly_click",ae):O.emit("plotly_hover",ae),this.oldEventData=ae}else p.loneUnhover(R),this.oldEventData&&O.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;D.drawAnnotations(D)},_.recoverContext=function(){var E=this;E.glplot.dispose();var D=function(){E.glplot.gl.isContextLost()?requestAnimationFrame(D):E.initializeGLPlot()?E.plot.apply(E,E.plotArgs):h.error("Catastrophic and unrecoverable WebGL error. Context lost.")};requestAnimationFrame(D)};var A=["xaxis","yaxis","zaxis"];function S(E,D,O){for(var R=E.fullSceneLayout,z=0;z<3;z++){var L=A[z],P=L.charAt(0),N=R[L],B=D[P],G=D[P+"calendar"],W=D["_"+P+"length"];if(h.isArrayOrTypedArray(B))for(var K,te=0;te<(W||B.length);te++)if(h.isArrayOrTypedArray(B[te]))for(var Y=0;Yre[1][L])re[0][L]=-1,re[1][L]=1;else{var le=re[1][L]-re[0][L];re[0][L]-=le/32,re[1][L]+=le/32}if(N.autorange==="reversed"){var ge=re[0][L];re[0][L]=re[1][L],re[1][L]=ge}}else{var fe=N.range;re[0][L]=N.r2l(fe[0]),re[1][L]=N.r2l(fe[1])}re[0][L]===re[1][L]&&(re[0][L]-=1,re[1][L]+=1),U[L]=re[1][L]-re[0][L],this.glplot.setBounds(L,{min:re[0][L]*te[L],max:re[1][L]*te[L]})}var me=G.aspectmode;if(me==="cube")Z=[1,1,1];else if(me==="manual"){var _e=G.aspectratio;Z=[_e.x,_e.y,_e.z]}else{if(me!=="auto"&&me!=="data")throw new Error("scene.js aspectRatio was not one of the enumerated types");var we=[1,1,1];for(L=0;L<3;++L){var Te=q[B=(N=G[A[L]]).type];we[L]=Math.pow(Te.acc,1/Te.count)/te[L]}Z=me==="data"||Math.max.apply(null,we)/Math.min.apply(null,we)<=4?we:[1,1,1]}G.aspectratio.x=W.aspectratio.x=Z[0],G.aspectratio.y=W.aspectratio.y=Z[1],G.aspectratio.z=W.aspectratio.z=Z[2],this.glplot.setAspectratio(G.aspectratio),this.viewInitial.aspectratio||(this.viewInitial.aspectratio={x:G.aspectratio.x,y:G.aspectratio.y,z:G.aspectratio.z}),this.viewInitial.aspectmode||(this.viewInitial.aspectmode=G.aspectmode);var Oe=G.domain||null,de=D._size||null;if(Oe&&de){var ye=this.container.style;ye.position="absolute",ye.left=de.l+Oe.x[0]*de.w+"px",ye.top=de.t+(1-Oe.y[1])*de.h+"px",ye.width=de.w*(Oe.x[1]-Oe.x[0])+"px",ye.height=de.h*(Oe.y[1]-Oe.y[0])+"px"}this.glplot.redraw()}},_.destroy=function(){this.glplot&&(this.camera.mouseListener.enabled=!1,this.container.removeEventListener("wheel",this.camera.wheelListener),this.camera=null,this.glplot.dispose(),this.container.parentNode.removeChild(this.container),this.glplot=null)},_.getCamera=function(){var E;return this.camera.view.recalcMatrix(this.camera.view.lastT()),{up:{x:(E=this.camera).up[0],y:E.up[1],z:E.up[2]},center:{x:E.center[0],y:E.center[1],z:E.center[2]},eye:{x:E.eye[0],y:E.eye[1],z:E.eye[2]},projection:{type:E._ortho===!0?"orthographic":"perspective"}}},_.setViewport=function(E){var D,O=E.camera;this.camera.lookAt.apply(this,[[(D=O).eye.x,D.eye.y,D.eye.z],[D.center.x,D.center.y,D.center.z],[D.up.x,D.up.y,D.up.z]]),this.glplot.setAspectratio(E.aspectratio),O.projection.type==="orthographic"!==this.camera._ortho&&(this.glplot.redraw(),this.glplot.clearRGBA(),this.glplot.dispose(),this.initializeGLPlot())},_.isCameraChanged=function(E){var D=this.getCamera(),O=h.nestedProperty(E,this.id+".camera").get();function R(N,B,G,W){var K=["up","center","eye"],te=["x","y","z"];return B[K[G]]&&N[K[G]][te[W]]===B[K[G]][te[W]]}var z=!1;if(O===void 0)z=!0;else{for(var L=0;L<3;L++)for(var P=0;P<3;P++)if(!R(D,O,L,P)){z=!0;break}(!O.projection||D.projection&&D.projection.type!==O.projection.type)&&(z=!0)}return z},_.isAspectChanged=function(E){var D=this.glplot.getAspectratio(),O=h.nestedProperty(E,this.id+".aspectratio").get();return O===void 0||O.x!==D.x||O.y!==D.y||O.z!==D.z},_.saveLayout=function(E){var D,O,R,z,L,P,N=this.fullLayout,B=this.isCameraChanged(E),G=this.isAspectChanged(E),W=B||G;if(W){var K={};B&&(D=this.getCamera(),R=(O=h.nestedProperty(E,this.id+".camera")).get(),K[this.id+".camera"]=R),G&&(z=this.glplot.getAspectratio(),P=(L=h.nestedProperty(E,this.id+".aspectratio")).get(),K[this.id+".aspectratio"]=P),d.call("_storeDirectGUIEdit",E,N._preGUI,K),B&&(O.set(D),h.nestedProperty(N,this.id+".camera").set(D)),G&&(L.set(z),h.nestedProperty(N,this.id+".aspectratio").set(z),this.glplot.redraw())}return W},_.updateFx=function(E,D){var O=this.camera;if(O)if(E==="orbit")O.mode="orbit",O.keyBindingMode="rotate";else if(E==="turntable"){O.up=[0,0,1],O.mode="turntable",O.keyBindingMode="rotate";var R=this.graphDiv,z=R._fullLayout,L=this.fullSceneLayout.camera,P=L.up.x,N=L.up.y,B=L.up.z;if(B/Math.sqrt(P*P+N*N+B*B)<.999){var G=this.id+".camera.up",W={x:0,y:0,z:1},K={};K[G]=W;var te=R.layout;d.call("_storeDirectGUIEdit",te,z._preGUI,K),L.up=W,h.nestedProperty(te,G).set(W)}}else O.keyBindingMode=E;this.fullSceneLayout.hovermode=D},_.toImage=function(E){E||(E="png"),this.staticMode&&this.container.appendChild(r),this.glplot.redraw();var D=this.glplot.gl,O=D.drawingBufferWidth,R=D.drawingBufferHeight;D.bindFramebuffer(D.FRAMEBUFFER,null);var z=new Uint8Array(O*R*4);D.readPixels(0,0,O,R,D.RGBA,D.UNSIGNED_BYTE,z),function(G,W,K){for(var te=0,Y=K-1;te0)for(var U=255/re,q=0;q<3;++q)G[Z+q]=Math.min(U*G[Z+q],255)}}(z,O,R);var L=document.createElement("canvas");L.width=O,L.height=R;var P,N=L.getContext("2d"),B=N.createImageData(O,R);switch(B.data.set(z),N.putImageData(B,0,0),E){case"jpeg":P=L.toDataURL("image/jpeg");break;case"webp":P=L.toDataURL("image/webp");break;default:P=L.toDataURL("image/png")}return this.staticMode&&this.container.removeChild(r),P},_.setConvert=function(){for(var E=0;E<3;E++){var D=this.fullSceneLayout[A[E]];g.setConvert(D,this.fullLayout),D.setScale=h.noop}},_.make4thDimension=function(){var E=this.graphDiv._fullLayout;this._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},g.setConvert(this._mockAxis,E)},o.exports=T},{"../../../stackgl_modules":1124,"../../components/fx":406,"../../lib":503,"../../lib/show_no_webgl_msg":525,"../../lib/str2rgbarray":528,"../../plots/cartesian/axes":554,"../../registry":638,"./layout/convert":602,"./layout/spikes":605,"./layout/tick_marks":606,"./project":607,"has-passive-events":229,"webgl-context":331}],609:[function(e,o,f){o.exports=function(r,a,u,c){c=c||r.length;for(var i=new Array(c),s=0;sOpenStreetMap contributors',u=['\xA9 Carto',a].join(" "),c=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under ODbL'].join(" "),i={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:a,tiles:["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png","https://b.tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}]},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}]},"carto-positron":{id:"carto-positron",version:8,sources:{"plotly-carto-positron":{type:"raster",attribution:u,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-positron",type:"raster",source:"plotly-carto-positron",minzoom:0,maxzoom:22}]},"carto-darkmatter":{id:"carto-darkmatter",version:8,sources:{"plotly-carto-darkmatter":{type:"raster",attribution:u,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-darkmatter",type:"raster",source:"plotly-carto-darkmatter",minzoom:0,maxzoom:22}]},"stamen-terrain":{id:"stamen-terrain",version:8,sources:{"plotly-stamen-terrain":{type:"raster",attribution:c,tiles:["https://stamen-tiles.a.ssl.fastly.net/terrain/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-stamen-terrain",type:"raster",source:"plotly-stamen-terrain",minzoom:0,maxzoom:22}]},"stamen-toner":{id:"stamen-toner",version:8,sources:{"plotly-stamen-toner":{type:"raster",attribution:c,tiles:["https://stamen-tiles.a.ssl.fastly.net/toner/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-stamen-toner",type:"raster",source:"plotly-stamen-toner",minzoom:0,maxzoom:22}]},"stamen-watercolor":{id:"stamen-watercolor",version:8,sources:{"plotly-stamen-watercolor":{type:"raster",attribution:['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under CC BY SA'].join(" "),tiles:["https://stamen-tiles.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-stamen-watercolor",type:"raster",source:"plotly-stamen-watercolor",minzoom:0,maxzoom:22}]}},s=r(i);o.exports={requiredVersion:"1.10.1",styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:i,styleValuesNonMapbox:s,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",wrongVersionErrorMsg:["Your custom plotly.js bundle is not using the correct mapbox-gl version","Please install mapbox-gl@1.10.1."].join(` +`),noAccessTokenErrorMsg:["Missing Mapbox access token.","Mapbox trace type require a Mapbox access token to be registered.","For example:"," Plotly.newPlot(gd, data, layout, { mapboxAccessToken: 'my-access-token' });","More info here: https://www.mapbox.com/help/define-access-token/"].join(` +`),missingStyleErrorMsg:["No valid mapbox style found, please set `mapbox.style` to one of:",s.join(", "),"or register a Mapbox access token to use a Mapbox-served style."].join(` +`),multipleTokensErrorMsg:["Set multiple mapbox access token across different mapbox subplot,","using first token found as mapbox-gl does not allow multipleaccess tokens on the same page."].join(` +`),mapOnErrorMsg:"Mapbox error.",mapboxLogo:{path0:"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z",path1:"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z",path2:"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z",polygon:"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34"},styleRules:{map:"overflow:hidden;position:relative;","missing-css":"display:none;",canary:"background-color:salmon;","ctrl-bottom-left":"position: absolute; pointer-events: none; z-index: 2; bottom: 0; left: 0;","ctrl-bottom-right":"position: absolute; pointer-events: none; z-index: 2; right: 0; bottom: 0;",ctrl:"clear: both; pointer-events: auto; transform: translate(0, 0);","ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner":"display: none;","ctrl-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner":"display: block; margin-top:2px","ctrl-attrib.mapboxgl-compact:hover":"padding: 2px 24px 2px 4px; visibility: visible; margin-top: 6px;","ctrl-attrib.mapboxgl-compact::after":`content: ""; cursor: pointer; position: absolute; background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"%3E %3Cpath fill="%23333333" fill-rule="evenodd" d="M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0 M9,7a1,1 0 1,0 2,0a1,1 0 1,0 -2,0 M9,10a1,1 0 1,1 2,0l0,3a1,1 0 1,1 -2,0"/%3E %3C/svg%3E'); background-color: rgba(255, 255, 255, 0.5); width: 24px; height: 24px; box-sizing: border-box; border-radius: 12px;`,"ctrl-attrib.mapboxgl-compact":"min-height: 20px; padding: 0; margin: 10px; position: relative; background-color: #fff; border-radius: 3px 12px 12px 3px;","ctrl-bottom-right > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; right: 0","ctrl-bottom-left > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; left: 0","ctrl-bottom-left .mapboxgl-ctrl":"margin: 0 0 10px 10px; float: left;","ctrl-bottom-right .mapboxgl-ctrl":"margin: 0 10px 10px 0; float: right;","ctrl-attrib":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a:hover":"color: inherit; text-decoration: underline;","ctrl-attrib .mapbox-improve-map":"font-weight: bold; margin-left: 2px;","attrib-empty":"display: none;","ctrl-logo":`display:block; width: 21px; height: 21px; background-image: url('data:image/svg+xml;charset=utf-8,%3C?xml version="1.0" encoding="utf-8"?%3E %3Csvg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 21 21" style="enable-background:new 0 0 21 21;" xml:space="preserve"%3E%3Cg transform="translate(0,0.01)"%3E%3Cpath d="m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z" style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3Cpath d="M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpath d="M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpolygon points="11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34 " style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3C/g%3E%3C/svg%3E')`}}},{"../../lib/sort_object_keys":526}],612:[function(e,o,f){var r=e("../../lib");o.exports=function(a,u){var c=a.split(" "),i=c[0],s=c[1],l=r.isArrayOrTypedArray(u)?r.mean(u):u,d=.5+l/100,h=1.5+l/100,m=["",""],g=[0,0];switch(i){case"top":m[0]="top",g[1]=-h;break;case"bottom":m[0]="bottom",g[1]=h}switch(s){case"left":m[1]="right",g[0]=-d;break;case"right":m[1]="left",g[0]=d}return{anchor:m[0]&&m[1]?m.join("-"):m[0]?m[0]:m[1]?m[1]:"center",offset:g}}},{"../../lib":503}],613:[function(e,o,f){var r=e("mapbox-gl/dist/mapbox-gl-unminified"),a=e("../../lib"),u=a.strTranslate,c=a.strScale,i=e("../../plots/get_data").getSubplotCalcData,s=e("../../constants/xmlns_namespaces"),l=e("@plotly/d3"),d=e("../../components/drawing"),h=e("../../lib/svg_text_utils"),m=e("./mapbox"),g=f.constants=e("./constants");function p(v){return typeof v=="string"&&(g.styleValuesMapbox.indexOf(v)!==-1||v.indexOf("mapbox://")===0)}f.name="mapbox",f.attr="subplot",f.idRoot="mapbox",f.idRegex=f.attrRegex=a.counterRegex("mapbox"),f.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}},f.layoutAttributes=e("./layout_attributes"),f.supplyLayoutDefaults=e("./layout_defaults"),f.plot=function(v){var y=v._fullLayout,x=v.calcdata,w=y._subplots.mapbox;if(r.version!==g.requiredVersion)throw new Error(g.wrongVersionErrorMsg);var k=function(S,E){var D=S._fullLayout;if(S._context.mapboxAccessToken==="")return"";for(var O=[],R=[],z=!1,L=!1,P=0;P1&&a.warn(g.multipleTokensErrorMsg),O[0]):(R.length&&a.log(["Listed mapbox access token(s)",R.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}(v,w);r.accessToken=k;for(var b=0;bR/2){var z=S.split("|").join("
");D.text(z).attr("data-unformatted",z).call(h.convertToTspans,v),O=d.bBox(D.node())}D.attr("transform",u(-3,8-O.height)),E.insert("rect",".static-attribution").attr({x:-O.width-6,y:-O.height-3,width:O.width+6,height:O.height+3,fill:"rgba(255, 255, 255, 0.75)"});var L=1;O.width+6>R&&(L=R/(O.width+6));var P=[w.l+w.w*T.x[1],w.t+w.h*(1-T.y[0])];E.attr("transform",u(P[0],P[1])+c(L))}},f.updateFx=function(v){for(var y=v._fullLayout,x=y._subplots.mapbox,w=0;w0){for(var g=0;g0}function d(h){var m={},g={};switch(h.type){case"circle":r.extendFlat(g,{"circle-radius":h.circle.radius,"circle-color":h.color,"circle-opacity":h.opacity});break;case"line":r.extendFlat(g,{"line-width":h.line.width,"line-color":h.color,"line-opacity":h.opacity,"line-dasharray":h.line.dash});break;case"fill":r.extendFlat(g,{"fill-color":h.color,"fill-outline-color":h.fill.outlinecolor,"fill-opacity":h.opacity});break;case"symbol":var p=h.symbol,v=u(p.textposition,p.iconsize);r.extendFlat(m,{"icon-image":p.icon+"-15","icon-size":p.iconsize/10,"text-field":p.text,"text-size":p.textfont.size,"text-anchor":v.anchor,"text-offset":v.offset,"symbol-placement":p.placement}),r.extendFlat(g,{"icon-color":h.color,"text-color":p.textfont.color,"text-opacity":h.opacity});break;case"raster":r.extendFlat(g,{"raster-fade-duration":0,"raster-opacity":h.opacity})}return{layout:m,paint:g}}s.update=function(h){this.visible?this.needsNewImage(h)?this.updateImage(h):this.needsNewSource(h)?(this.removeLayer(),this.updateSource(h),this.updateLayer(h)):this.needsNewLayer(h)?this.updateLayer(h):this.updateStyle(h):(this.updateSource(h),this.updateLayer(h)),this.visible=l(h)},s.needsNewImage=function(h){return this.subplot.map.getSource(this.idSource)&&this.sourceType==="image"&&h.sourcetype==="image"&&(this.source!==h.source||JSON.stringify(this.coordinates)!==JSON.stringify(h.coordinates))},s.needsNewSource=function(h){return this.sourceType!==h.sourcetype||JSON.stringify(this.source)!==JSON.stringify(h.source)||this.layerType!==h.type},s.needsNewLayer=function(h){return this.layerType!==h.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},s.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},s.updateImage=function(h){this.subplot.map.getSource(this.idSource).updateImage({url:h.source,coordinates:h.coordinates});var m=this.findFollowingMapboxLayerId(this.lookupBelow());m!==null&&this.subplot.map.moveLayer(this.idLayer,m)},s.updateSource=function(h){var m=this.subplot.map;if(m.getSource(this.idSource)&&m.removeSource(this.idSource),this.sourceType=h.sourcetype,this.source=h.source,l(h)){var g=function(p){var v,y=p.sourcetype,x=p.source,w={type:y};return y==="geojson"?v="data":y==="vector"?v=typeof x=="string"?"url":"tiles":y==="raster"?(v="tiles",w.tileSize=256):y==="image"&&(v="url",w.coordinates=p.coordinates),w[v]=x,p.sourceattribution&&(w.attribution=a(p.sourceattribution)),w}(h);m.addSource(this.idSource,g)}},s.findFollowingMapboxLayerId=function(h){if(h==="traces")for(var m=this.subplot.getMapLayers(),g=0;g1)for(O=0;O-1&&x(B.originalEvent,R,[O.xaxis],[O.yaxis],O.id,N),G.indexOf("event")>-1&&l.click(R,B.originalEvent)}}},T.updateFx=function(E){var D=this,O=D.map,R=D.gd;if(!D.isStatic){var z,L=E.dragmode;z=h(L)?function(B,G){(B.range={})[D.id]=[N([G.xmin,G.ymin]),N([G.xmax,G.ymax])]}:function(B,G,W){(B.lassoPoints={})[D.id]=W.filtered.map(N)};var P=D.dragOptions;D.dragOptions=a.extendDeep(P||{},{dragmode:E.dragmode,element:D.div,gd:R,plotinfo:{id:D.id,domain:E[D.id].domain,xaxis:D.xaxis,yaxis:D.yaxis,fillRangeItems:z},xaxes:[D.xaxis],yaxes:[D.yaxis],subplot:D.id}),O.off("click",D.onClickInPanHandler),g(L)||m(L)?(O.dragPan.disable(),O.on("zoomstart",D.clearSelect),D.dragOptions.prepFn=function(B,G,W){p(B,G,W,D.dragOptions,L)},s.init(D.dragOptions)):(O.dragPan.enable(),O.off("zoomstart",D.clearSelect),D.div.onmousedown=null,D.onClickInPanHandler=D.onClickInPanFn(D.dragOptions),O.on("click",D.onClickInPanHandler))}function N(B){var G=D.map.unproject(B);return[G.lng,G.lat]}},T.updateFramework=function(E){var D=E[this.id].domain,O=E._size,R=this.div.style;R.width=O.w*(D.x[1]-D.x[0])+"px",R.height=O.h*(D.y[1]-D.y[0])+"px",R.left=O.l+D.x[0]*O.w+"px",R.top=O.t+(1-D.y[1])*O.h+"px",this.xaxis._offset=O.l+D.x[0]*O.w,this.xaxis._length=O.w*(D.x[1]-D.x[0]),this.yaxis._offset=O.t+(1-D.y[1])*O.h,this.yaxis._length=O.h*(D.y[1]-D.y[0])},T.updateLayers=function(E){var D,O=E[this.id].layers,R=this.layerList;if(O.length!==R.length){for(D=0;D=K.width-20?(Z["text-anchor"]="start",Z.x=5):(Z["text-anchor"]="end",Z.x=K._paper.attr("width")-7),te.attr(Z);var re=te.select(".js-link-to-tool"),U=te.select(".js-link-spacer"),q=te.select(".js-sourcelinks");W._context.showSources&&W._context.showSources(W),W._context.showLink&&function($,ne){ne.text("");var H=ne.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text($._context.linkText+" "+String.fromCharCode(187));if($._context.sendData)H.on("click",function(){b.sendDataToCloud($)});else{var Q=window.location.pathname.split("/"),ee=window.location.search;H.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+Q[2].split(".")[0]+"/"+Q[1]+ee})}}(W,re),U.text(re.text()&&q.text()?" - ":"")}},b.sendDataToCloud=function(W){var K=(window.PLOTLYENV||{}).BASE_URL||W._context.plotlyServerURL;if(K){W.emit("plotly_beforeexport");var te=r.select(W).append("div").attr("id","hiddenform").style("display","none"),Y=te.append("form").attr({action:K+"/external",method:"post",target:"_blank"});return Y.append("input").attr({type:"text",name:"data"}).node().value=b.graphJson(W,!1,"keepdata"),Y.node().submit(),te.remove(),W.emit("plotly_afterexport"),!1}};var M=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],A=["year","month","dayMonth","dayMonthYear"];function S(W,K){var te=W._context.locale;te||(te="en-US");var Y=!1,Z={};function re(Q){for(var ee=!0,ie=0;ie1&&Te.length>1){for(i.getComponentMethod("grid","sizeDefaults")(U,re),Z=0;Z15&&Te.length>15&&re.shapes.length===0&&re.images.length===0,b.linkSubplots($,re,q,Y),b.cleanPlot($,re,q,Y);var ke=!(!Y._has||!Y._has("gl2d")),Ee=!(!re._has||!re._has("gl2d")),ze=!(!Y._has||!Y._has("cartesian"))||ke,Fe=!(!re._has||!re._has("cartesian"))||Ee;ze&&!Fe?Y._bgLayer.remove():Fe&&!ze&&(re._shouldCreateBgLayer=!0),Y._zoomlayer&&!W._dragging&&p({_fullLayout:Y}),function(qe,We){var Ye,nt=[];We.meta&&(Ye=We._meta={meta:We.meta,layout:{meta:We.meta}});for(var ft=0;ft0){var ne=1-2*U;Y=Math.round(ne*Y),Z=Math.round(ne*Z)}}var H=b.layoutAttributes.width.min,Q=b.layoutAttributes.height.min;Y1,ie=!K.height&&Math.abs(te.height-Z)>1;(ie||ee)&&(ee&&(te.width=Y),ie&&(te.height=Z)),W._initialAutoSize||(W._initialAutoSize={width:Y,height:Z}),b.sanitizeMargins(te)},b.supplyLayoutModuleDefaults=function(W,K,te,Y){var Z,re,U,q=i.componentsRegistry,$=K._basePlotModules,ne=i.subplotsRegistry.cartesian;for(Z in q)(U=q[Z]).includeBasePlot&&U.includeBasePlot(W,K);for(var H in $.length||$.push(ne),K._has("cartesian")&&(i.getComponentMethod("grid","contentDefaults")(W,K),ne.finalizeSubplots(W,K)),K._subplots)K._subplots[H].sort(d.subplotSort);for(re=0;re<$.length;re++)(U=$[re]).supplyLayoutDefaults&&U.supplyLayoutDefaults(W,K,te);var Q=K._modules;for(re=0;re1&&(te.l/=ae,te.r/=ae)}if(H){var ue=(te.t+te.b)/H;ue>1&&(te.t/=ue,te.b/=ue)}var le=te.xl!==void 0?te.xl:te.x,ge=te.xr!==void 0?te.xr:te.x,fe=te.yt!==void 0?te.yt:te.y,me=te.yb!==void 0?te.yb:te.y;Q[K]={l:{val:le,size:te.l+ie},r:{val:ge,size:te.r+ie},b:{val:me,size:te.b+ie},t:{val:fe,size:te.t+ie}},ee[K]=1}else delete Q[K],delete ee[K];if(!Y._replotting)return b.doAutoMargin(W)}},b.doAutoMargin=function(W){var K=W._fullLayout,te=K.width,Y=K.height;K._size||(K._size={}),z(K);var Z=K._size,re=K.margin,U=d.extendFlat({},Z),q=re.l,$=re.r,ne=re.t,H=re.b,Q=K._pushmargin,ee=K._pushmarginIds;if(K.margin.autoexpand!==!1){for(var ie in Q)ee[ie]||delete Q[ie];for(var ae in Q.base={l:{val:0,size:q},r:{val:1,size:$},t:{val:1,size:ne},b:{val:0,size:H}},Q){var ue=Q[ae].l||{},le=Q[ae].b||{},ge=ue.val,fe=ue.size,me=le.val,_e=le.size;for(var we in Q){if(c(fe)&&Q[we].r){var Te=Q[we].r.val,Oe=Q[we].r.size;if(Te>ge){var de=(fe*Te+(Oe-te)*ge)/(Te-ge),ye=(Oe*(1-ge)+(fe-te)*(1-Te))/(Te-ge);de+ye>q+$&&(q=de,$=ye)}}if(c(_e)&&Q[we].t){var Me=Q[we].t.val,ke=Q[we].t.size;if(Me>me){var Ee=(_e*Me+(ke-Y)*me)/(Me-me),ze=(ke*(1-me)+(_e-Y)*(1-Me))/(Me-me);Ee+ze>H+ne&&(H=Ee,ne=ze)}}}}}var Fe=d.constrain(te-re.l-re.r,2,64),Ve=d.constrain(Y-re.t-re.b,2,64),Ke=Math.max(0,te-Fe),Re=Math.max(0,Y-Ve);if(Ke){var qe=(q+$)/Ke;qe>1&&(q/=qe,$/=qe)}if(Re){var We=(H+ne)/Re;We>1&&(H/=We,ne/=We)}if(Z.l=Math.round(q),Z.r=Math.round($),Z.t=Math.round(ne),Z.b=Math.round(H),Z.p=Math.round(re.pad),Z.w=Math.round(te)-Z.l-Z.r,Z.h=Math.round(Y)-Z.t-Z.b,!K._replotting&&b.didMarginChange(U,Z)){"_redrawFromAutoMarginCount"in K?K._redrawFromAutoMarginCount++:K._redrawFromAutoMarginCount=1;var Ye=3*(1+Object.keys(ee).length);if(K._redrawFromAutoMarginCount0&&(W._transitioningWithDuration=!0),W._transitionData._interruptCallbacks.push(function(){Y=!0}),te.redraw&&W._transitionData._interruptCallbacks.push(function(){return i.call("redraw",W)}),W._transitionData._interruptCallbacks.push(function(){W.emit("plotly_transitioninterrupted",[])});var q=0,$=0;function ne(){return q++,function(){$++,Y||$!==q||function(H){!W._transitionData||(function(Q){if(Q)for(;Q.length;)Q.shift()}(W._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(te.redraw)return i.call("redraw",W)}).then(function(){W._transitioning=!1,W._transitioningWithDuration=!1,W.emit("plotly_transitioned",[])}).then(H))}(U)}}te.runFn(ne),setTimeout(ne())})}],re=d.syncOrAsync(Z,W);return re&&re.then||(re=Promise.resolve()),re.then(function(){return W})}b.didMarginChange=function(W,K){for(var te=0;te1)return!0}return!1},b.graphJson=function(W,K,te,Y,Z,re){(Z&&K&&!W._fullData||Z&&!K&&!W._fullLayout)&&b.supplyDefaults(W);var U=Z?W._fullData:W.data,q=Z?W._fullLayout:W.layout,$=(W._transitionData||{})._frames;function ne(ee,ie){if(typeof ee=="function")return ie?"_function_":null;if(d.isPlainObject(ee)){var ae,ue={};return Object.keys(ee).sort().forEach(function(le){if(["_","["].indexOf(le.charAt(0))===-1)if(typeof ee[le]!="function"){if(te==="keepdata"){if(le.substr(le.length-3)==="src")return}else if(te==="keepstream"){if(typeof(ae=ee[le+"src"])=="string"&&ae.indexOf(":")>0&&!d.isPlainObject(ee.stream))return}else if(te!=="keepall"&&typeof(ae=ee[le+"src"])=="string"&&ae.indexOf(":")>0)return;ue[le]=ne(ee[le],ie)}else ie&&(ue[le]="_function")}),ue}return Array.isArray(ee)?ee.map(function(le){return ne(le,ie)}):d.isTypedArray(ee)?d.simpleMap(ee,d.identity):d.isJSDate(ee)?d.ms2DateTimeLocal(+ee):ee}var H={data:(U||[]).map(function(ee){var ie=ne(ee);return K&&delete ie.fit,ie})};if(!K&&(H.layout=ne(q),Z)){var Q=q._size;H.layout.computed={margin:{b:Q.b,l:Q.l,r:Q.r,t:Q.t}}}return $&&(H.frames=ne($)),re&&(H.config=ne(W._context,!0)),Y==="object"?H:JSON.stringify(H)},b.modifyFrames=function(W,K){var te,Y,Z,re=W._transitionData._frames,U=W._transitionData._frameHash;for(te=0;te=0;re--)if(we[re].enabled){te._indexToPoints=we[re]._indexToPoints;break}Y&&Y.calc&&(_e=Y.calc(W,te))}Array.isArray(_e)&&_e[0]||(_e=[{x:m,y:m}]),_e[0].t||(_e[0].t={}),_e[0].trace=te,ne[fe]=_e}}for(B(U,q,$),Z=0;Z1e-10?g:0}function m(g,p,v){p=p||0,v=v||0;for(var y=g.length,x=new Array(y),w=0;w0?w:1/0}),y=r.mod(v+1,p.length);return[p[v],p[y]]},findIntersectionXY:l,findXYatLength:function(g,p,v,y){var x=-p*v,w=p*p+1,k=2*(p*x-v),b=x*x+v*v-g*g,T=Math.sqrt(k*k-4*w*b),_=(-k+T)/(2*w),M=(-k-T)/(2*w);return[[_,p*_+x+y],[M,p*M+x+y]]},clampTiny:h,pathPolygon:function(g,p,v,y,x,w){return"M"+m(d(g,p,v,y),x,w).join("L")},pathPolygonAnnulus:function(g,p,v,y,x,w,k){var b,T;g=90||Jt>90&&Be>=450?1:Tt<=0&&Pe<=0?0:Math.max(Tt,Pe),Pt=Jt<=180&&Be>=180||Jt>180&&Be>=540?-1:Ge>=0&&dt>=0?0:Math.min(Ge,dt),At=Jt<=270&&Be>=270||Jt>270&&Be>=630?-1:Tt>=0&&Pe>=0?0:Math.min(Tt,Pe),at=Be>=360?1:Ge<=0&&dt<=0?0:Math.max(Ge,dt),[Pt,At,at,et]}(ge),de=Oe[2]-Oe[0],ye=Oe[3]-Oe[1],Me=le/ue,ke=Math.abs(ye/de);Me>ke?(fe=ue,Te=(le-(me=ue*ke))/H.h/2,_e=[ie[0],ie[1]],we=[ae[0]+Te,ae[1]-Te]):(me=le,Te=(ue-(fe=le/ke))/H.w/2,_e=[ie[0]+Te,ie[1]-Te],we=[ae[0],ae[1]]),this.xLength2=fe,this.yLength2=me,this.xDomain2=_e,this.yDomain2=we;var Ee,ze=this.xOffset2=H.l+H.w*_e[0],Fe=this.yOffset2=H.t+H.h*(1-we[1]),Ve=this.radius=fe/de,Ke=this.innerRadius=this.getHole($)*Ve,Re=this.cx=ze-Ve*Oe[0],qe=this.cy=Fe+Ve*Oe[3],We=this.cxx=Re-ze,Ye=this.cyy=qe-Fe,nt=Q.side;nt==="counterclockwise"?(Ee=nt,nt="top"):nt==="clockwise"&&(Ee=nt,nt="bottom"),this.radialAxis=this.mockAxis(q,$,Q,{_id:"x",side:nt,_trueSide:Ee,domain:[Ke/H.w,Ve/H.w]}),this.angularAxis=this.mockAxis(q,$,ee,{side:"right",domain:[0,Math.PI],autorange:!1}),this.doAutoRange(q,$),this.updateAngularAxis(q,$),this.updateRadialAxis(q,$),this.updateRadialAxisTitle(q,$),this.xaxis=this.mockCartesianAxis(q,$,{_id:"x",domain:_e}),this.yaxis=this.mockCartesianAxis(q,$,{_id:"y",domain:we});var ft=this.pathSubplot();this.clipPaths.forTraces.select("path").attr("d",ft).attr("transform",s(We,Ye)),ne.frontplot.attr("transform",s(ze,Fe)).call(d.setClipUrl,this._hasClipOnAxisFalse?null:this.clipIds.forTraces,this.gd),ne.bg.attr("d",ft).attr("transform",s(Re,qe)).call(l.fill,$.bgcolor)},Y.mockAxis=function(q,$,ne,H){var Q=c.extendFlat({},ne,H);return p(Q,$,q),Q},Y.mockCartesianAxis=function(q,$,ne){var H=this,Q=H.isSmith,ee=ne._id,ie=c.extendFlat({type:"linear"},ne);g(ie,q);var ae={x:[0,2],y:[1,3]};return ie.setRange=function(){var ue=H.sectorBBox,le=ae[ee],ge=H.radialAxis._rl,fe=(ge[1]-ge[0])/(1-H.getHole($));ie.range=[ue[le[0]]*fe,ue[le[1]]*fe]},ie.isPtWithinRange=ee!=="x"||Q?function(){return!0}:function(ue){return H.isPtInside(ue)},ie.setRange(),ie.setScale(),ie},Y.doAutoRange=function(q,$){var ne=this.gd,H=this.radialAxis,Q=this.getRadial($);v(ne,H);var ee=H.range;Q.range=ee.slice(),Q._input.range=ee.slice(),H._rl=[H.r2l(ee[0],null,"gregorian"),H.r2l(ee[1],null,"gregorian")]},Y.updateRadialAxis=function(q,$){var ne=this,H=ne.gd,Q=ne.layers,ee=ne.radius,ie=ne.innerRadius,ae=ne.cx,ue=ne.cy,le=ne.getRadial($),ge=G(ne.getSector($)[0],360),fe=ne.radialAxis,me=ie90&&ge<=270&&(fe.tickangle=180);var we=_e?function(Ve){var Ke=N(ne,z([Ve.x,0]));return s(Ke[0]-ae,Ke[1]-ue)}:function(Ve){return s(fe.l2p(Ve.x)+ie,0)},Te=_e?function(Ve){return P(ne,Ve.x,-1/0,1/0)}:function(Ve){return ne.pathArc(fe.r2p(Ve.x)+ie)},Oe=Z(le);if(ne.radialTickLayout!==Oe&&(Q["radial-axis"].selectAll(".xtick").remove(),ne.radialTickLayout=Oe),me){fe.setScale();var de=0,ye=_e?(fe.tickvals||[]).filter(function(Ve){return Ve>=0}).map(function(Ve){return m.tickText(fe,Ve,!0,!1)}):m.calcTicks(fe),Me=_e?ye:m.clipEnds(fe,ye),ke=m.getTickSigns(fe)[2];_e&&((fe.ticks==="top"&&fe.side==="bottom"||fe.ticks==="bottom"&&fe.side==="top")&&(ke=-ke),fe.ticks==="top"&&fe.side==="top"&&(de=-fe.ticklen),fe.ticks==="bottom"&&fe.side==="bottom"&&(de=fe.ticklen)),m.drawTicks(H,fe,{vals:ye,layer:Q["radial-axis"],path:m.makeTickPath(fe,0,ke),transFn:we,crisp:!1}),m.drawGrid(H,fe,{vals:Me,layer:Q["radial-grid"],path:Te,transFn:c.noop,crisp:!1}),m.drawLabels(H,fe,{vals:ye,layer:Q["radial-axis"],transFn:we,labelFns:m.makeLabelFns(fe,de)})}var Ee=ne.radialAxisAngle=ne.vangles?K(re(W(le.angle),ne.vangles)):le.angle,ze=s(ae,ue),Fe=ze+i(-Ee);U(Q["radial-axis"],me&&(le.showticklabels||le.ticks),{transform:Fe}),U(Q["radial-grid"],me&&le.showgrid,{transform:_e?"":ze}),U(Q["radial-line"].select("line"),me&&le.showline,{x1:_e?-ee:ie,y1:0,x2:ee,y2:0,transform:Fe}).attr("stroke-width",le.linewidth).call(l.stroke,le.linecolor)},Y.updateRadialAxisTitle=function(q,$,ne){if(!this.isSmith){var H=this.gd,Q=this.radius,ee=this.cx,ie=this.cy,ae=this.getRadial($),ue=this.id+"title",le=0;if(ae.title){var ge=d.bBox(this.layers["radial-axis"].node()).height,fe=ae.title.font.size,me=ae.side;le=me==="top"?fe:me==="counterclockwise"?-(ge+.4*fe):ge+.8*fe}var _e=ne!==void 0?ne:this.radialAxisAngle,we=W(_e),Te=Math.cos(we),Oe=Math.sin(we),de=ee+Q/2*Te+le*Oe,ye=ie-Q/2*Oe+le*Te;this.layers["radial-axis-title"]=k.draw(H,ue,{propContainer:ae,propName:this.id+".radialaxis.title",placeholder:B(H,"Click to enter radial axis title"),attributes:{x:de,y:ye,"text-anchor":"middle"},transform:{rotate:-_e}})}},Y.updateAngularAxis=function(q,$){var ne=this,H=ne.gd,Q=ne.layers,ee=ne.radius,ie=ne.innerRadius,ae=ne.cx,ue=ne.cy,le=ne.getAngular($),ge=ne.angularAxis,fe=ne.isSmith;fe||(ne.fillViewInitialKey("angularaxis.rotation",le.rotation),ge.setGeometry(),ge.setScale());var me=fe?function(Ve){var Ke=N(ne,z([0,Ve.x]));return Math.atan2(Ke[0]-ae,Ke[1]-ue)-Math.PI/2}:function(Ve){return ge.t2g(Ve.x)};ge.type==="linear"&&ge.thetaunit==="radians"&&(ge.tick0=K(ge.tick0),ge.dtick=K(ge.dtick));var _e=function(Ve){return s(ae+ee*Math.cos(Ve),ue-ee*Math.sin(Ve))},we=fe?function(Ve){var Ke=N(ne,z([0,Ve.x]));return s(Ke[0],Ke[1])}:function(Ve){return _e(me(Ve))},Te=fe?function(Ve){var Ke=N(ne,z([0,Ve.x])),Re=Math.atan2(Ke[0]-ae,Ke[1]-ue)-Math.PI/2;return s(Ke[0],Ke[1])+i(-K(Re))}:function(Ve){var Ke=me(Ve);return _e(Ke)+i(-K(Ke))},Oe=fe?function(Ve){return L(ne,Ve.x,0,1/0)}:function(Ve){var Ke=me(Ve),Re=Math.cos(Ke),qe=Math.sin(Ke);return"M"+[ae+ie*Re,ue-ie*qe]+"L"+[ae+ee*Re,ue-ee*qe]},de=m.makeLabelFns(ge,0).labelStandoff,ye={xFn:function(Ve){var Ke=me(Ve);return Math.cos(Ke)*de},yFn:function(Ve){var Ke=me(Ve),Re=Math.sin(Ke)>0?.2:1;return-Math.sin(Ke)*(de+Ve.fontSize*Re)+Math.abs(Math.cos(Ke))*(Ve.fontSize*E)},anchorFn:function(Ve){var Ke=me(Ve),Re=Math.cos(Ke);return Math.abs(Re)<.1?"middle":Re>0?"start":"end"},heightFn:function(Ve,Ke,Re){var qe=me(Ve);return-.5*(1+Math.sin(qe))*Re}},Me=Z(le);ne.angularTickLayout!==Me&&(Q["angular-axis"].selectAll("."+ge._id+"tick").remove(),ne.angularTickLayout=Me);var ke,Ee=fe?[1/0].concat(ge.tickvals||[]).map(function(Ve){return m.tickText(ge,Ve,!0,!1)}):m.calcTicks(ge);if(fe&&(Ee[0].text="\u221E",Ee[0].fontSize*=1.75),$.gridshape==="linear"?(ke=Ee.map(me),c.angleDelta(ke[0],ke[1])<0&&(ke=ke.slice().reverse())):ke=null,ne.vangles=ke,ge.type==="category"&&(Ee=Ee.filter(function(Ve){return c.isAngleInsideSector(me(Ve),ne.sectorInRad)})),ge.visible){var ze=ge.ticks==="inside"?-1:1,Fe=(ge.linewidth||1)/2;m.drawTicks(H,ge,{vals:Ee,layer:Q["angular-axis"],path:"M"+ze*Fe+",0h"+ze*ge.ticklen,transFn:Te,crisp:!1}),m.drawGrid(H,ge,{vals:Ee,layer:Q["angular-grid"],path:Oe,transFn:c.noop,crisp:!1}),m.drawLabels(H,ge,{vals:Ee,layer:Q["angular-axis"],repositionOnUpdate:!0,transFn:we,labelFns:ye})}U(Q["angular-line"].select("path"),le.showline,{d:ne.pathSubplot(),transform:s(ae,ue)}).attr("stroke-width",le.linewidth).call(l.stroke,le.linecolor)},Y.updateFx=function(q,$){this.gd._context.staticPlot||(!this.isSmith&&(this.updateAngularDrag(q),this.updateRadialDrag(q,$,0),this.updateRadialDrag(q,$,1)),this.updateHoverAndMainDrag(q))},Y.updateHoverAndMainDrag=function(q){var $,ne,H=this,Q=H.isSmith,ee=H.gd,ie=H.layers,ae=q._zoomlayer,ue=D.MINZOOM,le=D.OFFEDGE,ge=H.radius,fe=H.innerRadius,me=H.cx,_e=H.cy,we=H.cxx,Te=H.cyy,Oe=H.sectorInRad,de=H.vangles,ye=H.radialAxis,Me=O.clampTiny,ke=O.findXYatLength,Ee=O.findEnclosingVertexAngles,ze=D.cornerHalfWidth,Fe=D.cornerLen/2,Ve=y.makeDragger(ie,"path","maindrag","crosshair");r.select(Ve).attr("d",H.pathSubplot()).attr("transform",s(me,_e)),Ve.onmousemove=function(rt){w.hover(ee,rt,H.id),ee._fullLayout._lasthover=Ve,ee._fullLayout._hoversubplot=H.id},Ve.onmouseout=function(rt){ee._dragging||x.unhover(ee,rt)};var Ke,Re,qe,We,Ye,nt,ft,vt,Pt,At={element:Ve,gd:ee,subplot:H.id,plotinfo:{id:H.id,xaxis:H.xaxis,yaxis:H.yaxis},xaxes:[H.xaxis],yaxes:[H.yaxis]};function at(rt,lt){return Math.sqrt(rt*rt+lt*lt)}function et(rt,lt){return at(rt-we,lt-Te)}function Ot(rt,lt){return Math.atan2(Te-lt,rt-we)}function Wt(rt,lt){return[rt*Math.cos(lt),rt*Math.sin(-lt)]}function Jt(rt,lt){if(rt===0)return H.pathSector(2*ze);var ot=Fe/rt,kt=lt-ot,wt=lt+ot,Vt=Math.max(0,Math.min(rt,ge)),Ut=Vt-ze,tt=Vt+ze;return"M"+Wt(Ut,kt)+"A"+[Ut,Ut]+" 0,0,0 "+Wt(Ut,wt)+"L"+Wt(tt,wt)+"A"+[tt,tt]+" 0,0,1 "+Wt(tt,kt)+"Z"}function Be(rt,lt,ot){if(rt===0)return H.pathSector(2*ze);var kt,wt,Vt=Wt(rt,lt),Ut=Wt(rt,ot),tt=Me((Vt[0]+Ut[0])/2),bt=Me((Vt[1]+Ut[1])/2);if(tt&&bt){var zt=bt/tt,St=-1/zt,Dt=ke(ze,zt,tt,bt);kt=ke(Fe,St,Dt[0][0],Dt[0][1]),wt=ke(Fe,St,Dt[1][0],Dt[1][1])}else{var Le,Je;bt?(Le=Fe,Je=ze):(Le=ze,Je=Fe),kt=[[tt-Le,bt-Je],[tt+Le,bt-Je]],wt=[[tt-Le,bt+Je],[tt+Le,bt+Je]]}return"M"+kt.join("L")+"L"+wt.reverse().join("L")+"Z"}function Ge(rt,lt){return lt=Math.max(Math.min(lt,ge),fe),rtue?(rt-1&&rt===1&&T(lt,ee,[H.xaxis],[H.yaxis],H.id,At),ot.indexOf("event")>-1&&w.click(ee,lt,H.id)}At.prepFn=function(rt,lt,ot){var kt=ee._fullLayout.dragmode,wt=Ve.getBoundingClientRect();ee._fullLayout._calcInverseTransform(ee);var Vt=ee._fullLayout._invTransform;$=ee._fullLayout._invScaleX,ne=ee._fullLayout._invScaleY;var Ut=c.apply3DTransform(Vt)(lt-wt.left,ot-wt.top);if(Ke=Ut[0],Re=Ut[1],de){var tt=O.findPolygonOffset(ge,Oe[0],Oe[1],de);Ke+=we+tt[0],Re+=Te+tt[1]}switch(kt){case"zoom":At.clickFn=He,Q||(At.moveFn=de?Ie:dt,At.doneFn=Ae,function(){qe=null,We=null,Ye=H.pathSubplot(),nt=!1;var bt=ee._fullLayout[H.id];ft=a(bt.bgcolor).getLuminance(),(vt=y.makeZoombox(ae,ft,me,_e,Ye)).attr("fill-rule","evenodd"),Pt=y.makeCorners(ae,me,_e),_(ee)}());break;case"select":case"lasso":b(rt,lt,ot,At,kt)}},x.init(At)},Y.updateRadialDrag=function(q,$,ne){var H=this,Q=H.gd,ee=H.layers,ie=H.radius,ae=H.innerRadius,ue=H.cx,le=H.cy,ge=H.radialAxis,fe=D.radialDragBoxSize,me=fe/2;if(ge.visible){var _e,we,Te,Oe=W(H.radialAxisAngle),de=ge._rl,ye=de[0],Me=de[1],ke=de[ne],Ee=.75*(de[1]-de[0])/(1-H.getHole($))/ie;ne?(_e=ue+(ie+me)*Math.cos(Oe),we=le-(ie+me)*Math.sin(Oe),Te="radialdrag"):(_e=ue+(ae-me)*Math.cos(Oe),we=le-(ae-me)*Math.sin(Oe),Te="radialdrag-inner");var ze,Fe,Ve,Ke=y.makeRectDragger(ee,Te,"crosshair",-me,-me,fe,fe),Re={element:Ke,gd:Q};U(r.select(Ke),ge.visible&&ae0==(ne?Ve>ye:Vep?function(k){return k<=0}:function(k){return k>=0};d.c2g=function(k){var b=d.c2l(k)-g;return(w(b)?b:0)+x},d.g2c=function(k){return d.l2c(k+g-x)},d.g2p=function(k){return k*y},d.c2p=function(k){return d.g2p(d.c2g(k))}}})(i,s);break;case"angularaxis":(function(d,h){var m=d.type;if(m==="linear"){var g=d.d2c,p=d.c2d;d.d2c=function(v,y){return function(x,w){return w==="degrees"?u(x):x}(g(v),y)},d.c2d=function(v,y){return p(function(x,w){return w==="degrees"?c(x):x}(v,y))}}d.makeCalcdata=function(v,y){var x,w,k=v[y],b=v._length,T=function(E){return d.d2c(E,v.thetaunit)};if(k){if(r.isTypedArray(k)&&m==="linear"){if(b===k.length)return k;if(k.subarray)return k.subarray(0,b)}for(x=new Array(b),w=0;w0?1:0}function a(i){var s=i[0],l=i[1];if(!isFinite(s)||!isFinite(l))return[1,0];var d=(s+1)*(s+1)+l*l;return[(s*s+l*l-1)/d,2*l/d]}function u(i,s){var l=s[0],d=s[1];return[l*i.radius+i.cx,-d*i.radius+i.cy]}function c(i,s){return s*i.radius}o.exports={smith:a,reactanceArc:function(i,s,l,d){var h=u(i,a([l,s])),m=h[0],g=h[1],p=u(i,a([d,s])),v=p[0],y=p[1];if(s===0)return["M"+m+","+g,"L"+v+","+y].join(" ");var x=c(i,1/Math.abs(s));return["M"+m+","+g,"A"+x+","+x+" 0 0,"+(s<0?1:0)+" "+v+","+y].join(" ")},resistanceArc:function(i,s,l,d){var h=c(i,1/(s+1)),m=u(i,a([s,l])),g=m[0],p=m[1],v=u(i,a([s,d])),y=v[0],x=v[1];if(r(l)!==r(d)){var w=u(i,a([s,0]));return["M"+g+","+p,"A"+h+","+h+" 0 0,"+(00){for(var s=[],l=0;l=A&&(E.min=0,D.min=0,O.min=0,y.aaxis&&delete y.aaxis.min,y.baxis&&delete y.baxis.min,y.caxis&&delete y.caxis.min)}function v(y,x,w,k){var b=m[x._name];function T(D,O){return u.coerce(y,x,b,D,O)}T("uirevision",k.uirevision),x.type="linear";var _=T("color"),M=_!==b.color.dflt?_:w.font.color,A=x._name.charAt(0).toUpperCase(),S="Component "+A,E=T("title.text",S);x._hovertitle=E===S?E:A,u.coerceFont(T,"title.font",{family:w.font.family,size:u.bigFont(w.font.size),color:M}),T("min"),d(y,x,T,"linear"),s(y,x,T,"linear"),i(y,x,T,"linear"),l(y,x,T,{outerTicks:!0}),T("showticklabels")&&(u.coerceFont(T,"tickfont",{family:w.font.family,size:w.font.size,color:M}),T("tickangle"),T("tickformat")),h(y,x,T,{dfltColor:_,bgColor:w.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:b}),T("hoverformat"),T("layer")}o.exports=function(y,x,w){c(y,x,w,{type:"ternary",attributes:m,handleDefaults:p,font:x.font,paper_bgcolor:x.paper_bgcolor})}},{"../../components/color":366,"../../lib":503,"../../plot_api/plot_template":543,"../cartesian/line_grid_defaults":571,"../cartesian/prefix_suffix_defaults":573,"../cartesian/tick_label_defaults":578,"../cartesian/tick_mark_defaults":579,"../cartesian/tick_value_defaults":580,"../subplot_defaults":632,"./layout_attributes":635}],637:[function(e,o,f){var r=e("@plotly/d3"),a=e("tinycolor2"),u=e("../../registry"),c=e("../../lib"),i=c.strTranslate,s=c._,l=e("../../components/color"),d=e("../../components/drawing"),h=e("../cartesian/set_convert"),m=e("../../lib/extend").extendFlat,g=e("../plots"),p=e("../cartesian/axes"),v=e("../../components/dragelement"),y=e("../../components/fx"),x=e("../../components/dragelement/helpers"),w=x.freeMode,k=x.rectMode,b=e("../../components/titles"),T=e("../cartesian/select").prepSelect,_=e("../cartesian/select").selectOnClick,M=e("../cartesian/select").clearSelect,A=e("../cartesian/select").clearSelectionsCache,S=e("../cartesian/constants");function E(G,W){this.id=G.id,this.graphDiv=G.graphDiv,this.init(W),this.makeFramework(W),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}o.exports=E;var D=E.prototype;D.init=function(G){this.container=G._ternarylayer,this.defs=G._defs,this.layoutId=G._uid,this.traceHash={},this.layers={}},D.plot=function(G,W){var K=W[this.id],te=W._size;this._hasClipOnAxisFalse=!1;for(var Y=0;YO*ae?Y=(Z=ae)*O:Z=(Y=ie)/O,re=Q*Y/ie,U=ee*Z/ae,K=W.l+W.w*ne-Y/2,te=W.t+W.h*(1-H)-Z/2,q.x0=K,q.y0=te,q.w=Y,q.h=Z,q.sum=ue,q.xaxis={type:"linear",range:[le+2*fe-ue,ue-le-2*ge],domain:[ne-re/2,ne+re/2],_id:"x"},h(q.xaxis,q.graphDiv._fullLayout),q.xaxis.setScale(),q.xaxis.isPtWithinRange=function(ze){return ze.a>=q.aaxis.range[0]&&ze.a<=q.aaxis.range[1]&&ze.b>=q.baxis.range[1]&&ze.b<=q.baxis.range[0]&&ze.c>=q.caxis.range[1]&&ze.c<=q.caxis.range[0]},q.yaxis={type:"linear",range:[le,ue-ge-fe],domain:[H-U/2,H+U/2],_id:"y"},h(q.yaxis,q.graphDiv._fullLayout),q.yaxis.setScale(),q.yaxis.isPtWithinRange=function(){return!0};var me=q.yaxis.domain[0],_e=q.aaxis=m({},G.aaxis,{range:[le,ue-ge-fe],side:"left",tickangle:(+G.aaxis.tickangle||0)-30,domain:[me,me+U*O],anchor:"free",position:0,_id:"y",_length:Y});h(_e,q.graphDiv._fullLayout),_e.setScale();var we=q.baxis=m({},G.baxis,{range:[ue-le-fe,ge],side:"bottom",domain:q.xaxis.domain,anchor:"free",position:0,_id:"x",_length:Y});h(we,q.graphDiv._fullLayout),we.setScale();var Te=q.caxis=m({},G.caxis,{range:[ue-le-ge,fe],side:"right",tickangle:(+G.caxis.tickangle||0)+30,domain:[me,me+U*O],anchor:"free",position:0,_id:"y",_length:Y});h(Te,q.graphDiv._fullLayout),Te.setScale();var Oe="M"+K+","+(te+Z)+"h"+Y+"l-"+Y/2+",-"+Z+"Z";q.clipDef.select("path").attr("d",Oe),q.layers.plotbg.select("path").attr("d",Oe);var de="M0,"+Z+"h"+Y+"l-"+Y/2+",-"+Z+"Z";q.clipDefRelative.select("path").attr("d",de);var ye=i(K,te);q.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",ye),q.clipDefRelative.select("path").attr("transform",null);var Me=i(K-we._offset,te+Z);q.layers.baxis.attr("transform",Me),q.layers.bgrid.attr("transform",Me);var ke=i(K+Y/2,te)+"rotate(30)"+i(0,-_e._offset);q.layers.aaxis.attr("transform",ke),q.layers.agrid.attr("transform",ke);var Ee=i(K+Y/2,te)+"rotate(-30)"+i(0,-Te._offset);q.layers.caxis.attr("transform",Ee),q.layers.cgrid.attr("transform",Ee),q.drawAxes(!0),q.layers.aline.select("path").attr("d",_e.showline?"M"+K+","+(te+Z)+"l"+Y/2+",-"+Z:"M0,0").call(l.stroke,_e.linecolor||"#000").style("stroke-width",(_e.linewidth||0)+"px"),q.layers.bline.select("path").attr("d",we.showline?"M"+K+","+(te+Z)+"h"+Y:"M0,0").call(l.stroke,we.linecolor||"#000").style("stroke-width",(we.linewidth||0)+"px"),q.layers.cline.select("path").attr("d",Te.showline?"M"+(K+Y/2)+","+te+"l"+Y/2+","+Z:"M0,0").call(l.stroke,Te.linecolor||"#000").style("stroke-width",(Te.linewidth||0)+"px"),q.graphDiv._context.staticPlot||q.initInteractions(),d.setClipUrl(q.layers.frontplot,q._hasClipOnAxisFalse?null:q.clipId,q.graphDiv)},D.drawAxes=function(G){var W=this.graphDiv,K=this.id.substr(7)+"title",te=this.layers,Y=this.aaxis,Z=this.baxis,re=this.caxis;if(this.drawAx(Y),this.drawAx(Z),this.drawAx(re),G){var U=Math.max(Y.showticklabels?Y.tickfont.size/2:0,(re.showticklabels?.75*re.tickfont.size:0)+(re.ticks==="outside"?.87*re.ticklen:0)),q=(Z.showticklabels?Z.tickfont.size:0)+(Z.ticks==="outside"?Z.ticklen:0)+3;te["a-title"]=b.draw(W,"a"+K,{propContainer:Y,propName:this.id+".aaxis.title",placeholder:s(W,"Click to enter Component A title"),attributes:{x:this.x0+this.w/2,y:this.y0-Y.title.font.size/3-U,"text-anchor":"middle"}}),te["b-title"]=b.draw(W,"b"+K,{propContainer:Z,propName:this.id+".baxis.title",placeholder:s(W,"Click to enter Component B title"),attributes:{x:this.x0-q,y:this.y0+this.h+.83*Z.title.font.size+q,"text-anchor":"middle"}}),te["c-title"]=b.draw(W,"c"+K,{propContainer:re,propName:this.id+".caxis.title",placeholder:s(W,"Click to enter Component C title"),attributes:{x:this.x0+this.w+q,y:this.y0+this.h+.83*re.title.font.size+q,"text-anchor":"middle"}})}},D.drawAx=function(G){var W,K=this.graphDiv,te=G._name,Y=te.charAt(0),Z=G._id,re=this.layers[te],U=Y+"tickLayout",q=(W=G).ticks+String(W.ticklen)+String(W.showticklabels);this[U]!==q&&(re.selectAll("."+Z+"tick").remove(),this[U]=q),G.setScale();var $=p.calcTicks(G),ne=p.clipEnds(G,$),H=p.makeTransTickFn(G),Q=p.getTickSigns(G)[2],ee=c.deg2rad(30),ie=Q*(G.linewidth||1)/2,ae=Q*G.ticklen,ue=this.w,le=this.h,ge=Y==="b"?"M0,"+ie+"l"+Math.sin(ee)*ae+","+Math.cos(ee)*ae:"M"+ie+",0l"+Math.cos(ee)*ae+","+-Math.sin(ee)*ae,fe={a:"M0,0l"+le+",-"+ue/2,b:"M0,0l-"+ue/2+",-"+le,c:"M0,0l-"+le+","+ue/2}[Y];p.drawTicks(K,G,{vals:G.ticks==="inside"?ne:$,layer:re,path:ge,transFn:H,crisp:!1}),p.drawGrid(K,G,{vals:ne,layer:this.layers[Y+"grid"],path:fe,transFn:H,crisp:!1}),p.drawLabels(K,G,{vals:$,layer:re,transFn:H,labelFns:p.makeLabelFns(G,0,30)})};var R=S.MINZOOM/2+.87,z="m-0.87,.5h"+R+"v3h-"+(R+5.2)+"l"+(R/2+2.6)+",-"+(.87*R+4.5)+"l2.6,1.5l-"+R/2+","+.87*R+"Z",L="m0.87,.5h-"+R+"v3h"+(R+5.2)+"l-"+(R/2+2.6)+",-"+(.87*R+4.5)+"l-2.6,1.5l"+R/2+","+.87*R+"Z",P="m0,1l"+R/2+","+.87*R+"l2.6,-1.5l-"+(R/2+2.6)+",-"+(.87*R+4.5)+"l-"+(R/2+2.6)+","+(.87*R+4.5)+"l2.6,1.5l"+R/2+",-"+.87*R+"Z",N=!0;function B(G){r.select(G).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}D.clearSelect=function(){A(this.dragOptions),M(this.dragOptions.gd)},D.initInteractions=function(){var G,W,K,te,Y,Z,re,U,q,$,ne,H,Q=this,ee=Q.layers.plotbg.select("path").node(),ie=Q.graphDiv,ae=ie._fullLayout._zoomlayer;function ue(de){var ye={};return ye[Q.id+".aaxis.min"]=de.a,ye[Q.id+".baxis.min"]=de.b,ye[Q.id+".caxis.min"]=de.c,ye}function le(de,ye){var Me=ie._fullLayout.clickmode;B(ie),de===2&&(ie.emit("plotly_doubleclick",null),u.call("_guiRelayout",ie,ue({a:0,b:0,c:0}))),Me.indexOf("select")>-1&&de===1&&_(ye,ie,[Q.xaxis],[Q.yaxis],Q.id,Q.dragOptions),Me.indexOf("event")>-1&&y.click(ie,ye,Q.id)}function ge(de,ye){return 1-ye/Q.h}function fe(de,ye){return 1-(de+(Q.h-ye)/Math.sqrt(3))/Q.w}function me(de,ye){return(de-(Q.h-ye)/Math.sqrt(3))/Q.w}function _e(de,ye){var Me=K+de*G,ke=te+ye*W,Ee=Math.max(0,Math.min(1,ge(0,te),ge(0,ke))),ze=Math.max(0,Math.min(1,fe(K,te),fe(Me,ke))),Fe=Math.max(0,Math.min(1,me(K,te),me(Me,ke))),Ve=(Ee/2+Fe)*Q.w,Ke=(1-Ee/2-ze)*Q.w,Re=(Ve+Ke)/2,qe=Ke-Ve,We=(1-Ee)*Q.h,Ye=We-qe/O;qe.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),H.transition().style("opacity",1).duration(200),$=!0),ie.emit("plotly_relayouting",ue(re))}function we(){B(ie),re!==Y&&(u.call("_guiRelayout",ie,ue(re)),N&&ie.data&&ie._context.showTips&&(c.notifier(s(ie,"Double-click to zoom back out"),"long"),N=!1))}function Te(de,ye){var Me=de/Q.xaxis._m,ke=ye/Q.yaxis._m,Ee=[(re={a:Y.a-ke,b:Y.b+(Me+ke)/2,c:Y.c-(Me-ke)/2}).a,re.b,re.c].sort(c.sorterAsc),ze=Ee.indexOf(re.a),Fe=Ee.indexOf(re.b),Ve=Ee.indexOf(re.c);Ee[0]<0&&(Ee[1]+Ee[0]/2<0?(Ee[2]+=Ee[0]+Ee[1],Ee[0]=Ee[1]=0):(Ee[2]+=Ee[0]/2,Ee[1]+=Ee[0]/2,Ee[0]=0),re={a:Ee[ze],b:Ee[Fe],c:Ee[Ve]},ye=(Y.a-re.a)*Q.yaxis._m,de=(Y.c-re.c-Y.b+re.b)*Q.xaxis._m);var Ke=i(Q.x0+de,Q.y0+ye);Q.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",Ke);var Re=i(-de,-ye);Q.clipDefRelative.select("path").attr("transform",Re),Q.aaxis.range=[re.a,Q.sum-re.b-re.c],Q.baxis.range=[Q.sum-re.a-re.c,re.b],Q.caxis.range=[Q.sum-re.a-re.b,re.c],Q.drawAxes(!1),Q._hasClipOnAxisFalse&&Q.plotContainer.select(".scatterlayer").selectAll(".trace").call(d.hideOutsideRangePoints,Q),ie.emit("plotly_relayouting",ue(re))}function Oe(){u.call("_guiRelayout",ie,ue(re))}this.dragOptions={element:ee,gd:ie,plotinfo:{id:Q.id,domain:ie._fullLayout[Q.id].domain,xaxis:Q.xaxis,yaxis:Q.yaxis},subplot:Q.id,prepFn:function(de,ye,Me){Q.dragOptions.xaxes=[Q.xaxis],Q.dragOptions.yaxes=[Q.yaxis],G=ie._fullLayout._invScaleX,W=ie._fullLayout._invScaleY;var ke=Q.dragOptions.dragmode=ie._fullLayout.dragmode;w(ke)?Q.dragOptions.minDrag=1:Q.dragOptions.minDrag=void 0,ke==="zoom"?(Q.dragOptions.moveFn=_e,Q.dragOptions.clickFn=le,Q.dragOptions.doneFn=we,function(Ee,ze,Fe){var Ve=ee.getBoundingClientRect();K=ze-Ve.left,te=Fe-Ve.top,ie._fullLayout._calcInverseTransform(ie);var Ke=ie._fullLayout._invTransform,Re=c.apply3DTransform(Ke)(K,te);K=Re[0],te=Re[1],Y={a:Q.aaxis.range[0],b:Q.baxis.range[1],c:Q.caxis.range[1]},re=Y,Z=Q.aaxis.range[1]-Y.a,U=a(Q.graphDiv._fullLayout[Q.id].bgcolor).getLuminance(),q="M0,"+Q.h+"L"+Q.w/2+", 0L"+Q.w+","+Q.h+"Z",$=!1,ne=ae.append("path").attr("class","zoombox").attr("transform",i(Q.x0,Q.y0)).style({fill:U>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",q),H=ae.append("path").attr("class","zoombox-corners").attr("transform",i(Q.x0,Q.y0)).style({fill:l.background,stroke:l.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),Q.clearSelect(ie)}(0,ye,Me)):ke==="pan"?(Q.dragOptions.moveFn=Te,Q.dragOptions.clickFn=le,Q.dragOptions.doneFn=Oe,Y={a:Q.aaxis.range[0],b:Q.baxis.range[1],c:Q.caxis.range[1]},re=Y,Q.clearSelect(ie)):(k(ke)||w(ke))&&T(de,ye,Me,Q.dragOptions,ke)}},ee.onmousemove=function(de){y.hover(ie,de,Q.id),ie._fullLayout._lasthover=ee,ie._fullLayout._hoversubplot=Q.id},ee.onmouseout=function(de){ie._dragging||v.unhover(ie,de)},v.init(this.dragOptions)}},{"../../components/color":366,"../../components/dragelement":385,"../../components/dragelement/helpers":384,"../../components/drawing":388,"../../components/fx":406,"../../components/titles":464,"../../lib":503,"../../lib/extend":493,"../../registry":638,"../cartesian/axes":554,"../cartesian/constants":561,"../cartesian/select":575,"../cartesian/set_convert":576,"../plots":619,"@plotly/d3":58,tinycolor2:312}],638:[function(e,o,f){var r=e("./lib/loggers"),a=e("./lib/noop"),u=e("./lib/push_unique"),c=e("./lib/is_plain_object"),i=e("./lib/dom").addStyleRule,s=e("./lib/extend"),l=e("./plots/attributes"),d=e("./plots/layout_attributes"),h=s.extendFlat,m=s.extendDeepAll;function g(_){var M=_.name,A=_.categories,S=_.meta;if(f.modules[M])r.log("Type "+M+" already registered");else{f.subplotsRegistry[_.basePlotModule.name]||function(N){var B=N.name;if(f.subplotsRegistry[B])return void r.log("Plot type "+B+" already registered.");for(var G in x(N),f.subplotsRegistry[B]=N,f.componentsRegistry)b(G,N.name)}(_.basePlotModule);for(var E={},D=0;D-1&&(v[x[d]].title={text:""});for(d=0;d")!==-1?"":E.html(O).text()});return E.remove(),D}(A),A=(A=A.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")).replace(l,"'"),a.isIE()&&(A=(A=(A=A.replace(/"/gi,"'")).replace(/(\('#)([^']*)('\))/gi,'("#$2")')).replace(/(\\')/gi,'"')),A}},{"../components/color":366,"../components/drawing":388,"../constants/xmlns_namespaces":480,"../lib":503,"@plotly/d3":58}],647:[function(e,o,f){var r=e("../../lib");o.exports=function(a,u){for(var c=0;cO+E||!r(D))}for(var z=0;zd))return i}return s!==void 0?s:c.dflt},f.coerceColor=function(c,i,s){return a(i).isValid()?i:s!==void 0?s:c.dflt},f.coerceEnumerated=function(c,i,s){return c.coerceNumber&&(i=+i),c.values.indexOf(i)!==-1?i:s!==void 0?s:c.dflt},f.getValue=function(c,i){var s;return Array.isArray(c)?i0?ue+=le:w<0&&(ue-=le)}return ue}function U(ae){var ue=w,le=ae.b,ge=re(ae);return r.inbox(le-ue,ge-ue,R+(ge-ue)/(ge-le)-1)}var q=m[k+"a"],$=m[b+"a"];M=Math.abs(q.r2c(q.range[1])-q.r2c(q.range[0]));var ne=r.getDistanceFunction(v,T,_,function(ae){return(T(ae)+_(ae))/2});if(r.getClosest(A,ne,m),m.index!==!1&&A[m.index].p!==l){P||(K=function(ae){return Math.min(N(ae),ae.p-E.bargroupwidth/2)},te=function(ae){return Math.max(B(ae),ae.p+E.bargroupwidth/2)});var H=A[m.index],Q=S.base?H.b+H.s:H.s;m[b+"0"]=m[b+"1"]=$.c2p(H[b],!0),m[b+"LabelVal"]=Q;var ee=E.extents[E.extents.round(H.p)];m[k+"0"]=q.c2p(D?K(H):ee[0],!0),m[k+"1"]=q.c2p(D?te(H):ee[1],!0);var ie=H.orig_p!==void 0;return m[k+"LabelVal"]=ie?H.orig_p:H.p,m.labelLabel=s(q,m[k+"LabelVal"],S[k+"hoverformat"]),m.valueLabel=s($,m[b+"LabelVal"],S[b+"hoverformat"]),m.baseLabel=s($,H.b,S[b+"hoverformat"]),m.spikeDistance=(function(ae){var ue=w,le=ae.b,ge=re(ae);return r.inbox(le-ue,ge-ue,z+(ge-ue)/(ge-le)-1)}(H)+function(ae){return Y(N(ae),B(ae),z)}(H))/2,m[k+"Spike"]=q.c2p(H.p,!0),c(H,S,m),m.hovertemplate=S.hovertemplate,m}}function h(m,g){var p=g.mcc||m.marker.color,v=g.mlcc||m.marker.line.color,y=i(m,g);return u.opacity(p)?p:u.opacity(v)&&y?v:void 0}o.exports={hoverPoints:function(m,g,p,v,y){var x=d(m,g,p,v,y);if(x){var w=x.cd,k=w[0].trace,b=w[x.index];return x.color=h(k,b),a.getComponentMethod("errorbars","hoverInfo")(b,k,x),[x]}},hoverOnBars:d,getTraceColor:h}},{"../../components/color":366,"../../components/fx":406,"../../constants/numerical":479,"../../lib":503,"../../plots/cartesian/axes":554,"../../registry":638,"./helpers":654}],656:[function(e,o,f){o.exports={attributes:e("./attributes"),layoutAttributes:e("./layout_attributes"),supplyDefaults:e("./defaults").supplyDefaults,crossTraceDefaults:e("./defaults").crossTraceDefaults,supplyLayoutDefaults:e("./layout_defaults"),calc:e("./calc"),crossTraceCalc:e("./cross_trace_calc").crossTraceCalc,colorbar:e("../scatter/marker_colorbar"),arraysToCalcdata:e("./arrays_to_calcdata"),plot:e("./plot").plot,style:e("./style").style,styleOnSelect:e("./style").styleOnSelect,hoverPoints:e("./hover").hoverPoints,eventData:e("./event_data"),selectPoints:e("./select"),moduleType:"trace",name:"bar",basePlotModule:e("../../plots/cartesian"),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}},{"../../plots/cartesian":568,"../scatter/marker_colorbar":945,"./arrays_to_calcdata":647,"./attributes":648,"./calc":649,"./cross_trace_calc":651,"./defaults":652,"./event_data":653,"./hover":655,"./layout_attributes":657,"./layout_defaults":658,"./plot":659,"./select":660,"./style":662}],657:[function(e,o,f){o.exports={barmode:{valType:"enumerated",values:["stack","group","overlay","relative"],dflt:"group",editType:"calc"},barnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},bargap:{valType:"number",min:0,max:1,editType:"calc"},bargroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}},{}],658:[function(e,o,f){var r=e("../../registry"),a=e("../../plots/cartesian/axes"),u=e("../../lib"),c=e("./layout_attributes");o.exports=function(i,s,l){function d(k,b){return u.coerce(i,s,c,k,b)}for(var h=!1,m=!1,g=!1,p={},v=d("barmode"),y=0;y0}function D(z){return z==="auto"?0:z}function O(z,L){var P=Math.PI/180*L,N=Math.abs(Math.sin(P)),B=Math.abs(Math.cos(P));return{x:z.width*B+z.height*N,y:z.width*N+z.height*B}}function R(z,L,P,N,B,G){var W=!!G.isHorizontal,K=!!G.constrained,te=G.angle||0,Y=G.anchor||"end",Z=Y==="end",re=Y==="start",U=((G.leftToRight||0)+1)/2,q=1-U,$=B.width,ne=B.height,H=Math.abs(L-z),Q=Math.abs(N-P),ee=H>2*T&&Q>2*T?T:0;H-=2*ee,Q-=2*ee;var ie=D(te);te!=="auto"||$<=H&&ne<=Q||!($>H||ne>Q)||($>Q||ne>H)&&$.01?ze:function(Re,qe,We){return We&&Re===qe?Re:Math.abs(Re-qe)>=2?ze(Re):Re>qe?Math.ceil(Re):Math.floor(Re)};Oe=Fe(Oe,de,Q),de=Fe(de,Oe,Q),ye=Fe(ye,Me,!Q),Me=Fe(Me,ye,!Q)}var Ve=S(u.ensureSingle(we,"path"),te,B,G);if(Ve.style("vector-effect","non-scaling-stroke").attr("d",isNaN((de-Oe)*(Me-ye))||ke&&z._context.staticPlot?"M0,0Z":"M"+Oe+","+ye+"V"+Me+"H"+de+"V"+ye+"Z").call(s.setClipUrl,L.layerClipId,z),!te.uniformtext.mode&&ee){var Ke=s.makePointStyleFns(U);s.singlePointStyle(ge,Ve,U,Ke,z)}(function(Re,qe,We,Ye,nt,ft,vt,Pt,At,at,et){var Ot,Wt=qe.xaxis,Jt=qe.yaxis,Be=Re._fullLayout;function Ge(Kt,Ht,mn){return u.ensureSingle(Kt,"text").text(Ht).attr({class:"bartext bartext-"+Ot,"text-anchor":"middle","data-notex":1}).call(s.font,mn).call(c.convertToTspans,Re)}var Tt=Ye[0].trace,dt=Tt.orientation==="h",Pe=function(Kt,Ht,mn,zn,pn){var tn,nn=Ht[0].trace;return tn=nn.texttemplate?function(sn,gn,bn,In,Hn){var Wn=gn[0].trace,ar=u.castOption(Wn,bn,"texttemplate");if(!ar)return"";var Or,vr,Er,Kn,Ln=Wn.type==="histogram",lr=Wn.type==="waterfall",Wr=Wn.type==="funnel",Mn=Wn.orientation==="h";Mn?(Or="y",vr=Hn,Er="x",Kn=In):(Or="x",vr=In,Er="y",Kn=Hn);function rr(_i){return d(Kn,Kn.c2l(_i),!0).text}var nr=gn[bn],Bn={};Bn.label=nr.p,Bn.labelLabel=Bn[Or+"Label"]=(Fr=nr.p,d(vr,vr.c2l(Fr),!0).text);var Fr,$r=u.castOption(Wn,nr.i,"text");($r===0||$r)&&(Bn.text=$r),Bn.value=nr.s,Bn.valueLabel=Bn[Er+"Label"]=rr(nr.s);var pr={};b(pr,Wn,nr.i),(Ln||pr.x===void 0)&&(pr.x=Mn?Bn.value:Bn.label),(Ln||pr.y===void 0)&&(pr.y=Mn?Bn.label:Bn.value),(Ln||pr.xLabel===void 0)&&(pr.xLabel=Mn?Bn.valueLabel:Bn.labelLabel),(Ln||pr.yLabel===void 0)&&(pr.yLabel=Mn?Bn.labelLabel:Bn.valueLabel),lr&&(Bn.delta=+nr.rawS||nr.s,Bn.deltaLabel=rr(Bn.delta),Bn.final=nr.v,Bn.finalLabel=rr(Bn.final),Bn.initial=Bn.final-Bn.delta,Bn.initialLabel=rr(Bn.initial)),Wr&&(Bn.value=nr.s,Bn.valueLabel=rr(Bn.value),Bn.percentInitial=nr.begR,Bn.percentInitialLabel=u.formatPercent(nr.begR),Bn.percentPrevious=nr.difR,Bn.percentPreviousLabel=u.formatPercent(nr.difR),Bn.percentTotal=nr.sumR,Bn.percenTotalLabel=u.formatPercent(nr.sumR));var qr=u.castOption(Wn,nr.i,"customdata");return qr&&(Bn.customdata=qr),u.texttemplateString(ar,Bn,sn._d3locale,pr,Bn,Wn._meta||{})}(Kt,Ht,mn,zn,pn):nn.textinfo?function(sn,gn,bn,In){var Hn=sn[0].trace,Wn=Hn.orientation==="h",ar=Hn.type==="waterfall",Or=Hn.type==="funnel";function vr(qr){return d(Wn?bn:In,+qr,!0).text}var Er,Kn=Hn.textinfo,Ln=sn[gn],lr=Kn.split("+"),Wr=[],Mn=function(qr){return lr.indexOf(qr)!==-1};Mn("label")&&Wr.push((rr=sn[gn].p,d(Wn?In:bn,rr,!0).text));var rr;if(Mn("text")&&((Er=u.castOption(Hn,Ln.i,"text"))===0||Er)&&Wr.push(Er),ar){var nr=+Ln.rawS||Ln.s,Bn=Ln.v,Fr=Bn-nr;Mn("initial")&&Wr.push(vr(Fr)),Mn("delta")&&Wr.push(vr(nr)),Mn("final")&&Wr.push(vr(Bn))}if(Or){Mn("value")&&Wr.push(vr(Ln.s));var $r=0;Mn("percent initial")&&$r++,Mn("percent previous")&&$r++,Mn("percent total")&&$r++;var pr=$r>1;Mn("percent initial")&&(Er=u.formatPercent(Ln.begR),pr&&(Er+=" of initial"),Wr.push(Er)),Mn("percent previous")&&(Er=u.formatPercent(Ln.difR),pr&&(Er+=" of previous"),Wr.push(Er)),Mn("percent total")&&(Er=u.formatPercent(Ln.sumR),pr&&(Er+=" of total"),Wr.push(Er))}return Wr.join("
")}(Ht,mn,zn,pn):v.getValue(nn.text,mn),v.coerceString(w,tn)}(Be,Ye,nt,Wt,Jt);Ot=function(Kt,Ht){var mn=v.getValue(Kt.textposition,Ht);return v.coerceEnumerated(k,mn)}(Tt,nt);var Ie=at.mode==="stack"||at.mode==="relative",Ae=Ye[nt],De=!Ie||Ae._outmost;if(!Pe||Ot==="none"||(Ae.isBlank||ft===vt||Pt===At)&&(Ot==="auto"||Ot==="inside"))return void We.select("text").remove();var He=Be.font,rt=p.getBarColor(Ye[nt],Tt),lt=p.getInsideTextFont(Tt,nt,He,rt),ot=p.getOutsideTextFont(Tt,nt,He),kt=We.datum();dt?Wt.type==="log"&&kt.s0<=0&&(ft=Wt.range[0]=Ut*(St/tt):St>=tt*(zt/Ut);Ut>0&&tt>0&&(Dt||Le||Je)?Ot="inside":(Ot="outside",wt.remove(),wt=null)}else Ot="inside";if(!wt){bt=u.ensureUniformFontSize(Re,Ot==="outside"?ot:lt);var st=(wt=Ge(We,Pe,bt)).attr("transform");if(wt.attr("transform",""),Vt=s.bBox(wt.node()),Ut=Vt.width,tt=Vt.height,wt.attr("transform",st),Ut<=0||tt<=0)return void wt.remove()}var Et,It,Zt=Tt.textangle;Ot==="outside"?(It=Tt.constraintext==="both"||Tt.constraintext==="outside",Et=function(Kt,Ht,mn,zn,pn,tn){var nn,sn=!!tn.isHorizontal,gn=!!tn.constrained,bn=tn.angle||0,In=pn.width,Hn=pn.height,Wn=Math.abs(Ht-Kt),ar=Math.abs(zn-mn);nn=sn?ar>2*T?T:0:Wn>2*T?T:0;var Or=1;gn&&(Or=sn?Math.min(1,ar/Hn):Math.min(1,Wn/In));var vr=D(bn),Er=O(pn,vr),Kn=(sn?Er.x:Er.y)/2,Ln=(pn.left+pn.right)/2,lr=(pn.top+pn.bottom)/2,Wr=(Kt+Ht)/2,Mn=(mn+zn)/2,rr=0,nr=0,Bn=sn?A(Ht,Kt):A(mn,zn);return sn?(Wr=Ht-Bn*nn,rr=Bn*Kn):(Mn=zn+Bn*nn,nr=-Bn*Kn),{textX:Ln,textY:lr,targetX:Wr,targetY:Mn,anchorX:rr,anchorY:nr,scale:Or,rotate:vr}}(ft,vt,Pt,At,Vt,{isHorizontal:dt,constrained:It,angle:Zt})):(It=Tt.constraintext==="both"||Tt.constraintext==="inside",Et=R(ft,vt,Pt,At,Vt,{isHorizontal:dt,constrained:It,angle:Zt,anchor:Tt.insidetextanchor})),Et.fontSize=bt.size,m(Tt.type==="histogram"?"bar":Tt.type,Et,Be),Ae.transform=Et,S(wt,Be,at,et).attr("transform",u.getTextTransform(Et))})(z,L,we,Z,fe,Oe,de,ye,Me,B,G),L.layerClipId&&s.hideOutsideRangePoint(ge,we.select("text"),W,K,U.xcalendar,U.ycalendar)});var le=U.cliponaxis===!1;s.setClipUrl(re,le?null:L.layerClipId,z)});l.getComponentMethod("errorbars","plot")(z,Y,L,B)},toMoveInsideBar:R}},{"../../components/color":366,"../../components/drawing":388,"../../components/fx/helpers":402,"../../lib":503,"../../lib/svg_text_utils":529,"../../plots/cartesian/axes":554,"../../registry":638,"./attributes":648,"./constants":650,"./helpers":654,"./style":662,"./uniform_text":664,"@plotly/d3":58,"fast-isnumeric":190}],660:[function(e,o,f){function r(a,u,c,i,s){var l=u.c2p(i?a.s0:a.p0,!0),d=u.c2p(i?a.s1:a.p1,!0),h=c.c2p(i?a.p0:a.s0,!0),m=c.c2p(i?a.p1:a.s1,!0);return s?[(l+d)/2,(h+m)/2]:i?[d,(h+m)/2]:[(l+d)/2,m]}o.exports=function(a,u){var c,i=a.cd,s=a.xaxis,l=a.yaxis,d=i[0].trace,h=d.type==="funnel",m=d.orientation==="h",g=[];if(u===!1)for(c=0;c1||S.bargap===0&&S.bargroupgap===0&&!E[0].trace.marker.line.width)&&r.select(this).attr("shape-rendering","crispEdges")}),M.selectAll("g.points").each(function(E){p(r.select(this),E[0].trace,_)}),i.getComponentMethod("errorbars","style")(M)},styleTextPoints:v,styleOnSelect:function(_,M,A){var S=M[0].trace;S.selectedpoints?function(E,D,O){u.selectedPointStyle(E.selectAll("path"),D),function(R,z,L){R.each(function(P){var N,B=r.select(this);if(P.selected){N=c.ensureUniformFontSize(L,y(B,P,z,L));var G=z.selected.textfont&&z.selected.textfont.color;G&&(N.color=G),u.font(B,N)}else u.selectedTextStyle(B,z)})}(E.selectAll("text"),D,O)}(A,S,_):(p(A,S,_),i.getComponentMethod("errorbars","style")(A))},getInsideTextFont:w,getOutsideTextFont:k,getBarColor:T,resizeText:s}},{"../../components/color":366,"../../components/drawing":388,"../../lib":503,"../../registry":638,"./attributes":648,"./helpers":654,"./uniform_text":664,"@plotly/d3":58}],663:[function(e,o,f){var r=e("../../components/color"),a=e("../../components/colorscale/helpers").hasColorscale,u=e("../../components/colorscale/defaults"),c=e("../../lib").coercePattern;o.exports=function(i,s,l,d,h){var m=l("marker.color",d),g=a(i,"marker");g&&u(i,s,h,l,{prefix:"marker.",cLetter:"c"}),l("marker.line.color",r.defaultLine),a(i,"marker.line")&&u(i,s,h,l,{prefix:"marker.line.",cLetter:"c"}),l("marker.line.width"),l("marker.opacity"),c(l,"marker.pattern",m,g),l("selected.marker.color"),l("unselected.marker.color")}},{"../../components/color":366,"../../components/colorscale/defaults":376,"../../components/colorscale/helpers":377,"../../lib":503}],664:[function(e,o,f){var r=e("@plotly/d3"),a=e("../../lib");function u(c){return"_"+c+"Text_minsize"}o.exports={recordMinTextSize:function(c,i,s){if(s.uniformtext.mode){var l=u(c),d=s.uniformtext.minsize,h=i.scale*i.fontSize;i.hide=hv.range[1]&&(_+=Math.PI),r.getClosest(m,function(S){return w(T,_,[S.rp0,S.rp1],[S.thetag0,S.thetag1],x)?k+Math.min(1,Math.abs(S.thetag1-S.thetag0)/b)-1+(S.rp1-T)/(S.rp1-S.rp0)-1:1/0},l),l.index!==!1){var M=m[l.index];l.x0=l.x1=M.ct[0],l.y0=l.y1=M.ct[1];var A=a.extendFlat({},M,{r:M.s,theta:M.p});return c(M,g,l),i(A,g,p,l),l.hovertemplate=g.hovertemplate,l.color=u(g,M),l.xLabelVal=l.yLabelVal=void 0,M.s<0&&(l.idealAlign="left"),[l]}}},{"../../components/fx":406,"../../lib":503,"../../plots/polar/helpers":621,"../bar/hover":655,"../scatterpolar/hover":1006}],669:[function(e,o,f){o.exports={moduleType:"trace",name:"barpolar",basePlotModule:e("../../plots/polar"),categories:["polar","bar","showLegend"],attributes:e("./attributes"),layoutAttributes:e("./layout_attributes"),supplyDefaults:e("./defaults"),supplyLayoutDefaults:e("./layout_defaults"),calc:e("./calc").calc,crossTraceCalc:e("./calc").crossTraceCalc,plot:e("./plot"),colorbar:e("../scatter/marker_colorbar"),formatLabels:e("../scatterpolar/format_labels"),style:e("../bar/style").style,styleOnSelect:e("../bar/style").styleOnSelect,hoverPoints:e("./hover"),selectPoints:e("../bar/select"),meta:{}}},{"../../plots/polar":622,"../bar/select":660,"../bar/style":662,"../scatter/marker_colorbar":945,"../scatterpolar/format_labels":1005,"./attributes":665,"./calc":666,"./defaults":667,"./hover":668,"./layout_attributes":670,"./layout_defaults":671,"./plot":672}],670:[function(e,o,f){o.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}},{}],671:[function(e,o,f){var r=e("../../lib"),a=e("./layout_attributes");o.exports=function(u,c,i){var s,l={};function d(g,p){return r.coerce(u[s]||{},c[s],a,g,p)}for(var h=0;h0?(A=_,S=M):(A=M,S=_);var E=[i.findEnclosingVertexAngles(A,x.vangles)[0],(A+S)/2,i.findEnclosingVertexAngles(S,x.vangles)[1]];return i.pathPolygonAnnulus(b,T,A,S,E,w,k)}:function(b,T,_,M){return u.pathAnnulus(b,T,_,M,w,k)}}(l),y=l.layers.frontplot.select("g.barlayer");u.makeTraceGroups(y,d,"trace bars").each(function(){var x=r.select(this),w=u.ensureSingle(x,"g","points").selectAll("g.point").data(u.identity);w.enter().append("g").style("vector-effect","non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),w.exit().remove(),w.each(function(k){var b,T=r.select(this),_=k.rp0=g.c2p(k.s0),M=k.rp1=g.c2p(k.s1),A=k.thetag0=p.c2g(k.p0),S=k.thetag1=p.c2g(k.p1);if(a(_)&&a(M)&&a(A)&&a(S)&&_!==M&&A!==S){var E=g.c2g(k.s1),D=(A+S)/2;k.ct=[h.c2p(E*Math.cos(D)),m.c2p(E*Math.sin(D))],b=v(_,M,A,S)}else b="M0,0Z";u.ensureSingle(T,"path").attr("d",b)}),c.setClipUrl(x,l._hasClipOnAxisFalse?l.clipIds.forTraces:null,s)})}},{"../../components/drawing":388,"../../lib":503,"../../plots/polar/helpers":621,"@plotly/d3":58,"fast-isnumeric":190}],673:[function(e,o,f){var r=e("../scatter/attributes"),a=e("../bar/attributes"),u=e("../../components/color/attributes"),c=e("../../plots/cartesian/axis_format_attributes").axisHoverFormat,i=e("../../plots/template_attributes").hovertemplateAttrs,s=e("../../lib/extend").extendFlat,l=r.marker,d=l.line;o.exports={y:{valType:"data_array",editType:"calc+clearAxisTypes"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},x0:{valType:"any",editType:"calc+clearAxisTypes"},y0:{valType:"any",editType:"calc+clearAxisTypes"},dx:{valType:"number",editType:"calc"},dy:{valType:"number",editType:"calc"},xperiod:r.xperiod,yperiod:r.yperiod,xperiod0:r.xperiod0,yperiod0:r.yperiod0,xperiodalignment:r.xperiodalignment,yperiodalignment:r.yperiodalignment,xhoverformat:c("x"),yhoverformat:c("y"),name:{valType:"string",editType:"calc+clearAxisTypes"},q1:{valType:"data_array",editType:"calc+clearAxisTypes"},median:{valType:"data_array",editType:"calc+clearAxisTypes"},q3:{valType:"data_array",editType:"calc+clearAxisTypes"},lowerfence:{valType:"data_array",editType:"calc"},upperfence:{valType:"data_array",editType:"calc"},notched:{valType:"boolean",editType:"calc"},notchwidth:{valType:"number",min:0,max:.5,dflt:.25,editType:"calc"},notchspan:{valType:"data_array",editType:"calc"},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],editType:"calc"},jitter:{valType:"number",min:0,max:1,editType:"calc"},pointpos:{valType:"number",min:-2,max:2,editType:"calc"},boxmean:{valType:"enumerated",values:[!0,"sd",!1],editType:"calc"},mean:{valType:"data_array",editType:"calc"},sd:{valType:"data_array",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},quartilemethod:{valType:"enumerated",values:["linear","exclusive","inclusive"],dflt:"linear",editType:"calc"},width:{valType:"number",min:0,dflt:0,editType:"calc"},marker:{outliercolor:{valType:"color",dflt:"rgba(0, 0, 0, 0)",editType:"style"},symbol:s({},l.symbol,{arrayOk:!1,editType:"plot"}),opacity:s({},l.opacity,{arrayOk:!1,dflt:1,editType:"style"}),size:s({},l.size,{arrayOk:!1,editType:"calc"}),color:s({},l.color,{arrayOk:!1,editType:"style"}),line:{color:s({},d.color,{arrayOk:!1,dflt:u.defaultLine,editType:"style"}),width:s({},d.width,{arrayOk:!1,dflt:0,editType:"style"}),outliercolor:{valType:"color",editType:"style"},outlierwidth:{valType:"number",min:0,dflt:1,editType:"style"},editType:"style"},editType:"plot"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,dflt:2,editType:"style"},editType:"plot"},fillcolor:r.fillcolor,whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},offsetgroup:a.offsetgroup,alignmentgroup:a.alignmentgroup,selected:{marker:r.selected.marker,editType:"style"},unselected:{marker:r.unselected.marker,editType:"style"},text:s({},r.text,{}),hovertext:s({},r.hovertext,{}),hovertemplate:i({}),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"}}},{"../../components/color/attributes":365,"../../lib/extend":493,"../../plots/cartesian/axis_format_attributes":557,"../../plots/template_attributes":633,"../bar/attributes":648,"../scatter/attributes":927}],674:[function(e,o,f){var r=e("fast-isnumeric"),a=e("../../plots/cartesian/axes"),u=e("../../plots/cartesian/align_period"),c=e("../../lib"),i=e("../../constants/numerical").BADNUM,s=c._;o.exports=function(w,k){var b,T,_,M,A,S,E,D=w._fullLayout,O=a.getFromId(w,k.xaxis||"x"),R=a.getFromId(w,k.yaxis||"y"),z=[],L=k.type==="violin"?"_numViolins":"_numBoxes";k.orientation==="h"?(_=O,M="x",A=R,S="y",E=!!k.yperiodalignment):(_=R,M="y",A=O,S="x",E=!!k.xperiodalignment);var P,N,B,G,W,K,te=function(We,Ye,nt,ft){var vt,Pt=Ye+"0"in We,At="d"+Ye in We;if(Ye in We||Pt&&At){var at=nt.makeCalcdata(We,Ye);return[u(We,nt,Ye,at).vals,at]}vt=Pt?We[Ye+"0"]:"name"in We&&(nt.type==="category"||r(We.name)&&["linear","log"].indexOf(nt.type)!==-1||c.isDateTime(We.name)&&nt.type==="date")?We.name:ft;for(var et=nt.type==="multicategory"?nt.r2c_just_indices(vt):nt.d2c(vt,0,We[Ye+"calendar"]),Ot=We._length,Wt=new Array(Ot),Jt=0;JtP.uf};if(k._hasPreCompStats){var ne=k[M],H=function(We){return _.d2c((k[We]||[])[b])},Q=1/0,ee=-1/0;for(b=0;b=P.q1&&P.q3>=P.med){var ae=H("lowerfence");P.lf=ae!==i&&ae<=P.q1?ae:g(P,B,G);var ue=H("upperfence");P.uf=ue!==i&&ue>=P.q3?ue:p(P,B,G);var le=H("mean");P.mean=le!==i?le:G?c.mean(B,G):(P.q1+P.q3)/2;var ge=H("sd");P.sd=le!==i&&ge>=0?ge:G?c.stdev(B,G,P.mean):P.q3-P.q1,P.lo=v(P),P.uo=y(P);var fe=H("notchspan");fe=fe!==i&&fe>0?fe:x(P,G),P.ln=P.med-fe,P.un=P.med+fe;var me=P.lf,_e=P.uf;k.boxpoints&&B.length&&(me=Math.min(me,B[0]),_e=Math.max(_e,B[G-1])),k.notched&&(me=Math.min(me,P.ln),_e=Math.max(_e,P.un)),P.min=me,P.max=_e}else{var we;c.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+P.q1,"median = "+P.med,"q3 = "+P.q3].join(` +`)),we=P.med!==i?P.med:P.q1!==i?P.q3!==i?(P.q1+P.q3)/2:P.q1:P.q3!==i?P.q3:0,P.med=we,P.q1=P.q3=we,P.lf=P.uf=we,P.mean=P.sd=we,P.ln=P.un=we,P.min=P.max=we}Q=Math.min(Q,P.min),ee=Math.max(ee,P.max),P.pts2=N.filter($),z.push(P)}}k._extremes[_._id]=a.findExtremes(_,[Q,ee],{padded:!0})}else{var Te=_.makeCalcdata(k,M),Oe=function(We,Ye){for(var nt=We.length,ft=new Array(nt+1),vt=0;vt=0&&Me0){var Ke,Re;(P={}).pos=P[S]=U[b],N=P.pts=ye[b].sort(h),G=(B=P[M]=N.map(m)).length,P.min=B[0],P.max=B[G-1],P.mean=c.mean(B,G),P.sd=c.stdev(B,G,P.mean),P.med=c.interp(B,.5),G%2&&(Fe||Ve)?(Fe?(Ke=B.slice(0,G/2),Re=B.slice(G/2+1)):Ve&&(Ke=B.slice(0,G/2+1),Re=B.slice(G/2)),P.q1=c.interp(Ke,.5),P.q3=c.interp(Re,.5)):(P.q1=c.interp(B,.25),P.q3=c.interp(B,.75)),P.lf=g(P,B,G),P.uf=p(P,B,G),P.lo=v(P),P.uo=y(P);var qe=x(P,G);P.ln=P.med-qe,P.un=P.med+qe,ke=Math.min(ke,P.ln),Ee=Math.max(Ee,P.un),P.pts2=N.filter($),z.push(P)}k._extremes[_._id]=a.findExtremes(_,k.notched?Te.concat([ke,Ee]):Te,{padded:!0})}return function(We,Ye){if(c.isArrayOrTypedArray(Ye.selectedpoints))for(var nt=0;nt0?(z[0].t={num:D[L],dPos:q,posLetter:S,valLetter:M,labels:{med:s(w,"median:"),min:s(w,"min:"),q1:s(w,"q1:"),q3:s(w,"q3:"),max:s(w,"max:"),mean:k.boxmean==="sd"?s(w,"mean \xB1 \u03C3:"):s(w,"mean:"),lf:s(w,"lower fence:"),uf:s(w,"upper fence:")}},D[L]++,z):[{t:{empty:!0}}]};var l={text:"tx",hovertext:"htx"};function d(w,k,b){for(var T in l)c.isArrayOrTypedArray(k[T])&&(Array.isArray(b)?c.isArrayOrTypedArray(k[T][b[0]])&&(w[l[T]]=k[T][b[0]][b[1]]):w[l[T]]=k[T][b])}function h(w,k){return w.v-k.v}function m(w){return w.v}function g(w,k,b){return b===0?w.q1:Math.min(w.q1,k[Math.min(c.findBin(2.5*w.q1-1.5*w.q3,k,!0)+1,b-1)])}function p(w,k,b){return b===0?w.q3:Math.max(w.q3,k[Math.max(c.findBin(2.5*w.q3-1.5*w.q1,k),0)])}function v(w){return 4*w.q1-3*w.q3}function y(w){return 4*w.q3-3*w.q1}function x(w,k){return k===0?0:1.57*(w.q3-w.q1)/Math.sqrt(k)}},{"../../constants/numerical":479,"../../lib":503,"../../plots/cartesian/align_period":551,"../../plots/cartesian/axes":554,"fast-isnumeric":190}],675:[function(e,o,f){var r=e("../../plots/cartesian/axes"),a=e("../../lib"),u=e("../../plots/cartesian/constraints").getAxisGroup,c=["v","h"];function i(s,l,d,h){var m,g,p,v=l.calcdata,y=l._fullLayout,x=h._id,w=x.charAt(0),k=[],b=0;for(m=0;m1,S=1-y[s+"gap"],E=1-y[s+"groupgap"];for(m=0;m0){var ie=N.pointpos,ae=N.jitter,ue=N.marker.size/2,le=0;ie+ae>=0&&((le=Q*(ie+ae))>L?(ee=!0,ne=ue,q=le):le>re&&(ne=ue,q=L)),le<=L&&(q=L);var ge=0;ie-ae<=0&&((ge=-Q*(ie-ae))>P?(ee=!0,H=ue,$=ge):ge>U&&(H=ue,$=P)),ge<=P&&($=P)}else q=L,$=P;var fe=new Array(p.length);for(g=0;g0?(A="v",S=D>0?Math.min(R,O):Math.min(O)):D>0?(A="h",S=Math.min(R)):S=0;if(S){g._length=S;var G=p("orientation",A);g._hasPreCompStats?G==="v"&&D===0?(p("x0",0),p("dx",1)):G==="h"&&E===0&&(p("y0",0),p("dy",1)):G==="v"&&D===0?p("x0"):G==="h"&&E===0&&p("y0"),a.getComponentMethod("calendars","handleTraceDefaults")(m,g,["x","y"],v)}else g.visible=!1}function h(m,g,p,v){var y=v.prefix,x=r.coerce2(m,g,l,"marker.outliercolor"),w=p("marker.line.outliercolor"),k="outliers";g._hasPreCompStats?k="all":(x||w)&&(k="suspectedoutliers");var b=p(y+"points",k);b?(p("jitter",b==="all"?.3:0),p("pointpos",b==="all"?-1.5:0),p("marker.symbol"),p("marker.opacity"),p("marker.size"),p("marker.color",g.line.color),p("marker.line.color"),p("marker.line.width"),b==="suspectedoutliers"&&(p("marker.line.outliercolor",g.marker.color),p("marker.line.outlierwidth")),p("selected.marker.color"),p("unselected.marker.color"),p("selected.marker.size"),p("unselected.marker.size"),p("text"),p("hovertext")):delete g.marker;var T=p("hoveron");T!=="all"&&T.indexOf("points")===-1||p("hovertemplate"),r.coerceSelectionMarkerOpacity(g,p)}o.exports={supplyDefaults:function(m,g,p,v){function y(M,A){return r.coerce(m,g,l,M,A)}if(d(m,g,y,v),g.visible!==!1){c(m,g,v,y),y("xhoverformat"),y("yhoverformat");var x=g._hasPreCompStats;x&&(y("lowerfence"),y("upperfence")),y("line.color",(m.marker||{}).color||p),y("line.width"),y("fillcolor",u.addOpacity(g.line.color,.5));var w=!1;if(x){var k=y("mean"),b=y("sd");k&&k.length&&(w=!0,b&&b.length&&(w="sd"))}y("boxmean",w),y("whiskerwidth"),y("width"),y("quartilemethod");var T=!1;if(x){var _=y("notchspan");_&&_.length&&(T=!0)}else r.validate(m.notchwidth,l.notchwidth)&&(T=!0);y("notched",T)&&y("notchwidth"),h(m,g,y,{prefix:"box"})}},crossTraceDefaults:function(m,g){var p,v;function y(k){return r.coerce(v._input,v,l,k)}for(var x=0;xb.lo&&(B.so=!0)}return M});k.enter().append("path").classed("point",!0),k.exit().remove(),k.call(u.translatePoints,g,p)}function s(l,d,h,m){var g,p,v=d.val,y=d.pos,x=!!y.rangebreaks,w=m.bPos,k=m.bPosPxOffset||0,b=h.boxmean||(h.meanline||{}).visible;Array.isArray(m.bdPos)?(g=m.bdPos[0],p=m.bdPos[1]):(g=m.bdPos,p=m.bdPos);var T=l.selectAll("path.mean").data(h.type==="box"&&h.boxmean||h.type==="violin"&&h.box.visible&&h.meanline.visible?a.identity:[]);T.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),T.exit().remove(),T.each(function(_){var M=y.c2l(_.pos+w,!0),A=y.l2p(M-g)+k,S=y.l2p(M+p)+k,E=x?(A+S)/2:y.l2p(M)+k,D=v.c2p(_.mean,!0),O=v.c2p(_.mean-_.sd,!0),R=v.c2p(_.mean+_.sd,!0);h.orientation==="h"?r.select(this).attr("d","M"+D+","+A+"V"+S+(b==="sd"?"m0,0L"+O+","+E+"L"+D+","+A+"L"+R+","+E+"Z":"")):r.select(this).attr("d","M"+A+","+D+"H"+S+(b==="sd"?"m0,0L"+E+","+O+"L"+A+","+D+"L"+E+","+R+"Z":""))})}o.exports={plot:function(l,d,h,m){var g=d.xaxis,p=d.yaxis;a.makeTraceGroups(m,h,"trace boxes").each(function(v){var y,x,w=r.select(this),k=v[0],b=k.t,T=k.trace;b.wdPos=b.bdPos*T.whiskerwidth,T.visible!==!0||b.empty?w.remove():(T.orientation==="h"?(y=p,x=g):(y=g,x=p),c(w,{pos:y,val:x},T,b),i(w,{x:g,y:p},T,b),s(w,{pos:y,val:x},T,b))})},plotBoxAndWhiskers:c,plotPoints:i,plotBoxMean:s}},{"../../components/drawing":388,"../../lib":503,"@plotly/d3":58}],683:[function(e,o,f){o.exports=function(r,a){var u,c,i=r.cd,s=r.xaxis,l=r.yaxis,d=[];if(a===!1)for(u=0;u=10)return null;for(var s=1/0,l=-1/0,d=c.length,h=0;h0?Math.floor:Math.ceil,G=P>0?Math.ceil:Math.floor,W=P>0?Math.min:Math.max,K=P>0?Math.max:Math.min,te=B(z+N),Y=G(L-N),Z=[[p=R(z)]];for(s=te;s*P=0;i--)s[g-i]=r[p][i],l[g-i]=a[p][i];for(d.push({x:s,y:l,bicubic:h}),i=p,s=[],l=[];i>=0;i--)s[p-i]=r[i][0],l[p-i]=a[i][0];return d.push({x:s,y:l,bicubic:m}),d}},{}],697:[function(e,o,f){var r=e("../../plots/cartesian/axes"),a=e("../../lib/extend").extendFlat;o.exports=function(u,c,i){var s,l,d,h,m,g,p,v,y,x,w,k,b,T,_=u["_"+c],M=u[c+"axis"],A=M._gridlines=[],S=M._minorgridlines=[],E=M._boundarylines=[],D=u["_"+i],O=u[i+"axis"];M.tickmode==="array"&&(M.tickvals=_.slice());var R=u._xctrl,z=u._yctrl,L=R[0].length,P=R.length,N=u._a.length,B=u._b.length;r.prepTicks(M),M.tickmode==="array"&&delete M.tickvals;var G=M.smoothing?3:1;function W(te){var Y,Z,re,U,q,$,ne,H,Q,ee,ie,ae,ue=[],le=[],ge={};if(c==="b")for(Z=u.b2j(te),re=Math.floor(Math.max(0,Math.min(B-2,Z))),U=Z-re,ge.length=B,ge.crossLength=N,ge.xy=function(fe){return u.evalxy([],fe,Z)},ge.dxy=function(fe,me){return u.dxydi([],fe,re,me,U)},Y=0;Y0&&(Q=u.dxydi([],Y-1,re,0,U),ue.push(q[0]+Q[0]/3),le.push(q[1]+Q[1]/3),ee=u.dxydi([],Y-1,re,1,U),ue.push(H[0]-ee[0]/3),le.push(H[1]-ee[1]/3)),ue.push(H[0]),le.push(H[1]),q=H;else for(Y=u.a2i(te),$=Math.floor(Math.max(0,Math.min(N-2,Y))),ne=Y-$,ge.length=N,ge.crossLength=B,ge.xy=function(fe){return u.evalxy([],Y,fe)},ge.dxy=function(fe,me){return u.dxydj([],$,fe,ne,me)},Z=0;Z0&&(ie=u.dxydj([],$,Z-1,ne,0),ue.push(q[0]+ie[0]/3),le.push(q[1]+ie[1]/3),ae=u.dxydj([],$,Z-1,ne,1),ue.push(H[0]-ae[0]/3),le.push(H[1]-ae[1]/3)),ue.push(H[0]),le.push(H[1]),q=H;return ge.axisLetter=c,ge.axis=M,ge.crossAxis=O,ge.value=te,ge.constvar=i,ge.index=v,ge.x=ue,ge.y=le,ge.smoothing=O.smoothing,ge}function K(te){var Y,Z,re,U,q,$=[],ne=[],H={};if(H.length=_.length,H.crossLength=D.length,c==="b")for(re=Math.max(0,Math.min(B-2,te)),q=Math.min(1,Math.max(0,te-re)),H.xy=function(Q){return u.evalxy([],Q,te)},H.dxy=function(Q,ee){return u.dxydi([],Q,re,ee,q)},Y=0;Y_.length-1||A.push(a(K(l),{color:M.gridcolor,width:M.gridwidth}));for(v=g;v_.length-1||w<0||w>_.length-1))for(k=_[d],b=_[w],s=0;s_[_.length-1]||S.push(a(W(x),{color:M.minorgridcolor,width:M.minorgridwidth}));M.startline&&E.push(a(K(0),{color:M.startlinecolor,width:M.startlinewidth})),M.endline&&E.push(a(K(_.length-1),{color:M.endlinecolor,width:M.endlinewidth}))}else{for(h=5e-15,g=(m=[Math.floor((_[_.length-1]-M.tick0)/M.dtick*(1+h)),Math.ceil((_[0]-M.tick0)/M.dtick/(1+h))].sort(function(te,Y){return te-Y}))[0],p=m[1],v=g;v<=p;v++)y=M.tick0+M.dtick*v,A.push(a(W(y),{color:M.gridcolor,width:M.gridwidth}));for(v=g-1;v_[_.length-1]||S.push(a(W(x),{color:M.minorgridcolor,width:M.minorgridwidth}));M.startline&&E.push(a(W(_[0]),{color:M.startlinecolor,width:M.startlinewidth})),M.endline&&E.push(a(W(_[_.length-1]),{color:M.endlinecolor,width:M.endlinewidth}))}}},{"../../lib/extend":493,"../../plots/cartesian/axes":554}],698:[function(e,o,f){var r=e("../../plots/cartesian/axes"),a=e("../../lib/extend").extendFlat;o.exports=function(u,c){var i,s,l,d=c._labels=[],h=c._gridlines;for(i=0;iu.length&&(a=a.slice(0,u.length)):a=[],i=0;i90&&(y-=180,h=-h),{angle:y,flip:h,p:r.c2p(c,a,u),offsetMultplier:m}}},{}],712:[function(e,o,f){var r=e("@plotly/d3"),a=e("../../components/drawing"),u=e("./map_1d_array"),c=e("./makepath"),i=e("./orient_text"),s=e("../../lib/svg_text_utils"),l=e("../../lib"),d=l.strRotate,h=l.strTranslate,m=e("../../constants/alignment");function g(w,k,b,T,_,M){var A="const-"+_+"-lines",S=b.selectAll("."+A).data(M);S.enter().append("path").classed(A,!0).style("vector-effect","non-scaling-stroke"),S.each(function(E){var D=E,O=D.x,R=D.y,z=u([],O,w.c2p),L=u([],R,k.c2p),P="M"+c(z,L,D.smoothing);r.select(this).attr("d",P).style("stroke-width",D.width).style("stroke",D.color).style("fill","none")}),S.exit().remove()}function p(w,k,b,T,_,M,A,S){var E=M.selectAll("text."+S).data(A);E.enter().append("text").classed(S,!0);var D=0,O={};return E.each(function(R,z){var L;if(R.axis.tickangle==="auto")L=i(T,k,b,R.xy,R.dxy);else{var P=(R.axis.tickangle+180)*Math.PI/180;L=i(T,k,b,R.xy,[Math.cos(P),Math.sin(P)])}z||(O={angle:L.angle,flip:L.flip});var N=(R.endAnchor?-1:1)*L.flip,B=r.select(this).attr({"text-anchor":N>0?"start":"end","data-notex":1}).call(a.font,R.font).text(R.text).call(s.convertToTspans,w),G=a.bBox(this);B.attr("transform",h(L.p[0],L.p[1])+d(L.angle)+h(R.axis.labelpadding*N,.3*G.height)),D=Math.max(D,G.width+R.axis.labelpadding)}),E.exit().remove(),O.maxExtent=D,O}o.exports=function(w,k,b,T){var _=k.xaxis,M=k.yaxis,A=w._fullLayout._clips;l.makeTraceGroups(T,b,"trace").each(function(S){var E=r.select(this),D=S[0],O=D.trace,R=O.aaxis,z=O.baxis,L=l.ensureSingle(E,"g","minorlayer"),P=l.ensureSingle(E,"g","majorlayer"),N=l.ensureSingle(E,"g","boundarylayer"),B=l.ensureSingle(E,"g","labellayer");E.style("opacity",O.opacity),g(_,M,P,R,"a",R._gridlines),g(_,M,P,z,"b",z._gridlines),g(_,M,L,R,"a",R._minorgridlines),g(_,M,L,z,"b",z._minorgridlines),g(_,M,N,R,"a-boundary",R._boundarylines),g(_,M,N,z,"b-boundary",z._boundarylines);var G=p(w,_,M,O,D,B,R._labels,"a-label"),W=p(w,_,M,O,D,B,z._labels,"b-label");(function(K,te,Y,Z,re,U,q,$){var ne,H,Q,ee,ie=l.aggNums(Math.min,null,Y.a),ae=l.aggNums(Math.max,null,Y.a),ue=l.aggNums(Math.min,null,Y.b),le=l.aggNums(Math.max,null,Y.b);ne=.5*(ie+ae),H=ue,Q=Y.ab2xy(ne,H,!0),ee=Y.dxyda_rough(ne,H),q.angle===void 0&&l.extendFlat(q,i(Y,re,U,Q,Y.dxydb_rough(ne,H))),x(K,te,Y,Z,Q,ee,Y.aaxis,re,U,q,"a-title"),ne=ie,H=.5*(ue+le),Q=Y.ab2xy(ne,H,!0),ee=Y.dxydb_rough(ne,H),$.angle===void 0&&l.extendFlat($,i(Y,re,U,Q,Y.dxyda_rough(ne,H))),x(K,te,Y,Z,Q,ee,Y.baxis,re,U,$,"b-title")})(w,B,O,D,_,M,G,W),function(K,te,Y,Z,re){var U,q,$,ne,H=Y.select("#"+K._clipPathId);H.size()||(H=Y.append("clipPath").classed("carpetclip",!0));var Q=l.ensureSingle(H,"path","carpetboundary"),ee=te.clipsegments,ie=[];for(ne=0;ne90&&B<270,W=r.select(this);W.text(A.title.text).call(s.convertToTspans,w),G&&(L=(-s.lineCount(W)+y)*v*N-L),W.attr("transform",h(P.p[0],P.p[1])+d(P.angle)+h(0,L)).attr("text-anchor","middle").call(a.font,A.title.font)}),z.exit().remove()}},{"../../components/drawing":388,"../../constants/alignment":471,"../../lib":503,"../../lib/svg_text_utils":529,"./makepath":709,"./map_1d_array":710,"./orient_text":711,"@plotly/d3":58}],713:[function(e,o,f){var r=e("./constants"),a=e("../../lib/search").findBin,u=e("./compute_control_points"),c=e("./create_spline_evaluator"),i=e("./create_i_derivative_evaluator"),s=e("./create_j_derivative_evaluator");o.exports=function(l){var d=l._a,h=l._b,m=d.length,g=h.length,p=l.aaxis,v=l.baxis,y=d[0],x=d[m-1],w=h[0],k=h[g-1],b=d[d.length-1]-d[0],T=h[h.length-1]-h[0],_=b*r.RELATIVE_CULL_TOLERANCE,M=T*r.RELATIVE_CULL_TOLERANCE;y-=_,x+=_,w-=M,k+=M,l.isVisible=function(A,S){return A>y&&Aw&&Sx||Sk},l.setScale=function(){var A=l._x,S=l._y,E=u(l._xctrl,l._yctrl,A,S,p.smoothing,v.smoothing);l._xctrl=E[0],l._yctrl=E[1],l.evalxy=c([l._xctrl,l._yctrl],m,g,p.smoothing,v.smoothing),l.dxydi=i([l._xctrl,l._yctrl],p.smoothing,v.smoothing),l.dxydj=s([l._xctrl,l._yctrl],p.smoothing,v.smoothing)},l.i2a=function(A){var S=Math.max(0,Math.floor(A[0]),m-2),E=A[0]-S;return(1-E)*d[S]+E*d[S+1]},l.j2b=function(A){var S=Math.max(0,Math.floor(A[1]),m-2),E=A[1]-S;return(1-E)*h[S]+E*h[S+1]},l.ij2ab=function(A){return[l.i2a(A[0]),l.j2b(A[1])]},l.a2i=function(A){var S=Math.max(0,Math.min(a(A,d),m-2)),E=d[S],D=d[S+1];return Math.max(0,Math.min(m-1,S+(A-E)/(D-E)))},l.b2j=function(A){var S=Math.max(0,Math.min(a(A,h),g-2)),E=h[S],D=h[S+1];return Math.max(0,Math.min(g-1,S+(A-E)/(D-E)))},l.ab2ij=function(A){return[l.a2i(A[0]),l.b2j(A[1])]},l.i2c=function(A,S){return l.evalxy([],A,S)},l.ab2xy=function(A,S,E){if(!E&&(Ad[m-1]|Sh[g-1]))return[!1,!1];var D=l.a2i(A),O=l.b2j(S),R=l.evalxy([],D,O);if(E){var z,L,P,N,B=0,G=0,W=[];Ad[m-1]?(z=m-2,L=1,B=(A-d[m-1])/(d[m-1]-d[m-2])):L=D-(z=Math.max(0,Math.min(m-2,Math.floor(D)))),Sh[g-1]?(P=g-2,N=1,G=(S-h[g-1])/(h[g-1]-h[g-2])):N=O-(P=Math.max(0,Math.min(g-2,Math.floor(O)))),B&&(l.dxydi(W,z,P,L,N),R[0]+=W[0]*B,R[1]+=W[1]*B),G&&(l.dxydj(W,z,P,L,N),R[0]+=W[0]*G,R[1]+=W[1]*G)}return R},l.c2p=function(A,S,E){return[S.c2p(A[0]),E.c2p(A[1])]},l.p2x=function(A,S,E){return[S.p2c(A[0]),E.p2c(A[1])]},l.dadi=function(A){var S=Math.max(0,Math.min(d.length-2,A));return d[S+1]-d[S]},l.dbdj=function(A){var S=Math.max(0,Math.min(h.length-2,A));return h[S+1]-h[S]},l.dxyda=function(A,S,E,D){var O=l.dxydi(null,A,S,E,D),R=l.dadi(A,E);return[O[0]/R,O[1]/R]},l.dxydb=function(A,S,E,D){var O=l.dxydj(null,A,S,E,D),R=l.dbdj(S,D);return[O[0]/R,O[1]/R]},l.dxyda_rough=function(A,S,E){var D=b*(E||.1),O=l.ab2xy(A+D,S,!0),R=l.ab2xy(A-D,S,!0);return[.5*(O[0]-R[0])/D,.5*(O[1]-R[1])/D]},l.dxydb_rough=function(A,S,E){var D=T*(E||.1),O=l.ab2xy(A,S+D,!0),R=l.ab2xy(A,S-D,!0);return[.5*(O[0]-R[0])/D,.5*(O[1]-R[1])/D]},l.dpdx=function(A){return A._m},l.dpdy=function(A){return A._m}}},{"../../lib/search":523,"./compute_control_points":701,"./constants":702,"./create_i_derivative_evaluator":703,"./create_j_derivative_evaluator":704,"./create_spline_evaluator":705}],714:[function(e,o,f){var r=e("../../lib");o.exports=function(a,u,c){var i,s,l,d=[],h=[],m=a[0].length,g=a.length;function p(te,Y){var Z,re=0,U=0;return te>0&&(Z=a[Y][te-1])!==void 0&&(U++,re+=Z),te0&&(Z=a[Y-1][te])!==void 0&&(U++,re+=Z),Y0&&s0&&i1e-5);return r.log("Smoother converged to",D,"after",O,"iterations"),a}},{"../../lib":503}],715:[function(e,o,f){var r=e("../../lib").isArray1D;o.exports=function(a,u,c){var i=c("x"),s=i&&i.length,l=c("y"),d=l&&l.length;if(!s&&!d)return!1;if(u._cheater=!i,s&&!r(i)||d&&!r(l))u._length=null;else{var h=s?i.length:1/0;d&&(h=Math.min(h,l.length)),u.a&&u.a.length&&(h=Math.min(h,u.a.length)),u.b&&u.b.length&&(h=Math.min(h,u.b.length)),u._length=h}return!0}},{"../../lib":503}],716:[function(e,o,f){var r=e("../../plots/template_attributes").hovertemplateAttrs,a=e("../scattergeo/attributes"),u=e("../../components/colorscale/attributes"),c=e("../../plots/attributes"),i=e("../../components/color/attributes").defaultLine,s=e("../../lib/extend").extendFlat,l=a.marker.line;o.exports=s({locations:{valType:"data_array",editType:"calc"},locationmode:a.locationmode,z:{valType:"data_array",editType:"calc"},geojson:s({},a.geojson,{}),featureidkey:a.featureidkey,text:s({},a.text,{}),hovertext:s({},a.hovertext,{}),marker:{line:{color:s({},l.color,{dflt:i}),width:s({},l.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style"},editType:"calc"},selected:{marker:{opacity:a.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:a.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:s({},c.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:r(),showlegend:s({},c.showlegend,{dflt:!1})},u("",{cLetter:"z",editTypeOverride:"calc"}))},{"../../components/color/attributes":365,"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plots/attributes":550,"../../plots/template_attributes":633,"../scattergeo/attributes":969}],717:[function(e,o,f){var r=e("fast-isnumeric"),a=e("../../constants/numerical").BADNUM,u=e("../../components/colorscale/calc"),c=e("../scatter/arrays_to_calcdata"),i=e("../scatter/calc_selection");function s(l){return l&&typeof l=="string"}o.exports=function(l,d){var h,m=d._length,g=new Array(m);h=d.geojson?function(w){return s(w)||r(w)}:s;for(var p=0;p")}}(c,p,l),[c]}},{"../../lib":503,"../../plots/cartesian/axes":554,"./attributes":716}],721:[function(e,o,f){o.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),colorbar:e("../heatmap/colorbar"),calc:e("./calc"),calcGeoJSON:e("./plot").calcGeoJSON,plot:e("./plot").plot,style:e("./style").style,styleOnSelect:e("./style").styleOnSelect,hoverPoints:e("./hover"),eventData:e("./event_data"),selectPoints:e("./select"),moduleType:"trace",name:"choropleth",basePlotModule:e("../../plots/geo"),categories:["geo","noOpacity","showLegend"],meta:{}}},{"../../plots/geo":589,"../heatmap/colorbar":795,"./attributes":716,"./calc":717,"./defaults":718,"./event_data":719,"./hover":720,"./plot":722,"./select":723,"./style":724}],722:[function(e,o,f){var r=e("@plotly/d3"),a=e("../../lib"),u=e("../../lib/geo_location_utils"),c=e("../../lib/topojson_utils").getTopojsonFeatures,i=e("../../plots/cartesian/autorange").findExtremes,s=e("./style").style;o.exports={calcGeoJSON:function(l,d){for(var h=l[0].trace,m=d[h.geo],g=m._subplot,p=h.locationmode,v=h._length,y=p==="geojson-id"?u.extractTraceFeature(l):c(h,g.topojson),x=[],w=[],k=0;k=0;c--){var i=u[c].id;if(typeof i=="string"&&i.indexOf("water")===0){for(var s=c+1;s=0;d--)s.removeLayer(l[d][1])},i.dispose=function(){var s=this.subplot.map;this._removeLayers(),s.removeSource(this.sourceId)},o.exports=function(s,l){var d=l[0].trace,h=new c(s,d.uid),m=h.sourceId,g=r(l),p=h.below=s.belowLookup["trace-"+d.uid];return s.map.addSource(m,{type:"geojson",data:g.geojson}),h._addLayers(g,p),l[0].trace._glTrace=h,h}},{"../../plots/mapbox/constants":611,"./convert":726}],730:[function(e,o,f){var r=e("../../components/colorscale/attributes"),a=e("../../plots/cartesian/axis_format_attributes").axisHoverFormat,u=e("../../plots/template_attributes").hovertemplateAttrs,c=e("../mesh3d/attributes"),i=e("../../plots/attributes"),s=e("../../lib/extend").extendFlat,l={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},sizemode:{valType:"enumerated",values:["scaled","absolute"],editType:"calc",dflt:"scaled"},sizeref:{valType:"number",editType:"calc",min:0},anchor:{valType:"enumerated",editType:"calc",values:["tip","tail","cm","center"],dflt:"cm"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:u({editType:"calc"},{keys:["norm"]}),uhoverformat:a("u",1),vhoverformat:a("v",1),whoverformat:a("w",1),xhoverformat:a("x"),yhoverformat:a("y"),zhoverformat:a("z"),showlegend:s({},i.showlegend,{dflt:!1})};s(l,r("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"})),["opacity","lightposition","lighting"].forEach(function(d){l[d]=c[d]}),l.hoverinfo=s({},i.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),l.transforms=void 0,o.exports=l},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plots/attributes":550,"../../plots/cartesian/axis_format_attributes":557,"../../plots/template_attributes":633,"../mesh3d/attributes":867}],731:[function(e,o,f){var r=e("../../components/colorscale/calc");o.exports=function(a,u){for(var c=u.u,i=u.v,s=u.w,l=Math.min(u.x.length,u.y.length,u.z.length,c.length,i.length,s.length),d=-1/0,h=1/0,m=0;ml.level||l.starts.length&&s===l.level)}break;case"constraint":if(c.prefixBoundary=!1,c.edgepaths.length)return;var d=c.x.length,h=c.y.length,m=-1/0,g=1/0;for(u=0;u":y>m&&(c.prefixBoundary=!0);break;case"<":(ym||c.starts.length&&v===g)&&(c.prefixBoundary=!0);break;case"][":p=Math.min(y[0],y[1]),v=Math.max(y[0],y[1]),pm&&(c.prefixBoundary=!0)}}}},{}],738:[function(e,o,f){var r=e("../../components/colorscale"),a=e("./make_color_map"),u=e("./end_plus");o.exports={min:"zmin",max:"zmax",calc:function(c,i,s){var l=i.contours,d=i.line,h=l.size||1,m=l.coloring,g=a(i,{isColorbar:!0});if(m==="heatmap"){var p=r.extractOpts(i);s._fillgradient=p.reversescale?r.flipScale(p.colorscale):p.colorscale,s._zrange=[p.min,p.max]}else m==="fill"&&(s._fillcolor=g);s._line={color:m==="lines"?g:d.color,width:l.showlines!==!1?d.width:0,dash:d.dash},s._levels={start:l.start,end:u(l),size:h}}}},{"../../components/colorscale":378,"./end_plus":746,"./make_color_map":751}],739:[function(e,o,f){o.exports={BOTTOMSTART:[1,9,13,104,713],TOPSTART:[4,6,7,104,713],LEFTSTART:[8,12,14,208,1114],RIGHTSTART:[2,3,11,208,1114],NEWDELTA:[null,[-1,0],[0,-1],[-1,0],[1,0],null,[0,-1],[-1,0],[0,1],[0,1],null,[0,1],[1,0],[1,0],[0,-1]],CHOOSESADDLE:{104:[4,1],208:[2,8],713:[7,13],1114:[11,14]},SADDLEREMAINDER:{1:4,2:8,4:1,7:13,8:2,11:14,13:7,14:11},LABELDISTANCE:2,LABELINCREASE:10,LABELMIN:3,LABELMAX:10,LABELOPTIMIZER:{EDGECOST:1,ANGLECOST:1,NEIGHBORCOST:5,SAMELEVELFACTOR:10,SAMELEVELDISTANCE:5,MAXCOST:100,INITIALSEARCHPOINTS:10,ITERATIONS:5}}},{}],740:[function(e,o,f){var r=e("fast-isnumeric"),a=e("./label_defaults"),u=e("../../components/color"),c=u.addOpacity,i=u.opacity,s=e("../../constants/filter_ops"),l=s.CONSTRAINT_REDUCTION,d=s.COMPARISON_OPS2;o.exports=function(h,m,g,p,v,y){var x,w,k,b=m.contours,T=g("contours.operation");b._operation=l[T],function(_,M){var A;d.indexOf(M.operation)===-1?(_("contours.value",[0,1]),Array.isArray(M.value)?M.value.length>2?M.value=M.value.slice(2):M.length===0?M.value=[0,1]:M.length<2?(A=parseFloat(M.value[0]),M.value=[A,A+1]):M.value=[parseFloat(M.value[0]),parseFloat(M.value[1])]:r(M.value)&&(A=parseFloat(M.value),M.value=[A,A+1])):(_("contours.value",0),r(M.value)||(Array.isArray(M.value)?M.value=parseFloat(M.value[0]):M.value=0))}(g,b),T==="="?x=b.showlines=!0:(x=g("contours.showlines"),k=g("fillcolor",c((h.line||{}).color||v,.5))),x&&(w=g("line.color",k&&i(k)?c(m.fillcolor,1):v),g("line.width",2),g("line.dash")),g("line.smoothing"),a(g,p,w,y)}},{"../../components/color":366,"../../constants/filter_ops":475,"./label_defaults":750,"fast-isnumeric":190}],741:[function(e,o,f){var r=e("../../constants/filter_ops"),a=e("fast-isnumeric");function u(s,l){var d,h=Array.isArray(l);function m(g){return a(g)?+g:null}return r.COMPARISON_OPS2.indexOf(s)!==-1?d=m(h?l[0]:l):r.INTERVAL_OPS.indexOf(s)!==-1?d=h?[m(l[0]),m(l[1])]:[m(l),m(l)]:r.SET_OPS.indexOf(s)!==-1&&(d=h?l.map(m):[m(l)]),d}function c(s){return function(l){l=u(s,l);var d=Math.min(l[0],l[1]),h=Math.max(l[0],l[1]);return{start:d,end:h,size:h-d}}}function i(s){return function(l){return{start:l=u(s,l),end:1/0,size:1/0}}}o.exports={"[]":c("[]"),"][":c("]["),">":i(">"),"<":i("<"),"=":i("=")}},{"../../constants/filter_ops":475,"fast-isnumeric":190}],742:[function(e,o,f){o.exports=function(r,a,u,c){var i=c("contours.start"),s=c("contours.end"),l=i===!1||s===!1,d=u("contours.size");!(l?a.autocontour=!0:u("autocontour",!1))&&d||u("ncontours")}},{}],743:[function(e,o,f){var r=e("../../lib");function a(u){return r.extendFlat({},u,{edgepaths:r.extendDeep([],u.edgepaths),paths:r.extendDeep([],u.paths),starts:r.extendDeep([],u.starts)})}o.exports=function(u,c){var i,s,l,d=function(g){return g.reverse()},h=function(g){return g};switch(c){case"=":case"<":return u;case">":for(u.length!==1&&r.warn("Contour data invalid for the specified inequality operation."),s=u[0],i=0;i1e3){r.warn("Too many contours, clipping at 1000",c);break}return h}},{"../../lib":503,"./constraint_mapping":741,"./end_plus":746}],746:[function(e,o,f){o.exports=function(r){return r.end+r.size/1e6}},{}],747:[function(e,o,f){var r=e("../../lib"),a=e("./constants");function u(s,l,d,h){return Math.abs(s[0]-l[0])20&&ee?Q===208||Q===1114?ae=ie[0]===0?1:-1:ue=ie[1]===0?1:-1:a.BOTTOMSTART.indexOf(Q)!==-1?ue=1:a.LEFTSTART.indexOf(Q)!==-1?ae=1:a.TOPSTART.indexOf(Q)!==-1?ue=-1:ae=-1,[ae,ue]}(v,d,l),x=[i(s,l,[-y[0],-y[1]])],w=s.z.length,k=s.z[0].length,b=l.slice(),T=y.slice();for(g=0;g<1e4;g++){if(v>20?(v=a.CHOOSESADDLE[v][(y[0]||y[1])<0?0:1],s.crossings[p]=a.SADDLEREMAINDER[v]):delete s.crossings[p],!(y=a.NEWDELTA[v])){r.log("Found bad marching index:",v,l,s.level);break}x.push(i(s,l,y)),l[0]+=y[0],l[1]+=y[1],p=l.join(","),u(x[x.length-1],x[x.length-2],h,m)&&x.pop();var _=y[0]&&(l[0]<0||l[0]>k-2)||y[1]&&(l[1]<0||l[1]>w-2);if(l[0]===b[0]&&l[1]===b[1]&&y[0]===T[0]&&y[1]===T[1]||d&&_)break;v=s.crossings[p]}g===1e4&&r.log("Infinite loop in contour?");var M,A,S,E,D,O,R,z,L,P,N,B,G,W,K,te=u(x[0],x[x.length-1],h,m),Y=0,Z=.2*s.smoothing,re=[],U=0;for(g=1;g=U;g--)if((M=re[g])=U&&M+re[A]z&&L--,s.edgepaths[L]=N.concat(x,P));break}H||(s.edgepaths[z]=x.concat(P))}for(z=0;zu?0:1)+(c[0][1]>u?0:2)+(c[1][1]>u?0:4)+(c[1][0]>u?0:8);return i===5||i===10?u>(c[0][0]+c[0][1]+c[1][0]+c[1][1])/4?i===5?713:1114:i===5?104:208:i===15?0:i}o.exports=function(u){var c,i,s,l,d,h,m,g,p,v=u[0].z,y=v.length,x=v[0].length,w=y===2||x===2;for(i=0;i=0&&(A=K,E=D):Math.abs(M[1]-A[1])<.01?Math.abs(M[1]-K[1])<.01&&(K[0]-M[0])*(A[0]-K[0])>=0&&(A=K,E=D):a.log("endpt to newendpt is not vert. or horz.",M,A,K)}if(M=A,E>=0)break;z+="L"+A}if(E===T.edgepaths.length){a.log("unclosed perimeter path");break}L=E,(N=P.indexOf(L)===-1)&&(L=P[0],z+="Z")}for(L=0;LA.center?A.right-D:D-A.left)/(z+Math.abs(Math.sin(R)*E)),N=(O>A.middle?A.bottom-O:O-A.top)/(Math.abs(L)+Math.cos(R)*E);if(P<1||N<1)return 1/0;var B=x.EDGECOST*(1/(P-1)+1/(N-1));B+=x.ANGLECOST*R*R;for(var G=D-z,W=O-L,K=D+z,te=O+L,Y=0;Y2*x.MAXCOST)break;N&&(D/=2),O=(E=R-D/2)+1.5*D}if(P<=x.MAXCOST)return z},f.addLabelData=function(T,_,M,A){var S=_.fontSize,E=_.width+S/3,D=Math.max(0,_.height-S/3),O=T.x,R=T.y,z=T.theta,L=Math.sin(z),P=Math.cos(z),N=function(G,W){return[O+G*P-W*L,R+G*L+W*P]},B=[N(-E/2,-D/2),N(-E/2,D/2),N(E/2,D/2),N(E/2,-D/2)];M.push({text:_.text,x:O,y:R,dy:_.dy,theta:z,level:_.level,width:E,height:D}),A.push(B)},f.drawLabels=function(T,_,M,A,S){var E=T.selectAll("text").data(_,function(R){return R.text+","+R.x+","+R.y+","+R.theta});if(E.exit().remove(),E.enter().append("text").attr({"data-notex":1,"text-anchor":"middle"}).each(function(R){var z=R.x+Math.sin(R.theta)*R.dy,L=R.y-Math.cos(R.theta)*R.dy;r.select(this).text(R.text).attr({x:z,y:L,transform:"rotate("+180*R.theta/Math.PI+" "+z+" "+L+")"}).call(i.convertToTspans,M)}),S){for(var D="",O=0;Os.end&&(s.start=s.end=(s.start+s.end)/2),c._input.contours||(c._input.contours={}),a.extendFlat(c._input.contours,{start:s.start,end:s.end,size:s.size}),c._input.autocontour=!0}else if(s.type!=="constraint"){var m,g=s.start,p=s.end,v=c._input.contours;g>p&&(s.start=v.start=p,p=s.end=v.end=g,g=s.start),!(s.size>0)&&(m=g===p?1:u(g,p,c.ncontours).dtick,v.size=s.size=m)}}},{"../../lib":503,"../../plots/cartesian/axes":554}],755:[function(e,o,f){var r=e("@plotly/d3"),a=e("../../components/drawing"),u=e("../heatmap/style"),c=e("./make_color_map");o.exports=function(i){var s=r.select(i).selectAll("g.contour");s.style("opacity",function(l){return l[0].trace.opacity}),s.each(function(l){var d=r.select(this),h=l[0].trace,m=h.contours,g=h.line,p=m.size||1,v=m.start,y=m.type==="constraint",x=!y&&m.coloring==="lines",w=!y&&m.coloring==="fill",k=x||w?c(h):null;d.selectAll("g.contourlevel").each(function(_){r.select(this).selectAll("path").call(a.lineGroupStyle,g.width,x?k(_.level):g.color,g.dash)});var b=m.labelfont;if(d.selectAll("g.contourlabels text").each(function(_){a.font(r.select(this),{family:b.family,size:b.size,color:b.color||(x?k(_.level):g.color)})}),y)d.selectAll("g.contourfill path").style("fill",h.fillcolor);else if(w){var T;d.selectAll("g.contourfill path").style("fill",function(_){return T===void 0&&(T=_.level),k(_.level+.5*p)}),T===void 0&&(T=v),d.selectAll("g.contourbg path").style("fill",k(T-.5*p))}}),u(i)}},{"../../components/drawing":388,"../heatmap/style":805,"./make_color_map":751,"@plotly/d3":58}],756:[function(e,o,f){var r=e("../../components/colorscale/defaults"),a=e("./label_defaults");o.exports=function(u,c,i,s,l){var d,h=i("contours.coloring"),m="";h==="fill"&&(d=i("contours.showlines")),d!==!1&&(h!=="lines"&&(m=i("line.color","#000")),i("line.width",.5),i("line.dash")),h!=="none"&&(u.showlegend!==!0&&(c.showlegend=!1),c._dfltShowLegend=!1,r(u,c,s,i,{prefix:"",cLetter:"z"})),i("line.smoothing"),a(i,s,m,l)}},{"../../components/colorscale/defaults":376,"./label_defaults":750}],757:[function(e,o,f){var r=e("../heatmap/attributes"),a=e("../contour/attributes"),u=e("../../components/colorscale/attributes"),c=e("../../lib/extend").extendFlat,i=a.contours;o.exports=c({carpet:{valType:"string",editType:"calc"},z:r.z,a:r.x,a0:r.x0,da:r.dx,b:r.y,b0:r.y0,db:r.dy,text:r.text,hovertext:r.hovertext,transpose:r.transpose,atype:r.xtype,btype:r.ytype,fillcolor:a.fillcolor,autocontour:a.autocontour,ncontours:a.ncontours,contours:{type:i.type,start:i.start,end:i.end,size:i.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:i.showlines,showlabels:i.showlabels,labelfont:i.labelfont,labelformat:i.labelformat,operation:i.operation,value:i.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:a.line.color,width:a.line.width,dash:a.line.dash,smoothing:a.line.smoothing,editType:"plot"},transforms:void 0},u("",{cLetter:"z",autoColorDflt:!1}))},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../contour/attributes":735,"../heatmap/attributes":792}],758:[function(e,o,f){var r=e("../../components/colorscale/calc"),a=e("../../lib"),u=e("../heatmap/convert_column_xyz"),c=e("../heatmap/clean_2d_array"),i=e("../heatmap/interp2d"),s=e("../heatmap/find_empties"),l=e("../heatmap/make_bound_array"),d=e("./defaults"),h=e("../carpet/lookup_carpetid"),m=e("../contour/set_contours");o.exports=function(g,p){var v=p._carpetTrace=h(g,p);if(v&&v.visible&&v.visible!=="legendonly"){if(!p.a||!p.b){var y=g.data[v.index],x=g.data[p.index];x.a||(x.a=y.a),x.b||(x.b=y.b),d(x,p,p._defaultColor,g._fullLayout)}var w=function(k,b){var T,_,M,A,S,E,D,O=b._carpetTrace,R=O.aaxis,z=O.baxis;R._minDtick=0,z._minDtick=0,a.isArray1D(b.z)&&u(b,R,z,"a","b",["z"]),T=b._a=b._a||b.a,A=b._b=b._b||b.b,T=T?R.makeCalcdata(b,"_a"):[],A=A?z.makeCalcdata(b,"_b"):[],_=b.a0||0,M=b.da||1,S=b.b0||0,E=b.db||1,D=b._z=c(b._z||b.z,b.transpose),b._emptypoints=s(D),i(D,b._emptypoints);var L=a.maxRowLength(D),P=b.xtype==="scaled"?"":T,N=l(b,P,_,M,L,R),B=b.ytype==="scaled"?"":A,G=l(b,B,S,E,D.length,z),W={a:N,b:G,z:D};return b.contours.type==="levels"&&b.contours.coloring!=="none"&&r(k,b,{vals:D,containerStr:"",cLetter:"z"}),[W]}(g,p);return m(p,p._z),w}}},{"../../components/colorscale/calc":374,"../../lib":503,"../carpet/lookup_carpetid":708,"../contour/set_contours":754,"../heatmap/clean_2d_array":794,"../heatmap/convert_column_xyz":796,"../heatmap/find_empties":798,"../heatmap/interp2d":801,"../heatmap/make_bound_array":803,"./defaults":759}],759:[function(e,o,f){var r=e("../../lib"),a=e("../heatmap/xyz_defaults"),u=e("./attributes"),c=e("../contour/constraint_defaults"),i=e("../contour/contours_defaults"),s=e("../contour/style_defaults");o.exports=function(l,d,h,m){function g(p,v){return r.coerce(l,d,u,p,v)}if(g("carpet"),l.a&&l.b){if(!a(l,d,g,m,"a","b"))return void(d.visible=!1);g("text"),g("contours.type")==="constraint"?c(l,d,g,m,h,{hasHover:!1}):(i(l,d,g,function(p){return r.coerce2(l,d,u,p)}),s(l,d,g,m,{hasHover:!1}))}else d._defaultColor=h,d._length=null}},{"../../lib":503,"../contour/constraint_defaults":740,"../contour/contours_defaults":742,"../contour/style_defaults":756,"../heatmap/xyz_defaults":807,"./attributes":757}],760:[function(e,o,f){o.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),colorbar:e("../contour/colorbar"),calc:e("./calc"),plot:e("./plot"),style:e("../contour/style"),moduleType:"trace",name:"contourcarpet",basePlotModule:e("../../plots/cartesian"),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}},{"../../plots/cartesian":568,"../contour/colorbar":738,"../contour/style":755,"./attributes":757,"./calc":758,"./defaults":759,"./plot":761}],761:[function(e,o,f){var r=e("@plotly/d3"),a=e("../carpet/map_1d_array"),u=e("../carpet/makepath"),c=e("../../components/drawing"),i=e("../../lib"),s=e("../contour/make_crossings"),l=e("../contour/find_all_paths"),d=e("../contour/plot"),h=e("../contour/constants"),m=e("../contour/convert_to_constraints"),g=e("../contour/empty_pathinfo"),p=e("../contour/close_boundaries"),v=e("../carpet/lookup_carpetid"),y=e("../carpet/axis_aligned_line");function x(b,T,_){var M=b.getPointAtLength(T),A=b.getPointAtLength(_),S=A.x-M.x,E=A.y-M.y,D=Math.sqrt(S*S+E*E);return[S/D,E/D]}function w(b){var T=Math.sqrt(b[0]*b[0]+b[1]*b[1]);return[b[0]/T,b[1]/T]}function k(b,T){var _=Math.abs(b[0]*T[0]+b[1]*T[1]);return Math.sqrt(1-_*_)/_}o.exports=function(b,T,_,M){var A=T.xaxis,S=T.yaxis;i.makeTraceGroups(M,_,"contour").each(function(E){var D=r.select(this),O=E[0],R=O.trace,z=R._carpetTrace=v(b,R),L=b.calcdata[z.index][0];if(z.visible&&z.visible!=="legendonly"){var P=O.a,N=O.b,B=R.contours,G=g(B,T,O),W=B.type==="constraint",K=B._operation,te=W?K==="="?"lines":"fill":B.coloring,Y=[[P[0],N[N.length-1]],[P[P.length-1],N[N.length-1]],[P[P.length-1],N[0]],[P[0],N[0]]];s(G);var Z=1e-8*(P[P.length-1]-P[0]),re=1e-8*(N[N.length-1]-N[0]);l(G,Z,re);var U,q,$,ne,H=G;B.type==="constraint"&&(H=m(G,K)),function(ae,ue){var le,ge,fe,me,_e,we,Te,Oe,de;for(le=0;le=0;ne--)U=L.clipsegments[ne],q=a([],U.x,A.c2p),$=a([],U.y,S.c2p),q.reverse(),$.reverse(),Q.push(u(q,$,U.bicubic));var ee="M"+Q.join("L")+"Z";(function(ae,ue,le,ge,fe,me){var _e,we,Te,Oe,de=i.ensureSingle(ae,"g","contourbg").selectAll("path").data(me!=="fill"||fe?[]:[0]);de.enter().append("path"),de.exit().remove();var ye=[];for(Oe=0;Oe=0&&(vt=He,At=at):Math.abs(ft[1]-vt[1])=0&&(vt=He,At=at):i.log("endpt to newendpt is not vert. or horz.",ft,vt,He)}if(At>=0)break;Ot+=Ae(ft,vt),ft=vt}if(At===Fe.edgepaths.length){i.log("unclosed perimeter path");break}nt=At,(Jt=Wt.indexOf(nt)===-1)&&(nt=Wt[0],Ot+=Ae(ft,vt)+"Z",ft=null)}for(nt=0;ntUt&&(Tt.max=Ut),Tt.len=Tt.max-Tt.min}(this,At,vt,at,_e,Pt.height),!(at.len<(Pt.width+Pt.height)*h.LABELMIN)))for(var et=Math.min(Math.ceil(at.len/ft),h.LABELMAX),Ot=0;Ot0?+y[g]:0),p.push({type:"Feature",geometry:{type:"Point",coordinates:b},properties:T})}}var M=c.extractOpts(d),A=M.reversescale?c.flipScale(M.colorscale):M.colorscale,S=A[0][1],E=["interpolate",["linear"],["heatmap-density"],0,u.opacity(S)<1?S:u.addOpacity(S,0)];for(g=1;g=0;l--)i.removeLayer(s[l][1])},c.dispose=function(){var i=this.subplot.map;this._removeLayers(),i.removeSource(this.sourceId)},o.exports=function(i,s){var l=s[0].trace,d=new u(i,l.uid),h=d.sourceId,m=r(s),g=d.below=i.belowLookup["trace-"+l.uid];return i.map.addSource(h,{type:"geojson",data:m.geojson}),d._addLayers(m,g),d}},{"../../plots/mapbox/constants":611,"./convert":764}],770:[function(e,o,f){var r=e("../../lib");o.exports=function(a,u){for(var c=0;c"),h.color=function(T,_){var M=T.marker,A=_.mc||M.color,S=_.mlc||M.line.color,E=_.mlw||M.line.width;if(r(A))return A;if(r(S)&&E)return S}(g,v),[h]}}},{"../../components/color":366,"../../lib":503,"../bar/hover":655}],778:[function(e,o,f){o.exports={attributes:e("./attributes"),layoutAttributes:e("./layout_attributes"),supplyDefaults:e("./defaults").supplyDefaults,crossTraceDefaults:e("./defaults").crossTraceDefaults,supplyLayoutDefaults:e("./layout_defaults"),calc:e("./calc"),crossTraceCalc:e("./cross_trace_calc"),plot:e("./plot"),style:e("./style").style,hoverPoints:e("./hover"),eventData:e("./event_data"),selectPoints:e("../bar/select"),moduleType:"trace",name:"funnel",basePlotModule:e("../../plots/cartesian"),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},{"../../plots/cartesian":568,"../bar/select":660,"./attributes":771,"./calc":772,"./cross_trace_calc":774,"./defaults":775,"./event_data":776,"./hover":777,"./layout_attributes":779,"./layout_defaults":780,"./plot":781,"./style":782}],779:[function(e,o,f){o.exports={funnelmode:{valType:"enumerated",values:["stack","group","overlay"],dflt:"stack",editType:"calc"},funnelgap:{valType:"number",min:0,max:1,editType:"calc"},funnelgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}},{}],780:[function(e,o,f){var r=e("../../lib"),a=e("./layout_attributes");o.exports=function(u,c,i){var s=!1;function l(m,g){return r.coerce(u,c,a,m,g)}for(var d=0;d path").each(function(x){if(!x.isBlank){var w=y.marker;r.select(this).call(u.fill,x.mc||w.color).call(u.stroke,x.mlc||w.line.color).call(a.dashLine,w.line.dash,x.mlw||w.line.width).style("opacity",y.selectedpoints&&!x.selected?c:1)}}),l(v,y,d),v.selectAll(".regions").each(function(){r.select(this).selectAll("path").style("stroke-width",0).call(u.fill,y.connector.fillcolor)}),v.selectAll(".lines").each(function(){var x=y.connector.line;a.lineGroupStyle(r.select(this).selectAll("path"),x.width,x.color,x.dash)})})}}},{"../../components/color":366,"../../components/drawing":388,"../../constants/interactions":478,"../bar/style":662,"../bar/uniform_text":664,"@plotly/d3":58}],783:[function(e,o,f){var r=e("../pie/attributes"),a=e("../../plots/attributes"),u=e("../../plots/domain").attributes,c=e("../../plots/template_attributes").hovertemplateAttrs,i=e("../../plots/template_attributes").texttemplateAttrs,s=e("../../lib/extend").extendFlat;o.exports={labels:r.labels,label0:r.label0,dlabel:r.dlabel,values:r.values,marker:{colors:r.marker.colors,line:{color:s({},r.marker.line.color,{dflt:null}),width:s({},r.marker.line.width,{dflt:1}),editType:"calc"},editType:"calc"},text:r.text,hovertext:r.hovertext,scalegroup:s({},r.scalegroup,{}),textinfo:s({},r.textinfo,{flags:["label","text","value","percent"]}),texttemplate:i({editType:"plot"},{keys:["label","color","value","text","percent"]}),hoverinfo:s({},a.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:c({},{keys:["label","color","value","text","percent"]}),textposition:s({},r.textposition,{values:["inside","none"],dflt:"inside"}),textfont:r.textfont,insidetextfont:r.insidetextfont,title:{text:r.title.text,font:r.title.font,position:s({},r.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:u({name:"funnelarea",trace:!0,editType:"calc"}),aspectratio:{valType:"number",min:0,dflt:1,editType:"plot"},baseratio:{valType:"number",min:0,max:1,dflt:.333,editType:"plot"}}},{"../../lib/extend":493,"../../plots/attributes":550,"../../plots/domain":584,"../../plots/template_attributes":633,"../pie/attributes":901}],784:[function(e,o,f){var r=e("../../plots/plots");f.name="funnelarea",f.plot=function(a,u,c,i){r.plotBasePlot(f.name,a,u,c,i)},f.clean=function(a,u,c,i){r.cleanBasePlot(f.name,a,u,c,i)}},{"../../plots/plots":619}],785:[function(e,o,f){var r=e("../pie/calc");o.exports={calc:function(a,u){return r.calc(a,u)},crossTraceCalc:function(a){r.crossTraceCalc(a,{type:"funnelarea"})}}},{"../pie/calc":903}],786:[function(e,o,f){var r=e("../../lib"),a=e("./attributes"),u=e("../../plots/domain").defaults,c=e("../bar/defaults").handleText,i=e("../pie/defaults").handleLabelsAndValues;o.exports=function(s,l,d,h){function m(T,_){return r.coerce(s,l,a,T,_)}var g=m("labels"),p=m("values"),v=i(g,p),y=v.len;if(l._hasLabels=v.hasLabels,l._hasValues=v.hasValues,!l._hasLabels&&l._hasValues&&(m("label0"),m("dlabel")),y){l._length=y,m("marker.line.width")&&m("marker.line.color",h.paper_bgcolor),m("marker.colors"),m("scalegroup");var x,w=m("text"),k=m("texttemplate");if(k||(x=m("textinfo",Array.isArray(w)?"text+percent":"percent")),m("hovertext"),m("hovertemplate"),k||x&&x!=="none"){var b=m("textposition");c(s,l,h,m,b,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}u(l,h,m),m("title.text")&&(m("title.position"),r.coerceFont(m,"title.font",h.font)),m("aspectratio"),m("baseratio")}else l.visible=!1}},{"../../lib":503,"../../plots/domain":584,"../bar/defaults":652,"../pie/defaults":904,"./attributes":783}],787:[function(e,o,f){o.exports={moduleType:"trace",name:"funnelarea",basePlotModule:e("./base_plot"),categories:["pie-like","funnelarea","showLegend"],attributes:e("./attributes"),layoutAttributes:e("./layout_attributes"),supplyDefaults:e("./defaults"),supplyLayoutDefaults:e("./layout_defaults"),calc:e("./calc").calc,crossTraceCalc:e("./calc").crossTraceCalc,plot:e("./plot"),style:e("./style"),styleOne:e("../pie/style_one"),meta:{}}},{"../pie/style_one":912,"./attributes":783,"./base_plot":784,"./calc":785,"./defaults":786,"./layout_attributes":788,"./layout_defaults":789,"./plot":790,"./style":791}],788:[function(e,o,f){var r=e("../pie/layout_attributes").hiddenlabels;o.exports={hiddenlabels:r,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}},{"../pie/layout_attributes":908}],789:[function(e,o,f){var r=e("../../lib"),a=e("./layout_attributes");o.exports=function(u,c){function i(s,l){return r.coerce(u,c,a,s,l)}i("hiddenlabels"),i("funnelareacolorway",c.colorway),i("extendfunnelareacolors")}},{"../../lib":503,"./layout_attributes":788}],790:[function(e,o,f){var r=e("@plotly/d3"),a=e("../../components/drawing"),u=e("../../lib"),c=u.strScale,i=u.strTranslate,s=e("../../lib/svg_text_utils"),l=e("../bar/plot").toMoveInsideBar,d=e("../bar/uniform_text"),h=d.recordMinTextSize,m=d.clearMinTextSize,g=e("../pie/helpers"),p=e("../pie/plot"),v=p.attachFxHandlers,y=p.determineInsideTextFont,x=p.layoutAreas,w=p.prerenderTitles,k=p.positionTitleOutside,b=p.formatSliceLabel;function T(_,M){return"l"+(M[0]-_[0])+","+(M[1]-_[1])}o.exports=function(_,M){var A=_._fullLayout;m("funnelarea",A),w(M,_),x(M,A._size),u.makeTraceGroups(A._funnelarealayer,M,"trace").each(function(S){var E=r.select(this),D=S[0],O=D.trace;(function(R){if(!R.length)return;var z=R[0],L=z.trace,P=L.aspectratio,N=L.baseratio;N>.999&&(N=.999);var B,G=Math.pow(N,2),W=z.vTotal,K=W,te=W*G/(1-G)/W;function Y(){var Te,Oe={x:Te=Math.sqrt(te),y:-Te};return[Oe.x,Oe.y]}var Z,re,U=[];for(U.push(Y()),Z=R.length-1;Z>-1;Z--)if(!(re=R[Z]).hidden){var q=re.v/K;te+=q,U.push(Y())}var $=1/0,ne=-1/0;for(Z=0;Z-1;Z--)if(!(re=R[Z]).hidden){var fe=U[ge+=1][0],me=U[ge][1];re.TL=[-fe,me],re.TR=[fe,me],re.BL=ue,re.BR=le,re.pxmid=(_e=re.TR,we=re.BR,[.5*(_e[0]+we[0]),.5*(_e[1]+we[1])]),ue=re.TL,le=re.TR}var _e,we})(S),E.each(function(){var R=r.select(this).selectAll("g.slice").data(S);R.enter().append("g").classed("slice",!0),R.exit().remove(),R.each(function(L,P){if(L.hidden)r.select(this).selectAll("path,g").remove();else{L.pointNumber=L.i,L.curveNumber=O.index;var N=D.cx,B=D.cy,G=r.select(this),W=G.selectAll("path.surface").data([L]);W.enter().append("path").classed("surface",!0).style({"pointer-events":"all"}),G.call(v,_,S);var K="M"+(N+L.TR[0])+","+(B+L.TR[1])+T(L.TR,L.BR)+T(L.BR,L.BL)+T(L.BL,L.TL)+"Z";W.attr("d",K),b(_,L,D);var te=g.castOption(O.textposition,L.pts),Y=G.selectAll("g.slicetext").data(L.text&&te!=="none"?[0]:[]);Y.enter().append("g").classed("slicetext",!0),Y.exit().remove(),Y.each(function(){var Z=u.ensureSingle(r.select(this),"text","",function(ee){ee.attr("data-notex",1)}),re=u.ensureUniformFontSize(_,y(O,L,A.font));Z.text(L.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(a.font,re).call(s.convertToTspans,_);var U,q,$,ne=a.bBox(Z.node()),H=Math.min(L.BL[1],L.BR[1])+B,Q=Math.max(L.TL[1],L.TR[1])+B;q=Math.max(L.TL[0],L.BL[0])+N,$=Math.min(L.TR[0],L.BR[0])+N,(U=l(q,$,H,Q,ne,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"})).fontSize=re.size,h(O.type,U,A),S[P].transform=U,Z.attr("transform",u.getTextTransform(U))})}});var z=r.select(this).selectAll("g.titletext").data(O.title.text?[0]:[]);z.enter().append("g").classed("titletext",!0),z.exit().remove(),z.each(function(){var L=u.ensureSingle(r.select(this),"text","",function(B){B.attr("data-notex",1)}),P=O.title.text;O._meta&&(P=u.templateString(P,O._meta)),L.text(P).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(a.font,O.title.font).call(s.convertToTspans,_);var N=k(D,A._size);L.attr("transform",i(N.x,N.y)+c(Math.min(1,N.scale))+i(N.tx,N.ty))})})})}},{"../../components/drawing":388,"../../lib":503,"../../lib/svg_text_utils":529,"../bar/plot":659,"../bar/uniform_text":664,"../pie/helpers":906,"../pie/plot":910,"@plotly/d3":58}],791:[function(e,o,f){var r=e("@plotly/d3"),a=e("../pie/style_one"),u=e("../bar/uniform_text").resizeText;o.exports=function(c){var i=c._fullLayout._funnelarealayer.selectAll(".trace");u(c,i,"funnelarea"),i.each(function(s){var l=s[0].trace,d=r.select(this);d.style({opacity:l.opacity}),d.selectAll("path.surface").each(function(h){r.select(this).call(a,h,l)})})}},{"../bar/uniform_text":664,"../pie/style_one":912,"@plotly/d3":58}],792:[function(e,o,f){var r=e("../scatter/attributes"),a=e("../../plots/attributes"),u=e("../../plots/font_attributes"),c=e("../../plots/cartesian/axis_format_attributes").axisHoverFormat,i=e("../../plots/template_attributes").hovertemplateAttrs,s=e("../../plots/template_attributes").texttemplateAttrs,l=e("../../components/colorscale/attributes"),d=e("../../lib/extend").extendFlat;o.exports=d({z:{valType:"data_array",editType:"calc"},x:d({},r.x,{impliedEdits:{xtype:"array"}}),x0:d({},r.x0,{impliedEdits:{xtype:"scaled"}}),dx:d({},r.dx,{impliedEdits:{xtype:"scaled"}}),y:d({},r.y,{impliedEdits:{ytype:"array"}}),y0:d({},r.y0,{impliedEdits:{ytype:"scaled"}}),dy:d({},r.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:d({},r.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:d({},r.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:d({},r.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:d({},r.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:d({},r.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:d({},r.yperiodalignment,{impliedEdits:{ytype:"scaled"}}),text:{valType:"data_array",editType:"calc"},hovertext:{valType:"data_array",editType:"calc"},transpose:{valType:"boolean",dflt:!1,editType:"calc"},xtype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},ytype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},zsmooth:{valType:"enumerated",values:["fast","best",!1],dflt:!1,editType:"calc"},hoverongaps:{valType:"boolean",dflt:!0,editType:"none"},connectgaps:{valType:"boolean",editType:"calc"},xgap:{valType:"number",dflt:0,min:0,editType:"plot"},ygap:{valType:"number",dflt:0,min:0,editType:"plot"},xhoverformat:c("x"),yhoverformat:c("y"),zhoverformat:c("z",1),hovertemplate:i(),texttemplate:s({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),textfont:u({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:d({},a.showlegend,{dflt:!1})},{transforms:void 0},l("",{cLetter:"z",autoColorDflt:!1}))},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plots/attributes":550,"../../plots/cartesian/axis_format_attributes":557,"../../plots/font_attributes":585,"../../plots/template_attributes":633,"../scatter/attributes":927}],793:[function(e,o,f){var r=e("../../registry"),a=e("../../lib"),u=e("../../plots/cartesian/axes"),c=e("../../plots/cartesian/align_period"),i=e("../histogram2d/calc"),s=e("../../components/colorscale/calc"),l=e("./convert_column_xyz"),d=e("./clean_2d_array"),h=e("./interp2d"),m=e("./find_empties"),g=e("./make_bound_array"),p=e("../../constants/numerical").BADNUM;function v(y){for(var x=[],w=y.length,k=0;kte){W("x scale is not linear");break}}if(_.length&&B==="fast"){var Y=(_[_.length-1]-_[0])/(_.length-1),Z=Math.abs(Y/100);for(D=0;D<_.length-1;D++)if(Math.abs(_[D+1]-_[D]-Y)>Z){W("y scale is not linear");break}}}}var re=a.maxRowLength(E),U=x.xtype==="scaled"?"":w,q=g(x,U,k,b,re,R),$=x.ytype==="scaled"?"":_,ne=g(x,$,M,A,E.length,z);N||(x._extremes[R._id]=u.findExtremes(R,q),x._extremes[z._id]=u.findExtremes(z,ne));var H={x:q,y:ne,z:E,text:x._text||x.text,hovertext:x._hovertext||x.hovertext};if(x.xperiodalignment&&T&&(H.orig_x=T),x.yperiodalignment&&S&&(H.orig_y=S),U&&U.length===q.length-1&&(H.xCenter=U),$&&$.length===ne.length-1&&(H.yCenter=$),P&&(H.xRanges=O.xRanges,H.yRanges=O.yRanges,H.pts=O.pts),L||s(y,x,{vals:E,cLetter:"z"}),L&&x.contours&&x.contours.coloring==="heatmap"){var Q={type:x.type==="contour"?"heatmap":"histogram2d",xcalendar:x.xcalendar,ycalendar:x.ycalendar};H.xfill=g(Q,U,k,b,re,R),H.yfill=g(Q,$,M,A,E.length,z)}return[H]}},{"../../components/colorscale/calc":374,"../../constants/numerical":479,"../../lib":503,"../../plots/cartesian/align_period":551,"../../plots/cartesian/axes":554,"../../registry":638,"../histogram2d/calc":826,"./clean_2d_array":794,"./convert_column_xyz":796,"./find_empties":798,"./interp2d":801,"./make_bound_array":803}],794:[function(e,o,f){var r=e("fast-isnumeric"),a=e("../../lib"),u=e("../../constants/numerical").BADNUM;o.exports=function(c,i,s,l){var d,h,m,g,p,v;function y(_){if(r(_))return+_}if(i&&i.transpose){for(d=0,p=0;p=0;l--)(d=((p[[(c=(s=v[l])[0])-1,i=s[1]]]||w)[2]+(p[[c+1,i]]||w)[2]+(p[[c,i-1]]||w)[2]+(p[[c,i+1]]||w)[2])/20)&&(h[s]=[c,i,d],v.splice(l,1),m=!0);if(!m)throw"findEmpties iterated with no new neighbors";for(s in h)p[s]=h[s],g.push(h[s])}return g.sort(function(b,T){return T[2]-b[2]})}},{"../../lib":503}],799:[function(e,o,f){var r=e("../../components/fx"),a=e("../../lib"),u=e("../../plots/cartesian/axes"),c=e("../../components/colorscale").extractOpts;o.exports=function(i,s,l,d,h){h||(h={});var m,g,p,v,y=h.isContour,x=i.cd[0],w=x.trace,k=i.xa,b=i.ya,T=x.x,_=x.y,M=x.z,A=x.xCenter,S=x.yCenter,E=x.zmask,D=w.zhoverformat,O=T,R=_;if(i.index!==!1){try{p=Math.round(i.index[1]),v=Math.round(i.index[0])}catch{return void a.error("Error hovering on heatmap, pointNumber must be [row,col], found:",i.index)}if(p<0||p>=M[0].length||v<0||v>M.length)return}else{if(r.inbox(s-T[0],s-T[T.length-1],0)>0||r.inbox(l-_[0],l-_[_.length-1],0)>0)return;if(y){var z;for(O=[2*T[0]-T[1]],z=1;zT&&(M=Math.max(M,Math.abs(i[h][m]-b)/(_-T))))}return M}o.exports=function(i,s){var l,d=1;for(c(i,s),l=0;l.01;l++)d=c(i,s,u(d));return d>.01&&r.log("interp2d didn't converge quickly",d),i}},{"../../lib":503}],802:[function(e,o,f){var r=e("../../lib");o.exports=function(a,u){a("texttemplate");var c=r.extendFlat({},u.font,{color:"auto",size:"auto"});r.coerceFont(a,"textfont",c)}},{"../../lib":503}],803:[function(e,o,f){var r=e("../../registry"),a=e("../../lib").isArrayOrTypedArray;o.exports=function(u,c,i,s,l,d){var h,m,g,p=[],v=r.traceIs(u,"contour"),y=r.traceIs(u,"histogram"),x=r.traceIs(u,"gl2d");if(a(c)&&c.length>1&&!y&&d.type!=="category"){var w=c.length;if(!(w<=l))return v?c.slice(0,l):c.slice(0,l+1);if(v||x)p=c.slice(0,l);else if(l===1)p=[c[0]-.5,c[0]+.5];else{for(p=[1.5*c[0]-.5*c[1]],g=1;g0;)R=S.c2p(U[N]),N--;for(R0;)P=E.c2p(q[N]),N--;if(PJe||Je>E._length))for(B=zt;BEt||Et>S._length)){var It=d({x:st,y:Le},te,T._fullLayout);It.x=st,It.y=Le;var Zt=K.z[N][B];Zt===void 0?(It.z="",It.zLabel=""):(It.z=Zt,It.zLabel=i.tickText(Vt,Zt,"hover").text);var Kt=K.text&&K.text[N]&&K.text[N][B];Kt!==void 0&&Kt!==!1||(Kt=""),It.text=Kt;var Ht=s.texttemplateString(kt,It,T._fullLayout._d3locale,It,te._meta||{});if(Ht){var mn=Ht.split("
"),zn=mn.length,pn=0;for(G=0;G0&&(T=!0);for(var A=0;As){var l=s-c[a];return c[a]=s,l}}return 0},max:function(a,u,c,i){var s=i[u];if(r(s)){if(s=Number(s),!r(c[a]))return c[a]=s,s;if(c[a]l?v>c?v>1.1*a?a:v>1.1*u?u:c:v>i?i:v>s?s:l:Math.pow(10,Math.floor(Math.log(v)/Math.LN10))}function g(v,y,x,w,k,b){if(w&&v>c){var T=p(y,k,b),_=p(x,k,b),M=v===a?0:1;return T[M]!==_[M]}return Math.floor(x/v)-Math.floor(y/v)>.1}function p(v,y,x){var w=y.c2d(v,a,x).split("-");return w[0]===""&&(w.unshift(),w[0]="-"+w[0]),w}o.exports=function(v,y,x,w,k){var b,T,_=-1.1*y,M=-.1*y,A=v-M,S=x[0],E=x[1],D=Math.min(h(S+M,S+A,w,k),h(E+M,E+A,w,k)),O=Math.min(h(S+_,S+M,w,k),h(E+_,E+M,w,k));if(D>O&&Oc){var R=b===a?1:6,z=b===a?"M12":"M1";return function(L,P){var N=w.c2d(L,a,k),B=N.indexOf("-",R);B>0&&(N=N.substr(0,B));var G=w.d2c(N,0,k);if(Gv.r2l(H)&&(ee=c.tickIncrement(ee,O.size,!0,T)),U.start=v.l2r(ee),ne||a.nestedProperty(p,S+".start").set(U.start)}var ie=O.end,ae=v.r2l(re.end),ue=ae!==void 0;if((O.endFound||ue)&&ae!==v.r2l(ie)){var le=ue?ae:a.aggNums(Math.max,null,_);U.end=v.l2r(le),ue||a.nestedProperty(p,S+".start").set(U.end)}var ge="autobin"+y;return p._input[ge]===!1&&(p._input[S]=a.extendFlat({},p[S]||{}),delete p._input[ge],delete p[ge]),[U,_]}o.exports={calc:function(g,p){var v,y,x,w,k=[],b=[],T=p.orientation==="h",_=c.getFromId(g,T?p.yaxis:p.xaxis),M=T?"y":"x",A={x:"y",y:"x"}[M],S=p[M+"calendar"],E=p.cumulative,D=m(g,p,_,M),O=D[0],R=D[1],z=typeof O.size=="string",L=[],P=z?L:O,N=[],B=[],G=[],W=0,K=p.histnorm,te=p.histfunc,Y=K.indexOf("density")!==-1;E.enabled&&Y&&(K=K.replace(/ ?density$/,""),Y=!1);var Z,re=te==="max"||te==="min"?null:0,U=s.count,q=l[K],$=!1,ne=function(de){return _.r2c(de,0,S)};for(a.isArrayOrTypedArray(p[A])&&te!=="count"&&(Z=p[A],$=te==="avg",U=s[te]),v=ne(O.start),x=ne(O.end)+(v-c.tickIncrement(v,O.size,!1,S))/1e6;v=0&&w=0;ke--)Ve(ke);else if(ye==="increasing"){for(ke=1;ke=0;ke--)de[ke]+=de[ke+1];Me==="exclude"&&(de.push(0),de.shift())}}(b,E.direction,E.currentbin);var me=Math.min(k.length,b.length),_e=[],we=0,Te=me-1;for(v=0;v=we;v--)if(b[v]){Te=v;break}for(v=we;v<=Te;v++)if(r(k[v])&&r(b[v])){var Oe={p:k[v],s:b[v],b:0};E.enabled||(Oe.pts=G[v],ae?Oe.ph0=Oe.ph1=G[v].length?R[G[v][0]]:k[v]:(p._computePh=!0,Oe.ph0=ee(L[v]),Oe.ph1=ee(L[v+1],!0))),_e.push(Oe)}return _e.length===1&&(_e[0].width1=c.tickIncrement(_e[0].p,O.size,!1,S)-_e[0].p),i(_e,p),a.isArrayOrTypedArray(p.selectedpoints)&&a.tagSelected(_e,p,ge),_e},calcAllAutoBins:m}},{"../../lib":503,"../../plots/cartesian/axes":554,"../../registry":638,"../bar/arrays_to_calcdata":647,"./average":813,"./bin_functions":815,"./bin_label_vals":816,"./norm_functions":824,"fast-isnumeric":190}],818:[function(e,o,f){o.exports={eventDataKeys:["binNumber"]}},{}],819:[function(e,o,f){var r=e("../../lib"),a=e("../../plots/cartesian/axis_ids"),u=e("../../registry").traceIs,c=e("../bar/defaults").handleGroupingDefaults,i=r.nestedProperty,s=e("../../plots/cartesian/constraints").getAxisGroup,l=[{aStr:{x:"xbins.start",y:"ybins.start"},name:"start"},{aStr:{x:"xbins.end",y:"ybins.end"},name:"end"},{aStr:{x:"xbins.size",y:"ybins.size"},name:"size"},{aStr:{x:"nbinsx",y:"nbinsy"},name:"nbins"}],d=["x","y"];o.exports=function(h,m){var g,p,v,y,x,w,k,b=m._histogramBinOpts={},T=[],_={},M=[];function A(Y,Z){return r.coerce(g._input,g,g._module.attributes,Y,Z)}function S(Y){return Y.orientation==="v"?"x":"y"}function E(Y,Z,re){var U=Y.uid+"__"+re;Z||(Z=U);var q=function(Q,ee){return a.getFromTrace({_fullLayout:m},Q,ee).type}(Y,re),$=Y[re+"calendar"]||"",ne=b[Z],H=!0;ne&&(q===ne.axType&&$===ne.calendar?(H=!1,ne.traces.push(Y),ne.dirs.push(re)):(Z=U,q!==ne.axType&&r.warn(["Attempted to group the bins of trace",Y.index,"set on a","type:"+q,"axis","with bins on","type:"+ne.axType,"axis."].join(" ")),$!==ne.calendar&&r.warn(["Attempted to group the bins of trace",Y.index,"set with a",$,"calendar","with bins",ne.calendar?"on a "+ne.calendar+" calendar":"w/o a set calendar"].join(" ")))),H&&(b[Z]={traces:[Y],dirs:[re],axType:q,calendar:Y[re+"calendar"]||""}),Y["_"+re+"bingroup"]=Z}for(x=0;xL&&D.splice(L,D.length-L),z.length>L&&z.splice(L,z.length-L);var P=[],N=[],B=[],G=typeof E.size=="string",W=typeof R.size=="string",K=[],te=[],Y=G?K:E,Z=W?te:R,re=0,U=[],q=[],$=p.histnorm,ne=p.histfunc,H=$.indexOf("density")!==-1,Q=ne==="max"||ne==="min"?null:0,ee=u.count,ie=c[$],ae=!1,ue=[],le=[],ge="z"in p?p.z:"marker"in p&&Array.isArray(p.marker.color)?p.marker.color:"";ge&&ne!=="count"&&(ae=ne==="avg",ee=u[ne]);var fe=E.size,me=M(E.start),_e=M(E.end)+(me-a.tickIncrement(me,fe,!1,T))/1e6;for(v=me;v<_e;v=a.tickIncrement(v,fe,!1,T))N.push(Q),K.push(v),ae&&B.push(0);K.push(v);var we,Te=N.length,Oe=(v-me)/Te,de=(we=me+Oe/2,k.c2r(we,0,T)),ye=R.size,Me=A(R.start),ke=A(R.end)+(Me-a.tickIncrement(Me,ye,!1,_))/1e6;for(v=Me;v=0&&x=0&&w-1,flipY:L.tiling.flip.indexOf("y")>-1,orientation:L.tiling.orientation,pad:{inner:L.tiling.pad},maxDepth:L._maxDepth}).descendants(),W=1/0,K=-1/0;G.forEach(function(U){var q=U.depth;q>=L._maxDepth?(U.x0=U.x1=(U.x0+U.x1)/2,U.y0=U.y1=(U.y0+U.y1)/2):(W=Math.min(W,q),K=Math.max(K,q))}),y=y.data(G,d.getPtId),L._maxVisibleLayers=isFinite(K)?K-W+1:0,y.enter().append("g").classed("slice",!0),E(y,!1,{},[w,k],_),y.order();var te=null;if(S&&R){var Y=d.getPtId(R);y.each(function(U){te===null&&d.getPtId(U)===Y&&(te={x0:U.x0,x1:U.x1,y0:U.y0,y1:U.y1})})}var Z=function(){return te||{x0:0,x1:w,y0:0,y1:k}},re=y;return S&&(re=re.transition().each("end",function(){var U=r.select(this);d.setSliceCursor(U,g,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),re.each(function(U){U._x0=b(U.x0),U._x1=b(U.x1),U._y0=T(U.y0),U._y1=T(U.y1),U._hoverX=b(U.x1-L.tiling.pad),U._hoverY=T(B?U.y1-L.tiling.pad/2:U.y0+L.tiling.pad/2);var q=r.select(this),$=a.ensureSingle(q,"path","surface",function(ee){ee.style("pointer-events","all")});S?$.transition().attrTween("d",function(ee){var ie=D(ee,!1,Z(),[w,k],{orientation:L.tiling.orientation,flipX:L.tiling.flip.indexOf("x")>-1,flipY:L.tiling.flip.indexOf("y")>-1});return function(ae){return _(ie(ae))}}):$.attr("d",_),q.call(h,v,g,p,{styleOne:s,eventDataKeys:l.eventDataKeys,transitionTime:l.CLICK_TRANSITION_TIME,transitionEasing:l.CLICK_TRANSITION_EASING}).call(d.setSliceCursor,g,{isTransitioning:g._transitioning}),$.call(s,U,L,{hovered:!1}),U.x0===U.x1||U.y0===U.y1?U._text="":U._text=m(U,v,L,p,z)||"";var ne=a.ensureSingle(q,"g","slicetext"),H=a.ensureSingle(ne,"text","",function(ee){ee.attr("data-notex",1)}),Q=a.ensureUniformFontSize(g,d.determineTextFont(L,U,z.font));H.text(U._text||" ").classed("slicetext",!0).attr("text-anchor",N?"end":P?"start":"middle").call(u.font,Q).call(c.convertToTspans,g),U.textBB=u.bBox(H.node()),U.transform=M(U,{fontSize:Q.size}),U.transform.fontSize=Q.size,S?H.transition().attrTween("transform",function(ee){var ie=O(ee,!1,Z(),[w,k]);return function(ae){return A(ie(ae))}}):H.attr("transform",A(U))}),te}},{"../../components/drawing":388,"../../lib":503,"../../lib/svg_text_utils":529,"../sunburst/fx":1054,"../sunburst/helpers":1055,"../sunburst/plot":1059,"../treemap/constants":1078,"./partition":842,"./style":844,"@plotly/d3":58}],839:[function(e,o,f){o.exports={moduleType:"trace",name:"icicle",basePlotModule:e("./base_plot"),categories:[],animatable:!0,attributes:e("./attributes"),layoutAttributes:e("./layout_attributes"),supplyDefaults:e("./defaults"),supplyLayoutDefaults:e("./layout_defaults"),calc:e("./calc").calc,crossTraceCalc:e("./calc").crossTraceCalc,plot:e("./plot"),style:e("./style").style,colorbar:e("../scatter/marker_colorbar"),meta:{}}},{"../scatter/marker_colorbar":945,"./attributes":834,"./base_plot":835,"./calc":836,"./defaults":837,"./layout_attributes":840,"./layout_defaults":841,"./plot":843,"./style":844}],840:[function(e,o,f){o.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}},{}],841:[function(e,o,f){var r=e("../../lib"),a=e("./layout_attributes");o.exports=function(u,c){function i(s,l){return r.coerce(u,c,a,s,l)}i("iciclecolorway",c.colorway),i("extendiciclecolors")}},{"../../lib":503,"./layout_attributes":840}],842:[function(e,o,f){var r=e("d3-hierarchy"),a=e("../treemap/flip_tree");o.exports=function(u,c,i){var s=i.flipX,l=i.flipY,d=i.orientation==="h",h=i.maxDepth,m=c[0],g=c[1];h&&(m=(u.height+1)*c[0]/Math.min(u.height+1,h),g=(u.height+1)*c[1]/Math.min(u.height+1,h));var p=r.partition().padding(i.pad.inner).size(d?[c[1],m]:[c[0],g])(u);return(d||s||l)&&a(p,c,{swapXY:d,flipX:s,flipY:l}),p}},{"../treemap/flip_tree":1083,"d3-hierarchy":115}],843:[function(e,o,f){var r=e("../treemap/draw"),a=e("./draw_descendants");o.exports=function(u,c,i,s){return r(u,c,i,s,{type:"icicle",drawDescendants:a})}},{"../treemap/draw":1080,"./draw_descendants":838}],844:[function(e,o,f){var r=e("@plotly/d3"),a=e("../../components/color"),u=e("../../lib"),c=e("../bar/uniform_text").resizeText;function i(s,l,d){var h=l.data.data,m=!l.children,g=h.i,p=u.castOption(d,g,"marker.line.color")||a.defaultLine,v=u.castOption(d,g,"marker.line.width")||0;s.style("stroke-width",v).call(a.fill,h.color).call(a.stroke,p).style("opacity",m?d.leaf.opacity:null)}o.exports={style:function(s){var l=s._fullLayout._iciclelayer.selectAll(".trace");c(s,l,"icicle"),l.each(function(d){var h=r.select(this),m=d[0].trace;h.style("opacity",m.opacity),h.selectAll("path.surface").each(function(g){r.select(this).call(i,g,m)})})},styleOne:i}},{"../../components/color":366,"../../lib":503,"../bar/uniform_text":664,"@plotly/d3":58}],845:[function(e,o,f){for(var r=e("../../plots/attributes"),a=e("../../plots/template_attributes").hovertemplateAttrs,u=e("../../lib/extend").extendFlat,c=e("./constants").colormodel,i=["rgb","rgba","rgba256","hsl","hsla"],s=[],l=[],d=0;d0||r.inbox(s-l.y0,s-(l.y0+l.h*d.dy),0)>0)){var g,p=Math.floor((i-l.x0)/d.dx),v=Math.floor(Math.abs(s-l.y0)/d.dy);if(d._hasZ?g=l.z[v][p]:d._hasSource&&(g=d._canvas.el.getContext("2d").getImageData(p,v,1,1).data),g){var y,x=l.hi||d.hoverinfo;if(x){var w=x.split("+");w.indexOf("all")!==-1&&(w=["color"]),w.indexOf("color")!==-1&&(y=!0)}var k,b=u.colormodel[d.colormodel],T=b.colormodel||d.colormodel,_=T.length,M=d._scaler(g),A=b.suffix,S=[];(d.hovertemplate||y)&&(S.push("["+[M[0]+A[0],M[1]+A[1],M[2]+A[2]].join(", ")),_===4&&S.push(", "+M[3]+A[3]),S.push("]"),S=S.join(""),c.extraText=T.toUpperCase()+": "+S),Array.isArray(d.hovertext)&&Array.isArray(d.hovertext[v])?k=d.hovertext[v][p]:Array.isArray(d.text)&&Array.isArray(d.text[v])&&(k=d.text[v][p]);var E=m.c2p(l.y0+(v+.5)*d.dy),D=l.x0+(p+.5)*d.dx,O=l.y0+(v+.5)*d.dy,R="["+g.slice(0,d.colormodel.length).join(", ")+"]";return[a.extendFlat(c,{index:[v,p],x0:h.c2p(l.x0+p*d.dx),x1:h.c2p(l.x0+(p+1)*d.dx),y0:E,y1:E,color:M,xVal:D,xLabelVal:D,yVal:O,yLabelVal:O,zLabelVal:R,text:k,hovertemplateLabels:{zLabel:R,colorLabel:S,"color[0]Label":M[0]+A[0],"color[1]Label":M[1]+A[1],"color[2]Label":M[2]+A[2],"color[3]Label":M[3]+A[3]}})]}}}},{"../../components/fx":406,"../../lib":503,"./constants":847}],852:[function(e,o,f){o.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),calc:e("./calc"),plot:e("./plot"),style:e("./style"),hoverPoints:e("./hover"),eventData:e("./event_data"),moduleType:"trace",name:"image",basePlotModule:e("../../plots/cartesian"),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}},{"../../plots/cartesian":568,"./attributes":845,"./calc":846,"./defaults":848,"./event_data":849,"./hover":851,"./plot":853,"./style":854}],853:[function(e,o,f){var r=e("@plotly/d3"),a=e("../../lib"),u=a.strTranslate,c=e("../../constants/xmlns_namespaces"),i=e("./constants"),s=a.isIOS()||a.isSafari()||a.isIE();o.exports=function(l,d,h,m){var g=d.xaxis,p=d.yaxis,v=!(s||l._context._exportedPlot);a.makeTraceGroups(m,h,"im").each(function(y){var x=r.select(this),w=y[0],k=w.trace,b=(k.zsmooth==="fast"||k.zsmooth===!1&&v)&&!k._hasZ&&k._hasSource&&g.type==="linear"&&p.type==="linear";k._realImage=b;var T,_,M,A,S,E,D=w.z,O=w.x0,R=w.y0,z=w.w,L=w.h,P=k.dx,N=k.dy;for(E=0;T===void 0&&E0;)_=g.c2p(O+E*P),E--;for(E=0;A===void 0&&E0;)S=p.c2p(R+E*N),E--;_Y[0];if(Z||re){var U=T+B/2,q=A+G/2;K+="transform:"+u(U+"px",q+"px")+"scale("+(Z?-1:1)+","+(re?-1:1)+")"+u(-U+"px",-q+"px")+";"}}W.attr("style",K);var $=new Promise(function(H){if(k._hasZ)H();else if(k._hasSource)if(k._canvas&&k._canvas.el.width===z&&k._canvas.el.height===L&&k._canvas.source===k.source)H();else{var Q=document.createElement("canvas");Q.width=z,Q.height=L;var ee=Q.getContext("2d");k._image=k._image||new Image;var ie=k._image;ie.onload=function(){ee.drawImage(ie,0,0),k._canvas={el:Q,source:k.source},H()},ie.setAttribute("src",k.source)}}).then(function(){var H;if(k._hasZ)H=ne(function(ee,ie){return D[ie][ee]}).toDataURL("image/png");else if(k._hasSource)if(b)H=k.source;else{var Q=k._canvas.el.getContext("2d").getImageData(0,0,z,L).data;H=ne(function(ee,ie){var ae=4*(ie*z+ee);return[Q[ae],Q[ae+1],Q[ae+2],Q[ae+3]]}).toDataURL("image/png")}W.attr({"xlink:href":H,height:G,width:B,x:T,y:A})});l._promises.push($)}function ne(H){var Q=document.createElement("canvas");Q.width=B,Q.height=G;var ee,ie=Q.getContext("2d"),ae=function(de){return a.constrain(Math.round(g.c2p(O+de*P)-T),0,B)},ue=function(de){return a.constrain(Math.round(p.c2p(R+de*N)-A),0,G)},le=i.colormodel[k.colormodel],ge=le.colormodel||k.colormodel,fe=le.fmt;for(E=0;E0}function M(O){O.each(function(R){w.stroke(r.select(this),R.line.color)}).each(function(R){w.fill(r.select(this),R.color)}).style("stroke-width",function(R){return R.line.width})}function A(O,R,z){var L=O._fullLayout,P=c.extendFlat({type:"linear",ticks:"outside",range:z,showline:!0},R),N={type:"linear",_id:"x"+R._id},B={letter:"x",font:L.font,noHover:!0,noTickson:!0};function G(W,K){return c.coerce(P,N,x,W,K)}return v(P,N,G,B,L),y(P,N,G,B),N}function S(O,R,z){return[Math.min(R/O.width,z/O.height),O,R+"x"+z]}function E(O,R,z,L){var P=document.createElementNS("http://www.w3.org/2000/svg","text"),N=r.select(P);return N.text(O).attr("x",0).attr("y",0).attr("text-anchor",z).attr("data-unformatted",O).call(g.convertToTspans,L).call(h.font,R),h.bBox(N.node())}function D(O,R,z,L,P,N){var B="_cache"+R;O[B]&&O[B].key===P||(O[B]={key:P,value:z});var G=c.aggNums(N,null,[O[B].value,L],2);return O[B].value=G,G}o.exports=function(O,R,z,L){var P,N=O._fullLayout;_(z)&&L&&(P=L()),c.makeTraceGroups(N._indicatorlayer,R,"trace").each(function(B){var G,W,K,te,Y,Z=B[0].trace,re=r.select(this),U=Z._hasGauge,q=Z._isAngular,$=Z._isBullet,ne=Z.domain,H={w:N._size.w*(ne.x[1]-ne.x[0]),h:N._size.h*(ne.y[1]-ne.y[0]),l:N._size.l+N._size.w*ne.x[0],r:N._size.r+N._size.w*(1-ne.x[1]),t:N._size.t+N._size.h*(1-ne.y[1]),b:N._size.b+N._size.h*ne.y[0]},Q=H.l+H.w/2,ee=H.t+H.h/2,ie=Math.min(H.w/2,H.h),ae=m.innerRadius*ie,ue=Z.align||"center";if(W=ee,U){if(q&&(G=Q,W=ee+ie/2,K=function(Oe){return function(de,ye){var Me=Math.sqrt(de.width/2*(de.width/2)+de.height*de.height);return[ye/Me,de,ye]}(Oe,.9*ae)}),$){var le=m.bulletPadding,ge=1-m.bulletNumberDomainSize+le;G=H.l+(ge+(1-ge)*b[ue])*H.w,K=function(Oe){return S(Oe,(m.bulletNumberDomainSize-le)*H.w,H.h)}}}else G=H.l+b[ue]*H.w,K=function(Oe){return S(Oe,H.w,H.h)};(function(Oe,de,ye,Me){var ke,Ee,ze,Fe=ye[0].trace,Ve=Me.numbersX,Ke=Me.numbersY,Re=Fe.align||"center",qe=k[Re],We=Me.transitionOpts,Ye=Me.onComplete,nt=c.ensureSingle(de,"g","numbers"),ft=[];Fe._hasNumber&&ft.push("number"),Fe._hasDelta&&(ft.push("delta"),Fe.delta.position==="left"&&ft.reverse());var vt=nt.selectAll("text").data(ft);function Pt(Ge,Tt,dt,Pe){if(!Ge.match("s")||dt>=0==Pe>=0||Tt(dt).slice(-1).match(T)||Tt(Pe).slice(-1).match(T))return Tt;var Ie=Ge.slice().replace("s","f").replace(/\d+/,function(De){return parseInt(De)-1}),Ae=A(Oe,{tickformat:Ie});return function(De){return Math.abs(De)<1?p.tickText(Ae,De).text:Tt(De)}}vt.enter().append("text"),vt.attr("text-anchor",function(){return qe}).attr("class",function(Ge){return Ge}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),vt.exit().remove();var At,at=Fe.mode+Fe.align;if(Fe._hasDelta&&(At=function(){var Ge=A(Oe,{tickformat:Fe.delta.valueformat},Fe._range);Ge.setScale(),p.prepTicks(Ge);var Tt=function(He){return p.tickText(Ge,He).text},dt=function(He){return Fe.delta.relative?He.relativeDelta:He.delta},Pe=function(He,rt){return He===0||typeof He!="number"||isNaN(He)?"-":(He>0?Fe.delta.increasing.symbol:Fe.delta.decreasing.symbol)+rt(He)},Ie=function(He){return He.delta>=0?Fe.delta.increasing.color:Fe.delta.decreasing.color};Fe._deltaLastValue===void 0&&(Fe._deltaLastValue=dt(ye[0]));var Ae=nt.select("text.delta");function De(){Ae.text(Pe(dt(ye[0]),Tt)).call(w.fill,Ie(ye[0])).call(g.convertToTspans,Oe)}return Ae.call(h.font,Fe.delta.font).call(w.fill,Ie({delta:Fe._deltaLastValue})),_(We)?Ae.transition().duration(We.duration).ease(We.easing).tween("text",function(){var He=r.select(this),rt=dt(ye[0]),lt=Fe._deltaLastValue,ot=Pt(Fe.delta.valueformat,Tt,lt,rt),kt=u(lt,rt);return Fe._deltaLastValue=rt,function(wt){He.text(Pe(kt(wt),ot)),He.call(w.fill,Ie({delta:kt(wt)}))}}).each("end",function(){De(),Ye&&Ye()}).each("interrupt",function(){De(),Ye&&Ye()}):De(),Ee=E(Pe(dt(ye[0]),Tt),Fe.delta.font,qe,Oe),Ae}(),at+=Fe.delta.position+Fe.delta.font.size+Fe.delta.font.family+Fe.delta.valueformat,at+=Fe.delta.increasing.symbol+Fe.delta.decreasing.symbol,ze=Ee),Fe._hasNumber&&(function(){var Ge=A(Oe,{tickformat:Fe.number.valueformat},Fe._range);Ge.setScale(),p.prepTicks(Ge);var Tt=function(De){return p.tickText(Ge,De).text},dt=Fe.number.suffix,Pe=Fe.number.prefix,Ie=nt.select("text.number");function Ae(){var De=typeof ye[0].y=="number"?Pe+Tt(ye[0].y)+dt:"-";Ie.text(De).call(h.font,Fe.number.font).call(g.convertToTspans,Oe)}_(We)?Ie.transition().duration(We.duration).ease(We.easing).each("end",function(){Ae(),Ye&&Ye()}).each("interrupt",function(){Ae(),Ye&&Ye()}).attrTween("text",function(){var De=r.select(this),He=u(ye[0].lastY,ye[0].y);Fe._lastValue=ye[0].y;var rt=Pt(Fe.number.valueformat,Tt,ye[0].lastY,ye[0].y);return function(lt){De.text(Pe+rt(He(lt))+dt)}}):Ae(),ke=E(Pe+Tt(ye[0].y)+dt,Fe.number.font,qe,Oe)}(),at+=Fe.number.font.size+Fe.number.font.family+Fe.number.valueformat+Fe.number.suffix+Fe.number.prefix,ze=ke),Fe._hasDelta&&Fe._hasNumber){var et,Ot,Wt=[(ke.left+ke.right)/2,(ke.top+ke.bottom)/2],Jt=[(Ee.left+Ee.right)/2,(Ee.top+Ee.bottom)/2],Be=.75*Fe.delta.font.size;Fe.delta.position==="left"&&(et=D(Fe,"deltaPos",0,-1*(ke.width*b[Fe.align]+Ee.width*(1-b[Fe.align])+Be),at,Math.min),Ot=Wt[1]-Jt[1],ze={width:ke.width+Ee.width+Be,height:Math.max(ke.height,Ee.height),left:Ee.left+et,right:ke.right,top:Math.min(ke.top,Ee.top+Ot),bottom:Math.max(ke.bottom,Ee.bottom+Ot)}),Fe.delta.position==="right"&&(et=D(Fe,"deltaPos",0,ke.width*(1-b[Fe.align])+Ee.width*b[Fe.align]+Be,at,Math.max),Ot=Wt[1]-Jt[1],ze={width:ke.width+Ee.width+Be,height:Math.max(ke.height,Ee.height),left:ke.left,right:Ee.right+et,top:Math.min(ke.top,Ee.top+Ot),bottom:Math.max(ke.bottom,Ee.bottom+Ot)}),Fe.delta.position==="bottom"&&(et=null,Ot=Ee.height,ze={width:Math.max(ke.width,Ee.width),height:ke.height+Ee.height,left:Math.min(ke.left,Ee.left),right:Math.max(ke.right,Ee.right),top:ke.bottom-ke.height,bottom:ke.bottom+Ee.height}),Fe.delta.position==="top"&&(et=null,Ot=ke.top,ze={width:Math.max(ke.width,Ee.width),height:ke.height+Ee.height,left:Math.min(ke.left,Ee.left),right:Math.max(ke.right,Ee.right),top:ke.bottom-ke.height-Ee.height,bottom:ke.bottom}),At.attr({dx:et,dy:Ot})}(Fe._hasNumber||Fe._hasDelta)&&nt.attr("transform",function(){var Ge=Me.numbersScaler(ze);at+=Ge[2];var Tt,dt=D(Fe,"numbersScale",1,Ge[0],at,Math.min);Fe._scaleNumbers||(dt=1),Tt=Fe._isAngular?Ke-dt*ze.bottom:Ke-dt*(ze.top+ze.bottom)/2,Fe._numbersTop=dt*ze.top+Tt;var Pe=ze[Re];Re==="center"&&(Pe=(ze.left+ze.right)/2);var Ie=Ve-dt*Pe;return Ie=D(Fe,"numbersTranslate",0,Ie,at,Math.max),s(Ie,Tt)+i(dt)})})(O,re,B,{numbersX:G,numbersY:W,numbersScaler:K,transitionOpts:z,onComplete:P}),U&&(te={range:Z.gauge.axis.range,color:Z.gauge.bgcolor,line:{color:Z.gauge.bordercolor,width:0},thickness:1},Y={range:Z.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:Z.gauge.bordercolor,width:Z.gauge.borderwidth},thickness:1});var fe=re.selectAll("g.angular").data(q?B:[]);fe.exit().remove();var me=re.selectAll("g.angularaxis").data(q?B:[]);me.exit().remove(),q&&function(Oe,de,ye,Me){var ke,Ee,ze,Fe,Ve=ye[0].trace,Ke=Me.size,Re=Me.radius,qe=Me.innerRadius,We=Me.gaugeBg,Ye=Me.gaugeOutline,nt=[Ke.l+Ke.w/2,Ke.t+Ke.h/2+Re/2],ft=Me.gauge,vt=Me.layer,Pt=Me.transitionOpts,At=Me.onComplete,at=Math.PI/2;function et(Ut){var tt=Ve.gauge.axis.range[0],bt=(Ut-tt)/(Ve.gauge.axis.range[1]-tt)*Math.PI-at;return bt<-at?-at:bt>at?at:bt}function Ot(Ut){return r.svg.arc().innerRadius((qe+Re)/2-Ut/2*(Re-qe)).outerRadius((qe+Re)/2+Ut/2*(Re-qe)).startAngle(-at)}function Wt(Ut){Ut.attr("d",function(tt){return Ot(tt.thickness).startAngle(et(tt.range[0])).endAngle(et(tt.range[1]))()})}ft.enter().append("g").classed("angular",!0),ft.attr("transform",s(nt[0],nt[1])),vt.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),vt.selectAll("g.xangularaxistick,path,text").remove(),(ke=A(Oe,Ve.gauge.axis)).type="linear",ke.range=Ve.gauge.axis.range,ke._id="xangularaxis",ke.ticklabeloverflow="allow",ke.setScale();var Jt=function(Ut){return(ke.range[0]-Ut.x)/(ke.range[1]-ke.range[0])*Math.PI+Math.PI},Be={},Ge=p.makeLabelFns(ke,0).labelStandoff;Be.xFn=function(Ut){var tt=Jt(Ut);return Math.cos(tt)*Ge},Be.yFn=function(Ut){var tt=Jt(Ut),bt=Math.sin(tt)>0?.2:1;return-Math.sin(tt)*(Ge+Ut.fontSize*bt)+Math.abs(Math.cos(tt))*(Ut.fontSize*d)},Be.anchorFn=function(Ut){var tt=Jt(Ut),bt=Math.cos(tt);return Math.abs(bt)<.1?"middle":bt>0?"start":"end"},Be.heightFn=function(Ut,tt,bt){var zt=Jt(Ut);return-.5*(1+Math.sin(zt))*bt};var Tt=function(Ut){return s(nt[0]+Re*Math.cos(Ut),nt[1]-Re*Math.sin(Ut))};if(ze=function(Ut){return Tt(Jt(Ut))},Ee=p.calcTicks(ke),Fe=p.getTickSigns(ke)[2],ke.visible){Fe=ke.ticks==="inside"?-1:1;var dt=(ke.linewidth||1)/2;p.drawTicks(Oe,ke,{vals:Ee,layer:vt,path:"M"+Fe*dt+",0h"+Fe*ke.ticklen,transFn:function(Ut){var tt=Jt(Ut);return Tt(tt)+"rotate("+-l(tt)+")"}}),p.drawLabels(Oe,ke,{vals:Ee,layer:vt,transFn:ze,labelFns:Be})}var Pe=[We].concat(Ve.gauge.steps),Ie=ft.selectAll("g.bg-arc").data(Pe);Ie.enter().append("g").classed("bg-arc",!0).append("path"),Ie.select("path").call(Wt).call(M),Ie.exit().remove();var Ae=Ot(Ve.gauge.bar.thickness),De=ft.selectAll("g.value-arc").data([Ve.gauge.bar]);De.enter().append("g").classed("value-arc",!0).append("path");var He=De.select("path");_(Pt)?(He.transition().duration(Pt.duration).ease(Pt.easing).each("end",function(){At&&At()}).each("interrupt",function(){At&&At()}).attrTween("d",(rt=Ae,lt=et(ye[0].lastY),ot=et(ye[0].y),function(){var Ut=a(lt,ot);return function(tt){return rt.endAngle(Ut(tt))()}})),Ve._lastValue=ye[0].y):He.attr("d",typeof ye[0].y=="number"?Ae.endAngle(et(ye[0].y)):"M0,0Z");var rt,lt,ot;He.call(M),De.exit().remove(),Pe=[];var kt=Ve.gauge.threshold.value;(kt||kt===0)&&Pe.push({range:[kt,kt],color:Ve.gauge.threshold.color,line:{color:Ve.gauge.threshold.line.color,width:Ve.gauge.threshold.line.width},thickness:Ve.gauge.threshold.thickness});var wt=ft.selectAll("g.threshold-arc").data(Pe);wt.enter().append("g").classed("threshold-arc",!0).append("path"),wt.select("path").call(Wt).call(M),wt.exit().remove();var Vt=ft.selectAll("g.gauge-outline").data([Ye]);Vt.enter().append("g").classed("gauge-outline",!0).append("path"),Vt.select("path").call(Wt).call(M),Vt.exit().remove()}(O,0,B,{radius:ie,innerRadius:ae,gauge:fe,layer:me,size:H,gaugeBg:te,gaugeOutline:Y,transitionOpts:z,onComplete:P});var _e=re.selectAll("g.bullet").data($?B:[]);_e.exit().remove();var we=re.selectAll("g.bulletaxis").data($?B:[]);we.exit().remove(),$&&function(Oe,de,ye,Me){var ke,Ee,ze,Fe,Ve,Ke=ye[0].trace,Re=Me.gauge,qe=Me.layer,We=Me.gaugeBg,Ye=Me.gaugeOutline,nt=Me.size,ft=Ke.domain,vt=Me.transitionOpts,Pt=Me.onComplete;Re.enter().append("g").classed("bullet",!0),Re.attr("transform",s(nt.l,nt.t)),qe.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),qe.selectAll("g.xbulletaxistick,path,text").remove();var At=nt.h,at=Ke.gauge.bar.thickness*At,et=ft.x[0],Ot=ft.x[0]+(ft.x[1]-ft.x[0])*(Ke._hasNumber||Ke._hasDelta?1-m.bulletNumberDomainSize:1);(ke=A(Oe,Ke.gauge.axis))._id="xbulletaxis",ke.domain=[et,Ot],ke.setScale(),Ee=p.calcTicks(ke),ze=p.makeTransTickFn(ke),Fe=p.getTickSigns(ke)[2],Ve=nt.t+nt.h,ke.visible&&(p.drawTicks(Oe,ke,{vals:ke.ticks==="inside"?p.clipEnds(ke,Ee):Ee,layer:qe,path:p.makeTickPath(ke,Ve,Fe),transFn:ze}),p.drawLabels(Oe,ke,{vals:Ee,layer:qe,transFn:ze,labelFns:p.makeLabelFns(ke,Ve)}));function Wt(Ie){Ie.attr("width",function(Ae){return Math.max(0,ke.c2p(Ae.range[1])-ke.c2p(Ae.range[0]))}).attr("x",function(Ae){return ke.c2p(Ae.range[0])}).attr("y",function(Ae){return .5*(1-Ae.thickness)*At}).attr("height",function(Ae){return Ae.thickness*At})}var Jt=[We].concat(Ke.gauge.steps),Be=Re.selectAll("g.bg-bullet").data(Jt);Be.enter().append("g").classed("bg-bullet",!0).append("rect"),Be.select("rect").call(Wt).call(M),Be.exit().remove();var Ge=Re.selectAll("g.value-bullet").data([Ke.gauge.bar]);Ge.enter().append("g").classed("value-bullet",!0).append("rect"),Ge.select("rect").attr("height",at).attr("y",(At-at)/2).call(M),_(vt)?Ge.select("rect").transition().duration(vt.duration).ease(vt.easing).each("end",function(){Pt&&Pt()}).each("interrupt",function(){Pt&&Pt()}).attr("width",Math.max(0,ke.c2p(Math.min(Ke.gauge.axis.range[1],ye[0].y)))):Ge.select("rect").attr("width",typeof ye[0].y=="number"?Math.max(0,ke.c2p(Math.min(Ke.gauge.axis.range[1],ye[0].y))):0),Ge.exit().remove();var Tt=ye.filter(function(){return Ke.gauge.threshold.value||Ke.gauge.threshold.value===0}),dt=Re.selectAll("g.threshold-bullet").data(Tt);dt.enter().append("g").classed("threshold-bullet",!0).append("line"),dt.select("line").attr("x1",ke.c2p(Ke.gauge.threshold.value)).attr("x2",ke.c2p(Ke.gauge.threshold.value)).attr("y1",(1-Ke.gauge.threshold.thickness)/2*At).attr("y2",(1-(1-Ke.gauge.threshold.thickness)/2)*At).call(w.stroke,Ke.gauge.threshold.line.color).style("stroke-width",Ke.gauge.threshold.line.width),dt.exit().remove();var Pe=Re.selectAll("g.gauge-outline").data([Ye]);Pe.enter().append("g").classed("gauge-outline",!0).append("rect"),Pe.select("rect").call(Wt).call(M),Pe.exit().remove()}(O,0,B,{gauge:_e,layer:we,size:H,gaugeBg:te,gaugeOutline:Y,transitionOpts:z,onComplete:P});var Te=re.selectAll("text.title").data(B);Te.exit().remove(),Te.enter().append("text").classed("title",!0),Te.attr("text-anchor",function(){return $?k.right:k[Z.title.align]}).text(Z.title.text).call(h.font,Z.title.font).call(g.convertToTspans,O),Te.attr("transform",function(){var Oe,de=H.l+H.w*b[Z.title.align],ye=m.titlePadding,Me=h.bBox(Te.node());return U?(q&&(Z.gauge.axis.visible?Oe=h.bBox(me.node()).top-ye-Me.bottom:Oe=H.t+H.h/2-ie/2-Me.bottom-ye),$&&(Oe=W-(Me.top+Me.bottom)/2,de=H.l-m.bulletPadding*H.w)):Oe=Z._numbersTop-ye-Me.bottom,s(de,Oe)})})}},{"../../components/color":366,"../../components/drawing":388,"../../constants/alignment":471,"../../lib":503,"../../lib/svg_text_utils":529,"../../plots/cartesian/axes":554,"../../plots/cartesian/axis_defaults":556,"../../plots/cartesian/layout_attributes":569,"../../plots/cartesian/position_defaults":572,"./constants":858,"@plotly/d3":58,"d3-interpolate":116}],862:[function(e,o,f){var r=e("../../components/colorscale/attributes"),a=e("../../plots/cartesian/axis_format_attributes").axisHoverFormat,u=e("../../plots/template_attributes").hovertemplateAttrs,c=e("../mesh3d/attributes"),i=e("../../plots/attributes"),s=e("../../lib/extend").extendFlat,l=e("../../plot_api/edit_types").overrideAll,d=o.exports=l(s({x:{valType:"data_array"},y:{valType:"data_array"},z:{valType:"data_array"},value:{valType:"data_array"},isomin:{valType:"number"},isomax:{valType:"number"},surface:{show:{valType:"boolean",dflt:!0},count:{valType:"integer",dflt:2,min:1},fill:{valType:"number",min:0,max:1,dflt:1},pattern:{valType:"flaglist",flags:["A","B","C","D","E"],extras:["all","odd","even"],dflt:"all"}},spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:.15}},slices:{x:{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}},y:{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}},z:{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}},caps:{x:{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}},y:{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}},z:{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:u(),xhoverformat:a("x"),yhoverformat:a("y"),zhoverformat:a("z"),valuehoverformat:a("value",1),showlegend:s({},i.showlegend,{dflt:!1})},r("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:c.opacity,lightposition:c.lightposition,lighting:c.lighting,flatshading:c.flatshading,contour:c.contour,hoverinfo:s({},i.hoverinfo)}),"calc","nested");d.flatshading.dflt=!0,d.lighting.facenormalsepsilon.dflt=0,d.x.editType=d.y.editType=d.z.editType=d.value.editType="calc+clearAxisTypes",d.transforms=void 0},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plot_api/edit_types":536,"../../plots/attributes":550,"../../plots/cartesian/axis_format_attributes":557,"../../plots/template_attributes":633,"../mesh3d/attributes":867}],863:[function(e,o,f){var r=e("../../components/colorscale/calc"),a=e("../streamtube/calc").processGrid,u=e("../streamtube/calc").filter;o.exports=function(c,i){i._len=Math.min(i.x.length,i.y.length,i.z.length,i.value.length),i._x=u(i.x,i._len),i._y=u(i.y,i._len),i._z=u(i.z,i._len),i._value=u(i.value,i._len);var s=a(i);i._gridFill=s.fill,i._Xs=s.Xs,i._Ys=s.Ys,i._Zs=s.Zs,i._len=s.len;for(var l=1/0,d=-1/0,h=0;h0;v--){var y=Math.min(p[v],p[v-1]),x=Math.max(p[v],p[v-1]);if(x>y&&y-1}function Q(Re,qe){return Re===null?qe:Re}function ee(Re,qe,We){re();var Ye,nt,ft,vt=[qe],Pt=[We];if(b>=1)vt=[qe],Pt=[We];else if(b>0){var At=function(dt,Pe){var Ie=dt[0],Ae=dt[1],De=dt[2],He=function(tt,bt,zt){for(var St=[],Dt=0;Dt-1?We[Ot]:Z(Wt,Jt,Be);et[Ot]=Tt>-1?Tt:q(Wt,Jt,Be,Q(Re,Ge))}Ye=et[0],nt=et[1],ft=et[2],g._meshI.push(Ye),g._meshJ.push(nt),g._meshK.push(ft),++D}}function ie(Re,qe,We,Ye){var nt=Re[3];ntYe&&(nt=Ye);for(var ft=(Re[3]-nt)/(Re[3]-qe[3]+1e-9),vt=[],Pt=0;Pt<4;Pt++)vt[Pt]=(1-ft)*Re[Pt]+ft*qe[Pt];return vt}function ae(Re,qe,We){return Re>=qe&&Re<=We}function ue(Re){var qe=.001*(Y-te);return Re>=te-qe&&Re<=Y+qe}function le(Re){for(var qe=[],We=0;We<4;We++){var Ye=Re[We];qe.push([g._x[Ye],g._y[Ye],g._z[Ye],g._value[Ye]])}return qe}function ge(Re,qe,We,Ye,nt,ft){ft||(ft=1),We=[-1,-1,-1];var vt=!1,Pt=[ae(qe[0][3],Ye,nt),ae(qe[1][3],Ye,nt),ae(qe[2][3],Ye,nt)];if(!Pt[0]&&!Pt[1]&&!Pt[2])return!1;var At=function(et,Ot,Wt){return ue(Ot[0][3])&&ue(Ot[1][3])&&ue(Ot[2][3])?(ee(et,Ot,Wt),!0):ft<3&&ge(et,Ot,Wt,te,Y,++ft)};if(Pt[0]&&Pt[1]&&Pt[2])return At(Re,qe,We)||vt;var at=!1;return[[0,1,2],[2,0,1],[1,2,0]].forEach(function(et){if(Pt[et[0]]&&Pt[et[1]]&&!Pt[et[2]]){var Ot=qe[et[0]],Wt=qe[et[1]],Jt=qe[et[2]],Be=ie(Jt,Ot,Ye,nt),Ge=ie(Jt,Wt,Ye,nt);vt=At(Re,[Ge,Be,Ot],[-1,-1,We[et[0]]])||vt,vt=At(Re,[Ot,Wt,Ge],[We[et[0]],We[et[1]],-1])||vt,at=!0}}),at||[[0,1,2],[1,2,0],[2,0,1]].forEach(function(et){if(Pt[et[0]]&&!Pt[et[1]]&&!Pt[et[2]]){var Ot=qe[et[0]],Wt=qe[et[1]],Jt=qe[et[2]],Be=ie(Wt,Ot,Ye,nt),Ge=ie(Jt,Ot,Ye,nt);vt=At(Re,[Ge,Be,Ot],[-1,-1,We[et[0]]])||vt,at=!0}}),vt}function fe(Re,qe,We,Ye){var nt=!1,ft=le(qe),vt=[ae(ft[0][3],We,Ye),ae(ft[1][3],We,Ye),ae(ft[2][3],We,Ye),ae(ft[3][3],We,Ye)];if(!(vt[0]||vt[1]||vt[2]||vt[3]))return nt;if(vt[0]&&vt[1]&&vt[2]&&vt[3])return E&&(nt=function(At,at,et){var Ot=function(Wt,Jt,Be){ee(At,[at[Wt],at[Jt],at[Be]],[et[Wt],et[Jt],et[Be]])};Ot(0,1,2),Ot(3,0,1),Ot(2,3,0),Ot(1,2,3)}(Re,ft,qe)||nt),nt;var Pt=!1;return[[0,1,2,3],[3,0,1,2],[2,3,0,1],[1,2,3,0]].forEach(function(At){if(vt[At[0]]&&vt[At[1]]&&vt[At[2]]&&!vt[At[3]]){var at=ft[At[0]],et=ft[At[1]],Ot=ft[At[2]],Wt=ft[At[3]];if(E)nt=ee(Re,[at,et,Ot],[qe[At[0]],qe[At[1]],qe[At[2]]])||nt;else{var Jt=ie(Wt,at,We,Ye),Be=ie(Wt,et,We,Ye),Ge=ie(Wt,Ot,We,Ye);nt=ee(null,[Jt,Be,Ge],[-1,-1,-1])||nt}Pt=!0}}),Pt||([[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2],[0,2,3,1],[1,3,2,0]].forEach(function(At){if(vt[At[0]]&&vt[At[1]]&&!vt[At[2]]&&!vt[At[3]]){var at=ft[At[0]],et=ft[At[1]],Ot=ft[At[2]],Wt=ft[At[3]],Jt=ie(Ot,at,We,Ye),Be=ie(Ot,et,We,Ye),Ge=ie(Wt,et,We,Ye),Tt=ie(Wt,at,We,Ye);E?(nt=ee(Re,[at,Tt,Jt],[qe[At[0]],-1,-1])||nt,nt=ee(Re,[et,Be,Ge],[qe[At[1]],-1,-1])||nt):nt=function(dt,Pe,Ie){var Ae=function(De,He,rt){ee(dt,[Pe[De],Pe[He],Pe[rt]],[Ie[De],Ie[He],Ie[rt]])};Ae(0,1,2),Ae(2,3,0)}(null,[Jt,Be,Ge,Tt],[-1,-1,-1,-1])||nt,Pt=!0}}),Pt||[[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2]].forEach(function(At){if(vt[At[0]]&&!vt[At[1]]&&!vt[At[2]]&&!vt[At[3]]){var at=ft[At[0]],et=ft[At[1]],Ot=ft[At[2]],Wt=ft[At[3]],Jt=ie(et,at,We,Ye),Be=ie(Ot,at,We,Ye),Ge=ie(Wt,at,We,Ye);E?(nt=ee(Re,[at,Jt,Be],[qe[At[0]],-1,-1])||nt,nt=ee(Re,[at,Be,Ge],[qe[At[0]],-1,-1])||nt,nt=ee(Re,[at,Ge,Jt],[qe[At[0]],-1,-1])||nt):nt=ee(null,[Jt,Be,Ge],[-1,-1,-1])||nt,Pt=!0}})),nt}function me(Re,qe,We,Ye,nt,ft,vt,Pt,At,at,et){var Ot=!1;return S&&(H(Re,"A")&&(Ot=fe(null,[qe,We,Ye,ft],at,et)||Ot),H(Re,"B")&&(Ot=fe(null,[We,Ye,nt,At],at,et)||Ot),H(Re,"C")&&(Ot=fe(null,[We,ft,vt,At],at,et)||Ot),H(Re,"D")&&(Ot=fe(null,[Ye,ft,Pt,At],at,et)||Ot),H(Re,"E")&&(Ot=fe(null,[We,Ye,ft,At],at,et)||Ot)),E&&(Ot=fe(Re,[We,Ye,ft,At],at,et)||Ot),Ot}function _e(Re,qe,We,Ye,nt,ft,vt,Pt){return[Pt[0]===!0||ge(Re,le([qe,We,Ye]),[qe,We,Ye],ft,vt),Pt[1]===!0||ge(Re,le([Ye,nt,qe]),[Ye,nt,qe],ft,vt)]}function we(Re,qe,We,Ye,nt,ft,vt,Pt,At){return Pt?_e(Re,qe,We,nt,Ye,ft,vt,At):_e(Re,We,nt,Ye,qe,ft,vt,At)}function Te(Re,qe,We,Ye,nt,ft,vt){var Pt,At,at,et,Ot=!1,Wt=function(){Ot=ge(Re,[Pt,At,at],[-1,-1,-1],nt,ft)||Ot,Ot=ge(Re,[at,et,Pt],[-1,-1,-1],nt,ft)||Ot},Jt=vt[0],Be=vt[1],Ge=vt[2];return Jt&&(Pt=$(le([G(qe,We-0,Ye-0)])[0],le([G(qe-1,We-0,Ye-0)])[0],Jt),At=$(le([G(qe,We-0,Ye-1)])[0],le([G(qe-1,We-0,Ye-1)])[0],Jt),at=$(le([G(qe,We-1,Ye-1)])[0],le([G(qe-1,We-1,Ye-1)])[0],Jt),et=$(le([G(qe,We-1,Ye-0)])[0],le([G(qe-1,We-1,Ye-0)])[0],Jt),Wt()),Be&&(Pt=$(le([G(qe-0,We,Ye-0)])[0],le([G(qe-0,We-1,Ye-0)])[0],Be),At=$(le([G(qe-0,We,Ye-1)])[0],le([G(qe-0,We-1,Ye-1)])[0],Be),at=$(le([G(qe-1,We,Ye-1)])[0],le([G(qe-1,We-1,Ye-1)])[0],Be),et=$(le([G(qe-1,We,Ye-0)])[0],le([G(qe-1,We-1,Ye-0)])[0],Be),Wt()),Ge&&(Pt=$(le([G(qe-0,We-0,Ye)])[0],le([G(qe-0,We-0,Ye-1)])[0],Ge),At=$(le([G(qe-0,We-1,Ye)])[0],le([G(qe-0,We-1,Ye-1)])[0],Ge),at=$(le([G(qe-1,We-1,Ye)])[0],le([G(qe-1,We-1,Ye-1)])[0],Ge),et=$(le([G(qe-1,We-0,Ye)])[0],le([G(qe-1,We-0,Ye-1)])[0],Ge),Wt()),Ot}function Oe(Re,qe,We,Ye,nt,ft,vt,Pt,At,at,et,Ot){var Wt=Re;return Ot?(S&&Re==="even"&&(Wt=null),me(Wt,qe,We,Ye,nt,ft,vt,Pt,At,at,et)):(S&&Re==="odd"&&(Wt=null),me(Wt,At,Pt,vt,ft,nt,Ye,We,qe,at,et))}function de(Re,qe,We,Ye,nt){for(var ft=[],vt=0,Pt=0;PtMath.abs(nt-K)?[W,nt]:[nt,K];Ee(Re,ft[0],ft[1])}}var vt=[[Math.min(te,K),Math.max(te,K)],[Math.min(W,Y),Math.max(W,Y)]];["x","y","z"].forEach(function(Pt){for(var At=[],at=0;at0&&(Ge.push(Pe.id),Pt==="x"?Tt.push([Pe.distRatio,0,0]):Pt==="y"?Tt.push([0,Pe.distRatio,0]):Tt.push([0,0,Pe.distRatio]))}else Be=Ke(1,Pt==="x"?L-1:Pt==="y"?P-1:N-1);Ge.length>0&&(At[et]=Pt==="x"?ze(null,Ge,Ot,Wt,Tt,At[et]):Pt==="y"?Fe(null,Ge,Ot,Wt,Tt,At[et]):Ve(null,Ge,Ot,Wt,Tt,At[et]),et++),Be.length>0&&(At[et]=Pt==="x"?de(null,Be,Ot,Wt,At[et]):Pt==="y"?ye(null,Be,Ot,Wt,At[et]):Me(null,Be,Ot,Wt,At[et]),et++)}var Ie=g.caps[Pt];Ie.show&&Ie.fill&&(ne(Ie.fill),At[et]=Pt==="x"?de(null,[0,L-1],Ot,Wt,At[et]):Pt==="y"?ye(null,[0,P-1],Ot,Wt,At[et]):Me(null,[0,N-1],Ot,Wt,At[et]),et++)}}),D===0&&U(),g._meshX=y,g._meshY=x,g._meshZ=w,g._meshIntensity=k,g._Xs=O,g._Ys=R,g._Zs=z}(),g}o.exports={findNearestOnAxis:s,generateIsoMeshes:m,createIsosurfaceTrace:function(g,p){var v=g.glplot.gl,y=r({gl:v}),x=new l(g,y,p.uid);return y._trace=x,x.update(p),g.glplot.add(y),x}}},{"../../../stackgl_modules":1124,"../../components/colorscale":378,"../../lib/gl_format_color":499,"../../lib/str2rgbarray":528,"../../plots/gl3d/zip3":609}],865:[function(e,o,f){var r=e("../../lib"),a=e("../../registry"),u=e("./attributes"),c=e("../../components/colorscale/defaults");function i(s,l,d,h,m){var g=m("isomin"),p=m("isomax");p!=null&&g!=null&&g>p&&(l.isomin=null,l.isomax=null);var v=m("x"),y=m("y"),x=m("z"),w=m("value");v&&v.length&&y&&y.length&&x&&x.length&&w&&w.length?(a.getComponentMethod("calendars","handleTraceDefaults")(s,l,["x","y","z"],h),m("valuehoverformat"),["x","y","z"].forEach(function(k){m(k+"hoverformat");var b="caps."+k;m(b+".show")&&m(b+".fill");var T="slices."+k;m(T+".show")&&(m(T+".fill"),m(T+".locations"))}),m("spaceframe.show")&&m("spaceframe.fill"),m("surface.show")&&(m("surface.count"),m("surface.fill"),m("surface.pattern")),m("contour.show")&&(m("contour.color"),m("contour.width")),["text","hovertext","hovertemplate","lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","opacity"].forEach(function(k){m(k)}),c(s,l,h,m,{prefix:"",cLetter:"c"}),l._length=null):l.visible=!1}o.exports={supplyDefaults:function(s,l,d,h){i(s,l,d,h,function(m,g){return r.coerce(s,l,u,m,g)})},supplyIsoDefaults:i}},{"../../components/colorscale/defaults":376,"../../lib":503,"../../registry":638,"./attributes":862}],866:[function(e,o,f){o.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults").supplyDefaults,calc:e("./calc"),colorbar:{min:"cmin",max:"cmax"},plot:e("./convert").createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:e("../../plots/gl3d"),categories:["gl3d","showLegend"],meta:{}}},{"../../plots/gl3d":598,"./attributes":862,"./calc":863,"./convert":864,"./defaults":865}],867:[function(e,o,f){var r=e("../../components/colorscale/attributes"),a=e("../../plots/cartesian/axis_format_attributes").axisHoverFormat,u=e("../../plots/template_attributes").hovertemplateAttrs,c=e("../surface/attributes"),i=e("../../plots/attributes"),s=e("../../lib/extend").extendFlat;o.exports=s({x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},i:{valType:"data_array",editType:"calc"},j:{valType:"data_array",editType:"calc"},k:{valType:"data_array",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:u({editType:"calc"}),xhoverformat:a("x"),yhoverformat:a("y"),zhoverformat:a("z"),delaunayaxis:{valType:"enumerated",values:["x","y","z"],dflt:"z",editType:"calc"},alphahull:{valType:"number",dflt:-1,editType:"calc"},intensity:{valType:"data_array",editType:"calc"},intensitymode:{valType:"enumerated",values:["vertex","cell"],dflt:"vertex",editType:"calc"},color:{valType:"color",editType:"calc"},vertexcolor:{valType:"data_array",editType:"calc"},facecolor:{valType:"data_array",editType:"calc"},transforms:void 0},r("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:c.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:s({},c.contours.x.show,{}),color:c.contours.x.color,width:c.contours.x.width,editType:"calc"},lightposition:{x:s({},c.lightposition.x,{dflt:1e5}),y:s({},c.lightposition.y,{dflt:1e5}),z:s({},c.lightposition.z,{dflt:0}),editType:"calc"},lighting:s({vertexnormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-12,editType:"calc"},facenormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-6,editType:"calc"},editType:"calc"},c.lighting),hoverinfo:s({},i.hoverinfo,{editType:"calc"}),showlegend:s({},i.showlegend,{dflt:!1})})},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plots/attributes":550,"../../plots/cartesian/axis_format_attributes":557,"../../plots/template_attributes":633,"../surface/attributes":1061}],868:[function(e,o,f){var r=e("../../components/colorscale/calc");o.exports=function(a,u){u.intensity&&r(a,u,{vals:u.intensity,containerStr:"",cLetter:"c"})}},{"../../components/colorscale/calc":374}],869:[function(e,o,f){var r=e("../../../stackgl_modules").gl_mesh3d,a=e("../../../stackgl_modules").delaunay_triangulate,u=e("../../../stackgl_modules").alpha_shape,c=e("../../../stackgl_modules").convex_hull,i=e("../../lib/gl_format_color").parseColorScale,s=e("../../lib/str2rgbarray"),l=e("../../components/colorscale").extractOpts,d=e("../../plots/gl3d/zip3");function h(x,w,k){this.scene=x,this.uid=k,this.mesh=w,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var m=h.prototype;function g(x){for(var w=[],k=x.length,b=0;b=w-.5)return!1;return!0}m.handlePick=function(x){if(x.object===this.mesh){var w=x.index=x.data.index;x.data._cellCenter?x.traceCoordinate=x.data.dataCoordinate:x.traceCoordinate=[this.data.x[w],this.data.y[w],this.data.z[w]];var k=this.data.hovertext||this.data.text;return Array.isArray(k)&&k[w]!==void 0?x.textLabel=k[w]:k&&(x.textLabel=k),!0}},m.update=function(x){var w=this.scene,k=w.fullSceneLayout;this.data=x;var b,T=x.x.length,_=d(p(k.xaxis,x.x,w.dataScale[0],x.xcalendar),p(k.yaxis,x.y,w.dataScale[1],x.ycalendar),p(k.zaxis,x.z,w.dataScale[2],x.zcalendar));if(x.i&&x.j&&x.k){if(x.i.length!==x.j.length||x.j.length!==x.k.length||!y(x.i,T)||!y(x.j,T)||!y(x.k,T))return;b=d(v(x.i),v(x.j),v(x.k))}else b=x.alphahull===0?c(_):x.alphahull>0?u(x.alphahull,_):function(E,D){for(var O=["x","y","z"].indexOf(E),R=[],z=D.length,L=0;LM):_=L>O,M=L;var P=v(O,R,z,L);P.pos=D,P.yc=(O+L)/2,P.i=E,P.dir=_?"increasing":"decreasing",P.x=P.pos,P.y=[z,R],A&&(P.orig_p=m[E]),b&&(P.tx=h.text[E]),T&&(P.htx=h.hovertext[E]),S.push(P)}else S.push({pos:D,empty:!0})}return h._extremes[p._id]=u.findExtremes(p,r.concat(w,x),{padded:!0}),S.length&&(S[0].t={labels:{open:a(d,"open:")+" ",high:a(d,"high:")+" ",low:a(d,"low:")+" ",close:a(d,"close:")+" "}}),S}o.exports={calc:function(d,h){var m=u.getFromId(d,h.xaxis),g=u.getFromId(d,h.yaxis),p=function(k,b,T){var _=T._minDiff;if(!_){var M,A=k._fullData,S=[];for(_=1/0,M=0;M"+b.labels[R]+r.hoverLabelText(w,z,k.yhoverformat):((O=a.extendFlat({},_)).y0=O.y1=L,O.yLabelVal=z,O.yLabel=b.labels[R]+r.hoverLabelText(w,z,k.yhoverformat),O.name="",T.push(O),E[z]=O)}return T}function m(g,p,v,y){var x=g.cd,w=g.ya,k=x[0].trace,b=x[0].t,T=d(g,p,v,y);if(!T)return[];var _=x[T.index],M=T.index=_.i,A=_.dir;function S(P){return b.labels[P]+r.hoverLabelText(w,k[P][M],k.yhoverformat)}var E=_.hi||k.hoverinfo,D=E.split("+"),O=E==="all",R=O||D.indexOf("y")!==-1,z=O||D.indexOf("text")!==-1,L=R?[S("open"),S("high"),S("low"),S("close")+" "+l[A]]:[];return z&&i(_,k,L),T.extraText=L.join("
"),T.y0=T.y1=w.c2p(_.yc,!0),[T]}o.exports={hoverPoints:function(g,p,v,y){return g.cd[0].trace.hoverlabel.split?h(g,p,v,y):m(g,p,v,y)},hoverSplit:h,hoverOnPoints:m}},{"../../components/color":366,"../../components/fx":406,"../../constants/delta.js":473,"../../lib":503,"../../plots/cartesian/axes":554}],876:[function(e,o,f){o.exports={moduleType:"trace",name:"ohlc",basePlotModule:e("../../plots/cartesian"),categories:["cartesian","svg","showLegend"],meta:{},attributes:e("./attributes"),supplyDefaults:e("./defaults"),calc:e("./calc").calc,plot:e("./plot"),style:e("./style"),hoverPoints:e("./hover").hoverPoints,selectPoints:e("./select")}},{"../../plots/cartesian":568,"./attributes":872,"./calc":873,"./defaults":874,"./hover":875,"./plot":878,"./select":879,"./style":880}],877:[function(e,o,f){var r=e("../../registry"),a=e("../../lib");o.exports=function(u,c,i,s){var l=i("x"),d=i("open"),h=i("high"),m=i("low"),g=i("close");if(i("hoverlabel.split"),r.getComponentMethod("calendars","handleTraceDefaults")(u,c,["x"],s),d&&h&&m&&g){var p=Math.min(d.length,h.length,m.length,g.length);return l&&(p=Math.min(p,a.minRowLength(l))),c._length=p,p}}},{"../../lib":503,"../../registry":638}],878:[function(e,o,f){var r=e("@plotly/d3"),a=e("../../lib");o.exports=function(u,c,i,s){var l=c.yaxis,d=c.xaxis,h=!!d.rangebreaks;a.makeTraceGroups(s,i,"trace ohlc").each(function(m){var g=r.select(this),p=m[0],v=p.t;if(p.trace.visible!==!0||v.empty)g.remove();else{var y=v.tickLen,x=g.selectAll("path").data(a.identity);x.enter().append("path"),x.exit().remove(),x.attr("d",function(w){if(w.empty)return"M0,0Z";var k=d.c2p(w.pos-y,!0),b=d.c2p(w.pos+y,!0),T=h?(k+b)/2:d.c2p(w.pos,!0);return"M"+k+","+l.c2p(w.o,!0)+"H"+T+"M"+T+","+l.c2p(w.h,!0)+"V"+l.c2p(w.l,!0)+"M"+b+","+l.c2p(w.c,!0)+"H"+T})}})}},{"../../lib":503,"@plotly/d3":58}],879:[function(e,o,f){o.exports=function(r,a){var u,c=r.cd,i=r.xaxis,s=r.yaxis,l=[],d=c[0].t.bPos||0;if(a===!1)for(u=0;u=U.length||q[U[$]]!==void 0)return!1;q[U[$]]=!0}return!0}(Z.map(function(U){return U.displayindex})))for(re=0;re0;w&&(y="array");var k=g("categoryorder",y);k==="array"?(g("categoryarray"),g("ticktext")):(delete h.categoryarray,delete h.ticktext),w||k!=="array"||(m.categoryorder="trace")}}o.exports=function(h,m,g,p){function v(b,T){return r.coerce(h,m,s,b,T)}var y=i(h,m,{name:"dimensions",handleItemDefaults:d}),x=function(b,T,_,M,A){A("line.shape"),A("line.hovertemplate");var S=A("line.color",M.colorway[0]);if(a(b,"line")&&r.isArrayOrTypedArray(S)){if(S.length)return A("line.colorscale"),u(b,T,M,A,{prefix:"line.",cLetter:"c"}),S.length;T.line.color=_}return 1/0}(h,m,g,p,v);c(m,p,v),Array.isArray(y)&&y.length||(m.visible=!1),l(m,y,"values",x),v("hoveron"),v("hovertemplate"),v("arrangement"),v("bundlecolors"),v("sortpaths"),v("counts");var w={family:p.font.family,size:Math.round(p.font.size),color:p.font.color};r.coerceFont(v,"labelfont",w);var k={family:p.font.family,size:Math.round(p.font.size/1.2),color:p.font.color};r.coerceFont(v,"tickfont",k)}},{"../../components/colorscale/defaults":376,"../../components/colorscale/helpers":377,"../../lib":503,"../../plots/array_container_defaults":549,"../../plots/domain":584,"../parcoords/merge_length":898,"./attributes":881}],885:[function(e,o,f){o.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),calc:e("./calc"),plot:e("./plot"),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:e("./base_plot"),categories:["noOpacity"],meta:{}}},{"./attributes":881,"./base_plot":882,"./calc":883,"./defaults":884,"./plot":887}],886:[function(e,o,f){var r=e("@plotly/d3"),a=e("d3-interpolate").interpolateNumber,u=e("../../plot_api/plot_api"),c=e("../../components/fx"),i=e("../../lib"),s=i.strTranslate,l=e("../../components/drawing"),d=e("tinycolor2"),h=e("../../lib/svg_text_utils");function m(U,q,$,ne){var H=U.map(K.bind(0,q,$)),Q=ne.selectAll("g.parcatslayer").data([null]);Q.enter().append("g").attr("class","parcatslayer").style("pointer-events","all");var ee=Q.selectAll("g.trace.parcats").data(H,g),ie=ee.enter().append("g").attr("class","trace parcats");ee.attr("transform",function(Te){return s(Te.x,Te.y)}),ie.append("g").attr("class","paths");var ae=ee.select("g.paths").selectAll("path.path").data(function(Te){return Te.paths},g);ae.attr("fill",function(Te){return Te.model.color});var ue=ae.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(Te){return Te.model.color}).attr("fill-opacity",0);T(ue),ae.attr("d",function(Te){return Te.svgD}),ue.empty()||ae.sort(v),ae.exit().remove(),ae.on("mouseover",y).on("mouseout",x).on("click",b),ie.append("g").attr("class","dimensions");var le=ee.select("g.dimensions").selectAll("g.dimension").data(function(Te){return Te.dimensions},g);le.enter().append("g").attr("class","dimension"),le.attr("transform",function(Te){return s(Te.x,0)}),le.exit().remove();var ge=le.selectAll("g.category").data(function(Te){return Te.categories},g),fe=ge.enter().append("g").attr("class","category");ge.attr("transform",function(Te){return s(0,Te.y)}),fe.append("rect").attr("class","catrect").attr("pointer-events","none"),ge.select("rect.catrect").attr("fill","none").attr("width",function(Te){return Te.width}).attr("height",function(Te){return Te.height}),M(fe);var me=ge.selectAll("rect.bandrect").data(function(Te){return Te.bands},g);me.each(function(){i.raiseToTop(this)}),me.attr("fill",function(Te){return Te.color});var _e=me.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(Te){return Te.color}).attr("fill-opacity",0);me.attr("fill",function(Te){return Te.color}).attr("width",function(Te){return Te.width}).attr("height",function(Te){return Te.height}).attr("y",function(Te){return Te.y}).attr("cursor",function(Te){return Te.parcatsViewModel.arrangement==="fixed"?"default":Te.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),A(_e),me.exit().remove(),fe.append("text").attr("class","catlabel").attr("pointer-events","none");var we=q._fullLayout.paper_bgcolor;ge.select("text.catlabel").attr("text-anchor",function(Te){return p(Te)?"start":"end"}).attr("alignment-baseline","middle").style("text-shadow",h.makeTextShadow(we)).style("fill","rgb(0, 0, 0)").attr("x",function(Te){return p(Te)?Te.width+5:-5}).attr("y",function(Te){return Te.height/2}).text(function(Te){return Te.model.categoryLabel}).each(function(Te){l.font(r.select(this),Te.parcatsViewModel.categorylabelfont),h.convertToTspans(r.select(this),q)}),fe.append("text").attr("class","dimlabel"),ge.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(Te){return Te.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(Te){return Te.width/2}).attr("y",-5).text(function(Te,Oe){return Oe===0?Te.parcatsViewModel.model.dimensions[Te.model.dimensionInd].dimensionLabel:null}).each(function(Te){l.font(r.select(this),Te.parcatsViewModel.labelfont)}),ge.selectAll("rect.bandrect").on("mouseover",R).on("mouseout",z),ge.exit().remove(),le.call(r.behavior.drag().origin(function(Te){return{x:Te.x,y:0}}).on("dragstart",L).on("drag",P).on("dragend",N)),ee.each(function(Te){Te.traceSelection=r.select(this),Te.pathSelection=r.select(this).selectAll("g.paths").selectAll("path.path"),Te.dimensionSelection=r.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),ee.exit().remove()}function g(U){return U.key}function p(U){var q=U.parcatsViewModel.dimensions.length,$=U.parcatsViewModel.dimensions[q-1].model.dimensionInd;return U.model.dimensionInd===$}function v(U,q){return U.model.rawColor>q.model.rawColor?1:U.model.rawColor"),Ee=r.mouse(ie)[0];c.loneHover({trace:ae,x:_e-le.left+ge.left,y:we-le.top+ge.top,text:ke,color:U.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:Te,idealAlign:Ee<_e?"right":"left",hovertemplate:(ae.line||{}).hovertemplate,hovertemplateLabels:ye,eventData:[{data:ae._input,fullData:ae,count:Oe,probability:de}]},{container:ue._hoverlayer.node(),outerContainer:ue._paper.node(),gd:ie})}}}function x(U){if(!U.parcatsViewModel.dragDimension&&(T(r.select(this)),c.loneUnhover(U.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()),U.parcatsViewModel.pathSelection.sort(v),U.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1)){var q=w(U),$=k(U);U.parcatsViewModel.graphDiv.emit("plotly_unhover",{points:q,event:r.event,constraints:$})}}function w(U){for(var q=[],$=B(U.parcatsViewModel),ne=0;ne1&&ge.displayInd===le.dimensions.length-1?(ne=ae.left,H="left"):(ne=ae.left+ae.width,H="right");var _e=ue.model.count,we=ue.model.categoryLabel,Te=_e/ue.parcatsViewModel.model.count,Oe={countLabel:_e,categoryLabel:we,probabilityLabel:Te.toFixed(3)},de=[];ue.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&de.push(["Count:",Oe.countLabel].join(" ")),ue.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&de.push(["P("+Oe.categoryLabel+"):",Oe.probabilityLabel].join(" "));var ye=de.join("
");return{trace:fe,x:Q*(ne-q.left),y:ee*(me-q.top),text:ye,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:H,hovertemplate:fe.hovertemplate,hovertemplateLabels:Oe,eventData:[{data:fe._input,fullData:fe,count:_e,category:we,probability:Te}]}}function R(U){if(!U.parcatsViewModel.dragDimension&&U.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){if(r.mouse(this)[1]<-1)return;var q,$=U.parcatsViewModel.graphDiv,ne=$._fullLayout,H=ne._paperdiv.node().getBoundingClientRect(),Q=U.parcatsViewModel.hoveron;Q==="color"?(function(ee){var ie=r.select(ee).datum(),ae=S(ie);_(ae),ae.each(function(){i.raiseToTop(this)}),r.select(ee.parentNode).selectAll("rect.bandrect").filter(function(ue){return ue.color===ie.color}).each(function(){i.raiseToTop(this),r.select(this).attr("stroke","black").attr("stroke-width",1.5)})}(this),D(this,"plotly_hover",r.event)):(function(ee){r.select(ee.parentNode).selectAll("rect.bandrect").each(function(ie){var ae=S(ie);_(ae),ae.each(function(){i.raiseToTop(this)})}),r.select(ee.parentNode).select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}(this),E(this,"plotly_hover",r.event)),U.parcatsViewModel.hoverinfoItems.indexOf("none")===-1&&(Q==="category"?q=O($,H,this):Q==="color"?q=function(ee,ie,ae){ee._fullLayout._calcInverseTransform(ee);var ue,le,ge=ee._fullLayout._invScaleX,fe=ee._fullLayout._invScaleY,me=ae.getBoundingClientRect(),_e=r.select(ae).datum(),we=_e.categoryViewModel,Te=we.parcatsViewModel,Oe=Te.model.dimensions[we.model.dimensionInd],de=Te.trace,ye=me.y+me.height/2;Te.dimensions.length>1&&Oe.displayInd===Te.dimensions.length-1?(ue=me.left,le="left"):(ue=me.left+me.width,le="right");var Me=we.model.categoryLabel,ke=_e.parcatsViewModel.model.count,Ee=0;_e.categoryViewModel.bands.forEach(function(ft){ft.color===_e.color&&(Ee+=ft.count)});var ze=we.model.count,Fe=0;Te.pathSelection.each(function(ft){ft.model.color===_e.color&&(Fe+=ft.model.count)});var Ve=Ee/ke,Ke=Ee/Fe,Re=Ee/ze,qe={countLabel:ke,categoryLabel:Me,probabilityLabel:Ve.toFixed(3)},We=[];we.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&We.push(["Count:",qe.countLabel].join(" ")),we.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(We.push("P(color \u2229 "+Me+"): "+qe.probabilityLabel),We.push("P("+Me+" | color): "+Ke.toFixed(3)),We.push("P(color | "+Me+"): "+Re.toFixed(3)));var Ye=We.join("
"),nt=d.mostReadable(_e.color,["black","white"]);return{trace:de,x:ge*(ue-ie.left),y:fe*(ye-ie.top),text:Ye,color:_e.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:nt,fontSize:10,idealAlign:le,hovertemplate:de.hovertemplate,hovertemplateLabels:qe,eventData:[{data:de._input,fullData:de,category:Me,count:ke,probability:Ve,categorycount:ze,colorcount:Fe,bandcolorcount:Ee}]}}($,H,this):Q==="dimension"&&(q=function(ee,ie,ae){var ue=[];return r.select(ae.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){ue.push(O(ee,ie,this))}),ue}($,H,this)),q&&c.loneHover(q,{container:ne._hoverlayer.node(),outerContainer:ne._paper.node(),gd:$}))}}function z(U){var q=U.parcatsViewModel;!q.dragDimension&&(T(q.pathSelection),M(q.dimensionSelection.selectAll("g.category")),A(q.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),c.loneUnhover(q.graphDiv._fullLayout._hoverlayer.node()),q.pathSelection.sort(v),q.hoverinfoItems.indexOf("skip")===-1)&&(U.parcatsViewModel.hoveron==="color"?D(this,"plotly_unhover",r.event):E(this,"plotly_unhover",r.event))}function L(U){U.parcatsViewModel.arrangement!=="fixed"&&(U.dragDimensionDisplayInd=U.model.displayInd,U.initialDragDimensionDisplayInds=U.parcatsViewModel.model.dimensions.map(function(q){return q.displayInd}),U.dragHasMoved=!1,U.dragCategoryDisplayInd=null,r.select(this).selectAll("g.category").select("rect.catrect").each(function(q){var $=r.mouse(this)[0],ne=r.mouse(this)[1];-2<=$&&$<=q.width+2&&-2<=ne&&ne<=q.height+2&&(U.dragCategoryDisplayInd=q.model.displayInd,U.initialDragCategoryDisplayInds=U.model.categories.map(function(H){return H.displayInd}),q.model.dragY=q.y,i.raiseToTop(this.parentNode),r.select(this.parentNode).selectAll("rect.bandrect").each(function(H){H.yle.y+le.height/2&&(Q.model.displayInd=le.model.displayInd,le.model.displayInd=ie),U.dragCategoryDisplayInd=Q.model.displayInd}if(U.dragCategoryDisplayInd===null||U.parcatsViewModel.arrangement==="freeform"){H.model.dragX=r.event.x;var ge=U.parcatsViewModel.dimensions[$],fe=U.parcatsViewModel.dimensions[ne];ge!==void 0&&H.model.dragXfe.x&&(H.model.displayInd=fe.model.displayInd,fe.model.displayInd=U.dragDimensionDisplayInd),U.dragDimensionDisplayInd=H.model.displayInd}Z(U.parcatsViewModel),Y(U.parcatsViewModel),W(U.parcatsViewModel),G(U.parcatsViewModel)}}function N(U){if(U.parcatsViewModel.arrangement!=="fixed"&&U.dragDimensionDisplayInd!==null){r.select(this).selectAll("text").attr("font-weight","normal");var q={},$=B(U.parcatsViewModel),ne=U.parcatsViewModel.model.dimensions.map(function(le){return le.displayInd}),H=U.initialDragDimensionDisplayInds.some(function(le,ge){return le!==ne[ge]});H&&ne.forEach(function(le,ge){var fe=U.parcatsViewModel.model.dimensions[ge].containerInd;q["dimensions["+fe+"].displayindex"]=le});var Q=!1;if(U.dragCategoryDisplayInd!==null){var ee=U.model.categories.map(function(le){return le.displayInd});if(Q=U.initialDragCategoryDisplayInds.some(function(le,ge){return le!==ee[ge]})){var ie=U.model.categories.slice().sort(function(le,ge){return le.displayInd-ge.displayInd}),ae=ie.map(function(le){return le.categoryValue}),ue=ie.map(function(le){return le.categoryLabel});q["dimensions["+U.model.containerInd+"].categoryarray"]=[ae],q["dimensions["+U.model.containerInd+"].ticktext"]=[ue],q["dimensions["+U.model.containerInd+"].categoryorder"]="array"}}U.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!U.dragHasMoved&&U.potentialClickBand&&(U.parcatsViewModel.hoveron==="color"?D(U.potentialClickBand,"plotly_click",r.event.sourceEvent):E(U.potentialClickBand,"plotly_click",r.event.sourceEvent)),U.model.dragX=null,U.dragCategoryDisplayInd!==null&&(U.parcatsViewModel.dimensions[U.dragDimensionDisplayInd].categories[U.dragCategoryDisplayInd].model.dragY=null,U.dragCategoryDisplayInd=null),U.dragDimensionDisplayInd=null,U.parcatsViewModel.dragDimension=null,U.dragHasMoved=null,U.potentialClickBand=null,Z(U.parcatsViewModel),Y(U.parcatsViewModel),r.transition().duration(300).ease("cubic-in-out").each(function(){W(U.parcatsViewModel,!0),G(U.parcatsViewModel,!0)}).each("end",function(){(H||Q)&&u.restyle(U.parcatsViewModel.graphDiv,q,[$])})}}function B(U){for(var q,$=U.graphDiv._fullData,ne=0;ne<$.length;ne++)if(U.key===$[ne].uid){q=ne;break}return q}function G(U,q){var $;q===void 0&&(q=!1),U.pathSelection.data(function(ne){return ne.paths},g),($=U.pathSelection,q?$.transition():$).attr("d",function(ne){return ne.svgD})}function W(U,q){function $(ee){return q?ee.transition():ee}q===void 0&&(q=!1),U.dimensionSelection.data(function(ee){return ee.dimensions},g);var ne=U.dimensionSelection.selectAll("g.category").data(function(ee){return ee.categories},g);$(U.dimensionSelection).attr("transform",function(ee){return s(ee.x,0)}),$(ne).attr("transform",function(ee){return s(0,ee.y)}),ne.select(".dimlabel").text(function(ee,ie){return ie===0?ee.parcatsViewModel.model.dimensions[ee.model.dimensionInd].dimensionLabel:null}),ne.select(".catlabel").attr("text-anchor",function(ee){return p(ee)?"start":"end"}).attr("x",function(ee){return p(ee)?ee.width+5:-5}).each(function(ee){var ie,ae;p(ee)?(ie=ee.width+5,ae="start"):(ie=-5,ae="end"),r.select(this).selectAll("tspan").attr("x",ie).attr("text-anchor",ae)});var H=ne.selectAll("rect.bandrect").data(function(ee){return ee.bands},g),Q=H.enter().append("rect").attr("class","bandrect").attr("cursor","move").attr("stroke-opacity",0).attr("fill",function(ee){return ee.color}).attr("fill-opacity",0);H.attr("fill",function(ee){return ee.color}).attr("width",function(ee){return ee.width}).attr("height",function(ee){return ee.height}).attr("y",function(ee){return ee.y}),A(Q),H.each(function(){i.raiseToTop(this)}),H.exit().remove()}function K(U,q,$){var ne,H=$[0],Q=q.margin||{l:80,r:80,t:100,b:80},ee=H.trace,ie=ee.domain,ae=q.width,ue=q.height,le=Math.floor(ae*(ie.x[1]-ie.x[0])),ge=Math.floor(ue*(ie.y[1]-ie.y[0])),fe=ie.x[0]*ae+Q.l,me=q.height-ie.y[1]*q.height+Q.t,_e=ee.line.shape;ne=ee.hoverinfo==="all"?["count","probability"]:(ee.hoverinfo||"").split("+");var we={trace:ee,key:ee.uid,model:H,x:fe,y:me,width:le,height:ge,hoveron:ee.hoveron,hoverinfoItems:ne,arrangement:ee.arrangement,bundlecolors:ee.bundlecolors,sortpaths:ee.sortpaths,labelfont:ee.labelfont,categorylabelfont:ee.tickfont,pathShape:_e,dragDimension:null,margin:Q,paths:[],dimensions:[],graphDiv:U,traceSelection:null,pathSelection:null,dimensionSelection:null};return H.dimensions&&(Z(we),Y(we)),we}function te(U,q,$,ne,H){var Q,ee,ie=[],ae=[];for(ee=0;ee<$.length-1;ee++)Q=a($[ee]+U[ee],U[ee+1]),ie.push(Q(H)),ae.push(Q(1-H));var ue="M "+U[0]+","+q[0];for(ue+="l"+$[0]+",0 ",ee=1;ee<$.length;ee++)ue+="C"+ie[ee-1]+","+q[ee-1]+" "+ae[ee-1]+","+q[ee]+" "+U[ee]+","+q[ee],ue+="l"+$[ee]+",0 ";for(ue+="l0,"+ne+" ",ue+="l -"+$[$.length-1]+",0 ",ee=$.length-2;ee>=0;ee--)ue+="C"+ae[ee]+","+(q[ee+1]+ne)+" "+ie[ee]+","+(q[ee]+ne)+" "+(U[ee]+$[ee])+","+(q[ee]+ne),ue+="l-"+$[ee]+",0 ";return ue+="Z"}function Y(U){var q=U.dimensions,$=U.model,ne=q.map(function(We){return We.categories.map(function(Ye){return Ye.y})}),H=U.model.dimensions.map(function(We){return We.categories.map(function(Ye){return Ye.displayInd})}),Q=U.model.dimensions.map(function(We){return We.displayInd}),ee=U.dimensions.map(function(We){return We.model.dimensionInd}),ie=q.map(function(We){return We.x}),ae=q.map(function(We){return We.width}),ue=[];for(var le in $.paths)$.paths.hasOwnProperty(le)&&ue.push($.paths[le]);function ge(We){var Ye=We.categoryInds.map(function(nt,ft){return H[ft][nt]});return ee.map(function(nt){return Ye[nt]})}ue.sort(function(We,Ye){var nt=ge(We),ft=ge(Ye);return U.sortpaths==="backward"&&(nt.reverse(),ft.reverse()),nt.push(We.valueInds[0]),ft.push(Ye.valueInds[0]),U.bundlecolors&&(nt.unshift(We.rawColor),ft.unshift(Ye.rawColor)),ntft?1:0});for(var fe=new Array(ue.length),me=q[0].model.count,_e=q[0].categories.map(function(We){return We.height}).reduce(function(We,Ye){return We+Ye}),we=0;we0?_e*(Oe.count/me):0;for(var de,ye=new Array(ne.length),Me=0;Me1?(U.width-80-16)/(ne-1):0)*H;var Q,ee,ie,ae,ue,le=[],ge=U.model.maxCats,fe=q.categories.length,me=q.count,_e=U.height-8*(ge-1),we=8*(ge-fe)/2,Te=q.categories.map(function(Oe){return{displayInd:Oe.displayInd,categoryInd:Oe.categoryInd}});for(Te.sort(function(Oe,de){return Oe.displayInd-de.displayInd}),ue=0;ue0?ee.count/me*_e:0,ie={key:ee.valueInds[0],model:ee,width:16,height:Q,y:ee.dragY!==null?ee.dragY:we,bands:[],parcatsViewModel:U},we=we+Q+8,le.push(ie);return{key:q.dimensionInd,x:q.dragX!==null?q.dragX:$,y:0,width:16,model:q,categories:le,parcatsViewModel:U,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}o.exports=function(U,q,$,ne){m($,U,ne,q)}},{"../../components/drawing":388,"../../components/fx":406,"../../lib":503,"../../lib/svg_text_utils":529,"../../plot_api/plot_api":540,"@plotly/d3":58,"d3-interpolate":116,tinycolor2:312}],887:[function(e,o,f){var r=e("./parcats");o.exports=function(a,u,c,i){var s=a._fullLayout,l=s._paper,d=s._size;r(a,l,u,{width:d.w,height:d.h,margin:{t:d.t,r:d.r,b:d.b,l:d.l}},c,i)}},{"./parcats":886}],888:[function(e,o,f){var r=e("../../components/colorscale/attributes"),a=e("../../plots/cartesian/layout_attributes"),u=e("../../plots/font_attributes"),c=e("../../plots/domain").attributes,i=e("../../lib/extend").extendFlat,s=e("../../plot_api/plot_template").templatedArray;o.exports={domain:c({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:u({editType:"plot"}),tickfont:u({editType:"plot"}),rangefont:u({editType:"plot"}),dimensions:s("dimension",{label:{valType:"string",editType:"plot"},tickvals:i({},a.tickvals,{editType:"plot"}),ticktext:i({},a.ticktext,{editType:"plot"}),tickformat:i({},a.tickformat,{editType:"plot"}),visible:{valType:"boolean",dflt:!0,editType:"plot"},range:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},constraintrange:{valType:"info_array",freeLength:!0,dimensions:"1-2",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},multiselect:{valType:"boolean",dflt:!0,editType:"plot"},values:{valType:"data_array",editType:"calc"},editType:"calc"}),line:i({editType:"calc"},r("line",{colorscaleDflt:"Viridis",autoColorDflt:!1,editTypeOverride:"calc"}))}},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plot_api/plot_template":543,"../../plots/cartesian/layout_attributes":569,"../../plots/domain":584,"../../plots/font_attributes":585}],889:[function(e,o,f){var r=e("./constants"),a=e("@plotly/d3"),u=e("../../lib/gup").keyFun,c=e("../../lib/gup").repeat,i=e("../../lib").sorterAsc,s=e("../../lib").strTranslate,l=r.bar.snapRatio;function d(O,R){return O*(1-l)+R*l}var h=r.bar.snapClose;function m(O,R){return O*(1-h)+R*h}function g(O,R,z,L){if(function(re,U){for(var q=0;q=U[q][0]&&re<=U[q][1])return!0;return!1}(z,L))return z;var P=O?-1:1,N=0,B=R.length-1;if(P<0){var G=N;N=B,B=G}for(var W=R[N],K=W,te=N;P*teR){Y=z;break}}if(P=K,isNaN(P)&&(P=isNaN(te)||isNaN(Y)?isNaN(te)?Y:te:R-W[te][1]H[1]+ee||Q=.9*H[1]+.1*H[0]?"n":Q<=.9*H[0]+.1*H[1]?"s":"ns"}(re,R);U&&(N.interval=G[P],N.intervalPix=re,N.region=U)}}if(O.ordinal&&!N.region){var q=O.unitTickvals,$=O.unitToPaddedPx.invert(R);for(z=0;z=ne[0]&&$<=ne[1]){N.clickableOrdinalRange=ne;break}}}return N}function _(O,R){a.event.sourceEvent.stopPropagation();var z=R.height-a.mouse(O)[1]-2*r.verticalPadding,L=R.brush.svgBrush;L.wasDragged=!0,L._dragging=!0,L.grabbingBar?L.newExtent=[z-L.grabPoint,z+L.barLength-L.grabPoint].map(R.unitToPaddedPx.invert):L.newExtent=[L.startExtent,R.unitToPaddedPx.invert(z)].sort(i),R.brush.filterSpecified=!0,L.extent=L.stayingIntervals.concat([L.newExtent]),L.brushCallback(R),b(O.parentNode)}function M(O,R){var z=T(R,R.height-a.mouse(O)[1]-2*r.verticalPadding),L="crosshair";z.clickableOrdinalRange?L="pointer":z.region&&(L=z.region+"-resize"),a.select(document.body).style("cursor",L)}function A(O){O.on("mousemove",function(R){a.event.preventDefault(),R.parent.inBrushDrag||M(this,R)}).on("mouseleave",function(R){R.parent.inBrushDrag||w()}).call(a.behavior.drag().on("dragstart",function(R){(function(z,L){a.event.sourceEvent.stopPropagation();var P=L.height-a.mouse(z)[1]-2*r.verticalPadding,N=L.unitToPaddedPx.invert(P),B=L.brush,G=T(L,P),W=G.interval,K=B.svgBrush;if(K.wasDragged=!1,K.grabbingBar=G.region==="ns",K.grabbingBar){var te=W.map(L.unitToPaddedPx);K.grabPoint=P-te[0]-r.verticalPadding,K.barLength=te[1]-te[0]}K.clickableOrdinalRange=G.clickableOrdinalRange,K.stayingIntervals=L.multiselect&&B.filterSpecified?B.filter.getConsolidated():[],W&&(K.stayingIntervals=K.stayingIntervals.filter(function(Y){return Y[0]!==W[0]&&Y[1]!==W[1]})),K.startExtent=G.region?W[G.region==="s"?1:0]:N,L.parent.inBrushDrag=!0,K.brushStartCallback()})(this,R)}).on("drag",function(R){_(this,R)}).on("dragend",function(R){(function(z,L){var P=L.brush,N=P.filter,B=P.svgBrush;B._dragging||(M(z,L),_(z,L),L.brush.svgBrush.wasDragged=!1),B._dragging=!1,a.event.sourceEvent.stopPropagation();var G=B.grabbingBar;if(B.grabbingBar=!1,B.grabLocation=void 0,L.parent.inBrushDrag=!1,w(),!B.wasDragged)return B.wasDragged=void 0,B.clickableOrdinalRange?P.filterSpecified&&L.multiselect?B.extent.push(B.clickableOrdinalRange):(B.extent=[B.clickableOrdinalRange],P.filterSpecified=!0):G?(B.extent=B.stayingIntervals,B.extent.length===0&&E(P)):E(P),B.brushCallback(L),b(z.parentNode),void B.brushEndCallback(P.filterSpecified?N.getConsolidated():[]);var W=function(){N.set(N.getConsolidated())};if(L.ordinal){var K=L.unitTickvals;K[K.length-1]B.newExtent[0];B.extent=B.stayingIntervals.concat(te?[B.newExtent]:[]),B.extent.length||E(P),B.brushCallback(L),te?b(z.parentNode,W):(W(),b(z.parentNode))}else W();B.brushEndCallback(P.filterSpecified?N.getConsolidated():[])})(this,R)}))}function S(O,R){return O[0]-R[0]}function E(O){O.filterSpecified=!1,O.svgBrush.extent=[[-1/0,1/0]]}function D(O){for(var R,z=O.slice(),L=[],P=z.shift();P;){for(R=P.slice();(P=z.shift())&&P[0]<=R[1];)R[1]=Math.max(R[1],P[1]);L.push(R)}return L.length===1&&L[0][0]>L[0][1]&&(L=[]),L}o.exports={makeBrush:function(O,R,z,L,P,N){var B,G=function(){var W,K,te=[];return{set:function(Y){(te=Y.map(function(Z){return Z.slice().sort(i)}).sort(S)).length===1&&te[0][0]===-1/0&&te[0][1]===1/0&&(te=[[0,-1]]),W=D(te),K=te.reduce(function(Z,re){return[Math.min(Z[0],re[0]),Math.max(Z[1],re[1])]},[1/0,-1/0])},get:function(){return te.slice()},getConsolidated:function(){return W},getBounds:function(){return K}}}();return G.set(z),{filter:G,filterSpecified:R,svgBrush:{extent:[],brushStartCallback:L,brushCallback:(B=P,function(W){var K=W.brush,te=function(Y){return Y.svgBrush.extent.map(function(Z){return Z.slice()})}(K).slice();K.filter.set(te),B()}),brushEndCallback:N}}},ensureAxisBrush:function(O,R){var z=O.selectAll("."+r.cn.axisBrush).data(c,u);z.enter().append("g").classed(r.cn.axisBrush,!0),function(L,P){var N=L.selectAll(".background").data(c);N.enter().append("rect").classed("background",!0).call(p).call(v).style("pointer-events","auto").attr("transform",s(0,r.verticalPadding)),N.call(A).attr("height",function(W){return W.height-r.verticalPadding});var B=L.selectAll(".highlight-shadow").data(c);B.enter().append("line").classed("highlight-shadow",!0).attr("x",-r.bar.width/2).attr("stroke-width",r.bar.width+r.bar.strokeWidth).attr("stroke",P).attr("opacity",r.bar.strokeOpacity).attr("stroke-linecap","butt"),B.attr("y1",function(W){return W.height}).call(k);var G=L.selectAll(".highlight").data(c);G.enter().append("line").classed("highlight",!0).attr("x",-r.bar.width/2).attr("stroke-width",r.bar.width-r.bar.strokeWidth).attr("stroke",r.bar.fillColor).attr("opacity",r.bar.fillOpacity).attr("stroke-linecap","butt"),G.attr("y1",function(W){return W.height}).call(k)}(z,R)},cleanRanges:function(O,R){if(Array.isArray(O[0])?(O=O.map(function(L){return L.sort(i)}),O=R.multiselect?D(O.sort(S)):[O[0]]):O=[O.sort(i)],R.tickvals){var z=R.tickvals.slice().sort(i);if(!(O=O.map(function(L){var P=[g(0,z,L[0],[]),g(1,z,L[1],[])];if(P[1]>P[0])return P}).filter(function(L){return L})).length)return}return O.length>1?O:O[0]}}},{"../../lib":503,"../../lib/gup":500,"./constants":893,"@plotly/d3":58}],890:[function(e,o,f){o.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),calc:e("./calc"),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:e("./base_plot"),categories:["gl","regl","noOpacity","noHover"],meta:{}}},{"./attributes":888,"./base_plot":891,"./calc":892,"./defaults":894}],891:[function(e,o,f){var r=e("@plotly/d3"),a=e("../../plots/get_data").getModuleCalcData,u=e("./plot"),c=e("../../constants/xmlns_namespaces");f.name="parcoords",f.plot=function(i){var s=a(i.calcdata,"parcoords")[0];s.length&&u(i,s)},f.clean=function(i,s,l,d){var h=d._has&&d._has("parcoords"),m=s._has&&s._has("parcoords");h&&!m&&(d._paperdiv.selectAll(".parcoords").remove(),d._glimages.selectAll("*").remove())},f.toSVG=function(i){var s=i._fullLayout._glimages,l=r.select(i).selectAll(".svg-container");l.filter(function(d,h){return h===l.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus").each(function(){var d=this.toDataURL("image/png");s.append("svg:image").attr({xmlns:c.svg,"xlink:href":d,preserveAspectRatio:"none",x:0,y:0,width:this.style.width,height:this.style.height})}),window.setTimeout(function(){r.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}},{"../../constants/xmlns_namespaces":480,"../../plots/get_data":593,"./plot":900,"@plotly/d3":58}],892:[function(e,o,f){var r=e("../../lib").isArrayOrTypedArray,a=e("../../components/colorscale"),u=e("../../lib/gup").wrap;o.exports=function(c,i){var s,l;return a.hasColorscale(i,"line")&&r(i.line.color)?(s=i.line.color,l=a.extractOpts(i.line).colorscale,a.calc(c,i,{vals:s,containerStr:"line",cLetter:"c"})):(s=function(d){for(var h=new Array(d),m=0;mh&&(r.log("parcoords traces support up to "+h+" dimensions at the moment"),k.splice(h));var b=i(p,v,{name:"dimensions",layout:x,handleItemDefaults:g}),T=function(M,A,S,E,D){var O=D("line.color",S);if(a(M,"line")&&r.isArrayOrTypedArray(O)){if(O.length)return D("line.colorscale"),u(M,A,E,D,{prefix:"line.",cLetter:"c"}),O.length;A.line.color=S}return 1/0}(p,v,y,x,w);c(v,x,w),Array.isArray(b)&&b.length||(v.visible=!1),m(v,b,"values",T);var _={family:x.font.family,size:Math.round(x.font.size/1.2),color:x.font.color};r.coerceFont(w,"labelfont",_),r.coerceFont(w,"tickfont",_),r.coerceFont(w,"rangefont",_),w("labelangle"),w("labelside")}},{"../../components/colorscale/defaults":376,"../../components/colorscale/helpers":377,"../../lib":503,"../../plots/array_container_defaults":549,"../../plots/cartesian/axes":554,"../../plots/domain":584,"./attributes":888,"./axisbrush":889,"./constants":893,"./merge_length":898}],895:[function(e,o,f){var r=e("../../lib").isTypedArray;f.convertTypedArray=function(a){return r(a)?Array.prototype.slice.call(a):a},f.isOrdinal=function(a){return!!a.tickvals},f.isVisible=function(a){return a.visible||!("visible"in a)}},{"../../lib":503}],896:[function(e,o,f){var r=e("./base_index");r.plot=e("./plot"),o.exports=r},{"./base_index":890,"./plot":900}],897:[function(e,o,f){var r=e("glslify"),a=r([`precision highp float; +#define GLSLIFY 1 + +varying vec4 fragColor; + +attribute vec4 p01_04, p05_08, p09_12, p13_16, + p17_20, p21_24, p25_28, p29_32, + p33_36, p37_40, p41_44, p45_48, + p49_52, p53_56, p57_60, colors; + +uniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D, + loA, hiA, loB, hiB, loC, hiC, loD, hiD; + +uniform vec2 resolution, viewBoxPos, viewBoxSize; +uniform float maskHeight; +uniform float drwLayer; // 0: context, 1: focus, 2: pick +uniform vec4 contextColor; +uniform sampler2D maskTexture, palette; + +bool isPick = (drwLayer > 1.5); +bool isContext = (drwLayer < 0.5); + +const vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0); +const vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0); + +float val(mat4 p, mat4 v) { + return dot(matrixCompMult(p, v) * UNITS, UNITS); +} + +float axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) { + float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D); + float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D); + return y1 * (1.0 - ratio) + y2 * ratio; +} + +int iMod(int a, int b) { + return a - b * (a / b); +} + +bool fOutside(float p, float lo, float hi) { + return (lo < hi) && (lo > p || p > hi); +} + +bool vOutside(vec4 p, vec4 lo, vec4 hi) { + return ( + fOutside(p[0], lo[0], hi[0]) || + fOutside(p[1], lo[1], hi[1]) || + fOutside(p[2], lo[2], hi[2]) || + fOutside(p[3], lo[3], hi[3]) + ); +} + +bool mOutside(mat4 p, mat4 lo, mat4 hi) { + return ( + vOutside(p[0], lo[0], hi[0]) || + vOutside(p[1], lo[1], hi[1]) || + vOutside(p[2], lo[2], hi[2]) || + vOutside(p[3], lo[3], hi[3]) + ); +} + +bool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) { + return mOutside(A, loA, hiA) || + mOutside(B, loB, hiB) || + mOutside(C, loC, hiC) || + mOutside(D, loD, hiD); +} + +bool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) { + mat4 pnts[4]; + pnts[0] = A; + pnts[1] = B; + pnts[2] = C; + pnts[3] = D; + + for(int i = 0; i < 4; ++i) { + for(int j = 0; j < 4; ++j) { + for(int k = 0; k < 4; ++k) { + if(0 == iMod( + int(255.0 * texture2D(maskTexture, + vec2( + (float(i * 2 + j / 2) + 0.5) / 8.0, + (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight + ))[3] + ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))), + 2 + )) return true; + } + } + } + return false; +} + +vec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) { + float x = 0.5 * sign(v) + 0.5; + float y = axisY(x, A, B, C, D); + float z = 1.0 - abs(v); + + z += isContext ? 0.0 : 2.0 * float( + outsideBoundingBox(A, B, C, D) || + outsideRasterMask(A, B, C, D) + ); + + return vec4( + 2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0, + z, + 1.0 + ); +} + +void main() { + mat4 A = mat4(p01_04, p05_08, p09_12, p13_16); + mat4 B = mat4(p17_20, p21_24, p25_28, p29_32); + mat4 C = mat4(p33_36, p37_40, p41_44, p45_48); + mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS); + + float v = colors[3]; + + gl_Position = position(isContext, v, A, B, C, D); + + fragColor = + isContext ? vec4(contextColor) : + isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5)); +} +`]),u=r([`precision highp float; +#define GLSLIFY 1 + +varying vec4 fragColor; + +void main() { + gl_FragColor = fragColor; +} +`]),c=e("./constants").maxDimensionCount,i=e("../../lib"),s=new Uint8Array(4),l=new Uint8Array(4),d={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function h(b,T,_,M,A){var S=b._gl;S.enable(S.SCISSOR_TEST),S.scissor(T,_,M,A),b.clear({color:[0,0,0,0],depth:1})}function m(b,T,_,M,A,S){var E=S.key;_.drawCompleted||(function(D){D.read({x:0,y:0,width:1,height:1,data:s})}(b),_.drawCompleted=!0),function D(O){var R=Math.min(M,A-O*M);O===0&&(window.cancelAnimationFrame(_.currentRafs[E]),delete _.currentRafs[E],h(b,S.scissorX,S.scissorY,S.scissorWidth,S.viewBoxSize[1])),_.clearOnly||(S.count=2*R,S.offset=2*O*M,T(S),O*M+R>>8*T)%256/255}function v(b,T,_){for(var M=new Array(8*T),A=0,S=0;SQ&&(Q=Y[U].dim1.canvasX,$=U);ne===0&&h(R,0,0,_.canvasWidth,_.canvasHeight);var ee=function(Te){var Oe,de,ye,Me=[[],[]];for(ye=0;ye<64;ye++){var ke=!Te&&yeee._length&&(_e=_e.slice(0,ee._length));var we,Te=ee.tickvals;function Oe(Ee,ze){return{val:Ee,text:we[ze]}}function de(Ee,ze){return Ee.val-ze.val}if(Array.isArray(Te)&&Te.length){we=ee.ticktext,Array.isArray(we)&&we.length?we.length>Te.length?we=we.slice(0,Te.length):Te.length>we.length&&(Te=Te.slice(0,we.length)):we=Te.map(u(ee.tickformat));for(var ye=1;ye=ze||Re>=Fe)return;var qe=ke.lineLayer.readPixel(Ke,Fe-1-Re),We=qe[3]!==0,Ye=We?qe[2]+256*(qe[1]+256*qe[0]):null,nt={x:Ke,y:Re,clientX:Ee.clientX,clientY:Ee.clientY,dataIndex:ke.model.key,curveNumber:Ye};Ye!==ae&&(We?Y.hover(nt):Y.unhover&&Y.unhover(nt),ae=Ye)}}),ie.style("opacity",function(ke){return ke.pick?0:1}),re.style("background","rgba(255, 255, 255, 0)");var ue=re.selectAll("."+w.cn.parcoords).data(ee,p);ue.exit().remove(),ue.enter().append("g").classed(w.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),ue.attr("transform",function(ke){return l(ke.model.translateX,ke.model.translateY)});var le=ue.selectAll("."+w.cn.parcoordsControlView).data(v,p);le.enter().append("g").classed(w.cn.parcoordsControlView,!0),le.attr("transform",function(ke){return l(ke.model.pad.l,ke.model.pad.t)});var ge=le.selectAll("."+w.cn.yAxis).data(function(ke){return ke.dimensions},p);ge.enter().append("g").classed(w.cn.yAxis,!0),le.each(function(ke){N(ge,ke,q)}),ie.each(function(ke){if(ke.viewModel){!ke.lineLayer||Y?ke.lineLayer=b(this,ke):ke.lineLayer.update(ke),(ke.key||ke.key===0)&&(ke.viewModel[ke.key]=ke.lineLayer);var Ee=!ke.context||Y;ke.lineLayer.render(ke.viewModel.panels,Ee)}}),ge.attr("transform",function(ke){return l(ke.xScale(ke.xIndex),0)}),ge.call(r.behavior.drag().origin(function(ke){return ke}).on("drag",function(ke){var Ee=ke.parent;Q.linePickActive(!1),ke.x=Math.max(-w.overdrag,Math.min(ke.model.width+w.overdrag,r.event.x)),ke.canvasX=ke.x*ke.model.canvasPixelRatio,ge.sort(function(ze,Fe){return ze.x-Fe.x}).each(function(ze,Fe){ze.xIndex=Fe,ze.x=ke===ze?ze.x:ze.xScale(ze.xIndex),ze.canvasX=ze.x*ze.model.canvasPixelRatio}),N(ge,Ee,q),ge.filter(function(ze){return Math.abs(ke.xIndex-ze.xIndex)!==0}).attr("transform",function(ze){return l(ze.xScale(ze.xIndex),0)}),r.select(this).attr("transform",l(ke.x,0)),ge.each(function(ze,Fe,Ve){Ve===ke.parent.key&&(Ee.dimensions[Fe]=ze)}),Ee.contextLayer&&Ee.contextLayer.render(Ee.panels,!1,!O(Ee)),Ee.focusLayer.render&&Ee.focusLayer.render(Ee.panels)}).on("dragend",function(ke){var Ee=ke.parent;ke.x=ke.xScale(ke.xIndex),ke.canvasX=ke.x*ke.model.canvasPixelRatio,N(ge,Ee,q),r.select(this).attr("transform",function(ze){return l(ze.x,0)}),Ee.contextLayer&&Ee.contextLayer.render(Ee.panels,!1,!O(Ee)),Ee.focusLayer&&Ee.focusLayer.render(Ee.panels),Ee.pickLayer&&Ee.pickLayer.render(Ee.panels,!0),Q.linePickActive(!0),Y&&Y.axesMoved&&Y.axesMoved(Ee.key,Ee.dimensions.map(function(ze){return ze.crossfilterDimensionIndex}))})),ge.exit().remove();var fe=ge.selectAll("."+w.cn.axisOverlays).data(v,p);fe.enter().append("g").classed(w.cn.axisOverlays,!0),fe.selectAll("."+w.cn.axis).remove();var me=fe.selectAll("."+w.cn.axis).data(v,p);me.enter().append("g").classed(w.cn.axis,!0),me.each(function(ke){var Ee=ke.model.height/ke.model.tickDistance,ze=ke.domainScale,Fe=ze.domain();r.select(this).call(r.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(Ee,ke.tickFormat).tickValues(ke.ordinal?Fe:null).tickFormat(function(Ve){return x.isOrdinal(ke)?Ve:B(ke.model.dimensions[ke.visibleIndex],Ve)}).scale(ze)),h.font(me.selectAll("text"),ke.model.tickFont)}),me.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),me.selectAll("text").style("text-shadow",d.makeTextShadow($)).style("cursor","default");var _e=fe.selectAll("."+w.cn.axisHeading).data(v,p);_e.enter().append("g").classed(w.cn.axisHeading,!0);var we=_e.selectAll("."+w.cn.axisTitle).data(v,p);we.enter().append("text").classed(w.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events","auto"),we.text(function(ke){return ke.label}).each(function(ke){var Ee=r.select(this);h.font(Ee,ke.model.labelFont),d.convertToTspans(Ee,W)}).attr("transform",function(ke){var Ee=P(ke.model.labelAngle,ke.model.labelSide),ze=w.axisTitleOffset;return(Ee.dir>0?"":l(0,2*ze+ke.model.height))+s(Ee.degrees)+l(-ze*Ee.dx,-ze*Ee.dy)}).attr("text-anchor",function(ke){var Ee=P(ke.model.labelAngle,ke.model.labelSide);return 2*Math.abs(Ee.dx)>Math.abs(Ee.dy)?Ee.dir*Ee.dx<0?"start":"end":"middle"});var Te=fe.selectAll("."+w.cn.axisExtent).data(v,p);Te.enter().append("g").classed(w.cn.axisExtent,!0);var Oe=Te.selectAll("."+w.cn.axisExtentTop).data(v,p);Oe.enter().append("g").classed(w.cn.axisExtentTop,!0),Oe.attr("transform",l(0,-w.axisExtentOffset));var de=Oe.selectAll("."+w.cn.axisExtentTopText).data(v,p);de.enter().append("text").classed(w.cn.axisExtentTopText,!0).call(L),de.text(function(ke){return G(ke,!0)}).each(function(ke){h.font(r.select(this),ke.model.rangeFont)});var ye=Te.selectAll("."+w.cn.axisExtentBottom).data(v,p);ye.enter().append("g").classed(w.cn.axisExtentBottom,!0),ye.attr("transform",function(ke){return l(0,ke.model.height+w.axisExtentOffset)});var Me=ye.selectAll("."+w.cn.axisExtentBottomText).data(v,p);Me.enter().append("text").classed(w.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(L),Me.text(function(ke){return G(ke,!1)}).each(function(ke){h.font(r.select(this),ke.model.rangeFont)}),k.ensureAxisBrush(fe,$)}},{"../../components/colorscale":378,"../../components/drawing":388,"../../lib":503,"../../lib/gup":500,"../../lib/svg_text_utils":529,"../../plots/cartesian/axes":554,"./axisbrush":889,"./constants":893,"./helpers":895,"./lines":897,"@plotly/d3":58,"color-rgba":91}],900:[function(e,o,f){var r=e("./parcoords"),a=e("../../lib/prepare_regl"),u=e("./helpers").isVisible,c={};function i(s,l,d){var h=l.indexOf(d),m=s.indexOf(h);return m===-1&&(m+=l.length),m}(o.exports=function(s,l){var d=s._fullLayout;if(a(s,[],c)){var h={},m={},g={},p={},v=d._size;l.forEach(function(y,x){var w=y[0].trace;g[x]=w.index;var k=p[x]=w._fullInput.index;h[x]=s.data[k].dimensions,m[x]=s.data[k].dimensions.slice()}),r(s,l,{width:v.w,height:v.h,margin:{t:v.t,r:v.r,b:v.b,l:v.l}},{filterChanged:function(y,x,w){var k=m[y][x],b=w.map(function(E){return E.slice()}),T="dimensions["+x+"].constraintrange",_=d._tracePreGUI[s._fullData[g[y]]._fullInput.uid];if(_[T]===void 0){var M=k.constraintrange;_[T]=M||null}var A=s._fullData[g[y]].dimensions[x];b.length?(b.length===1&&(b=b[0]),k.constraintrange=b,A.constraintrange=b.slice(),b=[b]):(delete k.constraintrange,delete A.constraintrange,b=null);var S={};S[T]=b,s.emit("plotly_restyle",[S,[p[y]]])},hover:function(y){s.emit("plotly_hover",y)},unhover:function(y){s.emit("plotly_unhover",y)},axesMoved:function(y,x){var w=function(k,b){return function(T,_){return i(k,b,T)-i(k,b,_)}}(x,m[y].filter(u));h[y].sort(w),m[y].filter(function(k){return!u(k)}).sort(function(k){return m[y].indexOf(k)}).forEach(function(k){h[y].splice(h[y].indexOf(k),1),h[y].splice(m[y].indexOf(k),0,k)}),s.emit("plotly_restyle",[{dimensions:[h[y]]},[p[y]]])}})}}).reglPrecompiled=c},{"../../lib/prepare_regl":516,"./helpers":895,"./parcoords":899}],901:[function(e,o,f){var r=e("../../plots/attributes"),a=e("../../plots/domain").attributes,u=e("../../plots/font_attributes"),c=e("../../components/color/attributes"),i=e("../../plots/template_attributes").hovertemplateAttrs,s=e("../../plots/template_attributes").texttemplateAttrs,l=e("../../lib/extend").extendFlat,d=u({editType:"plot",arrayOk:!0,colorEditType:"plot"});o.exports={labels:{valType:"data_array",editType:"calc"},label0:{valType:"number",dflt:0,editType:"calc"},dlabel:{valType:"number",dflt:1,editType:"calc"},values:{valType:"data_array",editType:"calc"},marker:{colors:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:c.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},editType:"calc"},text:{valType:"data_array",editType:"plot"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},scalegroup:{valType:"string",dflt:"",editType:"calc"},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"],editType:"calc"},hoverinfo:l({},r.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:i({},{keys:["label","color","value","percent","text"]}),texttemplate:s({editType:"plot"},{keys:["label","color","value","percent","text"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:l({},d,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:l({},d,{}),outsidetextfont:l({},d,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},title:{text:{valType:"string",dflt:"",editType:"plot"},font:l({},d,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:a({name:"pie",trace:!0,editType:"calc"}),hole:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},sort:{valType:"boolean",dflt:!0,editType:"calc"},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"number",min:-360,max:360,dflt:0,editType:"calc"},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc"},_deprecated:{title:{valType:"string",dflt:"",editType:"calc"},titlefont:l({},d,{}),titleposition:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"calc"}}}},{"../../components/color/attributes":365,"../../lib/extend":493,"../../plots/attributes":550,"../../plots/domain":584,"../../plots/font_attributes":585,"../../plots/template_attributes":633}],902:[function(e,o,f){var r=e("../../plots/plots");f.name="pie",f.plot=function(a,u,c,i){r.plotBasePlot(f.name,a,u,c,i)},f.clean=function(a,u,c,i){r.cleanBasePlot(f.name,a,u,c,i)}},{"../../plots/plots":619}],903:[function(e,o,f){var r=e("fast-isnumeric"),a=e("tinycolor2"),u=e("../../components/color"),c={};function i(l){return function(d,h){return!!d&&!!(d=a(d)).isValid()&&(d=u.addOpacity(d,d.getAlpha()),l[h]||(l[h]=d),d)}}function s(l,d){var h,m=JSON.stringify(l),g=d[m];if(!g){for(g=l.slice(),h=0;h=0}),(d.type==="funnelarea"?A:d.sort)&&g.sort(function(R,z){return z.v-R.v}),g[0]&&(g[0].vTotal=M),g},crossTraceCalc:function(l,d){var h=(d||{}).type;h||(h="pie");var m=l._fullLayout,g=l.calcdata,p=m[h+"colorway"],v=m["_"+h+"colormap"];m["extend"+h+"colors"]&&(p=s(p,c));for(var y=0,x=0;x0){p=!0;break}}p||(g=0)}return{hasLabels:h,hasValues:m,len:g}}o.exports={handleLabelsAndValues:s,supplyDefaults:function(l,d,h,m){function g(_,M){return a.coerce(l,d,u,_,M)}var p=s(g("labels"),g("values")),v=p.len;if(d._hasLabels=p.hasLabels,d._hasValues=p.hasValues,!d._hasLabels&&d._hasValues&&(g("label0"),g("dlabel")),v){d._length=v,g("marker.line.width")&&g("marker.line.color"),g("marker.colors"),g("scalegroup");var y,x=g("text"),w=g("texttemplate");if(w||(y=g("textinfo",Array.isArray(x)?"text+percent":"percent")),g("hovertext"),g("hovertemplate"),w||y&&y!=="none"){var k=g("textposition");i(l,d,m,g,k,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),(Array.isArray(k)||k==="auto"||k==="outside")&&g("automargin"),(k==="inside"||k==="auto"||Array.isArray(k))&&g("insidetextorientation")}c(d,m,g);var b=g("hole");if(g("title.text")){var T=g("title.position",b?"middle center":"top center");b||T!=="middle center"||(d.title.position="top center"),a.coerceFont(g,"title.font",m.font)}g("sort"),g("direction"),g("rotation"),g("pull")}else d.visible=!1}}},{"../../lib":503,"../../plots/domain":584,"../bar/defaults":652,"./attributes":901,"fast-isnumeric":190}],905:[function(e,o,f){var r=e("../../components/fx/helpers").appendArrayMultiPointValues;o.exports=function(a,u){var c={curveNumber:u.index,pointNumbers:a.pts,data:u._input,fullData:u,label:a.label,color:a.color,value:a.v,percent:a.percent,text:a.text,bbox:a.bbox,v:a.v};return a.pts.length===1&&(c.pointNumber=c.i=a.pts[0]),r(c,u,a.pts),u.type==="funnelarea"&&(delete c.v,delete c.i),c}},{"../../components/fx/helpers":402}],906:[function(e,o,f){var r=e("../../lib");function a(u){return u.indexOf("e")!==-1?u.replace(/[.]?0+e/,"e"):u.indexOf(".")!==-1?u.replace(/[.]?0+$/,""):u}f.formatPiePercent=function(u,c){var i=a((100*u).toPrecision(3));return r.numSeparate(i,c)+"%"},f.formatPieValue=function(u,c){var i=a(u.toPrecision(10));return r.numSeparate(i,c)},f.getFirstFilled=function(u,c){if(Array.isArray(u))for(var i=0;i"),name:Q.hovertemplate||ee.indexOf("name")!==-1?Q.name:void 0,idealAlign:ne.pxmid[0]<0?"left":"right",color:y.castOption(me.bgcolor,ne.pts)||ne.color,borderColor:y.castOption(me.bordercolor,ne.pts),fontFamily:y.castOption(_e.family,ne.pts),fontSize:y.castOption(_e.size,ne.pts),fontColor:y.castOption(_e.color,ne.pts),nameLength:y.castOption(me.namelength,ne.pts),textAlign:y.castOption(me.align,ne.pts),hovertemplate:y.castOption(Q.hovertemplate,ne.pts),hovertemplateLabels:ne,eventData:[x(ne,Q)]},{container:H._hoverlayer.node(),outerContainer:H._paper.node(),gd:te,inOut_bbox:we}),ne.bbox=we[0],q._hasHoverLabel=!0}q._hasHoverEvent=!0,te.emit("plotly_hover",{points:[x(ne,Q)],event:r.event})}}),K.on("mouseout",function(ne){var H=te._fullLayout,Q=te._fullData[q.index],ee=r.select(this).datum();q._hasHoverEvent&&(ne.originalEvent=r.event,te.emit("plotly_unhover",{points:[x(ee,Q)],event:r.event}),q._hasHoverEvent=!1),q._hasHoverLabel&&(u.loneUnhover(H._hoverlayer.node()),q._hasHoverLabel=!1)}),K.on("click",function(ne){var H=te._fullLayout,Q=te._fullData[q.index];te._dragging||H.hovermode===!1||(te._hoverdata=[x(ne,Q)],u.click(te,r.event))})}function b(K,te,Y){var Z=y.castOption(K.insidetextfont.color,te.pts);!Z&&K._input.textfont&&(Z=y.castOption(K._input.textfont.color,te.pts));var re=y.castOption(K.insidetextfont.family,te.pts)||y.castOption(K.textfont.family,te.pts)||Y.family,U=y.castOption(K.insidetextfont.size,te.pts)||y.castOption(K.textfont.size,te.pts)||Y.size;return{color:Z||c.contrast(te.color),family:re,size:U}}function T(K,te){for(var Y,Z,re=0;reFe&&Fe>Ke||Ve=-4;ge-=2)fe(Math.PI*ge,"tan");for(ge=4;ge>=-4;ge-=2)fe(Math.PI*(ge+1),"tan")}if(ee||ae){for(ge=4;ge>=-4;ge-=2)fe(Math.PI*(ge+1.5),"rad");for(ge=4;ge>=-4;ge-=2)fe(Math.PI*(ge+.5),"rad")}}if($||ue||ee){var me=Math.sqrt(K.width*K.width+K.height*K.height);if((U={scale:re*Z*2/me,rCenter:1-re,rotate:0}).textPosAngle=(te.startangle+te.stopangle)/2,U.scale>=1)return U;le.push(U)}(ue||ae)&&((U=M(K,Z,q,ne,H)).textPosAngle=(te.startangle+te.stopangle)/2,le.push(U)),(ue||ie)&&((U=A(K,Z,q,ne,H)).textPosAngle=(te.startangle+te.stopangle)/2,le.push(U));for(var _e=0,we=0,Te=0;Te=1)break}return le[_e]}function M(K,te,Y,Z,re){te=Math.max(0,te-2*v);var U=K.width/K.height,q=D(U,Z,te,Y);return{scale:2*q/K.height,rCenter:S(U,q/te),rotate:E(re)}}function A(K,te,Y,Z,re){te=Math.max(0,te-2*v);var U=K.height/K.width,q=D(U,Z,te,Y);return{scale:2*q/K.width,rCenter:S(U,q/te),rotate:E(re+Math.PI/2)}}function S(K,te){return Math.cos(te)-K*te}function E(K){return(180/Math.PI*K+720)%180-90}function D(K,te,Y,Z){var re=K+1/(2*Math.tan(te));return Y*Math.min(1/(Math.sqrt(re*re+.5)+re),Z/(Math.sqrt(K*K+Z/2)+K))}function O(K,te){return K.v!==te.vTotal||te.trace.hole?Math.min(1/(1+1/Math.sin(K.halfangle)),K.ring/2):1}function R(K,te){var Y=te.pxmid[0],Z=te.pxmid[1],re=K.width/2,U=K.height/2;return Y<0&&(re*=-1),Z<0&&(U*=-1),{scale:1,rCenter:1,rotate:0,x:re+Math.abs(U)*(re>0?1:-1)/2,y:U/(1+Y*Y/(Z*Z)),outside:!0}}function z(K,te){var Y,Z,re,U=K.trace,q={x:K.cx,y:K.cy},$={tx:0,ty:0};$.ty+=U.title.font.size,re=P(U),U.title.position.indexOf("top")!==-1?(q.y-=(1+re)*K.r,$.ty-=K.titleBox.height):U.title.position.indexOf("bottom")!==-1&&(q.y+=(1+re)*K.r);var ne,H,Q=(ne=K.r,H=K.trace.aspectratio,ne/(H===void 0?1:H)),ee=te.w*(U.domain.x[1]-U.domain.x[0])/2;return U.title.position.indexOf("left")!==-1?(ee+=Q,q.x-=(1+re)*Q,$.tx+=K.titleBox.width/2):U.title.position.indexOf("center")!==-1?ee*=2:U.title.position.indexOf("right")!==-1&&(ee+=Q,q.x+=(1+re)*Q,$.tx-=K.titleBox.width/2),Y=ee/K.titleBox.width,Z=L(K,te)/K.titleBox.height,{x:q.x,y:q.y,scale:Math.min(Y,Z),tx:$.tx,ty:$.ty}}function L(K,te){var Y=K.trace,Z=te.h*(Y.domain.y[1]-Y.domain.y[0]);return Math.min(K.titleBox.height,Z/2)}function P(K){var te,Y=K.pull;if(!Y)return 0;if(Array.isArray(Y))for(Y=0,te=0;teY&&(Y=K.pull[te]);return Y}function N(K,te){for(var Y=[],Z=0;Z1?(we=ae.r,Te=we/le.aspectratio):(Te=ae.r,we=Te*le.aspectratio),we*=(1+le.baseratio)/2,_e=we*Te}fe=Math.min(fe,_e/ae.vTotal)}for(ue=0;ue")}if(U){var ge=s.castOption(re,te.i,"texttemplate");if(ge){var fe=function(_e){return{label:_e.label,value:_e.v,valueLabel:y.formatPieValue(_e.v,Z.separators),percent:_e.v/Y.vTotal,percentLabel:y.formatPiePercent(_e.v/Y.vTotal,Z.separators),color:_e.color,text:_e.text,customdata:s.castOption(re,_e.i,"customdata")}}(te),me=y.getFirstFilled(re.text,te.pts);(w(me)||me==="")&&(fe.text=me),te.text=s.texttemplateString(ge,fe,K._fullLayout._d3locale,fe,re._meta||{})}else te.text=""}}function W(K,te){var Y=K.rotate*Math.PI/180,Z=Math.cos(Y),re=Math.sin(Y),U=(te.left+te.right)/2,q=(te.top+te.bottom)/2;K.textX=U*Z-q*re,K.textY=U*re+q*Z,K.noCenter=!0}o.exports={plot:function(K,te){var Y=K._fullLayout,Z=Y._size;p("pie",Y),T(te,K),N(te,Z);var re=s.makeTraceGroups(Y._pielayer,te,"trace").each(function(U){var q=r.select(this),$=U[0],ne=$.trace;(function(H){var Q,ee,ie,ae=H[0],ue=ae.r,le=ae.trace,ge=y.getRotationAngle(le.rotation),fe=2*Math.PI/ae.vTotal,me="px0",_e="px1";if(le.direction==="counterclockwise"){for(Q=0;Qae.vTotal/2?1:0,ee.halfangle=Math.PI*Math.min(ee.v/ae.vTotal,.5),ee.ring=1-le.hole,ee.rInscribed=O(ee,ae))})(U),q.attr("stroke-linejoin","round"),q.each(function(){var H=r.select(this).selectAll("g.slice").data(U);H.enter().append("g").classed("slice",!0),H.exit().remove();var Q=[[[],[]],[[],[]]],ee=!1;H.each(function(_e,we){if(_e.hidden)r.select(this).selectAll("path,g").remove();else{_e.pointNumber=_e.i,_e.curveNumber=ne.index,Q[_e.pxmid[1]<0?0:1][_e.pxmid[0]<0?0:1].push(_e);var Te=$.cx,Oe=$.cy,de=r.select(this),ye=de.selectAll("path.surface").data([_e]);if(ye.enter().append("path").classed("surface",!0).style({"pointer-events":"all"}),de.call(k,K,U),ne.pull){var Me=+y.castOption(ne.pull,_e.pts)||0;Me>0&&(Te+=Me*_e.pxmid[0],Oe+=Me*_e.pxmid[1])}_e.cxFinal=Te,_e.cyFinal=Oe;var ke=ne.hole;if(_e.v===$.vTotal){var Ee="M"+(Te+_e.px0[0])+","+(Oe+_e.px0[1])+Re(_e.px0,_e.pxmid,!0,1)+Re(_e.pxmid,_e.px0,!0,1)+"Z";ke?ye.attr("d","M"+(Te+ke*_e.px0[0])+","+(Oe+ke*_e.px0[1])+Re(_e.px0,_e.pxmid,!1,ke)+Re(_e.pxmid,_e.px0,!1,ke)+"Z"+Ee):ye.attr("d",Ee)}else{var ze=Re(_e.px0,_e.px1,!0,1);if(ke){var Fe=1-ke;ye.attr("d","M"+(Te+ke*_e.px1[0])+","+(Oe+ke*_e.px1[1])+Re(_e.px1,_e.px0,!1,ke)+"l"+Fe*_e.px0[0]+","+Fe*_e.px0[1]+ze+"Z")}else ye.attr("d","M"+Te+","+Oe+"l"+_e.px0[0]+","+_e.px0[1]+ze+"Z")}G(K,_e,$);var Ve=y.castOption(ne.textposition,_e.pts),Ke=de.selectAll("g.slicetext").data(_e.text&&Ve!=="none"?[0]:[]);Ke.enter().append("g").classed("slicetext",!0),Ke.exit().remove(),Ke.each(function(){var qe=s.ensureSingle(r.select(this),"text","",function(at){at.attr("data-notex",1)}),We=s.ensureUniformFontSize(K,Ve==="outside"?function(at,et,Ot){var Wt=y.castOption(at.outsidetextfont.color,et.pts)||y.castOption(at.textfont.color,et.pts)||Ot.color,Jt=y.castOption(at.outsidetextfont.family,et.pts)||y.castOption(at.textfont.family,et.pts)||Ot.family,Be=y.castOption(at.outsidetextfont.size,et.pts)||y.castOption(at.textfont.size,et.pts)||Ot.size;return{color:Wt,family:Jt,size:Be}}(ne,_e,Y.font):b(ne,_e,Y.font));qe.text(_e.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(i.font,We).call(h.convertToTspans,K);var Ye,nt=i.bBox(qe.node());if(Ve==="outside")Ye=R(nt,_e);else if(Ye=_(nt,_e,$),Ve==="auto"&&Ye.scale<1){var ft=s.ensureUniformFontSize(K,ne.outsidetextfont);qe.call(i.font,ft),Ye=R(nt=i.bBox(qe.node()),_e)}var vt=Ye.textPosAngle,Pt=vt===void 0?_e.pxmid:B($.r,vt);if(Ye.targetX=Te+Pt[0]*Ye.rCenter+(Ye.x||0),Ye.targetY=Oe+Pt[1]*Ye.rCenter+(Ye.y||0),W(Ye,nt),Ye.outside){var At=Ye.targetY;_e.yLabelMin=At-nt.height/2,_e.yLabelMid=At,_e.yLabelMax=At+nt.height/2,_e.labelExtraX=0,_e.labelExtraY=0,ee=!0}Ye.fontSize=We.size,g(ne.type,Ye,Y),U[we].transform=Ye,qe.attr("transform",s.getTextTransform(Ye))})}function Re(qe,We,Ye,nt){var ft=nt*(We[0]-qe[0]),vt=nt*(We[1]-qe[1]);return"a"+nt*$.r+","+nt*$.r+" 0 "+_e.largeArc+(Ye?" 1 ":" 0 ")+ft+","+vt}});var ie=r.select(this).selectAll("g.titletext").data(ne.title.text?[0]:[]);if(ie.enter().append("g").classed("titletext",!0),ie.exit().remove(),ie.each(function(){var _e,we=s.ensureSingle(r.select(this),"text","",function(Oe){Oe.attr("data-notex",1)}),Te=ne.title.text;ne._meta&&(Te=s.templateString(Te,ne._meta)),we.text(Te).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(i.font,ne.title.font).call(h.convertToTspans,K),_e=ne.title.position==="middle center"?function(Oe){var de=Math.sqrt(Oe.titleBox.width*Oe.titleBox.width+Oe.titleBox.height*Oe.titleBox.height);return{x:Oe.cx,y:Oe.cy,scale:Oe.trace.hole*Oe.r*2/de,tx:0,ty:-Oe.titleBox.height/2+Oe.trace.title.font.size}}($):z($,Z),we.attr("transform",d(_e.x,_e.y)+l(Math.min(1,_e.scale))+d(_e.tx,_e.ty))}),ee&&function(_e,we){var Te,Oe,de,ye,Me,ke,Ee,ze,Fe,Ve,Ke,Re,qe;function We(vt,Pt){return vt.pxmid[1]-Pt.pxmid[1]}function Ye(vt,Pt){return Pt.pxmid[1]-vt.pxmid[1]}function nt(vt,Pt){Pt||(Pt={});var At,at,et,Ot,Wt=Pt.labelExtraY+(Oe?Pt.yLabelMax:Pt.yLabelMin),Jt=Oe?vt.yLabelMin:vt.yLabelMax,Be=Oe?vt.yLabelMax:vt.yLabelMin,Ge=vt.cyFinal+Me(vt.px0[1],vt.px1[1]),Tt=Wt-Jt;if(Tt*Ee>0&&(vt.labelExtraY=Tt),Array.isArray(we.pull))for(at=0;at=(y.castOption(we.pull,et.pts)||0)||((vt.pxmid[1]-et.pxmid[1])*Ee>0?(Tt=et.cyFinal+Me(et.px0[1],et.px1[1])-Jt-vt.labelExtraY)*Ee>0&&(vt.labelExtraY+=Tt):(Be+vt.labelExtraY-Ge)*Ee>0&&(At=3*ke*Math.abs(at-Ve.indexOf(vt)),(Ot=et.cxFinal+ye(et.px0[0],et.px1[0])+At-(vt.cxFinal+vt.pxmid[0])-vt.labelExtraX)*ke>0&&(vt.labelExtraX+=Ot)))}for(Oe=0;Oe<2;Oe++)for(de=Oe?We:Ye,Me=Oe?Math.max:Math.min,Ee=Oe?1:-1,Te=0;Te<2;Te++){for(ye=Te?Math.max:Math.min,ke=Te?1:-1,(ze=_e[Oe][Te]).sort(de),Fe=_e[1-Oe][Te],Ve=Fe.concat(ze),Re=[],Ke=0;KeMath.abs(ze)?Me+="l"+ze*Te.pxmid[0]/Te.pxmid[1]+","+ze+"H"+(ye+Te.labelExtraX+ke):Me+="l"+Te.labelExtraX+","+Ee+"v"+(ze-Ee)+"h"+ke}else Me+="V"+(Te.yLabelMid+Te.labelExtraY)+"h"+ke;s.ensureSingle(Oe,"path","textline").call(c.stroke,we.outsidetextfont.color).attr({"stroke-width":Math.min(2,we.outsidetextfont.size/8),d:Me,fill:"none"})}else Oe.select("path.textline").remove()})}(H,ne),ee&&ne.automargin){var ae=i.bBox(q.node()),ue=ne.domain,le=Z.w*(ue.x[1]-ue.x[0]),ge=Z.h*(ue.y[1]-ue.y[0]),fe=(.5*le-$.r)/Z.w,me=(.5*ge-$.r)/Z.h;a.autoMargin(K,"pie."+ne.uid+".automargin",{xl:ue.x[0]-fe,xr:ue.x[1]+fe,yb:ue.y[0]-me,yt:ue.y[1]+me,l:Math.max($.cx-$.r-ae.left,0),r:Math.max(ae.right-($.cx+$.r),0),b:Math.max(ae.bottom-($.cy+$.r),0),t:Math.max($.cy-$.r-ae.top,0),pad:5})}})});setTimeout(function(){re.selectAll("tspan").each(function(){var U=r.select(this);U.attr("dy")&&U.attr("dy",U.attr("dy"))})},0)},formatSliceLabel:G,transformInsideText:_,determineInsideTextFont:b,positionTitleOutside:z,prerenderTitles:T,layoutAreas:N,attachFxHandlers:k,computeTransform:W}},{"../../components/color":366,"../../components/drawing":388,"../../components/fx":406,"../../lib":503,"../../lib/svg_text_utils":529,"../../plots/plots":619,"../bar/constants":650,"../bar/uniform_text":664,"./event_data":905,"./helpers":906,"@plotly/d3":58}],911:[function(e,o,f){var r=e("@plotly/d3"),a=e("./style_one"),u=e("../bar/uniform_text").resizeText;o.exports=function(c){var i=c._fullLayout._pielayer.selectAll(".trace");u(c,i,"pie"),i.each(function(s){var l=s[0].trace,d=r.select(this);d.style({opacity:l.opacity}),d.selectAll("path.surface").each(function(h){r.select(this).call(a,h,l)})})}},{"../bar/uniform_text":664,"./style_one":912,"@plotly/d3":58}],912:[function(e,o,f){var r=e("../../components/color"),a=e("./helpers").castOption;o.exports=function(u,c,i){var s=i.marker.line,l=a(s.color,c.pts)||r.defaultLine,d=a(s.width,c.pts)||0;u.style("stroke-width",d).call(r.fill,c.color).call(r.stroke,l)}},{"../../components/color":366,"./helpers":906}],913:[function(e,o,f){var r=e("../scatter/attributes");o.exports={x:r.x,y:r.y,xy:{valType:"data_array",editType:"calc"},indices:{valType:"data_array",editType:"calc"},xbounds:{valType:"data_array",editType:"calc"},ybounds:{valType:"data_array",editType:"calc"},text:r.text,marker:{color:{valType:"color",arrayOk:!1,editType:"calc"},opacity:{valType:"number",min:0,max:1,dflt:1,arrayOk:!1,editType:"calc"},blend:{valType:"boolean",dflt:null,editType:"calc"},sizemin:{valType:"number",min:.1,max:2,dflt:.5,editType:"calc"},sizemax:{valType:"number",min:.1,dflt:20,editType:"calc"},border:{color:{valType:"color",arrayOk:!1,editType:"calc"},arearatio:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},editType:"calc"},editType:"calc"},transforms:void 0}},{"../scatter/attributes":927}],914:[function(e,o,f){var r=e("../../../stackgl_modules").gl_pointcloud2d,a=e("../../lib/str2rgbarray"),u=e("../../plots/cartesian/autorange").findExtremes,c=e("../scatter/get_trace_color");function i(l,d){this.scene=l,this.uid=d,this.type="pointcloud",this.pickXData=[],this.pickYData=[],this.xData=[],this.yData=[],this.textLabels=[],this.color="rgb(0, 0, 0)",this.name="",this.hoverinfo="all",this.idToIndex=new Int32Array(0),this.bounds=[0,0,0,0],this.pointcloudOptions={positions:new Float32Array(0),idToIndex:this.idToIndex,sizemin:.5,sizemax:12,color:[0,0,0,1],areaRatio:1,borderColor:[0,0,0,1]},this.pointcloud=r(l.glplot,this.pointcloudOptions),this.pointcloud._trace=this}var s=i.prototype;s.handlePick=function(l){var d=this.idToIndex[l.pointId];return{trace:this,dataCoord:l.dataCoord,traceCoord:this.pickXYData?[this.pickXYData[2*d],this.pickXYData[2*d+1]]:[this.pickXData[d],this.pickYData[d]],textLabel:Array.isArray(this.textLabels)?this.textLabels[d]:this.textLabels,color:this.color,name:this.name,pointIndex:d,hoverinfo:this.hoverinfo}},s.update=function(l){this.index=l.index,this.textLabels=l.text,this.name=l.name,this.hoverinfo=l.hoverinfo,this.bounds=[1/0,1/0,-1/0,-1/0],this.updateFast(l),this.color=c(l,{})},s.updateFast=function(l){var d,h,m,g,p,v,y=this.xData=this.pickXData=l.x,x=this.yData=this.pickYData=l.y,w=this.pickXYData=l.xy,k=l.xbounds&&l.ybounds,b=l.indices,T=this.bounds;if(w){if(m=w,d=w.length>>>1,k)T[0]=l.xbounds[0],T[2]=l.xbounds[1],T[1]=l.ybounds[0],T[3]=l.ybounds[1];else for(v=0;vT[2]&&(T[2]=g),pT[3]&&(T[3]=p);if(b)h=b;else for(h=new Int32Array(d),v=0;vT[2]&&(T[2]=g),pT[3]&&(T[3]=p);this.idToIndex=h,this.pointcloudOptions.idToIndex=h,this.pointcloudOptions.positions=m;var _=a(l.marker.color),M=a(l.marker.border.color),A=l.opacity*l.marker.opacity;_[3]*=A,this.pointcloudOptions.color=_;var S=l.marker.blend;S===null&&(S=y.length<100||x.length<100),this.pointcloudOptions.blend=S,M[3]*=A,this.pointcloudOptions.borderColor=M;var E=l.marker.sizemin,D=Math.max(l.marker.sizemax,l.marker.sizemin);this.pointcloudOptions.sizeMin=E,this.pointcloudOptions.sizeMax=D,this.pointcloudOptions.areaRatio=l.marker.border.arearatio,this.pointcloud.update(this.pointcloudOptions);var O=this.scene.xaxis,R=this.scene.yaxis,z=D/2||.5;l._extremes[O._id]=u(O,[T[0],T[2]],{ppad:z}),l._extremes[R._id]=u(R,[T[1],T[3]],{ppad:z})},s.dispose=function(){this.pointcloud.dispose()},o.exports=function(l,d){var h=new i(l,d.uid);return h.update(d),h}},{"../../../stackgl_modules":1124,"../../lib/str2rgbarray":528,"../../plots/cartesian/autorange":553,"../scatter/get_trace_color":937}],915:[function(e,o,f){var r=e("../../lib"),a=e("./attributes");o.exports=function(u,c,i){function s(l,d){return r.coerce(u,c,a,l,d)}s("x"),s("y"),s("xbounds"),s("ybounds"),u.xy&&u.xy instanceof Float32Array&&(c.xy=u.xy),u.indices&&u.indices instanceof Int32Array&&(c.indices=u.indices),s("text"),s("marker.color",i),s("marker.opacity"),s("marker.blend"),s("marker.sizemin"),s("marker.sizemax"),s("marker.border.color",i),s("marker.border.arearatio"),c._length=null}},{"../../lib":503,"./attributes":913}],916:[function(e,o,f){o.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),calc:e("../scatter3d/calc"),plot:e("./convert"),moduleType:"trace",name:"pointcloud",basePlotModule:e("../../plots/gl2d"),categories:["gl","gl2d","showLegend"],meta:{}}},{"../../plots/gl2d":596,"../scatter3d/calc":956,"./attributes":913,"./convert":914,"./defaults":915}],917:[function(e,o,f){var r=e("../../plots/font_attributes"),a=e("../../plots/attributes"),u=e("../../components/color/attributes"),c=e("../../components/fx/attributes"),i=e("../../plots/domain").attributes,s=e("../../plots/template_attributes").hovertemplateAttrs,l=e("../../components/colorscale/attributes"),d=e("../../plot_api/plot_template").templatedArray,h=e("../../plots/cartesian/axis_format_attributes").descriptionOnlyNumbers,m=e("../../lib/extend").extendFlat,g=e("../../plot_api/edit_types").overrideAll;(o.exports=g({hoverinfo:m({},a.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:c.hoverlabel,domain:i({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},valueformat:{valType:"string",dflt:".3s",description:h("value")},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:r({}),customdata:void 0,node:{label:{valType:"data_array",dflt:[]},groups:{valType:"info_array",impliedEdits:{x:[],y:[]},dimensions:2,freeLength:!0,dflt:[],items:{valType:"number",editType:"calc"}},x:{valType:"data_array",dflt:[]},y:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:u.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:.5,arrayOk:!0}},pad:{valType:"number",arrayOk:!1,min:0,dflt:20},thickness:{valType:"number",arrayOk:!1,min:1,dflt:20},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all"},hoverlabel:c.hoverlabel,hovertemplate:s({},{keys:["value","label"]})},link:{label:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:u.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:0,arrayOk:!0}},source:{valType:"data_array",dflt:[]},target:{valType:"data_array",dflt:[]},value:{valType:"data_array",dflt:[]},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all"},hoverlabel:c.hoverlabel,hovertemplate:s({},{keys:["value","label"]}),colorscales:d("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:m(l().colorscale,{dflt:[[0,"white"],[1,"black"]]})})}},"calc","nested")).transforms=void 0},{"../../components/color/attributes":365,"../../components/colorscale/attributes":373,"../../components/fx/attributes":397,"../../lib/extend":493,"../../plot_api/edit_types":536,"../../plot_api/plot_template":543,"../../plots/attributes":550,"../../plots/cartesian/axis_format_attributes":557,"../../plots/domain":584,"../../plots/font_attributes":585,"../../plots/template_attributes":633}],918:[function(e,o,f){var r=e("../../plot_api/edit_types").overrideAll,a=e("../../plots/get_data").getModuleCalcData,u=e("./plot"),c=e("../../components/fx/layout_attributes"),i=e("../../lib/setcursor"),s=e("../../components/dragelement"),l=e("../../plots/cartesian/select").prepSelect,d=e("../../lib"),h=e("../../registry");function m(g,p){var v=g._fullData[p],y=g._fullLayout,x=y.dragmode,w=y.dragmode==="pan"?"move":"crosshair",k=v._bgRect;if(x!=="pan"&&x!=="zoom"){i(k,w);var b={_id:"x",c2p:d.identity,_offset:v._sankey.translateX,_length:v._sankey.width},T={_id:"y",c2p:d.identity,_offset:v._sankey.translateY,_length:v._sankey.height},_={gd:g,element:k.node(),plotinfo:{id:p,xaxis:b,yaxis:T,fillRangeItems:d.noop},subplot:p,xaxes:[b],yaxes:[T],doneFnCompleted:function(M){var A,S=g._fullData[p],E=S.node.groups.slice(),D=[];function O(P){for(var N=S._sankey.graph.nodes,B=0;BM&&(M=g.source[h]),g.target[h]>M&&(M=g.target[h]);var A,S=M+1;d.node._count=S;var E=d.node.groups,D={};for(h=0;h0&&i(N,S)&&i(B,S)&&(!D.hasOwnProperty(N)||!D.hasOwnProperty(B)||D[N]!==D[B])){D.hasOwnProperty(B)&&(B=D[B]),D.hasOwnProperty(N)&&(N=D[N]),B=+B,x[N=+N]=x[B]=!0;var G="";g.label&&g.label[h]&&(G=g.label[h]);var W=null;G&&w.hasOwnProperty(G)&&(W=w[G]),p.push({pointNumber:h,label:G,color:v?g.color[h]:g.color,customdata:y?g.customdata[h]:g.customdata,concentrationscale:W,source:N,target:B,value:+P}),L.source.push(N),L.target.push(B)}}var K=S+E.length,te=c(m.color),Y=c(m.customdata),Z=[];for(h=0;hS-1,childrenNodes:[],pointNumber:h,label:re,color:te?m.color[h]:m.color,customdata:Y?m.customdata[h]:m.customdata})}var U=!1;return function(q,$,ne){for(var H=a.init2dArray(q,0),Q=0;Q1})}(K,L.source,L.target)&&(U=!0),{circular:U,links:p,nodes:Z,groups:E,groupLookup:D}}o.exports=function(d,h){var m=l(h);return u({circular:m.circular,_nodes:m.nodes,_links:m.links,_groups:m.groups,_groupLookup:m.groupLookup})}},{"../../components/colorscale":378,"../../lib":503,"../../lib/gup":500,"strongly-connected-components":306}],920:[function(e,o,f){o.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:"linear",cn:{sankey:"sankey",sankeyLinks:"sankey-links",sankeyLink:"sankey-link",sankeyNodeSet:"sankey-node-set",sankeyNode:"sankey-node",nodeRect:"node-rect",nodeLabel:"node-label"}}},{}],921:[function(e,o,f){var r=e("../../lib"),a=e("./attributes"),u=e("../../components/color"),c=e("tinycolor2"),i=e("../../plots/domain").defaults,s=e("../../components/fx/hoverlabel_defaults"),l=e("../../plot_api/plot_template"),d=e("../../plots/array_container_defaults");function h(m,g){function p(v,y){return r.coerce(m,g,a.link.colorscales,v,y)}p("label"),p("cmin"),p("cmax"),p("colorscale")}o.exports=function(m,g,p,v){function y(D,O){return r.coerce(m,g,a,D,O)}var x=r.extendDeep(v.hoverlabel,m.hoverlabel),w=m.node,k=l.newContainer(g,"node");function b(D,O){return r.coerce(w,k,a.node,D,O)}b("label"),b("groups"),b("x"),b("y"),b("pad"),b("thickness"),b("line.color"),b("line.width"),b("hoverinfo",m.hoverinfo),s(w,k,b,x),b("hovertemplate");var T=v.colorway;b("color",k.label.map(function(D,O){return u.addOpacity(function(R){return T[R%T.length]}(O),.8)})),b("customdata");var _=m.link||{},M=l.newContainer(g,"link");function A(D,O){return r.coerce(_,M,a.link,D,O)}A("label"),A("source"),A("target"),A("value"),A("line.color"),A("line.width"),A("hoverinfo",m.hoverinfo),s(_,M,A,x),A("hovertemplate");var S,E=c(v.paper_bgcolor).getLuminance()<.333?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)";A("color",r.repeat(E,M.value.length)),A("customdata"),d(_,M,{name:"colorscales",handleItemDefaults:h}),i(g,v,y),y("orientation"),y("valueformat"),y("valuesuffix"),k.x.length&&k.y.length&&(S="freeform"),y("arrangement",S),r.coerceFont(y,"textfont",r.extendFlat({},v.font)),g._length=null}},{"../../components/color":366,"../../components/fx/hoverlabel_defaults":404,"../../lib":503,"../../plot_api/plot_template":543,"../../plots/array_container_defaults":549,"../../plots/domain":584,"./attributes":917,tinycolor2:312}],922:[function(e,o,f){o.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),calc:e("./calc"),plot:e("./plot"),moduleType:"trace",name:"sankey",basePlotModule:e("./base_plot"),selectPoints:e("./select.js"),categories:["noOpacity"],meta:{}}},{"./attributes":917,"./base_plot":918,"./calc":919,"./defaults":921,"./plot":923,"./select.js":925}],923:[function(e,o,f){var r=e("@plotly/d3"),a=e("../../lib"),u=a.numberFormat,c=e("./render"),i=e("../../components/fx"),s=e("../../components/color"),l=e("./constants").cn,d=a._;function h(_){return _!==""}function m(_,M){return _.filter(function(A){return A.key===M.traceId})}function g(_,M){r.select(_).select("path").style("fill-opacity",M),r.select(_).select("rect").style("fill-opacity",M)}function p(_){r.select(_).select("text.name").style("fill","black")}function v(_){return function(M){return _.node.sourceLinks.indexOf(M.link)!==-1||_.node.targetLinks.indexOf(M.link)!==-1}}function y(_){return function(M){return M.node.sourceLinks.indexOf(_.link)!==-1||M.node.targetLinks.indexOf(_.link)!==-1}}function x(_,M,A){M&&A&&m(A,M).selectAll("."+l.sankeyLink).filter(v(M)).call(k.bind(0,M,A,!1))}function w(_,M,A){M&&A&&m(A,M).selectAll("."+l.sankeyLink).filter(v(M)).call(b.bind(0,M,A,!1))}function k(_,M,A,S){var E=S.datum().link.label;S.style("fill-opacity",function(D){if(!D.link.concentrationscale)return .4}),E&&m(M,_).selectAll("."+l.sankeyLink).filter(function(D){return D.link.label===E}).style("fill-opacity",function(D){if(!D.link.concentrationscale)return .4}),A&&m(M,_).selectAll("."+l.sankeyNode).filter(y(_)).call(x)}function b(_,M,A,S){var E=S.datum().link.label;S.style("fill-opacity",function(D){return D.tinyColorAlpha}),E&&m(M,_).selectAll("."+l.sankeyLink).filter(function(D){return D.link.label===E}).style("fill-opacity",function(D){return D.tinyColorAlpha}),A&&m(M,_).selectAll(l.sankeyNode).filter(y(_)).call(w)}function T(_,M){var A=_.hoverlabel||{},S=a.nestedProperty(A,M).get();return!Array.isArray(S)&&S}o.exports=function(_,M){for(var A=_._fullLayout,S=A._paper,E=A._size,D=0;D<_._fullData.length;D++)if(_._fullData[D].visible&&_._fullData[D].type===l.sankey&&!_._fullData[D]._viewInitial){var O=_._fullData[D].node;_._fullData[D]._viewInitial={node:{groups:O.groups.slice(),x:O.x.slice(),y:O.y.slice()}}}var R=d(_,"source:")+" ",z=d(_,"target:")+" ",L=d(_,"concentration:")+" ",P=d(_,"incoming flow count:")+" ",N=d(_,"outgoing flow count:")+" ";c(_,S,M,{width:E.w,height:E.h,margin:{t:E.t,r:E.r,b:E.b,l:E.l}},{linkEvents:{hover:function(B,G,W){_._fullLayout.hovermode!==!1&&(r.select(B).call(k.bind(0,G,W,!0)),G.link.trace.link.hoverinfo!=="skip"&&(G.link.fullData=G.link.trace,_.emit("plotly_hover",{event:r.event,points:[G.link]})))},follow:function(B,G){if(_._fullLayout.hovermode!==!1){var W=G.link.trace.link;if(W.hoverinfo!=="none"&&W.hoverinfo!=="skip"){for(var K=[],te=0,Y=0;Y"),color:T(W,"bgcolor")||s.addOpacity(Z.color,1),borderColor:T(W,"bordercolor"),fontFamily:T(W,"font.family"),fontSize:T(W,"font.size"),fontColor:T(W,"font.color"),nameLength:T(W,"namelength"),textAlign:T(W,"align"),idealAlign:r.event.x"),color:T(W,"bgcolor")||G.tinyColorHue,borderColor:T(W,"bordercolor"),fontFamily:T(W,"font.family"),fontSize:T(W,"font.size"),fontColor:T(W,"font.color"),nameLength:T(W,"namelength"),textAlign:T(W,"align"),idealAlign:"left",hovertemplate:W.hovertemplate,hovertemplateLabels:q,eventData:[G.node]},{container:A._hoverlayer.node(),outerContainer:A._paper.node(),gd:_});g(H,.85),p(H)}}},unhover:function(B,G,W){_._fullLayout.hovermode!==!1&&(r.select(B).call(w,G,W),G.node.trace.node.hoverinfo!=="skip"&&(G.node.fullData=G.node.trace,_.emit("plotly_unhover",{event:r.event,points:[G.node]})),i.loneUnhover(A._hoverlayer.node()))},select:function(B,G,W){var K=G.node;K.originalEvent=r.event,_._hoverdata=[K],r.select(B).call(w,G,W),i.click(_,{target:!0})}}})}},{"../../components/color":366,"../../components/fx":406,"../../lib":503,"./constants":920,"./render":924,"@plotly/d3":58}],924:[function(e,o,f){var r=e("d3-force"),a=e("d3-interpolate").interpolateNumber,u=e("@plotly/d3"),c=e("@plotly/d3-sankey"),i=e("@plotly/d3-sankey-circular"),s=e("./constants"),l=e("tinycolor2"),d=e("../../components/color"),h=e("../../components/drawing"),m=e("../../lib"),g=m.strTranslate,p=m.strRotate,v=e("../../lib/gup"),y=v.keyFun,x=v.repeat,w=v.unwrap,k=e("../../lib/svg_text_utils"),b=e("../../registry"),T=e("../../constants/alignment"),_=T.CAP_SHIFT,M=T.LINE_SPACING;function A(Y,Z,re){var U,q=w(Z),$=q.trace,ne=$.domain,H=$.orientation==="h",Q=$.node.pad,ee=$.node.thickness,ie=Y.width*(ne.x[1]-ne.x[0]),ae=Y.height*(ne.y[1]-ne.y[0]),ue=q._nodes,le=q._links,ge=q.circular;(U=ge?i.sankeyCircular().circularLinkGap(0):c.sankey()).iterations(s.sankeyIterations).size(H?[ie,ae]:[ae,ie]).nodeWidth(ee).nodePadding(Q).nodeId(function(Ee){return Ee.pointNumber}).nodes(ue).links(le);var fe,me,_e,we=U();for(var Te in U.nodePadding()=Re||(Ve=Re-Fe.y0)>1e-6&&(Fe.y0+=Ve,Fe.y1+=Ve),Re=Fe.y1+Q})}(function(Ee){var ze,Fe,Ve=Ee.map(function(Ye,nt){return{x0:Ye.x0,index:nt}}).sort(function(Ye,nt){return Ye.x0-nt.x0}),Ke=[],Re=-1,qe=-1/0;for(fe=0;feqe+ee&&(Re+=1,ze=We.x0),qe=We.x0,Ke[Re]||(Ke[Re]=[]),Ke[Re].push(We),Fe=ze-We.x0,We.x0+=Fe,We.x1+=Fe}return Ke}(ue=we.nodes)),U.update(we)}return{circular:ge,key:re,trace:$,guid:m.randstr(),horizontal:H,width:ie,height:ae,nodePad:$.node.pad,nodeLineColor:$.node.line.color,nodeLineWidth:$.node.line.width,linkLineColor:$.link.line.color,linkLineWidth:$.link.line.width,valueFormat:$.valueformat,valueSuffix:$.valuesuffix,textFont:$.textfont,translateX:ne.x[0]*Y.width+Y.margin.l,translateY:Y.height-ne.y[1]*Y.height+Y.margin.t,dragParallel:H?ae:ie,dragPerpendicular:H?ie:ae,arrangement:$.arrangement,sankey:U,graph:we,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function S(Y,Z,re){var U=l(Z.color),q=Z.source.label+"|"+Z.target.label+"__"+re;return Z.trace=Y.trace,Z.curveNumber=Y.trace.index,{circular:Y.circular,key:q,traceId:Y.key,pointNumber:Z.pointNumber,link:Z,tinyColorHue:d.tinyRGB(U),tinyColorAlpha:U.getAlpha(),linkPath:E,linkLineColor:Y.linkLineColor,linkLineWidth:Y.linkLineWidth,valueFormat:Y.valueFormat,valueSuffix:Y.valueSuffix,sankey:Y.sankey,parent:Y,interactionState:Y.interactionState,flow:Z.flow}}function E(){return function(Y){if(Y.link.circular)return Z=Y.link,re=Z.width/2,U=Z.circularPathData,Z.circularLinkType==="top"?"M "+U.targetX+" "+(U.targetY+re)+" L"+U.rightInnerExtent+" "+(U.targetY+re)+"A"+(U.rightLargeArcRadius+re)+" "+(U.rightSmallArcRadius+re)+" 0 0 1 "+(U.rightFullExtent-re)+" "+(U.targetY-U.rightSmallArcRadius)+"L"+(U.rightFullExtent-re)+" "+U.verticalRightInnerExtent+"A"+(U.rightLargeArcRadius+re)+" "+(U.rightLargeArcRadius+re)+" 0 0 1 "+U.rightInnerExtent+" "+(U.verticalFullExtent-re)+"L"+U.leftInnerExtent+" "+(U.verticalFullExtent-re)+"A"+(U.leftLargeArcRadius+re)+" "+(U.leftLargeArcRadius+re)+" 0 0 1 "+(U.leftFullExtent+re)+" "+U.verticalLeftInnerExtent+"L"+(U.leftFullExtent+re)+" "+(U.sourceY-U.leftSmallArcRadius)+"A"+(U.leftLargeArcRadius+re)+" "+(U.leftSmallArcRadius+re)+" 0 0 1 "+U.leftInnerExtent+" "+(U.sourceY+re)+"L"+U.sourceX+" "+(U.sourceY+re)+"L"+U.sourceX+" "+(U.sourceY-re)+"L"+U.leftInnerExtent+" "+(U.sourceY-re)+"A"+(U.leftLargeArcRadius-re)+" "+(U.leftSmallArcRadius-re)+" 0 0 0 "+(U.leftFullExtent-re)+" "+(U.sourceY-U.leftSmallArcRadius)+"L"+(U.leftFullExtent-re)+" "+U.verticalLeftInnerExtent+"A"+(U.leftLargeArcRadius-re)+" "+(U.leftLargeArcRadius-re)+" 0 0 0 "+U.leftInnerExtent+" "+(U.verticalFullExtent+re)+"L"+U.rightInnerExtent+" "+(U.verticalFullExtent+re)+"A"+(U.rightLargeArcRadius-re)+" "+(U.rightLargeArcRadius-re)+" 0 0 0 "+(U.rightFullExtent+re)+" "+U.verticalRightInnerExtent+"L"+(U.rightFullExtent+re)+" "+(U.targetY-U.rightSmallArcRadius)+"A"+(U.rightLargeArcRadius-re)+" "+(U.rightSmallArcRadius-re)+" 0 0 0 "+U.rightInnerExtent+" "+(U.targetY-re)+"L"+U.targetX+" "+(U.targetY-re)+"Z":"M "+U.targetX+" "+(U.targetY-re)+" L"+U.rightInnerExtent+" "+(U.targetY-re)+"A"+(U.rightLargeArcRadius+re)+" "+(U.rightSmallArcRadius+re)+" 0 0 0 "+(U.rightFullExtent-re)+" "+(U.targetY+U.rightSmallArcRadius)+"L"+(U.rightFullExtent-re)+" "+U.verticalRightInnerExtent+"A"+(U.rightLargeArcRadius+re)+" "+(U.rightLargeArcRadius+re)+" 0 0 0 "+U.rightInnerExtent+" "+(U.verticalFullExtent+re)+"L"+U.leftInnerExtent+" "+(U.verticalFullExtent+re)+"A"+(U.leftLargeArcRadius+re)+" "+(U.leftLargeArcRadius+re)+" 0 0 0 "+(U.leftFullExtent+re)+" "+U.verticalLeftInnerExtent+"L"+(U.leftFullExtent+re)+" "+(U.sourceY+U.leftSmallArcRadius)+"A"+(U.leftLargeArcRadius+re)+" "+(U.leftSmallArcRadius+re)+" 0 0 0 "+U.leftInnerExtent+" "+(U.sourceY-re)+"L"+U.sourceX+" "+(U.sourceY-re)+"L"+U.sourceX+" "+(U.sourceY+re)+"L"+U.leftInnerExtent+" "+(U.sourceY+re)+"A"+(U.leftLargeArcRadius-re)+" "+(U.leftSmallArcRadius-re)+" 0 0 1 "+(U.leftFullExtent-re)+" "+(U.sourceY+U.leftSmallArcRadius)+"L"+(U.leftFullExtent-re)+" "+U.verticalLeftInnerExtent+"A"+(U.leftLargeArcRadius-re)+" "+(U.leftLargeArcRadius-re)+" 0 0 1 "+U.leftInnerExtent+" "+(U.verticalFullExtent-re)+"L"+U.rightInnerExtent+" "+(U.verticalFullExtent-re)+"A"+(U.rightLargeArcRadius-re)+" "+(U.rightLargeArcRadius-re)+" 0 0 1 "+(U.rightFullExtent+re)+" "+U.verticalRightInnerExtent+"L"+(U.rightFullExtent+re)+" "+(U.targetY+U.rightSmallArcRadius)+"A"+(U.rightLargeArcRadius-re)+" "+(U.rightSmallArcRadius-re)+" 0 0 1 "+U.rightInnerExtent+" "+(U.targetY+re)+"L"+U.targetX+" "+(U.targetY+re)+"Z";var Z,re,U,q=Y.link.source.x1,$=Y.link.target.x0,ne=a(q,$),H=ne(.5),Q=ne(.5),ee=Y.link.y0-Y.link.width/2,ie=Y.link.y0+Y.link.width/2,ae=Y.link.y1-Y.link.width/2,ue=Y.link.y1+Y.link.width/2;return"M"+q+","+ee+"C"+H+","+ee+" "+Q+","+ae+" "+$+","+ae+"L"+$+","+ue+"C"+Q+","+ue+" "+H+","+ie+" "+q+","+ie+"Z"}}function D(Y,Z){var re=l(Z.color),U=s.nodePadAcross,q=Y.nodePad/2;Z.dx=Z.x1-Z.x0,Z.dy=Z.y1-Z.y0;var $=Z.dx,ne=Math.max(.5,Z.dy),H="node_"+Z.pointNumber;return Z.group&&(H=m.randstr()),Z.trace=Y.trace,Z.curveNumber=Y.trace.index,{index:Z.pointNumber,key:H,partOfGroup:Z.partOfGroup||!1,group:Z.group,traceId:Y.key,trace:Y.trace,node:Z,nodePad:Y.nodePad,nodeLineColor:Y.nodeLineColor,nodeLineWidth:Y.nodeLineWidth,textFont:Y.textFont,size:Y.horizontal?Y.height:Y.width,visibleWidth:Math.ceil($),visibleHeight:ne,zoneX:-U,zoneY:-q,zoneWidth:$+2*U,zoneHeight:ne+2*q,labelY:Y.horizontal?Z.dy/2+1:Z.dx/2+1,left:Z.originalLayer===1,sizeAcross:Y.width,forceLayouts:Y.forceLayouts,horizontal:Y.horizontal,darkBackground:re.getBrightness()<=128,tinyColorHue:d.tinyRGB(re),tinyColorAlpha:re.getAlpha(),valueFormat:Y.valueFormat,valueSuffix:Y.valueSuffix,sankey:Y.sankey,graph:Y.graph,arrangement:Y.arrangement,uniqueNodeLabelPathId:[Y.guid,Y.key,H].join("_"),interactionState:Y.interactionState,figure:Y}}function O(Y){Y.attr("transform",function(Z){return g(Z.node.x0.toFixed(3),Z.node.y0.toFixed(3))})}function R(Y){Y.call(O)}function z(Y,Z){Y.call(R),Z.attr("d",E())}function L(Y){Y.attr("width",function(Z){return Z.node.x1-Z.node.x0}).attr("height",function(Z){return Z.visibleHeight})}function P(Y){return Y.link.width>1||Y.linkLineWidth>0}function N(Y){return g(Y.translateX,Y.translateY)+(Y.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function B(Y,Z,re){Y.on(".basic",null).on("mouseover.basic",function(U){U.interactionState.dragInProgress||U.partOfGroup||(re.hover(this,U,Z),U.interactionState.hovered=[this,U])}).on("mousemove.basic",function(U){U.interactionState.dragInProgress||U.partOfGroup||(re.follow(this,U),U.interactionState.hovered=[this,U])}).on("mouseout.basic",function(U){U.interactionState.dragInProgress||U.partOfGroup||(re.unhover(this,U,Z),U.interactionState.hovered=!1)}).on("click.basic",function(U){U.interactionState.hovered&&(re.unhover(this,U,Z),U.interactionState.hovered=!1),U.interactionState.dragInProgress||U.partOfGroup||re.select(this,U,Z)})}function G(Y,Z,re,U){var q=u.behavior.drag().origin(function($){return{x:$.node.x0+$.visibleWidth/2,y:$.node.y0+$.visibleHeight/2}}).on("dragstart",function($){if($.arrangement!=="fixed"&&(m.ensureSingle(U._fullLayout._infolayer,"g","dragcover",function(H){U._fullLayout._dragCover=H}),m.raiseToTop(this),$.interactionState.dragInProgress=$.node,K($.node),$.interactionState.hovered&&(re.nodeEvents.unhover.apply(0,$.interactionState.hovered),$.interactionState.hovered=!1),$.arrangement==="snap")){var ne=$.traceId+"|"+$.key;$.forceLayouts[ne]?$.forceLayouts[ne].alpha(1):function(H,Q,ee,ie){(function(ue){for(var le=0;le0&&fe.forceLayouts[le].alpha(0)}}(0,Q,ae,ee)).stop()}(0,ne,$),function(H,Q,ee,ie,ae){window.requestAnimationFrame(function ue(){var le;for(le=0;le0)window.requestAnimationFrame(ue);else{var ge=ee.node.originalX;ee.node.x0=ge-ee.visibleWidth/2,ee.node.x1=ge+ee.visibleWidth/2,W(ee,ae)}})}(Y,Z,$,ne,U)}}).on("drag",function($){if($.arrangement!=="fixed"){var ne=u.event.x,H=u.event.y;$.arrangement==="snap"?($.node.x0=ne-$.visibleWidth/2,$.node.x1=ne+$.visibleWidth/2,$.node.y0=H-$.visibleHeight/2,$.node.y1=H+$.visibleHeight/2):($.arrangement==="freeform"&&($.node.x0=ne-$.visibleWidth/2,$.node.x1=ne+$.visibleWidth/2),H=Math.max(0,Math.min($.size-$.visibleHeight/2,H)),$.node.y0=H-$.visibleHeight/2,$.node.y1=H+$.visibleHeight/2),K($.node),$.arrangement!=="snap"&&($.sankey.update($.graph),z(Y.filter(te($)),Z))}}).on("dragend",function($){if($.arrangement!=="fixed"){$.interactionState.dragInProgress=!1;for(var ne=0;ne<$.node.childrenNodes.length;ne++)$.node.childrenNodes[ne].x=$.node.x,$.node.childrenNodes[ne].y=$.node.y;$.arrangement!=="snap"&&W($,U)}});Y.on(".drag",null).call(q)}function W(Y,Z){for(var re=[],U=[],q=0;qb&&G[_].gap;)_--;for(A=G[_].s,T=G.length-1;T>_;T--)G[T].s=A;for(;b<_;)if(G[++b].gap){for(T=b+1;G[T].gap;)T++;for(var Q=G[b-1][Y],ee=G[b-1].s,ie=(G[T].s-ee)/(G[T][Y]-Q);bR[g]&&g=0;i--){var s=r[i];if(s.type==="scatter"&&s.xaxis===u.xaxis&&s.yaxis===u.yaxis){s.opacity=void 0;break}}}}}},{}],934:[function(e,o,f){var r=e("../../lib"),a=e("../../registry"),u=e("./attributes"),c=e("./constants"),i=e("./subtypes"),s=e("./xy_defaults"),l=e("./period_defaults"),d=e("./stack_defaults"),h=e("./marker_defaults"),m=e("./line_defaults"),g=e("./line_shape_defaults"),p=e("./text_defaults"),v=e("./fillcolor_defaults"),y=e("../../lib").coercePattern;o.exports=function(x,w,k,b){function T(R,z){return r.coerce(x,w,u,R,z)}var _=s(x,w,b,T);if(_||(w.visible=!1),w.visible){l(x,w,b,T),T("xhoverformat"),T("yhoverformat");var M=d(x,w,b,T),A=!M&&_=Math.min(ge,fe)&&x<=Math.max(ge,fe)?0:1/0}var me=Math.max(3,le.mrc||0),_e=1-1/me,we=Math.abs(v.c2p(le.x)-x);return we=Math.min(ge,fe)&&w<=Math.max(ge,fe)?0:1/0}var me=Math.max(3,le.mrc||0),_e=1-1/me,we=Math.abs(y.c2p(le.y)-w);return weae!=(U=K[G][1])>=ae&&(Y=K[G-1][0],Z=K[G][0],U-re&&(te=Y+(Z-Y)*(ae-re)/(U-re),H=Math.min(H,te),Q=Math.max(Q,te)));H=Math.max(H,0),Q=Math.min(Q,v._length);var ue=i.defaultLine;return i.opacity(p.fillcolor)?ue=p.fillcolor:i.opacity((p.line||{}).color)&&(ue=p.line.color),r.extendFlat(l,{distance:l.maxHoverDistance,x0:H,x1:Q,y0:ae,y1:ae,color:ue,hovertemplate:!1}),delete l.index,p.text&&!Array.isArray(p.text)?l.text=String(p.text):l.text=p.name,[l]}}}},{"../../components/color":366,"../../components/fx":406,"../../lib":503,"../../registry":638,"./get_trace_color":937}],939:[function(e,o,f){var r=e("./subtypes");o.exports={hasLines:r.hasLines,hasMarkers:r.hasMarkers,hasText:r.hasText,isBubble:r.isBubble,attributes:e("./attributes"),supplyDefaults:e("./defaults"),crossTraceDefaults:e("./cross_trace_defaults"),calc:e("./calc").calc,crossTraceCalc:e("./cross_trace_calc"),arraysToCalcdata:e("./arrays_to_calcdata"),plot:e("./plot"),colorbar:e("./marker_colorbar"),formatLabels:e("./format_labels"),style:e("./style").style,styleOnSelect:e("./style").styleOnSelect,hoverPoints:e("./hover"),selectPoints:e("./select"),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:e("../../plots/cartesian"),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}},{"../../plots/cartesian":568,"./arrays_to_calcdata":926,"./attributes":927,"./calc":928,"./cross_trace_calc":932,"./cross_trace_defaults":933,"./defaults":934,"./format_labels":936,"./hover":938,"./marker_colorbar":945,"./plot":948,"./select":949,"./style":951,"./subtypes":952}],940:[function(e,o,f){var r=e("../../lib").isArrayOrTypedArray,a=e("../../components/colorscale/helpers").hasColorscale,u=e("../../components/colorscale/defaults");o.exports=function(c,i,s,l,d,h){var m=(c.marker||{}).color;d("line.color",s),a(c,"line")?u(c,i,l,d,{prefix:"line.",cLetter:"c"}):d("line.color",!r(m)&&m||s),d("line.width"),(h||{}).noDash||d("line.dash")}},{"../../components/colorscale/defaults":376,"../../components/colorscale/helpers":377,"../../lib":503}],941:[function(e,o,f){var r=e("../../constants/numerical"),a=r.BADNUM,u=r.LOG_CLIP,c=u+.5,i=u-.5,s=e("../../lib"),l=s.segmentsIntersect,d=s.constrain,h=e("./constants");o.exports=function(m,g){var p,v,y,x,w,k,b,T,_,M,A,S,E,D,O,R,z,L,P=g.xaxis,N=g.yaxis,B=P.type==="log",G=N.type==="log",W=P._length,K=N._length,te=g.connectGaps,Y=g.baseTolerance,Z=g.shape,re=Z==="linear",U=g.fill&&g.fill!=="none",q=[],$=h.minTolerance,ne=m.length,H=new Array(ne),Q=0;function ee(Ye){var nt=m[Ye];if(!nt)return!1;var ft=g.linearized?P.l2p(nt.x):P.c2p(nt.x),vt=g.linearized?N.l2p(nt.y):N.c2p(nt.y);if(ft===a){if(B&&(ft=P.c2p(nt.x,!0)),ft===a)return!1;G&&vt===a&&(ft*=Math.abs(P._m*K*(P._m>0?c:i)/(N._m*W*(N._m>0?c:i)))),ft*=1e3}if(vt===a){if(G&&(vt=N.c2p(nt.y,!0)),vt===a)return!1;vt*=1e3}return[ft,vt]}function ie(Ye,nt,ft,vt){var Pt=ft-Ye,At=vt-nt,at=.5-Ye,et=.5-nt,Ot=Pt*Pt+At*At,Wt=Pt*at+At*et;if(Wt>0&&Wtye||Ye[1]ke)return[d(Ye[0],de,ye),d(Ye[1],Me,ke)]}function Fe(Ye,nt){return Ye[0]===nt[0]&&(Ye[0]===de||Ye[0]===ye)||Ye[1]===nt[1]&&(Ye[1]===Me||Ye[1]===ke)||void 0}function Ve(Ye,nt,ft){return function(vt,Pt){var At=ze(vt),at=ze(Pt),et=[];if(At&&at&&Fe(At,at))return et;At&&et.push(At),at&&et.push(at);var Ot=2*s.constrain((vt[Ye]+Pt[Ye])/2,nt,ft)-((At||vt)[Ye]+(at||Pt)[Ye]);return Ot&&((At&&at?Ot>0==At[Ye]>at[Ye]?At:at:At||at)[Ye]+=Ot),et}}function Ke(Ye){var nt=Ye[0],ft=Ye[1],vt=nt===H[Q-1][0],Pt=ft===H[Q-1][1];if(!vt||!Pt)if(Q>1){var At=nt===H[Q-2][0],at=ft===H[Q-2][1];vt&&(nt===de||nt===ye)&&At?at?Q--:H[Q-1]=Ye:Pt&&(ft===Me||ft===ke)&&at?At?Q--:H[Q-1]=Ye:H[Q++]=Ye}else H[Q++]=Ye}function Re(Ye){H[Q-1][0]!==Ye[0]&&H[Q-1][1]!==Ye[1]&&Ke([fe,me]),Ke(Ye),_e=null,fe=me=0}function qe(Ye){if(z=Ye[0]/W,L=Ye[1]/K,le=Ye[0]ye?ye:0,ge=Ye[1]ke?ke:0,le||ge){if(Q)if(_e){var nt=Te(_e,Ye);nt.length>1&&(Re(nt[0]),H[Q++]=nt[1])}else we=Te(H[Q-1],Ye)[0],H[Q++]=we;else H[Q++]=[le||Ye[0],ge||Ye[1]];var ft=H[Q-1];le&&ge&&(ft[0]!==le||ft[1]!==ge)?(_e&&(fe!==le&&me!==ge?Ke(fe&&me?(vt=_e,At=(Pt=Ye)[0]-vt[0],at=(Pt[1]-vt[1])/At,(vt[1]*Pt[0]-Pt[1]*vt[0])/At>0?[at>0?de:ye,ke]:[at>0?ye:de,Me]):[fe||le,me||ge]):fe&&me&&Ke([fe,me])),Ke([le,ge])):fe-le&&me-ge&&Ke([le||fe,ge||me]),_e=Ye,fe=le,me=ge}else _e&&Re(Te(_e,Ye)[0]),H[Q++]=Ye;var vt,Pt,At,at}for(Z==="linear"||Z==="spline"?Te=function(Ye,nt){for(var ft=[],vt=0,Pt=0;Pt<4;Pt++){var At=Ee[Pt],at=l(Ye[0],Ye[1],nt[0],nt[1],At[0],At[1],At[2],At[3]);at&&(!vt||Math.abs(at.x-ft[0][0])>1||Math.abs(at.y-ft[0][1])>1)&&(at=[at.x,at.y],vt&&ue(at,Ye)ae(k,We))break;y=k,(E=_[0]*T[0]+_[1]*T[1])>A?(A=E,x=k,b=!1):E=m.length||!k)break;qe(k),v=k}}else qe(x)}_e&&Ke([fe||_e[0],me||_e[1]]),q.push(H.slice(0,Q))}return q}},{"../../constants/numerical":479,"../../lib":503,"./constants":931}],942:[function(e,o,f){o.exports=function(r,a,u){u("line.shape")==="spline"&&u("line.smoothing")}},{}],943:[function(e,o,f){var r={tonextx:1,tonexty:1,tonext:1};o.exports=function(a,u,c){var i,s,l,d,h,m={},g=!1,p=-1,v=0,y=-1;for(s=0;s=0?h=y:(h=y=v,v++),h0?Math.max(h,s):0}}},{"fast-isnumeric":190}],945:[function(e,o,f){o.exports={container:"marker",min:"cmin",max:"cmax"}},{}],946:[function(e,o,f){var r=e("../../components/color"),a=e("../../components/colorscale/helpers").hasColorscale,u=e("../../components/colorscale/defaults"),c=e("./subtypes");o.exports=function(i,s,l,d,h,m){var g=c.isBubble(i),p=(i.line||{}).color;m=m||{},p&&(l=p),h("marker.symbol"),h("marker.opacity",g?.7:1),h("marker.size"),h("marker.color",l),a(i,"marker")&&u(i,s,d,h,{prefix:"marker.",cLetter:"c"}),m.noSelect||(h("selected.marker.color"),h("unselected.marker.color"),h("selected.marker.size"),h("unselected.marker.size")),m.noLine||(h("marker.line.color",p&&!Array.isArray(p)&&s.marker.color!==p?p:g?r.background:r.defaultLine),a(i,"marker.line")&&u(i,s,d,h,{prefix:"marker.line.",cLetter:"c"}),h("marker.line.width",g?1:0)),g&&(h("marker.sizeref"),h("marker.sizemin"),h("marker.sizemode")),m.gradient&&h("marker.gradient.type")!=="none"&&h("marker.gradient.color")}},{"../../components/color":366,"../../components/colorscale/defaults":376,"../../components/colorscale/helpers":377,"./subtypes":952}],947:[function(e,o,f){var r=e("../../lib").dateTick0,a=e("../../constants/numerical").ONEWEEK;function u(c,i){return r(i,c%a==0?1:0)}o.exports=function(c,i,s,l,d){if(d||(d={x:!0,y:!0}),d.x){var h=l("xperiod");h&&(l("xperiod0",u(h,i.xcalendar)),l("xperiodalignment"))}if(d.y){var m=l("yperiod");m&&(l("yperiod0",u(m,i.ycalendar)),l("yperiodalignment"))}}},{"../../constants/numerical":479,"../../lib":503}],948:[function(e,o,f){var r=e("@plotly/d3"),a=e("../../registry"),u=e("../../lib"),c=u.ensureSingle,i=u.identity,s=e("../../components/drawing"),l=e("./subtypes"),d=e("./line_points"),h=e("./link_traces"),m=e("../../lib/polygon").tester;function g(p,v,y,x,w,k,b){var T;(function(ye,Me,ke,Ee,ze){var Fe=ke.xaxis,Ve=ke.yaxis,Ke=r.extent(u.simpleMap(Fe.range,Fe.r2c)),Re=r.extent(u.simpleMap(Ve.range,Ve.r2c)),qe=Ee[0].trace;if(!!l.hasMarkers(qe)){var We=qe.marker.maxdisplayed;if(We!==0){var Ye=Ee.filter(function(Pt){return Pt.x>=Ke[0]&&Pt.x<=Ke[1]&&Pt.y>=Re[0]&&Pt.y<=Re[1]}),nt=Math.ceil(Ye.length/We),ft=0;ze.forEach(function(Pt,At){var at=Pt[0].trace;l.hasMarkers(at)&&at.marker.maxdisplayed>0&&At0;function M(ye){return _?ye.transition():ye}var A=y.xaxis,S=y.yaxis,E=x[0].trace,D=E.line,O=r.select(k),R=c(O,"g","errorbars"),z=c(O,"g","lines"),L=c(O,"g","points"),P=c(O,"g","text");if(a.getComponentMethod("errorbars","plot")(p,R,y,b),E.visible===!0){var N,B;M(O).style("opacity",E.opacity);var G=E.fill.charAt(E.fill.length-1);G!=="x"&&G!=="y"&&(G=""),x[0][y.isRangePlot?"nodeRangePlot3":"node3"]=O;var W,K,te="",Y=[],Z=E._prevtrace;Z&&(te=Z._prevRevpath||"",B=Z._nextFill,Y=Z._polygons);var re,U,q,$,ne,H,Q,ee="",ie="",ae=[],ue=u.noop;if(N=E._ownFill,l.hasLines(E)||E.fill!=="none"){for(B&&B.datum(x),["hv","vh","hvh","vhv"].indexOf(D.shape)!==-1?(re=s.steps(D.shape),U=s.steps(D.shape.split("").reverse().join(""))):re=U=D.shape==="spline"?function(ye){var Me=ye[ye.length-1];return ye.length>1&&ye[0][0]===Me[0]&&ye[0][1]===Me[1]?s.smoothclosed(ye.slice(1),D.smoothing):s.smoothopen(ye,D.smoothing)}:function(ye){return"M"+ye.join("L")},q=function(ye){return U(ye.reverse())},ae=d(x,{xaxis:A,yaxis:S,connectGaps:E.connectgaps,baseTolerance:Math.max(D.width||1,3)/4,shape:D.shape,simplify:D.simplify,fill:E.fill}),Q=E._polygons=new Array(ae.length),T=0;T1){var ke=r.select(this);if(ke.datum(x),ye)M(ke.style("opacity",0).attr("d",W).call(s.lineGroupStyle)).style("opacity",1);else{var Ee=M(ke);Ee.attr("d",W),s.singleLineStyle(x,Ee)}}}}}var le=z.selectAll(".js-line").data(ae);M(le.exit()).style("opacity",0).remove(),le.each(ue(!1)),le.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke").call(s.lineGroupStyle).each(ue(!0)),s.setClipUrl(le,y.layerClipId,p),ae.length?(N?(N.datum(x),$&&H&&(G?(G==="y"?$[1]=H[1]=S.c2p(0,!0):G==="x"&&($[0]=H[0]=A.c2p(0,!0)),M(N).attr("d","M"+H+"L"+$+"L"+ee.substr(1)).call(s.singleFillStyle,p)):M(N).attr("d",ee+"Z").call(s.singleFillStyle,p))):B&&(E.fill.substr(0,6)==="tonext"&&ee&&te?(E.fill==="tonext"?M(B).attr("d",ee+"Z"+te+"Z").call(s.singleFillStyle,p):M(B).attr("d",ee+"L"+te.substr(1)+"Z").call(s.singleFillStyle,p),E._polygons=E._polygons.concat(Y)):(fe(B),E._polygons=null)),E._prevRevpath=ie,E._prevPolygons=Q):(N?fe(N):B&&fe(B),E._polygons=E._prevRevpath=E._prevPolygons=null),L.datum(x),P.datum(x),function(ye,Me,ke){var Ee,ze=ke[0].trace,Fe=l.hasMarkers(ze),Ve=l.hasText(ze),Ke=Oe(ze),Re=de,qe=de;if(Fe||Ve){var We=i,Ye=ze.stackgroup,nt=Ye&&p._fullLayout._scatterStackOpts[A._id+S._id][Ye].stackgaps==="infer zero";ze.marker.maxdisplayed||ze._needsCull?We=nt?_e:me:Ye&&!nt&&(We=we),Fe&&(Re=We),Ve&&(qe=We)}var ft,vt=(Ee=ye.selectAll("path.point").data(Re,Ke)).enter().append("path").classed("point",!0);_&&vt.call(s.pointStyle,ze,p).call(s.translatePoints,A,S).style("opacity",0).transition().style("opacity",1),Ee.order(),Fe&&(ft=s.makePointStyleFns(ze)),Ee.each(function(Pt){var At=r.select(this),at=M(At);s.translatePoint(Pt,at,A,S)?(s.singlePointStyle(Pt,at,ze,ft,p),y.layerClipId&&s.hideOutsideRangePoint(Pt,at,A,S,ze.xcalendar,ze.ycalendar),ze.customdata&&At.classed("plotly-customdata",Pt.data!==null&&Pt.data!==void 0)):at.remove()}),_?Ee.exit().transition().style("opacity",0).remove():Ee.exit().remove(),(Ee=Me.selectAll("g").data(qe,Ke)).enter().append("g").classed("textpoint",!0).append("text"),Ee.order(),Ee.each(function(Pt){var At=r.select(this),at=M(At.select("text"));s.translatePoint(Pt,at,A,S)?y.layerClipId&&s.hideOutsideRangePoint(Pt,At,A,S,ze.xcalendar,ze.ycalendar):At.remove()}),Ee.selectAll("text").call(s.textPointStyle,ze,p).each(function(Pt){var At=A.c2p(Pt.x),at=S.c2p(Pt.y);r.select(this).selectAll("tspan.line").each(function(){M(r.select(this)).attr({x:At,y:at})})}),Ee.exit().remove()}(L,P,x);var ge=E.cliponaxis===!1?null:y.layerClipId;s.setClipUrl(L,ge,p),s.setClipUrl(P,ge,p)}function fe(ye){M(ye).attr("d","M0,0Z")}function me(ye){return ye.filter(function(Me){return!Me.gap&&Me.vis})}function _e(ye){return ye.filter(function(Me){return Me.vis})}function we(ye){return ye.filter(function(Me){return!Me.gap})}function Te(ye){return ye.id}function Oe(ye){if(ye.ids)return Te}function de(){return!1}}o.exports=function(p,v,y,x,w,k){var b,T,_=!w,M=!!w&&w.duration>0,A=h(p,v,y);(b=x.selectAll("g.trace").data(A,function(S){return S[0].trace.uid})).enter().append("g").attr("class",function(S){return"trace scatter trace"+S[0].trace.uid}).style("stroke-miterlimit",2),b.order(),function(S,E,D){E.each(function(O){var R=c(r.select(this),"g","fills");s.setClipUrl(R,D.layerClipId,S);var z=O[0].trace,L=[];z._ownfill&&L.push("_ownFill"),z._nexttrace&&L.push("_nextFill");var P=R.selectAll("g").data(L,i);P.enter().append("g"),P.exit().each(function(N){z[N]=null}).remove(),P.order().each(function(N){z[N]=c(r.select(this),"path","js-fill")})})}(p,b,v),M?(k&&(T=k()),r.transition().duration(w.duration).ease(w.easing).each("end",function(){T&&T()}).each("interrupt",function(){T&&T()}).each(function(){x.selectAll("g.trace").each(function(S,E){g(p,E,v,S,A,this,w)})})):b.each(function(S,E){g(p,E,v,S,A,this,w)}),_&&b.exit().remove(),x.selectAll("path:not([d])").remove()}},{"../../components/drawing":388,"../../lib":503,"../../lib/polygon":515,"../../registry":638,"./line_points":941,"./link_traces":943,"./subtypes":952,"@plotly/d3":58}],949:[function(e,o,f){var r=e("./subtypes");o.exports=function(a,u){var c,i,s,l,d=a.cd,h=a.xaxis,m=a.yaxis,g=[],p=d[0].trace;if(!r.hasMarkers(p)&&!r.hasText(p))return[];if(u===!1)for(c=0;c0){var y=s.c2l(p);s._lowerLogErrorBound||(s._lowerLogErrorBound=y),s._lowerErrorBound=Math.min(s._lowerLogErrorBound,y)}}else d[h]=[-m[0]*i,m[1]*i]}return d}o.exports=function(u,c,i){var s=[a(u.x,u.error_x,c[0],i.xaxis),a(u.y,u.error_y,c[1],i.yaxis),a(u.z,u.error_z,c[2],i.zaxis)],l=function(v){for(var y=0;y-1?-1:D.indexOf("right")>-1?1:0}function b(D){return D==null?0:D.indexOf("top")>-1?-1:D.indexOf("bottom")>-1?1:0}function T(D,O){return O(4*D)}function _(D){return g[D]}function M(D,O,R,z,L){var P=null;if(s.isArrayOrTypedArray(D)){P=[];for(var N=0;N=0){var W=function(K,te,Y){var Z,re=(Y+1)%3,U=(Y+2)%3,q=[],$=[];for(Z=0;Z=0&&p("surfacecolor",v||y);for(var x=["x","y","z"],w=0;w<3;++w){var k="projection."+x[w];p(k+".show")&&(p(k+".opacity"),p(k+".scale"))}var b=r.getComponentMethod("errorbars","supplyDefaults");b(d,h,v||y||m,{axis:"z"}),b(d,h,v||y||m,{axis:"y",inherit:"z"}),b(d,h,v||y||m,{axis:"x",inherit:"z"})}else h.visible=!1}},{"../../lib":503,"../../registry":638,"../scatter/line_defaults":940,"../scatter/marker_defaults":946,"../scatter/subtypes":952,"../scatter/text_defaults":953,"./attributes":955}],960:[function(e,o,f){o.exports={plot:e("./convert"),attributes:e("./attributes"),markerSymbols:e("../../constants/gl3d_markers"),supplyDefaults:e("./defaults"),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:e("./calc"),moduleType:"trace",name:"scatter3d",basePlotModule:e("../../plots/gl3d"),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}},{"../../constants/gl3d_markers":477,"../../plots/gl3d":598,"./attributes":955,"./calc":956,"./convert":958,"./defaults":959}],961:[function(e,o,f){var r=e("../scatter/attributes"),a=e("../../plots/attributes"),u=e("../../plots/template_attributes").hovertemplateAttrs,c=e("../../plots/template_attributes").texttemplateAttrs,i=e("../../components/colorscale/attributes"),s=e("../../lib/extend").extendFlat,l=r.marker,d=r.line,h=l.line;o.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:s({},r.mode,{dflt:"markers"}),text:s({},r.text,{}),texttemplate:c({editType:"plot"},{keys:["a","b","text"]}),hovertext:s({},r.hovertext,{}),line:{color:d.color,width:d.width,dash:d.dash,shape:s({},d.shape,{values:["linear","spline"]}),smoothing:d.smoothing,editType:"calc"},connectgaps:r.connectgaps,fill:s({},r.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:r.fillcolor,marker:s({symbol:l.symbol,opacity:l.opacity,maxdisplayed:l.maxdisplayed,size:l.size,sizeref:l.sizeref,sizemin:l.sizemin,sizemode:l.sizemode,line:s({width:h.width,editType:"calc"},i("marker.line")),gradient:l.gradient,editType:"calc"},i("marker")),textfont:r.textfont,textposition:r.textposition,selected:r.selected,unselected:r.unselected,hoverinfo:s({},a.hoverinfo,{flags:["a","b","text","name"]}),hoveron:r.hoveron,hovertemplate:u()}},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plots/attributes":550,"../../plots/template_attributes":633,"../scatter/attributes":927}],962:[function(e,o,f){var r=e("fast-isnumeric"),a=e("../scatter/colorscale_calc"),u=e("../scatter/arrays_to_calcdata"),c=e("../scatter/calc_selection"),i=e("../scatter/calc").calcMarkerSize,s=e("../carpet/lookup_carpetid");o.exports=function(l,d){var h=d._carpetTrace=s(l,d);if(h&&h.visible&&h.visible!=="legendonly"){var m;d.xaxis=h.xaxis,d.yaxis=h.yaxis;var g,p,v=d._length,y=new Array(v),x=!1;for(m=0;m")}return l}function T(_,M){var A;A=_.labelprefix&&_.labelprefix.length>0?_.labelprefix.replace(/ = $/,""):_._hovertitle,k.push(A+": "+M.toFixed(3)+_.labelsuffix)}}},{"../../lib":503,"../scatter/hover":938}],967:[function(e,o,f){o.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),colorbar:e("../scatter/marker_colorbar"),formatLabels:e("./format_labels"),calc:e("./calc"),plot:e("./plot"),style:e("../scatter/style").style,styleOnSelect:e("../scatter/style").styleOnSelect,hoverPoints:e("./hover"),selectPoints:e("../scatter/select"),eventData:e("./event_data"),moduleType:"trace",name:"scattercarpet",basePlotModule:e("../../plots/cartesian"),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}},{"../../plots/cartesian":568,"../scatter/marker_colorbar":945,"../scatter/select":949,"../scatter/style":951,"./attributes":961,"./calc":962,"./defaults":963,"./event_data":964,"./format_labels":965,"./hover":966,"./plot":968}],968:[function(e,o,f){var r=e("../scatter/plot"),a=e("../../plots/cartesian/axes"),u=e("../../components/drawing");o.exports=function(c,i,s,l){var d,h,m,g=s[0][0].carpet,p={xaxis:a.getFromId(c,g.xaxis||"x"),yaxis:a.getFromId(c,g.yaxis||"y"),plot:i.plot};for(r(c,p,s,l),d=0;d")}(m,w,s,h[0].t.labels),s.hovertemplate=m.hovertemplate,[s]}}},{"../../components/fx":406,"../../constants/numerical":479,"../../lib":503,"../scatter/get_trace_color":937,"./attributes":969}],975:[function(e,o,f){o.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),colorbar:e("../scatter/marker_colorbar"),formatLabels:e("./format_labels"),calc:e("./calc"),calcGeoJSON:e("./plot").calcGeoJSON,plot:e("./plot").plot,style:e("./style"),styleOnSelect:e("../scatter/style").styleOnSelect,hoverPoints:e("./hover"),eventData:e("./event_data"),selectPoints:e("./select"),moduleType:"trace",name:"scattergeo",basePlotModule:e("../../plots/geo"),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}},{"../../plots/geo":589,"../scatter/marker_colorbar":945,"../scatter/style":951,"./attributes":969,"./calc":970,"./defaults":971,"./event_data":972,"./format_labels":973,"./hover":974,"./plot":976,"./select":977,"./style":978}],976:[function(e,o,f){var r=e("@plotly/d3"),a=e("../../lib"),u=e("../../lib/topojson_utils").getTopojsonFeatures,c=e("../../lib/geojson_utils"),i=e("../../lib/geo_location_utils"),s=e("../../plots/cartesian/autorange").findExtremes,l=e("../../constants/numerical").BADNUM,d=e("../scatter/calc").calcMarkerSize,h=e("../scatter/subtypes"),m=e("./style");o.exports={calcGeoJSON:function(g,p){var v,y,x=g[0].trace,w=p[x.geo],k=w._subplot,b=x._length;if(Array.isArray(x.locations)){var T=x.locationmode,_=T==="geojson-id"?i.extractTraceFeature(g):u(x,k.topojson);for(v=0;v=y,D=2*S,O={},R=_.makeCalcdata(k,"x"),z=M.makeCalcdata(k,"y"),L=i(k,_,"x",R),P=i(k,M,"y",z),N=L.vals,B=P.vals;k._x=N,k._y=B,k.xperiodalignment&&(k._origX=R,k._xStarts=L.starts,k._xEnds=L.ends),k.yperiodalignment&&(k._origY=z,k._yStarts=P.starts,k._yEnds=P.ends);var G=new Array(D),W=new Array(S);for(b=0;b1&&a.extendFlat(H.line,g.linePositions(Z,U,q)),H.errorX||H.errorY){var Q=g.errorBarPositions(Z,U,q,$,ne);H.errorX&&a.extendFlat(H.errorX,Q.x),H.errorY&&a.extendFlat(H.errorY,Q.y)}return H.text&&(a.extendFlat(H.text,{positions:q},g.textPosition(Z,U,H.text,H.marker)),a.extendFlat(H.textSel,{positions:q},g.textPosition(Z,U,H.text,H.markerSel)),a.extendFlat(H.textUnsel,{positions:q},g.textPosition(Z,U,H.text,H.markerUnsel))),H}(w,0,k,G,N,B),Y=p(w,A);return h(T,k),E?te.marker&&(K=te.marker.sizeAvg||Math.max(te.marker.size,3)):K=l(k,S),d(w,k,_,M,N,B,K),te.errorX&&x(k,_,te.errorX),te.errorY&&x(k,M,te.errorY),te.fill&&!Y.fill2d&&(Y.fill2d=!0),te.marker&&!Y.scatter2d&&(Y.scatter2d=!0),te.line&&!Y.line2d&&(Y.line2d=!0),!te.errorX&&!te.errorY||Y.error2d||(Y.error2d=!0),te.text&&!Y.glText&&(Y.glText=!0),te.marker&&(te.marker.snap=S),Y.lineOptions.push(te.line),Y.errorXOptions.push(te.errorX),Y.errorYOptions.push(te.errorY),Y.fillOptions.push(te.fill),Y.markerOptions.push(te.marker),Y.markerSelectedOptions.push(te.markerSel),Y.markerUnselectedOptions.push(te.markerUnsel),Y.textOptions.push(te.text),Y.textSelectedOptions.push(te.textSel),Y.textUnselectedOptions.push(te.textUnsel),Y.selectBatch.push([]),Y.unselectBatch.push([]),O._scene=Y,O.index=Y.count,O.x=N,O.y=B,O.positions=G,Y.count++,[{x:!1,y:!1,t:O,trace:k}]}},{"../../constants/numerical":479,"../../lib":503,"../../plots/cartesian/align_period":551,"../../plots/cartesian/autorange":553,"../../plots/cartesian/axis_ids":558,"../scatter/calc":928,"../scatter/colorscale_calc":930,"./constants":982,"./convert":983,"./scene_update":991,"@plotly/point-cluster":59}],982:[function(e,o,f){o.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:20,SYMBOL_STROKE:1,DOT_RE:/-dot/,OPEN_RE:/-open/,DASHES:{solid:[1],dot:[1,1],dash:[4,1],longdash:[8,1],dashdot:[4,1,1,1],longdashdot:[8,1,1,1]}}},{}],983:[function(e,o,f){var r=e("fast-isnumeric"),a=e("svg-path-sdf"),u=e("color-normalize"),c=e("../../registry"),i=e("../../lib"),s=e("../../components/drawing"),l=e("../../plots/cartesian/axis_ids"),d=e("../../lib/gl_format_color").formatColor,h=e("../scatter/subtypes"),m=e("../scatter/make_bubble_size_func"),g=e("./helpers"),p=e("./constants"),v=e("../../constants/interactions").DESELECTDIM,y={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},x=e("../../components/fx/helpers").appendArrayPointValue;function w(R,z){var L,P=R._fullLayout,N=z._length,B=z.textfont,G=z.textposition,W=Array.isArray(G)?G:[G],K=B.color,te=B.size,Y=B.family,Z={},re=R._context.plotGlPixelRatio,U=z.texttemplate;if(U){Z.text=[];var q=P._d3locale,$=Array.isArray(U),ne=$?Math.min(U.length,N):N,H=$?function(ge){return U[ge]}:function(){return U};for(L=0;Lp.TOO_MANY_POINTS||h.hasMarkers(z)?"rect":"round";if(te&&z.connectgaps){var Z=P[0],re=P[1];for(N=0;N1?K[N]:K[0]:K,U=Array.isArray(te)?te.length>1?te[N]:te[0]:te,q=y[re],$=y[U],ne=Y?Y/.8+1:0,H=-$*ne-.5*$;G.offset[N]=[q*ne/Z,H/Z]}}return G}}},{"../../components/drawing":388,"../../components/fx/helpers":402,"../../constants/interactions":478,"../../lib":503,"../../lib/gl_format_color":499,"../../plots/cartesian/axis_ids":558,"../../registry":638,"../scatter/make_bubble_size_func":944,"../scatter/subtypes":952,"./constants":982,"./helpers":987,"color-normalize":89,"fast-isnumeric":190,"svg-path-sdf":310}],984:[function(e,o,f){var r=e("../../lib"),a=e("../../registry"),u=e("./helpers"),c=e("./attributes"),i=e("../scatter/constants"),s=e("../scatter/subtypes"),l=e("../scatter/xy_defaults"),d=e("../scatter/period_defaults"),h=e("../scatter/marker_defaults"),m=e("../scatter/line_defaults"),g=e("../scatter/fillcolor_defaults"),p=e("../scatter/text_defaults");o.exports=function(v,y,x,w){function k(D,O){return r.coerce(v,y,c,D,O)}var b=!!v.marker&&u.isOpenSymbol(v.marker.symbol),T=s.isBubble(v),_=l(v,y,w,k);if(_){d(v,y,w,k),k("xhoverformat"),k("yhoverformat");var M=_100},f.isDotSymbol=function(a){return typeof a=="string"?r.DOT_RE.test(a):a>200}},{"./constants":982}],988:[function(e,o,f){var r=e("../../registry"),a=e("../../lib"),u=e("../scatter/get_trace_color");function c(i,s,l,d){var h=i.xa,m=i.ya,g=i.distance,p=i.dxy,v=i.index,y={pointNumber:v,x:s[v],y:l[v]};y.tx=Array.isArray(d.text)?d.text[v]:d.text,y.htx=Array.isArray(d.hovertext)?d.hovertext[v]:d.hovertext,y.data=Array.isArray(d.customdata)?d.customdata[v]:d.customdata,y.tp=Array.isArray(d.textposition)?d.textposition[v]:d.textposition;var x=d.textfont;x&&(y.ts=a.isArrayOrTypedArray(x.size)?x.size[v]:x.size,y.tc=Array.isArray(x.color)?x.color[v]:x.color,y.tf=Array.isArray(x.family)?x.family[v]:x.family);var w=d.marker;w&&(y.ms=a.isArrayOrTypedArray(w.size)?w.size[v]:w.size,y.mo=a.isArrayOrTypedArray(w.opacity)?w.opacity[v]:w.opacity,y.mx=a.isArrayOrTypedArray(w.symbol)?w.symbol[v]:w.symbol,y.mc=a.isArrayOrTypedArray(w.color)?w.color[v]:w.color);var k=w&&w.line;k&&(y.mlc=Array.isArray(k.color)?k.color[v]:k.color,y.mlw=a.isArrayOrTypedArray(k.width)?k.width[v]:k.width);var b=w&&w.gradient;b&&b.type!=="none"&&(y.mgt=Array.isArray(b.type)?b.type[v]:b.type,y.mgc=Array.isArray(b.color)?b.color[v]:b.color);var T=h.c2p(y.x,!0),_=m.c2p(y.y,!0),M=y.mrc||1,A=d.hoverlabel;A&&(y.hbg=Array.isArray(A.bgcolor)?A.bgcolor[v]:A.bgcolor,y.hbc=Array.isArray(A.bordercolor)?A.bordercolor[v]:A.bordercolor,y.hts=a.isArrayOrTypedArray(A.font.size)?A.font.size[v]:A.font.size,y.htc=Array.isArray(A.font.color)?A.font.color[v]:A.font.color,y.htf=Array.isArray(A.font.family)?A.font.family[v]:A.font.family,y.hnl=a.isArrayOrTypedArray(A.namelength)?A.namelength[v]:A.namelength);var S=d.hoverinfo;S&&(y.hi=Array.isArray(S)?S[v]:S);var E=d.hovertemplate;E&&(y.ht=Array.isArray(E)?E[v]:E);var D={};D[i.index]=y;var O=d._origX,R=d._origY,z=a.extendFlat({},i,{color:u(d,y),x0:T-M,x1:T+M,xLabelVal:O?O[v]:y.x,y0:_-M,y1:_+M,yLabelVal:R?R[v]:y.y,cd:D,distance:g,spikeDistance:p,hovertemplate:y.ht});return y.htx?z.text=y.htx:y.tx?z.text=y.tx:d.text&&(z.text=d.text),a.fillText(y,d,z),r.getComponentMethod("errorbars","hoverInfo")(y,d,z),z}o.exports={hoverPoints:function(i,s,l,d){var h,m,g,p,v,y,x,w,k,b,T=i.cd,_=T[0].t,M=T[0].trace,A=i.xa,S=i.ya,E=_.x,D=_.y,O=A.c2p(s),R=S.c2p(l),z=i.distance;if(_.tree){var L=A.p2c(O-z),P=A.p2c(O+z),N=S.p2c(R-z),B=S.p2c(R+z);h=d==="x"?_.tree.range(Math.min(L,P),Math.min(S._rl[0],S._rl[1]),Math.max(L,P),Math.max(S._rl[0],S._rl[1])):_.tree.range(Math.min(L,P),Math.min(N,B),Math.max(L,P),Math.max(N,B))}else h=_.ids;var G=z;if(d==="x"){var W=!!M.xperiodalignment,K=!!M.yperiodalignment;for(y=0;y=Math.min(te,Y)&&O<=Math.max(te,Y)?0:1/0}if(x=Math.min(Z,re)&&R<=Math.max(Z,re)?0:1/0}b=Math.sqrt(x*x+w*w),g=h[y]}}}else for(y=h.length-1;y>-1;y--)p=E[m=h[y]],v=D[m],x=A.c2p(p)-O,w=S.c2p(v)-R,(k=Math.sqrt(x*x+w*w))T.glText.length){var E=A-T.glText.length;for(w=0;wie&&(isNaN(ee[ae])||isNaN(ee[ae+1]));)ae-=2;Q.positions=ee.slice(ie,ae+2)}return Q}),T.line2d.update(T.lineOptions)),T.error2d){var O=(T.errorXOptions||[]).concat(T.errorYOptions||[]);T.error2d.update(O)}T.scatter2d&&T.scatter2d.update(T.markerOptions),T.fillOrder=i.repeat(null,A),T.fill2d&&(T.fillOptions=T.fillOptions.map(function(Q,ee){var ie=x[ee];if(Q&&ie&&ie[0]&&ie[0].trace){var ae,ue,le=ie[0],ge=le.trace,fe=le.t,me=T.lineOptions[ee],_e=[];ge._ownfill&&_e.push(ee),ge._nexttrace&&_e.push(ee+1),_e.length&&(T.fillOrder[ee]=_e);var we,Te,Oe=[],de=me&&me.positions||fe.positions;if(ge.fill==="tozeroy"){for(we=0;wewe&&isNaN(de[Te+1]);)Te-=2;de[we+1]!==0&&(Oe=[de[we],0]),Oe=Oe.concat(de.slice(we,Te+2)),de[Te+1]!==0&&(Oe=Oe.concat([de[Te],0]))}else if(ge.fill==="tozerox"){for(we=0;wewe&&isNaN(de[Te]);)Te-=2;de[we]!==0&&(Oe=[0,de[we+1]]),Oe=Oe.concat(de.slice(we,Te+2)),de[Te]!==0&&(Oe=Oe.concat([0,de[Te+1]]))}else if(ge.fill==="toself"||ge.fill==="tonext"){for(Oe=[],ae=0,Q.splitNull=!0,ue=0;ue-1;for(w=0;w")}function w(k){return k+"\xB0"}}o.exports={hoverPoints:function(l,d,h){var m=l.cd,g=m[0].trace,p=l.xa,v=l.ya,y=l.subplot,x=360*(d>=0?Math.floor((d+180)/360):Math.ceil((d-180)/360)),w=d-x;if(r.getClosest(m,function(D){var O=D.lonlat;if(O[0]===i)return 1/0;var R=a.modHalf(O[0],360),z=O[1],L=y.project([R,z]),P=L.x-p.c2p([w,z]),N=L.y-v.c2p([R,h]),B=Math.max(3,D.mrc||0);return Math.max(Math.sqrt(P*P+N*N)-B,1-3/B)},l),l.index!==!1){var k=m[l.index],b=k.lonlat,T=[a.modHalf(b[0],360)+x,b[1]],_=p.c2p(T),M=v.c2p(T),A=k.mrc||1;l.x0=_-A,l.x1=_+A,l.y0=M-A,l.y1=M+A;var S={};S[g.subplot]={_subplot:y};var E=g._module.formatLabels(k,g,S);return l.lonLabel=E.lonLabel,l.latLabel=E.latLabel,l.color=u(g,k),l.extraText=s(g,k,m[0].t.labels),l.hovertemplate=g.hovertemplate,[l]}},getExtraText:s}},{"../../components/fx":406,"../../constants/numerical":479,"../../lib":503,"../scatter/get_trace_color":937}],999:[function(e,o,f){o.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),colorbar:e("../scatter/marker_colorbar"),formatLabels:e("./format_labels"),calc:e("../scattergeo/calc"),plot:e("./plot"),hoverPoints:e("./hover").hoverPoints,eventData:e("./event_data"),selectPoints:e("./select"),styleOnSelect:function(r,a){a&&a[0].trace._glTrace.update(a)},moduleType:"trace",name:"scattermapbox",basePlotModule:e("../../plots/mapbox"),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}},{"../../plots/mapbox":613,"../scatter/marker_colorbar":945,"../scattergeo/calc":970,"./attributes":993,"./defaults":995,"./event_data":996,"./format_labels":997,"./hover":998,"./plot":1e3,"./select":1001}],1e3:[function(e,o,f){var r=e("./convert"),a=e("../../plots/mapbox/constants").traceLayerPrefix,u=["fill","line","circle","symbol"];function c(s,l){this.type="scattermapbox",this.subplot=s,this.uid=l,this.sourceIds={fill:"source-"+l+"-fill",line:"source-"+l+"-line",circle:"source-"+l+"-circle",symbol:"source-"+l+"-symbol"},this.layerIds={fill:a+l+"-fill",line:a+l+"-line",circle:a+l+"-circle",symbol:a+l+"-symbol"},this.below=null}var i=c.prototype;i.addSource=function(s,l){this.subplot.map.addSource(this.sourceIds[s],{type:"geojson",data:l.geojson})},i.setSourceData=function(s,l){this.subplot.map.getSource(this.sourceIds[s]).setData(l.geojson)},i.addLayer=function(s,l,d){this.subplot.addLayer({type:s,id:this.layerIds[s],source:this.sourceIds[s],layout:l.layout,paint:l.paint},d)},i.update=function(s){var l,d,h,m=this.subplot,g=m.map,p=r(m.gd,s),v=m.belowLookup["trace-"+this.uid];if(v!==this.below){for(l=u.length-1;l>=0;l--)d=u[l],g.removeLayer(this.layerIds[d]);for(l=0;l=0;l--){var d=u[l];s.removeLayer(this.layerIds[d]),s.removeSource(this.sourceIds[d])}},o.exports=function(s,l){for(var d=l[0].trace,h=new c(s,d.uid),m=r(s.gd,l),g=h.below=s.belowLookup["trace-"+d.uid],p=0;p")}}o.exports={hoverPoints:function(u,c,i,s){var l=r(u,c,i,s);if(l&&l[0].index!==!1){var d=l[0];if(d.index===void 0)return l;var h=u.subplot,m=d.cd[d.index],g=d.trace;if(h.isPtInside(m))return d.xLabelVal=void 0,d.yLabelVal=void 0,a(m,g,h,d),d.hovertemplate=g.hovertemplate,l}},makeHoverPointText:a}},{"../scatter/hover":938}],1007:[function(e,o,f){o.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:e("../../plots/polar"),categories:["polar","symbols","showLegend","scatter-like"],attributes:e("./attributes"),supplyDefaults:e("./defaults").supplyDefaults,colorbar:e("../scatter/marker_colorbar"),formatLabels:e("./format_labels"),calc:e("./calc"),plot:e("./plot"),style:e("../scatter/style").style,styleOnSelect:e("../scatter/style").styleOnSelect,hoverPoints:e("./hover").hoverPoints,selectPoints:e("../scatter/select"),meta:{}}},{"../../plots/polar":622,"../scatter/marker_colorbar":945,"../scatter/select":949,"../scatter/style":951,"./attributes":1002,"./calc":1003,"./defaults":1004,"./format_labels":1005,"./hover":1006,"./plot":1008}],1008:[function(e,o,f){var r=e("../scatter/plot"),a=e("../../constants/numerical").BADNUM;o.exports=function(u,c,i){for(var s=c.layers.frontplot.select("g.scatterlayer"),l={xaxis:c.xaxis,yaxis:c.yaxis,plot:c.framework,layerClipId:c._hasClipOnAxisFalse?c.clipIds.forTraces:null},d=c.radialAxis,h=c.angularAxis,m=0;m=l&&(A.marker.cluster=b.tree),A.marker&&(A.markerSel.positions=A.markerUnsel.positions=A.marker.positions=D),A.line&&D.length>1&&s.extendFlat(A.line,i.linePositions(d,k,D)),A.text&&(s.extendFlat(A.text,{positions:D},i.textPosition(d,k,A.text,A.marker)),s.extendFlat(A.textSel,{positions:D},i.textPosition(d,k,A.text,A.markerSel)),s.extendFlat(A.textUnsel,{positions:D},i.textPosition(d,k,A.text,A.markerUnsel))),A.fill&&!v.fill2d&&(v.fill2d=!0),A.marker&&!v.scatter2d&&(v.scatter2d=!0),A.line&&!v.line2d&&(v.line2d=!0),A.text&&!v.glText&&(v.glText=!0),v.lineOptions.push(A.line),v.fillOptions.push(A.fill),v.markerOptions.push(A.marker),v.markerSelectedOptions.push(A.markerSel),v.markerUnselectedOptions.push(A.markerUnsel),v.textOptions.push(A.text),v.textSelectedOptions.push(A.textSel),v.textUnselectedOptions.push(A.textUnsel),v.selectBatch.push([]),v.unselectBatch.push([]),b.x=O,b.y=R,b.rawx=O,b.rawy=R,b.r=_,b.theta=M,b.positions=D,b._scene=v,b.index=v.count,v.count++}}),u(d,h,m)}},o.exports.reglPrecompiled={}},{"../../lib":503,"../scattergl/constants":982,"../scattergl/convert":983,"../scattergl/plot":990,"../scattergl/scene_update":991,"@plotly/point-cluster":59,"fast-isnumeric":190}],1017:[function(e,o,f){var r=e("../../plots/template_attributes").hovertemplateAttrs,a=e("../../plots/template_attributes").texttemplateAttrs,u=e("../../lib/extend").extendFlat,c=e("../scatter/attributes"),i=e("../../plots/attributes"),s=c.line;o.exports={mode:c.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:c.text,texttemplate:a({editType:"plot"},{keys:["real","imag","text"]}),hovertext:c.hovertext,line:{color:s.color,width:s.width,dash:s.dash,shape:u({},s.shape,{values:["linear","spline"]}),smoothing:s.smoothing,editType:"calc"},connectgaps:c.connectgaps,marker:c.marker,cliponaxis:u({},c.cliponaxis,{dflt:!1}),textposition:c.textposition,textfont:c.textfont,fill:u({},c.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:c.fillcolor,hoverinfo:u({},i.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:c.hoveron,hovertemplate:r(),selected:c.selected,unselected:c.unselected}},{"../../lib/extend":493,"../../plots/attributes":550,"../../plots/template_attributes":633,"../scatter/attributes":927}],1018:[function(e,o,f){var r=e("fast-isnumeric"),a=e("../../constants/numerical").BADNUM,u=e("../scatter/colorscale_calc"),c=e("../scatter/arrays_to_calcdata"),i=e("../scatter/calc_selection"),s=e("../scatter/calc").calcMarkerSize;o.exports=function(l,d){for(var h=l._fullLayout,m=d.subplot,g=h[m].realaxis,p=h[m].imaginaryaxis,v=g.makeCalcdata(d,"real"),y=p.makeCalcdata(d,"imag"),x=d._length,w=new Array(x),k=0;k")}}o.exports={hoverPoints:function(u,c,i,s){var l=r(u,c,i,s);if(l&&l[0].index!==!1){var d=l[0];if(d.index===void 0)return l;var h=u.subplot,m=d.cd[d.index],g=d.trace;if(h.isPtInside(m))return d.xLabelVal=void 0,d.yLabelVal=void 0,a(m,g,h,d),d.hovertemplate=g.hovertemplate,l}},makeHoverPointText:a}},{"../scatter/hover":938}],1022:[function(e,o,f){o.exports={moduleType:"trace",name:"scattersmith",basePlotModule:e("../../plots/smith"),categories:["smith","symbols","showLegend","scatter-like"],attributes:e("./attributes"),supplyDefaults:e("./defaults"),colorbar:e("../scatter/marker_colorbar"),formatLabels:e("./format_labels"),calc:e("./calc"),plot:e("./plot"),style:e("../scatter/style").style,styleOnSelect:e("../scatter/style").styleOnSelect,hoverPoints:e("./hover").hoverPoints,selectPoints:e("../scatter/select"),meta:{}}},{"../../plots/smith":629,"../scatter/marker_colorbar":945,"../scatter/select":949,"../scatter/style":951,"./attributes":1017,"./calc":1018,"./defaults":1019,"./format_labels":1020,"./hover":1021,"./plot":1023}],1023:[function(e,o,f){var r=e("../scatter/plot"),a=e("../../constants/numerical").BADNUM,u=e("../../plots/smith/helpers").smith;o.exports=function(c,i,s){for(var l=i.layers.frontplot.select("g.scatterlayer"),d={xaxis:i.xaxis,yaxis:i.yaxis,plot:i.framework,layerClipId:i._hasClipOnAxisFalse?i.clipIds.forTraces:null},h=0;h"),l.hovertemplate=v.hovertemplate,s}function _(M,A){b.push(M._hovertitle+": "+A)}}},{"../scatter/hover":938}],1030:[function(e,o,f){o.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),colorbar:e("../scatter/marker_colorbar"),formatLabels:e("./format_labels"),calc:e("./calc"),plot:e("./plot"),style:e("../scatter/style").style,styleOnSelect:e("../scatter/style").styleOnSelect,hoverPoints:e("./hover"),selectPoints:e("../scatter/select"),eventData:e("./event_data"),moduleType:"trace",name:"scatterternary",basePlotModule:e("../../plots/ternary"),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}},{"../../plots/ternary":634,"../scatter/marker_colorbar":945,"../scatter/select":949,"../scatter/style":951,"./attributes":1024,"./calc":1025,"./defaults":1026,"./event_data":1027,"./format_labels":1028,"./hover":1029,"./plot":1031}],1031:[function(e,o,f){var r=e("../scatter/plot");o.exports=function(a,u,c){var i=u.plotContainer;i.select(".scatterlayer").selectAll("*").remove();var s={xaxis:u.xaxis,yaxis:u.yaxis,plot:i,layerClipId:u._hasClipOnAxisFalse?u.clipIdRelative:null},l=u.layers.frontplot.select("g.scatterlayer");r(a,s,c,l)}},{"../scatter/plot":948}],1032:[function(e,o,f){var r=e("../scatter/attributes"),a=e("../../components/colorscale/attributes"),u=e("../../plots/cartesian/axis_format_attributes").axisHoverFormat,c=e("../../plots/template_attributes").hovertemplateAttrs,i=e("../scattergl/attributes"),s=e("../../plots/cartesian/constants").idRegex,l=e("../../plot_api/plot_template").templatedArray,d=e("../../lib/extend").extendFlat,h=r.marker,m=h.line,g=d(a("marker.line",{editTypeOverride:"calc"}),{width:d({},m.width,{editType:"calc"}),editType:"calc"}),p=d(a("marker"),{symbol:h.symbol,size:d({},h.size,{editType:"markerSize"}),sizeref:h.sizeref,sizemin:h.sizemin,sizemode:h.sizemode,opacity:h.opacity,colorbar:h.colorbar,line:g,editType:"calc"});function v(y){return{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"subplotid",regex:s[y],editType:"plot"}}}p.color.editType=p.cmin.editType=p.cmax.editType="style",o.exports={dimensions:l("dimension",{visible:{valType:"boolean",dflt:!0,editType:"calc"},label:{valType:"string",editType:"calc"},values:{valType:"data_array",editType:"calc+clearAxisTypes"},axis:{type:{valType:"enumerated",values:["linear","log","date","category"],editType:"calc+clearAxisTypes"},matches:{valType:"boolean",dflt:!1,editType:"calc"},editType:"calc+clearAxisTypes"},editType:"calc+clearAxisTypes"}),text:d({},i.text,{}),hovertext:d({},i.hovertext,{}),hovertemplate:c(),xhoverformat:u("x"),yhoverformat:u("y"),marker:p,xaxes:v("x"),yaxes:v("y"),diagonal:{visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"},showupperhalf:{valType:"boolean",dflt:!0,editType:"calc"},showlowerhalf:{valType:"boolean",dflt:!0,editType:"calc"},selected:{marker:i.selected.marker,editType:"calc"},unselected:{marker:i.unselected.marker,editType:"calc"},opacity:i.opacity}},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plot_api/plot_template":543,"../../plots/cartesian/axis_format_attributes":557,"../../plots/cartesian/constants":561,"../../plots/template_attributes":633,"../scatter/attributes":927,"../scattergl/attributes":979}],1033:[function(e,o,f){var r=e("../../registry"),a=e("../../components/grid");o.exports={moduleType:"trace",name:"splom",categories:["gl","regl","cartesian","symbols","showLegend","scatter-like"],attributes:e("./attributes"),supplyDefaults:e("./defaults"),colorbar:e("../scatter/marker_colorbar"),calc:e("./calc"),plot:e("./plot"),hoverPoints:e("./hover").hoverPoints,selectPoints:e("./select"),editStyle:e("./edit_style"),meta:{}},r.register(a)},{"../../components/grid":410,"../../registry":638,"../scatter/marker_colorbar":945,"./attributes":1032,"./calc":1035,"./defaults":1036,"./edit_style":1037,"./hover":1039,"./plot":1041,"./select":1043}],1034:[function(e,o,f){var r=e("regl-line2d"),a=e("../../registry"),u=e("../../lib/prepare_regl"),c=e("../../plots/get_data").getModuleCalcData,i=e("../../plots/cartesian"),s=e("../../plots/cartesian/axis_ids").getFromId,l=e("../../plots/cartesian/axes").shouldShowZeroLine,d={};function h(g,p,v){for(var y=v.matrixOptions.data.length,x=p._visibleDims,w=v.viewOpts.ranges=new Array(y),k=0;km?M.sizeAvg||Math.max(M.size,3):u(p,_),y=0;yD&&z||E-1,G=!0;if(c(M)||!!x.selectedpoints||B){var W=x._length;if(x.selectedpoints){k.selectBatch=x.selectedpoints;var K=x.selectedpoints,te={};for(m=0;m1&&(y=T[A-1],w=_[A-1],b=M[A-1]),l=0;ly?"-":"+")+"x")).replace("y",(x>w?"-":"+")+"y")).replace("z",(k>b?"-":"+")+"z");var G=function(){A=0,P=[],N=[],B=[]};(!A||A2?v.slice(1,y-1):y===2?[(v[0]+v[1])/2]:v}function g(v){var y=v.length;return y===1?[.5,.5]:[v[1]-v[0],v[y-1]-v[y-2]]}function p(v,y){var x=v.fullSceneLayout,w=v.dataScale,k=y._len,b={};function T(U,q){var $=x[q],ne=w[l[q]];return u.simpleMap(U,function(H){return $.d2l(H)*ne})}if(b.vectors=s(T(y._u,"xaxis"),T(y._v,"yaxis"),T(y._w,"zaxis"),k),!k)return{positions:[],cells:[]};var _=T(y._Xs,"xaxis"),M=T(y._Ys,"yaxis"),A=T(y._Zs,"zaxis");if(b.meshgrid=[_,M,A],b.gridFill=y._gridFill,y._slen)b.startingPositions=s(T(y._startsX,"xaxis"),T(y._startsY,"yaxis"),T(y._startsZ,"zaxis"));else{for(var S=M[0],E=m(_),D=m(A),O=new Array(E.length*D.length),R=0,z=0;z=0};A?(y=Math.min(M.length,E.length),x=function(ee){return P(M[ee])&&N(ee)},w=function(ee){return String(M[ee])}):(y=Math.min(S.length,E.length),x=function(ee){return P(S[ee])&&N(ee)},w=function(ee){return String(S[ee])}),O&&(y=Math.min(y,D.length));for(var B=0;B1){for(var te=u.randstr(),Y=0;Y"),name:P||re("name")?S.name:void 0,color:L("hoverlabel.bgcolor")||E.color,borderColor:L("hoverlabel.bordercolor"),fontFamily:L("hoverlabel.font.family"),fontSize:L("hoverlabel.font.size"),fontColor:L("hoverlabel.font.color"),nameLength:L("hoverlabel.namelength"),textAlign:L("hoverlabel.align"),hovertemplate:P,hovertemplateLabels:te,eventData:A};b&&($.x0=G-_.rInscribed*_.rpx1,$.x1=G+_.rInscribed*_.rpx1,$.idealAlign=_.pxmid[0]<0?"left":"right"),T&&($.x=G,$.idealAlign=G<0?"left":"right");var ne=[];c.loneHover($,{container:M._hoverlayer.node(),outerContainer:M._paper.node(),gd:p,inOut_bbox:ne}),A[0].bbox=ne[0],w._hasHoverLabel=!0}if(T){var H=m.select("path.surface");y.styleOne(H,_,S,{hovered:!0})}w._hasHoverEvent=!0,p.emit("plotly_hover",{points:A||[h(_,S,y.eventDataKeys)],event:r.event})}}),m.on("mouseout",function(_){var M=p._fullLayout,A=p._fullData[w.index],S=r.select(this).datum();if(w._hasHoverEvent&&(_.originalEvent=r.event,p.emit("plotly_unhover",{points:[h(S,A,y.eventDataKeys)],event:r.event}),w._hasHoverEvent=!1),w._hasHoverLabel&&(c.loneUnhover(M._hoverlayer.node()),w._hasHoverLabel=!1),T){var E=m.select("path.surface");y.styleOne(E,S,A,{hovered:!1})}}),m.on("click",function(_){var M=p._fullLayout,A=p._fullData[w.index],S=b&&(l.isHierarchyRoot(_)||l.isLeaf(_)),E=l.getPtId(_),D=l.isEntry(_)?l.findEntryWithChild(k,E):l.findEntryWithLevel(k,E),O=l.getPtId(D),R={points:[h(_,A,y.eventDataKeys)],event:r.event};S||(R.nextLevel=O);var z=s.triggerHandler(p,"plotly_"+w.type+"click",R);if(z!==!1&&M.hovermode&&(p._hoverdata=[h(_,A,y.eventDataKeys)],c.click(p,r.event)),!S&&z!==!1&&!p._dragging&&!p._transitioning){a.call("_storeDirectGUIEdit",A,M._tracePreGUI[A.uid],{level:A.level});var L={data:[{level:O}],traces:[w.index]},P={frame:{redraw:!1,duration:y.transitionTime},transition:{duration:y.transitionTime,easing:y.transitionEasing},mode:"immediate",fromcurrent:!0};c.loneUnhover(M._hoverlayer.node()),a.call("animate",p,L,P)}})}},{"../../components/fx":406,"../../components/fx/helpers":402,"../../lib":503,"../../lib/events":492,"../../registry":638,"../pie/helpers":906,"./helpers":1055,"@plotly/d3":58}],1055:[function(e,o,f){var r=e("../../lib"),a=e("../../components/color"),u=e("../../lib/setcursor"),c=e("../pie/helpers");function i(s){return s.data.data.pid}f.findEntryWithLevel=function(s,l){var d;return l&&s.eachAfter(function(h){if(f.getPtId(h)===l)return d=h.copy()}),d||s},f.findEntryWithChild=function(s,l){var d;return s.eachAfter(function(h){for(var m=h.children||[],g=0;g0)},f.getMaxDepth=function(s){return s.maxdepth>=0?s.maxdepth:1/0},f.isHeader=function(s,l){return!(f.isLeaf(s)||s.depth===l._maxDepth-1)},f.getParent=function(s,l){return f.findEntryWithLevel(s,i(l))},f.listPath=function(s,l){var d=s.parent;if(!d)return[];var h=l?[d.data[l]]:[d];return f.listPath(d,l).concat(h)},f.getPath=function(s){return f.listPath(s,"label").join("/")+"/"},f.formatValue=c.formatPieValue,f.formatPercent=function(s,l){var d=r.formatPercent(s,0);return d==="0%"&&(d=c.formatPiePercent(s,l)),d}},{"../../components/color":366,"../../lib":503,"../../lib/setcursor":524,"../pie/helpers":906}],1056:[function(e,o,f){o.exports={moduleType:"trace",name:"sunburst",basePlotModule:e("./base_plot"),categories:[],animatable:!0,attributes:e("./attributes"),layoutAttributes:e("./layout_attributes"),supplyDefaults:e("./defaults"),supplyLayoutDefaults:e("./layout_defaults"),calc:e("./calc").calc,crossTraceCalc:e("./calc").crossTraceCalc,plot:e("./plot").plot,style:e("./style").style,colorbar:e("../scatter/marker_colorbar"),meta:{}}},{"../scatter/marker_colorbar":945,"./attributes":1049,"./base_plot":1050,"./calc":1051,"./defaults":1053,"./layout_attributes":1057,"./layout_defaults":1058,"./plot":1059,"./style":1060}],1057:[function(e,o,f){o.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}},{}],1058:[function(e,o,f){var r=e("../../lib"),a=e("./layout_attributes");o.exports=function(u,c){function i(s,l){return r.coerce(u,c,a,s,l)}i("sunburstcolorway",c.colorway),i("extendsunburstcolors")}},{"../../lib":503,"./layout_attributes":1057}],1059:[function(e,o,f){var r=e("@plotly/d3"),a=e("d3-hierarchy"),u=e("d3-interpolate").interpolate,c=e("../../components/drawing"),i=e("../../lib"),s=e("../../lib/svg_text_utils"),l=e("../bar/uniform_text"),d=l.recordMinTextSize,h=l.clearMinTextSize,m=e("../pie/plot"),g=e("../pie/helpers").getRotationAngle,p=m.computeTransform,v=m.transformInsideText,y=e("./style").styleOne,x=e("../bar/style").resizeText,w=e("./fx"),k=e("./constants"),b=e("./helpers");function T(M,A,S,E){var D=M._fullLayout,O=!D.uniformtext.mode&&b.hasTransition(E),R=r.select(S).selectAll("g.slice"),z=A[0],L=z.trace,P=z.hierarchy,N=b.findEntryWithLevel(P,L.level),B=b.getMaxDepth(L),G=D._size,W=L.domain,K=G.w*(W.x[1]-W.x[0]),te=G.h*(W.y[1]-W.y[0]),Y=.5*Math.min(K,te),Z=z.cx=G.l+G.w*(W.x[1]+W.x[0])/2,re=z.cy=G.t+G.h*(1-W.y[0])-te/2;if(!N)return R.remove();var U=null,q={};O&&R.each(function(Oe){q[b.getPtId(Oe)]={rpx0:Oe.rpx0,rpx1:Oe.rpx1,x0:Oe.x0,x1:Oe.x1,transform:Oe.transform},!U&&b.isEntry(Oe)&&(U=Oe)});var $=function(Oe){return a.partition().size([2*Math.PI,Oe.height+1])(Oe)}(N).descendants(),ne=N.height+1,H=0,Q=B;z.hasMultipleRoots&&b.isHierarchyRoot(N)&&($=$.slice(1),ne-=1,H=1,Q+=1),$=$.filter(function(Oe){return Oe.y1<=Q});var ee=g(L.rotation);ee&&$.forEach(function(Oe){Oe.x0+=ee,Oe.x1+=ee});var ie=Math.min(ne,B),ae=function(Oe){return(Oe-H)/ie*Y},ue=function(Oe,de){return[Oe*Math.cos(de),-Oe*Math.sin(de)]},le=function(Oe){return i.pathAnnulus(Oe.rpx0,Oe.rpx1,Oe.x0,Oe.x1,Z,re)},ge=function(Oe){return Z+_(Oe)[0]*(Oe.transform.rCenter||0)+(Oe.transform.x||0)},fe=function(Oe){return re+_(Oe)[1]*(Oe.transform.rCenter||0)+(Oe.transform.y||0)};(R=R.data($,b.getPtId)).enter().append("g").classed("slice",!0),O?R.exit().transition().each(function(){var Oe=r.select(this);Oe.select("path.surface").transition().attrTween("d",function(de){var ye=function(Me){var ke,Ee=b.getPtId(Me),ze=q[Ee],Fe=q[b.getPtId(N)];if(Fe){var Ve=(Me.x1>Fe.x1?2*Math.PI:0)+ee;ke=Me.rpx1me?2*Math.PI:0)+ee;qe={x0:nt,x1:nt}}else qe={rpx0:Y,rpx1:Y},i.extendFlat(qe,Te(Re));else qe={rpx0:0,rpx1:0};else qe={x0:ee,x1:ee};return u(qe,Ye)}(Ve);return function(Re){return le(Ke(Re))}}):ye.attr("d",le),de.call(w,N,M,A,{eventDataKeys:k.eventDataKeys,transitionTime:k.CLICK_TRANSITION_TIME,transitionEasing:k.CLICK_TRANSITION_EASING}).call(b.setSliceCursor,M,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:M._transitioning}),ye.call(y,Oe,L);var Me=i.ensureSingle(de,"g","slicetext"),ke=i.ensureSingle(Me,"text","",function(Ve){Ve.attr("data-notex",1)}),Ee=i.ensureUniformFontSize(M,b.determineTextFont(L,Oe,D.font));ke.text(f.formatSliceLabel(Oe,N,L,A,D)).classed("slicetext",!0).attr("text-anchor","middle").call(c.font,Ee).call(s.convertToTspans,M);var ze=c.bBox(ke.node());Oe.transform=v(ze,Oe,z),Oe.transform.targetX=ge(Oe),Oe.transform.targetY=fe(Oe);var Fe=function(Ve,Ke){var Re=Ve.transform;return p(Re,Ke),Re.fontSize=Ee.size,d(L.type,Re,D),i.getTextTransform(Re)};O?ke.transition().attrTween("transform",function(Ve){var Ke=function(Re){var qe,We=q[b.getPtId(Re)],Ye=Re.transform;if(We)qe=We;else if(qe={rpx1:Re.rpx1,transform:{textPosAngle:Ye.textPosAngle,scale:0,rotate:Ye.rotate,rCenter:Ye.rCenter,x:Ye.x,y:Ye.y}},U)if(Re.parent)if(me){var nt=Re.x1>me?2*Math.PI:0;qe.x0=qe.x1=nt}else i.extendFlat(qe,Te(Re));else qe.x0=qe.x1=ee;else qe.x0=qe.x1=ee;var ft=u(qe.transform.textPosAngle,Re.transform.textPosAngle),vt=u(qe.rpx1,Re.rpx1),Pt=u(qe.x0,Re.x0),At=u(qe.x1,Re.x1),at=u(qe.transform.scale,Ye.scale),et=u(qe.transform.rotate,Ye.rotate),Ot=Ye.rCenter===0?3:qe.transform.rCenter===0?1/3:1,Wt=u(qe.transform.rCenter,Ye.rCenter);return function(Jt){var Be=vt(Jt),Ge=Pt(Jt),Tt=At(Jt),dt=function(Ie){return Wt(Math.pow(Ie,Ot))}(Jt),Pe={pxmid:ue(Be,(Ge+Tt)/2),rpx1:Be,transform:{textPosAngle:ft(Jt),rCenter:dt,x:Ye.x,y:Ye.y}};return d(L.type,Ye,D),{transform:{targetX:ge(Pe),targetY:fe(Pe),scale:at(Jt),rotate:et(Jt),rCenter:dt}}}}(Ve);return function(Re){return Fe(Ke(Re),ze)}}):ke.attr("transform",Fe(Oe,ze))})}function _(M){return A=M.rpx1,S=M.transform.textPosAngle,[A*Math.sin(S),-A*Math.cos(S)];var A,S}f.plot=function(M,A,S,E){var D,O,R=M._fullLayout,z=R._sunburstlayer,L=!S,P=!R.uniformtext.mode&&b.hasTransition(S);h("sunburst",R),(D=z.selectAll("g.trace.sunburst").data(A,function(N){return N[0].trace.uid})).enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),D.order(),P?(E&&(O=E()),r.transition().duration(S.duration).ease(S.easing).each("end",function(){O&&O()}).each("interrupt",function(){O&&O()}).each(function(){z.selectAll("g.trace").each(function(N){T(M,N,this,S)})})):(D.each(function(N){T(M,N,this,S)}),R.uniformtext.mode&&x(M,R._sunburstlayer.selectAll(".trace"),"sunburst")),L&&D.exit().remove()},f.formatSliceLabel=function(M,A,S,E,D){var O=S.texttemplate,R=S.textinfo;if(!(O||R&&R!=="none"))return"";var z=D.separators,L=E[0],P=M.data.data,N=L.hierarchy,B=b.isHierarchyRoot(M),G=b.getParent(N,M),W=b.getValue(M);if(!O){var K,te=R.split("+"),Y=function(ee){return te.indexOf(ee)!==-1},Z=[];if(Y("label")&&P.label&&Z.push(P.label),P.hasOwnProperty("v")&&Y("value")&&Z.push(b.formatValue(P.v,z)),!B){Y("current path")&&Z.push(b.getPath(M.data));var re=0;Y("percent parent")&&re++,Y("percent entry")&&re++,Y("percent root")&&re++;var U=re>1;if(re){var q,$=function(ee){K=b.formatPercent(q,z),U&&(K+=" of "+ee),Z.push(K)};Y("percent parent")&&!B&&(q=W/b.getValue(G),$("parent")),Y("percent entry")&&(q=W/b.getValue(A),$("entry")),Y("percent root")&&(q=W/b.getValue(N),$("root"))}}return Y("text")&&(K=i.castOption(S,P.i,"text"),i.isValidTextValue(K)&&Z.push(K)),Z.join("
")}var ne=i.castOption(S,P.i,"texttemplate");if(!ne)return"";var H={};P.label&&(H.label=P.label),P.hasOwnProperty("v")&&(H.value=P.v,H.valueLabel=b.formatValue(P.v,z)),H.currentPath=b.getPath(M.data),B||(H.percentParent=W/b.getValue(G),H.percentParentLabel=b.formatPercent(H.percentParent,z),H.parent=b.getPtLabel(G)),H.percentEntry=W/b.getValue(A),H.percentEntryLabel=b.formatPercent(H.percentEntry,z),H.entry=b.getPtLabel(A),H.percentRoot=W/b.getValue(N),H.percentRootLabel=b.formatPercent(H.percentRoot,z),H.root=b.getPtLabel(N),P.hasOwnProperty("color")&&(H.color=P.color);var Q=i.castOption(S,P.i,"text");return(i.isValidTextValue(Q)||Q==="")&&(H.text=Q),H.customdata=i.castOption(S,P.i,"customdata"),i.texttemplateString(ne,H,D._d3locale,H,S._meta||{})}},{"../../components/drawing":388,"../../lib":503,"../../lib/svg_text_utils":529,"../bar/style":662,"../bar/uniform_text":664,"../pie/helpers":906,"../pie/plot":910,"./constants":1052,"./fx":1054,"./helpers":1055,"./style":1060,"@plotly/d3":58,"d3-hierarchy":115,"d3-interpolate":116}],1060:[function(e,o,f){var r=e("@plotly/d3"),a=e("../../components/color"),u=e("../../lib"),c=e("../bar/uniform_text").resizeText;function i(s,l,d){var h=l.data.data,m=!l.children,g=h.i,p=u.castOption(d,g,"marker.line.color")||a.defaultLine,v=u.castOption(d,g,"marker.line.width")||0;s.style("stroke-width",v).call(a.fill,h.color).call(a.stroke,p).style("opacity",m?d.leaf.opacity:null)}o.exports={style:function(s){var l=s._fullLayout._sunburstlayer.selectAll(".trace");c(s,l,"sunburst"),l.each(function(d){var h=r.select(this),m=d[0].trace;h.style("opacity",m.opacity),h.selectAll("path.surface").each(function(g){r.select(this).call(i,g,m)})})},styleOne:i}},{"../../components/color":366,"../../lib":503,"../bar/uniform_text":664,"@plotly/d3":58}],1061:[function(e,o,f){var r=e("../../components/color"),a=e("../../components/colorscale/attributes"),u=e("../../plots/cartesian/axis_format_attributes").axisHoverFormat,c=e("../../plots/template_attributes").hovertemplateAttrs,i=e("../../plots/attributes"),s=e("../../lib/extend").extendFlat,l=e("../../plot_api/edit_types").overrideAll;function d(m){return{show:{valType:"boolean",dflt:!1},start:{valType:"number",dflt:null,editType:"plot"},end:{valType:"number",dflt:null,editType:"plot"},size:{valType:"number",dflt:null,min:0,editType:"plot"},project:{x:{valType:"boolean",dflt:!1},y:{valType:"boolean",dflt:!1},z:{valType:"boolean",dflt:!1}},color:{valType:"color",dflt:r.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:r.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var h=o.exports=l(s({z:{valType:"data_array"},x:{valType:"data_array"},y:{valType:"data_array"},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:c(),xhoverformat:u("x"),yhoverformat:u("y"),zhoverformat:u("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},a("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:d(),y:d(),z:d()},hidesurface:{valType:"boolean",dflt:!1},lightposition:{x:{valType:"number",min:-1e5,max:1e5,dflt:10},y:{valType:"number",min:-1e5,max:1e5,dflt:1e4},z:{valType:"number",min:-1e5,max:1e5,dflt:0}},lighting:{ambient:{valType:"number",min:0,max:1,dflt:.8},diffuse:{valType:"number",min:0,max:1,dflt:.8},specular:{valType:"number",min:0,max:2,dflt:.05},roughness:{valType:"number",min:0,max:1,dflt:.5},fresnel:{valType:"number",min:0,max:5,dflt:.2}},opacity:{valType:"number",min:0,max:1,dflt:1},opacityscale:{valType:"any",editType:"calc"},_deprecated:{zauto:s({},a.zauto,{}),zmin:s({},a.zmin,{}),zmax:s({},a.zmax,{})},hoverinfo:s({},i.hoverinfo),showlegend:s({},i.showlegend,{dflt:!1})}),"calc","nested");h.x.editType=h.y.editType=h.z.editType="calc+clearAxisTypes",h.transforms=void 0},{"../../components/color":366,"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plot_api/edit_types":536,"../../plots/attributes":550,"../../plots/cartesian/axis_format_attributes":557,"../../plots/template_attributes":633}],1062:[function(e,o,f){var r=e("../../components/colorscale/calc");o.exports=function(a,u){u.surfacecolor?r(a,u,{vals:u.surfacecolor,containerStr:"",cLetter:"c"}):r(a,u,{vals:u.z,containerStr:"",cLetter:"c"})}},{"../../components/colorscale/calc":374}],1063:[function(e,o,f){var r=e("../../../stackgl_modules").gl_surface3d,a=e("../../../stackgl_modules").ndarray,u=e("../../../stackgl_modules").ndarray_linear_interpolate.d2,c=e("../heatmap/interp2d"),i=e("../heatmap/find_empties"),s=e("../../lib").isArrayOrTypedArray,l=e("../../lib/gl_format_color").parseColorScale,d=e("../../lib/str2rgbarray"),h=e("../../components/colorscale").extractOpts;function m(S,E,D){this.scene=S,this.uid=D,this.surface=E,this.data=null,this.showContour=[!1,!1,!1],this.contourStart=[null,null,null],this.contourEnd=[null,null,null],this.contourSize=[0,0,0],this.minValues=[1/0,1/0,1/0],this.maxValues=[-1/0,-1/0,-1/0],this.dataScaleX=1,this.dataScaleY=1,this.refineData=!0,this.objectOffset=[0,0,0]}var g=m.prototype;g.getXat=function(S,E,D,O){var R=s(this.data.x)?s(this.data.x[0])?this.data.x[E][S]:this.data.x[S]:S;return D===void 0?R:O.d2l(R,0,D)},g.getYat=function(S,E,D,O){var R=s(this.data.y)?s(this.data.y[0])?this.data.y[E][S]:this.data.y[E]:E;return D===void 0?R:O.d2l(R,0,D)},g.getZat=function(S,E,D,O){var R=this.data.z[E][S];return R===null&&this.data.connectgaps&&this.data._interpolatedZ&&(R=this.data._interpolatedZ[E][S]),D===void 0?R:O.d2l(R,0,D)},g.handlePick=function(S){if(S.object===this.surface){var E=(S.data.index[0]-1)/this.dataScaleX-1,D=(S.data.index[1]-1)/this.dataScaleY-1,O=Math.max(Math.min(Math.round(E),this.data.z[0].length-1),0),R=Math.max(Math.min(Math.round(D),this.data._ylength-1),0);S.index=[O,R],S.traceCoordinate=[this.getXat(O,R),this.getYat(O,R),this.getZat(O,R)],S.dataCoordinate=[this.getXat(O,R,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(O,R,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(O,R,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var z=0;z<3;z++){var L=S.dataCoordinate[z];L!=null&&(S.dataCoordinate[z]*=this.scene.dataScale[z])}var P=this.data.hovertext||this.data.text;return Array.isArray(P)&&P[R]&&P[R][O]!==void 0?S.textLabel=P[R][O]:S.textLabel=P||"",S.data.dataCoordinate=S.dataCoordinate.slice(),this.surface.highlight(S.data),this.scene.glplot.spikes.position=S.dataCoordinate,!0}};var p=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997,1009,1013,1019,1021,1031,1033,1039,1049,1051,1061,1063,1069,1087,1091,1093,1097,1103,1109,1117,1123,1129,1151,1153,1163,1171,1181,1187,1193,1201,1213,1217,1223,1229,1231,1237,1249,1259,1277,1279,1283,1289,1291,1297,1301,1303,1307,1319,1321,1327,1361,1367,1373,1381,1399,1409,1423,1427,1429,1433,1439,1447,1451,1453,1459,1471,1481,1483,1487,1489,1493,1499,1511,1523,1531,1543,1549,1553,1559,1567,1571,1579,1583,1597,1601,1607,1609,1613,1619,1621,1627,1637,1657,1663,1667,1669,1693,1697,1699,1709,1721,1723,1733,1741,1747,1753,1759,1777,1783,1787,1789,1801,1811,1823,1831,1847,1861,1867,1871,1873,1877,1879,1889,1901,1907,1913,1931,1933,1949,1951,1973,1979,1987,1993,1997,1999,2003,2011,2017,2027,2029,2039,2053,2063,2069,2081,2083,2087,2089,2099,2111,2113,2129,2131,2137,2141,2143,2153,2161,2179,2203,2207,2213,2221,2237,2239,2243,2251,2267,2269,2273,2281,2287,2293,2297,2309,2311,2333,2339,2341,2347,2351,2357,2371,2377,2381,2383,2389,2393,2399,2411,2417,2423,2437,2441,2447,2459,2467,2473,2477,2503,2521,2531,2539,2543,2549,2551,2557,2579,2591,2593,2609,2617,2621,2633,2647,2657,2659,2663,2671,2677,2683,2687,2689,2693,2699,2707,2711,2713,2719,2729,2731,2741,2749,2753,2767,2777,2789,2791,2797,2801,2803,2819,2833,2837,2843,2851,2857,2861,2879,2887,2897,2903,2909,2917,2927,2939,2953,2957,2963,2969,2971,2999];function v(S,E){if(S0){D=p[O];break}return D}function w(S,E){if(!(S<1||E<1)){for(var D=y(S),O=y(E),R=1,z=0;zT;)D--,D/=x(D),++D1?O:1},g.refineCoords=function(S){for(var E=this.dataScaleX,D=this.dataScaleY,O=S[0].shape[0],R=S[0].shape[1],z=0|Math.floor(S[0].shape[0]*E+1),L=0|Math.floor(S[0].shape[1]*D+1),P=1+O+1,N=1+R+1,B=a(new Float32Array(P*N),[P,N]),G=[1/E,0,0,0,1/D,0,0,0,1],W=0;W0&&this.contourStart[S]!==null&&this.contourEnd[S]!==null&&this.contourEnd[S]>this.contourStart[S]))for(R[S]=!0,E=this.contourStart[S];ER&&(this.minValues[E]=R),this.maxValues[E]",maxDimensionCount:60,overdrag:45,releaseTransitionDuration:120,releaseTransitionEase:"cubic-out",scrollbarCaptureWidth:18,scrollbarHideDelay:1e3,scrollbarHideDuration:1e3,scrollbarOffset:5,scrollbarWidth:8,transitionDuration:100,transitionEase:"cubic-out",uplift:5,wrapSpacer:" ",wrapSplitCharacter:" ",cn:{table:"table",tableControlView:"table-control-view",scrollBackground:"scroll-background",yColumn:"y-column",columnBlock:"column-block",scrollAreaClip:"scroll-area-clip",scrollAreaClipRect:"scroll-area-clip-rect",columnBoundary:"column-boundary",columnBoundaryClippath:"column-boundary-clippath",columnBoundaryRect:"column-boundary-rect",columnCells:"column-cells",columnCell:"column-cell",cellRect:"cell-rect",cellText:"cell-text",cellTextHolder:"cell-text-holder",scrollbarKit:"scrollbar-kit",scrollbar:"scrollbar",scrollbarSlider:"scrollbar-slider",scrollbarGlyph:"scrollbar-glyph",scrollbarCaptureZone:"scrollbar-capture-zone"}}},{}],1070:[function(e,o,f){var r=e("./constants"),a=e("../../lib/extend").extendFlat,u=e("fast-isnumeric");function c(g){if(Array.isArray(g)){for(var p=0,v=0;v=p||_===g.length-1)&&(y[x]=k,k.key=T++,k.firstRowIndex=b,k.lastRowIndex=_,k={firstRowIndex:null,lastRowIndex:null,rows:[]},x+=w,b=_+1,w=0);return y}o.exports=function(g,p){var v=s(p.cells.values),y=function(B){return B.slice(p.header.values.length,B.length)},x=s(p.header.values);x.length&&!x[0].length&&(x[0]=[""],x=s(x));var w=x.concat(y(v).map(function(){return l((x[0]||[""]).length)})),k=p.domain,b=Math.floor(g._fullLayout._size.w*(k.x[1]-k.x[0])),T=Math.floor(g._fullLayout._size.h*(k.y[1]-k.y[0])),_=p.header.values.length?w[0].map(function(){return p.header.height}):[r.emptyHeaderHeight],M=v.length?v[0].map(function(){return p.cells.height}):[],A=_.reduce(i,0),S=m(M,T-A+r.uplift),E=h(m(_,A),[]),D=h(S,E),O={},R=p._fullInput.columnorder.concat(y(v.map(function(B,G){return G}))),z=w.map(function(B,G){var W=Array.isArray(p.columnwidth)?p.columnwidth[Math.min(G,p.columnwidth.length-1)]:p.columnwidth;return u(W)?Number(W):1}),L=z.reduce(i,0);z=z.map(function(B){return B/L*b});var P=Math.max(c(p.header.line.width),c(p.cells.line.width)),N={key:p.uid+g._context.staticPlot,translateX:k.x[0]*g._fullLayout._size.w,translateY:g._fullLayout._size.h*(1-k.y[1]),size:g._fullLayout._size,width:b,maxLineWidth:P,height:T,columnOrder:R,groupHeight:T,rowBlocks:D,headerRowBlocks:E,scrollY:0,cells:a({},p.cells,{values:v}),headerCells:a({},p.header,{values:w}),gdColumns:w.map(function(B){return B[0]}),gdColumnsOriginalOrder:w.map(function(B){return B[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:w.map(function(B,G){var W=O[B];return O[B]=(W||0)+1,{key:B+"__"+O[B],label:B,specIndex:G,xIndex:R[G],xScale:d,x:void 0,calcdata:void 0,columnWidth:z[G]}})};return N.columns.forEach(function(B){B.calcdata=N,B.x=d(B)}),N}},{"../../lib/extend":493,"./constants":1069,"fast-isnumeric":190}],1071:[function(e,o,f){var r=e("../../lib/extend").extendFlat;f.splitToPanels=function(a){var u=[0,0],c=r({},a,{key:"header",type:"header",page:0,prevPages:u,currentRepaint:[null,null],dragHandle:!0,values:a.calcdata.headerCells.values[a.specIndex],rowBlocks:a.calcdata.headerRowBlocks,calcdata:r({},a.calcdata,{cells:a.calcdata.headerCells})});return[r({},a,{key:"cells1",type:"cells",page:0,prevPages:u,currentRepaint:[null,null],dragHandle:!1,values:a.calcdata.cells.values[a.specIndex],rowBlocks:a.calcdata.rowBlocks}),r({},a,{key:"cells2",type:"cells",page:1,prevPages:u,currentRepaint:[null,null],dragHandle:!1,values:a.calcdata.cells.values[a.specIndex],rowBlocks:a.calcdata.rowBlocks}),c]},f.splitToCells=function(a){var u=function(c){var i=c.rowBlocks[c.page],s=i?i.rows[0].rowIndex:0,l=i?s+i.rows.length:0;return[s,l]}(a);return(a.values||[]).slice(u[0],u[1]).map(function(c,i){return{keyWithinBlock:i+(typeof c=="string"&&c.match(/[<$&> ]/)?"_keybuster_"+Math.random():""),key:u[0]+i,column:a,calcdata:a.calcdata,page:a.page,rowBlocks:a.rowBlocks,value:c}})}},{"../../lib/extend":493}],1072:[function(e,o,f){var r=e("../../lib"),a=e("./attributes"),u=e("../../plots/domain").defaults;o.exports=function(c,i,s,l){function d(h,m){return r.coerce(c,i,a,h,m)}u(i,l,d),d("columnwidth"),d("header.values"),d("header.format"),d("header.align"),d("header.prefix"),d("header.suffix"),d("header.height"),d("header.line.width"),d("header.line.color"),d("header.fill.color"),r.coerceFont(d,"header.font",r.extendFlat({},l.font)),function(h,m){for(var g=h.columnorder||[],p=h.header.values.length,v=g.slice(0,p),y=v.slice().sort(function(k,b){return k-b}),x=v.map(function(k){return y.indexOf(k)}),w=x.length;w/i),ie=!Q||ee;q.mayHaveMarkup=Q&&H.match(/[<&>]/);var ae,ue=typeof(ae=H)=="string"&&ae.match(r.latexCheck);q.latex=ue;var le,ge,fe=ue?"":M(q.calcdata.cells.prefix,$,ne)||"",me=ue?"":M(q.calcdata.cells.suffix,$,ne)||"",_e=ue?null:M(q.calcdata.cells.format,$,ne)||null,we=fe+(_e?u(_e)(q.value):q.value)+me;if(q.wrappingNeeded=!q.wrapped&&!ie&&!ue&&(le=_(we)),q.cellHeightMayIncrease=ee||ue||q.mayHaveMarkup||(le===void 0?_(we):le),q.needsConvertToTspans=q.mayHaveMarkup||q.wrappingNeeded||q.latex,q.wrappingNeeded){var Te=(r.wrapSplitCharacter===" "?we.replace(/ge&&le.push(fe),ge+=we}return le}(q,Q,H);ee.length===1&&(ee[0]===q.length-1?ee.unshift(ee[0]-1):ee.push(ee[0]+1)),ee[0]%2&&ee.reverse(),Z.each(function(ie,ae){ie.page=ee[ae],ie.scrollY=Q}),Z.attr("transform",function(ie){var ae=G(ie.rowBlocks,ie.page)-ie.scrollY;return d(0,ae)}),Y&&(z(Y,re,Z,ee,U.prevPages,U,0),z(Y,re,Z,ee,U.prevPages,U,1),k(re,Y))}}function R(Y,Z,re,U){return function(q){var $=q.calcdata?q.calcdata:q,ne=Z.filter(function(ie){return $.key===ie.key}),H=re||$.scrollbarState.dragMultiplier,Q=$.scrollY;$.scrollY=U===void 0?$.scrollY+H*a.event.dy:U;var ee=ne.selectAll("."+r.cn.yColumn).selectAll("."+r.cn.columnBlock).filter(S);return O(Y,ee,ne),$.scrollY===Q}}function z(Y,Z,re,U,q,$,ne){U[ne]!==q[ne]&&(clearTimeout($.currentRepaint[ne]),$.currentRepaint[ne]=setTimeout(function(){var H=re.filter(function(Q,ee){return ee===ne&&U[ee]!==q[ee]});b(Y,Z,H,re),q[ne]=U[ne]}))}function L(Y,Z,re,U){return function(){var q=a.select(Z.parentNode);q.each(function($){var ne=$.fragments;q.selectAll("tspan.line").each(function(ge,fe){ne[fe].width=this.getComputedTextLength()});var H,Q,ee=ne[ne.length-1].width,ie=ne.slice(0,-1),ae=[],ue=0,le=$.column.columnWidth-2*r.cellPad;for($.value="";ie.length;)ue+(Q=(H=ie.shift()).width+ee)>le&&($.value+=ae.join(r.wrapSpacer)+r.lineBreaker,ae=[],ue=0),ae.push(H.text),ue+=Q;ue&&($.value+=ae.join(r.wrapSpacer)),$.wrapped=!0}),q.selectAll("tspan.line").remove(),T(q.select("."+r.cn.cellText),re,Y,U),a.select(Z.parentNode.parentNode).call(B)}}function P(Y,Z,re,U,q){return function(){if(!q.settledY){var $=a.select(Z.parentNode),ne=te(q),H=q.key-ne.firstRowIndex,Q=ne.rows[H].rowHeight,ee=q.cellHeightMayIncrease?Z.parentNode.getBoundingClientRect().height+2*r.cellPad:Q,ie=Math.max(ee,Q);ie-ne.rows[H].rowHeight&&(ne.rows[H].rowHeight=ie,Y.selectAll("."+r.cn.columnCell).call(B),O(null,Y.filter(S),0),k(re,U,!0)),$.attr("transform",function(){var ae=this.parentNode.getBoundingClientRect(),ue=a.select(this.parentNode).select("."+r.cn.cellRect).node().getBoundingClientRect(),le=this.transform.baseVal.consolidate(),ge=ue.top-ae.top+(le?le.matrix.f:r.cellPad);return d(N(q,a.select(this.parentNode).select("."+r.cn.cellTextHolder).node().getBoundingClientRect().width),ge)}),q.settledY=!0}}}function N(Y,Z){switch(Y.align){case"left":return r.cellPad;case"right":return Y.column.columnWidth-(Z||0)-r.cellPad;case"center":return(Y.column.columnWidth-(Z||0))/2;default:return r.cellPad}}function B(Y){Y.attr("transform",function(Z){var re=Z.rowBlocks[0].auxiliaryBlocks.reduce(function(q,$){return q+W($,1/0)},0),U=W(te(Z),Z.key);return d(0,U+re)}).selectAll("."+r.cn.cellRect).attr("height",function(Z){return(re=te(Z),U=Z.key,re.rows[U-re.firstRowIndex]).rowHeight;var re,U})}function G(Y,Z){for(var re=0,U=Z-1;U>=0;U--)re+=K(Y[U]);return re}function W(Y,Z){for(var re=0,U=0;U","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:d({},i.textfont,{}),editType:"calc"},text:i.text,textinfo:s.textinfo,texttemplate:a({editType:"plot"},{keys:l.eventDataKeys.concat(["label","value"])}),hovertext:i.hovertext,hoverinfo:s.hoverinfo,hovertemplate:r({},{keys:l.eventDataKeys}),textfont:i.textfont,insidetextfont:i.insidetextfont,outsidetextfont:d({},i.outsidetextfont,{}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"top left",editType:"plot"},sort:i.sort,root:s.root,domain:c({name:"treemap",trace:!0,editType:"calc"})}},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plots/domain":584,"../../plots/template_attributes":633,"../pie/attributes":901,"../sunburst/attributes":1049,"./constants":1078}],1076:[function(e,o,f){var r=e("../../plots/plots");f.name="treemap",f.plot=function(a,u,c,i){r.plotBasePlot(f.name,a,u,c,i)},f.clean=function(a,u,c,i){r.cleanBasePlot(f.name,a,u,c,i)}},{"../../plots/plots":619}],1077:[function(e,o,f){var r=e("../sunburst/calc");f.calc=function(a,u){return r.calc(a,u)},f.crossTraceCalc=function(a){return r._runCrossTraceCalc("treemap",a)}},{"../sunburst/calc":1051}],1078:[function(e,o,f){o.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}},{}],1079:[function(e,o,f){var r=e("../../lib"),a=e("./attributes"),u=e("../../components/color"),c=e("../../plots/domain").defaults,i=e("../bar/defaults").handleText,s=e("../bar/constants").TEXTPAD,l=e("../../components/colorscale"),d=l.hasColorscale,h=l.handleDefaults;o.exports=function(m,g,p,v){function y(S,E){return r.coerce(m,g,a,S,E)}var x=y("labels"),w=y("parents");if(x&&x.length&&w&&w.length){var k=y("values");k&&k.length?y("branchvalues"):y("count"),y("level"),y("maxdepth"),y("tiling.packing")==="squarify"&&y("tiling.squarifyratio"),y("tiling.flip"),y("tiling.pad");var b=y("text");y("texttemplate"),g.texttemplate||y("textinfo",Array.isArray(b)?"text+label":"label"),y("hovertext"),y("hovertemplate");var T=y("pathbar.visible");i(m,g,v,y,"auto",{hasPathbar:T,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),y("textposition");var _=g.textposition.indexOf("bottom")!==-1;y("marker.line.width")&&y("marker.line.color",v.paper_bgcolor);var M=y("marker.colors");(g._hasColorscale=d(m,"marker","colors")||(m.marker||{}).coloraxis)?h(m,g,v,y,{prefix:"marker.",cLetter:"c"}):y("marker.depthfade",!(M||[]).length);var A=2*g.textfont.size;y("marker.pad.t",_?A/4:A),y("marker.pad.l",A/4),y("marker.pad.r",A/4),y("marker.pad.b",_?A:A/4),g._hovered={marker:{line:{width:2,color:u.contrast(v.paper_bgcolor)}}},T&&(y("pathbar.thickness",g.pathbar.textfont.size+2*s),y("pathbar.side"),y("pathbar.edgeshape")),y("sort"),y("root.color"),c(g,v,y),g._length=null}else g.visible=!1}},{"../../components/color":366,"../../components/colorscale":378,"../../lib":503,"../../plots/domain":584,"../bar/constants":650,"../bar/defaults":652,"./attributes":1075}],1080:[function(e,o,f){var r=e("@plotly/d3"),a=e("../sunburst/helpers"),u=e("../bar/uniform_text").clearMinTextSize,c=e("../bar/style").resizeText,i=e("./plot_one");o.exports=function(s,l,d,h,m){var g,p,v=m.type,y=m.drawDescendants,x=s._fullLayout,w=x["_"+v+"layer"],k=!d;u(v,x),(g=w.selectAll("g.trace."+v).data(l,function(b){return b[0].trace.uid})).enter().append("g").classed("trace",!0).classed(v,!0),g.order(),!x.uniformtext.mode&&a.hasTransition(d)?(h&&(p=h()),r.transition().duration(d.duration).ease(d.easing).each("end",function(){p&&p()}).each("interrupt",function(){p&&p()}).each(function(){w.selectAll("g.trace").each(function(b){i(s,b,this,d,y)})})):(g.each(function(b){i(s,b,this,d,y)}),x.uniformtext.mode&&c(s,w.selectAll(".trace"),v)),k&&g.exit().remove()}},{"../bar/style":662,"../bar/uniform_text":664,"../sunburst/helpers":1055,"./plot_one":1089,"@plotly/d3":58}],1081:[function(e,o,f){var r=e("@plotly/d3"),a=e("../../lib"),u=e("../../components/drawing"),c=e("../../lib/svg_text_utils"),i=e("./partition"),s=e("./style").styleOne,l=e("./constants"),d=e("../sunburst/helpers"),h=e("../sunburst/fx");o.exports=function(m,g,p,v,y){var x=y.barDifY,w=y.width,k=y.height,b=y.viewX,T=y.viewY,_=y.pathSlice,M=y.toMoveInsideSlice,A=y.strTransform,S=y.hasTransition,E=y.handleSlicesExit,D=y.makeUpdateSliceInterpolator,O=y.makeUpdateTextInterpolator,R={},z=m._fullLayout,L=g[0],P=L.trace,N=L.hierarchy,B=w/P._entryDepth,G=d.listPath(p.data,"id"),W=i(N.copy(),[w,k],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();(W=W.filter(function(te){var Y=G.indexOf(te.data.id);return Y!==-1&&(te.x0=B*Y,te.x1=B*(Y+1),te.y0=x,te.y1=x+k,te.onPathbar=!0,!0)})).reverse(),(v=v.data(W,d.getPtId)).enter().append("g").classed("pathbar",!0),E(v,!0,R,[w,k],_),v.order();var K=v;S&&(K=K.transition().each("end",function(){var te=r.select(this);d.setSliceCursor(te,m,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})})),K.each(function(te){te._x0=b(te.x0),te._x1=b(te.x1),te._y0=T(te.y0),te._y1=T(te.y1),te._hoverX=b(te.x1-Math.min(w,k)/2),te._hoverY=T(te.y1-k/2);var Y=r.select(this),Z=a.ensureSingle(Y,"path","surface",function($){$.style("pointer-events","all")});S?Z.transition().attrTween("d",function($){var ne=D($,!0,R,[w,k]);return function(H){return _(ne(H))}}):Z.attr("d",_),Y.call(h,p,m,g,{styleOne:s,eventDataKeys:l.eventDataKeys,transitionTime:l.CLICK_TRANSITION_TIME,transitionEasing:l.CLICK_TRANSITION_EASING}).call(d.setSliceCursor,m,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:m._transitioning}),Z.call(s,te,P,{hovered:!1}),te._text=(d.getPtLabel(te)||"").split("
").join(" ")||"";var re=a.ensureSingle(Y,"g","slicetext"),U=a.ensureSingle(re,"text","",function($){$.attr("data-notex",1)}),q=a.ensureUniformFontSize(m,d.determineTextFont(P,te,z.font,{onPathbar:!0}));U.text(te._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(u.font,q).call(c.convertToTspans,m),te.textBB=u.bBox(U.node()),te.transform=M(te,{fontSize:q.size,onPathbar:!0}),te.transform.fontSize=q.size,S?U.transition().attrTween("transform",function($){var ne=O($,!0,R,[w,k]);return function(H){return A(ne(H))}}):U.attr("transform",A(te))})}},{"../../components/drawing":388,"../../lib":503,"../../lib/svg_text_utils":529,"../sunburst/fx":1054,"../sunburst/helpers":1055,"./constants":1078,"./partition":1087,"./style":1090,"@plotly/d3":58}],1082:[function(e,o,f){var r=e("@plotly/d3"),a=e("../../lib"),u=e("../../components/drawing"),c=e("../../lib/svg_text_utils"),i=e("./partition"),s=e("./style").styleOne,l=e("./constants"),d=e("../sunburst/helpers"),h=e("../sunburst/fx"),m=e("../sunburst/plot").formatSliceLabel;o.exports=function(g,p,v,y,x){var w=x.width,k=x.height,b=x.viewX,T=x.viewY,_=x.pathSlice,M=x.toMoveInsideSlice,A=x.strTransform,S=x.hasTransition,E=x.handleSlicesExit,D=x.makeUpdateSliceInterpolator,O=x.makeUpdateTextInterpolator,R=x.prevEntry,z=g._fullLayout,L=p[0].trace,P=L.textposition.indexOf("left")!==-1,N=L.textposition.indexOf("right")!==-1,B=L.textposition.indexOf("bottom")!==-1,G=!B&&!L.marker.pad.t||B&&!L.marker.pad.b,W=i(v,[w,k],{packing:L.tiling.packing,squarifyratio:L.tiling.squarifyratio,flipX:L.tiling.flip.indexOf("x")>-1,flipY:L.tiling.flip.indexOf("y")>-1,pad:{inner:L.tiling.pad,top:L.marker.pad.t,left:L.marker.pad.l,right:L.marker.pad.r,bottom:L.marker.pad.b}}).descendants(),K=1/0,te=-1/0;W.forEach(function(q){var $=q.depth;$>=L._maxDepth?(q.x0=q.x1=(q.x0+q.x1)/2,q.y0=q.y1=(q.y0+q.y1)/2):(K=Math.min(K,$),te=Math.max(te,$))}),y=y.data(W,d.getPtId),L._maxVisibleLayers=isFinite(te)?te-K+1:0,y.enter().append("g").classed("slice",!0),E(y,!1,{},[w,k],_),y.order();var Y=null;if(S&&R){var Z=d.getPtId(R);y.each(function(q){Y===null&&d.getPtId(q)===Z&&(Y={x0:q.x0,x1:q.x1,y0:q.y0,y1:q.y1})})}var re=function(){return Y||{x0:0,x1:w,y0:0,y1:k}},U=y;return S&&(U=U.transition().each("end",function(){var q=r.select(this);d.setSliceCursor(q,g,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),U.each(function(q){var $=d.isHeader(q,L);q._x0=b(q.x0),q._x1=b(q.x1),q._y0=T(q.y0),q._y1=T(q.y1),q._hoverX=b(q.x1-L.marker.pad.r),q._hoverY=T(B?q.y1-L.marker.pad.b/2:q.y0+L.marker.pad.t/2);var ne=r.select(this),H=a.ensureSingle(ne,"path","surface",function(ae){ae.style("pointer-events","all")});S?H.transition().attrTween("d",function(ae){var ue=D(ae,!1,re(),[w,k]);return function(le){return _(ue(le))}}):H.attr("d",_),ne.call(h,v,g,p,{styleOne:s,eventDataKeys:l.eventDataKeys,transitionTime:l.CLICK_TRANSITION_TIME,transitionEasing:l.CLICK_TRANSITION_EASING}).call(d.setSliceCursor,g,{isTransitioning:g._transitioning}),H.call(s,q,L,{hovered:!1}),q.x0===q.x1||q.y0===q.y1?q._text="":q._text=$?G?"":d.getPtLabel(q)||"":m(q,v,L,p,z)||"";var Q=a.ensureSingle(ne,"g","slicetext"),ee=a.ensureSingle(Q,"text","",function(ae){ae.attr("data-notex",1)}),ie=a.ensureUniformFontSize(g,d.determineTextFont(L,q,z.font));ee.text(q._text||" ").classed("slicetext",!0).attr("text-anchor",N?"end":P||$?"start":"middle").call(u.font,ie).call(c.convertToTspans,g),q.textBB=u.bBox(ee.node()),q.transform=M(q,{fontSize:ie.size,isHeader:$}),q.transform.fontSize=ie.size,S?ee.transition().attrTween("transform",function(ae){var ue=O(ae,!1,re(),[w,k]);return function(le){return A(ue(le))}}):ee.attr("transform",A(q))}),Y}},{"../../components/drawing":388,"../../lib":503,"../../lib/svg_text_utils":529,"../sunburst/fx":1054,"../sunburst/helpers":1055,"../sunburst/plot":1059,"./constants":1078,"./partition":1087,"./style":1090,"@plotly/d3":58}],1083:[function(e,o,f){o.exports=function r(a,u,c){var i;c.swapXY&&(i=a.x0,a.x0=a.y0,a.y0=i,i=a.x1,a.x1=a.y1,a.y1=i),c.flipX&&(i=a.x0,a.x0=u[0]-a.x1,a.x1=u[0]-i),c.flipY&&(i=a.y0,a.y0=u[1]-a.y1,a.y1=u[1]-i);var s=a.children;if(s)for(var l=0;l-1?N+W:-(G+W):0,te={x0:B,x1:B,y0:K,y1:K+G},Y=function(Ee,ze,Fe){var Ve=b.tiling.pad,Ke=function(Ye){return Ye-Ve<=ze.x0},Re=function(Ye){return Ye+Ve>=ze.x1},qe=function(Ye){return Ye-Ve<=ze.y0},We=function(Ye){return Ye+Ve>=ze.y1};return Ee.x0===ze.x0&&Ee.x1===ze.x1&&Ee.y0===ze.y0&&Ee.y1===ze.y1?{x0:Ee.x0,x1:Ee.x1,y0:Ee.y0,y1:Ee.y1}:{x0:Ke(Ee.x0-Ve)?0:Re(Ee.x0-Ve)?Fe[0]:Ee.x0,x1:Ke(Ee.x1+Ve)?0:Re(Ee.x1+Ve)?Fe[0]:Ee.x1,y0:qe(Ee.y0-Ve)?0:We(Ee.y0-Ve)?Fe[1]:Ee.y0,y1:qe(Ee.y1+Ve)?0:We(Ee.y1+Ve)?Fe[1]:Ee.y1}},Z=null,re={},U={},q=null,$=function(Ee,ze){return ze?re[m(Ee)]:U[m(Ee)]},ne=function(Ee,ze,Fe,Ve){if(ze)return re[m(_)]||te;var Ke=U[b.level]||Fe;return function(Re){return Re.data.depth-M.data.depth=(Ve-=(T?Pt:Pt.r)-i)){var At=(Fe+Ve)/2;Fe=At,Ve=At}var at;Ye?Ke<(at=Re-(T?Pt:Pt.b))&&at"?(Ye.x-=Re,nt.x-=Re,ft.x-=Re,vt.x-=Re):we==="/"?(ft.x-=Re,vt.x-=Re,qe.x-=Re/2,We.x-=Re/2):we==="\\"?(Ye.x-=Re,nt.x-=Re,qe.x-=Re/2,We.x-=Re/2):we==="<"&&(qe.x-=Re,We.x-=Re),_e(Ye),_e(vt),_e(qe),_e(nt),_e(ft),_e(We),"M"+fe(Ye.x,Ye.y)+"L"+fe(nt.x,nt.y)+"L"+fe(We.x,We.y)+"L"+fe(ft.x,ft.y)+"L"+fe(vt.x,vt.y)+"L"+fe(qe.x,qe.y)+"Z"},toMoveInsideSlice:Te,makeUpdateSliceInterpolator:de,makeUpdateTextInterpolator:ye,handleSlicesExit:Me,hasTransition:O,strTransform:ke}):S.remove()}},{"../../lib":503,"../bar/constants":650,"../bar/plot":659,"../bar/uniform_text":664,"../sunburst/helpers":1055,"./constants":1078,"./draw_ancestors":1081,"@plotly/d3":58,"d3-interpolate":116}],1090:[function(e,o,f){var r=e("@plotly/d3"),a=e("../../components/color"),u=e("../../lib"),c=e("../sunburst/helpers"),i=e("../bar/uniform_text").resizeText;function s(l,d,h,m){var g,p,v=(m||{}).hovered,y=d.data.data,x=y.i,w=y.color,k=c.isHierarchyRoot(d),b=1;if(v)g=h._hovered.marker.line.color,p=h._hovered.marker.line.width;else if(k&&w===h.root.color)b=100,g="rgba(0,0,0,0)",p=0;else if(g=u.castOption(h,x,"marker.line.color")||a.defaultLine,p=u.castOption(h,x,"marker.line.width")||0,!h._hasColorscale&&!d.onPathbar){var T=h.marker.depthfade;if(T){var _,M=a.combine(a.addOpacity(h._backgroundColor,.75),w);if(T===!0){var A=c.getMaxDepth(h);_=isFinite(A)?c.isLeaf(d)?0:h._maxVisibleLayers-(d.data.depth-h._entryDepth):d.data.height+1}else _=d.data.depth-h._entryDepth,h._atRootLevel||_++;if(_>0)for(var S=0;S<_;S++){var E=.5*S/_;w=a.combine(a.addOpacity(M,E),w)}}}l.style("stroke-width",p).call(a.fill,w).call(a.stroke,g).style("opacity",b)}o.exports={style:function(l){var d=l._fullLayout._treemaplayer.selectAll(".trace");i(l,d,"treemap"),d.each(function(h){var m=r.select(this),g=h[0].trace;m.style("opacity",g.opacity),m.selectAll("path.surface").each(function(p){r.select(this).call(s,p,g,{hovered:!1})})})},styleOne:s}},{"../../components/color":366,"../../lib":503,"../bar/uniform_text":664,"../sunburst/helpers":1055,"@plotly/d3":58}],1091:[function(e,o,f){var r=e("../box/attributes"),a=e("../../lib/extend").extendFlat,u=e("../../plots/cartesian/axis_format_attributes").axisHoverFormat;o.exports={y:r.y,x:r.x,x0:r.x0,y0:r.y0,xhoverformat:u("x"),yhoverformat:u("y"),name:a({},r.name,{}),orientation:a({},r.orientation,{}),bandwidth:{valType:"number",min:0,editType:"calc"},scalegroup:{valType:"string",dflt:"",editType:"calc"},scalemode:{valType:"enumerated",values:["width","count"],dflt:"width",editType:"calc"},spanmode:{valType:"enumerated",values:["soft","hard","manual"],dflt:"soft",editType:"calc"},span:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,dflt:2,editType:"style"},editType:"plot"},fillcolor:r.fillcolor,points:a({},r.boxpoints,{}),jitter:a({},r.jitter,{}),pointpos:a({},r.pointpos,{}),width:a({},r.width,{}),marker:r.marker,text:r.text,hovertext:r.hovertext,hovertemplate:r.hovertemplate,box:{visible:{valType:"boolean",dflt:!1,editType:"plot"},width:{valType:"number",min:0,max:1,dflt:.25,editType:"plot"},fillcolor:{valType:"color",editType:"style"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"plot"},meanline:{visible:{valType:"boolean",dflt:!1,editType:"plot"},color:{valType:"color",editType:"style"},width:{valType:"number",min:0,editType:"style"},editType:"plot"},side:{valType:"enumerated",values:["both","positive","negative"],dflt:"both",editType:"calc"},offsetgroup:r.offsetgroup,alignmentgroup:r.alignmentgroup,selected:r.selected,unselected:r.unselected,hoveron:{valType:"flaglist",flags:["violins","points","kde"],dflt:"violins+points+kde",extras:["all"],editType:"style"}}},{"../../lib/extend":493,"../../plots/cartesian/axis_format_attributes":557,"../box/attributes":673}],1092:[function(e,o,f){var r=e("../../lib"),a=e("../../plots/cartesian/axes"),u=e("../box/calc"),c=e("./helpers"),i=e("../../constants/numerical").BADNUM;function s(d,h,m){var g=h.max-h.min;if(!g)return d.bandwidth?d.bandwidth:0;if(d.bandwidth)return Math.max(d.bandwidth,g/1e4);var p=m.length,v=r.stdev(m,p-1,h.mean);return Math.max(function(y,x,w){return 1.059*Math.min(x,w/1.349)*Math.pow(y,-.2)}(p,v,h.q3-h.q1),g/100)}function l(d,h,m,g){var p,v=d.spanmode,y=d.span||[],x=[h.min,h.max],w=[h.min-2*g,h.max+2*g];function k(T){var _=y[T],M=m.type==="multicategory"?m.r2c(_):m.d2c(_,0,d[h.valLetter+"calendar"]);return M===i?w[T]:M}var b={type:"linear",range:p=v==="soft"?w:v==="hard"?x:[k(0),k(1)]};return a.setConvert(b),b.cleanRange(),p}o.exports=function(d,h){var m=u(d,h);if(m[0].t.empty)return m;for(var g=d._fullLayout,p=a.getFromId(d,h[h.orientation==="h"?"xaxis":"yaxis"]),v=1/0,y=-1/0,x=0,w=0,k=0;k0){var _,M,A,S,E,D=i.xa,O=i.ya;y.orientation==="h"?(E=s,_="y",A=O,M="x",S=D):(E=l,_="x",A=D,M="y",S=O);var R=v[i.index];if(E>=R.span[0]&&E<=R.span[1]){var z=r.extendFlat({},i),L=S.c2p(E,!0),P=c.getKdeValue(R,y,E),N=c.getPositionOnKdePath(R,y,L),B=A._offset,G=A._length;z[_+"0"]=N[0],z[_+"1"]=N[1],z[M+"0"]=z[M+"1"]=L,z[M+"Label"]=M+": "+a.hoverLabelText(S,E,y[M+"hoverformat"])+", "+v[0].t.labels.kde+" "+P.toFixed(3),z.spikeDistance=T[0].spikeDistance;var W=_+"Spike";z[W]=T[0][W],T[0].spikeDistance=void 0,T[0][W]=void 0,z.hovertemplate=!1,b.push(z),(g={stroke:i.color})[_+"1"]=r.constrain(B+N[0],B,B+G),g[_+"2"]=r.constrain(B+N[1],B,B+G),g[M+"1"]=g[M+"2"]=S._offset+L}}w&&(b=b.concat(T))}x.indexOf("points")!==-1&&(m=u.hoverOnPoints(i,s,l));var K=p.selectAll(".violinline-"+y.uid).data(g?[0]:[]);return K.enter().append("line").classed("violinline-"+y.uid,!0).attr("stroke-width",1.5),K.exit().remove(),K.attr(g),d==="closest"?m?[m]:b:(m&&b.push(m),b)}},{"../../lib":503,"../../plots/cartesian/axes":554,"../box/hover":678,"./helpers":1095}],1097:[function(e,o,f){o.exports={attributes:e("./attributes"),layoutAttributes:e("./layout_attributes"),supplyDefaults:e("./defaults"),crossTraceDefaults:e("../box/defaults").crossTraceDefaults,supplyLayoutDefaults:e("./layout_defaults"),calc:e("./calc"),crossTraceCalc:e("./cross_trace_calc"),plot:e("./plot"),style:e("./style"),styleOnSelect:e("../scatter/style").styleOnSelect,hoverPoints:e("./hover"),selectPoints:e("../box/select"),moduleType:"trace",name:"violin",basePlotModule:e("../../plots/cartesian"),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","violinLayout","zoomScale"],meta:{}}},{"../../plots/cartesian":568,"../box/defaults":676,"../box/select":683,"../scatter/style":951,"./attributes":1091,"./calc":1092,"./cross_trace_calc":1093,"./defaults":1094,"./hover":1096,"./layout_attributes":1098,"./layout_defaults":1099,"./plot":1100,"./style":1101}],1098:[function(e,o,f){var r=e("../box/layout_attributes"),a=e("../../lib").extendFlat;o.exports={violinmode:a({},r.boxmode,{}),violingap:a({},r.boxgap,{}),violingroupgap:a({},r.boxgroupgap,{})}},{"../../lib":503,"../box/layout_attributes":680}],1099:[function(e,o,f){var r=e("../../lib"),a=e("./layout_attributes"),u=e("../box/layout_defaults");o.exports=function(c,i,s){u._supply(c,i,s,function(l,d){return r.coerce(c,i,a,l,d)},"violin")}},{"../../lib":503,"../box/layout_defaults":681,"./layout_attributes":1098}],1100:[function(e,o,f){var r=e("@plotly/d3"),a=e("../../lib"),u=e("../../components/drawing"),c=e("../box/plot"),i=e("../scatter/line_points"),s=e("./helpers");o.exports=function(l,d,h,m){var g=l._fullLayout,p=d.xaxis,v=d.yaxis;function y(x){var w=i(x,{xaxis:p,yaxis:v,connectGaps:!0,baseTolerance:.75,shape:"spline",simplify:!0,linearized:!0});return u.smoothopen(w[0],1)}a.makeTraceGroups(m,h,"trace violins").each(function(x){var w=r.select(this),k=x[0],b=k.t,T=k.trace;if(T.visible!==!0||b.empty)w.remove();else{var _=b.bPos,M=b.bdPos,A=d[b.valLetter+"axis"],S=d[b.posLetter+"axis"],E=T.side==="both",D=E||T.side==="positive",O=E||T.side==="negative",R=w.selectAll("path.violin").data(a.identity);R.enter().append("path").style("vector-effect","non-scaling-stroke").attr("class","violin"),R.exit().remove(),R.each(function(K){var te,Y,Z,re,U,q,$,ne,H=r.select(this),Q=K.density,ee=Q.length,ie=S.c2l(K.pos+_,!0),ae=S.l2p(ie);if(T.width)te=b.maxKDE/M;else{var ue=g._violinScaleGroupStats[T.scalegroup];te=T.scalemode==="count"?ue.maxKDE/M*(ue.maxCount/K.pts.length):ue.maxKDE/M}if(D){for($=new Array(ee),U=0;U")),p.color=function(R,z){var L=R[z.dir].marker,P=L.color,N=L.line.color,B=L.line.width;if(a(P))return P;if(a(N)&&B)return N}(y,b),[p]}function O(R){return r(k,R,y[w+"hoverformat"])}}},{"../../components/color":366,"../../constants/delta.js":473,"../../plots/cartesian/axes":554,"../bar/hover":655}],1113:[function(e,o,f){o.exports={attributes:e("./attributes"),layoutAttributes:e("./layout_attributes"),supplyDefaults:e("./defaults").supplyDefaults,crossTraceDefaults:e("./defaults").crossTraceDefaults,supplyLayoutDefaults:e("./layout_defaults"),calc:e("./calc"),crossTraceCalc:e("./cross_trace_calc"),plot:e("./plot"),style:e("./style").style,hoverPoints:e("./hover"),eventData:e("./event_data"),selectPoints:e("../bar/select"),moduleType:"trace",name:"waterfall",basePlotModule:e("../../plots/cartesian"),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},{"../../plots/cartesian":568,"../bar/select":660,"./attributes":1106,"./calc":1107,"./cross_trace_calc":1109,"./defaults":1110,"./event_data":1111,"./hover":1112,"./layout_attributes":1114,"./layout_defaults":1115,"./plot":1116,"./style":1117}],1114:[function(e,o,f){o.exports={waterfallmode:{valType:"enumerated",values:["group","overlay"],dflt:"group",editType:"calc"},waterfallgap:{valType:"number",min:0,max:1,editType:"calc"},waterfallgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}},{}],1115:[function(e,o,f){var r=e("../../lib"),a=e("./layout_attributes");o.exports=function(u,c,i){var s=!1;function l(m,g){return r.coerce(u,c,a,m,g)}for(var d=0;d0&&(N+=A?"M"+L[0]+","+P[1]+"V"+P[0]:"M"+L[1]+","+P[0]+"H"+L[0]),S!=="between"&&(O.isSum||R path").each(function(x){if(!x.isBlank){var w=y[x.dir].marker;r.select(this).call(u.fill,w.color).call(u.stroke,w.line.color).call(a.dashLine,w.line.dash,w.line.width).style("opacity",y.selectedpoints&&!x.selected?c:1)}}),l(v,y,d),v.selectAll(".lines").each(function(){var x=y.connector.line;a.lineGroupStyle(r.select(this).selectAll("path"),x.width,x.color,x.dash)})})}}},{"../../components/color":366,"../../components/drawing":388,"../../constants/interactions":478,"../bar/style":662,"../bar/uniform_text":664,"@plotly/d3":58}],1118:[function(e,o,f){var r=e("../plots/cartesian/axes"),a=e("../lib"),u=e("../plot_api/plot_schema"),c=e("./helpers").pointsAccessorFunction,i=e("../constants/numerical").BADNUM;f.moduleType="transform",f.name="aggregate";var s=f.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},groups:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x",editType:"calc"},aggregations:{_isLinkedToArray:"aggregation",target:{valType:"string",editType:"calc"},func:{valType:"enumerated",values:["count","sum","avg","median","mode","rms","stddev","min","max","first","last","change","range"],dflt:"first",editType:"calc"},funcmode:{valType:"enumerated",values:["sample","population"],dflt:"sample",editType:"calc"},enabled:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"},editType:"calc"},l=s.aggregations;function d(p,v,y,x){if(x.enabled){for(var w=x.target,k=a.nestedProperty(v,w),b=k.get(),T=function(A,S){var E=A.func,D=S.d2c,O=S.c2d;switch(E){case"count":return h;case"first":return m;case"last":return g;case"sum":return function(R,z){for(var L=0,P=0;PP&&(P=W,N=G)}}return P?O(N):i};case"rms":return function(R,z){for(var L=0,P=0,N=0;N":return function(Z){return Y(Z)>K};case">=":return function(Z){return Y(Z)>=K};case"[]":return function(Z){var re=Y(Z);return re>=K[0]&&re<=K[1]};case"()":return function(Z){var re=Y(Z);return re>K[0]&&re=K[0]&&reK[0]&&re<=K[1]};case"][":return function(Z){var re=Y(Z);return re<=K[0]||re>=K[1]};case")(":return function(Z){var re=Y(Z);return reK[1]};case"](":return function(Z){var re=Y(Z);return re<=K[0]||re>K[1]};case")[":return function(Z){var re=Y(Z);return re=K[1]};case"{}":return function(Z){return K.indexOf(Y(Z))!==-1};case"}{":return function(Z){return K.indexOf(Y(Z))===-1}}}(g,u.getDataToCoordFunc(h,m,v,p),x),A={},S={},E=0;k?(T=function(z){A[z.astr]=r.extendDeep([],z.get()),z.set(new Array(y))},_=function(z,L){var P=A[z.astr][L];z.get()[L]=P}):(T=function(z){A[z.astr]=r.extendDeep([],z.get()),z.set([])},_=function(z,L){var P=A[z.astr][L];z.get().push(P)}),R(T);for(var D=c(m.transforms,g),O=0;O1?"%{group} (%{trace})":"%{group}");var p=s.styles,v=m.styles=[];if(p)for(h=0;h0?k-4:k;for(x=0;x>16&255,T[_++]=y>>8&255,T[_++]=255&y;return b===2&&(y=s[v.charCodeAt(x)]<<2|s[v.charCodeAt(x+1)]>>4,T[_++]=255&y),b===1&&(y=s[v.charCodeAt(x)]<<10|s[v.charCodeAt(x+1)]<<4|s[v.charCodeAt(x+2)]>>2,T[_++]=y>>8&255,T[_++]=255&y),T},c.fromByteArray=function(v){for(var y,x=v.length,w=x%3,k=[],b=0,T=x-w;bT?T:b+16383));return w===1?(y=v[x-1],k.push(i[y>>2]+i[y<<4&63]+"==")):w===2&&(y=(v[x-2]<<8)+v[x-1],k.push(i[y>>10]+i[y>>4&63]+i[y<<2&63]+"=")),k.join("")};for(var i=[],s=[],l=typeof Uint8Array<"u"?Uint8Array:Array,d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=0,m=d.length;h0)throw new Error("Invalid string. Length must be a multiple of 4");var x=v.indexOf("=");return x===-1&&(x=y),[x,x===y?0:4-x%4]}function p(v,y,x){for(var w,k,b=[],T=y;T>18&63]+i[k>>12&63]+i[k>>6&63]+i[63&k]);return b.join("")}s["-".charCodeAt(0)]=62,s["_".charCodeAt(0)]=63},{}],2:[function(a,u,c){},{}],3:[function(a,u,c){(function(i){(function(){var s=a("base64-js"),l=a("ieee754");c.Buffer=h,c.SlowBuffer=function(H){return+H!=H&&(H=0),h.alloc(+H)},c.INSPECT_MAX_BYTES=50;function d(H){if(H>2147483647)throw new RangeError('The value "'+H+'" is invalid for option "size"');var Q=new Uint8Array(H);return Q.__proto__=h.prototype,Q}function h(H,Q,ee){if(typeof H=="number"){if(typeof Q=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return p(H)}return m(H,Q,ee)}function m(H,Q,ee){if(typeof H=="string")return function(ue,le){if(typeof le=="string"&&le!==""||(le="utf8"),!h.isEncoding(le))throw new TypeError("Unknown encoding: "+le);var ge=0|x(ue,le),fe=d(ge),me=fe.write(ue,le);return me!==ge&&(fe=fe.slice(0,me)),fe}(H,Q);if(ArrayBuffer.isView(H))return v(H);if(H==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof H);if($(H,ArrayBuffer)||H&&$(H.buffer,ArrayBuffer))return function(ue,le,ge){if(le<0||ue.byteLength=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+2147483647 .toString(16)+" bytes");return 0|H}function x(H,Q){if(h.isBuffer(H))return H.length;if(ArrayBuffer.isView(H)||$(H,ArrayBuffer))return H.byteLength;if(typeof H!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof H);var ee=H.length,ie=arguments.length>2&&arguments[2]===!0;if(!ie&&ee===0)return 0;for(var ae=!1;;)switch(Q){case"ascii":case"latin1":case"binary":return ee;case"utf8":case"utf-8":return re(H).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*ee;case"hex":return ee>>>1;case"base64":return U(H).length;default:if(ae)return ie?-1:re(H).length;Q=(""+Q).toLowerCase(),ae=!0}}function w(H,Q,ee){var ie=!1;if((Q===void 0||Q<0)&&(Q=0),Q>this.length||((ee===void 0||ee>this.length)&&(ee=this.length),ee<=0)||(ee>>>=0)<=(Q>>>=0))return"";for(H||(H="utf8");;)switch(H){case"hex":return P(this,Q,ee);case"utf8":case"utf-8":return R(this,Q,ee);case"ascii":return z(this,Q,ee);case"latin1":case"binary":return L(this,Q,ee);case"base64":return O(this,Q,ee);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,Q,ee);default:if(ie)throw new TypeError("Unknown encoding: "+H);H=(H+"").toLowerCase(),ie=!0}}function k(H,Q,ee){var ie=H[Q];H[Q]=H[ee],H[ee]=ie}function b(H,Q,ee,ie,ae){if(H.length===0)return-1;if(typeof ee=="string"?(ie=ee,ee=0):ee>2147483647?ee=2147483647:ee<-2147483648&&(ee=-2147483648),ne(ee=+ee)&&(ee=ae?0:H.length-1),ee<0&&(ee=H.length+ee),ee>=H.length){if(ae)return-1;ee=H.length-1}else if(ee<0){if(!ae)return-1;ee=0}if(typeof Q=="string"&&(Q=h.from(Q,ie)),h.isBuffer(Q))return Q.length===0?-1:T(H,Q,ee,ie,ae);if(typeof Q=="number")return Q&=255,typeof Uint8Array.prototype.indexOf=="function"?ae?Uint8Array.prototype.indexOf.call(H,Q,ee):Uint8Array.prototype.lastIndexOf.call(H,Q,ee):T(H,[Q],ee,ie,ae);throw new TypeError("val must be string, number or Buffer")}function T(H,Q,ee,ie,ae){var ue,le=1,ge=H.length,fe=Q.length;if(ie!==void 0&&((ie=String(ie).toLowerCase())==="ucs2"||ie==="ucs-2"||ie==="utf16le"||ie==="utf-16le")){if(H.length<2||Q.length<2)return-1;le=2,ge/=2,fe/=2,ee/=2}function me(Oe,de){return le===1?Oe[de]:Oe.readUInt16BE(de*le)}if(ae){var _e=-1;for(ue=ee;uege&&(ee=ge-fe),ue=ee;ue>=0;ue--){for(var we=!0,Te=0;Teae&&(ie=ae):ie=ae;var ue=Q.length;ie>ue/2&&(ie=ue/2);for(var le=0;le>8,fe=le%256,me.push(fe),me.push(ge);return me}(Q,H.length-ee),H,ee,ie)}function O(H,Q,ee){return Q===0&&ee===H.length?s.fromByteArray(H):s.fromByteArray(H.slice(Q,ee))}function R(H,Q,ee){ee=Math.min(H.length,ee);for(var ie=[],ae=Q;ae239?4:me>223?3:me>191?2:1;if(ae+we<=ee)switch(we){case 1:me<128&&(_e=me);break;case 2:(192&(ue=H[ae+1]))==128&&(fe=(31&me)<<6|63&ue)>127&&(_e=fe);break;case 3:ue=H[ae+1],le=H[ae+2],(192&ue)==128&&(192&le)==128&&(fe=(15&me)<<12|(63&ue)<<6|63&le)>2047&&(fe<55296||fe>57343)&&(_e=fe);break;case 4:ue=H[ae+1],le=H[ae+2],ge=H[ae+3],(192&ue)==128&&(192&le)==128&&(192&ge)==128&&(fe=(15&me)<<18|(63&ue)<<12|(63&le)<<6|63&ge)>65535&&fe<1114112&&(_e=fe)}_e===null?(_e=65533,we=1):_e>65535&&(_e-=65536,ie.push(_e>>>10&1023|55296),_e=56320|1023&_e),ie.push(_e),ae+=we}return function(Te){var Oe=Te.length;if(Oe<=4096)return String.fromCharCode.apply(String,Te);for(var de="",ye=0;ye"u"||typeof console.error!="function"||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(h.prototype,"parent",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.buffer}}),Object.defineProperty(h.prototype,"offset",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.byteOffset}}),typeof Symbol<"u"&&Symbol.species!=null&&h[Symbol.species]===h&&Object.defineProperty(h,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),h.poolSize=8192,h.from=function(H,Q,ee){return m(H,Q,ee)},h.prototype.__proto__=Uint8Array.prototype,h.__proto__=Uint8Array,h.alloc=function(H,Q,ee){return function(ie,ae,ue){return g(ie),ie<=0?d(ie):ae!==void 0?typeof ue=="string"?d(ie).fill(ae,ue):d(ie).fill(ae):d(ie)}(H,Q,ee)},h.allocUnsafe=function(H){return p(H)},h.allocUnsafeSlow=function(H){return p(H)},h.isBuffer=function(H){return H!=null&&H._isBuffer===!0&&H!==h.prototype},h.compare=function(H,Q){if($(H,Uint8Array)&&(H=h.from(H,H.offset,H.byteLength)),$(Q,Uint8Array)&&(Q=h.from(Q,Q.offset,Q.byteLength)),!h.isBuffer(H)||!h.isBuffer(Q))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(H===Q)return 0;for(var ee=H.length,ie=Q.length,ae=0,ue=Math.min(ee,ie);aeQ&&(H+=" ... "),""},h.prototype.compare=function(H,Q,ee,ie,ae){if($(H,Uint8Array)&&(H=h.from(H,H.offset,H.byteLength)),!h.isBuffer(H))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof H);if(Q===void 0&&(Q=0),ee===void 0&&(ee=H?H.length:0),ie===void 0&&(ie=0),ae===void 0&&(ae=this.length),Q<0||ee>H.length||ie<0||ae>this.length)throw new RangeError("out of range index");if(ie>=ae&&Q>=ee)return 0;if(ie>=ae)return-1;if(Q>=ee)return 1;if(this===H)return 0;for(var ue=(ae>>>=0)-(ie>>>=0),le=(ee>>>=0)-(Q>>>=0),ge=Math.min(ue,le),fe=this.slice(ie,ae),me=H.slice(Q,ee),_e=0;_e>>=0,isFinite(ee)?(ee>>>=0,ie===void 0&&(ie="utf8")):(ie=ee,ee=void 0)}var ae=this.length-Q;if((ee===void 0||ee>ae)&&(ee=ae),H.length>0&&(ee<0||Q<0)||Q>this.length)throw new RangeError("Attempt to write outside buffer bounds");ie||(ie="utf8");for(var ue=!1;;)switch(ie){case"hex":return _(this,H,Q,ee);case"utf8":case"utf-8":return M(this,H,Q,ee);case"ascii":return A(this,H,Q,ee);case"latin1":case"binary":return S(this,H,Q,ee);case"base64":return E(this,H,Q,ee);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,H,Q,ee);default:if(ue)throw new TypeError("Unknown encoding: "+ie);ie=(""+ie).toLowerCase(),ue=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function z(H,Q,ee){var ie="";ee=Math.min(H.length,ee);for(var ae=Q;aeie)&&(ee=ie);for(var ae="",ue=Q;ueee)throw new RangeError("Trying to access beyond buffer length")}function G(H,Q,ee,ie,ae,ue){if(!h.isBuffer(H))throw new TypeError('"buffer" argument must be a Buffer instance');if(Q>ae||QH.length)throw new RangeError("Index out of range")}function W(H,Q,ee,ie,ae,ue){if(ee+ie>H.length)throw new RangeError("Index out of range");if(ee<0)throw new RangeError("Index out of range")}function K(H,Q,ee,ie,ae){return Q=+Q,ee>>>=0,ae||W(H,0,ee,4),l.write(H,Q,ee,ie,23,4),ee+4}function te(H,Q,ee,ie,ae){return Q=+Q,ee>>>=0,ae||W(H,0,ee,8),l.write(H,Q,ee,ie,52,8),ee+8}h.prototype.slice=function(H,Q){var ee=this.length;(H=~~H)<0?(H+=ee)<0&&(H=0):H>ee&&(H=ee),(Q=Q===void 0?ee:~~Q)<0?(Q+=ee)<0&&(Q=0):Q>ee&&(Q=ee),Q>>=0,Q>>>=0,ee||B(H,Q,this.length);for(var ie=this[H],ae=1,ue=0;++ue>>=0,Q>>>=0,ee||B(H,Q,this.length);for(var ie=this[H+--Q],ae=1;Q>0&&(ae*=256);)ie+=this[H+--Q]*ae;return ie},h.prototype.readUInt8=function(H,Q){return H>>>=0,Q||B(H,1,this.length),this[H]},h.prototype.readUInt16LE=function(H,Q){return H>>>=0,Q||B(H,2,this.length),this[H]|this[H+1]<<8},h.prototype.readUInt16BE=function(H,Q){return H>>>=0,Q||B(H,2,this.length),this[H]<<8|this[H+1]},h.prototype.readUInt32LE=function(H,Q){return H>>>=0,Q||B(H,4,this.length),(this[H]|this[H+1]<<8|this[H+2]<<16)+16777216*this[H+3]},h.prototype.readUInt32BE=function(H,Q){return H>>>=0,Q||B(H,4,this.length),16777216*this[H]+(this[H+1]<<16|this[H+2]<<8|this[H+3])},h.prototype.readIntLE=function(H,Q,ee){H>>>=0,Q>>>=0,ee||B(H,Q,this.length);for(var ie=this[H],ae=1,ue=0;++ue=(ae*=128)&&(ie-=Math.pow(2,8*Q)),ie},h.prototype.readIntBE=function(H,Q,ee){H>>>=0,Q>>>=0,ee||B(H,Q,this.length);for(var ie=Q,ae=1,ue=this[H+--ie];ie>0&&(ae*=256);)ue+=this[H+--ie]*ae;return ue>=(ae*=128)&&(ue-=Math.pow(2,8*Q)),ue},h.prototype.readInt8=function(H,Q){return H>>>=0,Q||B(H,1,this.length),128&this[H]?-1*(255-this[H]+1):this[H]},h.prototype.readInt16LE=function(H,Q){H>>>=0,Q||B(H,2,this.length);var ee=this[H]|this[H+1]<<8;return 32768&ee?4294901760|ee:ee},h.prototype.readInt16BE=function(H,Q){H>>>=0,Q||B(H,2,this.length);var ee=this[H+1]|this[H]<<8;return 32768&ee?4294901760|ee:ee},h.prototype.readInt32LE=function(H,Q){return H>>>=0,Q||B(H,4,this.length),this[H]|this[H+1]<<8|this[H+2]<<16|this[H+3]<<24},h.prototype.readInt32BE=function(H,Q){return H>>>=0,Q||B(H,4,this.length),this[H]<<24|this[H+1]<<16|this[H+2]<<8|this[H+3]},h.prototype.readFloatLE=function(H,Q){return H>>>=0,Q||B(H,4,this.length),l.read(this,H,!0,23,4)},h.prototype.readFloatBE=function(H,Q){return H>>>=0,Q||B(H,4,this.length),l.read(this,H,!1,23,4)},h.prototype.readDoubleLE=function(H,Q){return H>>>=0,Q||B(H,8,this.length),l.read(this,H,!0,52,8)},h.prototype.readDoubleBE=function(H,Q){return H>>>=0,Q||B(H,8,this.length),l.read(this,H,!1,52,8)},h.prototype.writeUIntLE=function(H,Q,ee,ie){H=+H,Q>>>=0,ee>>>=0,ie||G(this,H,Q,ee,Math.pow(2,8*ee)-1,0);var ae=1,ue=0;for(this[Q]=255&H;++ue>>=0,ee>>>=0,ie||G(this,H,Q,ee,Math.pow(2,8*ee)-1,0);var ae=ee-1,ue=1;for(this[Q+ae]=255&H;--ae>=0&&(ue*=256);)this[Q+ae]=H/ue&255;return Q+ee},h.prototype.writeUInt8=function(H,Q,ee){return H=+H,Q>>>=0,ee||G(this,H,Q,1,255,0),this[Q]=255&H,Q+1},h.prototype.writeUInt16LE=function(H,Q,ee){return H=+H,Q>>>=0,ee||G(this,H,Q,2,65535,0),this[Q]=255&H,this[Q+1]=H>>>8,Q+2},h.prototype.writeUInt16BE=function(H,Q,ee){return H=+H,Q>>>=0,ee||G(this,H,Q,2,65535,0),this[Q]=H>>>8,this[Q+1]=255&H,Q+2},h.prototype.writeUInt32LE=function(H,Q,ee){return H=+H,Q>>>=0,ee||G(this,H,Q,4,4294967295,0),this[Q+3]=H>>>24,this[Q+2]=H>>>16,this[Q+1]=H>>>8,this[Q]=255&H,Q+4},h.prototype.writeUInt32BE=function(H,Q,ee){return H=+H,Q>>>=0,ee||G(this,H,Q,4,4294967295,0),this[Q]=H>>>24,this[Q+1]=H>>>16,this[Q+2]=H>>>8,this[Q+3]=255&H,Q+4},h.prototype.writeIntLE=function(H,Q,ee,ie){if(H=+H,Q>>>=0,!ie){var ae=Math.pow(2,8*ee-1);G(this,H,Q,ee,ae-1,-ae)}var ue=0,le=1,ge=0;for(this[Q]=255&H;++ue>0)-ge&255;return Q+ee},h.prototype.writeIntBE=function(H,Q,ee,ie){if(H=+H,Q>>>=0,!ie){var ae=Math.pow(2,8*ee-1);G(this,H,Q,ee,ae-1,-ae)}var ue=ee-1,le=1,ge=0;for(this[Q+ue]=255&H;--ue>=0&&(le*=256);)H<0&&ge===0&&this[Q+ue+1]!==0&&(ge=1),this[Q+ue]=(H/le>>0)-ge&255;return Q+ee},h.prototype.writeInt8=function(H,Q,ee){return H=+H,Q>>>=0,ee||G(this,H,Q,1,127,-128),H<0&&(H=255+H+1),this[Q]=255&H,Q+1},h.prototype.writeInt16LE=function(H,Q,ee){return H=+H,Q>>>=0,ee||G(this,H,Q,2,32767,-32768),this[Q]=255&H,this[Q+1]=H>>>8,Q+2},h.prototype.writeInt16BE=function(H,Q,ee){return H=+H,Q>>>=0,ee||G(this,H,Q,2,32767,-32768),this[Q]=H>>>8,this[Q+1]=255&H,Q+2},h.prototype.writeInt32LE=function(H,Q,ee){return H=+H,Q>>>=0,ee||G(this,H,Q,4,2147483647,-2147483648),this[Q]=255&H,this[Q+1]=H>>>8,this[Q+2]=H>>>16,this[Q+3]=H>>>24,Q+4},h.prototype.writeInt32BE=function(H,Q,ee){return H=+H,Q>>>=0,ee||G(this,H,Q,4,2147483647,-2147483648),H<0&&(H=4294967295+H+1),this[Q]=H>>>24,this[Q+1]=H>>>16,this[Q+2]=H>>>8,this[Q+3]=255&H,Q+4},h.prototype.writeFloatLE=function(H,Q,ee){return K(this,H,Q,!0,ee)},h.prototype.writeFloatBE=function(H,Q,ee){return K(this,H,Q,!1,ee)},h.prototype.writeDoubleLE=function(H,Q,ee){return te(this,H,Q,!0,ee)},h.prototype.writeDoubleBE=function(H,Q,ee){return te(this,H,Q,!1,ee)},h.prototype.copy=function(H,Q,ee,ie){if(!h.isBuffer(H))throw new TypeError("argument should be a Buffer");if(ee||(ee=0),ie||ie===0||(ie=this.length),Q>=H.length&&(Q=H.length),Q||(Q=0),ie>0&&ie=this.length)throw new RangeError("Index out of range");if(ie<0)throw new RangeError("sourceEnd out of bounds");ie>this.length&&(ie=this.length),H.length-Q=0;--ue)H[ue+Q]=this[ue+ee];else Uint8Array.prototype.set.call(H,this.subarray(ee,ie),Q);return ae},h.prototype.fill=function(H,Q,ee,ie){if(typeof H=="string"){if(typeof Q=="string"?(ie=Q,Q=0,ee=this.length):typeof ee=="string"&&(ie=ee,ee=this.length),ie!==void 0&&typeof ie!="string")throw new TypeError("encoding must be a string");if(typeof ie=="string"&&!h.isEncoding(ie))throw new TypeError("Unknown encoding: "+ie);if(H.length===1){var ae=H.charCodeAt(0);(ie==="utf8"&&ae<128||ie==="latin1")&&(H=ae)}}else typeof H=="number"&&(H&=255);if(Q<0||this.length>>=0,ee=ee===void 0?this.length:ee>>>0,H||(H=0),typeof H=="number")for(ue=Q;ue55295&&ee<57344){if(!ae){if(ee>56319){(Q-=3)>-1&&ue.push(239,191,189);continue}if(le+1===ie){(Q-=3)>-1&&ue.push(239,191,189);continue}ae=ee;continue}if(ee<56320){(Q-=3)>-1&&ue.push(239,191,189),ae=ee;continue}ee=65536+(ae-55296<<10|ee-56320)}else ae&&(Q-=3)>-1&&ue.push(239,191,189);if(ae=null,ee<128){if((Q-=1)<0)break;ue.push(ee)}else if(ee<2048){if((Q-=2)<0)break;ue.push(ee>>6|192,63&ee|128)}else if(ee<65536){if((Q-=3)<0)break;ue.push(ee>>12|224,ee>>6&63|128,63&ee|128)}else{if(!(ee<1114112))throw new Error("Invalid code point");if((Q-=4)<0)break;ue.push(ee>>18|240,ee>>12&63|128,ee>>6&63|128,63&ee|128)}}return ue}function U(H){return s.toByteArray(function(Q){if((Q=(Q=Q.split("=")[0]).trim().replace(Y,"")).length<2)return"";for(;Q.length%4!=0;)Q+="=";return Q}(H))}function q(H,Q,ee,ie){for(var ae=0;ae=Q.length||ae>=H.length);++ae)Q[ae+ee]=H[ae];return ae}function $(H,Q){return H instanceof Q||H!=null&&H.constructor!=null&&H.constructor.name!=null&&H.constructor.name===Q.name}function ne(H){return H!=H}}).call(this)}).call(this,a("buffer").Buffer)},{"base64-js":1,buffer:3,ieee754:4}],4:[function(a,u,c){c.read=function(i,s,l,d,h){var m,g,p=8*h-d-1,v=(1<>1,x=-7,w=l?h-1:0,k=l?-1:1,b=i[s+w];for(w+=k,m=b&(1<<-x)-1,b>>=-x,x+=p;x>0;m=256*m+i[s+w],w+=k,x-=8);for(g=m&(1<<-x)-1,m>>=-x,x+=d;x>0;g=256*g+i[s+w],w+=k,x-=8);if(m===0)m=1-y;else{if(m===v)return g?NaN:1/0*(b?-1:1);g+=Math.pow(2,d),m-=y}return(b?-1:1)*g*Math.pow(2,m-d)},c.write=function(i,s,l,d,h,m){var g,p,v,y=8*m-h-1,x=(1<>1,k=h===23?Math.pow(2,-24)-Math.pow(2,-77):0,b=d?0:m-1,T=d?1:-1,_=s<0||s===0&&1/s<0?1:0;for(s=Math.abs(s),isNaN(s)||s===1/0?(p=isNaN(s)?1:0,g=x):(g=Math.floor(Math.log(s)/Math.LN2),s*(v=Math.pow(2,-g))<1&&(g--,v*=2),(s+=g+w>=1?k/v:k*Math.pow(2,1-w))*v>=2&&(g++,v/=2),g+w>=x?(p=0,g=x):g+w>=1?(p=(s*v-1)*Math.pow(2,h),g+=w):(p=s*Math.pow(2,w-1)*Math.pow(2,h),g=0));h>=8;i[l+b]=255&p,b+=T,p/=256,h-=8);for(g=g<0;i[l+b]=255&g,b+=T,g/=256,y-=8);i[l+b-T]|=128*_}},{}],5:[function(a,u,c){var i,s,l=u.exports={};function d(){throw new Error("setTimeout has not been defined")}function h(){throw new Error("clearTimeout has not been defined")}function m(T){if(i===setTimeout)return setTimeout(T,0);if((i===d||!i)&&setTimeout)return i=setTimeout,setTimeout(T,0);try{return i(T,0)}catch{try{return i.call(null,T,0)}catch{return i.call(this,T,0)}}}(function(){try{i=typeof setTimeout=="function"?setTimeout:d}catch{i=d}try{s=typeof clearTimeout=="function"?clearTimeout:h}catch{s=h}})();var g,p=[],v=!1,y=-1;function x(){v&&g&&(v=!1,g.length?p=g.concat(p):y=-1,p.length&&w())}function w(){if(!v){var T=m(x);v=!0;for(var _=p.length;_;){for(g=p,p=[];++y<_;)g&&g[y].run();y=-1,_=p.length}g=null,v=!1,function(M){if(s===clearTimeout)return clearTimeout(M);if((s===h||!s)&&clearTimeout)return s=clearTimeout,clearTimeout(M);try{s(M)}catch{try{return s.call(null,M)}catch{return s.call(this,M)}}}(T)}}function k(T,_){this.fun=T,this.array=_}function b(){}l.nextTick=function(T){var _=new Array(arguments.length-1);if(arguments.length>1)for(var M=1;M"u"?a("weak-map"):WeakMap,s=a("gl-buffer"),l=a("gl-vao"),d=new i;u.exports=function(h){var m=d.get(h),g=m&&(m._triangleBuffer.handle||m._triangleBuffer.buffer);if(!g||!h.isBuffer(g)){var p=s(h,new Float32Array([-1,-1,-1,4,4,-1]));(m=l(h,[{buffer:p,type:h.FLOAT,size:2}]))._triangleBuffer=p,d.set(h,m)}m.bind(),h.drawArrays(h.TRIANGLES,0,3),m.unbind()}},{"gl-buffer":78,"gl-vao":150,"weak-map":313}],9:[function(a,u,c){var i=a("pad-left");u.exports=function(s,l,d){l=typeof l=="number"?l:1,d=d||": ";var h=s.split(/\r?\n/),m=String(h.length+l-1).length;return h.map(function(g,p){var v=p+l,y=String(v).length;return i(v,m-y)+d+g}).join(` +`)}},{"pad-left":264}],10:[function(a,u,c){u.exports=function(l){var d=l.length;if(d===0)return[];if(d===1)return[0];for(var h=l[0].length,m=[l[0]],g=[0],p=1;p0?y=y.ushln(w):w<0&&(x=x.ushln(-w)),h(y,x)}},{"./div":17,"./is-rat":19,"./lib/is-bn":23,"./lib/num-to-bn":24,"./lib/rationalize":25,"./lib/str-to-bn":26}],19:[function(a,u,c){var i=a("./lib/is-bn");u.exports=function(s){return Array.isArray(s)&&s.length===2&&i(s[0])&&i(s[1])}},{"./lib/is-bn":23}],20:[function(a,u,c){var i=a("bn.js");u.exports=function(s){return s.cmp(new i(0))}},{"bn.js":33}],21:[function(a,u,c){var i=a("./bn-sign");u.exports=function(s){var l=s.length,d=s.words,h=0;if(l===1)h=d[0];else if(l===2)h=d[0]+67108864*d[1];else for(var m=0;m20?52:h+32}},{"bit-twiddle":32,"double-bits":64}],23:[function(a,u,c){a("bn.js"),u.exports=function(i){return i&&typeof i=="object"&&Boolean(i.words)}},{"bn.js":33}],24:[function(a,u,c){var i=a("bn.js"),s=a("double-bits");u.exports=function(l){var d=s.exponent(l);return d<52?new i(l):new i(l*Math.pow(2,52-d)).ushln(d-52)}},{"bn.js":33,"double-bits":64}],25:[function(a,u,c){var i=a("./num-to-bn"),s=a("./bn-sign");u.exports=function(l,d){var h=s(l),m=s(d);if(h===0)return[i(0),i(1)];if(m===0)return[i(0),i(0)];m<0&&(l=l.neg(),d=d.neg());var g=l.gcd(d);return g.cmpn(1)?[l.div(g),d.div(g)]:[l,d]}},{"./bn-sign":20,"./num-to-bn":24}],26:[function(a,u,c){var i=a("bn.js");u.exports=function(s){return new i(s)}},{"bn.js":33}],27:[function(a,u,c){var i=a("./lib/rationalize");u.exports=function(s,l){return i(s[0].mul(l[0]),s[1].mul(l[1]))}},{"./lib/rationalize":25}],28:[function(a,u,c){var i=a("./lib/bn-sign");u.exports=function(s){return i(s[0])*i(s[1])}},{"./lib/bn-sign":20}],29:[function(a,u,c){var i=a("./lib/rationalize");u.exports=function(s,l){return i(s[0].mul(l[1]).sub(s[1].mul(l[0])),s[1].mul(l[1]))}},{"./lib/rationalize":25}],30:[function(a,u,c){var i=a("./lib/bn-to-num"),s=a("./lib/ctz");u.exports=function(l){var d=l[0],h=l[1];if(d.cmpn(0)===0)return 0;var m=d.abs().divmod(h.abs()),g=m.div,p=i(g),v=m.mod,y=d.negative!==h.negative?-1:1;if(v.cmpn(0)===0)return y*p;if(p){var x=s(p)+4,w=i(v.ushln(x).divRound(h));return y*(p+w*Math.pow(2,-x))}var k=h.bitLength()-v.bitLength()+53;return w=i(v.ushln(k).divRound(h)),k<1023?y*w*Math.pow(2,-k):(w*=Math.pow(2,-1023),y*w*Math.pow(2,1023-k))}},{"./lib/bn-to-num":21,"./lib/ctz":22}],31:[function(a,u,c){function i(g,p,v,y,x){for(var w=x+1;y<=x;){var k=y+x>>>1,b=g[k];(v!==void 0?v(b,p):b-p)>=0?(w=k,x=k-1):y=k+1}return w}function s(g,p,v,y,x){for(var w=x+1;y<=x;){var k=y+x>>>1,b=g[k];(v!==void 0?v(b,p):b-p)>0?(w=k,x=k-1):y=k+1}return w}function l(g,p,v,y,x){for(var w=y-1;y<=x;){var k=y+x>>>1,b=g[k];(v!==void 0?v(b,p):b-p)<0?(w=k,y=k+1):x=k-1}return w}function d(g,p,v,y,x){for(var w=y-1;y<=x;){var k=y+x>>>1,b=g[k];(v!==void 0?v(b,p):b-p)<=0?(w=k,y=k+1):x=k-1}return w}function h(g,p,v,y,x){for(;y<=x;){var w=y+x>>>1,k=g[w],b=v!==void 0?v(k,p):k-p;if(b===0)return w;b<=0?y=w+1:x=w-1}return-1}function m(g,p,v,y,x,w){return typeof v=="function"?w(g,p,v,y===void 0?0:0|y,x===void 0?g.length-1:0|x):w(g,p,void 0,v===void 0?0:0|v,y===void 0?g.length-1:0|y)}u.exports={ge:function(g,p,v,y,x){return m(g,p,v,y,x,i)},gt:function(g,p,v,y,x){return m(g,p,v,y,x,s)},lt:function(g,p,v,y,x){return m(g,p,v,y,x,l)},le:function(g,p,v,y,x){return m(g,p,v,y,x,d)},eq:function(g,p,v,y,x){return m(g,p,v,y,x,h)}}},{}],32:[function(a,u,c){function i(l){var d=32;return(l&=-l)&&d--,65535&l&&(d-=16),16711935&l&&(d-=8),252645135&l&&(d-=4),858993459&l&&(d-=2),1431655765&l&&(d-=1),d}c.INT_BITS=32,c.INT_MAX=2147483647,c.INT_MIN=-1<<31,c.sign=function(l){return(l>0)-(l<0)},c.abs=function(l){var d=l>>31;return(l^d)-d},c.min=function(l,d){return d^(l^d)&-(l65535)<<4,d|=h=((l>>>=d)>255)<<3,d|=h=((l>>>=h)>15)<<2,(d|=h=((l>>>=h)>3)<<1)|(l>>>=h)>>1},c.log10=function(l){return l>=1e9?9:l>=1e8?8:l>=1e7?7:l>=1e6?6:l>=1e5?5:l>=1e4?4:l>=1e3?3:l>=100?2:l>=10?1:0},c.popCount=function(l){return 16843009*((l=(858993459&(l-=l>>>1&1431655765))+(l>>>2&858993459))+(l>>>4)&252645135)>>>24},c.countTrailingZeros=i,c.nextPow2=function(l){return l+=l===0,--l,l|=l>>>1,l|=l>>>2,l|=l>>>4,l|=l>>>8,(l|=l>>>16)+1},c.prevPow2=function(l){return l|=l>>>1,l|=l>>>2,l|=l>>>4,l|=l>>>8,(l|=l>>>16)-(l>>>1)},c.parity=function(l){return l^=l>>>16,l^=l>>>8,l^=l>>>4,27030>>>(l&=15)&1};var s=new Array(256);(function(l){for(var d=0;d<256;++d){var h=d,m=d,g=7;for(h>>>=1;h;h>>>=1)m<<=1,m|=1&h,--g;l[d]=m<>>8&255]<<16|s[l>>>16&255]<<8|s[l>>>24&255]},c.interleave2=function(l,d){return(l=1431655765&((l=858993459&((l=252645135&((l=16711935&((l&=65535)|l<<8))|l<<4))|l<<2))|l<<1))|(d=1431655765&((d=858993459&((d=252645135&((d=16711935&((d&=65535)|d<<8))|d<<4))|d<<2))|d<<1))<<1},c.deinterleave2=function(l,d){return(l=65535&((l=16711935&((l=252645135&((l=858993459&((l=l>>>d&1431655765)|l>>>1))|l>>>2))|l>>>4))|l>>>16))<<16>>16},c.interleave3=function(l,d,h){return l=1227133513&((l=3272356035&((l=251719695&((l=4278190335&((l&=1023)|l<<16))|l<<8))|l<<4))|l<<2),(l|=(d=1227133513&((d=3272356035&((d=251719695&((d=4278190335&((d&=1023)|d<<16))|d<<8))|d<<4))|d<<2))<<1)|(h=1227133513&((h=3272356035&((h=251719695&((h=4278190335&((h&=1023)|h<<16))|h<<8))|h<<4))|h<<2))<<2},c.deinterleave3=function(l,d){return(l=1023&((l=4278190335&((l=251719695&((l=3272356035&((l=l>>>d&1227133513)|l>>>2))|l>>>4))|l>>>8))|l>>>16))<<22>>22},c.nextCombination=function(l){var d=l|l-1;return d+1|(~d&-~d)-1>>>i(l)+1}},{}],33:[function(a,u,c){(function(i,s){function l(L,P){if(!L)throw new Error(P||"Assertion failed")}function d(L,P){L.super_=P;var N=function(){};N.prototype=P.prototype,L.prototype=new N,L.prototype.constructor=L}function h(L,P,N){if(h.isBN(L))return L;this.negative=0,this.words=null,this.length=0,this.red=null,L!==null&&(P!=="le"&&P!=="be"||(N=P,P=10),this._init(L||0,P||10,N||"be"))}var m;typeof i=="object"?i.exports=h:s.BN=h,h.BN=h,h.wordSize=26;try{m=typeof window<"u"&&window.Buffer!==void 0?window.Buffer:a("buffer").Buffer}catch{}function g(L,P){var N=L.charCodeAt(P);return N>=65&&N<=70?N-55:N>=97&&N<=102?N-87:N-48&15}function p(L,P,N){var B=g(L,N);return N-1>=P&&(B|=g(L,N-1)<<4),B}function v(L,P,N,B){for(var G=0,W=Math.min(L.length,N),K=P;K=49?te-49+10:te>=17?te-17+10:te}return G}h.isBN=function(L){return L instanceof h||L!==null&&typeof L=="object"&&L.constructor.wordSize===h.wordSize&&Array.isArray(L.words)},h.max=function(L,P){return L.cmp(P)>0?L:P},h.min=function(L,P){return L.cmp(P)<0?L:P},h.prototype._init=function(L,P,N){if(typeof L=="number")return this._initNumber(L,P,N);if(typeof L=="object")return this._initArray(L,P,N);P==="hex"&&(P=16),l(P===(0|P)&&P>=2&&P<=36);var B=0;(L=L.toString().replace(/\s+/g,""))[0]==="-"&&(B++,this.negative=1),B=0;B-=3)W=L[B]|L[B-1]<<8|L[B-2]<<16,this.words[G]|=W<>>26-K&67108863,(K+=24)>=26&&(K-=26,G++);else if(N==="le")for(B=0,G=0;B>>26-K&67108863,(K+=24)>=26&&(K-=26,G++);return this.strip()},h.prototype._parseHex=function(L,P,N){this.length=Math.ceil((L.length-P)/6),this.words=new Array(this.length);for(var B=0;B=P;B-=2)G=p(L,P,B)<=18?(W-=18,K+=1,this.words[K]|=G>>>26):W+=8;else for(B=(L.length-P)%2==0?P+1:P;B=18?(W-=18,K+=1,this.words[K]|=G>>>26):W+=8;this.strip()},h.prototype._parseBase=function(L,P,N){this.words=[0],this.length=1;for(var B=0,G=1;G<=67108863;G*=P)B++;B--,G=G/P|0;for(var W=L.length-N,K=W%B,te=Math.min(W,W-K)+N,Y=0,Z=N;Z1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},h.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},h.prototype.inspect=function(){return(this.red?""};var y=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],x=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],w=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function k(L,P,N){N.negative=P.negative^L.negative;var B=L.length+P.length|0;N.length=B,B=B-1|0;var G=0|L.words[0],W=0|P.words[0],K=G*W,te=67108863&K,Y=K/67108864|0;N.words[0]=te;for(var Z=1;Z>>26,U=67108863&Y,q=Math.min(Z,P.length-1),$=Math.max(0,Z-L.length+1);$<=q;$++){var ne=Z-$|0;re+=(K=(G=0|L.words[ne])*(W=0|P.words[$])+U)/67108864|0,U=67108863&K}N.words[Z]=0|U,Y=0|re}return Y!==0?N.words[Z]=0|Y:N.length--,N.strip()}h.prototype.toString=function(L,P){var N;if(P=0|P||1,(L=L||10)===16||L==="hex"){N="";for(var B=0,G=0,W=0;W>>24-B&16777215)!==0||W!==this.length-1?y[6-te.length]+te+N:te+N,(B+=2)>=26&&(B-=26,W--)}for(G!==0&&(N=G.toString(16)+N);N.length%P!=0;)N="0"+N;return this.negative!==0&&(N="-"+N),N}if(L===(0|L)&&L>=2&&L<=36){var Y=x[L],Z=w[L];N="";var re=this.clone();for(re.negative=0;!re.isZero();){var U=re.modn(Z).toString(L);N=(re=re.idivn(Z)).isZero()?U+N:y[Y-U.length]+U+N}for(this.isZero()&&(N="0"+N);N.length%P!=0;)N="0"+N;return this.negative!==0&&(N="-"+N),N}l(!1,"Base should be between 2 and 36")},h.prototype.toNumber=function(){var L=this.words[0];return this.length===2?L+=67108864*this.words[1]:this.length===3&&this.words[2]===1?L+=4503599627370496+67108864*this.words[1]:this.length>2&&l(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-L:L},h.prototype.toJSON=function(){return this.toString(16)},h.prototype.toBuffer=function(L,P){return l(m!==void 0),this.toArrayLike(m,L,P)},h.prototype.toArray=function(L,P){return this.toArrayLike(Array,L,P)},h.prototype.toArrayLike=function(L,P,N){var B=this.byteLength(),G=N||Math.max(1,B);l(B<=G,"byte array longer than desired length"),l(G>0,"Requested array length <= 0"),this.strip();var W,K,te=P==="le",Y=new L(G),Z=this.clone();if(te){for(K=0;!Z.isZero();K++)W=Z.andln(255),Z.iushrn(8),Y[K]=W;for(;K=4096&&(N+=13,P>>>=13),P>=64&&(N+=7,P>>>=7),P>=8&&(N+=4,P>>>=4),P>=2&&(N+=2,P>>>=2),N+P},h.prototype._zeroBits=function(L){if(L===0)return 26;var P=L,N=0;return(8191&P)==0&&(N+=13,P>>>=13),(127&P)==0&&(N+=7,P>>>=7),(15&P)==0&&(N+=4,P>>>=4),(3&P)==0&&(N+=2,P>>>=2),(1&P)==0&&N++,N},h.prototype.bitLength=function(){var L=this.words[this.length-1],P=this._countBits(L);return 26*(this.length-1)+P},h.prototype.zeroBits=function(){if(this.isZero())return 0;for(var L=0,P=0;PL.length?this.clone().ior(L):L.clone().ior(this)},h.prototype.uor=function(L){return this.length>L.length?this.clone().iuor(L):L.clone().iuor(this)},h.prototype.iuand=function(L){var P;P=this.length>L.length?L:this;for(var N=0;NL.length?this.clone().iand(L):L.clone().iand(this)},h.prototype.uand=function(L){return this.length>L.length?this.clone().iuand(L):L.clone().iuand(this)},h.prototype.iuxor=function(L){var P,N;this.length>L.length?(P=this,N=L):(P=L,N=this);for(var B=0;BL.length?this.clone().ixor(L):L.clone().ixor(this)},h.prototype.uxor=function(L){return this.length>L.length?this.clone().iuxor(L):L.clone().iuxor(this)},h.prototype.inotn=function(L){l(typeof L=="number"&&L>=0);var P=0|Math.ceil(L/26),N=L%26;this._expand(P),N>0&&P--;for(var B=0;B0&&(this.words[B]=~this.words[B]&67108863>>26-N),this.strip()},h.prototype.notn=function(L){return this.clone().inotn(L)},h.prototype.setn=function(L,P){l(typeof L=="number"&&L>=0);var N=L/26|0,B=L%26;return this._expand(N+1),this.words[N]=P?this.words[N]|1<L.length?(N=this,B=L):(N=L,B=this);for(var G=0,W=0;W>>26;for(;G!==0&&W>>26;if(this.length=N.length,G!==0)this.words[this.length]=G,this.length++;else if(N!==this)for(;WL.length?this.clone().iadd(L):L.clone().iadd(this)},h.prototype.isub=function(L){if(L.negative!==0){L.negative=0;var P=this.iadd(L);return L.negative=1,P._normSign()}if(this.negative!==0)return this.negative=0,this.iadd(L),this.negative=1,this._normSign();var N,B,G=this.cmp(L);if(G===0)return this.negative=0,this.length=1,this.words[0]=0,this;G>0?(N=this,B=L):(N=L,B=this);for(var W=0,K=0;K>26,this.words[K]=67108863&P;for(;W!==0&&K>26,this.words[K]=67108863&P;if(W===0&&K>>13,$=0|K[1],ne=8191&$,H=$>>>13,Q=0|K[2],ee=8191&Q,ie=Q>>>13,ae=0|K[3],ue=8191&ae,le=ae>>>13,ge=0|K[4],fe=8191&ge,me=ge>>>13,_e=0|K[5],we=8191&_e,Te=_e>>>13,Oe=0|K[6],de=8191&Oe,ye=Oe>>>13,Me=0|K[7],ke=8191&Me,Ee=Me>>>13,ze=0|K[8],Fe=8191&ze,Ve=ze>>>13,Ke=0|K[9],Re=8191&Ke,qe=Ke>>>13,We=0|te[0],Ye=8191&We,nt=We>>>13,ft=0|te[1],vt=8191&ft,Pt=ft>>>13,At=0|te[2],at=8191&At,et=At>>>13,Ot=0|te[3],Wt=8191&Ot,Jt=Ot>>>13,Be=0|te[4],Ge=8191&Be,Tt=Be>>>13,dt=0|te[5],Pe=8191&dt,Ie=dt>>>13,Ae=0|te[6],De=8191&Ae,He=Ae>>>13,rt=0|te[7],lt=8191&rt,ot=rt>>>13,kt=0|te[8],wt=8191&kt,Vt=kt>>>13,Ut=0|te[9],tt=8191&Ut,bt=Ut>>>13;N.negative=L.negative^P.negative,N.length=19;var zt=(Z+(B=Math.imul(U,Ye))|0)+((8191&(G=(G=Math.imul(U,nt))+Math.imul(q,Ye)|0))<<13)|0;Z=((W=Math.imul(q,nt))+(G>>>13)|0)+(zt>>>26)|0,zt&=67108863,B=Math.imul(ne,Ye),G=(G=Math.imul(ne,nt))+Math.imul(H,Ye)|0,W=Math.imul(H,nt);var St=(Z+(B=B+Math.imul(U,vt)|0)|0)+((8191&(G=(G=G+Math.imul(U,Pt)|0)+Math.imul(q,vt)|0))<<13)|0;Z=((W=W+Math.imul(q,Pt)|0)+(G>>>13)|0)+(St>>>26)|0,St&=67108863,B=Math.imul(ee,Ye),G=(G=Math.imul(ee,nt))+Math.imul(ie,Ye)|0,W=Math.imul(ie,nt),B=B+Math.imul(ne,vt)|0,G=(G=G+Math.imul(ne,Pt)|0)+Math.imul(H,vt)|0,W=W+Math.imul(H,Pt)|0;var Dt=(Z+(B=B+Math.imul(U,at)|0)|0)+((8191&(G=(G=G+Math.imul(U,et)|0)+Math.imul(q,at)|0))<<13)|0;Z=((W=W+Math.imul(q,et)|0)+(G>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,B=Math.imul(ue,Ye),G=(G=Math.imul(ue,nt))+Math.imul(le,Ye)|0,W=Math.imul(le,nt),B=B+Math.imul(ee,vt)|0,G=(G=G+Math.imul(ee,Pt)|0)+Math.imul(ie,vt)|0,W=W+Math.imul(ie,Pt)|0,B=B+Math.imul(ne,at)|0,G=(G=G+Math.imul(ne,et)|0)+Math.imul(H,at)|0,W=W+Math.imul(H,et)|0;var Le=(Z+(B=B+Math.imul(U,Wt)|0)|0)+((8191&(G=(G=G+Math.imul(U,Jt)|0)+Math.imul(q,Wt)|0))<<13)|0;Z=((W=W+Math.imul(q,Jt)|0)+(G>>>13)|0)+(Le>>>26)|0,Le&=67108863,B=Math.imul(fe,Ye),G=(G=Math.imul(fe,nt))+Math.imul(me,Ye)|0,W=Math.imul(me,nt),B=B+Math.imul(ue,vt)|0,G=(G=G+Math.imul(ue,Pt)|0)+Math.imul(le,vt)|0,W=W+Math.imul(le,Pt)|0,B=B+Math.imul(ee,at)|0,G=(G=G+Math.imul(ee,et)|0)+Math.imul(ie,at)|0,W=W+Math.imul(ie,et)|0,B=B+Math.imul(ne,Wt)|0,G=(G=G+Math.imul(ne,Jt)|0)+Math.imul(H,Wt)|0,W=W+Math.imul(H,Jt)|0;var Je=(Z+(B=B+Math.imul(U,Ge)|0)|0)+((8191&(G=(G=G+Math.imul(U,Tt)|0)+Math.imul(q,Ge)|0))<<13)|0;Z=((W=W+Math.imul(q,Tt)|0)+(G>>>13)|0)+(Je>>>26)|0,Je&=67108863,B=Math.imul(we,Ye),G=(G=Math.imul(we,nt))+Math.imul(Te,Ye)|0,W=Math.imul(Te,nt),B=B+Math.imul(fe,vt)|0,G=(G=G+Math.imul(fe,Pt)|0)+Math.imul(me,vt)|0,W=W+Math.imul(me,Pt)|0,B=B+Math.imul(ue,at)|0,G=(G=G+Math.imul(ue,et)|0)+Math.imul(le,at)|0,W=W+Math.imul(le,et)|0,B=B+Math.imul(ee,Wt)|0,G=(G=G+Math.imul(ee,Jt)|0)+Math.imul(ie,Wt)|0,W=W+Math.imul(ie,Jt)|0,B=B+Math.imul(ne,Ge)|0,G=(G=G+Math.imul(ne,Tt)|0)+Math.imul(H,Ge)|0,W=W+Math.imul(H,Tt)|0;var st=(Z+(B=B+Math.imul(U,Pe)|0)|0)+((8191&(G=(G=G+Math.imul(U,Ie)|0)+Math.imul(q,Pe)|0))<<13)|0;Z=((W=W+Math.imul(q,Ie)|0)+(G>>>13)|0)+(st>>>26)|0,st&=67108863,B=Math.imul(de,Ye),G=(G=Math.imul(de,nt))+Math.imul(ye,Ye)|0,W=Math.imul(ye,nt),B=B+Math.imul(we,vt)|0,G=(G=G+Math.imul(we,Pt)|0)+Math.imul(Te,vt)|0,W=W+Math.imul(Te,Pt)|0,B=B+Math.imul(fe,at)|0,G=(G=G+Math.imul(fe,et)|0)+Math.imul(me,at)|0,W=W+Math.imul(me,et)|0,B=B+Math.imul(ue,Wt)|0,G=(G=G+Math.imul(ue,Jt)|0)+Math.imul(le,Wt)|0,W=W+Math.imul(le,Jt)|0,B=B+Math.imul(ee,Ge)|0,G=(G=G+Math.imul(ee,Tt)|0)+Math.imul(ie,Ge)|0,W=W+Math.imul(ie,Tt)|0,B=B+Math.imul(ne,Pe)|0,G=(G=G+Math.imul(ne,Ie)|0)+Math.imul(H,Pe)|0,W=W+Math.imul(H,Ie)|0;var Et=(Z+(B=B+Math.imul(U,De)|0)|0)+((8191&(G=(G=G+Math.imul(U,He)|0)+Math.imul(q,De)|0))<<13)|0;Z=((W=W+Math.imul(q,He)|0)+(G>>>13)|0)+(Et>>>26)|0,Et&=67108863,B=Math.imul(ke,Ye),G=(G=Math.imul(ke,nt))+Math.imul(Ee,Ye)|0,W=Math.imul(Ee,nt),B=B+Math.imul(de,vt)|0,G=(G=G+Math.imul(de,Pt)|0)+Math.imul(ye,vt)|0,W=W+Math.imul(ye,Pt)|0,B=B+Math.imul(we,at)|0,G=(G=G+Math.imul(we,et)|0)+Math.imul(Te,at)|0,W=W+Math.imul(Te,et)|0,B=B+Math.imul(fe,Wt)|0,G=(G=G+Math.imul(fe,Jt)|0)+Math.imul(me,Wt)|0,W=W+Math.imul(me,Jt)|0,B=B+Math.imul(ue,Ge)|0,G=(G=G+Math.imul(ue,Tt)|0)+Math.imul(le,Ge)|0,W=W+Math.imul(le,Tt)|0,B=B+Math.imul(ee,Pe)|0,G=(G=G+Math.imul(ee,Ie)|0)+Math.imul(ie,Pe)|0,W=W+Math.imul(ie,Ie)|0,B=B+Math.imul(ne,De)|0,G=(G=G+Math.imul(ne,He)|0)+Math.imul(H,De)|0,W=W+Math.imul(H,He)|0;var It=(Z+(B=B+Math.imul(U,lt)|0)|0)+((8191&(G=(G=G+Math.imul(U,ot)|0)+Math.imul(q,lt)|0))<<13)|0;Z=((W=W+Math.imul(q,ot)|0)+(G>>>13)|0)+(It>>>26)|0,It&=67108863,B=Math.imul(Fe,Ye),G=(G=Math.imul(Fe,nt))+Math.imul(Ve,Ye)|0,W=Math.imul(Ve,nt),B=B+Math.imul(ke,vt)|0,G=(G=G+Math.imul(ke,Pt)|0)+Math.imul(Ee,vt)|0,W=W+Math.imul(Ee,Pt)|0,B=B+Math.imul(de,at)|0,G=(G=G+Math.imul(de,et)|0)+Math.imul(ye,at)|0,W=W+Math.imul(ye,et)|0,B=B+Math.imul(we,Wt)|0,G=(G=G+Math.imul(we,Jt)|0)+Math.imul(Te,Wt)|0,W=W+Math.imul(Te,Jt)|0,B=B+Math.imul(fe,Ge)|0,G=(G=G+Math.imul(fe,Tt)|0)+Math.imul(me,Ge)|0,W=W+Math.imul(me,Tt)|0,B=B+Math.imul(ue,Pe)|0,G=(G=G+Math.imul(ue,Ie)|0)+Math.imul(le,Pe)|0,W=W+Math.imul(le,Ie)|0,B=B+Math.imul(ee,De)|0,G=(G=G+Math.imul(ee,He)|0)+Math.imul(ie,De)|0,W=W+Math.imul(ie,He)|0,B=B+Math.imul(ne,lt)|0,G=(G=G+Math.imul(ne,ot)|0)+Math.imul(H,lt)|0,W=W+Math.imul(H,ot)|0;var Zt=(Z+(B=B+Math.imul(U,wt)|0)|0)+((8191&(G=(G=G+Math.imul(U,Vt)|0)+Math.imul(q,wt)|0))<<13)|0;Z=((W=W+Math.imul(q,Vt)|0)+(G>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,B=Math.imul(Re,Ye),G=(G=Math.imul(Re,nt))+Math.imul(qe,Ye)|0,W=Math.imul(qe,nt),B=B+Math.imul(Fe,vt)|0,G=(G=G+Math.imul(Fe,Pt)|0)+Math.imul(Ve,vt)|0,W=W+Math.imul(Ve,Pt)|0,B=B+Math.imul(ke,at)|0,G=(G=G+Math.imul(ke,et)|0)+Math.imul(Ee,at)|0,W=W+Math.imul(Ee,et)|0,B=B+Math.imul(de,Wt)|0,G=(G=G+Math.imul(de,Jt)|0)+Math.imul(ye,Wt)|0,W=W+Math.imul(ye,Jt)|0,B=B+Math.imul(we,Ge)|0,G=(G=G+Math.imul(we,Tt)|0)+Math.imul(Te,Ge)|0,W=W+Math.imul(Te,Tt)|0,B=B+Math.imul(fe,Pe)|0,G=(G=G+Math.imul(fe,Ie)|0)+Math.imul(me,Pe)|0,W=W+Math.imul(me,Ie)|0,B=B+Math.imul(ue,De)|0,G=(G=G+Math.imul(ue,He)|0)+Math.imul(le,De)|0,W=W+Math.imul(le,He)|0,B=B+Math.imul(ee,lt)|0,G=(G=G+Math.imul(ee,ot)|0)+Math.imul(ie,lt)|0,W=W+Math.imul(ie,ot)|0,B=B+Math.imul(ne,wt)|0,G=(G=G+Math.imul(ne,Vt)|0)+Math.imul(H,wt)|0,W=W+Math.imul(H,Vt)|0;var Kt=(Z+(B=B+Math.imul(U,tt)|0)|0)+((8191&(G=(G=G+Math.imul(U,bt)|0)+Math.imul(q,tt)|0))<<13)|0;Z=((W=W+Math.imul(q,bt)|0)+(G>>>13)|0)+(Kt>>>26)|0,Kt&=67108863,B=Math.imul(Re,vt),G=(G=Math.imul(Re,Pt))+Math.imul(qe,vt)|0,W=Math.imul(qe,Pt),B=B+Math.imul(Fe,at)|0,G=(G=G+Math.imul(Fe,et)|0)+Math.imul(Ve,at)|0,W=W+Math.imul(Ve,et)|0,B=B+Math.imul(ke,Wt)|0,G=(G=G+Math.imul(ke,Jt)|0)+Math.imul(Ee,Wt)|0,W=W+Math.imul(Ee,Jt)|0,B=B+Math.imul(de,Ge)|0,G=(G=G+Math.imul(de,Tt)|0)+Math.imul(ye,Ge)|0,W=W+Math.imul(ye,Tt)|0,B=B+Math.imul(we,Pe)|0,G=(G=G+Math.imul(we,Ie)|0)+Math.imul(Te,Pe)|0,W=W+Math.imul(Te,Ie)|0,B=B+Math.imul(fe,De)|0,G=(G=G+Math.imul(fe,He)|0)+Math.imul(me,De)|0,W=W+Math.imul(me,He)|0,B=B+Math.imul(ue,lt)|0,G=(G=G+Math.imul(ue,ot)|0)+Math.imul(le,lt)|0,W=W+Math.imul(le,ot)|0,B=B+Math.imul(ee,wt)|0,G=(G=G+Math.imul(ee,Vt)|0)+Math.imul(ie,wt)|0,W=W+Math.imul(ie,Vt)|0;var Ht=(Z+(B=B+Math.imul(ne,tt)|0)|0)+((8191&(G=(G=G+Math.imul(ne,bt)|0)+Math.imul(H,tt)|0))<<13)|0;Z=((W=W+Math.imul(H,bt)|0)+(G>>>13)|0)+(Ht>>>26)|0,Ht&=67108863,B=Math.imul(Re,at),G=(G=Math.imul(Re,et))+Math.imul(qe,at)|0,W=Math.imul(qe,et),B=B+Math.imul(Fe,Wt)|0,G=(G=G+Math.imul(Fe,Jt)|0)+Math.imul(Ve,Wt)|0,W=W+Math.imul(Ve,Jt)|0,B=B+Math.imul(ke,Ge)|0,G=(G=G+Math.imul(ke,Tt)|0)+Math.imul(Ee,Ge)|0,W=W+Math.imul(Ee,Tt)|0,B=B+Math.imul(de,Pe)|0,G=(G=G+Math.imul(de,Ie)|0)+Math.imul(ye,Pe)|0,W=W+Math.imul(ye,Ie)|0,B=B+Math.imul(we,De)|0,G=(G=G+Math.imul(we,He)|0)+Math.imul(Te,De)|0,W=W+Math.imul(Te,He)|0,B=B+Math.imul(fe,lt)|0,G=(G=G+Math.imul(fe,ot)|0)+Math.imul(me,lt)|0,W=W+Math.imul(me,ot)|0,B=B+Math.imul(ue,wt)|0,G=(G=G+Math.imul(ue,Vt)|0)+Math.imul(le,wt)|0,W=W+Math.imul(le,Vt)|0;var mn=(Z+(B=B+Math.imul(ee,tt)|0)|0)+((8191&(G=(G=G+Math.imul(ee,bt)|0)+Math.imul(ie,tt)|0))<<13)|0;Z=((W=W+Math.imul(ie,bt)|0)+(G>>>13)|0)+(mn>>>26)|0,mn&=67108863,B=Math.imul(Re,Wt),G=(G=Math.imul(Re,Jt))+Math.imul(qe,Wt)|0,W=Math.imul(qe,Jt),B=B+Math.imul(Fe,Ge)|0,G=(G=G+Math.imul(Fe,Tt)|0)+Math.imul(Ve,Ge)|0,W=W+Math.imul(Ve,Tt)|0,B=B+Math.imul(ke,Pe)|0,G=(G=G+Math.imul(ke,Ie)|0)+Math.imul(Ee,Pe)|0,W=W+Math.imul(Ee,Ie)|0,B=B+Math.imul(de,De)|0,G=(G=G+Math.imul(de,He)|0)+Math.imul(ye,De)|0,W=W+Math.imul(ye,He)|0,B=B+Math.imul(we,lt)|0,G=(G=G+Math.imul(we,ot)|0)+Math.imul(Te,lt)|0,W=W+Math.imul(Te,ot)|0,B=B+Math.imul(fe,wt)|0,G=(G=G+Math.imul(fe,Vt)|0)+Math.imul(me,wt)|0,W=W+Math.imul(me,Vt)|0;var zn=(Z+(B=B+Math.imul(ue,tt)|0)|0)+((8191&(G=(G=G+Math.imul(ue,bt)|0)+Math.imul(le,tt)|0))<<13)|0;Z=((W=W+Math.imul(le,bt)|0)+(G>>>13)|0)+(zn>>>26)|0,zn&=67108863,B=Math.imul(Re,Ge),G=(G=Math.imul(Re,Tt))+Math.imul(qe,Ge)|0,W=Math.imul(qe,Tt),B=B+Math.imul(Fe,Pe)|0,G=(G=G+Math.imul(Fe,Ie)|0)+Math.imul(Ve,Pe)|0,W=W+Math.imul(Ve,Ie)|0,B=B+Math.imul(ke,De)|0,G=(G=G+Math.imul(ke,He)|0)+Math.imul(Ee,De)|0,W=W+Math.imul(Ee,He)|0,B=B+Math.imul(de,lt)|0,G=(G=G+Math.imul(de,ot)|0)+Math.imul(ye,lt)|0,W=W+Math.imul(ye,ot)|0,B=B+Math.imul(we,wt)|0,G=(G=G+Math.imul(we,Vt)|0)+Math.imul(Te,wt)|0,W=W+Math.imul(Te,Vt)|0;var pn=(Z+(B=B+Math.imul(fe,tt)|0)|0)+((8191&(G=(G=G+Math.imul(fe,bt)|0)+Math.imul(me,tt)|0))<<13)|0;Z=((W=W+Math.imul(me,bt)|0)+(G>>>13)|0)+(pn>>>26)|0,pn&=67108863,B=Math.imul(Re,Pe),G=(G=Math.imul(Re,Ie))+Math.imul(qe,Pe)|0,W=Math.imul(qe,Ie),B=B+Math.imul(Fe,De)|0,G=(G=G+Math.imul(Fe,He)|0)+Math.imul(Ve,De)|0,W=W+Math.imul(Ve,He)|0,B=B+Math.imul(ke,lt)|0,G=(G=G+Math.imul(ke,ot)|0)+Math.imul(Ee,lt)|0,W=W+Math.imul(Ee,ot)|0,B=B+Math.imul(de,wt)|0,G=(G=G+Math.imul(de,Vt)|0)+Math.imul(ye,wt)|0,W=W+Math.imul(ye,Vt)|0;var tn=(Z+(B=B+Math.imul(we,tt)|0)|0)+((8191&(G=(G=G+Math.imul(we,bt)|0)+Math.imul(Te,tt)|0))<<13)|0;Z=((W=W+Math.imul(Te,bt)|0)+(G>>>13)|0)+(tn>>>26)|0,tn&=67108863,B=Math.imul(Re,De),G=(G=Math.imul(Re,He))+Math.imul(qe,De)|0,W=Math.imul(qe,He),B=B+Math.imul(Fe,lt)|0,G=(G=G+Math.imul(Fe,ot)|0)+Math.imul(Ve,lt)|0,W=W+Math.imul(Ve,ot)|0,B=B+Math.imul(ke,wt)|0,G=(G=G+Math.imul(ke,Vt)|0)+Math.imul(Ee,wt)|0,W=W+Math.imul(Ee,Vt)|0;var nn=(Z+(B=B+Math.imul(de,tt)|0)|0)+((8191&(G=(G=G+Math.imul(de,bt)|0)+Math.imul(ye,tt)|0))<<13)|0;Z=((W=W+Math.imul(ye,bt)|0)+(G>>>13)|0)+(nn>>>26)|0,nn&=67108863,B=Math.imul(Re,lt),G=(G=Math.imul(Re,ot))+Math.imul(qe,lt)|0,W=Math.imul(qe,ot),B=B+Math.imul(Fe,wt)|0,G=(G=G+Math.imul(Fe,Vt)|0)+Math.imul(Ve,wt)|0,W=W+Math.imul(Ve,Vt)|0;var sn=(Z+(B=B+Math.imul(ke,tt)|0)|0)+((8191&(G=(G=G+Math.imul(ke,bt)|0)+Math.imul(Ee,tt)|0))<<13)|0;Z=((W=W+Math.imul(Ee,bt)|0)+(G>>>13)|0)+(sn>>>26)|0,sn&=67108863,B=Math.imul(Re,wt),G=(G=Math.imul(Re,Vt))+Math.imul(qe,wt)|0,W=Math.imul(qe,Vt);var gn=(Z+(B=B+Math.imul(Fe,tt)|0)|0)+((8191&(G=(G=G+Math.imul(Fe,bt)|0)+Math.imul(Ve,tt)|0))<<13)|0;Z=((W=W+Math.imul(Ve,bt)|0)+(G>>>13)|0)+(gn>>>26)|0,gn&=67108863;var bn=(Z+(B=Math.imul(Re,tt))|0)+((8191&(G=(G=Math.imul(Re,bt))+Math.imul(qe,tt)|0))<<13)|0;return Z=((W=Math.imul(qe,bt))+(G>>>13)|0)+(bn>>>26)|0,bn&=67108863,Y[0]=zt,Y[1]=St,Y[2]=Dt,Y[3]=Le,Y[4]=Je,Y[5]=st,Y[6]=Et,Y[7]=It,Y[8]=Zt,Y[9]=Kt,Y[10]=Ht,Y[11]=mn,Y[12]=zn,Y[13]=pn,Y[14]=tn,Y[15]=nn,Y[16]=sn,Y[17]=gn,Y[18]=bn,Z!==0&&(Y[19]=Z,N.length++),N};function T(L,P,N){return new _().mulp(L,P,N)}function _(L,P){this.x=L,this.y=P}Math.imul||(b=k),h.prototype.mulTo=function(L,P){var N=this.length+L.length;return this.length===10&&L.length===10?b(this,L,P):N<63?k(this,L,P):N<1024?function(B,G,W){W.negative=G.negative^B.negative,W.length=B.length+G.length;for(var K=0,te=0,Y=0;Y>>26)|0)>>>26,Z&=67108863}W.words[Y]=re,K=Z,Z=te}return K!==0?W.words[Y]=K:W.length--,W.strip()}(this,L,P):T(this,L,P)},_.prototype.makeRBT=function(L){for(var P=new Array(L),N=h.prototype._countBits(L)-1,B=0;B>=1;return B},_.prototype.permute=function(L,P,N,B,G,W){for(var K=0;K>>=1)G++;return 1<>>=13,N[2*W+1]=8191&G,G>>>=13;for(W=2*P;W>=26,P+=B/67108864|0,P+=G>>>26,this.words[N]=67108863&G}return P!==0&&(this.words[N]=P,this.length++),this},h.prototype.muln=function(L){return this.clone().imuln(L)},h.prototype.sqr=function(){return this.mul(this)},h.prototype.isqr=function(){return this.imul(this.clone())},h.prototype.pow=function(L){var P=function(W){for(var K=new Array(W.bitLength()),te=0;te>>Z}return K}(L);if(P.length===0)return new h(1);for(var N=this,B=0;B=0);var P,N=L%26,B=(L-N)/26,G=67108863>>>26-N<<26-N;if(N!==0){var W=0;for(P=0;P>>26-N}W&&(this.words[P]=W,this.length++)}if(B!==0){for(P=this.length-1;P>=0;P--)this.words[P+B]=this.words[P];for(P=0;P=0),B=P?(P-P%26)/26:0;var G=L%26,W=Math.min((L-G)/26,this.length),K=67108863^67108863>>>G<W)for(this.length-=W,Y=0;Y=0&&(Z!==0||Y>=B);Y--){var re=0|this.words[Y];this.words[Y]=Z<<26-G|re>>>G,Z=re&K}return te&&Z!==0&&(te.words[te.length++]=Z),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},h.prototype.ishrn=function(L,P,N){return l(this.negative===0),this.iushrn(L,P,N)},h.prototype.shln=function(L){return this.clone().ishln(L)},h.prototype.ushln=function(L){return this.clone().iushln(L)},h.prototype.shrn=function(L){return this.clone().ishrn(L)},h.prototype.ushrn=function(L){return this.clone().iushrn(L)},h.prototype.testn=function(L){l(typeof L=="number"&&L>=0);var P=L%26,N=(L-P)/26,B=1<=0);var P=L%26,N=(L-P)/26;if(l(this.negative===0,"imaskn works only with positive numbers"),this.length<=N)return this;if(P!==0&&N++,this.length=Math.min(N,this.length),P!==0){var B=67108863^67108863>>>P<=67108864;P++)this.words[P]-=67108864,P===this.length-1?this.words[P+1]=1:this.words[P+1]++;return this.length=Math.max(this.length,P+1),this},h.prototype.isubn=function(L){if(l(typeof L=="number"),l(L<67108864),L<0)return this.iaddn(-L);if(this.negative!==0)return this.negative=0,this.iaddn(L),this.negative=1,this;if(this.words[0]-=L,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var P=0;P>26)-(te/67108864|0),this.words[B+N]=67108863&G}for(;B>26,this.words[B+N]=67108863&G;if(K===0)return this.strip();for(l(K===-1),K=0,B=0;B>26,this.words[B]=67108863&G;return this.negative=1,this.strip()},h.prototype._wordDiv=function(L,P){var N=(this.length,L.length),B=this.clone(),G=L,W=0|G.words[G.length-1];(N=26-this._countBits(W))!==0&&(G=G.ushln(N),B.iushln(N),W=0|G.words[G.length-1]);var K,te=B.length-G.length;if(P!=="mod"){(K=new h(null)).length=te+1,K.words=new Array(K.length);for(var Y=0;Y=0;re--){var U=67108864*(0|B.words[G.length+re])+(0|B.words[G.length+re-1]);for(U=Math.min(U/W|0,67108863),B._ishlnsubmul(G,U,re);B.negative!==0;)U--,B.negative=0,B._ishlnsubmul(G,1,re),B.isZero()||(B.negative^=1);K&&(K.words[re]=U)}return K&&K.strip(),B.strip(),P!=="div"&&N!==0&&B.iushrn(N),{div:K||null,mod:B}},h.prototype.divmod=function(L,P,N){return l(!L.isZero()),this.isZero()?{div:new h(0),mod:new h(0)}:this.negative!==0&&L.negative===0?(W=this.neg().divmod(L,P),P!=="mod"&&(B=W.div.neg()),P!=="div"&&(G=W.mod.neg(),N&&G.negative!==0&&G.iadd(L)),{div:B,mod:G}):this.negative===0&&L.negative!==0?(W=this.divmod(L.neg(),P),P!=="mod"&&(B=W.div.neg()),{div:B,mod:W.mod}):(this.negative&L.negative)!=0?(W=this.neg().divmod(L.neg(),P),P!=="div"&&(G=W.mod.neg(),N&&G.negative!==0&&G.isub(L)),{div:W.div,mod:G}):L.length>this.length||this.cmp(L)<0?{div:new h(0),mod:this}:L.length===1?P==="div"?{div:this.divn(L.words[0]),mod:null}:P==="mod"?{div:null,mod:new h(this.modn(L.words[0]))}:{div:this.divn(L.words[0]),mod:new h(this.modn(L.words[0]))}:this._wordDiv(L,P);var B,G,W},h.prototype.div=function(L){return this.divmod(L,"div",!1).div},h.prototype.mod=function(L){return this.divmod(L,"mod",!1).mod},h.prototype.umod=function(L){return this.divmod(L,"mod",!0).mod},h.prototype.divRound=function(L){var P=this.divmod(L);if(P.mod.isZero())return P.div;var N=P.div.negative!==0?P.mod.isub(L):P.mod,B=L.ushrn(1),G=L.andln(1),W=N.cmp(B);return W<0||G===1&&W===0?P.div:P.div.negative!==0?P.div.isubn(1):P.div.iaddn(1)},h.prototype.modn=function(L){l(L<=67108863);for(var P=(1<<26)%L,N=0,B=this.length-1;B>=0;B--)N=(P*N+(0|this.words[B]))%L;return N},h.prototype.idivn=function(L){l(L<=67108863);for(var P=0,N=this.length-1;N>=0;N--){var B=(0|this.words[N])+67108864*P;this.words[N]=B/L|0,P=B%L}return this.strip()},h.prototype.divn=function(L){return this.clone().idivn(L)},h.prototype.egcd=function(L){l(L.negative===0),l(!L.isZero());var P=this,N=L.clone();P=P.negative!==0?P.umod(L):P.clone();for(var B=new h(1),G=new h(0),W=new h(0),K=new h(1),te=0;P.isEven()&&N.isEven();)P.iushrn(1),N.iushrn(1),++te;for(var Y=N.clone(),Z=P.clone();!P.isZero();){for(var re=0,U=1;(P.words[0]&U)==0&&re<26;++re,U<<=1);if(re>0)for(P.iushrn(re);re-- >0;)(B.isOdd()||G.isOdd())&&(B.iadd(Y),G.isub(Z)),B.iushrn(1),G.iushrn(1);for(var q=0,$=1;(N.words[0]&$)==0&&q<26;++q,$<<=1);if(q>0)for(N.iushrn(q);q-- >0;)(W.isOdd()||K.isOdd())&&(W.iadd(Y),K.isub(Z)),W.iushrn(1),K.iushrn(1);P.cmp(N)>=0?(P.isub(N),B.isub(W),G.isub(K)):(N.isub(P),W.isub(B),K.isub(G))}return{a:W,b:K,gcd:N.iushln(te)}},h.prototype._invmp=function(L){l(L.negative===0),l(!L.isZero());var P=this,N=L.clone();P=P.negative!==0?P.umod(L):P.clone();for(var B,G=new h(1),W=new h(0),K=N.clone();P.cmpn(1)>0&&N.cmpn(1)>0;){for(var te=0,Y=1;(P.words[0]&Y)==0&&te<26;++te,Y<<=1);if(te>0)for(P.iushrn(te);te-- >0;)G.isOdd()&&G.iadd(K),G.iushrn(1);for(var Z=0,re=1;(N.words[0]&re)==0&&Z<26;++Z,re<<=1);if(Z>0)for(N.iushrn(Z);Z-- >0;)W.isOdd()&&W.iadd(K),W.iushrn(1);P.cmp(N)>=0?(P.isub(N),G.isub(W)):(N.isub(P),W.isub(G))}return(B=P.cmpn(1)===0?G:W).cmpn(0)<0&&B.iadd(L),B},h.prototype.gcd=function(L){if(this.isZero())return L.abs();if(L.isZero())return this.abs();var P=this.clone(),N=L.clone();P.negative=0,N.negative=0;for(var B=0;P.isEven()&&N.isEven();B++)P.iushrn(1),N.iushrn(1);for(;;){for(;P.isEven();)P.iushrn(1);for(;N.isEven();)N.iushrn(1);var G=P.cmp(N);if(G<0){var W=P;P=N,N=W}else if(G===0||N.cmpn(1)===0)break;P.isub(N)}return N.iushln(B)},h.prototype.invm=function(L){return this.egcd(L).a.umod(L)},h.prototype.isEven=function(){return(1&this.words[0])==0},h.prototype.isOdd=function(){return(1&this.words[0])==1},h.prototype.andln=function(L){return this.words[0]&L},h.prototype.bincn=function(L){l(typeof L=="number");var P=L%26,N=(L-P)/26,B=1<>>26,K&=67108863,this.words[W]=K}return G!==0&&(this.words[W]=G,this.length++),this},h.prototype.isZero=function(){return this.length===1&&this.words[0]===0},h.prototype.cmpn=function(L){var P,N=L<0;if(this.negative!==0&&!N)return-1;if(this.negative===0&&N)return 1;if(this.strip(),this.length>1)P=1;else{N&&(L=-L),l(L<=67108863,"Number is too big");var B=0|this.words[0];P=B===L?0:BL.length)return 1;if(this.length=0;N--){var B=0|this.words[N],G=0|L.words[N];if(B!==G){BG&&(P=1);break}}return P},h.prototype.gtn=function(L){return this.cmpn(L)===1},h.prototype.gt=function(L){return this.cmp(L)===1},h.prototype.gten=function(L){return this.cmpn(L)>=0},h.prototype.gte=function(L){return this.cmp(L)>=0},h.prototype.ltn=function(L){return this.cmpn(L)===-1},h.prototype.lt=function(L){return this.cmp(L)===-1},h.prototype.lten=function(L){return this.cmpn(L)<=0},h.prototype.lte=function(L){return this.cmp(L)<=0},h.prototype.eqn=function(L){return this.cmpn(L)===0},h.prototype.eq=function(L){return this.cmp(L)===0},h.red=function(L){return new R(L)},h.prototype.toRed=function(L){return l(!this.red,"Already a number in reduction context"),l(this.negative===0,"red works only with positives"),L.convertTo(this)._forceRed(L)},h.prototype.fromRed=function(){return l(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},h.prototype._forceRed=function(L){return this.red=L,this},h.prototype.forceRed=function(L){return l(!this.red,"Already a number in reduction context"),this._forceRed(L)},h.prototype.redAdd=function(L){return l(this.red,"redAdd works only with red numbers"),this.red.add(this,L)},h.prototype.redIAdd=function(L){return l(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,L)},h.prototype.redSub=function(L){return l(this.red,"redSub works only with red numbers"),this.red.sub(this,L)},h.prototype.redISub=function(L){return l(this.red,"redISub works only with red numbers"),this.red.isub(this,L)},h.prototype.redShl=function(L){return l(this.red,"redShl works only with red numbers"),this.red.shl(this,L)},h.prototype.redMul=function(L){return l(this.red,"redMul works only with red numbers"),this.red._verify2(this,L),this.red.mul(this,L)},h.prototype.redIMul=function(L){return l(this.red,"redMul works only with red numbers"),this.red._verify2(this,L),this.red.imul(this,L)},h.prototype.redSqr=function(){return l(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},h.prototype.redISqr=function(){return l(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},h.prototype.redSqrt=function(){return l(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},h.prototype.redInvm=function(){return l(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},h.prototype.redNeg=function(){return l(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},h.prototype.redPow=function(L){return l(this.red&&!L.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,L)};var M={k256:null,p224:null,p192:null,p25519:null};function A(L,P){this.name=L,this.p=new h(P,16),this.n=this.p.bitLength(),this.k=new h(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function S(){A.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){A.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function D(){A.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function O(){A.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function R(L){if(typeof L=="string"){var P=h._prime(L);this.m=P.p,this.prime=P}else l(L.gtn(1),"modulus must be greater than 1"),this.m=L,this.prime=null}function z(L){R.call(this,L),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new h(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}A.prototype._tmp=function(){var L=new h(null);return L.words=new Array(Math.ceil(this.n/13)),L},A.prototype.ireduce=function(L){var P,N=L;do this.split(N,this.tmp),P=(N=(N=this.imulK(N)).iadd(this.tmp)).bitLength();while(P>this.n);var B=P0?N.isub(this.p):N.strip!==void 0?N.strip():N._strip(),N},A.prototype.split=function(L,P){L.iushrn(this.n,0,P)},A.prototype.imulK=function(L){return L.imul(this.k)},d(S,A),S.prototype.split=function(L,P){for(var N=Math.min(L.length,9),B=0;B>>22,G=W}G>>>=22,L.words[B-10]=G,G===0&&L.length>10?L.length-=10:L.length-=9},S.prototype.imulK=function(L){L.words[L.length]=0,L.words[L.length+1]=0,L.length+=2;for(var P=0,N=0;N>>=26,L.words[N]=G,P=B}return P!==0&&(L.words[L.length++]=P),L},h._prime=function(L){if(M[L])return M[L];var P;if(L==="k256")P=new S;else if(L==="p224")P=new E;else if(L==="p192")P=new D;else{if(L!=="p25519")throw new Error("Unknown prime "+L);P=new O}return M[L]=P,P},R.prototype._verify1=function(L){l(L.negative===0,"red works only with positives"),l(L.red,"red works only with red numbers")},R.prototype._verify2=function(L,P){l((L.negative|P.negative)==0,"red works only with positives"),l(L.red&&L.red===P.red,"red works only with red numbers")},R.prototype.imod=function(L){return this.prime?this.prime.ireduce(L)._forceRed(this):L.umod(this.m)._forceRed(this)},R.prototype.neg=function(L){return L.isZero()?L.clone():this.m.sub(L)._forceRed(this)},R.prototype.add=function(L,P){this._verify2(L,P);var N=L.add(P);return N.cmp(this.m)>=0&&N.isub(this.m),N._forceRed(this)},R.prototype.iadd=function(L,P){this._verify2(L,P);var N=L.iadd(P);return N.cmp(this.m)>=0&&N.isub(this.m),N},R.prototype.sub=function(L,P){this._verify2(L,P);var N=L.sub(P);return N.cmpn(0)<0&&N.iadd(this.m),N._forceRed(this)},R.prototype.isub=function(L,P){this._verify2(L,P);var N=L.isub(P);return N.cmpn(0)<0&&N.iadd(this.m),N},R.prototype.shl=function(L,P){return this._verify1(L),this.imod(L.ushln(P))},R.prototype.imul=function(L,P){return this._verify2(L,P),this.imod(L.imul(P))},R.prototype.mul=function(L,P){return this._verify2(L,P),this.imod(L.mul(P))},R.prototype.isqr=function(L){return this.imul(L,L.clone())},R.prototype.sqr=function(L){return this.mul(L,L)},R.prototype.sqrt=function(L){if(L.isZero())return L.clone();var P=this.m.andln(3);if(l(P%2==1),P===3){var N=this.m.add(new h(1)).iushrn(2);return this.pow(L,N)}for(var B=this.m.subn(1),G=0;!B.isZero()&&B.andln(1)===0;)G++,B.iushrn(1);l(!B.isZero());var W=new h(1).toRed(this),K=W.redNeg(),te=this.m.subn(1).iushrn(1),Y=this.m.bitLength();for(Y=new h(2*Y*Y).toRed(this);this.pow(Y,te).cmp(K)!==0;)Y.redIAdd(K);for(var Z=this.pow(Y,B),re=this.pow(L,B.addn(1).iushrn(1)),U=this.pow(L,B),q=G;U.cmp(W)!==0;){for(var $=U,ne=0;$.cmp(W)!==0;ne++)$=$.redSqr();l(ne=0;B--){for(var Y=P.words[B],Z=te-1;Z>=0;Z--){var re=Y>>Z&1;G!==N[0]&&(G=this.sqr(G)),re!==0||W!==0?(W<<=1,W|=re,(++K===4||B===0&&Z===0)&&(G=this.mul(G,N[W]),K=0,W=0)):K=0}te=26}return G},R.prototype.convertTo=function(L){var P=L.umod(this.m);return P===L?P.clone():P},R.prototype.convertFrom=function(L){var P=L.clone();return P.red=null,P},h.mont=function(L){return new z(L)},d(z,R),z.prototype.convertTo=function(L){return this.imod(L.ushln(this.shift))},z.prototype.convertFrom=function(L){var P=this.imod(L.mul(this.rinv));return P.red=null,P},z.prototype.imul=function(L,P){if(L.isZero()||P.isZero())return L.words[0]=0,L.length=1,L;var N=L.imul(P),B=N.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),G=N.isub(B).iushrn(this.shift),W=G;return G.cmp(this.m)>=0?W=G.isub(this.m):G.cmpn(0)<0&&(W=G.iadd(this.m)),W._forceRed(this)},z.prototype.mul=function(L,P){if(L.isZero()||P.isZero())return new h(0)._forceRed(this);var N=L.mul(P),B=N.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),G=N.isub(B).iushrn(this.shift),W=G;return G.cmp(this.m)>=0?W=G.isub(this.m):G.cmpn(0)<0&&(W=G.iadd(this.m)),W._forceRed(this)},z.prototype.invm=function(L){return this.imod(L._invmp(this.m).mul(this.r2))._forceRed(this)}})(u===void 0||u,this)},{buffer:2}],34:[function(a,u,c){u.exports=function(i){var s,l,d,h=i.length,m=0;for(s=0;s>>1;if(!(M<=0)){var A,S=s.mallocDouble(2*M*T),E=s.mallocInt32(T);if((T=m(x,M,S,E))>0){if(M===1&&b)l.init(T),A=l.sweepComplete(M,k,0,T,S,E,0,T,S,E);else{var D=s.mallocDouble(2*M*_),O=s.mallocInt32(_);(_=m(w,M,D,O))>0&&(l.init(T+_),A=M===1?l.sweepBipartite(M,k,0,T,S,E,0,_,D,O):d(M,k,b,T,S,E,_,D,O),s.free(D),s.free(O))}s.free(S),s.free(E)}return A}}}function p(x,w){i.push([x,w])}function v(x){return i=[],g(x,x,p,!0),i}function y(x,w){return i=[],g(x,w,p,!1),i}},{"./lib/intersect":37,"./lib/sweep":41,"typedarray-pool":308}],36:[function(a,u,c){function i(s){return s?function(l,d,h,m,g,p,v,y,x,w,k){return g-m>x-y?function(b,T,_,M,A,S,E,D,O,R,z){for(var L=2*b,P=M,N=L*M;Pw-x?m?function(T,_,M,A,S,E,D,O,R,z,L){for(var P=2*T,N=A,B=P*A;N0;){var te=6*(W-=1),Y=T[te],Z=T[te+1],re=T[te+2],U=T[te+3],q=T[te+4],$=T[te+5],ne=2*W,H=_[ne],Q=_[ne+1],ee=1&$,ie=!!(16&$),ae=z,ue=L,le=N,ge=B;if(ee&&(ae=N,ue=B,le=z,ge=L),!(2&$&&(re=x(E,Y,Z,re,ae,ue,Q),Z>=re)||4&$&&(Z=w(E,Y,Z,re,ae,ue,H))>=re)){var fe=re-Z,me=q-U;if(ie){if(E*fe*(fe+me)<1<<22){if((G=m.scanComplete(E,Y,D,Z,re,ae,ue,U,q,le,ge))!==void 0)return G;continue}}else{if(E*Math.min(fe,me)<128){if((G=d(E,Y,D,ee,Z,re,ae,ue,U,q,le,ge))!==void 0)return G;continue}if(E*fe*me<1<<22){if((G=m.scanBipartite(E,Y,D,ee,Z,re,ae,ue,U,q,le,ge))!==void 0)return G;continue}}var _e=v(E,Y,Z,re,ae,ue,H,Q);if(Z<_e)if(E*(_e-Z)<128){if((G=h(E,Y+1,D,Z,_e,ae,ue,U,q,le,ge))!==void 0)return G}else if(Y===E-2){if((G=ee?m.sweepBipartite(E,D,U,q,le,ge,Z,_e,ae,ue):m.sweepBipartite(E,D,Z,_e,ae,ue,U,q,le,ge))!==void 0)return G}else M(W++,Y+1,Z,_e,U,q,ee,-1/0,1/0),M(W++,Y+1,U,q,Z,_e,1^ee,-1/0,1/0);if(_e=p0)&&!(p1>=hi)"),y=p("lo===p0"),x=p("lo>>1,w=2*l,k=x,b=g[w*x+d];v=S?(k=A,b=S):M>=D?(k=_,b=M):(k=E,b=D):S>=D?(k=A,b=S):D>=M?(k=_,b=M):(k=E,b=D);for(var O=w*(y-1),R=w*k,z=0;zh&&g[b+d]>w;--k,b-=v){for(var T=b,_=b+v,M=0;Mb;++b,y+=v)if(m[y+k]===p)if(w===b)w+=1,x+=v;else{for(var T=0;v>T;++T){var _=m[y+T];m[y+T]=m[x],m[x++]=_}var M=g[b];g[b]=g[w],g[w++]=M}return w},"lob;++b,y+=v)if(m[y+k]T;++T){var _=m[y+T];m[y+T]=m[x],m[x++]=_}var M=g[b];g[b]=g[w],g[w++]=M}return w},"lo<=p0":function(s,l,d,h,m,g,p){for(var v=2*s,y=v*d,x=y,w=d,k=s+l,b=d;h>b;++b,y+=v)if(m[y+k]<=p)if(w===b)w+=1,x+=v;else{for(var T=0;v>T;++T){var _=m[y+T];m[y+T]=m[x],m[x++]=_}var M=g[b];g[b]=g[w],g[w++]=M}return w},"hi<=p0":function(s,l,d,h,m,g,p){for(var v=2*s,y=v*d,x=y,w=d,k=s+l,b=d;h>b;++b,y+=v)if(m[y+k]<=p)if(w===b)w+=1,x+=v;else{for(var T=0;v>T;++T){var _=m[y+T];m[y+T]=m[x],m[x++]=_}var M=g[b];g[b]=g[w],g[w++]=M}return w},"loT;++T,y+=v){var _=m[y+k],M=m[y+b];if(_A;++A){var S=m[y+A];m[y+A]=m[x],m[x++]=S}var E=g[T];g[T]=g[w],g[w++]=E}}return w},"lo<=p0&&p0<=hi":function(s,l,d,h,m,g,p){for(var v=2*s,y=v*d,x=y,w=d,k=l,b=s+l,T=d;h>T;++T,y+=v){var _=m[y+k],M=m[y+b];if(_<=p&&p<=M)if(w===T)w+=1,x+=v;else{for(var A=0;v>A;++A){var S=m[y+A];m[y+A]=m[x],m[x++]=S}var E=g[T];g[T]=g[w],g[w++]=E}}return w},"!(lo>=p0)&&!(p1>=hi)":function(s,l,d,h,m,g,p,v){for(var y=2*s,x=y*d,w=x,k=d,b=l,T=s+l,_=d;h>_;++_,x+=y){var M=m[x+b],A=m[x+T];if(!(M>=p||v>=A))if(k===_)k+=1,w+=y;else{for(var S=0;y>S;++S){var E=m[x+S];m[x+S]=m[w],m[w++]=E}var D=g[_];g[_]=g[k],g[k++]=D}}return k}}},{}],40:[function(a,u,c){u.exports=function(p,v){v<=128?i(0,v-1,p):function y(x,w,k){var b=(w-x+1)/6|0,T=x+b,_=w-b,M=x+w>>1,A=M-b,S=M+b,E=T,D=A,O=M,R=S,z=_,L=x+1,P=w-1,N=0;m(E,D,k)&&(N=E,E=D,D=N),m(R,z,k)&&(N=R,R=z,z=N),m(E,O,k)&&(N=E,E=O,O=N),m(D,O,k)&&(N=D,D=O,O=N),m(E,R,k)&&(N=E,E=R,R=N),m(O,R,k)&&(N=O,O=R,R=N),m(D,z,k)&&(N=D,D=z,z=N),m(D,O,k)&&(N=D,D=O,O=N),m(R,z,k)&&(N=R,R=z,z=N);for(var B=k[2*D],G=k[2*D+1],W=k[2*R],K=k[2*R+1],te=2*E,Y=2*O,Z=2*z,re=2*T,U=2*M,q=2*_,$=0;$<2;++$){var ne=k[te+$],H=k[Y+$],Q=k[Z+$];k[re+$]=ne,k[U+$]=H,k[q+$]=Q}l(A,x,k),l(S,w,k);for(var ee=L;ee<=P;++ee)if(g(ee,B,G,k))ee!==L&&s(ee,L,k),++L;else if(!g(ee,W,K,k))for(;;){if(g(P,W,K,k)){g(P,B,G,k)?(d(ee,L,P,k),++L,--P):(s(ee,P,k),--P);break}if(--Pp;){var M=y[_-2],A=y[_-1];if(My[v+1])}function g(p,v,y,x){var w=x[p*=2];return w>>1;l(y,K);var te=0,Y=0;for(N=0;N=1<<28)x(m,g,Y--,Z=Z-(1<<28)|0);else if(Z>=0)x(d,h,te--,Z);else if(Z<=-(1<<28)){Z=-Z-(1<<28)|0;for(var re=0;re>>1;l(y,K);var te=0,Y=0,Z=0;for(N=0;N>1==y[2*N+3]>>1&&(U=2,N+=1),re<0){for(var q=-(re>>1)-1,$=0;$>1)-1,U===0?x(d,h,te--,q):U===1?x(m,g,Y--,q):U===2&&x(p,v,Z--,q)}},scanBipartite:function(k,b,T,_,M,A,S,E,D,O,R,z){var L=0,P=2*k,N=b,B=b+k,G=1,W=1;_?W=1<<28:G=1<<28;for(var K=M;K>>1;l(y,re);var U=0;for(K=0;K=1<<28?($=!_,te-=1<<28):($=!!_,te-=1),$)w(d,h,U++,te);else{var ne=z[te],H=P*te,Q=R[H+b+1],ee=R[H+b+1+k];e:for(var ie=0;ie>>1;l(y,te);var Y=0;for(B=0;B=1<<28)d[Y++]=G-(1<<28);else{var re=R[G-=1],U=L*G,q=O[U+b+1],$=O[U+b+1+k];e:for(var ne=0;ne=0;--ne)if(d[ne]===G){for(ie=ne+1;ie0;){for(var b=h.pop(),T=(p=h.pop(),x=-1,w=-1,v=g[p],1);T=0||(d.flip(p,b),s(l,d,h,x,p,w),s(l,d,h,p,w,x),s(l,d,h,w,b,x),s(l,d,h,b,x,w))}}},{"binary-search-bounds":31,"robust-in-sphere":282}],44:[function(a,u,c){var i,s=a("binary-search-bounds");function l(h,m,g,p,v,y,x){this.cells=h,this.neighbor=m,this.flags=p,this.constraint=g,this.active=v,this.next=y,this.boundary=x}function d(h,m){return h[0]-m[0]||h[1]-m[1]||h[2]-m[2]}u.exports=function(h,m,g){var p=function(D,O){for(var R=D.cells(),z=R.length,L=0;L0||x.length>0;){for(;y.length>0;){var _=y.pop();if(w[_]!==-v){w[_]=v,k[_];for(var M=0;M<3;++M){var A=T[3*_+M];A>=0&&w[A]===0&&(b[3*_+M]?x.push(A):(y.push(A),w[A]=v))}}}var S=x;x=y,y=S,x.length=0,v=-v}var E=function(D,O,R){for(var z=0,L=0;L1&&s(k[E[D-2]],k[E[D-1]],b)>0;)x.push([E[D-1],E[D-2],T]),D-=1;E.length=D,E.push(T);var O=S.upperIds;for(D=O.length;D>1&&s(k[O[D-2]],k[O[D-1]],b)<0;)x.push([O[D-2],O[D-1],T]),D-=1;O.length=D,O.push(T)}}function p(x,w){var k;return(k=x.a[0]S[0]&&T.push(new d(S,A,2,_),new d(A,S,1,_))}T.sort(h);for(var E=T[0].a[0]-(1+Math.abs(T[0].a[0]))*Math.pow(2,-52),D=[new l([E,1],[E,0],-1,[],[],[],[])],O=[],R=(_=0,T.length);_=0}}(),l.removeTriangle=function(h,m,g){var p=this.stars;d(p[h],m,g),d(p[m],g,h),d(p[g],h,m)},l.addTriangle=function(h,m,g){var p=this.stars;p[h].push(m,g),p[m].push(g,h),p[g].push(h,m)},l.opposite=function(h,m){for(var g=this.stars[m],p=1,v=g.length;pA[2]?1:0)}function T(M,A,S){if(M.length!==0){if(A)for(var E=0;E=0;--W){var ne=P[K=(ge=B[W])[0]],H=ne[0],Q=ne[1],ee=L[H],ie=L[Q];if((ee[0]-ie[0]||ee[1]-ie[1])<0){var ae=H;H=Q,Q=ae}ne[0]=H;var ue,le=ne[1]=ge[1];for(G&&(ue=ne[2]);W>0&&B[W-1][0]===K;){var ge,fe=(ge=B[--W])[1];G?P.push([le,fe,ue]):P.push([le,fe]),le=fe}G?P.push([le,Q,ue]):P.push([le,Q])}return te}(M,A,D,R,S));return T(A,z,S),!!z||D.length>0||R.length>0}},{"./lib/rat-seg-intersect":51,"big-rat":18,"big-rat/cmp":16,"big-rat/to-float":30,"box-intersect":35,nextafter:260,"rat-vec":273,"robust-segment-intersect":287,"union-find":309}],51:[function(a,u,c){u.exports=function(v,y,x,w){var k=h(y,v),b=h(w,x),T=p(k,b);if(d(T)===0)return null;var _=h(v,x),M=p(b,_),A=s(M,T),S=g(k,A);return m(v,S)};var i=a("big-rat/mul"),s=a("big-rat/div"),l=a("big-rat/sub"),d=a("big-rat/sign"),h=a("rat-vec/sub"),m=a("rat-vec/add"),g=a("rat-vec/muls");function p(v,y){return l(i(v[0],y[1]),i(v[1],y[0]))}},{"big-rat/div":17,"big-rat/mul":27,"big-rat/sign":28,"big-rat/sub":29,"rat-vec/add":272,"rat-vec/muls":274,"rat-vec/sub":275}],52:[function(a,u,c){u.exports={jet:[{index:0,rgb:[0,0,131]},{index:.125,rgb:[0,60,170]},{index:.375,rgb:[5,255,255]},{index:.625,rgb:[255,255,0]},{index:.875,rgb:[250,0,0]},{index:1,rgb:[128,0,0]}],hsv:[{index:0,rgb:[255,0,0]},{index:.169,rgb:[253,255,2]},{index:.173,rgb:[247,255,2]},{index:.337,rgb:[0,252,4]},{index:.341,rgb:[0,252,10]},{index:.506,rgb:[1,249,255]},{index:.671,rgb:[2,0,253]},{index:.675,rgb:[8,0,253]},{index:.839,rgb:[255,0,251]},{index:.843,rgb:[255,0,245]},{index:1,rgb:[255,0,6]}],hot:[{index:0,rgb:[0,0,0]},{index:.3,rgb:[230,0,0]},{index:.6,rgb:[255,210,0]},{index:1,rgb:[255,255,255]}],spring:[{index:0,rgb:[255,0,255]},{index:1,rgb:[255,255,0]}],summer:[{index:0,rgb:[0,128,102]},{index:1,rgb:[255,255,102]}],autumn:[{index:0,rgb:[255,0,0]},{index:1,rgb:[255,255,0]}],winter:[{index:0,rgb:[0,0,255]},{index:1,rgb:[0,255,128]}],bone:[{index:0,rgb:[0,0,0]},{index:.376,rgb:[84,84,116]},{index:.753,rgb:[169,200,200]},{index:1,rgb:[255,255,255]}],copper:[{index:0,rgb:[0,0,0]},{index:.804,rgb:[255,160,102]},{index:1,rgb:[255,199,127]}],greys:[{index:0,rgb:[0,0,0]},{index:1,rgb:[255,255,255]}],yignbu:[{index:0,rgb:[8,29,88]},{index:.125,rgb:[37,52,148]},{index:.25,rgb:[34,94,168]},{index:.375,rgb:[29,145,192]},{index:.5,rgb:[65,182,196]},{index:.625,rgb:[127,205,187]},{index:.75,rgb:[199,233,180]},{index:.875,rgb:[237,248,217]},{index:1,rgb:[255,255,217]}],greens:[{index:0,rgb:[0,68,27]},{index:.125,rgb:[0,109,44]},{index:.25,rgb:[35,139,69]},{index:.375,rgb:[65,171,93]},{index:.5,rgb:[116,196,118]},{index:.625,rgb:[161,217,155]},{index:.75,rgb:[199,233,192]},{index:.875,rgb:[229,245,224]},{index:1,rgb:[247,252,245]}],yiorrd:[{index:0,rgb:[128,0,38]},{index:.125,rgb:[189,0,38]},{index:.25,rgb:[227,26,28]},{index:.375,rgb:[252,78,42]},{index:.5,rgb:[253,141,60]},{index:.625,rgb:[254,178,76]},{index:.75,rgb:[254,217,118]},{index:.875,rgb:[255,237,160]},{index:1,rgb:[255,255,204]}],bluered:[{index:0,rgb:[0,0,255]},{index:1,rgb:[255,0,0]}],rdbu:[{index:0,rgb:[5,10,172]},{index:.35,rgb:[106,137,247]},{index:.5,rgb:[190,190,190]},{index:.6,rgb:[220,170,132]},{index:.7,rgb:[230,145,90]},{index:1,rgb:[178,10,28]}],picnic:[{index:0,rgb:[0,0,255]},{index:.1,rgb:[51,153,255]},{index:.2,rgb:[102,204,255]},{index:.3,rgb:[153,204,255]},{index:.4,rgb:[204,204,255]},{index:.5,rgb:[255,255,255]},{index:.6,rgb:[255,204,255]},{index:.7,rgb:[255,153,255]},{index:.8,rgb:[255,102,204]},{index:.9,rgb:[255,102,102]},{index:1,rgb:[255,0,0]}],rainbow:[{index:0,rgb:[150,0,90]},{index:.125,rgb:[0,0,200]},{index:.25,rgb:[0,25,255]},{index:.375,rgb:[0,152,255]},{index:.5,rgb:[44,255,150]},{index:.625,rgb:[151,255,0]},{index:.75,rgb:[255,234,0]},{index:.875,rgb:[255,111,0]},{index:1,rgb:[255,0,0]}],portland:[{index:0,rgb:[12,51,131]},{index:.25,rgb:[10,136,186]},{index:.5,rgb:[242,211,56]},{index:.75,rgb:[242,143,56]},{index:1,rgb:[217,30,30]}],blackbody:[{index:0,rgb:[0,0,0]},{index:.2,rgb:[230,0,0]},{index:.4,rgb:[230,210,0]},{index:.7,rgb:[255,255,255]},{index:1,rgb:[160,200,255]}],earth:[{index:0,rgb:[0,0,130]},{index:.1,rgb:[0,180,180]},{index:.2,rgb:[40,210,40]},{index:.4,rgb:[230,230,50]},{index:.6,rgb:[120,70,20]},{index:1,rgb:[255,255,255]}],electric:[{index:0,rgb:[0,0,0]},{index:.15,rgb:[30,0,100]},{index:.4,rgb:[120,0,100]},{index:.6,rgb:[160,90,0]},{index:.8,rgb:[230,200,0]},{index:1,rgb:[255,250,220]}],alpha:[{index:0,rgb:[255,255,255,0]},{index:1,rgb:[255,255,255,1]}],viridis:[{index:0,rgb:[68,1,84]},{index:.13,rgb:[71,44,122]},{index:.25,rgb:[59,81,139]},{index:.38,rgb:[44,113,142]},{index:.5,rgb:[33,144,141]},{index:.63,rgb:[39,173,129]},{index:.75,rgb:[92,200,99]},{index:.88,rgb:[170,220,50]},{index:1,rgb:[253,231,37]}],inferno:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[31,12,72]},{index:.25,rgb:[85,15,109]},{index:.38,rgb:[136,34,106]},{index:.5,rgb:[186,54,85]},{index:.63,rgb:[227,89,51]},{index:.75,rgb:[249,140,10]},{index:.88,rgb:[249,201,50]},{index:1,rgb:[252,255,164]}],magma:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[28,16,68]},{index:.25,rgb:[79,18,123]},{index:.38,rgb:[129,37,129]},{index:.5,rgb:[181,54,122]},{index:.63,rgb:[229,80,100]},{index:.75,rgb:[251,135,97]},{index:.88,rgb:[254,194,135]},{index:1,rgb:[252,253,191]}],plasma:[{index:0,rgb:[13,8,135]},{index:.13,rgb:[75,3,161]},{index:.25,rgb:[125,3,168]},{index:.38,rgb:[168,34,150]},{index:.5,rgb:[203,70,121]},{index:.63,rgb:[229,107,93]},{index:.75,rgb:[248,148,65]},{index:.88,rgb:[253,195,40]},{index:1,rgb:[240,249,33]}],warm:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[172,0,187]},{index:.25,rgb:[219,0,170]},{index:.38,rgb:[255,0,130]},{index:.5,rgb:[255,63,74]},{index:.63,rgb:[255,123,0]},{index:.75,rgb:[234,176,0]},{index:.88,rgb:[190,228,0]},{index:1,rgb:[147,255,0]}],cool:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[116,0,218]},{index:.25,rgb:[98,74,237]},{index:.38,rgb:[68,146,231]},{index:.5,rgb:[0,204,197]},{index:.63,rgb:[0,247,146]},{index:.75,rgb:[0,255,88]},{index:.88,rgb:[40,255,8]},{index:1,rgb:[147,255,0]}],"rainbow-soft":[{index:0,rgb:[125,0,179]},{index:.1,rgb:[199,0,180]},{index:.2,rgb:[255,0,121]},{index:.3,rgb:[255,108,0]},{index:.4,rgb:[222,194,0]},{index:.5,rgb:[150,255,0]},{index:.6,rgb:[0,255,55]},{index:.7,rgb:[0,246,150]},{index:.8,rgb:[50,167,222]},{index:.9,rgb:[103,51,235]},{index:1,rgb:[124,0,186]}],bathymetry:[{index:0,rgb:[40,26,44]},{index:.13,rgb:[59,49,90]},{index:.25,rgb:[64,76,139]},{index:.38,rgb:[63,110,151]},{index:.5,rgb:[72,142,158]},{index:.63,rgb:[85,174,163]},{index:.75,rgb:[120,206,163]},{index:.88,rgb:[187,230,172]},{index:1,rgb:[253,254,204]}],cdom:[{index:0,rgb:[47,15,62]},{index:.13,rgb:[87,23,86]},{index:.25,rgb:[130,28,99]},{index:.38,rgb:[171,41,96]},{index:.5,rgb:[206,67,86]},{index:.63,rgb:[230,106,84]},{index:.75,rgb:[242,149,103]},{index:.88,rgb:[249,193,135]},{index:1,rgb:[254,237,176]}],chlorophyll:[{index:0,rgb:[18,36,20]},{index:.13,rgb:[25,63,41]},{index:.25,rgb:[24,91,59]},{index:.38,rgb:[13,119,72]},{index:.5,rgb:[18,148,80]},{index:.63,rgb:[80,173,89]},{index:.75,rgb:[132,196,122]},{index:.88,rgb:[175,221,162]},{index:1,rgb:[215,249,208]}],density:[{index:0,rgb:[54,14,36]},{index:.13,rgb:[89,23,80]},{index:.25,rgb:[110,45,132]},{index:.38,rgb:[120,77,178]},{index:.5,rgb:[120,113,213]},{index:.63,rgb:[115,151,228]},{index:.75,rgb:[134,185,227]},{index:.88,rgb:[177,214,227]},{index:1,rgb:[230,241,241]}],"freesurface-blue":[{index:0,rgb:[30,4,110]},{index:.13,rgb:[47,14,176]},{index:.25,rgb:[41,45,236]},{index:.38,rgb:[25,99,212]},{index:.5,rgb:[68,131,200]},{index:.63,rgb:[114,156,197]},{index:.75,rgb:[157,181,203]},{index:.88,rgb:[200,208,216]},{index:1,rgb:[241,237,236]}],"freesurface-red":[{index:0,rgb:[60,9,18]},{index:.13,rgb:[100,17,27]},{index:.25,rgb:[142,20,29]},{index:.38,rgb:[177,43,27]},{index:.5,rgb:[192,87,63]},{index:.63,rgb:[205,125,105]},{index:.75,rgb:[216,162,148]},{index:.88,rgb:[227,199,193]},{index:1,rgb:[241,237,236]}],oxygen:[{index:0,rgb:[64,5,5]},{index:.13,rgb:[106,6,15]},{index:.25,rgb:[144,26,7]},{index:.38,rgb:[168,64,3]},{index:.5,rgb:[188,100,4]},{index:.63,rgb:[206,136,11]},{index:.75,rgb:[220,174,25]},{index:.88,rgb:[231,215,44]},{index:1,rgb:[248,254,105]}],par:[{index:0,rgb:[51,20,24]},{index:.13,rgb:[90,32,35]},{index:.25,rgb:[129,44,34]},{index:.38,rgb:[159,68,25]},{index:.5,rgb:[182,99,19]},{index:.63,rgb:[199,134,22]},{index:.75,rgb:[212,171,35]},{index:.88,rgb:[221,210,54]},{index:1,rgb:[225,253,75]}],phase:[{index:0,rgb:[145,105,18]},{index:.13,rgb:[184,71,38]},{index:.25,rgb:[186,58,115]},{index:.38,rgb:[160,71,185]},{index:.5,rgb:[110,97,218]},{index:.63,rgb:[50,123,164]},{index:.75,rgb:[31,131,110]},{index:.88,rgb:[77,129,34]},{index:1,rgb:[145,105,18]}],salinity:[{index:0,rgb:[42,24,108]},{index:.13,rgb:[33,50,162]},{index:.25,rgb:[15,90,145]},{index:.38,rgb:[40,118,137]},{index:.5,rgb:[59,146,135]},{index:.63,rgb:[79,175,126]},{index:.75,rgb:[120,203,104]},{index:.88,rgb:[193,221,100]},{index:1,rgb:[253,239,154]}],temperature:[{index:0,rgb:[4,35,51]},{index:.13,rgb:[23,51,122]},{index:.25,rgb:[85,59,157]},{index:.38,rgb:[129,79,143]},{index:.5,rgb:[175,95,130]},{index:.63,rgb:[222,112,101]},{index:.75,rgb:[249,146,66]},{index:.88,rgb:[249,196,65]},{index:1,rgb:[232,250,91]}],turbidity:[{index:0,rgb:[34,31,27]},{index:.13,rgb:[65,50,41]},{index:.25,rgb:[98,69,52]},{index:.38,rgb:[131,89,57]},{index:.5,rgb:[161,112,59]},{index:.63,rgb:[185,140,66]},{index:.75,rgb:[202,174,88]},{index:.88,rgb:[216,209,126]},{index:1,rgb:[233,246,171]}],"velocity-blue":[{index:0,rgb:[17,32,64]},{index:.13,rgb:[35,52,116]},{index:.25,rgb:[29,81,156]},{index:.38,rgb:[31,113,162]},{index:.5,rgb:[50,144,169]},{index:.63,rgb:[87,173,176]},{index:.75,rgb:[149,196,189]},{index:.88,rgb:[203,221,211]},{index:1,rgb:[254,251,230]}],"velocity-green":[{index:0,rgb:[23,35,19]},{index:.13,rgb:[24,64,38]},{index:.25,rgb:[11,95,45]},{index:.38,rgb:[39,123,35]},{index:.5,rgb:[95,146,12]},{index:.63,rgb:[152,165,18]},{index:.75,rgb:[201,186,69]},{index:.88,rgb:[233,216,137]},{index:1,rgb:[255,253,205]}],cubehelix:[{index:0,rgb:[0,0,0]},{index:.07,rgb:[22,5,59]},{index:.13,rgb:[60,4,105]},{index:.2,rgb:[109,1,135]},{index:.27,rgb:[161,0,147]},{index:.33,rgb:[210,2,142]},{index:.4,rgb:[251,11,123]},{index:.47,rgb:[255,29,97]},{index:.53,rgb:[255,54,69]},{index:.6,rgb:[255,85,46]},{index:.67,rgb:[255,120,34]},{index:.73,rgb:[255,157,37]},{index:.8,rgb:[241,191,57]},{index:.87,rgb:[224,220,93]},{index:.93,rgb:[218,241,142]},{index:1,rgb:[227,253,198]}]}},{}],53:[function(a,u,c){var i=a("./colorScale"),s=a("lerp");function l(m){return[m[0]/255,m[1]/255,m[2]/255,m[3]]}function d(m){for(var g,p="#",v=0;v<3;++v)p+=("00"+(g=(g=m[v]).toString(16))).substr(g.length);return p}function h(m){return"rgba("+m.join(",")+")"}u.exports=function(m){var g,p,v,y,x,w,k,b,T,_;if(m||(m={}),b=(m.nshades||72)-1,k=m.format||"hex",(w=m.colormap)||(w="jet"),typeof w=="string"){if(w=w.toLowerCase(),!i[w])throw Error(w+" not a supported colorscale");x=i[w]}else{if(!Array.isArray(w))throw Error("unsupported colormap option",w);x=w.slice()}if(x.length>b+1)throw new Error(w+" map requires nshades to be at least size "+x.length);T=Array.isArray(m.alpha)?m.alpha.length!==2?[1,1]:m.alpha.slice():typeof m.alpha=="number"?[m.alpha,m.alpha]:[1,1],g=x.map(function(D){return Math.round(D.index*b)}),T[0]=Math.min(Math.max(T[0],0),1),T[1]=Math.min(Math.max(T[1],0),1);var M=x.map(function(D,O){var R=x[O].index,z=x[O].rgb.slice();return z.length===4&&z[3]>=0&&z[3]<=1||(z[3]=T[0]+(T[1]-T[0])*R),z}),A=[];for(_=0;_0||m(g,p,y)?-1:1:w===0?k>0||m(g,p,v)?1:-1:s(k-w)}var _=i(g,p,v);return _>0?x>0&&i(g,p,y)>0?1:-1:_<0?x>0||i(g,p,y)>0?1:-1:i(g,p,y)>0||m(g,p,v)?1:-1};var i=a("robust-orientation"),s=a("signum"),l=a("two-sum"),d=a("robust-product"),h=a("robust-sum");function m(g,p,v){var y=l(g[0],-p[0]),x=l(g[1],-p[1]),w=l(v[0],-p[0]),k=l(v[1],-p[1]),b=h(d(y,w),d(x,k));return b[b.length-1]>=0}},{"robust-orientation":284,"robust-product":285,"robust-sum":289,signum:55,"two-sum":307}],55:[function(a,u,c){u.exports=function(i){return i<0?-1:i>0?1:0}},{}],56:[function(a,u,c){u.exports=function(l,d){var h=l.length,m=l.length-d.length;if(m)return m;switch(h){case 0:return 0;case 1:return l[0]-d[0];case 2:return l[0]+l[1]-d[0]-d[1]||i(l[0],l[1])-i(d[0],d[1]);case 3:var g=l[0]+l[1],p=d[0]+d[1];if(m=g+l[2]-(p+d[2]))return m;var v=i(l[0],l[1]),y=i(d[0],d[1]);return i(v,l[2])-i(y,d[2])||i(v+l[2],g)-i(y+d[2],p);case 4:var x=l[0],w=l[1],k=l[2],b=l[3],T=d[0],_=d[1],M=d[2],A=d[3];return x+w+k+b-(T+_+M+A)||i(x,w,k,b)-i(T,_,M,A,T)||i(x+w,x+k,x+b,w+k,w+b,k+b)-i(T+_,T+M,T+A,_+M,_+A,M+A)||i(x+w+k,x+w+b,x+k+b,w+k+b)-i(T+_+M,T+_+A,T+M+A,_+M+A);default:for(var S=l.slice().sort(s),E=d.slice().sort(s),D=0;Di[l][0]&&(l=d);return sl?[[l],[s]]:[[s]]}},{}],60:[function(a,u,c){u.exports=function(s){var l=i(s),d=l.length;if(d<=2)return[];for(var h=new Array(d),m=l[d-1],g=0;g=v[_]&&(T+=1);k[b]=T}}return p}(i(m,!0),h)}};var i=a("incremental-convex-hull"),s=a("affine-hull")},{"affine-hull":10,"incremental-convex-hull":233}],62:[function(a,u,c){u.exports=function(i,s,l,d,h,m){var g=h-1,p=h*h,v=g*g,y=(1+2*h)*v,x=h*v,w=p*(3-2*h),k=p*g;if(i.length){m||(m=new Array(i.length));for(var b=i.length-1;b>=0;--b)m[b]=y*i[b]+x*s[b]+w*l[b]+k*d[b];return m}return y*i+x*s+w*l+k*d},u.exports.derivative=function(i,s,l,d,h,m){var g=6*h*h-6*h,p=3*h*h-4*h+1,v=-6*h*h+6*h,y=3*h*h-2*h;if(i.length){m||(m=new Array(i.length));for(var x=i.length-1;x>=0;--x)m[x]=g*i[x]+p*s[x]+v*l[x]+y*d[x];return m}return g*i+p*s+v*l[x]+y*d}},{}],63:[function(a,u,c){var i=a("incremental-convex-hull"),s=a("uniq");function l(h,m){this.point=h,this.index=m}function d(h,m){for(var g=h.point,p=m.point,v=g.length,y=0;y=2)return!1;R[L]=P}return!0}):O.filter(function(R){for(var z=0;z<=p;++z){var L=A[R[z]];if(L<0)return!1;R[z]=L}return!0}),1&p)for(x=0;x>>31},u.exports.exponent=function(m){return(u.exports.hi(m)<<1>>>21)-1023},u.exports.fraction=function(m){var g=u.exports.lo(m),p=u.exports.hi(m),v=1048575&p;return 2146435072&p&&(v+=1<<20),[g,v]},u.exports.denormalized=function(m){return!(2146435072&u.exports.hi(m))}}).call(this)}).call(this,a("buffer").Buffer)},{buffer:3}],65:[function(a,u,c){u.exports=function(i,s){switch(s===void 0&&(s=0),typeof i){case"number":if(i>0)return function(l,d){var h,m;for(h=new Array(l),m=0;m=v-1){_=w.length-1;var A=g-p[v-1];for(M=0;M=v-1)for(var T=w.length-1,_=(p[v-1],0);_=0;--v)if(g[--p])return!1;return!0},h.jump=function(g){var p=this.lastT(),v=this.dimension;if(!(g0;--M)y.push(l(b[M-1],T[M-1],arguments[M])),x.push(0)}},h.push=function(g){var p=this.lastT(),v=this.dimension;if(!(g1e-6?1/k:0;this._time.push(g);for(var A=v;A>0;--A){var S=l(T[A-1],_[A-1],arguments[A]);y.push(S),x.push((S-y[w++])*M)}}},h.set=function(g){var p=this.dimension;if(!(g0;--b)v.push(l(w[b-1],k[b-1],arguments[b])),y.push(0)}},h.move=function(g){var p=this.lastT(),v=this.dimension;if(!(g<=p||arguments.length!==v+1)){var y=this._state,x=this._velocity,w=y.length-this.dimension,k=this.bounds,b=k[0],T=k[1],_=g-p,M=_>1e-6?1/_:0;this._time.push(g);for(var A=v;A>0;--A){var S=arguments[A];y.push(l(b[A-1],T[A-1],y[w++]+S)),x.push(S*M)}}},h.idle=function(g){var p=this.lastT();if(!(g=0;--M)y.push(l(b[M],T[M],y[w]+_*x[w])),x.push(0),w+=1}}},{"binary-search-bounds":31,"cubic-hermite":62}],69:[function(a,u,c){u.exports=function(b){return new h(b||k,null)};function i(b,T,_,M,A,S){this._color=b,this.key=T,this.value=_,this.left=M,this.right=A,this._count=S}function s(b){return new i(b._color,b.key,b.value,b.left,b.right,b._count)}function l(b,T){return new i(b,T.key,T.value,T.left,T.right,T._count)}function d(b){b._count=1+(b.left?b.left._count:0)+(b.right?b.right._count:0)}function h(b,T){this._compare=b,this.root=T}var m=h.prototype;function g(b,T){var _;return T.left&&(_=g(b,T.left))?_:(_=b(T.key,T.value))||(T.right?g(b,T.right):void 0)}function p(b,T,_,M){if(T(b,M.key)<=0){var A;if(M.left&&(A=p(b,T,_,M.left))||(A=_(M.key,M.value)))return A}if(M.right)return p(b,T,_,M.right)}function v(b,T,_,M,A){var S,E=_(b,A.key),D=_(T,A.key);if(E<=0&&(A.left&&(S=v(b,T,_,M,A.left))||D>0&&(S=M(A.key,A.value))))return S;if(D>0&&A.right)return v(b,T,_,M,A.right)}function y(b,T){this.tree=b,this._stack=T}Object.defineProperty(m,"keys",{get:function(){var b=[];return this.forEach(function(T,_){b.push(T)}),b}}),Object.defineProperty(m,"values",{get:function(){var b=[];return this.forEach(function(T,_){b.push(_)}),b}}),Object.defineProperty(m,"length",{get:function(){return this.root?this.root._count:0}}),m.insert=function(b,T){for(var _=this._compare,M=this.root,A=[],S=[];M;){var E=_(b,M.key);A.push(M),S.push(E),M=E<=0?M.left:M.right}A.push(new i(0,b,T,null,null,1));for(var D=A.length-2;D>=0;--D)M=A[D],S[D]<=0?A[D]=new i(M._color,M.key,M.value,A[D+1],M.right,M._count+1):A[D]=new i(M._color,M.key,M.value,M.left,A[D+1],M._count+1);for(D=A.length-1;D>1;--D){var O=A[D-1];if(M=A[D],O._color===1||M._color===1)break;var R=A[D-2];if(R.left===O)if(O.left===M){if(!(z=R.right)||z._color!==0){R._color=0,R.left=O.right,O._color=1,O.right=R,A[D-2]=O,A[D-1]=M,d(R),d(O),D>=3&&((L=A[D-3]).left===R?L.left=O:L.right=O);break}O._color=1,R.right=l(1,z),R._color=0,D-=1}else{if(!(z=R.right)||z._color!==0){O.right=M.left,R._color=0,R.left=M.right,M._color=1,M.left=O,M.right=R,A[D-2]=M,A[D-1]=O,d(R),d(O),d(M),D>=3&&((L=A[D-3]).left===R?L.left=M:L.right=M);break}O._color=1,R.right=l(1,z),R._color=0,D-=1}else if(O.right===M){if(!(z=R.left)||z._color!==0){R._color=0,R.right=O.left,O._color=1,O.left=R,A[D-2]=O,A[D-1]=M,d(R),d(O),D>=3&&((L=A[D-3]).right===R?L.right=O:L.left=O);break}O._color=1,R.left=l(1,z),R._color=0,D-=1}else{var z;if(!(z=R.left)||z._color!==0){var L;O.left=M.right,R._color=0,R.right=M.left,M._color=1,M.right=O,M.left=R,A[D-2]=M,A[D-1]=O,d(R),d(O),d(M),D>=3&&((L=A[D-3]).right===R?L.right=M:L.left=M);break}O._color=1,R.left=l(1,z),R._color=0,D-=1}}return A[0]._color=1,new h(_,A[0])},m.forEach=function(b,T,_){if(this.root)switch(arguments.length){case 1:return g(b,this.root);case 2:return p(T,this._compare,b,this.root);case 3:return this._compare(T,_)>=0?void 0:v(T,_,this._compare,b,this.root)}},Object.defineProperty(m,"begin",{get:function(){for(var b=[],T=this.root;T;)b.push(T),T=T.left;return new y(this,b)}}),Object.defineProperty(m,"end",{get:function(){for(var b=[],T=this.root;T;)b.push(T),T=T.right;return new y(this,b)}}),m.at=function(b){if(b<0)return new y(this,[]);for(var T=this.root,_=[];;){if(_.push(T),T.left){if(b=T.right._count)break;T=T.right}return new y(this,[])},m.ge=function(b){for(var T=this._compare,_=this.root,M=[],A=0;_;){var S=T(b,_.key);M.push(_),S<=0&&(A=M.length),_=S<=0?_.left:_.right}return M.length=A,new y(this,M)},m.gt=function(b){for(var T=this._compare,_=this.root,M=[],A=0;_;){var S=T(b,_.key);M.push(_),S<0&&(A=M.length),_=S<0?_.left:_.right}return M.length=A,new y(this,M)},m.lt=function(b){for(var T=this._compare,_=this.root,M=[],A=0;_;){var S=T(b,_.key);M.push(_),S>0&&(A=M.length),_=S<=0?_.left:_.right}return M.length=A,new y(this,M)},m.le=function(b){for(var T=this._compare,_=this.root,M=[],A=0;_;){var S=T(b,_.key);M.push(_),S>=0&&(A=M.length),_=S<0?_.left:_.right}return M.length=A,new y(this,M)},m.find=function(b){for(var T=this._compare,_=this.root,M=[];_;){var A=T(b,_.key);if(M.push(_),A===0)return new y(this,M);_=A<=0?_.left:_.right}return new y(this,[])},m.remove=function(b){var T=this.find(b);return T?T.remove():this},m.get=function(b){for(var T=this._compare,_=this.root;_;){var M=T(b,_.key);if(M===0)return _.value;_=M<=0?_.left:_.right}};var x=y.prototype;function w(b,T){b.key=T.key,b.value=T.value,b.left=T.left,b.right=T.right,b._color=T._color,b._count=T._count}function k(b,T){return bT?1:0}Object.defineProperty(x,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(x,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),x.clone=function(){return new y(this.tree,this._stack.slice())},x.remove=function(){var b=this._stack;if(b.length===0)return this.tree;var T=new Array(b.length),_=b[b.length-1];T[T.length-1]=new i(_._color,_.key,_.value,_.left,_.right,_._count);for(var M=b.length-2;M>=0;--M)(_=b[M]).left===b[M+1]?T[M]=new i(_._color,_.key,_.value,T[M+1],_.right,_._count):T[M]=new i(_._color,_.key,_.value,_.left,T[M+1],_._count);if((_=T[T.length-1]).left&&_.right){var A=T.length;for(_=_.left;_.right;)T.push(_),_=_.right;var S=T[A-1];for(T.push(new i(_._color,S.key,S.value,_.left,_.right,_._count)),T[A-1].key=_.key,T[A-1].value=_.value,M=T.length-2;M>=A;--M)_=T[M],T[M]=new i(_._color,_.key,_.value,_.left,T[M+1],_._count);T[A-1].left=T[A]}if((_=T[T.length-1])._color===0){var E=T[T.length-2];for(E.left===_?E.left=null:E.right===_&&(E.right=null),T.pop(),M=0;M=0;--N){if(R=O[N],N===0)return void(R._color=1);if((z=O[N-1]).left===R){if((L=z.right).right&&L.right._color===0)return P=(L=z.right=s(L)).right=s(L.right),z.right=L.left,L.left=z,L.right=P,L._color=z._color,R._color=1,z._color=1,P._color=1,d(z),d(L),N>1&&((B=O[N-2]).left===z?B.left=L:B.right=L),void(O[N-1]=L);if(L.left&&L.left._color===0)return P=(L=z.right=s(L)).left=s(L.left),z.right=P.left,L.left=P.right,P.left=z,P.right=L,P._color=z._color,z._color=1,L._color=1,R._color=1,d(z),d(L),d(P),N>1&&((B=O[N-2]).left===z?B.left=P:B.right=P),void(O[N-1]=P);if(L._color===1){if(z._color===0)return z._color=1,void(z.right=l(0,L));z.right=l(0,L);continue}L=s(L),z.right=L.left,L.left=z,L._color=z._color,z._color=0,d(z),d(L),N>1&&((B=O[N-2]).left===z?B.left=L:B.right=L),O[N-1]=L,O[N]=z,N+11&&((B=O[N-2]).right===z?B.right=L:B.left=L),void(O[N-1]=L);if(L.right&&L.right._color===0)return P=(L=z.left=s(L)).right=s(L.right),z.left=P.right,L.right=P.left,P.right=z,P.left=L,P._color=z._color,z._color=1,L._color=1,R._color=1,d(z),d(L),d(P),N>1&&((B=O[N-2]).right===z?B.right=P:B.left=P),void(O[N-1]=P);if(L._color===1){if(z._color===0)return z._color=1,void(z.left=l(0,L));z.left=l(0,L);continue}var B;L=s(L),z.left=L.right,L.right=z,L._color=z._color,z._color=0,d(z),d(L),N>1&&((B=O[N-2]).right===z?B.right=L:B.left=L),O[N-1]=L,O[N]=z,N+10)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(x,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(x,"index",{get:function(){var b=0,T=this._stack;if(T.length===0){var _=this.tree.root;return _?_._count:0}T[T.length-1].left&&(b=T[T.length-1].left._count);for(var M=T.length-2;M>=0;--M)T[M+1]===T[M].right&&(++b,T[M].left&&(b+=T[M].left._count));return b},enumerable:!0}),x.next=function(){var b=this._stack;if(b.length!==0){var T=b[b.length-1];if(T.right)for(T=T.right;T;)b.push(T),T=T.left;else for(b.pop();b.length>0&&b[b.length-1].right===T;)T=b[b.length-1],b.pop()}},Object.defineProperty(x,"hasNext",{get:function(){var b=this._stack;if(b.length===0)return!1;if(b[b.length-1].right)return!0;for(var T=b.length-1;T>0;--T)if(b[T-1].left===b[T])return!0;return!1}}),x.update=function(b){var T=this._stack;if(T.length===0)throw new Error("Can't update empty node!");var _=new Array(T.length),M=T[T.length-1];_[_.length-1]=new i(M._color,M.key,b,M.left,M.right,M._count);for(var A=T.length-2;A>=0;--A)(M=T[A]).left===T[A+1]?_[A]=new i(M._color,M.key,M.value,_[A+1],M.right,M._count):_[A]=new i(M._color,M.key,M.value,M.left,_[A+1],M._count);return new h(this.tree._compare,_[0])},x.prev=function(){var b=this._stack;if(b.length!==0){var T=b[b.length-1];if(T.left)for(T=T.left;T;)b.push(T),T=T.right;else for(b.pop();b.length>0&&b[b.length-1].left===T;)T=b[b.length-1],b.pop()}},Object.defineProperty(x,"hasPrev",{get:function(){var b=this._stack;if(b.length===0)return!1;if(b[b.length-1].left)return!0;for(var T=b.length-1;T>0;--T)if(b[T-1].right===b[T])return!0;return!1}})},{}],70:[function(a,u,c){u.exports=function(A,S){var E=new p(A);return E.update(S),E};var i=a("./lib/text.js"),s=a("./lib/lines.js"),l=a("./lib/background.js"),d=a("./lib/cube.js"),h=a("./lib/ticks.js"),m=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);function g(A,S){return A[0]=S[0],A[1]=S[1],A[2]=S[2],A}function p(A){this.gl=A,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont="sans-serif",this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=l(A)}var v=p.prototype;function y(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}v.update=function(A){function S(K,te,Y){if(Y in A){var Z,re=A[Y],U=this[Y];(K?Array.isArray(re)&&Array.isArray(re[0]):Array.isArray(re))?this[Y]=Z=[te(re[0]),te(re[1]),te(re[2])]:this[Y]=Z=[te(re),te(re),te(re)];for(var q=0;q<3;++q)if(Z[q]!==U[q])return!0}return!1}A=A||{};var E,D=S.bind(this,!1,Number),O=S.bind(this,!1,Boolean),R=S.bind(this,!1,String),z=S.bind(this,!0,function(K){if(Array.isArray(K)){if(K.length===3)return[+K[0],+K[1],+K[2],1];if(K.length===4)return[+K[0],+K[1],+K[2],+K[3]]}return[0,0,0,1]}),L=!1,P=!1;if("bounds"in A)for(var N=A.bounds,B=0;B<2;++B)for(var G=0;G<3;++G)N[B][G]!==this.bounds[B][G]&&(P=!0),this.bounds[B][G]=N[B][G];if("ticks"in A)for(E=A.ticks,L=!0,this.autoTicks=!1,B=0;B<3;++B)this.tickSpacing[B]=0;else D("tickSpacing")&&(this.autoTicks=!0,P=!0);if(this._firstInit&&("ticks"in A||"tickSpacing"in A||(this.autoTicks=!0),P=!0,L=!0,this._firstInit=!1),P&&this.autoTicks&&(E=h.create(this.bounds,this.tickSpacing),L=!0),L){for(B=0;B<3;++B)E[B].sort(function(K,te){return K.x-te.x});h.equal(E,this.ticks)?L=!1:this.ticks=E}O("tickEnable"),R("tickFont")&&(L=!0),D("tickSize"),D("tickAngle"),D("tickPad"),z("tickColor");var W=R("labels");R("labelFont")&&(W=!0),O("labelEnable"),D("labelSize"),D("labelPad"),z("labelColor"),O("lineEnable"),O("lineMirror"),D("lineWidth"),z("lineColor"),O("lineTickEnable"),O("lineTickMirror"),D("lineTickLength"),D("lineTickWidth"),z("lineTickColor"),O("gridEnable"),D("gridWidth"),z("gridColor"),O("zeroEnable"),z("zeroLineColor"),D("zeroLineWidth"),O("backgroundEnable"),z("backgroundColor"),this._text?this._text&&(W||L)&&this._text.update(this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont):this._text=i(this.gl,this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont),this._lines&&L&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=s(this.gl,this.bounds,this.ticks))};var x=[new y,new y,new y];function w(A,S,E,D,O){for(var R=A.primalOffset,z=A.primalMinor,L=A.mirrorOffset,P=A.mirrorMinor,N=D[S],B=0;B<3;++B)if(S!==B){var G=R,W=L,K=z,te=P;N&1<0?(K[B]=-1,te[B]=0):(K[B]=0,te[B]=1)}}var k=[0,0,0],b={model:m,view:m,projection:m,_ortho:!1};v.isOpaque=function(){return!0},v.isTransparent=function(){return!1},v.drawTransparent=function(A){};var T=[0,0,0],_=[0,0,0],M=[0,0,0];v.draw=function(A){A=A||b;for(var S=this.gl,E=A.model||m,D=A.view||m,O=A.projection||m,R=this.bounds,z=A._ortho||!1,L=d(E,D,O,R,z),P=L.cubeEdges,N=L.axis,B=D[12],G=D[13],W=D[14],K=D[15],te=(z?2:1)*this.pixelRatio*(O[3]*B+O[7]*G+O[11]*W+O[15]*K)/S.drawingBufferHeight,Y=0;Y<3;++Y)this.lastCubeProps.cubeEdges[Y]=P[Y],this.lastCubeProps.axis[Y]=N[Y];var Z=x;for(Y=0;Y<3;++Y)w(x[Y],Y,this.bounds,P,N);S=this.gl;var re,U=k;for(Y=0;Y<3;++Y)this.backgroundEnable[Y]?U[Y]=N[Y]:U[Y]=0;for(this._background.draw(E,D,O,R,U,this.backgroundColor),this._lines.bind(E,D,O,this),Y=0;Y<3;++Y){var q=[0,0,0];N[Y]>0?q[Y]=R[1][Y]:q[Y]=R[0][Y];for(var $=0;$<2;++$){var ne=(Y+1+$)%3,H=(Y+1+(1^$))%3;this.gridEnable[ne]&&this._lines.drawGrid(ne,H,this.bounds,q,this.gridColor[ne],this.gridWidth[ne]*this.pixelRatio)}for($=0;$<2;++$)ne=(Y+1+$)%3,H=(Y+1+(1^$))%3,this.zeroEnable[H]&&Math.min(R[0][H],R[1][H])<=0&&Math.max(R[0][H],R[1][H])>=0&&this._lines.drawZero(ne,H,this.bounds,q,this.zeroLineColor[H],this.zeroLineWidth[H]*this.pixelRatio)}for(Y=0;Y<3;++Y){this.lineEnable[Y]&&this._lines.drawAxisLine(Y,this.bounds,Z[Y].primalOffset,this.lineColor[Y],this.lineWidth[Y]*this.pixelRatio),this.lineMirror[Y]&&this._lines.drawAxisLine(Y,this.bounds,Z[Y].mirrorOffset,this.lineColor[Y],this.lineWidth[Y]*this.pixelRatio);var Q=g(T,Z[Y].primalMinor),ee=g(_,Z[Y].mirrorMinor),ie=this.lineTickLength;for($=0;$<3;++$){var ae=te/E[5*$];Q[$]*=ie[$]*ae,ee[$]*=ie[$]*ae}this.lineTickEnable[Y]&&this._lines.drawAxisTicks(Y,Z[Y].primalOffset,Q,this.lineTickColor[Y],this.lineTickWidth[Y]*this.pixelRatio),this.lineTickMirror[Y]&&this._lines.drawAxisTicks(Y,Z[Y].mirrorOffset,ee,this.lineTickColor[Y],this.lineTickWidth[Y]*this.pixelRatio)}this._lines.unbind(),this._text.bind(E,D,O,this.pixelRatio);var ue,le;function ge(Oe){(le=[0,0,0])[Oe]=1}function fe(Oe,de,ye){var Me=(Oe+1)%3,ke=(Oe+2)%3,Ee=de[Me],ze=de[ke],Fe=ye[Me],Ve=ye[ke];Ee>0&&Ve>0||Ee>0&&Ve<0||Ee<0&&Ve>0||Ee<0&&Ve<0?ge(Me):(ze>0&&Fe>0||ze>0&&Fe<0||ze<0&&Fe>0||ze<0&&Fe<0)&&ge(ke)}for(Y=0;Y<3;++Y){var me=Z[Y].primalMinor,_e=Z[Y].mirrorMinor,we=g(M,Z[Y].primalOffset);for($=0;$<3;++$)this.lineTickEnable[Y]&&(we[$]+=te*me[$]*Math.max(this.lineTickLength[$],0)/E[5*$]);var Te=[0,0,0];if(Te[Y]=1,this.tickEnable[Y]){for(this.tickAngle[Y]===-3600?(this.tickAngle[Y]=0,this.tickAlign[Y]="auto"):this.tickAlign[Y]=-1,ue=1,(re=[this.tickAlign[Y],.5,ue])[0]==="auto"?re[0]=0:re[0]=parseInt(""+re[0]),le=[0,0,0],fe(Y,me,_e),$=0;$<3;++$)we[$]+=te*me[$]*this.tickPad[$]/E[5*$];this._text.drawTicks(Y,this.tickSize[Y],this.tickAngle[Y],we,this.tickColor[Y],Te,le,re)}if(this.labelEnable[Y]){for(ue=0,le=[0,0,0],this.labels[Y].length>4&&(ge(Y),ue=1),(re=[this.labelAlign[Y],.5,ue])[0]==="auto"?re[0]=0:re[0]=parseInt(""+re[0]),$=0;$<3;++$)we[$]+=te*me[$]*this.labelPad[$]/E[5*$];we[Y]+=.5*(R[0][Y]+R[1][Y]),this._text.drawLabel(Y,this.labelSize[Y],this.labelAngle[Y],we,this.labelColor[Y],[0,0,0],le,re)}}this._text.unbind()},v.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null}},{"./lib/background.js":71,"./lib/cube.js":72,"./lib/lines.js":73,"./lib/text.js":75,"./lib/ticks.js":76}],71:[function(a,u,c){u.exports=function(m){for(var g=[],p=[],v=0,y=0;y<3;++y)for(var x=(y+1)%3,w=(y+2)%3,k=[0,0,0],b=[0,0,0],T=-1;T<=1;T+=2){p.push(v,v+2,v+1,v+1,v+2,v+3),k[y]=T,b[y]=T;for(var _=-1;_<=1;_+=2){k[x]=_;for(var M=-1;M<=1;M+=2)k[w]=M,g.push(k[0],k[1],k[2],b[0],b[1],b[2]),v+=1}var A=x;x=w,w=A}var S=i(m,new Float32Array(g)),E=i(m,new Uint16Array(p),m.ELEMENT_ARRAY_BUFFER),D=s(m,[{buffer:S,type:m.FLOAT,size:3,offset:0,stride:24},{buffer:S,type:m.FLOAT,size:3,offset:12,stride:24}],E),O=l(m);return O.attributes.position.location=0,O.attributes.normal.location=1,new d(m,S,D,O)};var i=a("gl-buffer"),s=a("gl-vao"),l=a("./shaders").bg;function d(m,g,p,v){this.gl=m,this.buffer=g,this.vao=p,this.shader=v}var h=d.prototype;h.draw=function(m,g,p,v,y,x){for(var w=!1,k=0;k<3;++k)w=w||y[k];if(w){var b=this.gl;b.enable(b.POLYGON_OFFSET_FILL),b.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:m,view:g,projection:p,bounds:v,enable:y,colors:x},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),b.disable(b.POLYGON_OFFSET_FILL)}},h.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},{"./shaders":74,"gl-buffer":78,"gl-vao":150}],72:[function(a,u,c){u.exports=function(_,M,A,S,E){s(h,M,_),s(h,A,h);for(var D=0,O=0;O<2;++O){p[2]=S[O][2];for(var R=0;R<2;++R){p[1]=S[R][1];for(var z=0;z<2;++z)p[0]=S[z][0],y(m[D],p,h),D+=1}}var L=-1;for(O=0;O<8;++O){for(var P=m[O][3],N=0;N<3;++N)g[O][N]=m[O][N]/P;E&&(g[O][2]*=-1),P<0&&(L<0||g[O][2]K&&(L|=1<K&&(L|=1<g[O][1])&&(ne=O);var H=-1;for(O=0;O<3;++O)(ee=ne^1<g[Q][0]&&(Q=ee))}var ie=k;ie[0]=ie[1]=ie[2]=0,ie[i.log2(H^ne)]=ne&H,ie[i.log2(ne^Q)]=ne&Q;var ae=7^Q;ae===L||ae===$?(ae=7^H,ie[i.log2(Q^ae)]=ae&Q):ie[i.log2(H^ae)]=ae&H;var ue=b,le=L;for(B=0;B<3;++B)ue[B]=le&1< HALF_PI) && (b <= ONE_AND_HALF_PI)) ? + b - PI : + b; +} + +float look_horizontal_or_vertical(float a, float ratio) { + // ratio controls the ratio between being horizontal to (vertical + horizontal) + // if ratio is set to 0.5 then it is 50%, 50%. + // when using a higher ratio e.g. 0.75 the result would + // likely be more horizontal than vertical. + + float b = positive_angle(a); + + return + (b < ( ratio) * HALF_PI) ? 0.0 : + (b < (2.0 - ratio) * HALF_PI) ? -HALF_PI : + (b < (2.0 + ratio) * HALF_PI) ? 0.0 : + (b < (4.0 - ratio) * HALF_PI) ? HALF_PI : + 0.0; +} + +float roundTo(float a, float b) { + return float(b * floor((a + 0.5 * b) / b)); +} + +float look_round_n_directions(float a, int n) { + float b = positive_angle(a); + float div = TWO_PI / float(n); + float c = roundTo(b, div); + return look_upwards(c); +} + +float applyAlignOption(float rawAngle, float delta) { + return + (option > 2) ? look_round_n_directions(rawAngle + delta, option) : // option 3-n: round to n directions + (option == 2) ? look_horizontal_or_vertical(rawAngle + delta, hv_ratio) : // horizontal or vertical + (option == 1) ? rawAngle + delta : // use free angle, and flip to align with one direction of the axis + (option == 0) ? look_upwards(rawAngle) : // use free angle, and stay upwards + (option ==-1) ? 0.0 : // useful for backward compatibility, all texts remains horizontal + rawAngle; // otherwise return back raw input angle +} + +bool isAxisTitle = (axis.x == 0.0) && + (axis.y == 0.0) && + (axis.z == 0.0); + +void main() { + //Compute world offset + float axisDistance = position.z; + vec3 dataPosition = axisDistance * axis + offset; + + float beta = angle; // i.e. user defined attributes for each tick + + float axisAngle; + float clipAngle; + float flip; + + if (enableAlign) { + axisAngle = (isAxisTitle) ? HALF_PI : + computeViewAngle(dataPosition, dataPosition + axis); + clipAngle = computeViewAngle(dataPosition, dataPosition + alignDir); + + axisAngle += (sin(axisAngle) < 0.0) ? PI : 0.0; + clipAngle += (sin(clipAngle) < 0.0) ? PI : 0.0; + + flip = (dot(vec2(cos(axisAngle), sin(axisAngle)), + vec2(sin(clipAngle),-cos(clipAngle))) > 0.0) ? 1.0 : 0.0; + + beta += applyAlignOption(clipAngle, flip * PI); + } + + //Compute plane offset + vec2 planeCoord = position.xy * pixelScale; + + mat2 planeXform = scale * mat2( + cos(beta), sin(beta), + -sin(beta), cos(beta) + ); + + vec2 viewOffset = 2.0 * planeXform * planeCoord / resolution; + + //Compute clip position + vec3 clipPosition = project(dataPosition); + + //Apply text offset in clip coordinates + clipPosition += vec3(viewOffset, 0.0); + + //Done + gl_Position = vec4(clipPosition, 1.0); +}`]),m=i([`precision highp float; +#define GLSLIFY 1 + +uniform vec4 color; +void main() { + gl_FragColor = color; +}`]);c.text=function(v){return s(v,h,m,null,[{name:"position",type:"vec3"}])};var g=i([`precision highp float; +#define GLSLIFY 1 + +attribute vec3 position; +attribute vec3 normal; + +uniform mat4 model, view, projection; +uniform vec3 enable; +uniform vec3 bounds[2]; + +varying vec3 colorChannel; + +void main() { + + vec3 signAxis = sign(bounds[1] - bounds[0]); + + vec3 realNormal = signAxis * normal; + + if(dot(realNormal, enable) > 0.0) { + vec3 minRange = min(bounds[0], bounds[1]); + vec3 maxRange = max(bounds[0], bounds[1]); + vec3 nPosition = mix(minRange, maxRange, 0.5 * (position + 1.0)); + gl_Position = projection * view * model * vec4(nPosition, 1.0); + } else { + gl_Position = vec4(0,0,0,0); + } + + colorChannel = abs(realNormal); +}`]),p=i([`precision highp float; +#define GLSLIFY 1 + +uniform vec4 colors[3]; + +varying vec3 colorChannel; + +void main() { + gl_FragColor = colorChannel.x * colors[0] + + colorChannel.y * colors[1] + + colorChannel.z * colors[2]; +}`]);c.bg=function(v){return s(v,g,p,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},{"gl-shader":132,glslify:231}],75:[function(a,u,c){(function(i){(function(){u.exports=function(x,w,k,b,T,_){var M=s(x),A=l(x,[{buffer:M,size:3}]),S=h(x);S.attributes.position.location=0;var E=new p(x,S,M,A);return E.update(w,k,b,T,_),E};var s=a("gl-buffer"),l=a("gl-vao"),d=a("vectorize-text"),h=a("./shaders").text,m=window||i.global||{},g=m.__TEXT_CACHE||{};m.__TEXT_CACHE={};function p(x,w,k,b){this.gl=x,this.shader=w,this.buffer=k,this.vao=b,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var v=p.prototype,y=[0,0];v.bind=function(x,w,k,b){this.vao.bind(),this.shader.bind();var T=this.shader.uniforms;T.model=x,T.view=w,T.projection=k,T.pixelScale=b,y[0]=this.gl.drawingBufferWidth,y[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=y},v.unbind=function(){this.vao.unbind()},v.update=function(x,w,k,b,T){var _=[];function M(L,P,N,B,G,W){var K=g[N];K||(K=g[N]={});var te=K[P];te||(te=K[P]=function(Q,ee){try{return d(Q,ee)}catch(ie){return console.warn('error vectorizing text:"'+Q+'" error:',ie),{cells:[],positions:[]}}}(P,{triangles:!0,font:N,textAlign:"center",textBaseline:"middle",lineSpacing:G,styletags:W}));for(var Y=(B||12)/12,Z=te.positions,re=te.cells,U=0,q=re.length;U=0;--ne){var H=Z[$[ne]];_.push(Y*H[0],-Y*H[1],L)}}for(var A=[0,0,0],S=[0,0,0],E=[0,0,0],D=[0,0,0],O={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},R=0;R<3;++R){E[R]=_.length/3|0,M(.5*(x[0][R]+x[1][R]),w[R],k[R],12,1.25,O),D[R]=(_.length/3|0)-E[R],A[R]=_.length/3|0;for(var z=0;z=0&&(m=d.length-h-1);var g=Math.pow(10,m),p=Math.round(s*l*g),v=p+"";if(v.indexOf("e")>=0)return v;var y=p/g,x=p%g;p<0?(y=0|-Math.ceil(y),x=0|-x):(y=0|Math.floor(y),x|=0);var w=""+y;if(p<0&&(w="-"+w),m){for(var k=""+x;k.length=s[0][h];--g)m.push({x:g*l[h],text:i(l[h],g)});d.push(m)}return d},c.equal=function(s,l){for(var d=0;d<3;++d){if(s[d].length!==l[d].length)return!1;for(var h=0;hx)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return v.bufferSubData(y,b,k),x}function p(v,y){for(var x=i.malloc(v.length,y),w=v.length,k=0;k=0;--A){if(_[A]!==M)return!1;M*=T[A]}return!0}(v.shape,v.stride))v.offset===0&&v.data.length===v.shape[0]?this.length=g(this.gl,this.type,this.length,this.usage,v.data,y):this.length=g(this.gl,this.type,this.length,this.usage,v.data.subarray(v.offset,v.shape[0]),y);else{var w=i.malloc(v.size,x),k=l(w,v.shape);s.assign(k,v),this.length=g(this.gl,this.type,this.length,this.usage,y<0?w:w.subarray(0,v.size),y),i.free(w)}}else if(Array.isArray(v)){var b;b=this.type===this.gl.ELEMENT_ARRAY_BUFFER?p(v,"uint16"):p(v,"float32"),this.length=g(this.gl,this.type,this.length,this.usage,y<0?b:b.subarray(0,v.length),y),i.free(b)}else if(typeof v=="object"&&typeof v.length=="number")this.length=g(this.gl,this.type,this.length,this.usage,v,y);else{if(typeof v!="number"&&v!==void 0)throw new Error("gl-buffer: Invalid data type");if(y>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");(v|=0)<=0&&(v=1),this.gl.bufferData(this.type,0|v,this.usage),this.length=v}},u.exports=function(v,y,x,w){if(x=x||v.ARRAY_BUFFER,w=w||v.DYNAMIC_DRAW,x!==v.ARRAY_BUFFER&&x!==v.ELEMENT_ARRAY_BUFFER)throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(w!==v.DYNAMIC_DRAW&&w!==v.STATIC_DRAW&&w!==v.STREAM_DRAW)throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var k=v.createBuffer(),b=new h(v,x,k,0,w);return b.update(y),b}},{ndarray:259,"ndarray-ops":254,"typedarray-pool":308}],79:[function(a,u,c){var i=a("gl-vec3");u.exports=function(l,d){var h=l.positions,m=l.vectors,g={positions:[],vertexIntensity:[],vertexIntensityBounds:l.vertexIntensityBounds,vectors:[],cells:[],coneOffset:l.coneOffset,colormap:l.colormap};if(l.positions.length===0)return d&&(d[0]=[0,0,0],d[1]=[0,0,0]),g;for(var p=0,v=1/0,y=-1/0,x=1/0,w=-1/0,k=1/0,b=-1/0,T=null,_=null,M=[],A=1/0,S=!1,E=0;Ep&&(p=i.length(O)),E){var R=2*i.distance(T,D)/(i.length(_)+i.length(O));R?(A=Math.min(A,R),S=!1):S=!0}S||(T=D,_=O),M.push(O)}var z=[v,x,k],L=[y,w,b];d&&(d[0]=z,d[1]=L),p===0&&(p=1);var P=1/p;isFinite(A)||(A=1),g.vectorScale=A;var N=l.coneSize||.5;l.absoluteConeSize&&(N=l.absoluteConeSize*P),g.coneScale=N,E=0;for(var B=0;E=1},x.isTransparent=function(){return this.opacity<1},x.pickSlots=1,x.setPickBase=function(b){this.pickId=b},x.update=function(b){b=b||{};var T=this.gl;this.dirty=!0,"lightPosition"in b&&(this.lightPosition=b.lightPosition),"opacity"in b&&(this.opacity=b.opacity),"ambient"in b&&(this.ambientLight=b.ambient),"diffuse"in b&&(this.diffuseLight=b.diffuse),"specular"in b&&(this.specularLight=b.specular),"roughness"in b&&(this.roughness=b.roughness),"fresnel"in b&&(this.fresnel=b.fresnel),b.tubeScale!==void 0&&(this.tubeScale=b.tubeScale),b.vectorScale!==void 0&&(this.vectorScale=b.vectorScale),b.coneScale!==void 0&&(this.coneScale=b.coneScale),b.coneOffset!==void 0&&(this.coneOffset=b.coneOffset),b.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=T.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=T.LINEAR,this.texture.setPixels(function(ne){for(var H=p({colormap:ne,nshades:256,format:"rgba"}),Q=new Uint8Array(1024),ee=0;ee<256;++ee){for(var ie=H[ee],ae=0;ae<3;++ae)Q[4*ee+ae]=ie[ae];Q[4*ee+3]=255*ie[3]}return g(Q,[256,256,4],[4,0,1])}(b.colormap)),this.texture.generateMipmap());var _=b.cells,M=b.positions,A=b.vectors;if(M&&_&&A){var S=[],E=[],D=[],O=[],R=[];this.cells=_,this.positions=M,this.vectors=A;var z=b.meshColor||[1,1,1,1],L=b.vertexIntensity,P=1/0,N=-1/0;if(L)if(b.vertexIntensityBounds)P=+b.vertexIntensityBounds[0],N=+b.vertexIntensityBounds[1];else for(var B=0;B0){var P=this.triShader;P.bind(),P.uniforms=D,this.triangleVAO.bind(),T.drawArrays(T.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()}},x.drawPick=function(b){b=b||{};for(var T=this.gl,_=b.model||v,M=b.view||v,A=b.projection||v,S=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],E=0;E<3;++E)S[0][E]=Math.max(S[0][E],this.clipBounds[0][E]),S[1][E]=Math.min(S[1][E],this.clipBounds[1][E]);this._model=[].slice.call(_),this._view=[].slice.call(M),this._projection=[].slice.call(A),this._resolution=[T.drawingBufferWidth,T.drawingBufferHeight];var D={model:_,view:M,projection:A,clipBounds:S,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},O=this.pickShader;O.bind(),O.uniforms=D,this.triangleCount>0&&(this.triangleVAO.bind(),T.drawArrays(T.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind())},x.pick=function(b){if(!b||b.id!==this.pickId)return null;var T=b.value[0]+256*b.value[1]+65536*b.value[2],_=this.cells[T],M=this.positions[_[1]].slice(0,3),A={position:M,dataCoordinate:M,index:Math.floor(_[1]/48)};return this.traceType==="cone"?A.index=Math.floor(_[1]/48):this.traceType==="streamtube"&&(A.intensity=this.intensity[_[1]],A.velocity=this.vectors[_[1]].slice(0,3),A.divergence=this.vectors[_[1]][3],A.index=T),A},x.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleIds.dispose()},u.exports=function(b,T,_){var M=_.shaders;arguments.length===1&&(b=(T=b).gl);var A=w(b,M),S=k(b,M),E=d(b,g(new Uint8Array([255,255,255,255]),[1,1,4]));E.generateMipmap(),E.minFilter=b.LINEAR_MIPMAP_LINEAR,E.magFilter=b.LINEAR;var D=s(b),O=s(b),R=s(b),z=s(b),L=s(b),P=l(b,[{buffer:D,type:b.FLOAT,size:4},{buffer:L,type:b.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:R,type:b.FLOAT,size:4},{buffer:z,type:b.FLOAT,size:2},{buffer:O,type:b.FLOAT,size:4}]),N=new y(b,E,A,S,D,O,L,R,z,P,_.traceType||"cone");return N.update(T),N}},{colormap:53,"gl-buffer":78,"gl-mat4/invert":98,"gl-mat4/multiply":100,"gl-shader":132,"gl-texture2d":146,"gl-vao":150,ndarray:259}],81:[function(a,u,c){var i=a("glslify"),s=i([`precision highp float; + +precision highp float; +#define GLSLIFY 1 + +vec3 getOrthogonalVector(vec3 v) { + // Return up-vector for only-z vector. + // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0). + // From the above if-statement we have ||a|| > 0 U ||b|| > 0. + // Assign z = 0, x = -b, y = a: + // a*-b + b*a + c*0 = -ba + ba + 0 = 0 + if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { + return normalize(vec3(-v.y, v.x, 0.0)); + } else { + return normalize(vec3(0.0, v.z, -v.y)); + } +} + +// Calculate the cone vertex and normal at the given index. +// +// The returned vertex is for a cone with its top at origin and height of 1.0, +// pointing in the direction of the vector attribute. +// +// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices. +// These vertices are used to make up the triangles of the cone by the following: +// segment + 0 top vertex +// segment + 1 perimeter vertex a+1 +// segment + 2 perimeter vertex a +// segment + 3 center base vertex +// segment + 4 perimeter vertex a +// segment + 5 perimeter vertex a+1 +// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment. +// To go from index to segment, floor(index / 6) +// To go from segment to angle, 2*pi * (segment/segmentCount) +// To go from index to segment index, index - (segment*6) +// +vec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) { + + const float segmentCount = 8.0; + + float index = rawIndex - floor(rawIndex / + (segmentCount * 6.0)) * + (segmentCount * 6.0); + + float segment = floor(0.001 + index/6.0); + float segmentIndex = index - (segment*6.0); + + normal = -normalize(d); + + if (segmentIndex > 2.99 && segmentIndex < 3.01) { + return mix(vec3(0.0), -d, coneOffset); + } + + float nextAngle = ( + (segmentIndex > 0.99 && segmentIndex < 1.01) || + (segmentIndex > 4.99 && segmentIndex < 5.01) + ) ? 1.0 : 0.0; + float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount); + + vec3 v1 = mix(d, vec3(0.0), coneOffset); + vec3 v2 = v1 - d; + + vec3 u = getOrthogonalVector(d); + vec3 v = normalize(cross(u, d)); + + vec3 x = u * cos(angle) * length(d)*0.25; + vec3 y = v * sin(angle) * length(d)*0.25; + vec3 v3 = v2 + x + y; + if (segmentIndex < 3.0) { + vec3 tx = u * sin(angle); + vec3 ty = v * -cos(angle); + vec3 tangent = tx + ty; + normal = normalize(cross(v3 - v1, tangent)); + } + + if (segmentIndex == 0.0) { + return mix(d, vec3(0.0), coneOffset); + } + return v3; +} + +attribute vec3 vector; +attribute vec4 color, position; +attribute vec2 uv; + +uniform float vectorScale, coneScale, coneOffset; +uniform mat4 model, view, projection, inverseModel; +uniform vec3 eyePosition, lightPosition; + +varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; +varying vec4 f_color; +varying vec2 f_uv; + +void main() { + // Scale the vector magnitude to stay constant with + // model & view changes. + vec3 normal; + vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal); + vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); + + //Lighting geometry parameters + vec4 cameraCoordinate = view * conePosition; + cameraCoordinate.xyz /= cameraCoordinate.w; + f_lightDirection = lightPosition - cameraCoordinate.xyz; + f_eyeDirection = eyePosition - cameraCoordinate.xyz; + f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz); + + // vec4 m_position = model * vec4(conePosition, 1.0); + vec4 t_position = view * conePosition; + gl_Position = projection * t_position; + + f_color = color; + f_data = conePosition.xyz; + f_position = position.xyz; + f_uv = uv; +} +`]),l=i([`#extension GL_OES_standard_derivatives : enable + +precision highp float; +#define GLSLIFY 1 + +float beckmannDistribution(float x, float roughness) { + float NdotH = max(x, 0.0001); + float cos2Alpha = NdotH * NdotH; + float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; + float roughness2 = roughness * roughness; + float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; + return exp(tan2Alpha / roughness2) / denom; +} + +float cookTorranceSpecular( + vec3 lightDirection, + vec3 viewDirection, + vec3 surfaceNormal, + float roughness, + float fresnel) { + + float VdotN = max(dot(viewDirection, surfaceNormal), 0.0); + float LdotN = max(dot(lightDirection, surfaceNormal), 0.0); + + //Half angle vector + vec3 H = normalize(lightDirection + viewDirection); + + //Geometric term + float NdotH = max(dot(surfaceNormal, H), 0.0); + float VdotH = max(dot(viewDirection, H), 0.000001); + float LdotH = max(dot(lightDirection, H), 0.000001); + float G1 = (2.0 * NdotH * VdotN) / VdotH; + float G2 = (2.0 * NdotH * LdotN) / LdotH; + float G = min(1.0, min(G1, G2)); + + //Distribution term + float D = beckmannDistribution(NdotH, roughness); + + //Fresnel term + float F = pow(1.0 - VdotN, fresnel); + + //Multiply terms and done + return G * F * D / max(3.14159265 * VdotN, 0.000001); +} + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity; +uniform sampler2D texture; + +varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; +varying vec4 f_color; +varying vec2 f_uv; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; + vec3 N = normalize(f_normal); + vec3 L = normalize(f_lightDirection); + vec3 V = normalize(f_eyeDirection); + + if(gl_FrontFacing) { + N = -N; + } + + float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel))); + float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); + + vec4 surfaceColor = f_color * texture2D(texture, f_uv); + vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); + + gl_FragColor = litColor * opacity; +} +`]),d=i([`precision highp float; + +precision highp float; +#define GLSLIFY 1 + +vec3 getOrthogonalVector(vec3 v) { + // Return up-vector for only-z vector. + // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0). + // From the above if-statement we have ||a|| > 0 U ||b|| > 0. + // Assign z = 0, x = -b, y = a: + // a*-b + b*a + c*0 = -ba + ba + 0 = 0 + if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { + return normalize(vec3(-v.y, v.x, 0.0)); + } else { + return normalize(vec3(0.0, v.z, -v.y)); + } +} + +// Calculate the cone vertex and normal at the given index. +// +// The returned vertex is for a cone with its top at origin and height of 1.0, +// pointing in the direction of the vector attribute. +// +// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices. +// These vertices are used to make up the triangles of the cone by the following: +// segment + 0 top vertex +// segment + 1 perimeter vertex a+1 +// segment + 2 perimeter vertex a +// segment + 3 center base vertex +// segment + 4 perimeter vertex a +// segment + 5 perimeter vertex a+1 +// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment. +// To go from index to segment, floor(index / 6) +// To go from segment to angle, 2*pi * (segment/segmentCount) +// To go from index to segment index, index - (segment*6) +// +vec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) { + + const float segmentCount = 8.0; + + float index = rawIndex - floor(rawIndex / + (segmentCount * 6.0)) * + (segmentCount * 6.0); + + float segment = floor(0.001 + index/6.0); + float segmentIndex = index - (segment*6.0); + + normal = -normalize(d); + + if (segmentIndex > 2.99 && segmentIndex < 3.01) { + return mix(vec3(0.0), -d, coneOffset); + } + + float nextAngle = ( + (segmentIndex > 0.99 && segmentIndex < 1.01) || + (segmentIndex > 4.99 && segmentIndex < 5.01) + ) ? 1.0 : 0.0; + float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount); + + vec3 v1 = mix(d, vec3(0.0), coneOffset); + vec3 v2 = v1 - d; + + vec3 u = getOrthogonalVector(d); + vec3 v = normalize(cross(u, d)); + + vec3 x = u * cos(angle) * length(d)*0.25; + vec3 y = v * sin(angle) * length(d)*0.25; + vec3 v3 = v2 + x + y; + if (segmentIndex < 3.0) { + vec3 tx = u * sin(angle); + vec3 ty = v * -cos(angle); + vec3 tangent = tx + ty; + normal = normalize(cross(v3 - v1, tangent)); + } + + if (segmentIndex == 0.0) { + return mix(d, vec3(0.0), coneOffset); + } + return v3; +} + +attribute vec4 vector; +attribute vec4 position; +attribute vec4 id; + +uniform mat4 model, view, projection; +uniform float vectorScale, coneScale, coneOffset; + +varying vec3 f_position; +varying vec4 f_id; + +void main() { + vec3 normal; + vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector.xyz), position.w, coneOffset, normal); + vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); + gl_Position = projection * view * conePosition; + f_id = id; + f_position = position.xyz; +} +`]),h=i([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform float pickId; + +varying vec3 f_position; +varying vec4 f_id; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; + + gl_FragColor = vec4(pickId, f_id.xyz); +}`]);c.meshShader={vertex:s,fragment:l,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},c.pickShader={vertex:d,fragment:h,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},{glslify:231}],82:[function(a,u,c){u.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},{}],83:[function(a,u,c){var i=a("./1.0/numbers");u.exports=function(s){return i[s]}},{"./1.0/numbers":82}],84:[function(a,u,c){u.exports=function(y){var x=y.gl,w=i(x),k=s(x,[{buffer:w,type:x.FLOAT,size:3,offset:0,stride:40},{buffer:w,type:x.FLOAT,size:4,offset:12,stride:40},{buffer:w,type:x.FLOAT,size:3,offset:28,stride:40}]),b=l(x);b.attributes.position.location=0,b.attributes.color.location=1,b.attributes.offset.location=2;var T=new h(x,w,k,b);return T.update(y),T};var i=a("gl-buffer"),s=a("gl-vao"),l=a("./shaders/index"),d=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function h(y,x,w,k){this.gl=y,this.shader=k,this.buffer=x,this.vao=w,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1,this.hasAlpha=!1}var m=h.prototype;function g(y,x){for(var w=0;w<3;++w)y[0][w]=Math.min(y[0][w],x[w]),y[1][w]=Math.max(y[1][w],x[w])}m.isOpaque=function(){return!this.hasAlpha},m.isTransparent=function(){return this.hasAlpha},m.drawTransparent=m.draw=function(y){var x=this.gl,w=this.shader.uniforms;this.shader.bind();var k=w.view=y.view||d,b=w.projection=y.projection||d;w.model=y.model||d,w.clipBounds=this.clipBounds,w.opacity=this.opacity;var T=k[12],_=k[13],M=k[14],A=k[15],S=(y._ortho?2:1)*this.pixelRatio*(b[3]*T+b[7]*_+b[11]*M+b[15]*A)/x.drawingBufferHeight;this.vao.bind();for(var E=0;E<3;++E)x.lineWidth(this.lineWidth[E]*this.pixelRatio),w.capSize=this.capSize[E]*S,this.lineCount[E]&&x.drawArrays(x.LINES,this.lineOffset[E],this.lineCount[E]);this.vao.unbind()};var p=function(){for(var y=new Array(3),x=0;x<3;++x){for(var w=[],k=1;k<=2;++k)for(var b=-1;b<=1;b+=2){var T=[0,0,0];T[(k+x)%3]=b,w.push(T)}y[x]=w}return y}();function v(y,x,w,k){for(var b=p[k],T=0;T0&&((R=S.slice())[M]+=D[1][M],b.push(S[0],S[1],S[2],O[0],O[1],O[2],O[3],0,0,0,R[0],R[1],R[2],O[0],O[1],O[2],O[3],0,0,0),g(this.bounds,R),_+=2+v(b,R,O,M))}}this.lineCount[M]=_-this.lineOffset[M]}this.buffer.update(b)}},m.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()}},{"./shaders/index":85,"gl-buffer":78,"gl-vao":150}],85:[function(a,u,c){var i=a("glslify"),s=a("gl-shader"),l=i([`precision highp float; +#define GLSLIFY 1 + +attribute vec3 position, offset; +attribute vec4 color; +uniform mat4 model, view, projection; +uniform float capSize; +varying vec4 fragColor; +varying vec3 fragPosition; + +void main() { + vec4 worldPosition = model * vec4(position, 1.0); + worldPosition = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0); + gl_Position = projection * view * worldPosition; + fragColor = color; + fragPosition = position; +}`]),d=i([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform float opacity; +varying vec3 fragPosition; +varying vec4 fragColor; + +void main() { + if ( + outOfRange(clipBounds[0], clipBounds[1], fragPosition) || + fragColor.a * opacity == 0. + ) discard; + + gl_FragColor = opacity * fragColor; +}`]);u.exports=function(h){return s(h,l,d,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},{"gl-shader":132,glslify:231}],86:[function(a,u,c){var i=a("gl-texture2d");u.exports=function(T,_,M,A){s||(s=T.FRAMEBUFFER_UNSUPPORTED,l=T.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,d=T.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,h=T.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var S=T.getExtension("WEBGL_draw_buffers");if(!m&&S&&function(P,N){var B=P.getParameter(N.MAX_COLOR_ATTACHMENTS_WEBGL);m=new Array(B+1);for(var G=0;G<=B;++G){for(var W=new Array(B),K=0;KE||M<0||M>E)throw new Error("gl-fbo: Parameters are too large for FBO");var D=1;if("color"in(A=A||{})){if((D=Math.max(0|A.color,0))<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(D>1){if(!S)throw new Error("gl-fbo: Multiple draw buffer extension not supported");if(D>T.getParameter(S.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+D+" draw buffers")}}var O=T.UNSIGNED_BYTE,R=T.getExtension("OES_texture_float");if(A.float&&D>0){if(!R)throw new Error("gl-fbo: Context does not support floating point textures");O=T.FLOAT}else A.preferFloat&&D>0&&R&&(O=T.FLOAT);var z=!0;"depth"in A&&(z=!!A.depth);var L=!1;return"stencil"in A&&(L=!!A.stencil),new w(T,_,M,O,D,z,L,S)};var s,l,d,h,m=null;function g(T){return[T.getParameter(T.FRAMEBUFFER_BINDING),T.getParameter(T.RENDERBUFFER_BINDING),T.getParameter(T.TEXTURE_BINDING_2D)]}function p(T,_){T.bindFramebuffer(T.FRAMEBUFFER,_[0]),T.bindRenderbuffer(T.RENDERBUFFER,_[1]),T.bindTexture(T.TEXTURE_2D,_[2])}function v(T){switch(T){case s:throw new Error("gl-fbo: Framebuffer unsupported");case l:throw new Error("gl-fbo: Framebuffer incomplete attachment");case d:throw new Error("gl-fbo: Framebuffer incomplete dimensions");case h:throw new Error("gl-fbo: Framebuffer incomplete missing attachment");default:throw new Error("gl-fbo: Framebuffer failed for unspecified reason")}}function y(T,_,M,A,S,E){if(!A)return null;var D=i(T,_,M,S,A);return D.magFilter=T.NEAREST,D.minFilter=T.NEAREST,D.mipSamples=1,D.bind(),T.framebufferTexture2D(T.FRAMEBUFFER,E,T.TEXTURE_2D,D.handle,0),D}function x(T,_,M,A,S){var E=T.createRenderbuffer();return T.bindRenderbuffer(T.RENDERBUFFER,E),T.renderbufferStorage(T.RENDERBUFFER,A,_,M),T.framebufferRenderbuffer(T.FRAMEBUFFER,S,T.RENDERBUFFER,E),E}function w(T,_,M,A,S,E,D,O){this.gl=T,this._shape=[0|_,0|M],this._destroyed=!1,this._ext=O,this.color=new Array(S);for(var R=0;R1&&Y.drawBuffersWEBGL(m[te]);var $=B.getExtension("WEBGL_depth_texture");$?Z?P.depth=y(B,W,K,$.UNSIGNED_INT_24_8_WEBGL,B.DEPTH_STENCIL,B.DEPTH_STENCIL_ATTACHMENT):re&&(P.depth=y(B,W,K,B.UNSIGNED_SHORT,B.DEPTH_COMPONENT,B.DEPTH_ATTACHMENT)):re&&Z?P._depth_rb=x(B,W,K,B.DEPTH_STENCIL,B.DEPTH_STENCIL_ATTACHMENT):re?P._depth_rb=x(B,W,K,B.DEPTH_COMPONENT16,B.DEPTH_ATTACHMENT):Z&&(P._depth_rb=x(B,W,K,B.STENCIL_INDEX,B.STENCIL_ATTACHMENT));var ne=B.checkFramebufferStatus(B.FRAMEBUFFER);if(ne!==B.FRAMEBUFFER_COMPLETE){for(P._destroyed=!0,B.bindFramebuffer(B.FRAMEBUFFER,null),B.deleteFramebuffer(P.handle),P.handle=null,P.depth&&(P.depth.dispose(),P.depth=null),P._depth_rb&&(B.deleteRenderbuffer(P._depth_rb),P._depth_rb=null),q=0;qS||M<0||M>S)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");T._shape[0]=_,T._shape[1]=M;for(var E=g(A),D=0;D>8*z&255;this.pickOffset=k,T.bind();var L=T.uniforms;L.viewTransform=x,L.pickOffset=w,L.shape=this.shape;var P=T.attributes;return this.positionBuffer.bind(),P.position.pointer(),this.weightBuffer.bind(),P.weight.pointer(A.UNSIGNED_BYTE,!1),this.idBuffer.bind(),P.pickId.pointer(A.UNSIGNED_BYTE,!1),A.drawArrays(A.TRIANGLES,0,M),k+this.shape[0]*this.shape[1]}}}(),v.pick=function(x,w,k){var b=this.pickOffset,T=this.shape[0]*this.shape[1];if(k=b+T)return null;var _=k-b,M=this.xData,A=this.yData;return{object:this,pointId:_,dataCoord:[M[_%this.shape[0]],A[_/this.shape[0]|0]]}},v.update=function(x){var w=(x=x||{}).shape||[0,0],k=x.x||s(w[0]),b=x.y||s(w[1]),T=x.z||new Float32Array(w[0]*w[1]),_=x.zsmooth!==!1;this.xData=k,this.yData=b;var M,A,S,E,D=x.colorLevels||[0],O=x.colorValues||[0,0,0,1],R=D.length,z=this.bounds;_?(M=z[0]=k[0],A=z[1]=b[0],S=z[2]=k[k.length-1],E=z[3]=b[b.length-1]):(M=z[0]=k[0]+(k[1]-k[0])/2,A=z[1]=b[0]+(b[1]-b[0])/2,S=z[2]=k[k.length-1]+(k[k.length-1]-k[k.length-2])/2,E=z[3]=b[b.length-1]+(b[b.length-1]-b[b.length-2])/2);var L=1/(S-M),P=1/(E-A),N=w[0],B=w[1];this.shape=[N,B];var G=(_?(N-1)*(B-1):N*B)*(y.length>>>1);this.numVertices=G;for(var W=l.mallocUint8(4*G),K=l.mallocFloat32(2*G),te=l.mallocUint8(2*G),Y=l.mallocUint32(G),Z=0,re=_?N-1:N,U=_?B-1:B,q=0;q max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform sampler2D dashTexture; +uniform float dashScale; +uniform float opacity; + +varying vec3 worldPosition; +varying float pixelArcLength; +varying vec4 fragColor; + +void main() { + if ( + outOfRange(clipBounds[0], clipBounds[1], worldPosition) || + fragColor.a * opacity == 0. + ) discard; + + float dashWeight = texture2D(dashTexture, vec2(dashScale * pixelArcLength, 0)).r; + if(dashWeight < 0.5) { + discard; + } + gl_FragColor = fragColor * opacity; +} +`]),h=i([`precision highp float; +#define GLSLIFY 1 + +#define FLOAT_MAX 1.70141184e38 +#define FLOAT_MIN 1.17549435e-38 + +// https://github.com/mikolalysenko/glsl-read-float/blob/master/index.glsl +vec4 packFloat(float v) { + float av = abs(v); + + //Handle special cases + if(av < FLOAT_MIN) { + return vec4(0.0, 0.0, 0.0, 0.0); + } else if(v > FLOAT_MAX) { + return vec4(127.0, 128.0, 0.0, 0.0) / 255.0; + } else if(v < -FLOAT_MAX) { + return vec4(255.0, 128.0, 0.0, 0.0) / 255.0; + } + + vec4 c = vec4(0,0,0,0); + + //Compute exponent and mantissa + float e = floor(log2(av)); + float m = av * pow(2.0, -e) - 1.0; + + //Unpack mantissa + c[1] = floor(128.0 * m); + m -= c[1] / 128.0; + c[2] = floor(32768.0 * m); + m -= c[2] / 32768.0; + c[3] = floor(8388608.0 * m); + + //Unpack exponent + float ebias = e + 127.0; + c[0] = floor(ebias / 2.0); + ebias -= c[0] * 2.0; + c[1] += floor(ebias) * 128.0; + + //Unpack sign bit + c[0] += 128.0 * step(0.0, -v); + + //Scale back to range + return c / 255.0; +} + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform float pickId; +uniform vec3 clipBounds[2]; + +varying vec3 worldPosition; +varying float pixelArcLength; +varying vec4 fragColor; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], worldPosition)) discard; + + gl_FragColor = vec4(pickId/255.0, packFloat(pixelArcLength).xyz); +}`]),m=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];c.createShader=function(g){return s(g,l,d,null,m)},c.createPickShader=function(g){return s(g,l,h,null,m)}},{"gl-shader":132,glslify:231}],91:[function(a,u,c){u.exports=function(M){var A=M.gl||M.scene&&M.scene.gl,S=v(A);S.attributes.position.location=0,S.attributes.nextPosition.location=1,S.attributes.arcLength.location=2,S.attributes.lineWidth.location=3,S.attributes.color.location=4;var E=y(A);E.attributes.position.location=0,E.attributes.nextPosition.location=1,E.attributes.arcLength.location=2,E.attributes.lineWidth.location=3,E.attributes.color.location=4;for(var D=i(A),O=s(A,[{buffer:D,size:3,offset:0,stride:48},{buffer:D,size:3,offset:12,stride:48},{buffer:D,size:1,offset:24,stride:48},{buffer:D,size:1,offset:28,stride:48},{buffer:D,size:4,offset:32,stride:48}]),R=g(new Array(1024),[256,1,4]),z=0;z<1024;++z)R.data[z]=255;var L=l(A,R);L.wrap=A.REPEAT;var P=new T(A,S,E,D,O,L);return P.update(M),P};var i=a("gl-buffer"),s=a("gl-vao"),l=a("gl-texture2d"),d=new Uint8Array(4),h=new Float32Array(d.buffer),m=a("binary-search-bounds"),g=a("ndarray"),p=a("./lib/shaders"),v=p.createShader,y=p.createPickShader,x=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function w(M,A){for(var S=0,E=0;E<3;++E){var D=M[E]-A[E];S+=D*D}return Math.sqrt(S)}function k(M){for(var A=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],S=0;S<3;++S)A[0][S]=Math.max(M[0][S],A[0][S]),A[1][S]=Math.min(M[1][S],A[1][S]);return A}function b(M,A,S,E){this.arcLength=M,this.position=A,this.index=S,this.dataCoordinate=E}function T(M,A,S,E,D,O){this.gl=M,this.shader=A,this.pickShader=S,this.buffer=E,this.vao=D,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.points=[],this.arcLength=[],this.vertexCount=0,this.bounds=[[0,0,0],[0,0,0]],this.pickId=0,this.lineWidth=1,this.texture=O,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var _=T.prototype;_.isTransparent=function(){return this.hasAlpha},_.isOpaque=function(){return!this.hasAlpha},_.pickSlots=1,_.setPickBase=function(M){this.pickId=M},_.drawTransparent=_.draw=function(M){if(this.vertexCount){var A=this.gl,S=this.shader,E=this.vao;S.bind(),S.uniforms={model:M.model||x,view:M.view||x,projection:M.projection||x,clipBounds:k(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[A.drawingBufferWidth,A.drawingBufferHeight],pixelRatio:this.pixelRatio},E.bind(),E.draw(A.TRIANGLE_STRIP,this.vertexCount),E.unbind()}},_.drawPick=function(M){if(this.vertexCount){var A=this.gl,S=this.pickShader,E=this.vao;S.bind(),S.uniforms={model:M.model||x,view:M.view||x,projection:M.projection||x,pickId:this.pickId,clipBounds:k(this.clipBounds),screenShape:[A.drawingBufferWidth,A.drawingBufferHeight],pixelRatio:this.pixelRatio},E.bind(),E.draw(A.TRIANGLE_STRIP,this.vertexCount),E.unbind()}},_.update=function(M){var A,S;this.dirty=!0;var E=!!M.connectGaps;"dashScale"in M&&(this.dashScale=M.dashScale),this.hasAlpha=!1,"opacity"in M&&(this.opacity=+M.opacity,this.opacity<1&&(this.hasAlpha=!0));var D=[],O=[],R=[],z=0,L=0,P=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],N=M.position||M.positions;if(N){var B=M.color||M.colors||[0,0,0,1],G=M.lineWidth||1,W=!1;e:for(A=1;A0){for(var U=0;U<24;++U)D.push(D[D.length-12]);L+=2,W=!0}continue e}P[0][S]=Math.min(P[0][S],Z[S],re[S]),P[1][S]=Math.max(P[1][S],Z[S],re[S])}Array.isArray(B[0])?(K=B.length>A-1?B[A-1]:B.length>0?B[B.length-1]:[0,0,0,1],te=B.length>A?B[A]:B.length>0?B[B.length-1]:[0,0,0,1]):K=te=B,K.length===3&&(K=[K[0],K[1],K[2],1]),te.length===3&&(te=[te[0],te[1],te[2],1]),!this.hasAlpha&&K[3]<1&&(this.hasAlpha=!0),Y=Array.isArray(G)?G.length>A-1?G[A-1]:G.length>0?G[G.length-1]:[0,0,0,1]:G;var q=z;if(z+=w(Z,re),W){for(S=0;S<2;++S)D.push(Z[0],Z[1],Z[2],re[0],re[1],re[2],q,Y,K[0],K[1],K[2],K[3]);L+=2,W=!1}D.push(Z[0],Z[1],Z[2],re[0],re[1],re[2],q,Y,K[0],K[1],K[2],K[3],Z[0],Z[1],Z[2],re[0],re[1],re[2],q,-Y,K[0],K[1],K[2],K[3],re[0],re[1],re[2],Z[0],Z[1],Z[2],z,-Y,te[0],te[1],te[2],te[3],re[0],re[1],re[2],Z[0],Z[1],Z[2],z,Y,te[0],te[1],te[2],te[3]),L+=4}}if(this.buffer.update(D),O.push(z),R.push(N[N.length-1].slice()),this.bounds=P,this.vertexCount=L,this.points=R,this.arcLength=O,"dashes"in M){var $=M.dashes.slice();for($.unshift(0),A=1;A<$.length;++A)$[A]=$[A-1]+$[A];var ne=g(new Array(1024),[256,1,4]);for(A=0;A<256;++A){for(S=0;S<4;++S)ne.set(A,0,S,0);1&m.le($,$[$.length-1]*A/255)?ne.set(A,0,0,0):ne.set(A,0,0,255)}this.texture.setPixels(ne)}},_.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()},_.pick=function(M){if(!M||M.id!==this.pickId)return null;var A=function(N,B,G,W){return d[0]=W,d[1]=G,d[2]=B,d[3]=N,h[0]}(M.value[0],M.value[1],M.value[2],0),S=m.le(this.arcLength,A);if(S<0)return null;if(S===this.arcLength.length-1)return new b(this.arcLength[this.arcLength.length-1],this.points[this.points.length-1].slice(),S);for(var E=this.points[S],D=this.points[Math.min(S+1,this.points.length-1)],O=(A-this.arcLength[S])/(this.arcLength[S+1]-this.arcLength[S]),R=1-O,z=[0,0,0],L=0;L<3;++L)z[L]=R*E[L]+O*D[L];var P=Math.min(O<.5?S:S+1,this.points.length-1);return new b(A,z,P,this.points[P])}},{"./lib/shaders":90,"binary-search-bounds":31,"gl-buffer":78,"gl-texture2d":146,"gl-vao":150,ndarray:259}],92:[function(a,u,c){u.exports=function(i){var s=new Float32Array(16);return s[0]=i[0],s[1]=i[1],s[2]=i[2],s[3]=i[3],s[4]=i[4],s[5]=i[5],s[6]=i[6],s[7]=i[7],s[8]=i[8],s[9]=i[9],s[10]=i[10],s[11]=i[11],s[12]=i[12],s[13]=i[13],s[14]=i[14],s[15]=i[15],s}},{}],93:[function(a,u,c){u.exports=function(){var i=new Float32Array(16);return i[0]=1,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=1,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[10]=1,i[11]=0,i[12]=0,i[13]=0,i[14]=0,i[15]=1,i}},{}],94:[function(a,u,c){u.exports=function(i){var s=i[0],l=i[1],d=i[2],h=i[3],m=i[4],g=i[5],p=i[6],v=i[7],y=i[8],x=i[9],w=i[10],k=i[11],b=i[12],T=i[13],_=i[14],M=i[15];return(s*g-l*m)*(w*M-k*_)-(s*p-d*m)*(x*M-k*T)+(s*v-h*m)*(x*_-w*T)+(l*p-d*g)*(y*M-k*b)-(l*v-h*g)*(y*_-w*b)+(d*v-h*p)*(y*T-x*b)}},{}],95:[function(a,u,c){u.exports=function(i,s){var l=s[0],d=s[1],h=s[2],m=s[3],g=l+l,p=d+d,v=h+h,y=l*g,x=d*g,w=d*p,k=h*g,b=h*p,T=h*v,_=m*g,M=m*p,A=m*v;return i[0]=1-w-T,i[1]=x+A,i[2]=k-M,i[3]=0,i[4]=x-A,i[5]=1-y-T,i[6]=b+_,i[7]=0,i[8]=k+M,i[9]=b-_,i[10]=1-y-w,i[11]=0,i[12]=0,i[13]=0,i[14]=0,i[15]=1,i}},{}],96:[function(a,u,c){u.exports=function(i,s,l){var d=s[0],h=s[1],m=s[2],g=s[3],p=d+d,v=h+h,y=m+m,x=d*p,w=d*v,k=d*y,b=h*v,T=h*y,_=m*y,M=g*p,A=g*v,S=g*y;return i[0]=1-(b+_),i[1]=w+S,i[2]=k-A,i[3]=0,i[4]=w-S,i[5]=1-(x+_),i[6]=T+M,i[7]=0,i[8]=k+A,i[9]=T-M,i[10]=1-(x+b),i[11]=0,i[12]=l[0],i[13]=l[1],i[14]=l[2],i[15]=1,i}},{}],97:[function(a,u,c){u.exports=function(i){return i[0]=1,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=1,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[10]=1,i[11]=0,i[12]=0,i[13]=0,i[14]=0,i[15]=1,i}},{}],98:[function(a,u,c){u.exports=function(i,s){var l=s[0],d=s[1],h=s[2],m=s[3],g=s[4],p=s[5],v=s[6],y=s[7],x=s[8],w=s[9],k=s[10],b=s[11],T=s[12],_=s[13],M=s[14],A=s[15],S=l*p-d*g,E=l*v-h*g,D=l*y-m*g,O=d*v-h*p,R=d*y-m*p,z=h*y-m*v,L=x*_-w*T,P=x*M-k*T,N=x*A-b*T,B=w*M-k*_,G=w*A-b*_,W=k*A-b*M,K=S*W-E*G+D*B+O*N-R*P+z*L;return K?(K=1/K,i[0]=(p*W-v*G+y*B)*K,i[1]=(h*G-d*W-m*B)*K,i[2]=(_*z-M*R+A*O)*K,i[3]=(k*R-w*z-b*O)*K,i[4]=(v*N-g*W-y*P)*K,i[5]=(l*W-h*N+m*P)*K,i[6]=(M*D-T*z-A*E)*K,i[7]=(x*z-k*D+b*E)*K,i[8]=(g*G-p*N+y*L)*K,i[9]=(d*N-l*G-m*L)*K,i[10]=(T*R-_*D+A*S)*K,i[11]=(w*D-x*R-b*S)*K,i[12]=(p*P-g*B-v*L)*K,i[13]=(l*B-d*P+h*L)*K,i[14]=(_*E-T*O-M*S)*K,i[15]=(x*O-w*E+k*S)*K,i):null}},{}],99:[function(a,u,c){var i=a("./identity");u.exports=function(s,l,d,h){var m,g,p,v,y,x,w,k,b,T,_=l[0],M=l[1],A=l[2],S=h[0],E=h[1],D=h[2],O=d[0],R=d[1],z=d[2];return Math.abs(_-O)<1e-6&&Math.abs(M-R)<1e-6&&Math.abs(A-z)<1e-6?i(s):(w=_-O,k=M-R,b=A-z,T=1/Math.sqrt(w*w+k*k+b*b),m=E*(b*=T)-D*(k*=T),g=D*(w*=T)-S*b,p=S*k-E*w,(T=Math.sqrt(m*m+g*g+p*p))?(m*=T=1/T,g*=T,p*=T):(m=0,g=0,p=0),v=k*p-b*g,y=b*m-w*p,x=w*g-k*m,(T=Math.sqrt(v*v+y*y+x*x))?(v*=T=1/T,y*=T,x*=T):(v=0,y=0,x=0),s[0]=m,s[1]=v,s[2]=w,s[3]=0,s[4]=g,s[5]=y,s[6]=k,s[7]=0,s[8]=p,s[9]=x,s[10]=b,s[11]=0,s[12]=-(m*_+g*M+p*A),s[13]=-(v*_+y*M+x*A),s[14]=-(w*_+k*M+b*A),s[15]=1,s)}},{"./identity":97}],100:[function(a,u,c){u.exports=function(i,s,l){var d=s[0],h=s[1],m=s[2],g=s[3],p=s[4],v=s[5],y=s[6],x=s[7],w=s[8],k=s[9],b=s[10],T=s[11],_=s[12],M=s[13],A=s[14],S=s[15],E=l[0],D=l[1],O=l[2],R=l[3];return i[0]=E*d+D*p+O*w+R*_,i[1]=E*h+D*v+O*k+R*M,i[2]=E*m+D*y+O*b+R*A,i[3]=E*g+D*x+O*T+R*S,E=l[4],D=l[5],O=l[6],R=l[7],i[4]=E*d+D*p+O*w+R*_,i[5]=E*h+D*v+O*k+R*M,i[6]=E*m+D*y+O*b+R*A,i[7]=E*g+D*x+O*T+R*S,E=l[8],D=l[9],O=l[10],R=l[11],i[8]=E*d+D*p+O*w+R*_,i[9]=E*h+D*v+O*k+R*M,i[10]=E*m+D*y+O*b+R*A,i[11]=E*g+D*x+O*T+R*S,E=l[12],D=l[13],O=l[14],R=l[15],i[12]=E*d+D*p+O*w+R*_,i[13]=E*h+D*v+O*k+R*M,i[14]=E*m+D*y+O*b+R*A,i[15]=E*g+D*x+O*T+R*S,i}},{}],101:[function(a,u,c){u.exports=function(i,s,l,d,h,m,g){var p=1/(s-l),v=1/(d-h),y=1/(m-g);return i[0]=-2*p,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=-2*v,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[10]=2*y,i[11]=0,i[12]=(s+l)*p,i[13]=(h+d)*v,i[14]=(g+m)*y,i[15]=1,i}},{}],102:[function(a,u,c){u.exports=function(i,s,l,d,h){var m=1/Math.tan(s/2),g=1/(d-h);return i[0]=m/l,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=m,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[10]=(h+d)*g,i[11]=-1,i[12]=0,i[13]=0,i[14]=2*h*d*g,i[15]=0,i}},{}],103:[function(a,u,c){u.exports=function(i,s,l,d){var h,m,g,p,v,y,x,w,k,b,T,_,M,A,S,E,D,O,R,z,L,P,N,B,G=d[0],W=d[1],K=d[2],te=Math.sqrt(G*G+W*W+K*K);return Math.abs(te)<1e-6?null:(G*=te=1/te,W*=te,K*=te,h=Math.sin(l),m=Math.cos(l),g=1-m,p=s[0],v=s[1],y=s[2],x=s[3],w=s[4],k=s[5],b=s[6],T=s[7],_=s[8],M=s[9],A=s[10],S=s[11],E=G*G*g+m,D=W*G*g+K*h,O=K*G*g-W*h,R=G*W*g-K*h,z=W*W*g+m,L=K*W*g+G*h,P=G*K*g+W*h,N=W*K*g-G*h,B=K*K*g+m,i[0]=p*E+w*D+_*O,i[1]=v*E+k*D+M*O,i[2]=y*E+b*D+A*O,i[3]=x*E+T*D+S*O,i[4]=p*R+w*z+_*L,i[5]=v*R+k*z+M*L,i[6]=y*R+b*z+A*L,i[7]=x*R+T*z+S*L,i[8]=p*P+w*N+_*B,i[9]=v*P+k*N+M*B,i[10]=y*P+b*N+A*B,i[11]=x*P+T*N+S*B,s!==i&&(i[12]=s[12],i[13]=s[13],i[14]=s[14],i[15]=s[15]),i)}},{}],104:[function(a,u,c){u.exports=function(i,s,l){var d=Math.sin(l),h=Math.cos(l),m=s[4],g=s[5],p=s[6],v=s[7],y=s[8],x=s[9],w=s[10],k=s[11];return s!==i&&(i[0]=s[0],i[1]=s[1],i[2]=s[2],i[3]=s[3],i[12]=s[12],i[13]=s[13],i[14]=s[14],i[15]=s[15]),i[4]=m*h+y*d,i[5]=g*h+x*d,i[6]=p*h+w*d,i[7]=v*h+k*d,i[8]=y*h-m*d,i[9]=x*h-g*d,i[10]=w*h-p*d,i[11]=k*h-v*d,i}},{}],105:[function(a,u,c){u.exports=function(i,s,l){var d=Math.sin(l),h=Math.cos(l),m=s[0],g=s[1],p=s[2],v=s[3],y=s[8],x=s[9],w=s[10],k=s[11];return s!==i&&(i[4]=s[4],i[5]=s[5],i[6]=s[6],i[7]=s[7],i[12]=s[12],i[13]=s[13],i[14]=s[14],i[15]=s[15]),i[0]=m*h-y*d,i[1]=g*h-x*d,i[2]=p*h-w*d,i[3]=v*h-k*d,i[8]=m*d+y*h,i[9]=g*d+x*h,i[10]=p*d+w*h,i[11]=v*d+k*h,i}},{}],106:[function(a,u,c){u.exports=function(i,s,l){var d=Math.sin(l),h=Math.cos(l),m=s[0],g=s[1],p=s[2],v=s[3],y=s[4],x=s[5],w=s[6],k=s[7];return s!==i&&(i[8]=s[8],i[9]=s[9],i[10]=s[10],i[11]=s[11],i[12]=s[12],i[13]=s[13],i[14]=s[14],i[15]=s[15]),i[0]=m*h+y*d,i[1]=g*h+x*d,i[2]=p*h+w*d,i[3]=v*h+k*d,i[4]=y*h-m*d,i[5]=x*h-g*d,i[6]=w*h-p*d,i[7]=k*h-v*d,i}},{}],107:[function(a,u,c){u.exports=function(i,s,l){var d=l[0],h=l[1],m=l[2];return i[0]=s[0]*d,i[1]=s[1]*d,i[2]=s[2]*d,i[3]=s[3]*d,i[4]=s[4]*h,i[5]=s[5]*h,i[6]=s[6]*h,i[7]=s[7]*h,i[8]=s[8]*m,i[9]=s[9]*m,i[10]=s[10]*m,i[11]=s[11]*m,i[12]=s[12],i[13]=s[13],i[14]=s[14],i[15]=s[15],i}},{}],108:[function(a,u,c){u.exports=function(i,s,l){var d,h,m,g,p,v,y,x,w,k,b,T,_=l[0],M=l[1],A=l[2];return s===i?(i[12]=s[0]*_+s[4]*M+s[8]*A+s[12],i[13]=s[1]*_+s[5]*M+s[9]*A+s[13],i[14]=s[2]*_+s[6]*M+s[10]*A+s[14],i[15]=s[3]*_+s[7]*M+s[11]*A+s[15]):(d=s[0],h=s[1],m=s[2],g=s[3],p=s[4],v=s[5],y=s[6],x=s[7],w=s[8],k=s[9],b=s[10],T=s[11],i[0]=d,i[1]=h,i[2]=m,i[3]=g,i[4]=p,i[5]=v,i[6]=y,i[7]=x,i[8]=w,i[9]=k,i[10]=b,i[11]=T,i[12]=d*_+p*M+w*A+s[12],i[13]=h*_+v*M+k*A+s[13],i[14]=m*_+y*M+b*A+s[14],i[15]=g*_+x*M+T*A+s[15]),i}},{}],109:[function(a,u,c){u.exports=function(i,s){if(i===s){var l=s[1],d=s[2],h=s[3],m=s[6],g=s[7],p=s[11];i[1]=s[4],i[2]=s[8],i[3]=s[12],i[4]=l,i[6]=s[9],i[7]=s[13],i[8]=d,i[9]=m,i[11]=s[14],i[12]=h,i[13]=g,i[14]=p}else i[0]=s[0],i[1]=s[4],i[2]=s[8],i[3]=s[12],i[4]=s[1],i[5]=s[5],i[6]=s[9],i[7]=s[13],i[8]=s[2],i[9]=s[6],i[10]=s[10],i[11]=s[14],i[12]=s[3],i[13]=s[7],i[14]=s[11],i[15]=s[15];return i}},{}],110:[function(a,u,c){var i=a("barycentric"),s=a("polytope-closest-point/lib/closest_point_2d.js");function l(m,g){for(var p=[0,0,0,0],v=0;v<4;++v)for(var y=0;y<4;++y)p[y]+=m[4*v+y]*g[v];return p}function d(m,g,p,v,y){for(var x=l(v,l(p,l(g,[m[0],m[1],m[2],1]))),w=0;w<3;++w)x[w]/=x[3];return[.5*y[0]*(1+x[0]),.5*y[1]*(1-x[1])]}function h(m,g){for(var p=[0,0,0],v=0;v1.0001)return null;S+=A[k]}return Math.abs(S-1)>.001?null:[b,h(m,A),A]}},{barycentric:14,"polytope-closest-point/lib/closest_point_2d.js":270}],111:[function(a,u,c){var i=a("glslify"),s=i([`precision highp float; +#define GLSLIFY 1 + +attribute vec3 position, normal; +attribute vec4 color; +attribute vec2 uv; + +uniform mat4 model + , view + , projection + , inverseModel; +uniform vec3 eyePosition + , lightPosition; + +varying vec3 f_normal + , f_lightDirection + , f_eyeDirection + , f_data; +varying vec4 f_color; +varying vec2 f_uv; + +vec4 project(vec3 p) { + return projection * view * model * vec4(p, 1.0); +} + +void main() { + gl_Position = project(position); + + //Lighting geometry parameters + vec4 cameraCoordinate = view * vec4(position , 1.0); + cameraCoordinate.xyz /= cameraCoordinate.w; + f_lightDirection = lightPosition - cameraCoordinate.xyz; + f_eyeDirection = eyePosition - cameraCoordinate.xyz; + f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz); + + f_color = color; + f_data = position; + f_uv = uv; +} +`]),l=i([`#extension GL_OES_standard_derivatives : enable + +precision highp float; +#define GLSLIFY 1 + +float beckmannDistribution(float x, float roughness) { + float NdotH = max(x, 0.0001); + float cos2Alpha = NdotH * NdotH; + float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; + float roughness2 = roughness * roughness; + float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; + return exp(tan2Alpha / roughness2) / denom; +} + +float cookTorranceSpecular( + vec3 lightDirection, + vec3 viewDirection, + vec3 surfaceNormal, + float roughness, + float fresnel) { + + float VdotN = max(dot(viewDirection, surfaceNormal), 0.0); + float LdotN = max(dot(lightDirection, surfaceNormal), 0.0); + + //Half angle vector + vec3 H = normalize(lightDirection + viewDirection); + + //Geometric term + float NdotH = max(dot(surfaceNormal, H), 0.0); + float VdotH = max(dot(viewDirection, H), 0.000001); + float LdotH = max(dot(lightDirection, H), 0.000001); + float G1 = (2.0 * NdotH * VdotN) / VdotH; + float G2 = (2.0 * NdotH * LdotN) / LdotH; + float G = min(1.0, min(G1, G2)); + + //Distribution term + float D = beckmannDistribution(NdotH, roughness); + + //Fresnel term + float F = pow(1.0 - VdotN, fresnel); + + //Multiply terms and done + return G * F * D / max(3.14159265 * VdotN, 0.000001); +} + +//#pragma glslify: beckmann = require(glsl-specular-beckmann) // used in gl-surface3d + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform float roughness + , fresnel + , kambient + , kdiffuse + , kspecular; +uniform sampler2D texture; + +varying vec3 f_normal + , f_lightDirection + , f_eyeDirection + , f_data; +varying vec4 f_color; +varying vec2 f_uv; + +void main() { + if (f_color.a == 0.0 || + outOfRange(clipBounds[0], clipBounds[1], f_data) + ) discard; + + vec3 N = normalize(f_normal); + vec3 L = normalize(f_lightDirection); + vec3 V = normalize(f_eyeDirection); + + if(gl_FrontFacing) { + N = -N; + } + + float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel))); + //float specular = max(0.0, beckmann(L, V, N, roughness)); // used in gl-surface3d + + float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); + + vec4 surfaceColor = vec4(f_color.rgb, 1.0) * texture2D(texture, f_uv); + vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); + + gl_FragColor = litColor * f_color.a; +} +`]),d=i([`precision highp float; +#define GLSLIFY 1 + +attribute vec3 position; +attribute vec4 color; +attribute vec2 uv; + +uniform mat4 model, view, projection; + +varying vec4 f_color; +varying vec3 f_data; +varying vec2 f_uv; + +void main() { + gl_Position = projection * view * model * vec4(position, 1.0); + f_color = color; + f_data = position; + f_uv = uv; +}`]),h=i([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform sampler2D texture; +uniform float opacity; + +varying vec4 f_color; +varying vec3 f_data; +varying vec2 f_uv; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard; + + gl_FragColor = f_color * texture2D(texture, f_uv) * opacity; +}`]),m=i([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +attribute vec3 position; +attribute vec4 color; +attribute vec2 uv; +attribute float pointSize; + +uniform mat4 model, view, projection; +uniform vec3 clipBounds[2]; + +varying vec4 f_color; +varying vec2 f_uv; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], position)) { + + gl_Position = vec4(0.0, 0.0 ,0.0 ,0.0); + } else { + gl_Position = projection * view * model * vec4(position, 1.0); + } + gl_PointSize = pointSize; + f_color = color; + f_uv = uv; +}`]),g=i([`precision highp float; +#define GLSLIFY 1 + +uniform sampler2D texture; +uniform float opacity; + +varying vec4 f_color; +varying vec2 f_uv; + +void main() { + vec2 pointR = gl_PointCoord.xy - vec2(0.5, 0.5); + if(dot(pointR, pointR) > 0.25) { + discard; + } + gl_FragColor = f_color * texture2D(texture, f_uv) * opacity; +}`]),p=i([`precision highp float; +#define GLSLIFY 1 + +attribute vec3 position; +attribute vec4 id; + +uniform mat4 model, view, projection; + +varying vec3 f_position; +varying vec4 f_id; + +void main() { + gl_Position = projection * view * model * vec4(position, 1.0); + f_id = id; + f_position = position; +}`]),v=i([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform float pickId; + +varying vec3 f_position; +varying vec4 f_id; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; + + gl_FragColor = vec4(pickId, f_id.xyz); +}`]),y=i([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +attribute vec3 position; +attribute float pointSize; +attribute vec4 id; + +uniform mat4 model, view, projection; +uniform vec3 clipBounds[2]; + +varying vec3 f_position; +varying vec4 f_id; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], position)) { + + gl_Position = vec4(0.0, 0.0, 0.0, 0.0); + } else { + gl_Position = projection * view * model * vec4(position, 1.0); + gl_PointSize = pointSize; + } + f_id = id; + f_position = position; +}`]),x=i([`precision highp float; +#define GLSLIFY 1 + +attribute vec3 position; + +uniform mat4 model, view, projection; + +void main() { + gl_Position = projection * view * model * vec4(position, 1.0); +}`]),w=i([`precision highp float; +#define GLSLIFY 1 + +uniform vec3 contourColor; + +void main() { + gl_FragColor = vec4(contourColor, 1.0); +} +`]);c.meshShader={vertex:s,fragment:l,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},c.wireShader={vertex:d,fragment:h,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},c.pointShader={vertex:m,fragment:g,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},c.pickShader={vertex:p,fragment:v,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},c.pointPickShader={vertex:y,fragment:v,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},c.contourShader={vertex:x,fragment:w,attributes:[{name:"position",type:"vec3"}]}},{glslify:231}],112:[function(a,u,c){var i=a("gl-shader"),s=a("gl-buffer"),l=a("gl-vao"),d=a("gl-texture2d"),h=a("normals"),m=a("gl-mat4/multiply"),g=a("gl-mat4/invert"),p=a("ndarray"),v=a("colormap"),y=a("simplicial-complex-contour"),x=a("typedarray-pool"),w=a("./lib/shaders"),k=a("./lib/closest-point"),b=w.meshShader,T=w.wireShader,_=w.pointShader,M=w.pickShader,A=w.pointPickShader,S=w.contourShader,E=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function D(W,K,te,Y,Z,re,U,q,$,ne,H,Q,ee,ie,ae,ue,le,ge,fe,me,_e,we,Te,Oe,de,ye,Me){this.gl=W,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=K,this.dirty=!0,this.triShader=te,this.lineShader=Y,this.pointShader=Z,this.pickShader=re,this.pointPickShader=U,this.contourShader=q,this.trianglePositions=$,this.triangleColors=H,this.triangleNormals=ee,this.triangleUVs=Q,this.triangleIds=ne,this.triangleVAO=ie,this.triangleCount=0,this.lineWidth=1,this.edgePositions=ae,this.edgeColors=le,this.edgeUVs=ge,this.edgeIds=ue,this.edgeVAO=fe,this.edgeCount=0,this.pointPositions=me,this.pointColors=we,this.pointUVs=Te,this.pointSizes=Oe,this.pointIds=_e,this.pointVAO=de,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=ye,this.contourVAO=Me,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickVertex=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.hasAlpha=!1,this.opacityscale=!1,this._model=E,this._view=E,this._projection=E,this._resolution=[1,1]}var O=D.prototype;function R(W,K){if(!K||!K.length)return 1;for(var te=0;teW&&te>0){var Y=(K[te][0]-W)/(K[te][0]-K[te-1][0]);return K[te][1]*(1-Y)+Y*K[te-1][1]}}return 1}function z(W){var K=i(W,b.vertex,b.fragment);return K.attributes.position.location=0,K.attributes.color.location=2,K.attributes.uv.location=3,K.attributes.normal.location=4,K}function L(W){var K=i(W,T.vertex,T.fragment);return K.attributes.position.location=0,K.attributes.color.location=2,K.attributes.uv.location=3,K}function P(W){var K=i(W,_.vertex,_.fragment);return K.attributes.position.location=0,K.attributes.color.location=2,K.attributes.uv.location=3,K.attributes.pointSize.location=4,K}function N(W){var K=i(W,M.vertex,M.fragment);return K.attributes.position.location=0,K.attributes.id.location=1,K}function B(W){var K=i(W,A.vertex,A.fragment);return K.attributes.position.location=0,K.attributes.id.location=1,K.attributes.pointSize.location=4,K}function G(W){var K=i(W,S.vertex,S.fragment);return K.attributes.position.location=0,K}O.isOpaque=function(){return!this.hasAlpha},O.isTransparent=function(){return this.hasAlpha},O.pickSlots=1,O.setPickBase=function(W){this.pickId=W},O.highlight=function(W){if(W&&this.contourEnable){for(var K=y(this.cells,this.intensity,W.intensity),te=K.cells,Y=K.vertexIds,Z=K.vertexWeights,re=te.length,U=x.mallocFloat32(6*re),q=0,$=0;$0&&((ne=this.triShader).bind(),ne.uniforms=q,this.triangleVAO.bind(),K.drawArrays(K.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&this.lineWidth>0&&((ne=this.lineShader).bind(),ne.uniforms=q,this.edgeVAO.bind(),K.lineWidth(this.lineWidth*this.pixelRatio),K.drawArrays(K.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0&&((ne=this.pointShader).bind(),ne.uniforms=q,this.pointVAO.bind(),K.drawArrays(K.POINTS,0,this.pointCount),this.pointVAO.unbind()),this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0&&((ne=this.contourShader).bind(),ne.uniforms=q,this.contourVAO.bind(),K.drawArrays(K.LINES,0,this.contourCount),this.contourVAO.unbind())},O.drawPick=function(W){W=W||{};for(var K=this.gl,te=W.model||E,Y=W.view||E,Z=W.projection||E,re=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],U=0;U<3;++U)re[0][U]=Math.max(re[0][U],this.clipBounds[0][U]),re[1][U]=Math.min(re[1][U],this.clipBounds[1][U]);this._model=[].slice.call(te),this._view=[].slice.call(Y),this._projection=[].slice.call(Z),this._resolution=[K.drawingBufferWidth,K.drawingBufferHeight];var q,$={model:te,view:Y,projection:Z,clipBounds:re,pickId:this.pickId/255};(q=this.pickShader).bind(),q.uniforms=$,this.triangleCount>0&&(this.triangleVAO.bind(),K.drawArrays(K.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),K.lineWidth(this.lineWidth*this.pixelRatio),K.drawArrays(K.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0&&((q=this.pointPickShader).bind(),q.uniforms=$,this.pointVAO.bind(),K.drawArrays(K.POINTS,0,this.pointCount),this.pointVAO.unbind())},O.pick=function(W){if(!W||W.id!==this.pickId)return null;for(var K=W.value[0]+256*W.value[1]+65536*W.value[2],te=this.cells[K],Y=this.positions,Z=new Array(te.length),re=0;reA[Z]&&(_.uniforms.dataAxis=g,_.uniforms.screenOffset=p,_.uniforms.color=P[b],_.uniforms.angle=N[b],S.drawArrays(S.TRIANGLES,A[Z],A[re]-A[Z]))),B[b]&&Y&&(p[1^b]-=U*R*G[b],_.uniforms.dataAxis=v,_.uniforms.screenOffset=p,_.uniforms.color=W[b],_.uniforms.angle=K[b],S.drawArrays(S.TRIANGLES,te,Y)),p[1^b]=U*E[2+(1^b)]-1,z[b+2]&&(p[1^b]+=U*R*L[b+2],ZA[Z]&&(_.uniforms.dataAxis=g,_.uniforms.screenOffset=p,_.uniforms.color=P[b+2],_.uniforms.angle=N[b+2],S.drawArrays(S.TRIANGLES,A[Z],A[re]-A[Z]))),B[b+2]&&Y&&(p[1^b]+=U*R*G[b+2],_.uniforms.dataAxis=v,_.uniforms.screenOffset=p,_.uniforms.color=W[b+2],_.uniforms.angle=K[b+2],S.drawArrays(S.TRIANGLES,te,Y))}),k.drawTitle=function(){var b=[0,0],T=[0,0];return function(){var _=this.plot,M=this.shader,A=_.gl,S=_.screenBox,E=_.titleCenter,D=_.titleAngle,O=_.titleColor,R=_.pixelRatio;if(this.titleCount){for(var z=0;z<2;++z)T[z]=2*(E[z]*R-S[z])/(S[2+z]-S[z])-1;M.bind(),M.uniforms.dataAxis=b,M.uniforms.screenOffset=T,M.uniforms.angle=D,M.uniforms.color=O,A.drawArrays(A.TRIANGLES,this.titleOffset,this.titleCount)}}}(),k.bind=(y=[0,0],x=[0,0],w=[0,0],function(){var b=this.plot,T=this.shader,_=b._tickBounds,M=b.dataBox,A=b.screenBox,S=b.viewBox;T.bind();for(var E=0;E<2;++E){var D=_[E],O=_[E+2]-D,R=.5*(M[E+2]+M[E]),z=M[E+2]-M[E],L=S[E],P=S[E+2]-L,N=A[E],B=A[E+2]-N;x[E]=2*O/z*P/B,y[E]=2*(D-R)/z*P/B}w[1]=2*b.pixelRatio/(A[3]-A[1]),w[0]=w[1]*(A[3]-A[1])/(A[2]-A[0]),T.uniforms.dataScale=x,T.uniforms.dataShift=y,T.uniforms.textScale=w,this.vbo.bind(),T.attributes.textCoordinate.pointer()}),k.update=function(b){var T,_,M,A,S,E=[],D=b.ticks,O=b.bounds;for(S=0;S<2;++S){var R=[Math.floor(E.length/3)],z=[-1/0],L=D[S];for(T=0;T=0){var L=x[z]-k[z]*(x[z+2]-x[z])/(k[z+2]-k[z]);z===0?_.drawLine(L,x[1],L,x[3],R[z],O[z]):_.drawLine(x[0],L,x[2],L,R[z],O[z])}}for(z=0;z=0;--y)this.objects[y].dispose();for(this.objects.length=0,y=this.overlays.length-1;y>=0;--y)this.overlays[y].dispose();this.overlays.length=0,this.gl=null},g.addObject=function(y){this.objects.indexOf(y)<0&&(this.objects.push(y),this.setDirty())},g.removeObject=function(y){for(var x=this.objects,w=0;wMath.abs(A))y.rotate(D,0,0,-M*S*Math.PI*T.rotateSpeed/window.innerWidth);else if(!T._ortho){var O=-T.zoomSpeed*E*A/window.innerHeight*(D-y.lastT())/20;y.pan(D,0,0,w*(Math.exp(O)-1))}}},!0)},T.enableMouseListeners(),T};var i=a("right-now"),s=a("3d-view"),l=a("mouse-change"),d=a("mouse-wheel"),h=a("mouse-event-offset"),m=a("has-passive-events")},{"3d-view":7,"has-passive-events":232,"mouse-change":247,"mouse-event-offset":248,"mouse-wheel":250,"right-now":278}],120:[function(a,u,c){var i=a("glslify"),s=a("gl-shader"),l=i([`precision mediump float; +#define GLSLIFY 1 +attribute vec2 position; +varying vec2 uv; +void main() { + uv = position; + gl_Position = vec4(position, 0, 1); +}`]),d=i([`precision mediump float; +#define GLSLIFY 1 + +uniform sampler2D accumBuffer; +varying vec2 uv; + +void main() { + vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0)); + gl_FragColor = min(vec4(1,1,1,1), accum); +}`]);u.exports=function(h){return s(h,l,d,null,[{name:"position",type:"vec2"}])}},{"gl-shader":132,glslify:231}],121:[function(a,u,c){var i=a("./camera.js"),s=a("gl-axes3d"),l=a("gl-axes3d/properties"),d=a("gl-spikes3d"),h=a("gl-select-static"),m=a("gl-fbo"),g=a("a-big-triangle"),p=a("mouse-change"),v=a("gl-mat4/perspective"),y=a("gl-mat4/ortho"),x=a("./lib/shader"),w=a("is-mobile")({tablet:!0,featureDetect:!0});function k(){this.mouse=[-1,-1],this.screen=null,this.distance=1/0,this.index=null,this.dataCoordinate=null,this.dataPosition=null,this.object=null,this.data=null}function b(_){var M=Math.round(Math.log(Math.abs(_))/Math.log(10));if(M<0){var A=Math.round(Math.pow(10,-M));return Math.ceil(_*A)/A}return M>0?(A=Math.round(Math.pow(10,M)),Math.ceil(_/A)*A):Math.ceil(_)}function T(_){return typeof _!="boolean"||_}u.exports={createScene:function(_){(_=_||{}).camera=_.camera||{};var M=_.canvas;M||(M=document.createElement("canvas"),_.container?_.container.appendChild(M):document.body.appendChild(M));var A=_.gl;if(A||(_.glOptions&&(w=!!_.glOptions.preserveDrawingBuffer),A=function(fe,me){var _e=null;try{(_e=fe.getContext("webgl",me))||(_e=fe.getContext("experimental-webgl",me))}catch{return null}return _e}(M,_.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:w})),!A)throw new Error("webgl not supported");var S=_.bounds||[[-10,-10,-10],[10,10,10]],E=new k,D=m(A,A.drawingBufferWidth,A.drawingBufferHeight,{preferFloat:!w}),O=x(A),R=_.cameraObject&&_.cameraObject._ortho===!0||_.camera.projection&&_.camera.projection.type==="orthographic"||!1,z={eye:_.camera.eye||[2,0,0],center:_.camera.center||[0,0,0],up:_.camera.up||[0,1,0],zoomMin:_.camera.zoomMax||.1,zoomMax:_.camera.zoomMin||100,mode:_.camera.mode||"turntable",_ortho:R},L=_.axes||{},P=s(A,L);P.enable=!L.disable;var N=_.spikes||{},B=d(A,N),G=[],W=[],K=[],te=[],Y=!0,Z=!0,re=new Array(16),U=new Array(16),q={view:null,projection:re,model:U,_ortho:!1},$=(Z=!0,[A.drawingBufferWidth,A.drawingBufferHeight]),ne=_.cameraObject||i(M,z),H={gl:A,contextLost:!1,pixelRatio:_.pixelRatio||1,canvas:M,selection:E,camera:ne,axes:P,axesPixels:null,spikes:B,bounds:S,objects:G,shape:$,aspect:_.aspectRatio||[1,1,1],pickRadius:_.pickRadius||10,zNear:_.zNear||.01,zFar:_.zFar||1e3,fovy:_.fovy||Math.PI/4,clearColor:_.clearColor||[0,0,0,0],autoResize:T(_.autoResize),autoBounds:T(_.autoBounds),autoScale:!!_.autoScale,autoCenter:T(_.autoCenter),clipToBounds:T(_.clipToBounds),snapToData:!!_.snapToData,onselect:_.onselect||null,onrender:_.onrender||null,onclick:_.onclick||null,cameraParams:q,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(fe){this.aspect[0]=fe.x,this.aspect[1]=fe.y,this.aspect[2]=fe.z,Z=!0},setBounds:function(fe,me){this.bounds[0][fe]=me.min,this.bounds[1][fe]=me.max},setClearColor:function(fe){this.clearColor=fe},clearRGBA:function(){this.gl.clearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]),this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT)}},Q=[A.drawingBufferWidth/H.pixelRatio|0,A.drawingBufferHeight/H.pixelRatio|0];function ee(){if(!H._stopped&&H.autoResize){var fe=M.parentNode,me=1,_e=1;fe&&fe!==document.body?(me=fe.clientWidth,_e=fe.clientHeight):(me=window.innerWidth,_e=window.innerHeight);var we=0|Math.ceil(me*H.pixelRatio),Te=0|Math.ceil(_e*H.pixelRatio);if(we!==M.width||Te!==M.height){M.width=we,M.height=Te;var Oe=M.style;Oe.position=Oe.position||"absolute",Oe.left="0px",Oe.top="0px",Oe.width=me+"px",Oe.height=_e+"px",Y=!0}}}H.autoResize&&ee();function ie(){for(var fe=G.length,me=te.length,_e=0;_e0&&K[me-1]===0;)K.pop(),te.pop().dispose()}function ae(){if(H.contextLost)return!0;A.isContextLost()&&(H.contextLost=!0,H.mouseListener.enabled=!1,H.selection.object=null,H.oncontextloss&&H.oncontextloss())}window.addEventListener("resize",ee),H.update=function(fe){H._stopped||(Y=!0,Z=!0)},H.add=function(fe){H._stopped||(fe.axes=P,G.push(fe),W.push(-1),Y=!0,Z=!0,ie())},H.remove=function(fe){if(!H._stopped){var me=G.indexOf(fe);me<0||(G.splice(me,1),W.pop(),Y=!0,Z=!0,ie())}},H.dispose=function(){if(!H._stopped&&(H._stopped=!0,window.removeEventListener("resize",ee),M.removeEventListener("webglcontextlost",ae),H.mouseListener.enabled=!1,!H.contextLost)){P.dispose(),B.dispose();for(var fe=0;feE.distance)continue;for(var ke=0;ke 1.0) { + discard; + } + baseColor = mix(borderColor, color, step(radius, centerFraction)); + gl_FragColor = vec4(baseColor.rgb * baseColor.a, baseColor.a); + } +} +`]),c.pickVertex=i([`precision mediump float; +#define GLSLIFY 1 + +attribute vec2 position; +attribute vec4 pickId; + +uniform mat3 matrix; +uniform float pointSize; +uniform vec4 pickOffset; + +varying vec4 fragId; + +void main() { + vec3 hgPosition = matrix * vec3(position, 1); + gl_Position = vec4(hgPosition.xy, 0, hgPosition.z); + gl_PointSize = pointSize; + + vec4 id = pickId + pickOffset; + id.y += floor(id.x / 256.0); + id.x -= floor(id.x / 256.0) * 256.0; + + id.z += floor(id.y / 256.0); + id.y -= floor(id.y / 256.0) * 256.0; + + id.w += floor(id.z / 256.0); + id.z -= floor(id.z / 256.0) * 256.0; + + fragId = id; +} +`]),c.pickFragment=i([`precision mediump float; +#define GLSLIFY 1 + +varying vec4 fragId; + +void main() { + float radius = length(2.0 * gl_PointCoord.xy - 1.0); + if(radius > 1.0) { + discard; + } + gl_FragColor = fragId / 255.0; +} +`])},{glslify:231}],123:[function(a,u,c){var i=a("gl-shader"),s=a("gl-buffer"),l=a("typedarray-pool"),d=a("./lib/shader");function h(v,y,x,w,k){this.plot=v,this.offsetBuffer=y,this.pickBuffer=x,this.shader=w,this.pickShader=k,this.sizeMin=.5,this.sizeMinCap=2,this.sizeMax=20,this.areaRatio=1,this.pointCount=0,this.color=[1,0,0,1],this.borderColor=[0,0,0,1],this.blend=!1,this.pickOffset=0,this.points=null}u.exports=function(v,y){var x=v.gl,w=s(x),k=s(x),b=i(x,d.pointVertex,d.pointFragment),T=i(x,d.pickVertex,d.pickFragment),_=new h(v,w,k,b,T);return _.update(y),v.addObject(_),_};var m,g,p=h.prototype;p.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.offsetBuffer.dispose(),this.pickBuffer.dispose(),this.plot.removeObject(this)},p.update=function(v){var y;function x(A,S){return A in v?v[A]:S}v=v||{},this.sizeMin=x("sizeMin",.5),this.sizeMax=x("sizeMax",20),this.color=x("color",[1,0,0,1]).slice(),this.areaRatio=x("areaRatio",1),this.borderColor=x("borderColor",[0,0,0,1]).slice(),this.blend=x("blend",!1);var w=v.positions.length>>>1,k=v.positions instanceof Float32Array,b=v.idToIndex instanceof Int32Array&&v.idToIndex.length>=w,T=v.positions,_=k?T:l.mallocFloat32(T.length),M=b?v.idToIndex:l.mallocInt32(w);if(k||_.set(T),!b)for(_.set(T),y=0;y>>1;for(O=0;O=D[0]&&L<=D[2]&&P>=D[1]&&P<=D[3]&&R++}return R}(this.points,k),M=this.plot.pickPixelRatio*Math.max(Math.min(this.sizeMinCap,this.sizeMin),Math.min(this.sizeMax,this.sizeMax/Math.pow(_,.33333)));m[0]=2/b,m[4]=2/T,m[6]=-2*k[0]/b-1,m[7]=-2*k[1]/T-1,this.offsetBuffer.bind(),x.bind(),x.attributes.position.pointer(),x.uniforms.matrix=m,x.uniforms.color=this.color,x.uniforms.borderColor=this.borderColor,x.uniforms.pointCloud=M<5,x.uniforms.pointSize=M,x.uniforms.centerFraction=Math.min(1,Math.max(0,Math.sqrt(1-this.areaRatio))),y&&(g[0]=255&v,g[1]=v>>8&255,g[2]=v>>16&255,g[3]=v>>24&255,this.pickBuffer.bind(),x.attributes.pickId.pointer(w.UNSIGNED_BYTE),x.uniforms.pickOffset=g,this.pickOffset=v);var A=w.getParameter(w.BLEND),S=w.getParameter(w.DITHER);return A&&!this.blend&&w.disable(w.BLEND),S&&w.disable(w.DITHER),w.drawArrays(w.POINTS,0,this.pointCount),A&&!this.blend&&w.enable(w.BLEND),S&&w.enable(w.DITHER),v+this.pointCount}),p.draw=p.unifiedDraw,p.drawPick=p.unifiedDraw,p.pick=function(v,y,x){var w=this.pickOffset,k=this.pointCount;if(x=w+k)return null;var b=x-w,T=this.points;return{object:this,pointId:b,dataCoord:[T[2*b],T[2*b+1]]}}},{"./lib/shader":122,"gl-buffer":78,"gl-shader":132,"typedarray-pool":308}],124:[function(a,u,c){u.exports=function(i,s,l,d){var h,m,g,p,v,y=s[0],x=s[1],w=s[2],k=s[3],b=l[0],T=l[1],_=l[2],M=l[3];return(m=y*b+x*T+w*_+k*M)<0&&(m=-m,b=-b,T=-T,_=-_,M=-M),1-m>1e-6?(h=Math.acos(m),g=Math.sin(h),p=Math.sin((1-d)*h)/g,v=Math.sin(d*h)/g):(p=1-d,v=d),i[0]=p*y+v*b,i[1]=p*x+v*T,i[2]=p*w+v*_,i[3]=p*k+v*M,i}},{}],125:[function(a,u,c){u.exports=function(i){return i||i===0?i.toString():""}},{}],126:[function(a,u,c){var i=a("vectorize-text");u.exports=function(l,d,h){var m=s[d];if(m||(m=s[d]={}),l in m)return m[l];var g={textAlign:"center",textBaseline:"middle",lineHeight:1,font:d,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},triangles:!0},p=i(l,g);g.triangles=!1;var v,y,x=i(l,g);if(h&&h!==1){for(v=0;v max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +attribute vec3 position; +attribute vec4 color; +attribute vec2 glyph; +attribute vec4 id; + +uniform vec4 highlightId; +uniform float highlightScale; +uniform mat4 model, view, projection; +uniform vec3 clipBounds[2]; + +varying vec4 interpColor; +varying vec4 pickId; +varying vec3 dataCoordinate; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], position)) { + + gl_Position = vec4(0,0,0,0); + } else { + float scale = 1.0; + if(distance(highlightId, id) < 0.0001) { + scale = highlightScale; + } + + vec4 worldPosition = model * vec4(position, 1); + vec4 viewPosition = view * worldPosition; + viewPosition = viewPosition / viewPosition.w; + vec4 clipPosition = projection * (viewPosition + scale * vec4(glyph.x, -glyph.y, 0, 0)); + + gl_Position = clipPosition; + interpColor = color; + pickId = id; + dataCoordinate = position; + } +}`]),d=s([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +attribute vec3 position; +attribute vec4 color; +attribute vec2 glyph; +attribute vec4 id; + +uniform mat4 model, view, projection; +uniform vec2 screenSize; +uniform vec3 clipBounds[2]; +uniform float highlightScale, pixelRatio; +uniform vec4 highlightId; + +varying vec4 interpColor; +varying vec4 pickId; +varying vec3 dataCoordinate; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], position)) { + + gl_Position = vec4(0,0,0,0); + } else { + float scale = pixelRatio; + if(distance(highlightId.bgr, id.bgr) < 0.001) { + scale *= highlightScale; + } + + vec4 worldPosition = model * vec4(position, 1.0); + vec4 viewPosition = view * worldPosition; + vec4 clipPosition = projection * viewPosition; + clipPosition /= clipPosition.w; + + gl_Position = clipPosition + vec4(screenSize * scale * vec2(glyph.x, -glyph.y), 0.0, 0.0); + interpColor = color; + pickId = id; + dataCoordinate = position; + } +}`]),h=s([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +attribute vec3 position; +attribute vec4 color; +attribute vec2 glyph; +attribute vec4 id; + +uniform float highlightScale; +uniform vec4 highlightId; +uniform vec3 axes[2]; +uniform mat4 model, view, projection; +uniform vec2 screenSize; +uniform vec3 clipBounds[2]; +uniform float scale, pixelRatio; + +varying vec4 interpColor; +varying vec4 pickId; +varying vec3 dataCoordinate; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], position)) { + + gl_Position = vec4(0,0,0,0); + } else { + float lscale = pixelRatio * scale; + if(distance(highlightId, id) < 0.0001) { + lscale *= highlightScale; + } + + vec4 clipCenter = projection * view * model * vec4(position, 1); + vec3 dataPosition = position + 0.5*lscale*(axes[0] * glyph.x + axes[1] * glyph.y) * clipCenter.w * screenSize.y; + vec4 clipPosition = projection * view * model * vec4(dataPosition, 1); + + gl_Position = clipPosition; + interpColor = color; + pickId = id; + dataCoordinate = dataPosition; + } +} +`]),m=s([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 fragClipBounds[2]; +uniform float opacity; + +varying vec4 interpColor; +varying vec3 dataCoordinate; + +void main() { + if ( + outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate) || + interpColor.a * opacity == 0. + ) discard; + gl_FragColor = interpColor * opacity; +} +`]),g=s([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 fragClipBounds[2]; +uniform float pickGroup; + +varying vec4 pickId; +varying vec3 dataCoordinate; + +void main() { + if (outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate)) discard; + + gl_FragColor = vec4(pickGroup, pickId.bgr); +}`]),p=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],v={vertex:l,fragment:m,attributes:p},y={vertex:d,fragment:m,attributes:p},x={vertex:h,fragment:m,attributes:p},w={vertex:l,fragment:g,attributes:p},k={vertex:d,fragment:g,attributes:p},b={vertex:h,fragment:g,attributes:p};function T(_,M){var A=i(_,M),S=A.attributes;return S.position.location=0,S.color.location=1,S.glyph.location=2,S.id.location=3,A}c.createPerspective=function(_){return T(_,v)},c.createOrtho=function(_){return T(_,y)},c.createProject=function(_){return T(_,x)},c.createPickPerspective=function(_){return T(_,w)},c.createPickOrtho=function(_){return T(_,k)},c.createPickProject=function(_){return T(_,b)}},{"gl-shader":132,glslify:231}],128:[function(a,u,c){var i=a("is-string-blank"),s=a("gl-buffer"),l=a("gl-vao"),d=a("typedarray-pool"),h=a("gl-mat4/multiply"),m=a("./lib/shaders"),g=a("./lib/glyphs"),p=a("./lib/get-simple-string"),v=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function y(K,te){var Y=K[0],Z=K[1],re=K[2],U=K[3];return K[0]=te[0]*Y+te[4]*Z+te[8]*re+te[12]*U,K[1]=te[1]*Y+te[5]*Z+te[9]*re+te[13]*U,K[2]=te[2]*Y+te[6]*Z+te[10]*re+te[14]*U,K[3]=te[3]*Y+te[7]*Z+te[11]*re+te[15]*U,K}function x(K,te,Y,Z){return y(Z,Z),y(Z,Z),y(Z,Z)}function w(K,te){this.index=K,this.dataCoordinate=this.position=te}function k(K){return K===!0||K>1?1:K}function b(K,te,Y,Z,re,U,q,$,ne,H,Q,ee){this.gl=K,this.pixelRatio=1,this.shader=te,this.orthoShader=Y,this.projectShader=Z,this.pointBuffer=re,this.colorBuffer=U,this.glyphBuffer=q,this.idBuffer=$,this.vao=ne,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.hasAlpha=!1,this.lineWidth=0,this.projectScale=[2/3,2/3,2/3],this.projectOpacity=[1,1,1],this.projectHasAlpha=!1,this.pickId=0,this.pickPerspectiveShader=H,this.pickOrthoShader=Q,this.pickProjectShader=ee,this.points=[],this._selectResult=new w(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}u.exports=function(K){var te=K.gl,Y=m.createPerspective(te),Z=m.createOrtho(te),re=m.createProject(te),U=m.createPickPerspective(te),q=m.createPickOrtho(te),$=m.createPickProject(te),ne=s(te),H=s(te),Q=s(te),ee=s(te),ie=l(te,[{buffer:ne,size:3,type:te.FLOAT},{buffer:H,size:4,type:te.FLOAT},{buffer:Q,size:2,type:te.FLOAT},{buffer:ee,size:4,type:te.UNSIGNED_BYTE,normalized:!0}]),ae=new b(te,Y,Z,re,ne,H,Q,ee,ie,U,q,$);return ae.update(K),ae};var T=b.prototype;T.pickSlots=1,T.setPickBase=function(K){this.pickId=K},T.isTransparent=function(){if(this.hasAlpha)return!0;for(var K=0;K<3;++K)if(this.axesProject[K]&&this.projectHasAlpha)return!0;return!1},T.isOpaque=function(){if(!this.hasAlpha)return!0;for(var K=0;K<3;++K)if(this.axesProject[K]&&!this.projectHasAlpha)return!0;return!1};var _=[0,0],M=[0,0,0],A=[0,0,0],S=[0,0,0,1],E=[0,0,0,1],D=v.slice(),O=[0,0,0],R=[[0,0,0],[0,0,0]];function z(K){return K[0]=K[1]=K[2]=0,K}function L(K,te){return K[0]=te[0],K[1]=te[1],K[2]=te[2],K[3]=1,K}function P(K,te,Y,Z){return K[0]=te[0],K[1]=te[1],K[2]=te[2],K[Y]=Z,K}function N(K,te,Y,Z){var re,U=te.axesProject,q=te.gl,$=K.uniforms,ne=Y.model||v,H=Y.view||v,Q=Y.projection||v,ee=te.axesBounds,ie=function(ke){for(var Ee=R,ze=0;ze<2;++ze)for(var Fe=0;Fe<3;++Fe)Ee[ze][Fe]=Math.max(Math.min(ke[ze][Fe],1e8),-1e8);return Ee}(te.clipBounds);re=te.axes&&te.axes.lastCubeProps?te.axes.lastCubeProps.axis:[1,1,1],_[0]=2/q.drawingBufferWidth,_[1]=2/q.drawingBufferHeight,K.bind(),$.view=H,$.projection=Q,$.screenSize=_,$.highlightId=te.highlightId,$.highlightScale=te.highlightScale,$.clipBounds=ie,$.pickGroup=te.pickId/255,$.pixelRatio=Z;for(var ae=0;ae<3;++ae)if(U[ae]){$.scale=te.projectScale[ae],$.opacity=te.projectOpacity[ae];for(var ue=D,le=0;le<16;++le)ue[le]=0;for(le=0;le<4;++le)ue[5*le]=1;ue[5*ae]=0,re[ae]<0?ue[12+ae]=ee[0][ae]:ue[12+ae]=ee[1][ae],h(ue,ne,ue),$.model=ue;var ge=(ae+1)%3,fe=(ae+2)%3,me=z(M),_e=z(A);me[ge]=1,_e[fe]=1;var we=x(0,0,0,L(S,me)),Te=x(0,0,0,L(E,_e));if(Math.abs(we[1])>Math.abs(Te[1])){var Oe=we;we=Te,Te=Oe,Oe=me,me=_e,_e=Oe;var de=ge;ge=fe,fe=de}we[0]<0&&(me[ge]=-1),Te[1]>0&&(_e[fe]=-1);var ye=0,Me=0;for(le=0;le<4;++le)ye+=Math.pow(ne[4*ge+le],2),Me+=Math.pow(ne[4*fe+le],2);me[ge]/=Math.sqrt(ye),_e[fe]/=Math.sqrt(Me),$.axes[0]=me,$.axes[1]=_e,$.fragClipBounds[0]=P(O,ie[0],ae,-1e8),$.fragClipBounds[1]=P(O,ie[1],ae,1e8),te.vao.bind(),te.vao.draw(q.TRIANGLES,te.vertexCount),te.lineWidth>0&&(q.lineWidth(te.lineWidth*Z),te.vao.draw(q.LINES,te.lineVertexCount,te.vertexCount)),te.vao.unbind()}}var B=[[-1e8,-1e8,-1e8],[1e8,1e8,1e8]];function G(K,te,Y,Z,re,U,q){var $=Y.gl;if((U===Y.projectHasAlpha||q)&&N(te,Y,Z,re),U===Y.hasAlpha||q){K.bind();var ne=K.uniforms;ne.model=Z.model||v,ne.view=Z.view||v,ne.projection=Z.projection||v,_[0]=2/$.drawingBufferWidth,_[1]=2/$.drawingBufferHeight,ne.screenSize=_,ne.highlightId=Y.highlightId,ne.highlightScale=Y.highlightScale,ne.fragClipBounds=B,ne.clipBounds=Y.axes.bounds,ne.opacity=Y.opacity,ne.pickGroup=Y.pickId/255,ne.pixelRatio=re,Y.vao.bind(),Y.vao.draw($.TRIANGLES,Y.vertexCount),Y.lineWidth>0&&($.lineWidth(Y.lineWidth*re),Y.vao.draw($.LINES,Y.lineVertexCount,Y.vertexCount)),Y.vao.unbind()}}function W(K,te,Y,Z){var re;re=Array.isArray(K)?te=this.pointCount||te<0)return null;var Y=this.points[te],Z=this._selectResult;Z.index=te;for(var re=0;re<3;++re)Z.position[re]=Z.dataCoordinate[re]=Y[re];return Z},T.highlight=function(K){if(K){var te=K.index,Y=255&te,Z=te>>8&255,re=te>>16&255;this.highlightId=[Y/255,Z/255,re/255,0]}else this.highlightId=[1,1,1,1]},T.update=function(K){if("perspective"in(K=K||{})&&(this.useOrtho=!K.perspective),"orthographic"in K&&(this.useOrtho=!!K.orthographic),"lineWidth"in K&&(this.lineWidth=K.lineWidth),"project"in K)if(Array.isArray(K.project))this.axesProject=K.project;else{var te=!!K.project;this.axesProject=[te,te,te]}if("projectScale"in K)if(Array.isArray(K.projectScale))this.projectScale=K.projectScale.slice();else{var Y=+K.projectScale;this.projectScale=[Y,Y,Y]}if(this.projectHasAlpha=!1,"projectOpacity"in K){Array.isArray(K.projectOpacity)?this.projectOpacity=K.projectOpacity.slice():(Y=+K.projectOpacity,this.projectOpacity=[Y,Y,Y]);for(var Z=0;Z<3;++Z)this.projectOpacity[Z]=k(this.projectOpacity[Z]),this.projectOpacity[Z]<1&&(this.projectHasAlpha=!0)}this.hasAlpha=!1,"opacity"in K&&(this.opacity=k(K.opacity),this.opacity<1&&(this.hasAlpha=!0)),this.dirty=!0;var re,U,q=K.position,$=K.font||"normal",ne=K.alignment||[0,0];if(ne.length===2)re=ne[0],U=ne[1];else for(re=[],U=[],Z=0;Z0){var Ve=0,Ke=fe,Re=[0,0,0,1],qe=[0,0,0,1],We=Array.isArray(ie)&&Array.isArray(ie[0]),Ye=Array.isArray(le)&&Array.isArray(le[0]);e:for(Z=0;Z<_e;++Z){for(ge+=1,we=q[Z],Te=0;Te<3;++Te){if(isNaN(we[Te])||!isFinite(we[Te]))continue e;Q[Te]=Math.max(Q[Te],we[Te]),H[Te]=Math.min(H[Te],we[Te])}Oe=(nt=W(ee,Z,$,this.pixelRatio)).mesh,de=nt.lines,ye=nt.bounds;var nt,ft=nt.visible;if(ft)if(Array.isArray(ie)){if((vt=We?Z0?1-ye[0][0]:Ot<0?1+ye[1][0]:1,Wt*=Wt>0?1-ye[0][1]:Wt<0?1+ye[1][1]:1],Be=Oe.cells||[],Ge=Oe.positions||[];for(Te=0;Te0){var R=p*_;w.drawBox(M-R,A-R,S+R,A+R,x),w.drawBox(M-R,E-R,S+R,E+R,x),w.drawBox(M-R,A-R,M+R,E+R,x),w.drawBox(S-R,A-R,S+R,E+R,x)}}}},h.update=function(m){m=m||{},this.innerFill=!!m.innerFill,this.outerFill=!!m.outerFill,this.innerColor=(m.innerColor||[0,0,0,.5]).slice(),this.outerColor=(m.outerColor||[0,0,0,.5]).slice(),this.borderColor=(m.borderColor||[0,0,0,1]).slice(),this.borderWidth=m.borderWidth||0,this.selectBox=(m.selectBox||this.selectBox).slice()},h.dispose=function(){this.boxBuffer.dispose(),this.boxShader.dispose(),this.plot.removeOverlay(this)}},{"./lib/shaders":129,"gl-buffer":78,"gl-shader":132}],131:[function(a,u,c){u.exports=function(p,v){var y=v[0],x=v[1],w=i(p,y,x,{}),k=s.mallocUint8(y*x*4);return new m(p,w,k)};var i=a("gl-fbo"),s=a("typedarray-pool"),l=a("ndarray"),d=a("bit-twiddle").nextPow2;function h(p,v,y,x,w){this.coord=[p,v],this.id=y,this.value=x,this.distance=w}function m(p,v,y){this.gl=p,this.fbo=v,this.buffer=y,this._readTimeout=null;var x=this;this._readCallback=function(){x.gl&&(v.bind(),p.readPixels(0,0,v.shape[0],v.shape[1],p.RGBA,p.UNSIGNED_BYTE,x.buffer),x._readTimeout=null)}}var g=m.prototype;Object.defineProperty(g,"shape",{get:function(){return this.gl?this.fbo.shape.slice():[0,0]},set:function(p){if(this.gl){this.fbo.shape=p;var v=this.fbo.shape[0],y=this.fbo.shape[1];if(y*v*4>this.buffer.length){s.free(this.buffer);for(var x=this.buffer=s.mallocUint8(d(y*v*4)),w=0;ww)for(y=w;yx)for(y=x;y=0){for(var P=0|L.type.charAt(L.type.length-1),N=new Array(P),B=0;B=0;)G+=1;z[D]=G}var W=new Array(w.length);function K(){T.program=d.program(_,T._vref,T._fref,R,z);for(var te=0;te=0){if((A=_.charCodeAt(_.length-1)-48)<2||A>4)throw new i("","Invalid data type for attribute "+T+": "+_);h(g,p,M[0],y,A,x,T)}else{if(!(_.indexOf("mat")>=0))throw new i("","Unknown data type for attribute "+T+": "+_);var A;if((A=_.charCodeAt(_.length-1)-48)<2||A>4)throw new i("","Invalid data type for attribute "+T+": "+_);m(g,p,M,y,A,x,T)}}}return x};var i=a("./GLError");function s(g,p,v,y,x,w){this._gl=g,this._wrapper=p,this._index=v,this._locations=y,this._dimension=x,this._constFunc=w}var l=s.prototype;l.pointer=function(g,p,v,y){var x=this._gl,w=this._locations[this._index];x.vertexAttribPointer(w,this._dimension,g||x.FLOAT,!!p,v||0,y||0),x.enableVertexAttribArray(w)},l.set=function(g,p,v,y){return this._constFunc(this._locations[this._index],g,p,v,y)},Object.defineProperty(l,"location",{get:function(){return this._locations[this._index]},set:function(g){return g!==this._locations[this._index]&&(this._locations[this._index]=0|g,this._wrapper.program=null),0|g}});var d=[function(g,p,v){return v.length===void 0?g.vertexAttrib1f(p,v):g.vertexAttrib1fv(p,v)},function(g,p,v,y){return v.length===void 0?g.vertexAttrib2f(p,v,y):g.vertexAttrib2fv(p,v)},function(g,p,v,y,x){return v.length===void 0?g.vertexAttrib3f(p,v,y,x):g.vertexAttrib3fv(p,v)},function(g,p,v,y,x,w){return v.length===void 0?g.vertexAttrib4f(p,v,y,x,w):g.vertexAttrib4fv(p,v)}];function h(g,p,v,y,x,w,k){var b=d[x],T=new s(g,p,v,y,x,b);Object.defineProperty(w,k,{set:function(_){return g.disableVertexAttribArray(y[v]),b(g,y[v],_),_},get:function(){return T},enumerable:!0})}function m(g,p,v,y,x,w,k){for(var b=new Array(x),T=new Array(x),_=0;_4)throw new s("","Invalid uniform dimension type for matrix "+name+": "+P);h["uniformMatrix"+L+"fv"](p[S],!1,E);break}throw new s("","Unknown uniform data type for "+name+": "+P)}if((L=P.charCodeAt(P.length-1)-48)<2||L>4)throw new s("","Invalid data type");switch(P.charAt(0)){case"b":case"i":h["uniform"+L+"iv"](p[S],E);break;case"v":h["uniform"+L+"fv"](p[S],E);break;default:throw new s("","Unrecognized data type for vector "+name+": "+P)}}}}}}function y(k,b,T){if(typeof T=="object"){var _=x(T);Object.defineProperty(k,b,{get:l(_),set:v(T),enumerable:!0,configurable:!1})}else p[T]?Object.defineProperty(k,b,{get:(M=T,function(A,S,E){return A.getUniform(S.program,E[M])}),set:v(T),enumerable:!0,configurable:!1}):k[b]=function(A){switch(A){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":case"float":return 0;default:var S=A.indexOf("vec");if(0<=S&&S<=1&&A.length===4+S){if((E=A.charCodeAt(A.length-1)-48)<2||E>4)throw new s("","Invalid data type");return A.charAt(0)==="b"?d(E,!1):d(E,0)}if(A.indexOf("mat")===0&&A.length===4){var E;if((E=A.charCodeAt(A.length-1)-48)<2||E>4)throw new s("","Invalid uniform dimension type for matrix "+name+": "+A);return d(E*E,0)}throw new s("","Unknown uniform data type for "+name+": "+A)}}(g[T].type);var M}function x(k){var b;if(Array.isArray(k)){b=new Array(k.length);for(var T=0;T1){p[0]in m||(m[p[0]]=[]),m=m[p[0]];for(var v=1;v1)for(var x=0;x"u"?a("weakmap-shim"):WeakMap),d=0;function h(v,y,x,w,k,b,T){this.id=v,this.src=y,this.type=x,this.shader=w,this.count=b,this.programs=[],this.cache=T}function m(v){this.gl=v,this.shaders=[{},{}],this.programs={}}h.prototype.dispose=function(){if(--this.count==0){for(var v=this.cache,y=v.gl,x=this.programs,w=0,k=x.length;w 0 U ||b|| > 0. + // Assign z = 0, x = -b, y = a: + // a*-b + b*a + c*0 = -ba + ba + 0 = 0 + if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { + return normalize(vec3(-v.y, v.x, 0.0)); + } else { + return normalize(vec3(0.0, v.z, -v.y)); + } +} + +// Calculate the tube vertex and normal at the given index. +// +// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d. +// +// Each tube segment is made up of a ring of vertices. +// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array. +// The indexes of tube segments run from 0 to 8. +// +vec3 getTubePosition(vec3 d, float index, out vec3 normal) { + float segmentCount = 8.0; + + float angle = 2.0 * 3.14159 * (index / segmentCount); + + vec3 u = getOrthogonalVector(d); + vec3 v = normalize(cross(u, d)); + + vec3 x = u * cos(angle) * length(d); + vec3 y = v * sin(angle) * length(d); + vec3 v3 = x + y; + + normal = normalize(v3); + + return v3; +} + +attribute vec4 vector; +attribute vec4 color, position; +attribute vec2 uv; + +uniform float vectorScale, tubeScale; +uniform mat4 model, view, projection, inverseModel; +uniform vec3 eyePosition, lightPosition; + +varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; +varying vec4 f_color; +varying vec2 f_uv; + +void main() { + // Scale the vector magnitude to stay constant with + // model & view changes. + vec3 normal; + vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal); + vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); + + //Lighting geometry parameters + vec4 cameraCoordinate = view * tubePosition; + cameraCoordinate.xyz /= cameraCoordinate.w; + f_lightDirection = lightPosition - cameraCoordinate.xyz; + f_eyeDirection = eyePosition - cameraCoordinate.xyz; + f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz); + + // vec4 m_position = model * vec4(tubePosition, 1.0); + vec4 t_position = view * tubePosition; + gl_Position = projection * t_position; + + f_color = color; + f_data = tubePosition.xyz; + f_position = position.xyz; + f_uv = uv; +} +`]),l=i([`#extension GL_OES_standard_derivatives : enable + +precision highp float; +#define GLSLIFY 1 + +float beckmannDistribution(float x, float roughness) { + float NdotH = max(x, 0.0001); + float cos2Alpha = NdotH * NdotH; + float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; + float roughness2 = roughness * roughness; + float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; + return exp(tan2Alpha / roughness2) / denom; +} + +float cookTorranceSpecular( + vec3 lightDirection, + vec3 viewDirection, + vec3 surfaceNormal, + float roughness, + float fresnel) { + + float VdotN = max(dot(viewDirection, surfaceNormal), 0.0); + float LdotN = max(dot(lightDirection, surfaceNormal), 0.0); + + //Half angle vector + vec3 H = normalize(lightDirection + viewDirection); + + //Geometric term + float NdotH = max(dot(surfaceNormal, H), 0.0); + float VdotH = max(dot(viewDirection, H), 0.000001); + float LdotH = max(dot(lightDirection, H), 0.000001); + float G1 = (2.0 * NdotH * VdotN) / VdotH; + float G2 = (2.0 * NdotH * LdotN) / LdotH; + float G = min(1.0, min(G1, G2)); + + //Distribution term + float D = beckmannDistribution(NdotH, roughness); + + //Fresnel term + float F = pow(1.0 - VdotN, fresnel); + + //Multiply terms and done + return G * F * D / max(3.14159265 * VdotN, 0.000001); +} + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity; +uniform sampler2D texture; + +varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; +varying vec4 f_color; +varying vec2 f_uv; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; + vec3 N = normalize(f_normal); + vec3 L = normalize(f_lightDirection); + vec3 V = normalize(f_eyeDirection); + + if(gl_FrontFacing) { + N = -N; + } + + float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel))); + float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); + + vec4 surfaceColor = f_color * texture2D(texture, f_uv); + vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); + + gl_FragColor = litColor * opacity; +} +`]),d=i([`precision highp float; + +precision highp float; +#define GLSLIFY 1 + +vec3 getOrthogonalVector(vec3 v) { + // Return up-vector for only-z vector. + // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0). + // From the above if-statement we have ||a|| > 0 U ||b|| > 0. + // Assign z = 0, x = -b, y = a: + // a*-b + b*a + c*0 = -ba + ba + 0 = 0 + if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { + return normalize(vec3(-v.y, v.x, 0.0)); + } else { + return normalize(vec3(0.0, v.z, -v.y)); + } +} + +// Calculate the tube vertex and normal at the given index. +// +// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d. +// +// Each tube segment is made up of a ring of vertices. +// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array. +// The indexes of tube segments run from 0 to 8. +// +vec3 getTubePosition(vec3 d, float index, out vec3 normal) { + float segmentCount = 8.0; + + float angle = 2.0 * 3.14159 * (index / segmentCount); + + vec3 u = getOrthogonalVector(d); + vec3 v = normalize(cross(u, d)); + + vec3 x = u * cos(angle) * length(d); + vec3 y = v * sin(angle) * length(d); + vec3 v3 = x + y; + + normal = normalize(v3); + + return v3; +} + +attribute vec4 vector; +attribute vec4 position; +attribute vec4 id; + +uniform mat4 model, view, projection; +uniform float tubeScale; + +varying vec3 f_position; +varying vec4 f_id; + +void main() { + vec3 normal; + vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal); + vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); + + gl_Position = projection * view * tubePosition; + f_id = id; + f_position = position.xyz; +} +`]),h=i([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform float pickId; + +varying vec3 f_position; +varying vec4 f_id; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; + + gl_FragColor = vec4(pickId, f_id.xyz); +}`]);c.meshShader={vertex:s,fragment:l,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},c.pickShader={vertex:d,fragment:h,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},{glslify:231}],143:[function(a,u,c){var i=a("gl-vec3"),s=a("gl-vec4"),l=["xyz","xzy","yxz","yzx","zxy","zyx"],d=function(y,x,w,k){for(var b=0,T=0;T0)for(_e=0;_e<8;_e++){var we=(_e+1)%8;U.push(ne[_e],H[_e],H[we],H[we],ne[we],ne[_e]),$.push(ue,ae,ae,ae,ue,ue),Q.push(ee,ie,ie,ie,ee,ee);var Te=U.length;q.push([Te-6,Te-5,Te-4],[Te-3,Te-2,Te-1])}var Oe=ne;ne=H,H=Oe;var de=ue;ue=ae,ae=de;var ye=ee;ee=ie,ie=ye}return{positions:U,cells:q,vectors:$,vertexIntensity:Q}}(B,w,k,b)}),S=[],E=[],D=[],O=[];for(T=0;Tx)return w-1}return w},m=function(y,x,w){return yw?w:y},g=function(y){var x=1/0;y.sort(function(T,_){return T-_});for(var w=y.length,k=1;kye-1||Ke>Me-1||Re>ke-1)return i.create();var qe,We,Ye,nt,ft,vt,Pt=we[0][Ee],At=we[0][Ve],at=we[1][ze],et=we[1][Ke],Ot=we[2][Fe],Wt=(Te-Pt)/(At-Pt),Jt=(Oe-at)/(et-at),Be=(de-Ot)/(we[2][Re]-Ot);switch(isFinite(Wt)||(Wt=.5),isFinite(Jt)||(Jt=.5),isFinite(Be)||(Be=.5),me.reversedX&&(Ee=ye-1-Ee,Ve=ye-1-Ve),me.reversedY&&(ze=Me-1-ze,Ke=Me-1-Ke),me.reversedZ&&(Fe=ke-1-Fe,Re=ke-1-Re),me.filled){case 5:ft=Fe,vt=Re,Ye=ze*ke,nt=Ke*ke,qe=Ee*ke*Me,We=Ve*ke*Me;break;case 4:ft=Fe,vt=Re,qe=Ee*ke,We=Ve*ke,Ye=ze*ke*ye,nt=Ke*ke*ye;break;case 3:Ye=ze,nt=Ke,ft=Fe*Me,vt=Re*Me,qe=Ee*Me*ke,We=Ve*Me*ke;break;case 2:Ye=ze,nt=Ke,qe=Ee*Me,We=Ve*Me,ft=Fe*Me*ye,vt=Re*Me*ye;break;case 1:qe=Ee,We=Ve,ft=Fe*ye,vt=Re*ye,Ye=ze*ye*ke,nt=Ke*ye*ke;break;default:qe=Ee,We=Ve,Ye=ze*ye,nt=Ke*ye,ft=Fe*ye*Me,vt=Re*ye*Me}var Ge=_e[qe+Ye+ft],Tt=_e[qe+Ye+vt],dt=_e[qe+nt+ft],Pe=_e[qe+nt+vt],Ie=_e[We+Ye+ft],Ae=_e[We+Ye+vt],De=_e[We+nt+ft],He=_e[We+nt+vt],rt=i.create(),lt=i.create(),ot=i.create(),kt=i.create();i.lerp(rt,Ge,Ie,Wt),i.lerp(lt,Tt,Ae,Wt),i.lerp(ot,dt,De,Wt),i.lerp(kt,Pe,He,Wt);var wt=i.create(),Vt=i.create();i.lerp(wt,rt,ot,Jt),i.lerp(Vt,lt,kt,Jt);var Ut=i.create();return i.lerp(Ut,wt,Vt,Be),Ut}(le,y,M)},S=y.getDivergence||function(le,ge){var fe=i.create(),me=1e-4;i.add(fe,le,[me,0,0]);var _e=A(fe);i.subtract(_e,_e,ge),i.scale(_e,_e,1/me),i.add(fe,le,[0,me,0]);var we=A(fe);i.subtract(we,we,ge),i.scale(we,we,1/me),i.add(fe,le,[0,0,me]);var Te=A(fe);return i.subtract(Te,Te,ge),i.scale(Te,Te,1/me),i.add(fe,_e,we),i.add(fe,fe,Te),fe},E=[],D=x[0][0],O=x[0][1],R=x[0][2],z=x[1][0],L=x[1][1],P=x[1][2],N=function(le){var ge=le[0],fe=le[1],me=le[2];return!(gez||feL||meP)},B=10*i.distance(x[0],x[1])/k,G=B*B,W=1,K=0,te=w.length;te>1&&(W=function(le){for(var ge=[],fe=[],me=[],_e={},we={},Te={},Oe=le.length,de=0;deK&&(K=Q),ne.push(Q),E.push({points:re,velocities:U,divergences:ne});for(var ee=0;ee<100*k&&re.lengthG&&i.scale(ie,ie,B/Math.sqrt(ae)),i.add(ie,ie,Z),q=A(ie),i.squaredDistance($,ie)-G>-1e-4*G&&(re.push(ie),$=ie,U.push(q),H=S(ie,q),Q=i.length(H),isFinite(Q)&&Q>K&&(K=Q),ne.push(Q)),Z=ie}}var ue=d(E,y.colormap,K,W);return T?ue.tubeScale=T:(K===0&&(K=1),ue.tubeScale=.5*b*W/K),ue};var p=a("./lib/shaders"),v=a("gl-cone3d").createMesh;u.exports.createTubeMesh=function(y,x){return v(y,x,{shaders:p,traceType:"streamtube"})}},{"./lib/shaders":142,"gl-cone3d":79,"gl-vec3":169,"gl-vec4":205}],144:[function(a,u,c){var i=a("gl-shader"),s=a("glslify"),l=s([`precision highp float; +#define GLSLIFY 1 + +attribute vec4 uv; +attribute vec3 f; +attribute vec3 normal; + +uniform vec3 objectOffset; +uniform mat4 model, view, projection, inverseModel; +uniform vec3 lightPosition, eyePosition; +uniform sampler2D colormap; + +varying float value, kill; +varying vec3 worldCoordinate; +varying vec2 planeCoordinate; +varying vec3 lightDirection, eyeDirection, surfaceNormal; +varying vec4 vColor; + +void main() { + vec3 localCoordinate = vec3(uv.zw, f.x); + worldCoordinate = objectOffset + localCoordinate; + vec4 worldPosition = model * vec4(worldCoordinate, 1.0); + vec4 clipPosition = projection * view * worldPosition; + gl_Position = clipPosition; + kill = f.y; + value = f.z; + planeCoordinate = uv.xy; + + vColor = texture2D(colormap, vec2(value, value)); + + //Lighting geometry parameters + vec4 cameraCoordinate = view * worldPosition; + cameraCoordinate.xyz /= cameraCoordinate.w; + lightDirection = lightPosition - cameraCoordinate.xyz; + eyeDirection = eyePosition - cameraCoordinate.xyz; + surfaceNormal = normalize((vec4(normal,0) * inverseModel).xyz); +} +`]),d=s([`precision highp float; +#define GLSLIFY 1 + +float beckmannDistribution(float x, float roughness) { + float NdotH = max(x, 0.0001); + float cos2Alpha = NdotH * NdotH; + float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; + float roughness2 = roughness * roughness; + float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; + return exp(tan2Alpha / roughness2) / denom; +} + +float beckmannSpecular( + vec3 lightDirection, + vec3 viewDirection, + vec3 surfaceNormal, + float roughness) { + return beckmannDistribution(dot(surfaceNormal, normalize(lightDirection + viewDirection)), roughness); +} + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 lowerBound, upperBound; +uniform float contourTint; +uniform vec4 contourColor; +uniform sampler2D colormap; +uniform vec3 clipBounds[2]; +uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity; +uniform float vertexColor; + +varying float value, kill; +varying vec3 worldCoordinate; +varying vec3 lightDirection, eyeDirection, surfaceNormal; +varying vec4 vColor; + +void main() { + if ( + kill > 0.0 || + vColor.a == 0.0 || + outOfRange(clipBounds[0], clipBounds[1], worldCoordinate) + ) discard; + + vec3 N = normalize(surfaceNormal); + vec3 V = normalize(eyeDirection); + vec3 L = normalize(lightDirection); + + if(gl_FrontFacing) { + N = -N; + } + + float specular = max(beckmannSpecular(L, V, N, roughness), 0.); + float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); + + //decide how to interpolate color \u2014 in vertex or in fragment + vec4 surfaceColor = + step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) + + step(.5, vertexColor) * vColor; + + vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); + + gl_FragColor = mix(litColor, contourColor, contourTint) * opacity; +} +`]),h=s([`precision highp float; +#define GLSLIFY 1 + +attribute vec4 uv; +attribute float f; + +uniform vec3 objectOffset; +uniform mat3 permutation; +uniform mat4 model, view, projection; +uniform float height, zOffset; +uniform sampler2D colormap; + +varying float value, kill; +varying vec3 worldCoordinate; +varying vec2 planeCoordinate; +varying vec3 lightDirection, eyeDirection, surfaceNormal; +varying vec4 vColor; + +void main() { + vec3 dataCoordinate = permutation * vec3(uv.xy, height); + worldCoordinate = objectOffset + dataCoordinate; + vec4 worldPosition = model * vec4(worldCoordinate, 1.0); + + vec4 clipPosition = projection * view * worldPosition; + clipPosition.z += zOffset; + + gl_Position = clipPosition; + value = f + objectOffset.z; + kill = -1.0; + planeCoordinate = uv.zw; + + vColor = texture2D(colormap, vec2(value, value)); + + //Don't do lighting for contours + surfaceNormal = vec3(1,0,0); + eyeDirection = vec3(0,1,0); + lightDirection = vec3(0,0,1); +} +`]),m=s([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec2 shape; +uniform vec3 clipBounds[2]; +uniform float pickId; + +varying float value, kill; +varying vec3 worldCoordinate; +varying vec2 planeCoordinate; +varying vec3 surfaceNormal; + +vec2 splitFloat(float v) { + float vh = 255.0 * v; + float upper = floor(vh); + float lower = fract(vh); + return vec2(upper / 255.0, floor(lower * 16.0) / 16.0); +} + +void main() { + if ((kill > 0.0) || + (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard; + + vec2 ux = splitFloat(planeCoordinate.x / shape.x); + vec2 uy = splitFloat(planeCoordinate.y / shape.y); + gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0)); +} +`]);c.createShader=function(g){var p=i(g,l,d,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return p.attributes.uv.location=0,p.attributes.f.location=1,p.attributes.normal.location=2,p},c.createPickShader=function(g){var p=i(g,l,m,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return p.attributes.uv.location=0,p.attributes.f.location=1,p.attributes.normal.location=2,p},c.createContourShader=function(g){var p=i(g,h,d,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return p.attributes.uv.location=0,p.attributes.f.location=1,p},c.createPickContourShader=function(g){var p=i(g,h,m,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return p.attributes.uv.location=0,p.attributes.f.location=1,p}},{"gl-shader":132,glslify:231}],145:[function(a,u,c){u.exports=function(q){var $=q.gl,ne=_($),H=A($),Q=M($),ee=S($),ie=s($),ae=l($,[{buffer:ie,size:4,stride:40,offset:0},{buffer:ie,size:3,stride:40,offset:16},{buffer:ie,size:3,stride:40,offset:28}]),ue=s($),le=l($,[{buffer:ue,size:4,stride:20,offset:0},{buffer:ue,size:1,stride:20,offset:16}]),ge=s($),fe=l($,[{buffer:ge,size:2,type:$.FLOAT}]),me=d($,1,256,$.RGBA,$.UNSIGNED_BYTE);me.minFilter=$.LINEAR,me.magFilter=$.LINEAR;var _e=new z($,[0,0],[[0,0,0],[0,0,0]],ne,H,ie,ae,me,Q,ee,ue,le,ge,fe,[0,0,0]),we={levels:[[],[],[]]};for(var Te in q)we[Te]=q[Te];return we.colormap=we.colormap||"jet",_e.update(we),_e};var i=a("bit-twiddle"),s=a("gl-buffer"),l=a("gl-vao"),d=a("gl-texture2d"),h=a("typedarray-pool"),m=a("colormap"),g=a("ndarray-ops"),p=a("ndarray-pack"),v=a("ndarray"),y=a("surface-nets"),x=a("gl-mat4/multiply"),w=a("gl-mat4/invert"),k=a("binary-search-bounds"),b=a("ndarray-gradient"),T=a("./lib/shaders"),_=T.createShader,M=T.createContourShader,A=T.createPickShader,S=T.createPickContourShader,E=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],D=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],O=[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]];function R(q,$,ne,H,Q){this.position=q,this.index=$,this.uv=ne,this.level=H,this.dataCoordinate=Q}(function(){for(var q=0;q<3;++q){var $=O[q],ne=(q+2)%3;$[(q+1)%3+0]=1,$[ne+3]=1,$[q+6]=1}})();function z(q,$,ne,H,Q,ee,ie,ae,ue,le,ge,fe,me,_e,we){this.gl=q,this.shape=$,this.bounds=ne,this.objectOffset=we,this.intensityBounds=[],this._shader=H,this._pickShader=Q,this._coordinateBuffer=ee,this._vao=ie,this._colorMap=ae,this._contourShader=ue,this._contourPickShader=le,this._contourBuffer=ge,this._contourVAO=fe,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new R([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=me,this._dynamicVAO=_e,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[v(h.mallocFloat(1024),[0,0]),v(h.mallocFloat(1024),[0,0]),v(h.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.pixelRatio=1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var L=z.prototype;L.genColormap=function(q,$){var ne=!1,H=p([m({colormap:q,nshades:256,format:"rgba"}).map(function(Q,ee){var ie=$?function(ae,ue){if(!ue||!ue.length)return 1;for(var le=0;leae&&le>0){var ge=(ue[le][0]-ae)/(ue[le][0]-ue[le-1][0]);return ue[le][1]*(1-ge)+ge*ue[le-1][1]}}return 1}(ee/255,$):Q[3];return ie<1&&(ne=!0),[Q[0],Q[1],Q[2],255*ie]})]);return g.divseq(H,255),this.hasAlphaScale=ne,H},L.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},L.isOpaque=function(){return!this.isTransparent()},L.pickSlots=1,L.setPickBase=function(q){this.pickId=q};var P=[0,0,0],N={showSurface:!1,showContour:!1,projections:[E.slice(),E.slice(),E.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function B(q,$){var ne,H,Q,ee=$.axes&&$.axes.lastCubeProps.axis||P,ie=$.showSurface,ae=$.showContour;for(ne=0;ne<3;++ne)for(ie=ie||$.surfaceProject[ne],H=0;H<3;++H)ae=ae||$.contourProject[ne][H];for(ne=0;ne<3;++ne){var ue=N.projections[ne];for(H=0;H<16;++H)ue[H]=0;for(H=0;H<4;++H)ue[5*H]=1;ue[5*ne]=0,ue[12+ne]=$.axesBounds[+(ee[ne]>0)][ne],x(ue,q.model,ue);var le=N.clipBounds[ne];for(Q=0;Q<2;++Q)for(H=0;H<3;++H)le[Q][H]=q.clipBounds[Q][H];le[0][ne]=-1e8,le[1][ne]=1e8}return N.showSurface=ie,N.showContour=ae,N}var G={model:E,view:E,projection:E,inverseModel:E.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,objectOffset:[0,0,0],kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},W=E.slice(),K=[1,0,0,0,1,0,0,0,1];function te(q,$){q=q||{};var ne=this.gl;ne.disable(ne.CULL_FACE),this._colorMap.bind(0);var H=G;H.model=q.model||E,H.view=q.view||E,H.projection=q.projection||E,H.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],H.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],H.objectOffset=this.objectOffset,H.contourColor=this.contourColor[0],H.inverseModel=w(H.inverseModel,H.model);for(var Q=0;Q<2;++Q)for(var ee=H.clipBounds[Q],ie=0;ie<3;++ie)ee[ie]=Math.min(Math.max(this.clipBounds[Q][ie],-1e8),1e8);H.kambient=this.ambientLight,H.kdiffuse=this.diffuseLight,H.kspecular=this.specularLight,H.roughness=this.roughness,H.fresnel=this.fresnel,H.opacity=this.opacity,H.height=0,H.permutation=K,H.vertexColor=this.vertexColor;var ae=W;for(x(ae,H.view,H.model),x(ae,H.projection,ae),w(ae,ae),Q=0;Q<3;++Q)H.eyePosition[Q]=ae[12+Q]/ae[15];var ue=ae[15];for(Q=0;Q<3;++Q)ue+=this.lightPosition[Q]*ae[4*Q+3];for(Q=0;Q<3;++Q){var le=ae[12+Q];for(ie=0;ie<3;++ie)le+=ae[4*ie+Q]*this.lightPosition[ie];H.lightPosition[Q]=le/ue}var ge=B(H,this);if(ge.showSurface){for(this._shader.bind(),this._shader.uniforms=H,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(ne.TRIANGLES,this._vertexCount),Q=0;Q<3;++Q)this.surfaceProject[Q]&&this.vertexCount&&(this._shader.uniforms.model=ge.projections[Q],this._shader.uniforms.clipBounds=ge.clipBounds[Q],this._vao.draw(ne.TRIANGLES,this._vertexCount));this._vao.unbind()}if(ge.showContour){var fe=this._contourShader;H.kambient=1,H.kdiffuse=0,H.kspecular=0,H.opacity=1,fe.bind(),fe.uniforms=H;var me=this._contourVAO;for(me.bind(),Q=0;Q<3;++Q)for(fe.uniforms.permutation=O[Q],ne.lineWidth(this.contourWidth[Q]*this.pixelRatio),ie=0;ie>4)/16)/255,Q=Math.floor(H),ee=H-Q,ie=$[1]*(q.value[1]+(15&q.value[2])/16)/255,ae=Math.floor(ie),ue=ie-ae;Q+=1,ae+=1;var le=ne.position;le[0]=le[1]=le[2]=0;for(var ge=0;ge<2;++ge)for(var fe=ge?ee:1-ee,me=0;me<2;++me)for(var _e=Q+ge,we=ae+me,Te=fe*(me?ue:1-ue),Oe=0;Oe<3;++Oe)le[Oe]+=this._field[Oe].get(_e,we)*Te;for(var de=this._pickResult.level,ye=0;ye<3;++ye)if(de[ye]=k.le(this.contourLevels[ye],le[ye]),de[ye]<0)this.contourLevels[ye].length>0&&(de[ye]=0);else if(de[ye]Math.abs(ke-le[ye])&&(de[ye]+=1)}for(ne.index[0]=ee<.5?Q:Q+1,ne.index[1]=ue<.5?ae:ae+1,ne.uv[0]=H/$[0],ne.uv[1]=ie/$[1],Oe=0;Oe<3;++Oe)ne.dataCoordinate[Oe]=this._field[Oe].get(ne.index[0],ne.index[1]);return ne},L.padField=function(q,$){var ne=$.shape.slice(),H=q.shape.slice();g.assign(q.lo(1,1).hi(ne[0],ne[1]),$),g.assign(q.lo(1).hi(ne[0],1),$.hi(ne[0],1)),g.assign(q.lo(1,H[1]-1).hi(ne[0],1),$.lo(0,ne[1]-1).hi(ne[0],1)),g.assign(q.lo(0,1).hi(1,ne[1]),$.hi(1)),g.assign(q.lo(H[0]-1,1).hi(1,ne[1]),$.lo(ne[0]-1)),q.set(0,0,$.get(0,0)),q.set(0,H[1]-1,$.get(0,ne[1]-1)),q.set(H[0]-1,0,$.get(ne[0]-1,0)),q.set(H[0]-1,H[1]-1,$.get(ne[0]-1,ne[1]-1))},L.update=function(q){q=q||{},this.objectOffset=q.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in q&&(this.contourWidth=Z(q.contourWidth,Number)),"showContour"in q&&(this.showContour=Z(q.showContour,Boolean)),"showSurface"in q&&(this.showSurface=!!q.showSurface),"contourTint"in q&&(this.contourTint=Z(q.contourTint,Boolean)),"contourColor"in q&&(this.contourColor=U(q.contourColor)),"contourProject"in q&&(this.contourProject=Z(q.contourProject,function(Kt){return Z(Kt,Boolean)})),"surfaceProject"in q&&(this.surfaceProject=q.surfaceProject),"dynamicColor"in q&&(this.dynamicColor=U(q.dynamicColor)),"dynamicTint"in q&&(this.dynamicTint=Z(q.dynamicTint,Number)),"dynamicWidth"in q&&(this.dynamicWidth=Z(q.dynamicWidth,Number)),"opacity"in q&&(this.opacity=q.opacity),"opacityscale"in q&&(this.opacityscale=q.opacityscale),"colorBounds"in q&&(this.colorBounds=q.colorBounds),"vertexColor"in q&&(this.vertexColor=q.vertexColor?1:0),"colormap"in q&&this._colorMap.setPixels(this.genColormap(q.colormap,this.opacityscale));var $=q.field||q.coords&&q.coords[2]||null,ne=!1;if($||($=this._field[2].shape[0]||this._field[2].shape[2]?this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):this._field[2].hi(0,0)),"field"in q||"coords"in q){var H=($.shape[0]+2)*($.shape[1]+2);H>this._field[2].data.length&&(h.freeFloat(this._field[2].data),this._field[2].data=h.mallocFloat(i.nextPow2(H))),this._field[2]=v(this._field[2].data,[$.shape[0]+2,$.shape[1]+2]),this.padField(this._field[2],$),this.shape=$.shape.slice();for(var Q=this.shape,ee=0;ee<2;++ee)this._field[2].size>this._field[ee].data.length&&(h.freeFloat(this._field[ee].data),this._field[ee].data=h.mallocFloat(this._field[2].size)),this._field[ee]=v(this._field[ee].data,[Q[0]+2,Q[1]+2]);if(q.coords){var ie=q.coords;if(!Array.isArray(ie)||ie.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(ee=0;ee<2;++ee){var ae=ie[ee];for(me=0;me<2;++me)if(ae.shape[me]!==Q[me])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[ee],ae)}}else if(q.ticks){var ue=q.ticks;if(!Array.isArray(ue)||ue.length!==2)throw new Error("gl-surface: invalid ticks");for(ee=0;ee<2;++ee){var le=ue[ee];if((Array.isArray(le)||le.length)&&(le=v(le)),le.shape[0]!==Q[ee])throw new Error("gl-surface: invalid tick length");var ge=v(le.data,Q);ge.stride[ee]=le.stride[0],ge.stride[1^ee]=0,this.padField(this._field[ee],ge)}}else{for(ee=0;ee<2;++ee){var fe=[0,0];fe[ee]=1,this._field[ee]=v(this._field[ee].data,[Q[0]+2,Q[1]+2],fe,0)}this._field[0].set(0,0,0);for(var me=0;me0){for(var It=0;It<5;++It)Pe.pop();Pt-=1}continue e}Pe.push(rt[0],rt[1],kt[0],kt[1],rt[2]),Pt+=1}}He.push(Pt)}this._contourOffsets[Ie]=De,this._contourCounts[Ie]=He}var Zt=h.mallocFloat(Pe.length);for(ee=0;eeO||E<0||E>O)throw new Error("gl-texture2d: Invalid texture size");return A._shape=[S,E],A.bind(),D.texImage2D(D.TEXTURE_2D,0,A.format,S,E,0,A.format,A.type,null),A._mipLevels=[0],A}function x(A,S,E,D,O,R){this.gl=A,this.handle=S,this.format=O,this.type=R,this._shape=[E,D],this._mipLevels=[0],this._magFilter=A.NEAREST,this._minFilter=A.NEAREST,this._wrapS=A.CLAMP_TO_EDGE,this._wrapT=A.CLAMP_TO_EDGE,this._anisoSamples=1;var z=this,L=[this._wrapS,this._wrapT];Object.defineProperties(L,[{get:function(){return z._wrapS},set:function(N){return z.wrapS=N}},{get:function(){return z._wrapT},set:function(N){return z.wrapT=N}}]),this._wrapVector=L;var P=[this._shape[0],this._shape[1]];Object.defineProperties(P,[{get:function(){return z._shape[0]},set:function(N){return z.width=N}},{get:function(){return z._shape[1]},set:function(N){return z.height=N}}]),this._shapeVector=P}var w=x.prototype;function k(A,S){return A.length===3?S[2]===1&&S[1]===A[0]*A[2]&&S[0]===A[2]:S[0]===1&&S[1]===A[0]}function b(A){var S=A.createTexture();return A.bindTexture(A.TEXTURE_2D,S),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_MIN_FILTER,A.NEAREST),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_MAG_FILTER,A.NEAREST),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_WRAP_S,A.CLAMP_TO_EDGE),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_WRAP_T,A.CLAMP_TO_EDGE),S}function T(A,S,E,D,O){var R=A.getParameter(A.MAX_TEXTURE_SIZE);if(S<0||S>R||E<0||E>R)throw new Error("gl-texture2d: Invalid texture shape");if(O===A.FLOAT&&!A.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var z=b(A);return A.texImage2D(A.TEXTURE_2D,0,D,S,E,0,D,O,null),new x(A,z,S,E,D,O)}function _(A,S,E,D,O,R){var z=b(A);return A.texImage2D(A.TEXTURE_2D,0,O,O,R,S),new x(A,z,E,D,O,R)}function M(A,S){var E=S.dtype,D=S.shape.slice(),O=A.getParameter(A.MAX_TEXTURE_SIZE);if(D[0]<0||D[0]>O||D[1]<0||D[1]>O)throw new Error("gl-texture2d: Invalid texture size");var R=k(D,S.stride.slice()),z=0;E==="float32"?z=A.FLOAT:E==="float64"?(z=A.FLOAT,R=!1,E="float32"):E==="uint8"?z=A.UNSIGNED_BYTE:(z=A.UNSIGNED_BYTE,R=!1,E="uint8");var L,P,N=0;if(D.length===2)N=A.LUMINANCE,D=[D[0],D[1],1],S=i(S.data,D,[S.stride[0],S.stride[1],1],S.offset);else{if(D.length!==3)throw new Error("gl-texture2d: Invalid shape for texture");if(D[2]===1)N=A.ALPHA;else if(D[2]===2)N=A.LUMINANCE_ALPHA;else if(D[2]===3)N=A.RGB;else{if(D[2]!==4)throw new Error("gl-texture2d: Invalid shape for pixel coords");N=A.RGBA}}z!==A.FLOAT||A.getExtension("OES_texture_float")||(z=A.UNSIGNED_BYTE,R=!1);var B=S.size;if(R)L=S.offset===0&&S.data.length===B?S.data:S.data.subarray(S.offset,S.offset+B);else{var G=[D[2],D[2]*D[0],1];P=l.malloc(B,E);var W=i(P,D,G,0);E!=="float32"&&E!=="float64"||z!==A.UNSIGNED_BYTE?s.assign(W,S):v(W,S),L=P.subarray(0,B)}var K=b(A);return A.texImage2D(A.TEXTURE_2D,0,N,D[0],D[1],0,N,z,L),R||l.free(P),new x(A,K,D[0],D[1],N,z)}Object.defineProperties(w,{minFilter:{get:function(){return this._minFilter},set:function(A){this.bind();var S=this.gl;if(this.type===S.FLOAT&&d.indexOf(A)>=0&&(S.getExtension("OES_texture_float_linear")||(A=S.NEAREST)),h.indexOf(A)<0)throw new Error("gl-texture2d: Unknown filter mode "+A);return S.texParameteri(S.TEXTURE_2D,S.TEXTURE_MIN_FILTER,A),this._minFilter=A}},magFilter:{get:function(){return this._magFilter},set:function(A){this.bind();var S=this.gl;if(this.type===S.FLOAT&&d.indexOf(A)>=0&&(S.getExtension("OES_texture_float_linear")||(A=S.NEAREST)),h.indexOf(A)<0)throw new Error("gl-texture2d: Unknown filter mode "+A);return S.texParameteri(S.TEXTURE_2D,S.TEXTURE_MAG_FILTER,A),this._magFilter=A}},mipSamples:{get:function(){return this._anisoSamples},set:function(A){var S=this._anisoSamples;if(this._anisoSamples=0|Math.max(A,1),S!==this._anisoSamples){var E=this.gl.getExtension("EXT_texture_filter_anisotropic");E&&this.gl.texParameterf(this.gl.TEXTURE_2D,E.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(A){if(this.bind(),m.indexOf(A)<0)throw new Error("gl-texture2d: Unknown wrap mode "+A);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,A),this._wrapS=A}},wrapT:{get:function(){return this._wrapT},set:function(A){if(this.bind(),m.indexOf(A)<0)throw new Error("gl-texture2d: Unknown wrap mode "+A);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,A),this._wrapT=A}},wrap:{get:function(){return this._wrapVector},set:function(A){if(Array.isArray(A)||(A=[A,A]),A.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var S=0;S<2;++S)if(m.indexOf(A[S])<0)throw new Error("gl-texture2d: Unknown wrap mode "+A);this._wrapS=A[0],this._wrapT=A[1];var E=this.gl;return this.bind(),E.texParameteri(E.TEXTURE_2D,E.TEXTURE_WRAP_S,this._wrapS),E.texParameteri(E.TEXTURE_2D,E.TEXTURE_WRAP_T,this._wrapT),A}},shape:{get:function(){return this._shapeVector},set:function(A){if(Array.isArray(A)){if(A.length!==2)throw new Error("gl-texture2d: Invalid texture shape")}else A=[0|A,0|A];return y(this,0|A[0],0|A[1]),[0|A[0],0|A[1]]}},width:{get:function(){return this._shape[0]},set:function(A){return y(this,A|=0,this._shape[1]),A}},height:{get:function(){return this._shape[1]},set:function(A){return A|=0,y(this,this._shape[0],A),A}}}),w.bind=function(A){var S=this.gl;return A!==void 0&&S.activeTexture(S.TEXTURE0+(0|A)),S.bindTexture(S.TEXTURE_2D,this.handle),A!==void 0?0|A:S.getParameter(S.ACTIVE_TEXTURE)-S.TEXTURE0},w.dispose=function(){this.gl.deleteTexture(this.handle)},w.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var A=Math.min(this._shape[0],this._shape[1]),S=0;A>0;++S,A>>>=1)this._mipLevels.indexOf(S)<0&&this._mipLevels.push(S)},w.setPixels=function(A,S,E,D){var O=this.gl;this.bind(),Array.isArray(S)?(D=E,E=0|S[1],S=0|S[0]):(S=S||0,E=E||0),D=D||0;var R=p(A)?A:A.raw;if(R)this._mipLevels.indexOf(D)<0?(O.texImage2D(O.TEXTURE_2D,0,this.format,this.format,this.type,R),this._mipLevels.push(D)):O.texSubImage2D(O.TEXTURE_2D,D,S,E,this.format,this.type,R);else{if(!(A.shape&&A.stride&&A.data))throw new Error("gl-texture2d: Unsupported data type");if(A.shape.length<2||S+A.shape[1]>this._shape[1]>>>D||E+A.shape[0]>this._shape[0]>>>D||S<0||E<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");(function(z,L,P,N,B,G,W,K){var te=K.dtype,Y=K.shape.slice();if(Y.length<2||Y.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var Z=0,re=0,U=k(Y,K.stride.slice());if(te==="float32"?Z=z.FLOAT:te==="float64"?(Z=z.FLOAT,U=!1,te="float32"):te==="uint8"?Z=z.UNSIGNED_BYTE:(Z=z.UNSIGNED_BYTE,U=!1,te="uint8"),Y.length===2)re=z.LUMINANCE,Y=[Y[0],Y[1],1],K=i(K.data,Y,[K.stride[0],K.stride[1],1],K.offset);else{if(Y.length!==3)throw new Error("gl-texture2d: Invalid shape for texture");if(Y[2]===1)re=z.ALPHA;else if(Y[2]===2)re=z.LUMINANCE_ALPHA;else if(Y[2]===3)re=z.RGB;else{if(Y[2]!==4)throw new Error("gl-texture2d: Invalid shape for pixel coords");re=z.RGBA}Y[2]}if(re!==z.LUMINANCE&&re!==z.ALPHA||B!==z.LUMINANCE&&B!==z.ALPHA||(re=B),re!==B)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var q=K.size,$=W.indexOf(N)<0;if($&&W.push(N),Z===G&&U)K.offset===0&&K.data.length===q?$?z.texImage2D(z.TEXTURE_2D,N,B,Y[0],Y[1],0,B,G,K.data):z.texSubImage2D(z.TEXTURE_2D,N,L,P,Y[0],Y[1],B,G,K.data):$?z.texImage2D(z.TEXTURE_2D,N,B,Y[0],Y[1],0,B,G,K.data.subarray(K.offset,K.offset+q)):z.texSubImage2D(z.TEXTURE_2D,N,L,P,Y[0],Y[1],B,G,K.data.subarray(K.offset,K.offset+q));else{var ne;ne=G===z.FLOAT?l.mallocFloat32(q):l.mallocUint8(q);var H=i(ne,Y,[Y[2],Y[2]*Y[0],1]);Z===z.FLOAT&&G===z.UNSIGNED_BYTE?v(H,K):s.assign(H,K),$?z.texImage2D(z.TEXTURE_2D,N,B,Y[0],Y[1],0,B,G,ne.subarray(0,q)):z.texSubImage2D(z.TEXTURE_2D,N,L,P,Y[0],Y[1],B,G,ne.subarray(0,q)),G===z.FLOAT?l.freeFloat32(ne):l.freeUint8(ne)}})(O,S,E,D,this.format,this.type,this._mipLevels,A)}}},{ndarray:259,"ndarray-ops":254,"typedarray-pool":308}],147:[function(a,u,c){u.exports=function(i,s,l){s?s.bind():i.bindBuffer(i.ELEMENT_ARRAY_BUFFER,null);var d=0|i.getParameter(i.MAX_VERTEX_ATTRIBS);if(l){if(l.length>d)throw new Error("gl-vao: Too many vertex attributes");for(var h=0;h1?0:Math.acos(p)};var i=a("./fromValues"),s=a("./normalize"),l=a("./dot")},{"./dot":162,"./fromValues":168,"./normalize":179}],153:[function(a,u,c){u.exports=function(i,s){return i[0]=Math.ceil(s[0]),i[1]=Math.ceil(s[1]),i[2]=Math.ceil(s[2]),i}},{}],154:[function(a,u,c){u.exports=function(i){var s=new Float32Array(3);return s[0]=i[0],s[1]=i[1],s[2]=i[2],s}},{}],155:[function(a,u,c){u.exports=function(i,s){return i[0]=s[0],i[1]=s[1],i[2]=s[2],i}},{}],156:[function(a,u,c){u.exports=function(){var i=new Float32Array(3);return i[0]=0,i[1]=0,i[2]=0,i}},{}],157:[function(a,u,c){u.exports=function(i,s,l){var d=s[0],h=s[1],m=s[2],g=l[0],p=l[1],v=l[2];return i[0]=h*v-m*p,i[1]=m*g-d*v,i[2]=d*p-h*g,i}},{}],158:[function(a,u,c){u.exports=a("./distance")},{"./distance":159}],159:[function(a,u,c){u.exports=function(i,s){var l=s[0]-i[0],d=s[1]-i[1],h=s[2]-i[2];return Math.sqrt(l*l+d*d+h*h)}},{}],160:[function(a,u,c){u.exports=a("./divide")},{"./divide":161}],161:[function(a,u,c){u.exports=function(i,s,l){return i[0]=s[0]/l[0],i[1]=s[1]/l[1],i[2]=s[2]/l[2],i}},{}],162:[function(a,u,c){u.exports=function(i,s){return i[0]*s[0]+i[1]*s[1]+i[2]*s[2]}},{}],163:[function(a,u,c){u.exports=1e-6},{}],164:[function(a,u,c){u.exports=function(s,l){var d=s[0],h=s[1],m=s[2],g=l[0],p=l[1],v=l[2];return Math.abs(d-g)<=i*Math.max(1,Math.abs(d),Math.abs(g))&&Math.abs(h-p)<=i*Math.max(1,Math.abs(h),Math.abs(p))&&Math.abs(m-v)<=i*Math.max(1,Math.abs(m),Math.abs(v))};var i=a("./epsilon")},{"./epsilon":163}],165:[function(a,u,c){u.exports=function(i,s){return i[0]===s[0]&&i[1]===s[1]&&i[2]===s[2]}},{}],166:[function(a,u,c){u.exports=function(i,s){return i[0]=Math.floor(s[0]),i[1]=Math.floor(s[1]),i[2]=Math.floor(s[2]),i}},{}],167:[function(a,u,c){u.exports=function(s,l,d,h,m,g){var p,v;for(l||(l=3),d||(d=0),v=h?Math.min(h*l+d,s.length):s.length,p=d;p0&&(m=1/Math.sqrt(m),i[0]=s[0]*m,i[1]=s[1]*m,i[2]=s[2]*m),i}},{}],180:[function(a,u,c){u.exports=function(i,s){s=s||1;var l=2*Math.random()*Math.PI,d=2*Math.random()-1,h=Math.sqrt(1-d*d)*s;return i[0]=Math.cos(l)*h,i[1]=Math.sin(l)*h,i[2]=d*s,i}},{}],181:[function(a,u,c){u.exports=function(i,s,l,d){var h=l[1],m=l[2],g=s[1]-h,p=s[2]-m,v=Math.sin(d),y=Math.cos(d);return i[0]=s[0],i[1]=h+g*y-p*v,i[2]=m+g*v+p*y,i}},{}],182:[function(a,u,c){u.exports=function(i,s,l,d){var h=l[0],m=l[2],g=s[0]-h,p=s[2]-m,v=Math.sin(d),y=Math.cos(d);return i[0]=h+p*v+g*y,i[1]=s[1],i[2]=m+p*y-g*v,i}},{}],183:[function(a,u,c){u.exports=function(i,s,l,d){var h=l[0],m=l[1],g=s[0]-h,p=s[1]-m,v=Math.sin(d),y=Math.cos(d);return i[0]=h+g*y-p*v,i[1]=m+g*v+p*y,i[2]=s[2],i}},{}],184:[function(a,u,c){u.exports=function(i,s){return i[0]=Math.round(s[0]),i[1]=Math.round(s[1]),i[2]=Math.round(s[2]),i}},{}],185:[function(a,u,c){u.exports=function(i,s,l){return i[0]=s[0]*l,i[1]=s[1]*l,i[2]=s[2]*l,i}},{}],186:[function(a,u,c){u.exports=function(i,s,l,d){return i[0]=s[0]+l[0]*d,i[1]=s[1]+l[1]*d,i[2]=s[2]+l[2]*d,i}},{}],187:[function(a,u,c){u.exports=function(i,s,l,d){return i[0]=s,i[1]=l,i[2]=d,i}},{}],188:[function(a,u,c){u.exports=a("./squaredDistance")},{"./squaredDistance":190}],189:[function(a,u,c){u.exports=a("./squaredLength")},{"./squaredLength":191}],190:[function(a,u,c){u.exports=function(i,s){var l=s[0]-i[0],d=s[1]-i[1],h=s[2]-i[2];return l*l+d*d+h*h}},{}],191:[function(a,u,c){u.exports=function(i){var s=i[0],l=i[1],d=i[2];return s*s+l*l+d*d}},{}],192:[function(a,u,c){u.exports=a("./subtract")},{"./subtract":193}],193:[function(a,u,c){u.exports=function(i,s,l){return i[0]=s[0]-l[0],i[1]=s[1]-l[1],i[2]=s[2]-l[2],i}},{}],194:[function(a,u,c){u.exports=function(i,s,l){var d=s[0],h=s[1],m=s[2];return i[0]=d*l[0]+h*l[3]+m*l[6],i[1]=d*l[1]+h*l[4]+m*l[7],i[2]=d*l[2]+h*l[5]+m*l[8],i}},{}],195:[function(a,u,c){u.exports=function(i,s,l){var d=s[0],h=s[1],m=s[2],g=l[3]*d+l[7]*h+l[11]*m+l[15];return g=g||1,i[0]=(l[0]*d+l[4]*h+l[8]*m+l[12])/g,i[1]=(l[1]*d+l[5]*h+l[9]*m+l[13])/g,i[2]=(l[2]*d+l[6]*h+l[10]*m+l[14])/g,i}},{}],196:[function(a,u,c){u.exports=function(i,s,l){var d=s[0],h=s[1],m=s[2],g=l[0],p=l[1],v=l[2],y=l[3],x=y*d+p*m-v*h,w=y*h+v*d-g*m,k=y*m+g*h-p*d,b=-g*d-p*h-v*m;return i[0]=x*y+b*-g+w*-v-k*-p,i[1]=w*y+b*-p+k*-g-x*-v,i[2]=k*y+b*-v+x*-p-w*-g,i}},{}],197:[function(a,u,c){u.exports=function(i,s,l){return i[0]=s[0]+l[0],i[1]=s[1]+l[1],i[2]=s[2]+l[2],i[3]=s[3]+l[3],i}},{}],198:[function(a,u,c){u.exports=function(i){var s=new Float32Array(4);return s[0]=i[0],s[1]=i[1],s[2]=i[2],s[3]=i[3],s}},{}],199:[function(a,u,c){u.exports=function(i,s){return i[0]=s[0],i[1]=s[1],i[2]=s[2],i[3]=s[3],i}},{}],200:[function(a,u,c){u.exports=function(){var i=new Float32Array(4);return i[0]=0,i[1]=0,i[2]=0,i[3]=0,i}},{}],201:[function(a,u,c){u.exports=function(i,s){var l=s[0]-i[0],d=s[1]-i[1],h=s[2]-i[2],m=s[3]-i[3];return Math.sqrt(l*l+d*d+h*h+m*m)}},{}],202:[function(a,u,c){u.exports=function(i,s,l){return i[0]=s[0]/l[0],i[1]=s[1]/l[1],i[2]=s[2]/l[2],i[3]=s[3]/l[3],i}},{}],203:[function(a,u,c){u.exports=function(i,s){return i[0]*s[0]+i[1]*s[1]+i[2]*s[2]+i[3]*s[3]}},{}],204:[function(a,u,c){u.exports=function(i,s,l,d){var h=new Float32Array(4);return h[0]=i,h[1]=s,h[2]=l,h[3]=d,h}},{}],205:[function(a,u,c){u.exports={create:a("./create"),clone:a("./clone"),fromValues:a("./fromValues"),copy:a("./copy"),set:a("./set"),add:a("./add"),subtract:a("./subtract"),multiply:a("./multiply"),divide:a("./divide"),min:a("./min"),max:a("./max"),scale:a("./scale"),scaleAndAdd:a("./scaleAndAdd"),distance:a("./distance"),squaredDistance:a("./squaredDistance"),length:a("./length"),squaredLength:a("./squaredLength"),negate:a("./negate"),inverse:a("./inverse"),normalize:a("./normalize"),dot:a("./dot"),lerp:a("./lerp"),random:a("./random"),transformMat4:a("./transformMat4"),transformQuat:a("./transformQuat")}},{"./add":197,"./clone":198,"./copy":199,"./create":200,"./distance":201,"./divide":202,"./dot":203,"./fromValues":204,"./inverse":206,"./length":207,"./lerp":208,"./max":209,"./min":210,"./multiply":211,"./negate":212,"./normalize":213,"./random":214,"./scale":215,"./scaleAndAdd":216,"./set":217,"./squaredDistance":218,"./squaredLength":219,"./subtract":220,"./transformMat4":221,"./transformQuat":222}],206:[function(a,u,c){u.exports=function(i,s){return i[0]=1/s[0],i[1]=1/s[1],i[2]=1/s[2],i[3]=1/s[3],i}},{}],207:[function(a,u,c){u.exports=function(i){var s=i[0],l=i[1],d=i[2],h=i[3];return Math.sqrt(s*s+l*l+d*d+h*h)}},{}],208:[function(a,u,c){u.exports=function(i,s,l,d){var h=s[0],m=s[1],g=s[2],p=s[3];return i[0]=h+d*(l[0]-h),i[1]=m+d*(l[1]-m),i[2]=g+d*(l[2]-g),i[3]=p+d*(l[3]-p),i}},{}],209:[function(a,u,c){u.exports=function(i,s,l){return i[0]=Math.max(s[0],l[0]),i[1]=Math.max(s[1],l[1]),i[2]=Math.max(s[2],l[2]),i[3]=Math.max(s[3],l[3]),i}},{}],210:[function(a,u,c){u.exports=function(i,s,l){return i[0]=Math.min(s[0],l[0]),i[1]=Math.min(s[1],l[1]),i[2]=Math.min(s[2],l[2]),i[3]=Math.min(s[3],l[3]),i}},{}],211:[function(a,u,c){u.exports=function(i,s,l){return i[0]=s[0]*l[0],i[1]=s[1]*l[1],i[2]=s[2]*l[2],i[3]=s[3]*l[3],i}},{}],212:[function(a,u,c){u.exports=function(i,s){return i[0]=-s[0],i[1]=-s[1],i[2]=-s[2],i[3]=-s[3],i}},{}],213:[function(a,u,c){u.exports=function(i,s){var l=s[0],d=s[1],h=s[2],m=s[3],g=l*l+d*d+h*h+m*m;return g>0&&(g=1/Math.sqrt(g),i[0]=l*g,i[1]=d*g,i[2]=h*g,i[3]=m*g),i}},{}],214:[function(a,u,c){var i=a("./normalize"),s=a("./scale");u.exports=function(l,d){return d=d||1,l[0]=Math.random(),l[1]=Math.random(),l[2]=Math.random(),l[3]=Math.random(),i(l,l),s(l,l,d),l}},{"./normalize":213,"./scale":215}],215:[function(a,u,c){u.exports=function(i,s,l){return i[0]=s[0]*l,i[1]=s[1]*l,i[2]=s[2]*l,i[3]=s[3]*l,i}},{}],216:[function(a,u,c){u.exports=function(i,s,l,d){return i[0]=s[0]+l[0]*d,i[1]=s[1]+l[1]*d,i[2]=s[2]+l[2]*d,i[3]=s[3]+l[3]*d,i}},{}],217:[function(a,u,c){u.exports=function(i,s,l,d,h){return i[0]=s,i[1]=l,i[2]=d,i[3]=h,i}},{}],218:[function(a,u,c){u.exports=function(i,s){var l=s[0]-i[0],d=s[1]-i[1],h=s[2]-i[2],m=s[3]-i[3];return l*l+d*d+h*h+m*m}},{}],219:[function(a,u,c){u.exports=function(i){var s=i[0],l=i[1],d=i[2],h=i[3];return s*s+l*l+d*d+h*h}},{}],220:[function(a,u,c){u.exports=function(i,s,l){return i[0]=s[0]-l[0],i[1]=s[1]-l[1],i[2]=s[2]-l[2],i[3]=s[3]-l[3],i}},{}],221:[function(a,u,c){u.exports=function(i,s,l){var d=s[0],h=s[1],m=s[2],g=s[3];return i[0]=l[0]*d+l[4]*h+l[8]*m+l[12]*g,i[1]=l[1]*d+l[5]*h+l[9]*m+l[13]*g,i[2]=l[2]*d+l[6]*h+l[10]*m+l[14]*g,i[3]=l[3]*d+l[7]*h+l[11]*m+l[15]*g,i}},{}],222:[function(a,u,c){u.exports=function(i,s,l){var d=s[0],h=s[1],m=s[2],g=l[0],p=l[1],v=l[2],y=l[3],x=y*d+p*m-v*h,w=y*h+v*d-g*m,k=y*m+g*h-p*d,b=-g*d-p*h-v*m;return i[0]=x*y+b*-g+w*-v-k*-p,i[1]=w*y+b*-p+k*-g-x*-v,i[2]=k*y+b*-v+x*-p-w*-g,i[3]=s[3],i}},{}],223:[function(a,u,c){var i=a("glsl-tokenizer"),s=a("atob-lite");u.exports=function(l){for(var d=Array.isArray(l)?l:i(l),h=0;h0)continue;ne=q.slice(0,1).join("")}return P(ne),A+=ne.length,(b=b.slice(ne.length)).length}}function Y(){return/[^a-fA-F0-9]/.test(p)?(P(b.join("")),k=999,x):(b.push(p),v=p,x+1)}function Z(){return p==="."||/[eE]/.test(p)?(b.push(p),k=5,v=p,x+1):p==="x"&&b.length===1&&b[0]==="0"?(k=11,b.push(p),v=p,x+1):/[^\d]/.test(p)?(P(b.join("")),k=999,x):(b.push(p),v=p,x+1)}function re(){return p==="f"&&(b.push(p),v=p,x+=1),/[eE]/.test(p)?(b.push(p),v=p,x+1):(p!=="-"&&p!=="+"||!/[eE]/.test(v))&&/[^\d]/.test(p)?(P(b.join("")),k=999,x):(b.push(p),v=p,x+1)}function U(){if(/[^\d\w_]/.test(p)){var q=b.join("");return k=L[q]?8:z[q]?7:6,P(b.join("")),k=999,x}return b.push(p),v=p,x+1}};var i=a("./lib/literals"),s=a("./lib/operators"),l=a("./lib/builtins"),d=a("./lib/literals-300es"),h=a("./lib/builtins-300es"),m=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"]},{"./lib/builtins":226,"./lib/builtins-300es":225,"./lib/literals":228,"./lib/literals-300es":227,"./lib/operators":229}],225:[function(a,u,c){var i=a("./builtins");i=i.slice().filter(function(s){return!/^(gl\_|texture)/.test(s)}),u.exports=i.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},{"./builtins":226}],226:[function(a,u,c){u.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},{}],227:[function(a,u,c){var i=a("./literals");u.exports=i.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},{"./literals":228}],228:[function(a,u,c){u.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},{}],229:[function(a,u,c){u.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},{}],230:[function(a,u,c){var i=a("./index");u.exports=function(s,l){var d=i(l),h=[];return h=(h=h.concat(d(s))).concat(d(null))}},{"./index":224}],231:[function(a,u,c){u.exports=function(i){typeof i=="string"&&(i=[i]);for(var s=[].slice.call(arguments,1),l=[],d=0;d0;)for(var _=(v=T.pop()).adjacent,M=0;M<=x;++M){var A=_[M];if(A.boundary&&!(A.lastVisited<=-w)){for(var S=A.vertices,E=0;E<=x;++E){var D=S[E];k[E]=D<0?y:b[D]}var O=this.orient();if(O>0)return A;A.lastVisited=-w,O===0&&T.push(A)}}return null},p.walk=function(v,y){var x=this.vertices.length-1,w=this.dimension,k=this.vertices,b=this.tuple,T=y?this.interior.length*Math.random()|0:this.interior.length-1,_=this.interior[T];e:for(;!_.boundary;){for(var M=_.vertices,A=_.adjacent,S=0;S<=w;++S)b[S]=k[M[S]];for(_.lastVisited=x,S=0;S<=w;++S){var E=A[S];if(!(E.lastVisited>=x)){var D=b[S];b[S]=v;var O=this.orient();if(b[S]=D,O<0){_=E;continue e}E.boundary?E.lastVisited=-x:E.lastVisited=x}}return}return _},p.addPeaks=function(v,y){var x=this.vertices.length-1,w=this.dimension,k=this.vertices,b=this.tuple,T=this.interior,_=this.simplices,M=[y];y.lastVisited=x,y.vertices[y.vertices.indexOf(-1)]=x,y.boundary=!1,T.push(y);for(var A=[];M.length>0;){var S=(y=M.pop()).vertices,E=y.adjacent,D=S.indexOf(x);if(!(D<0)){for(var O=0;O<=w;++O)if(O!==D){var R=E[O];if(R.boundary&&!(R.lastVisited>=x)){var z=R.vertices;if(R.lastVisited!==-x){for(var L=0,P=0;P<=w;++P)z[P]<0?(L=P,b[P]=v):b[P]=k[z[P]];if(this.orient()>0){z[L]=x,R.boundary=!1,T.push(R),M.push(R),R.lastVisited=x;continue}R.lastVisited=-x}var N=R.adjacent,B=S.slice(),G=E.slice(),W=new l(B,G,!0);_.push(W);var K=N.indexOf(y);if(!(K<0))for(N[K]=W,G[D]=R,B[O]=-1,G[O]=y,E[O]=W,W.flip(),P=0;P<=w;++P){var te=B[P];if(!(te<0||te===x)){for(var Y=new Array(w-1),Z=0,re=0;re<=w;++re){var U=B[re];U<0||re===P||(Y[Z++]=U)}A.push(new d(Y,W,P))}}}}}}for(A.sort(h),O=0;O+1=0?T[M++]=_[S]:A=1&S;if(A===(1&v)){var E=T[0];T[0]=T[1],T[1]=E}y.push(T)}}return y}},{"robust-orientation":284,"simplicial-complex":293}],234:[function(a,u,c){var i=a("binary-search-bounds");function s(M,A,S,E,D){this.mid=M,this.left=A,this.right=S,this.leftPoints=E,this.rightPoints=D,this.count=(A?A.count:0)+(S?S.count:0)+E.length}u.exports=function(M){return!M||M.length===0?new T(null):new T(b(M))};var l=s.prototype;function d(M,A){M.mid=A.mid,M.left=A.left,M.right=A.right,M.leftPoints=A.leftPoints,M.rightPoints=A.rightPoints,M.count=A.count}function h(M,A){var S=b(A);M.mid=S.mid,M.left=S.left,M.right=S.right,M.leftPoints=S.leftPoints,M.rightPoints=S.rightPoints,M.count=S.count}function m(M,A){var S=M.intervals([]);S.push(A),h(M,S)}function g(M,A){var S=M.intervals([]),E=S.indexOf(A);return E<0?0:(S.splice(E,1),h(M,S),1)}function p(M,A,S){for(var E=0;E=0&&M[E][1]>=A;--E){var D=S(M[E]);if(D)return D}}function y(M,A){for(var S=0;S>1],D=[],O=[],R=[];for(S=0;S3*(A+1)?m(this,M):this.left.insert(M):this.left=b([M]);else if(M[0]>this.mid)this.right?4*(this.right.count+1)>3*(A+1)?m(this,M):this.right.insert(M):this.right=b([M]);else{var S=i.ge(this.leftPoints,M,w),E=i.ge(this.rightPoints,M,k);this.leftPoints.splice(S,0,M),this.rightPoints.splice(E,0,M)}},l.remove=function(M){var A=this.count-this.leftPoints;if(M[1]3*(A-1)?g(this,M):(O=this.left.remove(M))===2?(this.left=null,this.count-=1,1):(O===1&&(this.count-=1),O):0;if(M[0]>this.mid)return this.right?4*(this.left?this.left.count:0)>3*(A-1)?g(this,M):(O=this.right.remove(M))===2?(this.right=null,this.count-=1,1):(O===1&&(this.count-=1),O):0;if(this.count===1)return this.leftPoints[0]===M?2:0;if(this.leftPoints.length===1&&this.leftPoints[0]===M){if(this.left&&this.right){for(var S=this,E=this.left;E.right;)S=E,E=E.right;if(S===this)E.right=this.right;else{var D=this.left,O=this.right;S.count-=E.count,S.right=E.left,E.left=D,E.right=O}d(this,E),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?d(this,this.left):d(this,this.right);return 1}for(D=i.ge(this.leftPoints,M,w);Dthis.mid){var S;return this.right&&(S=this.right.queryPoint(M,A))?S:v(this.rightPoints,M,A)}return y(this.leftPoints,A)},l.queryInterval=function(M,A,S){var E;return Mthis.mid&&this.right&&(E=this.right.queryInterval(M,A,S))?E:Athis.mid?v(this.rightPoints,M,S):y(this.leftPoints,S)};var _=T.prototype;_.insert=function(M){this.root?this.root.insert(M):this.root=new s(M[0],null,null,[M],[M])},_.remove=function(M){if(this.root){var A=this.root.remove(M);return A===2&&(this.root=null),A!==0}return!1},_.queryPoint=function(M,A){if(this.root)return this.root.queryPoint(M,A)},_.queryInterval=function(M,A,S){if(M<=A&&this.root)return this.root.queryInterval(M,A,S)},Object.defineProperty(_,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(_,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}})},{"binary-search-bounds":31}],235:[function(a,u,c){u.exports=function(i){for(var s=new Array(i),l=0;l + * @license MIT + */u.exports=function(s){return s!=null&&(i(s)||function(l){return typeof l.readFloatLE=="function"&&typeof l.slice=="function"&&i(l.slice(0,0))}(s)||!!s._isBuffer)}},{}],238:[function(a,u,c){u.exports=l,u.exports.isMobile=l,u.exports.default=l;var i=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,s=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino|android|ipad|playbook|silk/i;function l(d){d||(d={});var h=d.ua;if(h||typeof navigator>"u"||(h=navigator.userAgent),h&&h.headers&&typeof h.headers["user-agent"]=="string"&&(h=h.headers["user-agent"]),typeof h!="string")return!1;var m=d.tablet?s.test(h):i.test(h);return!m&&d.tablet&&d.featureDetect&&navigator&&navigator.maxTouchPoints>1&&h.indexOf("Macintosh")!==-1&&h.indexOf("Safari")!==-1&&(m=!0),m}},{}],239:[function(a,u,c){u.exports=function(i){for(var s,l=i.length,d=0;d13)&&s!==32&&s!==133&&s!==160&&s!==5760&&s!==6158&&(s<8192||s>8205)&&s!==8232&&s!==8233&&s!==8239&&s!==8287&&s!==8288&&s!==12288&&s!==65279)return!1;return!0}},{}],240:[function(a,u,c){u.exports=function(i,s,l){return i*(1-l)+s*l}},{}],241:[function(a,u,c){var i=a("./normalize"),s=a("gl-mat4/create"),l=a("gl-mat4/clone"),d=a("gl-mat4/determinant"),h=a("gl-mat4/invert"),m=a("gl-mat4/transpose"),g={length:a("gl-vec3/length"),normalize:a("gl-vec3/normalize"),dot:a("gl-vec3/dot"),cross:a("gl-vec3/cross")},p=s(),v=s(),y=[0,0,0,0],x=[[0,0,0],[0,0,0],[0,0,0]],w=[0,0,0];function k(b,T,_,M,A){b[0]=T[0]*M+_[0]*A,b[1]=T[1]*M+_[1]*A,b[2]=T[2]*M+_[2]*A}u.exports=function(b,T,_,M,A,S){if(T||(T=[0,0,0]),_||(_=[0,0,0]),M||(M=[0,0,0]),A||(A=[0,0,0,1]),S||(S=[0,0,0,1]),!i(p,b)||(l(v,p),v[3]=0,v[7]=0,v[11]=0,v[15]=1,Math.abs(d(v)<1e-8)))return!1;var E,D,O,R,z,L,P,N=p[3],B=p[7],G=p[11],W=p[12],K=p[13],te=p[14],Y=p[15];if(N!==0||B!==0||G!==0){if(y[0]=N,y[1]=B,y[2]=G,y[3]=Y,!h(v,v))return!1;m(v,v),E=A,O=v,R=(D=y)[0],z=D[1],L=D[2],P=D[3],E[0]=O[0]*R+O[4]*z+O[8]*L+O[12]*P,E[1]=O[1]*R+O[5]*z+O[9]*L+O[13]*P,E[2]=O[2]*R+O[6]*z+O[10]*L+O[14]*P,E[3]=O[3]*R+O[7]*z+O[11]*L+O[15]*P}else A[0]=A[1]=A[2]=0,A[3]=1;if(T[0]=W,T[1]=K,T[2]=te,function(re,U){re[0][0]=U[0],re[0][1]=U[1],re[0][2]=U[2],re[1][0]=U[4],re[1][1]=U[5],re[1][2]=U[6],re[2][0]=U[8],re[2][1]=U[9],re[2][2]=U[10]}(x,p),_[0]=g.length(x[0]),g.normalize(x[0],x[0]),M[0]=g.dot(x[0],x[1]),k(x[1],x[1],x[0],1,-M[0]),_[1]=g.length(x[1]),g.normalize(x[1],x[1]),M[0]/=_[1],M[1]=g.dot(x[0],x[2]),k(x[2],x[2],x[0],1,-M[1]),M[2]=g.dot(x[1],x[2]),k(x[2],x[2],x[1],1,-M[2]),_[2]=g.length(x[2]),g.normalize(x[2],x[2]),M[1]/=_[2],M[2]/=_[2],g.cross(w,x[1],x[2]),g.dot(x[0],w)<0)for(var Z=0;Z<3;Z++)_[Z]*=-1,x[Z][0]*=-1,x[Z][1]*=-1,x[Z][2]*=-1;return S[0]=.5*Math.sqrt(Math.max(1+x[0][0]-x[1][1]-x[2][2],0)),S[1]=.5*Math.sqrt(Math.max(1-x[0][0]+x[1][1]-x[2][2],0)),S[2]=.5*Math.sqrt(Math.max(1-x[0][0]-x[1][1]+x[2][2],0)),S[3]=.5*Math.sqrt(Math.max(1+x[0][0]+x[1][1]+x[2][2],0)),x[2][1]>x[1][2]&&(S[0]=-S[0]),x[0][2]>x[2][0]&&(S[1]=-S[1]),x[1][0]>x[0][1]&&(S[2]=-S[2]),!0}},{"./normalize":242,"gl-mat4/clone":92,"gl-mat4/create":93,"gl-mat4/determinant":94,"gl-mat4/invert":98,"gl-mat4/transpose":109,"gl-vec3/cross":157,"gl-vec3/dot":162,"gl-vec3/length":172,"gl-vec3/normalize":179}],242:[function(a,u,c){u.exports=function(i,s){var l=s[15];if(l===0)return!1;for(var d=1/l,h=0;h<16;h++)i[h]=s[h]*d;return!0}},{}],243:[function(a,u,c){var i=a("gl-vec3/lerp"),s=a("mat4-recompose"),l=a("mat4-decompose"),d=a("gl-mat4/determinant"),h=a("quat-slerp"),m=v(),g=v(),p=v();function v(){return{translate:y(),scale:y(1),skew:y(),perspective:[0,0,0,1],quaternion:[0,0,0,1]}}function y(x){return[x||0,x||0,x||0]}u.exports=function(x,w,k,b){if(d(w)===0||d(k)===0)return!1;var T=l(w,m.translate,m.scale,m.skew,m.perspective,m.quaternion),_=l(k,g.translate,g.scale,g.skew,g.perspective,g.quaternion);return!(!T||!_)&&(i(p.translate,m.translate,g.translate,b),i(p.skew,m.skew,g.skew,b),i(p.scale,m.scale,g.scale,b),i(p.perspective,m.perspective,g.perspective,b),h(p.quaternion,m.quaternion,g.quaternion,b),s(x,p.translate,p.scale,p.skew,p.perspective,p.quaternion),!0)}},{"gl-mat4/determinant":94,"gl-vec3/lerp":173,"mat4-decompose":241,"mat4-recompose":244,"quat-slerp":271}],244:[function(a,u,c){var i={identity:a("gl-mat4/identity"),translate:a("gl-mat4/translate"),multiply:a("gl-mat4/multiply"),create:a("gl-mat4/create"),scale:a("gl-mat4/scale"),fromRotationTranslation:a("gl-mat4/fromRotationTranslation")},s=(i.create(),i.create());u.exports=function(l,d,h,m,g,p){return i.identity(l),i.fromRotationTranslation(l,p,d),l[3]=g[0],l[7]=g[1],l[11]=g[2],l[15]=g[3],i.identity(s),m[2]!==0&&(s[9]=m[2],i.multiply(l,l,s)),m[1]!==0&&(s[9]=0,s[8]=m[1],i.multiply(l,l,s)),m[0]!==0&&(s[8]=0,s[4]=m[0],i.multiply(l,l,s)),i.scale(l,l,h),l}},{"gl-mat4/create":93,"gl-mat4/fromRotationTranslation":96,"gl-mat4/identity":97,"gl-mat4/multiply":100,"gl-mat4/scale":107,"gl-mat4/translate":108}],245:[function(a,u,c){var i=a("binary-search-bounds"),s=a("mat4-interpolate"),l=a("gl-mat4/invert"),d=a("gl-mat4/rotateX"),h=a("gl-mat4/rotateY"),m=a("gl-mat4/rotateZ"),g=a("gl-mat4/lookAt"),p=a("gl-mat4/translate"),v=(a("gl-mat4/scale"),a("gl-vec3/normalize")),y=[0,0,0];function x(b){this._components=b.slice(),this._time=[0],this.prevMatrix=b.slice(),this.nextMatrix=b.slice(),this.computedMatrix=b.slice(),this.computedInverse=b.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}u.exports=function(b){return new x((b=b||{}).matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])};var w=x.prototype;w.recalcMatrix=function(b){var T=this._time,_=i.le(T,b),M=this.computedMatrix;if(!(_<0)){var A=this._components;if(_===T.length-1)for(var S=16*_,E=0;E<16;++E)M[E]=A[S++];else{var D=T[_+1]-T[_],O=(S=16*_,this.prevMatrix),R=!0;for(E=0;E<16;++E)O[E]=A[S++];var z=this.nextMatrix;for(E=0;E<16;++E)z[E]=A[S++],R=R&&O[E]===z[E];if(D<1e-6||R)for(E=0;E<16;++E)M[E]=O[E];else s(M,O,z,(b-T[_])/D)}var L=this.computedUp;L[0]=M[1],L[1]=M[5],L[2]=M[9],v(L,L);var P=this.computedInverse;l(P,M);var N=this.computedEye,B=P[15];N[0]=P[12]/B,N[1]=P[13]/B,N[2]=P[14]/B;var G=this.computedCenter,W=Math.exp(this.computedRadius[0]);for(E=0;E<3;++E)G[E]=N[E]-M[2+4*E]*W}},w.idle=function(b){if(!(b1&&i(s[g[x-2]],s[g[x-1]],y)<=0;)x-=1,g.pop();for(g.push(v),x=p.length;x>1&&i(s[p[x-2]],s[p[x-1]],y)>=0;)x-=1,p.pop();p.push(v)}d=new Array(p.length+g.length-2);for(var w=0,k=(h=0,g.length);h0;--b)d[w++]=p[b];return d};var i=a("robust-orientation")[3]},{"robust-orientation":284}],247:[function(a,u,c){u.exports=function(s,l){l||(l=s,s=window);var d=0,h=0,m=0,g={shift:!1,alt:!1,control:!1,meta:!1},p=!1;function v(S){var E=!1;return"altKey"in S&&(E=E||S.altKey!==g.alt,g.alt=!!S.altKey),"shiftKey"in S&&(E=E||S.shiftKey!==g.shift,g.shift=!!S.shiftKey),"ctrlKey"in S&&(E=E||S.ctrlKey!==g.control,g.control=!!S.ctrlKey),"metaKey"in S&&(E=E||S.metaKey!==g.meta,g.meta=!!S.metaKey),E}function y(S,E){var D=i.x(E),O=i.y(E);"buttons"in E&&(S=0|E.buttons),(S!==d||D!==h||O!==m||v(E))&&(d=0|S,h=D||0,m=O||0,l&&l(d,h,m,g))}function x(S){y(0,S)}function w(){(d||h||m||g.shift||g.alt||g.meta||g.control)&&(h=m=0,d=0,g.shift=g.alt=g.control=g.meta=!1,l&&l(0,0,0,g))}function k(S){v(S)&&l&&l(d,h,m,g)}function b(S){i.buttons(S)===0?y(0,S):y(d,S)}function T(S){y(d|i.buttons(S),S)}function _(S){y(d&~i.buttons(S),S)}function M(){p||(p=!0,s.addEventListener("mousemove",b),s.addEventListener("mousedown",T),s.addEventListener("mouseup",_),s.addEventListener("mouseleave",x),s.addEventListener("mouseenter",x),s.addEventListener("mouseout",x),s.addEventListener("mouseover",x),s.addEventListener("blur",w),s.addEventListener("keyup",k),s.addEventListener("keydown",k),s.addEventListener("keypress",k),s!==window&&(window.addEventListener("blur",w),window.addEventListener("keyup",k),window.addEventListener("keydown",k),window.addEventListener("keypress",k)))}M();var A={element:s};return Object.defineProperties(A,{enabled:{get:function(){return p},set:function(S){S?M():function(){!p||(p=!1,s.removeEventListener("mousemove",b),s.removeEventListener("mousedown",T),s.removeEventListener("mouseup",_),s.removeEventListener("mouseleave",x),s.removeEventListener("mouseenter",x),s.removeEventListener("mouseout",x),s.removeEventListener("mouseover",x),s.removeEventListener("blur",w),s.removeEventListener("keyup",k),s.removeEventListener("keydown",k),s.removeEventListener("keypress",k),s!==window&&(window.removeEventListener("blur",w),window.removeEventListener("keyup",k),window.removeEventListener("keydown",k),window.removeEventListener("keypress",k)))}()},enumerable:!0},buttons:{get:function(){return d},enumerable:!0},x:{get:function(){return h},enumerable:!0},y:{get:function(){return m},enumerable:!0},mods:{get:function(){return g},enumerable:!0}}),A};var i=a("mouse-event")},{"mouse-event":249}],248:[function(a,u,c){var i={left:0,top:0};u.exports=function(s,l,d){l=l||s.currentTarget||s.srcElement,Array.isArray(d)||(d=[0,0]);var h=s.clientX||0,m=s.clientY||0,g=(p=l,p===window||p===document||p===document.body?i:p.getBoundingClientRect()),p;return d[0]=h-g.left,d[1]=m-g.top,d}},{}],249:[function(a,u,c){function i(s){return s.target||s.srcElement||window}c.buttons=function(s){if(typeof s=="object"){if("buttons"in s)return s.buttons;if("which"in s){if((l=s.which)===2)return 4;if(l===3)return 2;if(l>0)return 1<=0)return 1< 0"),typeof l.vertex!="function"&&d("Must specify vertex creation function"),typeof l.cell!="function"&&d("Must specify cell creation function"),typeof l.phase!="function"&&d("Must specify phase function");for(var p=l.getters||[],v=new Array(m),y=0;y=0?v[y]=!0:v[y]=!1;return function(x,w,k,b,T,_){var M=[_,T].join(",");return(0,s[M])(x,w,k,i.mallocUint32,i.freeUint32)}(l.vertex,l.cell,l.phase,0,h,v)};var s={"false,0,1":function(l,d,h,m,g){return function(p,v,y,x){var w,k=0|p.shape[0],b=0|p.shape[1],T=p.data,_=0|p.offset,M=0|p.stride[0],A=0|p.stride[1],S=_,E=0|-M,D=0,O=0|-A,R=0,z=-M-A|0,L=0,P=0|M,N=A-M*k|0,B=0,G=0,W=0,K=2*k|0,te=m(K),Y=m(K),Z=0,re=0,U=-1,q=-1,$=0,ne=0|-k,H=0|k,Q=0,ee=-k-1|0,ie=k-1|0,ae=0,ue=0,le=0;for(B=0;B0){if(G=1,te[Z++]=h(T[S],v,y,x),S+=P,k>0)for(B=1,w=T[S],re=te[Z]=h(w,v,y,x),$=te[Z+U],Q=te[Z+ne],ae=te[Z+ee],re===$&&re===Q&&re===ae||(D=T[S+E],R=T[S+O],L=T[S+z],l(B,G,w,D,R,L,re,$,Q,ae,v,y,x),ue=Y[Z]=W++),Z+=1,S+=P,B=2;B0)for(B=1,w=T[S],re=te[Z]=h(w,v,y,x),$=te[Z+U],Q=te[Z+ne],ae=te[Z+ee],re===$&&re===Q&&re===ae||(D=T[S+E],R=T[S+O],L=T[S+z],l(B,G,w,D,R,L,re,$,Q,ae,v,y,x),ue=Y[Z]=W++,ae!==Q&&d(Y[Z+ne],ue,R,L,Q,ae,v,y,x)),Z+=1,S+=P,B=2;B0){if(B=1,te[Z++]=h(T[S],v,y,x),S+=P,b>0)for(G=1,w=T[S],re=te[Z]=h(w,v,y,x),Q=te[Z+ne],$=te[Z+U],ae=te[Z+ee],re===Q&&re===$&&re===ae||(D=T[S+E],R=T[S+O],L=T[S+z],l(B,G,w,D,R,L,re,Q,$,ae,v,y,x),ue=Y[Z]=W++),Z+=1,S+=P,G=2;G0)for(G=1,w=T[S],re=te[Z]=h(w,v,y,x),Q=te[Z+ne],$=te[Z+U],ae=te[Z+ee],re===Q&&re===$&&re===ae||(D=T[S+E],R=T[S+O],L=T[S+z],l(B,G,w,D,R,L,re,Q,$,ae,v,y,x),ue=Y[Z]=W++,ae!==Q&&d(Y[Z+ne],ue,L,D,ae,Q,v,y,x)),Z+=1,S+=P,G=2;G2&&S[1]>2&&_(A.pick(-1,-1).lo(1,1).hi(S[0]-2,S[1]-2),M.pick(-1,-1,0).lo(1,1).hi(S[0]-2,S[1]-2),M.pick(-1,-1,1).lo(1,1).hi(S[0]-2,S[1]-2)),S[1]>2&&(T(A.pick(0,-1).lo(1).hi(S[1]-2),M.pick(0,-1,1).lo(1).hi(S[1]-2)),b(M.pick(0,-1,0).lo(1).hi(S[1]-2))),S[1]>2&&(T(A.pick(S[0]-1,-1).lo(1).hi(S[1]-2),M.pick(S[0]-1,-1,1).lo(1).hi(S[1]-2)),b(M.pick(S[0]-1,-1,0).lo(1).hi(S[1]-2))),S[0]>2&&(T(A.pick(-1,0).lo(1).hi(S[0]-2),M.pick(-1,0,0).lo(1).hi(S[0]-2)),b(M.pick(-1,0,1).lo(1).hi(S[0]-2))),S[0]>2&&(T(A.pick(-1,S[1]-1).lo(1).hi(S[0]-2),M.pick(-1,S[1]-1,0).lo(1).hi(S[0]-2)),b(M.pick(-1,S[1]-1,1).lo(1).hi(S[0]-2))),M.set(0,0,0,0),M.set(0,0,1,0),M.set(S[0]-1,0,0,0),M.set(S[0]-1,0,1,0),M.set(0,S[1]-1,0,0),M.set(0,S[1]-1,1,0),M.set(S[0]-1,S[1]-1,0,0),M.set(S[0]-1,S[1]-1,1,0),M}}u.exports=function(k,b,T){return Array.isArray(T)||(T=i(b.dimension,typeof T=="string"?T:"clamp")),b.size===0?k:b.dimension===0?(k.set(0),k):function(_){var M=_.join();if(D=p[M])return D;for(var A=_.length,S=[v,y],E=1;E<=A;++E)S.push(x(E));var D=w.apply(void 0,S);return p[M]=D,D}(T)(k,b)}},{dup:65}],253:[function(a,u,c){function i(h,m){var g=Math.floor(m),p=m-g,v=0<=g&&g0;){L<64?(b=L,L=0):(b=64,L-=64);for(var P=0|m[1];P>0;){P<64?(T=P,P=0):(T=64,P-=64),v=R+L*M+P*A,w=z+L*E+P*D;var N=0,B=0,G=0,W=S,K=M-_*S,te=A-b*M,Y=O,Z=E-_*O,re=D-b*E;for(G=0;G0;){D<64?(b=D,D=0):(b=64,D-=64);for(var O=0|m[0];O>0;){O<64?(k=O,O=0):(k=64,O-=64),v=S+D*_+O*T,w=E+D*A+O*M;var R=0,z=0,L=_,P=T-b*_,N=A,B=M-b*A;for(z=0;z0;){z<64?(T=z,z=0):(T=64,z-=64);for(var L=0|m[0];L>0;){L<64?(k=L,L=0):(k=64,L-=64);for(var P=0|m[1];P>0;){P<64?(b=P,P=0):(b=64,P-=64),v=O+z*A+L*_+P*M,w=R+z*D+L*S+P*E;var N=0,B=0,G=0,W=A,K=_-T*A,te=M-k*_,Y=D,Z=S-T*D,re=E-k*S;for(G=0;Gp;){R=0,z=D-w;t:for(O=0;OP)break t;z+=M,R+=A}for(R=D,z=D-w,O=0;O>1,_e=me-le,we=me+le,Te=ge,Oe=_e,de=me,ye=we,Me=fe,ke=y+1,Ee=x-1,ze=!0,Fe=0,Ve=0,Ke=0,Re=M,qe=g(Re),We=g(Re);K=b*Te,te=b*Oe,ue=k;e:for(W=0;W0){O=Te,Te=Oe,Oe=O;break e}if(Ke<0)break e;ue+=S}K=b*ye,te=b*Me,ue=k;e:for(W=0;W0){O=ye,ye=Me,Me=O;break e}if(Ke<0)break e;ue+=S}K=b*Te,te=b*de,ue=k;e:for(W=0;W0){O=Te,Te=de,de=O;break e}if(Ke<0)break e;ue+=S}K=b*Oe,te=b*de,ue=k;e:for(W=0;W0){O=Oe,Oe=de,de=O;break e}if(Ke<0)break e;ue+=S}K=b*Te,te=b*ye,ue=k;e:for(W=0;W0){O=Te,Te=ye,ye=O;break e}if(Ke<0)break e;ue+=S}K=b*de,te=b*ye,ue=k;e:for(W=0;W0){O=de,de=ye,ye=O;break e}if(Ke<0)break e;ue+=S}K=b*Oe,te=b*Me,ue=k;e:for(W=0;W0){O=Oe,Oe=Me,Me=O;break e}if(Ke<0)break e;ue+=S}K=b*Oe,te=b*de,ue=k;e:for(W=0;W0){O=Oe,Oe=de,de=O;break e}if(Ke<0)break e;ue+=S}K=b*ye,te=b*Me,ue=k;e:for(W=0;W0){O=ye,ye=Me,Me=O;break e}if(Ke<0)break e;ue+=S}for(K=b*Te,te=b*Oe,Y=b*de,Z=b*ye,re=b*Me,U=b*ge,q=b*me,$=b*fe,ae=0,ue=k,W=0;W0)){if(Ke<0){for(K=b*P,te=b*ke,Y=b*Ee,ue=k,W=0;W0)for(;;){for(N=k+Ee*b,ae=0,W=0;W0)){for(N=k+Ee*b,ae=0,W=0;Wfe){e:for(;;){for(N=k+ke*b,ae=0,ue=k,W=0;W1&&T?M(b,T[0],T[1]):M(b)}(m,g,y);return v(y,x)}},{"typedarray-pool":308}],258:[function(a,u,c){var i=a("./lib/compile_sort.js"),s={};u.exports=function(l){var d=l.order,h=l.dtype,m=[d,h].join(":"),g=s[m];return g||(s[m]=g=i(d,h)),g(l),l}},{"./lib/compile_sort.js":257}],259:[function(a,u,c){var i=a("is-buffer"),s=typeof Float64Array<"u";function l(p,v){return p[0]-v[0]}function d(){var p,v=this.stride,y=new Array(v.length);for(p=0;p=0&&(b+=M*(T=0|k),_-=T),new x(this.data,_,M,b)},w.step=function(k){var b=this.shape[0],T=this.stride[0],_=this.offset,M=0,A=Math.ceil;return typeof k=="number"&&((M=0|k)<0?(_+=T*(b-1),b=A(-b/M)):b=A(b/M),T*=M),new x(this.data,b,T,_)},w.transpose=function(k){k=k===void 0?0:0|k;var b=this.shape,T=this.stride;return new x(this.data,b[k],T[k],this.offset)},w.pick=function(k){var b=[],T=[],_=this.offset;return typeof k=="number"&&k>=0?_=_+this.stride[0]*k|0:(b.push(this.shape[0]),T.push(this.stride[0])),(0,v[b.length+1])(this.data,b,T,_)},function(k,b,T,_){return new x(k,b[0],T[0],_)}},2:function(p,v,y){function x(k,b,T,_,M,A){this.data=k,this.shape=[b,T],this.stride=[_,M],this.offset=0|A}var w=x.prototype;return w.dtype=p,w.dimension=2,Object.defineProperty(w,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(w,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),w.set=function(k,b,T){return p==="generic"?this.data.set(this.offset+this.stride[0]*k+this.stride[1]*b,T):this.data[this.offset+this.stride[0]*k+this.stride[1]*b]=T},w.get=function(k,b){return p==="generic"?this.data.get(this.offset+this.stride[0]*k+this.stride[1]*b):this.data[this.offset+this.stride[0]*k+this.stride[1]*b]},w.index=function(k,b){return this.offset+this.stride[0]*k+this.stride[1]*b},w.hi=function(k,b){return new x(this.data,typeof k!="number"||k<0?this.shape[0]:0|k,typeof b!="number"||b<0?this.shape[1]:0|b,this.stride[0],this.stride[1],this.offset)},w.lo=function(k,b){var T=this.offset,_=0,M=this.shape[0],A=this.shape[1],S=this.stride[0],E=this.stride[1];return typeof k=="number"&&k>=0&&(T+=S*(_=0|k),M-=_),typeof b=="number"&&b>=0&&(T+=E*(_=0|b),A-=_),new x(this.data,M,A,S,E,T)},w.step=function(k,b){var T=this.shape[0],_=this.shape[1],M=this.stride[0],A=this.stride[1],S=this.offset,E=0,D=Math.ceil;return typeof k=="number"&&((E=0|k)<0?(S+=M*(T-1),T=D(-T/E)):T=D(T/E),M*=E),typeof b=="number"&&((E=0|b)<0?(S+=A*(_-1),_=D(-_/E)):_=D(_/E),A*=E),new x(this.data,T,_,M,A,S)},w.transpose=function(k,b){k=k===void 0?0:0|k,b=b===void 0?1:0|b;var T=this.shape,_=this.stride;return new x(this.data,T[k],T[b],_[k],_[b],this.offset)},w.pick=function(k,b){var T=[],_=[],M=this.offset;return typeof k=="number"&&k>=0?M=M+this.stride[0]*k|0:(T.push(this.shape[0]),_.push(this.stride[0])),typeof b=="number"&&b>=0?M=M+this.stride[1]*b|0:(T.push(this.shape[1]),_.push(this.stride[1])),(0,v[T.length+1])(this.data,T,_,M)},function(k,b,T,_){return new x(k,b[0],b[1],T[0],T[1],_)}},3:function(p,v,y){function x(k,b,T,_,M,A,S,E){this.data=k,this.shape=[b,T,_],this.stride=[M,A,S],this.offset=0|E}var w=x.prototype;return w.dtype=p,w.dimension=3,Object.defineProperty(w,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(w,"order",{get:function(){var k=Math.abs(this.stride[0]),b=Math.abs(this.stride[1]),T=Math.abs(this.stride[2]);return k>b?b>T?[2,1,0]:k>T?[1,2,0]:[1,0,2]:k>T?[2,0,1]:T>b?[0,1,2]:[0,2,1]}}),w.set=function(k,b,T,_){return p==="generic"?this.data.set(this.offset+this.stride[0]*k+this.stride[1]*b+this.stride[2]*T,_):this.data[this.offset+this.stride[0]*k+this.stride[1]*b+this.stride[2]*T]=_},w.get=function(k,b,T){return p==="generic"?this.data.get(this.offset+this.stride[0]*k+this.stride[1]*b+this.stride[2]*T):this.data[this.offset+this.stride[0]*k+this.stride[1]*b+this.stride[2]*T]},w.index=function(k,b,T){return this.offset+this.stride[0]*k+this.stride[1]*b+this.stride[2]*T},w.hi=function(k,b,T){return new x(this.data,typeof k!="number"||k<0?this.shape[0]:0|k,typeof b!="number"||b<0?this.shape[1]:0|b,typeof T!="number"||T<0?this.shape[2]:0|T,this.stride[0],this.stride[1],this.stride[2],this.offset)},w.lo=function(k,b,T){var _=this.offset,M=0,A=this.shape[0],S=this.shape[1],E=this.shape[2],D=this.stride[0],O=this.stride[1],R=this.stride[2];return typeof k=="number"&&k>=0&&(_+=D*(M=0|k),A-=M),typeof b=="number"&&b>=0&&(_+=O*(M=0|b),S-=M),typeof T=="number"&&T>=0&&(_+=R*(M=0|T),E-=M),new x(this.data,A,S,E,D,O,R,_)},w.step=function(k,b,T){var _=this.shape[0],M=this.shape[1],A=this.shape[2],S=this.stride[0],E=this.stride[1],D=this.stride[2],O=this.offset,R=0,z=Math.ceil;return typeof k=="number"&&((R=0|k)<0?(O+=S*(_-1),_=z(-_/R)):_=z(_/R),S*=R),typeof b=="number"&&((R=0|b)<0?(O+=E*(M-1),M=z(-M/R)):M=z(M/R),E*=R),typeof T=="number"&&((R=0|T)<0?(O+=D*(A-1),A=z(-A/R)):A=z(A/R),D*=R),new x(this.data,_,M,A,S,E,D,O)},w.transpose=function(k,b,T){k=k===void 0?0:0|k,b=b===void 0?1:0|b,T=T===void 0?2:0|T;var _=this.shape,M=this.stride;return new x(this.data,_[k],_[b],_[T],M[k],M[b],M[T],this.offset)},w.pick=function(k,b,T){var _=[],M=[],A=this.offset;return typeof k=="number"&&k>=0?A=A+this.stride[0]*k|0:(_.push(this.shape[0]),M.push(this.stride[0])),typeof b=="number"&&b>=0?A=A+this.stride[1]*b|0:(_.push(this.shape[1]),M.push(this.stride[1])),typeof T=="number"&&T>=0?A=A+this.stride[2]*T|0:(_.push(this.shape[2]),M.push(this.stride[2])),(0,v[_.length+1])(this.data,_,M,A)},function(k,b,T,_){return new x(k,b[0],b[1],b[2],T[0],T[1],T[2],_)}},4:function(p,v,y){function x(k,b,T,_,M,A,S,E,D,O){this.data=k,this.shape=[b,T,_,M],this.stride=[A,S,E,D],this.offset=0|O}var w=x.prototype;return w.dtype=p,w.dimension=4,Object.defineProperty(w,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(w,"order",{get:y}),w.set=function(k,b,T,_,M){return p==="generic"?this.data.set(this.offset+this.stride[0]*k+this.stride[1]*b+this.stride[2]*T+this.stride[3]*_,M):this.data[this.offset+this.stride[0]*k+this.stride[1]*b+this.stride[2]*T+this.stride[3]*_]=M},w.get=function(k,b,T,_){return p==="generic"?this.data.get(this.offset+this.stride[0]*k+this.stride[1]*b+this.stride[2]*T+this.stride[3]*_):this.data[this.offset+this.stride[0]*k+this.stride[1]*b+this.stride[2]*T+this.stride[3]*_]},w.index=function(k,b,T,_){return this.offset+this.stride[0]*k+this.stride[1]*b+this.stride[2]*T+this.stride[3]*_},w.hi=function(k,b,T,_){return new x(this.data,typeof k!="number"||k<0?this.shape[0]:0|k,typeof b!="number"||b<0?this.shape[1]:0|b,typeof T!="number"||T<0?this.shape[2]:0|T,typeof _!="number"||_<0?this.shape[3]:0|_,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},w.lo=function(k,b,T,_){var M=this.offset,A=0,S=this.shape[0],E=this.shape[1],D=this.shape[2],O=this.shape[3],R=this.stride[0],z=this.stride[1],L=this.stride[2],P=this.stride[3];return typeof k=="number"&&k>=0&&(M+=R*(A=0|k),S-=A),typeof b=="number"&&b>=0&&(M+=z*(A=0|b),E-=A),typeof T=="number"&&T>=0&&(M+=L*(A=0|T),D-=A),typeof _=="number"&&_>=0&&(M+=P*(A=0|_),O-=A),new x(this.data,S,E,D,O,R,z,L,P,M)},w.step=function(k,b,T,_){var M=this.shape[0],A=this.shape[1],S=this.shape[2],E=this.shape[3],D=this.stride[0],O=this.stride[1],R=this.stride[2],z=this.stride[3],L=this.offset,P=0,N=Math.ceil;return typeof k=="number"&&((P=0|k)<0?(L+=D*(M-1),M=N(-M/P)):M=N(M/P),D*=P),typeof b=="number"&&((P=0|b)<0?(L+=O*(A-1),A=N(-A/P)):A=N(A/P),O*=P),typeof T=="number"&&((P=0|T)<0?(L+=R*(S-1),S=N(-S/P)):S=N(S/P),R*=P),typeof _=="number"&&((P=0|_)<0?(L+=z*(E-1),E=N(-E/P)):E=N(E/P),z*=P),new x(this.data,M,A,S,E,D,O,R,z,L)},w.transpose=function(k,b,T,_){k=k===void 0?0:0|k,b=b===void 0?1:0|b,T=T===void 0?2:0|T,_=_===void 0?3:0|_;var M=this.shape,A=this.stride;return new x(this.data,M[k],M[b],M[T],M[_],A[k],A[b],A[T],A[_],this.offset)},w.pick=function(k,b,T,_){var M=[],A=[],S=this.offset;return typeof k=="number"&&k>=0?S=S+this.stride[0]*k|0:(M.push(this.shape[0]),A.push(this.stride[0])),typeof b=="number"&&b>=0?S=S+this.stride[1]*b|0:(M.push(this.shape[1]),A.push(this.stride[1])),typeof T=="number"&&T>=0?S=S+this.stride[2]*T|0:(M.push(this.shape[2]),A.push(this.stride[2])),typeof _=="number"&&_>=0?S=S+this.stride[3]*_|0:(M.push(this.shape[3]),A.push(this.stride[3])),(0,v[M.length+1])(this.data,M,A,S)},function(k,b,T,_){return new x(k,b[0],b[1],b[2],b[3],T[0],T[1],T[2],T[3],_)}},5:function(p,v,y){function x(k,b,T,_,M,A,S,E,D,O,R,z){this.data=k,this.shape=[b,T,_,M,A],this.stride=[S,E,D,O,R],this.offset=0|z}var w=x.prototype;return w.dtype=p,w.dimension=5,Object.defineProperty(w,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(w,"order",{get:y}),w.set=function(k,b,T,_,M,A){return p==="generic"?this.data.set(this.offset+this.stride[0]*k+this.stride[1]*b+this.stride[2]*T+this.stride[3]*_+this.stride[4]*M,A):this.data[this.offset+this.stride[0]*k+this.stride[1]*b+this.stride[2]*T+this.stride[3]*_+this.stride[4]*M]=A},w.get=function(k,b,T,_,M){return p==="generic"?this.data.get(this.offset+this.stride[0]*k+this.stride[1]*b+this.stride[2]*T+this.stride[3]*_+this.stride[4]*M):this.data[this.offset+this.stride[0]*k+this.stride[1]*b+this.stride[2]*T+this.stride[3]*_+this.stride[4]*M]},w.index=function(k,b,T,_,M){return this.offset+this.stride[0]*k+this.stride[1]*b+this.stride[2]*T+this.stride[3]*_+this.stride[4]*M},w.hi=function(k,b,T,_,M){return new x(this.data,typeof k!="number"||k<0?this.shape[0]:0|k,typeof b!="number"||b<0?this.shape[1]:0|b,typeof T!="number"||T<0?this.shape[2]:0|T,typeof _!="number"||_<0?this.shape[3]:0|_,typeof M!="number"||M<0?this.shape[4]:0|M,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},w.lo=function(k,b,T,_,M){var A=this.offset,S=0,E=this.shape[0],D=this.shape[1],O=this.shape[2],R=this.shape[3],z=this.shape[4],L=this.stride[0],P=this.stride[1],N=this.stride[2],B=this.stride[3],G=this.stride[4];return typeof k=="number"&&k>=0&&(A+=L*(S=0|k),E-=S),typeof b=="number"&&b>=0&&(A+=P*(S=0|b),D-=S),typeof T=="number"&&T>=0&&(A+=N*(S=0|T),O-=S),typeof _=="number"&&_>=0&&(A+=B*(S=0|_),R-=S),typeof M=="number"&&M>=0&&(A+=G*(S=0|M),z-=S),new x(this.data,E,D,O,R,z,L,P,N,B,G,A)},w.step=function(k,b,T,_,M){var A=this.shape[0],S=this.shape[1],E=this.shape[2],D=this.shape[3],O=this.shape[4],R=this.stride[0],z=this.stride[1],L=this.stride[2],P=this.stride[3],N=this.stride[4],B=this.offset,G=0,W=Math.ceil;return typeof k=="number"&&((G=0|k)<0?(B+=R*(A-1),A=W(-A/G)):A=W(A/G),R*=G),typeof b=="number"&&((G=0|b)<0?(B+=z*(S-1),S=W(-S/G)):S=W(S/G),z*=G),typeof T=="number"&&((G=0|T)<0?(B+=L*(E-1),E=W(-E/G)):E=W(E/G),L*=G),typeof _=="number"&&((G=0|_)<0?(B+=P*(D-1),D=W(-D/G)):D=W(D/G),P*=G),typeof M=="number"&&((G=0|M)<0?(B+=N*(O-1),O=W(-O/G)):O=W(O/G),N*=G),new x(this.data,A,S,E,D,O,R,z,L,P,N,B)},w.transpose=function(k,b,T,_,M){k=k===void 0?0:0|k,b=b===void 0?1:0|b,T=T===void 0?2:0|T,_=_===void 0?3:0|_,M=M===void 0?4:0|M;var A=this.shape,S=this.stride;return new x(this.data,A[k],A[b],A[T],A[_],A[M],S[k],S[b],S[T],S[_],S[M],this.offset)},w.pick=function(k,b,T,_,M){var A=[],S=[],E=this.offset;return typeof k=="number"&&k>=0?E=E+this.stride[0]*k|0:(A.push(this.shape[0]),S.push(this.stride[0])),typeof b=="number"&&b>=0?E=E+this.stride[1]*b|0:(A.push(this.shape[1]),S.push(this.stride[1])),typeof T=="number"&&T>=0?E=E+this.stride[2]*T|0:(A.push(this.shape[2]),S.push(this.stride[2])),typeof _=="number"&&_>=0?E=E+this.stride[3]*_|0:(A.push(this.shape[3]),S.push(this.stride[3])),typeof M=="number"&&M>=0?E=E+this.stride[4]*M|0:(A.push(this.shape[4]),S.push(this.stride[4])),(0,v[A.length+1])(this.data,A,S,E)},function(k,b,T,_){return new x(k,b[0],b[1],b[2],b[3],b[4],T[0],T[1],T[2],T[3],T[4],_)}}};function m(p,v){var y=v===-1?"T":String(v),x=h[y];return v===-1?x(p):v===0?x(p,g[p][0]):x(p,g[p],d)}var g={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};u.exports=function(p,v,y,x){if(p===void 0)return(0,g.array[0])([]);typeof p=="number"&&(p=[p]),v===void 0&&(v=[p.length]);var w=v.length;if(y===void 0){y=new Array(w);for(var k=w-1,b=1;k>=0;--k)y[k]=b,b*=v[k]}if(x===void 0)for(x=0,k=0;kl==l>0?m===-1>>>0?(h+=1,m=0):m+=1:m===0?(m=-1>>>0,h-=1):m-=1,i.pack(m,h)}},{"double-bits":64}],261:[function(a,u,c){c.vertexNormals=function(i,s,l){for(var d=s.length,h=new Array(d),m=l===void 0?1e-6:l,g=0;gm){var D=h[y],O=1/Math.sqrt(M*S);for(E=0;E<3;++E){var R=(E+1)%3,z=(E+2)%3;D[E]+=O*(A[R]*_[z]-A[z]*_[R])}}}for(g=0;gm)for(O=1/Math.sqrt(L),E=0;E<3;++E)D[E]*=O;else for(E=0;E<3;++E)D[E]=0}return h},c.faceNormals=function(i,s,l){for(var d=i.length,h=new Array(d),m=l===void 0?1e-6:l,g=0;gm?1/Math.sqrt(b):0,y=0;y<3;++y)k[y]*=b;h[g]=k}return h}},{}],262:[function(a,u,c){u.exports=function(i,s,l,d,h,m,g,p,v,y){var x=s+m+y;if(w>0){var w=Math.sqrt(x+1);i[0]=.5*(g-v)/w,i[1]=.5*(p-d)/w,i[2]=.5*(l-m)/w,i[3]=.5*w}else{var k=Math.max(s,m,y);w=Math.sqrt(2*k-x+1),s>=k?(i[0]=.5*w,i[1]=.5*(h+l)/w,i[2]=.5*(p+d)/w,i[3]=.5*(g-v)/w):m>=k?(i[0]=.5*(l+h)/w,i[1]=.5*w,i[2]=.5*(v+g)/w,i[3]=.5*(p-d)/w):(i[0]=.5*(d+p)/w,i[1]=.5*(g+v)/w,i[2]=.5*w,i[3]=.5*(l-h)/w)}return i}},{}],263:[function(a,u,c){u.exports=function(x){var w=(x=x||{}).center||[0,0,0],k=x.rotation||[0,0,0,1],b=x.radius||1;w=[].slice.call(w,0,3),p(k=[].slice.call(k,0,4),k);var T=new v(k,w,Math.log(b));return T.setDistanceLimits(x.zoomMin,x.zoomMax),("eye"in x||"up"in x)&&T.lookAt(0,x.eye,x.center,x.up),T};var i=a("filtered-vector"),s=a("gl-mat4/lookAt"),l=a("gl-mat4/fromQuat"),d=a("gl-mat4/invert"),h=a("./lib/quatFromFrame");function m(x,w,k){return Math.sqrt(Math.pow(x,2)+Math.pow(w,2)+Math.pow(k,2))}function g(x,w,k,b){return Math.sqrt(Math.pow(x,2)+Math.pow(w,2)+Math.pow(k,2)+Math.pow(b,2))}function p(x,w){var k=w[0],b=w[1],T=w[2],_=w[3],M=g(k,b,T,_);M>1e-6?(x[0]=k/M,x[1]=b/M,x[2]=T/M,x[3]=_/M):(x[0]=x[1]=x[2]=0,x[3]=1)}function v(x,w,k){this.radius=i([k]),this.center=i(w),this.rotation=i(x),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}var y=v.prototype;y.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},y.recalcMatrix=function(x){this.radius.curve(x),this.center.curve(x),this.rotation.curve(x);var w=this.computedRotation;p(w,w);var k=this.computedMatrix;l(k,w);var b=this.computedCenter,T=this.computedEye,_=this.computedUp,M=Math.exp(this.computedRadius[0]);T[0]=b[0]+M*k[2],T[1]=b[1]+M*k[6],T[2]=b[2]+M*k[10],_[0]=k[1],_[1]=k[5],_[2]=k[9];for(var A=0;A<3;++A){for(var S=0,E=0;E<3;++E)S+=k[A+4*E]*T[E];k[12+A]=-S}},y.getMatrix=function(x,w){this.recalcMatrix(x);var k=this.computedMatrix;if(w){for(var b=0;b<16;++b)w[b]=k[b];return w}return k},y.idle=function(x){this.center.idle(x),this.radius.idle(x),this.rotation.idle(x)},y.flush=function(x){this.center.flush(x),this.radius.flush(x),this.rotation.flush(x)},y.pan=function(x,w,k,b){w=w||0,k=k||0,b=b||0,this.recalcMatrix(x);var T=this.computedMatrix,_=T[1],M=T[5],A=T[9],S=m(_,M,A);_/=S,M/=S,A/=S;var E=T[0],D=T[4],O=T[8],R=E*_+D*M+O*A,z=m(E-=_*R,D-=M*R,O-=A*R);E/=z,D/=z,O/=z,T[2],T[6],T[10];var L=E*w+_*k,P=D*w+M*k,N=O*w+A*k;this.center.move(x,L,P,N);var B=Math.exp(this.computedRadius[0]);B=Math.max(1e-4,B+b),this.radius.set(x,Math.log(B))},y.rotate=function(x,w,k,b){this.recalcMatrix(x),w=w||0,k=k||0;var T=this.computedMatrix,_=T[0],M=T[4],A=T[8],S=T[1],E=T[5],D=T[9],O=T[2],R=T[6],z=T[10],L=w*_+k*S,P=w*M+k*E,N=w*A+k*D,B=-(R*N-z*P),G=-(z*L-O*N),W=-(O*P-R*L),K=Math.sqrt(Math.max(0,1-Math.pow(B,2)-Math.pow(G,2)-Math.pow(W,2))),te=g(B,G,W,K);te>1e-6?(B/=te,G/=te,W/=te,K/=te):(B=G=W=0,K=1);var Y=this.computedRotation,Z=Y[0],re=Y[1],U=Y[2],q=Y[3],$=Z*K+q*B+re*W-U*G,ne=re*K+q*G+U*B-Z*W,H=U*K+q*W+Z*G-re*B,Q=q*K-Z*B-re*G-U*W;if(b){B=O,G=R,W=z;var ee=Math.sin(b)/m(B,G,W);B*=ee,G*=ee,W*=ee,Q=Q*(K=Math.cos(w))-($=$*K+Q*B+ne*W-H*G)*B-(ne=ne*K+Q*G+H*B-$*W)*G-(H=H*K+Q*W+$*G-ne*B)*W}var ie=g($,ne,H,Q);ie>1e-6?($/=ie,ne/=ie,H/=ie,Q/=ie):($=ne=H=0,Q=1),this.rotation.set(x,$,ne,H,Q)},y.lookAt=function(x,w,k,b){this.recalcMatrix(x),k=k||this.computedCenter,w=w||this.computedEye,b=b||this.computedUp;var T=this.computedMatrix;s(T,w,k,b);var _=this.computedRotation;h(_,T[0],T[1],T[2],T[4],T[5],T[6],T[8],T[9],T[10]),p(_,_),this.rotation.set(x,_[0],_[1],_[2],_[3]);for(var M=0,A=0;A<3;++A)M+=Math.pow(k[A]-w[A],2);this.radius.set(x,.5*Math.log(Math.max(M,1e-6))),this.center.set(x,k[0],k[1],k[2])},y.translate=function(x,w,k,b){this.center.move(x,w||0,k||0,b||0)},y.setMatrix=function(x,w){var k=this.computedRotation;h(k,w[0],w[1],w[2],w[4],w[5],w[6],w[8],w[9],w[10]),p(k,k),this.rotation.set(x,k[0],k[1],k[2],k[3]);var b=this.computedMatrix;d(b,w);var T=b[15];if(Math.abs(T)>1e-6){var _=b[12]/T,M=b[13]/T,A=b[14]/T;this.recalcMatrix(x);var S=Math.exp(this.computedRadius[0]);this.center.set(x,_-b[2]*S,M-b[6]*S,A-b[10]*S),this.radius.idle(x)}else this.center.idle(x),this.radius.idle(x)},y.setDistance=function(x,w){w>0&&this.radius.set(x,Math.log(w))},y.setDistanceLimits=function(x,w){x=x>0?Math.log(x):-1/0,w=w>0?Math.log(w):1/0,w=Math.max(w,x),this.radius.bounds[0][0]=x,this.radius.bounds[1][0]=w},y.getDistanceLimits=function(x){var w=this.radius.bounds;return x?(x[0]=Math.exp(w[0][0]),x[1]=Math.exp(w[1][0]),x):[Math.exp(w[0][0]),Math.exp(w[1][0])]},y.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},y.fromJSON=function(x){var w=this.lastT(),k=x.center;k&&this.center.set(w,k[0],k[1],k[2]);var b=x.rotation;b&&this.rotation.set(w,b[0],b[1],b[2],b[3]);var T=x.distance;T&&T>0&&this.radius.set(w,Math.log(T)),this.setDistanceLimits(x.zoomMin,x.zoomMax)}},{"./lib/quatFromFrame":262,"filtered-vector":68,"gl-mat4/fromQuat":95,"gl-mat4/invert":98,"gl-mat4/lookAt":99}],264:[function(a,u,c){var i=a("repeat-string");u.exports=function(s,l,d){return i(d=d!==void 0?d+"":" ",l)+s}},{"repeat-string":277}],265:[function(a,u,c){u.exports=function(i,s){s||(s=[0,""]),i=String(i);var l=parseFloat(i,10);return s[0]=l,s[1]=i.match(/[\d.\-\+]*\s*(.*)/)[1]||"",s}},{}],266:[function(a,u,c){u.exports=function(s,l){for(var d=0|l.length,h=s.length,m=[new Array(d),new Array(d)],g=0;g0){E=m[R][A][0],O=R;break}D=E[1^O];for(var z=0;z<2;++z)for(var L=m[z][A],P=0;P0&&(E=N,D=B,O=z)}return S||E&&y(E,O),D}function w(M,A){var S=m[A][M][0],E=[M];y(S,A);for(var D=S[1^A];;){for(;D!==M;)E.push(D),D=x(E[E.length-2],D,!1);if(m[0][M].length+m[1][M].length===0)break;var O=E[E.length-1],R=M,z=E[1],L=x(O,R,!0);if(i(l[O],l[R],l[z],l[L])<0)break;E.push(M),D=x(O,R)}return E}function k(M,A){return A[1]===A[A.length-1]}for(g=0;g0;){m[0][g].length;var _=w(g,b);k(0,_)?T.push.apply(T,_):(T.length>0&&v.push(T),T=_)}T.length>0&&v.push(T)}return v};var i=a("compare-angle")},{"compare-angle":54}],267:[function(a,u,c){u.exports=function(s,l){for(var d=i(s,l.length),h=new Array(l.length),m=new Array(l.length),g=[],p=0;p0;){var y=g.pop();h[y]=!1;var x=d[y];for(p=0;p0})).length,M=new Array(_),A=new Array(_);for(b=0;b<_;++b){M[b]=b;var S=new Array(_),E=T[b].map(function(le){return y[le]}),D=l([E]),O=0;e:for(var R=0;R<_;++R)if(S[R]=0,b!==R){for(var z=(ae=T[R]).length,L=0;L0;){var ne=q.pop(),H=G[ne];m(H,function(le,ge){return le-ge});var Q,ee=H.length,ie=$[ne];if(ie===0){var ae=T[ne];Q=[ae]}for(b=0;b=0||($[ue]=1^ie,q.push(ue),ie===0&&(U(ae=T[ue])||(ae.reverse(),Q.push(ae))))}ie===0&&x.push(Q)}return x};var i=a("edges-to-adjacency-list"),s=a("planar-dual"),l=a("point-in-big-polygon"),d=a("two-product"),h=a("robust-sum"),m=a("uniq"),g=a("./lib/trim-leaves");function p(v,y){for(var x=new Array(v),w=0;w0&&R[L]===z[0]))return 1;P=O[L-1]}for(var N=1;P;){var B=P.key,G=i(z,B[0],B[1]);if(B[0][0]0))return 0;N=-1,P=P.right}else if(G>0)P=P.left;else{if(!(G<0))return 0;N=1,P=P.right}}return N}}(E.slabs,E.coordinates);return x.length===0?D:function(O,R){return function(z){return O(z[0],z[1])?0:R(z)}}(m(x),D)};var i=a("robust-orientation")[3],s=a("slab-decomposition"),l=a("interval-tree-1d"),d=a("binary-search-bounds");function h(){return!0}function m(p){for(var v={},y=0;y=y?(L=1,S=y+2*k+T):S=k*(L=-k/y)+T):(L=0,b>=0?(P=0,S=T):-b>=w?(P=1,S=w+2*b+T):S=b*(P=-b/w)+T);else if(P<0)P=0,k>=0?(L=0,S=T):-k>=y?(L=1,S=y+2*k+T):S=k*(L=-k/y)+T;else{var N=1/z;S=(L*=N)*(y*L+x*(P*=N)+2*k)+P*(x*L+w*P+2*b)+T}else L<0?(D=w+b)>(E=x+k)?(O=D-E)>=(R=y-2*x+w)?(L=1,P=0,S=y+2*k+T):S=(L=O/R)*(y*L+x*(P=1-L)+2*k)+P*(x*L+w*P+2*b)+T:(L=0,D<=0?(P=1,S=w+2*b+T):b>=0?(P=0,S=T):S=b*(P=-b/w)+T):P<0?(D=y+k)>(E=x+b)?(O=D-E)>=(R=y-2*x+w)?(P=1,L=0,S=w+2*b+T):S=(L=1-(P=O/R))*(y*L+x*P+2*k)+P*(x*L+w*P+2*b)+T:(P=0,D<=0?(L=1,S=y+2*k+T):k>=0?(L=0,S=T):S=k*(L=-k/y)+T):(O=w+b-x-k)<=0?(L=0,P=1,S=w+2*b+T):O>=(R=y-2*x+w)?(L=1,P=0,S=y+2*k+T):S=(L=O/R)*(y*L+x*(P=1-L)+2*k)+P*(x*L+w*P+2*b)+T;var B=1-L-P;for(v=0;v0){var y=d[m-1];if(i(p,y)===0&&l(y)!==v){m-=1;continue}}d[m++]=p}}return d.length=m,d}},{"cell-orientation":47,"compare-cell":56,"compare-oriented-cell":57}],277:[function(a,u,c){var i,s="";u.exports=function(l,d){if(typeof l!="string")throw new TypeError("expected a string");if(d===1)return l;if(d===2)return l+l;var h=l.length*d;if(i!==l||i===void 0)i=l,s="";else if(s.length>=h)return s.substr(0,h);for(;h>s.length&&d>1;)1&d&&(s+=l),d>>=1,l+=l;return s=(s+=l).substr(0,h)}},{}],278:[function(a,u,c){(function(i){(function(){u.exports=i.performance&&i.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}}).call(this)}).call(this,r!==void 0?r:typeof self<"u"?self:typeof window<"u"?window:{})},{}],279:[function(a,u,c){u.exports=function(i){for(var s=i.length,l=i[i.length-1],d=s,h=s-2;h>=0;--h){var m=l,g=i[h];(v=g-((l=m+g)-m))&&(i[--d]=l,l=v)}var p=0;for(h=d;h0){if(S<=0)return E;M=A+S}else{if(!(A<0)||S>=0)return E;M=-(A+S)}var D=33306690738754716e-32*M;return E>=D||E<=-D?E:v(b,T,_)},function(b,T,_,M){var A=b[0]-M[0],S=T[0]-M[0],E=_[0]-M[0],D=b[1]-M[1],O=T[1]-M[1],R=_[1]-M[1],z=b[2]-M[2],L=T[2]-M[2],P=_[2]-M[2],N=S*R,B=E*O,G=E*D,W=A*R,K=A*O,te=S*D,Y=z*(N-B)+L*(G-W)+P*(K-te),Z=7771561172376103e-31*((Math.abs(N)+Math.abs(B))*Math.abs(z)+(Math.abs(G)+Math.abs(W))*Math.abs(L)+(Math.abs(K)+Math.abs(te))*Math.abs(P));return Y>Z||-Y>Z?Y:y(b,T,_,M)}];function w(b){var T=x[b.length];return T||(T=x[b.length]=p(b.length)),T.apply(void 0,b)}function k(b,T,_,M,A,S,E){return function(D,O,R,z,L){switch(arguments.length){case 0:case 1:return 0;case 2:return M(D,O);case 3:return A(D,O,R);case 4:return S(D,O,R,z);case 5:return E(D,O,R,z,L)}for(var P=new Array(arguments.length),N=0;N0&&g>0||m<0&&g<0)return!1;var p=i(d,s,l),v=i(h,s,l);return p>0&&v>0||p<0&&v<0?!1:m===0&&g===0&&p===0&&v===0?function(y,x,w,k){for(var b=0;b<2;++b){var T=y[b],_=x[b],M=Math.min(T,_),A=Math.max(T,_),S=w[b],E=k[b],D=Math.min(S,E);if(Math.max(S,E)=d?(h=w,(v+=1)=d?(h=w,(v+=1)>1,w=d[2*x+1];if(w===p)return x;p>1,w=d[2*x+1];if(w===p)return x;p>1,w=d[2*x+1];if(w===p)return x;p>1,_=l(y[T],x);_<=0?(_===0&&(b=T),w=T+1):_>0&&(k=T-1)}return b}function p(y,x){for(var w=new Array(y.length),k=0,b=w.length;k=y.length||l(y[R],T)!==0););}return w}function v(y,x){if(x<0)return[];for(var w=[],k=(1<>>S&1&&A.push(b[S]);x.push(A)}return h(x)},c.skeleton=v,c.boundary=function(y){for(var x=[],w=0,k=y.length;w>1:(te>>1)-1}function E(te){for(var Y=A(te);;){var Z=Y,re=2*te+1,U=2*(te+1),q=te;if(re0;){var Z=S(te);if(Z>=0&&Y0){var te=L[0];return M(0,N-1),N-=1,E(0),te}return-1}function R(te,Y){var Z=L[te];return y[Z]===Y?te:(y[Z]=-1/0,D(te),O(),y[Z]=Y,D((N+=1)-1))}function z(te){if(!x[te]){x[te]=!0;var Y=p[te],Z=v[te];p[Z]>=0&&(p[Z]=Y),v[Y]>=0&&(v[Y]=Z),P[Y]>=0&&R(P[Y],_(Y)),P[Z]>=0&&R(P[Z],_(Z))}}var L=[],P=new Array(m);for(w=0;w>1;w>=0;--w)E(w);for(;;){var B=O();if(B<0||y[B]>h)break;z(B)}var G=[];for(w=0;w=0&&Z>=0&&Y!==Z){var re=P[Y],U=P[Z];re!==U&&K.push([re,U])}}),s.unique(s.normalize(K)),{positions:G,edges:K}};var i=a("robust-orientation"),s=a("simplicial-complex")},{"robust-orientation":284,"simplicial-complex":295}],298:[function(a,u,c){u.exports=function(l,d){var h,m,g,p;if(d[0][0]d[1][0]))return s(d,l);h=d[1],m=d[0]}if(l[0][0]l[1][0]))return-s(l,d);g=l[1],p=l[0]}var v=i(h,m,p),y=i(h,m,g);if(v<0){if(y<=0)return v}else if(v>0){if(y>=0)return v}else if(y)return y;if(v=i(p,g,m),y=i(p,g,h),v<0){if(y<=0)return v}else if(v>0){if(y>=0)return v}else if(y)return y;return m[0]-p[0]};var i=a("robust-orientation");function s(l,d){var h,m,g,p;if(d[0][0]d[1][0])){var v=Math.min(l[0][1],l[1][1]),y=Math.max(l[0][1],l[1][1]),x=Math.min(d[0][1],d[1][1]),w=Math.max(d[0][1],d[1][1]);return yw?v-w:y-w}h=d[1],m=d[0]}l[0][1]0)if(x[0]!==T[1][0])w=y,y=y.right;else{if(M=g(y.right,x))return M;y=y.left}else{if(x[0]!==T[1][0])return y;var M;if(M=g(y.right,x))return M;y=y.left}}return w}function p(y,x,w,k){this.y=y,this.index=x,this.start=w,this.closed=k}function v(y,x,w,k){this.x=y,this.segment=x,this.create=w,this.index=k}h.prototype.castUp=function(y){var x=i.le(this.coordinates,y[0]);if(x<0)return-1;this.slabs[x];var w=g(this.slabs[x],y),k=-1;if(w&&(k=w.value),this.coordinates[x]===y[0]){var b=null;if(w&&(b=w.key),x>0){var T=g(this.slabs[x-1],y);T&&(b?d(T.key,b)>0&&(b=T.key,k=T.value):(k=T.value,b=T.key))}var _=this.horizontal[x];if(_.length>0){var M=i.ge(_,y[1],m);if(M<_.length){var A=_[M];if(y[1]===A.y){if(A.closed)return A.index;for(;M<_.length-1&&_[M+1].y===y[1];)if((A=_[M+=1]).closed)return A.index;if(A.y===y[1]&&!A.start){if((M+=1)>=_.length)return k;A=_[M]}}if(A.start)if(b){var S=l(b[0],b[1],[y[0],A.y]);b[0][0]>b[1][0]&&(S=-S),S>0&&(k=A.index)}else k=A.index;else A.y!==y[1]&&(k=A.index)}}}return k}},{"./lib/order-segments":298,"binary-search-bounds":31,"functional-red-black-tree":69,"robust-orientation":284}],300:[function(a,u,c){var i=a("robust-dot-product"),s=a("robust-sum");function l(h,m){var g=s(i(h,m),[m[m.length-1]]);return g[g.length-1]}function d(h,m,g,p){var v=-m/(p-m);v<0?v=0:v>1&&(v=1);for(var y=1-v,x=h.length,w=new Array(x),k=0;k0||v>0&&k<0){var b=d(y,k,x,v);g.push(b),p.push(b.slice())}k<0?p.push(x.slice()):k>0?g.push(x.slice()):(g.push(x.slice()),p.push(x.slice())),v=k}return{positive:g,negative:p}},u.exports.positive=function(h,m){for(var g=[],p=l(h[h.length-1],m),v=h[h.length-1],y=h[0],x=0;x0||p>0&&w<0)&&g.push(d(v,w,y,p)),w>=0&&g.push(y.slice()),p=w}return g},u.exports.negative=function(h,m){for(var g=[],p=l(h[h.length-1],m),v=h[h.length-1],y=h[0],x=0;x0||p>0&&w<0)&&g.push(d(v,w,y,p)),w<=0&&g.push(y.slice()),p=w}return g}},{"robust-dot-product":281,"robust-sum":289}],301:[function(a,u,c){(function(){var i={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function s(g){return d(m(g),arguments)}function l(g,p){return s.apply(null,[g].concat(p||[]))}function d(g,p){var v,y,x,w,k,b,T,_,M,A=1,S=g.length,E="";for(y=0;y=0),w.type){case"b":v=parseInt(v,10).toString(2);break;case"c":v=String.fromCharCode(parseInt(v,10));break;case"d":case"i":v=parseInt(v,10);break;case"j":v=JSON.stringify(v,null,w.width?parseInt(w.width):0);break;case"e":v=w.precision?parseFloat(v).toExponential(w.precision):parseFloat(v).toExponential();break;case"f":v=w.precision?parseFloat(v).toFixed(w.precision):parseFloat(v);break;case"g":v=w.precision?String(Number(v.toPrecision(w.precision))):parseFloat(v);break;case"o":v=(parseInt(v,10)>>>0).toString(8);break;case"s":v=String(v),v=w.precision?v.substring(0,w.precision):v;break;case"t":v=String(!!v),v=w.precision?v.substring(0,w.precision):v;break;case"T":v=Object.prototype.toString.call(v).slice(8,-1).toLowerCase(),v=w.precision?v.substring(0,w.precision):v;break;case"u":v=parseInt(v,10)>>>0;break;case"v":v=v.valueOf(),v=w.precision?v.substring(0,w.precision):v;break;case"x":v=(parseInt(v,10)>>>0).toString(16);break;case"X":v=(parseInt(v,10)>>>0).toString(16).toUpperCase()}i.json.test(w.type)?E+=v:(!i.number.test(w.type)||_&&!w.sign?M="":(M=_?"+":"-",v=v.toString().replace(i.sign,"")),b=w.pad_char?w.pad_char==="0"?"0":w.pad_char.charAt(1):" ",T=w.width-(M+v).length,k=w.width&&T>0?b.repeat(T):"",E+=w.align?M+v+k:b==="0"?M+k+v:k+M+v)}return E}var h=Object.create(null);function m(g){if(h[g])return h[g];for(var p,v=g,y=[],x=0;v;){if((p=i.text.exec(v))!==null)y.push(p[0]);else if((p=i.modulo.exec(v))!==null)y.push("%");else{if((p=i.placeholder.exec(v))===null)throw new SyntaxError("[sprintf] unexpected placeholder");if(p[2]){x|=1;var w=[],k=p[2],b=[];if((b=i.key.exec(k))===null)throw new SyntaxError("[sprintf] failed to parse named argument key");for(w.push(b[1]);(k=k.substring(b[0].length))!=="";)if((b=i.key_access.exec(k))!==null)w.push(b[1]);else{if((b=i.index_access.exec(k))===null)throw new SyntaxError("[sprintf] failed to parse named argument key");w.push(b[1])}p[2]=w}else x|=2;if(x===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");y.push({placeholder:p[0],param_no:p[1],keys:p[2],sign:p[3],pad_char:p[4],align:p[5],width:p[6],precision:p[7],type:p[8]})}v=v.substring(p[0].length)}return h[g]=y}c!==void 0&&(c.sprintf=s,c.vsprintf=l),typeof window<"u"&&(window.sprintf=s,window.vsprintf=l)})()},{}],302:[function(a,u,c){u.exports=function(h,m){if(h.dimension<=0)return{positions:[],cells:[]};if(h.dimension===1)return function(v,y){for(var x=s(v,y),w=x.length,k=new Array(w),b=new Array(w),T=0;Tw|0},vertex:function(v,y,x,w,k,b,T,_,M,A,S,E,D){var O=(T<<0)+(_<<1)+(M<<2)+(A<<3)|0;if(O!==0&&O!==15)switch(O){case 0:S.push([v-.5,y-.5]);break;case 1:S.push([v-.25-.25*(w+x-2*D)/(x-w),y-.25-.25*(k+x-2*D)/(x-k)]);break;case 2:S.push([v-.75-.25*(-w-x+2*D)/(w-x),y-.25-.25*(b+w-2*D)/(w-b)]);break;case 3:S.push([v-.5,y-.5-.5*(k+x+b+w-4*D)/(x-k+w-b)]);break;case 4:S.push([v-.25-.25*(b+k-2*D)/(k-b),y-.75-.25*(-k-x+2*D)/(k-x)]);break;case 5:S.push([v-.5-.5*(w+x+b+k-4*D)/(x-w+k-b),y-.5]);break;case 6:S.push([v-.5-.25*(-w-x+b+k)/(w-x+k-b),y-.5-.25*(-k-x+b+w)/(k-x+w-b)]);break;case 7:S.push([v-.75-.25*(b+k-2*D)/(k-b),y-.75-.25*(b+w-2*D)/(w-b)]);break;case 8:S.push([v-.75-.25*(-b-k+2*D)/(b-k),y-.75-.25*(-b-w+2*D)/(b-w)]);break;case 9:S.push([v-.5-.25*(w+x+-b-k)/(x-w+b-k),y-.5-.25*(k+x+-b-w)/(x-k+b-w)]);break;case 10:S.push([v-.5-.5*(-w-x-b-k+4*D)/(w-x+b-k),y-.5]);break;case 11:S.push([v-.25-.25*(-b-k+2*D)/(b-k),y-.75-.25*(k+x-2*D)/(x-k)]);break;case 12:S.push([v-.5,y-.5-.5*(-k-x-b-w+4*D)/(k-x+b-w)]);break;case 13:S.push([v-.75-.25*(w+x-2*D)/(x-w),y-.25-.25*(-b-w+2*D)/(b-w)]);break;case 14:S.push([v-.25-.25*(-w-x+2*D)/(w-x),y-.25-.25*(-k-x+2*D)/(k-x)]);break;case 15:S.push([v-.5,y-.5])}},cell:function(v,y,x,w,k,b,T,_,M){k?_.push([v,y]):_.push([y,v])}});return function(v,y){var x=[],w=[];return p(v,x,w,y),{positions:x,cells:w}}}},d={}},{"ndarray-extract-contour":251,"zero-crossings":318}],303:[function(a,u,c){(function(i){(function(){u.exports=function h(m,g,p){p=p||{};var v=d[m];v||(v=d[m]={" ":{data:new Float32Array(0),shape:.2}});var y=v[g];if(!y)if(g.length<=1||!/\d/.test(g))y=v[g]=function(D){for(var O=D.cells,R=D.positions,z=new Float32Array(6*O.length),L=0,P=0,N=0;N0&&(b+=.02);var _=new Float32Array(k),M=0,A=-.5*b;for(T=0;TMath.max(T,_)?M[2]=1:T>Math.max(b,_)?M[0]=1:M[1]=1;for(var A=0,S=0,E=0;E<3;++E)A+=k[E]*k[E],S+=M[E]*k[E];for(E=0;E<3;++E)M[E]-=S/A*k[E];return h(M,M),M}function y(k,b,T,_,M,A,S,E){this.center=i(T),this.up=i(_),this.right=i(M),this.radius=i([A]),this.angle=i([S,E]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(k,b),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var D=0;D<16;++D)this.computedMatrix[D]=.5;this.recalcMatrix(0)}var x=y.prototype;x.setDistanceLimits=function(k,b){k=k>0?Math.log(k):-1/0,b=b>0?Math.log(b):1/0,b=Math.max(b,k),this.radius.bounds[0][0]=k,this.radius.bounds[1][0]=b},x.getDistanceLimits=function(k){var b=this.radius.bounds[0];return k?(k[0]=Math.exp(b[0][0]),k[1]=Math.exp(b[1][0]),k):[Math.exp(b[0][0]),Math.exp(b[1][0])]},x.recalcMatrix=function(k){this.center.curve(k),this.up.curve(k),this.right.curve(k),this.radius.curve(k),this.angle.curve(k);for(var b=this.computedUp,T=this.computedRight,_=0,M=0,A=0;A<3;++A)M+=b[A]*T[A],_+=b[A]*b[A];var S=Math.sqrt(_),E=0;for(A=0;A<3;++A)T[A]-=b[A]*M/_,E+=T[A]*T[A],b[A]/=S;var D=Math.sqrt(E);for(A=0;A<3;++A)T[A]/=D;var O=this.computedToward;d(O,b,T),h(O,O);var R=Math.exp(this.computedRadius[0]),z=this.computedAngle[0],L=this.computedAngle[1],P=Math.cos(z),N=Math.sin(z),B=Math.cos(L),G=Math.sin(L),W=this.computedCenter,K=P*B,te=N*B,Y=G,Z=-P*G,re=-N*G,U=B,q=this.computedEye,$=this.computedMatrix;for(A=0;A<3;++A){var ne=K*T[A]+te*O[A]+Y*b[A];$[4*A+1]=Z*T[A]+re*O[A]+U*b[A],$[4*A+2]=ne,$[4*A+3]=0}var H=$[1],Q=$[5],ee=$[9],ie=$[2],ae=$[6],ue=$[10],le=Q*ue-ee*ae,ge=ee*ie-H*ue,fe=H*ae-Q*ie,me=g(le,ge,fe);for(le/=me,ge/=me,fe/=me,$[0]=le,$[4]=ge,$[8]=fe,A=0;A<3;++A)q[A]=W[A]+$[2+4*A]*R;for(A=0;A<3;++A){E=0;for(var _e=0;_e<3;++_e)E+=$[A+4*_e]*q[_e];$[12+A]=-E}$[15]=1},x.getMatrix=function(k,b){this.recalcMatrix(k);var T=this.computedMatrix;if(b){for(var _=0;_<16;++_)b[_]=T[_];return b}return T};var w=[0,0,0];x.rotate=function(k,b,T,_){if(this.angle.move(k,b,T),_){this.recalcMatrix(k);var M=this.computedMatrix;w[0]=M[2],w[1]=M[6],w[2]=M[10];for(var A=this.computedUp,S=this.computedRight,E=this.computedToward,D=0;D<3;++D)M[4*D]=A[D],M[4*D+1]=S[D],M[4*D+2]=E[D];for(l(M,M,_,w),D=0;D<3;++D)A[D]=M[4*D],S[D]=M[4*D+1];this.up.set(k,A[0],A[1],A[2]),this.right.set(k,S[0],S[1],S[2])}},x.pan=function(k,b,T,_){b=b||0,T=T||0,_=_||0,this.recalcMatrix(k);var M=this.computedMatrix,A=(Math.exp(this.computedRadius[0]),M[1]),S=M[5],E=M[9],D=g(A,S,E);A/=D,S/=D,E/=D;var O=M[0],R=M[4],z=M[8],L=O*A+R*S+z*E,P=g(O-=A*L,R-=S*L,z-=E*L),N=(O/=P)*b+A*T,B=(R/=P)*b+S*T,G=(z/=P)*b+E*T;this.center.move(k,N,B,G);var W=Math.exp(this.computedRadius[0]);W=Math.max(1e-4,W+_),this.radius.set(k,Math.log(W))},x.translate=function(k,b,T,_){this.center.move(k,b||0,T||0,_||0)},x.setMatrix=function(k,b,T,_){var M=1;typeof T=="number"&&(M=0|T),(M<0||M>3)&&(M=1);var A=(M+2)%3;b||(this.recalcMatrix(k),b=this.computedMatrix);var S=b[M],E=b[M+4],D=b[M+8];if(_){var O=Math.abs(S),R=Math.abs(E),z=Math.abs(D),L=Math.max(O,R,z);O===L?(S=S<0?-1:1,E=D=0):z===L?(D=D<0?-1:1,S=E=0):(E=E<0?-1:1,S=D=0)}else{var P=g(S,E,D);S/=P,E/=P,D/=P}var N,B,G=b[A],W=b[A+4],K=b[A+8],te=G*S+W*E+K*D,Y=g(G-=S*te,W-=E*te,K-=D*te),Z=E*(K/=Y)-D*(W/=Y),re=D*(G/=Y)-S*K,U=S*W-E*G,q=g(Z,re,U);if(Z/=q,re/=q,U/=q,this.center.jump(k,de,ye,Me),this.radius.idle(k),this.up.jump(k,S,E,D),this.right.jump(k,G,W,K),M===2){var $=b[1],ne=b[5],H=b[9],Q=$*G+ne*W+H*K,ee=$*Z+ne*re+H*U;N=le<0?-Math.PI/2:Math.PI/2,B=Math.atan2(ee,Q)}else{var ie=b[2],ae=b[6],ue=b[10],le=ie*S+ae*E+ue*D,ge=ie*G+ae*W+ue*K,fe=ie*Z+ae*re+ue*U;N=Math.asin(p(le)),B=Math.atan2(fe,ge)}this.angle.jump(k,B,N),this.recalcMatrix(k);var me=b[2],_e=b[6],we=b[10],Te=this.computedMatrix;s(Te,b);var Oe=Te[15],de=Te[12]/Oe,ye=Te[13]/Oe,Me=Te[14]/Oe,ke=Math.exp(this.computedRadius[0]);this.center.jump(k,de-me*ke,ye-_e*ke,Me-we*ke)},x.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},x.idle=function(k){this.center.idle(k),this.up.idle(k),this.right.idle(k),this.radius.idle(k),this.angle.idle(k)},x.flush=function(k){this.center.flush(k),this.up.flush(k),this.right.flush(k),this.radius.flush(k),this.angle.flush(k)},x.setDistance=function(k,b){b>0&&this.radius.set(k,Math.log(b))},x.lookAt=function(k,b,T,_){this.recalcMatrix(k),b=b||this.computedEye,T=T||this.computedCenter;var M=(_=_||this.computedUp)[0],A=_[1],S=_[2],E=g(M,A,S);if(!(E<1e-6)){M/=E,A/=E,S/=E;var D=b[0]-T[0],O=b[1]-T[1],R=b[2]-T[2],z=g(D,O,R);if(!(z<1e-6)){D/=z,O/=z,R/=z;var L=this.computedRight,P=L[0],N=L[1],B=L[2],G=M*P+A*N+S*B,W=g(P-=G*M,N-=G*A,B-=G*S);if(!(W<.01&&(W=g(P=A*R-S*O,N=S*D-M*R,B=M*O-A*D))<1e-6)){P/=W,N/=W,B/=W,this.up.set(k,M,A,S),this.right.set(k,P,N,B),this.center.set(k,T[0],T[1],T[2]),this.radius.set(k,Math.log(z));var K=A*B-S*N,te=S*P-M*B,Y=M*N-A*P,Z=g(K,te,Y),re=M*D+A*O+S*R,U=P*D+N*O+B*R,q=(K/=Z)*D+(te/=Z)*O+(Y/=Z)*R,$=Math.asin(p(re)),ne=Math.atan2(q,U),H=this.angle._state,Q=H[H.length-1],ee=H[H.length-2];Q%=2*Math.PI;var ie=Math.abs(Q+2*Math.PI-ne),ae=Math.abs(Q-ne),ue=Math.abs(Q-2*Math.PI-ne);ie0?B.pop():new ArrayBuffer(P)}function k(P){return new Uint8Array(w(P),0,P)}function b(P){return new Uint16Array(w(2*P),0,P)}function T(P){return new Uint32Array(w(4*P),0,P)}function _(P){return new Int8Array(w(P),0,P)}function M(P){return new Int16Array(w(2*P),0,P)}function A(P){return new Int32Array(w(4*P),0,P)}function S(P){return new Float32Array(w(4*P),0,P)}function E(P){return new Float64Array(w(8*P),0,P)}function D(P){return h?new Uint8ClampedArray(w(P),0,P):k(P)}function O(P){return m?new BigUint64Array(w(8*P),0,P):null}function R(P){return g?new BigInt64Array(w(8*P),0,P):null}function z(P){return new DataView(w(P),0,P)}function L(P){P=s.nextPow2(P);var N=s.log2(P),B=y[N];return B.length>0?B.pop():new d(P)}c.free=function(P){if(d.isBuffer(P))y[s.log2(P.length)].push(P);else{if(Object.prototype.toString.call(P)!=="[object ArrayBuffer]"&&(P=P.buffer),!P)return;var N=P.length||P.byteLength,B=0|s.log2(N);v[B].push(P)}},c.freeUint8=c.freeUint16=c.freeUint32=c.freeBigUint64=c.freeInt8=c.freeInt16=c.freeInt32=c.freeBigInt64=c.freeFloat32=c.freeFloat=c.freeFloat64=c.freeDouble=c.freeUint8Clamped=c.freeDataView=function(P){x(P.buffer)},c.freeArrayBuffer=x,c.freeBuffer=function(P){y[s.log2(P.length)].push(P)},c.malloc=function(P,N){if(N===void 0||N==="arraybuffer")return w(P);switch(N){case"uint8":return k(P);case"uint16":return b(P);case"uint32":return T(P);case"int8":return _(P);case"int16":return M(P);case"int32":return A(P);case"float":case"float32":return S(P);case"double":case"float64":return E(P);case"uint8_clamped":return D(P);case"bigint64":return R(P);case"biguint64":return O(P);case"buffer":return L(P);case"data":case"dataview":return z(P);default:return null}return null},c.mallocArrayBuffer=w,c.mallocUint8=k,c.mallocUint16=b,c.mallocUint32=T,c.mallocInt8=_,c.mallocInt16=M,c.mallocInt32=A,c.mallocFloat32=c.mallocFloat=S,c.mallocFloat64=c.mallocDouble=E,c.mallocUint8Clamped=D,c.mallocBigUint64=O,c.mallocBigInt64=R,c.mallocDataView=z,c.mallocBuffer=L,c.clearCache=function(){for(var P=0;P<32;++P)p.UINT8[P].length=0,p.UINT16[P].length=0,p.UINT32[P].length=0,p.INT8[P].length=0,p.INT16[P].length=0,p.INT32[P].length=0,p.FLOAT[P].length=0,p.DOUBLE[P].length=0,p.BIGUINT64[P].length=0,p.BIGINT64[P].length=0,p.UINT8C[P].length=0,v[P].length=0,y[P].length=0}}).call(this)}).call(this,r!==void 0?r:typeof self<"u"?self:typeof window<"u"?window:{})},{"bit-twiddle":32,buffer:3,dup:65}],309:[function(a,u,c){function i(l){this.roots=new Array(l),this.ranks=new Array(l);for(var d=0;d0&&(T=b.size),b.lineSpacing&&b.lineSpacing>0&&(_=b.lineSpacing),b.styletags&&b.styletags.breaklines&&(M.breaklines=!!b.styletags.breaklines),b.styletags&&b.styletags.bolds&&(M.bolds=!!b.styletags.bolds),b.styletags&&b.styletags.italics&&(M.italics=!!b.styletags.italics),b.styletags&&b.styletags.subscripts&&(M.subscripts=!!b.styletags.subscripts),b.styletags&&b.styletags.superscripts&&(M.superscripts=!!b.styletags.superscripts)),k.font=[b.fontStyle,b.fontVariant,b.fontWeight,T+"px",b.font].filter(function(A){return A}).join(" "),k.textAlign="start",k.textBaseline="alphabetic",k.direction="ltr",y(function(A,S,E,D,O,R){E=E.replace(/\n/g,""),E=R.breaklines===!0?E.replace(/\/g,` +`):E.replace(/\/g," ");var z="",L=[];for(G=0;G-1?parseInt(_e[1+Oe]):0,Me=de>-1?parseInt(we[1+de]):0;ye!==Me&&(Te=Te.replace(ie(),"?px "),te*=Math.pow(.75,Me-ye),Te=Te.replace("?px ",ie())),K+=.25*re*(Me-ye)}if(R.superscripts===!0){var ke=_e.indexOf("+"),Ee=we.indexOf("+"),ze=ke>-1?parseInt(_e[1+ke]):0,Fe=Ee>-1?parseInt(we[1+Ee]):0;ze!==Fe&&(Te=Te.replace(ie(),"?px "),te*=Math.pow(.75,Fe-ze),Te=Te.replace("?px ",ie())),K-=.25*re*(Fe-ze)}if(R.bolds===!0){var Ve=_e.indexOf("b|")>-1,Ke=we.indexOf("b|")>-1;!Ve&&Ke&&(Te=Re?Te.replace("italic ","italic bold "):"bold "+Te),Ve&&!Ke&&(Te=Te.replace("bold ",""))}if(R.italics===!0){var Re=_e.indexOf("i|")>-1,qe=we.indexOf("i|")>-1;!Re&&qe&&(Te="italic "+Te),Re&&!qe&&(Te=Te.replace("italic ",""))}S.font=Te}for(B=0;B",_="",M=T.length,A=_.length,S=w[0]==="+"||w[0]==="-",E=0,D=-A;E>-1&&(E=k.indexOf(T,E))!==-1&&(D=k.indexOf(_,E+M))!==-1&&!(D<=E);){for(var O=E;O=D)b[O]=null,k=k.substr(0,O)+" "+k.substr(O+1);else if(b[O]!==null){var R=b[O].indexOf(w[0]);R===-1?b[O]+=w:S&&(b[O]=b[O].substr(0,R+1)+(1+parseInt(b[O][R+1]))+b[O].substr(R+2))}var z=E+M,L=k.substr(z,D-z).indexOf(T);E=L!==-1?L:D+A}return b}function p(x,w){var k=i(x,128);return w?l(k.cells,k.positions,.25):{edges:k.cells,positions:k.positions}}function v(x,w,k,b){var T=p(x,b),_=function(B,G,W){for(var K=G.textAlign||"start",te=G.textBaseline||"alphabetic",Y=[1<<30,1<<30],Z=[0,0],re=B.length,U=0;U"u"||!ses.ok||ses.ok()){typeof ses<"u"&&(ses.weakMapPermitHostObjects=T);var i=!1;if(typeof WeakMap=="function"){var s=WeakMap;if(!(typeof navigator<"u"&&/Firefox/.test(navigator.userAgent))){var l=new s,d=Object.freeze({});if(l.set(d,1),l.get(d)===1)return void(u.exports=WeakMap);i=!0}}var h=Object.getOwnPropertyNames,m=Object.defineProperty,g=Object.isExtensible,p="weakmap:ident:"+Math.random()+"___";if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var v=new ArrayBuffer(25),y=new Uint8Array(v);crypto.getRandomValues(y),p="weakmap:rand:"+Array.prototype.map.call(y,function(E){return(E%36).toString(36)}).join("")+"___"}if(m(Object,"getOwnPropertyNames",{value:function(E){return h(E).filter(_)}}),"getPropertyNames"in Object){var x=Object.getPropertyNames;m(Object,"getPropertyNames",{value:function(E){return x(E).filter(_)}})}(function(){var E=Object.freeze;m(Object,"freeze",{value:function(R){return M(R),E(R)}});var D=Object.seal;m(Object,"seal",{value:function(R){return M(R),D(R)}});var O=Object.preventExtensions;m(Object,"preventExtensions",{value:function(R){return M(R),O(R)}})})();var w=!1,k=0,b=function(){this instanceof b||S();var E=[],D=[],O=k++;return Object.create(b.prototype,{get___:{value:A(function(R,z){var L,P=M(R);return P?O in P?P[O]:z:(L=E.indexOf(R))>=0?D[L]:z})},has___:{value:A(function(R){var z=M(R);return z?O in z:E.indexOf(R)>=0})},set___:{value:A(function(R,z){var L,P=M(R);return P?P[O]=z:(L=E.indexOf(R))>=0?D[L]=z:(L=E.length,D[L]=z,E[L]=R),this})},delete___:{value:A(function(R){var z,L,P=M(R);return P?O in P&&delete P[O]:!((z=E.indexOf(R))<0)&&(L=E.length-1,E[z]=void 0,D[z]=D[L],E[z]=E[L],E.length=L,D.length=L,!0)})}})};b.prototype=Object.create(Object.prototype,{get:{value:function(E,D){return this.get___(E,D)},writable:!0,configurable:!0},has:{value:function(E){return this.has___(E)},writable:!0,configurable:!0},set:{value:function(E,D){return this.set___(E,D)},writable:!0,configurable:!0},delete:{value:function(E){return this.delete___(E)},writable:!0,configurable:!0}}),typeof s=="function"?function(){function E(){this instanceof b||S();var D,O=new s,R=void 0,z=!1;return D=i?function(L,P){return O.set(L,P),O.has(L)||(R||(R=new b),R.set(L,P)),this}:function(L,P){if(z)try{O.set(L,P)}catch{R||(R=new b),R.set___(L,P)}else O.set(L,P);return this},Object.create(b.prototype,{get___:{value:A(function(L,P){return R?O.has(L)?O.get(L):R.get___(L,P):O.get(L,P)})},has___:{value:A(function(L){return O.has(L)||!!R&&R.has___(L)})},set___:{value:A(D)},delete___:{value:A(function(L){var P=!!O.delete(L);return R&&R.delete___(L)||P})},permitHostObjects___:{value:A(function(L){if(L!==T)throw new Error("bogus call to permitHostObjects___");z=!0})}})}i&&typeof Proxy<"u"&&(Proxy=void 0),E.prototype=b.prototype,u.exports=E,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy<"u"&&(Proxy=void 0),u.exports=b)}function T(E){E.permitHostObjects___&&E.permitHostObjects___(T)}function _(E){return!(E.substr(0,8)=="weakmap:"&&E.substr(E.length-3)==="___")}function M(E){if(E!==Object(E))throw new TypeError("Not an object: "+E);var D=E[p];if(D&&D.key===E)return D;if(g(E)){D={key:E};try{return m(E,p,{value:D,writable:!1,enumerable:!1,configurable:!1}),D}catch{return}}}function A(E){return E.prototype=null,Object.freeze(E)}function S(){w||typeof console>"u"||(w=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}})()},{}],314:[function(a,u,c){var i=a("./hidden-store.js");u.exports=function(){var s={};return function(l){if((typeof l!="object"||l===null)&&typeof l!="function")throw new Error("Weakmap-shim: Key must be object");var d=l.valueOf(s);return d&&d.identity===s?d:i(l,s)}}},{"./hidden-store.js":315}],315:[function(a,u,c){u.exports=function(i,s){var l={identity:s},d=i.valueOf;return Object.defineProperty(i,"valueOf",{value:function(h){return h!==s?d.apply(this,arguments):l},writable:!0}),l}},{}],316:[function(a,u,c){var i=a("./create-store.js");u.exports=function(){var s=i();return{get:function(l,d){var h=s(l);return h.hasOwnProperty("value")?h.value:d},set:function(l,d){return s(l).value=d,this},has:function(l){return"value"in s(l)},delete:function(l){return delete s(l).value}}}},{"./create-store.js":314}],317:[function(a,u,c){var i,s=function(){return function(l,d,h,m,g,p){var v=l[0],y=h[0],x=[0],w=y;m|=0;var k=0,b=y;for(k=0;k=0!=_>=0&&g.push(x[0]+.5+.5*(T+_)/(T-_)),m+=b,++x[0]}}};u.exports=(i={funcName:"zeroCrossings"},function(l){var d={};return function(h,m,g){var p=h.dtype,v=h.order,y=[p,v.join()].join(),x=d[y];return x||(d[y]=x=l([p,v])),x(h.shape.slice(0),h.data,h.stride,0|h.offset,m,g)}}(s.bind(void 0,i)))},{}],318:[function(a,u,c){u.exports=function(s,l){var d=[];return l=+l||0,i(s.hi(s.shape[0]-1),d,l),d};var i=a("./lib/zc-core")},{"./lib/zc-core":317}]},{},[6])(6)})}).call(this)}).call(this,typeof Ro<"u"?Ro:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[27])(27)})})(qD);var dW=NG(qD.exports);/*! + * https://github.com/Starcounter-Jack/JSON-Patch + * (c) 2017-2022 Joachim Wester + * MIT licensed + */var pW=globalThis&&globalThis.__extends||function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,f){o.__proto__=f}||function(o,f){for(var r in f)f.hasOwnProperty(r)&&(o[r]=f[r])},t(n,e)};return function(n,e){t(n,e);function o(){this.constructor=n}n.prototype=e===null?Object.create(e):(o.prototype=e.prototype,new o)}}(),gW=Object.prototype.hasOwnProperty;function tk(t,n){return gW.call(t,n)}function nk(t){if(Array.isArray(t)){for(var n=new Array(t.length),e=0;e=48&&o<=57){n++;continue}return!1}return!0}function Zp(t){return t.indexOf("/")===-1&&t.indexOf("~")===-1?t:t.replace(/~/g,"~0").replace(/\//g,"~1")}function HD(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}function ik(t){if(t===void 0)return!0;if(t){if(Array.isArray(t)){for(var n=0,e=t.length;n0&&c[s-1]=="constructor"))throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(e&&d===void 0&&(i[h]===void 0?d=c.slice(0,s).join("/"):s==l-1&&(d=n.path),d!==void 0&&m(n,0,t,d)),s++,Array.isArray(i)){if(h==="-")h=i.length;else{if(e&&!rk(h))throw new vs("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",r,n,t);rk(h)&&(h=~~h)}if(s>=l){if(e&&n.op==="add"&&h>i.length)throw new vs("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",r,n,t);var a=vW[n.op].call(n,i,h,t);if(a.test===!1)throw new vs("Test operation failed","TEST_OPERATION_FAILED",r,n,t);return a}}else if(s>=l){var a=Gg[n.op].call(n,i,h,t);if(a.test===!1)throw new vs("Test operation failed","TEST_OPERATION_FAILED",r,n,t);return a}if(i=i[h],e&&s0)throw new vs('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",n,t,e);if((t.op==="move"||t.op==="copy")&&typeof t.from!="string")throw new vs("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",n,t,e);if((t.op==="add"||t.op==="replace"||t.op==="test")&&t.value===void 0)throw new vs("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",n,t,e);if((t.op==="add"||t.op==="replace"||t.op==="test")&&ik(t.value))throw new vs("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",n,t,e);if(e){if(t.op=="add"){var f=t.path.split("/").length,r=o.split("/").length;if(f!==r+1&&f!==r)throw new vs("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",n,t,e)}else if(t.op==="replace"||t.op==="remove"||t.op==="_get"){if(t.path!==o)throw new vs("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",n,t,e)}else if(t.op==="move"||t.op==="copy"){var a={op:"_get",path:t.from,value:void 0},u=GD([a],e);if(u&&u.name==="OPERATION_PATH_UNRESOLVABLE")throw new vs("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",n,t,e)}}}else throw new vs("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",n,t,e)}function GD(t,n,e){try{if(!Array.isArray(t))throw new vs("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(n)Y2(Zu(n),Zu(t),e||!0);else{e=e||h_;for(var o=0;o0&&(t.patches=[],t.callback&&t.callback(o)),o}function _A(t,n,e,o,f){if(n!==t){typeof n.toJSON=="function"&&(n=n.toJSON());for(var r=nk(n),a=nk(t),u=!1,c=a.length-1;c>=0;c--){var i=a[c],s=t[i];if(tk(n,i)&&!(n[i]===void 0&&s!==void 0&&Array.isArray(n)===!1)){var l=n[i];typeof s=="object"&&s!=null&&typeof l=="object"&&l!=null&&Array.isArray(s)===Array.isArray(l)?_A(s,l,e,o+"/"+Zp(i),f):s!==l&&(f&&e.push({op:"test",path:o+"/"+Zp(i),value:Zu(s)}),e.push({op:"replace",path:o+"/"+Zp(i),value:Zu(l)}))}else Array.isArray(t)===Array.isArray(n)?(f&&e.push({op:"test",path:o+"/"+Zp(i),value:Zu(s)}),e.push({op:"remove",path:o+"/"+Zp(i)}),u=!0):(f&&e.push({op:"test",path:o,value:t}),e.push({op:"replace",path:o,value:n}))}if(!(!u&&r.length==a.length))for(var c=0;c0)return[x,o+d.join(`, +`+v),s].join(` +`+c)}return w}(n,"",0)};function Nu(t,n,e){return t.fields=n||[],t.fname=e,t}function xs(t){return t==null?null:t.fname}function Bl(t){return t==null?null:t.fields}function WD(t){return t.length===1?OW(t[0]):LW(t)}const OW=t=>function(n){return n[t]},LW=t=>{const n=t.length;return function(e){for(let o=0;oa?i():a=u+1:c==="["?(u>a&&i(),f=a=u+1):c==="]"&&(f||Pr("Access path missing open bracket: "+t),f>0&&i(),f=0,a=u+1)}return f&&Pr("Access path missing closing bracket: "+t),o&&Pr("Access path missing closing quote: "+t),u>a&&(u++,i()),n}function Lu(t,n,e){const o=ih(t);return t=o.length===1?o[0]:t,Nu((e&&e.get||WD)(o),[t],n||t)}const Ty=Lu("id"),Hl=Nu(t=>t,[],"identity"),Md=Nu(()=>0,[],"zero"),Um=Nu(()=>1,[],"one"),mc=Nu(()=>!0,[],"true"),yd=Nu(()=>!1,[],"false");function PW(t,n,e){const o=[n].concat([].slice.call(e));console[t].apply(console,o)}const YD=0,wA=1,kA=2,XD=3,ZD=4;function TA(t,n,e=PW){let o=t||YD;return{level(f){return arguments.length?(o=+f,this):o},error(){return o>=wA&&e(n||"error","ERROR",arguments),this},warn(){return o>=kA&&e(n||"warn","WARN",arguments),this},info(){return o>=XD&&e(n||"log","INFO",arguments),this},debug(){return o>=ZD&&e(n||"log","DEBUG",arguments),this}}}var Ir=Array.isArray;function Ei(t){return t===Object(t)}const MC=t=>t!=="__proto__";function Vm(...t){return t.reduce((n,e)=>{for(const o in e)if(o==="signals")n.signals=DW(n.signals,e.signals);else{const f=o==="legend"?{layout:1}:o==="style"?!0:null;qm(n,o,e[o],f)}return n},{})}function qm(t,n,e,o){if(!MC(n))return;let f,r;if(Ei(e)&&!Ir(e)){r=Ei(t[n])?t[n]:t[n]={};for(f in e)o&&(o===!0||o[f])?qm(r,f,e[f]):MC(f)&&(r[f]=e[f])}else t[n]=e}function DW(t,n){if(t==null)return n;const e={},o=[];function f(r){e[r.name]||(e[r.name]=1,o.push(r))}return n.forEach(f),t.forEach(f),o}function Na(t){return t[t.length-1]}function Rl(t){return t==null||t===""?null:+t}const JD=t=>n=>t*Math.exp(n),KD=t=>n=>Math.log(t*n),QD=t=>n=>Math.sign(n)*Math.log1p(Math.abs(n/t)),eI=t=>n=>Math.sign(n)*Math.expm1(Math.abs(n))*t,d_=t=>n=>n<0?-Math.pow(-n,t):Math.pow(n,t);function X2(t,n,e,o){const f=e(t[0]),r=e(Na(t)),a=(r-f)*n;return[o(f-a),o(r-a)]}function tI(t,n){return X2(t,n,Rl,Hl)}function nI(t,n){var e=Math.sign(t[0]);return X2(t,n,KD(e),JD(e))}function rI(t,n,e){return X2(t,n,d_(e),d_(1/e))}function iI(t,n,e){return X2(t,n,QD(e),eI(e))}function Z2(t,n,e,o,f){const r=o(t[0]),a=o(Na(t)),u=n!=null?o(n):(r+a)/2;return[f(u+(r-u)*e),f(u+(a-u)*e)]}function AA(t,n,e){return Z2(t,n,e,Rl,Hl)}function MA(t,n,e){const o=Math.sign(t[0]);return Z2(t,n,e,KD(o),JD(o))}function p_(t,n,e,o){return Z2(t,n,e,d_(o),d_(1/o))}function SA(t,n,e,o){return Z2(t,n,e,QD(o),eI(o))}function aI(t){return 1+~~(new Date(t).getMonth()/3)}function oI(t){return 1+~~(new Date(t).getUTCMonth()/3)}function ki(t){return t!=null?Ir(t)?t:[t]:[]}function sI(t,n,e){let o=t[0],f=t[1],r;return f=e-n?[n,e]:[o=Math.min(Math.max(o,n),e-r),o+r]}function ga(t){return typeof t=="function"}const IW="descending";function EA(t,n,e){e=e||{},n=ki(n)||[];const o=[],f=[],r={},a=e.comparator||zW;return ki(t).forEach((u,c)=>{u!=null&&(o.push(n[c]===IW?-1:1),f.push(u=ga(u)?u:Lu(u,null,e)),(Bl(u)||[]).forEach(i=>r[i]=1))}),f.length===0?null:Nu(a(f,o),Object.keys(r))}const J2=(t,n)=>(tn||n==null)&&t!=null?1:(n=n instanceof Date?+n:n,(t=t instanceof Date?+t:t)!==t&&n===n?-1:n!==n&&t===t?1:0),zW=(t,n)=>t.length===1?RW(t[0],n[0]):FW(t,n,t.length),RW=(t,n)=>function(e,o){return J2(t(e),t(o))*n},FW=(t,n,e)=>(n.push(0),function(o,f){let r,a=0,u=-1;for(;a===0&&++ut}function CA(t,n){let e;return o=>{e&&clearTimeout(e),e=setTimeout(()=>(n(o),e=null),t)}}function pa(t){for(let n,e,o=1,f=arguments.length;oa&&(a=f))}else{for(f=n(t[e]);ea&&(a=f))}return[r,a]}function lI(t,n){const e=t.length;let o=-1,f,r,a,u,c;if(n==null){for(;++o=r){f=a=r;break}if(o===e)return[-1,-1];for(u=c=o;++or&&(f=r,u=o),a=r){f=a=r;break}if(o===e)return[-1,-1];for(u=c=o;++or&&(f=r,u=o),a{f.set(r,t[r])}),f}function uI(t,n,e,o,f,r){if(!e&&e!==0)return r;const a=+e;let u=t[0],c=Na(t),i;cr&&(a=f,f=r,r=a),e=e===void 0||e,o=o===void 0||o,(e?f<=t:fu.replace(/\\(.)/g,"$1")):ki(t));const o=t&&t.length,f=e&&e.get||WD,r=u=>f(n?[u]:ih(u));let a;if(!o)a=function(){return""};else if(o===1){const u=r(t[0]);a=function(c){return""+u(c)}}else{const u=t.map(r);a=function(c){let i=""+u[0](c),s=0;for(;++s{n={},e={},o=0},r=(a,u)=>(++o>t&&(e=n,n={},o=1),n[a]=u);return f(),{clear:f,has:a=>qi(n,a)||qi(e,a),get:a=>qi(n,a)?n[a]:qi(e,a)?r(a,e[a]):void 0,set:(a,u)=>qi(n,a)?n[a]=u:r(a,u)}}function pI(t,n,e,o){const f=n.length,r=e.length;if(!r)return n;if(!f)return e;const a=o||new n.constructor(f+r);let u=0,c=0,i=0;for(;u0?e[c++]:n[u++];for(;u=0;)e+=t;return e}function gI(t,n,e,o){const f=e||" ",r=t+"",a=n-r.length;return a<=0?r:o==="left"?iv(f,a)+r:o==="center"?iv(f,~~(a/2))+r+iv(f,Math.ceil(a/2)):r+iv(f,a)}function Ay(t){return t&&Na(t)-t[0]||0}function oi(t){return Ir(t)?"["+t.map(oi)+"]":Ei(t)||bi(t)?JSON.stringify(t).replace("\u2028","\\u2028").replace("\u2029","\\u2029"):t}function LA(t){return t==null||t===""?null:!t||t==="false"||t==="0"?!1:!!t}const jW=t=>wo(t)||Nd(t)?t:Date.parse(t);function PA(t,n){return n=n||jW,t==null||t===""?null:n(t)}function DA(t){return t==null||t===""?null:t+""}function ff(t){const n={},e=t.length;for(let o=0;o1)o=YW(t,n,e);else for(f=0,o=new Array(r=t.arcs.length);f=a&&(o=a-f,f+=o/++e,r+=o*(a-f));else{let a=-1;for(let u of t)(u=n(u,++a,t))!=null&&(u=+u)>=u&&(o=u-f,f+=o/++e,r+=o*(u-f))}if(e>1)return r/(e-1)}function ZW(t,n){const e=XW(t,n);return e&&Math.sqrt(e)}class fu{constructor(){this._partials=new Float64Array(32),this._n=0}add(n){const e=this._partials;let o=0;for(let f=0;f0){for(a=n[--e];e>0&&(o=a,f=n[--e],a=o+f,r=f-(a-o),!r););e>0&&(r<0&&n[e-1]<0||r>0&&n[e-1]>0)&&(f=r*2,o=a+f,f==o-a&&(a=o))}return a}}class EC extends Map{constructor(n,e=bI){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),n!=null)for(const[o,f]of n)this.set(o,f)}get(n){return super.get(ok(this,n))}has(n){return super.has(ok(this,n))}set(n,e){return super.set(yI(this,n),e)}delete(n){return super.delete(xI(this,n))}}class g_ extends Set{constructor(n,e=bI){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),n!=null)for(const o of n)this.add(o)}has(n){return super.has(ok(this,n))}add(n){return super.add(yI(this,n))}delete(n){return super.delete(xI(this,n))}}function ok({_intern:t,_key:n},e){const o=n(e);return t.has(o)?t.get(o):e}function yI({_intern:t,_key:n},e){const o=n(e);return t.has(o)?t.get(o):(t.set(o,e),e)}function xI({_intern:t,_key:n},e){const o=n(e);return t.has(o)&&(e=t.get(o),t.delete(o)),e}function bI(t){return t!==null&&typeof t=="object"?t.valueOf():t}function JW(t,n){return Array.from(n,e=>t[e])}function KW(t=Vv){if(t===Vv)return _I;if(typeof t!="function")throw new TypeError("compare is not a function");return(n,e)=>{const o=t(n,e);return o||o===0?o:(t(e,e)===0)-(t(n,n)===0)}}function _I(t,n){return(t==null||!(t>=t))-(n==null||!(n>=n))||(tn?1:0)}function d0(t,n){let e;if(n===void 0)for(const o of t)o!=null&&(e=o)&&(e=o);else{let o=-1;for(let f of t)(f=n(f,++o,t))!=null&&(e=f)&&(e=f)}return e}function sk(t,n){let e;if(n===void 0)for(const o of t)o!=null&&(e>o||e===void 0&&o>=o)&&(e=o);else{let o=-1;for(let f of t)(f=n(f,++o,t))!=null&&(e>f||e===void 0&&f>=f)&&(e=f)}return e}function wI(t,n,e=0,o=t.length-1,f){for(f=f===void 0?_I:KW(f);o>e;){if(o-e>600){const c=o-e+1,i=n-e+1,s=Math.log(c),l=.5*Math.exp(2*s/3),d=.5*Math.sqrt(s*l*(c-l)/c)*(i-c/2<0?-1:1),h=Math.max(e,Math.floor(n-i*l/c+d)),m=Math.min(o,Math.floor(n+(c-i)*l/c+d));wI(t,n,h,m,f)}const r=t[n];let a=e,u=o;for(D1(t,e,n),f(t[o],r)>0&&D1(t,e,o);a0;)--u}f(t[e],r)===0?D1(t,e,u):(++u,D1(t,u,o)),u<=n&&(e=u+1),n<=u&&(o=u-1)}return t}function D1(t,n,e){const o=t[n];t[n]=t[e],t[e]=o}function lk(t,n,e){if(t=Float64Array.from(UG(t,e)),!!(o=t.length)){if((n=+n)<=0||o<2)return sk(t);if(n>=1)return d0(t);var o,f=(o-1)*n,r=Math.floor(f),a=d0(wI(t,r).subarray(0,r+1)),u=sk(t.subarray(r+1));return a+(u-a)*(f-r)}}function kI(t,n,e=jG){if(!!(o=t.length)){if((n=+n)<=0||o<2)return+e(t[0],0,t);if(n>=1)return+e(t[o-1],o-1,t);var o,f=(o-1)*n,r=Math.floor(f),a=+e(t[r],r,t),u=+e(t[r+1],r+1,t);return a+(u-a)*(f-r)}}function QW(t,n){let e=0,o=0;if(n===void 0)for(let f of t)f!=null&&(f=+f)>=f&&(++e,o+=f);else{let f=-1;for(let r of t)(r=n(r,++f,t))!=null&&(r=+r)>=r&&(++e,o+=r)}if(e)return o/e}function TI(t,n){return lk(t,.5,n)}function*eY(t){for(const n of t)yield*n}function AI(t){return Array.from(eY(t))}function Ju(t,n,e){t=+t,n=+n,e=(f=arguments.length)<2?(n=t,t=0,1):f<3?1:+e;for(var o=-1,f=Math.max(0,Math.ceil((n-t)/e))|0,r=new Array(f);++o0))return c;do c.push(i=new Date(+r)),n(r,u),t(r);while(i=a)for(;t(a),!r(a);)a.setTime(a-1)},function(a,u){if(a>=a)if(u<0)for(;++u<=0;)for(;n(a,-1),!r(a););else for(;--u>=0;)for(;n(a,1),!r(a););})},e&&(f.count=function(r,a){return E5.setTime(+r),C5.setTime(+a),t(E5),t(C5),Math.floor(e(E5,C5))},f.every=function(r){return r=Math.floor(r),!isFinite(r)||!(r>0)?null:r>1?f.filter(o?function(a){return o(a)%r===0}:function(a){return f.count(0,a)%r===0}):f}),f}var uk=ul(function(){},function(t,n){t.setTime(+t+n)},function(t,n){return n-t});uk.every=function(t){return t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?ul(function(n){n.setTime(Math.floor(n/t)*t)},function(n,e){n.setTime(+n+e*t)},function(n,e){return(e-n)/t}):uk};var IA=uk;const Ih=1e3,cc=Ih*60,zh=cc*60,_0=zh*24,zA=_0*7,CC=_0*30,O5=_0*365;var iY=ul(function(t){t.setTime(t-t.getMilliseconds())},function(t,n){t.setTime(+t+n*Ih)},function(t,n){return(n-t)/Ih},function(t){return t.getUTCSeconds()}),Cd=iY,aY=ul(function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*Ih)},function(t,n){t.setTime(+t+n*cc)},function(t,n){return(n-t)/cc},function(t){return t.getMinutes()}),RA=aY,oY=ul(function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*Ih-t.getMinutes()*cc)},function(t,n){t.setTime(+t+n*zh)},function(t,n){return(n-t)/zh},function(t){return t.getHours()}),FA=oY,sY=ul(t=>t.setHours(0,0,0,0),(t,n)=>t.setDate(t.getDate()+n),(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*cc)/_0,t=>t.getDate()-1),Bd=sY;function V0(t){return ul(function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)},function(n,e){n.setDate(n.getDate()+e*7)},function(n,e){return(e-n-(e.getTimezoneOffset()-n.getTimezoneOffset())*cc)/zA})}var My=V0(0),ck=V0(1);V0(2);V0(3);var Hv=V0(4);V0(5);V0(6);var lY=ul(function(t){t.setDate(1),t.setHours(0,0,0,0)},function(t,n){t.setMonth(t.getMonth()+n)},function(t,n){return n.getMonth()-t.getMonth()+(n.getFullYear()-t.getFullYear())*12},function(t){return t.getMonth()}),m_=lY,SI=ul(function(t){t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n)},function(t,n){return n.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()});SI.every=function(t){return!isFinite(t=Math.floor(t))||!(t>0)?null:ul(function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)},function(n,e){n.setFullYear(n.getFullYear()+e*t)})};var Wd=SI,uY=ul(function(t){t.setUTCSeconds(0,0)},function(t,n){t.setTime(+t+n*cc)},function(t,n){return(n-t)/cc},function(t){return t.getUTCMinutes()}),NA=uY,cY=ul(function(t){t.setUTCMinutes(0,0,0)},function(t,n){t.setTime(+t+n*zh)},function(t,n){return(n-t)/zh},function(t){return t.getUTCHours()}),BA=cY,fY=ul(function(t){t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+n)},function(t,n){return(n-t)/_0},function(t){return t.getUTCDate()-1}),jd=fY;function q0(t){return ul(function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)},function(n,e){n.setUTCDate(n.getUTCDate()+e*7)},function(n,e){return(e-n)/zA})}var Sy=q0(0),fk=q0(1);q0(2);q0(3);var $v=q0(4);q0(5);q0(6);var hY=ul(function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCMonth(t.getUTCMonth()+n)},function(t,n){return n.getUTCMonth()-t.getUTCMonth()+(n.getUTCFullYear()-t.getUTCFullYear())*12},function(t){return t.getUTCMonth()}),v_=hY,EI=ul(function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n)},function(t,n){return n.getUTCFullYear()-t.getUTCFullYear()},function(t){return t.getUTCFullYear()});EI.every=function(t){return!isFinite(t=Math.floor(t))||!(t>0)?null:ul(function(n){n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)},function(n,e){n.setUTCFullYear(n.getUTCFullYear()+e*t)})};var Yd=EI;function CI(t,n,e,o,f,r){const a=[[Cd,1,Ih],[Cd,5,5*Ih],[Cd,15,15*Ih],[Cd,30,30*Ih],[r,1,cc],[r,5,5*cc],[r,15,15*cc],[r,30,30*cc],[f,1,zh],[f,3,3*zh],[f,6,6*zh],[f,12,12*zh],[o,1,_0],[o,2,2*_0],[e,1,zA],[n,1,CC],[n,3,3*CC],[t,1,O5]];function u(i,s,l){const d=sp).right(a,d);if(h===a.length)return t.every(b0(i/O5,s/O5,l));if(h===0)return IA.every(Math.max(b0(i,s,l),1));const[m,g]=a[d/a[h-1][2](t[n]=1+e,t),{});function UA(t){const n=ki(t).slice(),e={};return n.length||Pr("Missing time unit."),n.forEach(f=>{qi(L5,f)?e[f]=1:Pr("Invalid time unit: ".concat(f,"."))}),(e[Gs]||e[Il]?1:0)+(e[Pu]||e[jl]||e[Du]?1:0)+(e[Jf]?1:0)>1&&Pr("Incompatible time units: ".concat(t)),n.sort((f,r)=>L5[f]-L5[r]),n}const vY={[wl]:"%Y ",[Pu]:"Q%q ",[jl]:"%b ",[Du]:"%d ",[Gs]:"W%U ",[Il]:"%a ",[Jf]:"%j ",[Qu]:"%H:00",[ec]:"00:%M",[vc]:":%S",[hf]:".%L",["".concat(wl,"-").concat(jl)]:"%Y-%m ",["".concat(wl,"-").concat(jl,"-").concat(Du)]:"%Y-%m-%d ",["".concat(Qu,"-").concat(ec)]:"%H:%M"};function OI(t,n){const e=pa({},vY,n),o=UA(t),f=o.length;let r="",a=0,u,c;for(a=0;aa;--u)if(c=o.slice(a,u).join("-"),e[c]!=null){r+=e[c],a=u;break}return r.trim()}const Kp=new Date;function VA(t){return Kp.setFullYear(t),Kp.setMonth(0),Kp.setDate(1),Kp.setHours(0,0,0,0),Kp}function LI(t){return DI(new Date(t))}function PI(t){return hk(new Date(t))}function DI(t){return Bd.count(VA(t.getFullYear())-1,t)}function hk(t){return My.count(VA(t.getFullYear())-1,t)}function dk(t){return VA(t).getDay()}function yY(t,n,e,o,f,r,a){if(0<=t&&t<100){const u=new Date(-1,n,e,o,f,r,a);return u.setFullYear(t),u}return new Date(t,n,e,o,f,r,a)}function II(t){return RI(new Date(t))}function zI(t){return pk(new Date(t))}function RI(t){const n=Date.UTC(t.getUTCFullYear(),0,1);return jd.count(n-1,t)}function pk(t){const n=Date.UTC(t.getUTCFullYear(),0,1);return Sy.count(n-1,t)}function gk(t){return Kp.setTime(Date.UTC(t,0,1)),Kp.getUTCDay()}function xY(t,n,e,o,f,r,a){if(0<=t&&t<100){const u=new Date(Date.UTC(-1,n,e,o,f,r,a));return u.setUTCFullYear(e.y),u}return new Date(Date.UTC(t,n,e,o,f,r,a))}function FI(t,n,e,o,f){const r=n||1,a=Na(t),u=(v,y,x)=>(x=x||v,bY(e[x],o[x],v===a&&r,y)),c=new Date,i=ff(t),s=i[wl]?u(wl):$l(2012),l=i[jl]?u(jl):i[Pu]?u(Pu):Md,d=i[Gs]&&i[Il]?u(Il,1,Gs+Il):i[Gs]?u(Gs,1):i[Il]?u(Il,1):i[Du]?u(Du,1):i[Jf]?u(Jf,1):Um,h=i[Qu]?u(Qu):Md,m=i[ec]?u(ec):Md,g=i[vc]?u(vc):Md,p=i[hf]?u(hf):Md;return function(v){c.setTime(+v);const y=s(c);return f(y,l(c),d(c,y),h(c),m(c),g(c),p(c))}}function bY(t,n,e,o){const f=e<=1?t:o?(r,a)=>o+e*Math.floor((t(r,a)-o)/e):(r,a)=>e*Math.floor(t(r,a)/e);return n?(r,a)=>n(f(r,a),a):f}function um(t,n,e){return n+t*7-(e+6)%7}const _Y={[wl]:t=>t.getFullYear(),[Pu]:t=>Math.floor(t.getMonth()/3),[jl]:t=>t.getMonth(),[Du]:t=>t.getDate(),[Qu]:t=>t.getHours(),[ec]:t=>t.getMinutes(),[vc]:t=>t.getSeconds(),[hf]:t=>t.getMilliseconds(),[Jf]:t=>DI(t),[Gs]:t=>hk(t),[Gs+Il]:(t,n)=>um(hk(t),t.getDay(),dk(n)),[Il]:(t,n)=>um(1,t.getDay(),dk(n))},wY={[Pu]:t=>3*t,[Gs]:(t,n)=>um(t,0,dk(n))};function NI(t,n){return FI(t,n||1,_Y,wY,yY)}const kY={[wl]:t=>t.getUTCFullYear(),[Pu]:t=>Math.floor(t.getUTCMonth()/3),[jl]:t=>t.getUTCMonth(),[Du]:t=>t.getUTCDate(),[Qu]:t=>t.getUTCHours(),[ec]:t=>t.getUTCMinutes(),[vc]:t=>t.getUTCSeconds(),[hf]:t=>t.getUTCMilliseconds(),[Jf]:t=>RI(t),[Gs]:t=>pk(t),[Il]:(t,n)=>um(1,t.getUTCDay(),gk(n)),[Gs+Il]:(t,n)=>um(pk(t),t.getUTCDay(),gk(n))},TY={[Pu]:t=>3*t,[Gs]:(t,n)=>um(t,0,gk(n))};function BI(t,n){return FI(t,n||1,kY,TY,xY)}const AY={[wl]:Wd,[Pu]:m_.every(3),[jl]:m_,[Gs]:My,[Du]:Bd,[Il]:Bd,[Jf]:Bd,[Qu]:FA,[ec]:RA,[vc]:Cd,[hf]:IA},MY={[wl]:Yd,[Pu]:v_.every(3),[jl]:v_,[Gs]:Sy,[Du]:jd,[Il]:jd,[Jf]:jd,[Qu]:BA,[ec]:NA,[vc]:Cd,[hf]:IA};function $m(t){return AY[t]}function Gm(t){return MY[t]}function jI(t,n,e){return t?t.offset(n,e):void 0}function UI(t,n,e){return jI($m(t),n,e)}function VI(t,n,e){return jI(Gm(t),n,e)}function qI(t,n,e,o){return t?t.range(n,e,o):void 0}function HI(t,n,e,o){return qI($m(t),n,e,o)}function $I(t,n,e,o){return qI(Gm(t),n,e,o)}const av=1e3,ov=av*60,sv=ov*60,K2=sv*24,SY=K2*7,OC=K2*30,mk=K2*365,GI=[wl,jl,Du,Qu,ec,vc,hf],lv=GI.slice(0,-1),uv=lv.slice(0,-1),cv=uv.slice(0,-1),EY=cv.slice(0,-1),CY=[wl,Gs],LC=[wl,jl],WI=[wl],I1=[[lv,1,av],[lv,5,5*av],[lv,15,15*av],[lv,30,30*av],[uv,1,ov],[uv,5,5*ov],[uv,15,15*ov],[uv,30,30*ov],[cv,1,sv],[cv,3,3*sv],[cv,6,6*sv],[cv,12,12*sv],[EY,1,K2],[CY,1,SY],[LC,1,OC],[LC,3,3*OC],[WI,1,mk]];function YI(t){const n=t.extent,e=t.maxbins||40,o=Math.abs(Ay(n))/e;let f=V2(u=>u[2]).right(I1,o),r,a;return f===I1.length?(r=WI,a=b0(n[0]/mk,n[1]/mk,e)):f?(f=I1[o/I1[f-1][2]53)return null;"w"in H||(H.w=1),"Z"in H?(ee=D5(z1(H.y,0,1)),ie=ee.getUTCDay(),ee=ie>4||ie===0?fk.ceil(ee):fk(ee),ee=jd.offset(ee,(H.V-1)*7),H.y=ee.getUTCFullYear(),H.m=ee.getUTCMonth(),H.d=ee.getUTCDate()+(H.w+6)%7):(ee=P5(z1(H.y,0,1)),ie=ee.getDay(),ee=ie>4||ie===0?ck.ceil(ee):ck(ee),ee=Bd.offset(ee,(H.V-1)*7),H.y=ee.getFullYear(),H.m=ee.getMonth(),H.d=ee.getDate()+(H.w+6)%7)}else("W"in H||"U"in H)&&("w"in H||(H.w="u"in H?H.u%7:"W"in H?1:0),ie="Z"in H?D5(z1(H.y,0,1)).getUTCDay():P5(z1(H.y,0,1)).getDay(),H.m=0,H.d="W"in H?(H.w+6)%7+H.W*7-(ie+5)%7:H.w+H.U*7-(ie+6)%7);return"Z"in H?(H.H+=H.Z/100|0,H.M+=H.Z%100,D5(H)):P5(H)}}function _(q,$,ne,H){for(var Q=0,ee=$.length,ie=ne.length,ae,ue;Q=ie)return-1;if(ae=$.charCodeAt(Q++),ae===37){if(ae=$.charAt(Q++),ue=k[ae in PC?$.charAt(Q++):ae],!ue||(H=ue(q,ne,H))<0)return-1}else if(ae!=ne.charCodeAt(H++))return-1}return H}function M(q,$,ne){var H=i.exec($.slice(ne));return H?(q.p=s.get(H[0].toLowerCase()),ne+H[0].length):-1}function A(q,$,ne){var H=h.exec($.slice(ne));return H?(q.w=m.get(H[0].toLowerCase()),ne+H[0].length):-1}function S(q,$,ne){var H=l.exec($.slice(ne));return H?(q.w=d.get(H[0].toLowerCase()),ne+H[0].length):-1}function E(q,$,ne){var H=v.exec($.slice(ne));return H?(q.m=y.get(H[0].toLowerCase()),ne+H[0].length):-1}function D(q,$,ne){var H=g.exec($.slice(ne));return H?(q.m=p.get(H[0].toLowerCase()),ne+H[0].length):-1}function O(q,$,ne){return _(q,n,$,ne)}function R(q,$,ne){return _(q,e,$,ne)}function z(q,$,ne){return _(q,o,$,ne)}function L(q){return a[q.getDay()]}function P(q){return r[q.getDay()]}function N(q){return c[q.getMonth()]}function B(q){return u[q.getMonth()]}function G(q){return f[+(q.getHours()>=12)]}function W(q){return 1+~~(q.getMonth()/3)}function K(q){return a[q.getUTCDay()]}function te(q){return r[q.getUTCDay()]}function Y(q){return c[q.getUTCMonth()]}function Z(q){return u[q.getUTCMonth()]}function re(q){return f[+(q.getUTCHours()>=12)]}function U(q){return 1+~~(q.getUTCMonth()/3)}return{format:function(q){var $=b(q+="",x);return $.toString=function(){return q},$},parse:function(q){var $=T(q+="",!1);return $.toString=function(){return q},$},utcFormat:function(q){var $=b(q+="",w);return $.toString=function(){return q},$},utcParse:function(q){var $=T(q+="",!0);return $.toString=function(){return q},$}}}var PC={"-":"",_:" ","0":"0"},cl=/^\s*\d+/,OY=/^%/,LY=/[\\^$*+?|[\]().{}]/g;function Ya(t,n,e){var o=t<0?"-":"",f=(o?-t:t)+"",r=f.length;return o+(r[n.toLowerCase(),e]))}function DY(t,n,e){var o=cl.exec(n.slice(e,e+1));return o?(t.w=+o[0],e+o[0].length):-1}function IY(t,n,e){var o=cl.exec(n.slice(e,e+1));return o?(t.u=+o[0],e+o[0].length):-1}function zY(t,n,e){var o=cl.exec(n.slice(e,e+2));return o?(t.U=+o[0],e+o[0].length):-1}function RY(t,n,e){var o=cl.exec(n.slice(e,e+2));return o?(t.V=+o[0],e+o[0].length):-1}function FY(t,n,e){var o=cl.exec(n.slice(e,e+2));return o?(t.W=+o[0],e+o[0].length):-1}function DC(t,n,e){var o=cl.exec(n.slice(e,e+4));return o?(t.y=+o[0],e+o[0].length):-1}function IC(t,n,e){var o=cl.exec(n.slice(e,e+2));return o?(t.y=+o[0]+(+o[0]>68?1900:2e3),e+o[0].length):-1}function NY(t,n,e){var o=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(e,e+6));return o?(t.Z=o[1]?0:-(o[2]+(o[3]||"00")),e+o[0].length):-1}function BY(t,n,e){var o=cl.exec(n.slice(e,e+1));return o?(t.q=o[0]*3-3,e+o[0].length):-1}function jY(t,n,e){var o=cl.exec(n.slice(e,e+2));return o?(t.m=o[0]-1,e+o[0].length):-1}function zC(t,n,e){var o=cl.exec(n.slice(e,e+2));return o?(t.d=+o[0],e+o[0].length):-1}function UY(t,n,e){var o=cl.exec(n.slice(e,e+3));return o?(t.m=0,t.d=+o[0],e+o[0].length):-1}function RC(t,n,e){var o=cl.exec(n.slice(e,e+2));return o?(t.H=+o[0],e+o[0].length):-1}function VY(t,n,e){var o=cl.exec(n.slice(e,e+2));return o?(t.M=+o[0],e+o[0].length):-1}function qY(t,n,e){var o=cl.exec(n.slice(e,e+2));return o?(t.S=+o[0],e+o[0].length):-1}function HY(t,n,e){var o=cl.exec(n.slice(e,e+3));return o?(t.L=+o[0],e+o[0].length):-1}function $Y(t,n,e){var o=cl.exec(n.slice(e,e+6));return o?(t.L=Math.floor(o[0]/1e3),e+o[0].length):-1}function GY(t,n,e){var o=OY.exec(n.slice(e,e+1));return o?e+o[0].length:-1}function WY(t,n,e){var o=cl.exec(n.slice(e));return o?(t.Q=+o[0],e+o[0].length):-1}function YY(t,n,e){var o=cl.exec(n.slice(e));return o?(t.s=+o[0],e+o[0].length):-1}function FC(t,n){return Ya(t.getDate(),n,2)}function XY(t,n){return Ya(t.getHours(),n,2)}function ZY(t,n){return Ya(t.getHours()%12||12,n,2)}function JY(t,n){return Ya(1+Bd.count(Wd(t),t),n,3)}function ZI(t,n){return Ya(t.getMilliseconds(),n,3)}function KY(t,n){return ZI(t,n)+"000"}function QY(t,n){return Ya(t.getMonth()+1,n,2)}function eX(t,n){return Ya(t.getMinutes(),n,2)}function tX(t,n){return Ya(t.getSeconds(),n,2)}function nX(t){var n=t.getDay();return n===0?7:n}function rX(t,n){return Ya(My.count(Wd(t)-1,t),n,2)}function JI(t){var n=t.getDay();return n>=4||n===0?Hv(t):Hv.ceil(t)}function iX(t,n){return t=JI(t),Ya(Hv.count(Wd(t),t)+(Wd(t).getDay()===4),n,2)}function aX(t){return t.getDay()}function oX(t,n){return Ya(ck.count(Wd(t)-1,t),n,2)}function sX(t,n){return Ya(t.getFullYear()%100,n,2)}function lX(t,n){return t=JI(t),Ya(t.getFullYear()%100,n,2)}function uX(t,n){return Ya(t.getFullYear()%1e4,n,4)}function cX(t,n){var e=t.getDay();return t=e>=4||e===0?Hv(t):Hv.ceil(t),Ya(t.getFullYear()%1e4,n,4)}function fX(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+Ya(n/60|0,"0",2)+Ya(n%60,"0",2)}function NC(t,n){return Ya(t.getUTCDate(),n,2)}function hX(t,n){return Ya(t.getUTCHours(),n,2)}function dX(t,n){return Ya(t.getUTCHours()%12||12,n,2)}function pX(t,n){return Ya(1+jd.count(Yd(t),t),n,3)}function KI(t,n){return Ya(t.getUTCMilliseconds(),n,3)}function gX(t,n){return KI(t,n)+"000"}function mX(t,n){return Ya(t.getUTCMonth()+1,n,2)}function vX(t,n){return Ya(t.getUTCMinutes(),n,2)}function yX(t,n){return Ya(t.getUTCSeconds(),n,2)}function xX(t){var n=t.getUTCDay();return n===0?7:n}function bX(t,n){return Ya(Sy.count(Yd(t)-1,t),n,2)}function QI(t){var n=t.getUTCDay();return n>=4||n===0?$v(t):$v.ceil(t)}function _X(t,n){return t=QI(t),Ya($v.count(Yd(t),t)+(Yd(t).getUTCDay()===4),n,2)}function wX(t){return t.getUTCDay()}function kX(t,n){return Ya(fk.count(Yd(t)-1,t),n,2)}function TX(t,n){return Ya(t.getUTCFullYear()%100,n,2)}function AX(t,n){return t=QI(t),Ya(t.getUTCFullYear()%100,n,2)}function MX(t,n){return Ya(t.getUTCFullYear()%1e4,n,4)}function SX(t,n){var e=t.getUTCDay();return t=e>=4||e===0?$v(t):$v.ceil(t),Ya(t.getUTCFullYear()%1e4,n,4)}function EX(){return"+0000"}function BC(){return"%"}function jC(t){return+t}function UC(t){return Math.floor(+t/1e3)}var Og,qA,ez,HA,tz;CX({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function CX(t){return Og=XI(t),qA=Og.format,ez=Og.parse,HA=Og.utcFormat,tz=Og.utcParse,Og}function fv(t){const n={};return e=>n[e]||(n[e]=t(e))}function OX(t,n){return e=>{const o=t(e),f=o.indexOf(n);if(f<0)return o;let r=LX(o,f);const a=rf;)if(o[r]!=="0"){++r;break}return o.slice(0,r)+a}}function LX(t,n){let e=t.lastIndexOf("e"),o;if(e>0)return e;for(e=t.length;--e>n;)if(o=t.charCodeAt(e),o>=48&&o<=57)return e+1}function nz(t){const n=fv(t.format),e=t.formatPrefix;return{format:n,formatPrefix:e,formatFloat(o){const f=K4(o||",");if(f.precision==null){switch(f.precision=12,f.type){case"%":f.precision-=2;break;case"e":f.precision-=1;break}return OX(n(f),n(".1f")(1)[1])}else return n(f)},formatSpan(o,f,r,a){a=K4(a??",f");const u=b0(o,f,r),c=Math.max(Math.abs(o),Math.abs(f));let i;if(a.precision==null)switch(a.type){case"s":return isNaN(i=HG(u,c))||(a.precision=i),e(a,c);case"":case"e":case"g":case"p":case"r":{isNaN(i=qG(u,c))||(a.precision=i-(a.type==="e"));break}case"f":case"%":{isNaN(i=VG(u))||(a.precision=i-(a.type==="%")*2);break}}return n(a)}}}let vk;rz();function rz(){return vk=nz({format:ND,formatPrefix:$G})}function iz(t){return nz(GG(t))}function y_(t){return arguments.length?vk=iz(t):vk}function VC(t,n,e){e=e||{},Ei(e)||Pr("Invalid time multi-format specifier: ".concat(e));const o=n(vc),f=n(ec),r=n(Qu),a=n(Du),u=n(Gs),c=n(jl),i=n(Pu),s=n(wl),l=t(e[hf]||".%L"),d=t(e[vc]||":%S"),h=t(e[ec]||"%I:%M"),m=t(e[Qu]||"%I %p"),g=t(e[Du]||e[Il]||"%a %d"),p=t(e[Gs]||"%b %d"),v=t(e[jl]||"%B"),y=t(e[Pu]||"%B"),x=t(e[wl]||"%Y");return w=>(o(w)bi(o)?n(o):VC(n,$m,o),utcFormat:o=>bi(o)?e(o):VC(e,Gm,o),timeParse:fv(t.parse),utcParse:fv(t.utcParse)}}let yk;oz();function oz(){return yk=az({format:qA,parse:ez,utcFormat:HA,utcParse:tz})}function sz(t){return az(XI(t))}function Gv(t){return arguments.length?yk=sz(t):yk}const xk=(t,n)=>pa({},t,n);function lz(t,n){const e=t?iz(t):y_(),o=n?sz(n):Gv();return xk(e,o)}function $A(t,n){const e=arguments.length;return e&&e!==2&&Pr("defaultLocale expects either zero or two arguments."),e?xk(y_(t),Gv(n)):xk(y_(),Gv())}function PX(){return rz(),oz(),$A()}const DX=/^(data:|([A-Za-z]+:)?\/\/)/,IX=/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp|file|data):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,zX=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,qC="file://";function RX(t,n){return e=>({options:e||{},sanitize:NX,load:FX,fileAccess:!!n,file:BX(n),http:UX(t)})}async function FX(t,n){const e=await this.sanitize(t,n),o=e.href;return e.localFile?this.file(o):this.http(o,n)}async function NX(t,n){n=pa({},this.options,n);const e=this.fileAccess,o={href:null};let f,r,a;const u=IX.test(t.replace(zX,""));(t==null||typeof t!="string"||!u)&&Pr("Sanitize failure, invalid URI: "+oi(t));const c=DX.test(t);return(a=n.baseURL)&&!c&&(!t.startsWith("/")&&!a.endsWith("/")&&(t="/"+t),t=a+t),r=(f=t.startsWith(qC))||n.mode==="file"||n.mode!=="http"&&!c&&e,f?t=t.slice(qC.length):t.startsWith("//")&&(n.defaultProtocol==="file"?(t=t.slice(2),r=!0):t=(n.defaultProtocol||"http")+":"+t),Object.defineProperty(o,"localFile",{value:!!r}),o.href=t,n.target&&(o.target=n.target+""),n.rel&&(o.rel=n.rel+""),n.context==="image"&&n.crossOrigin&&(o.crossOrigin=n.crossOrigin+""),o}function BX(t){return t?n=>new Promise((e,o)=>{t.readFile(n,(f,r)=>{f?o(f):e(r)})}):jX}async function jX(){Pr("No file system access.")}function UX(t){return t?async function(n,e){const o=pa({},this.options.http,e),f=e&&e.response,r=await t(n,o);return r.ok?ga(r[f])?r[f]():r.text():Pr(r.status+""+r.statusText)}:VX}async function VX(){Pr("No HTTP fetch method available.")}const qX=t=>t!=null&&t===t,HX=t=>t==="true"||t==="false"||t===!0||t===!1,$X=t=>!Number.isNaN(Date.parse(t)),uz=t=>!Number.isNaN(+t)&&!(t instanceof Date),GX=t=>uz(t)&&Number.isInteger(+t),bk={boolean:LA,integer:Rl,number:Rl,date:PA,string:DA,unknown:Hl},Qx=[HX,GX,uz,$X],WX=["boolean","integer","number","date"];function cz(t,n){if(!t||!t.length)return"unknown";const e=t.length,o=Qx.length,f=Qx.map((r,a)=>a+1);for(let r=0,a=0,u,c;rr===0?a:r,0)-1]}function fz(t,n){return n.reduce((e,o)=>(e[o]=cz(t,o),e),{})}function HC(t){const n=function(e,o){const f={delimiter:t};return GA(e,o?pa(o,f):f)};return n.responseType="text",n}function GA(t,n){return n.header&&(t=n.header.map(oi).join(n.delimiter)+` +`+t),cW(n.delimiter).parse(t+"")}GA.responseType="text";function YX(t){return typeof Buffer=="function"&&ga(Buffer.isBuffer)?Buffer.isBuffer(t):!1}function WA(t,n){const e=n&&n.property?Lu(n.property):Hl;return Ei(t)&&!YX(t)?XX(e(t),n):e(JSON.parse(t))}WA.responseType="json";function XX(t,n){return!Ir(t)&&cI(t)&&(t=[...t]),n&&n.copy?JSON.parse(JSON.stringify(t)):t}const ZX={interior:(t,n)=>t!==n,exterior:(t,n)=>t===n};function hz(t,n){let e,o,f,r;return t=WA(t,n),n&&n.feature?(e=HW,f=n.feature):n&&n.mesh?(e=GW,f=n.mesh,r=ZX[n.filter]):Pr("Missing TopoJSON feature or mesh parameter."),o=(o=t.objects[f])?e(t,o,r):Pr("Invalid TopoJSON object: "+f),o&&o.features||[o]}hz.responseType="json";const Bb={dsv:GA,csv:HC(","),tsv:HC(" "),json:WA,topojson:hz};function YA(t,n){return arguments.length>1?(Bb[t]=n,this):qi(Bb,t)?Bb[t]:null}function dz(t){const n=YA(t);return n&&n.responseType||"text"}function pz(t,n,e,o){n=n||{};const f=YA(n.type||"json");return f||Pr("Unknown data format type: "+n.type),t=f(t,n),n.parse&&JX(t,n.parse,e,o),qi(t,"columns")&&delete t.columns,t}function JX(t,n,e,o){if(!t.length)return;const f=Gv();e=e||f.timeParse,o=o||f.utcParse;let r=t.columns||Object.keys(t[0]),a,u,c,i,s,l;n==="auto"&&(n=fz(t,r)),r=Object.keys(n);const d=r.map(h=>{const m=n[h];let g,p;if(m&&(m.startsWith("date:")||m.startsWith("utc:")))return g=m.split(/:(.+)?/,2),p=g[1],(p[0]==="'"&&p[p.length-1]==="'"||p[0]==='"'&&p[p.length-1]==='"')&&(p=p.slice(1,-1)),(g[0]==="utc"?o:e)(p);if(!bk[m])throw Error("Illegal format pattern: "+h+":"+m);return bk[m]});for(c=0,s=t.length,l=r.length;c{const r=n(f);return o[r]||(o[r]=1,e.push(f)),e},e.remove=f=>{const r=n(f);if(o[r]){o[r]=0;const a=e.indexOf(f);a>=0&&e.splice(a,1)}return e},e}async function jb(t,n){try{await n(t)}catch(e){t.error(e)}}const gz=Symbol("vega_id");let KX=1;function tw(t){return!!(t&&$i(t))}function $i(t){return t[gz]}function mz(t,n){return t[gz]=n,t}function ro(t){const n=t===Object(t)?t:{data:t};return $i(n)?n:mz(n,KX++)}function XA(t){return nw(t,ro({}))}function nw(t,n){for(const e in t)n[e]=t[e];return n}function vz(t,n){return mz(n,$i(t))}function H0(t,n){return t?n?(e,o)=>t(e,o)||$i(n(e))-$i(n(o)):(e,o)=>t(e,o)||$i(e)-$i(o):null}function yz(t){return t&&t.constructor===$0}function $0(){const t=[],n=[],e=[],o=[],f=[];let r=null,a=!1;return{constructor:$0,insert(u){const c=ki(u),i=c.length;for(let s=0;s{m(y)&&(i[$i(y)]=-1)});for(l=0,d=t.length;l0&&(v(g,m,h.value),u.modifies(m));for(l=0,d=f.length;l{m(y)&&i[$i(y)]>0&&v(y,h.field,h.value)}),u.modifies(h.field);if(a)u.mod=n.length||o.length?c.filter(y=>i[$i(y)]>0):c.slice();else for(p in s)u.mod.push(s[p]);return(r||r==null&&(n.length||o.length))&&u.clean(!0),u}}}const Ub="_:mod:_";function rw(){Object.defineProperty(this,Ub,{writable:!0,value:{}})}rw.prototype={set(t,n,e,o){const f=this,r=f[t],a=f[Ub];return n!=null&&n>=0?(r[n]!==e||o)&&(r[n]=e,a[n+":"+t]=-1,a[t]=-1):(r!==e||o)&&(f[t]=e,a[t]=Ir(e)?1+e.length:-1),f},modified(t,n){const e=this[Ub];if(arguments.length){if(Ir(t)){for(let o=0;o=0?n+1{h instanceof Co?(h!==this&&(n&&h.targets().add(this),r.push(h)),f.push({op:h,name:l,index:d})):o.set(l,d,h)};for(a in t)if(u=t[a],a===eZ)ki(u).forEach(l=>{l instanceof Co?l!==this&&(l.targets().add(this),r.push(l)):Pr("Pulse parameters must be operator instances.")}),this.source=u;else if(Ir(u))for(o.set(a,-1,Array(c=u.length)),i=0;i{const e=Date.now();return e-n>t?(n=e,1):0})},debounce(t){const n=xd();return this.targets().add(xd(null,null,CA(t,e=>{const o=e.dataflow;n.receive(e),o&&o.run&&o.run()}))),n},between(t,n){let e=!1;return t.targets().add(xd(null,null,()=>e=!0)),n.targets().add(xd(null,null,()=>e=!1)),this.filter(()=>e)},detach(){this._filter=mc,this._targets=null}};function sZ(t,n,e,o){const f=this,r=xd(e,o),a=function(i){i.dataflow=f;try{r.receive(i)}catch(s){f.error(s)}finally{f.run()}};let u;typeof t=="string"&&typeof document<"u"?u=document.querySelectorAll(t):u=ki(t);const c=u.length;for(let i=0;in=o);return e.requests=0,e.done=()=>{--e.requests===0&&(t._pending=null,n(t))},t._pending=e}const dZ={skip:!0};function pZ(t,n,e,o,f){return(t instanceof Co?mZ:gZ)(this,t,n,e,o,f),this}function gZ(t,n,e,o,f,r){const a=pa({},r,dZ);let u,c;ga(e)||(e=$l(e)),o===void 0?u=i=>t.touch(e(i)):ga(o)?(c=new Co(null,o,f,!1),u=i=>{c.evaluate(i);const s=e(i),l=c.value;yz(l)?t.pulse(s,l,r):t.update(s,l,a)}):u=i=>t.update(e(i),o,a),n.apply(u)}function mZ(t,n,e,o,f,r){if(o===void 0)n.targets().add(e);else{const a=r||{},u=new Co(null,vZ(e,o),f,!1);u.modified(a.force),u.rank=n.rank,n.targets().add(u),e&&(u.skip(!0),u.value=e.value,u.targets().add(e),t.connect(e,[u]))}}function vZ(t,n){return n=ga(n)?n:$l(n),t?function(e,o){const f=n(e,o);return t.skip()||(t.skip(f!==this.value).value=f),f}:n}function yZ(t){t.rank=++this._rank}function xZ(t){const n=[t];let e,o,f;for(;n.length;)if(this.rank(e=n.pop()),o=e._targets)for(f=o.length;--f>=0;)n.push(e=o[f]),e===t&&Pr("Cycle detected in dataflow graph.")}const x_={},Df=1<<0,wd=1<<1,Eh=1<<2,bZ=Df|wd,GC=Df|Eh,Lg=Df|wd|Eh,WC=1<<3,N1=1<<4,YC=1<<5,XC=1<<6;function Ud(t,n,e){this.dataflow=t,this.stamp=n??-1,this.add=[],this.rem=[],this.mod=[],this.fields=null,this.encode=e||null}function I5(t,n){const e=[];return _d(t,n,o=>e.push(o)),e}function ZC(t,n){const e={};return t.visit(n,o=>{e[$i(o)]=1}),o=>e[$i(o)]?null:o}function eb(t,n){return t?(e,o)=>t(e,o)&&n(e,o):n}Ud.prototype={StopPropagation:x_,ADD:Df,REM:wd,MOD:Eh,ADD_REM:bZ,ADD_MOD:GC,ALL:Lg,REFLOW:WC,SOURCE:N1,NO_SOURCE:YC,NO_FIELDS:XC,fork(t){return new Ud(this.dataflow).init(this,t)},clone(){const t=this.fork(Lg);return t.add=t.add.slice(),t.rem=t.rem.slice(),t.mod=t.mod.slice(),t.source&&(t.source=t.source.slice()),t.materialize(Lg|N1)},addAll(){let t=this;return!t.source||t.add===t.rem||!t.rem.length&&t.source.length===t.add.length||(t=new Ud(this.dataflow).init(this),t.add=t.source,t.rem=[]),t},init(t,n){const e=this;return e.stamp=t.stamp,e.encode=t.encode,t.fields&&!(n&XC)&&(e.fields=t.fields),n&Df?(e.addF=t.addF,e.add=t.add):(e.addF=null,e.add=[]),n&wd?(e.remF=t.remF,e.rem=t.rem):(e.remF=null,e.rem=[]),n&Eh?(e.modF=t.modF,e.mod=t.mod):(e.modF=null,e.mod=[]),n&YC?(e.srcF=null,e.source=null):(e.srcF=t.srcF,e.source=t.source,t.cleans&&(e.cleans=t.cleans)),e},runAfter(t){this.dataflow.runAfter(t)},changed(t){const n=t||Lg;return n&Df&&this.add.length||n&wd&&this.rem.length||n&Eh&&this.mod.length},reflow(t){if(t)return this.fork(Lg).reflow();const n=this.add.length,e=this.source&&this.source.length;return e&&e!==n&&(this.mod=this.source,n&&this.filter(Eh,ZC(this,Df))),this},clean(t){return arguments.length?(this.cleans=!!t,this):this.cleans},modifies(t){const n=this.fields||(this.fields={});return Ir(t)?t.forEach(e=>n[e]=!0):n[t]=!0,this},modified(t,n){const e=this.fields;return(n||this.mod.length)&&e?arguments.length?Ir(t)?t.some(o=>e[o]):e[t]:!!e:!1},filter(t,n){const e=this;return t&Df&&(e.addF=eb(e.addF,n)),t&wd&&(e.remF=eb(e.remF,n)),t&Eh&&(e.modF=eb(e.modF,n)),t&N1&&(e.srcF=eb(e.srcF,n)),e},materialize(t){t=t||Lg;const n=this;return t&Df&&n.addF&&(n.add=I5(n.add,n.addF),n.addF=null),t&wd&&n.remF&&(n.rem=I5(n.rem,n.remF),n.remF=null),t&Eh&&n.modF&&(n.mod=I5(n.mod,n.modF),n.modF=null),t&N1&&n.srcF&&(n.source=n.source.filter(n.srcF),n.srcF=null),n},visit(t,n){const e=this,o=n;if(t&N1)return _d(e.source,e.srcF,o),e;t&Df&&_d(e.add,e.addF,o),t&wd&&_d(e.rem,e.remF,o),t&Eh&&_d(e.mod,e.modF,o);const f=e.source;if(t&WC&&f){const r=e.add.length+e.mod.length;r===f.length||(r?_d(f,ZC(e,GC),o):_d(f,e.srcF,o))}return e}};function ZA(t,n,e,o){const f=this,r=e.length;let a=0;this.dataflow=t,this.stamp=n,this.fields=null,this.encode=o||null,this.pulses=e;for(let u=0;un.add.push(e)),t&n.REM&&this.visit(n.REM,e=>n.rem.push(e)),t&n.MOD&&this.visit(n.MOD,e=>n.mod.push(e))),n},changed(t){return this.changes&t},modified(t){const n=this,e=n.fields;return e&&n.changes&n.MOD?Ir(t)?t.some(o=>e[o]):e[t]:0},filter(){Pr("MultiPulse does not support filtering.")},materialize(){Pr("MultiPulse does not support materialization.")},visit(t,n){const e=this,o=e.pulses,f=o.length;let r=0;if(t&e.SOURCE)for(;ro._enqueue(s,!0)),o._touched=ew(Ty);let a=0,u,c,i;try{for(;o._heap.size()>0;){if(u=o._heap.pop(),u.rank!==u.qrank){o._enqueue(u,!0);continue}c=u.run(o._getPulse(u,t)),c.then?c=await c:c.async&&(f.push(c.async),c=x_),c!==x_&&u._targets&&u._targets.forEach(s=>o._enqueue(s)),++a}}catch(s){o._heap.clear(),i=s}if(o._input={},o._pulse=null,o.debug(`Pulse ${r}: ${a} operators`),i&&(o._postrun=[],o.error(i)),o._postrun.length){const s=o._postrun.sort((l,d)=>d.priority-l.priority);o._postrun=[];for(let l=0;lo.runAsync(null,()=>{s.forEach(l=>{try{l(o)}catch(d){o.error(d)}})})),o}async function wZ(t,n,e){for(;this._running;)await this._running;const o=()=>this._running=null;return(this._running=this.evaluate(t,n,e)).then(o,o),this._running}function kZ(t,n,e){return this._pulse?xz(this):(this.evaluate(t,n,e),this)}function TZ(t,n,e){if(this._pulse||n)this._postrun.push({priority:e||0,callback:t});else try{t(this)}catch(o){this.error(o)}}function xz(t){return t.error("Dataflow already running. Use runAsync() to chain invocations."),t}function AZ(t,n){const e=t.stampf.pulse),n):this._input[t.id]||SZ(this._pulse,e&&e.pulse)}function SZ(t,n){return n&&n.stamp===t.stamp?n:(t=t.fork(),n&&n!==x_&&(t.source=n.source),t)}const JA={skip:!1,force:!1};function EZ(t,n){const e=n||JA;return this._pulse?this._enqueue(t):this._touched.add(t),e.skip&&t.skip(!0),this}function CZ(t,n,e){const o=e||JA;return(t.set(n)||o.force)&&this.touch(t,o),this}function OZ(t,n,e){this.touch(t,e||JA);const o=new Ud(this,this._clock+(this._pulse?0:1)),f=t.pulse&&t.pulse.source||[];return o.target=t,this._input[t.id]=n.pulse(o,f),this}function LZ(t){let n=[];return{clear:()=>n=[],size:()=>n.length,peek:()=>n[0],push:e=>(n.push(e),bz(n,0,n.length-1,t)),pop:()=>{const e=n.pop();let o;return n.length?(o=n[0],n[0]=e,PZ(n,0,t)):o=e,o}}}function bz(t,n,e,o){let f,r;const a=t[e];for(;e>n;){if(r=e-1>>1,f=t[r],o(a,f)<0){t[e]=f,e=r;continue}break}return t[e]=a}function PZ(t,n,e){const o=n,f=t.length,r=t[n];let a=(n<<1)+1,u;for(;a=0&&(a=u),t[n]=t[a],n=a,a=(n<<1)+1;return t[n]=r,bz(t,o,n,e)}function Qg(){this.logger(TA()),this.logLevel(wA),this._clock=0,this._rank=0,this._locale=$A();try{this._loader=Q2()}catch{}this._touched=ew(Ty),this._input={},this._pulse=null,this._heap=LZ((t,n)=>t.qrank-n.qrank),this._postrun=[]}function B1(t){return function(){return this._log[t].apply(this,arguments)}}Qg.prototype={stamp(){return this._clock},loader(t){return arguments.length?(this._loader=t,this):this._loader},locale(t){return arguments.length?(this._locale=t,this):this._locale},logger(t){return arguments.length?(this._log=t,this):this._log},error:B1("error"),warn:B1("warn"),info:B1("info"),debug:B1("debug"),logLevel:B1("level"),cleanThreshold:1e4,add:iZ,connect:aZ,rank:yZ,rerank:xZ,pulse:OZ,touch:EZ,update:CZ,changeset:$0,ingest:uZ,parse:lZ,preload:fZ,request:cZ,events:sZ,on:pZ,evaluate:_Z,run:kZ,runAsync:wZ,runAfter:TZ,_enqueue:AZ,_getPulse:MZ};function _r(t,n){Co.call(this,t,null,n)}ni(_r,Co,{run(t){if(t.stampthis.pulse=e):n!==t.StopPropagation&&(this.pulse=n),n},evaluate(t){const n=this.marshall(t.stamp),e=this.transform(n,t);return n.clear(),e},transform(){}});const cm={};function _z(t){const n=wz(t);return n&&n.Definition||null}function wz(t){return t=t&&t.toLowerCase(),qi(cm,t)?cm[t]:null}function*kz(t,n){if(n==null)for(let e of t)e!=null&&e!==""&&(e=+e)>=e&&(yield e);else{let e=-1;for(let o of t)o=n(o,++e,t),o!=null&&o!==""&&(o=+o)>=o&&(yield o)}}function KA(t,n,e){const o=Float64Array.from(kz(t,e));return o.sort(Vv),n.map(f=>kI(o,f))}function QA(t,n){return KA(t,[.25,.5,.75],n)}function e6(t,n){const e=t.length,o=ZW(t,n),f=QA(t,n),r=(f[2]-f[0])/1.34,a=Math.min(o,r)||o||Math.abs(f[0])||1;return 1.06*a*Math.pow(e,-.2)}function Tz(t){const n=t.maxbins||20,e=t.base||10,o=Math.log(e),f=t.divide||[5,2];let r=t.extent[0],a=t.extent[1],u,c,i,s,l,d;const h=t.span||a-r||Math.abs(r)||1;if(t.step)u=t.step;else if(t.steps){for(s=h/n,l=0,d=t.steps.length;ln;)u*=e;for(l=0,d=f.length;l=i&&h/s<=n&&(u=s)}s=Math.log(u);const m=s>=0?0:~~(-s/o)+1,g=Math.pow(e,-m-1);return(t.nice||t.nice===void 0)&&(s=Math.floor(r/u+g)*u,r=rd);const f=t.length,r=new Float64Array(f);let a=0,u=1,c=o(t[0]),i=c,s=c+n,l;for(;u=s){for(i=(c+i)/2;a>1);af;)t[a--]=t[o]}o=f,f=r}return t}function zZ(t){return function(){return t=(1103515245*t+12345)%2147483647,t/2147483647}}function RZ(t,n){n==null&&(n=t,t=0);let e,o,f;const r={min(a){return arguments.length?(e=a||0,f=o-e,r):e},max(a){return arguments.length?(o=a||0,f=o-e,r):o},sample(){return e+Math.floor(f*yc())},pdf(a){return a===Math.floor(a)&&a>=e&&a=o?1:(u-e+1)/f},icdf(a){return a>=0&&a<=1?e-1+Math.floor(a*f):NaN}};return r.min(t).max(n)}const Sz=Math.sqrt(2*Math.PI),FZ=Math.SQRT2;let j1=NaN;function aw(t,n){t=t||0,n=n??1;let e=0,o=0,f,r;if(j1===j1)e=j1,j1=NaN;else{do e=yc()*2-1,o=yc()*2-1,f=e*e+o*o;while(f===0||f>1);r=Math.sqrt(-2*Math.log(f)/f),e*=r,j1=o*r}return t+e*n}function t6(t,n,e){e=e??1;const o=(t-(n||0))/e;return Math.exp(-.5*o*o)/(e*Sz)}function ow(t,n,e){n=n||0,e=e??1;const o=(t-n)/e,f=Math.abs(o);let r;if(f>37)r=0;else{const a=Math.exp(-f*f/2);let u;f<7.07106781186547?(u=.0352624965998911*f+.700383064443688,u=u*f+6.37396220353165,u=u*f+33.912866078383,u=u*f+112.079291497871,u=u*f+221.213596169931,u=u*f+220.206867912376,r=a*u,u=.0883883476483184*f+1.75566716318264,u=u*f+16.064177579207,u=u*f+86.7807322029461,u=u*f+296.564248779674,u=u*f+637.333633378831,u=u*f+793.826512519948,u=u*f+440.413735824752,r=r/u):(u=f+.65,u=f+4/u,u=f+3/u,u=f+2/u,u=f+1/u,r=a/u/2.506628274631)}return o>0?1-r:r}function sw(t,n,e){return t<0||t>1?NaN:(n||0)+(e??1)*FZ*NZ(2*t-1)}function NZ(t){let n=-Math.log((1-t)*(1+t)),e;return n<6.25?(n-=3.125,e=-364441206401782e-35,e=-16850591381820166e-35+e*n,e=128584807152564e-32+e*n,e=11157877678025181e-33+e*n,e=-1333171662854621e-31+e*n,e=20972767875968562e-33+e*n,e=6637638134358324e-30+e*n,e=-4054566272975207e-29+e*n,e=-8151934197605472e-29+e*n,e=26335093153082323e-28+e*n,e=-12975133253453532e-27+e*n,e=-5415412054294628e-26+e*n,e=10512122733215323e-25+e*n,e=-4112633980346984e-24+e*n,e=-29070369957882005e-24+e*n,e=42347877827932404e-23+e*n,e=-13654692000834679e-22+e*n,e=-13882523362786469e-21+e*n,e=.00018673420803405714+e*n,e=-.000740702534166267+e*n,e=-.006033670871430149+e*n,e=.24015818242558962+e*n,e=1.6536545626831027+e*n):n<16?(n=Math.sqrt(n)-3.25,e=22137376921775787e-25,e=9075656193888539e-23+e*n,e=-27517406297064545e-23+e*n,e=18239629214389228e-24+e*n,e=15027403968909828e-22+e*n,e=-4013867526981546e-21+e*n,e=29234449089955446e-22+e*n,e=12475304481671779e-21+e*n,e=-47318229009055734e-21+e*n,e=6828485145957318e-20+e*n,e=24031110387097894e-21+e*n,e=-.0003550375203628475+e*n,e=.0009532893797373805+e*n,e=-.0016882755560235047+e*n,e=.002491442096107851+e*n,e=-.003751208507569241+e*n,e=.005370914553590064+e*n,e=1.0052589676941592+e*n,e=3.0838856104922208+e*n):Number.isFinite(n)?(n=Math.sqrt(n)-5,e=-27109920616438573e-27,e=-2555641816996525e-25+e*n,e=15076572693500548e-25+e*n,e=-3789465440126737e-24+e*n,e=761570120807834e-23+e*n,e=-1496002662714924e-23+e*n,e=2914795345090108e-23+e*n,e=-6771199775845234e-23+e*n,e=22900482228026655e-23+e*n,e=-99298272942317e-20+e*n,e=4526062597223154e-21+e*n,e=-1968177810553167e-20+e*n,e=7599527703001776e-20+e*n,e=-.00021503011930044477+e*n,e=-.00013871931833623122+e*n,e=1.0103004648645344+e*n,e=4.849906401408584+e*n):e=1/0,e*t}function n6(t,n){let e,o;const f={mean(r){return arguments.length?(e=r||0,f):e},stdev(r){return arguments.length?(o=r??1,f):o},sample:()=>aw(e,o),pdf:r=>t6(r,e,o),cdf:r=>ow(r,e,o),icdf:r=>sw(r,e,o)};return f.mean(t).stdev(n)}function r6(t,n){const e=n6();let o=0;const f={data(r){return arguments.length?(t=r,o=r?r.length:0,f.bandwidth(n)):t},bandwidth(r){return arguments.length?(n=r,!n&&t&&(n=e6(t)),f):n},sample(){return t[~~(yc()*o)]+n*e.sample()},pdf(r){let a=0,u=0;for(;ui6(e,o),pdf:r=>a6(r,e,o),cdf:r=>o6(r,e,o),icdf:r=>s6(r,e,o)};return f.mean(t).stdev(n)}function Cz(t,n){let e=0,o;function f(a){const u=[];let c=0,i;for(i=0;i=n&&t<=e?1/(e-n):0}function c6(t,n,e){return e==null&&(e=n??1,n=0),te?1:(t-n)/(e-n)}function f6(t,n,e){return e==null&&(e=n??1,n=0),t>=0&&t<=1?n+t*(e-n):NaN}function Oz(t,n){let e,o;const f={min(r){return arguments.length?(e=r||0,f):e},max(r){return arguments.length?(o=r??1,f):o},sample:()=>l6(e,o),pdf:r=>u6(r,e,o),cdf:r=>c6(r,e,o),icdf:r=>f6(r,e,o)};return n==null&&(n=t??1,t=0),f.min(t).max(n)}function Ey(t,n,e,o){const f=o-t*t,r=Math.abs(f)<1e-24?0:(e-t*n)/f;return[n-r*t,r]}function lw(t,n,e,o){t=t.filter(h=>{let m=n(h),g=e(h);return m!=null&&(m=+m)>=m&&g!=null&&(g=+g)>=g}),o&&t.sort((h,m)=>n(h)-n(m));const f=t.length,r=new Float64Array(f),a=new Float64Array(f);let u=0,c=0,i=0,s,l,d;for(d of t)r[u]=s=+n(d),a[u]=l=+e(d),++u,c+=(s-c)/u,i+=(l-i)/u;for(u=0;u=r&&a!=null&&(a=+a)>=a&&o(r,a,++f)}function Wm(t,n,e,o,f){let r=0,a=0;return Cy(t,n,e,(u,c)=>{const i=c-f(u),s=c-o;r+=i*i,a+=s*s}),1-r/a}function h6(t,n,e){let o=0,f=0,r=0,a=0,u=0;Cy(t,n,e,(s,l)=>{++u,o+=(s-o)/u,f+=(l-f)/u,r+=(s*l-r)/u,a+=(s*s-a)/u});const c=Ey(o,f,r,a),i=s=>c[0]+c[1]*s;return{coef:c,predict:i,rSquared:Wm(t,n,e,f,i)}}function Lz(t,n,e){let o=0,f=0,r=0,a=0,u=0;Cy(t,n,e,(s,l)=>{++u,s=Math.log(s),o+=(s-o)/u,f+=(l-f)/u,r+=(s*l-r)/u,a+=(s*s-a)/u});const c=Ey(o,f,r,a),i=s=>c[0]+c[1]*Math.log(s);return{coef:c,predict:i,rSquared:Wm(t,n,e,f,i)}}function Pz(t,n,e){const[o,f,r,a]=lw(t,n,e);let u=0,c=0,i=0,s=0,l=0,d,h,m;Cy(t,n,e,(y,x)=>{d=o[l++],h=Math.log(x),m=d*x,u+=(x*h-u)/l,c+=(m-c)/l,i+=(m*h-i)/l,s+=(d*m-s)/l});const[g,p]=Ey(c/a,u/a,i/a,s/a),v=y=>Math.exp(g+p*(y-r));return{coef:[Math.exp(g-p*r),p],predict:v,rSquared:Wm(t,n,e,a,v)}}function Dz(t,n,e){let o=0,f=0,r=0,a=0,u=0,c=0;Cy(t,n,e,(l,d)=>{const h=Math.log(l),m=Math.log(d);++c,o+=(h-o)/c,f+=(m-f)/c,r+=(h*m-r)/c,a+=(h*h-a)/c,u+=(d-u)/c});const i=Ey(o,f,r,a),s=l=>i[0]*Math.pow(l,i[1]);return i[0]=Math.exp(i[0]),{coef:i,predict:s,rSquared:Wm(t,n,e,u,s)}}function d6(t,n,e){const[o,f,r,a]=lw(t,n,e),u=o.length;let c=0,i=0,s=0,l=0,d=0,h,m,g,p;for(h=0;h(T=T-r,x*T*T+w*T+k+a);return{coef:[k-w*r+x*r*r+a,w-2*x*r,x],predict:b,rSquared:Wm(t,n,e,a,b)}}function Iz(t,n,e,o){if(o===1)return h6(t,n,e);if(o===2)return d6(t,n,e);const[f,r,a,u]=lw(t,n,e),c=f.length,i=[],s=[],l=o+1;let d,h,m,g,p;for(d=0;d{x-=a;let w=u+v[0]+v[1]*x+v[2]*x*x;for(d=3;d=0;--r)for(u=n[r],c=1,f[r]+=u,a=1;a<=r;++a)c*=(r+1-a)/a,f[r-a]+=u*Math.pow(e,a)*c;return f[0]+=o,f}function jZ(t){const n=t.length-1,e=[];let o,f,r,a,u;for(o=0;oMath.abs(t[o][a])&&(a=f);for(r=o;r=o;r--)t[r][f]-=t[r][o]*t[o][f]/t[o][o]}for(f=n-1;f>=0;--f){for(u=0,r=f+1;rf[x]-v?y:x;let k=0,b=0,T=0,_=0,M=0;const A=1/Math.abs(f[w]-v||1);for(let D=y;D<=x;++D){const O=f[D],R=r[D],z=UZ(Math.abs(v-O)*A)*d[D],L=O*z;k+=z,b+=L,T+=R*z,_+=R*L,M+=O*L}const[S,E]=Ey(b/k,T/k,_/k,M/k);s[p]=S+E*v,l[p]=Math.abs(r[p]-s[p]),VZ(f,p+1,m)}if(h===JC)break;const g=TI(l);if(Math.abs(g)=1?KC:(y=1-v*v)*y}return qZ(f,s,a,u)}function UZ(t){return(t=1-t*t*t)*t*t}function VZ(t,n,e){const o=t[n];let f=e[0],r=e[1]+1;if(!(r>=t.length))for(;n>f&&t[r]-o<=o-t[f];)e[0]=++f,e[1]=r,++r}function qZ(t,n,e,o){const f=t.length,r=[];let a=0,u=0,c=[],i;for(;a[g,t(g)],r=n[0],a=n[1],u=a-r,c=u/o,i=[f(r)],s=[];if(e===o){for(let g=1;g0;)s.push(f(r+g/e*u))}let l=i[0],d=s[s.length-1];const h=1/u,m=$Z(l[1],s);for(;d;){const g=f((l[0]+d[0])/2);g[0]-l[0]>=c&&GZ(l,g,d,h,m)>HZ?s.push(g):(l=d,i.push(d),s.pop()),d=s[s.length-1]}return i}function $Z(t,n){let e=t,o=t;const f=n.length;for(let r=0;ro&&(o=a)}return 1/(o-e)}function GZ(t,n,e,o,f){const r=Math.atan2(f*(e[1]-t[1]),o*(e[0]-t[0])),a=Math.atan2(f*(n[1]-t[1]),o*(n[0]-t[0]));return Math.abs(r-a)}function WZ(t){return n=>{const e=t.length;let o=1,f=String(t[0](n));for(;o{},YZ={init:z5,add:z5,rem:z5,idx:0},Wv={values:{init:t=>t.cell.store=!0,value:t=>t.cell.data.values(),idx:-1},count:{value:t=>t.cell.num},__count__:{value:t=>t.missing+t.valid},missing:{value:t=>t.missing},valid:{value:t=>t.valid},sum:{init:t=>t.sum=0,value:t=>t.sum,add:(t,n)=>t.sum+=+n,rem:(t,n)=>t.sum-=n},product:{init:t=>t.product=1,value:t=>t.valid?t.product:void 0,add:(t,n)=>t.product*=n,rem:(t,n)=>t.product/=n},mean:{init:t=>t.mean=0,value:t=>t.valid?t.mean:void 0,add:(t,n)=>(t.mean_d=n-t.mean,t.mean+=t.mean_d/t.valid),rem:(t,n)=>(t.mean_d=n-t.mean,t.mean-=t.valid?t.mean_d/t.valid:t.mean)},average:{value:t=>t.valid?t.mean:void 0,req:["mean"],idx:1},variance:{init:t=>t.dev=0,value:t=>t.valid>1?t.dev/(t.valid-1):void 0,add:(t,n)=>t.dev+=t.mean_d*(n-t.mean),rem:(t,n)=>t.dev-=t.mean_d*(n-t.mean),req:["mean"],idx:1},variancep:{value:t=>t.valid>1?t.dev/t.valid:void 0,req:["variance"],idx:2},stdev:{value:t=>t.valid>1?Math.sqrt(t.dev/(t.valid-1)):void 0,req:["variance"],idx:2},stdevp:{value:t=>t.valid>1?Math.sqrt(t.dev/t.valid):void 0,req:["variance"],idx:2},stderr:{value:t=>t.valid>1?Math.sqrt(t.dev/(t.valid*(t.valid-1))):void 0,req:["variance"],idx:2},distinct:{value:t=>t.cell.data.distinct(t.get),req:["values"],idx:3},ci0:{value:t=>t.cell.data.ci0(t.get),req:["values"],idx:3},ci1:{value:t=>t.cell.data.ci1(t.get),req:["values"],idx:3},median:{value:t=>t.cell.data.q2(t.get),req:["values"],idx:3},q1:{value:t=>t.cell.data.q1(t.get),req:["values"],idx:3},q3:{value:t=>t.cell.data.q3(t.get),req:["values"],idx:3},min:{init:t=>t.min=void 0,value:t=>t.min=Number.isNaN(t.min)?t.cell.data.min(t.get):t.min,add:(t,n)=>{(n{n<=t.min&&(t.min=NaN)},req:["values"],idx:4},max:{init:t=>t.max=void 0,value:t=>t.max=Number.isNaN(t.max)?t.cell.data.max(t.get):t.max,add:(t,n)=>{(n>t.max||t.max===void 0)&&(t.max=n)},rem:(t,n)=>{n>=t.max&&(t.max=NaN)},req:["values"],idx:4},argmin:{init:t=>t.argmin=void 0,value:t=>t.argmin||t.cell.data.argmin(t.get),add:(t,n,e)=>{n{n<=t.min&&(t.argmin=void 0)},req:["min","values"],idx:3},argmax:{init:t=>t.argmax=void 0,value:t=>t.argmax||t.cell.data.argmax(t.get),add:(t,n,e)=>{n>t.max&&(t.argmax=e)},rem:(t,n)=>{n>=t.max&&(t.argmax=void 0)},req:["max","values"],idx:3}},Oy=Object.keys(Wv);function XZ(t,n){return e=>pa({name:t,out:e||t},YZ,n)}Oy.forEach(t=>{Wv[t]=XZ(t,Wv[t])});function Fz(t,n){return Wv[t](n)}function Nz(t,n){return t.idx-n.idx}function ZZ(t){const n={};t.forEach(o=>n[o.name]=o);const e=o=>{!o.req||o.req.forEach(f=>{n[f]||e(n[f]=Wv[f]())})};return t.forEach(e),Object.values(n).sort(Nz)}function JZ(){this.valid=0,this.missing=0,this._ops.forEach(t=>t.init(this))}function KZ(t,n){if(t==null||t===""){++this.missing;return}t===t&&(++this.valid,this._ops.forEach(e=>e.add(this,t,n)))}function QZ(t,n){if(t==null||t===""){--this.missing;return}t===t&&(--this.valid,this._ops.forEach(e=>e.rem(this,t,n)))}function eJ(t){return this._out.forEach(n=>t[n.out]=n.value(this)),t}function Bz(t,n){const e=n||Hl,o=ZZ(t),f=t.slice().sort(Nz);function r(a){this._ops=o,this._out=f,this.cell=a,this.init()}return r.prototype.init=JZ,r.prototype.add=KZ,r.prototype.rem=QZ,r.prototype.set=eJ,r.prototype.get=e,r.fields=t.map(a=>a.out),r}function p6(t){this._key=t?Lu(t):$i,this.reset()}const Tl=p6.prototype;Tl.reset=function(){this._add=[],this._rem=[],this._ext=null,this._get=null,this._q=null};Tl.add=function(t){this._add.push(t)};Tl.rem=function(t){this._rem.push(t)};Tl.values=function(){if(this._get=null,this._rem.length===0)return this._add;const t=this._add,n=this._rem,e=this._key,o=t.length,f=n.length,r=Array(o-f),a={};let u,c,i;for(u=0;u=0;)r=t(n[o])+"",qi(e,r)||(e[r]=1,++f);return f};Tl.extent=function(t){if(this._get!==t||!this._ext){const n=this.values(),e=lI(n,t);this._ext=[n[e[0]],n[e[1]]],this._get=t}return this._ext};Tl.argmin=function(t){return this.extent(t)[0]||{}};Tl.argmax=function(t){return this.extent(t)[1]||{}};Tl.min=function(t){const n=this.extent(t)[0];return n!=null?t(n):void 0};Tl.max=function(t){const n=this.extent(t)[1];return n!=null?t(n):void 0};Tl.quartile=function(t){return(this._get!==t||!this._q)&&(this._q=QA(this.values(),t),this._get=t),this._q};Tl.q1=function(t){return this.quartile(t)[0]};Tl.q2=function(t){return this.quartile(t)[1]};Tl.q3=function(t){return this.quartile(t)[2]};Tl.ci=function(t){return(this._get!==t||!this._ci)&&(this._ci=Az(this.values(),1e3,.05,t),this._get=t),this._ci};Tl.ci0=function(t){return this.ci(t)[0]};Tl.ci1=function(t){return this.ci(t)[1]};function Xd(t){_r.call(this,null,t),this._adds=[],this._mods=[],this._alen=0,this._mlen=0,this._drop=!0,this._cross=!1,this._dims=[],this._dnames=[],this._measures=[],this._countOnly=!1,this._counts=null,this._prev=null,this._inputs=null,this._outputs=null}Xd.Definition={type:"Aggregate",metadata:{generates:!0,changes:!0},params:[{name:"groupby",type:"field",array:!0},{name:"ops",type:"enum",array:!0,values:Oy},{name:"fields",type:"field",null:!0,array:!0},{name:"as",type:"string",null:!0,array:!0},{name:"drop",type:"boolean",default:!0},{name:"cross",type:"boolean",default:!1},{name:"key",type:"field"}]};ni(Xd,_r,{transform(t,n){const e=this,o=n.fork(n.NO_SOURCE|n.NO_FIELDS),f=t.modified();return e.stamp=o.stamp,e.value&&(f||n.modified(e._inputs,!0))?(e._prev=e.value,e.value=f?e.init(t):{},n.visit(n.SOURCE,r=>e.add(r))):(e.value=e.value||e.init(t),n.visit(n.REM,r=>e.rem(r)),n.visit(n.ADD,r=>e.add(r))),o.modifies(e._outputs),e._drop=t.drop!==!1,t.cross&&e._dims.length>1&&(e._drop=!1,e.cross()),n.clean()&&e._drop&&o.clean(!0).runAfter(()=>this.clean()),e.changes(o)},cross(){const t=this,n=t.value,e=t._dnames,o=e.map(()=>({})),f=e.length;function r(u){let c,i,s,l;for(c in u)for(s=u[c].tuple,i=0;i{const v=xs(p);return f(p),e.push(v),v}),this.cellkey=t.key?t.key:_k(this._dims),this._countOnly=!0,this._counts=[],this._measures=[];const r=t.fields||[null],a=t.ops||["count"],u=t.as||[],c=r.length,i={};let s,l,d,h,m,g;for(c!==a.length&&Pr("Unmatched number of fields and aggregate ops."),g=0;gBz(p,p.field)),{}},cellkey:_k(),cell(t,n){let e=this.value[t];return e?e.num===0&&this._drop&&e.stamp{const l=o(s);s[u]=l,s[c]=l==null?null:f+r*(1+(l-f)/r)}:s=>s[u]=o(s)),n.modifies(e?a:u)},_bins(t){if(this.value&&!t.modified())return this.value;const n=t.field,e=Tz(t),o=e.step;let f=e.start,r=f+Math.ceil((e.stop-f)/o)*o,a,u;(a=t.anchor)!=null&&(u=a-(f+o*Math.floor((a-f)/o)),f+=u,r+=u);const c=function(i){let s=Rl(n(i));return s==null?null:sr?1/0:(s=Math.max(f,Math.min(s,r-o)),f+o*Math.floor(tJ+(s-f)/o))};return c.start=f,c.stop=e.stop,c.step=o,this.value=Nu(c,Bl(n),t.name||"bin_"+xs(n))}});function jz(t,n,e){const o=t;let f=n||[],r=e||[],a={},u=0;return{add:c=>r.push(c),remove:c=>a[o(c)]=++u,size:()=>f.length,data:(c,i)=>(u&&(f=f.filter(s=>!a[o(s)]),a={},u=0),i&&c&&f.sort(c),r.length&&(f=c?pI(c,f,r.sort(c)):f.concat(r),r=[]),f)}}function m6(t){_r.call(this,[],t)}m6.Definition={type:"Collect",metadata:{source:!0},params:[{name:"sort",type:"compare"}]};ni(m6,_r,{transform(t,n){const e=n.fork(n.ALL),o=jz($i,this.value,e.materialize(e.ADD).add),f=t.sort,r=n.changed()||f&&(t.modified("sort")||n.modified(f.fields));return e.visit(e.REM,o.remove),this.modified(r),this.value=e.source=o.data(H0(f),r),n.source&&n.source.root&&(this.value.root=n.source.root),e}});function Uz(t){Co.call(this,null,nJ,t)}ni(Uz,Co);function nJ(t){return this.value&&!t.modified()?this.value:EA(t.fields,t.orders)}function v6(t){_r.call(this,null,t)}v6.Definition={type:"CountPattern",metadata:{generates:!0,changes:!0},params:[{name:"field",type:"field",required:!0},{name:"case",type:"enum",values:["upper","lower","mixed"],default:"mixed"},{name:"pattern",type:"string",default:'[\\w"]+'},{name:"stopwords",type:"string",default:""},{name:"as",type:"string",array:!0,length:2,default:["text","count"]}]};function rJ(t,n,e){switch(n){case"upper":t=t.toUpperCase();break;case"lower":t=t.toLowerCase();break}return t.match(e)}ni(v6,_r,{transform(t,n){const e=l=>d=>{for(var h=rJ(u(d),t.case,r)||[],m,g=0,p=h.length;gf[l]=1+(f[l]||0)),s=e(l=>f[l]-=1);return o?n.visit(n.SOURCE,i):(n.visit(n.ADD,i),n.visit(n.REM,s)),this._finish(n,c)},_parameterCheck(t,n){let e=!1;return(t.modified("stopwords")||!this._stop)&&(this._stop=new RegExp("^"+(t.stopwords||"")+"$","i"),e=!0),(t.modified("pattern")||!this._match)&&(this._match=new RegExp(t.pattern||"[\\w']+","g"),e=!0),(t.modified("field")||n.modified(t.field.fields))&&(e=!0),e&&(this._counts={}),e},_finish(t,n){const e=this._counts,o=this._tuples||(this._tuples={}),f=n[0],r=n[1],a=t.fork(t.NO_SOURCE|t.NO_FIELDS);let u,c,i;for(u in e)c=o[u],i=e[u]||0,!c&&i?(o[u]=c=ro({}),c[f]=u,c[r]=i,a.add.push(c)):i===0?(c&&a.rem.push(c),e[u]=null,o[u]=null):c[r]!==i&&(c[r]=i,a.mod.push(c));return a.modifies(n)}});function y6(t){_r.call(this,null,t)}y6.Definition={type:"Cross",metadata:{generates:!0},params:[{name:"filter",type:"expr"},{name:"as",type:"string",array:!0,length:2,default:["a","b"]}]};ni(y6,_r,{transform(t,n){const e=n.fork(n.NO_SOURCE),o=t.as||["a","b"],f=o[0],r=o[1],a=!this.value||n.changed(n.ADD_REM)||t.modified("as")||t.modified("filter");let u=this.value;return a?(u&&(e.rem=u),u=n.materialize(n.SOURCE).source,e.add=this.value=iJ(u,f,r,t.filter||mc)):e.mod=u,e.source=this.value,e.modifies(o)}});function iJ(t,n,e,o){for(var f=[],r={},a=t.length,u=0,c,i;uVz(r,n))):typeof o[f]===e7&&o[f](t[f]);return o}function x6(t){_r.call(this,null,t)}const qz=[{key:{function:"normal"},params:[{name:"mean",type:"number",default:0},{name:"stdev",type:"number",default:1}]},{key:{function:"lognormal"},params:[{name:"mean",type:"number",default:0},{name:"stdev",type:"number",default:1}]},{key:{function:"uniform"},params:[{name:"min",type:"number",default:0},{name:"max",type:"number",default:1}]},{key:{function:"kde"},params:[{name:"field",type:"field",required:!0},{name:"from",type:"data"},{name:"bandwidth",type:"number",default:0}]}],sJ={key:{function:"mixture"},params:[{name:"distributions",type:"param",array:!0,params:qz},{name:"weights",type:"number",array:!0}]};x6.Definition={type:"Density",metadata:{generates:!0},params:[{name:"extent",type:"number",array:!0,length:2},{name:"steps",type:"number"},{name:"minsteps",type:"number",default:25},{name:"maxsteps",type:"number",default:200},{name:"method",type:"string",default:"pdf",values:["pdf","cdf"]},{name:"distribution",type:"param",params:qz.concat(sJ)},{name:"as",type:"string",array:!0,default:["value","density"]}]};ni(x6,_r,{transform(t,n){const e=n.fork(n.NO_SOURCE|n.NO_FIELDS);if(!this.value||n.changed()||t.modified()){const o=Vz(t.distribution,lJ(n)),f=t.steps||t.minsteps||25,r=t.steps||t.maxsteps||200;let a=t.method||"pdf";a!=="pdf"&&a!=="cdf"&&Pr("Invalid density method: "+a),!t.extent&&!o.data&&Pr("Missing density extent parameter."),a=o[a];const u=t.as||["value","density"],c=t.extent||Zf(o.data()),i=uw(a,c,f,r).map(s=>{const l={};return l[u[0]]=s[0],l[u[1]]=s[1],ro(l)});this.value&&(e.rem=this.value),this.value=e.add=e.source=i}return e}});function lJ(t){return()=>t.materialize(t.SOURCE).source}function Hz(t,n){return t?t.map((e,o)=>n[o]||xs(e)):null}function b6(t,n,e){const o=[],f=l=>l(c);let r,a,u,c,i,s;if(n==null)o.push(t.map(e));else for(r={},a=0,u=t.length;aAy(Zf(t,n))/30;ni(_6,_r,{transform(t,n){if(this.value&&!(t.modified()||n.changed()))return n;const e=n.materialize(n.SOURCE).source,o=b6(n.source,t.groupby,Hl),f=t.smooth||!1,r=t.field,a=t.step||uJ(e,r),u=H0((m,g)=>r(m)-r(g)),c=t.as||$z,i=o.length;let s=1/0,l=-1/0,d=0,h;for(;dl&&(l=g),m[++h][c]=g}return this.value={start:s,stop:l,step:a},n.reflow(!0).modifies(c)}});function Gz(t){Co.call(this,null,cJ,t),this.modified(!0)}ni(Gz,Co);function cJ(t){const n=t.expr;return this.value&&!t.modified("expr")?this.value:Nu(e=>n(e,t),Bl(n),xs(n))}function w6(t){_r.call(this,[void 0,void 0],t)}w6.Definition={type:"Extent",metadata:{},params:[{name:"field",type:"field",required:!0}]};ni(w6,_r,{transform(t,n){const e=this.value,o=t.field,f=n.changed()||n.modified(o.fields)||t.modified("field");let r=e[0],a=e[1];if((f||r==null)&&(r=1/0,a=-1/0),n.visit(f?n.SOURCE:n.ADD,u=>{const c=Rl(o(u));c!=null&&(ca&&(a=c))}),!Number.isFinite(r)||!Number.isFinite(a)){let u=xs(o);u&&(u=' for field "'.concat(u,'"')),n.dataflow.warn("Infinite extent".concat(u,": [").concat(r,", ").concat(a,"]")),r=a=void 0}this.value=[r,a]}});function k6(t,n){Co.call(this,t),this.parent=n,this.count=0}ni(k6,Co,{connect(t){return this.detachSubflow=t.detachSubflow,this.targets().add(t),t.source=this},add(t){this.count+=1,this.value.add.push(t)},rem(t){this.count-=1,this.value.rem.push(t)},mod(t){this.value.mod.push(t)},init(t){this.value.init(t,t.NO_SOURCE)},evaluate(){return this.value}});function cw(t){_r.call(this,{},t),this._keys=Hm();const n=this._targets=[];n.active=0,n.forEach=e=>{for(let o=0,f=n.active;oo&&o.count>0);this.initTargets(e)}},initTargets(t){const n=this._targets,e=n.length,o=t?t.length:0;let f=0;for(;fthis.subflow(c,f,n);return this._group=t.group||{},this.initTargets(),n.visit(n.REM,c=>{const i=$i(c),s=r.get(i);s!==void 0&&(r.delete(i),u(s).rem(c))}),n.visit(n.ADD,c=>{const i=o(c);r.set($i(c),i),u(i).add(c)}),a||n.modified(o.fields)?n.visit(n.MOD,c=>{const i=$i(c),s=r.get(i),l=o(c);s===l?u(l).mod(c):(r.set(i,l),u(s).rem(c),u(l).add(c))}):n.changed(n.MOD)&&n.visit(n.MOD,c=>{u(r.get($i(c))).mod(c)}),a&&n.visit(n.REFLOW,c=>{const i=$i(c),s=r.get(i),l=o(c);s!==l&&(r.set(i,l),u(s).rem(c),u(l).add(c))}),n.clean()?e.runAfter(()=>{this.clean(),r.clean()}):r.empty>e.cleanThreshold&&e.runAfter(r.clean),n}});function Wz(t){Co.call(this,null,fJ,t)}ni(Wz,Co);function fJ(t){return this.value&&!t.modified()?this.value:Ir(t.name)?ki(t.name).map(n=>Lu(n)):Lu(t.name,t.as)}function T6(t){_r.call(this,Hm(),t)}T6.Definition={type:"Filter",metadata:{changes:!0},params:[{name:"expr",type:"expr",required:!0}]};ni(T6,_r,{transform(t,n){const e=n.dataflow,o=this.value,f=n.fork(),r=f.add,a=f.rem,u=f.mod,c=t.expr;let i=!0;n.visit(n.REM,l=>{const d=$i(l);o.has(d)?o.delete(d):a.push(l)}),n.visit(n.ADD,l=>{c(l,t)?r.push(l):o.set($i(l),1)});function s(l){const d=$i(l),h=c(l,t),m=o.get(d);h&&m?(o.delete(d),r.push(l)):!h&&!m?(o.set(d,1),a.push(l)):i&&h&&!m&&u.push(l)}return n.visit(n.MOD,s),t.modified()&&(i=!1,n.visit(n.REFLOW,s)),o.empty>e.cleanThreshold&&e.runAfter(o.clean),f}});function A6(t){_r.call(this,[],t)}A6.Definition={type:"Flatten",metadata:{generates:!0},params:[{name:"fields",type:"field",array:!0,required:!0},{name:"index",type:"string"},{name:"as",type:"string",array:!0}]};ni(A6,_r,{transform(t,n){const e=n.fork(n.NO_SOURCE),o=t.fields,f=Hz(o,t.as||[]),r=t.index||null,a=f.length;return e.rem=this.value,n.visit(n.SOURCE,u=>{const c=o.map(m=>m(u)),i=c.reduce((m,g)=>Math.max(m,g.length),0);let s=0,l,d,h;for(;s{for(let s=0,l;sa[o]=e(a,t))}});function Yz(t){_r.call(this,[],t)}ni(Yz,_r,{transform(t,n){const e=n.fork(n.ALL),o=t.generator;let f=this.value,r=t.size-f.length,a,u,c;if(r>0){for(a=[];--r>=0;)a.push(c=ro(o(t))),f.push(c);e.add=e.add.length?e.materialize(e.ADD).add.concat(a):a}else u=f.slice(0,-r),e.rem=e.rem.length?e.materialize(e.REM).rem.concat(u):u,f=f.slice(-r);return e.source=this.value=f,e}});const tb={value:"value",median:TI,mean:QW,min:sk,max:d0},hJ=[];function E6(t){_r.call(this,[],t)}E6.Definition={type:"Impute",metadata:{changes:!0},params:[{name:"field",type:"field",required:!0},{name:"key",type:"field",required:!0},{name:"keyvals",array:!0},{name:"groupby",type:"field",array:!0},{name:"method",type:"enum",default:"value",values:["value","mean","median","max","min"]},{name:"value",default:0}]};function dJ(t){var n=t.method||tb.value,e;if(tb[n]==null)Pr("Unrecognized imputation method: "+n);else return n===tb.value?(e=t.value!==void 0?t.value:0,()=>e):tb[n]}function pJ(t){const n=t.field;return e=>e?n(e):NaN}ni(E6,_r,{transform(t,n){var e=n.fork(n.ALL),o=dJ(t),f=pJ(t),r=xs(t.field),a=xs(t.key),u=(t.groupby||[]).map(xs),c=gJ(n.source,t.groupby,t.key,t.keyvals),i=[],s=this.value,l=c.domain.length,d,h,m,g,p,v,y,x,w,k;for(p=0,x=c.length;pv(p),r=[],a=o?o.slice():[],u={},c={},i,s,l,d,h,m,g,p;for(a.forEach((v,y)=>u[v]=y+1),d=0,g=t.length;de.add(r))):(f=e.value=e.value||this.init(t),n.visit(n.REM,r=>e.rem(r)),n.visit(n.ADD,r=>e.add(r))),e.changes(),n.visit(n.SOURCE,r=>{pa(r,f[e.cellkey(r)].tuple)}),n.reflow(o).modifies(this._outputs)},changes(){const t=this._adds,n=this._mods;let e,o;for(e=0,o=this._alen;e{const m=r6(h,a)[u],g=t.counts?h.length:1,p=s||Zf(h);uw(m,p,l,d).forEach(v=>{const y={};for(let x=0;x(this._pending=ki(f.data),r=>r.touch(this)))}:e.request(t.url,t.format).then(o=>R5(this,n,ki(o.data)))}});function vJ(t){return t.modified("async")&&!(t.modified("values")||t.modified("url")||t.modified("format"))}function R5(t,n,e){e.forEach(ro);const o=n.fork(n.NO_FIELDS&n.NO_SOURCE);return o.rem=t.value,t.value=o.source=o.add=e,t._pending=null,o.rem.length&&o.clean(!0),o}function L6(t){_r.call(this,{},t)}L6.Definition={type:"Lookup",metadata:{modifies:!0},params:[{name:"index",type:"index",params:[{name:"from",type:"data",required:!0},{name:"key",type:"field",required:!0}]},{name:"values",type:"field",array:!0},{name:"fields",type:"field",array:!0,required:!0},{name:"as",type:"string",array:!0},{name:"default",default:null}]};ni(L6,_r,{transform(t,n){const e=t.fields,o=t.index,f=t.values,r=t.default==null?null:t.default,a=t.modified(),u=e.length;let c=a?n.SOURCE:n.ADD,i=n,s=t.as,l,d,h;return f?(d=f.length,u>1&&!s&&Pr('Multi-field lookup requires explicit "as" parameter.'),s&&s.length!==u*d&&Pr('The "as" parameter has too few output field names.'),s=s||f.map(xs),l=function(m){for(var g=0,p=0,v,y;gn.modified(m.fields)),c|=h?n.MOD:0),n.visit(c,l),i.modifies(s)}});function Jz(t){Co.call(this,null,yJ,t)}ni(Jz,Co);function yJ(t){if(this.value&&!t.modified())return this.value;const n=t.extents,e=n.length;let o=1/0,f=-1/0,r,a;for(r=0;rf&&(f=a[1]);return[o,f]}function Kz(t){Co.call(this,null,xJ,t)}ni(Kz,Co);function xJ(t){return this.value&&!t.modified()?this.value:t.values.reduce((n,e)=>n.concat(e),[])}function Qz(t){_r.call(this,null,t)}ni(Qz,_r,{transform(t,n){return this.modified(t.modified()),this.value=t,n.fork(n.NO_SOURCE|n.NO_FIELDS)}});function P6(t){Xd.call(this,t)}P6.Definition={type:"Pivot",metadata:{generates:!0,changes:!0},params:[{name:"groupby",type:"field",array:!0},{name:"field",type:"field",required:!0},{name:"value",type:"field",required:!0},{name:"op",type:"enum",values:Oy,default:"sum"},{name:"limit",type:"number",default:0},{name:"key",type:"field"}]};ni(P6,Xd,{_transform:Xd.prototype.transform,transform(t,n){return this._transform(bJ(t,n),n)}});function bJ(t,n){const e=t.field,o=t.value,f=(t.op==="count"?"__count__":t.op)||"sum",r=Bl(e).concat(Bl(o)),a=wJ(e,t.limit||0,n);return n.changed()&&t.set("__pivot__",null,null,!0),{key:t.key,groupby:t.groupby,ops:a.map(()=>f),fields:a.map(u=>_J(u,e,o,r)),as:a.map(u=>u+""),modified:t.modified.bind(t)}}function _J(t,n,e,o){return Nu(f=>n(f)===t?e(f):NaN,o,t+"")}function wJ(t,n,e){const o={},f=[];return e.visit(e.SOURCE,r=>{const a=t(r);o[a]||(o[a]=1,f.push(a))}),f.sort(J2),n?f.slice(0,n):f}function eR(t){cw.call(this,t)}ni(eR,cw,{transform(t,n){const e=t.subflow,o=t.field,f=r=>this.subflow($i(r),e,n,r);return(t.modified("field")||o&&n.modified(Bl(o)))&&Pr("PreFacet does not support field modification."),this.initTargets(),o?(n.visit(n.MOD,r=>{const a=f(r);o(r).forEach(u=>a.mod(u))}),n.visit(n.ADD,r=>{const a=f(r);o(r).forEach(u=>a.add(ro(u)))}),n.visit(n.REM,r=>{const a=f(r);o(r).forEach(u=>a.rem(u))})):(n.visit(n.MOD,r=>f(r).mod(r)),n.visit(n.ADD,r=>f(r).add(r)),n.visit(n.REM,r=>f(r).rem(r))),n.clean()&&n.runAfter(()=>this.clean()),n}});function D6(t){_r.call(this,null,t)}D6.Definition={type:"Project",metadata:{generates:!0,changes:!0},params:[{name:"fields",type:"field",array:!0},{name:"as",type:"string",null:!0,array:!0}]};ni(D6,_r,{transform(t,n){const e=n.fork(n.NO_SOURCE),o=t.fields,f=Hz(t.fields,t.as||[]),r=o?(u,c)=>kJ(u,c,o,f):nw;let a;return this.value?a=this.value:(n=n.addAll(),a=this.value={}),n.visit(n.REM,u=>{const c=$i(u);e.rem.push(a[c]),a[c]=null}),n.visit(n.ADD,u=>{const c=r(u,ro({}));a[$i(u)]=c,e.add.push(c)}),n.visit(n.MOD,u=>{e.mod.push(r(u,a[$i(u)]))}),e}});function kJ(t,n,e,o){for(let f=0,r=e.length;f{const d=KA(l,i);for(let h=0;h{const r=$i(f);e.rem.push(o[r]),o[r]=null}),n.visit(n.ADD,f=>{const r=XA(f);o[$i(f)]=r,e.add.push(r)}),n.visit(n.MOD,f=>{const r=o[$i(f)];for(const a in f)r[a]=f[a],e.modifies(a);e.mod.push(r)})),e}});function z6(t){_r.call(this,[],t),this.count=0}z6.Definition={type:"Sample",metadata:{},params:[{name:"size",type:"number",default:1e3}]};ni(z6,_r,{transform(t,n){const e=n.fork(n.NO_SOURCE),o=t.modified("size"),f=t.size,r=this.value.reduce((s,l)=>(s[$i(l)]=1,s),{});let a=this.value,u=this.count,c=0;function i(s){let l,d;a.length=c&&(l=a[d],r[$i(l)]&&e.rem.push(l),a[d]=s)),++u}if(n.rem.length&&(n.visit(n.REM,s=>{const l=$i(s);r[l]&&(r[l]=-1,e.rem.push(s)),--u}),a=a.filter(s=>r[$i(s)]!==-1)),(n.rem.length||o)&&a.length{r[$i(s)]||i(s)}),c=-1),o&&a.length>f){const s=a.length-f;for(let l=0;l{r[$i(s)]&&e.mod.push(s)}),n.add.length&&n.visit(n.ADD,i),(n.add.length||c<0)&&(e.add=a.filter(s=>!r[$i(s)])),this.count=u,this.value=e.source=a,e}});function R6(t){_r.call(this,null,t)}R6.Definition={type:"Sequence",metadata:{generates:!0,changes:!0},params:[{name:"start",type:"number",required:!0},{name:"stop",type:"number",required:!0},{name:"step",type:"number",default:1},{name:"as",type:"string",default:"data"}]};ni(R6,_r,{transform(t,n){if(this.value&&!t.modified())return;const e=n.materialize().fork(n.MOD),o=t.as||"data";return e.rem=this.value?n.rem.concat(this.value):n.rem,this.value=Ju(t.start,t.stop,t.step||1).map(f=>{const r={};return r[o]=f,ro(r)}),e.add=n.add.concat(this.value),e}});function rR(t){_r.call(this,null,t),this.modified(!0)}ni(rR,_r,{transform(t,n){return this.value=n.source,n.changed()?n.fork(n.NO_SOURCE|n.NO_FIELDS):n.StopPropagation}});function F6(t){_r.call(this,null,t)}const iR=["unit0","unit1"];F6.Definition={type:"TimeUnit",metadata:{modifies:!0},params:[{name:"field",type:"field",required:!0},{name:"interval",type:"boolean",default:!0},{name:"units",type:"enum",values:jA,array:!0},{name:"step",type:"number",default:1},{name:"maxbins",type:"number",default:40},{name:"extent",type:"date",array:!0},{name:"timezone",type:"enum",default:"local",values:["local","utc"]},{name:"as",type:"string",array:!0,length:2,default:iR}]};ni(F6,_r,{transform(t,n){const e=t.field,o=t.interval!==!1,f=t.timezone==="utc",r=this._floor(t,n),a=(f?Gm:$m)(r.unit).offset,u=t.as||iR,c=u[0],i=u[1],s=r.step;let l=r.start||1/0,d=r.stop||-1/0,h=n.ADD;return(t.modified()||n.changed(n.REM)||n.modified(Bl(e)))&&(n=n.reflow(!0),h=n.SOURCE,l=1/0,d=-1/0),n.visit(h,m=>{const g=e(m);let p,v;g==null?(m[c]=null,o&&(m[i]=null)):(m[c]=p=v=r(g),o&&(m[i]=v=a(p,s)),pd&&(d=v))}),r.start=l,r.stop=d,n.modifies(o?u:c)},_floor(t,n){const e=t.timezone==="utc",{units:o,step:f}=t.units?{units:t.units,step:t.step||1}:YI({extent:t.extent||Zf(n.materialize(n.SOURCE).source,t.field),maxbins:t.maxbins}),r=UA(o),a=this.value||{},u=(e?BI:NI)(r,f);return u.unit=Na(r),u.units=r,u.step=f,u.start=a.start,u.stop=a.stop,this.value=u}});function aR(t){_r.call(this,Hm(),t)}ni(aR,_r,{transform(t,n){const e=n.dataflow,o=t.field,f=this.value,r=u=>f.set(o(u),u);let a=!0;return t.modified("field")||n.modified(o.fields)?(f.clear(),n.visit(n.SOURCE,r)):n.changed()?(n.visit(n.REM,u=>f.delete(o(u))),n.visit(n.ADD,r)):a=!1,this.modified(a),f.empty>e.cleanThreshold&&e.runAfter(f.clean),n.fork()}});function oR(t){_r.call(this,null,t)}ni(oR,_r,{transform(t,n){(!this.value||t.modified("field")||t.modified("sort")||n.changed()||t.sort&&n.modified(t.sort.fields))&&(this.value=(t.sort?n.source.slice().sort(H0(t.sort)):n.source).map(t.field))}});function AJ(t,n,e,o){const f=Yv[t](n,e);return{init:f.init||Md,update:function(r,a){a[o]=f.next(r)}}}const Yv={row_number:function(){return{next:t=>t.index+1}},rank:function(){let t;return{init:()=>t=1,next:n=>{const e=n.index,o=n.data;return e&&n.compare(o[e-1],o[e])?t=e+1:t}}},dense_rank:function(){let t;return{init:()=>t=1,next:n=>{const e=n.index,o=n.data;return e&&n.compare(o[e-1],o[e])?++t:t}}},percent_rank:function(){const t=Yv.rank(),n=t.next;return{init:t.init,next:e=>(n(e)-1)/(e.data.length-1)}},cume_dist:function(){let t;return{init:()=>t=0,next:n=>{const e=n.data,o=n.compare;let f=n.index;if(t0||Pr("ntile num must be greater than zero.");const e=Yv.cume_dist(),o=e.next;return{init:e.init,next:f=>Math.ceil(n*o(f))}},lag:function(t,n){return n=+n||1,{next:e=>{const o=e.index-n;return o>=0?t(e.data[o]):null}}},lead:function(t,n){return n=+n||1,{next:e=>{const o=e.index+n,f=e.data;return ot(n.data[n.i0])}},last_value:function(t){return{next:n=>t(n.data[n.i1-1])}},nth_value:function(t,n){return n=+n,n>0||Pr("nth_value nth must be greater than zero."),{next:e=>{const o=e.i0+(n-1);return on=null,next:e=>{const o=t(e.data[e.index]);return o!=null?n=o:n}}},next_value:function(t){let n,e;return{init:()=>(n=null,e=-1),next:o=>{const f=o.data;return o.index<=e?n:(e=MJ(t,f,o.index))<0?(e=f.length,n=null):n=t(f[e])}}}};function MJ(t,n,e){for(let o=n.length;eu[m]=1)}d(t.sort),n.forEach((h,m)=>{const g=e[m],p=xs(g),v=Rz(h,p,f[m]);if(d(g),r.push(v),qi(Yv,h))a.push(AJ(h,e[m],o[m],v));else{if(g==null&&h!=="count"&&Pr("Null aggregate field specified."),h==="count"){i.push(v);return}l=!1;let y=c[p];y||(y=c[p]=[],y.field=g,s.push(y)),y.push(Fz(h,v))}}),(i.length||s.length)&&(this.cell=EJ(s,i,l)),this.inputs=Object.keys(u)}const lR=sR.prototype;lR.init=function(){this.windows.forEach(t=>t.init()),this.cell&&this.cell.init()};lR.update=function(t,n){const e=this.cell,o=this.windows,f=t.data,r=o&&o.length;let a;if(e){for(a=t.p0;aBz(c,c.field));const o={num:0,agg:null,store:!1,count:n};if(!e)for(var f=t.length,r=o.agg=Array(f),a=0;athis.group(f(u));let a=this.state;(!a||e)&&(a=this.state=new sR(t)),e||n.modified(a.inputs)?(this.value={},n.visit(n.SOURCE,u=>r(u).add(u))):(n.visit(n.REM,u=>r(u).remove(u)),n.visit(n.ADD,u=>r(u).add(u)));for(let u=0,c=this._mlen;u0&&!f(r[e],r[e-1])&&(t.i0=n.left(r,r[e])),o1?0:t<-1?fm:Math.acos(t)}function n7(t){return t>=1?b_:t<=-1?-b_:Math.asin(t)}function zJ(t){return t.innerRadius}function RJ(t){return t.outerRadius}function FJ(t){return t.startAngle}function NJ(t){return t.endAngle}function BJ(t){return t&&t.padAngle}function jJ(t,n,e,o,f,r,a,u){var c=e-t,i=o-n,s=a-f,l=u-r,d=l*c-s*i;if(!(d*dO*O+R*R&&(_=A,M=S),{cx:_,cy:M,x01:-s,y01:-l,x11:_*(f/k-1),y11:M*(f/k-1)}}function UJ(){var t=zJ,n=RJ,e=Yo(0),o=null,f=FJ,r=NJ,a=BJ,u=null;function c(){var i,s,l=+t.apply(this,arguments),d=+n.apply(this,arguments),h=f.apply(this,arguments)-b_,m=r.apply(this,arguments)-b_,g=t7(m-h),p=m>h;if(u||(u=i=Bm()),dLl))u.moveTo(0,0);else if(g>uR-Ll)u.moveTo(d*Np(h),d*Of(h)),u.arc(0,0,d,h,m,!p),l>Ll&&(u.moveTo(l*Np(m),l*Of(m)),u.arc(0,0,l,m,h,p));else{var v=h,y=m,x=h,w=m,k=g,b=g,T=a.apply(this,arguments)/2,_=T>Ll&&(o?+o.apply(this,arguments):i0(l*l+d*d)),M=F5(t7(d-l)/2,+e.apply(this,arguments)),A=M,S=M,E,D;if(_>Ll){var O=n7(_/l*Of(T)),R=n7(_/d*Of(T));(k-=O*2)>Ll?(O*=p?1:-1,x+=O,w-=O):(k=0,x=w=(h+m)/2),(b-=R*2)>Ll?(R*=p?1:-1,v+=R,y-=R):(b=0,v=y=(h+m)/2)}var z=d*Np(v),L=d*Of(v),P=l*Np(w),N=l*Of(w);if(M>Ll){var B=d*Np(y),G=d*Of(y),W=l*Np(x),K=l*Of(x),te;if(gLl?S>Ll?(E=nb(W,K,z,L,d,S,p),D=nb(B,G,P,N,d,S,p),u.moveTo(E.cx+E.x01,E.cy+E.y01),SLl)||!(k>Ll)?u.lineTo(P,N):A>Ll?(E=nb(P,N,B,G,l,-A,p),D=nb(z,L,W,K,l,-A,p),u.lineTo(E.cx+E.x01,E.cy+E.y01),A=d;--h)u.point(y[h],x[h]);u.lineEnd(),u.areaEnd()}p&&(y[l]=+t(g,l,s),x[l]=+n(g,l,s),u.point(o?+o(g,l,s):y[l],e?+e(g,l,s):x[l]))}if(v)return u=null,v+""||null}function i(){return BD().defined(f).curve(a).context(r)}return c.x=function(s){return arguments.length?(t=typeof s=="function"?s:Yo(+s),o=null,c):t},c.x0=function(s){return arguments.length?(t=typeof s=="function"?s:Yo(+s),c):t},c.x1=function(s){return arguments.length?(o=s==null?null:typeof s=="function"?s:Yo(+s),c):o},c.y=function(s){return arguments.length?(n=typeof s=="function"?s:Yo(+s),e=null,c):n},c.y0=function(s){return arguments.length?(n=typeof s=="function"?s:Yo(+s),c):n},c.y1=function(s){return arguments.length?(e=s==null?null:typeof s=="function"?s:Yo(+s),c):e},c.lineX0=c.lineY0=function(){return i().x(t).y(n)},c.lineY1=function(){return i().x(t).y(e)},c.lineX1=function(){return i().x(o).y(n)},c.defined=function(s){return arguments.length?(f=typeof s=="function"?s:Yo(!!s),c):f},c.curve=function(s){return arguments.length?(a=s,r!=null&&(u=a(r)),c):a},c.context=function(s){return arguments.length?(s==null?r=u=null:u=a(r=s),c):r},c}var VJ={draw(t,n){const e=i0(n/fm);t.moveTo(e,0),t.arc(0,0,e,0,uR)}};function qJ(t,n){let e=null;t=typeof t=="function"?t:Yo(t||VJ),n=typeof n=="function"?n:Yo(n===void 0?64:+n);function o(){let f;if(e||(e=f=Bm()),t.apply(this,arguments).draw(e,+n.apply(this,arguments)),f)return e=null,f+""||null}return o.type=function(f){return arguments.length?(t=typeof f=="function"?f:Yo(f),o):t},o.size=function(f){return arguments.length?(n=typeof f=="function"?f:Yo(+f),o):n},o.context=function(f){return arguments.length?(e=f??null,o):e},o}function Zd(){}function __(t,n,e){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+n)/6,(t._y0+4*t._y1+e)/6)}function fw(t){this._context=t}fw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:__(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:__(this,t,n);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};function HJ(t){return new fw(t)}function fR(t){this._context=t}fR.prototype={areaStart:Zd,areaEnd:Zd,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x2=t,this._y2=n;break;case 1:this._point=2,this._x3=t,this._y3=n;break;case 2:this._point=3,this._x4=t,this._y4=n,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+n)/6);break;default:__(this,t,n);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};function $J(t){return new fR(t)}function hR(t){this._context=t}hR.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var e=(this._x0+4*this._x1+t)/6,o=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(e,o):this._context.moveTo(e,o);break;case 3:this._point=4;default:__(this,t,n);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};function GJ(t){return new hR(t)}function dR(t,n){this._basis=new fw(t),this._beta=n}dR.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,n=this._y,e=t.length-1;if(e>0)for(var o=t[0],f=n[0],r=t[e]-o,a=n[e]-f,u=-1,c;++u<=e;)c=u/e,this._basis.point(this._beta*t[u]+(1-this._beta)*(o+c*r),this._beta*n[u]+(1-this._beta)*(f+c*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,n){this._x.push(+t),this._y.push(+n)}};var WJ=function t(n){function e(o){return n===1?new fw(o):new dR(o,n)}return e.beta=function(o){return t(+o)},e}(.85);function w_(t,n,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function B6(t,n){this._context=t,this._k=(1-n)/6}B6.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:w_(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:w_(this,t,n);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var YJ=function t(n){function e(o){return new B6(o,n)}return e.tension=function(o){return t(+o)},e}(0);function j6(t,n){this._context=t,this._k=(1-n)/6}j6.prototype={areaStart:Zd,areaEnd:Zd,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:w_(this,t,n);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var XJ=function t(n){function e(o){return new j6(o,n)}return e.tension=function(o){return t(+o)},e}(0);function U6(t,n){this._context=t,this._k=(1-n)/6}U6.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:w_(this,t,n);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var ZJ=function t(n){function e(o){return new U6(o,n)}return e.tension=function(o){return t(+o)},e}(0);function V6(t,n,e){var o=t._x1,f=t._y1,r=t._x2,a=t._y2;if(t._l01_a>Ll){var u=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);o=(o*u-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,f=(f*u-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>Ll){var i=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,s=3*t._l23_a*(t._l23_a+t._l12_a);r=(r*i+t._x1*t._l23_2a-n*t._l12_2a)/s,a=(a*i+t._y1*t._l23_2a-e*t._l12_2a)/s}t._context.bezierCurveTo(o,f,r,a,t._x2,t._y2)}function pR(t,n){this._context=t,this._alpha=n}pR.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,o=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+o*o,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3;default:V6(this,t,n);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var JJ=function t(n){function e(o){return n?new pR(o,n):new B6(o,0)}return e.alpha=function(o){return t(+o)},e}(.5);function gR(t,n){this._context=t,this._alpha=n}gR.prototype={areaStart:Zd,areaEnd:Zd,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,o=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+o*o,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:V6(this,t,n);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var KJ=function t(n){function e(o){return n?new gR(o,n):new j6(o,0)}return e.alpha=function(o){return t(+o)},e}(.5);function mR(t,n){this._context=t,this._alpha=n}mR.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,o=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+o*o,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:V6(this,t,n);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var QJ=function t(n){function e(o){return n?new mR(o,n):new U6(o,0)}return e.alpha=function(o){return t(+o)},e}(.5);function vR(t){this._context=t}vR.prototype={areaStart:Zd,areaEnd:Zd,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,n){t=+t,n=+n,this._point?this._context.lineTo(t,n):(this._point=1,this._context.moveTo(t,n))}};function eK(t){return new vR(t)}function r7(t){return t<0?-1:1}function i7(t,n,e){var o=t._x1-t._x0,f=n-t._x1,r=(t._y1-t._y0)/(o||f<0&&-0),a=(e-t._y1)/(f||o<0&&-0),u=(r*f+a*o)/(o+f);return(r7(r)+r7(a))*Math.min(Math.abs(r),Math.abs(a),.5*Math.abs(u))||0}function a7(t,n){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-n)/2:n}function N5(t,n,e){var o=t._x0,f=t._y0,r=t._x1,a=t._y1,u=(r-o)/3;t._context.bezierCurveTo(o+u,f+u*n,r-u,a-u*e,r,a)}function k_(t){this._context=t}k_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:N5(this,this._t0,a7(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){var e=NaN;if(t=+t,n=+n,!(t===this._x1&&n===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,N5(this,a7(this,e=i7(this,t,n)),e);break;default:N5(this,this._t0,e=i7(this,t,n));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n,this._t0=e}}};function yR(t){this._context=new xR(t)}(yR.prototype=Object.create(k_.prototype)).point=function(t,n){k_.prototype.point.call(this,n,t)};function xR(t){this._context=t}xR.prototype={moveTo:function(t,n){this._context.moveTo(n,t)},closePath:function(){this._context.closePath()},lineTo:function(t,n){this._context.lineTo(n,t)},bezierCurveTo:function(t,n,e,o,f,r){this._context.bezierCurveTo(n,t,o,e,r,f)}};function tK(t){return new k_(t)}function nK(t){return new yR(t)}function bR(t){this._context=t}bR.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,n=this._y,e=t.length;if(e)if(this._line?this._context.lineTo(t[0],n[0]):this._context.moveTo(t[0],n[0]),e===2)this._context.lineTo(t[1],n[1]);else for(var o=o7(t),f=o7(n),r=0,a=1;a=0;--n)f[n]=(a[n]-f[n+1])/r[n];for(r[e-1]=(t[e]+f[e-1])/2,n=0;n=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var e=this._x*(1-this._t)+t*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,n)}break}}this._x=t,this._y=n}};function iK(t){return new hw(t,.5)}function aK(t){return new hw(t,0)}function oK(t){return new hw(t,1)}function Vd(t,n){if(typeof document<"u"&&document.createElement){const e=document.createElement("canvas");if(e&&e.getContext)return e.width=t,e.height=n,e}return null}const sK=()=>typeof Image<"u"?Image:null,wk=Symbol("implicit");function q6(){var t=new EC,n=[],e=[],o=wk;function f(r){let a=t.get(r);if(a===void 0){if(o!==wk)return o;t.set(r,a=n.push(r)-1)}return e[a%e.length]}return f.domain=function(r){if(!arguments.length)return n.slice();n=[],t=new EC;for(const a of r)t.has(a)||t.set(a,n.push(a)-1);return f},f.range=function(r){return arguments.length?(e=Array.from(r),f):e.slice()},f.unknown=function(r){return arguments.length?(o=r,f):o},f.copy=function(){return q6(n,e).unknown(o)},Zh.apply(f,arguments),f}const _R=Math.PI/180,wR=180/Math.PI,T_=18,kR=.96422,TR=1,AR=.82521,MR=4/29,em=6/29,SR=3*em*em,lK=em*em*em;function ER(t){if(t instanceof $f)return new $f(t.l,t.a,t.b,t.opacity);if(t instanceof Rh)return CR(t);t instanceof q2||(t=UD(t));var n=V5(t.r),e=V5(t.g),o=V5(t.b),f=B5((.2225045*n+.7168786*e+.0606169*o)/TR),r,a;return n===e&&e===o?r=a=f:(r=B5((.4360747*n+.3850649*e+.1430804*o)/kR),a=B5((.0139322*n+.0971045*e+.7141733*o)/AR)),new $f(116*f-16,500*(r-f),200*(f-a),t.opacity)}function A_(t,n,e,o){return arguments.length===1?ER(t):new $f(t,n,e,o??1)}function $f(t,n,e,o){this.l=+t,this.a=+n,this.b=+e,this.opacity=+o}mA($f,A_,vA(yA,{brighter:function(t){return new $f(this.l+T_*(t??1),this.a,this.b,this.opacity)},darker:function(t){return new $f(this.l-T_*(t??1),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,n=isNaN(this.a)?t:t+this.a/500,e=isNaN(this.b)?t:t-this.b/200;return n=kR*j5(n),t=TR*j5(t),e=AR*j5(e),new q2(U5(3.1338561*n-1.6168667*t-.4906146*e),U5(-.9787684*n+1.9161415*t+.033454*e),U5(.0719453*n-.2289914*t+1.4052427*e),this.opacity)}}));function B5(t){return t>lK?Math.pow(t,1/3):t/SR+MR}function j5(t){return t>em?t*t*t:SR*(t-MR)}function U5(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function V5(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function uK(t){if(t instanceof Rh)return new Rh(t.h,t.c,t.l,t.opacity);if(t instanceof $f||(t=ER(t)),t.a===0&&t.b===0)return new Rh(NaN,0180?s+=360:s-i>180&&(i+=360),d.push({i:l.push(f(l)+"rotate(",null,o)-2,x:Xp(i,s)})):s&&l.push(f(l)+"rotate("+s+o)}function u(i,s,l,d){i!==s?d.push({i:l.push(f(l)+"skewX(",null,o)-2,x:Xp(i,s)}):s&&l.push(f(l)+"skewX("+s+o)}function c(i,s,l,d,h,m){if(i!==l||s!==d){var g=h.push(f(h)+"scale(",null,",",null,")");m.push({i:g-4,x:Xp(i,l)},{i:g-2,x:Xp(s,d)})}else(l!==1||d!==1)&&h.push(f(h)+"scale("+l+","+d+")")}return function(i,s){var l=[],d=[];return i=t(i),s=t(s),r(i.translateX,i.translateY,s.translateX,s.translateY,l,d),a(i.rotate,s.rotate,l,d),u(i.skewX,s.skewX,l,d),c(i.scaleX,i.scaleY,s.scaleX,s.scaleY,l,d),i=s=null,function(h){for(var m=-1,g=d.length,p;++mMath.pow(t,n)}function IK(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),n=>Math.log(n)/t)}function p7(t){return(n,e)=>-t(-n,e)}function W6(t){const n=t(h7,d7),e=n.domain;let o=10,f,r;function a(){return f=IK(o),r=DK(o),e()[0]<0?(f=p7(f),r=p7(r),t(OK,LK)):t(h7,d7),n}return n.base=function(u){return arguments.length?(o=+u,a()):o},n.domain=function(u){return arguments.length?(e(u),a()):e()},n.ticks=u=>{const c=e();let i=c[0],s=c[c.length-1];const l=s0){for(;d<=h;++d)for(m=1;ms)break;v.push(g)}}else for(;d<=h;++d)for(m=o-1;m>=1;--m)if(g=d>0?m/r(-d):m*r(d),!(gs)break;v.push(g)}v.length*2{if(u==null&&(u=10),c==null&&(c=o===10?"s":","),typeof c!="function"&&(!(o%1)&&(c=K4(c)).precision==null&&(c.trim=!0),c=ND(c)),u===1/0)return c;const i=Math.max(1,o*u/n.ticks().length);return s=>{let l=s/r(Math.round(f(s)));return l*oe(FR(e(),{floor:u=>r(Math.floor(f(u))),ceil:u=>r(Math.ceil(f(u)))})),n}function NR(){const t=W6(xA()).domain([1,10]);return t.copy=()=>G2(t,NR()).base(t.base()),Zh.apply(t,arguments),t}function g7(t){return function(n){return Math.sign(n)*Math.log1p(Math.abs(n/t))}}function m7(t){return function(n){return Math.sign(n)*Math.expm1(Math.abs(n))*t}}function Y6(t){var n=1,e=t(g7(n),m7(n));return e.constant=function(o){return arguments.length?t(g7(n=+o),m7(n)):n},jm(e)}function BR(){var t=Y6(xA());return t.copy=function(){return G2(t,BR()).constant(t.constant())},Zh.apply(t,arguments)}function v7(t){return function(n){return n<0?-Math.pow(-n,t):Math.pow(n,t)}}function zK(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function RK(t){return t<0?-t*t:t*t}function X6(t){var n=t(Ed,Ed),e=1;function o(){return e===1?t(Ed,Ed):e===.5?t(zK,RK):t(v7(e),v7(1/e))}return n.exponent=function(f){return arguments.length?(e=+f,o()):e},jm(n)}function Z6(){var t=X6(xA());return t.copy=function(){return G2(t,Z6()).exponent(t.exponent())},Zh.apply(t,arguments),t}function FK(){return Z6.apply(null,arguments).exponent(.5)}function jR(){var t=[],n=[],e=[],o;function f(){var a=0,u=Math.max(1,n.length);for(e=new Array(u-1);++a0?e[u-1]:t[0],u=e?[o[e-1],n]:[o[i-1],o[i]]},a.unknown=function(c){return arguments.length&&(r=c),a},a.thresholds=function(){return o.slice()},a.copy=function(){return UR().domain([t,n]).range(f).unknown(r)},Zh.apply(jm(a),arguments)}function VR(){var t=[.5],n=[0,1],e,o=1;function f(r){return r!=null&&r<=r?n[W2(t,r,0,o)]:e}return f.domain=function(r){return arguments.length?(t=Array.from(r),o=Math.min(t.length,n.length-1),f):t.slice()},f.range=function(r){return arguments.length?(n=Array.from(r),o=Math.min(t.length,n.length-1),f):n.slice()},f.invertExtent=function(r){var a=n.indexOf(r);return[t[a-1],t[a]]},f.unknown=function(r){return arguments.length?(e=r,f):e},f.copy=function(){return VR().domain(t).range(n).unknown(e)},Zh.apply(f,arguments)}function NK(t){return new Date(t)}function BK(t){return t instanceof Date?+t:+new Date(+t)}function J6(t,n,e,o,f,r,a,u,c,i){var s=oW(),l=s.invert,d=s.domain,h=i(".%L"),m=i(":%S"),g=i("%I:%M"),p=i("%I %p"),v=i("%a %d"),y=i("%b %d"),x=i("%B"),w=i("%Y");function k(b){return(c(b)0?o:1:0}const HK="identity",hm="linear",Wh="log",Ly="pow",Py="sqrt",mw="symlog",w0="time",k0="utc",Gf="sequential",Ym="diverging",dm="quantile",vw="quantize",yw="threshold",nM="ordinal",Ak="point",YR="band",rM="bin-ordinal",Xs="continuous",Dy="discrete",Iy="discretizing",kc="interpolating",iM="temporal";function $K(t){return function(n){let e=n[0],o=n[1],f;return o=o&&e[c]<=f&&(r<0&&(r=c),a=c);if(!(r<0))return o=t.invertExtent(e[r]),f=t.invertExtent(e[a]),[o[0]===void 0?o[1]:o[0],f[1]===void 0?f[0]:f[1]]}}function aM(){const t=q6().unknown(void 0),n=t.domain,e=t.range;let o=[0,1],f,r,a=!1,u=0,c=0,i=.5;delete t.unknown;function s(){const l=n().length,d=o[1]g+f*v);return e(d?p.reverse():p)}return t.domain=function(l){return arguments.length?(n(l),s()):n()},t.range=function(l){return arguments.length?(o=[+l[0],+l[1]],s()):o.slice()},t.rangeRound=function(l){return o=[+l[0],+l[1]],a=!0,s()},t.bandwidth=function(){return r},t.step=function(){return f},t.round=function(l){return arguments.length?(a=!!l,s()):a},t.padding=function(l){return arguments.length?(c=Math.max(0,Math.min(1,l)),u=c,s()):u},t.paddingInner=function(l){return arguments.length?(u=Math.max(0,Math.min(1,l)),s()):u},t.paddingOuter=function(l){return arguments.length?(c=Math.max(0,Math.min(1,l)),s()):c},t.align=function(l){return arguments.length?(i=Math.max(0,Math.min(1,l)),s()):i},t.invertRange=function(l){if(l[0]==null||l[1]==null)return;const d=o[1]o[1-d])))return v=Math.max(0,ek(h,g)-1),y=g===p?v:ek(h,p)-1,g-h[v]>r+1e-10&&++v,d&&(x=v,v=m-y,y=m-x),v>y?void 0:n().slice(v,y+1)},t.invert=function(l){const d=t.invertRange([l,l]);return d&&d[0]},t.copy=function(){return aM().domain(n()).range(o).round(a).paddingInner(u).paddingOuter(c).align(i)},s()}function XR(t){const n=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,t.copy=function(){return XR(n())},t}function WK(){return XR(aM().paddingInner(1))}var YK=Array.prototype.map;function XK(t){return YK.call(t,Rl)}const ZK=Array.prototype.slice;function ZR(){let t=[],n=[];function e(o){return o==null||o!==o?void 0:n[(W2(t,o)-1)%n.length]}return e.domain=function(o){return arguments.length?(t=XK(o),e):t.slice()},e.range=function(o){return arguments.length?(n=ZK.call(o),e):n.slice()},e.tickFormat=function(o,f){return lW(t[0],Na(t),o??10,f)},e.copy=function(){return ZR().domain(e.domain()).range(e.range())},e}const S_={};function JK(t,n,e){const o=function(){const r=n();return r.invertRange||(r.invertRange=r.invert?$K(r):r.invertExtent?GK(r):void 0),r.type=t,r};return o.metadata=ff(ki(e)),o}function Xa(t,n,e){return arguments.length>1?(S_[t]=JK(t,n,e),this):JR(t)?S_[t]:void 0}Xa(HK,RR);Xa(hm,sW,Xs);Xa(Wh,NR,[Xs,Wh]);Xa(Ly,Z6,Xs);Xa(Py,FK,Xs);Xa(mw,BR,Xs);Xa(w0,jK,[Xs,iM]);Xa(k0,UK,[Xs,iM]);Xa(Gf,K6,[Xs,kc]);Xa("".concat(Gf,"-").concat(hm),K6,[Xs,kc]);Xa("".concat(Gf,"-").concat(Wh),qR,[Xs,kc,Wh]);Xa("".concat(Gf,"-").concat(Ly),Q6,[Xs,kc]);Xa("".concat(Gf,"-").concat(Py),VK,[Xs,kc]);Xa("".concat(Gf,"-").concat(mw),HR,[Xs,kc]);Xa("".concat(Ym,"-").concat(hm),$R,[Xs,kc]);Xa("".concat(Ym,"-").concat(Wh),GR,[Xs,kc,Wh]);Xa("".concat(Ym,"-").concat(Ly),eM,[Xs,kc]);Xa("".concat(Ym,"-").concat(Py),qK,[Xs,kc]);Xa("".concat(Ym,"-").concat(mw),WR,[Xs,kc]);Xa(dm,jR,[Iy,dm]);Xa(vw,UR,Iy);Xa(yw,VR,Iy);Xa(rM,ZR,[Dy,Iy]);Xa(nM,q6,Dy);Xa(YR,aM,Dy);Xa(Ak,WK,Dy);function JR(t){return qi(S_,t)}function G0(t,n){const e=S_[t];return e&&e.metadata[n]}function oM(t){return G0(t,Xs)}function pm(t){return G0(t,Dy)}function Mk(t){return G0(t,Iy)}function KR(t){return G0(t,Wh)}function KK(t){return G0(t,iM)}function QR(t){return G0(t,kc)}function eF(t){return G0(t,dm)}const QK=["clamp","base","constant","exponent"];function tF(t,n){const e=n[0],o=Na(n)-e;return function(f){return t(e+f*o)}}function xw(t,n,e){return G6(sM(n||"rgb",e),t)}function nF(t,n){const e=new Array(n),o=n+1;for(let f=0;ft[u]?a[u](t[u]()):0),a)}function sM(t,n){const e=CK[eQ(t)];return n!=null&&e&&e.gamma?e.gamma(n):e}function eQ(t){return"interpolate"+t.toLowerCase().split("-").map(n=>n[0].toUpperCase()+n.slice(1)).join("")}const tQ={blues:"cfe1f2bed8eca8cee58fc1de74b2d75ba3cf4592c63181bd206fb2125ca40a4a90",greens:"d3eecdc0e6baabdda594d3917bc77d60ba6c46ab5e329a512089430e7735036429",greys:"e2e2e2d4d4d4c4c4c4b1b1b19d9d9d8888887575756262624d4d4d3535351e1e1e",oranges:"fdd8b3fdc998fdb87bfda55efc9244f87f2cf06b18e4580bd14904b93d029f3303",purples:"e2e1efd4d4e8c4c5e0b4b3d6a3a0cc928ec3827cb97566ae684ea25c3696501f8c",reds:"fdc9b4fcb49afc9e80fc8767fa7051f6573fec3f2fdc2a25c81b1db21218970b13",blueGreen:"d5efedc1e8e0a7ddd18bd2be70c6a958ba9144ad77319c5d2089460e7736036429",bluePurple:"ccddecbad0e4a8c2dd9ab0d4919cc98d85be8b6db28a55a6873c99822287730f71",greenBlue:"d3eecec5e8c3b1e1bb9bd8bb82cec269c2ca51b2cd3c9fc7288abd1675b10b60a1",orangeRed:"fddcaffdcf9bfdc18afdad77fb9562f67d53ee6545e24932d32d1ebf130da70403",purpleBlue:"dbdaebc8cee4b1c3de97b7d87bacd15b9fc93a90c01e7fb70b70ab056199045281",purpleBlueGreen:"dbd8eac8cee4b0c3de93b7d872acd1549fc83892bb1c88a3097f8702736b016353",purpleRed:"dcc9e2d3b3d7ce9eccd186c0da6bb2e14da0e23189d91e6fc61159ab07498f023a",redPurple:"fccfccfcbec0faa9b8f98faff571a5ec539ddb3695c41b8aa908808d0179700174",yellowGreen:"e4f4acd1eca0b9e2949ed68880c97c62bb6e47aa5e3297502083440e723b036034",yellowOrangeBrown:"feeaa1fedd84fecc63feb746fca031f68921eb7215db5e0bc54c05ab3d038f3204",yellowOrangeRed:"fee087fed16ffebd59fea849fd903efc7335f9522bee3423de1b20ca0b22af0225",blueOrange:"134b852f78b35da2cb9dcae1d2e5eff2f0ebfce0bafbbf74e8932fc5690d994a07",brownBlueGreen:"704108a0651ac79548e3c78af3e6c6eef1eac9e9e48ed1c74da79e187a72025147",purpleGreen:"5b1667834792a67fb6c9aed3e6d6e8eff0efd9efd5aedda971bb75368e490e5e29",purpleOrange:"4114696647968f83b7b9b4d6dadbebf3eeeafce0bafbbf74e8932fc5690d994a07",redBlue:"8c0d25bf363adf745ef4ae91fbdbc9f2efeed2e5ef9dcae15da2cb2f78b3134b85",redGrey:"8c0d25bf363adf745ef4ae91fcdccbfaf4f1e2e2e2c0c0c0969696646464343434",yellowGreenBlue:"eff9bddbf1b4bde5b594d5b969c5be45b4c22c9ec02182b82163aa23479c1c3185",redYellowBlue:"a50026d4322cf16e43fcac64fedd90faf8c1dcf1ecabd6e875abd04a74b4313695",redYellowGreen:"a50026d4322cf16e43fcac63fedd8df9f7aed7ee8ea4d86e64bc6122964f006837",pinkYellowGreen:"8e0152c0267edd72adf0b3d6faddedf5f3efe1f2cab6de8780bb474f9125276419",spectral:"9e0142d13c4bf0704afcac63fedd8dfbf8b0e0f3a1a9dda269bda94288b55e4fa2",viridis:"440154470e61481a6c482575472f7d443a834144873d4e8a39568c35608d31688e2d708e2a788e27818e23888e21918d1f988b1fa08822a8842ab07f35b77943bf7154c56866cc5d7ad1518fd744a5db36bcdf27d2e21be9e51afde725",magma:"0000040404130b0924150e3720114b2c11603b0f704a107957157e651a80721f817f24828c29819a2e80a8327db6377ac43c75d1426fde4968e95462f1605df76f5cfa7f5efc8f65fe9f6dfeaf78febf84fece91fddea0fcedaffcfdbf",inferno:"0000040403130c0826170c3b240c4f330a5f420a68500d6c5d126e6b176e781c6d86216b932667a12b62ae305cbb3755c73e4cd24644dd513ae65c30ed6925f3771af8850ffb9506fca50afcb519fac62df6d645f2e661f3f484fcffa4",plasma:"0d088723069033059742039d5002a25d01a66a00a87801a88405a7900da49c179ea72198b12a90ba3488c33d80cb4779d35171da5a69e16462e76e5bed7953f2834cf68f44fa9a3dfca636fdb32ffec029fcce25f9dc24f5ea27f0f921",cividis:"00205100235800265d002961012b65042e670831690d346b11366c16396d1c3c6e213f6e26426e2c456e31476e374a6e3c4d6e42506e47536d4c566d51586e555b6e5a5e6e5e616e62646f66676f6a6a706e6d717270717573727976737c79747f7c75827f758682768985778c8877908b78938e789691789a94789e9778a19b78a59e77a9a177aea575b2a874b6ab73bbaf71c0b26fc5b66dc9b96acebd68d3c065d8c462ddc85fe2cb5ce7cf58ebd355f0d652f3da4ff7de4cfae249fce647",rainbow:"6e40aa883eb1a43db3bf3cafd83fa4ee4395fe4b83ff576eff6659ff7847ff8c38f3a130e2b72fcfcc36bee044aff05b8ff4576ff65b52f6673af27828ea8d1ddfa319d0b81cbecb23abd82f96e03d82e14c6edb5a5dd0664dbf6e40aa",sinebow:"ff4040fc582af47218e78d0bd5a703bfbf00a7d5038de70b72f41858fc2a40ff402afc5818f4720be78d03d5a700bfbf03a7d50b8de71872f42a58fc4040ff582afc7218f48d0be7a703d5bf00bfd503a7e70b8df41872fc2a58ff4040",turbo:"23171b32204a3e2a71453493493eae4b49c54a53d7485ee44569ee4074f53c7ff8378af93295f72e9ff42ba9ef28b3e926bce125c5d925cdcf27d5c629dcbc2de3b232e9a738ee9d3ff39347f68950f9805afc7765fd6e70fe667cfd5e88fc5795fb51a1f84badf545b9f140c5ec3cd0e637dae034e4d931ecd12ef4c92bfac029ffb626ffad24ffa223ff9821ff8d1fff821dff771cfd6c1af76118f05616e84b14df4111d5380fcb2f0dc0260ab61f07ac1805a313029b0f00950c00910b00",browns:"eedbbdecca96e9b97ae4a865dc9856d18954c7784cc0673fb85536ad44339f3632",tealBlues:"bce4d89dd3d181c3cb65b3c245a2b9368fae347da0306a932c5985",teals:"bbdfdfa2d4d58ac9c975bcbb61b0af4da5a43799982b8b8c1e7f7f127273006667",warmGreys:"dcd4d0cec5c1c0b8b4b3aaa7a59c9998908c8b827f7e7673726866665c5a59504e",goldGreen:"f4d166d5ca60b6c35c98bb597cb25760a6564b9c533f8f4f33834a257740146c36",goldOrange:"f4d166f8be5cf8aa4cf5983bf3852aef701be2621fd65322c54923b142239e3a26",goldRed:"f4d166f6be59f9aa51fc964ef6834bee734ae56249db5247cf4244c43141b71d3e",lightGreyRed:"efe9e6e1dad7d5cbc8c8bdb9bbaea9cd967ddc7b43e15f19df4011dc000b",lightGreyTeal:"e4eaead6dcddc8ced2b7c2c7a6b4bc64b0bf22a6c32295c11f85be1876bc",lightMulti:"e0f1f2c4e9d0b0de9fd0e181f6e072f6c053f3993ef77440ef4a3c",lightOrange:"f2e7daf7d5baf9c499fab184fa9c73f68967ef7860e8645bde515bd43d5b",lightTealBlue:"e3e9e0c0dccf9aceca7abfc859afc0389fb9328dad2f7ca0276b95255988",darkBlue:"3232322d46681a5c930074af008cbf05a7ce25c0dd38daed50f3faffffff",darkGold:"3c3c3c584b37725e348c7631ae8b2bcfa424ecc31ef9de30fff184ffffff",darkGreen:"3a3a3a215748006f4d048942489e4276b340a6c63dd2d836ffeb2cffffaa",darkMulti:"3737371f5287197d8c29a86995ce3fffe800ffffff",darkRed:"3434347036339e3c38cc4037e75d1eec8620eeab29f0ce32ffeb2c"},nQ={category10:"1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf",category20:"1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5",category20b:"393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6",category20c:"3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9",tableau10:"4c78a8f58518e4575672b7b254a24beeca3bb279a2ff9da69d755dbab0ac",tableau20:"4c78a89ecae9f58518ffbf7954a24b88d27ab79a20f2cf5b43989483bcb6e45756ff9d9879706ebab0acd67195fcbfd2b279a2d6a5c99e765fd8b5a5",accent:"7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666",dark2:"1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666",paired:"a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928",pastel1:"fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2",pastel2:"b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc",set1:"e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999",set2:"66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3",set3:"8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"};function iF(t){const n=t.length/6|0,e=new Array(n);for(let o=0;oxw(iF(t)));function lM(t,n){return t=t&&t.toLowerCase(),arguments.length>1?(y7[t]=n,this):y7[t]}const Vb="symbol",rQ="discrete",iQ="gradient",aQ=t=>Ir(t)?t.map(n=>String(n)):String(t),oQ=(t,n)=>t[1]-n[1],sQ=(t,n)=>n[1]-t[1];function uM(t,n,e){let o;return wo(n)&&(t.bins&&(n=Math.max(n,t.bins.length)),e!=null&&(n=Math.min(n,Math.floor(Ay(t.domain())/e||1)))),Ei(n)&&(o=n.step,n=n.interval),bi(n)&&(n=t.type===w0?$m(n):t.type==k0?Gm(n):Pr("Only time and utc scales accept interval strings."),o&&(n=n.every(o))),n}function oF(t,n,e){let o=t.range(),f=o[0],r=Na(o),a=oQ;if(f>r&&(o=r,r=f,f=o,a=sQ),f=Math.floor(f),r=Math.ceil(r),n=n.map(u=>[u,t(u)]).filter(u=>f<=u[1]&&u[1]<=r).sort(a).map(u=>u[0]),e>0&&n.length>1){const u=[n[0],Na(n)];for(;n.length>e&&n.length>=3;)n=n.filter((c,i)=>!(i%2));n.length<3&&(n=u)}return n}function cM(t,n){return t.bins?oF(t,t.bins):t.ticks?t.ticks(n):t.domain()}function sF(t,n,e,o,f,r){const a=n.type;let u=aQ;if(a===w0||f===w0)u=t.timeFormat(o);else if(a===k0||f===k0)u=t.utcFormat(o);else if(KR(a)){const c=t.formatFloat(o);if(r||n.bins)u=c;else{const i=lF(n,e,!1);u=s=>i(s)?c(s):""}}else if(n.tickFormat){const c=n.domain();u=t.formatSpan(c[0],c[c.length-1],e,o)}else o&&(u=t.format(o));return u}function lF(t,n,e){const o=cM(t,n),f=t.base(),r=Math.log(f),a=Math.max(1,f*n/o.length),u=c=>{let i=c/Math.pow(f,Math.round(Math.log(c)/r));return i*f1?o[1]-o[0]:o[0],a;for(a=1;aSk[t.type]||t.bins;function fF(t,n,e,o,f,r,a){const u=uF[n.type]&&r!==w0&&r!==k0?lQ(t,n,f):sF(t,n,e,f,r,a);return o===Vb&&fQ(n)?hQ(u):o===rQ?dQ(u):pQ(u)}const hQ=t=>(n,e,o)=>{const f=x7(o[e+1],x7(o.max,1/0)),r=b7(n,t),a=b7(f,t);return r&&a?r+" \u2013 "+a:a?"< "+a:"\u2265 "+r},x7=(t,n)=>t??n,dQ=t=>(n,e)=>e?t(n):null,pQ=t=>n=>t(n),b7=(t,n)=>Number.isFinite(t)?n(t):null;function gQ(t){const n=t.domain(),e=n.length-1;let o=+n[0],f=+Na(n),r=f-o;if(t.type===yw){const a=e?r/e:.1;o-=a,f+=a,r=f-o}return a=>(a-o)/r}function mQ(t,n,e,o){const f=o||n.type;return bi(e)&&KK(f)&&(e=e.replace(/%a/g,"%A").replace(/%b/g,"%B")),!e&&f===w0?t.timeFormat("%A, %d %B %Y, %X"):!e&&f===k0?t.utcFormat("%A, %d %B %Y, %X UTC"):fF(t,n,5,null,e,o,!0)}function hF(t,n,e){e=e||{};const o=Math.max(3,e.maxlen||7),f=mQ(t,n,e.format,e.formatType);if(Mk(n.type)){const r=cF(n).slice(1).map(f),a=r.length;return"".concat(a," boundar").concat(a===1?"y":"ies",": ").concat(r.join(", "))}else if(pm(n.type)){const r=n.domain(),a=r.length,u=a>o?r.slice(0,o-2).map(f).join(", ")+", ending with "+r.slice(-1).map(f):r.map(f).join(", ");return"".concat(a," value").concat(a===1?"":"s",": ").concat(u)}else{const r=n.domain();return"values from ".concat(f(r[0])," to ").concat(f(Na(r)))}}let dF=0;function vQ(){dF=0}const E_="p_";function fM(t){return t&&t.gradient}function pF(t,n,e){const o=t.gradient;let f=t.id,r=o==="radial"?E_:"";return f||(f=t.id="gradient_"+dF++,o==="radial"?(t.x1=Lf(t.x1,.5),t.y1=Lf(t.y1,.5),t.r1=Lf(t.r1,0),t.x2=Lf(t.x2,.5),t.y2=Lf(t.y2,.5),t.r2=Lf(t.r2,.5),r=E_):(t.x1=Lf(t.x1,0),t.y1=Lf(t.y1,0),t.x2=Lf(t.x2,1),t.y2=Lf(t.y2,0))),n[f]=t,"url("+(e||"")+"#"+r+f+")"}function Lf(t,n){return t??n}function gF(t,n){var e=[],o;return o={gradient:"linear",x1:t?t[0]:0,y1:t?t[1]:0,x2:n?n[0]:1,y2:n?n[1]:0,stops:e,stop:function(f,r){return e.push({offset:f,color:r}),o}}}const _7={basis:{curve:HJ},"basis-closed":{curve:$J},"basis-open":{curve:GJ},bundle:{curve:WJ,tension:"beta",value:.85},cardinal:{curve:YJ,tension:"tension",value:0},"cardinal-open":{curve:ZJ,tension:"tension",value:0},"cardinal-closed":{curve:XJ,tension:"tension",value:0},"catmull-rom":{curve:JJ,tension:"alpha",value:.5},"catmull-rom-closed":{curve:KJ,tension:"alpha",value:.5},"catmull-rom-open":{curve:QJ,tension:"alpha",value:.5},linear:{curve:jD},"linear-closed":{curve:eK},monotone:{horizontal:nK,vertical:tK},natural:{curve:rK},step:{curve:iK},"step-after":{curve:oK},"step-before":{curve:aK}};function hM(t,n,e){var o=qi(_7,t)&&_7[t],f=null;return o&&(f=o.curve||o[n||"vertical"],o.tension&&e!=null&&(f=f[o.tension](e))),f}const yQ={m:2,l:2,h:1,v:1,z:0,c:6,s:4,q:4,t:2,a:7},xQ=/[mlhvzcsqta]([^mlhvzcsqta]+|$)/gi,bQ=/^[+-]?(([0-9]*\.[0-9]+)|([0-9]+\.)|([0-9]+))([eE][+-]?[0-9]+)?/,_Q=/^((\s+,?\s*)|(,\s*))/,wQ=/^[01]/;function gm(t){const n=[];return(t.match(xQ)||[]).forEach(o=>{let f=o[0];const r=f.toLowerCase(),a=yQ[r],u=kQ(r,a,o.slice(1).trim()),c=u.length;if(c1&&(g=Math.sqrt(g),e*=g,o*=g);const p=d/e,v=l/e,y=-l/o,x=d/o,w=p*u+v*c,k=y*u+x*c,b=p*t+v*n,T=y*t+x*n,_=(b-w)*(b-w)+(T-k)*(T-k);let M=1/_-.25;M<0&&(M=0);let A=Math.sqrt(M);r==f&&(A=-A);const S=.5*(w+b)-A*(T-k),E=.5*(k+T)+A*(b-w),D=Math.atan2(k-E,w-S);let R=Math.atan2(T-E,b-S)-D;R<0&&r===1?R+=Ff:R>0&&r===0&&(R-=Ff);const z=Math.ceil(Math.abs(R/(Qp+.001))),L=[];for(let P=0;P+t}function ib(t,n,e){return Math.max(n,Math.min(t,e))}function yF(){var t=CQ,n=OQ,e=LQ,o=PQ,f=Th(0),r=f,a=f,u=f,c=null;function i(s,l,d){var h,m=l??+t.call(this,s),g=d??+n.call(this,s),p=+e.call(this,s),v=+o.call(this,s),y=Math.min(p,v)/2,x=ib(+f.call(this,s),0,y),w=ib(+r.call(this,s),0,y),k=ib(+a.call(this,s),0,y),b=ib(+u.call(this,s),0,y);if(c||(c=h=Bm()),x<=0&&w<=0&&k<=0&&b<=0)c.rect(m,g,p,v);else{var T=m+p,_=g+v;c.moveTo(m+x,g),c.lineTo(T-w,g),c.bezierCurveTo(T-md*w,g,T,g+md*w,T,g+w),c.lineTo(T,_-b),c.bezierCurveTo(T,_-md*b,T-md*b,_,T-b,_),c.lineTo(m+k,_),c.bezierCurveTo(m+md*k,_,m,_-md*k,m,_-k),c.lineTo(m,g+x),c.bezierCurveTo(m,g+md*x,m+md*x,g,m+x,g),c.closePath()}if(h)return c=null,h+""||null}return i.x=function(s){return arguments.length?(t=Th(s),i):t},i.y=function(s){return arguments.length?(n=Th(s),i):n},i.width=function(s){return arguments.length?(e=Th(s),i):e},i.height=function(s){return arguments.length?(o=Th(s),i):o},i.cornerRadius=function(s,l,d,h){return arguments.length?(f=Th(s),r=l!=null?Th(l):f,u=d!=null?Th(d):f,a=h!=null?Th(h):r,i):f},i.context=function(s){return arguments.length?(c=s??null,i):c},i}function xF(){var t,n,e,o,f=null,r,a,u,c;function i(l,d,h){const m=h/2;if(r){var g=u-d,p=l-a;if(g||p){var v=Math.sqrt(g*g+p*p),y=(g/=v)*c,x=(p/=v)*c,w=Math.atan2(p,g);f.moveTo(a-y,u-x),f.lineTo(l-g*m,d-p*m),f.arc(l,d,m,w-Math.PI,w),f.lineTo(a+y,u+x),f.arc(a,u,c,w,w+Math.PI)}else f.arc(l,d,m,0,Ff);f.closePath()}else r=1;a=l,u=d,c=m}function s(l){var d,h=l.length,m,g=!1,p;for(f==null&&(f=p=Bm()),d=0;d<=h;++d)!(dt.x||0,Fy=t=>t.y||0,DQ=t=>t.width||0,IQ=t=>t.height||0,zQ=t=>(t.x||0)+(t.width||0),RQ=t=>(t.y||0)+(t.height||0),FQ=t=>t.startAngle||0,NQ=t=>t.endAngle||0,BQ=t=>t.padAngle||0,jQ=t=>t.innerRadius||0,UQ=t=>t.outerRadius||0,VQ=t=>t.cornerRadius||0,qQ=t=>zy(t.cornerRadiusTopLeft,t.cornerRadius)||0,HQ=t=>zy(t.cornerRadiusTopRight,t.cornerRadius)||0,$Q=t=>zy(t.cornerRadiusBottomRight,t.cornerRadius)||0,GQ=t=>zy(t.cornerRadiusBottomLeft,t.cornerRadius)||0,WQ=t=>zy(t.size,64),YQ=t=>t.size||1,bw=t=>t.defined!==!1,XQ=t=>vF(t.shape||"circle"),ZQ=UJ().startAngle(FQ).endAngle(NQ).padAngle(BQ).innerRadius(jQ).outerRadius(UQ).cornerRadius(VQ),JQ=cR().x(Ry).y1(Fy).y0(RQ).defined(bw),KQ=cR().y(Fy).x1(Ry).x0(zQ).defined(bw),QQ=BD().x(Ry).y(Fy).defined(bw),eee=yF().x(Ry).y(Fy).width(DQ).height(IQ).cornerRadius(qQ,HQ,$Q,GQ),tee=qJ().type(XQ).size(WQ),nee=xF().x(Ry).y(Fy).defined(bw).size(YQ);function dM(t){return t.cornerRadius||t.cornerRadiusTopLeft||t.cornerRadiusTopRight||t.cornerRadiusBottomRight||t.cornerRadiusBottomLeft}function ree(t,n){return ZQ.context(t)(n)}function iee(t,n){const e=n[0],o=e.interpolate||"linear";return(e.orient==="horizontal"?KQ:JQ).curve(hM(o,e.orient,e.tension)).context(t)(n)}function aee(t,n){const e=n[0],o=e.interpolate||"linear";return QQ.curve(hM(o,e.orient,e.tension)).context(t)(n)}function Xm(t,n,e,o){return eee.context(t)(n,e,o)}function oee(t,n){return(n.mark.shape||n.shape).context(t)(n)}function see(t,n){return tee.context(t)(n)}function lee(t,n){return nee.context(t)(n)}var bF=1;function _F(){bF=1}function pM(t,n,e){var o=n.clip,f=t._defs,r=n.clip_id||(n.clip_id="clip"+bF++),a=f.clipping[r]||(f.clipping[r]={id:r});return ga(o)?a.path=o(null):dM(e)?a.path=Xm(null,e,0,0):(a.width=e.width||0,a.height=e.height||0),"url(#"+r+")"}function zs(t){this.clear(),t&&this.union(t)}zs.prototype={clone(){return new zs(this)},clear(){return this.x1=+Number.MAX_VALUE,this.y1=+Number.MAX_VALUE,this.x2=-Number.MAX_VALUE,this.y2=-Number.MAX_VALUE,this},empty(){return this.x1===+Number.MAX_VALUE&&this.y1===+Number.MAX_VALUE&&this.x2===-Number.MAX_VALUE&&this.y2===-Number.MAX_VALUE},equals(t){return this.x1===t.x1&&this.y1===t.y1&&this.x2===t.x2&&this.y2===t.y2},set(t,n,e,o){return ethis.x2&&(this.x2=t),n>this.y2&&(this.y2=n),this},expand(t){return this.x1-=t,this.y1-=t,this.x2+=t,this.y2+=t,this},round(){return this.x1=Math.floor(this.x1),this.y1=Math.floor(this.y1),this.x2=Math.ceil(this.x2),this.y2=Math.ceil(this.y2),this},scale(t){return this.x1*=t,this.y1*=t,this.x2*=t,this.y2*=t,this},translate(t,n){return this.x1+=t,this.x2+=t,this.y1+=n,this.y2+=n,this},rotate(t,n,e){const o=this.rotatedPoints(t,n,e);return this.clear().add(o[0],o[1]).add(o[2],o[3]).add(o[4],o[5]).add(o[6],o[7])},rotatedPoints(t,n,e){var{x1:o,y1:f,x2:r,y2:a}=this,u=Math.cos(t),c=Math.sin(t),i=n-n*u+e*c,s=e-n*c-e*u;return[u*o-c*f+i,c*o+u*f+s,u*o-c*a+i,c*o+u*a+s,u*r-c*f+i,c*r+u*f+s,u*r-c*a+i,c*r+u*a+s]},union(t){return t.x1this.x2&&(this.x2=t.x2),t.y2>this.y2&&(this.y2=t.y2),this},intersect(t){return t.x1>this.x1&&(this.x1=t.x1),t.y1>this.y1&&(this.y1=t.y1),t.x2=t.x2&&this.y1<=t.y1&&this.y2>=t.y2},alignsWith(t){return t&&(this.x1==t.x1||this.x2==t.x2||this.y1==t.y1||this.y2==t.y2)},intersects(t){return t&&!(this.x2t.x2||this.y2t.y2)},contains(t,n){return!(tthis.x2||nthis.y2)},width(){return this.x2-this.x1},height(){return this.y2-this.y1}};function _w(t){this.mark=t,this.bounds=this.bounds||new zs}function ww(t){_w.call(this,t),this.items=this.items||[]}ni(ww,_w);function gM(t){this._pending=0,this._loader=t||Q2()}function A7(t){t._pending+=1}function U1(t){t._pending-=1}gM.prototype={pending(){return this._pending},sanitizeURL(t){const n=this;return A7(n),n._loader.sanitize(t,{context:"href"}).then(e=>(U1(n),e)).catch(()=>(U1(n),null))},loadImage(t){const n=this,e=sK();return A7(n),n._loader.sanitize(t,{context:"image"}).then(o=>{const f=o.href;if(!f||!e)throw{url:f};const r=new e,a=qi(o,"crossOrigin")?o.crossOrigin:"anonymous";return a!=null&&(r.crossOrigin=a),r.onload=()=>U1(n),r.onerror=()=>U1(n),r.src=f,r}).catch(o=>(U1(n),{complete:!1,width:0,height:0,src:o&&o.url||""}))},ready(){const t=this;return new Promise(n=>{function e(o){t.pending()?setTimeout(()=>{e(!0)},10):n(o)}e(!1)})}};function Jh(t,n,e){if(n.stroke&&n.opacity!==0&&n.strokeOpacity!==0){const o=n.strokeWidth!=null?+n.strokeWidth:1;t.expand(o+(e?uee(n,o):0))}return t}function uee(t,n){return t.strokeJoin&&t.strokeJoin!=="miter"?0:n}const cee=Ff-1e-8;let kw,qb,Hb,a0,Ek,$b,Ck,Ok;const Od=(t,n)=>kw.add(t,n),Gb=(t,n)=>Od(qb=t,Hb=n),M7=t=>Od(t,kw.y1),S7=t=>Od(kw.x1,t),e0=(t,n)=>Ek*t+Ck*n,t0=(t,n)=>$b*t+Ok*n,G5=(t,n)=>Od(e0(t,n),t0(t,n)),W5=(t,n)=>Gb(e0(t,n),t0(t,n));function Ny(t,n){return kw=t,n?(a0=n*Jd,Ek=Ok=Math.cos(a0),$b=Math.sin(a0),Ck=-$b):(Ek=Ok=1,a0=$b=Ck=0),fee}const fee={beginPath(){},closePath(){},moveTo:W5,lineTo:W5,rect(t,n,e,o){a0?(G5(t+e,n),G5(t+e,n+o),G5(t,n+o),W5(t,n)):(Od(t+e,n+o),Gb(t,n))},quadraticCurveTo(t,n,e,o){const f=e0(t,n),r=t0(t,n),a=e0(e,o),u=t0(e,o);E7(qb,f,a,M7),E7(Hb,r,u,S7),Gb(a,u)},bezierCurveTo(t,n,e,o,f,r){const a=e0(t,n),u=t0(t,n),c=e0(e,o),i=t0(e,o),s=e0(f,r),l=t0(f,r);C7(qb,a,c,s,M7),C7(Hb,u,i,l,S7),Gb(s,l)},arc(t,n,e,o,f,r){if(o+=a0,f+=a0,qb=e*Math.cos(f)+t,Hb=e*Math.sin(f)+n,Math.abs(f-o)>cee)Od(t-e,n-e),Od(t+e,n+e);else{const a=i=>Od(e*Math.cos(i)+t,e*Math.sin(i)+n);let u,c;if(a(o),a(f),f!==o)if(o=o%Ff,o<0&&(o+=Ff),f=f%Ff,f<0&&(f+=Ff),ff;++c,u-=Qp)a(u);else for(u=o-o%Qp+Qp,c=0;c<4&&uTQ?(s=a*a+u*r,s>=0&&(s=Math.sqrt(s),c=(-a+s)/r,i=(-a-s)/r)):c=.5*u/a,0d)return!1;g>l&&(l=g)}else if(h>0){if(g0?(t.globalAlpha=e,t.fillStyle=TF(t,n,n.fill),!0):!1}var dee=[];function vm(t,n,e){var o=(o=n.strokeWidth)!=null?o:1;return o<=0?!1:(e*=n.strokeOpacity==null?1:n.strokeOpacity,e>0?(t.globalAlpha=e,t.strokeStyle=TF(t,n,n.stroke),t.lineWidth=o,t.lineCap=n.strokeCap||"butt",t.lineJoin=n.strokeJoin||"miter",t.miterLimit=n.strokeMiterLimit||10,t.setLineDash&&(t.setLineDash(n.strokeDash||dee),t.lineDashOffset=n.strokeDashOffset||0),!0):!1)}function pee(t,n){return t.zindex-n.zindex||t.index-n.index}function yM(t){if(!t.zdirty)return t.zitems;var n=t.items,e=[],o,f,r;for(f=0,r=n.length;f=0;)if(o=n(e[f]))return o;if(e===r){for(e=t.items,f=e.length;--f>=0;)if(!e[f].zindex&&(o=n(e[f])))return o}return null}function xM(t){return function(n,e,o){df(e,f=>{(!o||o.intersects(f.bounds))&&AF(t,n,f,f)})}}function gee(t){return function(n,e,o){e.items.length&&(!o||o.intersects(e.bounds))&&AF(t,n,e.items[0],e.items)}}function AF(t,n,e,o){var f=e.opacity==null?1:e.opacity;f!==0&&(t(n,o)||(mm(n,e),e.fill&&C_(n,e,f)&&n.fill(),e.stroke&&vm(n,e,f)&&n.stroke()))}function Tw(t){return t=t||mc,function(n,e,o,f,r,a){return o*=n.pixelRatio,f*=n.pixelRatio,O_(e,u=>{const c=u.bounds;if(!(c&&!c.contains(r,a)||!c)&&t(n,u,o,f,r,a))return u})}}function By(t,n){return function(e,o,f,r){var a=Array.isArray(o)?o[0]:o,u=n??a.fill,c=a.stroke&&e.isPointInStroke,i,s;return c&&(i=a.strokeWidth,s=a.strokeCap,e.lineWidth=i??1,e.lineCap=s??"butt"),t(e,o)?!1:u&&e.isPointInPath(f,r)||c&&e.isPointInStroke(f,r)}}function bM(t){return Tw(By(t))}function g0(t,n){return"translate("+t+","+n+")"}function _M(t){return"rotate("+t+")"}function mee(t,n){return"scale("+t+","+n+")"}function MF(t){return g0(t.x||0,t.y||0)}function vee(t){return g0(t.x||0,t.y||0)+(t.angle?" "+_M(t.angle):"")}function yee(t){return g0(t.x||0,t.y||0)+(t.angle?" "+_M(t.angle):"")+(t.scaleX||t.scaleY?" "+mee(t.scaleX||1,t.scaleY||1):"")}function wM(t,n,e){function o(a,u){a("transform",vee(u)),a("d",n(null,u))}function f(a,u){return n(Ny(a,u.angle),u),Jh(a,u).translate(u.x||0,u.y||0)}function r(a,u){var c=u.x||0,i=u.y||0,s=u.angle||0;a.translate(c,i),s&&a.rotate(s*=Jd),a.beginPath(),n(a,u),s&&a.rotate(-s),a.translate(-c,-i)}return{type:t,tag:"path",nested:!1,attr:o,bound:f,draw:xM(r),pick:bM(r),isect:e||mM(r)}}var xee=wM("arc",ree);function bee(t,n){for(var e=t[0].orient==="horizontal"?n[1]:n[0],o=t[0].orient==="horizontal"?"y":"x",f=t.length,r=1/0,a,u;--f>=0;)t[f].defined!==!1&&(u=Math.abs(t[f][o]-e),u=0;)if(t[o].defined!==!1&&(f=t[o].x-n[0],r=t[o].y-n[1],a=f*f+r*r,a=0;)if(t[e].defined!==!1&&(o=t[e].x-n[0],f=t[e].y-n[1],r=o*o+f*f,o=t[e].size||1,r.5&&n<1.5?.5-Math.abs(n-1):0}function Aee(t,n){t("transform",MF(n))}function CF(t,n){const e=EF(n);t("d",Xm(null,n,e,e))}function Mee(t,n){t("class","background"),t("aria-hidden",!0),CF(t,n)}function See(t,n){t("class","foreground"),t("aria-hidden",!0),n.strokeForeground?CF(t,n):t("d","")}function Eee(t,n,e){const o=n.clip?pM(e,n,n):null;t("clip-path",o)}function Cee(t,n){if(!n.clip&&n.items){const e=n.items,o=e.length;for(let f=0;f{const f=o.x||0,r=o.y||0,a=o.strokeForeground,u=o.opacity==null?1:o.opacity;(o.stroke||o.fill)&&u&&(Jv(t,o,f,r),mm(t,o),o.fill&&C_(t,o,u)&&t.fill(),o.stroke&&!a&&vm(t,o,u)&&t.stroke()),t.save(),t.translate(f,r),o.clip&&SF(t,o),e&&e.translate(-f,-r),df(o,c=>{this.draw(t,c,e)}),e&&e.translate(f,r),t.restore(),a&&o.stroke&&u&&(Jv(t,o,f,r),mm(t,o),vm(t,o,u)&&t.stroke())})}function Iee(t,n,e,o,f,r){if(n.bounds&&!n.bounds.contains(f,r)||!n.items)return null;const a=e*t.pixelRatio,u=o*t.pixelRatio;return O_(n,c=>{let i,s,l;const d=c.bounds;if(d&&!d.contains(f,r))return;s=c.x||0,l=c.y||0;const h=s+(c.width||0),m=l+(c.height||0),g=c.clip;if(g&&(fh||rm))return;if(t.save(),t.translate(s,l),s=f-s,l=r-l,g&&dM(c)&&!Pee(t,c,a,u))return t.restore(),null;const p=c.strokeForeground,v=n.interactive!==!1;return v&&p&&c.stroke&&Lee(t,c,a,u)?(t.restore(),c):(i=O_(c,y=>zee(y,s,l)?this.pick(y,e,o,s,l):null),!i&&v&&(c.fill||!p&&c.stroke)&&Oee(t,c,a,u)&&(i=c),t.restore(),i||null)})}function zee(t,n,e){return(t.interactive!==!1||t.marktype==="group")&&t.bounds&&t.bounds.contains(n,e)}var Ree={type:"group",tag:"g",nested:!1,attr:Aee,bound:Cee,draw:Dee,pick:Iee,isect:wF,content:Eee,background:Mee,foreground:See},Kv={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1"};function TM(t,n){var e=t.image;return(!e||t.url&&t.url!==e.url)&&(e={complete:!1,width:0,height:0},n.loadImage(t.url).then(o=>{t.image=o,t.image.url=t.url})),e}function AM(t,n){return t.width!=null?t.width:!n||!n.width?0:t.aspect!==!1&&t.height?t.height*n.width/n.height:n.width}function MM(t,n){return t.height!=null?t.height:!n||!n.height?0:t.aspect!==!1&&t.width?t.width*n.height/n.width:n.height}function Aw(t,n){return t==="center"?n/2:t==="right"?n:0}function Mw(t,n){return t==="middle"?n/2:t==="bottom"?n:0}function Fee(t,n,e){const o=TM(n,e),f=AM(n,o),r=MM(n,o),a=(n.x||0)-Aw(n.align,f),u=(n.y||0)-Mw(n.baseline,r),c=!o.src&&o.toDataURL?o.toDataURL():o.src||"";t("href",c,Kv["xmlns:xlink"],"xlink:href"),t("transform",g0(a,u)),t("width",f),t("height",r),t("preserveAspectRatio",n.aspect===!1?"none":"xMidYMid")}function Nee(t,n){const e=n.image,o=AM(n,e),f=MM(n,e),r=(n.x||0)-Aw(n.align,o),a=(n.y||0)-Mw(n.baseline,f);return t.set(r,a,r+o,a+f)}function Bee(t,n,e){df(n,o=>{if(e&&!e.intersects(o.bounds))return;const f=TM(o,this);let r=AM(o,f),a=MM(o,f);if(r===0||a===0)return;let u=(o.x||0)-Aw(o.align,r),c=(o.y||0)-Mw(o.baseline,a),i,s,l,d;o.aspect!==!1&&(s=f.width/f.height,l=o.width/o.height,s===s&&l===l&&s!==l&&(l{if(!(e&&!e.intersects(o.bounds))){var f=o.opacity==null?1:o.opacity;f&&OF(t,o,f)&&(mm(t,o),t.stroke())}})}function Jee(t,n,e,o){return t.isPointInStroke?OF(t,n,1)&&t.isPointInStroke(e,o):!1}var Kee={type:"rule",tag:"line",nested:!1,attr:Yee,bound:Xee,draw:Zee,pick:Tw(Jee),isect:kF},Qee=wM("shape",oee),ete=wM("symbol",see,vM);const D7=dI();var af={height:ah,measureWidth:SM,estimateWidth:Pk,width:Pk,canvas:LF};LF(!0);function LF(t){af.width=t&&qd?SM:Pk}function Pk(t,n){return PF(Qd(t,n),ah(t))}function PF(t,n){return~~(.8*t.length*n)}function SM(t,n){return ah(t)<=0||!(n=Qd(t,n))?0:DF(n,Sw(t))}function DF(t,n){const e="(".concat(n,") ").concat(t);let o=D7.get(e);return o===void 0&&(qd.font=n,o=qd.measureText(t).width,D7.set(e,o)),o}function ah(t){return t.fontSize!=null?+t.fontSize||0:11}function Kd(t){return t.lineHeight!=null?t.lineHeight:ah(t)+2}function tte(t){return Ir(t)?t.length>1?t:t[0]:t}function jy(t){return tte(t.lineBreak&&t.text&&!Ir(t.text)?t.text.split(t.lineBreak):t.text)}function EM(t){const n=jy(t);return(Ir(n)?n.length-1:0)*Kd(t)}function Qd(t,n){const e=n==null?"":(n+"").trim();return t.limit>0&&e.length?rte(t,e):e}function nte(t){if(af.width===SM){const n=Sw(t);return e=>DF(e,n)}else{const n=ah(t);return e=>PF(e,n)}}function rte(t,n){var e=+t.limit,o=nte(t);if(o(n)>>1,o(n.slice(c))>e?a=c+1:u=c;return f+n.slice(a)}else{for(;a>>1),o(n.slice(0,c))Math.max(d,af.width(n,h)),0)):l=af.width(n,s),f==="center"?c-=l/2:f==="right"&&(c-=l),t.set(c+=a,i+=u,c+l,i+o),n.angle&&!e)t.rotate(n.angle*Jd,a,u);else if(e===2)return t.rotatedPoints(n.angle*Jd,a,u);return t}function ote(t,n,e){df(n,o=>{var f=o.opacity==null?1:o.opacity,r,a,u,c,i,s,l;if(!(e&&!e.intersects(o.bounds)||f===0||o.fontSize<=0||o.text==null||o.text.length===0)){if(t.font=Sw(o),t.textAlign=o.align||"left",r=Ew(o),a=r.x1,u=r.y1,o.angle&&(t.save(),t.translate(a,u),t.rotate(o.angle*Jd),a=u=0),a+=o.dx||0,u+=(o.dy||0)+CM(o),s=jy(o),mm(t,o),Ir(s))for(i=Kd(o),c=0;cn;)t.removeChild(e[--o]);return t}function BF(t){return"mark-"+t.marktype+(t.role?" role-"+t.role:"")+(t.name?" "+t.name:"")}function Cw(t,n){const e=n.getBoundingClientRect();return[t.clientX-e.left-(n.clientLeft||0),t.clientY-e.top-(n.clientTop||0)]}function hte(t,n,e,o){var f=t&&t.mark,r,a;if(f&&(r=tc[f.marktype]).tip){for(a=Cw(n,e),a[0]-=o[0],a[1]-=o[1];t=t.mark.group;)a[0]-=t.x||0,a[1]-=t.y||0;t=r.tip(f.items,a)}return t}function ep(t,n){this._active=null,this._handlers={},this._loader=t||Q2(),this._tooltip=n||dte}function dte(t,n,e,o){t.element().setAttribute("title",o||"")}ep.prototype={initialize(t,n,e){return this._el=t,this._obj=e||null,this.origin(n)},element(){return this._el},canvas(){return this._el&&this._el.firstChild},origin(t){return arguments.length?(this._origin=t||[0,0],this):this._origin.slice()},scene(t){return arguments.length?(this._scene=t,this):this._scene},on(){},off(){},_handlerIndex(t,n,e){for(let o=t?t.length:0;--o>=0;)if(t[o].type===n&&(!e||t[o].handler===e))return o;return-1},handlers(t){const n=this._handlers,e=[];if(t)e.push(...n[this.eventName(t)]);else for(const o in n)e.push(...n[o]);return e},eventName(t){const n=t.indexOf(".");return n<0?t:t.slice(0,n)},handleHref(t,n,e){this._loader.sanitize(e,{context:"href"}).then(o=>{const f=new MouseEvent(t.type,t),r=Ld(null,"a");for(const a in o)r.setAttribute(a,o[a]);r.dispatchEvent(f)}).catch(()=>{})},handleTooltip(t,n,e){if(n&&n.tooltip!=null){n=hte(n,t,this.canvas(),this._origin);const o=e&&n&&n.tooltip||null;this._tooltip.call(this._obj,this,t,n,o)}},getItemBoundingClientRect(t){const n=this.canvas();if(!n)return;const e=n.getBoundingClientRect(),o=this._origin,f=t.bounds,r=f.width(),a=f.height();let u=f.x1+o[0]+e.left,c=f.y1+o[1]+e.top;for(;t.mark&&(t=t.mark.group);)u+=t.x||0,c+=t.y||0;return{x:u,y:c,width:r,height:a,left:u,top:c,right:u+r,bottom:c+a}}};function oh(t){this._el=null,this._bgcolor=null,this._loader=new gM(t)}oh.prototype={initialize(t,n,e,o,f){return this._el=t,this.resize(n,e,o,f)},element(){return this._el},canvas(){return this._el&&this._el.firstChild},background(t){return arguments.length===0?this._bgcolor:(this._bgcolor=t,this)},resize(t,n,e,o){return this._width=t,this._height=n,this._origin=e||[0,0],this._scale=o||1,this},dirty(){},render(t){const n=this;return n._call=function(){n._render(t)},n._call(),n._call=null,n},_render(){},renderAsync(t){const n=this.render(t);return this._ready?this._ready.then(()=>n):Promise.resolve(n)},_load(t,n){var e=this,o=e._loader[t](n);if(!e._ready){const f=e._call;e._ready=e._loader.ready().then(r=>{r&&f(),e._ready=null})}return o},sanitizeURL(t){return this._load("sanitizeURL",t)},loadImage(t){return this._load("loadImage",t)}};const pte="keydown",gte="keypress",mte="keyup",jF="dragenter",Yb="dragleave",UF="dragover",Ik="mousedown",vte="mouseup",L_="mousemove",Ev="mouseout",VF="mouseover",P_="click",yte="dblclick",xte="wheel",qF="mousewheel",D_="touchstart",I_="touchmove",z_="touchend",bte=[pte,gte,mte,jF,Yb,UF,Ik,vte,L_,Ev,VF,P_,yte,xte,qF,D_,I_,z_],zk=L_,Qv=Ev,Rk=P_;function Vy(t,n){ep.call(this,t,n),this._down=null,this._touch=null,this._first=!0,this._events={}}const _te=t=>t===D_||t===I_||t===z_?[D_,I_,z_]:[t];function z7(t,n){_te(n).forEach(e=>wte(t,e))}function wte(t,n){const e=t.canvas();e&&!t._events[n]&&(t._events[n]=1,e.addEventListener(n,t[n]?o=>t[n](o):o=>t.fire(n,o)))}function R7(t,n,e){return function(o){const f=this._active,r=this.pickEvent(o);r===f?this.fire(t,o):((!f||!f.exit)&&this.fire(e,o),this._active=r,this.fire(n,o),this.fire(t,o))}}function F7(t){return function(n){this.fire(t,n),this._active=null}}ni(Vy,ep,{initialize(t,n,e){return this._canvas=t&&PM(t,"canvas"),[P_,Ik,L_,Ev,Yb].forEach(o=>z7(this,o)),ep.prototype.initialize.call(this,t,n,e)},canvas(){return this._canvas},context(){return this._canvas.getContext("2d")},events:bte,DOMMouseScroll(t){this.fire(qF,t)},mousemove:R7(L_,VF,Ev),dragover:R7(UF,jF,Yb),mouseout:F7(Ev),dragleave:F7(Yb),mousedown(t){this._down=this._active,this.fire(Ik,t)},click(t){this._down===this._active&&(this.fire(P_,t),this._down=null)},touchstart(t){this._touch=this.pickEvent(t.changedTouches[0]),this._first&&(this._active=this._touch,this._first=!1),this.fire(D_,t,!0)},touchmove(t){this.fire(I_,t,!0)},touchend(t){this.fire(z_,t,!0),this._touch=null},fire(t,n,e){const o=e?this._touch:this._active,f=this._handlers[t];if(n.vegaType=t,t===Rk&&o&&o.href?this.handleHref(n,o,o.href):(t===zk||t===Qv)&&this.handleTooltip(n,o,t!==Qv),f)for(let r=0,a=f.length;r=0&&o.splice(f,1),this},pickEvent(t){const n=Cw(t,this._canvas),e=this._origin;return this.pick(this._scene,n[0],n[1],n[0]-e[0],n[1]-e[1])},pick(t,n,e,o,f){const r=this.context();return tc[t.marktype].pick.call(this,r,t,n,e,o,f)}});function kte(){return typeof window<"u"&&window.devicePixelRatio||1}var Tte=kte();function Ate(t,n,e,o,f,r){const a=typeof HTMLElement<"u"&&t instanceof HTMLElement&&t.parentNode!=null,u=t.getContext("2d"),c=a?Tte:f;t.width=n*c,t.height=e*c;for(const i in r)u[i]=r[i];return a&&c!==1&&(t.style.width=n+"px",t.style.height=e+"px"),u.pixelRatio=c,u.setTransform(c,0,0,c,c*o[0],c*o[1]),t}function R_(t){oh.call(this,t),this._options={},this._redraw=!1,this._dirty=new zs,this._tempb=new zs}const N7=oh.prototype,Mte=(t,n,e)=>new zs().set(0,0,n,e).translate(-t[0],-t[1]);function Ste(t,n,e){return n.expand(1).round(),t.pixelRatio%1&&n.scale(t.pixelRatio).round().scale(1/t.pixelRatio),n.translate(-(e[0]%1),-(e[1]%1)),t.beginPath(),t.rect(n.x1,n.y1,n.width(),n.height()),t.clip(),n}ni(R_,oh,{initialize(t,n,e,o,f,r){return this._options=r||{},this._canvas=this._options.externalContext?null:Vd(1,1,this._options.type),t&&this._canvas&&(Xc(t,0).appendChild(this._canvas),this._canvas.setAttribute("class","marks")),N7.initialize.call(this,t,n,e,o,f)},resize(t,n,e,o){if(N7.resize.call(this,t,n,e,o),this._canvas)Ate(this._canvas,this._width,this._height,this._origin,this._scale,this._options.context);else{const f=this._options.externalContext;f||Pr("CanvasRenderer is missing a valid canvas or context"),f.scale(this._scale,this._scale),f.translate(this._origin[0],this._origin[1])}return this._redraw=!0,this},canvas(){return this._canvas},context(){return this._options.externalContext||(this._canvas?this._canvas.getContext("2d"):null)},dirty(t){const n=this._tempb.clear().union(t.bounds);let e=t.mark.group;for(;e;)n.translate(e.x||0,e.y||0),e=e.mark.group;this._dirty.union(n)},_render(t){const n=this.context(),e=this._origin,o=this._width,f=this._height,r=this._dirty,a=Mte(e,o,f);n.save();const u=this._redraw||r.empty()?(this._redraw=!1,a.expand(1)):Ste(n,a.intersect(r),e);return this.clear(-e[0],-e[1],o,f),this.draw(n,t,u),n.restore(),r.clear(),this},draw(t,n,e){const o=tc[n.marktype];n.clip&&Tee(t,n),o.draw.call(this,t,n,e),n.clip&&t.restore()},clear(t,n,e,o){const f=this._options,r=this.context();f.type!=="pdf"&&!f.externalContext&&r.clearRect(t,n,e,o),this._bgcolor!=null&&(r.fillStyle=this._bgcolor,r.fillRect(t,n,e,o))}});function DM(t,n){ep.call(this,t,n);const e=this;e._hrefHandler=Fk(e,(o,f)=>{f&&f.href&&e.handleHref(o,f,f.href)}),e._tooltipHandler=Fk(e,(o,f)=>{e.handleTooltip(o,f,o.type!==Qv)})}const Fk=(t,n)=>e=>{let o=e.target.__data__;o=Array.isArray(o)?o[0]:o,e.vegaType=e.type,n.call(t._obj,e,o)};ni(DM,ep,{initialize(t,n,e){let o=this._svg;return o&&(o.removeEventListener(Rk,this._hrefHandler),o.removeEventListener(zk,this._tooltipHandler),o.removeEventListener(Qv,this._tooltipHandler)),this._svg=o=t&&PM(t,"svg"),o&&(o.addEventListener(Rk,this._hrefHandler),o.addEventListener(zk,this._tooltipHandler),o.addEventListener(Qv,this._tooltipHandler)),ep.prototype.initialize.call(this,t,n,e)},canvas(){return this._svg},on(t,n){const e=this.eventName(t),o=this._handlers;if(this._handlerIndex(o[e],t,n)<0){const r={type:t,handler:n,listener:Fk(this,n)};(o[e]||(o[e]=[])).push(r),this._svg&&this._svg.addEventListener(e,r.listener)}return this},off(t,n){const e=this.eventName(t),o=this._handlers[e],f=this._handlerIndex(o,t,n);return f>=0&&(this._svg&&this._svg.removeEventListener(e,o[f].listener),o.splice(f,1)),this}});const HF="aria-hidden",IM="aria-label",zM="role",RM="aria-roledescription",$F="graphics-object",FM="graphics-symbol",GF=(t,n,e)=>({[zM]:t,[RM]:n,[IM]:e||void 0}),Ete=ff(["axis-domain","axis-grid","axis-label","axis-tick","axis-title","legend-band","legend-entry","legend-gradient","legend-label","legend-title","legend-symbol","title"]),B7={axis:{desc:"axis",caption:Lte},legend:{desc:"legend",caption:Pte},"title-text":{desc:"title",caption:t=>"Title text '".concat(U7(t),"'")},"title-subtitle":{desc:"subtitle",caption:t=>"Subtitle text '".concat(U7(t),"'")}},j7={ariaRole:zM,ariaRoleDescription:RM,description:IM};function WF(t,n){const e=n.aria===!1;if(t(HF,e||void 0),e||n.description==null)for(const o in j7)t(j7[o],void 0);else{const o=n.mark.marktype;t(IM,n.description),t(zM,n.ariaRole||(o==="group"?$F:FM)),t(RM,n.ariaRoleDescription||"".concat(o," mark"))}}function YF(t){return t.aria===!1?{[HF]:!0}:Ete[t.role]?null:B7[t.role]?Ote(t,B7[t.role]):Cte(t)}function Cte(t){const n=t.marktype,e=n==="group"||n==="text"||t.items.some(o=>o.description!=null&&o.aria!==!1);return GF(e?$F:FM,"".concat(n," mark container"),t.description)}function Ote(t,n){try{const e=t.items[0],o=n.caption||(()=>"");return GF(n.role||FM,n.desc,e.description||o(e))}catch{return null}}function U7(t){return ki(t.text).join(" ")}function Lte(t){const n=t.datum,e=t.orient,o=n.title?XF(t):null,f=t.context,r=f.scales[n.scale].value,a=f.dataflow.locale(),u=r.type,c=e==="left"||e==="right"?"Y":"X";return"".concat(c,"-axis")+(o?" titled '".concat(o,"'"):"")+" for a ".concat(pm(u)?"discrete":u," scale")+" with ".concat(hF(a,r,t))}function Pte(t){const n=t.datum,e=n.title?XF(t):null,o="".concat(n.type||""," legend").trim(),f=n.scales,r=Object.keys(f),a=t.context,u=a.scales[f[r[0]]].value,c=a.dataflow.locale();return Ite(o)+(e?" titled '".concat(e,"'"):"")+" for ".concat(Dte(r))+" with ".concat(hF(c,u,t))}function XF(t){try{return ki(Na(t.items).items[0].text).join(" ")}catch{return null}}function Dte(t){return t=t.map(n=>n+(n==="fill"||n==="stroke"?" color":"")),t.length<2?t[0]:t.slice(0,-1).join(", ")+" and "+Na(t)}function Ite(t){return t.length?t[0].toUpperCase()+t.slice(1):t}const ZF=t=>(t+"").replace(/&/g,"&").replace(//g,">"),zte=t=>ZF(t).replace(/"/g,""").replace(/\t/g," ").replace(/\n/g," ").replace(/\r/g," ");function NM(){let t="",n="",e="";const o=[],f=()=>n=e="",r=c=>{n&&(t+="".concat(n,">").concat(e),f()),o.push(c)},a=(c,i)=>(i!=null&&(n+=" ".concat(c,'="').concat(zte(i),'"')),u),u={open(c){r(c),n="<"+c;for(var i=arguments.length,s=new Array(i>1?i-1:0),l=1;l".concat(e,""):"/>"):t+=""),f(),u},attr:a,text:c=>(e+=ZF(c),u),toString:()=>t};return u}const JF=t=>KF(NM(),t)+"";function KF(t,n){if(t.open(n.tagName),n.hasAttributes()){const e=n.attributes,o=e.length;for(let f=0;f{i.dirty=n})),!o.zdirty){if(e.exit){r.nested&&o.items.length?(c=o.items[0],c._svg&&this._update(r,c._svg,c)):e._svg&&(c=e._svg.parentNode,c&&c.removeChild(e._svg)),e._svg=null;continue}e=r.nested?o.items[0]:e,e._update!==n&&(!e._svg||!e._svg.ownerSVGElement?(this._dirtyAll=!1,q7(e,n)):this._update(r,e._svg,e),e._update=n)}return!this._dirtyAll},mark(t,n,e){if(!this.isDirty(n))return n._svg;const o=this._svg,f=tc[n.marktype],r=n.interactive===!1?"none":null,a=f.tag==="g",u=H7(n,t,e,"g",o);u.setAttribute("class",BF(n));const c=YF(n);for(const d in c)ru(u,d,c[d]);a||ru(u,"pointer-events",r),ru(u,"clip-path",n.clip?pM(this,n,n.group):null);let i=null,s=0;const l=d=>{const h=this.isDirty(d),m=H7(d,u,i,f.tag,o);h&&(this._update(f,m,d),a&&Nte(this,m,d)),i=m,++s};return f.nested?n.items.length&&l(n.items[0]):df(n,l),Xc(u,s),u},_update(t,n,e){Fh=n,Dl=n.__values__,WF(Cv,e),t.attr(Cv,e,this);const o=jte[t.type];o&&o.call(this,t,n,e),Fh&&this.style(Fh,e)},style(t,n){if(n!=null){for(const e in F_){let o=e==="font"?Uy(n):n[e];if(o===Dl[e])continue;const f=F_[e];o==null?t.removeAttribute(f):(fM(o)&&(o=pF(o,this._defs.gradient,eN())),t.setAttribute(f,o+"")),Dl[e]=o}for(const e in N_)Xb(t,N_[e],n[e])}},defs(){const t=this._svg,n=this._defs;let e=n.el,o=0;for(const f in n.gradient)e||(n.el=e=Au(t,V1+1,"defs",$s)),o=Rte(e,n.gradient[f],o);for(const f in n.clipping)e||(n.el=e=Au(t,V1+1,"defs",$s)),o=Fte(e,n.clipping[f],o);e&&(o===0?(t.removeChild(e),n.el=null):Xc(e,o))},_clearDefs(){const t=this._defs;t.gradient={},t.clipping={}}});function q7(t,n){for(;t&&t.dirty!==n;t=t.mark.group)if(t.dirty=n,t.mark&&t.mark.dirty!==n)t.mark.dirty=n;else return}function Rte(t,n,e){let o,f,r;if(n.gradient==="radial"){let a=Au(t,e++,"pattern",$s);Pd(a,{id:E_+n.id,viewBox:"0,0,1,1",width:"100%",height:"100%",preserveAspectRatio:"xMidYMid slice"}),a=Au(a,0,"rect",$s),Pd(a,{width:1,height:1,fill:"url(".concat(eN(),"#").concat(n.id,")")}),t=Au(t,e++,"radialGradient",$s),Pd(t,{id:n.id,fx:n.x1,fy:n.y1,fr:n.r1,cx:n.x2,cy:n.y2,r:n.r2})}else t=Au(t,e++,"linearGradient",$s),Pd(t,{id:n.id,x1:n.x1,x2:n.x2,y1:n.y1,y2:n.y2});for(o=0,f=n.stops.length;o{o=t.mark(n,r,o),++f}),Xc(n,1+f)}function H7(t,n,e,o,f){let r=t._svg,a;if(!r&&(a=n.ownerDocument,r=Ld(a,o,$s),t._svg=r,t.mark&&(r.__data__=t,r.__values__={fill:"default"},o==="g"))){const u=Ld(a,"path",$s);r.appendChild(u),u.__data__=t;const c=Ld(a,"g",$s);r.appendChild(c),c.__data__=t;const i=Ld(a,"path",$s);r.appendChild(i),i.__data__=t,i.__values__={fill:"default"}}return(r.ownerSVGElement!==f||Bte(r,e))&&n.insertBefore(r,e?e.nextSibling:n.firstChild),r}function Bte(t,n){return t.parentNode&&t.parentNode.childNodes.length>1&&t.previousSibling!=n}let Fh=null,Dl=null;const jte={group(t,n,e){const o=Fh=n.childNodes[2];Dl=o.__values__,t.foreground(Cv,e,this),Dl=n.__values__,Fh=n.childNodes[1],t.content(Cv,e,this);const f=Fh=n.childNodes[0];t.background(Cv,e,this);const r=e.mark.interactive===!1?"none":null;if(r!==Dl.events&&(ru(o,"pointer-events",r),ru(f,"pointer-events",r),Dl.events=r),e.strokeForeground&&e.stroke){const a=e.fill;ru(o,"display",null),this.style(f,e),ru(f,"stroke",null),a&&(e.fill=null),Dl=o.__values__,this.style(o,e),a&&(e.fill=a),Fh=null}else ru(o,"display","none")},image(t,n,e){e.smooth===!1?(Xb(n,"image-rendering","optimizeSpeed"),Xb(n,"image-rendering","pixelated")):Xb(n,"image-rendering",null)},text(t,n,e){const o=jy(e);let f,r,a,u;Ir(o)?(r=o.map(c=>Qd(e,c)),f=r.join(` +`),f!==Dl.text&&(Xc(n,0),a=n.ownerDocument,u=Kd(e),r.forEach((c,i)=>{const s=Ld(a,"tspan",$s);s.__data__=e,s.textContent=c,i&&(s.setAttribute("x",0),s.setAttribute("dy",u)),n.appendChild(s)}),Dl.text=f)):(r=Qd(e,o),r!==Dl.text&&(n.textContent=r,Dl.text=r)),ru(n,"font-family",Uy(e)),ru(n,"font-size",ah(e)+"px"),ru(n,"font-style",e.fontStyle),ru(n,"font-variant",e.fontVariant),ru(n,"font-weight",e.fontWeight)}};function Cv(t,n,e){n!==Dl[t]&&(e?Ute(Fh,t,n,e):ru(Fh,t,n),Dl[t]=n)}function Xb(t,n,e){e!==Dl[n]&&(e==null?t.style.removeProperty(n):t.style.setProperty(n,e+""),Dl[n]=e)}function Pd(t,n){for(const e in n)ru(t,e,n[e])}function ru(t,n,e){e!=null?t.setAttribute(n,e):t.removeAttribute(n)}function Ute(t,n,e,o){e!=null?t.setAttributeNS(o,n,e):t.removeAttributeNS(o,n)}function eN(){let t;return typeof window>"u"?"":(t=window.location).hash?t.href.slice(0,-t.hash.length):t.href}function jM(t){oh.call(this,t),this._text=null,this._defs={gradient:{},clipping:{}}}ni(jM,oh,{svg(){return this._text},_render(t){const n=NM();n.open("svg",pa({},Kv,{class:"marks",width:this._width*this._scale,height:this._height*this._scale,viewBox:"0 0 ".concat(this._width," ").concat(this._height)}));const e=this._bgcolor;return e&&e!=="transparent"&&e!=="none"&&n.open("rect",{width:this._width,height:this._height,fill:e}).close(),n.open("g",QF,{transform:"translate("+this._origin+")"}),this.mark(n,t),n.close(),this.defs(n),this._text=n.close()+"",this},mark(t,n){const e=tc[n.marktype],o=e.tag,f=[WF,e.attr];t.open("g",{class:BF(n),"clip-path":n.clip?pM(this,n,n.group):null},YF(n),{"pointer-events":o!=="g"&&n.interactive===!1?"none":null});const r=a=>{const u=this.href(a);if(u&&t.open("a",u),t.open(o,this.attr(n,a,f,o!=="g"?o:null)),o==="text"){const c=jy(a);if(Ir(c)){const i={x:0,dy:Kd(a)};for(let s=0;sthis.mark(t,l)),t.close(),c&&s?(i&&(a.fill=null),a.stroke=s,t.open("path",this.attr(n,a,e.foreground,"bgrect")).close(),i&&(a.fill=i)):t.open("path",this.attr(n,a,e.foreground,"bgfore")).close()}t.close(),u&&t.close()};return e.nested?n.items&&n.items.length&&r(n.items[0]):df(n,r),t.close()},href(t){const n=t.href;let e;if(n){if(e=this._hrefs&&this._hrefs[n])return e;this.sanitizeURL(n).then(o=>{o["xlink:href"]=o.href,o.href=null,(this._hrefs||(this._hrefs={}))[n]=o})}return null},attr(t,n,e,o){const f={},r=(a,u,c,i)=>{f[i||a]=u};return Array.isArray(e)?e.forEach(a=>a(r,n,this)):e(r,n,this),o&&Vte(f,n,t,o,this._defs),f},defs(t){const n=this._defs.gradient,e=this._defs.clipping;if(Object.keys(n).length+Object.keys(e).length!==0){t.open("defs");for(const f in n){const r=n[f],a=r.stops;r.gradient==="radial"?(t.open("pattern",{id:E_+f,viewBox:"0,0,1,1",width:"100%",height:"100%",preserveAspectRatio:"xMidYMid slice"}),t.open("rect",{width:"1",height:"1",fill:"url(#"+f+")"}).close(),t.close(),t.open("radialGradient",{id:f,fx:r.x1,fy:r.y1,fr:r.r1,cx:r.x2,cy:r.y2,r:r.r2})):t.open("linearGradient",{id:f,x1:r.x1,x2:r.x2,y1:r.y1,y2:r.y2});for(let u=0;u1?(ym[t]=n,this):ym[t]}function aN(t,n,e){const o=[],f=new zs().union(n),r=t.marktype;return r?oN(t,f,e,o):r==="group"?sN(t,f,e,o):Pr("Intersect scene must be mark node or group item.")}function oN(t,n,e,o){if(qte(t,n,e)){const f=t.items,r=t.marktype,a=f.length;let u=0;if(r==="group")for(;u=0;r--)if(e[r]!=o[r])return!1;for(r=e.length-1;r>=0;r--)if(f=e[r],!UM(t[f],n[f],f))return!1;return typeof t==typeof n}function Gte(){_F(),vQ()}const xm="top",Zc="left",ef="right",tp="bottom",Wte="top-left",Yte="top-right",Xte="bottom-left",Zte="bottom-right",VM="start",Nk="middle",iu="end",Jte="x",Kte="y",Lw="group",qM="axis",HM="title",Qte="frame",ene="scope",$M="legend",fN="row-header",hN="row-footer",dN="row-title",pN="column-header",gN="column-footer",mN="column-title",tne="padding",nne="symbol",vN="fit",rne="fit-x",ine="fit-y",ane="pad",GM="none",ab="all",Bk="each",WM="flush",Id="column",zd="row";function yN(t){_r.call(this,null,t)}ni(yN,_r,{transform(t,n){const e=n.dataflow,o=t.mark,f=o.marktype,r=tc[f],a=r.bound;let u=o.bounds,c;if(r.nested)o.items.length&&e.dirty(o.items[0]),u=ob(o,a),o.items.forEach(i=>{i.bounds.clear().union(u)});else if(f===Lw||t.modified())switch(n.visit(n.MOD,i=>e.dirty(i)),u.clear(),o.items.forEach(i=>u.union(ob(i,a))),o.role){case qM:case $M:case HM:n.reflow()}else c=n.changed(n.REM),n.visit(n.ADD,i=>{u.union(ob(i,a))}),n.visit(n.MOD,i=>{c=c||u.alignsWith(i.bounds),e.dirty(i),u.union(ob(i,a))}),c&&(u.clear(),o.items.forEach(i=>u.union(i.bounds)));return uN(o),n.modifies("bounds")}});function ob(t,n,e){return n(t.bounds.clear(),t,e)}const $7=":vega_identifier:";function YM(t){_r.call(this,0,t)}YM.Definition={type:"Identifier",metadata:{modifies:!0},params:[{name:"as",type:"string",required:!0}]};ni(YM,_r,{transform(t,n){const e=one(n.dataflow),o=t.as;let f=e.value;return n.visit(n.ADD,r=>r[o]=r[o]||++f),e.set(this.value=f),n}});function one(t){return t._signals[$7]||(t._signals[$7]=t.add(0))}function xN(t){_r.call(this,null,t)}ni(xN,_r,{transform(t,n){let e=this.value;e||(e=n.dataflow.scenegraph().mark(t.markdef,sne(t),t.index),e.group.context=t.context,t.context.group||(t.context.group=e.group),e.source=this.source,e.clip=t.clip,e.interactive=t.interactive,this.value=e);const o=e.marktype===Lw?ww:_w;return n.visit(n.ADD,f=>o.call(f,e)),(t.modified("clip")||t.modified("interactive"))&&(e.clip=t.clip,e.interactive=!!t.interactive,e.zdirty=!0,n.reflow()),e.items=n.source,n}});function sne(t){const n=t.groups,e=t.parent;return n&&n.size===1?n.get(Object.keys(n.object)[0]):n&&e?n.lookup(e):null}function bN(t){_r.call(this,null,t)}const G7={parity:t=>t.filter((n,e)=>e%2?n.opacity=0:1),greedy:(t,n)=>{let e;return t.filter((o,f)=>!f||!_N(e.bounds,o.bounds,n)?(e=o,1):o.opacity=0)}},_N=(t,n,e)=>e>Math.max(n.x1-t.x2,t.x1-n.x2,n.y1-t.y2,t.y1-n.y2),W7=(t,n)=>{for(var e=1,o=t.length,f=t[0].bounds,r;e{const n=t.bounds;return n.width()>1&&n.height()>1},une=(t,n,e)=>{var o=t.range(),f=new zs;return n===xm||n===tp?f.set(o[0],-1/0,o[1],1/0):f.set(-1/0,o[0],1/0,o[1]),f.expand(e||1),r=>f.encloses(r.bounds)},Y7=t=>(t.forEach(n=>n.opacity=1),t),X7=(t,n)=>t.reflow(n.modified()).modifies("opacity");ni(bN,_r,{transform(t,n){const e=G7[t.method]||G7.parity,o=t.separation||0;let f=n.materialize(n.SOURCE).source,r,a;if(!f||!f.length)return;if(!t.method)return t.modified("method")&&(Y7(f),n=X7(n,t)),n;if(f=f.filter(lne),!f.length)return;if(t.sort&&(f=f.slice().sort(t.sort)),r=Y7(f),n=X7(n,t),r.length>=3&&W7(r,o)){do r=e(r,o);while(r.length>=3&&W7(r,o));r.length<3&&!Na(f).opacity&&(r.length>1&&(Na(r).opacity=0),Na(f).opacity=1)}t.boundScale&&t.boundTolerance>=0&&(a=une(t.boundScale,t.boundOrient,+t.boundTolerance),f.forEach(c=>{a(c)||(c.opacity=0)}));const u=r[0].mark.bounds.clear();return f.forEach(c=>{c.opacity&&u.union(c.bounds)}),n}});function wN(t){_r.call(this,null,t)}ni(wN,_r,{transform(t,n){const e=n.dataflow;if(n.visit(n.ALL,o=>e.dirty(o)),n.fields&&n.fields.zindex){const o=n.source&&n.source[0];o&&(o.mark.zdirty=!0)}}});const Pl=new zs;function Xg(t,n,e){return t[n]===e?0:(t[n]=e,1)}function cne(t){var n=t.items[0].orient;return n===Zc||n===ef}function fne(t){let n=+t.grid;return[t.ticks?n++:-1,t.labels?n++:-1,n+ +t.domain]}function hne(t,n,e,o){var f=n.items[0],r=f.datum,a=f.translate!=null?f.translate:.5,u=f.orient,c=fne(r),i=f.range,s=f.offset,l=f.position,d=f.minExtent,h=f.maxExtent,m=r.title&&f.items[c[2]].items[0],g=f.titlePadding,p=f.bounds,v=m&&EM(m),y=0,x=0,w,k;switch(Pl.clear().union(p),p.clear(),(w=c[0])>-1&&p.union(f.items[w].bounds),(w=c[1])>-1&&p.union(f.items[w].bounds),u){case xm:y=l||0,x=-s,k=Math.max(d,Math.min(h,-p.y1)),p.add(0,-k).add(i,0),m&&sb(t,m,k,g,v,0,-1,p);break;case Zc:y=-s,x=l||0,k=Math.max(d,Math.min(h,-p.x1)),p.add(-k,0).add(0,i),m&&sb(t,m,k,g,v,1,-1,p);break;case ef:y=e+s,x=l||0,k=Math.max(d,Math.min(h,p.x2)),p.add(0,0).add(k,i),m&&sb(t,m,k,g,v,1,1,p);break;case tp:y=l||0,x=o+s,k=Math.max(d,Math.min(h,p.y2)),p.add(0,0).add(i,k),m&&sb(t,m,k,g,0,0,1,p);break;default:y=f.x,x=f.y}return Jh(p.translate(y,x),f),Xg(f,"x",y+a)|Xg(f,"y",x+a)&&(f.bounds=Pl,t.dirty(f),f.bounds=p,t.dirty(f)),f.mark.bounds.clear().union(p)}function sb(t,n,e,o,f,r,a,u){const c=n.bounds;if(n.auto){const i=a*(e+f+o);let s=0,l=0;t.dirty(n),r?s=(n.x||0)-(n.x=i):l=(n.y||0)-(n.y=i),n.mark.bounds.clear().union(c.translate(-s,-l)),t.dirty(n)}u.union(c)}const Z7=(t,n)=>Math.floor(Math.min(t,n)),J7=(t,n)=>Math.ceil(Math.max(t,n));function dne(t){var n=t.items,e=n.length,o=0,f,r;const a={marks:[],rowheaders:[],rowfooters:[],colheaders:[],colfooters:[],rowtitle:null,coltitle:null};for(;o1)for(T=0;T0&&(x[T]+=O/2);if(u&&Wo(e.center,zd)&&s!==1)for(T=0;T0&&(w[T]+=R/2);for(T=0;Tf&&(t.warn("Grid headers exceed limit: "+f),n=n.slice(0,f)),g+=r,y=0,w=n.length;y=0&&(T=e[x])==null;x-=d);u?(_=h==null?T.x:Math.round(T.bounds.x1+h*T.bounds.width()),M=g):(_=g,M=h==null?T.y:Math.round(T.bounds.y1+h*T.bounds.height())),k.union(b.bounds.translate(_-(b.x||0),M-(b.y||0))),b.x=_,b.y=M,t.dirty(b),p=a(p,k[i])}return p}function Q7(t,n,e,o,f,r){if(!!n){t.dirty(n);var a=e,u=e;o?a=Math.round(f.x1+r*f.width()):u=Math.round(f.y1+r*f.height()),n.bounds.translate(a-(n.x||0),u-(n.y||0)),n.mark.bounds.clear().union(n.bounds),n.x=a,n.y=u,t.dirty(n)}}function xne(t,n){const e=t[n]||{};return(o,f)=>e[o]!=null?e[o]:t[o]!=null?t[o]:f}function bne(t,n){let e=-1/0;return t.forEach(o=>{o.offset!=null&&(e=Math.max(e,o.offset))}),e>-1/0?e:n}function _ne(t,n,e,o,f,r,a){const u=xne(e,n),c=bne(t,u("offset",0)),i=u("anchor",VM),s=i===iu?1:i===Nk?.5:0,l={align:Bk,bounds:u("bounds",WM),columns:u("direction")==="vertical"?1:t.length,padding:u("margin",8),center:u("center"),nodirty:!0};switch(n){case Zc:l.anchor={x:Math.floor(o.x1)-c,column:iu,y:s*(a||o.height()+2*o.y1),row:i};break;case ef:l.anchor={x:Math.ceil(o.x2)+c,y:s*(a||o.height()+2*o.y1),row:i};break;case xm:l.anchor={y:Math.floor(f.y1)-c,row:iu,x:s*(r||f.width()+2*f.x1),column:i};break;case tp:l.anchor={y:Math.ceil(f.y2)+c,x:s*(r||f.width()+2*f.x1),column:i};break;case Wte:l.anchor={x:c,y:c};break;case Yte:l.anchor={x:r-c,y:c,column:iu};break;case Xte:l.anchor={x:c,y:a-c,row:iu};break;case Zte:l.anchor={x:r-c,y:a-c,column:iu,row:iu};break}return l}function wne(t,n){var e=n.items[0],o=e.datum,f=e.orient,r=e.bounds,a=e.x,u=e.y,c,i;return e._bounds?e._bounds.clear().union(r):e._bounds=r.clone(),r.clear(),Tne(t,e,e.items[0].items[0]),r=kne(e,r),c=2*e.padding,i=2*e.padding,r.empty()||(c=Math.ceil(r.width()+c),i=Math.ceil(r.height()+i)),o.type===nne&&Ane(e.items[0].items[0].items[0].items),f!==GM&&(e.x=a=0,e.y=u=0),e.width=c,e.height=i,Jh(r.set(a,u,a+c,u+i),e),e.mark.bounds.clear().union(r),e}function kne(t,n){return t.items.forEach(e=>n.union(e.bounds)),n.x1=t.padding,n.y1=t.padding,n}function Tne(t,n,e){var o=n.padding,f=o-e.x,r=o-e.y;if(!n.datum.title)(f||r)&&q1(t,e,f,r);else{var a=n.items[1].items[0],u=a.anchor,c=n.titlePadding||0,i=o-a.x,s=o-a.y;switch(a.orient){case Zc:f+=Math.ceil(a.bounds.width())+c;break;case ef:case tp:break;default:r+=a.bounds.height()+c}switch((f||r)&&q1(t,e,f,r),a.orient){case Zc:s+=Dg(n,e,a,u,1,1);break;case ef:i+=Dg(n,e,a,iu,0,0)+c,s+=Dg(n,e,a,u,1,1);break;case tp:i+=Dg(n,e,a,u,0,0),s+=Dg(n,e,a,iu,-1,0,1)+c;break;default:i+=Dg(n,e,a,u,0,0)}(i||s)&&q1(t,a,i,s),(i=Math.round(a.bounds.x1-o))<0&&(q1(t,e,-i,0),q1(t,a,-i,0))}}function Dg(t,n,e,o,f,r,a){const u=t.datum.type!=="symbol",c=e.datum.vgrad,i=u&&(r||!c)&&!a?n.items[0]:n,s=i.bounds[f?"y2":"x2"]-t.padding,l=c&&r?s:0,d=c&&r?0:s,h=f<=0?0:EM(e);return Math.round(o===VM?l:o===iu?d-h:.5*(s-h))}function q1(t,n,e,o){n.x+=e,n.y+=o,n.bounds.translate(e,o),n.mark.bounds.translate(e,o),t.dirty(n)}function Ane(t){const n=t.reduce((e,o)=>(e[o.column]=Math.max(o.bounds.x2-o.x,e[o.column]||0),e),{});t.forEach(e=>{e.width=n[e.column],e.height=e.bounds.y2-e.y})}function Mne(t,n,e,o,f){var r=n.items[0],a=r.frame,u=r.orient,c=r.anchor,i=r.offset,s=r.padding,l=r.items[0].items[0],d=r.items[1]&&r.items[1].items[0],h=u===Zc||u===ef?o:e,m=0,g=0,p=0,v=0,y=0,x;if(a!==Lw?u===Zc?(m=f.y2,h=f.y1):u===ef?(m=f.y1,h=f.y2):(m=f.x1,h=f.x2):u===Zc&&(m=o,h=0),x=c===VM?m:c===iu?h:(m+h)/2,d&&d.text){switch(u){case xm:case tp:y=l.bounds.height()+s;break;case Zc:v=l.bounds.width()+s;break;case ef:v=-l.bounds.width()-s;break}Pl.clear().union(d.bounds),Pl.translate(v-(d.x||0),y-(d.y||0)),Xg(d,"x",v)|Xg(d,"y",y)&&(t.dirty(d),d.bounds.clear().union(Pl),d.mark.bounds.clear().union(Pl),t.dirty(d)),Pl.clear().union(d.bounds)}else Pl.clear();switch(Pl.union(l.bounds),u){case xm:g=x,p=f.y1-Pl.height()-i;break;case Zc:g=f.x1-Pl.width()-i,p=x;break;case ef:g=f.x2+Pl.width()+i,p=x;break;case tp:g=x,p=f.y2+i;break;default:g=r.x,p=r.y}return Xg(r,"x",g)|Xg(r,"y",p)&&(Pl.translate(g,p),t.dirty(r),r.bounds.clear().union(Pl),n.bounds.clear().union(Pl),t.dirty(r)),r.bounds}function TN(t){_r.call(this,null,t)}ni(TN,_r,{transform(t,n){const e=n.dataflow;return t.mark.items.forEach(o=>{t.layout&&mne(e,o,t.layout),Ene(e,o,t)}),Sne(t.mark.group)?n.reflow():n}});function Sne(t){return t&&t.mark.role!=="legend-entry"}function Ene(t,n,e){var o=n.items,f=Math.max(0,n.width||0),r=Math.max(0,n.height||0),a=new zs().set(0,0,f,r),u=a.clone(),c=a.clone(),i=[],s,l,d,h,m,g;for(m=0,g=o.length;m{d=v.orient||ef,d!==GM&&(p[d]||(p[d]=[])).push(v)});for(const v in p){const y=p[v];kN(t,y,_ne(y,v,e.legends,u,c,f,r))}i.forEach(v=>{const y=v.bounds;if(y.equals(v._bounds)||(v.bounds=v._bounds,t.dirty(v),v.bounds=y,t.dirty(v)),e.autosize&&e.autosize.type===vN)switch(v.orient){case Zc:case ef:a.add(y.x1,0).add(y.x2,0);break;case xm:case tp:a.add(0,y.y1).add(0,y.y2)}else a.union(y)})}a.union(u).union(c),s&&a.union(Mne(t,s,f,r,a)),n.clip&&a.set(0,0,n.width||0,n.height||0),Cne(t,n,a,e)}function Cne(t,n,e,o){const f=o.autosize||{},r=f.type;if(t._autosize<1||!r)return;let a=t._width,u=t._height,c=Math.max(0,n.width||0),i=Math.max(0,Math.ceil(-e.x1)),s=Math.max(0,n.height||0),l=Math.max(0,Math.ceil(-e.y1));const d=Math.max(0,Math.ceil(e.x2-c)),h=Math.max(0,Math.ceil(e.y2-s));if(f.contains===tne){const m=t.padding();a-=m.left+m.right,u-=m.top+m.bottom}r===GM?(i=0,l=0,c=a,s=u):r===vN?(c=Math.max(0,a-i-d),s=Math.max(0,u-l-h)):r===rne?(c=Math.max(0,a-i-d),u=s+l+h):r===ine?(a=c+i+d,s=Math.max(0,u-l-h)):r===ane&&(a=c+i+d,u=s+l+h),t._resizeView(a,u,c,s,[i,l],f.resize)}var One=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",bound:yN,identifier:YM,mark:xN,overlap:bN,render:wN,viewlayout:TN});function AN(t){_r.call(this,null,t)}ni(AN,_r,{transform(t,n){if(this.value&&!t.modified())return n.StopPropagation;var e=n.dataflow.locale(),o=n.fork(n.NO_SOURCE|n.NO_FIELDS),f=this.value,r=t.scale,a=t.count==null?t.values?t.values.length:10:t.count,u=uM(r,a,t.minstep),c=t.format||sF(e,r,u,t.formatSpecifier,t.formatType,!!t.values),i=t.values?oF(r,t.values,u):cM(r,u);return f&&(o.rem=f),f=i.map((s,l)=>ro({index:l/(i.length-1||1),value:s,label:c(s)})),t.extra&&f.length&&f.push(ro({index:-1,extra:{value:f[0].value},label:""})),o.source=f,o.add=f,this.value=f,o}});function MN(t){_r.call(this,null,t)}function Lne(){return ro({})}function Pne(t){const n=Hm().test(e=>e.exit);return n.lookup=e=>n.get(t(e)),n}ni(MN,_r,{transform(t,n){var e=n.dataflow,o=n.fork(n.NO_SOURCE|n.NO_FIELDS),f=t.item||Lne,r=t.key||$i,a=this.value;return Ir(o.encode)&&(o.encode=null),a&&(t.modified("key")||n.modified(r))&&Pr("DataJoin does not support modified key function or fields."),a||(n=n.addAll(),this.value=a=Pne(r)),n.visit(n.ADD,u=>{const c=r(u);let i=a.get(c);i?i.exit?(a.empty--,o.add.push(i)):o.mod.push(i):(i=f(u),a.set(c,i),o.add.push(i)),i.datum=u,i.exit=!1}),n.visit(n.MOD,u=>{const c=r(u),i=a.get(c);i&&(i.datum=u,o.mod.push(i))}),n.visit(n.REM,u=>{const c=r(u),i=a.get(c);u===i.datum&&!i.exit&&(o.rem.push(i),i.exit=!0,++a.empty)}),n.changed(n.ADD_MOD)&&o.modifies("datum"),(n.clean()||t.clean&&a.empty>e.cleanThreshold)&&e.runAfter(a.clean),o}});function SN(t){_r.call(this,null,t)}ni(SN,_r,{transform(t,n){var e=n.fork(n.ADD_REM),o=t.mod||!1,f=t.encoders,r=n.encode;if(Ir(r))if(e.changed()||r.every(l=>f[l]))r=r[0],e.encode=null;else return n.StopPropagation;var a=r==="enter",u=f.update||yd,c=f.enter||yd,i=f.exit||yd,s=(r&&!a?f[r]:u)||yd;if(n.changed(n.ADD)&&(n.visit(n.ADD,l=>{c(l,t),u(l,t)}),e.modifies(c.output),e.modifies(u.output),s!==yd&&s!==u&&(n.visit(n.ADD,l=>{s(l,t)}),e.modifies(s.output))),n.changed(n.REM)&&i!==yd&&(n.visit(n.REM,l=>{i(l,t)}),e.modifies(i.output)),a||s!==yd){const l=n.MOD|(t.modified()?n.REFLOW:0);a?(n.visit(l,d=>{const h=c(d,t)||o;(s(d,t)||h)&&e.mod.push(d)}),e.mod.length&&e.modifies(c.output)):n.visit(l,d=>{(s(d,t)||o)&&e.mod.push(d)}),e.mod.length&&e.modifies(s.output)}return e.changed()?e:n.StopPropagation}});function EN(t){_r.call(this,[],t)}ni(EN,_r,{transform(t,n){if(this.value!=null&&!t.modified())return n.StopPropagation;var e=n.dataflow.locale(),o=n.fork(n.NO_SOURCE|n.NO_FIELDS),f=this.value,r=t.type||Vb,a=t.scale,u=+t.limit,c=uM(a,t.count==null?5:t.count,t.minstep),i=!!t.values||r===Vb,s=t.format||fF(e,a,c,r,t.formatSpecifier,t.formatType,i),l=t.values||cF(a,c),d,h,m,g,p;return f&&(o.rem=f),r===Vb?(u&&l.length>u?(n.dataflow.warn("Symbol legend count exceeds limit, filtering items."),f=l.slice(0,u-1),p=!0):f=l,ga(m=t.size)?(!t.values&&a(f[0])===0&&(f=f.slice(1)),g=f.reduce((v,y)=>Math.max(v,m(y,t)),0)):m=$l(g=m||8),f=f.map((v,y)=>ro({index:y,label:s(v,y,f),value:v,offset:g,size:m(v,t)})),p&&(p=l[f.length],f.push(ro({index:f.length,label:"\u2026".concat(l.length-f.length," entries"),value:p,offset:g,size:m(p,t)})))):r===iQ?(d=a.domain(),h=rF(a,d[0],Na(d)),l.length<3&&!t.values&&d[0]!==Na(d)&&(l=[d[0],Na(d)]),f=l.map((v,y)=>ro({index:y,label:s(v,y,l),value:v,perc:h(v)}))):(m=l.length-1,h=gQ(a),f=l.map((v,y)=>ro({index:y,label:s(v,y,l),value:v,perc:y?h(v):0,perc2:y===m?1:h(l[y+1])}))),o.source=f,o.add=f,this.value=f,o}});const Dne=t=>t.source.x,Ine=t=>t.source.y,zne=t=>t.target.x,Rne=t=>t.target.y;function XM(t){_r.call(this,{},t)}XM.Definition={type:"LinkPath",metadata:{modifies:!0},params:[{name:"sourceX",type:"field",default:"source.x"},{name:"sourceY",type:"field",default:"source.y"},{name:"targetX",type:"field",default:"target.x"},{name:"targetY",type:"field",default:"target.y"},{name:"orient",type:"enum",default:"vertical",values:["horizontal","vertical","radial"]},{name:"shape",type:"enum",default:"line",values:["line","arc","curve","diagonal","orthogonal"]},{name:"require",type:"signal"},{name:"as",type:"string",default:"path"}]};ni(XM,_r,{transform(t,n){var e=t.sourceX||Dne,o=t.sourceY||Ine,f=t.targetX||zne,r=t.targetY||Rne,a=t.as||"path",u=t.orient||"vertical",c=t.shape||"line",i=eO.get(c+"-"+u)||eO.get(c);return i||Pr("LinkPath unsupported type: "+t.shape+(t.orient?"-"+t.orient:"")),n.visit(n.SOURCE,s=>{s[a]=i(e(s),o(s),f(s),r(s))}),n.reflow(t.modified()).modifies(a)}});const CN=(t,n,e,o)=>"M"+t+","+n+"L"+e+","+o,Fne=(t,n,e,o)=>CN(n*Math.cos(t),n*Math.sin(t),o*Math.cos(e),o*Math.sin(e)),ON=(t,n,e,o)=>{var f=e-t,r=o-n,a=Math.sqrt(f*f+r*r)/2,u=180*Math.atan2(r,f)/Math.PI;return"M"+t+","+n+"A"+a+","+a+" "+u+" 0 1 "+e+","+o},Nne=(t,n,e,o)=>ON(n*Math.cos(t),n*Math.sin(t),o*Math.cos(e),o*Math.sin(e)),LN=(t,n,e,o)=>{const f=e-t,r=o-n,a=.2*(f+r),u=.2*(r-f);return"M"+t+","+n+"C"+(t+a)+","+(n+u)+" "+(e+u)+","+(o-a)+" "+e+","+o},Bne=(t,n,e,o)=>LN(n*Math.cos(t),n*Math.sin(t),o*Math.cos(e),o*Math.sin(e)),jne=(t,n,e,o)=>"M"+t+","+n+"V"+o+"H"+e,Une=(t,n,e,o)=>"M"+t+","+n+"H"+e+"V"+o,Vne=(t,n,e,o)=>{const f=Math.cos(t),r=Math.sin(t),a=Math.cos(e),u=Math.sin(e),c=Math.abs(e-t)>Math.PI?e<=t:e>t;return"M"+n*f+","+n*r+"A"+n+","+n+" 0 0,"+(c?1:0)+" "+n*a+","+n*u+"L"+o*a+","+o*u},qne=(t,n,e,o)=>{const f=(t+e)/2;return"M"+t+","+n+"C"+f+","+n+" "+f+","+o+" "+e+","+o},Hne=(t,n,e,o)=>{const f=(n+o)/2;return"M"+t+","+n+"C"+t+","+f+" "+e+","+f+" "+e+","+o},$ne=(t,n,e,o)=>{const f=Math.cos(t),r=Math.sin(t),a=Math.cos(e),u=Math.sin(e),c=(n+o)/2;return"M"+n*f+","+n*r+"C"+c*f+","+c*r+" "+c*a+","+c*u+" "+o*a+","+o*u},eO=Hm({line:CN,"line-radial":Fne,arc:ON,"arc-radial":Nne,curve:LN,"curve-radial":Bne,"orthogonal-horizontal":jne,"orthogonal-vertical":Une,"orthogonal-radial":Vne,"diagonal-horizontal":qne,"diagonal-vertical":Hne,"diagonal-radial":$ne});function ZM(t){_r.call(this,null,t)}ZM.Definition={type:"Pie",metadata:{modifies:!0},params:[{name:"field",type:"field"},{name:"startAngle",type:"number",default:0},{name:"endAngle",type:"number",default:6.283185307179586},{name:"sort",type:"boolean",default:!1},{name:"as",type:"string",array:!0,length:2,default:["startAngle","endAngle"]}]};ni(ZM,_r,{transform(t,n){var e=t.as||["startAngle","endAngle"],o=e[0],f=e[1],r=t.field||Um,a=t.startAngle||0,u=t.endAngle!=null?t.endAngle:2*Math.PI,c=n.source,i=c.map(r),s=i.length,l=a,d=(u-a)/MI(i),h=Ju(s),m,g,p;for(t.sort&&h.sort((v,y)=>i[v]-i[y]),m=0;m-1)return o;var f=n.domain,r=t.type,a=n.zero||n.zero===void 0&&Wne(t),u,c;if(!f)return 0;if(PN(r)&&n.padding&&f[0]!==Na(f)&&(f=Qne(r,f,n.range,n.padding,n.exponent,n.constant)),(a||n.domainMin!=null||n.domainMax!=null||n.domainMid!=null)&&(u=(f=f.slice()).length-1||1,a&&(f[0]>0&&(f[0]=0),f[u]<0&&(f[u]=0)),n.domainMin!=null&&(f[0]=n.domainMin),n.domainMax!=null&&(f[u]=n.domainMax),n.domainMid!=null)){c=n.domainMid;const i=c>f[u]?u+1:cf+(r<0?-1:r>0?1:0),0));o!==n.length&&e.warn("Log scale domain includes zero: "+oi(n))}return n}function ere(t,n,e){let o=n.bins;if(o&&!Ir(o)){const f=t.domain(),r=f[0],a=Na(f),u=o.step;let c=o.start==null?r:o.start,i=o.stop==null?a:o.stop;u||Pr("Scale bins parameter missing step property."),ca&&(i=u*Math.floor(a/u)),o=Ju(c,i+u/2,u)}return o?t.bins=o:t.bins&&delete t.bins,t.type===rM&&(o?!n.domain&&!n.domainRaw&&(t.domain(o),e=o.length):t.bins=t.domain()),e}function tre(t,n,e){var o=t.type,f=n.round||!1,r=n.range;if(n.rangeStep!=null)r=nre(o,n,e);else if(n.scheme&&(r=rre(o,n,e),ga(r))){if(t.interpolator)return t.interpolator(r);Pr("Scale type ".concat(o," does not support interpolating color schemes."))}if(r&&QR(o))return t.interpolator(xw(jk(r,n.reverse),n.interpolate,n.interpolateGamma));r&&n.interpolate&&t.interpolate?t.interpolate(sM(n.interpolate,n.interpolateGamma)):ga(t.round)?t.round(f):ga(t.rangeRound)&&t.interpolate(f?$2:ky),r&&t.range(jk(r,n.reverse))}function nre(t,n,e){t!==YR&&t!==Ak&&Pr("Only band and point scales support rangeStep.");var o=(n.paddingOuter!=null?n.paddingOuter:n.padding)||0,f=t===Ak?1:(n.paddingInner!=null?n.paddingInner:n.padding)||0;return[0,n.rangeStep*tM(e,f,o)]}function rre(t,n,e){var o=n.schemeExtent,f,r;return Ir(n.scheme)?r=xw(n.scheme,n.interpolate,n.interpolateGamma):(f=n.scheme.toLowerCase(),r=lM(f),r||Pr("Unrecognized scheme name: ".concat(n.scheme))),e=t===yw?e+1:t===rM?e-1:t===dm||t===vw?+n.schemeCount||Gne:e,QR(t)?tO(r,o,n.reverse):ga(r)?nF(tO(r,o),e):t===nM?r:r.slice(0,e)}function tO(t,n,e){return ga(t)&&(n||e)?tF(t,jk(n||[0,1],e)):t}function jk(t,n){return n?t.slice().reverse():t}function zN(t){_r.call(this,null,t)}ni(zN,_r,{transform(t,n){const e=t.modified("sort")||n.changed(n.ADD)||n.modified(t.sort.fields)||n.modified("datum");return e&&n.source.sort(H0(t.sort)),this.modified(e),n}});const nO="zero",RN="center",FN="normalize",NN=["y0","y1"];function JM(t){_r.call(this,null,t)}JM.Definition={type:"Stack",metadata:{modifies:!0},params:[{name:"field",type:"field"},{name:"groupby",type:"field",array:!0},{name:"sort",type:"compare"},{name:"offset",type:"enum",default:nO,values:[nO,RN,FN]},{name:"as",type:"string",array:!0,length:2,default:NN}]};ni(JM,_r,{transform(t,n){var e=t.as||NN,o=e[0],f=e[1],r=H0(t.sort),a=t.field||Um,u=t.offset===RN?ire:t.offset===FN?are:ore,c,i,s,l;for(c=sre(n.source,t.groupby,r,a),i=0,s=c.length,l=c.max;ig(s),a,u,c,i,s,l,d,h,m;if(n==null)f.push(t.slice());else for(a={},u=0,c=t.length;um&&(m=h),e&&d.sort(e)}return f.max=m,f}var lre=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",axisticks:AN,datajoin:MN,encode:SN,legendentries:EN,linkpath:XM,pie:ZM,scale:DN,sortitems:zN,stack:JM}),Xi=1e-6,B_=1e-12,Sa=Math.PI,ys=Sa/2,j_=Sa/4,du=Sa*2,Os=180/Sa,Ea=Sa/180,Va=Math.abs,Zm=Math.atan,xc=Math.atan2,Zi=Math.cos,ub=Math.ceil,BN=Math.exp,Uk=Math.hypot,U_=Math.log,Z5=Math.pow,Gi=Math.sin,fc=Math.sign||function(t){return t>0?1:t<0?-1:0},pu=Math.sqrt,KM=Math.tan;function jN(t){return t>1?0:t<-1?Sa:Math.acos(t)}function Iu(t){return t>1?ys:t<-1?-ys:Math.asin(t)}function bl(){}function V_(t,n){t&&iO.hasOwnProperty(t.type)&&iO[t.type](t,n)}var rO={Feature:function(t,n){V_(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,o=-1,f=e.length;++o=0?1:-1,f=o*e,r=Zi(n),a=Gi(n),u=$k*a,c=Hk*r+u*Zi(f),i=u*o*Gi(f);q_.add(xc(i,c)),qk=t,Hk=r,$k=a}function hre(t){return H_=new fu,Dh(t,Kf),H_*2}function $_(t){return[xc(t[1],t[0]),Iu(t[2])]}function T0(t){var n=t[0],e=t[1],o=Zi(e);return[o*Zi(n),o*Gi(n),Gi(e)]}function cb(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function bm(t,n){return[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]]}function J5(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function fb(t,n){return[t[0]*n,t[1]*n,t[2]*n]}function G_(t){var n=pu(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}var us,ku,ms,Yu,Jp,HN,$N,tm,Ov,kd,Yh,Oh={point:Gk,lineStart:oO,lineEnd:sO,polygonStart:function(){Oh.point=WN,Oh.lineStart=dre,Oh.lineEnd=pre,Ov=new fu,Kf.polygonStart()},polygonEnd:function(){Kf.polygonEnd(),Oh.point=Gk,Oh.lineStart=oO,Oh.lineEnd=sO,q_<0?(us=-(ms=180),ku=-(Yu=90)):Ov>Xi?Yu=90:Ov<-Xi&&(ku=-90),Yh[0]=us,Yh[1]=ms},sphere:function(){us=-(ms=180),ku=-(Yu=90)}};function Gk(t,n){kd.push(Yh=[us=t,ms=t]),nYu&&(Yu=n)}function GN(t,n){var e=T0([t*Ea,n*Ea]);if(tm){var o=bm(tm,e),f=[o[1],-o[0],0],r=bm(f,o);G_(r),r=$_(r);var a=t-Jp,u=a>0?1:-1,c=r[0]*Os*u,i,s=Va(a)>180;s^(u*JpYu&&(Yu=i)):(c=(c+360)%360-180,s^(u*JpYu&&(Yu=n))),s?tWu(us,ms)&&(ms=t):Wu(t,ms)>Wu(us,ms)&&(us=t):ms>=us?(tms&&(ms=t)):t>Jp?Wu(us,t)>Wu(us,ms)&&(ms=t):Wu(t,ms)>Wu(us,ms)&&(us=t)}else kd.push(Yh=[us=t,ms=t]);nYu&&(Yu=n),tm=e,Jp=t}function oO(){Oh.point=GN}function sO(){Yh[0]=us,Yh[1]=ms,Oh.point=Gk,tm=null}function WN(t,n){if(tm){var e=t-Jp;Ov.add(Va(e)>180?e+(e>0?360:-360):e)}else HN=t,$N=n;Kf.point(t,n),GN(t,n)}function dre(){Kf.lineStart()}function pre(){WN(HN,$N),Kf.lineEnd(),Va(Ov)>Xi&&(us=-(ms=180)),Yh[0]=us,Yh[1]=ms,tm=null}function Wu(t,n){return(n-=t)<0?n+360:n}function gre(t,n){return t[0]-n[0]}function lO(t,n){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:nWu(o[0],o[1])&&(o[1]=f[1]),Wu(f[0],o[1])>Wu(o[0],o[1])&&(o[0]=f[0])):r.push(o=f);for(a=-1/0,e=r.length-1,n=0,o=r[e];n<=e;o=f,++n)f=r[n],(u=Wu(o[1],f[0]))>a&&(a=u,us=f[0],ms=o[1])}return kd=Yh=null,us===1/0||ku===1/0?[[NaN,NaN],[NaN,NaN]]:[[us,ku],[ms,Yu]]}var hv,W_,Y_,X_,Z_,J_,K_,Q_,Wk,Yk,Xk,YN,XN,au,ou,su,tf={sphere:bl,point:QM,lineStart:uO,lineEnd:cO,polygonStart:function(){tf.lineStart=xre,tf.lineEnd=bre},polygonEnd:function(){tf.lineStart=uO,tf.lineEnd=cO}};function QM(t,n){t*=Ea,n*=Ea;var e=Zi(n);qy(e*Zi(t),e*Gi(t),Gi(n))}function qy(t,n,e){++hv,Y_+=(t-Y_)/hv,X_+=(n-X_)/hv,Z_+=(e-Z_)/hv}function uO(){tf.point=vre}function vre(t,n){t*=Ea,n*=Ea;var e=Zi(n);au=e*Zi(t),ou=e*Gi(t),su=Gi(n),tf.point=yre,qy(au,ou,su)}function yre(t,n){t*=Ea,n*=Ea;var e=Zi(n),o=e*Zi(t),f=e*Gi(t),r=Gi(n),a=xc(pu((a=ou*r-su*f)*a+(a=su*o-au*r)*a+(a=au*f-ou*o)*a),au*o+ou*f+su*r);W_+=a,J_+=a*(au+(au=o)),K_+=a*(ou+(ou=f)),Q_+=a*(su+(su=r)),qy(au,ou,su)}function cO(){tf.point=QM}function xre(){tf.point=_re}function bre(){ZN(YN,XN),tf.point=QM}function _re(t,n){YN=t,XN=n,t*=Ea,n*=Ea,tf.point=ZN;var e=Zi(n);au=e*Zi(t),ou=e*Gi(t),su=Gi(n),qy(au,ou,su)}function ZN(t,n){t*=Ea,n*=Ea;var e=Zi(n),o=e*Zi(t),f=e*Gi(t),r=Gi(n),a=ou*r-su*f,u=su*o-au*r,c=au*f-ou*o,i=Uk(a,u,c),s=Iu(i),l=i&&-s/i;Wk.add(l*a),Yk.add(l*u),Xk.add(l*c),W_+=s,J_+=s*(au+(au=o)),K_+=s*(ou+(ou=f)),Q_+=s*(su+(su=r)),qy(au,ou,su)}function wre(t){hv=W_=Y_=X_=Z_=J_=K_=Q_=0,Wk=new fu,Yk=new fu,Xk=new fu,Dh(t,tf);var n=+Wk,e=+Yk,o=+Xk,f=Uk(n,e,o);return fSa?t+Math.round(-t/du)*du:t,n]}Jk.invert=Jk;function JN(t,n,e){return(t%=du)?n||e?Zk(hO(t),dO(n,e)):hO(t):n||e?dO(n,e):Jk}function fO(t){return function(n,e){return n+=t,[n>Sa?n-du:n<-Sa?n+du:n,e]}}function hO(t){var n=fO(t);return n.invert=fO(-t),n}function dO(t,n){var e=Zi(t),o=Gi(t),f=Zi(n),r=Gi(n);function a(u,c){var i=Zi(c),s=Zi(u)*i,l=Gi(u)*i,d=Gi(c),h=d*e+s*o;return[xc(l*f-h*r,s*e-d*o),Iu(h*f+l*r)]}return a.invert=function(u,c){var i=Zi(c),s=Zi(u)*i,l=Gi(u)*i,d=Gi(c),h=d*f-l*r;return[xc(l*f+d*r,s*e+h*o),Iu(h*e-s*o)]},a}function kre(t){t=JN(t[0]*Ea,t[1]*Ea,t.length>2?t[2]*Ea:0);function n(e){return e=t(e[0]*Ea,e[1]*Ea),e[0]*=Os,e[1]*=Os,e}return n.invert=function(e){return e=t.invert(e[0]*Ea,e[1]*Ea),e[0]*=Os,e[1]*=Os,e},n}function Tre(t,n,e,o,f,r){if(!!e){var a=Zi(n),u=Gi(n),c=o*e;f==null?(f=n+o*du,r=n-c/2):(f=pO(a,f),r=pO(a,r),(o>0?fr)&&(f+=o*du));for(var i,s=f;o>0?s>r:s1&&t.push(t.pop().concat(t.shift()))},result:function(){var e=t;return t=[],n=null,e}}}function Zb(t,n){return Va(t[0]-n[0])=0;--u)f.point((l=s[u])[0],l[1]);else o(d.x,d.p.x,-1,f);d=d.p}d=d.o,s=d.z,h=!h}while(!d.v);f.lineEnd()}}}function gO(t){if(!!(n=t.length)){for(var n,e=0,o=t[0],f;++e=0?1:-1,A=M*_,S=A>Sa,E=p*b;if(c.add(xc(E*M*Gi(A),v*T+E*Zi(A))),a+=S?_+M*du:_,S^m>=e^w>=e){var D=bm(T0(h),T0(x));G_(D);var O=bm(r,D);G_(O);var R=(S^_>=0?-1:1)*Iu(O[2]);(o>R||o===R&&(D[0]||D[1]))&&(u+=S^_>=0?1:-1)}}return(a<-Xi||a0){for(c||(f.polygonStart(),c=!0),f.lineStart(),b=0;b<_;++b)f.point((A=M[b])[0],A[1]);f.lineEnd()}return}T>1&&w&2&&k.push(k.pop().concat(k.shift())),s.push(k.filter(Mre))}}return d}}function Mre(t){return t.length>1}function Sre(t,n){return((t=t.x)[0]<0?t[1]-ys-Xi:ys-t[1])-((n=n.x)[0]<0?n[1]-ys-Xi:ys-n[1])}var mO=eB(function(){return!0},Ere,Ore,[-Sa,-ys]);function Ere(t){var n=NaN,e=NaN,o=NaN,f;return{lineStart:function(){t.lineStart(),f=1},point:function(r,a){var u=r>0?Sa:-Sa,c=Va(r-n);Va(c-Sa)0?ys:-ys),t.point(o,e),t.lineEnd(),t.lineStart(),t.point(u,e),t.point(r,e),f=0):o!==u&&c>=Sa&&(Va(n-o)Xi?Zm((Gi(n)*(r=Zi(o))*Gi(e)-Gi(o)*(f=Zi(n))*Gi(t))/(f*r*a)):(n+o)/2}function Ore(t,n,e,o){var f;if(t==null)f=e*ys,o.point(-Sa,f),o.point(0,f),o.point(Sa,f),o.point(Sa,0),o.point(Sa,-f),o.point(0,-f),o.point(-Sa,-f),o.point(-Sa,0),o.point(-Sa,f);else if(Va(t[0]-n[0])>Xi){var r=t[0]0,f=Va(n)>Xi;function r(s,l,d,h){Tre(h,t,e,d,s,l)}function a(s,l){return Zi(s)*Zi(l)>n}function u(s){var l,d,h,m,g;return{lineStart:function(){m=h=!1,g=1},point:function(p,v){var y=[p,v],x,w=a(p,v),k=o?w?0:i(p,v):w?i(p+(p<0?Sa:-Sa),v):0;if(!l&&(m=h=w)&&s.lineStart(),w!==h&&(x=c(l,y),(!x||Zb(l,x)||Zb(y,x))&&(y[2]=1)),w!==h)g=0,w?(s.lineStart(),x=c(y,l),s.point(x[0],x[1])):(x=c(l,y),s.point(x[0],x[1],2),s.lineEnd()),l=x;else if(f&&l&&o^w){var b;!(k&d)&&(b=c(y,l,!0))&&(g=0,o?(s.lineStart(),s.point(b[0][0],b[0][1]),s.point(b[1][0],b[1][1]),s.lineEnd()):(s.point(b[1][0],b[1][1]),s.lineEnd(),s.lineStart(),s.point(b[0][0],b[0][1],3)))}w&&(!l||!Zb(l,y))&&s.point(y[0],y[1]),l=y,h=w,d=k},lineEnd:function(){h&&s.lineEnd(),l=null},clean:function(){return g|(m&&h)<<1}}}function c(s,l,d){var h=T0(s),m=T0(l),g=[1,0,0],p=bm(h,m),v=cb(p,p),y=p[0],x=v-y*y;if(!x)return!d&&s;var w=n*v/x,k=-n*y/x,b=bm(g,p),T=fb(g,w),_=fb(p,k);J5(T,_);var M=b,A=cb(T,M),S=cb(M,M),E=A*A-S*(cb(T,T)-1);if(!(E<0)){var D=pu(E),O=fb(M,(-A-D)/S);if(J5(O,T),O=$_(O),!d)return O;var R=s[0],z=l[0],L=s[1],P=l[1],N;z0^O[1]<(Va(O[0]-R)Sa^(R<=O[0]&&O[0]<=z)){var K=fb(M,(-A+D)/S);return J5(K,T),[O,$_(K)]}}}function i(s,l){var d=o?t:Sa-t,h=0;return s<-d?h|=1:s>d&&(h|=2),l<-d?h|=4:l>d&&(h|=8),h}return eB(a,u,r,o?[0,-t]:[-Sa,t-Sa])}function Pre(t,n,e,o,f,r){var a=t[0],u=t[1],c=n[0],i=n[1],s=0,l=1,d=c-a,h=i-u,m;if(m=e-a,!(!d&&m>0)){if(m/=d,d<0){if(m0){if(m>l)return;m>s&&(s=m)}if(m=f-a,!(!d&&m<0)){if(m/=d,d<0){if(m>l)return;m>s&&(s=m)}else if(d>0){if(m0)){if(m/=h,h<0){if(m0){if(m>l)return;m>s&&(s=m)}if(m=r-u,!(!h&&m<0)){if(m/=h,h<0){if(m>l)return;m>s&&(s=m)}else if(h>0){if(m0&&(t[0]=a+s*d,t[1]=u+s*h),l<1&&(n[0]=a+l*d,n[1]=u+l*h),!0}}}}}var dv=1e9,db=-dv;function tB(t,n,e,o){function f(i,s){return t<=i&&i<=e&&n<=s&&s<=o}function r(i,s,l,d){var h=0,m=0;if(i==null||(h=a(i,l))!==(m=a(s,l))||c(i,s)<0^l>0)do d.point(h===0||h===3?t:e,h>1?o:n);while((h=(h+l+4)%4)!==m);else d.point(s[0],s[1])}function a(i,s){return Va(i[0]-t)0?0:3:Va(i[0]-e)0?2:1:Va(i[1]-n)0?1:0:s>0?3:2}function u(i,s){return c(i.x,s.x)}function c(i,s){var l=a(i,1),d=a(s,1);return l!==d?l-d:l===0?s[1]-i[1]:l===1?i[0]-s[0]:l===2?i[1]-s[1]:s[0]-i[0]}return function(i){var s=i,l=KN(),d,h,m,g,p,v,y,x,w,k,b,T={point:_,lineStart:E,lineEnd:D,polygonStart:A,polygonEnd:S};function _(R,z){f(R,z)&&s.point(R,z)}function M(){for(var R=0,z=0,L=h.length;zo&&(te-W)*(o-K)>(Y-K)*(t-W)&&++R:Y<=o&&(te-W)*(o-K)<(Y-K)*(t-W)&&--R;return R}function A(){s=l,d=[],h=[],b=!0}function S(){var R=M(),z=b&&R,L=(d=AI(d)).length;(z||L)&&(i.polygonStart(),z&&(i.lineStart(),r(null,null,1,i),i.lineEnd()),L&&QN(d,u,R,r,i),i.polygonEnd()),s=i,d=h=m=null}function E(){T.point=O,h&&h.push(m=[]),k=!0,w=!1,y=x=NaN}function D(){d&&(O(g,p),v&&w&&l.rejoin(),d.push(l.result())),T.point=_,w&&s.lineEnd()}function O(R,z){var L=f(R,z);if(h&&m.push([R,z]),k)g=R,p=z,v=L,k=!1,L&&(s.lineStart(),s.point(R,z));else if(L&&w)s.point(R,z);else{var P=[y=Math.max(db,Math.min(dv,y)),x=Math.max(db,Math.min(dv,x))],N=[R=Math.max(db,Math.min(dv,R)),z=Math.max(db,Math.min(dv,z))];Pre(P,N,t,n,e,o)?(w||(s.lineStart(),s.point(P[0],P[1])),s.point(N[0],N[1]),L||s.lineEnd(),b=!1):L&&(s.lineStart(),s.point(R,z),b=!1)}y=R,x=z,w=L}return T}}function vO(t,n,e){var o=Ju(t,n-Xi,e).concat(n);return function(f){return o.map(function(r){return[f,r]})}}function yO(t,n,e){var o=Ju(t,n-Xi,e).concat(n);return function(f){return o.map(function(r){return[r,f]})}}function Dre(){var t,n,e,o,f,r,a,u,c=10,i=c,s=90,l=360,d,h,m,g,p=2.5;function v(){return{type:"MultiLineString",coordinates:y()}}function y(){return Ju(ub(o/s)*s,e,s).map(m).concat(Ju(ub(u/l)*l,a,l).map(g)).concat(Ju(ub(n/c)*c,t,c).filter(function(x){return Va(x%s)>Xi}).map(d)).concat(Ju(ub(r/i)*i,f,i).filter(function(x){return Va(x%l)>Xi}).map(h))}return v.lines=function(){return y().map(function(x){return{type:"LineString",coordinates:x}})},v.outline=function(){return{type:"Polygon",coordinates:[m(o).concat(g(a).slice(1),m(e).reverse().slice(1),g(u).reverse().slice(1))]}},v.extent=function(x){return arguments.length?v.extentMajor(x).extentMinor(x):v.extentMinor()},v.extentMajor=function(x){return arguments.length?(o=+x[0][0],e=+x[1][0],u=+x[0][1],a=+x[1][1],o>e&&(x=o,o=e,e=x),u>a&&(x=u,u=a,a=x),v.precision(p)):[[o,u],[e,a]]},v.extentMinor=function(x){return arguments.length?(n=+x[0][0],t=+x[1][0],r=+x[0][1],f=+x[1][1],n>t&&(x=n,n=t,t=x),r>f&&(x=r,r=f,f=x),v.precision(p)):[[n,r],[t,f]]},v.step=function(x){return arguments.length?v.stepMajor(x).stepMinor(x):v.stepMinor()},v.stepMajor=function(x){return arguments.length?(s=+x[0],l=+x[1],v):[s,l]},v.stepMinor=function(x){return arguments.length?(c=+x[0],i=+x[1],v):[c,i]},v.precision=function(x){return arguments.length?(p=+x,d=vO(r,f,90),h=yO(n,t,p),m=vO(u,a,90),g=yO(o,e,p),v):p},v.extentMajor([[-180,-90+Xi],[180,90-Xi]]).extentMinor([[-180,-80-Xi],[180,80+Xi]])}var ey=t=>t,Q5=new fu,Kk=new fu,nB,rB,Qk,eT,Sd={point:bl,lineStart:bl,lineEnd:bl,polygonStart:function(){Sd.lineStart=Ire,Sd.lineEnd=Rre},polygonEnd:function(){Sd.lineStart=Sd.lineEnd=Sd.point=bl,Q5.add(Va(Kk)),Kk=new fu},result:function(){var t=Q5/2;return Q5=new fu,t}};function Ire(){Sd.point=zre}function zre(t,n){Sd.point=iB,nB=Qk=t,rB=eT=n}function iB(t,n){Kk.add(eT*t-Qk*n),Qk=t,eT=n}function Rre(){iB(nB,rB)}var xO=Sd,_m=1/0,e2=_m,ty=-_m,t2=ty,Fre={point:Nre,lineStart:bl,lineEnd:bl,polygonStart:bl,polygonEnd:bl,result:function(){var t=[[_m,e2],[ty,t2]];return ty=t2=-(e2=_m=1/0),t}};function Nre(t,n){t<_m&&(_m=t),t>ty&&(ty=t),nt2&&(t2=n)}var n2=Fre,tT=0,nT=0,pv=0,r2=0,i2=0,Zg=0,rT=0,iT=0,gv=0,aB,oB,Nf,Bf,Jc={point:A0,lineStart:bO,lineEnd:_O,polygonStart:function(){Jc.lineStart=Ure,Jc.lineEnd=Vre},polygonEnd:function(){Jc.point=A0,Jc.lineStart=bO,Jc.lineEnd=_O},result:function(){var t=gv?[rT/gv,iT/gv]:Zg?[r2/Zg,i2/Zg]:pv?[tT/pv,nT/pv]:[NaN,NaN];return tT=nT=pv=r2=i2=Zg=rT=iT=gv=0,t}};function A0(t,n){tT+=t,nT+=n,++pv}function bO(){Jc.point=Bre}function Bre(t,n){Jc.point=jre,A0(Nf=t,Bf=n)}function jre(t,n){var e=t-Nf,o=n-Bf,f=pu(e*e+o*o);r2+=f*(Nf+t)/2,i2+=f*(Bf+n)/2,Zg+=f,A0(Nf=t,Bf=n)}function _O(){Jc.point=A0}function Ure(){Jc.point=qre}function Vre(){sB(aB,oB)}function qre(t,n){Jc.point=sB,A0(aB=Nf=t,oB=Bf=n)}function sB(t,n){var e=t-Nf,o=n-Bf,f=pu(e*e+o*o);r2+=f*(Nf+t)/2,i2+=f*(Bf+n)/2,Zg+=f,f=Bf*t-Nf*n,rT+=f*(Nf+t),iT+=f*(Bf+n),gv+=f*3,A0(Nf=t,Bf=n)}var wO=Jc;function lB(t){this._context=t}lB.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(t,n){switch(this._point){case 0:{this._context.moveTo(t,n),this._point=1;break}case 1:{this._context.lineTo(t,n);break}default:{this._context.moveTo(t+this._radius,n),this._context.arc(t,n,this._radius,0,du);break}}},result:bl};var aT=new fu,e4,uB,cB,mv,vv,a2={point:bl,lineStart:function(){a2.point=Hre},lineEnd:function(){e4&&fB(uB,cB),a2.point=bl},polygonStart:function(){e4=!0},polygonEnd:function(){e4=null},result:function(){var t=+aT;return aT=new fu,t}};function Hre(t,n){a2.point=fB,uB=mv=t,cB=vv=n}function fB(t,n){mv-=t,vv-=n,aT.add(pu(mv*mv+vv*vv)),mv=t,vv=n}var kO=a2;function hB(){this._string=[]}hB.prototype={_radius:4.5,_circle:TO(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._string.push("Z"),this._point=NaN},point:function(t,n){switch(this._point){case 0:{this._string.push("M",t,",",n),this._point=1;break}case 1:{this._string.push("L",t,",",n);break}default:{this._circle==null&&(this._circle=TO(this._radius)),this._string.push("M",t,",",n,this._circle);break}}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}else return null}};function TO(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function dB(t,n){var e=4.5,o,f;function r(a){return a&&(typeof e=="function"&&f.pointRadius(+e.apply(this,arguments)),Dh(a,o(f))),f.result()}return r.area=function(a){return Dh(a,o(xO)),xO.result()},r.measure=function(a){return Dh(a,o(kO)),kO.result()},r.bounds=function(a){return Dh(a,o(n2)),n2.result()},r.centroid=function(a){return Dh(a,o(wO)),wO.result()},r.projection=function(a){return arguments.length?(o=a==null?(t=null,ey):(t=a).stream,r):t},r.context=function(a){return arguments.length?(f=a==null?(n=null,new hB):new lB(n=a),typeof e!="function"&&f.pointRadius(e),r):n},r.pointRadius=function(a){return arguments.length?(e=typeof a=="function"?a:(f.pointRadius(+a),+a),r):e},r.projection(t).context(n)}function Pw(t){return function(n){var e=new oT;for(var o in t)e[o]=t[o];return e.stream=n,e}}function oT(){}oT.prototype={constructor:oT,point:function(t,n){this.stream.point(t,n)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function eS(t,n,e){var o=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),o!=null&&t.clipExtent(null),Dh(e,t.stream(n2)),n(n2.result()),o!=null&&t.clipExtent(o),t}function Dw(t,n,e){return eS(t,function(o){var f=n[1][0]-n[0][0],r=n[1][1]-n[0][1],a=Math.min(f/(o[1][0]-o[0][0]),r/(o[1][1]-o[0][1])),u=+n[0][0]+(f-a*(o[1][0]+o[0][0]))/2,c=+n[0][1]+(r-a*(o[1][1]+o[0][1]))/2;t.scale(150*a).translate([u,c])},e)}function tS(t,n,e){return Dw(t,[[0,0],n],e)}function nS(t,n,e){return eS(t,function(o){var f=+n,r=f/(o[1][0]-o[0][0]),a=(f-r*(o[1][0]+o[0][0]))/2,u=-r*o[0][1];t.scale(150*r).translate([a,u])},e)}function rS(t,n,e){return eS(t,function(o){var f=+n,r=f/(o[1][1]-o[0][1]),a=-r*o[0][0],u=(f-r*(o[1][1]+o[0][1]))/2;t.scale(150*r).translate([a,u])},e)}var AO=16,$re=Zi(30*Ea);function MO(t,n){return+n?Wre(t,n):Gre(t)}function Gre(t){return Pw({point:function(n,e){n=t(n,e),this.stream.point(n[0],n[1])}})}function Wre(t,n){function e(o,f,r,a,u,c,i,s,l,d,h,m,g,p){var v=i-o,y=s-f,x=v*v+y*y;if(x>4*n&&g--){var w=a+d,k=u+h,b=c+m,T=pu(w*w+k*k+b*b),_=Iu(b/=T),M=Va(Va(b)-1)n||Va((v*D+y*O)/x-.5)>.3||a*d+u*h+c*m<$re)&&(e(o,f,r,a,u,c,S,E,M,w/=T,k/=T,b,g,p),p.point(S,E),e(S,E,M,w,k,b,i,s,l,d,h,m,g,p))}}return function(o){var f,r,a,u,c,i,s,l,d,h,m,g,p={point:v,lineStart:y,lineEnd:w,polygonStart:function(){o.polygonStart(),p.lineStart=k},polygonEnd:function(){o.polygonEnd(),p.lineStart=y}};function v(_,M){_=t(_,M),o.point(_[0],_[1])}function y(){l=NaN,p.point=x,o.lineStart()}function x(_,M){var A=T0([_,M]),S=t(_,M);e(l,d,s,h,m,g,l=S[0],d=S[1],s=_,h=A[0],m=A[1],g=A[2],AO,o),o.point(l,d)}function w(){p.point=v,o.lineEnd()}function k(){y(),p.point=b,p.lineEnd=T}function b(_,M){x(f=_,M),r=l,a=d,u=h,c=m,i=g,p.point=x}function T(){e(l,d,s,h,m,g,r,a,f,u,c,i,AO,o),p.lineEnd=w,w()}return p}}var Yre=Pw({point:function(t,n){this.stream.point(t*Ea,n*Ea)}});function Xre(t){return Pw({point:function(n,e){var o=t(n,e);return this.stream.point(o[0],o[1])}})}function Zre(t,n,e,o,f){function r(a,u){return a*=o,u*=f,[n+t*a,e-t*u]}return r.invert=function(a,u){return[(a-n)/t*o,(e-u)/t*f]},r}function SO(t,n,e,o,f,r){if(!r)return Zre(t,n,e,o,f);var a=Zi(r),u=Gi(r),c=a*t,i=u*t,s=a/t,l=u/t,d=(u*e-a*n)/t,h=(u*n+a*e)/t;function m(g,p){return g*=o,p*=f,[c*g-i*p+n,e-i*g-c*p]}return m.invert=function(g,p){return[o*(s*g-l*p+d),f*(h-l*g-s*p)]},m}function sh(t){return pB(function(){return t})()}function pB(t){var n,e=150,o=480,f=250,r=0,a=0,u=0,c=0,i=0,s,l=0,d=1,h=1,m=null,g=mO,p=null,v,y,x,w=ey,k=.5,b,T,_,M,A;function S(R){return _(R[0]*Ea,R[1]*Ea)}function E(R){return R=_.invert(R[0],R[1]),R&&[R[0]*Os,R[1]*Os]}S.stream=function(R){return M&&A===R?M:M=Yre(Xre(s)(g(b(w(A=R)))))},S.preclip=function(R){return arguments.length?(g=R,m=void 0,O()):g},S.postclip=function(R){return arguments.length?(w=R,p=v=y=x=null,O()):w},S.clipAngle=function(R){return arguments.length?(g=+R?Lre(m=R*Ea):(m=null,mO),O()):m*Os},S.clipExtent=function(R){return arguments.length?(w=R==null?(p=v=y=x=null,ey):tB(p=+R[0][0],v=+R[0][1],y=+R[1][0],x=+R[1][1]),O()):p==null?null:[[p,v],[y,x]]},S.scale=function(R){return arguments.length?(e=+R,D()):e},S.translate=function(R){return arguments.length?(o=+R[0],f=+R[1],D()):[o,f]},S.center=function(R){return arguments.length?(r=R[0]%360*Ea,a=R[1]%360*Ea,D()):[r*Os,a*Os]},S.rotate=function(R){return arguments.length?(u=R[0]%360*Ea,c=R[1]%360*Ea,i=R.length>2?R[2]%360*Ea:0,D()):[u*Os,c*Os,i*Os]},S.angle=function(R){return arguments.length?(l=R%360*Ea,D()):l*Os},S.reflectX=function(R){return arguments.length?(d=R?-1:1,D()):d<0},S.reflectY=function(R){return arguments.length?(h=R?-1:1,D()):h<0},S.precision=function(R){return arguments.length?(b=MO(T,k=R*R),O()):pu(k)},S.fitExtent=function(R,z){return Dw(S,R,z)},S.fitSize=function(R,z){return tS(S,R,z)},S.fitWidth=function(R,z){return nS(S,R,z)},S.fitHeight=function(R,z){return rS(S,R,z)};function D(){var R=SO(e,0,0,d,h,l).apply(null,n(r,a)),z=SO(e,o-R[0],f-R[1],d,h,l);return s=JN(u,c,i),T=Zk(n,z),_=Zk(s,T),b=MO(T,k),O()}function O(){return M=A=null,S}return function(){return n=t.apply(this,arguments),S.invert=n.invert&&E,D()}}function iS(t){var n=0,e=Sa/3,o=pB(t),f=o(n,e);return f.parallels=function(r){return arguments.length?o(n=r[0]*Ea,e=r[1]*Ea):[n*Os,e*Os]},f}function Jre(t){var n=Zi(t);function e(o,f){return[o*n,Gi(f)/n]}return e.invert=function(o,f){return[o/n,Iu(f*n)]},e}function Kre(t,n){var e=Gi(t),o=(e+Gi(n))/2;if(Va(o)=.12&&p<.234&&g>=-.425&&g<-.214?f:p>=.166&&p<.234&&g>=-.214&&g<-.115?a:e).invert(d)},s.stream=function(d){return t&&n===d?t:t=Qre([e.stream(n=d),f.stream(d),a.stream(d)])},s.precision=function(d){return arguments.length?(e.precision(d),f.precision(d),a.precision(d),l()):e.precision()},s.scale=function(d){return arguments.length?(e.scale(d),f.scale(d*.35),a.scale(d),s.translate(e.translate())):e.scale()},s.translate=function(d){if(!arguments.length)return e.translate();var h=e.scale(),m=+d[0],g=+d[1];return o=e.translate(d).clipExtent([[m-.455*h,g-.238*h],[m+.455*h,g+.238*h]]).stream(i),r=f.translate([m-.307*h,g+.201*h]).clipExtent([[m-.425*h+Xi,g+.12*h+Xi],[m-.214*h-Xi,g+.234*h-Xi]]).stream(i),u=a.translate([m-.205*h,g+.212*h]).clipExtent([[m-.214*h+Xi,g+.166*h+Xi],[m-.115*h-Xi,g+.234*h-Xi]]).stream(i),l()},s.fitExtent=function(d,h){return Dw(s,d,h)},s.fitSize=function(d,h){return tS(s,d,h)},s.fitWidth=function(d,h){return nS(s,d,h)},s.fitHeight=function(d,h){return rS(s,d,h)};function l(){return t=n=null,s}return s.scale(1070)}function mB(t){return function(n,e){var o=Zi(n),f=Zi(e),r=t(o*f);return r===1/0?[2,0]:[r*f*Gi(n),r*Gi(e)]}}function Hy(t){return function(n,e){var o=pu(n*n+e*e),f=t(o),r=Gi(f),a=Zi(f);return[xc(n*r,o*a),Iu(o&&e*r/o)]}}var vB=mB(function(t){return pu(2/(1+t))});vB.invert=Hy(function(t){return 2*Iu(t/2)});function tie(){return sh(vB).scale(124.75).clipAngle(180-.001)}var yB=mB(function(t){return(t=jN(t))&&t/Gi(t)});yB.invert=Hy(function(t){return t});function nie(){return sh(yB).scale(79.4188).clipAngle(180-.001)}function Iw(t,n){return[t,U_(KM((ys+n)/2))]}Iw.invert=function(t,n){return[t,2*Zm(BN(n))-ys]};function rie(){return xB(Iw).scale(961/du)}function xB(t){var n=sh(t),e=n.center,o=n.scale,f=n.translate,r=n.clipExtent,a=null,u,c,i;n.scale=function(l){return arguments.length?(o(l),s()):o()},n.translate=function(l){return arguments.length?(f(l),s()):f()},n.center=function(l){return arguments.length?(e(l),s()):e()},n.clipExtent=function(l){return arguments.length?(l==null?a=u=c=i=null:(a=+l[0][0],u=+l[0][1],c=+l[1][0],i=+l[1][1]),s()):a==null?null:[[a,u],[c,i]]};function s(){var l=Sa*o(),d=n(kre(n.rotate()).invert([0,0]));return r(a==null?[[d[0]-l,d[1]-l],[d[0]+l,d[1]+l]]:t===Iw?[[Math.max(d[0]-l,a),u],[Math.min(d[0]+l,c),i]]:[[a,Math.max(d[1]-l,u)],[c,Math.min(d[1]+l,i)]])}return s()}function pb(t){return KM((ys+t)/2)}function iie(t,n){var e=Zi(t),o=t===n?Gi(t):U_(e/Zi(n))/U_(pb(n)/pb(t)),f=e*Z5(pb(t),o)/o;if(!o)return Iw;function r(a,u){f>0?u<-ys+Xi&&(u=-ys+Xi):u>ys-Xi&&(u=ys-Xi);var c=f/Z5(pb(u),o);return[c*Gi(o*a),f-c*Zi(o*a)]}return r.invert=function(a,u){var c=f-u,i=fc(o)*pu(a*a+c*c),s=xc(a,Va(c))*fc(c);return c*o<0&&(s-=Sa*fc(a)*fc(c)),[s/o,2*Zm(Z5(f/i,1/o))-ys]},r}function aie(){return iS(iie).scale(109.5).parallels([30,30])}function s2(t,n){return[t,n]}s2.invert=s2;function oie(){return sh(s2).scale(152.63)}function sie(t,n){var e=Zi(t),o=t===n?Gi(t):(e-Zi(n))/(n-t),f=e/o+t;if(Va(o)Xi&&--o>0);return[t/(.8707+(r=e*e)*(-.131979+r*(-.013791+r*r*r*(.003971-.001529*r)))),e]};function die(){return sh(wB).scale(175.295)}function kB(t,n){return[Zi(n)*Gi(t),Gi(n)]}kB.invert=Hy(Iu);function pie(){return sh(kB).scale(249.5).clipAngle(90+Xi)}function TB(t,n){var e=Zi(n),o=1+Zi(t)*e;return[e*Gi(t)/o,Gi(n)/o]}TB.invert=Hy(function(t){return 2*Zm(t)});function gie(){return sh(TB).scale(250).clipAngle(142)}function AB(t,n){return[U_(KM((ys+n)/2)),-t]}AB.invert=function(t,n){return[-n,2*Zm(BN(t))-ys]};function mie(){var t=xB(AB),n=t.center,e=t.rotate;return t.center=function(o){return arguments.length?n([-o[1],o[0]]):(o=n(),[o[1],-o[0]])},t.rotate=function(o){return arguments.length?e([o[0],o[1],o.length>2?o[2]+90:90]):(o=e(),[o[0],o[1],o[2]-90])},e([0,0,90]).scale(159.155)}var vie=Math.abs,sT=Math.cos,u2=Math.sin,yie=1e-6,MB=Math.PI,lT=MB/2,EO=xie(2);function CO(t){return t>1?lT:t<-1?-lT:Math.asin(t)}function xie(t){return t>0?Math.sqrt(t):0}function bie(t,n){var e=t*u2(n),o=30,f;do n-=f=(n+u2(n)-e)/(1+sT(n));while(vie(f)>yie&&--o>0);return n/2}function _ie(t,n,e){function o(f,r){return[t*f*sT(r=bie(e,r)),n*u2(r)]}return o.invert=function(f,r){return r=CO(r/n),[f/(t*sT(r)),CO((2*r+u2(2*r))/e)]},o}var wie=_ie(EO/lT,EO,MB);function kie(){return sh(wie).scale(169.529)}const Tie=dB(),uT=["clipAngle","clipExtent","scale","translate","center","rotate","parallels","precision","reflectX","reflectY","coefficient","distance","fraction","lobes","parallel","radius","ratio","spacing","tilt"];function Aie(t,n){return function e(){const o=n();return o.type=t,o.path=dB().projection(o),o.copy=o.copy||function(){const f=e();return uT.forEach(r=>{o[r]&&f[r](o[r]())}),f.path.pointRadius(o.path.pointRadius()),f},o}}function aS(t,n){if(!t||typeof t!="string")throw new Error("Projection type must be a name string.");return t=t.toLowerCase(),arguments.length>1?(c2[t]=Aie(t,n),this):c2[t]||null}function SB(t){return t&&t.path||Tie}const c2={albers:gB,albersusa:eie,azimuthalequalarea:tie,azimuthalequidistant:nie,conicconformal:aie,conicequalarea:o2,conicequidistant:lie,equalEarth:cie,equirectangular:oie,gnomonic:fie,identity:hie,mercator:rie,mollweide:kie,naturalEarth1:die,orthographic:pie,stereographic:gie,transversemercator:mie};for(const t in c2)aS(t,c2[t]);function Mie(){}const Ah=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function EB(){var t=1,n=1,e=u;function o(c,i){return i.map(s=>f(c,s))}function f(c,i){var s=[],l=[];return r(c,i,d=>{e(d,c,i),Sie(d)>0?s.push([d]):l.push(d)}),l.forEach(d=>{for(var h=0,m=s.length,g;h=i,Ah[p<<1].forEach(x);++h=i,Ah[g|p<<1].forEach(x);for(Ah[p<<0].forEach(x);++m=i,v=c[m*t]>=i,Ah[p<<1|v<<2].forEach(x);++h=i,y=v,v=c[m*t+h+1]>=i,Ah[g|p<<1|v<<2|y<<3].forEach(x);Ah[p|v<<3].forEach(x)}for(h=-1,v=c[m*t]>=i,Ah[v<<2].forEach(x);++h=i,Ah[v<<2|y<<3].forEach(x);Ah[v<<3].forEach(x);function x(w){var k=[w[0][0]+h,w[0][1]+m],b=[w[1][0]+h,w[1][1]+m],T=a(k),_=a(b),M,A;(M=d[T])?(A=l[_])?(delete d[M.end],delete l[A.start],M===A?(M.ring.push(b),s(M.ring)):l[M.start]=d[A.end]={start:M.start,end:A.end,ring:M.ring.concat(A.ring)}):(delete d[M.end],M.ring.push(b),d[M.end=_]=M):(M=l[_])?(A=d[T])?(delete l[M.start],delete d[A.end],M===A?(M.ring.push(b),s(M.ring)):l[A.start]=d[M.end]={start:A.start,end:M.end,ring:A.ring.concat(M.ring)}):(delete l[M.start],M.ring.unshift(k),l[M.start=T]=M):l[T]=d[_]={start:T,end:_,ring:[k,b]}}}function a(c){return c[0]*2+c[1]*(t+1)*4}function u(c,i,s){c.forEach(l=>{var d=l[0],h=l[1],m=d|0,g=h|0,p,v=i[g*t+m];d>0&&d0&&h=0&&s>=0||Pr("invalid size"),t=i,n=s,o},o.smooth=function(c){return arguments.length?(e=c?u:Mie,o):e===u},o}function Sie(t){for(var n=0,e=t.length,o=t[e-1][1]*t[0][0]-t[e-1][0]*t[0][1];++no!=h>o&&e<(d-i)*(o-s)/(h-s)+i&&(f=-f)}return f}function Oie(t,n,e){var o;return Lie(t,n,e)&&Pie(t[o=+(t[0]===n[0])],e[o],n[o])}function Lie(t,n,e){return(n[0]-t[0])*(e[1]-t[1])===(e[0]-t[0])*(n[1]-t[1])}function Pie(t,n,e){return t<=n&&n<=e||e<=n&&n<=t}function CB(t,n,e){return function(o){var f=Zf(o),r=e?Math.min(f[0],0):f[0],a=f[1],u=a-r,c=n?b0(r,a,t):u/(t+1);return Ju(r+c,a,c)}}function oS(t){_r.call(this,null,t)}oS.Definition={type:"Isocontour",metadata:{generates:!0},params:[{name:"field",type:"field"},{name:"thresholds",type:"number",array:!0},{name:"levels",type:"number"},{name:"nice",type:"boolean",default:!1},{name:"resolve",type:"enum",values:["shared","independent"],default:"independent"},{name:"zero",type:"boolean",default:!0},{name:"smooth",type:"boolean",default:!0},{name:"scale",type:"number",expr:!0},{name:"translate",type:"number",array:!0,expr:!0},{name:"as",type:"string",null:!0,default:"contour"}]};ni(oS,_r,{transform(t,n){if(this.value&&!n.changed()&&!t.modified())return n.StopPropagation;var e=n.fork(n.NO_SOURCE|n.NO_FIELDS),o=n.materialize(n.SOURCE).source,f=t.field||Hl,r=EB().smooth(t.smooth!==!1),a=t.thresholds||Die(o,f,t),u=t.as===null?null:t.as||"contour",c=[];return o.forEach(i=>{const s=f(i),l=r.size([s.width,s.height])(s.values,Ir(a)?a:a(s.values));Iie(l,s,i,t),l.forEach(d=>{c.push(nw(i,ro(u!=null?{[u]:d}:d)))})}),this.value&&(e.rem=this.value),this.value=e.source=e.add=c,e}});function Die(t,n,e){const o=CB(e.levels||10,e.nice,e.zero!==!1);return e.resolve!=="shared"?o:o(t.map(f=>d0(n(f).values)))}function Iie(t,n,e,o){let f=o.scale||n.scale,r=o.translate||n.translate;if(ga(f)&&(f=f(e,o)),ga(r)&&(r=r(e,o)),(f===1||f==null)&&!r)return;const a=(wo(f)?f:f[0])||1,u=(wo(f)?f:f[1])||1,c=r&&r[0]||0,i=r&&r[1]||0;t.forEach(OB(n,a,u,c,i))}function OB(t,n,e,o,f){const r=t.x1||0,a=t.y1||0,u=n*e<0;function c(l){l.forEach(i)}function i(l){u&&l.reverse(),l.forEach(s)}function s(l){l[0]=(l[0]-r)*n+o,l[1]=(l[1]-a)*e+f}return function(l){return l.coordinates.forEach(c),l}}function OO(t,n,e){const o=t>=0?t:e6(n,e);return Math.round((Math.sqrt(4*o*o+1)-1)/2)}function t4(t){return ga(t)?t:$l(+t)}function LB(){var t=c=>c[0],n=c=>c[1],e=Um,o=[-1,-1],f=960,r=500,a=2;function u(c,i){const s=OO(o[0],c,t)>>a,l=OO(o[1],c,n)>>a,d=s?s+2:0,h=l?l+2:0,m=2*d+(f>>a),g=2*h+(r>>a),p=new Float32Array(m*g),v=new Float32Array(m*g);let y=p;c.forEach(w=>{const k=d+(+t(w)>>a),b=h+(+n(w)>>a);k>=0&&k=0&&b0&&l>0?(Ig(m,g,p,v,s),zg(m,g,v,p,l),Ig(m,g,p,v,s),zg(m,g,v,p,l),Ig(m,g,p,v,s),zg(m,g,v,p,l)):s>0?(Ig(m,g,p,v,s),Ig(m,g,v,p,s),Ig(m,g,p,v,s),y=v):l>0&&(zg(m,g,p,v,l),zg(m,g,v,p,l),zg(m,g,p,v,l),y=v);const x=i?Math.pow(2,-2*a):1/MI(y);for(let w=0,k=m*g;w>a),y2:h+(r>>a)}}return u.x=function(c){return arguments.length?(t=t4(c),u):t},u.y=function(c){return arguments.length?(n=t4(c),u):n},u.weight=function(c){return arguments.length?(e=t4(c),u):e},u.size=function(c){if(!arguments.length)return[f,r];var i=+c[0],s=+c[1];return i>=0&&s>=0||Pr("invalid size"),f=i,r=s,u},u.cellSize=function(c){return arguments.length?((c=+c)>=1||Pr("invalid cell size"),a=Math.floor(Math.log(c)/Math.LN2),u):1<=f&&(u>=r&&(c-=e[u-r+a*t]),o[u-f+a*t]=c/Math.min(u+1,t-1+r-u,r))}function zg(t,n,e,o,f){const r=(f<<1)+1;for(let a=0;a=f&&(u>=r&&(c-=e[a+(u-r)*t]),o[a+(u-f)*t]=c/Math.min(u+1,n-1+r-u,r))}function sS(t){_r.call(this,null,t)}sS.Definition={type:"KDE2D",metadata:{generates:!0},params:[{name:"size",type:"number",array:!0,length:2,required:!0},{name:"x",type:"field",required:!0},{name:"y",type:"field",required:!0},{name:"weight",type:"field"},{name:"groupby",type:"field",array:!0},{name:"cellSize",type:"number"},{name:"bandwidth",type:"number",array:!0,length:2},{name:"counts",type:"boolean",default:!1},{name:"as",type:"string",default:"grid"}]};const zie=["x","y","weight","size","cellSize","bandwidth"];function PB(t,n){return zie.forEach(e=>n[e]!=null?t[e](n[e]):0),t}ni(sS,_r,{transform(t,n){if(this.value&&!n.changed()&&!t.modified())return n.StopPropagation;var e=n.fork(n.NO_SOURCE|n.NO_FIELDS),o=n.materialize(n.SOURCE).source,f=Rie(o,t.groupby),r=(t.groupby||[]).map(xs),a=PB(LB(),t),u=t.as||"grid",c=[];function i(s,l){for(let d=0;dro(i({[u]:a(s,t.counts)},s.dims))),this.value&&(e.rem=this.value),this.value=e.source=e.add=c,e}});function Rie(t,n){var e=[],o=s=>s(u),f,r,a,u,c,i;if(n==null)e.push(t);else for(f={},r=0,a=t.length;re.push(u(s))),r&&a&&(n.visit(c,s=>{var l=r(s),d=a(s);l!=null&&d!=null&&(l=+l)===l&&(d=+d)===d&&o.push([l,d])}),e=e.concat({type:cT,geometry:{type:Fie,coordinates:o}})),this.value={type:uS,features:e}}});function fS(t){_r.call(this,null,t)}fS.Definition={type:"GeoPath",metadata:{modifies:!0},params:[{name:"projection",type:"projection"},{name:"field",type:"field"},{name:"pointRadius",type:"number",expr:!0},{name:"as",type:"string",default:"path"}]};ni(fS,_r,{transform(t,n){var e=n.fork(n.ALL),o=this.value,f=t.field||Hl,r=t.as||"path",a=e.SOURCE;!o||t.modified()?(this.value=o=SB(t.projection),e.materialize().reflow()):a=f===Hl||n.modified(f.fields)?e.ADD_MOD:e.ADD;const u=Nie(o,t.pointRadius);return e.visit(a,c=>c[r]=o(f(c))),o.pointRadius(u),e.modifies(r)}});function Nie(t,n){const e=t.pointRadius();return t.context(null),n!=null&&t.pointRadius(n),e}function hS(t){_r.call(this,null,t)}hS.Definition={type:"GeoPoint",metadata:{modifies:!0},params:[{name:"projection",type:"projection",required:!0},{name:"fields",type:"field",array:!0,required:!0,length:2},{name:"as",type:"string",array:!0,length:2,default:["x","y"]}]};ni(hS,_r,{transform(t,n){var e=t.projection,o=t.fields[0],f=t.fields[1],r=t.as||["x","y"],a=r[0],u=r[1],c;function i(s){const l=e([o(s),f(s)]);l?(s[a]=l[0],s[u]=l[1]):(s[a]=void 0,s[u]=void 0)}return t.modified()?n=n.materialize().reflow(!0).visit(n.SOURCE,i):(c=n.modified(o.fields)||n.modified(f.fields),n.visit(c?n.ADD_MOD:n.ADD,i)),n.modifies(r)}});function dS(t){_r.call(this,null,t)}dS.Definition={type:"GeoShape",metadata:{modifies:!0,nomod:!0},params:[{name:"projection",type:"projection"},{name:"field",type:"field",default:"datum"},{name:"pointRadius",type:"number",expr:!0},{name:"as",type:"string",default:"shape"}]};ni(dS,_r,{transform(t,n){var e=n.fork(n.ALL),o=this.value,f=t.as||"shape",r=e.ADD;return(!o||t.modified())&&(this.value=o=Bie(SB(t.projection),t.field||Lu("datum"),t.pointRadius),e.materialize().reflow(),r=e.SOURCE),e.visit(r,a=>a[f]=o),e.modifies(f)}});function Bie(t,n,e){const o=e==null?f=>t(n(f)):f=>{var r=t.pointRadius(),a=t.pointRadius(e)(n(f));return t.pointRadius(r),a};return o.context=f=>(t.context(f),o),o}function pS(t){_r.call(this,[],t),this.generator=Dre()}pS.Definition={type:"Graticule",metadata:{changes:!0,generates:!0},params:[{name:"extent",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"extentMajor",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"extentMinor",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"step",type:"number",array:!0,length:2},{name:"stepMajor",type:"number",array:!0,length:2,default:[90,360]},{name:"stepMinor",type:"number",array:!0,length:2,default:[10,10]},{name:"precision",type:"number",default:2.5}]};ni(pS,_r,{transform(t,n){var e=this.value,o=this.generator,f;if(!e.length||t.modified())for(const r in t)ga(o[r])&&o[r](t[r]);return f=o(),e.length?n.mod.push(vz(e[0],f)):n.add.push(ro(f)),e[0]=f,n}});function gS(t){_r.call(this,null,t)}gS.Definition={type:"heatmap",metadata:{modifies:!0},params:[{name:"field",type:"field"},{name:"color",type:"string",expr:!0},{name:"opacity",type:"number",expr:!0},{name:"resolve",type:"enum",values:["shared","independent"],default:"independent"},{name:"as",type:"string",default:"image"}]};ni(gS,_r,{transform(t,n){if(!n.changed()&&!t.modified())return n.StopPropagation;var e=n.materialize(n.SOURCE).source,o=t.resolve==="shared",f=t.field||Hl,r=Uie(t.opacity,t),a=jie(t.color,t),u=t.as||"image",c={$x:0,$y:0,$value:0,$max:o?d0(e.map(i=>d0(f(i).values))):0};return e.forEach(i=>{const s=f(i),l=pa({},i,c);o||(l.$max=d0(s.values||[])),i[u]=Vie(s,l,a.dep?a:$l(a(l)),r.dep?r:$l(r(l)))}),n.reflow(!0).modifies(u)}});function jie(t,n){let e;return ga(t)?(e=o=>c_(t(o,n)),e.dep=DB(t)):e=$l(c_(t||"#888")),e}function Uie(t,n){let e;return ga(t)?(e=o=>t(o,n),e.dep=DB(t)):t?e=$l(t):(e=o=>o.$value/o.$max||0,e.dep=!0),e}function DB(t){if(!ga(t))return!1;const n=ff(Bl(t));return n.$x||n.$y||n.$value||n.$max}function Vie(t,n,e,o){const f=t.width,r=t.height,a=t.x1||0,u=t.y1||0,c=t.x2||f,i=t.y2||r,s=t.values,l=s?p=>s[p]:Md,d=Vd(c-a,i-u),h=d.getContext("2d"),m=h.getImageData(0,0,c-a,i-u),g=m.data;for(let p=u,v=0;p{t[o]!=null&&LO(e,o,t[o])})):uT.forEach(o=>{t.modified(o)&&LO(e,o,t[o])}),t.pointRadius!=null&&e.path.pointRadius(t.pointRadius),t.fit&&qie(e,t),n.fork(n.NO_SOURCE|n.NO_FIELDS)}});function qie(t,n){const e=$ie(n.fit);n.extent?t.fitExtent(n.extent,e):n.size&&t.fitSize(n.size,e)}function Hie(t){const n=aS((t||"mercator").toLowerCase());return n||Pr("Unrecognized projection type: "+t),n()}function LO(t,n,e){ga(t[n])&&t[n](e)}function $ie(t){return t=ki(t),t.length===1?t[0]:{type:uS,features:t.reduce((n,e)=>n.concat(Gie(e)),[])}}function Gie(t){return t.type===uS?t.features:ki(t).filter(n=>n!=null).map(n=>n.type===cT?n:{type:cT,geometry:n})}var Wie=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",contour:lS,geojson:cS,geopath:fS,geopoint:hS,geoshape:dS,graticule:pS,heatmap:gS,isocontour:oS,kde2d:sS,projection:IB});function Yie(t,n){var e,o=1;t==null&&(t=0),n==null&&(n=0);function f(){var r,a=e.length,u,c=0,i=0;for(r=0;r=(l=(u+i)/2))?u=l:i=l,(p=e>=(d=(c+s)/2))?c=d:s=d,f=r,!(r=r[v=p<<1|g]))return f[v]=a,t;if(h=+t._x.call(null,r.data),m=+t._y.call(null,r.data),n===h&&e===m)return a.next=r,f?f[v]=a:t._root=a,t;do f=f?f[v]=new Array(4):t._root=new Array(4),(g=n>=(l=(u+i)/2))?u=l:i=l,(p=e>=(d=(c+s)/2))?c=d:s=d;while((v=p<<1|g)===(y=(m>=d)<<1|h>=l));return f[y]=r,f[v]=a,t}function Zie(t){var n,e,o=t.length,f,r,a=new Array(o),u=new Array(o),c=1/0,i=1/0,s=-1/0,l=-1/0;for(e=0;es&&(s=f),rl&&(l=r));if(c>s||i>l)return this;for(this.cover(c,i).cover(s,l),e=0;et||t>=f||o>n||n>=r;)switch(i=(ns||(u=m.y0)>l||(c=m.x1)=v)<<1|t>=p)&&(m=d[d.length-1],d[d.length-1]=d[d.length-1-g],d[d.length-1-g]=m)}else{var y=t-+this._x.call(null,h.data),x=n-+this._y.call(null,h.data),w=y*y+x*x;if(w=(d=(a+c)/2))?a=d:c=d,(g=l>=(h=(u+i)/2))?u=h:i=h,n=e,!(e=e[p=g<<1|m]))return this;if(!e.length)break;(n[p+1&3]||n[p+2&3]||n[p+3&3])&&(o=n,v=p)}for(;e.data!==t;)if(f=e,!(e=e.next))return this;return(r=e.next)&&delete e.next,f?(r?f.next=r:delete f.next,this):n?(r?n[p]=r:delete n[p],(e=n[0]||n[1]||n[2]||n[3])&&e===(n[3]||n[2]||n[1]||n[0])&&!e.length&&(o?o[v]=e:this._root=e),this):(this._root=r,this)}function nae(t){for(var n=0,e=t.length;nd.index){var S=h-_.x-_.vx,E=m-_.y-_.vy,D=S*S+E*E;Dh+A||bm+A||Ti.r&&(i.r=i[s].r)}function c(){if(!!n){var i,s=n.length,l;for(e=new Array(s),i=0;i[n(k,b,a),k])),w;for(p=0,u=new Array(v);p{}};function RB(){for(var t=0,n=arguments.length,e={},o;t=0&&(o=e.slice(f+1),e=e.slice(0,f)),e&&!n.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:o}})}Jb.prototype=RB.prototype={constructor:Jb,on:function(t,n){var e=this._,o=vae(t+"",e),f,r=-1,a=o.length;if(arguments.length<2){for(;++r0)for(var e=new Array(f),o=0,f,r;o=0&&t._call.call(void 0,n),t=t._next;--wm}function zO(){M0=(h2=ny.now())+zw,wm=yv=0;try{bae()}finally{wm=0,wae(),M0=0}}function _ae(){var t=ny.now(),n=t-h2;n>FB&&(zw-=n,h2=t)}function wae(){for(var t,n=f2,e,o=1/0;n;)n._call?(o>n._time&&(o=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:f2=e);xv=t,fT(o)}function fT(t){if(!wm){yv&&(yv=clearTimeout(yv));var n=t-M0;n>24?(t<1/0&&(yv=setTimeout(zO,t-ny.now()-zw)),H1&&(H1=clearInterval(H1))):(H1||(h2=ny.now(),H1=setInterval(_ae,FB)),wm=1,NB(zO))}}function kae(t,n,e){var o=new d2,f=n;return n==null?(o.restart(t,n,e),o):(o._restart=o.restart,o.restart=function(r,a,u){a=+a,u=u==null?yS():+u,o._restart(function c(i){i+=f,o._restart(c,f+=a,u),r(i)},a,u)},o.restart(t,n,e),o)}const Tae=1664525,Aae=1013904223,RO=4294967296;function Mae(){let t=1;return()=>(t=(Tae*t+Aae)%RO)/RO}function Sae(t){return t.x}function Eae(t){return t.y}var Cae=10,Oae=Math.PI*(3-Math.sqrt(5));function Lae(t){var n,e=1,o=.001,f=1-Math.pow(o,1/300),r=0,a=.6,u=new Map,c=BB(l),i=RB("tick","end"),s=Mae();t==null&&(t=[]);function l(){d(),i.call("tick",n),e1?(p==null?u.delete(g):u.set(g,m(p)),n):u.get(g)},find:function(g,p,v){var y=0,x=t.length,w,k,b,T,_;for(v==null?v=1/0:v*=v,y=0;y1?(i.on(g,p),n):i.on(g)}}}function Pae(){var t,n,e,o,f=uu(-30),r,a=1,u=1/0,c=.81;function i(h){var m,g=t.length,p=mS(t,Sae,Eae).visitAfter(l);for(o=h,m=0;m=u)return;(h.data!==n||h.next)&&(v===0&&(v=Rd(e),w+=v*v),y===0&&(y=Rd(e),w+=y*y),w=0;)e.tick();else if(e.stopped()&&e.restart(),!o)return n.StopPropagation}return this.finish(t,n)},finish(t,n){const e=n.dataflow;for(let u=this._argops,c=0,i=u.length,s;ct.touch(n).run()}function Fae(t,n){const e=Lae(t),o=e.stop,f=e.restart;let r=!1;return e.stopped=()=>r,e.restart=()=>(r=!1,f()),e.stop=()=>(r=!0,o()),UB(e,n,!0).on("end",()=>r=!0)}function UB(t,n,e,o){var f=ki(n.forces),r,a,u,c;for(r=0,a=hT.length;rn(o,e):n)}var Uae=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",force:xS});function Vae(t,n){return t.parent===n.parent?1:2}function qae(t){return t.reduce(Hae,0)/t.length}function Hae(t,n){return t+n.x}function $ae(t){return 1+t.reduce(Gae,0)}function Gae(t,n){return Math.max(t,n.y)}function Wae(t){for(var n;n=t.children;)t=n[0];return t}function Yae(t){for(var n;n=t.children;)t=n[n.length-1];return t}function Xae(){var t=Vae,n=1,e=1,o=!1;function f(r){var a,u=0;r.eachAfter(function(d){var h=d.children;h?(d.x=qae(h),d.y=$ae(h)):(d.x=a?u+=t(d,a):0,d.y=0,a=d)});var c=Wae(r),i=Yae(r),s=c.x-t(c,i)/2,l=i.x+t(i,c)/2;return r.eachAfter(o?function(d){d.x=(d.x-r.x)*n,d.y=(r.y-d.y)*e}:function(d){d.x=(d.x-s)/(l-s)*n,d.y=(1-(r.y?d.y/r.y:1))*e})}return f.separation=function(r){return arguments.length?(t=r,f):t},f.size=function(r){return arguments.length?(o=!1,n=+r[0],e=+r[1],f):o?null:[n,e]},f.nodeSize=function(r){return arguments.length?(o=!0,n=+r[0],e=+r[1],f):o?[n,e]:null},f}function Zae(t){var n=0,e=t.children,o=e&&e.length;if(!o)n=1;else for(;--o>=0;)n+=e[o].value;t.value=n}function Jae(){return this.eachAfter(Zae)}function Kae(t,n){let e=-1;for(const o of this)t.call(n,o,++e,this);return this}function Qae(t,n){for(var e=this,o=[e],f,r,a=-1;e=o.pop();)if(t.call(n,e,++a,this),f=e.children)for(r=f.length-1;r>=0;--r)o.push(f[r]);return this}function eoe(t,n){for(var e=this,o=[e],f=[],r,a,u,c=-1;e=o.pop();)if(f.push(e),r=e.children)for(a=0,u=r.length;a=0;)e+=o[f].value;n.value=e})}function roe(t){return this.eachBefore(function(n){n.children&&n.children.sort(t)})}function ioe(t){for(var n=this,e=aoe(n,t),o=[n];n!==e;)n=n.parent,o.push(n);for(var f=o.length;t!==e;)o.splice(f,0,t),t=t.parent;return o}function aoe(t,n){if(t===n)return t;var e=t.ancestors(),o=n.ancestors(),f=null;for(t=e.pop(),n=o.pop();t===n;)f=t,t=e.pop(),n=o.pop();return f}function ooe(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n}function soe(){return Array.from(this)}function loe(){var t=[];return this.eachBefore(function(n){n.children||t.push(n)}),t}function uoe(){var t=this,n=[];return t.each(function(e){e!==t&&n.push({source:e.parent,target:e})}),n}function*coe(){var t=this,n,e=[t],o,f,r;do for(n=e.reverse(),e=[];t=n.pop();)if(yield t,o=t.children)for(f=0,r=o.length;f=0;--u)f.push(r=a[u]=new km(a[u])),r.parent=o,r.depth=o.depth+1;return e.eachBefore(VB)}function foe(){return bS(this).eachBefore(poe)}function hoe(t){return t.children}function doe(t){return Array.isArray(t)?t[1]:null}function poe(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function VB(t){var n=0;do t.height=n;while((t=t.parent)&&t.height<++n)}function km(t){this.data=t,this.depth=this.height=0,this.parent=null}km.prototype=bS.prototype={constructor:km,count:Jae,each:Kae,eachAfter:eoe,eachBefore:Qae,find:toe,sum:noe,sort:roe,path:ioe,ancestors:ooe,descendants:soe,leaves:loe,links:uoe,copy:foe,[Symbol.iterator]:coe};function Kb(t){return t==null?null:qB(t)}function qB(t){if(typeof t!="function")throw new Error;return t}function n0(){return 0}function Hg(t){return function(){return t}}const goe=1664525,moe=1013904223,NO=4294967296;function voe(){let t=1;return()=>(t=(goe*t+moe)%NO)/NO}function yoe(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function xoe(t,n){let e=t.length,o,f;for(;e;)f=n()*e--|0,o=t[e],t[e]=t[f],t[f]=o;return t}function boe(t,n){for(var e=0,o=(t=xoe(Array.from(t),n)).length,f=[],r,a;e0&&e*e>o*o+f*f}function n4(t,n){for(var e=0;e1e-6?(S+Math.sqrt(S*S-4*A*E))/(2*A):E/S);return{x:o+b+T*D,y:f+_+M*D,r:D}}function BO(t,n,e){var o=t.x-n.x,f,r,a=t.y-n.y,u,c,i=o*o+a*a;i?(r=n.r+e.r,r*=r,c=t.r+e.r,c*=c,r>c?(f=(i+c-r)/(2*i),u=Math.sqrt(Math.max(0,c/i-f*f)),e.x=t.x-f*o-u*a,e.y=t.y-f*a+u*o):(f=(i+r-c)/(2*i),u=Math.sqrt(Math.max(0,r/i-f*f)),e.x=n.x+f*o-u*a,e.y=n.y+f*a+u*o)):(e.x=n.x+e.r,e.y=n.y)}function jO(t,n){var e=t.r+n.r-1e-6,o=n.x-t.x,f=n.y-t.y;return e>0&&e*e>o*o+f*f}function UO(t){var n=t._,e=t.next._,o=n.r+e.r,f=(n.x*e.r+e.x*n.r)/o,r=(n.y*e.r+e.y*n.r)/o;return f*f+r*r}function mb(t){this._=t,this.next=null,this.previous=null}function Toe(t,n){if(!(r=(t=yoe(t)).length))return 0;var e,o,f,r,a,u,c,i,s,l,d;if(e=t[0],e.x=0,e.y=0,!(r>1))return e.r;if(o=t[1],e.x=-o.r,o.x=e.r,o.y=0,!(r>2))return e.r+o.r;BO(o,e,f=t[2]),e=new mb(e),o=new mb(o),f=new mb(f),e.next=f.previous=o,o.next=e.previous=f,f.next=o.previous=e;e:for(c=3;cLoe(e(w,k,f))),y=v.map(GO),x=new Set(v).add("");for(const w of y)x.has(w)||(x.add(w),v.push(w),y.push(GO(w)),r.push(i4));a=(w,k)=>v[k],u=(w,k)=>y[k]}for(s=0,c=r.length;s=0&&(h=r[v],h.data===i4);--v)h.data=null}if(l.parent=Eoe,l.eachBefore(function(v){v.depth=v.parent.depth+1,--c}).eachBefore(VB),l.parent=null,c>0)throw new Error("cycle");return l}return o.id=function(f){return arguments.length?(t=Kb(f),o):t},o.parentId=function(f){return arguments.length?(n=Kb(f),o):n},o.path=function(f){return arguments.length?(e=Kb(f),o):e},o}function Loe(t){t=`${t}`;let n=t.length;return dT(t,n-1)&&!dT(t,n-2)&&(t=t.slice(0,-1)),t[0]==="/"?t:`/${t}`}function GO(t){let n=t.length;if(n<2)return"";for(;--n>1&&!dT(t,n););return t.slice(0,n)}function dT(t,n){if(t[n]==="/"){let e=0;for(;n>0&&t[--n]==="\\";)++e;if((e&1)===0)return!0}return!1}function Poe(t,n){return t.parent===n.parent?1:2}function a4(t){var n=t.children;return n?n[0]:t.t}function o4(t){var n=t.children;return n?n[n.length-1]:t.t}function Doe(t,n,e){var o=e/(n.i-t.i);n.c-=o,n.s+=e,t.c+=o,n.z+=e,n.m+=e}function Ioe(t){for(var n=0,e=0,o=t.children,f=o.length,r;--f>=0;)r=o[f],r.z+=n,r.m+=n,n+=r.s+(e+=r.c)}function zoe(t,n,e){return t.a.parent===n.parent?t.a:e}function Qb(t,n){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=n}Qb.prototype=Object.create(km.prototype);function Roe(t){for(var n=new Qb(t,0),e,o=[n],f,r,a,u;e=o.pop();)if(r=e._.children)for(e.children=new Array(u=r.length),a=u-1;a>=0;--a)o.push(f=e.children[a]=new Qb(r[a],a)),f.parent=e;return(n.parent=new Qb(null,0)).children=[n],n}function Foe(){var t=Poe,n=1,e=1,o=null;function f(i){var s=Roe(i);if(s.eachAfter(r),s.parent.m=-s.z,s.eachBefore(a),o)i.eachBefore(c);else{var l=i,d=i,h=i;i.eachBefore(function(y){y.xd.x&&(d=y),y.depth>h.depth&&(h=y)});var m=l===d?1:t(l,d)/2,g=m-l.x,p=n/(d.x+m+g),v=e/(h.depth||1);i.eachBefore(function(y){y.x=(y.x+g)*p,y.y=y.depth*v})}return i}function r(i){var s=i.children,l=i.parent.children,d=i.i?l[i.i-1]:null;if(s){Ioe(i);var h=(s[0].z+s[s.length-1].z)/2;d?(i.z=d.z+t(i._,d._),i.m=i.z-h):i.z=h}else d&&(i.z=d.z+t(i._,d._));i.parent.A=u(i,d,i.parent.A||l[0])}function a(i){i._.x=i.z+i.parent.m,i.m+=i.parent.m}function u(i,s,l){if(s){for(var d=i,h=i,m=s,g=d.parent.children[0],p=d.m,v=h.m,y=m.m,x=g.m,w;m=o4(m),d=a4(d),m&&d;)g=a4(g),h=o4(h),h.a=i,w=m.z+y-d.z-p+t(m._,d._),w>0&&(Doe(zoe(m,i,l),i,w),p+=w,v+=w),y+=m.m,p+=d.m,x+=g.m,v+=h.m;m&&!o4(h)&&(h.t=m,h.m+=y-v),d&&!a4(g)&&(g.t=d,g.m+=p-x,l=i)}return l}function c(i){i.x*=n,i.y=i.depth*e}return f.separation=function(i){return arguments.length?(t=i,f):t},f.size=function(i){return arguments.length?(o=!1,n=+i[0],e=+i[1],f):o?null:[n,e]},f.nodeSize=function(i){return arguments.length?(o=!0,n=+i[0],e=+i[1],f):o?[n,e]:null},f}function Rw(t,n,e,o,f){for(var r=t.children,a,u=-1,c=r.length,i=t.value&&(f-e)/t.value;++uy&&(y=i),b=p*p*k,x=Math.max(y/b,b/v),x>w){p-=i;break}w=x}a.push(c={value:p,dice:h1?o:1)},e}(WB);function Noe(){var t=XB,n=!1,e=1,o=1,f=[0],r=n0,a=n0,u=n0,c=n0,i=n0;function s(d){return d.x0=d.y0=0,d.x1=e,d.y1=o,d.eachBefore(l),f=[0],n&&d.eachBefore(GB),d}function l(d){var h=f[d.depth],m=d.x0+h,g=d.y0+h,p=d.x1-h,v=d.y1-h;p=d-1){var y=r[l];y.x0=m,y.y0=g,y.x1=p,y.y1=v;return}for(var x=i[l],w=h/2+x,k=l+1,b=d-1;k>>1;i[T]v-g){var A=h?(m*M+p*_)/h:p;s(l,k,_,m,g,A,v),s(k,d,M,A,g,p,v)}else{var S=h?(g*M+v*_)/h:v;s(l,k,_,m,g,p,S),s(k,d,M,m,S,p,v)}}}function joe(t,n,e,o,f){(t.depth&1?Rw:$y)(t,n,e,o,f)}var Uoe=function t(n){function e(o,f,r,a,u){if((c=o._squarify)&&c.ratio===n)for(var c,i,s,l,d=-1,h,m=c.length,g=o.value;++d1?o:1)},e}(WB);function pT(t,n,e){const o={};return t.each(f=>{const r=f.data;e(r)&&(o[n(r)]=f)}),t.lookup=o,t}function _S(t){_r.call(this,null,t)}_S.Definition={type:"Nest",metadata:{treesource:!0,changes:!0},params:[{name:"keys",type:"field",array:!0},{name:"generate",type:"boolean"}]};const Voe=t=>t.values;ni(_S,_r,{transform(t,n){n.source||Pr("Nest transform requires an upstream data source.");var e=t.generate,o=t.modified(),f=n.clone(),r=this.value;return(!r||o||n.changed())&&(r&&r.each(a=>{a.children&&tw(a.data)&&f.rem.push(a.data)}),this.value=r=bS({values:ki(t.keys).reduce((a,u)=>(a.key(u),a),qoe()).entries(f.source)},Voe),e&&r.each(a=>{a.children&&(a=ro(a.data),f.add.push(a),f.source.push(a))}),pT(r,$i,$i)),f.source.root=r,f}});function qoe(){const t=[],n={entries:f=>o(e(f,0),0),key:f=>(t.push(f),n)};function e(f,r){if(r>=t.length)return f;const a=f.length,u=t[r++],c={},i={};let s=-1,l,d,h;for(;++st.length)return f;const a=[];for(const u in f)a.push({key:u,values:o(f[u],r)});return a}return n}function Kh(t){_r.call(this,null,t)}const Hoe=(t,n)=>t.parent===n.parent?1:2;ni(Kh,_r,{transform(t,n){(!n.source||!n.source.root)&&Pr(this.constructor.name+" transform requires a backing tree data source.");const e=this.layout(t.method),o=this.fields,f=n.source.root,r=t.as||o;t.field?f.sum(t.field):f.count(),t.sort&&f.sort(H0(t.sort,a=>a.data)),$oe(e,this.params,t),e.separation&&e.separation(t.separation!==!1?Hoe:Um);try{this.value=e(f)}catch(a){Pr(a)}return f.each(a=>Goe(a,o,r)),n.reflow(t.modified()).modifies(r).modifies("leaf")}});function $oe(t,n,e){for(let o,f=0,r=n.length;fr[$i(a)]=1),o.each(a=>{const u=a.data,c=a.parent&&a.parent.data;c&&r[$i(u)]&&r[$i(c)]&&f.add.push(ro({source:c,target:u}))}),this.value=f.add):n.changed(n.MOD)&&(n.visit(n.MOD,a=>r[$i(a)]=1),e.forEach(a=>{(r[$i(a.source)]||r[$i(a.target)])&&f.mod.push(a)})),f}});const YO={binary:Boe,dice:$y,slice:Rw,slicedice:joe,squarify:XB,resquarify:Uoe},yT=["x0","y0","x1","y1","depth","children"];function SS(t){Kh.call(this,t)}SS.Definition={type:"Treemap",metadata:{tree:!0,modifies:!0},params:[{name:"field",type:"field"},{name:"sort",type:"compare"},{name:"method",type:"enum",default:"squarify",values:["squarify","resquarify","binary","dice","slice","slicedice"]},{name:"padding",type:"number",default:0},{name:"paddingInner",type:"number",default:0},{name:"paddingOuter",type:"number",default:0},{name:"paddingTop",type:"number",default:0},{name:"paddingRight",type:"number",default:0},{name:"paddingBottom",type:"number",default:0},{name:"paddingLeft",type:"number",default:0},{name:"ratio",type:"number",default:1.618033988749895},{name:"round",type:"boolean",default:!1},{name:"size",type:"number",array:!0,length:2},{name:"as",type:"string",array:!0,length:yT.length,default:yT}]};ni(SS,Kh,{layout(){const t=Noe();return t.ratio=n=>{const e=t.tile();e.ratio&&t.tile(e.ratio(n))},t.method=n=>{qi(YO,n)?t.tile(YO[n]):Pr("Unrecognized Treemap layout method: "+n)},t},params:["method","ratio","size","round","padding","paddingInner","paddingOuter","paddingTop","paddingRight","paddingBottom","paddingLeft"],fields:yT});var Woe=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",nest:_S,pack:wS,partition:kS,stratify:TS,tree:AS,treelinks:MS,treemap:SS});const s4=4278190080;function Yoe(t,n){const e=t.bitmap();return(n||[]).forEach(o=>e.set(t(o.boundary[0]),t(o.boundary[3]))),[e,void 0]}function Xoe(t,n,e,o,f){const r=t.width,a=t.height,u=o||f,c=Vd(r,a).getContext("2d"),i=Vd(r,a).getContext("2d"),s=u&&Vd(r,a).getContext("2d");e.forEach(_=>e_(c,_,!1)),e_(i,n,!1),u&&e_(s,n,!0);const l=l4(c,r,a),d=l4(i,r,a),h=u&&l4(s,r,a),m=t.bitmap(),g=u&&t.bitmap();let p,v,y,x,w,k,b,T;for(v=0;v{f.items.forEach(r=>e_(t,r.items,e))}):tc[o].draw(t,{items:e?n.map(Zoe):n})}function Zoe(t){const n=nw(t,{});return n.stroke&&n.strokeOpacity!==0||n.fill&&n.fillOpacity!==0?{...n,strokeOpacity:1,stroke:"#000",fillOpacity:0}:n}const Mh=5,tu=31,ry=32,Td=new Uint32Array(ry+1),Yc=new Uint32Array(ry+1);Yc[0]=0;Td[0]=~Yc[0];for(let t=1;t<=ry;++t)Yc[t]=Yc[t-1]<<1|1,Td[t]=~Yc[t];function Joe(t,n){const e=new Uint32Array(~~((t*n+ry)/ry));function o(r,a){e[r]|=a}function f(r,a){e[r]&=a}return{array:e,get:(r,a)=>{const u=a*t+r;return e[u>>>Mh]&1<<(u&tu)},set:(r,a)=>{const u=a*t+r;o(u>>>Mh,1<<(u&tu))},clear:(r,a)=>{const u=a*t+r;f(u>>>Mh,~(1<<(u&tu)))},getRange:(r,a,u,c)=>{let i=c,s,l,d,h;for(;i>=a;--i)if(s=i*t+r,l=i*t+u,d=s>>>Mh,h=l>>>Mh,d===h){if(e[d]&Td[s&tu]&Yc[(l&tu)+1])return!0}else{if(e[d]&Td[s&tu]||e[h]&Yc[(l&tu)+1])return!0;for(let m=d+1;m{let i,s,l,d,h;for(;a<=c;++a)if(i=a*t+r,s=a*t+u,l=i>>>Mh,d=s>>>Mh,l===d)o(l,Td[i&tu]&Yc[(s&tu)+1]);else for(o(l,Td[i&tu]),o(d,Yc[(s&tu)+1]),h=l+1;h{let i,s,l,d,h;for(;a<=c;++a)if(i=a*t+r,s=a*t+u,l=i>>>Mh,d=s>>>Mh,l===d)f(l,Yc[i&tu]|Td[(s&tu)+1]);else for(f(l,Yc[i&tu]),f(d,Td[(s&tu)+1]),h=l+1;hr<0||a<0||c>=n||u>=t}}function Koe(t,n,e){const o=Math.max(1,Math.sqrt(t*n/1e6)),f=~~((t+2*e+o)/o),r=~~((n+2*e+o)/o),a=u=>~~((u+e)/o);return a.invert=u=>u*o-e,a.bitmap=()=>Joe(f,r),a.ratio=o,a.padding=e,a.width=t,a.height=n,a}function Qoe(t,n,e,o){const f=t.width,r=t.height;return function(a){const u=a.datum.datum.items[o].items,c=u.length,i=a.datum.fontSize,s=af.width(a.datum,a.datum.text);let l=0,d,h,m,g,p,v,y;for(let x=0;x=l&&(l=y,a.x=p,a.y=v);return p=s/2,v=i/2,d=a.x-p,h=a.x+p,m=a.y-v,g=a.y+v,a.align="center",d<0&&h<=f?a.align="left":0<=d&&ff||n-(a=o/2)<0||n+a>r}function Fd(t,n,e,o,f,r,a,u){const c=f*r/(o*2),i=t(n-c),s=t(n+c),l=t(e-(r=r/2)),d=t(e+r);return a.outOfBounds(i,l,s,d)||a.getRange(i,l,s,d)||u&&u.getRange(i,l,s,d)}function ese(t,n,e,o){const f=t.width,r=t.height,a=n[0],u=n[1];function c(i,s,l,d,h){const m=t.invert(i),g=t.invert(s);let p=l,v=r,y;if(!p2(m,g,d,h,f,r)&&!Fd(t,m,g,h,d,p,a,u)&&!Fd(t,m,g,h,d,h,a,null)){for(;v-p>=1;)y=(p+v)/2,Fd(t,m,g,h,d,y,a,u)?v=y:p=y;if(p>l)return[m,g,p,!0]}}return function(i){const s=i.datum.datum.items[o].items,l=s.length,d=i.datum.fontSize,h=af.width(i.datum,i.datum.text);let m=e?d:0,g=!1,p=!1,v=0,y,x,w,k,b,T,_,M,A,S,E,D,O,R,z,L,P;for(let N=0;Nx&&(P=y,y=x,x=P),w>k&&(P=w,w=k,k=P),A=t(y),E=t(x),S=~~((A+E)/2),D=t(w),R=t(k),O=~~((D+R)/2),_=S;_>=A;--_)for(M=O;M>=D;--M)L=c(_,M,m,h,d),L&&([i.x,i.y,m,g]=L);for(_=S;_<=E;++_)for(M=O;M<=R;++M)L=c(_,M,m,h,d),L&&([i.x,i.y,m,g]=L);!g&&!e&&(z=Math.abs(x-y+k-w),b=(y+x)/2,T=(w+k)/2,z>=v&&!p2(b,T,h,d,f,r)&&!Fd(t,b,T,d,h,d,a,null)&&(v=z,i.x=b,i.y=T,p=!0))}return g||p?(b=h/2,T=d/2,a.setRange(t(i.x-b),t(i.y-T),t(i.x+b),t(i.y+T)),i.align="center",i.baseline="middle",!0):!1}}const tse=[-1,-1,1,1],nse=[-1,1,-1,1];function rse(t,n,e,o){const f=t.width,r=t.height,a=n[0],u=n[1],c=t.bitmap();return function(i){const s=i.datum.datum.items[o].items,l=s.length,d=i.datum.fontSize,h=af.width(i.datum,i.datum.text),m=[];let g=e?d:0,p=!1,v=!1,y=0,x,w,k,b,T,_,M,A,S,E,D,O;for(let R=0;R=1;)D=(S+E)/2,Fd(t,T,_,d,h,D,a,u)?E=D:S=D;S>g&&(i.x=T,i.y=_,g=S,p=!0)}}!p&&!e&&(O=Math.abs(w-x+b-k),T=(x+w)/2,_=(k+b)/2,O>=y&&!p2(T,_,h,d,f,r)&&!Fd(t,T,_,d,h,d,a,null)&&(y=O,i.x=T,i.y=_,v=!0))}return p||v?(T=h/2,_=d/2,a.setRange(t(i.x-T),t(i.y-_),t(i.x+T),t(i.y+_)),i.align="center",i.baseline="middle",!0):!1}}const ise=["right","center","left"],ase=["bottom","middle","top"];function ose(t,n,e,o){const f=t.width,r=t.height,a=n[0],u=n[1],c=o.length;return function(i){var s;const l=i.boundary,d=i.datum.fontSize;if(l[2]<0||l[5]<0||l[0]>f||l[3]>r)return!1;let h=(s=i.textWidth)!==null&&s!==void 0?s:0,m,g,p,v,y,x,w,k,b,T,_,M,A,S,E;for(let D=0;D>>2&3)-1,p=m===0&&g===0||o[D]<0,v=m&&g?Math.SQRT1_2:1,y=o[D]<0?-1:1,x=l[1+m]+o[D]*m*v,_=l[4+g]+y*d*g/2+o[D]*g*v,k=_-d/2,b=_+d/2,M=t(x),S=t(k),E=t(b),!h)if(XO(M,M,S,E,a,u,x,x,k,b,l,p))h=af.width(i.datum,i.datum.text);else continue;if(T=x+y*h*m/2,x=T-h/2,w=T+h/2,M=t(x),A=t(w),XO(M,A,S,E,a,u,x,w,k,b,l,p))return i.x=m?m*y<0?w:x:T,i.y=g?g*y<0?b:k:_,i.align=ise[m*y+1],i.baseline=ase[g*y+1],a.setRange(M,S,A,E),!0}return!1}}function XO(t,n,e,o,f,r,a,u,c,i,s,l){return!(f.outOfBounds(t,e,n,o)||(l&&r||f).getRange(t,e,n,o))}const u4=0,c4=4,f4=8,h4=0,d4=1,p4=2,sse={"top-left":u4+h4,top:u4+d4,"top-right":u4+p4,left:c4+h4,middle:c4+d4,right:c4+p4,"bottom-left":f4+h4,bottom:f4+d4,"bottom-right":f4+p4},lse={naive:Qoe,"reduced-search":ese,floodfill:rse};function use(t,n,e,o,f,r,a,u,c,i,s){if(!t.length)return t;const l=Math.max(o.length,f.length),d=cse(o,l),h=fse(f,l),m=hse(t[0].datum),g=m==="group"&&t[0].datum.items[c].marktype,p=g==="area",v=dse(m,g,u,c),y=i===null||i===1/0,x=p&&s==="naive";let w=-1,k=-1;const b=t.map(A=>{const S=y?af.width(A,A.text):void 0;return w=Math.max(w,S),k=Math.max(k,A.fontSize),{datum:A,opacity:0,x:void 0,y:void 0,align:void 0,baseline:void 0,boundary:v(A),textWidth:S}});i=i===null||i===1/0?Math.max(w,k)+Math.max(...o):i;const T=Koe(n[0],n[1],i);let _;if(!x){e&&b.sort((E,D)=>e(E.datum,D.datum));let A=!1;for(let E=0;EE.datum);_=r.length||S?Xoe(T,S||[],r,A,p):Yoe(T,a&&b)}const M=p?lse[s](T,_,a,c):ose(T,_,h,d);return b.forEach(A=>A.opacity=+M(A)),b}function cse(t,n){const e=new Float64Array(n),o=t.length;for(let f=0;f[r.x,r.x,r.x,r.y,r.y,r.y];return t?t==="line"||t==="area"?r=>f(r.datum):n==="line"?r=>{const a=r.datum.items[o].items;return f(a.length?a[e==="start"?0:a.length-1]:{x:NaN,y:NaN})}:r=>{const a=r.datum.bounds;return[a.x1,(a.x1+a.x2)/2,a.x2,a.y1,(a.y1+a.y2)/2,a.y2]}:f}const xT=["x","y","opacity","align","baseline"],ZB=["top-left","left","bottom-left","top","bottom","top-right","right","bottom-right"];function ES(t){_r.call(this,null,t)}ES.Definition={type:"Label",metadata:{modifies:!0},params:[{name:"size",type:"number",array:!0,length:2,required:!0},{name:"sort",type:"compare"},{name:"anchor",type:"string",array:!0,default:ZB},{name:"offset",type:"number",array:!0,default:[1]},{name:"padding",type:"number",default:0,null:!0},{name:"lineAnchor",type:"string",values:["start","end"],default:"end"},{name:"markIndex",type:"number",default:0},{name:"avoidBaseMark",type:"boolean",default:!0},{name:"avoidMarks",type:"data",array:!0},{name:"method",type:"string",default:"naive"},{name:"as",type:"string",array:!0,length:xT.length,default:xT}]};ni(ES,_r,{transform(t,n){function e(r){const a=t[r];return ga(a)&&n.modified(a.fields)}const o=t.modified();if(!(o||n.changed(n.ADD_REM)||e("sort")))return;(!t.size||t.size.length!==2)&&Pr("Size parameter should be specified as a [width, height] array.");const f=t.as||xT;return use(n.materialize(n.SOURCE).source||[],t.size,t.sort,ki(t.offset==null?1:t.offset),ki(t.anchor||ZB),t.avoidMarks||[],t.avoidBaseMark!==!1,t.lineAnchor||"end",t.markIndex||0,t.padding===void 0?0:t.padding,t.method||"naive").forEach(r=>{const a=r.datum;a[f[0]]=r.x,a[f[1]]=r.y,a[f[2]]=r.opacity,a[f[3]]=r.align,a[f[4]]=r.baseline}),n.reflow(o).modifies(f)}});var pse=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",label:ES});function JB(t,n){var e=[],o=function(s){return s(u)},f,r,a,u,c,i;if(n==null)e.push(t);else for(f={},r=0,a=t.length;r{zz(i,t.x,t.y,t.bandwidth||.3).forEach(s=>{const l={};for(let d=0;dt==="poly"?n:t==="quad"?2:1;function OS(t){_r.call(this,null,t)}OS.Definition={type:"Regression",metadata:{generates:!0},params:[{name:"x",type:"field",required:!0},{name:"y",type:"field",required:!0},{name:"groupby",type:"field",array:!0},{name:"method",type:"string",default:"linear",values:Object.keys(bT)},{name:"order",type:"number",default:3},{name:"extent",type:"number",array:!0,length:2},{name:"params",type:"boolean",default:!1},{name:"as",type:"string",array:!0}]};ni(OS,_r,{transform(t,n){const e=n.fork(n.NO_SOURCE|n.NO_FIELDS);if(!this.value||n.changed()||t.modified()){const o=n.materialize(n.SOURCE).source,f=JB(o,t.groupby),r=(t.groupby||[]).map(xs),a=t.method||"linear",u=t.order||3,c=gse(a,u),i=t.as||[xs(t.x),xs(t.y)],s=bT[a],l=[];let d=t.extent;qi(bT,a)||Pr("Invalid regression method: "+a),d!=null&&a==="log"&&d[0]<=0&&(n.dataflow.warn("Ignoring extent with values <= 0 for log regression."),d=null),f.forEach(h=>{if(h.length<=c){n.dataflow.warn("Skipping regression with more parameters than data points.");return}const g=s(h,t.x,t.y,u);if(t.params){l.push(ro({keys:h.dims,coef:g.coef,rSquared:g.rSquared}));return}const p=d||Zf(h,t.x),v=y=>{const x={};for(let w=0;wv([y,g.predict(y)])):uw(g.predict,p,25,200).forEach(v)}),this.value&&(e.rem=this.value),this.value=e.add=e.source=l}return e}});var mse=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",loess:CS,regression:OS});const Uh=11102230246251565e-32,Ol=134217729,vse=(3+8*Uh)*Uh;function g4(t,n,e,o,f){let r,a,u,c,i=n[0],s=o[0],l=0,d=0;s>i==s>-i?(r=i,i=n[++l]):(r=s,s=o[++d]);let h=0;if(li==s>-i?(a=i+r,u=r-(a-i),i=n[++l]):(a=s+r,u=r-(a-s),s=o[++d]),r=a,u!==0&&(f[h++]=u);li==s>-i?(a=r+i,c=a-r,u=r-(a-c)+(i-c),i=n[++l]):(a=r+s,c=a-r,u=r-(a-c)+(s-c),s=o[++d]),r=a,u!==0&&(f[h++]=u);for(;l=O||-D>=O||(l=t-M,u=t-(M+l)+(l-f),l=e-A,i=e-(A+l)+(l-f),l=n-S,c=n-(S+l)+(l-r),l=o-E,s=o-(E+l)+(l-r),u===0&&c===0&&i===0&&s===0)||(O=_se*a+vse*Math.abs(D),D+=M*s+E*u-(S*i+A*c),D>=O||-D>=O))return D;w=u*E,d=Ol*u,h=d-(d-u),m=u-h,d=Ol*E,g=d-(d-E),p=E-g,k=m*p-(w-h*g-m*g-h*p),b=c*A,d=Ol*c,h=d-(d-c),m=c-h,d=Ol*A,g=d-(d-A),p=A-g,T=m*p-(b-h*g-m*g-h*p),v=k-T,l=k-v,nu[0]=k-(v+l)+(l-T),y=w+v,l=y-w,x=w-(y-l)+(v-l),v=x-b,l=x-v,nu[1]=x-(v+l)+(l-b),_=y+v,l=_-y,nu[2]=y-(_-l)+(v-l),nu[3]=_;const R=g4(4,Rg,4,nu,ZO);w=M*s,d=Ol*M,h=d-(d-M),m=M-h,d=Ol*s,g=d-(d-s),p=s-g,k=m*p-(w-h*g-m*g-h*p),b=S*i,d=Ol*S,h=d-(d-S),m=S-h,d=Ol*i,g=d-(d-i),p=i-g,T=m*p-(b-h*g-m*g-h*p),v=k-T,l=k-v,nu[0]=k-(v+l)+(l-T),y=w+v,l=y-w,x=w-(y-l)+(v-l),v=x-b,l=x-v,nu[1]=x-(v+l)+(l-b),_=y+v,l=_-y,nu[2]=y-(_-l)+(v-l),nu[3]=_;const z=g4(R,ZO,4,nu,JO);w=u*s,d=Ol*u,h=d-(d-u),m=u-h,d=Ol*s,g=d-(d-s),p=s-g,k=m*p-(w-h*g-m*g-h*p),b=c*i,d=Ol*c,h=d-(d-c),m=c-h,d=Ol*i,g=d-(d-i),p=i-g,T=m*p-(b-h*g-m*g-h*p),v=k-T,l=k-v,nu[0]=k-(v+l)+(l-T),y=w+v,l=y-w,x=w-(y-l)+(v-l),v=x-b,l=x-v,nu[1]=x-(v+l)+(l-b),_=y+v,l=_-y,nu[2]=y-(_-l)+(v-l),nu[3]=_;const L=g4(z,JO,4,nu,KO);return KO[L-1]}function vb(t,n,e,o,f,r){const a=(n-r)*(e-f),u=(t-f)*(o-r),c=a-u;if(a===0||u===0||a>0!=u>0)return c;const i=Math.abs(a+u);return Math.abs(c)>=xse*i?c:-wse(t,n,e,o,f,r,i)}const QO=Math.pow(2,-52),yb=new Uint32Array(512);class g2{static from(n,e=Sse,o=Ese){const f=n.length,r=new Float64Array(f*2);for(let a=0;a>1;if(e>0&&typeof n[0]!="number")throw new Error("Expected coords to contain numbers.");this.coords=n;const o=Math.max(2*e-5,0);this._triangles=new Uint32Array(o*3),this._halfedges=new Int32Array(o*3),this._hashSize=Math.ceil(Math.sqrt(e)),this._hullPrev=new Uint32Array(e),this._hullNext=new Uint32Array(e),this._hullTri=new Uint32Array(e),this._hullHash=new Int32Array(this._hashSize).fill(-1),this._ids=new Uint32Array(e),this._dists=new Float64Array(e),this.update()}update(){const{coords:n,_hullPrev:e,_hullNext:o,_hullTri:f,_hullHash:r}=this,a=n.length>>1;let u=1/0,c=1/0,i=-1/0,s=-1/0;for(let A=0;Ai&&(i=S),E>s&&(s=E),this._ids[A]=A}const l=(u+i)/2,d=(c+s)/2;let h=1/0,m,g,p;for(let A=0;A0&&(g=A,h=S)}let x=n[2*g],w=n[2*g+1],k=1/0;for(let A=0;AD&&(A[S++]=O,D=this._dists[O])}this.hull=A.subarray(0,S),this.triangles=new Uint32Array(0),this.halfedges=new Uint32Array(0);return}if(vb(v,y,x,w,b,T)<0){const A=g,S=x,E=w;g=p,x=b,w=T,p=A,b=S,T=E}const _=Mse(v,y,x,w,b,T);this._cx=_.x,this._cy=_.y;for(let A=0;A0&&Math.abs(O-S)<=QO&&Math.abs(R-E)<=QO||(S=O,E=R,D===m||D===g||D===p))continue;let z=0;for(let G=0,W=this._hashKey(O,R);G=0;)if(L=P,L===z){L=-1;break}if(L===-1)continue;let N=this._addTriangle(L,D,o[L],-1,-1,f[L]);f[D]=this._legalize(N+2),f[L]=N,M++;let B=o[L];for(;P=o[B],vb(O,R,n[2*B],n[2*B+1],n[2*P],n[2*P+1])<0;)N=this._addTriangle(B,D,P,f[D],-1,f[B]),f[D]=this._legalize(N+2),o[B]=B,M--,B=P;if(L===z)for(;P=e[L],vb(O,R,n[2*P],n[2*P+1],n[2*L],n[2*L+1])<0;)N=this._addTriangle(P,D,L,-1,f[L],f[P]),this._legalize(N+2),f[P]=N,o[L]=L,M--,L=P;this._hullStart=e[D]=L,o[L]=e[B]=D,o[D]=B,r[this._hashKey(O,R)]=D,r[this._hashKey(n[2*L],n[2*L+1])]=L}this.hull=new Uint32Array(M);for(let A=0,S=this._hullStart;A0?3-e:1+e)/4}function m4(t,n,e,o){const f=t-e,r=n-o;return f*f+r*r}function Tse(t,n,e,o,f,r,a,u){const c=t-a,i=n-u,s=e-a,l=o-u,d=f-a,h=r-u,m=c*c+i*i,g=s*s+l*l,p=d*d+h*h;return c*(l*p-g*h)-i*(s*p-g*d)+m*(s*h-l*d)<0}function Ase(t,n,e,o,f,r){const a=e-t,u=o-n,c=f-t,i=r-n,s=a*a+u*u,l=c*c+i*i,d=.5/(a*i-u*c),h=(i*s-u*l)*d,m=(a*l-c*s)*d;return h*h+m*m}function Mse(t,n,e,o,f,r){const a=e-t,u=o-n,c=f-t,i=r-n,s=a*a+u*u,l=c*c+i*i,d=.5/(a*i-u*c),h=t+(i*s-u*l)*d,m=n+(a*l-c*s)*d;return{x:h,y:m}}function Jg(t,n,e,o){if(o-e<=20)for(let f=e+1;f<=o;f++){const r=t[f],a=n[r];let u=f-1;for(;u>=e&&n[t[u]]>a;)t[u+1]=t[u--];t[u+1]=r}else{const f=e+o>>1;let r=e+1,a=o;$1(t,f,r),n[t[e]]>n[t[o]]&&$1(t,e,o),n[t[r]]>n[t[o]]&&$1(t,r,o),n[t[e]]>n[t[r]]&&$1(t,e,r);const u=t[r],c=n[u];for(;;){do r++;while(n[t[r]]c);if(a=a-e?(Jg(t,n,r,o),Jg(t,n,e,a-1)):(Jg(t,n,e,a-1),Jg(t,n,r,o))}}function $1(t,n,e){const o=t[n];t[n]=t[e],t[e]=o}function Sse(t){return t[0]}function Ese(t){return t[1]}const eL=1e-6;class o0{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(n,e){this._+=`M${this._x0=this._x1=+n},${this._y0=this._y1=+e}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(n,e){this._+=`L${this._x1=+n},${this._y1=+e}`}arc(n,e,o){n=+n,e=+e,o=+o;const f=n+o,r=e;if(o<0)throw new Error("negative radius");this._x1===null?this._+=`M${f},${r}`:(Math.abs(this._x1-f)>eL||Math.abs(this._y1-r)>eL)&&(this._+="L"+f+","+r),o&&(this._+=`A${o},${o},0,1,1,${n-o},${e}A${o},${o},0,1,1,${this._x1=f},${this._y1=r}`)}rect(n,e,o,f){this._+=`M${this._x0=this._x1=+n},${this._y0=this._y1=+e}h${+o}v${+f}h${-o}Z`}value(){return this._||null}}class _T{constructor(){this._=[]}moveTo(n,e){this._.push([n,e])}closePath(){this._.push(this._[0].slice())}lineTo(n,e){this._.push([n,e])}value(){return this._.length?this._:null}}class Cse{constructor(n,[e,o,f,r]=[0,0,960,500]){if(!((f=+f)>=(e=+e))||!((r=+r)>=(o=+o)))throw new Error("invalid bounds");this.delaunay=n,this._circumcenters=new Float64Array(n.points.length*2),this.vectors=new Float64Array(n.points.length*2),this.xmax=f,this.xmin=e,this.ymax=r,this.ymin=o,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:n,hull:e,triangles:o},vectors:f}=this,r=this.circumcenters=this._circumcenters.subarray(0,o.length/3*2);for(let h=0,m=0,g=o.length,p,v;h1;)r-=2;for(let a=2;a4)for(let a=0;a0){if(e>=this.ymax)return null;(a=(this.ymax-e)/f)0){if(n>=this.xmax)return null;(a=(this.xmax-n)/o)this.xmax?2:0)|(ethis.ymax?8:0)}}const Ose=2*Math.PI,Fg=Math.pow;function Lse(t){return t[0]}function Pse(t){return t[1]}function Dse(t){const{triangles:n,coords:e}=t;for(let o=0;o1e-10)return!1}return!0}function Ise(t,n,e){return[t+Math.sin(t+n)*e,n+Math.cos(t-n)*e]}class LS{static from(n,e=Lse,o=Pse,f){return new LS("length"in n?zse(n,e,o,f):Float64Array.from(Rse(n,e,o,f)))}constructor(n){this._delaunator=new g2(n),this.inedges=new Int32Array(n.length/2),this._hullIndex=new Int32Array(n.length/2),this.points=this._delaunator.coords,this._init()}update(){return this._delaunator.update(),this._init(),this}_init(){const n=this._delaunator,e=this.points;if(n.hull&&n.hull.length>2&&Dse(n)){this.collinear=Int32Array.from({length:e.length/2},(d,h)=>h).sort((d,h)=>e[2*d]-e[2*h]||e[2*d+1]-e[2*h+1]);const c=this.collinear[0],i=this.collinear[this.collinear.length-1],s=[e[2*c],e[2*c+1],e[2*i],e[2*i+1]],l=1e-8*Math.hypot(s[3]-s[1],s[2]-s[0]);for(let d=0,h=e.length/2;d0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=f[0],a[f[0]]=1,f.length===2&&(a[f[1]]=0,this.triangles[1]=f[1],this.triangles[2]=f[1]))}voronoi(n){return new Cse(this,n)}*neighbors(n){const{inedges:e,hull:o,_hullIndex:f,halfedges:r,triangles:a,collinear:u}=this;if(u){const l=u.indexOf(n);l>0&&(yield u[l-1]),l=0&&r!==o&&r!==f;)o=r;return r}_step(n,e,o){const{inedges:f,hull:r,_hullIndex:a,halfedges:u,triangles:c,points:i}=this;if(f[n]===-1||!i.length)return(n+1)%(i.length>>1);let s=n,l=Fg(e-i[n*2],2)+Fg(o-i[n*2+1],2);const d=f[n];let h=d;do{let m=c[h];const g=Fg(e-i[m*2],2)+Fg(o-i[m*2+1],2);if(g>5,t_=1<<11;function jse(){var t=[256,256],n,e,o,f,r,a,u,c=KB,i=[],s=Math.random,l={};l.layout=function(){for(var m=d(Vd()),g=Gse((t[0]>>5)*t[1]),p=null,v=i.length,y=-1,x=[],w=i.map(b=>({text:n(b),font:e(b),style:f(b),weight:r(b),rotate:a(b),size:~~(o(b)+1e-14),padding:u(b),xoff:0,yoff:0,x1:0,y1:0,x0:0,y0:0,hasText:!1,sprite:null,datum:b})).sort((b,T)=>T.size-b.size);++y>1,k.y=t[1]*(s()+.5)>>1,Use(m,k,w,y),k.hasText&&h(g,k,p)&&(x.push(k),p?qse(p,k):p=[{x:k.x+k.x0,y:k.y+k.y0},{x:k.x+k.x1,y:k.y+k.y1}],k.x-=t[0]>>1,k.y-=t[1]>>1)}return x};function d(m){m.width=m.height=1;var g=Math.sqrt(m.getContext("2d").getImageData(0,0,1,1).data.length>>2);m.width=(wv<<5)/g,m.height=t_/g;var p=m.getContext("2d");return p.fillStyle=p.strokeStyle="red",p.textAlign="center",{context:p,ratio:g}}function h(m,g,p){for(var v=g.x,y=g.y,x=Math.sqrt(t[0]*t[0]+t[1]*t[1]),w=c(t),k=s()<.5?1:-1,b=-k,T,_,M;(T=w(b+=k))&&(_=~~T[0],M=~~T[1],!(Math.min(Math.abs(_),Math.abs(M))>=x));)if(g.x=v+_,g.y=y+M,!(g.x+g.x0<0||g.y+g.y0<0||g.x+g.x1>t[0]||g.y+g.y1>t[1])&&(!p||!Vse(g,m,t[0]))&&(!p||Hse(g,p))){for(var A=g.sprite,S=g.width>>5,E=t[0]>>5,D=g.x-(S<<4),O=D&127,R=32-O,z=g.y1-g.y0,L=(g.y+g.y0)*E+(D>>5),P,N=0;N>>O:0);L+=E}return g.sprite=null,!0}return!1}return l.words=function(m){return arguments.length?(i=m,l):i},l.size=function(m){return arguments.length?(t=[+m[0],+m[1]],l):t},l.font=function(m){return arguments.length?(e=Bp(m),l):e},l.fontStyle=function(m){return arguments.length?(f=Bp(m),l):f},l.fontWeight=function(m){return arguments.length?(r=Bp(m),l):r},l.rotate=function(m){return arguments.length?(a=Bp(m),l):a},l.text=function(m){return arguments.length?(n=Bp(m),l):n},l.spiral=function(m){return arguments.length?(c=Wse[m]||m,l):c},l.fontSize=function(m){return arguments.length?(o=Bp(m),l):o},l.padding=function(m){return arguments.length?(u=Bp(m),l):u},l.random=function(m){return arguments.length?(s=m,l):s},l}function Use(t,n,e,o){if(!n.sprite){var f=t.context,r=t.ratio;f.clearRect(0,0,(wv<<5)/r,t_/r);var a=0,u=0,c=0,i=e.length,s,l,d,h,m;for(--o;++o>5<<5,d=~~Math.max(Math.abs(y+x),Math.abs(y-x))}else s=s+31>>5<<5;if(d>c&&(c=d),a+s>=wv<<5&&(a=0,u+=c,c=0),u+d>=t_)break;f.translate((a+(s>>1))/r,(u+(d>>1))/r),n.rotate&&f.rotate(n.rotate*v4),f.fillText(n.text,0,0),n.padding&&(f.lineWidth=2*n.padding,f.strokeText(n.text,0,0)),f.restore(),n.width=s,n.height=d,n.xoff=a,n.yoff=u,n.x1=s>>1,n.y1=d>>1,n.x0=-n.x1,n.y0=-n.y1,n.hasText=!0,a+=s}for(var k=f.getImageData(0,0,(wv<<5)/r,t_/r).data,b=[];--o>=0;)if(n=e[o],!!n.hasText){for(s=n.width,l=s>>5,d=n.y1-n.y0,h=0;h>5),A=k[(u+m)*(wv<<5)+(a+h)<<2]?1<<31-h%32:0;b[M]|=A,T|=A}T?_=m:(n.y0++,d--,m--,u++)}n.y1=n.y0+_,n.sprite=b.slice(0,(n.y1-n.y0)*l)}}}function Vse(t,n,e){e>>=5;for(var o=t.sprite,f=t.width>>5,r=t.x-(f<<4),a=r&127,u=32-a,c=t.y1-t.y0,i=(t.y+t.y0)*e+(r>>5),s,l=0;l>>a:0))&n[i+d])return!0;i+=e}return!1}function qse(t,n){var e=t[0],o=t[1];n.x+n.x0o.x&&(o.x=n.x+n.x1),n.y+n.y1>o.y&&(o.y=n.y+n.y1)}function Hse(t,n){return t.x+t.x1>n[0].x&&t.x+t.x0n[0].y&&t.y+t.y0g(m(p))}f.forEach(m=>{m[a[0]]=NaN,m[a[1]]=NaN,m[a[3]]=0});const i=r.words(f).text(t.text).size(t.size||[500,500]).padding(t.padding||1).spiral(t.spiral||"archimedean").rotate(t.rotate||0).font(t.font||"sans-serif").fontStyle(t.fontStyle||"normal").fontWeight(t.fontWeight||"normal").fontSize(u).random(yc).layout(),s=r.size(),l=s[0]>>1,d=s[1]>>1,h=i.length;for(let m=0,g,p;mnew Uint8Array(t),Jse=t=>new Uint16Array(t),zv=t=>new Uint32Array(t);function Kse(){let t=8,n=[],e=zv(0),o=xb(0,t),f=xb(0,t);return{data:()=>n,seen:()=>e=Qse(e,n.length),add(r){for(let a=0,u=n.length,c=r.length,i;an.length,curr:()=>o,prev:()=>f,reset:r=>f[r]=o[r],all:()=>t<257?255:t<65537?65535:4294967295,set(r,a){o[r]|=a},clear(r,a){o[r]&=~a},resize(r,a){const u=o.length;(r>u||a>t)&&(t=Math.max(a,t),o=xb(r,t,o),f=xb(r,t))}}}function Qse(t,n,e){return t.length>=n?t:(e=e||new t.constructor(n),e.set(t),e)}function xb(t,n,e){const o=(n<257?Zse:n<65537?Jse:zv)(t);return e&&o.set(e),o}function tL(t,n,e){const o=1<0)for(p=0;pt,size:()=>e}}function ele(t,n){return t.sort.call(n,(e,o)=>{const f=t[e],r=t[o];return fr?1:0}),JW(t,n)}function tle(t,n,e,o,f,r,a,u,c){let i=0,s=0,l;for(l=0;in.modified(o.fields));return e?this.reinit(t,n):this.eval(t,n)}else return this.init(t,n)},init(t,n){const e=t.fields,o=t.query,f=this._indices={},r=this._dims=[],a=o.length;let u=0,c,i;for(;u{const r=f.remove(n,e);for(const a in o)o[a].reindex(r)})},update(t,n,e){const o=this._dims,f=t.query,r=n.stamp,a=o.length;let u=0,c,i;for(e.filters=0,i=0;ih)for(p=h,v=Math.min(l,m);pm)for(p=Math.max(l,m),v=d;pl)for(m=l,g=Math.min(i,d);md)for(m=Math.max(i,d),g=s;mu[s]&e?null:a[s];return r.filter(r.MOD,i),f&f-1?(r.filter(r.ADD,s=>{const l=u[s]&e;return!l&&l^c[s]&e?a[s]:null}),r.filter(r.REM,s=>{const l=u[s]&e;return l&&!(l^(l^c[s]&e))?a[s]:null})):(r.filter(r.ADD,i),r.filter(r.REM,s=>(u[s]&e)===f?a[s]:null)),r.filter(r.SOURCE,s=>i(s._index))}});var nle=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",crossfilter:IS,resolvefilter:zS});const rle="RawCode",S0="Literal",ile="Property",ale="Identifier",ole="ArrayExpression",sle="BinaryExpression",ej="CallExpression",lle="ConditionalExpression",ule="LogicalExpression",cle="MemberExpression",fle="ObjectExpression",hle="UnaryExpression";function gf(t){this.type=t}gf.prototype.visit=function(t){let n,e,o;if(t(this))return 1;for(n=dle(this),e=0,o=n.length;e";lh[E0]="Identifier";lh[dp]="Keyword";lh[Nw]="Null";lh[W0]="Numeric";lh[wu]="Punctuator";lh[Yy]="String";lh[ple]="RegularExpression";var gle="ArrayExpression",mle="BinaryExpression",vle="CallExpression",yle="ConditionalExpression",tj="Identifier",xle="Literal",ble="LogicalExpression",_le="MemberExpression",wle="ObjectExpression",kle="Property",Tle="UnaryExpression",rl="Unexpected token %0",Ale="Unexpected number",Mle="Unexpected string",Sle="Unexpected identifier",Ele="Unexpected reserved word",Cle="Unexpected end of input",wT="Invalid regular expression",y4="Invalid regular expression: missing /",nj="Octal literals are not allowed in strict mode.",Ole="Duplicate data property in object literal not allowed in strict mode",_l="ILLEGAL",iy="Disabled.",Lle=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B2\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]"),Ple=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0-\\u08B2\\u08E4-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A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-\\u0D3A\\u0D3D-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D57\\u0D60-\\u0D63\\u0D66-\\u0D6F\\u0D7A-\\u0D7F\\u0D82\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19D9\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFC-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA69D\\uA69F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C4\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2D\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]");function Bw(t,n){if(!t)throw new Error("ASSERT: "+n)}function Lh(t){return t>=48&&t<=57}function RS(t){return"0123456789abcdefABCDEF".indexOf(t)>=0}function Rv(t){return"01234567".indexOf(t)>=0}function Dle(t){return t===32||t===9||t===11||t===12||t===160||t>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(t)>=0}function ay(t){return t===10||t===13||t===8232||t===8233}function Xy(t){return t===36||t===95||t>=65&&t<=90||t>=97&&t<=122||t===92||t>=128&&Lle.test(String.fromCharCode(t))}function m2(t){return t===36||t===95||t>=65&&t<=90||t>=97&&t<=122||t>=48&&t<=57||t===92||t>=128&&Ple.test(String.fromCharCode(t))}const Ile={if:1,in:1,do:1,var:1,for:1,new:1,try:1,let:1,this:1,else:1,case:1,void:1,with:1,enum:1,while:1,break:1,catch:1,throw:1,const:1,yield:1,class:1,super:1,return:1,typeof:1,delete:1,switch:1,export:1,import:1,public:1,static:1,default:1,finally:1,extends:1,package:1,private:1,function:1,continue:1,debugger:1,interface:1,protected:1,instanceof:1,implements:1};function rj(){for(;Cr1114111||t!=="}")&&Wa({},rl,_l),n<=65535?String.fromCharCode(n):(e=(n-65536>>10)+55296,o=(n-65536&1023)+56320,String.fromCharCode(e,o))}function ij(){var t,n;for(t=Ii.charCodeAt(Cr++),n=String.fromCharCode(t),t===92&&(Ii.charCodeAt(Cr)!==117&&Wa({},rl,_l),++Cr,t=kT("u"),(!t||t==="\\"||!Xy(t.charCodeAt(0)))&&Wa({},rl,_l),n=t);Cr>>=")return Cr+=4,{type:wu,value:a,start:t,end:Cr};if(r=a.substr(0,3),r===">>>"||r==="<<="||r===">>=")return Cr+=3,{type:wu,value:r,start:t,end:Cr};if(f=r.substr(0,2),o===f[1]&&"+-<>&|".indexOf(o)>=0||f==="=>")return Cr+=2,{type:wu,value:f,start:t,end:Cr};if(f==="//"&&Wa({},rl,_l),"<>=!+-*%&|^/".indexOf(o)>=0)return++Cr,{type:wu,value:o,start:t,end:Cr};Wa({},rl,_l)}function Nle(t){let n="";for(;Cr=0&&Cr=0&&(e=e.replace(/\\u\{([0-9a-fA-F]+)\}/g,(o,f)=>{if(parseInt(f,16)<=1114111)return"x";Wa({},wT)}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"));try{new RegExp(e)}catch{Wa({},wT)}try{return new RegExp(t,n)}catch{return null}}function Vle(){var t,n,e,o,f;for(t=Ii[Cr],Bw(t==="/","Regular expression literal must start with a slash"),n=Ii[Cr++],e=!1,o=!1;Cr=0&&Wa({},wT,e),{value:e,literal:n}}function Hle(){var t,n,e,o;return vo=null,rj(),t=Cr,n=Vle(),e=qle(),o=Ule(n.value,e.value),{literal:n.literal+e.literal,value:o,regex:{pattern:n.value,flags:e.value},start:t,end:Cr}}function $le(t){return t.type===E0||t.type===dp||t.type===Fw||t.type===Nw}function aj(){if(rj(),Cr>=Ul)return{type:Wy,start:Cr,end:Cr};const t=Ii.charCodeAt(Cr);return Xy(t)?Fle():t===40||t===41||t===59?x4():t===39||t===34?jle():t===46?Lh(Ii.charCodeAt(Cr+1))?rL():x4():Lh(t)?rL():x4()}function Mu(){const t=vo;return Cr=t.end,vo=aj(),Cr=t.end,t}function oj(){const t=Cr;vo=aj(),Cr=t}function Gle(t){const n=new gf(gle);return n.elements=t,n}function iL(t,n,e){const o=new gf(t==="||"||t==="&&"?ble:mle);return o.operator=t,o.left=n,o.right=e,o}function Wle(t,n){const e=new gf(vle);return e.callee=t,e.arguments=n,e}function Yle(t,n,e){const o=new gf(yle);return o.test=t,o.consequent=n,o.alternate=e,o}function FS(t){const n=new gf(tj);return n.name=t,n}function kv(t){const n=new gf(xle);return n.value=t.value,n.raw=Ii.slice(t.start,t.end),t.regex&&(n.raw==="//"&&(n.raw="/(?:)/"),n.regex=t.regex),n}function aL(t,n,e){const o=new gf(_le);return o.computed=t==="[",o.object=n,o.property=e,o.computed||(e.member=!0),o}function Xle(t){const n=new gf(wle);return n.properties=t,n}function oL(t,n,e){const o=new gf(kle);return o.key=n,o.value=e,o.kind=t,o}function Zle(t,n){const e=new gf(Tle);return e.operator=t,e.argument=n,e.prefix=!0,e}function Wa(t,n){var e,o=Array.prototype.slice.call(arguments,2),f=n.replace(/%(\d)/g,(r,a)=>(Bw(a":case"<=":case">=":case"instanceof":case"in":n=7;break;case"<<":case">>":case">>>":n=8;break;case"+":case"-":n=9;break;case"*":case"/":case"%":n=11;break}return n}function lue(){var t,n,e,o,f,r,a,u,c,i;if(t=vo,c=n_(),o=vo,f=uL(o),f===0)return c;for(o.prec=f,Mu(),n=[t,vo],a=n_(),r=[c,o,a];(f=uL(vo))>0;){for(;r.length>2&&f<=r[r.length-2].prec;)a=r.pop(),u=r.pop().value,c=r.pop(),n.pop(),e=iL(u,c,a),r.push(e);o=Mu(),o.prec=f,r.push(o),n.push(vo),e=n_(),r.push(e)}for(i=r.length-1,e=r[i],n.pop();i>1;)n.pop(),e=iL(r[i-1].value,r[i-2],e),i-=2;return e}function C0(){var t,n,e;return t=lue(),qo("?")&&(Mu(),n=C0(),Vl(":"),e=C0(),t=Yle(t,n,e)),t}function NS(){const t=C0();if(qo(","))throw new Error(iy);return t}function BS(t){Ii=t,Cr=0,Ul=Ii.length,vo=null,oj();const n=NS();if(vo.type!==Wy)throw new Error("Unexpect token after expression.");return n}var sj={NaN:"NaN",E:"Math.E",LN2:"Math.LN2",LN10:"Math.LN10",LOG2E:"Math.LOG2E",LOG10E:"Math.LOG10E",PI:"Math.PI",SQRT1_2:"Math.SQRT1_2",SQRT2:"Math.SQRT2",MIN_VALUE:"Number.MIN_VALUE",MAX_VALUE:"Number.MAX_VALUE"};function lj(t){function n(a,u,c,i){let s=t(u[0]);return c&&(s=c+"("+s+")",c.lastIndexOf("new ",0)===0&&(s="("+s+")")),s+"."+a+(i<0?"":i===0?"()":"("+u.slice(1).map(t).join(",")+")")}function e(a,u,c){return i=>n(a,i,u,c)}const o="new Date",f="String",r="RegExp";return{isNaN:"Number.isNaN",isFinite:"Number.isFinite",abs:"Math.abs",acos:"Math.acos",asin:"Math.asin",atan:"Math.atan",atan2:"Math.atan2",ceil:"Math.ceil",cos:"Math.cos",exp:"Math.exp",floor:"Math.floor",log:"Math.log",max:"Math.max",min:"Math.min",pow:"Math.pow",random:"Math.random",round:"Math.round",sin:"Math.sin",sqrt:"Math.sqrt",tan:"Math.tan",clamp:function(a){a.length<3&&Pr("Missing arguments to clamp function."),a.length>3&&Pr("Too many arguments to clamp function.");const u=a.map(t);return"Math.max("+u[1]+", Math.min("+u[2]+","+u[0]+"))"},now:"Date.now",utc:"Date.UTC",datetime:o,date:e("getDate",o,0),day:e("getDay",o,0),year:e("getFullYear",o,0),month:e("getMonth",o,0),hours:e("getHours",o,0),minutes:e("getMinutes",o,0),seconds:e("getSeconds",o,0),milliseconds:e("getMilliseconds",o,0),time:e("getTime",o,0),timezoneoffset:e("getTimezoneOffset",o,0),utcdate:e("getUTCDate",o,0),utcday:e("getUTCDay",o,0),utcyear:e("getUTCFullYear",o,0),utcmonth:e("getUTCMonth",o,0),utchours:e("getUTCHours",o,0),utcminutes:e("getUTCMinutes",o,0),utcseconds:e("getUTCSeconds",o,0),utcmilliseconds:e("getUTCMilliseconds",o,0),length:e("length",null,-1),parseFloat:"parseFloat",parseInt:"parseInt",upper:e("toUpperCase",f,0),lower:e("toLowerCase",f,0),substring:e("substring",f),split:e("split",f),trim:e("trim",f,0),regexp:r,test:e("test",r),if:function(a){a.length<3&&Pr("Missing arguments to if function."),a.length>3&&Pr("Too many arguments to if function.");const u=a.map(t);return"("+u[0]+"?"+u[1]+":"+u[2]+")"}}}function uue(t){const n=t&&t.length-1;return n&&(t[0]==='"'&&t[n]==='"'||t[0]==="'"&&t[n]==="'")?t.slice(1,-1):t}function uj(t){t=t||{};const n=t.allowed?ff(t.allowed):{},e=t.forbidden?ff(t.forbidden):{},o=t.constants||sj,f=(t.functions||lj)(l),r=t.globalvar,a=t.fieldvar,u=ga(r)?r:m=>`${r}["${m}"]`;let c={},i={},s=0;function l(m){if(bi(m))return m;const g=d[m.type];return g==null&&Pr("Unsupported type: "+m.type),g(m)}const d={Literal:m=>m.raw,Identifier:m=>{const g=m.name;return s>0?g:qi(e,g)?Pr("Illegal identifier: "+g):qi(o,g)?o[g]:qi(n,g)?g:(c[g]=1,u(g))},MemberExpression:m=>{const g=!m.computed,p=l(m.object);g&&(s+=1);const v=l(m.property);return p===a&&(i[uue(v)]=1),g&&(s-=1),p+(g?"."+v:"["+v+"]")},CallExpression:m=>{m.callee.type!=="Identifier"&&Pr("Illegal callee type: "+m.callee.type);const g=m.callee.name,p=m.arguments,v=qi(f,g)&&f[g];return v||Pr("Unrecognized function: "+g),ga(v)?v(p):v+"("+p.map(l).join(",")+")"},ArrayExpression:m=>"["+m.elements.map(l).join(",")+"]",BinaryExpression:m=>"("+l(m.left)+" "+m.operator+" "+l(m.right)+")",UnaryExpression:m=>"("+m.operator+l(m.argument)+")",ConditionalExpression:m=>"("+l(m.test)+"?"+l(m.consequent)+":"+l(m.alternate)+")",LogicalExpression:m=>"("+l(m.left)+m.operator+l(m.right)+")",ObjectExpression:m=>"{"+m.properties.map(l).join(",")+"}",Property:m=>{s+=1;const g=l(m.key);return s-=1,g+":"+l(m.value)}};function h(m){const g={code:l(m),globals:Object.keys(c),fields:Object.keys(i)};return c={},i={},g}return h.functions=f,h.constants=o,h}const jS="intersect",cL="union",cue="vlMulti",fue="vlPoint",fL="or",hue="and",Rf="_vgsid_",oy=Lu(Rf),due="E",pue="R",gue="R-E",mue="R-LE",vue="R-RE",v2="index:unit";function hL(t,n){for(var e=n.fields,o=n.values,f=e.length,r=0,a,u;rpa(n.fields?{values:n.fields.map(o=>(o.getter||(o.getter=Lu(o.field)))(e.datum))}:{[Rf]:oy(e.datum)},n))}function kue(t,n,e,o){for(var f=this.context.data[t],r=f?f.values.value:[],a={},u={},c={},i,s,l,d,h,m,g,p,v,y,x=r.length,w=0,k,b;w(T[s[M].field]=_,T),{})))}else h=Rf,m=oy(i),g=a[h]||(a[h]={}),p=g[d]||(g[d]=[]),p.push(m),e&&(p=u[d]||(u[d]=[]),p.push({[Rf]:m}));if(n=n||cL,a[Rf]?a[Rf]=_4["".concat(Rf,"_").concat(n)](...Object.values(a[Rf])):Object.keys(a).forEach(T=>{a[T]=Object.keys(a[T]).map(_=>a[T][_]).reduce((_,M)=>_===void 0?M:_4["".concat(c[T],"_").concat(n)](_,M))}),r=Object.keys(u),e&&r.length){const T=o?fue:cue;a[T]=n===cL?{[fL]:r.reduce((_,M)=>(_.push(...u[M]),_),[])}:{[hue]:r.map(_=>({[fL]:u[_]}))}}return a}var _4={["".concat(Rf,"_union")]:rY,["".concat(Rf,"_intersect")]:tY,E_union:function(t,n){if(!t.length)return n;for(var e=0,o=n.length;en.indexOf(e)>=0):n},R_union:function(t,n){var e=Rl(n[0]),o=Rl(n[1]);return e>o&&(e=n[1],o=n[0]),t.length?(t[0]>e&&(t[0]=e),t[1]o&&(e=n[1],o=n[0]),t.length?oo&&(t[1]=o),t):[e,o]}};const Tue=":",Aue="@";function US(t,n,e,o){n[0].type!==S0&&Pr("First argument to selection functions must be a string literal.");const f=n[0].value,r=n.length>=2&&Na(n).value,a="unit",u=Aue+a,c=Tue+f;r===jS&&!qi(o,u)&&(o[u]=e.getData(f).indataRef(e,a)),qi(o,c)||(o[c]=e.getData(f).tuplesRef())}function fj(t){const n=this.context.data[t];return n?n.values.value:[]}function Mue(t,n,e){const o=this.context.data[t]["index:"+n],f=o?o.value.get(e):void 0;return f&&f.count}function Sue(t,n){const e=this.context.dataflow,o=this.context.data[t],f=o.input;return e.pulse(f,e.changeset().remove(mc).insert(n)),1}function Eue(t,n,e){if(t){const o=this.context.dataflow,f=t.mark.source;o.pulse(f,o.changeset().encode(t,n))}return e!==void 0?e:t}const Zy=t=>function(n,e){return this.context.dataflow.locale()[t](e)(n)},Cue=Zy("format"),hj=Zy("timeFormat"),Oue=Zy("utcFormat"),Lue=Zy("timeParse"),Pue=Zy("utcParse"),bb=new Date(2e3,0,1);function Uw(t,n,e){return!Number.isInteger(t)||!Number.isInteger(n)?"":(bb.setYear(2e3),bb.setMonth(t),bb.setDate(n),hj.call(this,bb,e))}function Due(t){return Uw.call(this,t,1,"%B")}function Iue(t){return Uw.call(this,t,1,"%b")}function zue(t){return Uw.call(this,0,2+t,"%A")}function Rue(t){return Uw.call(this,0,2+t,"%a")}const Fue=":",Nue="@",TT="%",dj="$";function VS(t,n,e,o){n[0].type!==S0&&Pr("First argument to data functions must be a string literal.");const f=n[0].value,r=Fue+f;if(!qi(r,o))try{o[r]=e.getData(f).tuplesRef()}catch{}}function Bue(t,n,e,o){n[0].type!==S0&&Pr("First argument to indata must be a string literal."),n[1].type!==S0&&Pr("Second argument to indata must be a string literal.");const f=n[0].value,r=n[1].value,a=Nue+r;qi(a,o)||(o[a]=e.getData(f).indataRef(e,r))}function Su(t,n,e,o){if(n[0].type===S0)dL(e,o,n[0].value);else for(t in e.scales)dL(e,o,t)}function dL(t,n,e){const o=TT+e;if(!qi(n,o))try{n[o]=t.scaleRef(e)}catch{}}function Qh(t,n){let e;return ga(t)?t:bi(t)?(e=n.scales[t])&&e.value:void 0}function jue(t,n,e){n.__bandwidth=f=>f&&f.bandwidth?f.bandwidth():0,e._bandwidth=Su,e._range=Su,e._scale=Su;const o=f=>"_["+(f.type===S0?oi(TT+f.value):oi(TT)+"+"+t(f))+"]";return{_bandwidth:f=>"this.__bandwidth(".concat(o(f[0]),")"),_range:f=>"".concat(o(f[0]),".range()"),_scale:f=>"".concat(o(f[0]),"(").concat(t(f[1]),")")}}function qS(t,n){return function(e,o,f){if(e){const r=Qh(e,(f||this).context);return r&&r.path[t](o)}else return n(o)}}const Uue=qS("area",hre),Vue=qS("bounds",mre),que=qS("centroid",wre);function Hue(t){const n=this.context.group;let e=!1;if(n)for(;t;){if(t===n){e=!0;break}t=t.mark.group}return e}function HS(t,n,e){try{t[n].apply(t,["EXPRESSION"].concat([].slice.call(e)))}catch(o){t.warn(o)}return e[e.length-1]}function $ue(){return HS(this.context.dataflow,"warn",arguments)}function Gue(){return HS(this.context.dataflow,"info",arguments)}function Wue(){return HS(this.context.dataflow,"debug",arguments)}function w4(t){const n=t/255;return n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}function AT(t){const n=c_(t),e=w4(n.r),o=w4(n.g),f=w4(n.b);return .2126*e+.7152*o+.0722*f}function Yue(t,n){const e=AT(t),o=AT(n),f=Math.max(e,o),r=Math.min(e,o);return(f+.05)/(r+.05)}function Xue(){const t=[].slice.call(arguments);return t.unshift({}),pa(...t)}function pj(t,n){return t===n||t!==t&&n!==n?!0:Ir(t)?Ir(n)&&t.length===n.length?Zue(t,n):!1:Ei(t)&&Ei(n)?gj(t,n):!1}function Zue(t,n){for(let e=0,o=t.length;egj(t,n)}function Jue(t,n,e,o,f,r){const a=this.context.dataflow,u=this.context.data[t],c=u.input,i=a.stamp();let s=u.changes,l,d;if(a._trigger===!1||!(c.value.length||n||o))return 0;if((!s||s.stamp{u.modified=!0,a.pulse(c,s).run()},!0,1)),e&&(l=e===!0?mc:Ir(e)||tw(e)?e:pL(e),s.remove(l)),n&&s.insert(n),o&&(l=pL(o),c.value.some(l)?s.remove(l):s.insert(o)),f)for(d in r)s.modify(f,d,r[d]);return 1}function Kue(t){const n=t.touches,e=n[0].clientX-n[1].clientX,o=n[0].clientY-n[1].clientY;return Math.sqrt(e*e+o*o)}function Que(t){const n=t.touches;return Math.atan2(n[0].clientY-n[1].clientY,n[0].clientX-n[1].clientX)}const gL={};function ece(t,n){const e=gL[n]||(gL[n]=Lu(n));return Ir(t)?t.map(e):e(t)}function $S(t){return Ir(t)||ArrayBuffer.isView(t)?t:null}function GS(t){return $S(t)||(bi(t)?t:null)}function tce(t){for(var n=arguments.length,e=new Array(n>1?n-1:0),o=1;o1?n-1:0),o=1;o1?n-1:0),o=1;o1?n-1:0),o=1;or.stop(i(s),t(s))),r}function gce(t,n,e){const o=Qh(t,(e||this).context);return function(f){return o?o.path.context(f)(n):""}}function mce(t){let n=null;return function(e){return e?Zv(e,n=n||gm(t)):t}}const mj=t=>t.data;function vj(t,n){const e=fj.call(n,t);return e.root&&e.root.lookup||{}}function vce(t,n,e){const o=vj(t,this),f=o[n],r=o[e];return f&&r?f.path(r).map(mj):void 0}function yce(t,n){const e=vj(t,this)[n];return e?e.ancestors().map(mj):void 0}const yj=()=>typeof window<"u"&&window||null;function xce(){const t=yj();return t?t.screen:{}}function bce(){const t=yj();return t?[t.innerWidth,t.innerHeight]:[void 0,void 0]}function _ce(){const t=this.context.dataflow,n=t.container&&t.container();return n?[n.clientWidth,n.clientHeight]:[void 0,void 0]}function xj(t,n,e){if(!t)return[];const[o,f]=t,r=new zs().set(o[0],o[1],f[0],f[1]),a=e||this.context.dataflow.scenegraph().root;return aN(a,r,wce(n))}function wce(t){let n=null;if(t){const e=ki(t.marktype),o=ki(t.markname);n=f=>(!e.length||e.some(r=>f.marktype===r))&&(!o.length||o.some(r=>f.name===r))}return n}function kce(t,n,e){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:5;const f=t[t.length-1];return f===void 0||Math.sqrt((f[0]-n)**2+(f[1]-e)**2)>o?(t.push([n,e]),[...t]):t}function Tce(t){return(t??[]).reduce((n,e,o)=>{let[f,r]=e;return n+=o==0?"M ".concat(f,",").concat(r," "):o===t.length-1?" Z":"L ".concat(f,",").concat(r," ")},"")}function Ace(t,n,e){const{x:o,y:f,mark:r}=e,a=new zs().set(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,Number.MIN_SAFE_INTEGER,Number.MIN_SAFE_INTEGER);for(const[c,i]of n)ca.x2&&(a.x2=c),ia.y2&&(a.y2=i);return a.translate(o,f),xj([[a.x1,a.y1],[a.x2,a.y2]],t,r).filter(c=>Mce(c.x,c.y,n))}function Mce(t,n,e){let o=0;for(let f=0,r=e.length-1;fn!=u>n&&t<(a-c)*(n-i)/(u-i)+c&&o++}return o&1}const sy={random(){return yc()},cumulativeNormal:ow,cumulativeLogNormal:o6,cumulativeUniform:c6,densityNormal:t6,densityLogNormal:a6,densityUniform:u6,quantileNormal:sw,quantileLogNormal:s6,quantileUniform:f6,sampleNormal:aw,sampleLogNormal:i6,sampleUniform:l6,isArray:Ir,isBoolean:fp,isDate:Nd,isDefined(t){return t!==void 0},isNumber:wo,isObject:Ei,isRegExp:fI,isString:bi,isTuple:tw,isValid(t){return t!=null&&t===t},toBoolean:LA,toDate(t){return PA(t)},toNumber:Rl,toString:DA,indexof:nce,join:tce,lastindexof:rce,replace:ace,reverse:oce,slice:ice,flush:uI,lerp:hI,merge:Xue,pad:gI,peek:Na,pluck:ece,span:Ay,inrange:Wg,truncate:mI,rgb:c_,lab:A_,hcl:M_,hsl:Q4,luminance:AT,contrast:Yue,sequence:Ju,format:Cue,utcFormat:Oue,utcParse:Pue,utcOffset:VI,utcSequence:$I,timeFormat:hj,timeParse:Lue,timeOffset:UI,timeSequence:HI,timeUnitSpecifier:OI,monthFormat:Due,monthAbbrevFormat:Iue,dayFormat:zue,dayAbbrevFormat:Rue,quarter:aI,utcquarter:oI,week:PI,utcweek:zI,dayofyear:LI,utcdayofyear:II,warn:$ue,info:Gue,debug:Wue,extent(t){return Zf(t)},inScope:Hue,intersect:xj,clampRange:sI,pinchDistance:Kue,pinchAngle:Que,screen:xce,containerSize:_ce,windowSize:bce,bandspace:sce,setdata:Sue,pathShape:mce,panLinear:tI,panLog:nI,panPow:rI,panSymlog:iI,zoomLinear:AA,zoomLog:MA,zoomPow:p_,zoomSymlog:SA,encode:Eue,modify:Jue,lassoAppend:kce,lassoPath:Tce,intersectLasso:Ace},Sce=["view","item","group","xy","x","y"],Ece="event.vega.",bj="this.",WS={},_j={forbidden:["_"],allowed:["datum","event","item"],fieldvar:"datum",globalvar:t=>"_[".concat(oi(dj+t),"]"),functions:Cce,constants:sj,visitors:WS},MT=uj(_j);function Cce(t){const n=lj(t);Sce.forEach(e=>n[e]=Ece+e);for(const e in sy)n[e]=bj+e;return pa(n,jue(t,sy,WS)),n}function Fs(t,n,e){return arguments.length===1?sy[t]:(sy[t]=n,e&&(WS[t]=e),MT&&(MT.functions[t]=bj+t),this)}Fs("bandwidth",lce,Su);Fs("copy",uce,Su);Fs("domain",cce,Su);Fs("range",hce,Su);Fs("invert",fce,Su);Fs("scale",dce,Su);Fs("gradient",pce,Su);Fs("geoArea",Uue,Su);Fs("geoBounds",Vue,Su);Fs("geoCentroid",que,Su);Fs("geoShape",gce,Su);Fs("indata",Mue,Bue);Fs("data",fj,VS);Fs("treePath",vce,VS);Fs("treeAncestors",yce,VS);Fs("vlSelectionTest",yue,US);Fs("vlSelectionIdTest",_ue,US);Fs("vlSelectionResolve",kue,US);Fs("vlSelectionTuples",wue);function Qf(t,n){const e={};let o;try{t=bi(t)?t:oi(t)+"",o=BS(t)}catch{Pr("Expression parse error: "+t)}o.visit(r=>{if(r.type!==ej)return;const a=r.callee.name,u=_j.visitors[a];u&&u(a,r.arguments,n,e)});const f=MT(o);return f.globals.forEach(r=>{const a=dj+r;!qi(e,a)&&n.getSignal(r)&&(e[a]=n.signalRef(r))}),{$expr:pa({code:f.code},n.options.ast?{ast:o}:null),$fields:f.fields,$params:e}}function Oce(t){const n=this,e=t.operators||[];return t.background&&(n.background=t.background),t.eventConfig&&(n.eventConfig=t.eventConfig),t.locale&&(n.locale=t.locale),e.forEach(o=>n.parseOperator(o)),e.forEach(o=>n.parseOperatorParameters(o)),(t.streams||[]).forEach(o=>n.parseStream(o)),(t.updates||[]).forEach(o=>n.parseUpdate(o)),n.resolve()}const Lce=ff(["rule"]),mL=ff(["group","image","rect"]);function Pce(t,n){let e="";return Lce[n]||(t.x2&&(t.x?(mL[n]&&(e+="if(o.x>o.x2)$=o.x,o.x=o.x2,o.x2=$;"),e+="o.width=o.x2-o.x;"):e+="o.x=o.x2-(o.width||0);"),t.xc&&(e+="o.x=o.xc-(o.width||0)/2;"),t.y2&&(t.y?(mL[n]&&(e+="if(o.y>o.y2)$=o.y,o.y=o.y2,o.y2=$;"),e+="o.height=o.y2-o.y;"):e+="o.y=o.y2-(o.height||0);"),t.yc&&(e+="o.y=o.yc-(o.height||0)/2;")),e}function YS(t){return(t+"").toLowerCase()}function Dce(t){return YS(t)==="operator"}function Ice(t){return YS(t)==="collect"}function G1(t,n,e){e[e.length-1]!==";"&&(e="return("+e+");");const o=Function(...n.concat(e));return t&&t.functions?o.bind(t.functions):o}function zce(t,n,e,o){return"((u = ".concat(t,") < (v = ").concat(n,") || u == null) && v != null ? ").concat(e,` + : (u > v || v == null) && u != null ? `).concat(o,` + : ((v = v instanceof Date ? +v : v), (u = u instanceof Date ? +u : u)) !== u && v === v ? `).concat(e,` + : v !== v && u === u ? `).concat(o," : ")}var Rce={operator:(t,n)=>G1(t,["_"],n.code),parameter:(t,n)=>G1(t,["datum","_"],n.code),event:(t,n)=>G1(t,["event"],n.code),handler:(t,n)=>{const e="var datum=event.item&&event.item.datum;return ".concat(n.code,";");return G1(t,["_","event"],e)},encode:(t,n)=>{const{marktype:e,channels:o}=n;let f="var o=item,datum=o.datum,m=0,$;";for(const r in o){const a="o["+oi(r)+"]";f+="$=".concat(o[r].code,";if(").concat(a,"!==$)").concat(a,"=$,m=1;")}return f+=Pce(o,e),f+="return m;",G1(t,["item","_"],f)},codegen:{get(t){const n="[".concat(t.map(oi).join("]["),"]"),e=Function("_","return _".concat(n,";"));return e.path=n,e},comparator(t,n){let e;const o=(r,a)=>{const u=n[a];let c,i;return r.path?(c="a".concat(r.path),i="b".concat(r.path)):((e=e||{})["f"+a]=r,c="this.f".concat(a,"(a)"),i="this.f".concat(a,"(b)")),zce(c,i,-u,u)},f=Function("a","b","var u, v; return "+t.map(o).join("")+"0;");return e?f.bind(e):f}}};function Fce(t){const n=this;Dce(t.type)||!t.type?n.operator(t,t.update?n.operatorExpression(t.update):null):n.transform(t,t.type)}function Nce(t){const n=this;if(t.params){const e=n.get(t.id);e||Pr("Invalid operator id: "+t.id),n.dataflow.connect(e,e.parameters(n.parseParameters(t.params),t.react,t.initonly))}}function Bce(t,n){n=n||{};const e=this;for(const o in t){const f=t[o];n[o]=Ir(f)?f.map(r=>vL(r,e,n)):vL(f,e,n)}return n}function vL(t,n,e){if(!t||!Ei(t))return t;for(let o=0,f=yL.length,r;of&&f.$tupleid?$i:f);return n.fn[e]||(n.fn[e]=EA(o,t.$order,n.expr.codegen))}function $ce(t,n){const e=t.$encode,o={};for(const f in e){const r=e[f];o[f]=Nu(n.encodeExpression(r.$expr),r.$fields),o[f].output=r.$output}return o}function Gce(t,n){return n}function Wce(t,n){const e=t.$subflow;return function(o,f,r){const a=n.fork().parse(e),u=a.get(e.operators[0].id),c=a.signals.parent;return c&&c.set(r),u.detachSubflow=()=>n.detach(a),u}}function Yce(){return $i}function Xce(t){var n=this,e=t.filter!=null?n.eventExpression(t.filter):void 0,o=t.stream!=null?n.get(t.stream):void 0,f;t.source?o=n.events(t.source,t.type,e):t.merge&&(f=t.merge.map(r=>n.get(r)),o=f[0].merge.apply(f[0],f.slice(1))),t.between&&(f=t.between.map(r=>n.get(r)),o=o.between(f[0],f[1])),t.filter&&(o=o.filter(e)),t.throttle!=null&&(o=o.throttle(+t.throttle)),t.debounce!=null&&(o=o.debounce(+t.debounce)),o==null&&Pr("Invalid stream definition: "+JSON.stringify(t)),t.consume&&o.consume(!0),n.stream(t,o)}function Zce(t){var n=this,e=Ei(e=t.source)?e.$ref:e,o=n.get(e),f=null,r=t.update,a=void 0;o||Pr("Source not defined: "+t.source),f=t.target&&t.target.$expr?n.eventExpression(t.target.$expr):n.get(t.target),r&&r.$expr&&(r.$params&&(a=n.parseParameters(r.$params)),r=n.handlerExpression(r.$expr)),n.update(t,o,f,r,a)}const Jce={skip:!0};function Kce(t){var n=this,e={};if(t.signals){var o=e.signals={};Object.keys(n.signals).forEach(r=>{const a=n.signals[r];t.signals(r,a)&&(o[r]=a.value)})}if(t.data){var f=e.data={};Object.keys(n.data).forEach(r=>{const a=n.data[r];t.data(r,a)&&(f[r]=a.input.value)})}return n.subcontext&&t.recurse!==!1&&(e.subcontext=n.subcontext.map(r=>r.getState(t))),e}function Qce(t){var n=this,e=n.dataflow,o=t.data,f=t.signals;Object.keys(f||{}).forEach(r=>{e.update(n.signals[r],f[r],Jce)}),Object.keys(o||{}).forEach(r=>{e.pulse(n.data[r].input,e.changeset().remove(mc).insert(o[r]))}),(t.subcontext||[]).forEach((r,a)=>{const u=n.subcontext[a];u&&u.setState(r)})}function wj(t,n,e,o){return new kj(t,n,e,o)}function kj(t,n,e,o){this.dataflow=t,this.transforms=n,this.events=t.events.bind(t),this.expr=o||Rce,this.signals={},this.scales={},this.nodes={},this.data={},this.fn={},e&&(this.functions=Object.create(e),this.functions.context=this)}function xL(t){this.dataflow=t.dataflow,this.transforms=t.transforms,this.events=t.events,this.expr=t.expr,this.signals=Object.create(t.signals),this.scales=Object.create(t.scales),this.nodes=Object.create(t.nodes),this.data=Object.create(t.data),this.fn=Object.create(t.fn),t.functions&&(this.functions=Object.create(t.functions),this.functions.context=this)}kj.prototype=xL.prototype={fork(){const t=new xL(this);return(this.subcontext||(this.subcontext=[])).push(t),t},detach(t){this.subcontext=this.subcontext.filter(e=>e!==t);const n=Object.keys(t.nodes);for(const e of n)t.nodes[e]._targets=null;for(const e of n)t.nodes[e].detach();t.nodes=null},get(t){return this.nodes[t]},set(t,n){return this.nodes[t]=n},add(t,n){const e=this,o=e.dataflow,f=t.value;if(e.set(t.id,n),Ice(t.type)&&f&&(f.$ingest?o.ingest(n,f.$ingest,f.$format):f.$request?o.preload(n,f.$request,f.$format):o.pulse(n,o.changeset().insert(f))),t.root&&(e.root=n),t.parent){let r=e.get(t.parent.$ref);r?(o.connect(r,[n]),n.targets().add(r)):(e.unresolved=e.unresolved||[]).push(()=>{r=e.get(t.parent.$ref),o.connect(r,[n]),n.targets().add(r)})}if(t.signal&&(e.signals[t.signal]=n),t.scale&&(e.scales[t.scale]=n),t.data)for(const r in t.data){const a=e.data[r]||(e.data[r]={});t.data[r].forEach(u=>a[u]=n)}},resolve(){return(this.unresolved||[]).forEach(t=>t()),delete this.unresolved,this},operator(t,n){this.add(t,this.dataflow.add(t.value,n))},transform(t,n){this.add(t,this.dataflow.add(this.transforms[YS(n)]))},stream(t,n){this.set(t.id,n)},update(t,n,e,o,f){this.dataflow.on(n,e,o,f,t.options)},operatorExpression(t){return this.expr.operator(this,t)},parameterExpression(t){return this.expr.parameter(this,t)},eventExpression(t){return this.expr.event(this,t)},handlerExpression(t){return this.expr.handler(this,t)},encodeExpression(t){return this.expr.encode(this,t)},parse:Oce,parseOperator:Fce,parseOperatorParameters:Nce,parseParameters:Bce,parseStream:Xce,parseUpdate:Zce,getState:Kce,setState:Qce};function efe(t){const n=t.container();n&&(n.setAttribute("role","graphics-document"),n.setAttribute("aria-roleDescription","visualization"),Tj(n,t.description()))}function Tj(t,n){t&&(n==null?t.removeAttribute("aria-label"):t.setAttribute("aria-label",n))}function tfe(t){t.add(null,n=>(t._background=n.bg,t._resize=1,n.bg),{bg:t._signals.background})}const k4="default";function nfe(t){const n=t._signals.cursor||(t._signals.cursor=t.add({user:k4,item:null}));t.on(t.events("view","mousemove"),n,(e,o)=>{const f=n.value,r=f?bi(f)?f:f.user:k4,a=o.item&&o.item.cursor||null;return f&&r===f.user&&a==f.item?f:{user:r,item:a}}),t.add(null,function(e){let o=e.cursor,f=this.value;return bi(o)||(f=o.item,o=o.user),ST(t,o&&o!==k4?o:f||o),f},{cursor:n})}function ST(t,n){const e=t.globalCursor()?typeof document<"u"&&document.body:t.container();if(e)return n==null?e.style.removeProperty("cursor"):e.style.cursor=n}function y2(t,n){var e=t._runtime.data;return qi(e,n)||Pr("Unrecognized data set: "+n),e[n]}function rfe(t,n){return arguments.length<2?y2(this,t).values.value:Vw.call(this,t,$0().remove(mc).insert(n))}function Vw(t,n){yz(n)||Pr("Second argument to changes must be a changeset.");const e=y2(this,t);return e.modified=!0,this.pulse(e.input,n)}function ife(t,n){return Vw.call(this,t,$0().insert(n))}function afe(t,n){return Vw.call(this,t,$0().remove(n))}function Aj(t){var n=t.padding();return Math.max(0,t._viewWidth+n.left+n.right)}function Mj(t){var n=t.padding();return Math.max(0,t._viewHeight+n.top+n.bottom)}function qw(t){var n=t.padding(),e=t._origin;return[n.left+e[0],n.top+e[1]]}function ofe(t){var n=qw(t),e=Aj(t),o=Mj(t);t._renderer.background(t.background()),t._renderer.resize(e,o,n),t._handler.origin(n),t._resizeListeners.forEach(f=>{try{f(e,o)}catch(r){t.error(r)}})}function sfe(t,n,e){var o=t._renderer,f=o&&o.canvas(),r,a,u;return f&&(u=qw(t),a=n.changedTouches?n.changedTouches[0]:n,r=Cw(a,f),r[0]-=u[0],r[1]-=u[1]),n.dataflow=t,n.item=e,n.vega=lfe(t,e,r),n}function lfe(t,n,e){const o=n?n.mark.marktype==="group"?n:n.mark.group:null;function f(a){var u=o,c;if(a){for(c=n;c;c=c.mark.group)if(c.mark.name===a){u=c;break}}return u&&u.mark&&u.mark.interactive?u:{}}function r(a){if(!a)return e;bi(a)&&(a=f(a));const u=e.slice();for(;a;)u[0]-=a.x||0,u[1]-=a.y||0,a=a.mark&&a.mark.group;return u}return{view:$l(t),item:$l(n||{}),group:f,xy:r,x:a=>r(a)[0],y:a=>r(a)[1]}}const bL="view",ufe="timer",cfe="window",ffe={trap:!1};function hfe(t){const n=pa({defaults:{}},t),e=(o,f)=>{f.forEach(r=>{Ir(o[r])&&(o[r]=ff(o[r]))})};return e(n.defaults,["prevent","allow"]),e(n,["view","window","selector"]),n}function Sj(t,n,e,o){t._eventListeners.push({type:e,sources:ki(n),handler:o})}function dfe(t,n){var e=t._eventConfig.defaults,o=e.prevent,f=e.allow;return o===!1||f===!0?!1:o===!0||f===!1?!0:o?o[n]:f?!f[n]:t.preventDefault()}function _b(t,n,e){const o=t._eventConfig&&t._eventConfig[n];return o===!1||Ei(o)&&!o[e]?(t.warn("Blocked ".concat(n," ").concat(e," event listener.")),!1):!0}function pfe(t,n,e){var o=this,f=new iw(e),r=function(i,s){o.runAsync(null,()=>{t===bL&&dfe(o,n)&&i.preventDefault(),f.receive(sfe(o,i,s))})},a;if(t===ufe)_b(o,"timer",n)&&o.timer(r,n);else if(t===bL)_b(o,"view",n)&&o.addEventListener(n,r,ffe);else if(t===cfe?_b(o,"window",n)&&typeof window<"u"&&(a=[window]):typeof document<"u"&&_b(o,"selector",n)&&(a=document.querySelectorAll(t)),!a)o.warn("Can not resolve event source: "+t);else{for(var u=0,c=a.length;u=0;)n[o].stop();for(o=e.length;--o>=0;)for(r=e[o],f=r.sources.length;--f>=0;)r.sources[f].removeEventListener(r.type,r.handler);return t&&t.call(this,this._handler,null,null,null),this}function Ku(t,n,e){const o=document.createElement(t);for(const f in n)o.setAttribute(f,n[f]);return e!=null&&(o.textContent=e),o}const vfe="vega-bind",yfe="vega-bind-name",xfe="vega-bind-radio";function bfe(t,n,e){if(!n)return;const o=e.param;let f=e.state;return f||(f=e.state={elements:null,active:!1,set:null,update:a=>{a!=t.signal(o.signal)&&t.runAsync(null,()=>{f.source=!0,t.signal(o.signal,a)})}},o.debounce&&(f.update=CA(o.debounce,f.update))),(o.input==null&&o.element?_fe:kfe)(f,n,o,t),f.active||(t.on(t._signals[o.signal],null,()=>{f.source?f.source=!1:f.set(t.signal(o.signal))}),f.active=!0),f}function _fe(t,n,e,o){const f=e.event||"input",r=()=>t.update(n.value);o.signal(e.signal,n.value),n.addEventListener(f,r),Sj(o,n,f,r),t.set=a=>{n.value=a,n.dispatchEvent(wfe(f))}}function wfe(t){return typeof Event<"u"?new Event(t):{type:t}}function kfe(t,n,e,o){const f=o.signal(e.signal),r=Ku("div",{class:vfe}),a=e.input==="radio"?r:r.appendChild(Ku("label"));a.appendChild(Ku("span",{class:yfe},e.name||e.signal)),n.appendChild(r);let u=Tfe;switch(e.input){case"checkbox":u=Afe;break;case"select":u=Mfe;break;case"radio":u=Sfe;break;case"range":u=Efe;break}u(t,a,e,f)}function Tfe(t,n,e,o){const f=Ku("input");for(const r in e)r!=="signal"&&r!=="element"&&f.setAttribute(r==="input"?"type":r,e[r]);f.setAttribute("name",e.signal),f.value=o,n.appendChild(f),f.addEventListener("input",()=>t.update(f.value)),t.elements=[f],t.set=r=>f.value=r}function Afe(t,n,e,o){const f={type:"checkbox",name:e.signal};o&&(f.checked=!0);const r=Ku("input",f);n.appendChild(r),r.addEventListener("change",()=>t.update(r.checked)),t.elements=[r],t.set=a=>r.checked=!!a||null}function Mfe(t,n,e,o){const f=Ku("select",{name:e.signal}),r=e.labels||[];e.options.forEach((a,u)=>{const c={value:a};x2(a,o)&&(c.selected=!0),f.appendChild(Ku("option",c,(r[u]||a)+""))}),n.appendChild(f),f.addEventListener("change",()=>{t.update(e.options[f.selectedIndex])}),t.elements=[f],t.set=a=>{for(let u=0,c=e.options.length;u{const c={type:"radio",name:e.signal,value:a};x2(a,o)&&(c.checked=!0);const i=Ku("input",c);i.addEventListener("change",()=>t.update(a));const s=Ku("label",{},(r[u]||a)+"");return s.prepend(i),f.appendChild(s),i}),t.set=a=>{const u=t.elements,c=u.length;for(let i=0;i{c.textContent=u.value,t.update(+u.value)};u.addEventListener("input",i),u.addEventListener("change",i),t.elements=[u],t.set=s=>{u.value=s,c.textContent=s}}function x2(t,n){return t===n||t+""==n+""}function Ej(t,n,e,o,f,r){return n=n||new o(t.loader()),n.initialize(e,Aj(t),Mj(t),qw(t),f,r).background(t.background())}function XS(t,n){return n?function(){try{n.apply(this,arguments)}catch(e){t.error(e)}}:null}function Cfe(t,n,e,o){const f=new o(t.loader(),XS(t,t.tooltip())).scene(t.scenegraph().root).initialize(e,qw(t),t);return n&&n.handlers().forEach(r=>{f.on(r.type,r.handler)}),f}function Ofe(t,n){const e=this,o=e._renderType,f=e._eventConfig.bind,r=Ow(o);t=e._el=t?T4(e,t,!0):null,efe(e),r||e.error("Unrecognized renderer type: "+o);const a=r.handler||Vy,u=t?r.renderer:r.headless;return e._renderer=u?Ej(e,e._renderer,t,u):null,e._handler=Cfe(e,e._handler,t,a),e._redraw=!0,t&&f!=="none"&&(n=n?e._elBind=T4(e,n,!0):t.appendChild(Ku("form",{class:"vega-bindings"})),e._bind.forEach(c=>{c.param.element&&f!=="container"&&(c.element=T4(e,c.param.element,!!c.param.input))}),e._bind.forEach(c=>{bfe(e,c.element||n,c)})),e}function T4(t,n,e){if(typeof n=="string")if(typeof document<"u"){if(n=document.querySelector(n),!n)return t.error("Signal bind element not found: "+n),null}else return t.error("DOM document instance not found."),null;if(n&&e)try{n.textContent=""}catch(o){n=null,t.error(o)}return n}const W1=t=>+t||0,Lfe=t=>({top:t,bottom:t,left:t,right:t});function TL(t){return Ei(t)?{top:W1(t.top),bottom:W1(t.bottom),left:W1(t.left),right:W1(t.right)}:Lfe(W1(t))}async function ZS(t,n,e,o){const f=Ow(n),r=f&&f.headless;return r||Pr("Unrecognized renderer type: "+n),await t.runAsync(),Ej(t,null,null,r,e,o).renderAsync(t._scenegraph.root)}async function Pfe(t,n){t!==Dd.Canvas&&t!==Dd.SVG&&t!==Dd.PNG&&Pr("Unrecognized image type: "+t);const e=await ZS(this,t,n);return t===Dd.SVG?Dfe(e.svg(),"image/svg+xml"):e.canvas().toDataURL("image/png")}function Dfe(t,n){const e=new Blob([t],{type:n});return window.URL.createObjectURL(e)}async function Ife(t,n){return(await ZS(this,Dd.Canvas,t,n)).canvas()}async function zfe(t){return(await ZS(this,Dd.SVG,t)).svg()}function Rfe(t,n,e){return wj(t,cm,sy,e).parse(n)}function Ffe(t){var n=this._runtime.scales;return qi(n,t)||Pr("Unrecognized scale or projection: "+t),n[t].value}var Cj="width",Oj="height",JS="padding",AL={skip:!0};function Lj(t,n){var e=t.autosize(),o=t.padding();return n-(e&&e.contains===JS?o.left+o.right:0)}function Pj(t,n){var e=t.autosize(),o=t.padding();return n-(e&&e.contains===JS?o.top+o.bottom:0)}function Nfe(t){var n=t._signals,e=n[Cj],o=n[Oj],f=n[JS];function r(){t._autosize=t._resize=1}t._resizeWidth=t.add(null,u=>{t._width=u.size,t._viewWidth=Lj(t,u.size),r()},{size:e}),t._resizeHeight=t.add(null,u=>{t._height=u.size,t._viewHeight=Pj(t,u.size),r()},{size:o});const a=t.add(null,r,{pad:f});t._resizeWidth.rank=e.rank+1,t._resizeHeight.rank=o.rank+1,a.rank=f.rank+1}function Bfe(t,n,e,o,f,r){this.runAfter(a=>{let u=0;a._autosize=0,a.width()!==e&&(u=1,a.signal(Cj,e,AL),a._resizeWidth.skip(!0)),a.height()!==o&&(u=1,a.signal(Oj,o,AL),a._resizeHeight.skip(!0)),a._viewWidth!==t&&(a._resize=1,a._viewWidth=t),a._viewHeight!==n&&(a._resize=1,a._viewHeight=n),(a._origin[0]!==f[0]||a._origin[1]!==f[1])&&(a._resize=1,a._origin=f),u&&a.run("enter"),r&&a.runAfter(c=>c.resize())},!1,1)}function jfe(t){return this._runtime.getState(t||{data:Ufe,signals:Vfe,recurse:!0})}function Ufe(t,n){return n.modified&&Ir(n.input.value)&&t.indexOf("_:vega:_")}function Vfe(t,n){return!(t==="parent"||n instanceof cm.proxy)}function qfe(t){return this.runAsync(null,n=>{n._trigger=!1,n._runtime.setState(t)},n=>{n._trigger=!0}),this}function Hfe(t,n){function e(o){t({timestamp:Date.now(),elapsed:o})}this._timers.push(kae(e,n))}function $fe(t,n,e,o){const f=t.element();f&&f.setAttribute("title",Gfe(o))}function Gfe(t){return t==null?"":Ir(t)?Dj(t):Ei(t)&&!Nd(t)?Wfe(t):t+""}function Wfe(t){return Object.keys(t).map(n=>{const e=t[n];return n+": "+(Ir(e)?Dj(e):Ij(e))}).join(` +`)}function Dj(t){return"["+t.map(Ij).join(", ")+"]"}function Ij(t){return Ir(t)?"[\u2026]":Ei(t)&&!Nd(t)?"{\u2026}":t}function zj(t,n){const e=this;if(n=n||{},Qg.call(e),n.loader&&e.loader(n.loader),n.logger&&e.logger(n.logger),n.logLevel!=null&&e.logLevel(n.logLevel),n.locale||t.locale){const r=pa({},t.locale,n.locale);e.locale(lz(r.number,r.time))}e._el=null,e._elBind=null,e._renderType=n.renderer||Dd.Canvas,e._scenegraph=new LM;const o=e._scenegraph.root;e._renderer=null,e._tooltip=n.tooltip||$fe,e._redraw=!0,e._handler=new Vy().scene(o),e._globalCursor=!1,e._preventDefault=!1,e._timers=[],e._eventListeners=[],e._resizeListeners=[],e._eventConfig=hfe(t.eventConfig),e.globalCursor(e._eventConfig.globalCursor);const f=Rfe(e,t,n.expr);e._runtime=f,e._signals=f.signals,e._bind=(t.bindings||[]).map(r=>({state:null,param:pa({},r)})),f.root&&f.root.set(o),o.source=f.data.root.input,e.pulse(f.data.root.input,e.changeset().insert(o.items)),e._width=e.width(),e._height=e.height(),e._viewWidth=Lj(e,e._width),e._viewHeight=Pj(e,e._height),e._origin=[0,0],e._resize=0,e._autosize=1,Nfe(e),tfe(e),nfe(e),e.description(t.description),n.hover&&e.hover(),n.container&&e.initialize(n.container,n.bind)}function wb(t,n){return qi(t._signals,n)?t._signals[n]:Pr("Unrecognized signal name: "+oi(n))}function Rj(t,n){const e=(t._targets||[]).filter(o=>o._update&&o._update.handler===n);return e.length?e[0]:null}function ML(t,n,e,o){let f=Rj(e,o);return f||(f=XS(t,()=>o(n,e.value)),f.handler=o,t.on(e,null,f)),t}function SL(t,n,e){const o=Rj(n,e);return o&&n._targets.remove(o),t}ni(zj,Qg,{async evaluate(t,n,e){if(await Qg.prototype.evaluate.call(this,t,n),this._redraw||this._resize)try{this._renderer&&(this._resize&&(this._resize=0,ofe(this)),await this._renderer.renderAsync(this._scenegraph.root)),this._redraw=!1}catch(o){this.error(o)}return e&&jb(this,e),this},dirty(t){this._redraw=!0,this._renderer&&this._renderer.dirty(t)},description(t){if(arguments.length){const n=t!=null?t+"":null;return n!==this._desc&&Tj(this._el,this._desc=n),this}return this._desc},container(){return this._el},scenegraph(){return this._scenegraph},origin(){return this._origin.slice()},signal(t,n,e){const o=wb(this,t);return arguments.length===1?o.value:this.update(o,n,e)},width(t){return arguments.length?this.signal("width",t):this.signal("width")},height(t){return arguments.length?this.signal("height",t):this.signal("height")},padding(t){return arguments.length?this.signal("padding",TL(t)):TL(this.signal("padding"))},autosize(t){return arguments.length?this.signal("autosize",t):this.signal("autosize")},background(t){return arguments.length?this.signal("background",t):this.signal("background")},renderer(t){return arguments.length?(Ow(t)||Pr("Unrecognized renderer type: "+t),t!==this._renderType&&(this._renderType=t,this._resetRenderer()),this):this._renderType},tooltip(t){return arguments.length?(t!==this._tooltip&&(this._tooltip=t,this._resetRenderer()),this):this._tooltip},loader(t){return arguments.length?(t!==this._loader&&(Qg.prototype.loader.call(this,t),this._resetRenderer()),this):this._loader},resize(){return this._autosize=1,this.touch(wb(this,"autosize"))},_resetRenderer(){this._renderer&&(this._renderer=null,this.initialize(this._el,this._elBind))},_resizeView:Bfe,addEventListener(t,n,e){let o=n;return e&&e.trap===!1||(o=XS(this,n),o.raw=n),this._handler.on(t,o),this},removeEventListener(t,n){for(var e=this._handler.handlers(t),o=e.length,f,r;--o>=0;)if(r=e[o].type,f=e[o].handler,t===r&&(n===f||n===f.raw)){this._handler.off(r,f);break}return this},addResizeListener(t){const n=this._resizeListeners;return n.indexOf(t)<0&&n.push(t),this},removeResizeListener(t){var n=this._resizeListeners,e=n.indexOf(t);return e>=0&&n.splice(e,1),this},addSignalListener(t,n){return ML(this,t,wb(this,t),n)},removeSignalListener(t,n){return SL(this,wb(this,t),n)},addDataListener(t,n){return ML(this,t,y2(this,t).values,n)},removeDataListener(t,n){return SL(this,y2(this,t).values,n)},globalCursor(t){if(arguments.length){if(this._globalCursor!==!!t){const n=ST(this,null);this._globalCursor=!!t,n&&ST(this,n)}return this}else return this._globalCursor},preventDefault(t){return arguments.length?(this._preventDefault=t,this):this._preventDefault},timer:Hfe,events:pfe,finalize:mfe,hover:gfe,data:rfe,change:Vw,insert:ife,remove:afe,scale:Ffe,initialize:Ofe,toImageURL:Pfe,toCanvas:Ife,toSVG:zfe,getState:jfe,setState:qfe});const Yfe="view",b2="[",_2="]",Fj="{",Nj="}",Xfe=":",Bj=",",Zfe="@",Jfe=">",Kfe=/[[\]{}]/,Qfe={"*":1,arc:1,area:1,group:1,image:1,line:1,path:1,rect:1,rule:1,shape:1,symbol:1,text:1,trail:1};let jj,Uj;function pp(t,n,e){return jj=n||Yfe,Uj=e||Qfe,Vj(t.trim()).map(ET)}function ehe(t){return Uj[t]}function Fv(t,n,e,o,f){const r=t.length;let a=0,u;for(;n=0?--a:o&&o.indexOf(u)>=0&&++a}return n}function Vj(t){const n=[],e=t.length;let o=0,f=0;for(;f' after between selector: "+t;o=o.map(ET);const f=ET(t.slice(1).trim());return f.between?{between:o,stream:f}:(f.between=o,f)}function nhe(t){const n={source:jj},e=[];let o=[0,0],f=0,r=0,a=t.length,u=0,c,i;if(t[a-1]===Nj){if(u=t.lastIndexOf(Fj),u>=0){try{o=rhe(t.substring(u+1,a-1))}catch{throw"Invalid throttle specification: "+t}t=t.slice(0,u).trim(),a=t.length}else throw"Unmatched right brace: "+t;u=0}if(!a)throw t;if(t[0]===Zfe&&(f=++u),c=Fv(t,u,Xfe),c1?(n.type=e[1],f?n.markname=e[0].slice(1):ehe(e[0])?n.marktype=e[0]:n.source=e[0]):n.type=e[0],n.type.slice(-1)==="!"&&(n.consume=!0,n.type=n.type.slice(0,-1)),i!=null&&(n.filter=i),o[0]&&(n.throttle=o[0]),o[1]&&(n.debounce=o[1]),n}function rhe(t){const n=t.split(Bj);if(!t.length||n.length>2)throw t;return n.map(e=>{const o=+e;if(o!==o)throw t;return o})}function ihe(t){return Ei(t)?t:{type:t||"pad"}}const Y1=t=>+t||0,ahe=t=>({top:t,bottom:t,left:t,right:t});function ohe(t){return Ei(t)?t.signal?t:{top:Y1(t.top),bottom:Y1(t.bottom),left:Y1(t.left),right:Y1(t.right)}:ahe(Y1(t))}const il=t=>Ei(t)&&!Ir(t)?pa({},t):{value:t};function EL(t,n,e,o){return e!=null?(Ei(e)&&!Ir(e)||Ir(e)&&e.length&&Ei(e[0])?t.update[n]=e:t[o||"enter"][n]={value:e},1):0}function kl(t,n,e){for(const o in n)EL(t,o,n[o]);for(const o in e)EL(t,o,e[o],"update")}function Jm(t,n,e){for(const o in n)e&&qi(e,o)||(t[o]=pa(t[o]||{},n[o]));return t}function $g(t,n){return n&&(n.enter&&n.enter[t]||n.update&&n.update[t])}const KS="mark",QS="frame",eE="scope",she="axis",lhe="axis-domain",uhe="axis-grid",che="axis-label",fhe="axis-tick",hhe="axis-title",dhe="legend",phe="legend-band",ghe="legend-entry",mhe="legend-gradient",qj="legend-label",vhe="legend-symbol",yhe="legend-title",xhe="title",bhe="title-text",_he="title-subtitle";function whe(t,n,e,o,f){const r={},a={};let u,c,i,s;c="lineBreak",n==="text"&&f[c]!=null&&!$g(c,t)&&A4(r,c,f[c]),(e=="legend"||String(e).startsWith("axis"))&&(e=null),s=e===QS?f.group:e===KS?pa({},f.mark,f[n]):null;for(c in s)i=$g(c,t)||(c==="fill"||c==="stroke")&&($g("fill",t)||$g("stroke",t)),i||A4(r,c,s[c]);ki(o).forEach(l=>{const d=f.style&&f.style[l];for(const h in d)$g(h,t)||A4(r,h,d[h])}),t=pa({},t);for(c in r)s=r[c],s.signal?(u=u||{})[c]=s:a[c]=s;return t.enter=pa(a,t.enter),u&&(t.update=pa(u,t.update)),t}function A4(t,n,e){t[n]=e&&e.signal?{signal:e.signal}:{value:e}}const Hj=t=>bi(t)?oi(t):t.signal?`(${t.signal})`:$j(t);function Hw(t){if(t.gradient!=null)return The(t);let n=t.signal?`(${t.signal})`:t.color?khe(t.color):t.field!=null?$j(t.field):t.value!==void 0?oi(t.value):void 0;return t.scale!=null&&(n=Ahe(t,n)),n===void 0&&(n=null),t.exponent!=null&&(n=`pow(${n},${r_(t.exponent)})`),t.mult!=null&&(n+=`*${r_(t.mult)}`),t.offset!=null&&(n+=`+${r_(t.offset)}`),t.round&&(n=`round(${n})`),n}const kb=(t,n,e,o)=>`(${t}(${[n,e,o].map(Hw).join(",")})+'')`;function khe(t){return t.c?kb("hcl",t.h,t.c,t.l):t.h||t.s?kb("hsl",t.h,t.s,t.l):t.l||t.a?kb("lab",t.l,t.a,t.b):t.r||t.g||t.b?kb("rgb",t.r,t.g,t.b):null}function The(t){const n=[t.start,t.stop,t.count].map(e=>e==null?null:oi(e));for(;n.length&&Na(n)==null;)n.pop();return n.unshift(Hj(t.gradient)),`gradient(${n.join(",")})`}function r_(t){return Ei(t)?"("+Hw(t)+")":t}function $j(t){return Gj(Ei(t)?t:{datum:t})}function Gj(t){let n,e,o;if(t.signal)n="datum",o=t.signal;else if(t.group||t.parent){for(e=Math.max(1,t.level||1),n="item";e-- >0;)n+=".mark.group";t.parent?(o=t.parent,n+=".datum"):o=t.group}else t.datum?(n="datum",o=t.datum):Pr("Invalid field reference: "+oi(t));return t.signal||(o=bi(o)?ih(o).map(oi).join("]["):Gj(o)),n+"["+o+"]"}function Ahe(t,n){const e=Hj(t.scale);return t.range!=null?n=`lerp(_range(${e}), ${+t.range})`:(n!==void 0&&(n=`_scale(${e}, ${n})`),t.band&&(n=(n?n+"+":"")+`_bandwidth(${e})`+(+t.band==1?"":"*"+r_(t.band)),t.extra&&(n=`(datum.extra ? _scale(${e}, datum.extra.value) : ${n})`)),n==null&&(n="0")),n}function Mhe(t){let n="";return t.forEach(e=>{const o=Hw(e);n+=e.test?`(${e.test})?${o}:`:o}),Na(n)===":"&&(n+="null"),n}function Wj(t,n,e,o,f,r){const a={};r=r||{},r.encoders={$encode:a},t=whe(t,n,e,o,f.config);for(const u in t)a[u]=She(t[u],n,r,f);return r}function She(t,n,e,o){const f={},r={};for(const a in t)t[a]!=null&&(f[a]=Che(Ehe(t[a]),o,e,r));return{$expr:{marktype:n,channels:f},$fields:Object.keys(r),$output:Object.keys(t)}}function Ehe(t){return Ir(t)?Mhe(t):Hw(t)}function Che(t,n,e,o){const f=Qf(t,n);return f.$fields.forEach(r=>o[r]=1),pa(e,f.$params),f.$expr}const Ohe="outer",Lhe=["value","update","init","react","bind"];function CL(t,n){Pr(t+' for "outer" push: '+oi(n))}function Yj(t,n){const e=t.name;if(t.push===Ohe)n.signals[e]||CL("No prior signal definition",e),Lhe.forEach(o=>{t[o]!==void 0&&CL("Invalid property ",o)});else{const o=n.addSignal(e,t.value);t.react===!1&&(o.react=!1),t.bind&&n.addBinding(e,t.bind)}}function CT(t,n,e,o){this.id=-1,this.type=t,this.value=n,this.params=e,o&&(this.parent=o)}function $w(t,n,e,o){return new CT(t,n,e,o)}function w2(t,n){return $w("operator",t,n)}function Hi(t){const n={$ref:t.id};return t.id<0&&(t.refs=t.refs||[]).push(n),n}function ly(t,n){return n?{$field:t,$name:n}:{$field:t}}const OT=ly("key");function OL(t,n){return{$compare:t,$order:n}}function Phe(t,n){const e={$key:t};return n&&(e.$flat=!0),e}const Dhe="ascending",Ihe="descending";function zhe(t){return Ei(t)?(t.order===Ihe?"-":"+")+Gw(t.op,t.field):""}function Gw(t,n){return(t&&t.signal?"$"+t.signal:t||"")+(t&&n?"_":"")+(n&&n.signal?"$"+n.signal:n||"")}const tE="scope",LT="view";function Ys(t){return t&&t.signal}function Rhe(t){return t&&t.expr}function i_(t){if(Ys(t))return!0;if(Ei(t)){for(const n in t)if(i_(t[n]))return!0}return!1}function Wc(t,n){return t??n}function m0(t){return t&&t.signal||t}const LL="timer";function uy(t,n){return(t.merge?Nhe:t.stream?Bhe:t.type?jhe:Pr("Invalid stream specification: "+oi(t)))(t,n)}function Fhe(t){return t===tE?LT:t||LT}function Nhe(t,n){const e=t.merge.map(f=>uy(f,n)),o=nE({merge:e},t,n);return n.addStream(o).id}function Bhe(t,n){const e=uy(t.stream,n),o=nE({stream:e},t,n);return n.addStream(o).id}function jhe(t,n){let e;t.type===LL?(e=n.event(LL,t.throttle),t={between:t.between,filter:t.filter}):e=n.event(Fhe(t.source),t.type);const o=nE({stream:e},t,n);return Object.keys(o).length===1?e:n.addStream(o).id}function nE(t,n,e){let o=n.between;return o&&(o.length!==2&&Pr('Stream "between" parameter must have 2 entries: '+oi(n)),t.between=[uy(o[0],e),uy(o[1],e)]),o=n.filter?[].concat(n.filter):[],(n.marktype||n.markname||n.markrole)&&o.push(Uhe(n.marktype,n.markname,n.markrole)),n.source===tE&&o.push("inScope(event.item)"),o.length&&(t.filter=Qf("("+o.join(")&&(")+")",e).$expr),(o=n.throttle)!=null&&(t.throttle=+o),(o=n.debounce)!=null&&(t.debounce=+o),n.consume&&(t.consume=!0),t}function Uhe(t,n,e){const o="event.item";return o+(t&&t!=="*"?"&&"+o+".mark.marktype==='"+t+"'":"")+(e?"&&"+o+".mark.role==='"+e+"'":"")+(n?"&&"+o+".mark.name==='"+n+"'":"")}const Vhe={code:"_.$value",ast:{type:"Identifier",value:"value"}};function qhe(t,n,e){const o=t.encode,f={target:e};let r=t.events,a=t.update,u=[];r||Pr("Signal update missing events specification."),bi(r)&&(r=pp(r,n.isSubscope()?tE:LT)),r=ki(r).filter(c=>c.signal||c.scale?(u.push(c),0):1),u.length>1&&(u=[$he(u)]),r.length&&u.push(r.length>1?{merge:r}:r[0]),o!=null&&(a&&Pr("Signal encode and update are mutually exclusive."),a="encode(item(),"+oi(o)+")"),f.update=bi(a)?Qf(a,n):a.expr!=null?Qf(a.expr,n):a.value!=null?a.value:a.signal!=null?{$expr:Vhe,$params:{$value:n.signalRef(a.signal)}}:Pr("Invalid signal update specification."),t.force&&(f.options={force:!0}),u.forEach(c=>n.addUpdate(pa(Hhe(c,n),f)))}function Hhe(t,n){return{source:t.signal?n.signalRef(t.signal):t.scale?n.scaleRef(t.scale):uy(t,n)}}function $he(t){return{signal:"["+t.map(n=>n.scale?'scale("'+n.scale+'")':n.signal)+"]"}}function Ghe(t,n){const e=n.getSignal(t.name);let o=t.update;t.init&&(o?Pr("Signals can not include both init and update expressions."):(o=t.init,e.initonly=!0)),o&&(o=Qf(o,n),e.update=o.$expr,e.params=o.$params),t.on&&t.on.forEach(f=>qhe(f,n,e.id))}const ko=t=>(n,e,o)=>$w(t,e,n||void 0,o),Xj=ko("aggregate"),Whe=ko("axisticks"),Zj=ko("bound"),mf=ko("collect"),PL=ko("compare"),Yhe=ko("datajoin"),Jj=ko("encode"),Xhe=ko("expression"),Zhe=ko("facet"),Jhe=ko("field"),Khe=ko("key"),Qhe=ko("legendentries"),ede=ko("load"),tde=ko("mark"),nde=ko("multiextent"),rde=ko("multivalues"),ide=ko("overlap"),ade=ko("params"),Kj=ko("prefacet"),ode=ko("projection"),sde=ko("proxy"),lde=ko("relay"),Qj=ko("render"),ude=ko("scale"),Y0=ko("sieve"),cde=ko("sortitems"),eU=ko("viewlayout"),fde=ko("values");let hde=0;const tU={min:"min",max:"max",count:"sum"};function dde(t,n){const e=t.type||"linear";JR(e)||Pr("Unrecognized scale type: "+oi(e)),n.addScale(t.name,{type:e,domain:void 0})}function pde(t,n){const e=n.getScale(t.name).params;let o;e.domain=nU(t.domain,t,n),t.range!=null&&(e.range=iU(t,n,e)),t.interpolate!=null&&Tde(t.interpolate,e),t.nice!=null&&(e.nice=kde(t.nice)),t.bins!=null&&(e.bins=wde(t.bins,n));for(o in t)qi(e,o)||o==="name"||(e[o]=hc(t[o],n))}function hc(t,n){return Ei(t)?t.signal?n.signalRef(t.signal):Pr("Unsupported object: "+oi(t)):t}function a_(t,n){return t.signal?n.signalRef(t.signal):t.map(e=>hc(e,n))}function Ww(t){Pr("Can not find data set: "+oi(t))}function nU(t,n,e){if(!t){(n.domainMin!=null||n.domainMax!=null)&&Pr("No scale domain defined for domainMin/domainMax to override.");return}return t.signal?e.signalRef(t.signal):(Ir(t)?gde:t.fields?vde:mde)(t,n,e)}function gde(t,n,e){return t.map(o=>hc(o,e))}function mde(t,n,e){const o=e.getData(t.data);return o||Ww(t.data),pm(n.type)?o.valuesRef(e,t.field,rU(t.sort,!1)):eF(n.type)?o.domainRef(e,t.field):o.extentRef(e,t.field)}function vde(t,n,e){const o=t.data,f=t.fields.reduce((r,a)=>(a=bi(a)?{data:o,field:a}:Ir(a)||a.signal?yde(a,e):a,r.push(a),r),[]);return(pm(n.type)?xde:eF(n.type)?bde:_de)(t,e,f)}function yde(t,n){const e="_:vega:_"+hde++,o=mf({});if(Ir(t))o.value={$ingest:t};else if(t.signal){const f="setdata("+oi(e)+","+t.signal+")";o.params.input=n.signalRef(f)}return n.addDataPipeline(e,[o,Y0({})]),{data:e,field:"data"}}function xde(t,n,e){const o=rU(t.sort,!0);let f,r;const a=e.map(i=>{const s=n.getData(i.data);return s||Ww(i.data),s.countsRef(n,i.field,o)}),u={groupby:OT,pulse:a};o&&(f=o.op||"count",r=o.field?Gw(f,o.field):"count",u.ops=[tU[f]],u.fields=[n.fieldRef(r)],u.as=[r]),f=n.add(Xj(u));const c=n.add(mf({pulse:Hi(f)}));return r=n.add(fde({field:OT,sort:n.sortRef(o),pulse:Hi(c)})),Hi(r)}function rU(t,n){return t&&(!t.field&&!t.op?Ei(t)?t.field="key":t={field:"key"}:!t.field&&t.op!=="count"?Pr("No field provided for sort aggregate op: "+t.op):n&&t.field&&t.op&&!tU[t.op]&&Pr("Multiple domain scales can not be sorted using "+t.op)),t}function bde(t,n,e){const o=e.map(f=>{const r=n.getData(f.data);return r||Ww(f.data),r.domainRef(n,f.field)});return Hi(n.add(rde({values:o})))}function _de(t,n,e){const o=e.map(f=>{const r=n.getData(f.data);return r||Ww(f.data),r.extentRef(n,f.field)});return Hi(n.add(nde({extents:o})))}function wde(t,n){return t.signal||Ir(t)?a_(t,n):n.objectProperty(t)}function kde(t){return Ei(t)?{interval:hc(t.interval),step:hc(t.step)}:hc(t)}function Tde(t,n){n.interpolate=hc(t.type||t),t.gamma!=null&&(n.interpolateGamma=hc(t.gamma))}function iU(t,n,e){const o=n.config.range;let f=t.range;if(f.signal)return n.signalRef(f.signal);if(bi(f)){if(o&&qi(o,f))return t=pa({},t,{range:o[f]}),iU(t,n,e);f==="width"?f=[0,{signal:"width"}]:f==="height"?f=pm(t.type)?[0,{signal:"height"}]:[{signal:"height"},0]:Pr("Unrecognized scale range value: "+oi(f))}else if(f.scheme){e.scheme=Ir(f.scheme)?a_(f.scheme,n):hc(f.scheme,n),f.extent&&(e.schemeExtent=a_(f.extent,n)),f.count&&(e.schemeCount=hc(f.count,n));return}else if(f.step){e.rangeStep=hc(f.step,n);return}else{if(pm(t.type)&&!Ir(f))return nU(f,t,n);Ir(f)||Pr("Unsupported range type: "+oi(f))}return f.map(r=>(Ir(r)?a_:hc)(r,n))}function Ade(t,n){const e=n.config.projection||{},o={};for(const f in t)f!=="name"&&(o[f]=PT(t[f],f,n));for(const f in e)o[f]==null&&(o[f]=PT(e[f],f,n));n.addProjection(t.name,o)}function PT(t,n,e){return Ir(t)?t.map(o=>PT(o,n,e)):Ei(t)?t.signal?e.signalRef(t.signal):n==="fit"?t:Pr("Unsupported parameter object: "+oi(t)):t}const vf="top",Km="left",Qm="right",np="bottom",aU="center",Mde="vertical",Sde="start",Ede="middle",Cde="end",DT="index",rE="label",Ode="offset",Tm="perc",Lde="perc2",pc="value",Jy="guide-label",iE="guide-title",Pde="group-title",Dde="group-subtitle",DL="symbol",o_="gradient",IT="discrete",zT="size",Ide="shape",zde="fill",Rde="stroke",Fde="strokeWidth",Nde="strokeDash",Bde="opacity",aE=[zT,Ide,zde,Rde,Fde,Nde,Bde],Ky={name:1,style:1,interactive:1},Ua={value:0},gc={value:1},Yw="group",oU="rect",oE="rule",jde="symbol",X0="text";function cy(t){return t.type=Yw,t.interactive=t.interactive||!1,t}function Bu(t,n){const e=(o,f)=>Wc(t[o],Wc(n[o],f));return e.isVertical=o=>Mde===Wc(t.direction,n.direction||(o?n.symbolDirection:n.gradientDirection)),e.gradientLength=()=>Wc(t.gradientLength,n.gradientLength||n.gradientWidth),e.gradientThickness=()=>Wc(t.gradientThickness,n.gradientThickness||n.gradientHeight),e.entryColumns=()=>Wc(t.columns,Wc(n.columns,+e.isVertical(!0))),e}function sU(t,n){const e=n&&(n.update&&n.update[t]||n.enter&&n.enter[t]);return e&&e.signal?e:e?e.value:null}function Ude(t,n,e){const o=n.config.style[e];return o&&o[t]}function Xw(t,n,e){return`item.anchor === '${Sde}' ? ${t} : item.anchor === '${Cde}' ? ${n} : ${e}`}const sE=Xw(oi(Km),oi(Qm),oi(aU));function Vde(t){const n=t("tickBand");let e=t("tickOffset"),o,f;return n?n.signal?(o={signal:`(${n.signal}) === 'extent' ? 1 : 0.5`},f={signal:`(${n.signal}) === 'extent'`},Ei(e)||(e={signal:`(${n.signal}) === 'extent' ? 0 : ${e}`})):n==="extent"?(o=1,f=!0,e=0):(o=.5,f=!1):(o=t("bandPosition"),f=t("tickExtra")),{extra:f,band:o,offset:e}}function lU(t,n){return n?t?Ei(t)?Object.assign({},t,{offset:lU(t.offset,n)}):{value:t,offset:n}:n:t}function nc(t,n){return n?(t.name=n.name,t.style=n.style||t.style,t.interactive=!!n.interactive,t.encode=Jm(t.encode,n,Ky)):t.interactive=!1,t}function qde(t,n,e,o){const f=Bu(t,e),r=f.isVertical(),a=f.gradientThickness(),u=f.gradientLength();let c,i,s,l,d;r?(i=[0,1],s=[0,0],l=a,d=u):(i=[0,0],s=[1,0],l=u,d=a);const h={enter:c={opacity:Ua,x:Ua,y:Ua,width:il(l),height:il(d)},update:pa({},c,{opacity:gc,fill:{gradient:n,start:i,stop:s}}),exit:{opacity:Ua}};return kl(h,{stroke:f("gradientStrokeColor"),strokeWidth:f("gradientStrokeWidth")},{opacity:f("gradientOpacity")}),nc({type:oU,role:mhe,encode:h},o)}function Hde(t,n,e,o,f){const r=Bu(t,e),a=r.isVertical(),u=r.gradientThickness(),c=r.gradientLength();let i,s,l,d,h="";a?(i="y",l="y2",s="x",d="width",h="1-"):(i="x",l="x2",s="y",d="height");const m={opacity:Ua,fill:{scale:n,field:pc}};m[i]={signal:h+"datum."+Tm,mult:c},m[s]=Ua,m[l]={signal:h+"datum."+Lde,mult:c},m[d]=il(u);const g={enter:m,update:pa({},m,{opacity:gc}),exit:{opacity:Ua}};return kl(g,{stroke:r("gradientStrokeColor"),strokeWidth:r("gradientStrokeWidth")},{opacity:r("gradientOpacity")}),nc({type:oU,role:phe,key:pc,from:f,encode:g},o)}const $de=`datum.${Tm}<=0?"${Km}":datum.${Tm}>=1?"${Qm}":"${aU}"`,Gde=`datum.${Tm}<=0?"${np}":datum.${Tm}>=1?"${vf}":"${Ede}"`;function IL(t,n,e,o){const f=Bu(t,n),r=f.isVertical(),a=il(f.gradientThickness()),u=f.gradientLength();let c=f("labelOverlap"),i,s,l,d,h="";const m={enter:i={opacity:Ua},update:s={opacity:gc,text:{field:rE}},exit:{opacity:Ua}};return kl(m,{fill:f("labelColor"),fillOpacity:f("labelOpacity"),font:f("labelFont"),fontSize:f("labelFontSize"),fontStyle:f("labelFontStyle"),fontWeight:f("labelFontWeight"),limit:Wc(t.labelLimit,n.gradientLabelLimit)}),r?(i.align={value:"left"},i.baseline=s.baseline={signal:Gde},l="y",d="x",h="1-"):(i.align=s.align={signal:$de},i.baseline={value:"top"},l="x",d="y"),i[l]=s[l]={signal:h+"datum."+Tm,mult:u},i[d]=s[d]=a,a.offset=Wc(t.labelOffset,n.gradientLabelOffset)||0,c=c?{separation:f("labelSeparation"),method:c,order:"datum."+DT}:void 0,nc({type:X0,role:qj,style:Jy,key:pc,from:o,encode:m,overlap:c},e)}function Wde(t,n,e,o,f){const r=Bu(t,n),a=e.entries,u=!!(a&&a.interactive),c=a?a.name:void 0,i=r("clipHeight"),s=r("symbolOffset"),l={data:"value"},d=`(${f}) ? datum.${Ode} : datum.${zT}`,h=i?il(i):{field:zT},m=`datum.${DT}`,g=`max(1, ${f})`;let p,v,y,x,w;h.mult=.5,p={enter:v={opacity:Ua,x:{signal:d,mult:.5,offset:s},y:h},update:y={opacity:gc,x:v.x,y:v.y},exit:{opacity:Ua}};let k=null,b=null;t.fill||(k=n.symbolBaseFillColor,b=n.symbolBaseStrokeColor),kl(p,{fill:r("symbolFillColor",k),shape:r("symbolType"),size:r("symbolSize"),stroke:r("symbolStrokeColor",b),strokeDash:r("symbolDash"),strokeDashOffset:r("symbolDashOffset"),strokeWidth:r("symbolStrokeWidth")},{opacity:r("symbolOpacity")}),aE.forEach(A=>{t[A]&&(y[A]=v[A]={scale:t[A],field:pc})});const T=nc({type:jde,role:vhe,key:pc,from:l,clip:i?!0:void 0,encode:p},e.symbols),_=il(s);_.offset=r("labelOffset"),p={enter:v={opacity:Ua,x:{signal:d,offset:_},y:h},update:y={opacity:gc,text:{field:rE},x:v.x,y:v.y},exit:{opacity:Ua}},kl(p,{align:r("labelAlign"),baseline:r("labelBaseline"),fill:r("labelColor"),fillOpacity:r("labelOpacity"),font:r("labelFont"),fontSize:r("labelFontSize"),fontStyle:r("labelFontStyle"),fontWeight:r("labelFontWeight"),limit:r("labelLimit")});const M=nc({type:X0,role:qj,style:Jy,key:pc,from:l,encode:p},e.labels);return p={enter:{noBound:{value:!i},width:Ua,height:i?il(i):Ua,opacity:Ua},exit:{opacity:Ua},update:y={opacity:gc,row:{signal:null},column:{signal:null}}},r.isVertical(!0)?(x=`ceil(item.mark.items.length / ${g})`,y.row.signal=`${m}%${x}`,y.column.signal=`floor(${m} / ${x})`,w={field:["row",m]}):(y.row.signal=`floor(${m} / ${g})`,y.column.signal=`${m} % ${g}`,w={field:m}),y.column.signal=`(${f})?${y.column.signal}:${m}`,o={facet:{data:o,name:"value",groupby:DT}},cy({role:eE,from:o,encode:Jm(p,a,Ky),marks:[T,M],name:c,interactive:u,sort:w})}function Yde(t,n){const e=Bu(t,n);return{align:e("gridAlign"),columns:e.entryColumns(),center:{row:!0,column:!1},padding:{row:e("rowPadding"),column:e("columnPadding")}}}const lE='item.orient === "left"',uE='item.orient === "right"',Zw=`(${lE} || ${uE})`,Xde=`datum.vgrad && ${Zw}`,Zde=Xw('"top"','"bottom"','"middle"'),Jde=Xw('"right"','"left"','"center"'),Kde=`datum.vgrad && ${uE} ? (${Jde}) : (${Zw} && !(datum.vgrad && ${lE})) ? "left" : ${sE}`,Qde=`item._anchor || (${Zw} ? "middle" : "start")`,epe=`${Xde} ? (${lE} ? -90 : 90) : 0`,tpe=`${Zw} ? (datum.vgrad ? (${uE} ? "bottom" : "top") : ${Zde}) : "top"`;function npe(t,n,e,o){const f=Bu(t,n),r={enter:{opacity:Ua},update:{opacity:gc,x:{field:{group:"padding"}},y:{field:{group:"padding"}}},exit:{opacity:Ua}};return kl(r,{orient:f("titleOrient"),_anchor:f("titleAnchor"),anchor:{signal:Qde},angle:{signal:epe},align:{signal:Kde},baseline:{signal:tpe},text:t.title,fill:f("titleColor"),fillOpacity:f("titleOpacity"),font:f("titleFont"),fontSize:f("titleFontSize"),fontStyle:f("titleFontStyle"),fontWeight:f("titleFontWeight"),limit:f("titleLimit"),lineHeight:f("titleLineHeight")},{align:f("titleAlign"),baseline:f("titleBaseline")}),nc({type:X0,role:yhe,style:iE,from:o,encode:r},e)}function rpe(t,n){let e;return Ei(t)&&(t.signal?e=t.signal:t.path?e="pathShape("+zL(t.path)+")":t.sphere&&(e="geoShape("+zL(t.sphere)+', {type: "Sphere"})')),e?n.signalRef(e):!!t}function zL(t){return Ei(t)&&t.signal?t.signal:oi(t)}function uU(t){const n=t.role||"";return!n.indexOf("axis")||!n.indexOf("legend")||!n.indexOf("title")?n:t.type===Yw?eE:n||KS}function ipe(t){return{marktype:t.type,name:t.name||void 0,role:t.role||uU(t),zindex:+t.zindex||void 0,aria:t.aria,description:t.description}}function ape(t,n){return t&&t.signal?n.signalRef(t.signal):t!==!1}function cE(t,n){const e=_z(t.type);e||Pr("Unrecognized transform type: "+oi(t.type));const o=$w(e.type.toLowerCase(),null,cU(e,t,n));return t.signal&&n.addSignal(t.signal,n.proxy(o)),o.metadata=e.metadata||{},o}function cU(t,n,e){const o={},f=t.params.length;for(let r=0;rRL(t,r,e)):RL(t,f,e)}function RL(t,n,e){const o=t.type;if(Ys(n))return NL(o)?Pr("Expression references can not be signals."):M4(o)?e.fieldRef(n):BL(o)?e.compareRef(n):e.signalRef(n.signal);{const f=t.expr||M4(o);return f&&upe(n)?e.exprRef(n.expr,n.as):f&&cpe(n)?ly(n.field,n.as):NL(o)?Qf(n,e):fpe(o)?Hi(e.getData(n).values):M4(o)?ly(n):BL(o)?e.compareRef(n):n}}function spe(t,n,e){return bi(n.from)||Pr('Lookup "from" parameter must be a string literal.'),e.getData(n.from).lookupRef(e,n.key)}function lpe(t,n,e){const o=n[t.name];return t.array?(Ir(o)||Pr("Expected an array of sub-parameters. Instead: "+oi(o)),o.map(f=>FL(t,f,e))):FL(t,o,e)}function FL(t,n,e){const o=t.params.length;let f;for(let a=0;at&&t.expr,cpe=t=>t&&t.field,fpe=t=>t==="data",NL=t=>t==="expr",M4=t=>t==="field",BL=t=>t==="compare";function hpe(t,n,e){let o,f,r,a,u;return t?(o=t.facet)&&(n||Pr("Only group marks can be faceted."),o.field!=null?a=u=s_(o,e):(t.data?u=Hi(e.getData(t.data).aggregate):(r=cE(pa({type:"aggregate",groupby:ki(o.groupby)},o.aggregate),e),r.params.key=e.keyRef(o.groupby),r.params.pulse=s_(o,e),a=u=Hi(e.add(r))),f=e.keyRef(o.groupby,!0))):a=Hi(e.add(mf(null,[{}]))),a||(a=s_(t,e)),{key:f,pulse:a,parent:u}}function s_(t,n){return t.$ref?t:t.data&&t.data.$ref?t.data:Hi(n.getData(t.data).output)}function O0(t,n,e,o,f){this.scope=t,this.input=n,this.output=e,this.values=o,this.aggregate=f,this.index={}}O0.fromEntries=function(t,n){const e=n.length,o=n[e-1],f=n[e-2];let r=n[0],a=null,u=1;for(r&&r.type==="load"&&(r=n[1]),t.add(n[0]);ul??"null").join(",")+"),0)",s=Qf(i,n);c.update=s.$expr,c.params=s.$params}function Jw(t,n){const e=uU(t),o=t.type===Yw,f=t.from&&t.from.facet,r=t.overlap;let a=t.layout||e===eE||e===QS,u,c,i,s,l,d,h;const m=e===KS||a||f,g=hpe(t.from,o,n);c=n.add(Yhe({key:g.key||(t.key?ly(t.key):void 0),pulse:g.pulse,clean:!o}));const p=Hi(c);c=i=n.add(mf({pulse:p})),c=n.add(tde({markdef:ipe(t),interactive:ape(t.interactive,n),clip:rpe(t.clip,n),context:{$context:!0},groups:n.lookup(),parent:n.signals.parent?n.signalRef("parent"):null,index:n.markpath(),pulse:Hi(c)}));const v=Hi(c);c=s=n.add(Jj(Wj(t.encode,t.type,e,t.style,n,{mod:!1,pulse:v}))),c.params.parent=n.encode(),t.transform&&t.transform.forEach(b=>{const T=cE(b,n),_=T.metadata;(_.generates||_.changes)&&Pr("Mark transforms should not generate new data."),_.nomod||(s.params.mod=!0),T.params.pulse=Hi(c),n.add(c=T)}),t.sort&&(c=n.add(cde({sort:n.compareRef(t.sort),pulse:Hi(c)})));const y=Hi(c);(f||a)&&(a=n.add(eU({layout:n.objectProperty(t.layout),legends:n.legends,mark:v,pulse:y})),d=Hi(a));const x=n.add(Zj({mark:v,pulse:d||y}));h=Hi(x),o&&(m&&(u=n.operators,u.pop(),a&&u.pop()),n.pushState(y,d||h,p),f?dpe(t,n,g):m?ppe(t,n,g):n.parse(t),n.popState(),m&&(a&&u.push(a),u.push(x))),r&&(h=gpe(r,h,n));const w=n.add(Qj({pulse:h})),k=n.add(Y0({pulse:Hi(w)},void 0,n.parent()));t.name!=null&&(l=t.name,n.addData(l,new O0(n,i,w,k)),t.on&&t.on.forEach(b=>{(b.insert||b.remove||b.toggle)&&Pr("Marks only support modify triggers."),hU(b,n,l)}))}function gpe(t,n,e){const o=t.method,f=t.bound,r=t.separation,a={separation:Ys(r)?e.signalRef(r.signal):r,method:Ys(o)?e.signalRef(o.signal):o,pulse:n};if(t.order&&(a.sort=e.compareRef({field:t.order})),f){const u=f.tolerance;a.boundTolerance=Ys(u)?e.signalRef(u.signal):+u,a.boundScale=e.scaleRef(f.scale),a.boundOrient=f.orient}return Hi(e.add(ide(a)))}function mpe(t,n){const e=n.config.legend,o=t.encode||{},f=Bu(t,e),r=o.legend||{},a=r.name||void 0,u=r.interactive,c=r.style,i={};let s=0,l,d,h;aE.forEach(x=>t[x]?(i[x]=t[x],s=s||t[x]):0),s||Pr("Missing valid scale for legend.");const m=vpe(t,n.scaleType(s)),g={title:t.title!=null,scales:i,type:m,vgrad:m!=="symbol"&&f.isVertical()},p=Hi(n.add(mf(null,[g]))),v={enter:{x:{value:0},y:{value:0}}},y=Hi(n.add(Qhe(d={type:m,scale:n.scaleRef(s),count:n.objectProperty(f("tickCount")),limit:n.property(f("symbolLimit")),values:n.objectProperty(t.values),minstep:n.property(t.tickMinStep),formatType:n.property(t.formatType),formatSpecifier:n.property(t.format)})));return m===o_?(h=[qde(t,s,e,o.gradient),IL(t,e,o.labels,y)],d.count=d.count||n.signalRef(`max(2,2*floor((${m0(f.gradientLength())})/100))`)):m===IT?h=[Hde(t,s,e,o.gradient,y),IL(t,e,o.labels,y)]:(l=Yde(t,e),h=[Wde(t,e,o,y,m0(l.columns))],d.size=bpe(t,n,h[0].marks)),h=[cy({role:ghe,from:p,encode:v,marks:h,layout:l,interactive:u})],g.title&&h.push(npe(t,e,o.title,p)),Jw(cy({role:dhe,from:p,encode:Jm(xpe(f,t,e),r,Ky),marks:h,aria:f("aria"),description:f("description"),zindex:f("zindex"),name:a,interactive:u,style:c}),n)}function vpe(t,n){let e=t.type||DL;return!t.type&&ype(t)===1&&(t.fill||t.stroke)&&(e=oM(n)?o_:Mk(n)?IT:DL),e!==o_?e:Mk(n)?IT:o_}function ype(t){return aE.reduce((n,e)=>n+(t[e]?1:0),0)}function xpe(t,n,e){const o={enter:{},update:{}};return kl(o,{orient:t("orient"),offset:t("offset"),padding:t("padding"),titlePadding:t("titlePadding"),cornerRadius:t("cornerRadius"),fill:t("fillColor"),stroke:t("strokeColor"),strokeWidth:e.strokeWidth,strokeDash:e.strokeDash,x:t("legendX"),y:t("legendY"),format:n.format,formatType:n.formatType}),o}function bpe(t,n,e){const o=m0(UL("size",t,e)),f=m0(UL("strokeWidth",t,e)),r=m0(_pe(e[1].encode,n,Jy));return Qf(`max(ceil(sqrt(${o})+${f}),${r})`,n)}function UL(t,n,e){return n[t]?`scale("${n[t]}",datum)`:sU(t,e[0].encode)}function _pe(t,n,e){return sU("fontSize",t)||Ude("fontSize",n,e)}const wpe=`item.orient==="${Km}"?-90:item.orient==="${Qm}"?90:0`;function kpe(t,n){t=bi(t)?{text:t}:t;const e=Bu(t,n.config.title),o=t.encode||{},f=o.group||{},r=f.name||void 0,a=f.interactive,u=f.style,c=[],i={},s=Hi(n.add(mf(null,[i])));return c.push(Mpe(t,e,Tpe(t),s)),t.subtitle&&c.push(Spe(t,e,o.subtitle,s)),Jw(cy({role:xhe,from:s,encode:Ape(e,f),marks:c,aria:e("aria"),description:e("description"),zindex:e("zindex"),name:r,interactive:a,style:u}),n)}function Tpe(t){const n=t.encode;return n&&n.title||pa({name:t.name,interactive:t.interactive,style:t.style},n)}function Ape(t,n){const e={enter:{},update:{}};return kl(e,{orient:t("orient"),anchor:t("anchor"),align:{signal:sE},angle:{signal:wpe},limit:t("limit"),frame:t("frame"),offset:t("offset")||0,padding:t("subtitlePadding")}),Jm(e,n,Ky)}function Mpe(t,n,e,o){const f={value:0},r=t.text,a={enter:{opacity:f},update:{opacity:{value:1}},exit:{opacity:f}};return kl(a,{text:r,align:{signal:"item.mark.group.align"},angle:{signal:"item.mark.group.angle"},limit:{signal:"item.mark.group.limit"},baseline:"top",dx:n("dx"),dy:n("dy"),fill:n("color"),font:n("font"),fontSize:n("fontSize"),fontStyle:n("fontStyle"),fontWeight:n("fontWeight"),lineHeight:n("lineHeight")},{align:n("align"),angle:n("angle"),baseline:n("baseline")}),nc({type:X0,role:bhe,style:Pde,from:o,encode:a},e)}function Spe(t,n,e,o){const f={value:0},r=t.subtitle,a={enter:{opacity:f},update:{opacity:{value:1}},exit:{opacity:f}};return kl(a,{text:r,align:{signal:"item.mark.group.align"},angle:{signal:"item.mark.group.angle"},limit:{signal:"item.mark.group.limit"},baseline:"top",dx:n("dx"),dy:n("dy"),fill:n("subtitleColor"),font:n("subtitleFont"),fontSize:n("subtitleFontSize"),fontStyle:n("subtitleFontStyle"),fontWeight:n("subtitleFontWeight"),lineHeight:n("subtitleLineHeight")},{align:n("align"),angle:n("angle"),baseline:n("baseline")}),nc({type:X0,role:_he,style:Dde,from:o,encode:a},e)}function Epe(t,n){const e=[];t.transform&&t.transform.forEach(o=>{e.push(cE(o,n))}),t.on&&t.on.forEach(o=>{hU(o,n,t.name)}),n.addDataPipeline(t.name,Cpe(t,n,e))}function Cpe(t,n,e){const o=[];let f=null,r=!1,a=!1,u,c,i,s,l;for(t.values?Ys(t.values)||i_(t.format)?(o.push(VL(n,t)),o.push(f=jp())):o.push(f=jp({$ingest:t.values,$format:t.format})):t.url?i_(t.url)||i_(t.format)?(o.push(VL(n,t)),o.push(f=jp())):o.push(f=jp({$request:t.url,$format:t.format})):t.source&&(f=u=ki(t.source).map(d=>Hi(n.getData(d).output)),o.push(null)),c=0,i=e.length;ct===np||t===vf,Kw=(t,n,e)=>Ys(t)?Dpe(t.signal,n,e):t===Km||t===vf?n:e,al=(t,n,e)=>Ys(t)?Lpe(t.signal,n,e):dU(t)?n:e,of=(t,n,e)=>Ys(t)?Ppe(t.signal,n,e):dU(t)?e:n,pU=(t,n,e)=>Ys(t)?Ipe(t.signal,n,e):t===vf?{value:n}:{value:e},Ope=(t,n,e)=>Ys(t)?zpe(t.signal,n,e):t===Qm?{value:n}:{value:e},Lpe=(t,n,e)=>gU(`${t} === '${vf}' || ${t} === '${np}'`,n,e),Ppe=(t,n,e)=>gU(`${t} !== '${vf}' && ${t} !== '${np}'`,n,e),Dpe=(t,n,e)=>fE(`${t} === '${Km}' || ${t} === '${vf}'`,n,e),Ipe=(t,n,e)=>fE(`${t} === '${vf}'`,n,e),zpe=(t,n,e)=>fE(`${t} === '${Qm}'`,n,e),gU=(t,n,e)=>(n=n!=null?il(n):n,e=e!=null?il(e):e,qL(n)&&qL(e)?(n=n?n.signal||oi(n.value):null,e=e?e.signal||oi(e.value):null,{signal:`${t} ? (${n}) : (${e})`}):[pa({test:t},n)].concat(e||[])),qL=t=>t==null||Object.keys(t).length===1,fE=(t,n,e)=>({signal:`${t} ? (${Kg(n)}) : (${Kg(e)})`}),Rpe=(t,n,e,o,f)=>({signal:(o!=null?`${t} === '${Km}' ? (${Kg(o)}) : `:"")+(e!=null?`${t} === '${np}' ? (${Kg(e)}) : `:"")+(f!=null?`${t} === '${Qm}' ? (${Kg(f)}) : `:"")+(n!=null?`${t} === '${vf}' ? (${Kg(n)}) : `:"")+"(null)"}),Kg=t=>Ys(t)?t.signal:t==null?null:oi(t),Fpe=(t,n)=>n===0?0:Ys(t)?{signal:`(${t.signal}) * ${n}`}:{value:t*n},nm=(t,n)=>{const e=t.signal;return e&&e.endsWith("(null)")?{signal:e.slice(0,-6)+n.signal}:t};function Ng(t,n,e,o){let f;if(n&&qi(n,t))return n[t];if(qi(e,t))return e[t];if(t.startsWith("title")){switch(t){case"titleColor":f="fill";break;case"titleFont":case"titleFontSize":case"titleFontWeight":f=t[5].toLowerCase()+t.slice(6)}return o[iE][f]}else if(t.startsWith("label")){switch(t){case"labelColor":f="fill";break;case"labelFont":case"labelFontSize":f=t[5].toLowerCase()+t.slice(6)}return o[Jy][f]}return null}function HL(t){const n={};for(const e of t)if(!!e)for(const o in e)n[o]=1;return Object.keys(n)}function Npe(t,n){var e=n.config,o=e.style,f=e.axis,r=n.scaleType(t.scale)==="band"&&e.axisBand,a=t.orient,u,c,i;if(Ys(a)){const l=HL([e.axisX,e.axisY]),d=HL([e.axisTop,e.axisBottom,e.axisLeft,e.axisRight]);u={};for(i of l)u[i]=al(a,Ng(i,e.axisX,f,o),Ng(i,e.axisY,f,o));c={};for(i of d)c[i]=Rpe(a.signal,Ng(i,e.axisTop,f,o),Ng(i,e.axisBottom,f,o),Ng(i,e.axisLeft,f,o),Ng(i,e.axisRight,f,o))}else u=a===vf||a===np?e.axisX:e.axisY,c=e["axis"+a[0].toUpperCase()+a.slice(1)];return u||c||r?pa({},f,u,c,r):f}function Bpe(t,n,e,o){const f=Bu(t,n),r=t.orient;let a,u;const c={enter:a={opacity:Ua},update:u={opacity:gc},exit:{opacity:Ua}};kl(c,{stroke:f("domainColor"),strokeCap:f("domainCap"),strokeDash:f("domainDash"),strokeDashOffset:f("domainDashOffset"),strokeWidth:f("domainWidth"),strokeOpacity:f("domainOpacity")});const i=$L(t,0),s=$L(t,1);return a.x=u.x=al(r,i,Ua),a.x2=u.x2=al(r,s),a.y=u.y=of(r,i,Ua),a.y2=u.y2=of(r,s),nc({type:oE,role:lhe,from:o,encode:c},e)}function $L(t,n){return{scale:t.scale,range:n}}function jpe(t,n,e,o,f){const r=Bu(t,n),a=t.orient,u=t.gridScale,c=Kw(a,1,-1),i=Upe(t.offset,c);let s,l,d;const h={enter:s={opacity:Ua},update:d={opacity:gc},exit:l={opacity:Ua}};kl(h,{stroke:r("gridColor"),strokeCap:r("gridCap"),strokeDash:r("gridDash"),strokeDashOffset:r("gridDashOffset"),strokeOpacity:r("gridOpacity"),strokeWidth:r("gridWidth")});const m={scale:t.scale,field:pc,band:f.band,extra:f.extra,offset:f.offset,round:r("tickRound")},g=al(a,{signal:"height"},{signal:"width"}),p=u?{scale:u,range:0,mult:c,offset:i}:{value:0,offset:i},v=u?{scale:u,range:1,mult:c,offset:i}:pa(g,{mult:c,offset:i});return s.x=d.x=al(a,m,p),s.y=d.y=of(a,m,p),s.x2=d.x2=of(a,v),s.y2=d.y2=al(a,v),l.x=al(a,m),l.y=of(a,m),nc({type:oE,role:uhe,key:pc,from:o,encode:h},e)}function Upe(t,n){if(n!==1)if(!Ei(t))t=Ys(n)?{signal:`(${n.signal}) * (${t||0})`}:n*(t||0);else{let e=t=pa({},t);for(;e.mult!=null;)if(Ei(e.mult))e=e.mult=pa({},e.mult);else return e.mult=Ys(n)?{signal:`(${e.mult}) * (${n.signal})`}:e.mult*n,t;e.mult=n}return t}function Vpe(t,n,e,o,f,r){const a=Bu(t,n),u=t.orient,c=Kw(u,-1,1);let i,s,l;const d={enter:i={opacity:Ua},update:l={opacity:gc},exit:s={opacity:Ua}};kl(d,{stroke:a("tickColor"),strokeCap:a("tickCap"),strokeDash:a("tickDash"),strokeDashOffset:a("tickDashOffset"),strokeOpacity:a("tickOpacity"),strokeWidth:a("tickWidth")});const h=il(f);h.mult=c;const m={scale:t.scale,field:pc,band:r.band,extra:r.extra,offset:r.offset,round:a("tickRound")};return l.y=i.y=al(u,Ua,m),l.y2=i.y2=al(u,h),s.x=al(u,m),l.x=i.x=of(u,Ua,m),l.x2=i.x2=of(u,h),s.y=of(u,m),nc({type:oE,role:fhe,key:pc,from:o,encode:d},e)}function S4(t,n,e,o,f){return{signal:'flush(range("'+t+'"), scale("'+t+'", datum.value), '+n+","+e+","+o+","+f+")"}}function qpe(t,n,e,o,f,r){const a=Bu(t,n),u=t.orient,c=t.scale,i=Kw(u,-1,1),s=m0(a("labelFlush")),l=m0(a("labelFlushOffset")),d=a("labelAlign"),h=a("labelBaseline");let m=s===0||!!s,g;const p=il(f);p.mult=i,p.offset=il(a("labelPadding")||0),p.offset.mult=i;const v={scale:c,field:pc,band:.5,offset:lU(r.offset,a("labelOffset"))},y=al(u,m?S4(c,s,'"left"','"right"','"center"'):{value:"center"},Ope(u,"left","right")),x=al(u,pU(u,"bottom","top"),m?S4(c,s,'"top"','"bottom"','"middle"'):{value:"middle"}),w=S4(c,s,`-(${l})`,l,0);m=m&&l;const k={opacity:Ua,x:al(u,v,p),y:of(u,v,p)},b={enter:k,update:g={opacity:gc,text:{field:rE},x:k.x,y:k.y,align:y,baseline:x},exit:{opacity:Ua,x:k.x,y:k.y}};kl(b,{dx:!d&&m?al(u,w):null,dy:!h&&m?of(u,w):null}),kl(b,{angle:a("labelAngle"),fill:a("labelColor"),fillOpacity:a("labelOpacity"),font:a("labelFont"),fontSize:a("labelFontSize"),fontWeight:a("labelFontWeight"),fontStyle:a("labelFontStyle"),limit:a("labelLimit"),lineHeight:a("labelLineHeight")},{align:d,baseline:h});const T=a("labelBound");let _=a("labelOverlap");return _=_||T?{separation:a("labelSeparation"),method:_,order:"datum.index",bound:T?{scale:c,orient:u,tolerance:T}:null}:void 0,g.align!==y&&(g.align=nm(g.align,y)),g.baseline!==x&&(g.baseline=nm(g.baseline,x)),nc({type:X0,role:che,style:Jy,key:pc,from:o,encode:b,overlap:_},e)}function Hpe(t,n,e,o){const f=Bu(t,n),r=t.orient,a=Kw(r,-1,1);let u,c;const i={enter:u={opacity:Ua,anchor:il(f("titleAnchor",null)),align:{signal:sE}},update:c=pa({},u,{opacity:gc,text:il(t.title)}),exit:{opacity:Ua}},s={signal:`lerp(range("${t.scale}"), ${Xw(0,1,.5)})`};return c.x=al(r,s),c.y=of(r,s),u.angle=al(r,Ua,Fpe(a,90)),u.baseline=al(r,pU(r,np,vf),{value:np}),c.angle=u.angle,c.baseline=u.baseline,kl(i,{fill:f("titleColor"),fillOpacity:f("titleOpacity"),font:f("titleFont"),fontSize:f("titleFontSize"),fontStyle:f("titleFontStyle"),fontWeight:f("titleFontWeight"),limit:f("titleLimit"),lineHeight:f("titleLineHeight")},{align:f("titleAlign"),angle:f("titleAngle"),baseline:f("titleBaseline")}),$pe(f,r,i,e),i.update.align=nm(i.update.align,u.align),i.update.angle=nm(i.update.angle,u.angle),i.update.baseline=nm(i.update.baseline,u.baseline),nc({type:X0,role:hhe,style:iE,from:o,encode:i},e)}function $pe(t,n,e,o){const f=(u,c)=>u!=null?(e.update[c]=nm(il(u),e.update[c]),!1):!$g(c,o),r=f(t("titleX"),"x"),a=f(t("titleY"),"y");e.enter.auto=a===r?il(a):al(n,il(a),il(r))}function Gpe(t,n){const e=Npe(t,n),o=t.encode||{},f=o.axis||{},r=f.name||void 0,a=f.interactive,u=f.style,c=Bu(t,e),i=Vde(c),s={scale:t.scale,ticks:!!c("ticks"),labels:!!c("labels"),grid:!!c("grid"),domain:!!c("domain"),title:t.title!=null},l=Hi(n.add(mf({},[s]))),d=Hi(n.add(Whe({scale:n.scaleRef(t.scale),extra:n.property(i.extra),count:n.objectProperty(t.tickCount),values:n.objectProperty(t.values),minstep:n.property(t.tickMinStep),formatType:n.property(t.formatType),formatSpecifier:n.property(t.format)}))),h=[];let m;return s.grid&&h.push(jpe(t,e,o.grid,d,i)),s.ticks&&(m=c("tickSize"),h.push(Vpe(t,e,o.ticks,d,m,i))),s.labels&&(m=s.ticks?m:0,h.push(qpe(t,e,o.labels,d,m,i))),s.domain&&h.push(Bpe(t,e,o.domain,l)),s.title&&h.push(Hpe(t,e,o.title,l)),Jw(cy({role:she,from:l,encode:Jm(Wpe(c,t),f,Ky),marks:h,aria:c("aria"),description:c("description"),zindex:c("zindex"),name:r,interactive:a,style:u}),n)}function Wpe(t,n){const e={enter:{},update:{}};return kl(e,{orient:t("orient"),offset:t("offset")||0,position:Wc(n.position,0),titlePadding:t("titlePadding"),minExtent:t("minExtent"),maxExtent:t("maxExtent"),range:{signal:`abs(span(range("${n.scale}")))`},translate:t("translate"),format:n.format,formatType:n.formatType}),e}function mU(t,n,e){const o=ki(t.signals),f=ki(t.scales);return e||o.forEach(r=>Yj(r,n)),ki(t.projections).forEach(r=>Ade(r,n)),f.forEach(r=>dde(r,n)),ki(t.data).forEach(r=>Epe(r,n)),f.forEach(r=>pde(r,n)),(e||o).forEach(r=>Ghe(r,n)),ki(t.axes).forEach(r=>Gpe(r,n)),ki(t.marks).forEach(r=>Jw(r,n)),ki(t.legends).forEach(r=>mpe(r,n)),t.title&&kpe(t.title,n),n.parseLambdas(),n}const Ype=t=>Jm({enter:{x:{value:0},y:{value:0}},update:{width:{signal:"width"},height:{signal:"height"}}},t);function Xpe(t,n){const e=n.config,o=Hi(n.root=n.add(w2())),f=Zpe(t,e);f.forEach(i=>Yj(i,n)),n.description=t.description||e.description,n.eventConfig=e.events,n.legends=n.objectProperty(e.legend&&e.legend.layout),n.locale=e.locale;const r=n.add(mf()),a=n.add(Jj(Wj(Ype(t.encode),Yw,QS,t.style,n,{pulse:Hi(r)}))),u=n.add(eU({layout:n.objectProperty(t.layout),legends:n.legends,autosize:n.signalRef("autosize"),mark:o,pulse:Hi(a)}));n.operators.pop(),n.pushState(Hi(a),Hi(u),null),mU(t,n,f),n.operators.push(u);let c=n.add(Zj({mark:o,pulse:Hi(u)}));return c=n.add(Qj({pulse:Hi(c)})),c=n.add(Y0({pulse:Hi(c)})),n.addData("root",new O0(n,r,r,c)),n}function Z1(t,n){return n&&n.signal?{name:t,update:n.signal}:{name:t,value:n}}function Zpe(t,n){const e=a=>Wc(t[a],n[a]),o=[Z1("background",e("background")),Z1("autosize",ihe(e("autosize"))),Z1("padding",ohe(e("padding"))),Z1("width",e("width")||0),Z1("height",e("height")||0)],f=o.reduce((a,u)=>(a[u.name]=u,a),{}),r={};return ki(t.signals).forEach(a=>{qi(f,a.name)?a=pa(f[a.name],a):o.push(a),r[a.name]=a}),ki(n.signals).forEach(a=>{!qi(r,a.name)&&!qi(f,a.name)&&o.push(a)}),o}function vU(t,n){this.config=t||{},this.options=n||{},this.bindings=[],this.field={},this.signals={},this.lambdas={},this.scales={},this.events={},this.data={},this.streams=[],this.updates=[],this.operators=[],this.eventConfig=null,this.locale=null,this._id=0,this._subid=0,this._nextsub=[0],this._parent=[],this._encode=[],this._lookup=[],this._markpath=[]}function GL(t){this.config=t.config,this.options=t.options,this.legends=t.legends,this.field=Object.create(t.field),this.signals=Object.create(t.signals),this.lambdas=Object.create(t.lambdas),this.scales=Object.create(t.scales),this.events=Object.create(t.events),this.data=Object.create(t.data),this.streams=[],this.updates=[],this.operators=[],this._id=0,this._subid=++t._nextsub[0],this._nextsub=t._nextsub,this._parent=t._parent.slice(),this._encode=t._encode.slice(),this._lookup=t._lookup.slice(),this._markpath=t._markpath}vU.prototype=GL.prototype={parse(t){return mU(t,this)},fork(){return new GL(this)},isSubscope(){return this._subid>0},toRuntime(){return this.finish(),{description:this.description,operators:this.operators,streams:this.streams,updates:this.updates,bindings:this.bindings,eventConfig:this.eventConfig,locale:this.locale}},id(){return(this._subid?this._subid+":":0)+this._id++},add(t){return this.operators.push(t),t.id=this.id(),t.refs&&(t.refs.forEach(n=>{n.$ref=t.id}),t.refs=null),t},proxy(t){const n=t instanceof CT?Hi(t):t;return this.add(sde({value:n}))},addStream(t){return this.streams.push(t),t.id=this.id(),t},addUpdate(t){return this.updates.push(t),t},finish(){let t,n;this.root&&(this.root.root=!0);for(t in this.signals)this.signals[t].signal=t;for(t in this.scales)this.scales[t].scale=t;function e(o,f,r){let a,u;o&&(a=o.data||(o.data={}),u=a[f]||(a[f]=[]),u.push(r))}for(t in this.data){n=this.data[t],e(n.input,t,"input"),e(n.output,t,"output"),e(n.values,t,"values");for(const o in n.index)e(n.index[o],t,"index:"+o)}return this},pushState(t,n,e){this._encode.push(Hi(this.add(Y0({pulse:t})))),this._parent.push(n),this._lookup.push(e?Hi(this.proxy(e)):null),this._markpath.push(-1)},popState(){this._encode.pop(),this._parent.pop(),this._lookup.pop(),this._markpath.pop()},parent(){return Na(this._parent)},encode(){return Na(this._encode)},lookup(){return Na(this._lookup)},markpath(){const t=this._markpath;return++t[t.length-1]},fieldRef(t,n){if(bi(t))return ly(t,n);t.signal||Pr("Unsupported field reference: "+oi(t));const e=t.signal;let o=this.field[e];if(!o){const f={name:this.signalRef(e)};n&&(f.as=n),this.field[e]=o=Hi(this.add(Jhe(f)))}return o},compareRef(t){let n=!1;const e=r=>Ys(r)?(n=!0,this.signalRef(r.signal)):Rhe(r)?(n=!0,this.exprRef(r.expr)):r,o=ki(t.field).map(e),f=ki(t.order).map(e);return n?Hi(this.add(PL({fields:o,orders:f}))):OL(o,f)},keyRef(t,n){let e=!1;const o=r=>Ys(r)?(e=!0,Hi(f[r.signal])):r,f=this.signals;return t=ki(t).map(o),e?Hi(this.add(Khe({fields:t,flat:n}))):Phe(t,n)},sortRef(t){if(!t)return t;const n=Gw(t.op,t.field),e=t.order||Dhe;return e.signal?Hi(this.add(PL({fields:n,orders:this.signalRef(e.signal)}))):OL(n,e)},event(t,n){const e=t+":"+n;if(!this.events[e]){const o=this.id();this.streams.push({id:o,source:t,type:n}),this.events[e]=o}return this.events[e]},hasOwnSignal(t){return qi(this.signals,t)},addSignal(t,n){this.hasOwnSignal(t)&&Pr("Duplicate signal name: "+oi(t));const e=n instanceof CT?n:this.add(w2(n));return this.signals[t]=e},getSignal(t){return this.signals[t]||Pr("Unrecognized signal name: "+oi(t)),this.signals[t]},signalRef(t){return this.signals[t]?Hi(this.signals[t]):(qi(this.lambdas,t)||(this.lambdas[t]=this.add(w2(null))),Hi(this.lambdas[t]))},parseLambdas(){const t=Object.keys(this.lambdas);for(let n=0,e=t.length;n0?",":"")+(Ei(f)?f.signal||hE(f):oi(f))}return e+"]"}function Kpe(t){let n="{",e=0,o,f;for(o in t)f=t[o],n+=(++e>1?",":"")+oi(o)+":"+(Ei(f)?f.signal||hE(f):oi(f));return n+"}"}function Qpe(){const t="sans-serif",o="#4c78a8",f="#000",r="#888",a="#ddd";return{description:"Vega visualization",padding:0,autosize:"pad",background:null,events:{defaults:{allow:["wheel"]}},group:null,mark:null,arc:{fill:o},area:{fill:o},image:null,line:{stroke:o,strokeWidth:2},path:{stroke:o},rect:{fill:o},rule:{stroke:f},shape:{stroke:o},symbol:{fill:o,size:64},text:{fill:f,font:t,fontSize:11},trail:{fill:o,size:2},style:{"guide-label":{fill:f,font:t,fontSize:10},"guide-title":{fill:f,font:t,fontSize:11,fontWeight:"bold"},"group-title":{fill:f,font:t,fontSize:13,fontWeight:"bold"},"group-subtitle":{fill:f,font:t,fontSize:12},point:{size:30,strokeWidth:2,shape:"circle"},circle:{size:30,strokeWidth:2},square:{size:30,strokeWidth:2,shape:"square"},cell:{fill:"transparent",stroke:a}},title:{orient:"top",anchor:"middle",offset:4,subtitlePadding:3},axis:{minExtent:0,maxExtent:200,bandPosition:.5,domain:!0,domainWidth:1,domainColor:r,grid:!1,gridWidth:1,gridColor:a,labels:!0,labelAngle:0,labelLimit:180,labelOffset:0,labelPadding:2,ticks:!0,tickColor:r,tickOffset:0,tickRound:!0,tickSize:5,tickWidth:1,titlePadding:4},axisBand:{tickOffset:-.5},projection:{type:"mercator"},legend:{orient:"right",padding:0,gridAlign:"each",columnPadding:10,rowPadding:2,symbolDirection:"vertical",gradientDirection:"vertical",gradientLength:200,gradientThickness:16,gradientStrokeColor:a,gradientStrokeWidth:0,gradientLabelOffset:2,labelAlign:"left",labelBaseline:"middle",labelLimit:160,labelOffset:4,labelOverlap:!0,symbolLimit:30,symbolType:"circle",symbolSize:100,symbolOffset:0,symbolStrokeWidth:1.5,symbolBaseFillColor:"transparent",symbolBaseStrokeColor:r,titleLimit:180,titleOrient:"top",titlePadding:5,layout:{offset:18,direction:"horizontal",left:{direction:"vertical"},right:{direction:"vertical"}}},range:{category:{scheme:"tableau10"},ordinal:{scheme:"blues"},heatmap:{scheme:"yellowgreenblue"},ramp:{scheme:"blues"},diverging:{scheme:"blueorange",extent:[1,0]},symbol:["circle","square","triangle-up","cross","diamond","triangle-right","triangle-down","triangle-left"]}}}function e0e(t,n,e){return Ei(t)||Pr("Input Vega specification must be an object."),n=Vm(Qpe(),n,t.config),Xpe(t,new vU(n,e)).toRuntime()}var t0e="5.22.1";pa(cm,PJ,One,lre,Wie,Uae,pse,Woe,mse,Bse,Xse,nle);var n0e=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",version:t0e,Dataflow:Qg,EventStream:iw,MultiPulse:ZA,Operator:Co,Parameters:rw,Pulse:Ud,Transform:_r,changeset:$0,definition:_z,ingest:ro,isTuple:tw,transform:wz,transforms:cm,tupleid:$i,interpolate:sM,interpolateColors:xw,interpolateRange:tF,quantizeInterpolator:nF,scale:Xa,scheme:lM,projection:aS,View:zj,defaultLocale:$A,formatLocale:y_,locale:lz,resetDefaultLocale:PX,timeFormatLocale:Gv,expressionFunction:Fs,parse:e0e,runtimeContext:wj,codegenExpression:uj,parseExpression:BS,parseSelector:pp,Debug:ZD,Error:wA,Info:XD,None:YD,Warn:kA,accessor:Nu,accessorFields:Bl,accessorName:xs,array:ki,ascending:J2,clampRange:sI,compare:EA,constant:$l,debounce:CA,error:Pr,extend:pa,extent:Zf,extentIndex:lI,falsy:yd,fastmap:Hm,field:Lu,flush:uI,hasOwnProperty:qi,id:Ty,identity:Hl,inherits:ni,inrange:Wg,isArray:Ir,isBoolean:fp,isDate:Nd,isFunction:ga,isIterable:cI,isNumber:wo,isObject:Ei,isRegExp:fI,isString:bi,key:OA,lerp:hI,logger:TA,lruCache:dI,merge:pI,mergeConfig:Vm,one:Um,pad:gI,panLinear:tI,panLog:nI,panPow:rI,panSymlog:iI,peek:Na,quarter:aI,repeat:iv,span:Ay,splitAccessPath:ih,stringValue:oi,toBoolean:LA,toDate:PA,toNumber:Rl,toSet:ff,toString:DA,truncate:mI,truthy:mc,utcquarter:oI,visitArray:_d,writeConfig:qm,zero:Md,zoomLinear:AA,zoomLog:MA,zoomPow:p_,zoomSymlog:SA,bandwidthNRD:e6,bin:Tz,bootstrapCI:Az,cumulativeLogNormal:o6,cumulativeNormal:ow,cumulativeUniform:c6,densityLogNormal:a6,densityNormal:t6,densityUniform:u6,dotbin:Mz,quantileLogNormal:s6,quantileNormal:sw,quantileUniform:f6,quantiles:KA,quartiles:QA,get random(){return yc},randomInteger:RZ,randomKDE:r6,randomLCG:zZ,randomLogNormal:Ez,randomMixture:Cz,randomNormal:n6,randomUniform:Oz,regressionExp:Pz,regressionLinear:h6,regressionLoess:zz,regressionLog:Lz,regressionPoly:Iz,regressionPow:Dz,regressionQuad:d6,sampleCurve:uw,sampleLogNormal:i6,sampleNormal:aw,sampleUniform:l6,setRandom:DZ,DATE:Du,DAY:Il,DAYOFYEAR:Jf,HOURS:Qu,MILLISECONDS:hf,MINUTES:ec,MONTH:jl,QUARTER:Pu,SECONDS:vc,TIME_UNITS:jA,WEEK:Gs,YEAR:wl,dayofyear:LI,timeBin:YI,timeFloor:NI,timeInterval:$m,timeOffset:UI,timeSequence:HI,timeUnitSpecifier:OI,timeUnits:UA,utcFloor:BI,utcInterval:Gm,utcOffset:VI,utcSequence:$I,utcdayofyear:II,utcweek:zI,week:PI,format:Bb,formats:YA,inferType:cz,inferTypes:fz,loader:Q2,read:pz,responseType:dz,typeParsers:bk,path:Bm,Bounds:zs,CanvasHandler:Vy,CanvasRenderer:R_,Gradient:gF,GroupItem:ww,Handler:ep,Item:_w,Marks:tc,RenderType:Dd,Renderer:oh,ResourceLoader:gM,SVGHandler:DM,SVGRenderer:BM,SVGStringRenderer:jM,Scenegraph:LM,boundClip:uN,boundContext:Ny,boundItem:Dk,boundMark:IF,boundStroke:Jh,domChild:Au,domClear:Xc,domCreate:Ld,domFind:PM,font:Sw,fontFamily:Uy,fontSize:ah,intersect:aN,intersectBoxLine:Yg,intersectPath:mM,intersectPoint:vM,intersectRule:kF,lineHeight:Kd,markup:NM,multiLineOffset:EM,pathCurves:hM,pathEqual:cN,pathParse:gm,pathRectangle:yF,pathRender:Zv,pathSymbols:vF,pathTrail:xF,point:Cw,renderModule:Ow,resetSVGClipId:_F,resetSVGDefIds:Gte,sceneEqual:UM,sceneFromJSON:RF,scenePickVisit:O_,sceneToJSON:zF,sceneVisit:df,sceneZOrder:yM,serializeXML:JF,textMetrics:af});function r0e(t,n,e){let o;n.x2&&(n.x?(e&&t.x>t.x2&&(o=t.x,t.x=t.x2,t.x2=o),t.width=t.x2-t.x):t.x=t.x2-(t.width||0)),n.xc&&(t.x=t.xc-(t.width||0)/2),n.y2&&(n.y?(e&&t.y>t.y2&&(o=t.y,t.y=t.y2,t.y2=o),t.height=t.y2-t.y):t.y=t.y2-(t.height||0)),n.yc&&(t.y=t.yc-(t.height||0)/2)}var i0e={NaN:NaN,E:Math.E,LN2:Math.LN2,LN10:Math.LN10,LOG2E:Math.LOG2E,LOG10E:Math.LOG10E,PI:Math.PI,SQRT1_2:Math.SQRT1_2,SQRT2:Math.SQRT2,MIN_VALUE:Number.MIN_VALUE,MAX_VALUE:Number.MAX_VALUE},a0e={"*":(t,n)=>t*n,"+":(t,n)=>t+n,"-":(t,n)=>t-n,"/":(t,n)=>t/n,"%":(t,n)=>t%n,">":(t,n)=>t>n,"<":(t,n)=>tt<=n,">=":(t,n)=>t>=n,"==":(t,n)=>t==n,"!=":(t,n)=>t!=n,"===":(t,n)=>t===n,"!==":(t,n)=>t!==n,"&":(t,n)=>t&n,"|":(t,n)=>t|n,"^":(t,n)=>t^n,"<<":(t,n)=>t<>":(t,n)=>t>>n,">>>":(t,n)=>t>>>n},o0e={"+":t=>+t,"-":t=>-t,"~":t=>~t,"!":t=>!t};const s0e=Array.prototype.slice,Up=(t,n,e)=>{const o=e?e(n[0]):n[0];return o[t].apply(o,s0e.call(n,1))},l0e=(t,n,e,o,f,r,a)=>new Date(t,n||0,e??1,o||0,f||0,r||0,a||0);var u0e={isNaN:Number.isNaN,isFinite:Number.isFinite,abs:Math.abs,acos:Math.acos,asin:Math.asin,atan:Math.atan,atan2:Math.atan2,ceil:Math.ceil,cos:Math.cos,exp:Math.exp,floor:Math.floor,log:Math.log,max:Math.max,min:Math.min,pow:Math.pow,random:Math.random,round:Math.round,sin:Math.sin,sqrt:Math.sqrt,tan:Math.tan,clamp:(t,n,e)=>Math.max(n,Math.min(e,t)),now:Date.now,utc:Date.UTC,datetime:l0e,date:t=>new Date(t).getDate(),day:t=>new Date(t).getDay(),year:t=>new Date(t).getFullYear(),month:t=>new Date(t).getMonth(),hours:t=>new Date(t).getHours(),minutes:t=>new Date(t).getMinutes(),seconds:t=>new Date(t).getSeconds(),milliseconds:t=>new Date(t).getMilliseconds(),time:t=>new Date(t).getTime(),timezoneoffset:t=>new Date(t).getTimezoneOffset(),utcdate:t=>new Date(t).getUTCDate(),utcday:t=>new Date(t).getUTCDay(),utcyear:t=>new Date(t).getUTCFullYear(),utcmonth:t=>new Date(t).getUTCMonth(),utchours:t=>new Date(t).getUTCHours(),utcminutes:t=>new Date(t).getUTCMinutes(),utcseconds:t=>new Date(t).getUTCSeconds(),utcmilliseconds:t=>new Date(t).getUTCMilliseconds(),length:t=>t.length,join:function(){return Up("join",arguments)},indexof:function(){return Up("indexOf",arguments)},lastindexof:function(){return Up("lastIndexOf",arguments)},slice:function(){return Up("slice",arguments)},reverse:t=>t.slice().reverse(),parseFloat,parseInt,upper:t=>String(t).toUpperCase(),lower:t=>String(t).toLowerCase(),substring:function(){return Up("substring",arguments,String)},split:function(){return Up("split",arguments,String)},replace:function(){return Up("replace",arguments,String)},trim:t=>String(t).trim(),regexp:RegExp,test:(t,n)=>RegExp(t).test(n)};const c0e=["view","item","group","xy","x","y"],f0e={Literal:(t,n)=>n.value,Identifier:(t,n)=>{const e=n.name;return t.memberDepth>0?e:e==="datum"?t.datum:e==="event"?t.event:e==="item"?t.item:i0e[e]||t.params["$"+e]},MemberExpression:(t,n)=>{const e=!n.computed,o=t(n.object);e&&(t.memberDepth+=1);const f=t(n.property);return e&&(t.memberDepth-=1),o[f]},CallExpression:(t,n)=>{const e=n.arguments;let o=n.callee.name;return o.startsWith("_")&&(o=o.slice(1)),o==="if"?t(e[0])?t(e[1]):t(e[2]):(t.fn[o]||u0e[o]).apply(t.fn,e.map(t))},ArrayExpression:(t,n)=>n.elements.map(t),BinaryExpression:(t,n)=>a0e[n.operator](t(n.left),t(n.right)),UnaryExpression:(t,n)=>o0e[n.operator](t(n.argument)),ConditionalExpression:(t,n)=>t(n.test)?t(n.consequent):t(n.alternate),LogicalExpression:(t,n)=>n.operator==="&&"?t(n.left)&&t(n.right):t(n.left)||t(n.right),ObjectExpression:(t,n)=>n.properties.reduce((e,o)=>{t.memberDepth+=1;const f=t(o.key);return t.memberDepth-=1,e[f]=t(o.value),e},{})};function J1(t,n,e,o,f,r){const a=u=>f0e[u.type](a,u);return a.memberDepth=0,a.fn=Object.create(n),a.params=e,a.datum=o,a.event=f,a.item=r,c0e.forEach(u=>a.fn[u]=(...c)=>f.vega[u](...c)),a(t)}var h0e={operator(t,n){const e=n.ast,o=t.functions;return f=>J1(e,o,f)},parameter(t,n){const e=n.ast,o=t.functions;return(f,r)=>J1(e,o,r,f)},event(t,n){const e=n.ast,o=t.functions;return f=>J1(e,o,void 0,void 0,f)},handler(t,n){const e=n.ast,o=t.functions;return(f,r)=>{const a=r.item&&r.item.datum;return J1(e,o,f,a,r)}},encode(t,n){const{marktype:e,channels:o}=n,f=t.functions,r=e==="group"||e==="image"||e==="rect";return(a,u)=>{const c=a.datum;let i=0,s;for(const l in o)s=J1(o[l].ast,f,u,c,void 0,a),a[l]!==s&&(a[l]=s,i=1);return e!=="rule"&&r0e(a,o,r),i}}};const d0e="vega-lite",p0e='Dominik Moritz, Kanit "Ham" Wongsuphasawat, Arvind Satyanarayan, Jeffrey Heer',g0e="5.5.0",m0e=["Kanit Wongsuphasawat (http://kanitw.yellowpigz.com)","Dominik Moritz (https://www.domoritz.de)","Arvind Satyanarayan (https://arvindsatya.com)","Jeffrey Heer (https://jheer.org)"],v0e="https://vega.github.io/vega-lite/",y0e="Vega-Lite is a concise high-level language for interactive visualization.",x0e=["vega","chart","visualization"],b0e="build/vega-lite.js",_0e="build/vega-lite.min.js",w0e="build/vega-lite.min.js",k0e="build/src/index",T0e="build/src/index.d.ts",A0e={vl2png:"./bin/vl2png",vl2svg:"./bin/vl2svg",vl2pdf:"./bin/vl2pdf",vl2vg:"./bin/vl2vg"},M0e=["bin","build","src","vega-lite*","tsconfig.json"],S0e={changelog:"conventional-changelog -p angular -r 2",prebuild:"yarn clean:build",build:"yarn build:only","build:only":"tsc -p tsconfig.build.json && rollup -c","prebuild:examples":"yarn build:only","build:examples":"yarn data && TZ=America/Los_Angeles scripts/build-examples.sh","prebuild:examples-full":"yarn build:only","build:examples-full":"TZ=America/Los_Angeles scripts/build-examples.sh 1","build:example":"TZ=America/Los_Angeles scripts/build-example.sh","build:toc":"yarn build:jekyll && scripts/generate-toc","build:site":"rollup -c site/rollup.config.js","build:jekyll":"pushd site && bundle exec jekyll build -q && popd","build:versions":"scripts/update-version.sh",clean:"yarn clean:build && del-cli 'site/data/*' 'examples/compiled/*.png' && find site/examples ! -name 'index.md' ! -name 'data' -type f -delete","clean:build":"del-cli 'build/*' !build/vega-lite-schema.json","predeploy:site":"yarn presite","deploy:site":"gh-pages -d site",data:"rsync -r node_modules/vega-datasets/data/* site/data",schema:"mkdir -p build && ts-json-schema-generator -f tsconfig.json -p src/index.ts -t TopLevelSpec --no-type-check --no-ref-encode > build/vega-lite-schema.json && yarn renameschema && cp build/vega-lite-schema.json site/_data/",renameschema:"scripts/rename-schema.sh",presite:"yarn data && yarn schema && yarn build:site && yarn build:versions && scripts/create-example-pages.sh",site:"yarn site:only","site:only":"pushd site && bundle exec jekyll serve -I -l && popd",prettierbase:"prettier '**/*.{md,css,yml}'",eslintbase:"eslint .",format:"yarn eslintbase --fix && yarn prettierbase --write",lint:"yarn eslintbase && yarn prettierbase --check",jest:"NODE_OPTIONS=--experimental-vm-modules npx jest",test:"yarn jest test/ && yarn lint && yarn schema && yarn jest examples/ && yarn test:runtime","test:cover":"yarn jest --collectCoverage test/","test:inspect":"node --inspect-brk --experimental-vm-modules ./node_modules/.bin/jest --runInBand test","test:runtime":"NODE_OPTIONS=--experimental-vm-modules TZ=America/Los_Angeles npx jest test-runtime/ --config test-runtime/jest-config.json","test:runtime:generate":"yarn build:only && del-cli test-runtime/resources && VL_GENERATE_TESTS=true yarn test:runtime",watch:"tsc -p tsconfig.build.json -w","watch:site":"yarn build:site -w","watch:test":"yarn jest --watch test/","watch:test:runtime":"NODE_OPTIONS=--experimental-vm-modules TZ=America/Los_Angeles npx jest --watch test-runtime/ --config test-runtime/jest-config.json",release:"yarn run prebuild && yarn build && yarn shipit",shipit:"auto shipit"},E0e={type:"git",url:"https://github.com/vega/vega-lite.git"},C0e="BSD-3-Clause",O0e={url:"https://github.com/vega/vega-lite/issues"},L0e={"@auto-it/conventional-commits":"^10.37.6","@auto-it/first-time-contributor":"^10.37.6","@babel/core":"^7.19.1","@babel/preset-env":"^7.19.1","@babel/preset-typescript":"^7.18.6","@rollup/plugin-alias":"^4.0.0","@rollup/plugin-babel":"^6.0.0","@rollup/plugin-commonjs":"^23.0.0","@rollup/plugin-json":"^4.1.0","@types/jest":"^27.4.1","@rollup/plugin-node-resolve":"^14.1.0","@types/chai":"^4.3.3","@types/d3":"^7.4.0","@types/mkdirp":"^1.0.2","@types/pako":"^2.0.0","@typescript-eslint/eslint-plugin":"^5.38.0","@typescript-eslint/parser":"^5.38.0",ajv:"^8.11.0","ajv-formats":"^2.1.1",auto:"^10.37.6",chai:"^4.3.6",cheerio:"^1.0.0-rc.12","conventional-changelog-cli":"^2.2.2",d3:"^7.6.1","del-cli":"^5.0.0",eslint:"^8.23.1","eslint-config-prettier":"^8.5.0","eslint-plugin-jest":"^27.0.4","eslint-plugin-prettier":"^4.2.1","gh-pages":"^4.0.0",jest:"^27.5.1","highlight.js":"^11.6.0","jest-dev-server":"^6.1.1",mkdirp:"^1.0.4",pako:"^2.0.4",prettier:"^2.7.1",puppeteer:"^15.0.0",rollup:"^2.79.1","rollup-plugin-bundle-size":"^1.0.3","rollup-plugin-sourcemaps":"^0.6.3","rollup-plugin-terser":"^7.0.2",serve:"^14.0.1",terser:"^5.15.0","ts-jest":"^29.0.1","ts-json-schema-generator":"^1.1.1","vega-cli":"^5.22.1",typescript:"~4.8.3","vega-datasets":"~2.5.1","vega-embed":"^6.21.0","vega-tooltip":"^0.28.0","yaml-front-matter":"^4.1.1"},P0e={"@types/clone":"~2.1.1",clone:"~2.1.2","fast-deep-equal":"~3.1.3","fast-json-stable-stringify":"~2.1.0","json-stringify-pretty-compact":"~3.0.0",tslib:"~2.4.0","vega-event-selector":"~3.0.0","vega-expression":"~5.0.0","vega-util":"~1.17.0",yargs:"~17.6.0"},D0e={vega:"^5.22.0"},I0e={node:">=12"};var z0e={name:d0e,author:p0e,version:g0e,collaborators:m0e,homepage:v0e,description:y0e,keywords:x0e,main:b0e,unpkg:_0e,jsdelivr:w0e,module:k0e,types:T0e,bin:A0e,files:M0e,scripts:S0e,repository:E0e,license:C0e,bugs:O0e,devDependencies:L0e,dependencies:P0e,peerDependencies:D0e,engines:I0e},yU={exports:{}};(function(t){var n=function(){function e(d,h){return h!=null&&d instanceof h}var o;try{o=Map}catch{o=function(){}}var f;try{f=Set}catch{f=function(){}}var r;try{r=Promise}catch{r=function(){}}function a(d,h,m,g,p){typeof h=="object"&&(m=h.depth,g=h.prototype,p=h.includeNonEnumerable,h=h.circular);var v=[],y=[],x=typeof Buffer<"u";typeof h>"u"&&(h=!0),typeof m>"u"&&(m=1/0);function w(k,b){if(k===null)return null;if(b===0)return k;var T,_;if(typeof k!="object")return k;if(e(k,o))T=new o;else if(e(k,f))T=new f;else if(e(k,r))T=new r(function(L,P){k.then(function(N){L(w(N,b-1))},function(N){P(w(N,b-1))})});else if(a.__isArray(k))T=[];else if(a.__isRegExp(k))T=new RegExp(k.source,l(k)),k.lastIndex&&(T.lastIndex=k.lastIndex);else if(a.__isDate(k))T=new Date(k.getTime());else{if(x&&Buffer.isBuffer(k))return Buffer.allocUnsafe?T=Buffer.allocUnsafe(k.length):T=new Buffer(k.length),k.copy(T),T;e(k,Error)?T=Object.create(k):typeof g>"u"?(_=Object.getPrototypeOf(k),T=Object.create(_)):(T=Object.create(g),_=g)}if(h){var M=v.indexOf(k);if(M!=-1)return y[M];v.push(k),y.push(T)}e(k,o)&&k.forEach(function(L,P){var N=w(P,b-1),B=w(L,b-1);T.set(N,B)}),e(k,f)&&k.forEach(function(L){var P=w(L,b-1);T.add(P)});for(var A in k){var S;_&&(S=Object.getOwnPropertyDescriptor(_,A)),!(S&&S.set==null)&&(T[A]=w(k[A],b-1))}if(Object.getOwnPropertySymbols)for(var E=Object.getOwnPropertySymbols(k),A=0;Arm(e,n))}:pE(t)?{or:t.or.map(e=>rm(e,n))}:n(t)}const Uf=xU,ha=R0e;function bU(t){throw new Error(t)}function Am(t,n){const e={};for(const o of n)qi(t,o)&&(e[o]=t[o]);return e}function Eu(t,n){const e=Object.assign({},t);for(const o of n)delete e[o];return e}Set.prototype.toJSON=function(){return`Set(${[...this].map(t=>dE(t)).join(",")})`};const No=dE;function Ba(t){if(wo(t))return t;const n=bi(t)?t:dE(t);if(n.length<250)return n;let e=0;for(let o=0;ou===0?a:`[${a}]`),r=f.map((a,u)=>f.slice(0,u+1).join(""));for(const a of r)n.add(a)}return n}function xE(t,n){return t===void 0||n===void 0?!0:yE(FT(t),FT(n))}function _o(t){return Xr(t).length===0}const Xr=Object.keys,ql=Object.values,rp=Object.entries;function fy(t){return t===!0||t===!1}function Xo(t){const n=t.replace(/\W/g,"_");return(t.match(/^\d+/)?"_":"")+n}function Nv(t,n){return mE(t)?`!(${Nv(t.not,n)})`:gE(t)?`(${t.and.map(e=>Nv(e,n)).join(") && (")})`:pE(t)?`(${t.or.map(e=>Nv(e,n)).join(") || (")})`:n(t)}function k2(t,n){if(n.length===0)return!0;const e=n.shift();return e in t&&k2(t[e],n)&&delete t[e],_o(t)}function Qy(t){return t.charAt(0).toUpperCase()+t.substr(1)}function bE(t,n="datum"){const e=ih(t),o=[];for(let f=1;f<=e.length;f++){const r=`[${e.slice(0,f).map(oi).join("][")}]`;o.push(`${n}${r}`)}return o.join(" && ")}function kU(t,n="datum"){return`${n}[${oi(ih(t).join("."))}]`}function B0e(t){return t.replace(/(\[|\]|\.|'|")/g,"\\$1")}function bc(t){return`${ih(t).map(B0e).join("\\.")}`}function P0(t,n,e){return t.replace(new RegExp(n.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"g"),e)}function _E(t){return`${ih(t).join(".")}`}function Mm(t){return t?ih(t).length:0}function Rs(...t){for(const n of t)if(n!==void 0)return n}let TU=42;function AU(t){const n=++TU;return t?String(t)+n:n}function j0e(){TU=42}function MU(t){return SU(t)?t:`__${t}`}function SU(t){return t.startsWith("__")}function hy(t){if(t!==void 0)return(t%360+360)%360}function Qw(t){return wo(t)?!0:!isNaN(t)&&!isNaN(parseFloat(t))}var ex=globalThis&&globalThis.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);fs3(t[n])?Xo(`_${n}_${rp(t[n])}`):Xo(`_${n}_${t[n]}`)).join("")}function Bo(t){return t===!0||K0(t)&&!t.binned}function xl(t){return t==="binned"||K0(t)&&t.binned===!0}function K0(t){return Ei(t)}function s3(t){return t?.param}function WL(t){switch(t){case Vh:case qh:case nd:case zu:case hh:case dh:case yp:case rd:case mp:case vp:case Ru:return 6;case xp:return 4;default:return 10}}function ix(t){return!!t?.expr}function Tu(t){const n=Xr(t||{}),e={};for(const o of n)e[o]=Xu(t[o]);return e}var hge=globalThis&&globalThis.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);f{var f;return e.field.push(hi(o,n)),e.order.push((f=o.sort)!==null&&f!==void 0?f:"ascending"),e},{field:[],order:[]})}function GU(t,n){const e=[...t];return n.forEach(o=>{for(const f of e)if(Uf(f,o))return;e.push(o)}),e}function WU(t,n){return Uf(t,n)||!n?t:t?[...ki(t),...ki(n)].join(", "):n}function YU(t,n){const e=t.value,o=n.value;if(e==null||o===null)return{explicit:t.explicit,value:null};if((Ad(e)||Vi(e))&&(Ad(o)||Vi(o)))return{explicit:t.explicit,value:WU(e,o)};if(Ad(e)||Vi(e))return{explicit:t.explicit,value:e};if(Ad(o)||Vi(o))return{explicit:t.explicit,value:o};if(!Ad(e)&&!Vi(e)&&!Ad(o)&&!Vi(o))return{explicit:t.explicit,value:GU(e,o)};throw new Error("It should never reach here")}function OE(t){return`Invalid specification ${No(t)}. Make sure the specification includes at least one of the following properties: "mark", "layer", "facet", "hconcat", "vconcat", "concat", or "repeat".`}const bge='Autosize "fit" only works for single views and layered views.';function ZL(t){return`${t=="width"?"Width":"Height"} "container" only works for single views and layered views.`}function JL(t){const n=t=="width"?"Width":"Height",e=t=="width"?"x":"y";return`${n} "container" only works well with autosize "fit" or "fit-${e}".`}function KL(t){return t?`Dropping "fit-${t}" because spec has discrete ${Fu(t)}.`:'Dropping "fit" because spec has discrete size.'}function LE(t){return`Unknown field for ${t}. Cannot calculate view size.`}function QL(t){return`Cannot project a selection on encoding channel "${t}", which has no field.`}function _ge(t,n){return`Cannot project a selection on encoding channel "${t}" as it uses an aggregate function ("${n}").`}function wge(t){return`The "nearest" transform is not supported for ${t} marks.`}function XU(t){return`Selection not supported for ${t} yet.`}function kge(t){return`Cannot find a selection named "${t}".`}const Tge="Scale bindings are currently only supported for scales with unbinned, continuous domains.",Age="Legend bindings are only supported for selections over an individual field or encoding channel.";function Mge(t){return`Lookups can only be performed on selection parameters. "${t}" is a variable parameter.`}function Sge(t){return`Cannot define and lookup the "${t}" selection in the same view. Try moving the lookup into a second, layered view?`}const Ege="The same selection must be used to override scale domains in a layered view.",Cge='Interval selections should be initialized using "x" and/or "y" keys.';function Oge(t){return`Unknown repeated value "${t}".`}function eP(t){return`The "columns" property cannot be used when "${t}" has nested row/column.`}const Lge="Axes cannot be shared in concatenated or repeated views yet (https://github.com/vega/vega-lite/issues/2415).";function Pge(t){return`Unrecognized parse "${t}".`}function tP(t,n,e){return`An ancestor parsed field "${t}" as ${e} but a child wants to parse the field as ${n}.`}const Dge="Attempt to add the same child twice.";function Ige(t){return`Ignoring an invalid transform: ${No(t)}.`}const zge='If "from.fields" is not specified, "as" has to be a string that specifies the key to be used for the data from the secondary source.';function nP(t){return`Config.customFormatTypes is not true, thus custom format type and format for channel ${t} are dropped.`}function Rge(t){const{parentProjection:n,projection:e}=t;return`Layer's shared projection ${No(n)} is overridden by a child projection ${No(e)}.`}const Fge="Arc marks uses theta channel rather than angle, replacing angle with theta.";function Nge(t){return`${t}Offset dropped because ${t} is continuous`}function Bge(t){return`There is no ${t} encoding. Replacing ${t}Offset encoding as ${t}.`}function jge(t,n,e){return`Channel ${t} is a ${n}. Converted to {value: ${No(e)}}.`}function ZU(t){return`Invalid field type "${t}".`}function Uge(t,n){return`Invalid field type "${t}" for aggregate: "${n}", using "quantitative" instead.`}function Vge(t){return`Invalid aggregation operator "${t}".`}function JU(t,n){const{fill:e,stroke:o}=n;return`Dropping color ${t} as the plot also has ${e&&o?"fill and stroke":e?"fill":"stroke"}.`}function qge(t){return`Position range does not support relative band size for ${t}.`}function BT(t,n){return`Dropping ${No(t)} from channel "${n}" since it does not contain any data field, datum, value, or signal.`}const Hge="Line marks cannot encode size with a non-groupby field. You may want to use trail marks instead.";function l3(t,n,e){return`${t} dropped as it is incompatible with "${n}"${e?` when ${e}`:""}.`}function $ge(t){return`${t} encoding has no scale, so specified scale is ignored.`}function Gge(t){return`${t}-encoding is dropped as ${t} is not a valid encoding channel.`}function Wge(t){return`${t} encoding should be discrete (ordinal / nominal / binned).`}function Yge(t){return`${t} encoding should be discrete (ordinal / nominal / binned) or use a discretizing scale (e.g. threshold).`}function Xge(t){return`Facet encoding dropped as ${t.join(" and ")} ${t.length>1?"are":"is"} also specified.`}function C4(t,n){return`Using discrete channel "${t}" to encode "${n}" field can be misleading as it does not encode ${n==="ordinal"?"order":"magnitude"}.`}function Zge(t){return`The ${t} for range marks cannot be an expression`}function Jge(t,n){return`Line mark is for continuous lines and thus cannot be used with ${t&&n?"x2 and y2":t?"x2":"y2"}. We will use the rule mark (line segments) instead.`}function Kge(t,n){return`Specified orient "${t}" overridden with "${n}".`}function Qge(t){return`Cannot use the scale property "${t}" with non-color channel.`}function eme(t){return`Cannot use the relative band size with ${t} scale.`}function tme(t){return`Using unaggregated domain with raw field has no effect (${No(t)}).`}function nme(t){return`Unaggregated domain not applicable for "${t}" since it produces values outside the origin domain of the source data.`}function rme(t){return`Unaggregated domain is currently unsupported for log scale (${No(t)}).`}function ime(t){return`Cannot apply size to non-oriented mark "${t}".`}function ame(t,n,e){return`Channel "${t}" does not work with "${n}" scale. We are using "${e}" scale instead.`}function ome(t,n){return`FieldDef does not work with "${t}" scale. We are using "${n}" scale instead.`}function KU(t,n,e){return`${e}-scale's "${n}" is dropped as it does not work with ${t} scale.`}function QU(t){return`The step for "${t}" is dropped because the ${t==="width"?"x":"y"} is continuous.`}function sme(t,n,e,o){return`Conflicting ${n.toString()} property "${t.toString()}" (${No(e)} and ${No(o)}). Using ${No(e)}.`}function lme(t,n,e,o){return`Conflicting ${n.toString()} property "${t.toString()}" (${No(e)} and ${No(o)}). Using the union of the two domains.`}function ume(t){return`Setting the scale to be independent for "${t}" means we also have to set the guide (axis or legend) to be independent.`}function cme(t){return`Dropping sort property ${No(t)} as unioned domains only support boolean or op "count", "min", and "max".`}const rP="Domains that should be unioned has conflicting sort properties. Sort will be set to true.",fme="Detected faceted independent scales that union domain of multiple fields from different data sources. We will use the first field. The result view size may be incorrect.",hme="Detected faceted independent scales that union domain of the same fields from different source. We will assume that this is the same field from a different fork of the same data source. However, if this is not the case, the result view size may be incorrect.",dme="Detected faceted independent scales that union domain of multiple fields from the same data source. We will use the first field. The result view size may be incorrect.";function pme(t){return`Cannot stack "${t}" if there is already "${t}2".`}function gme(t){return`Cannot stack non-linear scale (${t}).`}function mme(t){return`Stacking is applied even though the aggregate function is non-summative ("${t}").`}function A2(t,n){return`Invalid ${t}: ${No(n)}.`}function vme(t){return`Dropping day from datetime ${No(t)} as day cannot be combined with other units.`}function yme(t,n){return`${n?"extent ":""}${n&&t?"and ":""}${t?"center ":""}${n&&t?"are ":"is "}not needed when data are aggregated.`}function xme(t,n,e){return`${t} is not usually used with ${n} for ${e}.`}function bme(t,n){return`Continuous axis should not have customized aggregation function ${t}; ${n} already agregates the axis.`}function iP(t){return`1D error band does not support ${t}.`}function eV(t){return`Channel ${t} is required for "binned" bin.`}function _me(t){return`Channel ${t} should not be used with "binned" bin.`}function wme(t){return`Domain for ${t} is required for threshold scale.`}globalThis&&globalThis.__classPrivateFieldSet;globalThis&&globalThis.__classPrivateFieldGet;const tV=TA(kA);let Sm=tV;function kme(t){return Sm=t,Sm}function Tme(){return Sm=tV,Sm}function Kr(...t){Sm.warn(...t)}function Ame(...t){Sm.debug(...t)}function Q0(t){if(t&&Ei(t)){for(const n of DE)if(n in t)return!0}return!1}const nV=["january","february","march","april","may","june","july","august","september","october","november","december"],Mme=nV.map(t=>t.substr(0,3)),rV=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],Sme=rV.map(t=>t.substr(0,3));function Eme(t){if(Qw(t)&&(t=+t),wo(t))return t>4&&Kr(A2("quarter",t)),t-1;throw new Error(A2("quarter",t))}function Cme(t){if(Qw(t)&&(t=+t),wo(t))return t-1;{const n=t.toLowerCase(),e=nV.indexOf(n);if(e!==-1)return e;const o=n.substr(0,3),f=Mme.indexOf(o);if(f!==-1)return f;throw new Error(A2("month",t))}}function Ome(t){if(Qw(t)&&(t=+t),wo(t))return t%7;{const n=t.toLowerCase(),e=rV.indexOf(n);if(e!==-1)return e;const o=n.substr(0,3),f=Sme.indexOf(o);if(f!==-1)return f;throw new Error(A2("day",t))}}function PE(t,n){const e=[];if(n&&t.day!==void 0&&Xr(t).length>1&&(Kr(vme(t)),t=ha(t),delete t.day),t.year!==void 0?e.push(t.year):e.push(2012),t.month!==void 0){const o=n?Cme(t.month):t.month;e.push(o)}else if(t.quarter!==void 0){const o=n?Eme(t.quarter):t.quarter;e.push(wo(o)?o*3:`${o}*3`)}else e.push(0);if(t.date!==void 0)e.push(t.date);else if(t.day!==void 0){const o=n?Ome(t.day):t.day;e.push(wo(o)?o+1:`${o}+1`)}else e.push(1);for(const o of["hours","minutes","seconds","milliseconds"]){const f=t[o];e.push(typeof f>"u"?0:f)}return e}function dy(t){const e=PE(t,!0).join(", ");return t.utc?`utc(${e})`:`datetime(${e})`}function Lme(t){const e=PE(t,!1).join(", ");return t.utc?`utc(${e})`:`datetime(${e})`}function Pme(t){const n=PE(t,!0);return t.utc?+new Date(Date.UTC(...n)):+new Date(...n)}var Dme=globalThis&&globalThis.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);faV(t,n))}function aV(t,n){const e=t.indexOf(n);return!(e<0||e>0&&n==="seconds"&&t.charAt(e-1)==="i"||t.length>e+3&&n==="day"&&t.charAt(e+3)==="o"||e>0&&n==="year"&&t.charAt(e-1)==="f")}function Fme(t,n,{end:e}={end:!1}){const o=bE(n),f=IE(t)?"utc":"";function r(c){return c==="quarter"?`(${f}quarter(${o})-1)`:`${f}${c}(${o})`}let a;const u={};for(const c of DE)aV(t,c)&&(u[c]=r(c),a=c);return e&&(u[a]+="+1"),Lme(u)}function oV(t){if(!t)return;const n=zE(t);return`timeUnitSpecifier(${No(n)}, ${No(Rme)})`}function Nme(t,n,e){if(!t)return;const o=oV(t);return`${e||IE(t)?"utc":"time"}Format(${n}, ${o})`}function Gl(t){if(!t)return;let n;return bi(t)?n={unit:t}:Ei(t)&&(n=Object.assign(Object.assign({},t),t.unit?{unit:t.unit}:{})),IE(n.unit)&&(n.utc=!0,n.unit=zme(n.unit)),n}function Bme(t){const n=Gl(t),{utc:e}=n,o=Dme(n,["utc"]);return o.unit?(e?"utc":"")+Xr(o).map(f=>Xo(`${f==="unit"?"":`_${f}_`}${o[f]}`)).join(""):(e?"utc":"")+"timeunit"+Xr(o).map(f=>Xo(`_${f}_${o[f]}`)).join("")}function jme(t){return t?.param}function RE(t){return!!t?.field&&t.equal!==void 0}function FE(t){return!!t?.field&&t.lt!==void 0}function NE(t){return!!t?.field&&t.lte!==void 0}function BE(t){return!!t?.field&&t.gt!==void 0}function jE(t){return!!t?.field&&t.gte!==void 0}function UE(t){if(t?.field){if(Ir(t.range)&&t.range.length===2)return!0;if(Vi(t.range))return!0}return!1}function VE(t){return!!t?.field&&(Ir(t.oneOf)||Ir(t.in))}function Ume(t){return!!t?.field&&t.valid!==void 0}function sV(t){return VE(t)||RE(t)||UE(t)||FE(t)||BE(t)||NE(t)||jE(t)}function Pf(t,n){return y3(t,{timeUnit:n,wrapTime:!0})}function Vme(t,n){return t.map(e=>Pf(e,n))}function lV(t,n=!0){var e;const{field:o}=t,f=(e=Gl(t.timeUnit))===null||e===void 0?void 0:e.unit,r=f?`time(${Fme(f,o)})`:hi(t,{expr:"datum"});if(RE(t))return`${r}===${Pf(t.equal,f)}`;if(FE(t)){const a=t.lt;return`${r}<${Pf(a,f)}`}else if(BE(t)){const a=t.gt;return`${r}>${Pf(a,f)}`}else if(NE(t)){const a=t.lte;return`${r}<=${Pf(a,f)}`}else if(jE(t)){const a=t.gte;return`${r}>=${Pf(a,f)}`}else{if(VE(t))return`indexof([${Vme(t.oneOf,f).join(",")}], ${r}) !== -1`;if(Ume(t))return qE(r,t.valid);if(UE(t)){const{range:a}=t,u=Vi(a)?{signal:`${a.signal}[0]`}:a[0],c=Vi(a)?{signal:`${a.signal}[1]`}:a[1];if(u!==null&&c!==null&&n)return"inrange("+r+", ["+Pf(u,f)+", "+Pf(c,f)+"])";const i=[];return u!==null&&i.push(`${r} >= ${Pf(u,f)}`),c!==null&&i.push(`${r} <= ${Pf(c,f)}`),i.length>0?i.join(" && "):"true"}}throw new Error(`Invalid field predicate: ${No(t)}`)}function qE(t,n=!0){return n?`isValid(${t}) && isFinite(+${t})`:`!isValid(${t}) || !isFinite(+${t})`}function qme(t){var n;return sV(t)&&t.timeUnit?Object.assign(Object.assign({},t),{timeUnit:(n=Gl(t.timeUnit))===null||n===void 0?void 0:n.unit}):t}const ax={quantitative:"quantitative",ordinal:"ordinal",temporal:"temporal",nominal:"nominal",geojson:"geojson"};function Hme(t){return t==="quantitative"||t==="temporal"}function uV(t){return t==="ordinal"||t==="nominal"}const z0=ax.quantitative,HE=ax.ordinal,Em=ax.temporal,$E=ax.nominal,n1=ax.geojson;function $me(t){if(t)switch(t=t.toLowerCase(),t){case"q":case z0:return"quantitative";case"t":case Em:return"temporal";case"o":case HE:return"ordinal";case"n":case $E:return"nominal";case n1:return"geojson"}}var Gme=globalThis&&globalThis.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);f{switch(n.fieldTitle){case"plain":return t.field;case"functional":return F1e(t);default:return R1e(t,n)}};let zV=IV;function RV(t){zV=t}function N1e(){RV(IV)}function am(t,n,{allowDisabling:e,includeDefault:o=!0}){var f,r;const a=(f=t8(t))===null||f===void 0?void 0:f.title;if(!ti(t))return a??t.title;const u=t,c=o?n8(u,n):void 0;return e?Rs(a,u.title,c):(r=a??u.title)!==null&&r!==void 0?r:c}function t8(t){if(Lm(t)&&t.axis)return t.axis;if(PV(t)&&t.legend)return t.legend;if(QE(t)&&t.header)return t.header}function n8(t,n){return zV(t,n)}function C2(t){var n;if(DV(t)){const{format:e,formatType:o}=t;return{format:e,formatType:o}}else{const e=(n=t8(t))!==null&&n!==void 0?n:{},{format:o,formatType:f}=e;return{format:o,formatType:f}}}function B1e(t,n){var e;switch(n){case"latitude":case"longitude":return"quantitative";case"row":case"column":case"facet":case"shape":case"strokeDash":return"nominal";case"order":return"ordinal"}if(e8(t)&&Ir(t.sort))return"ordinal";const{aggregate:o,bin:f,timeUnit:r}=t;if(r)return"temporal";if(f||o&&!_p(o)&&!Xh(o))return"quantitative";if(eg(t)&&((e=t.scale)===null||e===void 0?void 0:e.type))switch(jT[t.scale.type]){case"numeric":case"discretizing":return"quantitative";case"time":return"temporal"}return"nominal"}function th(t){if(ti(t))return t;if(m3(t))return t.condition}function Ws(t){if(la(t))return t;if(lx(t))return t.condition}function FV(t,n,e,o={}){if(bi(t)||wo(t)||fp(t)){const f=bi(t)?"string":wo(t)?"number":"boolean";return Kr(jge(n,f,t)),{value:t}}return la(t)?O2(t,n,e,o):lx(t)?Object.assign(Object.assign({},t),{condition:O2(t.condition,n,e,o)}):t}function O2(t,n,e,o){if(DV(t)){const{format:f,formatType:r}=t,a=qT(t,["format","formatType"]);if(F0(r)&&!e.customFormatTypes)return Kr(nP(n)),O2(a,n,e,o)}else{const f=Lm(t)?"axis":PV(t)?"legend":QE(t)?"header":null;if(f&&t[f]){const r=t[f],{format:a,formatType:u}=r,c=qT(r,["format","formatType"]);if(F0(u)&&!e.customFormatTypes)return Kr(nP(n)),O2(Object.assign(Object.assign({},t),{[f]:c}),n,e,o)}}return ti(t)?r8(t,n,o):j1e(t)}function j1e(t){let n=t.type;if(n)return t;const{datum:e}=t;return n=wo(e)?"quantitative":bi(e)?"nominal":Q0(e)?"temporal":void 0,Object.assign(Object.assign({},t),{type:n})}function r8(t,n,{compositeMark:e=!1}={}){const{aggregate:o,timeUnit:f,bin:r,field:a}=t,u=Object.assign({},t);if(!e&&o&&!EE(o)&&!_p(o)&&!Xh(o)&&(Kr(Vge(o)),delete u.aggregate),f&&(u.timeUnit=Gl(f)),a&&(u.field=`${a}`),Bo(r)&&(u.bin=v3(r,n)),xl(r)&&!sl(n)&&Kr(_me(n)),wc(u)){const{type:c}=u,i=$me(c);c!==i&&(u.type=i),c!=="quantitative"&&BU(o)&&(Kr(Uge(c,o)),u.type="quantitative")}else if(!PU(n)){const c=B1e(u,n);u.type=c}if(wc(u)){const{compatible:c,warning:i}=U1e(u,n)||{};c===!1&&Kr(i)}if(e8(u)&&bi(u.sort)){const{sort:c}=u;if(lP(c))return Object.assign(Object.assign({},u),{sort:{encoding:c}});const i=c.substr(1);if(c.charAt(0)==="-"&&lP(i))return Object.assign(Object.assign({},u),{sort:{encoding:i,order:"descending"}})}if(QE(u)){const{header:c}=u;if(c){const{orient:i}=c,s=qT(c,["orient"]);if(i)return Object.assign(Object.assign({},u),{header:Object.assign(Object.assign({},s),{labelOrient:c.labelOrient||i,titleOrient:c.titleOrient||i})})}}return u}function v3(t,n){return fp(t)?{maxbins:WL(n)}:t==="binned"?{binned:!0}:!t.maxbins&&!t.step?Object.assign(Object.assign({},t),{maxbins:WL(n)}):t}const Bg={compatible:!0};function U1e(t,n){const e=t.type;if(e==="geojson"&&n!=="shape")return{compatible:!1,warning:`Channel ${n} should not be used with a geojson data.`};switch(n){case Vh:case qh:case e3:return E2(t)?Bg:{compatible:!1,warning:Wge(n)};case cs:case ol:case gp:case e1:case zu:case hh:case dh:case tx:case rx:case t3:case D0:case n3:case r3:case Z0:case Tc:case xf:case i3:return Bg;case fh:case _c:case ch:case bf:return e!==z0?{compatible:!1,warning:`Channel ${n} should be used with a quantitative field only, not ${t.type} field.`}:Bg;case rd:case mp:case vp:case yp:case nd:case td:case ed:case yf:case uh:return e==="nominal"&&!t.sort?{compatible:!1,warning:`Channel ${n} should not be used with an unsorted discrete field.`}:Bg;case Ru:case xp:return!E2(t)&&!I1e(t)?{compatible:!1,warning:Yge(n)}:Bg;case nx:return t.type==="nominal"&&!("sort"in t)?{compatible:!1,warning:"Channel order is inappropriate for nominal field, which has no inherent order."}:Bg}}function Pm(t){const{formatType:n}=C2(t);return n==="time"||!n&&V1e(t)}function V1e(t){return t&&(t.type==="temporal"||ti(t)&&!!t.timeUnit)}function y3(t,{timeUnit:n,type:e,wrapTime:o,undefinedIfExprNotRequired:f}){var r;const a=n&&((r=Gl(n))===null||r===void 0?void 0:r.unit);let u=a||e==="temporal",c;return ix(t)?c=t.expr:Vi(t)?c=t.signal:Q0(t)?(u=!0,c=dy(t)):(bi(t)||wo(t))&&u&&(c=`datetime(${No(t)})`,Ime(a)&&(wo(t)&&t<1e4||bi(t)&&isNaN(Date.parse(t)))&&(c=dy({[a]:t}))),c?o&&u?`time(${c})`:c:f?void 0:No(t)}function NV(t,n){const{type:e}=t;return n.map(o=>{const f=y3(o,{timeUnit:ti(t)?t.timeUnit:void 0,type:e,undefinedIfExprNotRequired:!0});return f!==void 0?{signal:f}:o})}function ux(t,n){return Bo(t.bin)?bp(n)&&["ordinal","nominal"].includes(t.type):(console.warn("Only call this method for binned field defs."),!1)}const cP={labelAlign:{part:"labels",vgProp:"align"},labelBaseline:{part:"labels",vgProp:"baseline"},labelColor:{part:"labels",vgProp:"fill"},labelFont:{part:"labels",vgProp:"font"},labelFontSize:{part:"labels",vgProp:"fontSize"},labelFontStyle:{part:"labels",vgProp:"fontStyle"},labelFontWeight:{part:"labels",vgProp:"fontWeight"},labelOpacity:{part:"labels",vgProp:"opacity"},labelOffset:null,labelPadding:null,gridColor:{part:"grid",vgProp:"stroke"},gridDash:{part:"grid",vgProp:"strokeDash"},gridDashOffset:{part:"grid",vgProp:"strokeDashOffset"},gridOpacity:{part:"grid",vgProp:"opacity"},gridWidth:{part:"grid",vgProp:"strokeWidth"},tickColor:{part:"ticks",vgProp:"stroke"},tickDash:{part:"ticks",vgProp:"strokeDash"},tickDashOffset:{part:"ticks",vgProp:"strokeDashOffset"},tickOpacity:{part:"ticks",vgProp:"opacity"},tickSize:null,tickWidth:{part:"ticks",vgProp:"strokeWidth"}};function cx(t){return t?.condition}const BV=["domain","grid","labels","ticks","title"],q1e={grid:"grid",gridCap:"grid",gridColor:"grid",gridDash:"grid",gridDashOffset:"grid",gridOpacity:"grid",gridScale:"grid",gridWidth:"grid",orient:"main",bandPosition:"both",aria:"main",description:"main",domain:"main",domainCap:"main",domainColor:"main",domainDash:"main",domainDashOffset:"main",domainOpacity:"main",domainWidth:"main",format:"main",formatType:"main",labelAlign:"main",labelAngle:"main",labelBaseline:"main",labelBound:"main",labelColor:"main",labelFlush:"main",labelFlushOffset:"main",labelFont:"main",labelFontSize:"main",labelFontStyle:"main",labelFontWeight:"main",labelLimit:"main",labelLineHeight:"main",labelOffset:"main",labelOpacity:"main",labelOverlap:"main",labelPadding:"main",labels:"main",labelSeparation:"main",maxExtent:"main",minExtent:"main",offset:"both",position:"main",tickCap:"main",tickColor:"main",tickDash:"main",tickDashOffset:"main",tickMinStep:"both",tickOffset:"both",tickOpacity:"main",tickRound:"both",ticks:"main",tickSize:"main",tickWidth:"both",title:"main",titleAlign:"main",titleAnchor:"main",titleAngle:"main",titleBaseline:"main",titleColor:"main",titleFont:"main",titleFontSize:"main",titleFontStyle:"main",titleFontWeight:"main",titleLimit:"main",titleLineHeight:"main",titleOpacity:"main",titlePadding:"main",titleX:"main",titleY:"main",encode:"both",scale:"both",tickBand:"both",tickCount:"both",tickExtra:"both",translate:"both",values:"both",zindex:"both"},jV={orient:1,aria:1,bandPosition:1,description:1,domain:1,domainCap:1,domainColor:1,domainDash:1,domainDashOffset:1,domainOpacity:1,domainWidth:1,format:1,formatType:1,grid:1,gridCap:1,gridColor:1,gridDash:1,gridDashOffset:1,gridOpacity:1,gridWidth:1,labelAlign:1,labelAngle:1,labelBaseline:1,labelBound:1,labelColor:1,labelFlush:1,labelFlushOffset:1,labelFont:1,labelFontSize:1,labelFontStyle:1,labelFontWeight:1,labelLimit:1,labelLineHeight:1,labelOffset:1,labelOpacity:1,labelOverlap:1,labelPadding:1,labels:1,labelSeparation:1,maxExtent:1,minExtent:1,offset:1,position:1,tickBand:1,tickCap:1,tickColor:1,tickCount:1,tickDash:1,tickDashOffset:1,tickExtra:1,tickMinStep:1,tickOffset:1,tickOpacity:1,tickRound:1,ticks:1,tickSize:1,tickWidth:1,title:1,titleAlign:1,titleAnchor:1,titleAngle:1,titleBaseline:1,titleColor:1,titleFont:1,titleFontSize:1,titleFontStyle:1,titleFontWeight:1,titleLimit:1,titleLineHeight:1,titleOpacity:1,titlePadding:1,titleX:1,titleY:1,translate:1,values:1,zindex:1},H1e=Object.assign(Object.assign({},jV),{style:1,labelExpr:1,encoding:1});function fP(t){return!!H1e[t]}const $1e={axis:1,axisBand:1,axisBottom:1,axisDiscrete:1,axisLeft:1,axisPoint:1,axisQuantitative:1,axisRight:1,axisTemporal:1,axisTop:1,axisX:1,axisXBand:1,axisXDiscrete:1,axisXPoint:1,axisXQuantitative:1,axisXTemporal:1,axisY:1,axisYBand:1,axisYDiscrete:1,axisYPoint:1,axisYQuantitative:1,axisYTemporal:1},UV=Xr($1e);function id(t){return"mark"in t}class x3{constructor(n,e){this.name=n,this.run=e}hasMatchingType(n){return id(n)?_1e(n.mark)===this.name:!1}}var G1e=globalThis&&globalThis.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);f!!o.field):ti(e)||m3(e):!1}function VV(t,n){const e=t&&t[n];return e?Ir(e)?L0(e,o=>!!o.field):ti(e)||mh(e)||lx(e):!1}function $T(t,n){if(sl(n)){const e=t[n];if((ti(e)||mh(e))&&uV(e.type)){const o=DU(n);return VV(t,o)}}return!1}function i8(t){return L0($0e,n=>{if(y0(t,n)){const e=t[n];if(Ir(e))return L0(e,o=>!!o.aggregate);{const o=th(e);return o&&!!o.aggregate}}return!1})}function qV(t,n){const e=[],o=[],f=[],r=[],a={};return a8(t,(u,c)=>{if(ti(u)){const{field:i,aggregate:s,bin:l,timeUnit:d}=u,h=G1e(u,["field","aggregate","bin","timeUnit"]);if(s||d||l){const m=t8(u),g=m?.title;let p=hi(u,{forAs:!0});const v=Object.assign(Object.assign(Object.assign({},g?[]:{title:am(u,n,{allowDisabling:!0})}),h),{field:p});if(s){let y;if(_p(s)?(y="argmax",p=hi({op:"argmax",field:s.argmax},{forAs:!0}),v.field=`${p}.${i}`):Xh(s)?(y="argmin",p=hi({op:"argmin",field:s.argmin},{forAs:!0}),v.field=`${p}.${i}`):s!=="boxplot"&&s!=="errorbar"&&s!=="errorband"&&(y=s),y){const x={op:y,as:p};i&&(x.field=i),r.push(x)}}else if(e.push(p),wc(u)&&Bo(l)){if(o.push({bin:l,field:i,as:p}),e.push(hi(u,{binSuffix:"end"})),ux(u,c)&&e.push(hi(u,{binSuffix:"range"})),sl(c)){const y={field:`${p}_end`};a[`${c}2`]=y}v.bin="binned",PU(c)||(v.type=z0)}else if(d){f.push({timeUnit:d,field:i,as:p});const y=wc(u)&&u.type!==Em&&"time";y&&(c===tx||c===D0?v.formatType=y:tge(c)?v.legend=Object.assign({formatType:y},v.legend):sl(c)&&(v.axis=Object.assign({formatType:y},v.axis)))}a[c]=v}else e.push(i),a[c]=t[c]}else a[c]=t[c]}),{bins:o,timeUnits:f,aggregate:r,groupby:e,encoding:a}}function W1e(t,n,e){const o=rge(n,e);if(o){if(o==="binned"){const f=t[n===yf?cs:ol];return!!(ti(f)&&ti(t[n])&&xl(f.bin))}}else return!1;return!0}function Y1e(t,n,e,o){const f={};for(const r of Xr(t))LU(r)||Kr(Gge(r));for(let r of J0e){if(!t[r])continue;const a=t[r];if(t1(r)){const u=IU(r),c=f[u];if(ti(c)){if(Hme(c.type)&&ti(a)){Kr(Nge(u));continue}}else r=u,Kr(Bge(u))}if(r==="angle"&&n==="arc"&&!t.theta&&(Kr(Fge),r=Tc),!W1e(t,r,n)){Kr(l3(r,n));continue}if(r===nd&&n==="line"){const u=th(t[r]);if(u?.aggregate){Kr(Hge);continue}}if(r===zu&&(e?"fill"in t:"stroke"in t)){Kr(JU("encoding",{fill:"fill"in t,stroke:"stroke"in t}));continue}if(r===rx||r===nx&&!Ir(a)&&!pf(a)||r===D0&&Ir(a))a&&(f[r]=ki(a).reduce((u,c)=>(ti(c)?u.push(r8(c,r)):Kr(BT(c,r)),u),[]));else{if(r===D0&&a===null)f[r]=null;else if(!ti(a)&&!mh(a)&&!pf(a)&&!g3(a)&&!Vi(a)){Kr(BT(a,r));continue}f[r]=FV(a,r,o)}}return f}function b3(t,n){const e={};for(const o of Xr(t)){const f=FV(t[o],o,n,{compositeMark:!0});e[o]=f}return e}function X1e(t){const n=[];for(const e of Xr(t))if(y0(t,e)){const o=t[e],f=ki(o);for(const r of f)ti(r)?n.push(r):m3(r)&&n.push(r.condition)}return n}function a8(t,n,e){if(!!t)for(const o of Xr(t)){const f=t[o];if(Ir(f))for(const r of f)n.call(e,r,o);else n.call(e,f,o)}}function Z1e(t,n,e,o){return t?Xr(t).reduce((f,r)=>{const a=t[r];return Ir(a)?a.reduce((u,c)=>n.call(o,u,c,r),f):n.call(o,f,a,r)},e):e}function HV(t,n){return Xr(n).reduce((e,o)=>{switch(o){case cs:case ol:case n3:case i3:case r3:case yf:case uh:case gp:case e1:case Tc:case td:case xf:case ed:case ch:case fh:case bf:case _c:case tx:case Ru:case Z0:case D0:return e;case nx:if(t==="line"||t==="trail")return e;case rx:case t3:{const f=n[o];if(Ir(f)||ti(f))for(const r of ki(f))r.aggregate||e.push(hi(r,{}));return e}case nd:if(t==="trail")return e;case zu:case hh:case dh:case rd:case mp:case vp:case xp:case yp:{const f=th(n[o]);return f&&!f.aggregate&&e.push(hi(f,{})),e}}},[])}var $V=globalThis&&globalThis.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);f{const c=o?` of ${o8(n)}`:"";return{field:a+n.field,type:n.type,title:Vi(u)?{signal:`${u}"${escape(c)}"`}:u+c}}),r=X1e(e).map(P1e);return{tooltip:[...f,...Vf(r,Ba)]}}function o8(t){const{title:n,field:e}=t;return Rs(n,e)}function s8(t,n,e,o,f){const{scale:r,axis:a}=e;return({partName:u,mark:c,positionPrefix:i,endPositionPrefix:s=void 0,extraEncoding:l={}})=>{const d=o8(e);return GV(t,u,f,{mark:c,encoding:Object.assign(Object.assign(Object.assign({[n]:Object.assign(Object.assign(Object.assign({field:`${i}_${e.field}`,type:e.type},d!==void 0?{title:d}:{}),r!==void 0?{scale:r}:{}),a!==void 0?{axis:a}:{})},bi(s)?{[`${n}2`]:{field:`${s}_${e.field}`}}:{}),o),l)})}}function GV(t,n,e,o){const{clip:f,color:r,opacity:a}=t,u=t.type;return t[n]||t[n]===void 0&&e[n]?[Object.assign(Object.assign({},o),{mark:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e[n]),f?{clip:f}:{}),r?{color:r}:{}),a?{opacity:a}:{}),eh(o.mark)?o.mark:{type:o.mark}),{style:`${u}-${String(n)}`}),fp(t[n])?{}:t[n])})]:[]}function WV(t,n,e){const{encoding:o}=t,f=n==="vertical"?"y":"x",r=o[f],a=o[`${f}2`],u=o[`${f}Error`],c=o[`${f}Error2`];return{continuousAxisChannelDef:Tb(r,e),continuousAxisChannelDef2:Tb(a,e),continuousAxisChannelDefError:Tb(u,e),continuousAxisChannelDefError2:Tb(c,e),continuousAxis:f}}function Tb(t,n){if(t?.aggregate){const{aggregate:e}=t,o=$V(t,["aggregate"]);return e!==n&&Kr(bme(e,n)),o}else return t}function YV(t,n){const{mark:e,encoding:o}=t,{x:f,y:r}=o;if(eh(e)&&e.orient)return e.orient;if(qf(f)){if(qf(r)){const a=ti(f)&&f.aggregate,u=ti(r)&&r.aggregate;if(!a&&u===n)return"vertical";if(!u&&a===n)return"horizontal";if(a===n&&u===n)throw new Error("Both x and y cannot have aggregate");return Pm(r)&&!Pm(f)?"horizontal":"vertical"}return"horizontal"}else{if(qf(r))return"vertical";throw new Error(`Need a valid continuous axis for ${n}s`)}}var u_=globalThis&&globalThis.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);fs8(i,y,v,ue,n.boxplot),D=E(S),O=E(k),R=E(Object.assign(Object.assign({},S),A?{size:A}:{})),z=GT([{fieldPrefix:h==="min-max"?"upper_whisker_":"max_",titlePrefix:"Max"},{fieldPrefix:"upper_box_",titlePrefix:"Q3"},{fieldPrefix:"mid_box_",titlePrefix:"Median"},{fieldPrefix:"lower_box_",titlePrefix:"Q1"},{fieldPrefix:h==="min-max"?"lower_whisker_":"min_",titlePrefix:"Min"}],v,k),L={type:"tick",color:"black",opacity:1,orient:b,invalid:d,aria:!1},P=h==="min-max"?z:GT([{fieldPrefix:"upper_whisker_",titlePrefix:"Upper Whisker"},{fieldPrefix:"lower_whisker_",titlePrefix:"Lower Whisker"}],v,k),N=[...D({partName:"rule",mark:{type:"rule",invalid:d,aria:!1},positionPrefix:"lower_whisker",endPositionPrefix:"lower_box",extraEncoding:P}),...D({partName:"rule",mark:{type:"rule",invalid:d,aria:!1},positionPrefix:"upper_box",endPositionPrefix:"upper_whisker",extraEncoding:P}),...D({partName:"ticks",mark:L,positionPrefix:"lower_whisker",extraEncoding:P}),...D({partName:"ticks",mark:L,positionPrefix:"upper_whisker",extraEncoding:P})],B=[...h!=="tukey"?N:[],...O({partName:"box",mark:Object.assign(Object.assign({type:"bar"},l?{size:l}:{}),{orient:T,invalid:d,ariaRoleDescription:"box"}),positionPrefix:"lower_box",endPositionPrefix:"upper_box",extraEncoding:z}),...R({partName:"median",mark:Object.assign(Object.assign(Object.assign({type:"tick",invalid:d},Ei(n.boxplot.median)&&n.boxplot.median.color?{color:n.boxplot.median.color}:{}),l?{size:l}:{}),{orient:b,aria:!1}),positionPrefix:"mid_box",extraEncoding:z})];if(h==="min-max")return Object.assign(Object.assign({},c),{transform:((o=c.transform)!==null&&o!==void 0?o:[]).concat(p),layer:B});const G=`datum["lower_box_${v.field}"]`,W=`datum["upper_box_${v.field}"]`,K=`(${W} - ${G})`,te=`${G} - ${s} * ${K}`,Y=`${W} + ${s} * ${K}`,Z=`datum["${v.field}"]`,re={joinaggregate:JV(v.field),groupby:x},U={transform:[{filter:`(${te} <= ${Z}) && (${Z} <= ${Y})`},{aggregate:[{op:"min",field:v.field,as:`lower_whisker_${v.field}`},{op:"max",field:v.field,as:`upper_whisker_${v.field}`},{op:"min",field:`lower_box_${v.field}`,as:`lower_box_${v.field}`},{op:"max",field:`upper_box_${v.field}`,as:`upper_box_${v.field}`},...w],groupby:x}],layer:N},q=u_(S,["tooltip"]),{scale:$,axis:ne}=v,H=o8(v),Q=Eu(ne,["title"]),ee=GV(i,"outliers",n.boxplot,{transform:[{filter:`(${Z} < ${te}) || (${Z} > ${Y})`}],mark:"point",encoding:Object.assign(Object.assign(Object.assign({[y]:Object.assign(Object.assign(Object.assign({field:v.field,type:v.type},H!==void 0?{title:H}:{}),$!==void 0?{scale:$}:{}),_o(Q)?{}:{axis:Q})},q),M?{color:M}:{}),_?{tooltip:_}:{})})[0];let ie;const ae=[...m,...g,re];return ee?ie={transform:ae,layer:[ee,U]}:(ie=U,ie.transform.unshift(...ae)),Object.assign(Object.assign({},c),{layer:[ie,{transform:p,layer:B}]})}function JV(t){return[{op:"q1",field:t,as:`lower_box_${t}`},{op:"q3",field:t,as:`upper_box_${t}`}]}function eve(t,n,e){const o=YV(t,L2),{continuousAxisChannelDef:f,continuousAxis:r}=WV(t,o,L2),a=f.field,u=XV(n),c=[...JV(a),{op:"median",field:a,as:`mid_box_${a}`},{op:"min",field:a,as:(u==="min-max"?"lower_whisker_":"min_")+a},{op:"max",field:a,as:(u==="min-max"?"upper_whisker_":"max_")+a}],i=u==="min-max"||u==="tukey"?[]:[{calculate:`datum["upper_box_${a}"] - datum["lower_box_${a}"]`,as:`iqr_${a}`},{calculate:`min(datum["upper_box_${a}"] + datum["iqr_${a}"] * ${n}, datum["max_${a}"])`,as:`upper_whisker_${a}`},{calculate:`max(datum["lower_box_${a}"] - datum["iqr_${a}"] * ${n}, datum["min_${a}"])`,as:`lower_whisker_${a}`}],s=t.encoding,l=r;s[l];const d=u_(s,[typeof l=="symbol"?l:l+""]),{customTooltipWithoutAggregatedField:h,filteredEncoding:m}=J1e(d),{bins:g,timeUnits:p,aggregate:v,groupby:y,encoding:x}=qV(m,e),w=o==="vertical"?"horizontal":"vertical",k=o,b=[...g,...p,{aggregate:[...v,...c],groupby:y},...i];return{bins:g,timeUnits:p,transform:b,groupby:y,aggregate:v,continuousAxisChannelDef:f,continuousAxis:r,encodingWithoutContinuousAxis:x,ticksOrient:w,boxOrient:k,customTooltipWithoutAggregatedField:h}}var hP=globalThis&&globalThis.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);f1?{layer:m}:Object.assign({},m[0]))}function rve(t,n){const{encoding:e}=t;if(ive(e))return{orient:YV(t,n),inputType:"raw"};const o=ave(e),f=ove(e),r=e.x,a=e.y;if(o){if(f)throw new Error(`${n} cannot be both type aggregated-upper-lower and aggregated-error`);const u=e.x2,c=e.y2;if(la(u)&&la(c))throw new Error(`${n} cannot have both x2 and y2`);if(la(u)){if(qf(r))return{orient:"horizontal",inputType:"aggregated-upper-lower"};throw new Error(`Both x and x2 have to be quantitative in ${n}`)}else if(la(c)){if(qf(a))return{orient:"vertical",inputType:"aggregated-upper-lower"};throw new Error(`Both y and y2 have to be quantitative in ${n}`)}throw new Error("No ranged axis")}else{const u=e.xError,c=e.xError2,i=e.yError,s=e.yError2;if(la(c)&&!la(u))throw new Error(`${n} cannot have xError2 without xError`);if(la(s)&&!la(i))throw new Error(`${n} cannot have yError2 without yError`);if(la(u)&&la(i))throw new Error(`${n} cannot have both xError and yError with both are quantiative`);if(la(u)){if(qf(r))return{orient:"horizontal",inputType:"aggregated-error"};throw new Error("All x, xError, and xError2 (if exist) have to be quantitative")}else if(la(i)){if(qf(a))return{orient:"vertical",inputType:"aggregated-error"};throw new Error("All y, yError, and yError2 (if exist) have to be quantitative")}throw new Error("No ranged axis")}}function ive(t){return(la(t.x)||la(t.y))&&!la(t.x2)&&!la(t.y2)&&!la(t.xError)&&!la(t.xError2)&&!la(t.yError)&&!la(t.yError2)}function ave(t){return la(t.x2)||la(t.y2)}function ove(t){return la(t.xError)||la(t.xError2)||la(t.yError)||la(t.yError2)}function QV(t,n,e){var o;const{mark:f,encoding:r,params:a,projection:u}=t,c=hP(t,["mark","encoding","params","projection"]),i=eh(f)?f:{type:f};a&&Kr(XU(n));const{orient:s,inputType:l}=rve(t,n),{continuousAxisChannelDef:d,continuousAxisChannelDef2:h,continuousAxisChannelDefError:m,continuousAxisChannelDefError2:g,continuousAxis:p}=WV(t,s,n),{errorBarSpecificAggregate:v,postAggregateCalculates:y,tooltipSummary:x,tooltipTitleWithFieldName:w}=sve(i,d,h,m,g,l,n,e),k=r,b=p;k[b];const T=p==="x"?"x2":"y2";k[T];const _=p==="x"?"xError":"yError";k[_];const M=p==="x"?"xError2":"yError2";k[M];const A=hP(k,[typeof b=="symbol"?b:b+"",typeof T=="symbol"?T:T+"",typeof _=="symbol"?_:_+"",typeof M=="symbol"?M:M+""]),{bins:S,timeUnits:E,aggregate:D,groupby:O,encoding:R}=qV(A,e),z=[...D,...v],L=l!=="raw"?[]:O,P=GT(x,d,R,w);return{transform:[...(o=c.transform)!==null&&o!==void 0?o:[],...S,...E,...z.length===0?[]:[{aggregate:z,groupby:L}],...y],groupby:L,continuousAxisChannelDef:d,continuousAxis:p,encodingWithoutContinuousAxis:R,ticksOrient:s==="vertical"?"horizontal":"vertical",markDef:i,outerSpec:c,tooltipEncoding:P}}function sve(t,n,e,o,f,r,a,u){let c=[],i=[];const s=n.field;let l,d=!1;if(r==="raw"){const h=t.center?t.center:t.extent?t.extent==="iqr"?"median":"mean":u.errorbar.center,m=t.extent?t.extent:h==="mean"?"stderr":"iqr";if(h==="median"!=(m==="iqr")&&Kr(xme(h,m,a)),m==="stderr"||m==="stdev")c=[{op:m,field:s,as:`extent_${s}`},{op:h,field:s,as:`center_${s}`}],i=[{calculate:`datum["center_${s}"] + datum["extent_${s}"]`,as:`upper_${s}`},{calculate:`datum["center_${s}"] - datum["extent_${s}"]`,as:`lower_${s}`}],l=[{fieldPrefix:"center_",titlePrefix:Qy(h)},{fieldPrefix:"upper_",titlePrefix:dP(h,m,"+")},{fieldPrefix:"lower_",titlePrefix:dP(h,m,"-")}],d=!0;else{let g,p,v;m==="ci"?(g="mean",p="ci0",v="ci1"):(g="median",p="q1",v="q3"),c=[{op:p,field:s,as:`lower_${s}`},{op:v,field:s,as:`upper_${s}`},{op:g,field:s,as:`center_${s}`}],l=[{fieldPrefix:"upper_",titlePrefix:am({field:s,aggregate:v,type:"quantitative"},u,{allowDisabling:!1})},{fieldPrefix:"lower_",titlePrefix:am({field:s,aggregate:p,type:"quantitative"},u,{allowDisabling:!1})},{fieldPrefix:"center_",titlePrefix:am({field:s,aggregate:g,type:"quantitative"},u,{allowDisabling:!1})}]}}else{(t.center||t.extent)&&Kr(yme(t.center,t.extent)),r==="aggregated-upper-lower"?(l=[],i=[{calculate:`datum["${e.field}"]`,as:`upper_${s}`},{calculate:`datum["${s}"]`,as:`lower_${s}`}]):r==="aggregated-error"&&(l=[{fieldPrefix:"",titlePrefix:s}],i=[{calculate:`datum["${s}"] + datum["${o.field}"]`,as:`upper_${s}`}],f?i.push({calculate:`datum["${s}"] + datum["${f.field}"]`,as:`lower_${s}`}):i.push({calculate:`datum["${s}"] - datum["${o.field}"]`,as:`lower_${s}`}));for(const h of i)l.push({fieldPrefix:h.as.substring(0,6),titlePrefix:P0(P0(h.calculate,'datum["',""),'"]',"")})}return{postAggregateCalculates:i,errorBarSpecificAggregate:c,tooltipSummary:l,tooltipTitleWithFieldName:d}}function dP(t,n,e){return`${Qy(t)} ${e} ${n}`}const u8="errorband",lve=["band","borders"],uve=new x3(u8,eq);function eq(t,{config:n}){t=Object.assign(Object.assign({},t),{encoding:b3(t.encoding,n)});const{transform:e,continuousAxisChannelDef:o,continuousAxis:f,encodingWithoutContinuousAxis:r,markDef:a,outerSpec:u,tooltipEncoding:c}=QV(t,u8,n),i=a,s=s8(i,f,o,r,n.errorband),l=t.encoding.x!==void 0&&t.encoding.y!==void 0;let d={type:l?"area":"rect"},h={type:l?"line":"rule"};const m=Object.assign(Object.assign({},i.interpolate?{interpolate:i.interpolate}:{}),i.tension&&i.interpolate?{tension:i.tension}:{});return l?(d=Object.assign(Object.assign(Object.assign({},d),m),{ariaRoleDescription:"errorband"}),h=Object.assign(Object.assign(Object.assign({},h),m),{aria:!1})):i.interpolate?Kr(iP("interpolate")):i.tension&&Kr(iP("tension")),Object.assign(Object.assign({},u),{transform:e,layer:[...s({partName:"band",mark:d,positionPrefix:"lower",endPositionPrefix:"upper",extraEncoding:c}),...s({partName:"borders",mark:h,positionPrefix:"lower",extraEncoding:c}),...s({partName:"borders",mark:h,positionPrefix:"upper",extraEncoding:c})]})}const tq={};function c8(t,n,e){const o=new x3(t,n);tq[t]={normalizer:o,parts:e}}function cve(){return Xr(tq)}c8(L2,ZV,K1e);c8(l8,KV,tve);c8(u8,eq,lve);const fve=["gradientHorizontalMaxLength","gradientHorizontalMinLength","gradientVerticalMaxLength","gradientVerticalMinLength","unselectedOpacity"],nq={titleAlign:"align",titleAnchor:"anchor",titleAngle:"angle",titleBaseline:"baseline",titleColor:"color",titleFont:"font",titleFontSize:"fontSize",titleFontStyle:"fontStyle",titleFontWeight:"fontWeight",titleLimit:"limit",titleLineHeight:"lineHeight",titleOrient:"orient",titlePadding:"offset"},rq={labelAlign:"align",labelAnchor:"anchor",labelAngle:"angle",labelBaseline:"baseline",labelColor:"color",labelFont:"font",labelFontSize:"fontSize",labelFontStyle:"fontStyle",labelFontWeight:"fontWeight",labelLimit:"limit",labelLineHeight:"lineHeight",labelOrient:"orient",labelPadding:"offset"},hve=Xr(nq),dve=Xr(rq),pve={header:1,headerRow:1,headerColumn:1,headerFacet:1},iq=Xr(pve),aq=["size","shape","fill","stroke","strokeDash","strokeWidth","opacity"],gve={gradientHorizontalMaxLength:200,gradientHorizontalMinLength:100,gradientVerticalMaxLength:200,gradientVerticalMinLength:64,unselectedOpacity:.35},mve={aria:1,clipHeight:1,columnPadding:1,columns:1,cornerRadius:1,description:1,direction:1,fillColor:1,format:1,formatType:1,gradientLength:1,gradientOpacity:1,gradientStrokeColor:1,gradientStrokeWidth:1,gradientThickness:1,gridAlign:1,labelAlign:1,labelBaseline:1,labelColor:1,labelFont:1,labelFontSize:1,labelFontStyle:1,labelFontWeight:1,labelLimit:1,labelOffset:1,labelOpacity:1,labelOverlap:1,labelPadding:1,labelSeparation:1,legendX:1,legendY:1,offset:1,orient:1,padding:1,rowPadding:1,strokeColor:1,symbolDash:1,symbolDashOffset:1,symbolFillColor:1,symbolLimit:1,symbolOffset:1,symbolOpacity:1,symbolSize:1,symbolStrokeColor:1,symbolStrokeWidth:1,symbolType:1,tickCount:1,tickMinStep:1,title:1,titleAlign:1,titleAnchor:1,titleBaseline:1,titleColor:1,titleFont:1,titleFontSize:1,titleFontStyle:1,titleFontWeight:1,titleLimit:1,titleLineHeight:1,titleOpacity:1,titleOrient:1,titlePadding:1,type:1,values:1,zindex:1},nh="_vgsid_",vve={point:{on:"click",fields:[nh],toggle:"event.shiftKey",resolve:"global",clear:"dblclick"},interval:{on:"[mousedown, window:mouseup] > window:mousemove!",encodings:["x","y"],translate:"[mousedown, window:mouseup] > window:mousemove!",zoom:"wheel!",mark:{fill:"#333",fillOpacity:.125,stroke:"white"},resolve:"global",clear:"dblclick"}};function f8(t){return t==="legend"||!!t?.legend}function O4(t){return f8(t)&&Ei(t)}function h8(t){return!!t?.select}var yve=globalThis&&globalThis.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);fthis.mapLayerOrUnit(o,e))})}mapHConcat(n,e){return Object.assign(Object.assign({},n),{hconcat:n.hconcat.map(o=>this.map(o,e))})}mapVConcat(n,e){return Object.assign(Object.assign({},n),{vconcat:n.vconcat.map(o=>this.map(o,e))})}mapConcat(n,e){const{concat:o}=n,f=Bve(n,["concat"]);return Object.assign(Object.assign({},f),{concat:o.map(r=>this.map(r,e))})}mapFacet(n,e){return Object.assign(Object.assign({},n),{spec:this.map(n.spec,e)})}mapRepeat(n,e){return Object.assign(Object.assign({},n),{spec:this.map(n.spec,e)})}}const jve={zero:1,center:1,normalize:1};function Uve(t){return t in jve}const Vve=new Set([mV,c3,u3,M2,h3,WE,YE,f3,vV,GE]),qve=new Set([c3,u3,mV]);function jg(t){return ti(t)&&Om(t)==="quantitative"&&!t.bin}function yP(t,n){var e,o;const f=n==="x"?"y":"radius",r=t[n],a=t[f];if(ti(r)&&ti(a))if(jg(r)&&jg(a)){if(r.stack)return n;if(a.stack)return f;const u=ti(r)&&!!r.aggregate,c=ti(a)&&!!a.aggregate;if(u!==c)return u?n:f;{const i=(e=r.scale)===null||e===void 0?void 0:e.type,s=(o=a.scale)===null||o===void 0?void 0:o.type;if(i&&i!=="linear")return f;if(s&&s!=="linear")return n}}else{if(jg(r))return n;if(jg(a))return f}else{if(jg(r))return n;if(jg(a))return f}}function Hve(t){switch(t){case"x":return"y";case"y":return"x";case"theta":return"radius";case"radius":return"theta"}}function fq(t,n){var e,o;const f=eh(t)?t.type:t;if(!Vve.has(f))return null;const r=yP(n,"x")||yP(n,"theta");if(!r)return null;const a=n[r],u=ti(a)?hi(a,{}):void 0,c=Hve(r),i=[],s=new Set;if(n[c]){const h=n[c],m=ti(h)?hi(h,{}):void 0;m&&m!==u&&(i.push(c),s.add(m));const g=c==="x"?"xOffset":"yOffset",p=n[g],v=ti(p)?hi(p,{}):void 0;v&&v!==u&&(i.push(g),s.add(v))}const l=K0e.reduce((h,m)=>{if(m!=="tooltip"&&y0(n,m)){const g=n[m];for(const p of ki(g)){const v=th(p);if(v.aggregate)continue;const y=hi(v,{});(!y||!s.has(y))&&h.push({channel:m,fieldDef:v})}}return h},[]);let d;return a.stack!==void 0?fp(a.stack)?d=a.stack?"zero":null:d=a.stack:qve.has(f)&&(d="zero"),!d||!Uve(d)||i8(n)&&l.length===0?null:((e=a?.scale)===null||e===void 0?void 0:e.type)&&((o=a?.scale)===null||o===void 0?void 0:o.type)!==Cu.LINEAR?(Kr(gme(a.scale.type)),null):la(n[ph(r)])?(a.stack!==void 0&&Kr(pme(r)),null):(ti(a)&&a.aggregate&&!cge.has(a.aggregate)&&Kr(mme(a.aggregate)),{groupbyChannels:i,groupbyFields:s,fieldChannel:r,impute:a.impute===null?!1:kp(f),stackBy:l,offset:d})}var hq=globalThis&&globalThis.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);f1?n:n.type}function Gve(t){for(const n of["line","area","rule","trail"])t[n]&&(t=Object.assign(Object.assign({},t),{[n]:Eu(t[n],["point","line"])}));return t}function L4(t,n={},e){return t.point==="transparent"?{opacity:0}:t.point?Ei(t.point)?t.point:{}:t.point!==void 0?null:n.point||e.shape?Ei(n.point)?n.point:{}:void 0}function xP(t,n={}){return t.line?t.line===!0?{}:t.line:t.line!==void 0?null:n.line?n.line===!0?{}:n.line:void 0}class Wve{constructor(){this.name="path-overlay"}hasMatchingType(n,e){if(id(n)){const{mark:o,encoding:f}=n,r=eh(o)?o:{type:o};switch(r.type){case"line":case"rule":case"trail":return!!L4(r,e[r.type],f);case"area":return!!L4(r,e[r.type],f)||!!xP(r,e[r.type])}}return!1}run(n,e,o){const{config:f}=e,{params:r,projection:a,mark:u,encoding:c}=n,i=hq(n,["params","projection","mark","encoding"]),s=b3(c,f),l=eh(u)?u:{type:u},d=L4(l,f[l.type],s),h=l.type==="area"&&xP(l,f[l.type]),m=[Object.assign(Object.assign({},r?{params:r}:{}),{mark:$ve(Object.assign(Object.assign({},l.type==="area"&&l.opacity===void 0&&l.fillOpacity===void 0?{opacity:.7}:{}),l)),encoding:Eu(s,["shape"])})],g=fq(l,s);let p=s;if(g){const{fieldChannel:v,offset:y}=g;p=Object.assign(Object.assign({},s),{[v]:Object.assign(Object.assign({},s[v]),y?{stack:y}:{})})}return p=Eu(p,["y2","x2"]),h&&m.push(Object.assign(Object.assign({},a?{projection:a}:{}),{mark:Object.assign(Object.assign({type:"line"},Am(l,["clip","interpolate","tension","tooltip"])),h),encoding:p})),d&&m.push(Object.assign(Object.assign({},a?{projection:a}:{}),{mark:Object.assign(Object.assign({type:"point",opacity:1,filled:!0},Am(l,["clip","tooltip"])),d),encoding:p})),o(Object.assign(Object.assign({},i),{layer:m}),Object.assign(Object.assign({},e),{config:Gve(f)}))}}var Yve=globalThis&&globalThis.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);f_P(r,n)).filter(r=>r);else{const r=_P(f,n);r!==void 0&&(e[o]=r)}}return e}class Zve{constructor(){this.name="RuleForRangedLine"}hasMatchingType(n){if(id(n)){const{encoding:e,mark:o}=n;if(o==="line"||eh(o)&&o.type==="line")for(const f of X0e){const r=J0(f),a=e[r];if(e[f]&&(ti(a)&&!xl(a.bin)||mh(a)))return!0}}return!1}run(n,e,o){const{encoding:f,mark:r}=n;return Kr(Jge(!!f.x2,!!f.y2)),o(Object.assign(Object.assign({},n),{mark:Ei(r)?Object.assign(Object.assign({},r),{type:"rule"}):"rule"}),e)}}var vd=globalThis&&globalThis.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);f{const d=Object.assign(Object.assign({},i),{layer:l}),h=`${(f.name||"")+s}child__layer_${Xo(l)}`,m=this.mapLayerOrUnit(f,Object.assign(Object.assign({},e),{repeater:d,repeaterPrefix:h}));return m.name=h,m})})}mapNonLayerRepeat(n,e){var o;const{repeat:f,spec:r,data:a}=n,u=vd(n,["repeat","spec","data"]);!Ir(f)&&n.columns&&(n=Eu(n,["columns"]),Kr(eP("repeat")));const c=[],{repeater:i={},repeaterPrefix:s=""}=e,l=!Ir(f)&&f.row||[i?i.row:null],d=!Ir(f)&&f.column||[i?i.column:null],h=Ir(f)&&f||[i?i.repeat:null];for(const g of h)for(const p of l)for(const v of d){const y={repeat:g,row:p,column:v,layer:i.layer},x=(r.name||"")+s+"child__"+(Ir(f)?`${Xo(g)}`:(f.row?`row_${Xo(p)}`:"")+(f.column?`column_${Xo(v)}`:"")),w=this.map(r,Object.assign(Object.assign({},e),{repeater:y,repeaterPrefix:x}));w.name=x,c.push(Eu(w,["data"]))}const m=Ir(f)?n.columns:f.column?f.column.length:1;return Object.assign(Object.assign({data:(o=r.data)!==null&&o!==void 0?o:a,align:"all"},u),{columns:m,concat:c})}mapFacet(n,e){const{facet:o}=n;return sx(o)&&n.columns&&(n=Eu(n,["columns"]),Kr(eP("facet"))),super.mapFacet(n,e)}mapUnitWithParentEncodingOrProjection(n,e){const{encoding:o,projection:f}=n,{parentEncoding:r,parentProjection:a,config:u}=e,c=kP({parentProjection:a,projection:f}),i=wP({parentEncoding:r,encoding:P4(o,e.repeater)});return this.mapUnit(Object.assign(Object.assign(Object.assign({},n),c?{projection:c}:{}),i?{encoding:i}:{}),{config:u})}mapFacetedUnit(n,e){const o=n.encoding,{row:f,column:r,facet:a}=o,u=vd(o,["row","column","facet"]),{mark:c,width:i,projection:s,height:l,view:d,params:h,encoding:m}=n,g=vd(n,["mark","width","projection","height","view","params","encoding"]),{facetMapping:p,layout:v}=this.getFacetMappingAndLayout({row:f,column:r,facet:a},e),y=P4(u,e.repeater);return this.mapFacet(Object.assign(Object.assign(Object.assign({},g),v),{facet:p,spec:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},i?{width:i}:{}),l?{height:l}:{}),d?{view:d}:{}),s?{projection:s}:{}),{mark:c,encoding:y}),h?{params:h}:{})}),e)}getFacetMappingAndLayout(n,e){var o;const{row:f,column:r,facet:a}=n;if(f||r){a&&Kr(Xge([...f?[Vh]:[],...r?[qh]:[]]));const u={},c={};for(const i of[Vh,qh]){const s=n[i];if(s){const l=vd(s,["align","center","spacing","columns"]);u[i]=l;for(const d of["align","center","spacing"])s[d]!==void 0&&((o=c[d])!==null&&o!==void 0||(c[d]={}),c[d][i]=s[d])}}return{facetMapping:u,layout:c}}else{const{align:u,center:c,spacing:i,columns:s}=a,l=vd(a,["align","center","spacing","columns"]);return{facetMapping:Xve(l,e.repeater),layout:Object.assign(Object.assign(Object.assign(Object.assign({},u?{align:u}:{}),c?{center:c}:{}),i?{spacing:i}:{}),s?{columns:s}:{})}}}mapLayer(n,e){var{parentEncoding:o,parentProjection:f}=e,r=vd(e,["parentEncoding","parentProjection"]);const{encoding:a,projection:u}=n,c=vd(n,["encoding","projection"]),i=Object.assign(Object.assign({},r),{parentEncoding:wP({parentEncoding:o,encoding:a,layer:!0}),parentProjection:kP({parentProjection:f,projection:u})});return super.mapLayer(c,i)}}function wP({parentEncoding:t,encoding:n={},layer:e}){let o={};if(t){const f=new Set([...Xr(t),...Xr(n)]);for(const r of f){const a=n[r],u=t[r];if(la(a)){const c=Object.assign(Object.assign({},u),a);o[r]=c}else lx(a)?o[r]=Object.assign(Object.assign({},a),{condition:Object.assign(Object.assign({},u),a.condition)}):a||a===null?o[r]=a:(e||pf(u)||Vi(u)||la(u)||Ir(u))&&(o[r]=u)}}else o=n;return!o||_o(o)?void 0:o}function kP(t){const{parentProjection:n,projection:e}=t;return n&&e&&Kr(Rge({parentProjection:n,projection:e})),e??n}function m8(t){return"filter"in t}function Kve(t){return t?.stop!==void 0}function gq(t){return"lookup"in t}function Qve(t){return"data"in t}function eye(t){return"param"in t}function tye(t){return"pivot"in t}function nye(t){return"density"in t}function rye(t){return"quantile"in t}function iye(t){return"regression"in t}function aye(t){return"loess"in t}function oye(t){return"sample"in t}function sye(t){return"window"in t}function lye(t){return"joinaggregate"in t}function uye(t){return"flatten"in t}function cye(t){return"calculate"in t}function mq(t){return"bin"in t}function fye(t){return"impute"in t}function hye(t){return"timeUnit"in t}function dye(t){return"aggregate"in t}function pye(t){return"stack"in t}function gye(t){return"fold"in t}function mye(t){return t.map(n=>m8(n)?{filter:rm(n.filter,qme)}:n)}var Hd=globalThis&&globalThis.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);f{var c;const i=u,{init:s,bind:l,empty:d}=i,h=Hd(i,["init","bind","empty"]);h.type==="single"?(h.type="point",h.toggle=!1):h.type==="multi"&&(h.type="point"),e.emptySelections[a]=d!=="none";for(const m of ql((c=e.selectionPredicates[a])!==null&&c!==void 0?c:{}))m.empty=d!=="none";return{name:a,value:s,select:h,bind:l}})}):n}}function TP(t,n){const{transform:e}=t,o=Hd(t,["transform"]);if(e){const f=e.map(r=>{if(m8(r))return{filter:XT(r,n)};if(mq(r)&&K0(r.bin))return Object.assign(Object.assign({},r),{bin:yq(r.bin)});if(gq(r)){const a=r.from,{selection:u}=a,c=Hd(a,["selection"]);return u?Object.assign(Object.assign({},r),{from:Object.assign({param:u},c)}):r}return r});return Object.assign(Object.assign({},o),{transform:f})}return t}function vq(t,n){var e,o;const f=ha(t);if(ti(f)&&K0(f.bin)&&(f.bin=yq(f.bin)),eg(f)&&((o=(e=f.scale)===null||e===void 0?void 0:e.domain)===null||o===void 0?void 0:o.selection)){const r=f.scale.domain,{selection:a}=r,u=Hd(r,["selection"]);f.scale.domain=Object.assign(Object.assign({},u),a?{param:a}:{})}if(g3(f))if(Ir(f.condition))f.condition=f.condition.map(r=>{const{selection:a,param:u,test:c}=r,i=Hd(r,["selection","param","test"]);return u?r:Object.assign(Object.assign({},i),{test:XT(r,n)})});else{const r=vq(f.condition,n),{selection:a,param:u,test:c}=r,i=Hd(r,["selection","param","test"]);f.condition=u?f.condition:Object.assign(Object.assign({},i),{test:XT(f.condition,n)})}return f}function yq(t){const n=t.extent;if(n?.selection){const{selection:e}=n,o=Hd(n,["selection"]);return Object.assign(Object.assign({},t),{extent:Object.assign(Object.assign({},o),{param:e})})}return t}function XT(t,n){const e=o=>rm(o,f=>{var r,a,u;const c=(r=n.emptySelections[f])!==null&&r!==void 0?r:!0,i={param:f,empty:c};return(a=(u=n.selectionPredicates)[f])!==null&&a!==void 0||(u[f]=[]),n.selectionPredicates[f].push(i),i});return t.selection?e(t.selection):rm(t.test||t.filter,o=>o.selection?e(o.selection):o)}class ZT extends g8{map(n,e){var o;const f=(o=e.selections)!==null&&o!==void 0?o:[];if(n.params&&!id(n)){const r=[];for(const a of n.params)h8(a)?f.push(a):r.push(a);n.params=r}return e.selections=f,super.map(n,xq(n,e))}mapUnit(n,e){var o;const f=e.selections;if(!f||!f.length)return n;const r=((o=e.path)!==null&&o!==void 0?o:[]).concat(n.name),a=[];for(const u of f)if(!u.views||!u.views.length)a.push(u);else for(const c of u.views)(bi(c)&&(c===n.name||r.indexOf(c)>=0)||Ir(c)&&c.map(i=>r.indexOf(i)).every((i,s,l)=>i!==-1&&(s===0||i>l[s-1])))&&a.push(u);return a.length&&(n.params=a),n}}for(const t of["mapFacet","mapRepeat","mapHConcat","mapVConcat","mapLayer"]){const n=ZT.prototype[t];ZT.prototype[t]=function(e,o){return n.call(this,e,xq(e,o))}}function xq(t,n){var e;return t.name?Object.assign(Object.assign({},n),{path:((e=n.path)!==null&&e!==void 0?e:[]).concat(t.name)}):n}function bq(t,n){n===void 0&&(n=cq(t.config));const e=_ye(t,n),{width:o,height:f}=t,r=wye(e,{width:o,height:f,autosize:t.autosize},n);return Object.assign(Object.assign({},e),r?{autosize:r}:{})}const yye=new Jve,xye=new vye,bye=new ZT;function _ye(t,n={}){const e={config:n};return bye.map(yye.map(xye.map(t,e),e),e)}function AP(t){return bi(t)?{type:t}:t??{}}function wye(t,n,e){let{width:o,height:f}=n;const r=id(t)||w3(t),a={};r?o=="container"&&f=="container"?(a.type="fit",a.contains="padding"):o=="container"?(a.type="fit-x",a.contains="padding"):f=="container"&&(a.type="fit-y",a.contains="padding"):(o=="container"&&(Kr(ZL("width")),o=void 0),f=="container"&&(Kr(ZL("height")),f=void 0));const u=Object.assign(Object.assign(Object.assign({type:"pad"},a),e?AP(e.autosize):{}),AP(t.autosize));if(u.type==="fit"&&!r&&(Kr(bge),u.type="pad"),o=="container"&&!(u.type=="fit"||u.type=="fit-x")&&Kr(JL("width")),f=="container"&&!(u.type=="fit"||u.type=="fit-y")&&Kr(JL("height")),!Uf(u,{type:"pad"}))return u}function kye(t){return t==="fit"||t==="fit-x"||t==="fit-y"}function Tye(t){return t?`fit-${a3(t)}`:"fit"}const Aye=["background","padding"];function MP(t,n){const e={};for(const o of Aye)t&&t[o]!==void 0&&(e[o]=Xu(t[o]));return n&&(e.params=t.params),e}class ad{constructor(n={},e={}){this.explicit=n,this.implicit=e}clone(){return new ad(ha(this.explicit),ha(this.implicit))}combine(){return Object.assign(Object.assign({},this.explicit),this.implicit)}get(n){return Rs(this.explicit[n],this.implicit[n])}getWithExplicit(n){return this.explicit[n]!==void 0?{explicit:!0,value:this.explicit[n]}:this.implicit[n]!==void 0?{explicit:!1,value:this.implicit[n]}:{explicit:!1,value:void 0}}setWithExplicit(n,{value:e,explicit:o}){e!==void 0&&this.set(n,e,o)}set(n,e,o){return delete this[o?"implicit":"explicit"][n],this[o?"explicit":"implicit"][n]=e,this}copyKeyFromSplit(n,{explicit:e,implicit:o}){e[n]!==void 0?this.set(n,e[n],!0):o[n]!==void 0&&this.set(n,o[n],!1)}copyKeyFromObject(n,e){e[n]!==void 0&&this.set(n,e[n],!0)}copyAll(n){for(const e of Xr(n.combine())){const o=n.getWithExplicit(e);this.setWithExplicit(e,o)}}}function If(t){return{explicit:!0,value:t}}function Gu(t){return{explicit:!1,value:t}}function _q(t){return(n,e,o,f)=>{const r=t(n.value,e.value);return r>0?n:r<0?e:k3(n,e,o,f)}}function k3(t,n,e,o){return t.explicit&&n.explicit&&Kr(sme(e,o,t.value,n.value)),t}function ap(t,n,e,o,f=k3){return t===void 0||t.value===void 0?n:t.explicit&&!n.explicit?t:n.explicit&&!t.explicit?n:Uf(t.value,n.value)?t:f(t,n,e,o)}class Mye extends ad{constructor(n={},e={},o=!1){super(n,e),this.explicit=n,this.implicit=e,this.parseNothing=o}clone(){const n=super.clone();return n.parseNothing=this.parseNothing,n}}function Dm(t){return"url"in t}function py(t){return"values"in t}function wq(t){return"name"in t&&!Dm(t)&&!py(t)&&!$d(t)}function $d(t){return t&&(kq(t)||Tq(t)||v8(t))}function kq(t){return"sequence"in t}function Tq(t){return"sphere"in t}function v8(t){return"graticule"in t}var Fo;(function(t){t[t.Raw=0]="Raw",t[t.Main=1]="Main",t[t.Row=2]="Row",t[t.Column=3]="Column",t[t.Lookup=4]="Lookup"})(Fo||(Fo={}));var Sye=globalThis&&globalThis.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);fN0(f,n,e));return n?`[${o.join(", ")}]`:o}else if(Q0(t))return e(n?dy(t):Pme(t));return n?e(No(t)):t}function Eye(t,n){var e;for(const o of ql((e=t.component.selection)!==null&&e!==void 0?e:{})){const f=o.name;let r=`${f}${lp}, ${o.resolve==="global"?"true":`{unit: ${Im(t)}}`}`;for(const a of A3)!a.defined(o)||(a.signals&&(n=a.signals(t,o,n)),a.modifyExpr&&(r=a.modifyExpr(t,o,r)));n.push({name:f+sxe,on:[{events:{signal:o.name+lp},update:`modify(${oi(o.name+B0)}, ${r})`}]})}return y8(n)}function Cye(t,n){if(t.component.selection&&Xr(t.component.selection).length){const e=oi(t.getName("cell"));n.unshift({name:"facet",value:{},on:[{events:pp("mousemove","scope"),update:`isTuple(facet) ? facet : group(${e}).datum`}]})}return y8(n)}function Oye(t,n){var e;let o=!1;for(const f of ql((e=t.component.selection)!==null&&e!==void 0?e:{})){const r=f.name,a=oi(r+B0);if(n.filter(c=>c.name===r).length===0){const c=f.resolve==="global"?"union":f.resolve,i=f.type==="point"?", true, true)":")";n.push({name:f.name,update:`${jq}(${a}, ${oi(c)}${i}`})}o=!0;for(const c of A3)c.defined(f)&&c.topLevelSignals&&(n=c.topLevelSignals(t,f,n))}return o&&n.filter(r=>r.name==="unit").length===0&&n.unshift({name:"unit",value:{},on:[{events:"mousemove",update:"isTuple(group()) ? group() : unit"}]}),y8(n)}function Lye(t,n){var e;const o=[...n],f=Im(t,{escape:!1});for(const r of ql((e=t.component.selection)!==null&&e!==void 0?e:{})){const a={name:r.name+B0};if(r.project.hasSelectionId&&(a.transform=[{type:"collect",sort:{field:nh}}]),r.init){const c=r.project.items.map(i=>Sye(i,["signals"]));a.values=r.project.hasSelectionId?r.init.map(i=>({unit:f,[nh]:N0(i,!1)[0]})):r.init.map(i=>({unit:f,fields:c,values:N0(i,!1)}))}o.filter(c=>c.name===r.name+B0).length||o.push(a)}return o}function Aq(t,n){var e;for(const o of ql((e=t.component.selection)!==null&&e!==void 0?e:{}))for(const f of A3)f.defined(o)&&f.marks&&(n=f.marks(t,o,n));return n}function Pye(t,n){for(const e of t.children)Is(e)&&(n=Aq(e,n));return n}function Dye(t,n,e,o){const f=$q(t,n.param,n);return{signal:rc(e.get("type"))&&Ir(o)&&o[0]>o[1]?`isValid(${f}) && reverse(${f})`:f}}function y8(t){return t.map(n=>(n.on&&!n.on.length&&delete n.on,n))}class To{constructor(n,e){this.debugName=e,this._children=[],this._parent=null,n&&(this.parent=n)}clone(){throw new Error("Cannot clone node")}get parent(){return this._parent}set parent(n){this._parent=n,n&&n.addChild(this)}get children(){return this._children}numChildren(){return this._children.length}addChild(n,e){if(this._children.includes(n)){Kr(Dge);return}e!==void 0?this._children.splice(e,0,n):this._children.push(n)}removeChild(n){const e=this._children.indexOf(n);return this._children.splice(e,1),e}remove(){let n=this._parent.removeChild(this);for(const e of this._children)e._parent=this._parent,this._parent.addChild(e,n++)}insertAsParentOf(n){const e=n.parent;e.removeChild(this),this.parent=e,n.parent=this}swapWithParent(){const n=this._parent,e=n.parent;for(const f of this._children)f.parent=n;this._children=[],n.removeChild(this);const o=n.parent.removeChild(n);this._parent=e,e.addChild(this,o),n.parent=this}}class hu extends To{constructor(n,e,o,f){super(n,e),this.type=o,this.refCounts=f,this._source=this._name=e,this.refCounts&&!(this._name in this.refCounts)&&(this.refCounts[this._name]=0)}clone(){const n=new this.constructor;return n.debugName=`clone_${this.debugName}`,n._source=this._source,n._name=`clone_${this._name}`,n.type=this.type,n.refCounts=this.refCounts,n.refCounts[n._name]=0,n}dependentFields(){return new Set}producedFields(){return new Set}hash(){return this._hash===void 0&&(this._hash=`Output ${AU()}`),this._hash}getSource(){return this.refCounts[this._name]++,this._source}isRequired(){return!!this.refCounts[this._name]}setSource(n){this._source=n}}var SP=globalThis&&globalThis.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);f{const{field:a,timeUnit:u}=r;if(u){const c=hi(r,{forAs:!0});f[Ba({as:c,field:a,timeUnit:u})]={as:c,field:a,timeUnit:u}}return f},{});return _o(o)?null:new Yf(n,o)}static makeFromTransform(n,e){const o=Object.assign({},e),{timeUnit:f}=o,r=SP(o,["timeUnit"]),a=Gl(f),u=Object.assign(Object.assign({},r),{timeUnit:a});return new Yf(n,{[Ba(u)]:u})}merge(n){this.formula=Object.assign({},this.formula);for(const e in n.formula)this.formula[e]||(this.formula[e]=n.formula[e]);for(const e of n.children)n.removeChild(e),e.parent=this;n.remove()}removeFormulas(n){const e={};for(const[o,f]of rp(this.formula))n.has(f.as)||(e[o]=f);this.formula=e}producedFields(){return new Set(ql(this.formula).map(n=>n.as))}dependentFields(){return new Set(ql(this.formula).map(n=>n.field))}hash(){return`TimeUnit ${Ba(this.formula)}`}assemble(){const n=[];for(const e of ql(this.formula)){const{field:o,as:f,timeUnit:r}=e,a=Gl(r),{unit:u,utc:c}=a,i=SP(a,["unit","utc"]);n.push(Object.assign(Object.assign(Object.assign(Object.assign({field:bc(o),type:"timeunit"},u?{units:zE(u)}:{}),c?{timezone:"utc"}:{}),i),{as:[f,`${f}_end`]}))}return n}}var Iye=globalThis&&globalThis.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);f!0,parse:(t,n,e)=>{var o;const f=n.name,r=(o=n.project)!==null&&o!==void 0?o:n.project=new zye,a={},u={},c=new Set,i=(g,p)=>{const v=p==="visual"?g.channel:g.field;let y=Xo(`${f}_${v}`);for(let x=1;c.has(y);x++)y=Xo(`${f}_${v}_${x}`);return c.add(y),{[p]:y}},s=n.type,l=t.config.selection[s],d=e.value!==void 0?ki(e.value):null;let{fields:h,encodings:m}=Ei(e.select)?e.select:{};if(!h&&!m&&d){for(const g of d)if(!!Ei(g))for(const p of Xr(g))Y0e(p)?(m||(m=[])).push(p):s==="interval"?(Kr(Cge),m=l.encodings):(h||(h=[])).push(p)}!h&&!m&&(m=l.encodings,"fields"in l&&(h=l.fields));for(const g of m??[]){const p=t.fieldDef(g);if(p){let v=p.field;if(p.aggregate){Kr(_ge(g,p.aggregate));continue}else if(!v){Kr(QL(g));continue}if(p.timeUnit){v=t.vgField(g);const y={timeUnit:p.timeUnit,as:v,field:p.field};u[Ba(y)]=y}if(!a[v]){let y="E";if(s==="interval"){const w=t.getScaleComponent(g).get("type");rc(w)&&(y="R")}else p.bin&&(y="R-RE");const x={field:v,channel:g,type:y};x.signals=Object.assign(Object.assign({},i(x,"data")),i(x,"visual")),r.items.push(a[v]=x),r.hasField[v]=r.hasChannel[g]=a[v],r.hasSelectionId=r.hasSelectionId||v===nh}}else Kr(QL(g))}for(const g of h??[]){if(r.hasField[g])continue;const p={type:"E",field:g};p.signals=Object.assign({},i(p,"data")),r.items.push(p),r.hasField[g]=p,r.hasSelectionId=r.hasSelectionId||g===nh}d&&(n.init=d.map(g=>r.items.map(p=>Ei(g)?g[p.channel]!==void 0?g[p.channel]:g[p.field]:g))),_o(u)||(r.timeUnit=new Yf(null,u))},signals:(t,n,e)=>{const o=n.name+fx;return e.filter(r=>r.name===o).length>0||n.project.hasSelectionId?e:e.concat({name:o,value:n.project.items.map(r=>{const a=Iye(r,["signals","hasLegend"]);return a.field=bc(a.field),a})})}},op={defined:t=>t.type==="interval"&&t.resolve==="global"&&t.bind&&t.bind==="scales",parse:(t,n)=>{const e=n.scales=[];for(const o of n.project.items){const f=o.channel;if(!bp(f))continue;const r=t.getScaleComponent(f),a=r?r.get("type"):void 0;if(!r||!rc(a)){Kr(Tge);continue}r.set("selectionExtent",{param:n.name,field:o.field},!0),e.push(o)}},topLevelSignals:(t,n,e)=>{const o=n.scales.filter(a=>e.filter(u=>u.name===a.signals.data).length===0);if(!t.parent||KT(t)||o.length===0)return e;const f=e.filter(a=>a.name===n.name)[0];let r=f.update;if(r.indexOf(jq)>=0)f.update=`{${o.map(a=>`${oi(bc(a.field))}: ${a.signals.data}`).join(", ")}}`;else{for(const a of o){const u=`${oi(bc(a.field))}: ${a.signals.data}`;r.includes(u)||(r=`${r.substring(0,r.length-1)}, ${u}}`)}f.update=r}return e.concat(o.map(a=>({name:a.signals.data})))},signals:(t,n,e)=>{if(t.parent&&!KT(t))for(const o of n.scales){const f=e.filter(r=>r.name===o.signals.data)[0];f.push="outer",delete f.value,delete f.update}return e}};function JT(t,n){return`domain(${oi(t.scaleName(n))})`}function KT(t){var n;return t.parent&&s1(t.parent)&&((n=!t.parent.parent)!==null&&n!==void 0?n:KT(t.parent.parent))}var Fye=globalThis&&globalThis.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);ft.type==="interval",signals:(t,n,e)=>{const o=n.name,f=o+fx,r=op.defined(n),a=n.init?n.init[0]:null,u=[],c=[];if(n.translate&&!r){const s=`!event.item || event.item.mark.name !== ${oi(o+om)}`;Mq(n,(l,d)=>{var h,m;const g=ki((h=(m=d.between[0]).filter)!==null&&h!==void 0?h:m.filter=[]);return g.includes(s)||g.push(s),l})}n.project.items.forEach((s,l)=>{const d=s.channel;if(d!==cs&&d!==ol){Kr("Interval selections only support x and y encoding channels.");return}const h=a?a[l]:null,m=Bye(t,n,s,h),g=s.signals.data,p=s.signals.visual,v=oi(t.scaleName(d)),y=t.getScaleComponent(d).get("type"),x=rc(y)?"+":"";e.push(...m),u.push(g),c.push({scaleName:t.scaleName(d),expr:`(!isArray(${g}) || (${x}invert(${v}, ${p})[0] === ${x}${g}[0] && ${x}invert(${v}, ${p})[1] === ${x}${g}[1]))`})}),!r&&c.length&&e.push({name:o+QT,value:{},on:[{events:c.map(s=>({scale:s.scaleName})),update:`${c.map(s=>s.expr).join(" && ")} ? ${o+QT} : {}`}]});const i=`unit: ${Im(t)}, fields: ${f}, values`;return e.concat(Object.assign(Object.assign({name:o+lp},a?{init:`{${i}: ${N0(a)}}`}:{}),u.length?{on:[{events:[{signal:u.join(" || ")}],update:`${u.join(" && ")} ? {${i}: [${u}]} : null`}]}:{}))},marks:(t,n,e)=>{const o=n.name,{x:f,y:r}=n.project.hasChannel,a=f?.signals.visual,u=r?.signals.visual,c=`data(${oi(n.name+B0)})`;if(op.defined(n)||!f&&!r)return e;const i={x:f!==void 0?{signal:`${a}[0]`}:{value:0},y:r!==void 0?{signal:`${u}[0]`}:{value:0},x2:f!==void 0?{signal:`${a}[1]`}:{field:{group:"width"}},y2:r!==void 0?{signal:`${u}[1]`}:{field:{group:"height"}}};if(n.resolve==="global")for(const p of Xr(i))i[p]=[Object.assign({test:`${c}.length && ${c}[0].unit === ${Im(t)}`},i[p]),{value:0}];const s=n.mark,{fill:l,fillOpacity:d,cursor:h}=s,m=Fye(s,["fill","fillOpacity","cursor"]),g=Xr(m).reduce((p,v)=>(p[v]=[{test:[f!==void 0&&`${a}[0] !== ${a}[1]`,r!==void 0&&`${u}[0] !== ${u}[1]`].filter(y=>y).join(" && "),value:m[v]},{value:null}],p),{});return[{name:`${o+om}_bg`,type:"rect",clip:!0,encode:{enter:{fill:{value:l},fillOpacity:{value:d}},update:i}},...e,{name:o+om,type:"rect",clip:!0,encode:{enter:Object.assign(Object.assign({},h?{cursor:{value:h}}:{}),{fill:{value:"transparent"}}),update:Object.assign(Object.assign({},i),g)}}]}};function Bye(t,n,e,o){const f=e.channel,r=e.signals.visual,a=e.signals.data,u=op.defined(n),c=oi(t.scaleName(f)),i=t.getScaleComponent(f),s=i?i.get("type"):void 0,l=g=>`scale(${c}, ${g})`,d=t.getSizeSignalRef(f===cs?"width":"height").signal,h=`${f}(unit)`,m=Mq(n,(g,p)=>[...g,{events:p.between[0],update:`[${h}, ${h}]`},{events:p,update:`[${r}[0], clamp(${h}, 0, ${d})]`}]);return m.push({events:{signal:n.name+QT},update:rc(s)?`[${l(`${a}[0]`)}, ${l(`${a}[1]`)}]`:"[0, 0]"}),u?[{name:a,on:[]}]:[Object.assign(Object.assign({name:r},o?{init:N0(o,!0,l)}:{value:[]}),{on:m}),Object.assign(Object.assign({name:a},o?{init:N0(o)}:{}),{on:[{events:{signal:r},update:`${r}[0] === ${r}[1] ? null : invert(${c}, ${r})`}]})]}function Mq(t,n){return t.events.reduce((e,o)=>o.between?n(e,o):(Kr(`${o} is not an ordered event stream for interval selections.`),e),[])}const jye={defined:t=>t.type==="point",signals:(t,n,e)=>{var o;const f=n.name,r=f+fx,a=n.project,u="(item().isVoronoi ? datum.datum : datum)",c=ql((o=t.component.selection)!==null&&o!==void 0?o:{}).reduce((d,h)=>h.type==="interval"?d.concat(h.name+om):d,[]).map(d=>`indexof(item().mark.name, '${d}') < 0`).join(" && "),i=`datum && item().mark.marktype !== 'group' && indexof(item().mark.role, 'legend') < 0${c?` && ${c}`:""}`;let s=`unit: ${Im(t)}, `;if(n.project.hasSelectionId)s+=`${nh}: ${u}[${oi(nh)}]`;else{const d=a.items.map(h=>{const m=t.fieldDef(h.channel);return m?.bin?`[${u}[${oi(t.vgField(h.channel,{}))}], ${u}[${oi(t.vgField(h.channel,{binSuffix:"end"}))}]]`:`${u}[${oi(h.field)}]`}).join(", ");s+=`fields: ${r}, values: [${d}]`}const l=n.events;return e.concat([{name:f+lp,on:l?[{events:l,update:`${i} ? {${s}} : null`,force:!0}]:[]}])}};function r1(t,n,e,o){const f=g3(n)&&n.condition,r=o(n);if(f){const u=ki(f).map(c=>{const i=o(c);if(C1e(c)){const{param:s,empty:l}=c,d=Hq(t,{param:s,empty:l});return Object.assign({test:d},i)}else{const s=R2(t,c.test);return Object.assign({test:s},i)}});return{[e]:[...u,...r!==void 0?[r]:[]]}}else return r!==void 0?{[e]:r}:{}}function x8(t,n="text"){const e=t.encoding[n];return r1(t,e,n,o=>T3(o,t.config))}function T3(t,n,e="datum"){if(t){if(pf(t))return Ho(t.value);if(la(t)){const{format:o,formatType:f}=C2(t);return KE({fieldOrDatumDef:t,format:o,formatType:f,expr:e,config:n})}}}function Sq(t,n={}){const{encoding:e,markDef:o,config:f,stack:r}=t,a=e.tooltip;if(Ir(a))return{tooltip:EP({tooltip:a},r,f,n)};{const u=n.reactiveGeom?"datum.datum":"datum";return r1(t,a,"tooltip",c=>{const i=T3(c,f,u);if(i)return i;if(c===null)return;let s=oo("tooltip",o,f);if(s===!0&&(s={content:"encoding"}),bi(s))return{value:s};if(Ei(s))return Vi(s)?s:s.content==="encoding"?EP(e,r,f,n):{signal:u}})}}function Eq(t,n,e,{reactiveGeom:o}={}){const f={},r=o?"datum.datum":"datum",a=[];function u(i,s){const l=J0(s),d=wc(i)?i:Object.assign(Object.assign({},i),{type:t[l].type}),h=d.title||n8(d,e),m=ki(h).join(", ");let g;if(sl(s)){const p=s==="x"?"x2":"y2",v=th(t[p]);if(xl(d.bin)&&v){const y=hi(d,{expr:r}),x=hi(v,{expr:r}),{format:w,formatType:k}=C2(d);g=ox(y,x,w,k,e),f[p]=!0}}if((sl(s)||s===Tc||s===xf)&&n&&n.fieldChannel===s&&n.offset==="normalize"){const{format:p,formatType:v}=C2(d);g=KE({fieldOrDatumDef:d,format:p,formatType:v,expr:r,config:e,normalizeStack:!0}).signal}g??(g=T3(d,e,r).signal),a.push({channel:s,key:m,value:g})}a8(t,(i,s)=>{ti(i)?u(i,s):m3(i)&&u(i.condition,s)});const c={};for(const{channel:i,key:s,value:l}of a)!f[i]&&!c[s]&&(c[s]=l);return c}function EP(t,n,e,{reactiveGeom:o}={}){const f=Eq(t,n,e,{reactiveGeom:o}),r=rp(f).map(([a,u])=>`"${a}": ${u}`);return r.length>0?{signal:`{${r.join(", ")}}`}:void 0}function Uye(t){const{markDef:n,config:e}=t,o=oo("aria",n,e);return o===!1?{}:Object.assign(Object.assign(Object.assign({},o?{aria:o}:{}),Vye(t)),qye(t))}function Vye(t){const{mark:n,markDef:e,config:o}=t;if(o.aria===!1)return{};const f=oo("ariaRoleDescription",e,o);return f!=null?{ariaRoleDescription:{value:f}}:n in vge?{}:{ariaRoleDescription:{value:n}}}function qye(t){const{encoding:n,markDef:e,config:o,stack:f}=t,r=n.description;if(r)return r1(t,r,"description",c=>T3(c,t.config));const a=oo("description",e,o);if(a!=null)return{description:Ho(a)};if(o.aria===!1)return{};const u=Eq(n,f,o);if(!_o(u))return{description:{signal:rp(u).map(([c,i],s)=>`"${s>0?"; ":""}${c}: " + (${i})`).join(" + ")}}}function nl(t,n,e={}){const{markDef:o,encoding:f,config:r}=n,{vgChannel:a}=e;let{defaultRef:u,defaultValue:c}=e;u===void 0&&(c??(c=oo(t,o,r,{vgChannel:a,ignoreVgConfig:!0})),c!==void 0&&(u=Ho(c)));const i=f[t];return r1(n,i,a??t,s=>JE({channel:t,channelDef:s,markDef:o,config:r,scaleName:n.scaleName(t),scale:n.getScaleComponent(t),stack:null,defaultRef:u}))}function Cq(t,n={filled:void 0}){var e,o,f,r;const{markDef:a,encoding:u,config:c}=t,{type:i}=a,s=(e=n.filled)!==null&&e!==void 0?e:oo("filled",a,c),l=Fa(["bar","point","circle","square","geoshape"],i)?"transparent":void 0,d=(f=(o=oo(s===!0?"color":void 0,a,c,{vgChannel:"fill"}))!==null&&o!==void 0?o:c.mark[s===!0&&"color"])!==null&&f!==void 0?f:l,h=(r=oo(s===!1?"color":void 0,a,c,{vgChannel:"stroke"}))!==null&&r!==void 0?r:c.mark[s===!1&&"color"],m=s?"fill":"stroke",g=Object.assign(Object.assign({},d?{fill:Ho(d)}:{}),h?{stroke:Ho(h)}:{});return a.color&&(s?a.fill:a.stroke)&&Kr(JU("property",{fill:"fill"in a,stroke:"stroke"in a})),Object.assign(Object.assign(Object.assign(Object.assign({},g),nl("color",t,{vgChannel:m,defaultValue:s?d:h})),nl("fill",t,{defaultValue:u.fill?d:void 0})),nl("stroke",t,{defaultValue:u.stroke?h:void 0}))}function Hye(t){const{encoding:n,mark:e}=t,o=n.order;return!kp(e)&&pf(o)?r1(t,o,"zindex",f=>Ho(f.value)):{}}function gy({channel:t,markDef:n,encoding:e={},model:o,bandPosition:f}){const r=`${t}Offset`,a=n[r],u=e[r];if((r==="xOffset"||r==="yOffset")&&u){const i=JE({channel:r,channelDef:u,markDef:n,config:o?.config,scaleName:o.scaleName(r),scale:o.getScaleComponent(r),stack:null,defaultRef:Ho(a),bandPosition:f});return{offsetType:"encoding",offset:i}}const c=n[r];return c?{offsetType:"visual",offset:c}:{}}function Fl(t,n,{defaultPos:e,vgChannel:o}){const{encoding:f,markDef:r,config:a,stack:u}=n,c=f[t],i=f[ph(t)],s=n.scaleName(t),l=n.getScaleComponent(t),{offset:d,offsetType:h}=gy({channel:t,markDef:r,encoding:f,model:n,bandPosition:.5}),m=b8({model:n,defaultPos:e,channel:t,scaleName:s,scale:l}),g=!c&&sl(t)&&(f.latitude||f.longitude)?{field:n.getName(t)}:$ye({channel:t,channelDef:c,channel2Def:i,markDef:r,config:a,scaleName:s,scale:l,stack:u,offset:d,defaultRef:m,bandPosition:h==="encoding"?0:void 0});return g?{[o||t]:g}:void 0}function $ye(t){const{channel:n,channelDef:e,scaleName:o,stack:f,offset:r,markDef:a}=t;if(la(e)&&f&&n===f.fieldChannel){if(ti(e)){let u=e.bandPosition;if(u===void 0&&a.type==="text"&&(n==="radius"||n==="theta")&&(u=.5),u!==void 0)return S2({scaleName:o,fieldOrDatumDef:e,startSuffix:"start",bandPosition:u,offset:r})}return v0(e,o,{suffix:"end"},{offset:r})}return XE(t)}function b8({model:t,defaultPos:n,channel:e,scaleName:o,scale:f}){const{markDef:r,config:a}=t;return()=>{const u=J0(e),c=ip(e),i=oo(e,r,a,{vgChannel:c});if(i!==void 0)return Bv(e,i);switch(n){case"zeroOrMin":case"zeroOrMax":if(o){const s=f.get("type");if(!Fa([Cu.LOG,Cu.TIME,Cu.UTC],s)){if(f.domainDefinitelyIncludesZero())return{scale:o,value:0}}}if(n==="zeroOrMin")return u==="y"?{field:{group:"height"}}:{value:0};switch(u){case"radius":return{signal:`min(${t.width.signal},${t.height.signal})/2`};case"theta":return{signal:"2*PI"};case"x":return{field:{group:"width"}};case"y":return{value:0}}break;case"mid":{const s=t[Fu(e)];return Object.assign(Object.assign({},s),{mult:.5})}}}}const Gye={left:"x",center:"xc",right:"x2"},Wye={top:"y",middle:"yc",bottom:"y2"};function Oq(t,n,e,o="middle"){if(t==="radius"||t==="theta")return ip(t);const f=t==="x"?"align":"baseline",r=oo(f,n,e);let a;return Vi(r)?(Kr(Zge(f)),a=void 0):a=r,t==="x"?Gye[a||(o==="top"?"left":"center")]:Wye[a||o]}function I2(t,n,{defaultPos:e,defaultPos2:o,range:f}){return f?Lq(t,n,{defaultPos:e,defaultPos2:o}):Fl(t,n,{defaultPos:e})}function Lq(t,n,{defaultPos:e,defaultPos2:o}){const{markDef:f,config:r}=n,a=ph(t),u=Fu(t),c=Yye(n,o,a),i=c[u]?Oq(t,f,r):ip(t);return Object.assign(Object.assign({},Fl(t,n,{defaultPos:e,vgChannel:i})),c)}function Yye(t,n,e){const{encoding:o,mark:f,markDef:r,stack:a,config:u}=t,c=J0(e),i=Fu(e),s=ip(e),l=o[c],d=t.scaleName(c),h=t.getScaleComponent(c),{offset:m}=e in o||e in r?gy({channel:e,markDef:r,encoding:o,model:t}):gy({channel:c,markDef:r,encoding:o,model:t});if(!l&&(e==="x2"||e==="y2")&&(o.latitude||o.longitude)){const p=Fu(e),v=t.markDef[p];return v!=null?{[p]:{value:v}}:{[s]:{field:t.getName(e)}}}const g=Xye({channel:e,channelDef:l,channel2Def:o[e],markDef:r,config:u,scaleName:d,scale:h,stack:a,offset:m,defaultRef:void 0});return g!==void 0?{[s]:g}:Ab(e,r)||Ab(e,{[e]:T2(e,r,u.style),[i]:T2(i,r,u.style)})||Ab(e,u[f])||Ab(e,u.mark)||{[s]:b8({model:t,defaultPos:n,channel:e,scaleName:d,scale:h})()}}function Xye({channel:t,channelDef:n,channel2Def:e,markDef:o,config:f,scaleName:r,scale:a,stack:u,offset:c,defaultRef:i}){return la(n)&&u&&t.charAt(0)===u.fieldChannel.charAt(0)?v0(n,r,{suffix:"start"},{offset:c}):XE({channel:t,channelDef:e,scaleName:r,scale:a,stack:u,markDef:o,config:f,offset:c,defaultRef:i})}function Ab(t,n){const e=Fu(t),o=ip(t);if(n[o]!==void 0)return{[o]:Bv(t,n[o])};if(n[t]!==void 0)return{[o]:Bv(t,n[t])};if(n[e]){const f=n[e];if(R0(f))Kr(qge(e));else return{[e]:Bv(t,f)}}}function sp(t,n){var e,o;const{config:f,encoding:r,markDef:a}=t,u=a.type,c=ph(n),i=Fu(n),s=r[n],l=r[c],d=t.getScaleComponent(n),h=d?d.get("type"):void 0,m=a.orient,g=(o=(e=r[i])!==null&&e!==void 0?e:r.size)!==null&&o!==void 0?o:oo("size",a,f,{vgChannel:i}),p=u==="bar"&&(n==="x"?m==="vertical":m==="horizontal");return ti(s)&&(Bo(s.bin)||xl(s.bin)||s.timeUnit&&!l)&&!(g&&!R0(g))&&!ll(h)?Kye({fieldDef:s,fieldDef2:l,channel:n,model:t}):(la(s)&&ll(h)||p)&&!l?Jye(s,n,t):Lq(n,t,{defaultPos:"zeroOrMax",defaultPos2:"zeroOrMin"})}function Zye(t,n,e,o,f){if(R0(f))if(e){const a=e.get("type");if(a==="band"){let u=`bandwidth('${n}')`;return f.band!==1&&(u=`${f.band} * ${u}`),{signal:`max(0.25, ${u})`}}else f.band!==1&&(Kr(eme(a)),f=void 0)}else return{mult:f.band,field:{group:t}};else{if(Vi(f))return f;if(f)return{value:f}}if(e){const a=e.get("range");if(wp(a)&&wo(a.step))return{value:a.step-2}}return{value:P2(o.view,t)-2}}function Jye(t,n,e){const{markDef:o,encoding:f,config:r,stack:a}=e,u=o.orient,c=e.scaleName(n),i=e.getScaleComponent(n),s=Fu(n),l=ph(n),d=Z0e(n),h=e.scaleName(d),m=u==="horizontal"&&n==="y"||u==="vertical"&&n==="x";let g;(f.size||o.size)&&(m?g=nl("size",e,{vgChannel:s,defaultRef:Ho(o.size)}):Kr(ime(o.type)));const p=!!g,v=OV({channel:n,fieldDef:t,markDef:o,config:r,scaleType:i?.get("type"),useVlSizeChannel:m});g=g||{[s]:Zye(s,h||c,i,r,v)};const y=i?.get("type")==="band"&&R0(v)&&!p?"top":"middle",x=Oq(n,o,r,y),w=x==="xc"||x==="yc",{offset:k,offsetType:b}=gy({channel:n,markDef:o,encoding:f,model:e,bandPosition:w?.5:0}),T=XE({channel:n,channelDef:t,markDef:o,config:r,scaleName:c,scale:i,stack:a,offset:k,defaultRef:b8({model:e,defaultPos:"mid",channel:n,scaleName:c,scale:i}),bandPosition:w?b==="encoding"?0:.5:Vi(v)?{signal:`(1-${v})/2`}:R0(v)?(1-v.band)/2:0});if(s)return Object.assign({[x]:T},g);{const _=ip(l),M=g[s],A=k?Object.assign(Object.assign({},M),{offset:k}):M;return{[x]:T,[_]:Ir(T)?[T[0],Object.assign(Object.assign({},T[1]),{offset:A})]:Object.assign(Object.assign({},T),{offset:A})}}}function K1(t,n,e,o,f){if(CU(t))return 0;const r=t==="x"||t==="y2"?-n/2:n/2;if(Vi(e)||Vi(f)||Vi(o)){const a=Hh(e),u=Hh(f),c=Hh(o),i=c?`${c} + `:"",s=a?`(${a} ? -1 : 1) * `:"",l=u?`(${u} + ${r})`:r;return{signal:i+s+l}}else return f=f||0,o+(e?-f-r:+f+r)}function Kye({fieldDef:t,fieldDef2:n,channel:e,model:o}){var f,r,a;const{config:u,markDef:c,encoding:i}=o,s=o.getScaleComponent(e),l=o.scaleName(e),d=s?s.get("type"):void 0,h=s.get("reverse"),m=OV({channel:e,fieldDef:t,markDef:c,config:u,scaleType:d}),g=(f=o.component.axes[e])===null||f===void 0?void 0:f[0],p=(r=g?.get("translate"))!==null&&r!==void 0?r:.5,v=sl(e)&&(a=oo("binSpacing",c,u))!==null&&a!==void 0?a:0,y=ph(e),x=ip(e),w=ip(y),{offset:k}=gy({channel:e,markDef:c,encoding:i,model:o,bandPosition:0}),b=Vi(m)?{signal:`(1-${m.signal})/2`}:R0(m)?(1-m.band)/2:.5;if(Bo(t.bin)||t.timeUnit)return{[w]:CP({fieldDef:t,scaleName:l,bandPosition:b,offset:K1(y,v,h,p,k)}),[x]:CP({fieldDef:t,scaleName:l,bandPosition:Vi(b)?{signal:`1-${b.signal}`}:1-b,offset:K1(e,v,h,p,k)})};if(xl(t.bin)){const T=v0(t,l,{},{offset:K1(y,v,h,p,k)});if(ti(n))return{[w]:T,[x]:v0(n,l,{},{offset:K1(e,v,h,p,k)})};if(K0(t.bin)&&t.bin.step)return{[w]:T,[x]:{signal:`scale("${l}", ${hi(t,{expr:"datum"})} + ${t.bin.step})`,offset:K1(e,v,h,p,k)}}}Kr(eV(y))}function CP({fieldDef:t,scaleName:n,bandPosition:e,offset:o}){return S2({scaleName:n,fieldOrDatumDef:t,bandPosition:e,offset:o})}const Qye=new Set(["aria","width","height"]);function Ac(t,n){const{fill:e=void 0,stroke:o=void 0}=n.color==="include"?Cq(t):{};return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},exe(t.markDef,n)),OP(t,"fill",e)),OP(t,"stroke",o)),nl("opacity",t)),nl("fillOpacity",t)),nl("strokeOpacity",t)),nl("strokeWidth",t)),nl("strokeDash",t)),Hye(t)),Sq(t)),x8(t,"href")),Uye(t))}function OP(t,n,e){const{config:o,mark:f,markDef:r}=t;if(oo("invalid",r,o)==="hide"&&e&&!kp(f)){const u=txe(t,{invalid:!0,channels:o3});if(u)return{[n]:[{test:u,value:null},...ki(e)]}}return e?{[n]:e}:{}}function exe(t,n){return mge.reduce((e,o)=>(!Qye.has(o)&&t[o]!==void 0&&n[o]!=="ignore"&&(e[o]=Ho(t[o])),e),{})}function txe(t,{invalid:n=!1,channels:e}){const o=e.reduce((r,a)=>{const u=t.getScaleComponent(a);if(u){const c=u.get("type"),i=t.vgField(a,{expr:"datum"});i&&rc(c)&&(r[i]=!0)}return r},{}),f=Xr(o);if(f.length>0){const r=n?"||":"&&";return f.map(a=>ZE(a,n)).join(` ${r} `)}}function _8(t){const{config:n,markDef:e}=t;if(oo("invalid",e,n)){const f=nxe(t,{channels:gh});if(f)return{defined:{signal:f}}}return{}}function nxe(t,{invalid:n=!1,channels:e}){const o=e.reduce((r,a)=>{var u;const c=t.getScaleComponent(a);if(c){const i=c.get("type"),s=t.vgField(a,{expr:"datum",binSuffix:!((u=t.stack)===null||u===void 0)&&u.impute?"mid":void 0});s&&rc(i)&&(r[s]=!0)}return r},{}),f=Xr(o);if(f.length>0){const r=n?"||":"&&";return f.map(a=>ZE(a,n)).join(` ${r} `)}}function LP(t,n){if(n!==void 0)return{[t]:Ho(n)}}const D4="voronoi",Pq={defined:t=>t.type==="point"&&t.nearest,parse:(t,n)=>{if(n.events)for(const e of n.events)e.markname=t.getName(D4)},marks:(t,n,e)=>{const{x:o,y:f}=n.project.hasChannel,r=t.mark;if(kp(r))return Kr(wge(r)),e;const a={name:t.getName(D4),type:"path",interactive:!0,from:{data:t.getName("marks")},encode:{update:Object.assign({fill:{value:"transparent"},strokeWidth:{value:.35},stroke:{value:"transparent"},isVoronoi:{value:!0}},Sq(t,{reactiveGeom:!0}))},transform:[{type:"voronoi",x:{expr:o||!f?"datum.datum.x || 0":"0"},y:{expr:f||!o?"datum.datum.y || 0":"0"},size:[t.getSizeSignalRef("width"),t.getSizeSignalRef("height")]}]};let u=0,c=!1;return e.forEach((i,s)=>{var l;const d=(l=i.name)!==null&&l!==void 0?l:"";d===t.component.mark[0].name?u=s:d.indexOf(D4)>=0&&(c=!0)}),c||e.splice(u+1,0,a),e}},Dq={defined:t=>t.type==="point"&&t.resolve==="global"&&t.bind&&t.bind!=="scales"&&!f8(t.bind),parse:(t,n,e)=>Uq(n,e),topLevelSignals:(t,n,e)=>{const o=n.name,f=n.project,r=n.bind,a=n.init&&n.init[0],u=Pq.defined(n)?"(item().isVoronoi ? datum.datum : datum)":"datum";return f.items.forEach((c,i)=>{var s,l;const d=Xo(`${o}_${c.field}`);e.filter(m=>m.name===d).length||e.unshift(Object.assign(Object.assign({name:d},a?{init:N0(a[i])}:{value:null}),{on:n.events?[{events:n.events,update:`datum && item().mark.marktype !== 'group' ? ${u}[${oi(c.field)}] : null`}]:[],bind:(l=(s=r[c.field])!==null&&s!==void 0?s:r[c.channel])!==null&&l!==void 0?l:r}))}),e},signals:(t,n,e)=>{const o=n.name,f=n.project,r=e.filter(i=>i.name===o+lp)[0],a=o+fx,u=f.items.map(i=>Xo(`${o}_${i.field}`)),c=u.map(i=>`${i} !== null`).join(" && ");return u.length&&(r.update=`${c} ? {fields: ${a}, values: [${u.join(", ")}]} : null`),delete r.value,delete r.on,e}},z2="_toggle",Iq={defined:t=>t.type==="point"&&!!t.toggle,signals:(t,n,e)=>e.concat({name:n.name+z2,value:!1,on:[{events:n.events,update:n.toggle}]}),modifyExpr:(t,n)=>{const e=n.name+lp,o=n.name+z2;return`${o} ? null : ${e}, `+(n.resolve==="global"?`${o} ? null : true, `:`${o} ? null : {unit: ${Im(t)}}, `)+`${o} ? ${e} : null`}},rxe={defined:t=>t.clear!==void 0&&t.clear!==!1,parse:(t,n)=>{n.clear&&(n.clear=bi(n.clear)?pp(n.clear,"view"):n.clear)},topLevelSignals:(t,n,e)=>{if(Dq.defined(n))for(const o of n.project.items){const f=e.findIndex(r=>r.name===Xo(`${n.name}_${o.field}`));f!==-1&&e[f].on.push({events:n.clear,update:"null"})}return e},signals:(t,n,e)=>{function o(f,r){f!==-1&&e[f].on&&e[f].on.push({events:n.clear,update:r})}if(n.type==="interval")for(const f of n.project.items){const r=e.findIndex(a=>a.name===f.signals.visual);if(o(r,"[0, 0]"),r===-1){const a=e.findIndex(u=>u.name===f.signals.data);o(a,"null")}}else{let f=e.findIndex(r=>r.name===n.name+lp);o(f,"null"),Iq.defined(n)&&(f=e.findIndex(r=>r.name===n.name+z2),o(f,"false"))}return e}},zq={defined:t=>{const n=t.resolve==="global"&&t.bind&&f8(t.bind),e=t.project.items.length===1&&t.project.items[0].field!==nh;return n&&!e&&Kr(Age),n&&e},parse:(t,n,e)=>{var o;const f=ha(e);if(f.select=bi(f.select)?{type:f.select,toggle:n.toggle}:Object.assign(Object.assign({},f.select),{toggle:n.toggle}),Uq(n,f),Ei(e.select)&&(e.select.on||e.select.clear)){const u='event.item && indexof(event.item.mark.role, "legend") < 0';for(const c of n.events)c.filter=ki((o=c.filter)!==null&&o!==void 0?o:[]),c.filter.includes(u)||c.filter.push(u)}const r=O4(n.bind)?n.bind.legend:"click",a=bi(r)?pp(r,"view"):ki(r);n.bind={legend:{merge:a}}},topLevelSignals:(t,n,e)=>{const o=n.name,f=O4(n.bind)&&n.bind.legend,r=a=>u=>{const c=ha(u);return c.markname=a,c};for(const a of n.project.items){if(!a.hasLegend)continue;const u=`${Xo(a.field)}_legend`,c=`${o}_${u}`;if(e.filter(s=>s.name===c).length===0){const s=f.merge.map(r(`${u}_symbols`)).concat(f.merge.map(r(`${u}_labels`))).concat(f.merge.map(r(`${u}_entries`)));e.unshift(Object.assign(Object.assign({name:c},n.init?{}:{value:null}),{on:[{events:s,update:"datum.value || item().items[0].items[0].datum.value",force:!0},{events:f.merge,update:`!event.item || !datum ? null : ${c}`,force:!0}]}))}}return e},signals:(t,n,e)=>{const o=n.name,f=n.project,r=e.find(d=>d.name===o+lp),a=o+fx,u=f.items.filter(d=>d.hasLegend).map(d=>Xo(`${o}_${Xo(d.field)}_legend`)),i=`${u.map(d=>`${d} !== null`).join(" && ")} ? {fields: ${a}, values: [${u.join(", ")}]} : null`;n.events&&u.length>0?r.on.push({events:u.map(d=>({signal:d})),update:i}):u.length>0&&(r.update=i,delete r.value,delete r.on);const s=e.find(d=>d.name===o+z2),l=O4(n.bind)&&n.bind.legend;return s&&(n.events?s.on.push(Object.assign(Object.assign({},s.on[0]),{events:l})):s.on[0].events=l),e}};function ixe(t,n,e){var o,f,r,a;const u=(o=t.fieldDef(n))===null||o===void 0?void 0:o.field;for(const c of ql((f=t.component.selection)!==null&&f!==void 0?f:{})){const i=(r=c.project.hasField[u])!==null&&r!==void 0?r:c.project.hasChannel[n];if(i&&zq.defined(c)){const s=(a=e.get("selections"))!==null&&a!==void 0?a:[];s.push(c.name),e.set("selections",s,!1),i.hasLegend=!0}}}const Rq="_translate_anchor",Fq="_translate_delta",axe={defined:t=>t.type==="interval"&&t.translate,signals:(t,n,e)=>{const o=n.name,f=op.defined(n),r=o+Rq,{x:a,y:u}=n.project.hasChannel;let c=pp(n.translate,"scope");return f||(c=c.map(i=>(i.between[0].markname=o+om,i))),e.push({name:r,value:{},on:[{events:c.map(i=>i.between[0]),update:"{x: x(unit), y: y(unit)"+(a!==void 0?`, extent_x: ${f?JT(t,cs):`slice(${a.signals.visual})`}`:"")+(u!==void 0?`, extent_y: ${f?JT(t,ol):`slice(${u.signals.visual})`}`:"")+"}"}]},{name:o+Fq,value:{},on:[{events:c,update:`{x: ${r}.x - x(unit), y: ${r}.y - y(unit)}`}]}),a!==void 0&&PP(t,n,a,"width",e),u!==void 0&&PP(t,n,u,"height",e),e}};function PP(t,n,e,o,f){var r,a;const u=n.name,c=u+Rq,i=u+Fq,s=e.channel,l=op.defined(n),d=f.filter(T=>T.name===e.signals[l?"data":"visual"])[0],h=t.getSizeSignalRef(o).signal,m=t.getScaleComponent(s),g=m.get("type"),p=m.get("reverse"),v=l?s===cs?p?"":"-":p?"-":"":"",y=`${c}.extent_${s}`,x=`${v}${i}.${s} / ${l?`${h}`:`span(${y})`}`,w=l?g==="log"?"panLog":g==="symlog"?"panSymlog":g==="pow"?"panPow":"panLinear":"panLinear",k=l?g==="pow"?`, ${(r=m.get("exponent"))!==null&&r!==void 0?r:1}`:g==="symlog"?`, ${(a=m.get("constant"))!==null&&a!==void 0?a:1}`:"":"",b=`${w}(${y}, ${x}${k})`;d.on.push({events:{signal:i},update:l?b:`clampRange(${b}, 0, ${h})`})}const Nq="_zoom_anchor",Bq="_zoom_delta",oxe={defined:t=>t.type==="interval"&&t.zoom,signals:(t,n,e)=>{const o=n.name,f=op.defined(n),r=o+Bq,{x:a,y:u}=n.project.hasChannel,c=oi(t.scaleName(cs)),i=oi(t.scaleName(ol));let s=pp(n.zoom,"scope");return f||(s=s.map(l=>(l.markname=o+om,l))),e.push({name:o+Nq,on:[{events:s,update:f?"{"+[c?`x: invert(${c}, x(unit))`:"",i?`y: invert(${i}, y(unit))`:""].filter(l=>!!l).join(", ")+"}":"{x: x(unit), y: y(unit)}"}]},{name:r,on:[{events:s,force:!0,update:"pow(1.001, event.deltaY * pow(16, event.deltaMode))"}]}),a!==void 0&&DP(t,n,a,"width",e),u!==void 0&&DP(t,n,u,"height",e),e}};function DP(t,n,e,o,f){var r,a;const u=n.name,c=e.channel,i=op.defined(n),s=f.filter(w=>w.name===e.signals[i?"data":"visual"])[0],l=t.getSizeSignalRef(o).signal,d=t.getScaleComponent(c),h=d.get("type"),m=i?JT(t,c):s.name,g=u+Bq,p=`${u}${Nq}.${c}`,v=i?h==="log"?"zoomLog":h==="symlog"?"zoomSymlog":h==="pow"?"zoomPow":"zoomLinear":"zoomLinear",y=i?h==="pow"?`, ${(r=d.get("exponent"))!==null&&r!==void 0?r:1}`:h==="symlog"?`, ${(a=d.get("constant"))!==null&&a!==void 0?a:1}`:"":"",x=`${v}(${m}, ${p}, ${g}${y})`;s.on.push({events:{signal:g},update:i?x:`clampRange(${x}, 0, ${l})`})}const B0="_store",lp="_tuple",sxe="_modify",jq="vlSelectionResolve",A3=[jye,Nye,Rye,Iq,Dq,op,zq,rxe,axe,oxe,Pq];function lxe(t){let n=t.parent;for(;n&&!lf(n);)n=n.parent;return n}function Im(t,{escape:n}={escape:!0}){let e=n?oi(t.name):t.name;const o=lxe(t);if(o){const{facet:f}=o;for(const r of dc)f[r]&&(e+=` + '__facet_${r}_' + (facet[${oi(o.vgField(r))}])`)}return e}function w8(t){var n;return ql((n=t.component.selection)!==null&&n!==void 0?n:{}).reduce((e,o)=>e||o.project.hasSelectionId,!1)}function Uq(t,n){(bi(n.select)||!n.select.on)&&delete t.events,(bi(n.select)||!n.select.clear)&&delete t.clear,(bi(n.select)||!n.select.toggle)&&delete t.toggle}function eA(t){const n=[];return t.type==="Identifier"?[t.name]:t.type==="Literal"?[t.value]:(t.type==="MemberExpression"&&(n.push(...eA(t.object)),n.push(...eA(t.property))),n)}function Vq(t){return t.object.type==="MemberExpression"?Vq(t.object):t.object.name==="datum"}function qq(t){const n=BS(t),e=new Set;return n.visit(o=>{o.type==="MemberExpression"&&Vq(o)&&e.add(eA(o).slice(1).join("."))}),e}class i1 extends To{constructor(n,e,o){super(n),this.model=e,this.filter=o,this.expr=R2(this.model,this.filter,this),this._dependentFields=qq(this.expr)}clone(){return new i1(null,this.model,ha(this.filter))}dependentFields(){return this._dependentFields}producedFields(){return new Set}assemble(){return{type:"filter",expr:this.expr}}hash(){return`Filter ${this.expr}`}}function uxe(t,n){var e;const o={},f=t.config.selection;if(!n||!n.length)return o;for(const r of n){const a=Xo(r.name),u=r.select,c=bi(u)?u:u.type,i=Ei(u)?ha(u):{type:c},s=f[c];for(const d in s)d==="fields"||d==="encodings"||(d==="mark"&&(i[d]=Object.assign(Object.assign({},s[d]),i[d])),(i[d]===void 0||i[d]===!0)&&(i[d]=(e=s[d])!==null&&e!==void 0?e:i[d]));const l=o[a]=Object.assign(Object.assign({},i),{name:a,type:c,init:r.value,bind:r.bind,events:bi(i.on)?pp(i.on,"scope"):ki(ha(i.on))});for(const d of A3)d.defined(l)&&d.parse&&d.parse(t,l,r)}return o}function Hq(t,n,e,o="datum"){const f=bi(n)?n:n.param,r=Xo(f),a=oi(r+B0);let u;try{u=t.getSelectionComponent(r,f)}catch{return`!!${r}`}if(u.project.timeUnit){const d=e??t.component.data.raw,h=u.project.timeUnit.clone();d.parent?h.insertAsParentOf(d):d.parent=h}const c=u.project.hasSelectionId?"vlSelectionIdTest(":"vlSelectionTest(",i=u.resolve==="global"?")":`, ${oi(u.resolve)})`,s=`${c}${a}, ${o}${i}`,l=`length(data(${a}))`;return n.empty===!1?`${l} && ${s}`:`!${l} || ${s}`}function $q(t,n,e){const o=Xo(n),f=e.encoding;let r=e.field,a;try{a=t.getSelectionComponent(o,n)}catch{return o}if(!f&&!r)r=a.project.items[0].field,a.project.items.length>1&&Kr(`A "field" or "encoding" must be specified when using a selection as a scale domain. Using "field": ${oi(r)}.`);else if(f&&!r){const u=a.project.items.filter(c=>c.channel===f);!u.length||u.length>1?(r=a.project.items[0].field,Kr((u.length?"Multiple ":"No ")+`matching ${oi(f)} encoding found for selection ${oi(e.param)}. Using "field": ${oi(r)}.`)):r=u[0].field}return`${a.name}[${oi(bc(r))}]`}function cxe(t,n){var e;for(const[o,f]of rp((e=t.component.selection)!==null&&e!==void 0?e:{})){const r=t.getName(`lookup_${o}`);t.component.data.outputNodes[r]=f.materialized=new hu(new i1(n,t,{param:o}),r,Fo.Lookup,t.component.data.outputNodeRefCounts)}}function R2(t,n,e){return Nv(n,o=>bi(o)?o:jme(o)?Hq(t,o,e):lV(o))}var Mb=globalThis&&globalThis.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);fn8(e,n)).join(", "):t}function I4(t,n,e,o){var f,r,a,u,c;(f=t.encode)!==null&&f!==void 0||(t.encode={}),(r=(u=t.encode)[n])!==null&&r!==void 0||(u[n]={}),(a=(c=t.encode[n]).update)!==null&&a!==void 0||(c.update={}),t.encode[n].update[e]=o}function Tv(t,n,e,o={header:!1}){var f,r;const a=t.combine(),{disable:u,orient:c,scale:i,labelExpr:s,title:l,zindex:d}=a,h=Mb(a,["disable","orient","scale","labelExpr","title","zindex"]);if(!u){for(const m in h){const g=q1e[m],p=h[m];if(g&&g!==n&&g!=="both")delete h[m];else if(cx(p)){const{condition:v}=p,y=Mb(p,["condition"]),x=ki(v),w=cP[m];if(w){const{vgProp:k,part:b}=w,T=[...x.map(_=>{const{test:M}=_,A=Mb(_,["test"]);return Object.assign({test:R2(null,M)},A)}),y];I4(h,b,k,T),delete h[m]}else if(w===null){const k={signal:x.map(b=>{const{test:T}=b,_=Mb(b,["test"]);return`${R2(null,T)} ? ${XL(_)} : `}).join("")+XL(y)};h[m]=k}}else if(Vi(p)){const v=cP[m];if(v){const{vgProp:y,part:x}=v;I4(h,x,y,p),delete h[m]}}Fa(["labelAlign","labelBaseline"],m)&&h[m]===null&&delete h[m]}if(n==="grid"){if(!h.grid)return;if(h.encode){const{grid:m}=h.encode;h.encode=Object.assign({},m?{grid:m}:{}),_o(h.encode)&&delete h.encode}return Object.assign(Object.assign({scale:i,orient:c},h),{domain:!1,labels:!1,aria:!1,maxExtent:0,minExtent:0,ticks:!1,zindex:Rs(d,0)})}else{if(!o.header&&t.mainExtracted)return;if(s!==void 0){let g=s;((r=(f=h.encode)===null||f===void 0?void 0:f.labels)===null||r===void 0?void 0:r.update)&&Vi(h.encode.labels.update.text)&&(g=P0(s,"datum.label",h.encode.labels.update.text.signal)),I4(h,"labels","text",{signal:g})}if(h.labelAlign===null&&delete h.labelAlign,h.encode){for(const g of BV)t.hasAxisPart(g)||delete h.encode[g];_o(h.encode)&&delete h.encode}const m=fxe(l,e);return Object.assign(Object.assign(Object.assign(Object.assign({scale:i,orient:c,grid:!1},m?{title:m}:{}),h),e.aria===!1?{aria:!1}:{}),{zindex:Rs(d,0)})}}}function Gq(t){const{axes:n}=t.component,e=[];for(const o of gh)if(n[o]){for(const f of n[o])if(!f.get("disable")&&!f.get("gridScale")){const r=o==="x"?"height":"width",a=t.getSizeSignalRef(r).signal;r!==a&&e.push({name:r,update:a})}}return e}function hxe(t,n){const{x:e=[],y:o=[]}=t;return[...e.map(f=>Tv(f,"grid",n)),...o.map(f=>Tv(f,"grid",n)),...e.map(f=>Tv(f,"main",n)),...o.map(f=>Tv(f,"main",n))].filter(f=>f)}function IP(t,n,e,o){return Object.assign.apply(null,[{},...t.map(f=>{if(f==="axisOrient"){const r=e==="x"?"bottom":"left",a=n[e==="x"?"axisBottom":"axisLeft"]||{},u=n[e==="x"?"axisTop":"axisRight"]||{},c=new Set([...Xr(a),...Xr(u)]),i={};for(const s of c.values())i[s]={signal:`${o.signal} === "${r}" ? ${Hh(a[s])} : ${Hh(u[s])}`};return i}return n[f]})])}function dxe(t,n,e,o){const f=n==="band"?["axisDiscrete","axisBand"]:n==="point"?["axisDiscrete","axisPoint"]:hV(n)?["axisQuantitative"]:n==="time"||n==="utc"?["axisTemporal"]:[],r=t==="x"?"axisX":"axisY",a=Vi(e)?"axisOrient":`axis${Qy(e)}`,u=[...f,...f.map(i=>r+i.substr(4))],c=["axis",a,r];return{vlOnlyAxisConfig:IP(u,o,t,e),vgAxisConfig:IP(c,o,t,e),axisConfigStyle:pxe([...c,...u],o)}}function pxe(t,n){var e;const o=[{}];for(const f of t){let r=(e=n[f])===null||e===void 0?void 0:e.style;if(r){r=ki(r);for(const a of r)o.push(n.style[a])}}return Object.assign.apply(null,o)}function tA(t,n,e,o={}){var f;const r=HU(t,e,n);if(r!==void 0)return{configFrom:"style",configValue:r};for(const a of["vlOnlyAxisConfig","vgAxisConfig","axisConfigStyle"])if(((f=o[a])===null||f===void 0?void 0:f[t])!==void 0)return{configFrom:a,configValue:o[a][t]};return{}}const zP={scale:({model:t,channel:n})=>t.scaleName(n),format:({fieldOrDatumDef:t,config:n,axis:e})=>{const{format:o,formatType:f}=e;return TV(t,t.type,o,f,n,!0)},formatType:({axis:t,fieldOrDatumDef:n,scaleType:e})=>{const{formatType:o}=t;return AV(o,n,e)},grid:({fieldOrDatumDef:t,axis:n,scaleType:e})=>{var o;return(o=n.grid)!==null&&o!==void 0?o:gxe(e,t)},gridScale:({model:t,channel:n})=>mxe(t,n),labelAlign:({axis:t,labelAngle:n,orient:e,channel:o})=>t.labelAlign||Yq(n,e,o),labelAngle:({labelAngle:t})=>t,labelBaseline:({axis:t,labelAngle:n,orient:e,channel:o})=>t.labelBaseline||Wq(n,e,o),labelFlush:({axis:t,fieldOrDatumDef:n,channel:e})=>{var o;return(o=t.labelFlush)!==null&&o!==void 0?o:yxe(n.type,e)},labelOverlap:({axis:t,fieldOrDatumDef:n,scaleType:e})=>{var o;return(o=t.labelOverlap)!==null&&o!==void 0?o:xxe(n.type,e,ti(n)&&!!n.timeUnit,ti(n)?n.sort:void 0)},orient:({orient:t})=>t,tickCount:({channel:t,model:n,axis:e,fieldOrDatumDef:o,scaleType:f})=>{var r;const a=t==="x"?"width":t==="y"?"height":void 0,u=a?n.getSizeSignalRef(a):void 0;return(r=e.tickCount)!==null&&r!==void 0?r:_xe({fieldOrDatumDef:o,scaleType:f,size:u,values:e.values})},title:({axis:t,model:n,channel:e})=>{if(t.title!==void 0)return t.title;const o=Xq(n,e);if(o!==void 0)return o;const f=n.typedFieldDef(e),r=e==="x"?"x2":"y2",a=n.fieldDef(r);return GU(f?[uP(f)]:[],ti(a)?[uP(a)]:[])},values:({axis:t,fieldOrDatumDef:n})=>wxe(t,n),zindex:({axis:t,fieldOrDatumDef:n,mark:e})=>{var o;return(o=t.zindex)!==null&&o!==void 0?o:kxe(e,n)}};function gxe(t,n){return!ll(t)&&ti(n)&&!Bo(n?.bin)&&!xl(n?.bin)}function mxe(t,n){const e=n==="x"?"y":"x";if(t.getScaleComponent(e))return t.scaleName(e)}function vxe(t,n,e,o,f){const r=n?.labelAngle;if(r!==void 0)return Vi(r)?r:hy(r);{const{configValue:a}=tA("labelAngle",o,n?.style,f);return a!==void 0?hy(a):e===cs&&Fa([$E,HE],t.type)&&!(ti(t)&&t.timeUnit)?270:void 0}}function nA(t){return`(((${t.signal} % 360) + 360) % 360)`}function Wq(t,n,e,o){if(t!==void 0)if(e==="x"){if(Vi(t)){const f=nA(t),r=Vi(n)?`(${n.signal} === "top")`:n==="top";return{signal:`(45 < ${f} && ${f} < 135) || (225 < ${f} && ${f} < 315) ? "middle" :(${f} <= 45 || 315 <= ${f}) === ${r} ? "bottom" : "top"`}}if(45{if(!!eg(o)&&EV(o.sort)){const{field:r,timeUnit:a}=o,u=o.sort,c=u.map((i,s)=>`${lV({field:r,timeUnit:a,equal:i})} ? ${s} : `).join("")+u.length;n=new zm(n,{calculate:c,as:Rm(o,f,{forAs:!0})})}}),n}producedFields(){return new Set([this.transform.as])}dependentFields(){return this._dependentFields}assemble(){return{type:"formula",expr:this.transform.calculate,as:this.transform.as}}hash(){return`Calculate ${Ba(this.transform)}`}}function Rm(t,n,e){return hi(t,Object.assign({prefix:n,suffix:"sort_index"},e??{}))}function M3(t,n){return Fa(["top","bottom"],n)?"column":Fa(["left","right"],n)||t==="row"?"row":"column"}function Fm(t,n,e,o){const f=o==="row"?e.headerRow:o==="column"?e.headerColumn:e.headerFacet;return Rs((n||{})[t],f[t],e.header[t])}function S3(t,n,e,o){const f={};for(const r of t){const a=Fm(r,n||{},e,o);a!==void 0&&(f[r]=a)}return f}const k8=["row","column"],T8=["header","footer"];function Txe(t,n){const e=t.component.layoutHeaders[n].title,o=t.config?t.config:void 0,f=t.component.layoutHeaders[n].facetFieldDef?t.component.layoutHeaders[n].facetFieldDef:void 0,{titleAnchor:r,titleAngle:a,titleOrient:u}=S3(["titleAnchor","titleAngle","titleOrient"],f.header,o,n),c=M3(n,u),i=hy(a);return{name:`${n}-title`,type:"group",role:`${c}-title`,title:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({text:e},n==="row"?{orient:"left"}:{}),{style:"guide-title"}),Jq(i,c)),Zq(c,i,r)),Kq(o,f,n,hve,nq))}}function Zq(t,n,e="middle"){switch(e){case"start":return{align:"left"};case"end":return{align:"right"}}const o=Yq(n,t==="row"?"left":"top",t==="row"?"y":"x");return o?{align:o}:{}}function Jq(t,n){const e=Wq(t,n==="row"?"left":"top",n==="row"?"y":"x",!0);return e?{baseline:e}:{}}function Axe(t,n){const e=t.component.layoutHeaders[n],o=[];for(const f of T8)if(e[f])for(const r of e[f]){const a=Sxe(t,n,f,e,r);a!=null&&o.push(a)}return o}function Mxe(t,n){var e;const{sort:o}=t;return Wf(o)?{field:hi(o,{expr:"datum"}),order:(e=o.order)!==null&&e!==void 0?e:"ascending"}:Ir(o)?{field:Rm(t,n,{expr:"datum"}),order:"ascending"}:{field:hi(t,{expr:"datum"}),order:o??"ascending"}}function rA(t,n,e){const{format:o,formatType:f,labelAngle:r,labelAnchor:a,labelOrient:u,labelExpr:c}=S3(["format","formatType","labelAngle","labelAnchor","labelOrient","labelExpr"],t.header,e,n),i=KE({fieldOrDatumDef:t,format:o,formatType:f,expr:"parent",config:e}).signal,s=M3(n,u);return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({text:{signal:c?P0(P0(c,"datum.label",i),"datum.value",hi(t,{expr:"parent"})):i}},n==="row"?{orient:"left"}:{}),{style:"guide-label",frame:"group"}),Jq(r,s)),Zq(s,r,a)),Kq(e,t,n,dve,rq))}function Sxe(t,n,e,o,f){if(f){let r=null;const{facetFieldDef:a}=o,u=t.config?t.config:void 0;if(a&&f.labels){const{labelOrient:l}=S3(["labelOrient"],a.header,u,n);(n==="row"&&!Fa(["top","bottom"],l)||n==="column"&&!Fa(["left","right"],l))&&(r=rA(a,n,u))}const c=lf(t)&&!sx(t.facet),i=f.axes,s=i?.length>0;if(r||s){const l=n==="row"?"height":"width";return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({name:t.getName(`${n}_${e}`),type:"group",role:`${n}-${e}`},o.facetFieldDef?{from:{data:t.getName(`${n}_domain`)},sort:Mxe(a,n)}:{}),s&&c?{from:{data:t.getName(`facet_domain_${n}`)}}:{}),r?{title:r}:{}),f.sizeSignal?{encode:{update:{[l]:f.sizeSignal}}}:{}),s?{axes:i}:{})}}return null}const Exe={column:{start:0,end:1},row:{start:1,end:0}};function Cxe(t,n){return Exe[n][t]}function Oxe(t,n){const e={};for(const o of dc){const f=t[o];if(f?.facetFieldDef){const{titleAnchor:r,titleOrient:a}=S3(["titleAnchor","titleOrient"],f.facetFieldDef.header,n,o),u=M3(o,a),c=Cxe(r,u);c!==void 0&&(e[u]=c)}}return _o(e)?void 0:e}function Kq(t,n,e,o,f){const r={};for(const a of o){if(!f[a])continue;const u=Fm(a,n?.header,t,e);u!==void 0&&(r[f[a]]=u)}return r}function A8(t){return[...Sb(t,"width"),...Sb(t,"height"),...Sb(t,"childWidth"),...Sb(t,"childHeight")]}function Sb(t,n){const e=n==="width"?"x":"y",o=t.component.layoutSize.get(n);if(!o||o==="merged")return[];const f=t.getSizeSignalRef(n).signal;if(o==="step"){const r=t.getScaleComponent(e);if(r){const a=r.get("type"),u=r.get("range");if(ll(a)&&wp(u)){const c=t.scaleName(e);return lf(t.parent)&&t.parent.component.resolve.scale[e]==="independent"?[RP(c,u)]:[RP(c,u),{name:f,update:Qq(c,r,`domain('${c}').length`)}]}}throw new Error("layout size is step although width/height is not step.")}else if(o=="container"){const r=f.endsWith("width"),a=r?"containerSize()[0]":"containerSize()[1]",u=WT(t.config.view,r?"width":"height"),c=`isFinite(${a}) ? ${a} : ${u}`;return[{name:f,init:c,on:[{update:c,events:"window:resize"}]}]}else return[{name:f,value:o}]}function RP(t,n){const e=`${t}_step`;return Vi(n.step)?{name:e,update:n.step.signal}:{name:e,value:n.step}}function Qq(t,n,e){const o=n.get("type"),f=n.get("padding"),r=Rs(n.get("paddingOuter"),f);let a=n.get("paddingInner");return a=o==="band"?a!==void 0?a:f:1,`bandspace(${e}, ${Hh(a)}, ${Hh(r)}) * ${t}_step`}function eH(t){return t==="childWidth"?"width":t==="childHeight"?"height":t}function tH(t,n){return Xr(t).reduce((e,o)=>{const f=t[o];return Object.assign(Object.assign({},e),r1(n,f,o,r=>Ho(r.value)))},{})}function nH(t,n){if(lf(n))return t==="theta"?"independent":"shared";if(s1(n))return"shared";if(P8(n))return sl(t)||t==="theta"||t==="radius"?"independent":"shared";throw new Error("invalid model type for resolve")}function M8(t,n){const e=t.scale[n],o=sl(n)?"axis":"legend";return e==="independent"?(t[o][n]==="shared"&&Kr(ume(n)),"independent"):t[o][n]||"shared"}const Lxe=Object.assign(Object.assign({},mve),{disable:1,labelExpr:1,selections:1,opacity:1,shape:1,stroke:1,fill:1,size:1,strokeWidth:1,strokeDash:1,encode:1}),rH=Xr(Lxe);class Pxe extends ad{}const FP={symbols:Dxe,gradient:Ixe,labels:zxe,entries:Rxe};function Dxe(t,{fieldOrDatumDef:n,model:e,channel:o,legendCmpt:f,legendType:r}){var a,u,c,i,s,l,d,h;if(r!=="symbol")return;const{markDef:m,encoding:g,config:p,mark:v}=e,y=m.filled&&v!=="trail";let x=Object.assign(Object.assign({},xge({},e,h1e)),Cq(e,{filled:y}));const w=(a=f.get("symbolOpacity"))!==null&&a!==void 0?a:p.legend.symbolOpacity,k=(u=f.get("symbolFillColor"))!==null&&u!==void 0?u:p.legend.symbolFillColor,b=(c=f.get("symbolStrokeColor"))!==null&&c!==void 0?c:p.legend.symbolStrokeColor,T=w===void 0?(i=iH(g.opacity))!==null&&i!==void 0?i:m.opacity:void 0;if(x.fill){if(o==="fill"||y&&o===zu)delete x.fill;else if(x.fill.field)k?delete x.fill:(x.fill=Ho((s=p.legend.symbolBaseFillColor)!==null&&s!==void 0?s:"black"),x.fillOpacity=Ho(T??1));else if(Ir(x.fill)){const _=(h=(d=iA((l=g.fill)!==null&&l!==void 0?l:g.color))!==null&&d!==void 0?d:m.fill)!==null&&h!==void 0?h:y&&m.color;_&&(x.fill=Ho(_))}}if(x.stroke){if(o==="stroke"||!y&&o===zu)delete x.stroke;else if(x.stroke.field||b)delete x.stroke;else if(Ir(x.stroke)){const _=Rs(iA(g.stroke||g.color),m.stroke,y?m.color:void 0);_&&(x.stroke={value:_})}}if(o!==rd){const _=ti(n)&&oH(e,f,n);_?x.opacity=[Object.assign({test:_},Ho(T??1)),Ho(p.legend.unselectedOpacity)]:T&&(x.opacity=Ho(T))}return x=Object.assign(Object.assign({},x),t),_o(x)?void 0:x}function Ixe(t,{model:n,legendType:e,legendCmpt:o}){var f;if(e!=="gradient")return;const{config:r,markDef:a,encoding:u}=n;let c={};const s=((f=o.get("gradientOpacity"))!==null&&f!==void 0?f:r.legend.gradientOpacity)===void 0?iH(u.opacity)||a.opacity:void 0;return s&&(c.opacity=Ho(s)),c=Object.assign(Object.assign({},c),t),_o(c)?void 0:c}function zxe(t,{fieldOrDatumDef:n,model:e,channel:o,legendCmpt:f}){const r=e.legend(o)||{},a=e.config,u=ti(n)?oH(e,f,n):void 0,c=u?[{test:u,value:1},{value:a.legend.unselectedOpacity}]:void 0,{format:i,formatType:s}=r;let l;F0(s)?l=rf({fieldOrDatumDef:n,field:"datum.value",format:i,formatType:s,config:a}):i===void 0&&s===void 0&&a.customFormatTypes&&(n.type==="quantitative"&&a.numberFormatType?l=rf({fieldOrDatumDef:n,field:"datum.value",format:a.numberFormat,formatType:a.numberFormatType,config:a}):n.type==="temporal"&&a.timeFormatType&&ti(n)&&n.timeUnit===void 0&&(l=rf({fieldOrDatumDef:n,field:"datum.value",format:a.timeFormat,formatType:a.timeFormatType,config:a})));const d=Object.assign(Object.assign(Object.assign({},c?{opacity:c}:{}),l?{text:l}:{}),t);return _o(d)?void 0:d}function Rxe(t,{legendCmpt:n}){const e=n.get("selections");return e?.length?Object.assign(Object.assign({},t),{fill:{value:"transparent"}}):t}function iH(t){return aH(t,(n,e)=>Math.max(n,e.value))}function iA(t){return aH(t,(n,e)=>Rs(n,e.value))}function aH(t,n){if(L1e(t))return ki(t.condition).reduce(n,t.value);if(pf(t))return t.value}function oH(t,n,e){const o=n.get("selections");if(!o?.length)return;const f=oi(e.field);return o.map(r=>`(!length(data(${oi(Xo(r)+B0)})) || (${r}[${f}] && indexof(${r}[${f}], datum.value) >= 0))`).join(" || ")}const NP={direction:({direction:t})=>t,format:({fieldOrDatumDef:t,legend:n,config:e})=>{const{format:o,formatType:f}=n;return TV(t,t.type,o,f,e,!1)},formatType:({legend:t,fieldOrDatumDef:n,scaleType:e})=>{const{formatType:o}=t;return AV(o,n,e)},gradientLength:t=>{var n,e;const{legend:o,legendConfig:f}=t;return(e=(n=o.gradientLength)!==null&&n!==void 0?n:f.gradientLength)!==null&&e!==void 0?e:qxe(t)},labelOverlap:({legend:t,legendConfig:n,scaleType:e})=>{var o,f;return(f=(o=t.labelOverlap)!==null&&o!==void 0?o:n.labelOverlap)!==null&&f!==void 0?f:Hxe(e)},symbolType:({legend:t,markDef:n,channel:e,encoding:o})=>{var f;return(f=t.symbolType)!==null&&f!==void 0?f:Nxe(n.type,e,o.shape,n.shape)},title:({fieldOrDatumDef:t,config:n})=>am(t,n,{allowDisabling:!0}),type:({legendType:t,scaleType:n,channel:e})=>{if(im(e)&&nf(n)){if(t==="gradient")return}else if(t==="symbol")return;return t},values:({fieldOrDatumDef:t,legend:n})=>Fxe(n,t)};function Fxe(t,n){const e=t.values;if(Ir(e))return NV(n,e);if(Vi(e))return e}function Nxe(t,n,e,o){var f;if(n!=="shape"){const r=(f=iA(e))!==null&&f!==void 0?f:o;if(r)return r}switch(t){case"bar":case"rect":case"image":case"square":return"square";case"line":case"trail":case"rule":return"stroke";case"arc":case"point":case"circle":case"tick":case"geoshape":case"area":case"text":return"circle"}}function Bxe(t){const{legend:n}=t;return Rs(n.type,jxe(t))}function jxe({channel:t,timeUnit:n,scaleType:e}){if(im(t)){if(Fa(["quarter","month","day"],n))return"symbol";if(nf(e))return"gradient"}return"symbol"}function Uxe({legendConfig:t,legendType:n,orient:e,legend:o}){var f,r;return(r=(f=o.direction)!==null&&f!==void 0?f:t[n?"gradientDirection":"symbolDirection"])!==null&&r!==void 0?r:Vxe(e,n)}function Vxe(t,n){switch(t){case"top":case"bottom":return"horizontal";case"left":case"right":case"none":case void 0:return;default:return n==="gradient"?"horizontal":void 0}}function qxe({legendConfig:t,model:n,direction:e,orient:o,scaleType:f}){const{gradientHorizontalMaxLength:r,gradientHorizontalMinLength:a,gradientVerticalMaxLength:u,gradientVerticalMinLength:c}=t;if(nf(f))return e==="horizontal"?o==="top"||o==="bottom"?BP(n,"width",a,r):a:BP(n,"height",c,u)}function BP(t,n,e,o){return{signal:`clamp(${t.getSizeSignalRef(n).signal}, ${e}, ${o})`}}function Hxe(t){if(Fa(["quantile","threshold","log","symlog"],t))return"greedy"}function sH(t){const n=Is(t)?$xe(t):Xxe(t);return t.component.legends=n,n}function $xe(t){const{encoding:n}=t,e={};for(const o of[zu,...aq]){const f=Ws(n[o]);!f||!t.getScaleComponent(o)||o===Ru&&ti(f)&&f.type===n1||(e[o]=Yxe(t,o))}return e}function Gxe(t,n){const e=t.scaleName(n);if(t.mark==="trail"){if(n==="color")return{stroke:e};if(n==="size")return{strokeWidth:e}}return n==="color"?t.markDef.filled?{fill:e}:{stroke:e}:{[n]:e}}function Wxe(t,n,e,o){switch(n){case"disable":return e!==void 0;case"values":return!!e?.values;case"title":if(n==="title"&&t===o?.title)return!0}return t===(e||{})[n]}function Yxe(t,n){var e,o,f;let r=t.legend(n);const{markDef:a,encoding:u,config:c}=t,i=c.legend,s=new Pxe({},Gxe(t,n));ixe(t,n,s);const l=r!==void 0?!r:i.disable;if(s.set("disable",l,r!==void 0),l)return s;r=r||{};const d=t.getScaleComponent(n).get("type"),h=Ws(u[n]),m=ti(h)?(e=Gl(h.timeUnit))===null||e===void 0?void 0:e.unit:void 0,g=r.orient||c.legend.orient||"right",p=Bxe({legend:r,channel:n,timeUnit:m,scaleType:d}),v=Uxe({legend:r,legendType:p,orient:g,legendConfig:i}),y={legend:r,channel:n,model:t,markDef:a,encoding:u,fieldOrDatumDef:h,legendConfig:i,config:c,scaleType:d,orient:g,legendType:p,direction:v};for(const T of rH){if(p==="gradient"&&T.startsWith("symbol")||p==="symbol"&&T.startsWith("gradient"))continue;const _=T in NP?NP[T](y):r[T];if(_!==void 0){const M=Wxe(_,T,r,t.fieldDef(n));(M||c.legend[T]===void 0)&&s.set(T,_,M)}}const x=(o=r?.encoding)!==null&&o!==void 0?o:{},w=s.get("selections"),k={},b={fieldOrDatumDef:h,model:t,channel:n,legendCmpt:s,legendType:p};for(const T of["labels","legend","title","symbols","gradient","entries"]){const _=tH((f=x[T])!==null&&f!==void 0?f:{},t),M=T in FP?FP[T](_,b):_;M!==void 0&&!_o(M)&&(k[T]=Object.assign(Object.assign(Object.assign({},w?.length&&ti(h)?{name:`${Xo(h.field)}_legend_${T}`}:{}),w?.length?{interactive:!!w}:{}),{update:M}))}return _o(k)||s.set("encode",k,!!r?.encoding),s}function Xxe(t){const{legends:n,resolve:e}=t.component;for(const o of t.children){sH(o);for(const f of Xr(o.component.legends))e.legend[f]=M8(t.component.resolve,f),e.legend[f]==="shared"&&(n[f]=lH(n[f],o.component.legends[f]),n[f]||(e.legend[f]="independent",delete n[f]))}for(const o of Xr(n))for(const f of t.children)!f.component.legends[o]||e.legend[o]==="shared"&&delete f.component.legends[o];return n}function lH(t,n){var e,o,f,r;if(!t)return n.clone();const a=t.getWithExplicit("orient"),u=n.getWithExplicit("orient");if(a.explicit&&u.explicit&&a.value!==u.value)return;let c=!1;for(const i of rH){const s=ap(t.getWithExplicit(i),n.getWithExplicit(i),i,"legend",(l,d)=>{switch(i){case"symbolType":return Zxe(l,d);case"title":return YU(l,d);case"type":return c=!0,Gu("symbol")}return k3(l,d,i,"legend")});t.setWithExplicit(i,s)}return c&&(!((o=(e=t.implicit)===null||e===void 0?void 0:e.encode)===null||o===void 0)&&o.gradient&&k2(t.implicit,["encode","gradient"]),!((r=(f=t.explicit)===null||f===void 0?void 0:f.encode)===null||r===void 0)&&r.gradient&&k2(t.explicit,["encode","gradient"])),t}function Zxe(t,n){return n.value==="circle"?n:t}var Jxe=globalThis&&globalThis.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);fQxe(f,t.config)).filter(f=>f!==void 0)}function Qxe(t,n){var e,o,f;const r=t.combine(),{disable:a,labelExpr:u,selections:c}=r,i=Jxe(r,["disable","labelExpr","selections"]);if(!a){if(n.aria===!1&&i.aria==null&&(i.aria=!1),!((e=i.encode)===null||e===void 0)&&e.symbols){const s=i.encode.symbols.update;s.fill&&s.fill.value!=="transparent"&&!s.stroke&&!i.stroke&&(s.stroke={value:"transparent"});for(const l of aq)i[l]&&delete s[l]}if(i.title||delete i.title,u!==void 0){let s=u;((f=(o=i.encode)===null||o===void 0?void 0:o.labels)===null||f===void 0?void 0:f.update)&&Vi(i.encode.labels.update.text)&&(s=P0(u,"datum.label",i.encode.labels.update.text.signal)),Kxe(i,"labels","text",{signal:s})}return i}}function ebe(t){return s1(t)||P8(t)?tbe(t):cH(t)}function tbe(t){return t.children.reduce((n,e)=>n.concat(e.assembleProjections()),cH(t))}function cH(t){const n=t.component.projection;if(!n||n.merged)return[];const e=n.combine(),{name:o}=e;if(n.data){const f={signal:`[${n.size.map(a=>a.signal).join(", ")}]`},r=n.data.reduce((a,u)=>{const c=Vi(u)?u.signal:`data('${t.lookupDataSource(u)}')`;return Fa(a,c)||a.push(c),a},[]);if(r.length<=0)throw new Error("Projection's fit didn't find any data sources");return[Object.assign({name:o,size:f,fit:{signal:r.length>1?`[${r.join(", ")}]`:r[0]}},e)]}else return[Object.assign(Object.assign({name:o},{translate:{signal:"[width / 2, height / 2]"}}),e)]}const nbe=["type","clipAngle","clipExtent","center","rotate","precision","reflectX","reflectY","coefficient","distance","fraction","lobes","parallel","radius","ratio","spacing","tilt"];class fH extends ad{constructor(n,e,o,f){super(Object.assign({},e),{name:n}),this.specifiedProjection=e,this.size=o,this.data=f,this.merged=!1}get isFit(){return!!this.data}}function hH(t){t.component.projection=Is(t)?rbe(t):obe(t)}function rbe(t){var n;if(t.hasProjection){const e=Tu(t.specifiedProjection),o=!(e&&(e.scale!=null||e.translate!=null)),f=o?[t.getSizeSignalRef("width"),t.getSizeSignalRef("height")]:void 0,r=o?ibe(t):void 0,a=new fH(t.projectionName(!0),Object.assign(Object.assign({},(n=Tu(t.config.projection))!==null&&n!==void 0?n:{}),e??{}),f,r);return a.get("type")||a.set("type","equalEarth",!1),a}}function ibe(t){const n=[],{encoding:e}=t;for(const o of[[fh,ch],[_c,bf]])(Ws(e[o[0]])||Ws(e[o[1]]))&&n.push({signal:t.getName(`geojson_${n.length}`)});return t.channelHasField(Ru)&&t.typedFieldDef(Ru).type===n1&&n.push({signal:t.getName(`geojson_${n.length}`)}),n.length===0&&n.push(t.requestDataName(Fo.Main)),n}function abe(t,n){const e=vE(nbe,f=>!!(!qi(t.explicit,f)&&!qi(n.explicit,f)||qi(t.explicit,f)&&qi(n.explicit,f)&&Uf(t.get(f),n.get(f))));if(Uf(t.size,n.size)){if(e)return t;if(Uf(t.explicit,{}))return n;if(Uf(n.explicit,{}))return t}return null}function obe(t){if(t.children.length===0)return;let n;for(const o of t.children)hH(o);const e=vE(t.children,o=>{const f=o.component.projection;if(f)if(n){const r=abe(n,f);return r&&(n=r),!!r}else return n=f,!0;else return!0});if(n&&e){const o=t.projectionName(!0),f=new fH(o,n.specifiedProjection,n.size,ha(n.data));for(const r of t.children){const a=r.component.projection;a&&(a.isFit&&f.data.push(...r.component.projection.data),r.renameProjection(a.get("name"),o),a.merged=!0)}return f}}var sbe=globalThis&&globalThis.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);f{if(wc(r)&&Bo(r.bin)){const{key:u,binComponent:c}=jP(r,r.bin,e);f[u]=Object.assign(Object.assign(Object.assign({},c),f[u]),lbe(e,r,a,e.config))}return f},{});return _o(o)?null:new Xf(n,o)}static makeFromTransform(n,e,o){const{key:f,binComponent:r}=jP(e,e.bin,o);return new Xf(n,{[f]:r})}merge(n,e){for(const o of Xr(n.bins))o in this.bins?(e(n.bins[o].signal,this.bins[o].signal),this.bins[o].as=Vf([...this.bins[o].as,...n.bins[o].as],Ba)):this.bins[o]=n.bins[o];for(const o of n.children)n.removeChild(o),o.parent=this;n.remove()}producedFields(){return new Set(ql(this.bins).map(n=>n.as).flat(2))}dependentFields(){return new Set(ql(this.bins).map(n=>n.field))}hash(){return`Bin ${Ba(this.bins)}`}assemble(){return ql(this.bins).flatMap(n=>{const e=[],[o,...f]=n.as,r=n.bin,{extent:a}=r,u=sbe(r,["extent"]),c=Object.assign(Object.assign(Object.assign({type:"bin",field:bc(n.field),as:o,signal:n.signal},s3(a)?{extent:null}:{extent:a}),n.span?{span:{signal:`span(${n.span})`}}:{}),u);!a&&n.extentSignal&&(e.push({type:"extent",field:bc(n.field),signal:n.extentSignal}),c.extent={signal:n.extentSignal}),e.push(c);for(const i of f)for(let s=0;s<2;s++)e.push({type:"formula",expr:hi({field:o[s]},{expr:"datum"}),as:i[s]});return n.formula&&e.push({type:"formula",expr:n.formula,as:n.formulaAs}),e})}}function fbe(t,n,e,o){var f;const r=Is(o)?o.encoding[ph(n)]:void 0;if(wc(e)&&Is(o)&&LV(e,r,o.markDef,o.config))t.add(hi(e,{})),t.add(hi(e,{suffix:"end"})),e.bin&&ux(e,n)&&t.add(hi(e,{binSuffix:"range"}));else if(q0e(n)){const a=V0e(n);t.add(o.getName(a))}else t.add(hi(e));return eg(e)&&e1e((f=e.scale)===null||f===void 0?void 0:f.range)&&t.add(e.scale.range.field),t}function hbe(t,n){var e;for(const o of Xr(n)){const f=n[o];for(const r of Xr(f))o in t?t[o][r]=new Set([...(e=t[o][r])!==null&&e!==void 0?e:[],...f[r]]):t[o]={[r]:f[r]}}}class sf extends To{constructor(n,e,o){super(n),this.dimensions=e,this.measures=o}clone(){return new sf(null,new Set(this.dimensions),ha(this.measures))}get groupBy(){return this.dimensions}static makeFromEncoding(n,e){let o=!1;e.forEachFieldDef(a=>{a.aggregate&&(o=!0)});const f={},r=new Set;return!o||(e.forEachFieldDef((a,u)=>{var c,i,s,l;const{aggregate:d,field:h}=a;if(d)if(d==="count")(c=f["*"])!==null&&c!==void 0||(f["*"]={}),f["*"].count=new Set([hi(a,{forAs:!0})]);else{if(Xh(d)||_p(d)){const m=Xh(d)?"argmin":"argmax",g=d[m];(i=f[g])!==null&&i!==void 0||(f[g]={}),f[g][m]=new Set([hi({op:m,field:g},{forAs:!0})])}else(s=f[h])!==null&&s!==void 0||(f[h]={}),f[h][d]=new Set([hi(a,{forAs:!0})]);bp(u)&&e.scaleDomain(u)==="unaggregated"&&((l=f[h])!==null&&l!==void 0||(f[h]={}),f[h].min=new Set([hi({field:h,aggregate:"min"},{forAs:!0})]),f[h].max=new Set([hi({field:h,aggregate:"max"},{forAs:!0})]))}else fbe(r,u,a,e)}),r.size+Xr(f).length===0)?null:new sf(n,r,f)}static makeFromTransform(n,e){var o,f,r;const a=new Set,u={};for(const c of e.aggregate){const{op:i,field:s,as:l}=c;i&&(i==="count"?((o=u["*"])!==null&&o!==void 0||(u["*"]={}),u["*"].count=new Set([l||hi(c,{forAs:!0})])):((f=u[s])!==null&&f!==void 0||(u[s]={}),u[s][i]=new Set([l||hi(c,{forAs:!0})])))}for(const c of(r=e.groupby)!==null&&r!==void 0?r:[])a.add(c);return a.size+Xr(u).length===0?null:new sf(n,a,u)}merge(n){return wU(this.dimensions,n.dimensions)?(hbe(this.measures,n.measures),!0):(Ame("different dimensions, cannot merge"),!1)}addDimensions(n){n.forEach(this.dimensions.add,this.dimensions)}dependentFields(){return new Set([...this.dimensions,...Xr(this.measures)])}producedFields(){const n=new Set;for(const e of Xr(this.measures))for(const o of Xr(this.measures[e])){const f=this.measures[e][o];f.size===0?n.add(`${o}_${e}`):f.forEach(n.add,n)}return n}hash(){return`Aggregate ${Ba({dimensions:this.dimensions,measures:this.measures})}`}assemble(){const n=[],e=[],o=[];for(const r of Xr(this.measures))for(const a of Xr(this.measures[r]))for(const u of this.measures[r][a])o.push(u),n.push(a),e.push(r==="*"?null:bc(r));return{type:"aggregate",groupby:[...this.dimensions].map(bc),ops:n,fields:e,as:o}}}class a1 extends To{constructor(n,e,o,f){super(n),this.model=e,this.name=o,this.data=f;for(const r of dc){const a=e.facet[r];if(a){const{bin:u,sort:c}=a;this[r]=Object.assign({name:e.getName(`${r}_domain`),fields:[hi(a),...Bo(u)?[hi(a,{binSuffix:"end"})]:[]]},Wf(c)?{sortField:c}:Ir(c)?{sortIndexField:Rm(a,r)}:{})}}this.childModel=e.child}hash(){let n="Facet";for(const e of dc)this[e]&&(n+=` ${e.charAt(0)}:${Ba(this[e])}`);return n}get fields(){var n;const e=[];for(const o of dc)!((n=this[o])===null||n===void 0)&&n.fields&&e.push(...this[o].fields);return e}dependentFields(){const n=new Set(this.fields);for(const e of dc)this[e]&&(this[e].sortField&&n.add(this[e].sortField.field),this[e].sortIndexField&&n.add(this[e].sortIndexField));return n}producedFields(){return new Set}getSource(){return this.name}getChildIndependentFieldsWithStep(){const n={};for(const e of gh){const o=this.childModel.component.scales[e];if(o&&!o.merged){const f=o.get("type"),r=o.get("range");if(ll(f)&&wp(r)){const a=E3(this.childModel,e),u=L8(a);u?n[e]=u:Kr(LE(e))}}}return n}assembleRowColumnHeaderData(n,e,o){const f={row:"y",column:"x",facet:void 0}[n],r=[],a=[],u=[];f&&o&&o[f]&&(e?(r.push(`distinct_${o[f]}`),a.push("max")):(r.push(o[f]),a.push("distinct")),u.push(`distinct_${o[f]}`));const{sortField:c,sortIndexField:i}=this[n];if(c){const{op:s=d3,field:l}=c;r.push(l),a.push(s),u.push(hi(c,{forAs:!0}))}else i&&(r.push(i),a.push("max"),u.push(i));return{name:this[n].name,source:e??this.data,transform:[Object.assign({type:"aggregate",groupby:this[n].fields},r.length?{fields:r,ops:a,as:u}:{})]}}assembleFacetHeaderData(n){var e,o;const{columns:f}=this.model.layout,{layoutHeaders:r}=this.model.component,a=[],u={};for(const s of k8){for(const l of T8){const d=(e=r[s]&&r[s][l])!==null&&e!==void 0?e:[];for(const h of d)if(((o=h.axes)===null||o===void 0?void 0:o.length)>0){u[s]=!0;break}}if(u[s]){const l=`length(data("${this.facet.name}"))`,d=s==="row"?f?{signal:`ceil(${l} / ${f})`}:1:f?{signal:`min(${l}, ${f})`}:{signal:l};a.push({name:`${this.facet.name}_${s}`,transform:[{type:"sequence",start:0,stop:d}]})}}const{row:c,column:i}=u;return(c||i)&&a.unshift(this.assembleRowColumnHeaderData("facet",null,n)),a}assemble(){var n,e;const o=[];let f=null;const r=this.getChildIndependentFieldsWithStep(),{column:a,row:u,facet:c}=this;if(a&&u&&(r.x||r.y)){f=`cross_${this.column.name}_${this.row.name}`;const i=[].concat((n=r.x)!==null&&n!==void 0?n:[],(e=r.y)!==null&&e!==void 0?e:[]),s=i.map(()=>"distinct");o.push({name:f,source:this.data,transform:[{type:"aggregate",groupby:this.fields,fields:i,ops:s}]})}for(const i of[qh,Vh])this[i]&&o.push(this.assembleRowColumnHeaderData(i,f,r));if(c){const i=this.assembleFacetHeaderData(r);i&&o.push(...i)}return o}}function UP(t){return t.startsWith("'")&&t.endsWith("'")||t.startsWith('"')&&t.endsWith('"')?t.slice(1,-1):t}function dbe(t,n){const e=bE(t);if(n==="number")return`toNumber(${e})`;if(n==="boolean")return`toBoolean(${e})`;if(n==="string")return`toString(${e})`;if(n==="date")return`toDate(${e})`;if(n==="flatten")return e;if(n.startsWith("date:")){const o=UP(n.slice(5,n.length));return`timeParse(${e},'${o}')`}else if(n.startsWith("utc:")){const o=UP(n.slice(4,n.length));return`utcParse(${e},'${o}')`}else return Kr(Pge(n)),null}function pbe(t){const n={};return l_(t.filter,e=>{var o;if(sV(e)){let f=null;RE(e)?f=Xu(e.equal):NE(e)?f=Xu(e.lte):FE(e)?f=Xu(e.lt):BE(e)?f=Xu(e.gt):jE(e)?f=Xu(e.gte):UE(e)?f=e.range[0]:VE(e)&&(f=((o=e.oneOf)!==null&&o!==void 0?o:e.in)[0]),f&&(Q0(f)?n[e.field]="date":wo(f)?n[e.field]="number":bi(f)&&(n[e.field]="string")),e.timeUnit&&(n[e.field]="date")}}),n}function gbe(t){const n={};function e(o){Pm(o)?n[o.field]="date":o.type==="quantitative"&&uge(o.aggregate)?n[o.field]="number":Mm(o.field)>1?o.field in n||(n[o.field]="flatten"):eg(o)&&Wf(o.sort)&&Mm(o.sort.field)>1&&(o.sort.field in n||(n[o.sort.field]="flatten"))}if((Is(t)||lf(t))&&t.forEachFieldDef((o,f)=>{if(wc(o))e(o);else{const r=J0(f),a=t.fieldDef(r);e(Object.assign(Object.assign({},o),{type:a.type}))}}),Is(t)){const{mark:o,markDef:f,encoding:r}=t;if(kp(o)&&!t.encoding.order){const a=f.orient==="horizontal"?"y":"x",u=r[a];ti(u)&&u.type==="quantitative"&&!(u.field in n)&&(n[u.field]="number")}}return n}function mbe(t){const n={};if(Is(t)&&t.component.selection)for(const e of Xr(t.component.selection)){const o=t.component.selection[e];for(const f of o.project.items)!f.channel&&Mm(f.field)>1&&(n[f.field]="flatten")}return n}class Nl extends To{constructor(n,e){super(n),this._parse=e}clone(){return new Nl(null,ha(this._parse))}hash(){return`Parse ${Ba(this._parse)}`}static makeExplicit(n,e,o){var f;let r={};const a=e.data;return!$d(a)&&((f=a?.format)===null||f===void 0?void 0:f.parse)&&(r=a.format.parse),this.makeWithAncestors(n,r,{},o)}static makeWithAncestors(n,e,o,f){for(const u of Xr(o)){const c=f.getWithExplicit(u);c.value!==void 0&&(c.explicit||c.value===o[u]||c.value==="derived"||o[u]==="flatten"?delete o[u]:Kr(tP(u,o[u],c.value)))}for(const u of Xr(e)){const c=f.get(u);c!==void 0&&(c===e[u]?delete e[u]:Kr(tP(u,e[u],c)))}const r=new ad(e,o);f.copyAll(r);const a={};for(const u of Xr(r.combine())){const c=r.get(u);c!==null&&(a[u]=c)}return Xr(a).length===0||f.parseNothing?null:new Nl(n,a)}get parse(){return this._parse}merge(n){this._parse=Object.assign(Object.assign({},this._parse),n.parse),n.remove()}assembleFormatParse(){const n={};for(const e of Xr(this._parse)){const o=this._parse[e];Mm(e)===1&&(n[e]=o)}return n}producedFields(){return new Set(Xr(this._parse))}dependentFields(){return new Set(Xr(this._parse))}assembleTransforms(n=!1){return Xr(this._parse).filter(e=>n?Mm(e)>1:!0).map(e=>{const o=dbe(e,this._parse[e]);return o?{type:"formula",expr:o,as:_E(e)}:null}).filter(e=>e!==null)}}class up extends To{clone(){return new up(null)}constructor(n){super(n)}dependentFields(){return new Set}producedFields(){return new Set([nh])}hash(){return"Identifier"}assemble(){return{type:"identifier",as:nh}}}class hx extends To{constructor(n,e){super(n),this.params=e}clone(){return new hx(null,this.params)}dependentFields(){return new Set}producedFields(){}hash(){return`Graticule ${Ba(this.params)}`}assemble(){return Object.assign({type:"graticule"},this.params===!0?{}:this.params)}}class dx extends To{constructor(n,e){super(n),this.params=e}clone(){return new dx(null,this.params)}dependentFields(){return new Set}producedFields(){var n;return new Set([(n=this.params.as)!==null&&n!==void 0?n:"data"])}hash(){return`Hash ${Ba(this.params)}`}assemble(){return Object.assign({type:"sequence"},this.params)}}class j0 extends To{constructor(n){super(null),n??(n={name:"source"});let e;if($d(n)||(e=n.format?Object.assign({},Eu(n.format,["parse"])):{}),py(n))this._data={values:n.values};else if(Dm(n)){if(this._data={url:n.url},!e.type){let o=/(?:\.([^.]+))?$/.exec(n.url)[1];Fa(["json","csv","tsv","dsv","topojson"],o)||(o="json"),e.type=o}}else Tq(n)?this._data={values:[{type:"Sphere"}]}:(wq(n)||$d(n))&&(this._data={});this._generator=$d(n),n.name&&(this._name=n.name),e&&!_o(e)&&(this._data.format=e)}dependentFields(){return new Set}producedFields(){}get data(){return this._data}hasName(){return!!this._name}get isGenerator(){return this._generator}get dataName(){return this._name}set dataName(n){this._name=n}set parent(n){throw new Error("Source nodes have to be roots.")}remove(){throw new Error("Source nodes are roots and cannot be removed.")}hash(){throw new Error("Cannot hash sources")}assemble(){return Object.assign(Object.assign({name:this._name},this._data),{transform:[]})}}var VP=globalThis&&globalThis.__classPrivateFieldSet||function(t,n,e,o,f){if(o==="m")throw new TypeError("Private method is not writable");if(o==="a"&&!f)throw new TypeError("Private accessor was defined without a setter");if(typeof n=="function"?t!==n||!f:!n.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return o==="a"?f.call(t,e):f?f.value=e:n.set(t,e),e},vbe=globalThis&&globalThis.__classPrivateFieldGet||function(t,n,e,o){if(e==="a"&&!o)throw new TypeError("Private accessor was defined without a getter");if(typeof n=="function"?t!==n||!o:!n.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?o:e==="a"?o.call(t):o?o.value:n.get(t)},Av;function E8(t){return t instanceof j0||t instanceof hx||t instanceof dx}class C8{constructor(){Av.set(this,void 0),VP(this,Av,!1,"f")}setModified(){VP(this,Av,!0,"f")}get modifiedFlag(){return vbe(this,Av,"f")}}Av=new WeakMap;class tg extends C8{getNodeDepths(n,e,o){o.set(n,e);for(const f of n.children)this.getNodeDepths(f,e+1,o);return o}optimize(n){const o=[...this.getNodeDepths(n,0,new Map).entries()].sort((f,r)=>r[1]-f[1]);for(const f of o)this.run(f[0]);return this.modifiedFlag}}class O8 extends C8{optimize(n){this.run(n);for(const e of n.children)this.optimize(e);return this.modifiedFlag}}class ybe extends O8{mergeNodes(n,e){const o=e.shift();for(const f of e)n.removeChild(f),f.parent=o,f.remove()}run(n){const e=n.children.map(f=>f.hash()),o={};for(let f=0;f1&&(this.setModified(),this.mergeNodes(n,o[f]))}}class xbe extends O8{constructor(n){super(),this.requiresSelectionId=n&&w8(n)}run(n){n instanceof up&&(this.requiresSelectionId&&(E8(n.parent)||n.parent instanceof sf||n.parent instanceof Nl)||(this.setModified(),n.remove()))}}class bbe extends C8{optimize(n){return this.run(n,new Set),this.modifiedFlag}run(n,e){let o=new Set;n instanceof Yf&&(o=n.producedFields(),yE(o,e)&&(this.setModified(),n.removeFormulas(e),n.producedFields.length===0&&n.remove()));for(const f of n.children)this.run(f,new Set([...e,...o]))}}class _be extends O8{constructor(){super()}run(n){n instanceof hu&&!n.isRequired()&&(this.setModified(),n.remove())}}class wbe extends tg{run(n){if(!E8(n)&&!(n.numChildren()>1)){for(const e of n.children)if(e instanceof Nl)if(n instanceof Nl)this.setModified(),n.merge(e);else{if(xE(n.producedFields(),e.dependentFields()))continue;this.setModified(),e.swapWithParent()}}}}class kbe extends tg{run(n){const e=[...n.children],o=n.children.filter(f=>f instanceof Nl);if(n.numChildren()>1&&o.length>=1){const f={},r=new Set;for(const a of o){const u=a.parse;for(const c of Xr(u))c in f?f[c]!==u[c]&&r.add(c):f[c]=u[c]}for(const a of r)delete f[a];if(!_o(f)){this.setModified();const a=new Nl(n,f);for(const u of e){if(u instanceof Nl)for(const c of Xr(f))delete u.parse[c];n.removeChild(u),u.parent=a,u instanceof Nl&&Xr(u.parse).length===0&&u.remove()}}}}}class Tbe extends tg{run(n){n instanceof hu||n.numChildren()>0||n instanceof a1||n instanceof j0||(this.setModified(),n.remove())}}class Abe extends tg{run(n){const e=n.children.filter(f=>f instanceof Yf),o=e.pop();for(const f of e)this.setModified(),o.merge(f)}}class Mbe extends tg{run(n){const e=n.children.filter(f=>f instanceof sf),o={};for(const f of e){const r=Ba(f.groupBy);r in o||(o[r]=[]),o[r].push(f)}for(const f of Xr(o)){const r=o[f];if(r.length>1){const a=r.pop();for(const u of r)a.merge(u)&&(n.removeChild(u),u.parent=a,u.remove(),this.setModified())}}}}class Sbe extends tg{constructor(n){super(),this.model=n}run(n){const e=!(E8(n)||n instanceof i1||n instanceof Nl||n instanceof up),o=[],f=[];for(const r of n.children)r instanceof Xf&&(e&&!xE(n.producedFields(),r.dependentFields())?o.push(r):f.push(r));if(o.length>0){const r=o.pop();for(const a of o)r.merge(a,this.model.renameSignal.bind(this.model));this.setModified(),n instanceof Xf?n.merge(r,this.model.renameSignal.bind(this.model)):r.swapWithParent()}if(f.length>1){const r=f.pop();for(const a of f)r.merge(a,this.model.renameSignal.bind(this.model));this.setModified()}}}class Ebe extends tg{run(n){const e=[...n.children];if(!L0(e,a=>a instanceof hu)||n.numChildren()<=1)return;const f=[];let r;for(const a of e)if(a instanceof hu){let u=a;for(;u.numChildren()===1;){const[c]=u.children;if(c instanceof hu)u=c;else break}f.push(...u.children),r?(n.removeChild(a),a.parent=r.parent,r.parent.removeChild(r),r.parent=u,this.setModified()):r=u}else f.push(a);if(f.length){this.setModified();for(const a of f)a.parent.removeChild(a),a.parent=r}}}class ng extends To{constructor(n,e){super(n),this.transform=e}clone(){return new ng(null,ha(this.transform))}addDimensions(n){this.transform.groupby=Vf(this.transform.groupby.concat(n),e=>e)}dependentFields(){const n=new Set;return this.transform.groupby&&this.transform.groupby.forEach(n.add,n),this.transform.joinaggregate.map(e=>e.field).filter(e=>e!==void 0).forEach(n.add,n),n}producedFields(){return new Set(this.transform.joinaggregate.map(this.getDefaultName))}getDefaultName(n){var e;return(e=n.as)!==null&&e!==void 0?e:hi(n)}hash(){return`JoinAggregateTransform ${Ba(this.transform)}`}assemble(){const n=[],e=[],o=[];for(const r of this.transform.joinaggregate)e.push(r.op),o.push(this.getDefaultName(r)),n.push(r.field===void 0?null:r.field);const f=this.transform.groupby;return Object.assign({type:"joinaggregate",as:o,ops:e,fields:n},f!==void 0?{groupby:f}:{})}}function Cbe(t){return t.stack.stackBy.reduce((n,e)=>{const o=e.fieldDef,f=hi(o);return f&&n.push(f),n},[])}function Obe(t){return Ir(t)&&t.every(n=>bi(n))&&t.length>1}class $h extends To{constructor(n,e){super(n),this._stack=e}clone(){return new $h(null,ha(this._stack))}static makeFromTransform(n,e){const{stack:o,groupby:f,as:r,offset:a="zero"}=e,u=[],c=[];if(e.sort!==void 0)for(const l of e.sort)u.push(l.field),c.push(Rs(l.order,"ascending"));const i={field:u,order:c};let s;return Obe(r)?s=r:bi(r)?s=[r,`${r}_end`]:s=[`${e.stack}_start`,`${e.stack}_end`],new $h(n,{dimensionFieldDefs:[],stackField:o,groupby:f,offset:a,sort:i,facetby:[],as:s})}static makeFromEncoding(n,e){const o=e.stack,{encoding:f}=e;if(!o)return null;const{groupbyChannels:r,fieldChannel:a,offset:u,impute:c}=o,i=r.map(h=>{const m=f[h];return th(m)}).filter(h=>!!h),s=Cbe(e),l=e.encoding.order;let d;return Ir(l)||ti(l)?d=$U(l):d=s.reduce((h,m)=>(h.field.push(m),h.order.push(a==="y"?"descending":"ascending"),h),{field:[],order:[]}),new $h(n,{dimensionFieldDefs:i,stackField:e.vgField(a),facetby:[],stackby:s,sort:d,offset:u,impute:c,as:[e.vgField(a,{suffix:"start",forAs:!0}),e.vgField(a,{suffix:"end",forAs:!0})]})}get stack(){return this._stack}addDimensions(n){this._stack.facetby.push(...n)}dependentFields(){const n=new Set;return n.add(this._stack.stackField),this.getGroupbyFields().forEach(n.add,n),this._stack.facetby.forEach(n.add,n),this._stack.sort.field.forEach(n.add,n),n}producedFields(){return new Set(this._stack.as)}hash(){return`Stack ${Ba(this._stack)}`}getGroupbyFields(){const{dimensionFieldDefs:n,impute:e,groupby:o}=this._stack;return n.length>0?n.map(f=>f.bin?e?[hi(f,{binSuffix:"mid"})]:[hi(f,{}),hi(f,{binSuffix:"end"})]:[hi(f)]).flat():o??[]}assemble(){const n=[],{facetby:e,dimensionFieldDefs:o,stackField:f,stackby:r,sort:a,offset:u,impute:c,as:i}=this._stack;if(c)for(const s of o){const{bandPosition:l=.5,bin:d}=s;if(d){const h=hi(s,{expr:"datum"}),m=hi(s,{expr:"datum",binSuffix:"end"});n.push({type:"formula",expr:`${l}*${h}+${1-l}*${m}`,as:hi(s,{binSuffix:"mid",forAs:!0})})}n.push({type:"impute",field:f,groupby:[...r,...e],key:hi(s,{binSuffix:"mid"}),method:"value",value:0})}return n.push({type:"stack",groupby:[...this.getGroupbyFields(),...e],field:f,sort:a,as:i,offset:u}),n}}class o1 extends To{constructor(n,e){super(n),this.transform=e}clone(){return new o1(null,ha(this.transform))}addDimensions(n){this.transform.groupby=Vf(this.transform.groupby.concat(n),e=>e)}dependentFields(){var n,e;const o=new Set;return((n=this.transform.groupby)!==null&&n!==void 0?n:[]).forEach(o.add,o),((e=this.transform.sort)!==null&&e!==void 0?e:[]).forEach(f=>o.add(f.field)),this.transform.window.map(f=>f.field).filter(f=>f!==void 0).forEach(o.add,o),o}producedFields(){return new Set(this.transform.window.map(this.getDefaultName))}getDefaultName(n){var e;return(e=n.as)!==null&&e!==void 0?e:hi(n)}hash(){return`WindowTransform ${Ba(this.transform)}`}assemble(){var n;const e=[],o=[],f=[],r=[];for(const d of this.transform.window)o.push(d.op),f.push(this.getDefaultName(d)),r.push(d.param===void 0?null:d.param),e.push(d.field===void 0?null:d.field);const a=this.transform.frame,u=this.transform.groupby;if(a&&a[0]===null&&a[1]===null&&o.every(d=>EE(d)))return Object.assign({type:"joinaggregate",as:f,ops:o,fields:e},u!==void 0?{groupby:u}:{});const c=[],i=[];if(this.transform.sort!==void 0)for(const d of this.transform.sort)c.push(d.field),i.push((n=d.order)!==null&&n!==void 0?n:"ascending");const s={field:c,order:i},l=this.transform.ignorePeers;return Object.assign(Object.assign(Object.assign({type:"window",params:r,as:f,ops:o,fields:e,sort:s},l!==void 0?{ignorePeers:l}:{}),u!==void 0?{groupby:u}:{}),a!==void 0?{frame:a}:{})}}function Lbe(t){function n(e){if(!(e instanceof a1)){const o=e.clone();if(o instanceof hu){const f=oA+o.getSource();o.setSource(f),t.model.component.data.outputNodes[f]=o}else(o instanceof sf||o instanceof $h||o instanceof o1||o instanceof ng)&&o.addDimensions(t.fields);for(const f of e.children.flatMap(n))f.parent=o;return[o]}return e.children.flatMap(n)}return n}function aA(t){if(t instanceof a1)if(t.numChildren()===1&&!(t.children[0]instanceof hu)){const n=t.children[0];(n instanceof sf||n instanceof $h||n instanceof o1||n instanceof ng)&&n.addDimensions(t.fields),n.swapWithParent(),aA(t)}else{const n=t.model.component.data.main;pH(n);const e=Lbe(t),o=t.children.map(e).flat();for(const f of o)f.parent=n}else t.children.map(aA)}function pH(t){if(t instanceof hu&&t.type===Fo.Main&&t.numChildren()===1){const n=t.children[0];n instanceof a1||(n.swapWithParent(),pH(t))}}const oA="scale_",Eb=5;function sA(t){for(const n of t){for(const e of n.children)if(e.parent!==n)return!1;if(!sA(n.children))return!1}return!0}function Uc(t,n){let e=!1;for(const o of n)e=t.optimize(o)||e;return e}function qP(t,n,e){let o=t.sources,f=!1;return f=Uc(new _be,o)||f,f=Uc(new xbe(n),o)||f,o=o.filter(r=>r.numChildren()>0),f=Uc(new Tbe,o)||f,o=o.filter(r=>r.numChildren()>0),e||(f=Uc(new wbe,o)||f,f=Uc(new Sbe(n),o)||f,f=Uc(new bbe,o)||f,f=Uc(new kbe,o)||f,f=Uc(new Mbe,o)||f,f=Uc(new Abe,o)||f,f=Uc(new ybe,o)||f,f=Uc(new Ebe,o)||f),t.sources=o,f}function Pbe(t,n){sA(t.sources);let e=0,o=0;for(let f=0;fn(e))}}var Dbe=globalThis&&globalThis.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);f({signal:`{data: ${y3(o,{timeUnit:e,type:n})}}`}))}function z4(t,n,e){var o;const f=(o=Gl(e))===null||o===void 0?void 0:o.unit;return n==="temporal"||f?Nbe(t,n,f):[t]}function bd(t,n,e,o){const{encoding:f}=e,r=Ws(f[o]),{type:a}=r,u=r.timeUnit;if(Qme(n)){const l=bd(t,void 0,e,o),d=z4(n.unionWith,a,u);return If([...d,...l.value])}else{if(Vi(n))return If([n]);if(n&&n!=="unaggregated"&&!pV(n))return If(z4(n,a,u))}const c=e.stack;if(c&&o===c.fieldChannel){if(c.offset==="normalize")return Gu([[0,1]]);const l=e.requestDataName(Fo.Main);return Gu([{data:l,field:e.vgField(o,{suffix:"start"})},{data:l,field:e.vgField(o,{suffix:"end"})}])}const i=bp(o)&&ti(r)?jbe(e,o,t):void 0;if(mh(r)){const l=z4([r.datum],a,u);return Gu(l)}const s=r;if(n==="unaggregated"){const l=e.requestDataName(Fo.Main),{field:d}=r;return Gu([{data:l,field:hi({field:d,aggregate:"min"})},{data:l,field:hi({field:d,aggregate:"max"})}])}else if(Bo(s.bin)){if(ll(t))return Gu(t==="bin-ordinal"?[]:[{data:fy(i)?e.requestDataName(Fo.Main):e.requestDataName(Fo.Raw),field:e.vgField(o,ux(s,o)?{binSuffix:"range"}:{}),sort:i===!0||!Ei(i)?{field:e.vgField(o,{}),op:"min"}:i}]);{const{bin:l}=s;if(Bo(l)){const d=S8(e,s.field,l);return Gu([new Ou(()=>{const h=e.getSignalName(d);return`[${h}.start, ${h}.stop]`})])}else return Gu([{data:e.requestDataName(Fo.Main),field:e.vgField(o,{})}])}}else if(s.timeUnit&&Fa(["time","utc"],t)&&LV(s,Is(e)?e.encoding[ph(o)]:void 0,e.markDef,e.config)){const l=e.requestDataName(Fo.Main);return Gu([{data:l,field:e.vgField(o)},{data:l,field:e.vgField(o,{suffix:"end"})}])}else return Gu(i?[{data:fy(i)?e.requestDataName(Fo.Main):e.requestDataName(Fo.Raw),field:e.vgField(o),sort:i}]:[{data:e.requestDataName(Fo.Main),field:e.vgField(o)}])}function R4(t,n){const{op:e,field:o,order:f}=t;return Object.assign(Object.assign({op:e??(n?"sum":d3)},o?{field:bc(o)}:{}),f?{order:f}:{})}function Bbe(t,n){var e;const o=t.component.scales[n],f=t.specifiedScales[n].domain,r=(e=t.fieldDef(n))===null||e===void 0?void 0:e.bin,a=pV(f)&&f,u=K0(r)&&s3(r.extent)&&r.extent;(a||u)&&o.set("selectionExtent",a??u,!0)}function jbe(t,n,e){if(!ll(e))return;const o=t.fieldDef(n),f=o.sort;if(EV(f))return{op:"min",field:Rm(o,n),order:"ascending"};const{stack:r}=t,a=r?new Set([...r.groupbyFields,...r.stackBy.map(u=>u.fieldDef.field)]):void 0;if(Wf(f)){const u=r&&!a.has(f.field);return R4(f,u)}else if(SV(f)){const{encoding:u,order:c}=f,i=t.fieldDef(u),{aggregate:s,field:l}=i,d=r&&!a.has(l);if(Xh(s)||_p(s))return R4({field:hi(i),order:c},d);if(EE(s)||!s)return R4({op:s,field:l,order:c},d)}else{if(f==="descending")return{op:"min",field:t.vgField(n),order:"descending"};if(Fa(["ascending",void 0],f))return!0}}function HP(t,n){const{aggregate:e,type:o}=t;return e?bi(e)&&!fge.has(e)?{valid:!1,reason:nme(e)}:o==="quantitative"&&n==="log"?{valid:!1,reason:rme(t)}:{valid:!0}:{valid:!1,reason:tme(t)}}function lA(t,n,e,o){return t.explicit&&n.explicit&&Kr(lme(e,o,t.value,n.value)),{explicit:t.explicit,value:[...t.value,...n.value]}}function Ube(t){const n=Vf(t.map(a=>Nh(a)?Dbe(a,["sort"]):a),Ba),e=Vf(t.map(a=>{if(Nh(a)){const u=a.sort;return u!==void 0&&!fy(u)&&("op"in u&&u.op==="count"&&delete u.field,u.order==="ascending"&&delete u.order),u}}).filter(a=>a!==void 0),Ba);if(n.length===0)return;if(n.length===1){const a=t[0];if(Nh(a)&&e.length>0){let u=e[0];if(e.length>1)Kr(rP),u=!0;else if(Ei(u)&&"field"in u){const c=u.field;a.field===c&&(u=u.order?{order:u.order}:!0)}return Object.assign(Object.assign({},a),{sort:u})}return a}const o=Vf(e.map(a=>fy(a)||!("op"in a)||bi(a.op)&&a.op in sge?a:(Kr(cme(a)),!0)),Ba);let f;o.length===1?f=o[0]:o.length>1&&(Kr(rP),f=!0);const r=Vf(t.map(a=>Nh(a)?a.data:null),a=>a);return r.length===1&&r[0]!==null?Object.assign({data:r[0],fields:n.map(u=>u.field)},f?{sort:f}:{}):Object.assign({fields:n},f?{sort:f}:{})}function L8(t){if(Nh(t)&&bi(t.field))return t.field;if(dge(t)){let n;for(const e of t.fields)if(Nh(e)&&bi(e.field)){if(!n)n=e.field;else if(n!==e.field)return Kr(fme),n}return Kr(hme),n}else if(pge(t)){Kr(dme);const n=t.fields[0];return bi(n)?n:void 0}}function E3(t,n){const o=t.component.scales[n].get("domains").map(f=>(Nh(f)&&(f.data=t.lookupDataSource(f.data)),f));return Ube(o)}var Vbe=globalThis&&globalThis.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);fn.concat(mH(e)),$P(t)):$P(t)}function $P(t){return Xr(t.component.scales).reduce((n,e)=>{const o=t.component.scales[e];if(o.merged)return n;const f=o.combine(),{name:r,type:a,selectionExtent:u,domains:c,range:i,reverse:s}=f,l=Vbe(f,["name","type","selectionExtent","domains","range","reverse"]),d=qbe(f.range,r,e,t),h=E3(t,e),m=u?Dye(t,u,o,h):null;return n.push(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({name:r,type:a},h?{domain:h}:{}),m?{domainRaw:m}:{}),{range:d}),s!==void 0?{reverse:s}:{}),l)),n},[])}function qbe(t,n,e,o){if(sl(e)){if(wp(t))return{step:{signal:`${n}_step`}}}else if(Ei(t)&&Nh(t))return Object.assign(Object.assign({},t),{data:o.lookupDataSource(t.data)});return t}class vH extends ad{constructor(n,e){super({},{name:n}),this.merged=!1,this.setWithExplicit("type",e)}domainDefinitelyIncludesZero(){return this.get("zero")!==!1?!0:L0(this.get("domains"),n=>Ir(n)&&n.length===2&&n[0]<=0&&n[1]>=0)}}const Hbe=["range","scheme"];function $be(t){const n=t.component.scales;for(const e of o3){const o=n[e];if(!o)continue;const f=Gbe(e,t);o.setWithExplicit("range",f)}}function GP(t,n){const e=t.fieldDef(n);if(e?.bin){const{bin:o,field:f}=e,r=Fu(n),a=t.getName(r);if(Ei(o)&&o.binned&&o.step!==void 0)return new Ou(()=>{const u=t.scaleName(n),c=`(domain("${u}")[1] - domain("${u}")[0]) / ${o.step}`;return`${t.getSignalName(a)} / (${c})`});if(Bo(o)){const u=S8(t,f,o);return new Ou(()=>{const c=t.getSignalName(u),i=`(${c}.stop - ${c}.start) / ${c}.step`;return`${t.getSignalName(a)} / (${i})`})}}}function Gbe(t,n){const e=n.specifiedScales[t],{size:o}=n,r=n.getScaleComponent(t).get("type");for(const l of Hbe)if(e[l]!==void 0){const d=UT(r,l),h=gV(t,l);if(!d)Kr(KU(r,l,t));else if(h)Kr(h);else switch(l){case"range":{const m=e.range;if(Ir(m)){if(sl(t))return If(m.map(g=>{if(g==="width"||g==="height"){const p=n.getName(g),v=n.getSignalName.bind(n);return Ou.fromName(v,p)}return g}))}else if(Ei(m))return If({data:n.requestDataName(Fo.Main),field:m.field,sort:{op:"min",field:n.vgField(t)}});return If(m)}case"scheme":return If(Wbe(e[l]))}}const a=t===cs||t==="xOffset"?"width":"height",u=o[a];if(rh(u)){if(sl(t))if(ll(r)){const l=yH(u,n,t);if(l)return If({step:l})}else Kr(QU(a));else if(t1(t)){const l=t===gp?"x":"y";if(n.getScaleComponent(l).get("type")==="band"){const m=xH(u,r);if(m)return If(m)}}}const{rangeMin:c,rangeMax:i}=e,s=Ybe(t,n);return(c!==void 0||i!==void 0)&&UT(r,"rangeMin")&&Ir(s)&&s.length===2?If([c??s[0],i??s[1]]):Gu(s)}function Wbe(t){return Kme(t)?Object.assign({scheme:t.name},Eu(t,["name"])):{scheme:t}}function Ybe(t,n){const{size:e,config:o,mark:f,encoding:r}=n,a=n.getSignalName.bind(n),{type:u}=Ws(r[t]),i=n.getScaleComponent(t).get("type"),{domain:s,domainMid:l}=n.specifiedScales[t];switch(t){case cs:case ol:{if(Fa(["point","band"],i)){const m=bH(t,e,o.view);if(rh(m))return{step:yH(m,n,t)}}const d=Fu(t),h=n.getName(d);return t===ol&&rc(i)?[Ou.fromName(a,h),0]:[0,Ou.fromName(a,h)]}case gp:case e1:return Xbe(t,n,i);case nd:{const d=n.component.scales[t].get("zero"),h=_H(f,d,o),m=Kbe(f,e,n,o);return Cm(i)?Jbe(h,m,Zbe(i,o,s,t)):[h,m]}case Tc:return[0,Math.PI*2];case Z0:return[0,360];case xf:return[0,new Ou(()=>{const d=n.getSignalName("width"),h=n.getSignalName("height");return`min(${d},${h})/2`})];case yp:return[o.scale.minStrokeWidth,o.scale.maxStrokeWidth];case xp:return[[1,0],[4,2],[2,1],[1,1],[1,2,4,2]];case Ru:return"symbol";case zu:case hh:case dh:return i==="ordinal"?u==="nominal"?"category":"ordinal":l!==void 0?"diverging":f==="rect"||f==="geoshape"?"heatmap":"ramp";case rd:case mp:case vp:return[o.scale.minOpacity,o.scale.maxOpacity]}}function yH(t,n,e){var o,f,r,a,u;const{encoding:c}=n,i=n.getScaleComponent(e),s=DU(e),l=c[s];if(sq({step:t,offsetIsDiscrete:la(l)&&uV(l.type)})==="offset"&&VV(c,s)){const h=n.getScaleComponent(s);let g=`domain('${n.scaleName(s)}').length`;if(h.get("type")==="band"){const v=(f=(o=h.get("paddingInner"))!==null&&o!==void 0?o:h.get("padding"))!==null&&f!==void 0?f:0,y=(a=(r=h.get("paddingOuter"))!==null&&r!==void 0?r:h.get("padding"))!==null&&a!==void 0?a:0;g=`bandspace(${g}, ${v}, ${y})`}const p=(u=i.get("paddingInner"))!==null&&u!==void 0?u:i.get("padding");return{signal:`${t.step} * ${g} / (1-${yge(p)})`}}else return t.step}function xH(t,n){if(sq({step:t,offsetIsDiscrete:ll(n)})==="offset")return{step:t.step}}function Xbe(t,n,e){const o=t===gp?"x":"y",r=n.getScaleComponent(o).get("type"),a=n.scaleName(o);if(r==="band"){const u=bH(o,n.size,n.config.view);if(rh(u)){const c=xH(u,e);if(c)return c}return[0,{signal:`bandwidth('${a}')`}]}else return bU(`Cannot use ${t} scale if ${o} scale is not discrete.`)}function bH(t,n,e){const o=t===cs?"width":"height",f=n[o];return f||D2(e,o)}function Zbe(t,n,e,o){switch(t){case"quantile":return n.scale.quantileCount;case"quantize":return n.scale.quantizeCount;case"threshold":return e!==void 0&&Ir(e)?e.length+1:(Kr(wme(o)),3)}}function Jbe(t,n,e){const o=()=>{const f=Hh(n),r=Hh(t),a=`(${f} - ${r}) / (${e} - 1)`;return`sequence(${r}, ${f} + ${a}, ${a})`};return Vi(n)?new Ou(o):{signal:o()}}function _H(t,n,e){if(n)return Vi(n)?{signal:`${n.signal} ? 0 : ${_H(t,!1,e)}`}:0;switch(t){case"bar":case"tick":return e.scale.minBandSize;case"line":case"trail":case"rule":return e.scale.minStrokeWidth;case"text":return e.scale.minFontSize;case"point":case"square":case"circle":return e.scale.minSize}throw new Error(l3("size",t))}const WP=.95;function Kbe(t,n,e,o){const f={x:GP(e,"x"),y:GP(e,"y")};switch(t){case"bar":case"tick":{if(o.scale.maxBandSize!==void 0)return o.scale.maxBandSize;const r=YP(n,f,o.view);return wo(r)?r-1:new Ou(()=>`${r.signal} - 1`)}case"line":case"trail":case"rule":return o.scale.maxStrokeWidth;case"text":return o.scale.maxFontSize;case"point":case"square":case"circle":{if(o.scale.maxSize)return o.scale.maxSize;const r=YP(n,f,o.view);return wo(r)?Math.pow(WP*r,2):new Ou(()=>`pow(${WP} * ${r.signal}, 2)`)}}throw new Error(l3("size",t))}function YP(t,n,e){const o=rh(t.width)?t.width.step:P2(e,"width"),f=rh(t.height)?t.height.step:P2(e,"height");return n.x||n.y?new Ou(()=>`min(${[n.x?n.x.signal:o,n.y?n.y.signal:f].join(", ")})`):Math.min(o,f)}function wH(t,n){Is(t)?Qbe(t,n):TH(t,n)}function Qbe(t,n){const e=t.component.scales,{config:o,encoding:f,markDef:r,specifiedScales:a}=t;for(const u of Xr(e)){const c=a[u],i=e[u],s=t.getScaleComponent(u),l=Ws(f[u]),d=c[n],h=s.get("type"),m=s.get("padding"),g=s.get("paddingInner"),p=UT(h,n),v=gV(u,n);if(d!==void 0&&(p?v&&Kr(v):Kr(KU(h,n,u))),p&&v===void 0)if(d!==void 0){const y=l.timeUnit,x=l.type;switch(n){case"domainMax":case"domainMin":Q0(c[n])||x==="temporal"||y?i.set(n,{signal:y3(c[n],{type:x,timeUnit:y})},!0):i.set(n,c[n],!0);break;default:i.copyKeyFromObject(n,c)}}else{const y=n in XP?XP[n]({model:t,channel:u,fieldOrDatumDef:l,scaleType:h,scalePadding:m,scalePaddingInner:g,domain:c.domain,domainMin:c.domainMin,domainMax:c.domainMax,markDef:r,config:o,hasNestedOffsetScale:$T(f,u),hasSecondaryRangeChannel:!!f[ph(u)]}):o.scale[n];y!==void 0&&i.set(n,y,!1)}}}const XP={bins:({model:t,fieldOrDatumDef:n})=>ti(n)?e_e(t,n):void 0,interpolate:({channel:t,fieldOrDatumDef:n})=>t_e(t,n.type),nice:({scaleType:t,channel:n,domain:e,domainMin:o,domainMax:f,fieldOrDatumDef:r})=>n_e(t,n,e,o,f,r),padding:({channel:t,scaleType:n,fieldOrDatumDef:e,markDef:o,config:f})=>r_e(t,n,f.scale,e,o,f.bar),paddingInner:({scalePadding:t,channel:n,markDef:e,scaleType:o,config:f,hasNestedOffsetScale:r})=>i_e(t,n,e.type,o,f.scale,r),paddingOuter:({scalePadding:t,channel:n,scaleType:e,scalePaddingInner:o,config:f,hasNestedOffsetScale:r})=>a_e(t,n,e,o,f.scale,r),reverse:({fieldOrDatumDef:t,scaleType:n,channel:e,config:o})=>{const f=ti(t)?t.sort:void 0;return o_e(n,f,e,o.scale)},zero:({channel:t,fieldOrDatumDef:n,domain:e,markDef:o,scaleType:f,config:r,hasSecondaryRangeChannel:a})=>s_e(t,n,e,o,f,r.scale,a)};function kH(t){Is(t)?$be(t):TH(t,"range")}function TH(t,n){const e=t.component.scales;for(const o of t.children)n==="range"?kH(o):wH(o,n);for(const o of Xr(e)){let f;for(const r of t.children){const a=r.component.scales[o];if(a){const u=a.getWithExplicit(n);f=ap(f,u,n,"scale",_q((c,i)=>{switch(n){case"range":return c.step&&i.step?c.step-i.step:0}return 0}))}}e[o].setWithExplicit(n,f)}}function e_e(t,n){const e=n.bin;if(Bo(e)){const o=S8(t,n.field,e);return new Ou(()=>t.getSignalName(o))}else if(xl(e)&&K0(e)&&e.step!==void 0)return{step:e.step}}function t_e(t,n){if(Fa([zu,hh,dh],t)&&n!=="nominal")return"hcl"}function n_e(t,n,e,o,f,r){var a;if(!(((a=th(r))===null||a===void 0?void 0:a.bin)||Ir(e)||f!=null||o!=null||Fa([Cu.TIME,Cu.UTC],t)))return sl(n)?!0:void 0}function r_e(t,n,e,o,f,r){if(sl(t)){if(nf(n)){if(e.continuousPadding!==void 0)return e.continuousPadding;const{type:a,orient:u}=f;if(a==="bar"&&!(ti(o)&&(o.bin||o.timeUnit))&&(u==="vertical"&&t==="x"||u==="horizontal"&&t==="y"))return r.continuousBandSize}if(n===Cu.POINT)return e.pointPadding}}function i_e(t,n,e,o,f,r=!1){if(t===void 0){if(sl(n)){const{bandPaddingInner:a,barBandPaddingInner:u,rectBandPaddingInner:c,bandWithNestedOffsetPaddingInner:i}=f;return r?i:Rs(a,e==="bar"?u:c)}else if(t1(n)&&o===Cu.BAND)return f.offsetBandPaddingInner}}function a_e(t,n,e,o,f,r=!1){if(t===void 0){if(sl(n)){const{bandPaddingOuter:a,bandWithNestedOffsetPaddingOuter:u}=f;if(r)return u;if(e===Cu.BAND)return Rs(a,Vi(o)?{signal:`${o.signal}/2`}:o/2)}else if(t1(n)){if(e===Cu.POINT)return .5;if(e===Cu.BAND)return f.offsetBandPaddingOuter}}}function o_e(t,n,e,o){if(e==="x"&&o.xReverse!==void 0)return rc(t)&&n==="descending"?Vi(o.xReverse)?{signal:`!${o.xReverse.signal}`}:!o.xReverse:o.xReverse;if(rc(t)&&n==="descending")return!0}function s_e(t,n,e,o,f,r,a){if(!!e&&e!=="unaggregated"&&rc(f)){if(Ir(e)){const c=e[0],i=e[e.length-1];if(c<=0&&i>=0)return!0}return!1}if(t==="size"&&n.type==="quantitative"&&!Cm(f))return!0;if(!(ti(n)&&n.bin)&&Fa([...gh,...Q0e],t)){const{orient:c,type:i}=o;return Fa(["bar","area","line","trail"],i)&&(c==="horizontal"&&t==="y"||c==="vertical"&&t==="x")?!1:Fa(["bar","area"],i)&&!a?!0:r?.zero}return!1}function l_e(t,n,e,o,f=!1){const r=u_e(n,e,o,f),{type:a}=t;return bp(n)?a!==void 0?a1e(n,a)?ti(e)&&!i1e(a,e.type)?(Kr(ome(a,r)),r):a:(Kr(ame(n,a,r)),r):r:null}function u_e(t,n,e,o){var f;switch(n.type){case"nominal":case"ordinal":{if(im(t)||E4(t)==="discrete")return t==="shape"&&n.type==="ordinal"&&Kr(C4(t,"ordinal")),"ordinal";if(sl(t)||t1(t)){if(Fa(["rect","bar","image","rule"],e.type)||o)return"band"}else if(e.type==="arc"&&t in SE)return"band";const r=e[Fu(t)];return R0(r)||Lm(n)&&((f=n.axis)===null||f===void 0?void 0:f.tickBand)?"band":"point"}case"temporal":return im(t)?"time":E4(t)==="discrete"?(Kr(C4(t,"temporal")),"ordinal"):ti(n)&&n.timeUnit&&Gl(n.timeUnit).utc?"utc":"time";case"quantitative":return im(t)?ti(n)&&Bo(n.bin)?"bin-ordinal":"linear":E4(t)==="discrete"?(Kr(C4(t,"quantitative")),"ordinal"):"linear";case"geojson":return}throw new Error(ZU(n.type))}function c_e(t,{ignoreRange:n}={}){AH(t),gH(t);for(const e of r1e)wH(t,e);n||kH(t)}function AH(t){Is(t)?t.component.scales=f_e(t):t.component.scales=d_e(t)}function f_e(t){const{encoding:n,mark:e,markDef:o}=t,f={};for(const r of o3){const a=Ws(n[r]);if(a&&e===yV&&r===Ru&&a.type===n1)continue;let u=a&&a.scale;if(t1(r)){const c=IU(r);if(!$T(n,c)){u&&Kr($ge(r));continue}}if(a&&u!==null&&u!==!1){u??(u={});const c=$T(n,r),i=l_e(u,r,a,o,c);f[r]=new vH(t.scaleName(`${r}`,!0),{value:i,explicit:u.type===i})}}return f}const h_e=_q((t,n)=>aP(t)-aP(n));function d_e(t){var n,e;const o=t.component.scales={},f={},r=t.component.resolve;for(const a of t.children){AH(a);for(const u of Xr(a.component.scales))if((n=(e=r.scale)[u])!==null&&n!==void 0||(e[u]=nH(u,t)),r.scale[u]==="shared"){const c=f[u],i=a.component.scales[u].getWithExplicit("type");c?Wme(c.value,i.value)?f[u]=ap(c,i,"type","scale",h_e):(r.scale[u]="independent",delete f[u]):f[u]=i}}for(const a of Xr(f)){const u=t.scaleName(a,!0),c=f[a];o[a]=new vH(u,c);for(const i of t.children){const s=i.component.scales[a];s&&(i.renameScale(s.get("name"),u),s.merged=!0)}}return o}var F4=globalThis&&globalThis.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);f{var l,d,h;return!((l=s.from)===null||l===void 0)&&l.data&&(s.from.data=this.lookupDataSource(s.from.data)),!((h=(d=s.from)===null||d===void 0?void 0:d.facet)===null||h===void 0)&&h.data&&(s.from.facet.data=this.lookupDataSource(s.from.facet.data)),s},this.parent=o,this.config=r,this.view=Tu(u),this.name=(c=n.name)!==null&&c!==void 0?c:f,this.title=Ad(n.title)?{text:n.title}:n.title?Tu(n.title):void 0,this.scaleNameMap=o?o.scaleNameMap:new N4,this.projectionNameMap=o?o.projectionNameMap:new N4,this.signalNameMap=o?o.signalNameMap:new N4,this.data=n.data,this.description=n.description,this.transforms=mye((i=n.transform)!==null&&i!==void 0?i:[]),this.layout=e==="layer"||e==="unit"?{}:wve(n,e,r),this.component={data:{sources:o?o.component.data.sources:[],outputNodes:o?o.component.data.outputNodes:{},outputNodeRefCounts:o?o.component.data.outputNodeRefCounts:{},isFaceted:p3(n)||o?.component.data.isFaceted&&n.data===void 0},layoutSize:new ad,layoutHeaders:{row:{},column:{},facet:{}},mark:null,resolve:Object.assign({scale:{},axis:{},legend:{}},a?ha(a):{}),selection:null,scales:null,projection:null,axes:{},legends:{}}}get width(){return this.getSizeSignalRef("width")}get height(){return this.getSizeSignalRef("height")}parse(){this.parseScale(),this.parseLayoutSize(),this.renameTopLevelLayoutSizeSignal(),this.parseSelections(),this.parseProjection(),this.parseData(),this.parseAxesAndHeaders(),this.parseLegends(),this.parseMarkGroup()}parseScale(){c_e(this)}parseProjection(){hH(this)}renameTopLevelLayoutSizeSignal(){this.getName("width")!=="width"&&this.renameSignal(this.getName("width"),"width"),this.getName("height")!=="height"&&this.renameSignal(this.getName("height"),"height")}parseLegends(){sH(this)}assembleEncodeFromView(n){const e=F4(n,["style"]),o={};for(const f of Xr(e)){const r=e[f];r!==void 0&&(o[f]=Ho(r))}return o}assembleGroupEncodeEntry(n){let e={};return this.view&&(e=this.assembleEncodeFromView(this.view)),!n&&(this.description&&(e.description=Ho(this.description)),this.type==="unit"||this.type==="layer")?Object.assign({width:this.getSizeSignalRef("width"),height:this.getSizeSignalRef("height")},e??{}):_o(e)?void 0:e}assembleLayout(){if(!this.layout)return;const n=this.layout,{spacing:e}=n,o=F4(n,["spacing"]),{component:f,config:r}=this,a=Oxe(f.layoutHeaders,r);return Object.assign(Object.assign(Object.assign({padding:e},this.assembleDefaultLayout()),o),a?{titleBand:a}:{})}assembleDefaultLayout(){return{}}assembleHeaderMarks(){const{layoutHeaders:n}=this.component;let e=[];for(const o of dc)n[o].title&&e.push(Txe(this,o));for(const o of k8)e=e.concat(Axe(this,o));return e}assembleAxes(){return hxe(this.component.axes,this.config)}assembleLegends(){return uH(this)}assembleProjections(){return ebe(this)}assembleTitle(){var n,e,o;const f=(n=this.title)!==null&&n!==void 0?n:{},{encoding:r}=f,a=F4(f,["encoding"]),u=Object.assign(Object.assign(Object.assign({},UU(this.config.title).nonMarkTitleProperties),a),r?{encode:{update:r}}:{});if(u.text)return Fa(["unit","layer"],this.type)?Fa(["middle",void 0],u.anchor)&&((e=u.frame)!==null&&e!==void 0||(u.frame="group")):(o=u.anchor)!==null&&o!==void 0||(u.anchor="start"),_o(u)?void 0:u}assembleGroup(n=[]){const e={};n=n.concat(this.assembleSignals()),n.length>0&&(e.signals=n);const o=this.assembleLayout();o&&(e.layout=o),e.marks=[].concat(this.assembleHeaderMarks(),this.assembleMarks());const f=!this.parent||lf(this.parent)?mH(this):[];f.length>0&&(e.scales=f);const r=this.assembleAxes();r.length>0&&(e.axes=r);const a=this.assembleLegends();return a.length>0&&(e.legends=a),e}getName(n){return Xo((this.name?`${this.name}_`:"")+n)}getDataName(n){return this.getName(Fo[n].toLowerCase())}requestDataName(n){const e=this.getDataName(n),o=this.component.data.outputNodeRefCounts;return o[e]=(o[e]||0)+1,e}getSizeSignalRef(n){if(lf(this.parent)){const e=eH(n),o=a3(e),f=this.component.scales[o];if(f&&!f.merged){const r=f.get("type"),a=f.get("range");if(ll(r)&&wp(a)){const u=f.get("name"),c=E3(this,o),i=L8(c);if(i){const s=hi({aggregate:"distinct",field:i},{expr:"datum"});return{signal:Qq(u,f,s)}}else return Kr(LE(o)),null}}}return{signal:this.signalNameMap.get(this.getName(n))}}lookupDataSource(n){const e=this.component.data.outputNodes[n];return e?e.getSource():n}getSignalName(n){return this.signalNameMap.get(n)}renameSignal(n,e){this.signalNameMap.rename(n,e)}renameScale(n,e){this.scaleNameMap.rename(n,e)}renameProjection(n,e){this.projectionNameMap.rename(n,e)}scaleName(n,e){if(e)return this.getName(n);if(LU(n)&&bp(n)&&this.component.scales[n]||this.scaleNameMap.has(this.getName(n)))return this.scaleNameMap.get(this.getName(n))}projectionName(n){if(n)return this.getName("projection");if(this.component.projection&&!this.component.projection.merged||this.projectionNameMap.has(this.getName("projection")))return this.projectionNameMap.get(this.getName("projection"))}getScaleComponent(n){if(!this.component.scales)throw new Error("getScaleComponent cannot be called before parseScale(). Make sure you have called parseScale or use parseUnitModelWithScale().");const e=this.component.scales[n];return e&&!e.merged?e:this.parent?this.parent.getScaleComponent(n):void 0}getSelectionComponent(n,e){let o=this.component.selection[n];if(!o&&this.parent&&(o=this.parent.getSelectionComponent(n,e)),!o)throw new Error(kge(e));return o}hasAxisOrientSignalRef(){var n,e;return((n=this.component.axes.x)===null||n===void 0?void 0:n.some(o=>o.hasOrientSignalRef()))||((e=this.component.axes.y)===null||e===void 0?void 0:e.some(o=>o.hasOrientSignalRef()))}}class MH extends D8{vgField(n,e={}){const o=this.fieldDef(n);if(!!o)return hi(o,e)}reduceFieldDef(n,e){return Z1e(this.getMapping(),(o,f,r)=>{const a=th(f);return a?n(o,a,r):o},e)}forEachFieldDef(n,e){a8(this.getMapping(),(o,f)=>{const r=th(o);r&&n(r,f)},e)}}var p_e=globalThis&&globalThis.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);f{const l=bp(s)&&e.getScaleComponent(s);if(l){const d=l.get("type");rc(d)&&i.aggregate!=="count"&&!kp(f)&&(c[i.field]=i)}return c},{});return Xr(u).length?new my(n,u):null}dependentFields(){return new Set(Xr(this.filter))}producedFields(){return new Set}hash(){return`FilterInvalid ${Ba(this.filter)}`}assemble(){const n=Xr(this.filter).reduce((e,o)=>{const f=this.filter[o],r=hi(f,{expr:"datum"});return f!==null&&(f.type==="temporal"?e.push(`(isDate(${r}) || (isValid(${r}) && isFinite(+${r})))`):f.type==="quantitative"&&(e.push(`isValid(${r})`),e.push(`isFinite(+${r})`))),e},[]);return n.length>0?{type:"filter",expr:n.join(" && ")}:null}}class O3 extends To{constructor(n,e){super(n),this.transform=e,this.transform=ha(e);const{flatten:o,as:f=[]}=this.transform;this.transform.as=o.map((r,a)=>{var u;return(u=f[a])!==null&&u!==void 0?u:r})}clone(){return new O3(this.parent,ha(this.transform))}dependentFields(){return new Set(this.transform.flatten)}producedFields(){return new Set(this.transform.as)}hash(){return`FlattenTransform ${Ba(this.transform)}`}assemble(){const{flatten:n,as:e}=this.transform;return{type:"flatten",fields:n,as:e}}}class L3 extends To{constructor(n,e){var o,f,r;super(n),this.transform=e,this.transform=ha(e);const a=(o=this.transform.as)!==null&&o!==void 0?o:[void 0,void 0];this.transform.as=[(f=a[0])!==null&&f!==void 0?f:"key",(r=a[1])!==null&&r!==void 0?r:"value"]}clone(){return new L3(null,ha(this.transform))}dependentFields(){return new Set(this.transform.fold)}producedFields(){return new Set(this.transform.as)}hash(){return`FoldTransform ${Ba(this.transform)}`}assemble(){const{fold:n,as:e}=this.transform;return{type:"fold",fields:n,as:e}}}class sm extends To{constructor(n,e,o,f){super(n),this.fields=e,this.geojson=o,this.signal=f}clone(){return new sm(null,ha(this.fields),this.geojson,this.signal)}static parseAll(n,e){if(e.component.projection&&!e.component.projection.isFit)return n;let o=0;for(const f of[[fh,ch],[_c,bf]]){const r=f.map(a=>{const u=Ws(e.encoding[a]);return ti(u)?u.field:mh(u)?{expr:`${u.datum}`}:pf(u)?{expr:`${u.value}`}:void 0});(r[0]||r[1])&&(n=new sm(n,r,null,e.getName(`geojson_${o++}`)))}if(e.channelHasField(Ru)){const f=e.typedFieldDef(Ru);f.type===n1&&(n=new sm(n,null,f.field,e.getName(`geojson_${o++}`)))}return n}dependentFields(){var n;const e=((n=this.fields)!==null&&n!==void 0?n:[]).filter(bi);return new Set([...this.geojson?[this.geojson]:[],...e])}producedFields(){return new Set}hash(){return`GeoJSON ${this.geojson} ${this.signal} ${Ba(this.fields)}`}assemble(){return[...this.geojson?[{type:"filter",expr:`isValid(datum["${this.geojson}"])`}]:[],Object.assign(Object.assign(Object.assign({type:"geojson"},this.fields?{fields:this.fields}:{}),this.geojson?{geojson:this.geojson}:{}),{signal:this.signal})]}}class vy extends To{constructor(n,e,o,f){super(n),this.projection=e,this.fields=o,this.as=f}clone(){return new vy(null,this.projection,ha(this.fields),ha(this.as))}static parseAll(n,e){if(!e.projectionName())return n;for(const o of[[fh,ch],[_c,bf]]){const f=o.map(a=>{const u=Ws(e.encoding[a]);return ti(u)?u.field:mh(u)?{expr:`${u.datum}`}:pf(u)?{expr:`${u.value}`}:void 0}),r=o[0]===_c?"2":"";(f[0]||f[1])&&(n=new vy(n,e.projectionName(),f,[e.getName(`x${r}`),e.getName(`y${r}`)]))}return n}dependentFields(){return new Set(this.fields.filter(bi))}producedFields(){return new Set(this.as)}hash(){return`Geopoint ${this.projection} ${Ba(this.fields)} ${Ba(this.as)}`}assemble(){return{type:"geopoint",projection:this.projection,fields:this.fields,as:this.as}}}class x0 extends To{constructor(n,e){super(n),this.transform=e}clone(){return new x0(null,ha(this.transform))}dependentFields(){var n;return new Set([this.transform.impute,this.transform.key,...(n=this.transform.groupby)!==null&&n!==void 0?n:[]])}producedFields(){return new Set([this.transform.impute])}processSequence(n){const{start:e=0,stop:o,step:f}=n;return{signal:`sequence(${[e,o,...f?[f]:[]].join(",")})`}}static makeFromTransform(n,e){return new x0(n,e)}static makeFromEncoding(n,e){const o=e.encoding,f=o.x,r=o.y;if(ti(f)&&ti(r)){const a=f.impute?f:r.impute?r:void 0;if(a===void 0)return;const u=f.impute?r:r.impute?f:void 0,{method:c,value:i,frame:s,keyvals:l}=a.impute,d=HV(e.mark,o);return new x0(n,Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({impute:a.field,key:u.field},c?{method:c}:{}),i!==void 0?{value:i}:{}),s?{frame:s}:{}),l!==void 0?{keyvals:l}:{}),d.length?{groupby:d}:{}))}return null}hash(){return`Impute ${Ba(this.transform)}`}assemble(){const{impute:n,key:e,keyvals:o,method:f,groupby:r,value:a,frame:u=[null,null]}=this.transform,c=Object.assign(Object.assign(Object.assign(Object.assign({type:"impute",field:n,key:e},o?{keyvals:Kve(o)?this.processSequence(o):o}:{}),{method:"value"}),r?{groupby:r}:{}),{value:!f||f==="value"?a:null});if(f&&f!=="value"){const i=Object.assign({type:"window",as:[`imputed_${n}_value`],ops:[f],fields:[n],frame:u,ignorePeers:!1},r?{groupby:r}:{}),s={type:"formula",expr:`datum.${n} === null ? datum.imputed_${n}_value : datum.${n}`,as:n};return[c,i,s]}else return[c]}}var g_e=globalThis&&globalThis.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);fo)}producedFields(){}dependentFields(){var n;return new Set([this.transform.pivot,this.transform.value,...(n=this.transform.groupby)!==null&&n!==void 0?n:[]])}hash(){return`PivotTransform ${Ba(this.transform)}`}assemble(){const{pivot:n,value:e,groupby:o,limit:f,op:r}=this.transform;return Object.assign(Object.assign(Object.assign({type:"pivot",field:n,value:e},f!==void 0?{limit:f}:{}),r!==void 0?{op:r}:{}),o!==void 0?{groupby:o}:{})}}class R3 extends To{constructor(n,e){super(n),this.transform=e}clone(){return new R3(null,ha(this.transform))}dependentFields(){return new Set}producedFields(){return new Set}hash(){return`SampleTransform ${Ba(this.transform)}`}assemble(){return{type:"sample",size:this.transform.sample}}}function SH(t){let n=0;function e(o,f){var r;if(o instanceof j0&&!o.isGenerator&&!Dm(o.data)&&(t.push(f),f={name:null,source:f.name,transform:[]}),o instanceof Nl&&(o.parent instanceof j0&&!f.source?(f.format=Object.assign(Object.assign({},(r=f.format)!==null&&r!==void 0?r:{}),{parse:o.assembleFormatParse()}),f.transform.push(...o.assembleTransforms(!0))):f.transform.push(...o.assembleTransforms())),o instanceof a1){f.name||(f.name=`data_${n++}`),!f.source||f.transform.length>0?(t.push(f),o.data=f.name):o.data=f.source,t.push(...o.assemble());return}switch((o instanceof hx||o instanceof dx||o instanceof my||o instanceof i1||o instanceof zm||o instanceof vy||o instanceof sf||o instanceof yy||o instanceof o1||o instanceof ng||o instanceof L3||o instanceof O3||o instanceof C3||o instanceof P3||o instanceof D3||o instanceof I3||o instanceof up||o instanceof R3||o instanceof z3)&&f.transform.push(o.assemble()),(o instanceof Xf||o instanceof Yf||o instanceof x0||o instanceof $h||o instanceof sm)&&f.transform.push(...o.assemble()),o instanceof hu&&(f.source&&f.transform.length===0?o.setSource(f.source):o.parent instanceof hu?o.setSource(f.name):(f.name||(f.name=`data_${n++}`),o.setSource(f.name),o.numChildren()===1&&(t.push(f),f={name:null,source:f.name,transform:[]}))),o.numChildren()){case 0:o instanceof hu&&(!f.source||f.transform.length>0)&&t.push(f);break;case 1:e(o.children[0],f);break;default:{f.name||(f.name=`data_${n++}`);let a=f.name;!f.source||f.transform.length>0?t.push(f):a=f.source;for(const u of o.children)e(u,{name:null,source:a,transform:[]});break}}}return e}function y_e(t){const n=[],e=SH(n);for(const o of t.children)e(o,{source:t.name,name:null,transform:[]});return n}function x_e(t,n){var e,o;const f=[],r=SH(f);let a=0;for(const c of t.sources){c.hasName()||(c.dataName=`source_${a++}`);const i=c.assemble();r(c,i)}for(const c of f)c.transform.length===0&&delete c.transform;let u=0;for(const[c,i]of f.entries())((e=i.transform)!==null&&e!==void 0?e:[]).length===0&&!i.source&&f.splice(u++,0,f.splice(c,1)[0]);for(const c of f)for(const i of(o=c.transform)!==null&&o!==void 0?o:[])i.type==="lookup"&&(i.from=t.outputNodes[i.from].getSource());for(const c of f)c.name in n&&(c.values=n[c.name]);return f}function b_e(t){return t==="top"||t==="left"||Vi(t)?"header":"footer"}function __e(t){for(const n of dc)w_e(t,n);ZP(t,"x"),ZP(t,"y")}function w_e(t,n){var e;const{facet:o,config:f,child:r,component:a}=t;if(t.channelHasField(n)){const u=o[n],c=Fm("title",null,f,n);let i=am(u,f,{allowDisabling:!0,includeDefault:c===void 0||!!c});r.component.layoutHeaders[n].title&&(i=Ir(i)?i.join(", "):i,i+=` / ${r.component.layoutHeaders[n].title}`,r.component.layoutHeaders[n].title=null);const s=Fm("labelOrient",u.header,f,n),l=u.header!==null?Rs((e=u.header)===null||e===void 0?void 0:e.labels,f.header.labels,!0):!1,d=Fa(["bottom","right"],s)?"footer":"header";a.layoutHeaders[n]={title:u.header!==null?i:null,facetFieldDef:u,[d]:n==="facet"?[]:[EH(t,n,l)]}}}function EH(t,n,e){const o=n==="row"?"height":"width";return{labels:e,sizeSignal:t.child.component.layoutSize.get(o)?t.child.getSizeSignalRef(o):void 0,axes:[]}}function ZP(t,n){var e;const{child:o}=t;if(o.component.axes[n]){const{layoutHeaders:f,resolve:r}=t.component;if(r.axis[n]=M8(r,n),r.axis[n]==="shared"){const a=n==="x"?"column":"row",u=f[a];for(const c of o.component.axes[n]){const i=b_e(c.get("orient"));(e=u[i])!==null&&e!==void 0||(u[i]=[EH(t,a,!1)]);const s=Tv(c,"main",t.config,{header:!0});s&&u[i][0].axes.push(s),c.mainExtracted=!0}}}}function k_e(t){I8(t),F2(t,"width"),F2(t,"height")}function T_e(t){I8(t);const n=t.layout.columns===1?"width":"childWidth",e=t.layout.columns===void 0?"height":"childHeight";F2(t,n),F2(t,e)}function I8(t){for(const n of t.children)n.parseLayoutSize()}function F2(t,n){var e;const o=eH(n),f=a3(o),r=t.component.resolve,a=t.component.layoutSize;let u;for(const c of t.children){const i=c.component.layoutSize.getWithExplicit(o),s=(e=r.scale[f])!==null&&e!==void 0?e:nH(f,t);if(s==="independent"&&i.value==="step"){u=void 0;break}if(u){if(s==="independent"&&u.value!==i.value){u=void 0;break}u=ap(u,i,o,"")}else u=i}if(u){for(const c of t.children)t.renameSignal(c.getName(o),t.getName(n)),c.component.layoutSize.set(o,"merged",!1);a.setWithExplicit(n,u)}else a.setWithExplicit(n,{explicit:!1,value:void 0})}function A_e(t){const{size:n,component:e}=t;for(const o of gh){const f=Fu(o);if(n[f]){const r=n[f];e.layoutSize.set(f,rh(r)?"step":r,!0)}else{const r=M_e(t,f);e.layoutSize.set(f,r,!1)}}}function M_e(t,n){const e=n==="width"?"x":"y",o=t.config,f=t.getScaleComponent(e);if(f){const r=f.get("type"),a=f.get("range");if(ll(r)){const u=D2(o.view,n);return wp(a)||rh(u)?"step":u}else return WT(o.view,n)}else{if(t.hasProjection||t.mark==="arc")return WT(o.view,n);{const r=D2(o.view,n);return rh(r)?r.step:r}}}function uA(t,n,e){return hi(n,Object.assign({suffix:`by_${hi(t)}`},e??{}))}class jv extends MH{constructor(n,e,o,f){super(n,"facet",e,o,f,n.resolve),this.child=B8(n.spec,this,this.getName("child"),void 0,f),this.children=[this.child],this.facet=this.initFacet(n.facet)}initFacet(n){if(!sx(n))return{facet:this.initFacetFieldDef(n,"facet")};const e=Xr(n),o={};for(const f of e){if(![Vh,qh].includes(f)){Kr(l3(f,"facet"));break}const r=n[f];if(r.field===void 0){Kr(BT(r,f));break}o[f]=this.initFacetFieldDef(r,f)}return o}initFacetFieldDef(n,e){const o=r8(n,e);return o.header?o.header=Tu(o.header):o.header===null&&(o.header=null),o}channelHasField(n){return!!this.facet[n]}fieldDef(n){return this.facet[n]}parseData(){this.component.data=F3(this),this.child.parseData()}parseLayoutSize(){I8(this)}parseSelections(){this.child.parseSelections(),this.component.selection=this.child.component.selection}parseMarkGroup(){this.child.parseMarkGroup()}parseAxesAndHeaders(){this.child.parseAxesAndHeaders(),__e(this)}assembleSelectionTopLevelSignals(n){return this.child.assembleSelectionTopLevelSignals(n)}assembleSignals(){return this.child.assembleSignals(),[]}assembleSelectionData(n){return this.child.assembleSelectionData(n)}getHeaderLayoutMixins(){var n,e,o;const f={};for(const r of dc)for(const a of T8){const u=this.component.layoutHeaders[r],c=u[a],{facetFieldDef:i}=u;if(i){const s=Fm("titleOrient",i.header,this.config,r);if(["right","bottom"].includes(s)){const l=M3(r,s);(n=f.titleAnchor)!==null&&n!==void 0||(f.titleAnchor={}),f.titleAnchor[l]="end"}}if(c?.[0]){const s=r==="row"?"height":"width",l=a==="header"?"headerBand":"footerBand";r!=="facet"&&!this.child.component.layoutSize.get(s)&&((e=f[l])!==null&&e!==void 0||(f[l]={}),f[l][r]=.5),u.title&&((o=f.offset)!==null&&o!==void 0||(f.offset={}),f.offset[r==="row"?"rowTitle":"columnTitle"]=10)}}return f}assembleDefaultLayout(){const{column:n,row:e}=this.facet,o=n?this.columnDistinctSignal():e?1:void 0;let f="all";return(!e&&this.component.resolve.scale.x==="independent"||!n&&this.component.resolve.scale.y==="independent")&&(f="none"),Object.assign(Object.assign(Object.assign({},this.getHeaderLayoutMixins()),o?{columns:o}:{}),{bounds:"full",align:f})}assembleLayoutSignals(){return this.child.assembleLayoutSignals()}columnDistinctSignal(){if(!(this.parent&&this.parent instanceof jv))return{signal:`length(data('${this.getName("column_domain")}'))`}}assembleGroupStyle(){}assembleGroup(n){return this.parent&&this.parent instanceof jv?Object.assign(Object.assign({},this.channelHasField("column")?{encode:{update:{columns:{field:hi(this.facet.column,{prefix:"distinct"})}}}}:{}),super.assembleGroup(n)):super.assembleGroup(n)}getCardinalityAggregateForChild(){const n=[],e=[],o=[];if(this.child instanceof jv){if(this.child.channelHasField("column")){const f=hi(this.child.facet.column);n.push(f),e.push("distinct"),o.push(`distinct_${f}`)}}else for(const f of gh){const r=this.child.component.scales[f];if(r&&!r.merged){const a=r.get("type"),u=r.get("range");if(ll(a)&&wp(u)){const c=E3(this.child,f),i=L8(c);i?(n.push(i),e.push("distinct"),o.push(`distinct_${i}`)):Kr(LE(f))}}}return{fields:n,ops:e,as:o}}assembleFacet(){const{name:n,data:e}=this.component.data.facetRoot,{row:o,column:f}=this.facet,{fields:r,ops:a,as:u}=this.getCardinalityAggregateForChild(),c=[];for(const s of dc){const l=this.facet[s];if(l){c.push(hi(l));const{bin:d,sort:h}=l;if(Bo(d)&&c.push(hi(l,{binSuffix:"end"})),Wf(h)){const{field:m,op:g=d3}=h,p=uA(l,h);o&&f?(r.push(p),a.push("max"),u.push(p)):(r.push(m),a.push(g),u.push(p))}else if(Ir(h)){const m=Rm(l,s);r.push(m),a.push("max"),u.push(m)}}}const i=!!o&&!!f;return Object.assign({name:n,data:e,groupby:c},i||r.length>0?{aggregate:Object.assign(Object.assign({},i?{cross:i}:{}),r.length?{fields:r,ops:a,as:u}:{})}:{})}facetSortFields(n){const{facet:e}=this,o=e[n];return o?Wf(o.sort)?[uA(o,o.sort,{expr:"datum"})]:Ir(o.sort)?[Rm(o,n,{expr:"datum"})]:[hi(o,{expr:"datum"})]:[]}facetSortOrder(n){const{facet:e}=this,o=e[n];if(o){const{sort:f}=o;return[(Wf(f)?f.order:!Ir(f)&&f)||"ascending"]}return[]}assembleLabelTitle(){var n;const{facet:e,config:o}=this;if(e.facet)return rA(e.facet,"facet",o);const f={row:["top","bottom"],column:["left","right"]};for(const r of k8)if(e[r]){const a=Fm("labelOrient",(n=e[r])===null||n===void 0?void 0:n.header,o,r);if(f[r].includes(a))return rA(e[r],r,o)}}assembleMarks(){const{child:n}=this,e=this.component.data.facetRoot,o=y_e(e),f=n.assembleGroupEncodeEntry(!1),r=this.assembleLabelTitle()||n.assembleTitle(),a=n.assembleGroupStyle();return[Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({name:this.getName("cell"),type:"group"},r?{title:r}:{}),a?{style:a}:{}),{from:{facet:this.assembleFacet()},sort:{field:dc.map(c=>this.facetSortFields(c)).flat(),order:dc.map(c=>this.facetSortOrder(c)).flat()}}),o.length>0?{data:o}:{}),f?{encode:{update:f}}:{}),n.assembleGroup(Cye(this,[])))]}getMapping(){return this.facet}}function S_e(t,n){const{row:e,column:o}=n;if(e&&o){let f=null;for(const r of[e,o])if(Wf(r.sort)){const{field:a,op:u=d3}=r.sort;t=f=new ng(t,{joinaggregate:[{op:u,field:a,as:uA(r,r.sort,{forAs:!0})}],groupby:[hi(r)]})}return f}return null}function CH(t,n){var e,o,f,r;for(const a of n){const u=a.data;if(t.name&&a.hasName()&&t.name!==a.dataName)continue;const c=(e=t.format)===null||e===void 0?void 0:e.mesh,i=(o=u.format)===null||o===void 0?void 0:o.feature;if(c&&i)continue;const s=(f=t.format)===null||f===void 0?void 0:f.feature;if((s||i)&&s!==i)continue;const l=(r=u.format)===null||r===void 0?void 0:r.mesh;if(!((c||l)&&c!==l)){if(py(t)&&py(u)){if(Uf(t.values,u.values))return a}else if(Dm(t)&&Dm(u)){if(t.url===u.url)return a}else if(wq(t)&&t.name===a.dataName)return a}}return null}function E_e(t,n){if(t.data||!t.parent){if(t.data===null){const o=new j0({values:[]});return n.push(o),o}const e=CH(t.data,n);if(e)return $d(t.data)||(e.data.format=_U({},t.data.format,e.data.format)),!e.hasName()&&t.data.name&&(e.dataName=t.data.name),e;{const o=new j0(t.data);return n.push(o),o}}else return t.parent.component.data.facetRoot?t.parent.component.data.facetRoot:t.parent.component.data.main}function C_e(t,n,e){var o,f;let r=0;for(const a of n.transforms){let u,c;if(cye(a))c=t=new zm(t,a),u="derived";else if(m8(a)){const i=pbe(a);c=t=(o=Nl.makeWithAncestors(t,{},i,e))!==null&&o!==void 0?o:t,t=new i1(t,n,a.filter)}else if(mq(a))c=t=Xf.makeFromTransform(t,a,n),u="number";else if(hye(a))u="date",e.getWithExplicit(a.field).value===void 0&&(t=new Nl(t,{[a.field]:u}),e.set(a.field,u,!1)),c=t=Yf.makeFromTransform(t,a);else if(dye(a))c=t=sf.makeFromTransform(t,a),u="number",w8(n)&&(t=new up(t));else if(gq(a))c=t=yy.make(t,n,a,r++),u="derived";else if(sye(a))c=t=new o1(t,a),u="number";else if(lye(a))c=t=new ng(t,a),u="number";else if(pye(a))c=t=$h.makeFromTransform(t,a),u="derived";else if(gye(a))c=t=new L3(t,a),u="derived";else if(uye(a))c=t=new O3(t,a),u="derived";else if(tye(a))c=t=new z3(t,a),u="derived";else if(oye(a))t=new R3(t,a);else if(fye(a))c=t=x0.makeFromTransform(t,a),u="derived";else if(nye(a))c=t=new C3(t,a),u="derived";else if(rye(a))c=t=new D3(t,a),u="derived";else if(iye(a))c=t=new I3(t,a),u="derived";else if(aye(a))c=t=new P3(t,a),u="derived";else{Kr(Ige(a));continue}if(c&&u!==void 0)for(const i of(f=c.producedFields())!==null&&f!==void 0?f:[])e.set(i,u,!1)}return t}function F3(t){var n,e,o,f,r,a,u,c,i,s;let l=E_e(t,t.component.data.sources);const{outputNodes:d,outputNodeRefCounts:h}=t.component.data,m=t.data,p=!(m&&($d(m)||Dm(m)||py(m)))&&t.parent?t.parent.component.data.ancestorParse.clone():new Mye;$d(m)?(kq(m)?l=new dx(l,m.sequence):v8(m)&&(l=new hx(l,m.graticule)),p.parseNothing=!0):((n=m?.format)===null||n===void 0?void 0:n.parse)===null&&(p.parseNothing=!0),l=(e=Nl.makeExplicit(l,t,p))!==null&&e!==void 0?e:l,l=new up(l);const v=t.parent&&s1(t.parent);(Is(t)||lf(t))&&v&&(l=(o=Xf.makeFromEncoding(l,t))!==null&&o!==void 0?o:l),t.transforms.length>0&&(l=C_e(l,t,p));const y=mbe(t),x=gbe(t);l=(f=Nl.makeWithAncestors(l,{},Object.assign(Object.assign({},y),x),p))!==null&&f!==void 0?f:l,Is(t)&&(l=sm.parseAll(l,t),l=vy.parseAll(l,t)),(Is(t)||lf(t))&&(v||(l=(r=Xf.makeFromEncoding(l,t))!==null&&r!==void 0?r:l),l=(a=Yf.makeFromEncoding(l,t))!==null&&a!==void 0?a:l,l=zm.parseAllForSortIndex(l,t));const w=t.getDataName(Fo.Raw),k=new hu(l,w,Fo.Raw,h);if(d[w]=k,l=k,Is(t)){const M=sf.makeFromEncoding(l,t);M&&(l=M,w8(t)&&(l=new up(l))),l=(u=x0.makeFromEncoding(l,t))!==null&&u!==void 0?u:l,l=(c=$h.makeFromEncoding(l,t))!==null&&c!==void 0?c:l}Is(t)&&(l=(i=my.make(l,t))!==null&&i!==void 0?i:l);const b=t.getDataName(Fo.Main),T=new hu(l,b,Fo.Main,h);d[b]=T,l=T,Is(t)&&cxe(t,T);let _=null;if(lf(t)){const M=t.getName("facet");l=(s=S_e(l,t.facet))!==null&&s!==void 0?s:l,_=new a1(l,t,M,T.getSource()),d[M]=_}return Object.assign(Object.assign({},t.component.data),{outputNodes:d,outputNodeRefCounts:h,raw:k,main:T,facetRoot:_,ancestorParse:p})}class O_e extends D8{constructor(n,e,o,f){var r,a,u,c;super(n,"concat",e,o,f,n.resolve),(((a=(r=n.resolve)===null||r===void 0?void 0:r.axis)===null||a===void 0?void 0:a.x)==="shared"||((c=(u=n.resolve)===null||u===void 0?void 0:u.axis)===null||c===void 0?void 0:c.y)==="shared")&&Kr(Lge),this.children=this.getChildren(n).map((i,s)=>B8(i,this,this.getName(`concat_${s}`),void 0,f))}parseData(){this.component.data=F3(this);for(const n of this.children)n.parseData()}parseSelections(){this.component.selection={};for(const n of this.children){n.parseSelections();for(const e of Xr(n.component.selection))this.component.selection[e]=n.component.selection[e]}}parseMarkGroup(){for(const n of this.children)n.parseMarkGroup()}parseAxesAndHeaders(){for(const n of this.children)n.parseAxesAndHeaders()}getChildren(n){return _3(n)?n.vconcat:p8(n)?n.hconcat:n.concat}parseLayoutSize(){T_e(this)}parseAxisGroup(){return null}assembleSelectionTopLevelSignals(n){return this.children.reduce((e,o)=>o.assembleSelectionTopLevelSignals(e),n)}assembleSignals(){return this.children.forEach(n=>n.assembleSignals()),[]}assembleLayoutSignals(){const n=A8(this);for(const e of this.children)n.push(...e.assembleLayoutSignals());return n}assembleSelectionData(n){return this.children.reduce((e,o)=>o.assembleSelectionData(e),n)}assembleMarks(){return this.children.map(n=>{const e=n.assembleTitle(),o=n.assembleGroupStyle(),f=n.assembleGroupEncodeEntry(!1);return Object.assign(Object.assign(Object.assign(Object.assign({type:"group",name:n.getName("group")},e?{title:e}:{}),o?{style:o}:{}),f?{encode:{update:f}}:{}),n.assembleGroup())})}assembleGroupStyle(){}assembleDefaultLayout(){const n=this.layout.columns;return Object.assign(Object.assign({},n!=null?{columns:n}:{}),{bounds:"full",align:"each"})}}function L_e(t){return t===!1||t===null}const P_e=Object.assign(Object.assign({disable:1,gridScale:1,scale:1},jV),{labelExpr:1,encode:1}),OH=Xr(P_e);class z8 extends ad{constructor(n={},e={},o=!1){super(),this.explicit=n,this.implicit=e,this.mainExtracted=o}clone(){return new z8(ha(this.explicit),ha(this.implicit),this.mainExtracted)}hasAxisPart(n){return n==="axis"?!0:n==="grid"||n==="title"?!!this.get(n):!L_e(this.get(n))}hasOrientSignalRef(){return Vi(this.explicit.orient)}}function D_e(t,n,e){var o;const{encoding:f,config:r}=t,a=(o=Ws(f[n]))!==null&&o!==void 0?o:Ws(f[ph(n)]),u=t.axis(n)||{},{format:c,formatType:i}=u;if(F0(i))return Object.assign({text:rf({fieldOrDatumDef:a,field:"datum.value",format:c,formatType:i,config:r})},e);if(c===void 0&&i===void 0&&r.customFormatTypes){if(Om(a)==="quantitative"){if(Lm(a)&&a.stack==="normalize"&&r.normalizedNumberFormatType)return Object.assign({text:rf({fieldOrDatumDef:a,field:"datum.value",format:r.normalizedNumberFormat,formatType:r.normalizedNumberFormatType,config:r})},e);if(r.numberFormatType)return Object.assign({text:rf({fieldOrDatumDef:a,field:"datum.value",format:r.numberFormat,formatType:r.numberFormatType,config:r})},e)}if(Om(a)==="temporal"&&r.timeFormatType&&ti(a)&&!a.timeUnit)return Object.assign({text:rf({fieldOrDatumDef:a,field:"datum.value",format:r.timeFormat,formatType:r.timeFormatType,config:r})},e)}return e}function I_e(t){return gh.reduce((n,e)=>(t.component.scales[e]&&(n[e]=[U_e(e,t)]),n),{})}const z_e={bottom:"top",top:"bottom",left:"right",right:"left"};function R_e(t){var n;const{axes:e,resolve:o}=t.component,f={top:0,bottom:0,right:0,left:0};for(const r of t.children){r.parseAxesAndHeaders();for(const a of Xr(r.component.axes))o.axis[a]=M8(t.component.resolve,a),o.axis[a]==="shared"&&(e[a]=F_e(e[a],r.component.axes[a]),e[a]||(o.axis[a]="independent",delete e[a]))}for(const r of gh){for(const a of t.children)if(!!a.component.axes[r]){if(o.axis[r]==="independent"){e[r]=((n=e[r])!==null&&n!==void 0?n:[]).concat(a.component.axes[r]);for(const u of a.component.axes[r]){const{value:c,explicit:i}=u.getWithExplicit("orient");if(!Vi(c)){if(f[c]>0&&!i){const s=z_e[c];f[c]>f[s]&&u.set("orient",s,!1)}f[c]++}}}delete a.component.axes[r]}if(o.axis[r]==="independent"&&e[r]&&e[r].length>1)for(const a of e[r])!!a.get("grid")&&!a.explicit.grid&&(a.implicit.grid=!1)}}function F_e(t,n){if(t){if(t.length!==n.length)return;const e=t.length;for(let o=0;oe.clone());return t}function N_e(t,n){for(const e of OH){const o=ap(t.getWithExplicit(e),n.getWithExplicit(e),e,"axis",(f,r)=>{switch(e){case"title":return YU(f,r);case"gridScale":return{explicit:f.explicit,value:Rs(f.value,r.value)}}return k3(f,r,e,"axis")});t.setWithExplicit(e,o)}return t}function B_e(t,n,e,o,f){if(n==="disable")return e!==void 0;switch(e=e||{},n){case"titleAngle":case"labelAngle":return t===(Vi(e.labelAngle)?e.labelAngle:hy(e.labelAngle));case"values":return!!e.values;case"encode":return!!e.encoding||!!e.labelAngle;case"title":if(t===Xq(o,f))return!0}return t===e[n]}const j_e=new Set(["grid","translate","format","formatType","orient","labelExpr","tickCount","position","tickMinStep"]);function U_e(t,n){var e,o,f;let r=n.axis(t);const a=new z8,u=Ws(n.encoding[t]),{mark:c,config:i}=n,s=r?.orient||((e=i[t==="x"?"axisX":"axisY"])===null||e===void 0?void 0:e.orient)||((o=i.axis)===null||o===void 0?void 0:o.orient)||bxe(t),l=n.getScaleComponent(t).get("type"),d=dxe(t,l,s,n.config),h=r!==void 0?!r:tA("disable",i.style,r?.style,d).configValue;if(a.set("disable",h,r!==void 0),h)return a;r=r||{};const m=vxe(u,r,t,i.style,d),g={fieldOrDatumDef:u,axis:r,channel:t,model:n,scaleType:l,orient:s,labelAngle:m,mark:c,config:i};for(const y of OH){const x=y in zP?zP[y](g):fP(y)?r[y]:void 0,w=x!==void 0,k=B_e(x,y,r,n,t);if(w&&k)a.set(y,x,k);else{const{configValue:b=void 0,configFrom:T=void 0}=fP(y)&&y!=="values"?tA(y,i.style,r.style,d):{},_=b!==void 0;w&&!_?a.set(y,x,k):(T!=="vgAxisConfig"||j_e.has(y)&&_||cx(b)||Vi(b))&&a.set(y,b,!1)}}const p=(f=r.encoding)!==null&&f!==void 0?f:{},v=BV.reduce((y,x)=>{var w;if(!a.hasAxisPart(x))return y;const k=tH((w=p[x])!==null&&w!==void 0?w:{},n),b=x==="labels"?D_e(n,t,k):k;return b!==void 0&&!_o(b)&&(y[x]={update:b}),y},{});return _o(v)||a.set("encode",v,!!r.encoding||r.labelAngle!==void 0),a}function V_e({encoding:t,size:n}){for(const e of gh){const o=Fu(e);rh(n[o])&&qf(t[e])&&(delete n[o],Kr(QU(o)))}return n}function q_e(t,n,e){const o=Tu(t),f=oo("orient",o,e);if(o.orient=W_e(o.type,n,f),f!==void 0&&f!==o.orient&&Kr(Kge(o.orient,f)),o.type==="bar"&&o.orient){const u=oo("cornerRadiusEnd",o,e);if(u!==void 0){const c=o.orient==="horizontal"&&n.x2||o.orient==="vertical"&&n.y2?["cornerRadius"]:v1e[o.orient];for(const i of c)o[i]=u;o.cornerRadiusEnd!==void 0&&delete o.cornerRadiusEnd}}return oo("opacity",o,e)===void 0&&(o.opacity=$_e(o.type,n)),oo("cursor",o,e)===void 0&&(o.cursor=H_e(o,n,e)),o}function H_e(t,n,e){return n.href||t.href||oo("href",t,e)?"pointer":t.cursor}function $_e(t,n){if(Fa([h3,GE,WE,YE],t)&&!i8(n))return .7}function G_e(t,n,{graticule:e}){if(e)return!1;const o=I0("filled",t,n),f=t.type;return Rs(o,f!==h3&&f!==f3&&f!==M2)}function W_e(t,n,e){switch(t){case h3:case WE:case YE:case vV:case s1e:case o1e:return}const{x:o,y:f,x2:r,y2:a}=n;switch(t){case c3:if(ti(o)&&(xl(o.bin)||ti(f)&&f.aggregate&&!o.aggregate))return"vertical";if(ti(f)&&(xl(f.bin)||ti(o)&&o.aggregate&&!f.aggregate))return"horizontal";if(a||r){if(e)return e;if(!r)return(ti(o)&&o.type===z0&&!Bo(o.bin)||HT(o))&&ti(f)&&xl(f.bin)?"horizontal":"vertical";if(!a)return(ti(f)&&f.type===z0&&!Bo(f.bin)||HT(f))&&ti(o)&&xl(o.bin)?"vertical":"horizontal"}case M2:if(r&&!(ti(o)&&xl(o.bin))&&a&&!(ti(f)&&xl(f.bin)))return;case u3:if(a)return ti(f)&&xl(f.bin)?"horizontal":"vertical";if(r)return ti(o)&&xl(o.bin)?"vertical":"horizontal";if(t===M2){if(o&&!f)return"vertical";if(f&&!o)return"horizontal"}case f3:case GE:{const u=qf(o),c=qf(f);if(e)return e;if(u&&!c)return t!=="tick"?"horizontal":"vertical";if(!u&&c)return t!=="tick"?"vertical":"horizontal";if(u&&c){const i=o,s=f,l=i.type===Em,d=s.type===Em;return l&&!d?t!=="tick"?"vertical":"horizontal":!l&&d?t!=="tick"?"horizontal":"vertical":!i.aggregate&&s.aggregate?t!=="tick"?"vertical":"horizontal":i.aggregate&&!s.aggregate&&t!=="tick"?"horizontal":"vertical"}else return}}return"vertical"}const Y_e={vgMark:"arc",encodeEntry:t=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Ac(t,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"})),Fl("x",t,{defaultPos:"mid"})),Fl("y",t,{defaultPos:"mid"})),sp(t,"radius")),sp(t,"theta"))},X_e={vgMark:"area",encodeEntry:t=>Object.assign(Object.assign(Object.assign(Object.assign({},Ac(t,{align:"ignore",baseline:"ignore",color:"include",orient:"include",size:"ignore",theta:"ignore"})),I2("x",t,{defaultPos:"zeroOrMin",defaultPos2:"zeroOrMin",range:t.markDef.orient==="horizontal"})),I2("y",t,{defaultPos:"zeroOrMin",defaultPos2:"zeroOrMin",range:t.markDef.orient==="vertical"})),_8(t))},Z_e={vgMark:"rect",encodeEntry:t=>Object.assign(Object.assign(Object.assign({},Ac(t,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"})),sp(t,"x")),sp(t,"y"))},J_e={vgMark:"shape",encodeEntry:t=>Object.assign({},Ac(t,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"})),postEncodingTransform:t=>{const{encoding:n}=t,e=n.shape;return[Object.assign({type:"geoshape",projection:t.projectionName()},e&&ti(e)&&e.type===n1?{field:hi(e,{expr:"datum"})}:{})]}},K_e={vgMark:"image",encodeEntry:t=>Object.assign(Object.assign(Object.assign(Object.assign({},Ac(t,{align:"ignore",baseline:"ignore",color:"ignore",orient:"ignore",size:"ignore",theta:"ignore"})),sp(t,"x")),sp(t,"y")),x8(t,"url"))},Q_e={vgMark:"line",encodeEntry:t=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Ac(t,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"})),Fl("x",t,{defaultPos:"mid"})),Fl("y",t,{defaultPos:"mid"})),nl("size",t,{vgChannel:"strokeWidth"})),_8(t))},e2e={vgMark:"trail",encodeEntry:t=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Ac(t,{align:"ignore",baseline:"ignore",color:"include",size:"include",orient:"ignore",theta:"ignore"})),Fl("x",t,{defaultPos:"mid"})),Fl("y",t,{defaultPos:"mid"})),nl("size",t)),_8(t))};function R8(t,n){const{config:e}=t;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Ac(t,{align:"ignore",baseline:"ignore",color:"include",size:"include",orient:"ignore",theta:"ignore"})),Fl("x",t,{defaultPos:"mid"})),Fl("y",t,{defaultPos:"mid"})),nl("size",t)),nl("angle",t)),t2e(t,e,n))}function t2e(t,n,e){return e?{shape:{value:e}}:nl("shape",t)}const n2e={vgMark:"symbol",encodeEntry:t=>R8(t)},r2e={vgMark:"symbol",encodeEntry:t=>R8(t,"circle")},i2e={vgMark:"symbol",encodeEntry:t=>R8(t,"square")},a2e={vgMark:"rect",encodeEntry:t=>Object.assign(Object.assign(Object.assign({},Ac(t,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"})),sp(t,"x")),sp(t,"y"))},o2e={vgMark:"rule",encodeEntry:t=>{const{markDef:n}=t,e=n.orient;return!t.encoding.x&&!t.encoding.y&&!t.encoding.latitude&&!t.encoding.longitude?{}:Object.assign(Object.assign(Object.assign(Object.assign({},Ac(t,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"})),I2("x",t,{defaultPos:e==="horizontal"?"zeroOrMax":"mid",defaultPos2:"zeroOrMin",range:e!=="vertical"})),I2("y",t,{defaultPos:e==="vertical"?"zeroOrMax":"mid",defaultPos2:"zeroOrMin",range:e!=="horizontal"})),nl("size",t,{vgChannel:"strokeWidth"}))}},s2e={vgMark:"text",encodeEntry:t=>{const{config:n,encoding:e}=t;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Ac(t,{align:"include",baseline:"include",color:"include",size:"ignore",orient:"ignore",theta:"include"})),Fl("x",t,{defaultPos:"mid"})),Fl("y",t,{defaultPos:"mid"})),x8(t)),nl("size",t,{vgChannel:"fontSize"})),nl("angle",t)),LP("align",l2e(t.markDef,e,n))),LP("baseline",u2e(t.markDef,e,n))),Fl("radius",t,{defaultPos:null})),Fl("theta",t,{defaultPos:null}))}};function l2e(t,n,e){if(oo("align",t,e)===void 0)return"center"}function u2e(t,n,e){if(oo("baseline",t,e)===void 0)return"middle"}const c2e={vgMark:"rect",encodeEntry:t=>{const{config:n,markDef:e}=t,o=e.orient,f=o==="horizontal"?"width":"height",r=o==="horizontal"?"height":"width";return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Ac(t,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"})),Fl("x",t,{defaultPos:"mid",vgChannel:"xc"})),Fl("y",t,{defaultPos:"mid",vgChannel:"yc"})),nl("size",t,{defaultValue:f2e(t),vgChannel:f})),{[r]:Ho(oo("thickness",e,n))})}};function f2e(t){var n;const{config:e,markDef:o}=t,{orient:f}=o,r=f==="horizontal"?"width":"height",a=t.getScaleComponent(f==="horizontal"?"x":"y"),u=(n=oo("size",o,e,{vgChannel:r}))!==null&&n!==void 0?n:e.tick.bandSize;if(u!==void 0)return u;{const c=a?a.get("range"):void 0;return c&&wp(c)&&wo(c.step)?c.step*3/4:P2(e.view,r)*3/4}}const Cb={arc:Y_e,area:X_e,bar:Z_e,circle:r2e,geoshape:J_e,image:K_e,line:Q_e,point:n2e,rect:a2e,rule:o2e,square:i2e,text:s2e,tick:c2e,trail:e2e};function h2e(t){if(Fa([f3,u3,l1e],t.mark)){const n=HV(t.mark,t.encoding);if(n.length>0)return d2e(t,n)}else if(t.mark===c3){const n=NT.some(e=>oo(e,t.markDef,t.config));if(t.stack&&!t.fieldDef("size")&&n)return p2e(t)}return F8(t)}const JP="faceted_path_";function d2e(t,n){return[{name:t.getName("pathgroup"),type:"group",from:{facet:{name:JP+t.requestDataName(Fo.Main),data:t.requestDataName(Fo.Main),groupby:n}},encode:{update:{width:{field:{group:"width"}},height:{field:{group:"height"}}}},marks:F8(t,{fromPrefix:JP})}]}const KP="stack_group_";function p2e(t){var n;const[e]=F8(t,{fromPrefix:KP}),o=t.scaleName(t.stack.fieldChannel),f=(s={})=>t.vgField(t.stack.fieldChannel,s),r=(s,l)=>{const d=[f({prefix:"min",suffix:"start",expr:l}),f({prefix:"max",suffix:"start",expr:l}),f({prefix:"min",suffix:"end",expr:l}),f({prefix:"max",suffix:"end",expr:l})];return`${s}(${d.map(h=>`scale('${o}',${h})`).join(",")})`};let a,u;t.stack.fieldChannel==="x"?(a=Object.assign(Object.assign({},Am(e.encode.update,["y","yc","y2","height",...NT])),{x:{signal:r("min","datum")},x2:{signal:r("max","datum")},clip:{value:!0}}),u={x:{field:{group:"x"},mult:-1},height:{field:{group:"height"}}},e.encode.update=Object.assign(Object.assign({},Eu(e.encode.update,["y","yc","y2"])),{height:{field:{group:"height"}}})):(a=Object.assign(Object.assign({},Am(e.encode.update,["x","xc","x2","width"])),{y:{signal:r("min","datum")},y2:{signal:r("max","datum")},clip:{value:!0}}),u={y:{field:{group:"y"},mult:-1},width:{field:{group:"width"}}},e.encode.update=Object.assign(Object.assign({},Eu(e.encode.update,["x","xc","x2"])),{width:{field:{group:"width"}}}));for(const s of NT){const l=I0(s,t.markDef,t.config);e.encode.update[s]?(a[s]=e.encode.update[s],delete e.encode.update[s]):l&&(a[s]=Ho(l)),l&&(e.encode.update[s]={value:0})}const c=[];if(((n=t.stack.groupbyChannels)===null||n===void 0?void 0:n.length)>0)for(const s of t.stack.groupbyChannels){const l=t.fieldDef(s),d=hi(l);d&&c.push(d),(l?.bin||l?.timeUnit)&&c.push(hi(l,{binSuffix:"end"}))}return a=["stroke","strokeWidth","strokeJoin","strokeCap","strokeDash","strokeDashOffset","strokeMiterLimit","strokeOpacity"].reduce((s,l)=>{if(e.encode.update[l])return Object.assign(Object.assign({},s),{[l]:e.encode.update[l]});{const d=I0(l,t.markDef,t.config);return d!==void 0?Object.assign(Object.assign({},s),{[l]:Ho(d)}):s}},a),a.stroke&&(a.strokeForeground={value:!0},a.strokeOffset={value:0}),[{type:"group",from:{facet:{data:t.requestDataName(Fo.Main),name:KP+t.requestDataName(Fo.Main),groupby:c,aggregate:{fields:[f({suffix:"start"}),f({suffix:"start"}),f({suffix:"end"}),f({suffix:"end"})],ops:["min","max","min","max"]}}},encode:{update:a},marks:[{type:"group",encode:{update:u},marks:[e]}]}]}function g2e(t){var n;const{encoding:e,stack:o,mark:f,markDef:r,config:a}=t,u=e.order;if(!(!Ir(u)&&pf(u)&&RT(u.value)||!u&&RT(oo("order",r,a)))){if((Ir(u)||ti(u))&&!o)return $U(u,{expr:"datum"});if(kp(f)){const c=r.orient==="horizontal"?"y":"x",i=e[c];if(ti(i)){const s=i.sort;if(Ir(s))return{field:hi(i,{prefix:c,suffix:"sort_index",expr:"datum"})};if(Wf(s))return{field:hi({aggregate:i8(t.encoding)?s.op:void 0,field:s.field},{expr:"datum"})};if(SV(s)){const l=t.fieldDef(s.encoding);return{field:hi(l,{expr:"datum"}),order:s.order}}else return s===null?void 0:{field:hi(i,{binSuffix:!((n=t.stack)===null||n===void 0)&&n.impute?"mid":void 0,expr:"datum"})}}return}}}function F8(t,n={fromPrefix:""}){const{mark:e,markDef:o,encoding:f,config:r}=t,a=Rs(o.clip,m2e(t),v2e(t)),u=qU(o),c=f.key,i=g2e(t),s=y2e(t),l=oo("aria",o,r),d=Cb[e].postEncodingTransform?Cb[e].postEncodingTransform(t):null;return[Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({name:t.getName("marks"),type:Cb[e].vgMark},a?{clip:!0}:{}),u?{style:u}:{}),c?{key:c.field}:{}),i?{sort:i}:{}),s||{}),l===!1?{aria:l}:{}),{from:{data:n.fromPrefix+t.requestDataName(Fo.Main)},encode:{update:Cb[e].encodeEntry(t)}}),d?{transform:d}:{})]}function m2e(t){const n=t.getScaleComponent("x"),e=t.getScaleComponent("y");return n?.get("selectionExtent")||e?.get("selectionExtent")?!0:void 0}function v2e(t){const n=t.component.projection;return n&&!n.isFit?!0:void 0}function y2e(t){if(!t.component.selection)return null;const n=Xr(t.component.selection).length;let e=n,o=t.parent;for(;o&&e===0;)e=Xr(o.component.selection).length,o=o.parent;return e?{interactive:n>0||!!t.encoding.tooltip}:null}class LH extends MH{constructor(n,e,o,f={},r){var a;super(n,"unit",e,o,r,void 0,pP(n)?n.view:void 0),this.specifiedScales={},this.specifiedAxes={},this.specifiedLegends={},this.specifiedProjection={},this.selection=[],this.children=[];const u=eh(n.mark)?Object.assign({},n.mark):{type:n.mark},c=u.type;u.filled===void 0&&(u.filled=G_e(u,r,{graticule:n.data&&v8(n.data)}));const i=this.encoding=Y1e(n.encoding||{},c,u.filled,r);this.markDef=q_e(u,i,r),this.size=V_e({encoding:i,size:pP(n)?Object.assign(Object.assign(Object.assign({},f),n.width?{width:n.width}:{}),n.height?{height:n.height}:{}):f}),this.stack=fq(c,i),this.specifiedScales=this.initScales(c,i),this.specifiedAxes=this.initAxes(i),this.specifiedLegends=this.initLegends(i),this.specifiedProjection=n.projection,this.selection=((a=n.params)!==null&&a!==void 0?a:[]).filter(s=>h8(s))}get hasProjection(){const{encoding:n}=this,e=this.mark===yV,o=n&&H0e.some(f=>la(n[f]));return e||o}scaleDomain(n){const e=this.specifiedScales[n];return e?e.domain:void 0}axis(n){return this.specifiedAxes[n]}legend(n){return this.specifiedLegends[n]}initScales(n,e){return o3.reduce((o,f)=>{var r;const a=Ws(e[f]);return a&&(o[f]=this.initScale((r=a.scale)!==null&&r!==void 0?r:{})),o},{})}initScale(n){const{domain:e,range:o}=n,f=Tu(n);return Ir(e)&&(f.domain=e.map(Xu)),Ir(o)&&(f.range=o.map(Xu)),f}initAxes(n){return gh.reduce((e,o)=>{const f=n[o];if(la(f)||o===cs&&la(n.x2)||o===ol&&la(n.y2)){const r=la(f)?f.axis:void 0;e[o]=r&&this.initAxis(Object.assign({},r))}return e},{})}initAxis(n){const e=Xr(n),o={};for(const f of e){const r=n[f];o[f]=cx(r)?VU(r):Xu(r)}return o}initLegends(n){return ege.reduce((e,o)=>{const f=Ws(n[o]);if(f&&nge(o)){const r=f.legend;e[o]=r&&Tu(r)}return e},{})}parseData(){this.component.data=F3(this)}parseLayoutSize(){A_e(this)}parseSelections(){this.component.selection=uxe(this,this.selection)}parseMarkGroup(){this.component.mark=h2e(this)}parseAxesAndHeaders(){this.component.axes=I_e(this)}assembleSelectionTopLevelSignals(n){return Oye(this,n)}assembleSignals(){return[...Gq(this),...Eye(this,[])]}assembleSelectionData(n){return Lye(this,n)}assembleLayout(){return null}assembleLayoutSignals(){return A8(this)}assembleMarks(){var n;let e=(n=this.component.mark)!==null&&n!==void 0?n:[];return(!this.parent||!s1(this.parent))&&(e=Aq(this,e)),e.map(this.correctDataNames)}assembleGroupStyle(){const{style:n}=this.view||{};if(n!==void 0)return n;if(this.encoding.x||this.encoding.y)return"cell"}getMapping(){return this.encoding}get mark(){return this.markDef.type}channelHasField(n){return y0(this.encoding,n)}fieldDef(n){const e=this.encoding[n];return th(e)}typedFieldDef(n){const e=this.fieldDef(n);return wc(e)?e:null}}class N8 extends D8{constructor(n,e,o,f,r){super(n,"layer",e,o,r,n.resolve,n.view);const a=Object.assign(Object.assign(Object.assign({},f),n.width?{width:n.width}:{}),n.height?{height:n.height}:{});this.children=n.layer.map((u,c)=>{if(w3(u))return new N8(u,this,this.getName(`layer_${c}`),a,r);if(id(u))return new LH(u,this,this.getName(`layer_${c}`),a,r);throw new Error(OE(u))})}parseData(){this.component.data=F3(this);for(const n of this.children)n.parseData()}parseLayoutSize(){k_e(this)}parseSelections(){this.component.selection={};for(const n of this.children){n.parseSelections();for(const e of Xr(n.component.selection))this.component.selection[e]=n.component.selection[e]}}parseMarkGroup(){for(const n of this.children)n.parseMarkGroup()}parseAxesAndHeaders(){R_e(this)}assembleSelectionTopLevelSignals(n){return this.children.reduce((e,o)=>o.assembleSelectionTopLevelSignals(e),n)}assembleSignals(){return this.children.reduce((n,e)=>n.concat(e.assembleSignals()),Gq(this))}assembleLayoutSignals(){return this.children.reduce((n,e)=>n.concat(e.assembleLayoutSignals()),A8(this))}assembleSelectionData(n){return this.children.reduce((e,o)=>o.assembleSelectionData(e),n)}assembleGroupStyle(){const n=new Set;for(const o of this.children)for(const f of ki(o.assembleGroupStyle()))n.add(f);const e=Array.from(n);return e.length>1?e:e.length===1?e[0]:void 0}assembleTitle(){let n=super.assembleTitle();if(n)return n;for(const e of this.children)if(n=e.assembleTitle(),n)return n}assembleLayout(){return null}assembleMarks(){return Pye(this,this.children.flatMap(n=>n.assembleMarks()))}assembleLegends(){return this.children.reduce((n,e)=>n.concat(e.assembleLegends()),uH(this))}}function B8(t,n,e,o,f){if(p3(t))return new jv(t,n,e,f);if(w3(t))return new N8(t,n,e,o,f);if(id(t))return new LH(t,n,e,o,f);if(xve(t))return new O_e(t,n,e,f);throw new Error(OE(t))}var x2e=globalThis&&globalThis.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);f(h.name==="width"||h.name==="height")&&h.value!==void 0?(n[h.name]=+h.value,!1):!0);const{params:l}=n,d=x2e(n,["params"]);return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({$schema:"https://vega.github.io/schema/vega/v5.json"},t.description?{description:t.description}:{}),d),u?{title:u}:{}),c?{style:c}:{}),i?{encode:{update:i}}:{}),{data:r}),a.length>0?{projections:a}:{}),t.assembleGroup([...s,...t.assembleSelectionTopLevelSignals([]),...oq(l)])),f?{config:f}:{}),o?{usermeta:o}:{})}const k2e=z0e.version;var T2e=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",version:k2e,compile:b2e,normalize:bq,deepEqual:Uf,duplicate:ha,never:bU,pick:Am,omit:Eu,stringify:No,hash:Ba,isNullOrFalse:RT,contains:Fa,some:L0,every:vE,mergeDeep:_U,unique:Vf,isEqual:N0e,setEqual:wU,hasIntersection:yE,prefixGenerator:FT,fieldIntersection:xE,isEmpty:_o,keys:Xr,vals:ql,entries:rp,isBoolean:fy,varName:Xo,logicalExpr:Nv,deleteNestedProperty:k2,titleCase:Qy,accessPathWithDatum:bE,flatAccessWithDatum:kU,replacePathInField:bc,replaceAll:P0,removePathFromField:_E,accessPathDepth:Mm,getFirstDefined:Rs,uniqueId:AU,resetIdCounter:j0e,internalField:MU,isInternalField:SU,normalizeAngle:hy,isNumeric:Qw});function PH(t){const[n,e]=/schema\/([\w-]+)\/([\w\.\-]+)\.json$/g.exec(t).slice(1,3);return{library:n,version:e}}var A2e="vega-themes",M2e="2.10.0",S2e="Themes for stylized Vega and Vega-Lite visualizations.",E2e=["vega","vega-lite","themes","style"],C2e="BSD-3-Clause",O2e={name:"UW Interactive Data Lab",url:"https://idl.cs.washington.edu"},L2e=[{name:"Emily Gu",url:"https://github.com/emilygu"},{name:"Arvind Satyanarayan",url:"http://arvindsatya.com"},{name:"Jeffrey Heer",url:"https://idl.cs.washington.edu"},{name:"Dominik Moritz",url:"https://www.domoritz.de"}],P2e="build/vega-themes.js",D2e="build/vega-themes.module.js",I2e="build/vega-themes.min.js",z2e="build/vega-themes.min.js",R2e="build/vega-themes.module.d.ts",F2e={type:"git",url:"https://github.com/vega/vega-themes.git"},N2e=["src","build"],B2e={prebuild:"yarn clean",build:"rollup -c",clean:"rimraf build && rimraf examples/build","copy:data":"rsync -r node_modules/vega-datasets/data/* examples/data","copy:build":"rsync -r build/* examples/build","deploy:gh":"yarn build && mkdir -p examples/build && rsync -r build/* examples/build && gh-pages -d examples",preversion:"yarn lint",serve:"browser-sync start -s -f build examples --serveStatic examples",start:"yarn build && concurrently --kill-others -n Server,Rollup 'yarn serve' 'rollup -c -w'",prepare:"beemo create-config",eslintbase:"beemo eslint .",format:"yarn eslintbase --fix",lint:"yarn eslintbase",release:"auto shipit"},j2e={"@auto-it/conventional-commits":"^10.32.2","@auto-it/first-time-contributor":"^10.32.2","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.6","rollup-plugin-ts":"^1.4.7",auto:"^10.32.2","browser-sync":"^2.27.7",concurrently:"^6.4.0","gh-pages":"^3.2.3",rollup:"^2.60.0","rollup-plugin-bundle-size":"^1.0.3","rollup-plugin-terser":"^7.0.2",typescript:"^4.4.4",vega:"^5.19.1","vega-lite":"^5.0.0","vega-lite-dev-config":"^0.20.0"},U2e={vega:"*","vega-lite":"*"},V2e={name:A2e,version:M2e,description:S2e,keywords:E2e,license:C2e,author:O2e,contributors:L2e,main:P2e,module:D2e,unpkg:I2e,jsdelivr:z2e,types:R2e,repository:F2e,files:N2e,scripts:B2e,devDependencies:j2e,peerDependencies:U2e};const Ug="#fff",q2e="#888",H2e={background:"#333",title:{color:Ug,subtitleColor:Ug},style:{"guide-label":{fill:Ug},"guide-title":{fill:Ug}},axis:{domainColor:Ug,gridColor:q2e,tickColor:Ug}},Vp="#4572a7",$2e={background:"#fff",arc:{fill:Vp},area:{fill:Vp},line:{stroke:Vp,strokeWidth:2},path:{stroke:Vp},rect:{fill:Vp},shape:{stroke:Vp},symbol:{fill:Vp,strokeWidth:1.5,size:50},axis:{bandPosition:.5,grid:!0,gridColor:"#000000",gridOpacity:1,gridWidth:.5,labelPadding:10,tickSize:5,tickWidth:.5},axisBand:{grid:!1,tickExtra:!0},legend:{labelBaseline:"middle",labelFontSize:11,symbolSize:50,symbolType:"square"},range:{category:["#4572a7","#aa4643","#8aa453","#71598e","#4598ae","#d98445","#94aace","#d09393","#b9cc98","#a99cbc"]}},qp="#30a2da",B4="#cbcbcb",G2e="#999",W2e="#333",QP="#f0f0f0",eD="#333",Y2e={arc:{fill:qp},area:{fill:qp},axis:{domainColor:B4,grid:!0,gridColor:B4,gridWidth:1,labelColor:G2e,labelFontSize:10,titleColor:W2e,tickColor:B4,tickSize:10,titleFontSize:14,titlePadding:10,labelPadding:4},axisBand:{grid:!1},background:QP,group:{fill:QP},legend:{labelColor:eD,labelFontSize:11,padding:1,symbolSize:30,symbolType:"square",titleColor:eD,titleFontSize:14,titlePadding:10},line:{stroke:qp,strokeWidth:2},path:{stroke:qp,strokeWidth:.5},rect:{fill:qp},range:{category:["#30a2da","#fc4f30","#e5ae38","#6d904f","#8b8b8b","#b96db8","#ff9e27","#56cc60","#52d2ca","#52689e","#545454","#9fe4f8"],diverging:["#cc0020","#e77866","#f6e7e1","#d6e8ed","#91bfd9","#1d78b5"],heatmap:["#d6e8ed","#cee0e5","#91bfd9","#549cc6","#1d78b5"]},point:{filled:!0,shape:"circle"},shape:{stroke:qp},bar:{binSpacing:2,fill:qp,stroke:null},title:{anchor:"start",fontSize:24,fontWeight:600,offset:20}},Hp="#000",X2e={group:{fill:"#e5e5e5"},arc:{fill:Hp},area:{fill:Hp},line:{stroke:Hp},path:{stroke:Hp},rect:{fill:Hp},shape:{stroke:Hp},symbol:{fill:Hp,size:40},axis:{domain:!1,grid:!0,gridColor:"#FFFFFF",gridOpacity:1,labelColor:"#7F7F7F",labelPadding:4,tickColor:"#7F7F7F",tickSize:5.67,titleFontSize:16,titleFontWeight:"normal"},legend:{labelBaseline:"middle",labelFontSize:11,symbolSize:40},range:{category:["#000000","#7F7F7F","#1A1A1A","#999999","#333333","#B0B0B0","#4D4D4D","#C9C9C9","#666666","#DCDCDC"]}},Z2e=22,J2e="normal",tD="Benton Gothic, sans-serif",nD=11.5,K2e="normal",$p="#82c6df",j4="Benton Gothic Bold, sans-serif",rD="normal",iD=13,Q1={"category-6":["#ec8431","#829eb1","#c89d29","#3580b1","#adc839","#ab7fb4"],"fire-7":["#fbf2c7","#f9e39c","#f8d36e","#f4bb6a","#e68a4f","#d15a40","#ab4232"],"fireandice-6":["#e68a4f","#f4bb6a","#f9e39c","#dadfe2","#a6b7c6","#849eae"],"ice-7":["#edefee","#dadfe2","#c4ccd2","#a6b7c6","#849eae","#607785","#47525d"]},Q2e={background:"#ffffff",title:{anchor:"start",color:"#000000",font:j4,fontSize:Z2e,fontWeight:J2e},arc:{fill:$p},area:{fill:$p},line:{stroke:$p,strokeWidth:2},path:{stroke:$p},rect:{fill:$p},shape:{stroke:$p},symbol:{fill:$p,size:30},axis:{labelFont:tD,labelFontSize:nD,labelFontWeight:K2e,titleFont:j4,titleFontSize:iD,titleFontWeight:rD},axisX:{labelAngle:0,labelPadding:4,tickSize:3},axisY:{labelBaseline:"middle",maxExtent:45,minExtent:45,tickSize:2,titleAlign:"left",titleAngle:0,titleX:-45,titleY:-11},legend:{labelFont:tD,labelFontSize:nD,symbolType:"square",titleFont:j4,titleFontSize:iD,titleFontWeight:rD},range:{category:Q1["category-6"],diverging:Q1["fireandice-6"],heatmap:Q1["fire-7"],ordinal:Q1["fire-7"],ramp:Q1["fire-7"]}},Gp="#ab5787",Ob="#979797",ewe={background:"#f9f9f9",arc:{fill:Gp},area:{fill:Gp},line:{stroke:Gp},path:{stroke:Gp},rect:{fill:Gp},shape:{stroke:Gp},symbol:{fill:Gp,size:30},axis:{domainColor:Ob,domainWidth:.5,gridWidth:.2,labelColor:Ob,tickColor:Ob,tickWidth:.2,titleColor:Ob},axisBand:{grid:!1},axisX:{grid:!0,tickSize:10},axisY:{domain:!1,grid:!0,tickSize:0},legend:{labelFontSize:11,padding:1,symbolSize:30,symbolType:"square"},range:{category:["#ab5787","#51b2e5","#703c5c","#168dd9","#d190b6","#00609f","#d365ba","#154866","#666666","#c4c4c4"]}},Wp="#3e5c69",twe={background:"#fff",arc:{fill:Wp},area:{fill:Wp},line:{stroke:Wp},path:{stroke:Wp},rect:{fill:Wp},shape:{stroke:Wp},symbol:{fill:Wp},axis:{domainWidth:.5,grid:!0,labelPadding:2,tickSize:5,tickWidth:.5,titleFontWeight:"normal"},axisBand:{grid:!1},axisX:{gridWidth:.2},axisY:{gridDash:[3],gridWidth:.4},legend:{labelFontSize:11,padding:1,symbolType:"square"},range:{category:["#3e5c69","#6793a6","#182429","#0570b0","#3690c0","#74a9cf","#a6bddb","#e2ddf2"]}},uc="#1696d2",aD="#000000",nwe="#FFFFFF",Lb="Lato",U4="Lato",rwe="Lato",iwe="#DEDDDD",awe=18,ev={"main-colors":["#1696d2","#d2d2d2","#000000","#fdbf11","#ec008b","#55b748","#5c5859","#db2b27"],"shades-blue":["#CFE8F3","#A2D4EC","#73BFE2","#46ABDB","#1696D2","#12719E","#0A4C6A","#062635"],"shades-gray":["#F5F5F5","#ECECEC","#E3E3E3","#DCDBDB","#D2D2D2","#9D9D9D","#696969","#353535"],"shades-yellow":["#FFF2CF","#FCE39E","#FDD870","#FCCB41","#FDBF11","#E88E2D","#CA5800","#843215"],"shades-magenta":["#F5CBDF","#EB99C2","#E46AA7","#E54096","#EC008B","#AF1F6B","#761548","#351123"],"shades-green":["#DCEDD9","#BCDEB4","#98CF90","#78C26D","#55B748","#408941","#2C5C2D","#1A2E19"],"shades-black":["#D5D5D4","#ADABAC","#848081","#5C5859","#332D2F","#262223","#1A1717","#0E0C0D"],"shades-red":["#F8D5D4","#F1AAA9","#E9807D","#E25552","#DB2B27","#A4201D","#6E1614","#370B0A"],"one-group":["#1696d2","#000000"],"two-groups-cat-1":["#1696d2","#000000"],"two-groups-cat-2":["#1696d2","#fdbf11"],"two-groups-cat-3":["#1696d2","#db2b27"],"two-groups-seq":["#a2d4ec","#1696d2"],"three-groups-cat":["#1696d2","#fdbf11","#000000"],"three-groups-seq":["#a2d4ec","#1696d2","#0a4c6a"],"four-groups-cat-1":["#000000","#d2d2d2","#fdbf11","#1696d2"],"four-groups-cat-2":["#1696d2","#ec0008b","#fdbf11","#5c5859"],"four-groups-seq":["#cfe8f3","#73bf42","#1696d2","#0a4c6a"],"five-groups-cat-1":["#1696d2","#fdbf11","#d2d2d2","#ec008b","#000000"],"five-groups-cat-2":["#1696d2","#0a4c6a","#d2d2d2","#fdbf11","#332d2f"],"five-groups-seq":["#cfe8f3","#73bf42","#1696d2","#0a4c6a","#000000"],"six-groups-cat-1":["#1696d2","#ec008b","#fdbf11","#000000","#d2d2d2","#55b748"],"six-groups-cat-2":["#1696d2","#d2d2d2","#ec008b","#fdbf11","#332d2f","#0a4c6a"],"six-groups-seq":["#cfe8f3","#a2d4ec","#73bfe2","#46abdb","#1696d2","#12719e"],"diverging-colors":["#ca5800","#fdbf11","#fdd870","#fff2cf","#cfe8f3","#73bfe2","#1696d2","#0a4c6a"]},owe={background:nwe,title:{anchor:"start",fontSize:awe,font:Lb},axisX:{domain:!0,domainColor:aD,domainWidth:1,grid:!1,labelFontSize:12,labelFont:U4,labelAngle:0,tickColor:aD,tickSize:5,titleFontSize:12,titlePadding:10,titleFont:Lb},axisY:{domain:!1,domainWidth:1,grid:!0,gridColor:iwe,gridWidth:1,labelFontSize:12,labelFont:U4,labelPadding:8,ticks:!1,titleFontSize:12,titlePadding:10,titleFont:Lb,titleAngle:0,titleY:-10,titleX:18},legend:{labelFontSize:12,labelFont:U4,symbolSize:100,titleFontSize:12,titlePadding:10,titleFont:Lb,orient:"right",offset:10},view:{stroke:"transparent"},range:{category:ev["six-groups-cat-1"],diverging:ev["diverging-colors"],heatmap:ev["diverging-colors"],ordinal:ev["six-groups-seq"],ramp:ev["shades-blue"]},area:{fill:uc},rect:{fill:uc},line:{color:uc,stroke:uc,strokeWidth:5},trail:{color:uc,stroke:uc,strokeWidth:0,size:1},path:{stroke:uc,strokeWidth:.5},point:{filled:!0},text:{font:rwe,color:uc,fontSize:11,align:"center",fontWeight:400,size:11},style:{bar:{fill:uc,stroke:null}},arc:{fill:uc},shape:{stroke:uc},symbol:{fill:uc,size:30}},Yp="#3366CC",oD="#ccc",Pb="Arial, sans-serif",swe={arc:{fill:Yp},area:{fill:Yp},path:{stroke:Yp},rect:{fill:Yp},shape:{stroke:Yp},symbol:{stroke:Yp},circle:{fill:Yp},background:"#fff",padding:{top:10,right:10,bottom:10,left:10},style:{"guide-label":{font:Pb,fontSize:12},"guide-title":{font:Pb,fontSize:12},"group-title":{font:Pb,fontSize:12}},title:{font:Pb,fontSize:14,fontWeight:"bold",dy:-3,anchor:"start"},axis:{gridColor:oD,tickColor:oD,domain:!1,grid:!0},range:{category:["#4285F4","#DB4437","#F4B400","#0F9D58","#AB47BC","#00ACC1","#FF7043","#9E9D24","#5C6BC0","#F06292","#00796B","#C2185B"],heatmap:["#c6dafc","#5e97f6","#2a56c6"]}},j8=t=>t*(1/3+1),sD=j8(9),lD=j8(10),uD=j8(12),tv="Segoe UI",cD="wf_standard-font, helvetica, arial, sans-serif",fD="#252423",nv="#605E5C",hD="transparent",lwe="#C8C6C4",qc="#118DFF",uwe="#12239E",cwe="#E66C37",fwe="#6B007B",hwe="#E044A7",dwe="#744EC2",pwe="#D9B300",gwe="#D64550",DH=qc,IH="#DEEFFF",dD=[IH,DH],mwe=[IH,"#c7e4ff","#b0d9ff","#9aceff","#83c3ff","#6cb9ff","#55aeff","#3fa3ff","#2898ff",DH],vwe={view:{stroke:hD},background:hD,font:tv,header:{titleFont:cD,titleFontSize:uD,titleColor:fD,labelFont:tv,labelFontSize:lD,labelColor:nv},axis:{ticks:!1,grid:!1,domain:!1,labelColor:nv,labelFontSize:sD,titleFont:cD,titleColor:fD,titleFontSize:uD,titleFontWeight:"normal"},axisQuantitative:{tickCount:3,grid:!0,gridColor:lwe,gridDash:[1,5],labelFlush:!1},axisBand:{tickExtra:!0},axisX:{labelPadding:5},axisY:{labelPadding:10},bar:{fill:qc},line:{stroke:qc,strokeWidth:3,strokeCap:"round",strokeJoin:"round"},text:{font:tv,fontSize:sD,fill:nv},arc:{fill:qc},area:{fill:qc,line:!0,opacity:.6},path:{stroke:qc},rect:{fill:qc},point:{fill:qc,filled:!0,size:75},shape:{stroke:qc},symbol:{fill:qc,strokeWidth:1.5,size:50},legend:{titleFont:tv,titleFontWeight:"bold",titleColor:nv,labelFont:tv,labelFontSize:lD,labelColor:nv,symbolType:"circle",symbolSize:75},range:{category:[qc,uwe,cwe,fwe,hwe,dwe,pwe,gwe],diverging:dD,heatmap:dD,ordinal:mwe}},ywe=V2e.version;var xwe=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",dark:H2e,excel:$2e,fivethirtyeight:Y2e,ggplot2:X2e,googlecharts:swe,latimes:Q2e,powerbi:vwe,quartz:ewe,urbaninstitute:owe,version:ywe,vox:twe});/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */function bwe(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);fn(bi(o)?o:pD(o,e))).join(", ")}]`;if(Ei(t)){let o="";const f=t,{title:r,image:a}=f,u=bwe(f,["title","image"]);r&&(o+=`

${n(r)}

`),a&&(o+=``);const c=Object.keys(u);if(c.length>0){o+="";for(const i of c){let s=u[i];s!==void 0&&(Ei(s)&&(s=pD(s,e)),o+=``)}o+="
${n(i)}:${n(s)}
"}return o||"{}"}return n(t)}function wwe(t){const n=[];return function(e,o){if(typeof o!="object"||o===null)return o;const f=n.indexOf(this)+1;return n.length=f,n.length>t?"[Object]":n.indexOf(o)>=0?"[Circular]":(n.push(o),o)}}function pD(t,n){return JSON.stringify(t,wwe(n))}var kwe=`#vg-tooltip-element { + visibility: hidden; + padding: 8px; + position: fixed; + z-index: 1000; + font-family: sans-serif; + font-size: 11px; + border-radius: 3px; + box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1); + /* The default theme is the light theme. */ + background-color: rgba(255, 255, 255, 0.95); + border: 1px solid #d9d9d9; + color: black; +} +#vg-tooltip-element.visible { + visibility: visible; +} +#vg-tooltip-element h2 { + margin-top: 0; + margin-bottom: 10px; + font-size: 13px; +} +#vg-tooltip-element img { + max-width: 200px; + max-height: 200px; +} +#vg-tooltip-element table { + border-spacing: 0; +} +#vg-tooltip-element table tr { + border: none; +} +#vg-tooltip-element table tr td { + overflow: hidden; + text-overflow: ellipsis; + padding-top: 2px; + padding-bottom: 2px; +} +#vg-tooltip-element table tr td.key { + color: #808080; + max-width: 150px; + text-align: right; + padding-right: 4px; +} +#vg-tooltip-element table tr td.value { + display: block; + max-width: 300px; + max-height: 7em; + text-align: left; +} +#vg-tooltip-element.dark-theme { + background-color: rgba(32, 32, 32, 0.9); + border: 1px solid #f5f5f5; + color: white; +} +#vg-tooltip-element.dark-theme td.key { + color: #bfbfbf; +} +`;const zH="vg-tooltip-element",Twe={offsetX:10,offsetY:10,id:zH,styleId:"vega-tooltip-style",theme:"light",disableDefaultStyle:!1,sanitize:Awe,maxDepth:2,formatTooltip:_we};function Awe(t){return String(t).replace(/&/g,"&").replace(/window.innerWidth&&(f=+t.clientX-e-n.width);let r=t.clientY+o;return r+n.height>window.innerHeight&&(r=+t.clientY-o-n.height),{x:f,y:r}}class Ewe{constructor(n){this.options=Object.assign(Object.assign({},Twe),n);const e=this.options.id;if(this.el=null,this.call=this.tooltipHandler.bind(this),!this.options.disableDefaultStyle&&!document.getElementById(this.options.styleId)){const o=document.createElement("style");o.setAttribute("id",this.options.styleId),o.innerHTML=Mwe(e);const f=document.head;f.childNodes.length>0?f.insertBefore(o,f.childNodes[0]):f.appendChild(o)}}tooltipHandler(n,e,o,f){var r;if(this.el=document.getElementById(this.options.id),this.el||(this.el=document.createElement("div"),this.el.setAttribute("id",this.options.id),this.el.classList.add("vg-tooltip"),((r=document.fullscreenElement)!==null&&r!==void 0?r:document.body).appendChild(this.el)),f==null||f===""){this.el.classList.remove("visible",`${this.options.theme}-theme`);return}this.el.innerHTML=this.options.formatTooltip(f,this.options.sanitize,this.options.maxDepth),this.el.classList.add("visible",`${this.options.theme}-theme`);const{x:a,y:u}=Swe(e,this.el.getBoundingClientRect(),this.options.offsetX,this.options.offsetY);this.el.setAttribute("style",`top: ${u}px; left: ${a}px`)}}function Cwe(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function gD(t,n,e,o,f,r,a){try{var u=t[r](a),c=u.value}catch(i){e(i);return}u.done?n(c):Promise.resolve(c).then(o,f)}function N2(t){return function(){var n=this,e=arguments;return new Promise(function(o,f){var r=t.apply(n,e);function a(c){gD(r,o,f,a,u,"next",c)}function u(c){gD(r,o,f,a,u,"throw",c)}a(void 0)})}}var RH=Object.prototype,s0=RH.hasOwnProperty,jf,U8=typeof Symbol=="function"?Symbol:{},N3=U8.iterator||"@@iterator",Owe=U8.asyncIterator||"@@asyncIterator",B2=U8.toStringTag||"@@toStringTag";function FH(t,n,e,o){var f=n&&n.prototype instanceof cA?n:cA,r=Object.create(f.prototype),a=new fA(o||[]);return r._invoke=zwe(t,e,a),r}function V8(t,n,e){try{return{type:"normal",arg:t.call(n,e)}}catch(o){return{type:"throw",arg:o}}}var mD="suspendedStart",Lwe="suspendedYield",vD="executing",Db="completed",Kc={};function cA(){}function B3(){}function Nm(){}var q8={};q8[N3]=function(){return this};var V4=Object.getPrototypeOf,Ib=V4&&V4(V4(H8([])));Ib&&Ib!==RH&&s0.call(Ib,N3)&&(q8=Ib);var l1=Nm.prototype=cA.prototype=Object.create(q8);B3.prototype=l1.constructor=Nm;Nm.constructor=B3;Nm[B2]=B3.displayName="GeneratorFunction";function NH(t){["next","throw","return"].forEach(function(n){t[n]=function(e){return this._invoke(n,e)}})}function BH(t){var n=typeof t=="function"&&t.constructor;return n?n===B3||(n.displayName||n.name)==="GeneratorFunction":!1}function Pwe(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,Nm):(t.__proto__=Nm,B2 in t||(t[B2]="GeneratorFunction")),t.prototype=Object.create(l1),t}function Dwe(t){return{__await:t}}function j3(t,n){function e(r,a,u,c){var i=V8(t[r],t,a);if(i.type==="throw")c(i.arg);else{var s=i.arg,l=s.value;return l&&typeof l=="object"&&s0.call(l,"__await")?n.resolve(l.__await).then(function(d){e("next",d,u,c)},function(d){e("throw",d,u,c)}):n.resolve(l).then(function(d){s.value=d,u(s)},function(d){return e("throw",d,u,c)})}}var o;function f(r,a){function u(){return new n(function(c,i){e(r,a,c,i)})}return o=o?o.then(u,u):u()}this._invoke=f}NH(j3.prototype);j3.prototype[Owe]=function(){return this};function Iwe(t,n,e,o,f){f===void 0&&(f=Promise);var r=new j3(FH(t,n,e,o),f);return BH(n)?r:r.next().then(function(a){return a.done?a.value:r.next()})}function zwe(t,n,e){var o=mD;return function(r,a){if(o===vD)throw new Error("Generator is already running");if(o===Db){if(r==="throw")throw a;return UH()}for(e.method=r,e.arg=a;;){var u=e.delegate;if(u){var c=jH(u,e);if(c){if(c===Kc)continue;return c}}if(e.method==="next")e.sent=e._sent=e.arg;else if(e.method==="throw"){if(o===mD)throw o=Db,e.arg;e.dispatchException(e.arg)}else e.method==="return"&&e.abrupt("return",e.arg);o=vD;var i=V8(t,n,e);if(i.type==="normal"){if(o=e.done?Db:Lwe,i.arg===Kc)continue;return{value:i.arg,done:e.done}}else i.type==="throw"&&(o=Db,e.method="throw",e.arg=i.arg)}}}function jH(t,n){var e=t.iterator[n.method];if(e===jf){if(n.delegate=null,n.method==="throw"){if(t.iterator.return&&(n.method="return",n.arg=jf,jH(t,n),n.method==="throw"))return Kc;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return Kc}var o=V8(e,t.iterator,n.arg);if(o.type==="throw")return n.method="throw",n.arg=o.arg,n.delegate=null,Kc;var f=o.arg;if(!f)return n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,Kc;if(f.done)n[t.resultName]=f.value,n.next=t.nextLoc,n.method!=="return"&&(n.method="next",n.arg=jf);else return f;return n.delegate=null,Kc}NH(l1);l1[B2]="Generator";l1[N3]=function(){return this};l1.toString=function(){return"[object Generator]"};function Rwe(t){var n={tryLoc:t[0]};1 in t&&(n.catchLoc=t[1]),2 in t&&(n.finallyLoc=t[2],n.afterLoc=t[3]),this.tryEntries.push(n)}function q4(t){var n=t.completion||{};n.type="normal",delete n.arg,t.completion=n}function fA(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Rwe,this),this.reset(!0)}function Fwe(t){var n=[];for(var e in t)n.push(e);return n.reverse(),function o(){for(;n.length;){var f=n.pop();if(f in t)return o.value=f,o.done=!1,o}return o.done=!0,o}}function H8(t){if(t){var n=t[N3];if(n)return n.call(t);if(typeof t.next=="function")return t;if(!isNaN(t.length)){var e=-1,o=function f(){for(;++e=0;--f){var r=this.tryEntries[f],a=r.completion;if(r.tryLoc==="root")return o("end");if(r.tryLoc<=this.prev){var u=s0.call(r,"catchLoc"),c=s0.call(r,"finallyLoc");if(u&&c){if(this.prev=0;--o){var f=this.tryEntries[o];if(f.tryLoc<=this.prev&&s0.call(f,"finallyLoc")&&this.prev=0;--e){var o=this.tryEntries[e];if(o.finallyLoc===n)return this.complete(o.completion,o.afterLoc),q4(o),Kc}},catch:function(n){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc===n){var f=o.completion;if(f.type==="throw"){var r=f.arg;q4(o)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(n,e,o){return this.delegate={iterator:H8(n),resultName:e,nextLoc:o},this.method==="next"&&(this.arg=jf),Kc}};var Hf={wrap:FH,isGeneratorFunction:BH,AsyncIterator:j3,mark:Pwe,awrap:Dwe,async:Iwe,keys:Fwe,values:H8},Nwe=Za;Za.Node=U0;Za.create=Za;function Za(t){var n=this;if(n instanceof Za||(n=new Za),n.tail=null,n.head=null,n.length=0,t&&typeof t.forEach=="function")t.forEach(function(f){n.push(f)});else if(arguments.length>0)for(var e=0,o=arguments.length;e1)e=n;else if(this.head)o=this.head.next,e=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var f=0;o!==null;f++)e=t(e,o.value,f),o=o.next;return e};Za.prototype.reduceReverse=function(t,n){var e,o=this.tail;if(arguments.length>1)e=n;else if(this.tail)o=this.tail.prev,e=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var f=this.length-1;o!==null;f--)e=t(e,o.value,f),o=o.prev;return e};Za.prototype.toArray=function(){for(var t=new Array(this.length),n=0,e=this.head;e!==null;n++)t[n]=e.value,e=e.next;return t};Za.prototype.toArrayReverse=function(){for(var t=new Array(this.length),n=0,e=this.tail;e!==null;n++)t[n]=e.value,e=e.prev;return t};Za.prototype.slice=function(t,n){n=n||this.length,n<0&&(n+=this.length),t=t||0,t<0&&(t+=this.length);var e=new Za;if(nthis.length&&(n=this.length);for(var o=0,f=this.head;f!==null&&othis.length&&(n=this.length);for(var o=this.length,f=this.tail;f!==null&&o>n;o--)f=f.prev;for(;f!==null&&o>t;o--,f=f.prev)e.push(f.value);return e};Za.prototype.splice=function(t,n){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var e=0,o=this.head;o!==null&&e1;class qwe{constructor(n){if(typeof n=="number"&&(n={max:n}),n||(n={}),n.max&&(typeof n.max!="number"||n.max<0))throw new TypeError("max must be a non-negative number");this[r0]=n.max||1/0;var e=n.length||H4;if(this[Vg]=typeof e!="function"?H4:e,this[Uv]=n.stale||!1,n.maxAge&&typeof n.maxAge!="number")throw new TypeError("maxAge must be a number");this[l0]=n.maxAge||0,this[Ch]=n.dispose,this[yD]=n.noDisposeOnSet||!1,this[VH]=n.updateAgeOnGet||!1,this.reset()}set max(n){if(typeof n!="number"||n<0)throw new TypeError("max must be a non-negative number");this[r0]=n||1/0,rv(this)}get max(){return this[r0]}set allowStale(n){this[Uv]=!!n}get allowStale(){return this[Uv]}set maxAge(n){if(typeof n!="number")throw new TypeError("maxAge must be a non-negative number");this[l0]=n,rv(this)}get maxAge(){return this[l0]}set lengthCalculator(n){typeof n!="function"&&(n=H4),n!==this[Vg]&&(this[Vg]=n,this[Ph]=0,this[tl].forEach(e=>{e.length=this[Vg](e.value,e.key),this[Ph]+=e.length})),rv(this)}get lengthCalculator(){return this[Vg]}get length(){return this[Ph]}get itemCount(){return this[tl].length}rforEach(n,e){e=e||this;for(var o=this[tl].tail;o!==null;){var f=o.prev;xD(this,n,o,e),o=f}}forEach(n,e){e=e||this;for(var o=this[tl].head;o!==null;){var f=o.next;xD(this,n,o,e),o=f}}keys(){return this[tl].toArray().map(n=>n.key)}values(){return this[tl].toArray().map(n=>n.value)}reset(){this[Ch]&&this[tl]&&this[tl].length&&this[tl].forEach(n=>this[Ch](n.key,n.value)),this[Hc]=new Map,this[tl]=new Vwe,this[Ph]=0}dump(){return this[tl].map(n=>j2(this,n)?!1:{k:n.key,v:n.value,e:n.now+(n.maxAge||0)}).toArray().filter(n=>n)}dumpLru(){return this[tl]}set(n,e,o){if(o=o||this[l0],o&&typeof o!="number")throw new TypeError("maxAge must be a number");var f=o?Date.now():0,r=this[Vg](e,n);if(this[Hc].has(n)){if(r>this[r0])return lm(this,this[Hc].get(n)),!1;var a=this[Hc].get(n),u=a.value;return this[Ch]&&(this[yD]||this[Ch](n,u.value)),u.now=f,u.maxAge=o,u.value=e,this[Ph]+=r-u.length,u.length=r,this.get(n),rv(this),!0}var c=new Hwe(n,e,r,f,o);return c.length>this[r0]?(this[Ch]&&this[Ch](n,e),!1):(this[Ph]+=c.length,this[tl].unshift(c),this[Hc].set(n,this[tl].head),rv(this),!0)}has(n){if(!this[Hc].has(n))return!1;var e=this[Hc].get(n).value;return!j2(this,e)}get(n){return $4(this,n,!0)}peek(n){return $4(this,n,!1)}pop(){var n=this[tl].tail;return n?(lm(this,n),n.value):null}del(n){lm(this,this[Hc].get(n))}load(n){this.reset();for(var e=Date.now(),o=n.length-1;o>=0;o--){var f=n[o],r=f.e||0;if(r===0)this.set(f.k,f.v);else{var a=r-e;a>0&&this.set(f.k,f.v,a)}}}prune(){this[Hc].forEach((n,e)=>$4(this,e,!1))}}var $4=(t,n,e)=>{var o=t[Hc].get(n);if(o){var f=o.value;if(j2(t,f)){if(lm(t,o),!t[Uv])return}else e&&(t[VH]&&(o.value.now=Date.now()),t[tl].unshiftNode(o));return f.value}},j2=(t,n)=>{if(!n||!n.maxAge&&!t[l0])return!1;var e=Date.now()-n.now;return n.maxAge?e>n.maxAge:t[l0]&&e>t[l0]},rv=t=>{if(t[Ph]>t[r0])for(var n=t[tl].tail;t[Ph]>t[r0]&&n!==null;){var e=n.prev;lm(t,n),n=e}},lm=(t,n)=>{if(n){var e=n.value;t[Ch]&&t[Ch](e.key,e.value),t[Ph]-=e.length,t[Hc].delete(e.key),t[tl].removeNode(n)}};class Hwe{constructor(n,e,o,f,r){this.key=n,this.value=e,this.length=o,this.now=f,this.maxAge=r||0}}var xD=(t,n,e,o)=>{var f=e.value;j2(t,f)&&(lm(t,e),t[Uv]||(f=void 0)),f&&n.call(o,f.value,f.key,t)},$we=qwe,Gwe=["includePrerelease","loose","rtl"],Wwe=t=>t?typeof t!="object"?{loose:!0}:Gwe.filter(n=>t[n]).reduce((n,e)=>(n[e]=!0,n),{}):{},$8=Wwe,Qc={exports:{}},Ywe="2.0.0",Xwe=256,Zwe=Number.MAX_SAFE_INTEGER||9007199254740991,Jwe=16,G8={SEMVER_SPEC_VERSION:Ywe,MAX_LENGTH:Xwe,MAX_SAFE_INTEGER:Zwe,MAX_SAFE_COMPONENT_LENGTH:Jwe},Kwe=typeof process=="object"&&process.env&&{}.NODE_DEBUG&&/\bsemver\b/i.test({}.NODE_DEBUG)?function(){for(var t=arguments.length,n=new Array(t),e=0;e{},U3=Kwe;(function(t,n){var e=G8.MAX_SAFE_COMPONENT_LENGTH,o=U3;n=t.exports={};var f=n.re=[],r=n.src=[],a=n.t={},u=0,c=(i,s,l)=>{var d=u++;o(i,d,s),a[i]=d,r[d]=s,f[d]=new RegExp(s,l?"g":void 0)};c("NUMERICIDENTIFIER","0|[1-9]\\d*"),c("NUMERICIDENTIFIERLOOSE","[0-9]+"),c("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),c("MAINVERSION","(".concat(r[a.NUMERICIDENTIFIER],")\\.")+"(".concat(r[a.NUMERICIDENTIFIER],")\\.")+"(".concat(r[a.NUMERICIDENTIFIER],")")),c("MAINVERSIONLOOSE","(".concat(r[a.NUMERICIDENTIFIERLOOSE],")\\.")+"(".concat(r[a.NUMERICIDENTIFIERLOOSE],")\\.")+"(".concat(r[a.NUMERICIDENTIFIERLOOSE],")")),c("PRERELEASEIDENTIFIER","(?:".concat(r[a.NUMERICIDENTIFIER],"|").concat(r[a.NONNUMERICIDENTIFIER],")")),c("PRERELEASEIDENTIFIERLOOSE","(?:".concat(r[a.NUMERICIDENTIFIERLOOSE],"|").concat(r[a.NONNUMERICIDENTIFIER],")")),c("PRERELEASE","(?:-(".concat(r[a.PRERELEASEIDENTIFIER],"(?:\\.").concat(r[a.PRERELEASEIDENTIFIER],")*))")),c("PRERELEASELOOSE","(?:-?(".concat(r[a.PRERELEASEIDENTIFIERLOOSE],"(?:\\.").concat(r[a.PRERELEASEIDENTIFIERLOOSE],")*))")),c("BUILDIDENTIFIER","[0-9A-Za-z-]+"),c("BUILD","(?:\\+(".concat(r[a.BUILDIDENTIFIER],"(?:\\.").concat(r[a.BUILDIDENTIFIER],")*))")),c("FULLPLAIN","v?".concat(r[a.MAINVERSION]).concat(r[a.PRERELEASE],"?").concat(r[a.BUILD],"?")),c("FULL","^".concat(r[a.FULLPLAIN],"$")),c("LOOSEPLAIN","[v=\\s]*".concat(r[a.MAINVERSIONLOOSE]).concat(r[a.PRERELEASELOOSE],"?").concat(r[a.BUILD],"?")),c("LOOSE","^".concat(r[a.LOOSEPLAIN],"$")),c("GTLT","((?:<|>)?=?)"),c("XRANGEIDENTIFIERLOOSE","".concat(r[a.NUMERICIDENTIFIERLOOSE],"|x|X|\\*")),c("XRANGEIDENTIFIER","".concat(r[a.NUMERICIDENTIFIER],"|x|X|\\*")),c("XRANGEPLAIN","[v=\\s]*(".concat(r[a.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(r[a.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(r[a.XRANGEIDENTIFIER],")")+"(?:".concat(r[a.PRERELEASE],")?").concat(r[a.BUILD],"?")+")?)?"),c("XRANGEPLAINLOOSE","[v=\\s]*(".concat(r[a.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(r[a.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(r[a.XRANGEIDENTIFIERLOOSE],")")+"(?:".concat(r[a.PRERELEASELOOSE],")?").concat(r[a.BUILD],"?")+")?)?"),c("XRANGE","^".concat(r[a.GTLT],"\\s*").concat(r[a.XRANGEPLAIN],"$")),c("XRANGELOOSE","^".concat(r[a.GTLT],"\\s*").concat(r[a.XRANGEPLAINLOOSE],"$")),c("COERCE","".concat("(^|[^\\d])(\\d{1,").concat(e,"})")+"(?:\\.(\\d{1,".concat(e,"}))?")+"(?:\\.(\\d{1,".concat(e,"}))?")+"(?:$|[^\\d])"),c("COERCERTL",r[a.COERCE],!0),c("LONETILDE","(?:~>?)"),c("TILDETRIM","(\\s*)".concat(r[a.LONETILDE],"\\s+"),!0),n.tildeTrimReplace="$1~",c("TILDE","^".concat(r[a.LONETILDE]).concat(r[a.XRANGEPLAIN],"$")),c("TILDELOOSE","^".concat(r[a.LONETILDE]).concat(r[a.XRANGEPLAINLOOSE],"$")),c("LONECARET","(?:\\^)"),c("CARETTRIM","(\\s*)".concat(r[a.LONECARET],"\\s+"),!0),n.caretTrimReplace="$1^",c("CARET","^".concat(r[a.LONECARET]).concat(r[a.XRANGEPLAIN],"$")),c("CARETLOOSE","^".concat(r[a.LONECARET]).concat(r[a.XRANGEPLAINLOOSE],"$")),c("COMPARATORLOOSE","^".concat(r[a.GTLT],"\\s*(").concat(r[a.LOOSEPLAIN],")$|^$")),c("COMPARATOR","^".concat(r[a.GTLT],"\\s*(").concat(r[a.FULLPLAIN],")$|^$")),c("COMPARATORTRIM","(\\s*)".concat(r[a.GTLT],"\\s*(").concat(r[a.LOOSEPLAIN],"|").concat(r[a.XRANGEPLAIN],")"),!0),n.comparatorTrimReplace="$1$2$3",c("HYPHENRANGE","^\\s*(".concat(r[a.XRANGEPLAIN],")")+"\\s+-\\s+"+"(".concat(r[a.XRANGEPLAIN],")")+"\\s*$"),c("HYPHENRANGELOOSE","^\\s*(".concat(r[a.XRANGEPLAINLOOSE],")")+"\\s+-\\s+"+"(".concat(r[a.XRANGEPLAINLOOSE],")")+"\\s*$"),c("STAR","(<|>)?=?\\s*\\*"),c("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),c("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(Qc,Qc.exports);var bD=/^[0-9]+$/,qH=(t,n)=>{var e=bD.test(t),o=bD.test(n);return e&&o&&(t=+t,n=+n),t===n?0:e&&!o?-1:o&&!e?1:tqH(n,t),e3e={compareIdentifiers:qH,rcompareIdentifiers:Qwe},zb=U3,_D=G8.MAX_LENGTH,Rb=G8.MAX_SAFE_INTEGER,wD=Qc.exports.re,kD=Qc.exports.t,t3e=$8,qg=e3e.compareIdentifiers;class $c{constructor(n,e){if(e=t3e(e),n instanceof $c){if(n.loose===!!e.loose&&n.includePrerelease===!!e.includePrerelease)return n;n=n.version}else if(typeof n!="string")throw new TypeError("Invalid Version: ".concat(n));if(n.length>_D)throw new TypeError("version is longer than ".concat(_D," characters"));zb("SemVer",n,e),this.options=e,this.loose=!!e.loose,this.includePrerelease=!!e.includePrerelease;var o=n.trim().match(e.loose?wD[kD.LOOSE]:wD[kD.FULL]);if(!o)throw new TypeError("Invalid Version: ".concat(n));if(this.raw=n,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>Rb||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Rb||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Rb||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map(f=>{if(/^[0-9]+$/.test(f)){var r=+f;if(r>=0&&r=0;)typeof this.prerelease[o]=="number"&&(this.prerelease[o]++,o=-2);o===-1&&this.prerelease.push(0)}e&&(qg(this.prerelease[0],e)===0?isNaN(this.prerelease[1])&&(this.prerelease=[e,0]):this.prerelease=[e,0]);break;default:throw new Error("invalid increment argument: ".concat(n))}return this.format(),this.raw=this.version,this}}var W8=$c,TD=W8,n3e=(t,n,e)=>new TD(t,e).compare(new TD(n,e)),u1=n3e,r3e=u1,i3e=(t,n,e)=>r3e(t,n,e)===0,a3e=i3e,o3e=u1,s3e=(t,n,e)=>o3e(t,n,e)!==0,l3e=s3e,u3e=u1,c3e=(t,n,e)=>u3e(t,n,e)>0,f3e=c3e,h3e=u1,d3e=(t,n,e)=>h3e(t,n,e)>=0,p3e=d3e,g3e=u1,m3e=(t,n,e)=>g3e(t,n,e)<0,v3e=m3e,y3e=u1,x3e=(t,n,e)=>y3e(t,n,e)<=0,b3e=x3e,_3e=a3e,w3e=l3e,k3e=f3e,T3e=p3e,A3e=v3e,M3e=b3e,S3e=(t,n,e,o)=>{switch(n){case"===":return typeof t=="object"&&(t=t.version),typeof e=="object"&&(e=e.version),t===e;case"!==":return typeof t=="object"&&(t=t.version),typeof e=="object"&&(e=e.version),t!==e;case"":case"=":case"==":return _3e(t,e,o);case"!=":return w3e(t,e,o);case">":return k3e(t,e,o);case">=":return T3e(t,e,o);case"<":return A3e(t,e,o);case"<=":return M3e(t,e,o);default:throw new TypeError("Invalid operator: ".concat(n))}},E3e=S3e,G4,AD;function C3e(){if(AD)return G4;AD=1;var t=Symbol("SemVer ANY");class n{static get ANY(){return t}constructor(s,l){if(l=e(l),s instanceof n){if(s.loose===!!l.loose)return s;s=s.value}a("comparator",s,l),this.options=l,this.loose=!!l.loose,this.parse(s),this.semver===t?this.value="":this.value=this.operator+this.semver.version,a("comp",this)}parse(s){var l=this.options.loose?o[f.COMPARATORLOOSE]:o[f.COMPARATOR],d=s.match(l);if(!d)throw new TypeError("Invalid comparator: ".concat(s));this.operator=d[1]!==void 0?d[1]:"",this.operator==="="&&(this.operator=""),d[2]?this.semver=new u(d[2],this.options.loose):this.semver=t}toString(){return this.value}test(s){if(a("Comparator.test",s,this.options.loose),this.semver===t||s===t)return!0;if(typeof s=="string")try{s=new u(s,this.options)}catch{return!1}return r(s,this.operator,this.semver,this.options)}intersects(s,l){if(!(s instanceof n))throw new TypeError("a Comparator is required");if((!l||typeof l!="object")&&(l={loose:!!l,includePrerelease:!1}),this.operator==="")return this.value===""?!0:new c(s.value,l).test(this.value);if(s.operator==="")return s.value===""?!0:new c(this.value,l).test(s.semver);var d=(this.operator===">="||this.operator===">")&&(s.operator===">="||s.operator===">"),h=(this.operator==="<="||this.operator==="<")&&(s.operator==="<="||s.operator==="<"),m=this.semver.version===s.semver.version,g=(this.operator===">="||this.operator==="<=")&&(s.operator===">="||s.operator==="<="),p=r(this.semver,"<",s.semver,l)&&(this.operator===">="||this.operator===">")&&(s.operator==="<="||s.operator==="<"),v=r(this.semver,">",s.semver,l)&&(this.operator==="<="||this.operator==="<")&&(s.operator===">="||s.operator===">");return d||h||m&&g||p||v}}G4=n;var e=$8,o=Qc.exports.re,f=Qc.exports.t,r=E3e,a=U3,u=W8,c=HH();return G4}function MD(t,n){var e=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=O3e(t))||n&&t&&typeof t.length=="number"){e&&(t=e);var o=0,f=function(){};return{s:f,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(i){throw i},f}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var r=!0,a=!1,u;return{s:function(){e=e.call(t)},n:function(){var i=e.next();return r=i.done,i},e:function(i){a=!0,u=i},f:function(){try{!r&&e.return!=null&&e.return()}finally{if(a)throw u}}}}function O3e(t,n){if(!!t){if(typeof t=="string")return SD(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);if(e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set")return Array.from(t);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return SD(t,n)}}function SD(t,n){(n==null||n>t.length)&&(n=t.length);for(var e=0,o=new Array(n);ethis.parseRange(P.trim())).filter(P=>P.length),!this.set.length)throw new TypeError("Invalid SemVer Range: ".concat(E));if(this.set.length>1){var O=this.set[0];if(this.set=this.set.filter(P=>!d(P[0])),this.set.length===0)this.set=[O];else if(this.set.length>1){var R=MD(this.set),z;try{for(R.s();!(z=R.n()).done;){var L=z.value;if(L.length===1&&h(L[0])){this.set=[L];break}}}catch(P){R.e(P)}finally{R.f()}}}this.format()}format(){return this.range=this.set.map(E=>E.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(E){E=E.trim();var D=Object.keys(this.options).join(","),O="parseRange:".concat(D,":").concat(E),R=e.get(O);if(R)return R;var z=this.options.loose,L=z?u[c.HYPHENRANGELOOSE]:u[c.HYPHENRANGE];E=E.replace(L,M(this.options.includePrerelease)),r("hyphen replace",E),E=E.replace(u[c.COMPARATORTRIM],i),r("comparator trim",E),E=E.replace(u[c.TILDETRIM],s),E=E.replace(u[c.CARETTRIM],l),E=E.split(/\s+/).join(" ");var P=E.split(" ").map(Y=>g(Y,this.options)).join(" ").split(/\s+/).map(Y=>_(Y,this.options));z&&(P=P.filter(Y=>(r("loose invalid filter",Y,this.options),!!Y.match(u[c.COMPARATORLOOSE])))),r("range list",P);var N=new Map,B=P.map(Y=>new f(Y,this.options)),G=MD(B),W;try{for(G.s();!(W=G.n()).done;){var K=W.value;if(d(K))return[K];N.set(K.value,K)}}catch(Y){G.e(Y)}finally{G.f()}N.size>1&&N.has("")&&N.delete("");var te=[...N.values()];return e.set(O,te),te}intersects(E,D){if(!(E instanceof t))throw new TypeError("a Range is required");return this.set.some(O=>m(O,D)&&E.set.some(R=>m(R,D)&&O.every(z=>R.every(L=>z.intersects(L,D)))))}test(E){if(!E)return!1;if(typeof E=="string")try{E=new a(E,this.options)}catch{return!1}for(var D=0;DS.value==="<0.0.0-0",h=S=>S.value==="",m=(S,E)=>{for(var D=!0,O=S.slice(),R=O.pop();D&&O.length;)D=O.every(z=>R.intersects(z,E)),R=O.pop();return D},g=(S,E)=>(r("comp",S,E),S=x(S,E),r("caret",S),S=v(S,E),r("tildes",S),S=k(S,E),r("xrange",S),S=T(S,E),r("stars",S),S),p=S=>!S||S.toLowerCase()==="x"||S==="*",v=(S,E)=>S.trim().split(/\s+/).map(D=>y(D,E)).join(" "),y=(S,E)=>{var D=E.loose?u[c.TILDELOOSE]:u[c.TILDE];return S.replace(D,(O,R,z,L,P)=>{r("tilde",S,O,R,z,L,P);var N;return p(R)?N="":p(z)?N=">=".concat(R,".0.0 <").concat(+R+1,".0.0-0"):p(L)?N=">=".concat(R,".").concat(z,".0 <").concat(R,".").concat(+z+1,".0-0"):P?(r("replaceTilde pr",P),N=">=".concat(R,".").concat(z,".").concat(L,"-").concat(P," <").concat(R,".").concat(+z+1,".0-0")):N=">=".concat(R,".").concat(z,".").concat(L," <").concat(R,".").concat(+z+1,".0-0"),r("tilde return",N),N})},x=(S,E)=>S.trim().split(/\s+/).map(D=>w(D,E)).join(" "),w=(S,E)=>{r("caret",S,E);var D=E.loose?u[c.CARETLOOSE]:u[c.CARET],O=E.includePrerelease?"-0":"";return S.replace(D,(R,z,L,P,N)=>{r("caret",S,R,z,L,P,N);var B;return p(z)?B="":p(L)?B=">=".concat(z,".0.0").concat(O," <").concat(+z+1,".0.0-0"):p(P)?z==="0"?B=">=".concat(z,".").concat(L,".0").concat(O," <").concat(z,".").concat(+L+1,".0-0"):B=">=".concat(z,".").concat(L,".0").concat(O," <").concat(+z+1,".0.0-0"):N?(r("replaceCaret pr",N),z==="0"?L==="0"?B=">=".concat(z,".").concat(L,".").concat(P,"-").concat(N," <").concat(z,".").concat(L,".").concat(+P+1,"-0"):B=">=".concat(z,".").concat(L,".").concat(P,"-").concat(N," <").concat(z,".").concat(+L+1,".0-0"):B=">=".concat(z,".").concat(L,".").concat(P,"-").concat(N," <").concat(+z+1,".0.0-0")):(r("no pr"),z==="0"?L==="0"?B=">=".concat(z,".").concat(L,".").concat(P).concat(O," <").concat(z,".").concat(L,".").concat(+P+1,"-0"):B=">=".concat(z,".").concat(L,".").concat(P).concat(O," <").concat(z,".").concat(+L+1,".0-0"):B=">=".concat(z,".").concat(L,".").concat(P," <").concat(+z+1,".0.0-0")),r("caret return",B),B})},k=(S,E)=>(r("replaceXRanges",S,E),S.split(/\s+/).map(D=>b(D,E)).join(" ")),b=(S,E)=>{S=S.trim();var D=E.loose?u[c.XRANGELOOSE]:u[c.XRANGE];return S.replace(D,(O,R,z,L,P,N)=>{r("xRange",S,O,R,z,L,P,N);var B=p(z),G=B||p(L),W=G||p(P),K=W;return R==="="&&K&&(R=""),N=E.includePrerelease?"-0":"",B?R===">"||R==="<"?O="<0.0.0-0":O="*":R&&K?(G&&(L=0),P=0,R===">"?(R=">=",G?(z=+z+1,L=0,P=0):(L=+L+1,P=0)):R==="<="&&(R="<",G?z=+z+1:L=+L+1),R==="<"&&(N="-0"),O="".concat(R+z,".").concat(L,".").concat(P).concat(N)):G?O=">=".concat(z,".0.0").concat(N," <").concat(+z+1,".0.0-0"):W&&(O=">=".concat(z,".").concat(L,".0").concat(N," <").concat(z,".").concat(+L+1,".0-0")),r("xRange return",O),O})},T=(S,E)=>(r("replaceStars",S,E),S.trim().replace(u[c.STAR],"")),_=(S,E)=>(r("replaceGTE0",S,E),S.trim().replace(u[E.includePrerelease?c.GTE0PRE:c.GTE0],"")),M=S=>(E,D,O,R,z,L,P,N,B,G,W,K,te)=>(p(O)?D="":p(R)?D=">=".concat(O,".0.0").concat(S?"-0":""):p(z)?D=">=".concat(O,".").concat(R,".0").concat(S?"-0":""):L?D=">=".concat(D):D=">=".concat(D).concat(S?"-0":""),p(B)?N="":p(G)?N="<".concat(+B+1,".0.0-0"):p(W)?N="<".concat(B,".").concat(+G+1,".0-0"):K?N="<=".concat(B,".").concat(G,".").concat(W,"-").concat(K):S?N="<".concat(B,".").concat(G,".").concat(+W+1,"-0"):N="<=".concat(N),"".concat(D," ").concat(N).trim()),A=(S,E,D)=>{for(var O=0;O0){var z=S[R].semver;if(z.major===E.major&&z.minor===E.minor&&z.patch===E.patch)return!0}return!1}return!0};return W4}var L3e=HH(),P3e=(t,n,e)=>{try{n=new L3e(n,e)}catch{return!1}return n.test(t)},$H=P3e;function D3e(t,n,e){var o=t.open(n),f=1e4,r=250,a=new URL(n),u=a.origin,c=~~(f/r);function i(l){l.source===o&&(c=0,t.removeEventListener("message",i,!1))}t.addEventListener("message",i,!1);function s(){c<=0||(o.postMessage(e,u),setTimeout(s,r),c-=1)}setTimeout(s,r)}var I3e=`.vega-embed { + position: relative; + display: inline-block; + box-sizing: border-box; +} +.vega-embed.has-actions { + padding-right: 38px; +} +.vega-embed details:not([open]) > :not(summary) { + display: none !important; +} +.vega-embed summary { + list-style: none; + position: absolute; + top: 0; + right: 0; + padding: 6px; + z-index: 1000; + background: white; + box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1); + color: #1b1e23; + border: 1px solid #aaa; + border-radius: 999px; + opacity: 0.2; + transition: opacity 0.4s ease-in; + cursor: pointer; + line-height: 0px; +} +.vega-embed summary::-webkit-details-marker { + display: none; +} +.vega-embed summary:active { + box-shadow: #aaa 0px 0px 0px 1px inset; +} +.vega-embed summary svg { + width: 14px; + height: 14px; +} +.vega-embed details[open] summary { + opacity: 0.7; +} +.vega-embed:hover summary, .vega-embed:focus-within summary { + opacity: 1 !important; + transition: opacity 0.2s ease; +} +.vega-embed .vega-actions { + position: absolute; + z-index: 1001; + top: 35px; + right: -9px; + display: flex; + flex-direction: column; + padding-bottom: 8px; + padding-top: 8px; + border-radius: 4px; + box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.2); + border: 1px solid #d9d9d9; + background: white; + animation-duration: 0.15s; + animation-name: scale-in; + animation-timing-function: cubic-bezier(0.2, 0, 0.13, 1.5); + text-align: left; +} +.vega-embed .vega-actions a { + padding: 8px 16px; + font-family: sans-serif; + font-size: 14px; + font-weight: 600; + white-space: nowrap; + color: #434a56; + text-decoration: none; +} +.vega-embed .vega-actions a:hover, .vega-embed .vega-actions a:focus { + background-color: #f7f7f9; + color: black; +} +.vega-embed .vega-actions::before, .vega-embed .vega-actions::after { + content: ""; + display: inline-block; + position: absolute; +} +.vega-embed .vega-actions::before { + left: auto; + right: 14px; + top: -16px; + border: 8px solid rgba(0, 0, 0, 0); + border-bottom-color: #d9d9d9; +} +.vega-embed .vega-actions::after { + left: auto; + right: 15px; + top: -14px; + border: 7px solid rgba(0, 0, 0, 0); + border-bottom-color: #fff; +} +.vega-embed .chart-wrapper.fit-x { + width: 100%; +} +.vega-embed .chart-wrapper.fit-y { + height: 100%; +} + +.vega-embed-wrapper { + max-width: 100%; + overflow: auto; + padding-right: 14px; +} + +@keyframes scale-in { + from { + opacity: 0; + transform: scale(0.6); + } + to { + opacity: 1; + transform: scale(1); + } +} +`;String.prototype.startsWith||(String.prototype.startsWith=function(t,n){return this.substr(!n||n<0?0:+n,t.length)===t});function GH(t){for(var n=arguments.length,e=new Array(n>1?n-1:0),o=1;o=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(i){throw i},f}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var r=!0,a=!1,u;return{s:function(){e=e.call(t)},n:function(){var i=e.next();return r=i.done,i},e:function(i){a=!0,u=i},f:function(){try{!r&&e.return!=null&&e.return()}finally{if(a)throw u}}}}function F3e(t,n){if(!!t){if(typeof t=="string")return CD(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);if(e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set")return Array.from(t);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return CD(t,n)}}function CD(t,n){(n==null||n>t.length)&&(n=t.length);for(var e=0,o=new Array(n);et,"vega-lite":(t,n)=>xy.compile(t,{config:n}).spec},U3e=` + + + + +`,V3e="chart-wrapper";function q3e(t){return typeof t=="function"}function LD(t,n,e,o){var f="".concat(n,'
'),r="
".concat(e,""),a=window.open("");a.document.write(f+t+r),a.document.title="".concat(Mv[o]," JSON Source")}function H3e(t,n){if(t.$schema){var e=PH(t.$schema);if(n&&n!==e.library){var o;console.warn("The given visualization spec is written in ".concat(Mv[e.library],", but mode argument sets ").concat((o=Mv[n])!==null&&o!==void 0?o:n,"."))}var f=e.library;return $H(U2[f],"^".concat(e.version.slice(1)))||console.warn("The input spec uses ".concat(Mv[f]," ").concat(e.version,", but the current version of ").concat(Mv[f]," is v").concat(U2[f],".")),f}return"mark"in t||"encoding"in t||"layer"in t||"hconcat"in t||"vconcat"in t||"facet"in t||"repeat"in t?"vega-lite":"marks"in t||"signals"in t||"scales"in t||"axes"in t?"vega":n??"vega"}function $3e(t){return!!(t&&"load"in t)}function PD(t){return $3e(t)?t:Gc.loader(t)}function G3e(t){var n,e,o=(n=(e=t.usermeta)===null||e===void 0?void 0:e.embedOptions)!==null&&n!==void 0?n:{};return bi(o.defaultStyle)&&(o.defaultStyle=!1),o}function W3e(t,n){return hA.apply(this,arguments)}function hA(){return hA=N2(Hf.mark(function t(n,e){var o,f,r,a,u,c,i,s,l,d,h,m=arguments;return Hf.wrap(function(p){for(;;)switch(p.prev=p.next){case 0:if(r=m.length>2&&m[2]!==void 0?m[2]:{},!bi(e)){p.next=10;break}return u=PD(r.loader),p.t0=JSON,p.next=6,u.load(e);case 6:p.t1=p.sent,a=p.t0.parse.call(p.t0,p.t1),p.next=11;break;case 10:a=e;case 11:return c=G3e(a),i=c.loader,(!u||i)&&(u=PD((s=r.loader)!==null&&s!==void 0?s:i)),p.next=16,DD(c,u);case 16:return l=p.sent,p.next=19,DD(r,u);case 19:return d=p.sent,h=Gd(Gd({},GH(d,l)),{},{config:Vm((o=d.config)!==null&&o!==void 0?o:{},(f=l.config)!==null&&f!==void 0?f:{})}),p.next=23,X3e(n,a,h,u);case 23:return p.abrupt("return",p.sent);case 24:case"end":return p.stop()}},t)})),hA.apply(this,arguments)}function DD(t,n){return dA.apply(this,arguments)}function dA(){return dA=N2(Hf.mark(function t(n,e){var o,f,r;return Hf.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:if(!bi(n.config)){u.next=8;break}return u.t1=JSON,u.next=4,e.load(n.config);case 4:u.t2=u.sent,u.t0=u.t1.parse.call(u.t1,u.t2),u.next=9;break;case 8:u.t0=(o=n.config)!==null&&o!==void 0?o:{};case 9:if(f=u.t0,!bi(n.patch)){u.next=18;break}return u.t4=JSON,u.next=14,e.load(n.patch);case 14:u.t5=u.sent,u.t3=u.t4.parse.call(u.t4,u.t5),u.next=19;break;case 18:u.t3=n.patch;case 19:return r=u.t3,u.abrupt("return",Gd(Gd(Gd({},n),r?{patch:r}:{}),f?{config:f}:{}));case 21:case"end":return u.stop()}},t)})),dA.apply(this,arguments)}function Y3e(t){var n,e=t.getRootNode?t.getRootNode():document;return e instanceof ShadowRoot?{root:e,rootContainer:e}:{root:document,rootContainer:(n=document.head)!==null&&n!==void 0?n:document.body}}function X3e(t,n){return pA.apply(this,arguments)}function pA(){return pA=N2(Hf.mark(function t(n,e){var o,f,r,a,u,c,i,s,l,d,h,m,g,p,v,y,x,w,k,b,T,_,M,A,S,E,D,O,R,z,L,P,N,B,G,W,K,te,Y,Z,re,U,q,$,ne,H,Q,ee,ie,ae,ue,le=arguments;return Hf.wrap(function(fe){for(;;)switch(fe.prev=fe.next){case 0:if(ue=function(){te&&document.removeEventListener("click",te),P.finalize()},s=le.length>2&&le[2]!==void 0?le[2]:{},l=le.length>3?le[3]:void 0,d=s.theme?Vm(xwe[s.theme],(o=s.config)!==null&&o!==void 0?o:{}):s.config,h=fp(s.actions)?s.actions:GH({},N3e,(f=s.actions)!==null&&f!==void 0?f:{}),m=Gd(Gd({},B3e),s.i18n),g=(r=s.renderer)!==null&&r!==void 0?r:"canvas",p=(a=s.logLevel)!==null&&a!==void 0?a:Gc.Warn,v=(u=s.downloadFileName)!==null&&u!==void 0?u:"visualization",y=typeof n=="string"?document.querySelector(n):n,y){fe.next=12;break}throw new Error("".concat(n," does not exist"));case 12:if(s.defaultStyle!==!1&&(x="vega-embed-style",w=Y3e(y),k=w.root,b=w.rootContainer,k.getElementById(x)||(T=document.createElement("style"),T.id=x,T.innerHTML=s.defaultStyle===void 0||s.defaultStyle===!0?I3e.toString():s.defaultStyle,b.appendChild(T))),_=H3e(e,s.mode),M=j3e[_](e,d),_==="vega-lite"&&M.$schema&&(A=PH(M.$schema),$H(U2.vega,"^".concat(A.version.slice(1)))||console.warn("The compiled spec uses Vega ".concat(A.version,", but current version is v").concat(U2.vega,"."))),y.classList.add("vega-embed"),h&&y.classList.add("has-actions"),y.innerHTML="",S=y,h&&(E=document.createElement("div"),E.classList.add(V3e),y.appendChild(E),S=E),D=s.patch,D&&(M=D instanceof Function?D(M):Y2(M,D,!0,!1).newDocument),s.formatLocale&&Gc.formatLocale(s.formatLocale),s.timeFormatLocale&&Gc.timeFormatLocale(s.timeFormatLocale),s.expressionFunctions)for(O in s.expressionFunctions)R=s.expressionFunctions[O],"fn"in R?Gc.expressionFunction(O,R.fn,R.visitor):R instanceof Function&&Gc.expressionFunction(O,R);return z=s.ast,L=Gc.parse(M,_==="vega-lite"?{}:d,{ast:z}),P=new(s.viewClass||Gc.View)(L,Gd({loader:l,logLevel:p,renderer:g},z?{expr:(c=(i=Gc.expressionInterpreter)!==null&&i!==void 0?i:s.expr)!==null&&c!==void 0?c:h0e}:{})),P.addSignalListener("autosize",(me,_e)=>{var we=_e.type;we=="fit-x"?(S.classList.add("fit-x"),S.classList.remove("fit-y")):we=="fit-y"?(S.classList.remove("fit-x"),S.classList.add("fit-y")):we=="fit"?S.classList.add("fit-x","fit-y"):S.classList.remove("fit-x","fit-y")}),s.tooltip!==!1&&(N=q3e(s.tooltip)?s.tooltip:new Ewe(s.tooltip===!0?{}:s.tooltip).call,P.tooltip(N)),B=s.hover,B===void 0&&(B=_==="vega"),B&&(G=typeof B=="boolean"?{}:B,W=G.hoverSet,K=G.updateSet,P.hover(W,K)),s&&(s.width!=null&&P.width(s.width),s.height!=null&&P.height(s.height),s.padding!=null&&P.padding(s.padding)),fe.next=37,P.initialize(S,s.bind).runAsync();case 37:if(h!==!1){if(Y=y,s.defaultStyle!==!1&&(Z=document.createElement("details"),Z.title=m.CLICK_TO_VIEW_ACTIONS,y.append(Z),Y=Z,re=document.createElement("summary"),re.innerHTML=U3e,Z.append(re),te=me=>{Z.contains(me.target)||Z.removeAttribute("open")},document.addEventListener("click",te)),U=document.createElement("div"),Y.append(U),U.classList.add("vega-actions"),h===!0||h.export!==!1){q=R3e(["svg","png"]);try{for(ne=function(){var _e=$.value;if(h===!0||h.export===!0||h.export[_e]){var we=m["".concat(_e.toUpperCase(),"_ACTION")],Te=document.createElement("a");Te.text=we,Te.href="#",Te.target="_blank",Te.download="".concat(v,".").concat(_e),Te.addEventListener("mousedown",function(){var Oe=N2(Hf.mark(function de(ye){var Me;return Hf.wrap(function(Ee){for(;;)switch(Ee.prev=Ee.next){case 0:return ye.preventDefault(),Ee.next=3,P.toImageURL(_e,s.scaleFactor);case 3:Me=Ee.sent,this.href=Me;case 5:case"end":return Ee.stop()}},de,this)}));return function(de){return Oe.apply(this,arguments)}}()),U.append(Te)}},q.s();!($=q.n()).done;)ne()}catch(me){q.e(me)}finally{q.f()}}(h===!0||h.source!==!1)&&(H=document.createElement("a"),H.text=m.SOURCE_ACTION,H.href="#",H.addEventListener("click",function(me){var _e,we;LD(S5(e),(_e=s.sourceHeader)!==null&&_e!==void 0?_e:"",(we=s.sourceFooter)!==null&&we!==void 0?we:"",_),me.preventDefault()}),U.append(H)),_==="vega-lite"&&(h===!0||h.compiled!==!1)&&(Q=document.createElement("a"),Q.text=m.COMPILED_ACTION,Q.href="#",Q.addEventListener("click",function(me){var _e,we;LD(S5(M),(_e=s.sourceHeader)!==null&&_e!==void 0?_e:"",(we=s.sourceFooter)!==null&&we!==void 0?we:"","vega"),me.preventDefault()}),U.append(Q)),(h===!0||h.editor!==!1)&&(ie=(ee=s.editorUrl)!==null&&ee!==void 0?ee:"https://vega.github.io/editor/",ae=document.createElement("a"),ae.text=m.EDITOR_ACTION,ae.href="#",ae.addEventListener("click",function(me){D3e(window,ie,{config:d,mode:_,renderer:g,spec:S5(e)}),me.preventDefault()}),U.append(ae))}return fe.abrupt("return",{view:P,spec:e,vgSpec:M,finalize:ue,embedOptions:s});case 39:case"end":return fe.stop()}},t)})),pA.apply(this,arguments)}const Z3e=new Set(["width","height"]);function J3e(t,n){for(const[e,o]of Object.entries(n))o&&(!!o&&{}.toString.call(o)==="[object Function]"?o(t.data(e)):t.change(e,Gc.changeset().remove(()=>!0).insert(o)))}function Nb(t={},n={},e=new Set){const o=Object.keys(t),f=Object.keys(n);return t===n||o.length===f.length&&o.filter(r=>!e.has(r)).every(r=>t[r]===n[r])}function ID(t,n){const e=Object.keys(n);for(const o of e)try{t.removeSignalListener(o,n[o])}catch(f){console.warn("Cannot remove invalid signal listener.",f)}return e.length>0}function X4(t,n){const e=Object.keys(n);for(const o of e)try{t.addSignalListener(o,n[o])}catch(f){console.warn("Cannot add invalid signal listener.",f)}return e.length>0}function K3e(t){return new Set(t.flatMap(n=>Object.keys(n)))}function Q3e(t,n){if(t===n)return!1;const e={width:!1,height:!1,isExpensive:!1},o="width"in t||"width"in n,f="height"in t||"height"in n;return o&&(!("width"in t)||!("width"in n)||t.width!==n.width)&&("width"in t&&typeof t.width=="number"?e.width=t.width:e.isExpensive=!0),f&&(!("height"in t)||!("height"in n)||t.height!==n.height)&&("height"in t&&typeof t.height=="number"?e.height=t.height:e.isExpensive=!0),[...K3e([t,n])].filter(a=>a!=="width"&&a!=="height").some(a=>!(a in t)||!(a in n)||!xU(t[a],n[a]))&&(e.isExpensive=!0),e.width!==!1||e.height!==!1||e.isExpensive?e:!1}function zD(t,n){const{width:e,height:o}=n;return typeof e<"u"&&typeof o<"u"?{...t,width:e,height:o}:typeof e<"u"?{...t,width:e}:typeof o<"u"?{...t,height:o}:t}function e5e(t){let n;return{c(){n=Gh("div")},m(e,o){uf(e,n,o),t[11](n)},p:cu,i:cu,o:cu,d(e){e&&cf(n),t[11](null)}}}function t5e(t,n,e){let{options:o}=n,{spec:f}=n,{view:r}=n,{signalListeners:a={}}=n,{data:u={}}=n;const c=TG();let i,s={},l={},d={},h={},m;FD(()=>{p()});async function g(){p();try{e(6,i=await W3e(m,f,o)),e(1,r=i.view),X4(r,a)&&r.runAsync(),y(r)}catch(k){v(k)}}function p(){i&&(i.finalize(),e(6,i=void 0),e(1,r=void 0))}function v(k){c("onError",{error:k}),console.warn(k)}function y(k){x(),c("onNewView",{view:k})}async function x(){u&&Object.keys(u).length>0&&i!==void 0&&(e(1,r=i.view),J3e(r,u),await r.resize().runAsync())}function w(k){gA[k?"unshift":"push"](()=>{m=k,e(0,m)})}return t.$$set=k=>{"options"in k&&e(2,o=k.options),"spec"in k&&e(3,f=k.spec),"view"in k&&e(1,r=k.view),"signalListeners"in k&&e(4,a=k.signalListeners),"data"in k&&e(5,u=k.data)},t.$$.update=()=>{if(t.$$.dirty&1056&&(Nb(u,h)||x(),e(10,h=u)),t.$$.dirty&991&&m!==void 0){if(!Nb(o,s,Z3e))g();else{const k=Q3e(zD(f,o),zD(d,s)),b=a,T=l;if(k){if(k.isExpensive)g();else if(i!==void 0){const _=!Nb(b,T);e(1,r=i.view),k.width!==!1&&r.width(k.width),k.height!==!1&&r.height(k.height),_&&(T&&ID(r,T),b&&X4(r,b)),r.runAsync()}}else!Nb(b,T)&&i!==void 0&&(e(1,r=i.view),T&&ID(r,T),b&&X4(r,b),r.runAsync())}e(7,s=o),e(8,l=a),e(9,d=f)}},[m,r,o,f,a,u,i,s,l,d,h,w]}class n5e extends by{constructor(n){super(),_y(this,n,t5e,e5e,wy,{options:2,spec:3,view:1,signalListeners:4,data:5})}}function r5e(t){let n,e,o;function f(a){t[6](a)}let r={spec:t[1],data:t[2],signalListeners:t[3],options:t[4]};return t[0]!==void 0&&(r.view=t[0]),n=new n5e({props:r}),gA.push(()=>AG(n,"view",f)),n.$on("onNewView",t[7]),n.$on("onError",t[8]),{c(){u0(n.$$.fragment)},m(a,u){c0(n,a,u),o=!0},p(a,[u]){const c={};u&2&&(c.spec=a[1]),u&4&&(c.data=a[2]),u&8&&(c.signalListeners=a[3]),u&16&&(c.options=a[4]),!e&&u&1&&(e=!0,c.view=a[0],MG(()=>e=!1)),n.$set(c)},i(a){o||(Bh(n.$$.fragment,a),o=!0)},o(a){jh(n.$$.fragment,a),o=!1},d(a){f0(n,a)}}}const i5e="vega";function a5e(t,n,e){let o,{spec:f}=n,{options:r={}}=n,{data:a={}}=n,{signalListeners:u={}}=n,{view:c=void 0}=n;function i(d){c=d,e(0,c)}function s(d){Z4.call(this,t,d)}function l(d){Z4.call(this,t,d)}return t.$$set=d=>{"spec"in d&&e(1,f=d.spec),"options"in d&&e(5,r=d.options),"data"in d&&e(2,a=d.data),"signalListeners"in d&&e(3,u=d.signalListeners),"view"in d&&e(0,c=d.view)},t.$$.update=()=>{t.$$.dirty&32&&e(4,o={...r,mode:i5e})},[c,f,a,u,o,r,i,s,l]}class o5e extends by{constructor(n){super(),_y(this,n,a5e,r5e,wy,{spec:1,options:5,data:2,signalListeners:3,view:0})}}function s5e(t){return{axis:{labelFont:"sans-serif",labelColor:t?Cf.slate["200"]:Cf.gray[900],titleFont:"sans-serif",titleColor:t?Cf.slate["200"]:Cf.gray[900],tickColor:"#aaa",gridColor:"#aaa",titleFontWeight:"normal",labelFontWeight:"normal"},legend:{labelColor:t?Cf.slate["200"]:Cf.gray[900],labelFont:"sans-serif",titleColor:t?Cf.slate["200"]:Cf.gray[900],titleFont:"sans-serif",titleFontWeight:"normal",labelFontWeight:"normal"},title:{color:t?Cf.slate["200"]:Cf.gray[900],font:"sans-serif",fontWeight:"normal"}}}function l5e(t){let n,e,o,f;return o=new VD({}),{c(){n=Gh("div"),e=Gh("div"),u0(o.$$.fragment),Aa(e,"class","h-5 dark:text-white opacity-50"),Aa(n,"class","h-full min-h-[15rem] flex justify-center items-center")},m(r,a){uf(r,n,a),zf(n,e),c0(o,e,null),f=!0},p:cu,i(r){f||(Bh(o.$$.fragment,r),f=!0)},o(r){jh(o.$$.fragment,r),f=!1},d(r){r&&cf(n),f0(o)}}}function u5e(t){let n,e,o;return{c(){n=Gh("div"),e=Gh("img"),Aa(e,"class","w-full max-h-[30rem] object-contain"),bC(e.src,o=t[0].plot)||Aa(e,"src",o),Aa(n,"class","output-image w-full flex justify-center items-center relative")},m(f,r){uf(f,n,r),zf(n,e)},p(f,r){r&1&&!bC(e.src,o=f[0].plot)&&Aa(e,"src",o)},i:cu,o:cu,d(f){f&&cf(n)}}}function c5e(t){let n,e,o,f;e=new o5e({props:{spec:t[2]}});let r=t[1]&&RD(t);return{c(){n=Gh("div"),u0(e.$$.fragment),o=J4(),r&&r.c(),Aa(n,"class","flex flex-col justify-center items-center w-full h-full")},m(a,u){uf(a,n,u),c0(e,n,null),zf(n,o),r&&r.m(n,null),f=!0},p(a,u){const c={};u&4&&(c.spec=a[2]),e.$set(c),a[1]?r?r.p(a,u):(r=RD(a),r.c(),r.m(n,null)):r&&(r.d(1),r=null)},i(a){f||(Bh(e.$$.fragment,a),f=!0)},o(a){jh(e.$$.fragment,a),f=!1},d(a){a&&cf(n),f0(e),r&&r.d()}}}function f5e(t){let n;return{c(){n=Gh("div"),Aa(n,"id","bokehDiv")},m(e,o){uf(e,n,o)},p:cu,i:cu,o:cu,d(e){e&&cf(n)}}}function h5e(t){let n;return{c(){n=Gh("div")},m(e,o){uf(e,n,o),t[8](n)},p:cu,i:cu,o:cu,d(e){e&&cf(n),t[8](null)}}}function RD(t){let n,e;return{c(){n=Gh("div"),e=LG(t[1]),Aa(n,"class","flex justify-center text-xs w-full h-full text-black dark:text-slate-200 ")},m(o,f){uf(o,n,f),zf(n,e)},p(o,f){f&2&&PG(e,o[1])},d(o){o&&cf(n)}}}function d5e(t){let n,e,o,f;const r=[h5e,f5e,c5e,u5e,l5e],a=[];function u(c,i){return c[0]&&c[0].type=="plotly"?0:c[0]&&c[0].type=="bokeh"?1:c[0]&&c[0].type=="altair"?2:c[0]&&c[0].type=="matplotlib"?3:4}return n=u(t),e=a[n]=r[n](t),{c(){e.c(),o=SG()},m(c,i){a[n].m(c,i),uf(c,o,i),f=!0},p(c,[i]){let s=n;n=u(c),n===s?a[n].p(c,i):(EG(),jh(a[s],1,1,()=>{a[s]=null}),CG(),e=a[n],e?e.p(c,i):(e=a[n]=r[n](c),e.c()),Bh(e,1),e.m(o.parentNode,o))},i(c){f||(Bh(e),f=!0)},o(c){jh(e),f=!1},d(c){a[n].d(c),c&&cf(o)}}}const p5e="https://cdn.bokeh.org/bokeh/release/bokeh-2.4.2.min.js";function g5e(t,n,e){let o,{value:f}=n,{target:r}=n,a=null,{colors:u=[]}=n,{theme:c}=n,{caption:i}=n;function s(M){let A=u[M%u.length];return A&&A in M5?M5[A]?.primary:A||M5[BG(M)].primary}let l,d;const h=["https://cdn.pydata.org/bokeh/release/bokeh-widgets-2.4.2.min.js","https://cdn.pydata.org/bokeh/release/bokeh-tables-2.4.2.min.js","https://cdn.pydata.org/bokeh/release/bokeh-gl-2.4.2.min.js","https://cdn.pydata.org/bokeh/release/bokeh-api-2.4.2.min.js"];function m(){return h.map((M,A)=>{const S=document.createElement("script");return S.onload=()=>k(A+1),S.src=M,document.head.appendChild(S),S})}function g(){const M=document.createElement("script");return M.onload=T,M.src=p5e,document.head.appendChild(M),M}function p(){if(!d){d=document.getElementById("plotly.js-style-global");const M=d.cloneNode();r.appendChild(M);for(const A of d.sheet.cssRules)M.sheet.insertRule(A.cssText)}}const v=g();let y=[];const x=[],w=Array(5).fill(0).map((M,A)=>b(A)),k=M=>{f&&f.type=="bokeh"&&x[M]()};function b(M){return new Promise((A,S)=>{x[M]=A})}function T(){k(0),y=m()}Promise.all(w).then(()=>{let M=JSON.parse(f.plot);window.Bokeh.embed.embed_item(M,"bokehDiv")}),OG(()=>{if(f&&f.type=="plotly"){p();let M=JSON.parse(f.plot);M.layout.title?M.layout.margin={autoexpand:!0}:M.layout.margin={l:0,r:0,b:0,t:0},dW.react(l,M)}else if(f&&f.type=="bokeh"){document.getElementById("bokehDiv").innerHTML="";let M=JSON.parse(f.plot);window.Bokeh.embed.embed_item(M,"bokehDiv")}}),FD(()=>{v in document.children&&(document.removeChild(v),y.forEach(M=>document.removeChild(M)))});function _(M){gA[M?"unshift":"push"](()=>{l=M,e(3,l)})}return t.$$set=M=>{"value"in M&&e(0,f=M.value),"target"in M&&e(4,r=M.target),"colors"in M&&e(5,u=M.colors),"theme"in M&&e(6,c=M.theme),"caption"in M&&e(1,i=M.caption)},t.$$.update=()=>{if(t.$$.dirty&64&&e(7,o=c=="dark"),t.$$.dirty&133&&f&&f.type=="altair"){e(2,a=JSON.parse(f.plot));const M=s5e(o);switch(e(2,a.config=M,a),f.chart||""){case"scatter":a.encoding.color&&a.encoding.color.type=="nominal"?e(2,a.encoding.color.scale.range=a.encoding.color.scale.range.map((A,S)=>s(S)),a):a.encoding.color&&a.encoding.color.type=="quantitative"&&(e(2,a.encoding.color.scale.range=["#eff6ff","#1e3a8a"],a),e(2,a.encoding.color.scale.range.interpolate="hsl",a));break;case"line":a.layer.forEach(A=>{A.encoding.color&&(A.encoding.color.scale.range=A.encoding.color.scale.range.map((S,E)=>s(E)))}),console.log(a)}}},[f,i,a,l,r,u,c,o,_]}class m5e extends by{constructor(n){super(),_y(this,n,g5e,d5e,wy,{value:0,target:4,colors:5,theme:6,caption:1})}}function v5e(t){let n,e,o,f,r,a;n=new fW({props:{show_label:t[5],label:t[4]||"Plot",Icon:VD}});const u=[t[3]];let c={};for(let i=0;i{"value"in m&&e(0,o=m.value),"elem_id"in m&&e(1,f=m.elem_id),"visible"in m&&e(2,r=m.visible),"loading_status"in m&&e(3,a=m.loading_status),"label"in m&&e(4,u=m.label),"show_label"in m&&e(5,c=m.show_label),"target"in m&&e(6,i=m.target),"style"in m&&e(7,s=m.style),"theme"in m&&e(8,l=m.theme),"caption"in m&&e(9,d=m.caption)},[o,f,r,a,u,c,i,s,l,d,h]}class b5e extends by{constructor(n){super(),_y(this,n,x5e,y5e,wy,{value:0,elem_id:1,visible:2,loading_status:3,label:4,show_label:5,target:6,style:7,theme:8,caption:9})}}var S5e=b5e;const E5e=["static"];export{S5e as Component,E5e as modes}; +//# sourceMappingURL=index.03f37f65.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/index.04164205.js b/gradio-modified/gradio/templates/frontend/assets/index.04164205.js new file mode 100644 index 0000000000000000000000000000000000000000..aee3a6df29f0cba38a84f02c7d8cd70d69217f44 --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/index.04164205.js @@ -0,0 +1,2 @@ +import{S as L,i as M,s as w,e as S,b as c,d as _,f as g,x as H,n as d,F as j,P as C,c as h,m as b,j as v,k,o as T,R as q,T as B,a as D,U as E,V as F,K}from"./index.396f4a72.js";function P(n){let e;return{c(){e=S("div"),c(e,"class","output-html"),c(e,"id",n[0]),_(e,"min-h-[6rem]",n[3]),_(e,"!hidden",!n[2])},m(s,i){g(s,e,i),e.innerHTML=n[1]},p(s,[i]){i&2&&(e.innerHTML=s[1]),i&1&&c(e,"id",s[0]),i&8&&_(e,"min-h-[6rem]",s[3]),i&4&&_(e,"!hidden",!s[2])},i:H,o:H,d(s){s&&d(e)}}}function R(n,e,s){let{elem_id:i=""}=e,{value:a}=e,{visible:l=!0}=e,{min_height:f=!1}=e;const r=j();return n.$$set=t=>{"elem_id"in t&&s(0,i=t.elem_id),"value"in t&&s(1,a=t.value),"visible"in t&&s(2,l=t.visible),"min_height"in t&&s(3,f=t.min_height)},n.$$.update=()=>{n.$$.dirty&2&&r("change")},[i,a,l,f]}class U extends L{constructor(e){super(),M(this,e,R,P,w,{elem_id:0,value:1,visible:2,min_height:3})}}function V(n){let e,s,i,a,l;const f=[n[3],{variant:"center"}];let r={};for(let t=0;t{"label"in u&&s(4,i=u.label),"elem_id"in u&&s(0,a=u.elem_id),"visible"in u&&s(1,l=u.visible),"value"in u&&s(2,f=u.value),"loading_status"in u&&s(3,r=u.loading_status)},n.$$.update=()=>{n.$$.dirty&16&&t("change")},[a,l,f,r,i,m]}class G extends L{constructor(e){super(),M(this,e,A,z,w,{label:4,elem_id:0,visible:1,value:2,loading_status:3})}}var J=G;const N=["static"],O=n=>({type:"string",description:"HTML output"});export{J as Component,O as document,N as modes}; +//# sourceMappingURL=index.04164205.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/index.044a1523.js b/gradio-modified/gradio/templates/frontend/assets/index.044a1523.js new file mode 100644 index 0000000000000000000000000000000000000000..19c40284487f10810548c0d1471cf02c32cbcc72 --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/index.044a1523.js @@ -0,0 +1,4 @@ +import{S as Y,i as Z,s as q,w as L,b as c,f as m,g as k,x as M,n as g,B as ne,a6 as P,e as v,Y as B,t as V,a as T,h as D,C as F,l as z,A as ie,d as A,P as ae,c as O,m as R,j as y,k as H,o as S,F as fe,R as ce,T as ue,U as _e,V as de,D as U,E as G}from"./index.396f4a72.js";import{g as me}from"./color.509e5f03.js";import{B as ge}from"./BlockLabel.37da86a3.js";function he(s){let e,n,l;return{c(){e=L("svg"),n=L("path"),l=L("path"),c(n,"fill","currentColor"),c(n,"d","M12 15H5a3 3 0 0 1-3-3v-2a3 3 0 0 1 3-3h5V5a1 1 0 0 0-1-1H3V2h6a3 3 0 0 1 3 3zM5 9a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h5V9zm15 14v2a1 1 0 0 0 1 1h5v-4h-5a1 1 0 0 0-1 1z"),c(l,"fill","currentColor"),c(l,"d","M2 30h28V2Zm26-2h-7a3 3 0 0 1-3-3v-2a3 3 0 0 1 3-3h5v-2a1 1 0 0 0-1-1h-6v-2h6a3 3 0 0 1 3 3Z"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"xmlns:xlink","http://www.w3.org/1999/xlink"),c(e,"aria-hidden","true"),c(e,"role","img"),c(e,"class","iconify iconify--carbon"),c(e,"width","100%"),c(e,"height","100%"),c(e,"preserveAspectRatio","xMidYMid meet"),c(e,"viewBox","0 0 32 32")},m(o,r){m(o,e,r),k(e,n),k(e,l)},p:M,i:M,o:M,d(o){o&&g(e)}}}class oe extends Y{constructor(e){super(),Z(this,e,null,he,q,{})}}function J(s,e,n){const l=s.slice();return l[15]=e[n][0],l[22]=e[n][1],l}function K(s,e,n){const l=s.slice();return l[15]=e[n][0],l[16]=e[n][1],l}function Q(s,e,n){const l=s.slice();return l[16]=e[n][0],l[19]=e[n][1],l[21]=n,l}function be(s){let e,n,l=s[1]&&W(),o=s[0],r=[];for(let t=0;t-1 + 0 + +1`,c(e,"class","color_legend flex px-2 py-1 justify-between rounded mb-3 font-semibold mt-7"),c(e,"data-testid","highlighted-text:color-legend"),B(e,"background","-webkit-linear-gradient(to right,#8d83d6,(255,255,255,0),#eb4d4b)"),B(e,"background","linear-gradient(to right,#8d83d6,rgba(255,255,255,0),#eb4d4b)")},m(n,l){m(n,e,l)},d(n){n&&g(e)}}}function X(s){let e,n,l=s[15]+"",o,r,t;return{c(){e=v("span"),n=v("span"),o=V(l),r=T(),c(n,"class","text dark:text-white"),c(e,"class","textspan p-1 mr-0.5 bg-opacity-20 dark:bg-opacity-80 rounded-sm"),c(e,"style",t="background-color: rgba("+(s[22]<0?"141, 131, 214,"+-s[22]:"235, 77, 75,"+s[22])+")")},m(i,a){m(i,e,a),k(e,n),k(n,o),k(e,r)},p(i,a){a&1&&l!==(l=i[15]+"")&&D(o,l),a&1&&t!==(t="background-color: rgba("+(i[22]<0?"141, 131, 214,"+-i[22]:"235, 77, 75,"+i[22])+")")&&c(e,"style",t)},d(i){i&&g(e)}}}function x(s){let e,n=Object.entries(s[2]),l=[];for(let o=0;o_(h),b=h=>_(h),E=()=>C(),N=()=>C();return s.$$set=h=>{"value"in h&&n(0,o=h.value),"show_legend"in h&&n(1,r=h.show_legend),"color_map"in h&&n(7,t=h.color_map)},s.$$.update=()=>{if(s.$$.dirty&129){let h=function(){for(const w in t){const j=t[w].trim();j in P?n(2,a[w]=P[j],a):n(2,a[w]={primary:l?u(t[w],1):t[w],secondary:l?u(t[w],.5):t[w]},a)}};if(t||n(7,t={}),o.length>0){for(let[w,j]of o)if(j!==null)if(typeof j=="string"){if(n(4,p="categories"),!(j in t)){let I=me(Object.keys(t).length);n(7,t[j]=I,t)}}else n(4,p="scores")}h()}},[o,r,a,d,p,_,C,t,f,b,E,N]}class we extends Y{constructor(e){super(),Z(this,e,ve,ke,q,{value:0,show_legend:1,color_map:7})}}function te(s){let e,n;return e=new ge({props:{Icon:oe,label:s[5],disable:typeof s[0].container=="boolean"&&!s[0].container}}),{c(){O(e.$$.fragment)},m(l,o){R(e,l,o),n=!0},p(l,o){const r={};o&32&&(r.label=l[5]),o&1&&(r.disable=typeof l[0].container=="boolean"&&!l[0].container),e.$set(r)},i(l){n||(y(e.$$.fragment,l),n=!0)},o(l){H(e.$$.fragment,l),n=!1},d(l){S(e,l)}}}function ye(s){let e,n,l,o;return l=new oe({}),{c(){e=v("div"),n=v("div"),O(l.$$.fragment),c(n,"class","h-5 dark:text-white opacity-50"),c(e,"class","h-full min-h-[6rem] flex justify-center items-center")},m(r,t){m(r,e,t),k(e,n),R(l,n,null),o=!0},p:M,i(r){o||(y(l.$$.fragment,r),o=!0)},o(r){H(l.$$.fragment,r),o=!1},d(r){r&&g(e),S(l)}}}function je(s){let e,n;return e=new we({props:{value:s[3],show_legend:s[4],color_map:s[0].color_map}}),{c(){O(e.$$.fragment)},m(l,o){R(e,l,o),n=!0},p(l,o){const r={};o&8&&(r.value=l[3]),o&16&&(r.show_legend=l[4]),o&1&&(r.color_map=l[0].color_map),e.$set(r)},i(l){n||(y(e.$$.fragment,l),n=!0)},o(l){H(e.$$.fragment,l),n=!1},d(l){S(e,l)}}}function He(s){let e,n,l,o,r,t,i;const a=[s[6]];let d={};for(let f=0;f{u=null}),G());let N=o;o=C(f),o===N?_[o].p(f,b):(U(),H(_[N],1,1,()=>{_[N]=null}),G(),r=_[o],r?r.p(f,b):(r=_[o]=p[o](f),r.c()),y(r,1),r.m(t.parentNode,t))},i(f){i||(y(e.$$.fragment,f),y(u),y(r),i=!0)},o(f){H(e.$$.fragment,f),H(u),H(r),i=!1},d(f){S(e,f),f&&g(n),u&&u.d(f),f&&g(l),_[o].d(f),f&&g(t)}}}function Te(s){let e,n;return e=new ae({props:{test_id:"highlighted-text",visible:s[2],elem_id:s[1],disable:typeof s[0].container=="boolean"&&!s[0].container,$$slots:{default:[He]},$$scope:{ctx:s}}}),{c(){O(e.$$.fragment)},m(l,o){R(e,l,o),n=!0},p(l,[o]){const r={};o&4&&(r.visible=l[2]),o&2&&(r.elem_id=l[1]),o&1&&(r.disable=typeof l[0].container=="boolean"&&!l[0].container),o&633&&(r.$$scope={dirty:o,ctx:l}),e.$set(r)},i(l){n||(y(e.$$.fragment,l),n=!0)},o(l){H(e.$$.fragment,l),n=!1},d(l){S(e,l)}}}function Ce(s,e,n){let{elem_id:l=""}=e,{visible:o=!0}=e,{value:r}=e,{show_legend:t}=e,{color_map:i={}}=e,{label:a}=e,{style:d={}}=e,{loading_status:u}=e;const p=fe();return s.$$set=_=>{"elem_id"in _&&n(1,l=_.elem_id),"visible"in _&&n(2,o=_.visible),"value"in _&&n(3,r=_.value),"show_legend"in _&&n(4,t=_.show_legend),"color_map"in _&&n(7,i=_.color_map),"label"in _&&n(5,a=_.label),"style"in _&&n(0,d=_.style),"loading_status"in _&&n(6,u=_.loading_status)},s.$$.update=()=>{s.$$.dirty&129&&!d.color_map&&Object.keys(i).length&&n(0,d.color_map=i,d),s.$$.dirty&8&&p("change")},[d,l,o,r,t,a,u,i]}class Me extends Y{constructor(e){super(),Z(this,e,Ce,Te,q,{elem_id:1,visible:2,value:3,show_legend:4,color_map:7,label:5,style:0,loading_status:6})}}var Oe=Me;const Re=["static"],Se=s=>({type:"Array<[string, string | number]>",description:"list of text spans and corresponding label / value"});export{Oe as Component,Se as document,Re as modes}; +//# sourceMappingURL=index.044a1523.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/index.10851bbc.css b/gradio-modified/gradio/templates/frontend/assets/index.10851bbc.css new file mode 100644 index 0000000000000000000000000000000000000000..9e7e911f291654464b8610b5f9462522dddbb07d --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/index.10851bbc.css @@ -0,0 +1 @@ +.gallery-item.svelte-1g9btlg.svelte-1g9btlg{position:relative;aspect-ratio:1 / 1;height:100%;width:100%;overflow:hidden;border-radius:.25rem;--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity));object-fit:fill;--tw-shadow:0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-opacity:1;--tw-ring-color:rgb(229 231 235 / var(--tw-ring-opacity)) }.gallery-item.svelte-1g9btlg.svelte-1g9btlg:hover{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-opacity:1;--tw-ring-color:rgb(255 176 102 / var(--tw-ring-opacity));--tw-brightness:brightness(1.1);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.gallery-item.svelte-1g9btlg.svelte-1g9btlg:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246 / var(--tw-ring-opacity)) }.dark.svelte-1g9btlg .gallery-item.svelte-1g9btlg{--tw-bg-opacity:1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))} diff --git a/gradio-modified/gradio/templates/frontend/assets/index.164edf37.js b/gradio-modified/gradio/templates/frontend/assets/index.164edf37.js new file mode 100644 index 0000000000000000000000000000000000000000..acd918a57d762720f7d388cabf14d7956b21ee62 --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/index.164edf37.js @@ -0,0 +1,4 @@ +import{S as fe,i as ce,s as de,e as E,b as y,d as D,f as C,a8 as ye,l as F,n as H,A as ge,a as j,x as X,K as Ae,I as P,t as _e,h as he,a3 as rt,B as at,g as T,O as x,c as Z,m as G,L as $,j as V,k as Y,o as Q,F as qe,aa as N,w as ve,D as ie,ab as se,ac as ue,E as oe,R as it,T as st,U as ut,V as ot}from"./index.396f4a72.js";import{U as ft}from"./Upload.5d0148e8.js";import{d as ct}from"./dsv.7fe76a93.js";var De=Object.prototype.hasOwnProperty;function ee(n,e){var t,l;if(n===e)return!0;if(n&&e&&(t=n.constructor)===e.constructor){if(t===Date)return n.getTime()===e.getTime();if(t===RegExp)return n.toString()===e.toString();if(t===Array){if((l=n.length)===e.length)for(;l--&&ee(n[l],e[l]););return l===-1}if(!t||typeof n=="object"){l=0;for(t in n)if(De.call(n,t)&&++l&&!De.call(e,t)||!(t in e)||!ee(n[t],e[t]))return!1;return Object.keys(e).length===l}}return n!==n&&e!==e}function Le(n){let e,t,l;return{c(){e=E("input"),y(e,"class","absolute outline-none inset-2 bg-transparent border-0 translate-x-px flex-1 "),y(e,"tabindex","-1"),D(e,"translate-x-px",!n[3]),D(e,"font-bold",n[3])},m(a,i){C(a,e,i),ye(e,n[0]),n[8](e),t||(l=[F(e,"input",n[7]),F(e,"keydown",n[6]),F(e,"blur",ht)],t=!0)},p(a,i){i&1&&e.value!==a[0]&&ye(e,a[0]),i&8&&D(e,"translate-x-px",!a[3]),i&8&&D(e,"font-bold",a[3])},d(a){a&&H(e),n[8](null),t=!1,ge(l)}}}function dt(n){let e;return{c(){e=_e(n[0])},m(t,l){C(t,e,l)},p(t,l){l&1&&he(e,t[0])},d(t){t&&H(e)}}}function gt(n){let e,t;return{c(){e=new rt(!1),t=at(),e.a=t},m(l,a){e.m(n[0],l,a),C(l,t,a)},p(l,a){a&1&&e.p(l[0])},d(l){l&&H(t),l&&e.d()}}}function _t(n){let e,t,l,a,i=n[2]&&Le(n);function _(s,g){return s[4]==="markdown"||s[4]==="html"?gt:dt}let h=_(n),o=h(n);return{c(){i&&i.c(),e=j(),t=E("span"),o.c(),y(t,"tabindex","-1"),y(t,"role","button"),y(t,"class","p-2 outline-none border-0 flex-1"),D(t,"opacity-0",n[2]),D(t,"pointer-events-none",n[2])},m(s,g){i&&i.m(s,g),C(s,e,g),C(s,t,g),o.m(t,null),l||(a=F(t,"dblclick",n[5]),l=!0)},p(s,[g]){s[2]?i?i.p(s,g):(i=Le(s),i.c(),i.m(e.parentNode,e)):i&&(i.d(1),i=null),h===(h=_(s))&&o?o.p(s,g):(o.d(1),o=h(s),o&&(o.c(),o.m(t,null))),g&4&&D(t,"opacity-0",s[2]),g&4&&D(t,"pointer-events-none",s[2])},i:X,o:X,d(s){i&&i.d(s),s&&H(e),s&&H(t),o.d(),l=!1,a()}}}const ht=({currentTarget:n})=>n.setAttribute("tabindex","-1");function bt(n,e,t){let{edit:l}=e,{value:a=""}=e,{el:i}=e,{header:_=!1}=e,{datatype:h="str"}=e;function o(c){Ae.call(this,n,c)}function s(c){Ae.call(this,n,c)}function g(){a=this.value,t(0,a)}function w(c){P[c?"unshift":"push"](()=>{i=c,t(1,i)})}return n.$$set=c=>{"edit"in c&&t(2,l=c.edit),"value"in c&&t(0,a=c.value),"el"in c&&t(1,i=c.el),"header"in c&&t(3,_=c.header),"datatype"in c&&t(4,h=c.datatype)},[a,i,l,_,h,o,s,g,w]}class ze extends fe{constructor(e){super(),ce(this,e,bt,_t,de,{edit:2,value:0,el:1,header:3,datatype:4})}}function Me(n,e,t){const l=n.slice();return l[52]=e[t],l[54]=t,l}function Te(n,e,t){const l=n.slice();return l[55]=e[t].value,l[56]=e[t].id,l[57]=e,l[58]=t,l}function Ee(n,e,t){const l=n.slice();return l[55]=e[t].value,l[56]=e[t].id,l[59]=e,l[54]=t,l}function Be(n){let e,t;return{c(){e=E("p"),t=_e(n[1]),y(e,"class","text-gray-600 text-[0.855rem] mb-2 block dark:text-gray-200 relative z-40")},m(l,a){C(l,e,a),T(e,t)},p(l,a){a[0]&2&&he(t,l[1])},d(l){l&&H(e)}}}function Re(n){let e,t;return{c(){e=E("caption"),t=_e(n[1]),y(e,"class","sr-only")},m(l,a){C(l,e,a),T(e,t)},p(l,a){a[0]&2&&he(t,l[1])},d(l){l&&H(e)}}}function Ce(n,e){let t,l,a,i,_,h,o,s,g,w,c,b=e[56],f,v,O;function u(S){e[30](S,e[56])}function p(){return e[31](e[56])}let M={value:e[55],edit:e[13]===e[56],header:!0};e[10][e[56]].input!==void 0&&(M.el=e[10][e[56]].input),a=new ze({props:M}),P.push(()=>x(a,"el",u)),a.$on("keydown",e[21]),a.$on("dblclick",p);function m(){return e[32](e[54])}const R=()=>e[33](t,b),z=()=>e[33](null,b);return{key:n,first:null,c(){t=E("th"),l=E("div"),Z(a.$$.fragment),_=j(),h=E("div"),o=ve("svg"),s=ve("path"),w=j(),y(s,"d","M4.49999 0L8.3971 6.75H0.602875L4.49999 0Z"),y(o,"width","1em"),y(o,"height","1em"),y(o,"class","fill-current text-[10px]"),y(o,"viewBox","0 0 9 7"),y(o,"fill","none"),y(o,"xmlns","http://www.w3.org/2000/svg"),y(h,"class",g="flex flex-none items-center justify-center p-2 cursor-pointer leading-snug transform transition-all "+(e[12]!==e[54]?"text-gray-200 hover:text-gray-500":"text-orange-500")+" "+(e[12]===e[54]&&e[11]==="des"?"-scale-y-[1]":"")),D(h,"text-gray-200",e[12]!==e[54]),y(l,"class","min-h-[2.3rem] flex outline-none"),y(t,"class","p-0 relative focus-within:ring-1 ring-orange-500 ring-inset outline-none"),y(t,"aria-sort",c=e[15](e[55],e[12],e[11])),D(t,"bg-orange-50",e[13]===e[56]),D(t,"dark:bg-transparent",e[13]===e[56]),D(t,"rounded-tl-lg",e[54]===0),D(t,"rounded-tr-lg",e[54]===e[8].length-1),this.first=t},m(S,B){C(S,t,B),T(t,l),G(a,l,null),T(l,_),T(l,h),T(h,o),T(o,s),T(t,w),R(),f=!0,v||(O=F(h,"click",m),v=!0)},p(S,B){e=S;const I={};B[0]&256&&(I.value=e[55]),B[0]&8448&&(I.edit=e[13]===e[56]),!i&&B[0]&1280&&(i=!0,I.el=e[10][e[56]].input,$(()=>i=!1)),a.$set(I),(!f||B[0]&6400&&g!==(g="flex flex-none items-center justify-center p-2 cursor-pointer leading-snug transform transition-all "+(e[12]!==e[54]?"text-gray-200 hover:text-gray-500":"text-orange-500")+" "+(e[12]===e[54]&&e[11]==="des"?"-scale-y-[1]":"")))&&y(h,"class",g),B[0]&6400&&D(h,"text-gray-200",e[12]!==e[54]),(!f||B[0]&6400&&c!==(c=e[15](e[55],e[12],e[11])))&&y(t,"aria-sort",c),b!==e[56]&&(z(),b=e[56],R()),B[0]&8448&&D(t,"bg-orange-50",e[13]===e[56]),B[0]&8448&&D(t,"dark:bg-transparent",e[13]===e[56]),B[0]&256&&D(t,"rounded-tl-lg",e[54]===0),B[0]&256&&D(t,"rounded-tr-lg",e[54]===e[8].length-1)},i(S){f||(V(a.$$.fragment,S),f=!0)},o(S){Y(a.$$.fragment,S),f=!1},d(S){S&&H(t),Q(a),z(),v=!1,O()}}}function He(n,e){let t,l,a,i,_,h=e[56],o,s,g;function w(m){e[34](m,e[55],e[57],e[58])}function c(m){e[35](m,e[56])}let b={edit:e[6]===e[56],datatype:Array.isArray(e[0])?e[0][e[58]]:e[0]};e[55]!==void 0&&(b.value=e[55]),e[10][e[56]].input!==void 0&&(b.el=e[10][e[56]].input),a=new ze({props:b}),P.push(()=>x(a,"value",w)),P.push(()=>x(a,"el",c));const f=()=>e[36](t,h),v=()=>e[36](null,h);function O(){return e[37](e[56])}function u(){return e[38](e[56])}function p(){return e[39](e[56])}function M(...m){return e[40](e[54],e[58],e[56],...m)}return{key:n,first:null,c(){t=E("td"),l=E("div"),Z(a.$$.fragment),y(l,"class","min-h-[2.3rem] h-full outline-none flex items-center"),D(l,"border-transparent",e[7]!==e[56]),y(t,"tabindex","0"),y(t,"class","outline-none focus-within:ring-1 ring-orange-500 ring-inset focus-within:bg-orange-50 dark:focus-within:bg-gray-800 group-last:first:rounded-bl-lg group-last:last:rounded-br-lg relative"),this.first=t},m(m,R){C(m,t,R),T(t,l),G(a,l,null),f(),o=!0,s||(g=[F(t,"touchstart",O,{passive:!0}),F(t,"click",u),F(t,"dblclick",p),F(t,"keydown",M)],s=!0)},p(m,R){e=m;const z={};R[0]&576&&(z.edit=e[6]===e[56]),R[0]&513&&(z.datatype=Array.isArray(e[0])?e[0][e[58]]:e[0]),!i&&R[0]&512&&(i=!0,z.value=e[55],$(()=>i=!1)),!_&&R[0]&1536&&(_=!0,z.el=e[10][e[56]].input,$(()=>_=!1)),a.$set(z),R[0]&640&&D(l,"border-transparent",e[7]!==e[56]),h!==e[56]&&(v(),h=e[56],f())},i(m){o||(V(a.$$.fragment,m),o=!0)},o(m){Y(a.$$.fragment,m),o=!1},d(m){m&&H(t),Q(a),v(),s=!1,ge(g)}}}function Oe(n,e){let t,l=[],a=new Map,i,_,h=e[52];const o=s=>s[56];for(let s=0;su[56];for(let u=0;uu[52];for(let u=0;u
API Page guide. To hide the API documentation button and this page, set + show_api=False + in the + Blocks.launch() method.`,_(o,"class","italic text-orange-500"),Zr(d.src,l=yl)||_(d,"src",l),_(d,"alt",""),_(d,"class","w-3 dark:invert"),_(s,"class","absolute right-6 top-5 md:top-6"),_(e,"class","text-lg mb-4 font-semibold"),_(t,"class","p-6")},m(h,S){v(h,t,S),b(t,e),b(e,n),b(e,o),b(o,a),b(e,i),b(e,s),b(s,d),b(t,c),b(t,p),f||(u=K(s,"click",r[18]),f=!0)},p(h,S){S[0]&1&&Y(a,h[0])},i:J,o:J,d(h){h&&y(t),f=!1,u()}}}function yc(r){let t,e,n,o,a,i,s,d,l,c,p,f,u,h,S,x,O,T=r[10]>1&&vc(r),g=r[2],m=[];for(let w=0;wV(m[w],1,1,()=>{m[w]=null});return{c(){t=A("div"),e=A("h2"),n=A("img"),a=P(`\r + API documentation for\xA0\r + `),i=A("div"),s=P(r[0]),d=R(),l=A("button"),c=A("img"),f=R(),T&&T.c(),u=R(),h=A("div");for(let w=0;w1&&T.p(w,E),E[0]&6655){g=w[2];let k;for(k=0;k
+ Input Payload`,g=R(),m=A("div"),C=P("{"),w=A("br"),E=P(`\r + \xA0\xA0"data": [`),k=A("br"),Z=R();for(let j=0;j
+ Response Object`,yr=R(),Ar=A("div"),N=A("div"),Ot=P("{"),Lt=A("br"),Nt=P(`\r + \xA0\xA0"data": [`),Rt=A("br"),zt=R();for(let j=0;j + Code snippets`,le=R(),lr=A("div");for(let j=0;j<2;j+=1)Nr[j].c();Mt=R(),er=A("code"),mr&&mr.c(),Ur=R(),_(n,"class","bg-orange-100 px-1 rounded text-sm border border-orange-200 mr-2 font-semibold text-orange-600 dark:bg-orange-400 dark:text-orange-900 dark:border-orange-600"),_(e,"class","text-lg font-bold mb-1.5"),_(c,"class","underline"),_(x,"class","gr-button ml-2 !py-0"),_(d,"class","text-sm md:text-base mb-6 text-gray-500"),_(T,"class","font-bold mt-6 mb-3 flex items-center"),_(m,"class","block bg-white border dark:bg-gray-800 p-4 font-mono text-sm rounded-lg"),_(U,"class","gr-button gr-button-lg gr-button-primary w-full mt-4"),_(zr,"class","font-bold mt-6 mb-3 flex items-center"),_(Q,"class","text-gray-400"),_(N,"class",vr=r[5]?"hidden":""),_(Ar,"class","bg-white border dark:bg-gray-800 p-4 font-mono text-sm rounded-lg flex flex-col"),_(Hr,"class","font-bold mt-8 mb-3 flex items-center"),_(lr,"class","flex space-x-2 items-center mb-3"),_(er,"class","bg-white border dark:bg-gray-800 p-4 font-mono text-sm rounded-lg flex flex-col overflow-x-auto"),_(t,"class","bg-gradient-to-b dark:from-orange-200/5 from-orange-200/20 via-transparent to-transparent p-6 rounded")},m(j,ir){v(j,t,ir),b(t,e),b(e,n),b(e,o),b(e,i),b(t,s),b(t,d),b(d,l),b(d,c),b(c,p),b(c,f),b(c,h),b(d,S),b(d,x),Lr.m(x,null),b(t,O),b(t,T),b(t,g),b(t,m),b(m,C),b(m,w),b(m,E),b(m,k),b(m,Z);for(let z=0;z{ar=null}),Ir()),ir[0]&8){se=[["python",hn],["javascript",_n]];let z;for(z=0;z<2;z+=1){const Vr=kn(r,se,z);Nr[z]?Nr[z].p(Vr,ir):(Nr[z]=Ln(Vr),Nr[z].c(),Nr[z].m(lr,null))}for(;z<2;z+=1)Nr[z].d(1)}nt===(nt=Je(r))&&mr?mr.p(r,ir):(mr&&mr.d(1),mr=nt&&nt(r),mr&&(mr.c(),mr.m(er,null)))},i(j){sr||(M(ar),sr=!0)},o(j){V(ar),sr=!1},d(j){j&&y(t),Lr.d(),qr(ur,j),qr(fr,j),ar&&ar.d(),qr(Nr,j),mr&&mr.d(),xr=!1,_r(dr)}}}function xc(r){let t;return{c(){t=P("copy")},m(e,n){v(e,t,n)},d(e){e&&y(t)}}}function kc(r){let t;return{c(){t=P("copied!")},m(e,n){v(e,t,n)},d(e){e&&y(t)}}}function Tn(r){let t;return{c(){t=A("span"),t.textContent="ERROR",_(t,"class","text-red-600")},m(e,n){v(e,t,n)},d(e){e&&y(t)}}}function Cn(r){let t,e,n,o,a,i,s=r[1][r[30]].documentation?.type+"",d,l,c,p,f,u=r[1][r[30]].documentation?.description+"",h,S,x=Mn(r[1][r[30]].props.label)+"",O,T,g,m=r[1][r[30]].props.name+"",C,w,E,k,Z,L;function nr(){r[15].call(e,r[21],r[24])}let X=r[8][r[21]][r[24]]&&Tn();return{c(){t=P("\xA0\xA0\xA0\xA0"),e=A("input"),n=R(),X&&X.c(),o=R(),a=A("span"),i=P(": "),d=P(s),l=P(","),c=R(),p=A("span"),f=P("// represents "),h=P(u),S=P(` of\r + `),O=P(x),T=R(),g=A("span"),C=P(m),w=P(" component"),E=R(),k=A("br"),_(e,"class","bg-gray-100 dark:bg-gray-600 border-none w-40 px-1 py-0.5 my-0.5 text-sm rounded ring-1 ring-gray-300 dark:ring-gray-500"),_(e,"type","text"),_(a,"class","text-gray-500"),_(g,"class","capitalize"),_(p,"class","text-gray-400")},m(F,U){v(F,t,U),v(F,e,U),Sr(e,r[6][r[21]][r[24]]),v(F,n,U),X&&X.m(F,U),v(F,o,U),v(F,a,U),b(a,i),b(a,d),b(a,l),v(F,c,U),v(F,p,U),b(p,f),b(p,h),b(p,S),b(p,O),b(p,T),b(p,g),b(g,C),b(p,w),v(F,E,U),v(F,k,U),Z||(L=K(e,"input",nr),Z=!0)},p(F,U){r=F,U[0]&64&&e.value!==r[6][r[21]][r[24]]&&Sr(e,r[6][r[21]][r[24]]),r[8][r[21]][r[24]]?X||(X=Tn(),X.c(),X.m(o.parentNode,o)):X&&(X.d(1),X=null),U[0]&6&&s!==(s=r[1][r[30]].documentation?.type+"")&&Y(d,s),U[0]&6&&u!==(u=r[1][r[30]].documentation?.description+"")&&Y(h,u),U[0]&6&&x!==(x=Mn(r[1][r[30]].props.label)+"")&&Y(O,x),U[0]&6&&m!==(m=r[1][r[30]].props.name+"")&&Y(C,m)},d(F){F&&y(t),F&&y(e),F&&y(n),X&&X.d(F),F&&y(o),F&&y(a),F&&y(c),F&&y(p),F&&y(E),F&&y(k),Z=!1,L()}}}function In(r){let t,e,n,o;function a(){r[16].call(t,r[21],r[24])}return{c(){t=A("input"),e=P(" :"),t.disabled=!0,_(t,"class","bg-gray-100 dark:bg-gray-600 border-none w-40 px-1 py-0.5 my-0.5 text-sm rounded ring-1 ring-gray-300 dark:ring-gray-500"),_(t,"type","text")},m(i,s){v(i,t,s),Sr(t,r[7][r[21]][r[24]]),v(i,e,s),n||(o=K(t,"input",a),n=!0)},p(i,s){r=i,s[0]&128&&t.value!==r[7][r[21]][r[24]]&&Sr(t,r[7][r[21]][r[24]])},d(i){i&&y(t),i&&y(e),n=!1,o()}}}function Pn(r){let t,e,n,o=r[1][r[30]].documentation?.type+"",a,i,s,d,l,c=r[1][r[30]].documentation?.description+"",p,f,u=jn(r[1][r[30]].props.label)+"",h,S,x,O=r[1][r[30]].props.name+"",T,g,m,C,w=r[7][r[21]][r[24]]!==void 0&&In(r);return{c(){t=P("\xA0\xA0\xA0\xA0"),w&&w.c(),e=R(),n=A("span"),a=P(o),i=P(","),s=R(),d=A("span"),l=P("// represents "),p=P(c),f=P(` of\r + `),h=P(u),S=R(),x=A("span"),T=P(O),g=P(" component"),m=R(),C=A("br"),_(n,"class","text-gray-500"),_(x,"class","capitalize"),_(d,"class","text-gray-400")},m(E,k){v(E,t,k),w&&w.m(E,k),v(E,e,k),v(E,n,k),b(n,a),b(n,i),v(E,s,k),v(E,d,k),b(d,l),b(d,p),b(d,f),b(d,h),b(d,S),b(d,x),b(x,T),b(d,g),v(E,m,k),v(E,C,k)},p(E,k){E[7][E[21]][E[24]]!==void 0?w?w.p(E,k):(w=In(E),w.c(),w.m(e.parentNode,e)):w&&(w.d(1),w=null),k[0]&6&&o!==(o=E[1][E[30]].documentation?.type+"")&&Y(a,o),k[0]&6&&c!==(c=E[1][E[30]].documentation?.description+"")&&Y(p,c),k[0]&6&&u!==(u=jn(E[1][E[30]].props.label)+"")&&Y(h,u),k[0]&6&&O!==(O=E[1][E[30]].props.name+"")&&Y(T,O)},d(E){E&&y(t),w&&w.d(E),E&&y(e),E&&y(n),E&&y(s),E&&y(d),E&&y(m),E&&y(C)}}}function On(r){let t,e,n;return e=new hl({props:{margin:!1}}),{c(){t=A("div"),hr(e.$$.fragment),_(t,"class","self-center justify-self-center")},m(o,a){v(o,t,a),pr(e,t,null),n=!0},i(o){n||(M(e.$$.fragment,o),n=!0)},o(o){V(e.$$.fragment,o),n=!1},d(o){o&&y(t),gr(e)}}}function Ln(r){let t,e,n,o,a=r[26]+"",i,s,d,l,c;function p(){return r[17](r[26])}return{c(){t=A("li"),e=A("img"),o=R(),i=P(a),s=R(),Zr(e.src,n=r[27])||_(e,"src",n),_(e,"class","mr-1.5 w-3"),_(e,"alt",""),_(t,"class",d="flex items-center border rounded-lg px-1.5 py-1 leading-none select-none text-smd capitalize "+(r[3]===r[26]?"border-gray-400 text-gray-800 dark:bg-gray-700":"text-gray-400 cursor-pointer hover:text-gray-700 dark:hover:text-gray-200 hover:shadow-sm"))},m(f,u){v(f,t,u),b(t,e),b(t,o),b(t,i),b(t,s),l||(c=K(t,"click",p),l=!0)},p(f,u){r=f,u[0]&8&&d!==(d="flex items-center border rounded-lg px-1.5 py-1 leading-none select-none text-smd capitalize "+(r[3]===r[26]?"border-gray-400 text-gray-800 dark:bg-gray-700":"text-gray-400 cursor-pointer hover:text-gray-700 dark:hover:text-gray-200 hover:shadow-sm"))&&_(t,"class",d)},d(f){f&&y(t),l=!1,c()}}}function Ec(r){let t;return{c(){t=A("pre"),t.textContent="Hello World",_(t,"class","break-words whitespace-pre-wrap")},m(e,n){v(e,t,n)},p:J,d(e){e&&y(t)}}}function Sc(r){let t,e,n=r[0]+"run/"+r[19].api_name,o,a,i,s=r[6][r[21]],d=[];for(let l=0;l r.json())\r +.then(\r + r => {\r + let data = r.data;\r + }\r +)`)},m(l,c){v(l,t,c),b(t,e),b(t,o),b(t,a);for(let p=0;p{n=null}),Ir())},i(o){e||(M(n),e=!0)},o(o){V(n),e=!1},d(o){n&&n.d(o),o&&y(t)}}}function Tc(r){let t,e,n,o;const a=[yc,_c],i=[];function s(d,l){return d[10]?0:1}return t=s(r),e=i[t]=a[t](r),{c(){e.c(),n=or()},m(d,l){i[t].m(d,l),v(d,n,l),o=!0},p(d,l){e.p(d,l)},i(d){o||(M(e),o=!0)},o(d){V(e),o=!1},d(d){i[t].d(d),d&&y(n)}}}const Mn=r=>r?"'"+r+"'":"the",jn=r=>r?"'"+r+"'":"the";function Cc(r,t,e){const n=Ge();Ue(()=>(document.body.style.overflow="hidden",()=>{document.body.style.overflow="auto"}));let{instance_map:o}=t,{dependencies:a}=t,{root:i}=t;i===""&&(i=location.protocol+"//"+location.host+location.pathname),i.endsWith("/")||(i+="/");let s="python",d=-1,l=!1,c=a.map(w=>w.inputs.map(E=>{let k=o[E].documentation?.example_data;return k===void 0?k="":typeof k=="object"&&(k=JSON.stringify(k)),k})),p=a.map(w=>new Array(w.outputs.length)),f=a.map(w=>new Array(w.inputs.length).fill(!1)),u=a.filter(w=>w.api_name).length;const h=async w=>{e(5,l=!0);let E=a[w],k=0;try{var Z=c[w].map((X,F)=>{k=F;let U=o[E.inputs[F]];return X=S(X,U.documentation?.type),e(8,f[w][k]=!1,f),X})}catch{e(8,f[w][k]=!0,f),e(5,l=!1);return}let[L,nr]=await wl(`${i}run/${E.api_name}`,{data:Z});e(5,l=!1),nr==200?e(7,p[w]=L.data.map((X,F)=>{let U=o[E.outputs[F]];return console.log(U.documentation?.type,X,S(X,U.documentation?.type,"js")),S(X,U.documentation?.type,"js")}),p):e(8,f[w]=new Array(f[w].length).fill(!0),f)},S=(w,E,k=null)=>E===void 0?k==="py"?"None":null:E==="string"?k===null?w:'"'+w+'"':E==="number"?k===null?parseFloat(w):w:E==="boolean"?k==="py"?w==="true"?"True":"False":k==="js"?w:w==="true":k===null?w===""?null:JSON.parse(w):typeof w=="string"?w===""?k==="py"?"None":"null":w:JSON.stringify(w),x=()=>n("close"),O=(w,E)=>{navigator.clipboard.writeText(i+"run/"+w.api_name),e(4,d=E),setTimeout(()=>{e(4,d=-1)},500)};function T(w,E){c[w][E]=this.value,e(6,c)}function g(w,E){p[w][E]=this.value,e(7,p)}const m=w=>e(3,s=w),C=()=>n("close");return r.$$set=w=>{"instance_map"in w&&e(1,o=w.instance_map),"dependencies"in w&&e(2,a=w.dependencies),"root"in w&&e(0,i=w.root)},[i,o,a,s,d,l,c,p,f,n,u,h,S,x,O,T,g,m,C]}class Ic extends Or{constructor(t){super(),Pr(this,t,Cc,Tc,kr,{instance_map:1,dependencies:2,root:0},null,[-1,-1])}}var Pc="./assets/logo.edf88234.svg";function Fn(r){return document.title=r[2],{c:J,m:J,d:J}}function Dn(r){let t,e;return{c(){t=A("script"),t.async=!0,t.defer=!0,Zr(t.src,e="https://www.googletagmanager.com/gtag/js?id=UA-156449732-1")||_(t,"src",e)},m(n,o){v(n,t,o)},d(n){n&&y(t)}}}function Un(r){let t,e;return t=new ml({props:{has_modes:r[9].has_modes,component:r[9].component,id:r[9].id,props:r[9].props,children:r[9].children,dynamic_ids:r[15],instance_map:r[11],root:r[0],target:r[4],theme:r[8]}}),t.$on("mount",r[16]),t.$on("destroy",r[25]),{c(){hr(t.$$.fragment)},m(n,o){pr(t,n,o),e=!0},p(n,o){const a={};o[0]&512&&(a.has_modes=n[9].has_modes),o[0]&512&&(a.component=n[9].component),o[0]&512&&(a.id=n[9].id),o[0]&512&&(a.props=n[9].props),o[0]&512&&(a.children=n[9].children),o[0]&2048&&(a.instance_map=n[11]),o[0]&1&&(a.root=n[0]),o[0]&16&&(a.target=n[4]),o[0]&256&&(a.theme=n[8]),t.$set(a)},i(n){e||(M(t.$$.fragment,n),e=!0)},o(n){V(t.$$.fragment,n),e=!1},d(n){gr(t,n)}}}function Gn(r){let t,e,n,o,a,i,s,d;return{c(){t=A("button"),e=P("Use via API "),n=A("img"),a=R(),i=A("div"),i.textContent="\xB7",Zr(n.src,o=_l)||_(n,"src",o),_(n,"alt",""),_(n,"class","w-2.5 md:w-3 mx-1"),_(t,"class","flex items-center hover:text-gray-500")},m(l,c){v(l,t,c),b(t,e),b(t,n),v(l,a,c),v(l,i,c),s||(d=K(t,"click",r[26]),s=!0)},p:J,d(l){l&&y(t),l&&y(a),l&&y(i),s=!1,d()}}}function Vn(r){let t,e,n,o,a,i,s,d;return a=new Ic({props:{instance_map:r[11],dependencies:r[1],root:r[0]}}),a.$on("close",r[28]),{c(){t=A("div"),e=A("div"),n=R(),o=A("div"),hr(a.$$.fragment),_(e,"class","flex-1 backdrop-blur-sm"),_(o,"class","md:w-[950px] 2xl:w-[1150px] bg-white md:rounded-l-xl shadow-2xl overflow-hidden overflow-y-auto"),_(t,"class","h-screen w-screen fixed z-50 bg-black/50 flex top-0")},m(l,c){v(l,t,c),b(t,e),b(t,n),b(t,o),pr(a,o,null),i=!0,s||(d=K(e,"click",r[27]),s=!0)},p(l,c){const p={};c[0]&2048&&(p.instance_map=l[11]),c[0]&2&&(p.dependencies=l[1]),c[0]&1&&(p.root=l[0]),a.$set(p)},i(l){i||(M(a.$$.fragment,l),i=!0)},o(l){V(a.$$.fragment,l),i=!1},d(l){l&&y(t),gr(a),s=!1,d()}}}function Oc(r){let t,e,n,o,a,i,s,d,l,c,p,f,u,h,S,x=r[6]&&Fn(r),O=r[3]&&Dn(),T=r[12]&&Un(r),g=r[5]&&Gn(r),m=r[10]&&r[12]&&Vn(r);return{c(){x&&x.c(),t=or(),O&&O.c(),e=or(),n=R(),o=A("div"),a=A("div"),T&&T.c(),i=R(),s=A("footer"),g&&g.c(),d=R(),l=A("a"),c=P(`Built with Gradio\r + `),p=A("img"),u=R(),m&&m.c(),h=or(),_(a,"class","mx-auto container px-4 py-6 dark:bg-gray-950"),q(a,"flex-grow",r[7]),_(p,"class","w-2.5 md:w-3 mx-1"),Zr(p.src,f=Pc)||_(p,"src",f),_(p,"alt","logo"),_(l,"href","https://gradio.app"),_(l,"class","flex items-center hover:text-gray-500"),_(l,"target","_blank"),_(l,"rel","noreferrer"),_(s,"class","flex justify-center pb-6 text-gray-400 space-x-2 text-sm md:text-base"),_(o,"class","w-full flex flex-col"),q(o,"min-h-screen",r[7])},m(C,w){x&&x.m(document.head,null),b(document.head,t),O&&O.m(document.head,null),b(document.head,e),v(C,n,w),v(C,o,w),b(o,a),T&&T.m(a,null),b(o,i),b(o,s),g&&g.m(s,null),b(s,d),b(s,l),b(l,c),b(l,p),v(C,u,w),m&&m.m(C,w),v(C,h,w),S=!0},p(C,w){C[6]?x||(x=Fn(C),x.c(),x.m(t.parentNode,t)):x&&(x.d(1),x=null),C[3]?O||(O=Dn(),O.c(),O.m(e.parentNode,e)):O&&(O.d(1),O=null),C[12]?T?(T.p(C,w),w[0]&4096&&M(T,1)):(T=Un(C),T.c(),M(T,1),T.m(a,null)):T&&(Cr(),V(T,1,1,()=>{T=null}),Ir()),w[0]&128&&q(a,"flex-grow",C[7]),C[5]?g?g.p(C,w):(g=Gn(C),g.c(),g.m(s,d)):g&&(g.d(1),g=null),w[0]&128&&q(o,"min-h-screen",C[7]),C[10]&&C[12]?m?(m.p(C,w),w[0]&5120&&M(m,1)):(m=Vn(C),m.c(),M(m,1),m.m(h.parentNode,h)):m&&(Cr(),V(m,1,1,()=>{m=null}),Ir())},i(C){S||(M(T),M(m),S=!0)},o(C){V(T),V(m),S=!1},d(C){x&&x.d(C),y(t),O&&O.d(C),y(e),C&&y(n),C&&y(o),T&&T.d(),g&&g.d(),C&&y(u),m&&m.d(C),C&&y(h)}}}function Xn(r,t,e){let n=0;for(;;){const o=e[n];if(o===void 0)break;let a=0;for(;;){const i=o[t][a];if(i===void 0)break;if(i===r)return!0;a++}n++}return!1}function Lc(r){return Array.isArray(r)&&r.length===0||r===""||r===0||!r}function Nc(r,t,e){let n;pc();let{root:o}=t,{fn:a}=t,{components:i}=t,{layout:s}=t,{dependencies:d}=t,{enable_queue:l}=t,{title:c="Gradio"}=t,{analytics_enabled:p=!1}=t,{target:f}=t,{id:u=0}=t,{autoscroll:h=!1}=t,{show_api:S=!0}=t,{control_page_title:x=!1}=t,{app_mode:O}=t,{theme:T}=t,g=_d();Wt(r,g,I=>e(24,n=I));let m={id:s.id,type:"column",props:{},has_modes:!1,instance:{},component:{}};i.push(m);const C=Object.getPrototypeOf(async function(){}).constructor;d.forEach(I=>{if(I.js)try{I.frontend_fn=new C("__fn_args",`let result = await (${I.js})(...__fn_args); + return ${I.outputs.length} === 1 ? [result] : result;`)}catch(D){console.error("Could not parse custom js method."),console.error(D)}});let E=new URLSearchParams(window.location.search).get("view")==="api";const k=I=>{e(10,E=I);let D=new URLSearchParams(window.location.search);I?D.set("view","api"):D.delete("view"),history.replaceState(null,"","?"+D.toString())},Z=i.reduce((I,{id:D,props:$})=>{const Q=Xn(D,"inputs",d),Tr=Xn(D,"outputs",d);return!Q&&!Tr&&Lc($?.value)&&I.add(D),Q&&I.add(D),I},new Set);let L=i.reduce((I,D)=>(I[D.id]=D,I),{});function nr(I){return new Promise(async(D,$)=>{try{const Q=await hd[I]();D({name:I,component:Q})}catch(Q){console.error("failed to load: "+I),console.error(Q),$(Q)}})}const X=new Set,F=new Map;async function U(I){let D=L[I.id];const $=(await F.get(D.type)).component;D.component=$.Component,$.document&&(D.documentation=$.document(D.props)),$.modes&&$.modes.length>1&&(D.has_modes=!0),I.children&&(D.children=I.children.map(Q=>L[Q.id]),await Promise.all(I.children.map(Q=>U(Q))))}i.forEach(async I=>{const D=nr(I.type);X.add(D),F.set(I.type,D)});let Dr=!1;Promise.all(Array.from(X)).then(()=>{U(s).then(async()=>{e(12,Dr=!0),await Et(),window.__gradio_loader__[u].$set({status:"complete"})}).catch(I=>{console.error(I),window.__gradio_loader__[u].$set({status:"error"})})});function zr(I,D,$){I?.props||(I.props={}),I.props[D]=$,e(9,m)}let yr=[];async function Ar(){await Et();for(var I=f.getElementsByTagName("a"),D=0;D{const Mt=$.map(er=>[er,L[er]]);if($.length===0&&!yr[lr]?.includes(-1)&&Q==="load"&&Mr.every(er=>L?.[er].instance)&&Tr.every(er=>L?.[er].instance)){let Ur=function(sr){sr.data.forEach((xr,dr)=>{if(typeof xr=="object"&&xr!==null&&xr.__type__==="update"){for(const[Gr,jr]of Object.entries(xr))Gr!=="__type__"&&e(11,L[Mr[dr]].props[Gr]=jr,L);e(9,m)}else e(11,L[Mr[dr]].props.value=xr,L)})};const er=a({action:"predict",backend_fn:ft,frontend_fn:mt,payload:{fn_index:lr,data:Tr.map(sr=>L[sr].props.value)},queue:vr===null?l:vr,queue_callback:Ur,loading_status:g,cancels:Hr});(vr===null?l:vr)||er.then(Ur),yr[lr]=[-1]}Mt.filter(er=>!!er&&!!er[1]).forEach(([er,{instance:Ur}])=>{if(yr[lr]?.includes(er)||!Ur)return;Ur?.$on(Q,()=>{if(g.get_status_for_fn(lr)==="pending")return;const xr=a({action:"predict",backend_fn:ft,frontend_fn:mt,payload:{fn_index:lr,data:Tr.map(dr=>L[dr].props.value)},output_data:Mr.map(dr=>L[dr].props.value),queue:vr===null?l:vr,queue_callback:sr,loading_status:g,cancels:Hr});(vr===null?l:vr)||xr.then(sr)});function sr(xr){xr.data.forEach((dr,Gr)=>{if(typeof dr=="object"&&dr!==null&&dr.__type__==="update"){for(const[jr,Lr]of Object.entries(dr))jr!=="__type__"&&e(11,L[Mr[Gr]].props[jr]=Lr,L);e(9,m)}else e(11,L[Mr[Gr]].props.value=dr,L)})}yr[lr]||(yr[lr]=[]),yr[lr].push(er)})})}function N(I){yr=yr.map(D=>D.filter($=>$!==I))}d.forEach((I,D)=>{g.register(D,I.inputs,I.outputs)});function Ot(I){for(const $ in I){let Q=I[$],Tr=d[Q.fn_index];Q.scroll_to_output=Tr.scroll_to_output,Q.visible=Tr.show_progress,zr(L[$],"loading_status",Q)}const D=g.get_inputs_to_update();for(const[$,Q]of D)zr(L[$],"pending",Q==="pending")}const Lt=({detail:I})=>N(I),Nt=()=>{k(!E)},Rt=()=>{k(!1)},zt=()=>{k(!1)};return r.$$set=I=>{"root"in I&&e(0,o=I.root),"fn"in I&&e(18,a=I.fn),"components"in I&&e(19,i=I.components),"layout"in I&&e(20,s=I.layout),"dependencies"in I&&e(1,d=I.dependencies),"enable_queue"in I&&e(21,l=I.enable_queue),"title"in I&&e(2,c=I.title),"analytics_enabled"in I&&e(3,p=I.analytics_enabled),"target"in I&&e(4,f=I.target),"id"in I&&e(22,u=I.id),"autoscroll"in I&&e(23,h=I.autoscroll),"show_api"in I&&e(5,S=I.show_api),"control_page_title"in I&&e(6,x=I.control_page_title),"app_mode"in I&&e(7,O=I.app_mode),"theme"in I&&e(8,T=I.theme)},r.$$.update=()=>{r.$$.dirty[0]&8388608&&qo.update(I=>({...I,autoscroll:h})),r.$$.dirty[0]&16777216&&Ot(n)},[o,d,c,p,f,S,x,O,T,m,E,L,Dr,g,k,Z,Ar,N,a,i,s,l,u,h,n,Lt,Nt,Rt,zt]}class Rc extends Or{constructor(t){super(),Pr(this,t,Nc,Oc,kr,{root:0,fn:18,components:19,layout:20,dependencies:1,enable_queue:21,title:2,analytics_enabled:3,target:4,id:22,autoscroll:23,show_api:5,control_page_title:6,app_mode:7,theme:8},null,[-1,-1])}}function zc(r){let t,e;const n=r[1].default,o=ze(n,r,r[0],null);return{c(){t=A("div"),o&&o.c(),_(t,"class","gr-form overflow-hidden flex border-solid border bg-gray-200 dark:bg-gray-700 gap-px rounded-lg flex-wrap"),Fr(t,"flex-direction","inherit")},m(a,i){v(a,t,i),o&&o.m(t,null),e=!0},p(a,[i]){o&&o.p&&(!e||i&1)&&je(o,n,a,a[0],e?Me(n,a[0],i,null):Fe(a[0]),null)},i(a){e||(M(o,a),e=!0)},o(a){V(o,a),e=!1},d(a){a&&y(t),o&&o.d(a)}}}function Mc(r,t,e){let{$$slots:n={},$$scope:o}=t;return r.$$set=a=>{"$$scope"in a&&e(0,o=a.$$scope)},[o,n]}class jc extends Or{constructor(t){super(),Pr(this,t,Mc,zc,kr,{})}}var ie={},Pt={},Ye={exports:{}},rr=String,vl=function(){return{isColorSupported:!1,reset:rr,bold:rr,dim:rr,italic:rr,underline:rr,inverse:rr,hidden:rr,strikethrough:rr,black:rr,red:rr,green:rr,yellow:rr,blue:rr,magenta:rr,cyan:rr,white:rr,gray:rr,bgBlack:rr,bgRed:rr,bgGreen:rr,bgYellow:rr,bgBlue:rr,bgMagenta:rr,bgCyan:rr,bgWhite:rr}};Ye.exports=vl();Ye.exports.createColors=vl;Object.defineProperty(Pt,"__esModule",{value:!0});Pt.dim=Dc;Pt.default=void 0;var Wr=Fc(Ye.exports);function Fc(r){return r&&r.__esModule?r:{default:r}}let qn=new Set;function be(r,t,e){typeof process<"u"&&{}.JEST_WORKER_ID||e&&qn.has(e)||(e&&qn.add(e),console.warn(""),t.forEach(n=>console.warn(r,"-",n)))}function Dc(r){return Wr.default.dim(r)}var Uc={info(r,t){be(Wr.default.bold(Wr.default.cyan("info")),...Array.isArray(r)?[r]:[t,r])},warn(r,t){be(Wr.default.bold(Wr.default.yellow("warn")),...Array.isArray(r)?[r]:[t,r])},risk(r,t){be(Wr.default.bold(Wr.default.magenta("risk")),...Array.isArray(r)?[r]:[t,r])}};Pt.default=Uc;Object.defineProperty(ie,"__esModule",{value:!0});ie.default=void 0;var Gc=Vc(Pt);function Vc(r){return r&&r.__esModule?r:{default:r}}function ht({version:r,from:t,to:e}){Gc.default.warn(`${t}-color-renamed`,[`As of Tailwind CSS ${r}, \`${t}\` has been renamed to \`${e}\`.`,"Update your configuration file to silence this warning."])}var Xc={inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827"},zinc:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b"},neutral:{50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717"},stone:{50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"},orange:{50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12"},amber:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f"},yellow:{50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12"},lime:{50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314"},green:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d"},emerald:{50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b"},teal:{50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a"},cyan:{50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63"},sky:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e"},blue:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a"},indigo:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81"},violet:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95"},purple:{50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87"},fuchsia:{50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75"},pink:{50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843"},rose:{50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337"},get lightBlue(){return ht({version:"v2.2",from:"lightBlue",to:"sky"}),this.sky},get warmGray(){return ht({version:"v3.0",from:"warmGray",to:"stone"}),this.stone},get trueGray(){return ht({version:"v3.0",from:"trueGray",to:"neutral"}),this.neutral},get coolGray(){return ht({version:"v3.0",from:"coolGray",to:"gray"}),this.gray},get blueGray(){return ht({version:"v3.0",from:"blueGray",to:"slate"}),this.slate}};ie.default=Xc;let we=ie;var Bn=(we.__esModule?we:{default:we}).default;const J0=["red","green","blue","yellow","purple","teal","orange","cyan","lime","pink"],qc=[{color:"red",primary:600,secondary:100},{color:"green",primary:600,secondary:100},{color:"blue",primary:600,secondary:100},{color:"yellow",primary:500,secondary:100},{color:"purple",primary:600,secondary:100},{color:"teal",primary:600,secondary:100},{color:"orange",primary:600,secondary:100},{color:"cyan",primary:600,secondary:100},{color:"lime",primary:500,secondary:100},{color:"pink",primary:600,secondary:100}],Q0=qc.reduce((r,{color:t,primary:e,secondary:n})=>({...r,[t]:{primary:Bn[t][e],secondary:Bn[t][n]}}),{}),Bc=(r,t)=>xl[t](r[t]);function Hn(r,t){const e=t.reduce((n,o)=>(r[o]===void 0||!xl[o]?n[o]=" ":n[o]=` ${Bc(r,o)} `,n),{});return e.classes=` ${Object.values(e).join(" ").replace(/\s+/g," ").trim()} `,e}const xl={container(r){return r?"":"!p-0 !m-0 !border-0 !shadow-none !overflow-visible !bg-transparent"},label_container(r){return r?"":"!border-0 !shadow-none !overflow-visible !bg-transparent"},grid(r){let t=["","sm:","md:","lg:","xl:","2xl:"],e=Array.isArray(r)?r:[r];return[0,0,0,0,0,0].map((n,o)=>`${t[o]}grid-cols-${e?.[o]||e?.[e?.length-1]}`).join(" ")},height(r){return r==="auto"?"auto":""},full_width(r){return r?"w-full grow":"grow-0"},equal_height(r){return r?"items-stretch":"unequal-height"},visible(r){return r?"":"!hidden"},item_container(r){return r?"":"!border-none"}},K0=(r,t="")=>{let e=[],n={};if(t==="")n=r;else for(const o in r)if(o.startsWith(t+"_")){const a=o.substring(o.indexOf("_")+1);n[a]=r[o]}if(n.hasOwnProperty("margin")){Array.isArray(n.margin)||(n.margin=n.margin?[!0,!0,!0,!0]:[!1,!1,!1,!1]);let o=["t","r","b","l"];n.margin.forEach((a,i)=>{a||e.push(`!m${o[i]}-0`)})}if(n.hasOwnProperty("border")){Array.isArray(n.border)||(n.border=n.border?[!0,!0,!0,!0]:[!1,!1,!1,!1]);let o=["t","r","b","l"];n.border.forEach((a,i)=>{a||e.push(`!border-${o[i]}-0`)})}switch(n.rounded){case!0:e.push("!rounded-lg");break;case!1:e.push("!rounded-none");break}switch(n.full_width){case!0:e.push("w-full");break;case!1:e.push("!grow-0");break}switch(n.text_color){case"red":e.push("!text-red-500","dark:text-red-100");break;case"yellow":e.push("!text-yellow-500","dark:text-yellow-100");break;case"green":e.push("!text-green-500","dark:text-green-100");break;case"blue":e.push("!text-blue-500","dark:text-blue-100");break;case"purple":e.push("!text-purple-500","dark:text-purple-100");break;case"black":e.push("!text-gray-700","dark:text-gray-50");break}switch(n.bg_color){case"red":e.push("!bg-red-100 !from-red-100 !to-red-200 !border-red-300","dark:!bg-red-700 dark:!from-red-700 dark:!to-red-800 dark:!border-red-900");break;case"yellow":e.push("!bg-yellow-100 !from-yellow-100 !to-yellow-200 !border-yellow-300","dark:!bg-yellow-700 dark:!from-yellow-700 dark:!to-yellow-800 dark:!border-yellow-900");break;case"green":e.push("!bg-green-100 !from-green-100 !to-green-200 !border-green-300","dark:!bg-green-700 dark:!from-green-700 dark:!to-green-800 dark:!border-green-900 !text-gray-800");break;case"blue":e.push("!bg-blue-100 !from-blue-100 !to-blue-200 !border-blue-300","dark:!bg-blue-700 dark:!from-blue-700 dark:!to-blue-800 dark:!border-blue-900");break;case"purple":e.push("!bg-purple-100 !from-purple-100 !to-purple-200 !border-purple-300","dark:!bg-purple-700 dark:!from-purple-700 dark:!to-purple-800 dark:!border-purple-900");break;case"black":e.push("!bg-gray-100 !from-gray-100 !to-gray-200 !border-gray-300","dark:!bg-gray-700 dark:!from-gray-700 dark:!to-gray-800 dark:!border-gray-900");case"pink":e.push("!bg-pink-100 !from-pink-100 !to-pink-200 !border-pink-300","dark:!bg-pink-700 dark:!from-pink-700 dark:!to-pink-800 dark:!border-pink-900 !text-gray-800");break}return" "+e.join(" ")};function he(r){let t,e,n,o;const a=r[15].default,i=ze(a,r,r[14],null);let s=[{"data-testid":r[4]},{id:r[0]},{class:e="gr-block gr-box relative w-full overflow-hidden "+r[8][r[1]]+" "+r[8][r[2]]+" "+r[7]},{style:n=r[6]||null}],d={};for(let l=0;l{"style"in g&&e(10,s=g.style),"elem_id"in g&&e(0,d=g.elem_id),"variant"in g&&e(1,l=g.variant),"color"in g&&e(2,c=g.color),"padding"in g&&e(3,p=g.padding),"type"in g&&e(11,f=g.type),"test_id"in g&&e(4,u=g.test_id),"disable"in g&&e(12,h=g.disable),"explicit_call"in g&&e(13,S=g.explicit_call),"visible"in g&&e(5,x=g.visible),"$$scope"in g&&e(14,i=g.$$scope)},r.$$.update=()=>{r.$$.dirty&13312&&e(7,{classes:n}=S?Hn(s,[]):h?Hn({container:!1},["container"]):{classes:""},n),r.$$.dirty&1024&&e(6,o=(typeof s.height=="number"?`height: ${s.height}px; `:"")+(typeof s.width=="number"?`width: ${s.width}px;`:""))},[d,l,c,p,u,x,o,n,O,T,s,f,h,S,i,a]}class Yc extends Or{constructor(t){super(),Pr(this,t,Wc,Hc,kr,{style:10,elem_id:0,variant:1,color:2,padding:3,type:11,test_id:4,disable:12,explicit_call:13,visible:5})}}function Zc(r){let t,e;const n=r[2].default,o=ze(n,r,r[1],null);return{c(){t=A("span"),o&&o.c(),_(t,"class","text-gray-500 text-[0.855rem] mb-2 block dark:text-gray-200 relative z-40"),q(t,"sr-only",!r[0]),q(t,"h-0",!r[0]),q(t,"!m-0",!r[0])},m(a,i){v(a,t,i),o&&o.m(t,null),e=!0},p(a,[i]){o&&o.p&&(!e||i&2)&&je(o,n,a,a[1],e?Me(n,a[1],i,null):Fe(a[1]),null),i&1&&q(t,"sr-only",!a[0]),i&1&&q(t,"h-0",!a[0]),i&1&&q(t,"!m-0",!a[0])},i(a){e||(M(o,a),e=!0)},o(a){V(o,a),e=!1},d(a){a&&y(t),o&&o.d(a)}}}function Jc(r,t,e){let{$$slots:n={},$$scope:o}=t,{show_label:a=!0}=t;return r.$$set=i=>{"show_label"in i&&e(0,a=i.show_label),"$$scope"in i&&e(1,o=i.$$scope)},[a,o,n]}class Qc extends Or{constructor(t){super(),Pr(this,t,Jc,Zc,kr,{show_label:0})}}function Kc(r){let t;return{c(){t=P(r[3])},m(e,n){v(e,t,n)},p(e,n){n&8&&Y(t,e[3])},d(e){e&&y(t)}}}function $c(r){let t,e,n,o;return{c(){t=A("textarea"),_(t,"data-testid","textbox"),_(t,"class","scroll-hide block gr-box gr-input w-full gr-text-input"),_(t,"placeholder",r[2]),_(t,"rows",r[1]),t.disabled=r[4]},m(a,i){v(a,t,i),Sr(t,r[0]),r[19](t),n||(o=[Ll(e=r[11].call(null,t,r[0])),K(t,"input",r[18]),K(t,"keypress",r[10]),K(t,"blur",r[9])],n=!0)},p(a,i){i&4&&_(t,"placeholder",a[2]),i&2&&_(t,"rows",a[1]),i&16&&(t.disabled=a[4]),e&&Qr(e.update)&&i&1&&e.update.call(null,a[0]),i&1&&Sr(t,a[0])},d(a){a&&y(t),r[19](null),n=!1,_r(o)}}}function r0(r){let t;function e(a,i){if(a[7]==="text")return n0;if(a[7]==="password")return e0;if(a[7]==="email")return t0}let n=e(r),o=n&&n(r);return{c(){o&&o.c(),t=or()},m(a,i){o&&o.m(a,i),v(a,t,i)},p(a,i){n===(n=e(a))&&o?o.p(a,i):(o&&o.d(1),o=n&&n(a),o&&(o.c(),o.m(t.parentNode,t)))},d(a){o&&o.d(a),a&&y(t)}}}function t0(r){let t,e,n;return{c(){t=A("input"),_(t,"data-testid","textbox"),_(t,"type","email"),_(t,"class","scroll-hide block gr-box gr-input w-full gr-text-input"),_(t,"placeholder",r[2]),t.disabled=r[4],_(t,"autocomplete","email")},m(o,a){v(o,t,a),Sr(t,r[0]),r[17](t),e||(n=[K(t,"input",r[16]),K(t,"keypress",r[10]),K(t,"blur",r[9])],e=!0)},p(o,a){a&4&&_(t,"placeholder",o[2]),a&16&&(t.disabled=o[4]),a&1&&t.value!==o[0]&&Sr(t,o[0])},d(o){o&&y(t),r[17](null),e=!1,_r(n)}}}function e0(r){let t,e,n;return{c(){t=A("input"),_(t,"data-testid","password"),_(t,"type","password"),_(t,"class","scroll-hide block gr-box gr-input w-full gr-text-input"),_(t,"placeholder",r[2]),t.disabled=r[4],_(t,"autocomplete","")},m(o,a){v(o,t,a),Sr(t,r[0]),r[15](t),e||(n=[K(t,"input",r[14]),K(t,"keypress",r[10]),K(t,"blur",r[9])],e=!0)},p(o,a){a&4&&_(t,"placeholder",o[2]),a&16&&(t.disabled=o[4]),a&1&&t.value!==o[0]&&Sr(t,o[0])},d(o){o&&y(t),r[15](null),e=!1,_r(n)}}}function n0(r){let t,e,n;return{c(){t=A("input"),_(t,"data-testid","textbox"),_(t,"type","text"),_(t,"class","scroll-hide block gr-box gr-input w-full gr-text-input"),_(t,"placeholder",r[2]),t.disabled=r[4]},m(o,a){v(o,t,a),Sr(t,r[0]),r[13](t),e||(n=[K(t,"input",r[12]),K(t,"keypress",r[10]),K(t,"blur",r[9])],e=!0)},p(o,a){a&4&&_(t,"placeholder",o[2]),a&16&&(t.disabled=o[4]),a&1&&t.value!==o[0]&&Sr(t,o[0])},d(o){o&&y(t),r[13](null),e=!1,_r(n)}}}function o0(r){let t,e,n,o;e=new Qc({props:{show_label:r[5],$$slots:{default:[Kc]},$$scope:{ctx:r}}});function a(d,l){return d[1]===1&&d[6]===1?r0:$c}let i=a(r),s=i(r);return{c(){t=A("label"),hr(e.$$.fragment),n=R(),s.c(),_(t,"class","block w-full")},m(d,l){v(d,t,l),pr(e,t,null),b(t,n),s.m(t,null),o=!0},p(d,[l]){const c={};l&32&&(c.show_label=d[5]),l&8388616&&(c.$$scope={dirty:l,ctx:d}),e.$set(c),i===(i=a(d))&&s?s.p(d,l):(s.d(1),s=i(d),s&&(s.c(),s.m(t,null)))},i(d){o||(M(e.$$.fragment,d),o=!0)},o(d){V(e.$$.fragment,d),o=!1},d(d){d&&y(t),gr(e),s.d()}}}function a0(r,t,e){let{value:n=""}=t,{lines:o=1}=t,{placeholder:a="Type here..."}=t,{label:i}=t,{disabled:s=!1}=t,{show_label:d=!0}=t,{max_lines:l}=t,{type:c="text"}=t,p;const f=Ge();function u(L){f("change",L)}function h(L){f("blur")}async function S(L){await Et(),(L.key==="Enter"&&L.shiftKey&&o>1||L.key==="Enter"&&!L.shiftKey&&o===1&&l>=1)&&(L.preventDefault(),f("submit"))}async function x(L){if(await Et(),o===l)return;let nr=l===!1?!1:l===void 0?21*11:21*(l+1),X=21*(o+1);const F=L.target;F.style.height="1px";let U;nr&&F.scrollHeight>nr?U=nr:F.scrollHeightL.removeEventListener("input",x)}}function T(){n=this.value,e(0,n)}function g(L){wr[L?"unshift":"push"](()=>{p=L,e(8,p)})}function m(){n=this.value,e(0,n)}function C(L){wr[L?"unshift":"push"](()=>{p=L,e(8,p)})}function w(){n=this.value,e(0,n)}function E(L){wr[L?"unshift":"push"](()=>{p=L,e(8,p)})}function k(){n=this.value,e(0,n)}function Z(L){wr[L?"unshift":"push"](()=>{p=L,e(8,p)})}return r.$$set=L=>{"value"in L&&e(0,n=L.value),"lines"in L&&e(1,o=L.lines),"placeholder"in L&&e(2,a=L.placeholder),"label"in L&&e(3,i=L.label),"disabled"in L&&e(4,s=L.disabled),"show_label"in L&&e(5,d=L.show_label),"max_lines"in L&&e(6,l=L.max_lines),"type"in L&&e(7,c=L.type)},r.$$.update=()=>{r.$$.dirty&323&&p&&o!==l&&x({target:p}),r.$$.dirty&1&&u(n)},[n,o,a,i,s,d,l,c,p,h,S,O,T,g,m,C,w,E,k,Z]}class i0 extends Or{constructor(t){super(),Pr(this,t,a0,o0,kr,{value:0,lines:1,placeholder:2,label:3,disabled:4,show_label:5,max_lines:6,type:7})}}const at=r=>{let t=["","k","M","G","T","P","E","Z"],e=0;for(;r>1e3&&e`opacity: ${a*o}`}}function Wn(r,t,e){const n=r.slice();return n[32]=t[e],n[34]=e,n}function Yn(r,t,e){const n=r.slice();return n[32]=t[e],n}function s0(r){let t,e,n,o=r[13]&&Zn(r);return{c(){t=A("span"),t.textContent="Error",e=R(),o&&o.c(),n=or(),_(t,"class","error svelte-y7zzi6")},m(a,i){v(a,t,i),v(a,e,i),o&&o.m(a,i),v(a,n,i)},p(a,i){a[13]?o?(o.p(a,i),i[0]&8192&&M(o,1)):(o=Zn(a),o.c(),M(o,1),o.m(n.parentNode,n)):o&&(o.d(1),o=null)},i(a){M(o)},o:J,d(a){a&&y(t),a&&y(e),o&&o.d(a),a&&y(n)}}}function d0(r){let t,e,n,o,a,i,s,d,l,c=r[8]==="default"&&r[15]&&Jn(r);function p(g,m){if(g[7])return g0;if(g[1]!==null&&g[2]!==void 0&&g[1]>=0)return p0;if(g[1]===0)return c0}let f=p(r),u=f&&f(r),h=r[4]&&$n(r);const S=[b0,m0],x=[];function O(g,m){return g[11]!=null?0:1}a=O(r),i=x[a]=S[a](r);let T=!r[4]&&io();return{c(){c&&c.c(),t=R(),e=A("div"),u&&u.c(),n=R(),h&&h.c(),o=R(),i.c(),s=R(),T&&T.c(),d=or(),_(e,"class","dark:text-gray-400 svelte-y7zzi6"),q(e,"meta-text-center",r[8]==="center"),q(e,"meta-text",r[8]==="default")},m(g,m){c&&c.m(g,m),v(g,t,m),v(g,e,m),u&&u.m(e,null),b(e,n),h&&h.m(e,null),v(g,o,m),x[a].m(g,m),v(g,s,m),T&&T.m(g,m),v(g,d,m),l=!0},p(g,m){g[8]==="default"&&g[15]?c?c.p(g,m):(c=Jn(g),c.c(),c.m(t.parentNode,t)):c&&(c.d(1),c=null),f===(f=p(g))&&u?u.p(g,m):(u&&u.d(1),u=f&&f(g),u&&(u.c(),u.m(e,n))),g[4]?h?h.p(g,m):(h=$n(g),h.c(),h.m(e,null)):h&&(h.d(1),h=null),m[0]&256&&q(e,"meta-text-center",g[8]==="center"),m[0]&256&&q(e,"meta-text",g[8]==="default");let C=a;a=O(g),a===C?x[a].p(g,m):(Cr(),V(x[C],1,1,()=>{x[C]=null}),Ir(),i=x[a],i?i.p(g,m):(i=x[a]=S[a](g),i.c()),M(i,1),i.m(s.parentNode,s)),g[4]?T&&(T.d(1),T=null):T||(T=io(),T.c(),T.m(d.parentNode,d))},i(g){l||(M(i),l=!0)},o(g){V(i),l=!1},d(g){c&&c.d(g),g&&y(t),g&&y(e),u&&u.d(),h&&h.d(),g&&y(o),x[a].d(g),g&&y(s),T&&T.d(g),g&&y(d)}}}function Zn(r){let t,e,n,o,a,i,s,d,l,c=(r[6]||"")+"",p,f,u,h;return{c(){t=A("div"),e=A("div"),n=R(),o=A("div"),a=A("div"),i=P(`Error\r + `),s=A("button"),s.textContent="\xD7",d=R(),l=A("div"),p=P(c),_(e,"class","absolute left-0 md:left-auto border-black right-0 top-0 h-96 md:w-1/2 bg-gradient-to-b md:bg-gradient-to-bl from-red-500/5 via-transparent to-transparent"),_(s,"class","ml-auto text-gray-900 text-2xl pr-1"),_(a,"class","flex items-center bg-gradient-to-r from-red-500/10 to-red-200/10 px-3 py-1 text-lg font-bold text-red-500"),_(l,"class","px-3 py-3 text-base font-mono"),_(o,"class","absolute bg-white top-7 left-4 right-4 md:right-8 md:left-auto rounded-xl border border-gray-100 dark:border-gray-800 overflow-hidden shadow-2xl shadow-red-500/10 md:w-96 pointer-events-auto"),_(t,"class","fixed inset-0 z-[100]")},m(S,x){v(S,t,x),b(t,e),b(t,n),b(t,o),b(o,a),b(a,i),b(a,s),b(o,d),b(o,l),b(l,p),u||(h=[K(s,"click",r[18]),K(o,"click",zl(r[25]))],u=!0)},p(S,x){x[0]&64&&c!==(c=(S[6]||"")+"")&&Y(p,c)},i(S){f||Jr(()=>{f=Bl(o,l0,{duration:100}),f.start()})},o:J,d(S){S&&y(t),u=!1,_r(h)}}}function Jn(r){let t,e=`scaleX(${r[14]||0})`;return{c(){t=A("div"),_(t,"class","eta-bar svelte-y7zzi6"),Fr(t,"transform",e,!1)},m(n,o){v(n,t,o)},p(n,o){o[0]&16384&&e!==(e=`scaleX(${n[14]||0})`)&&Fr(t,"transform",e,!1)},d(n){n&&y(t)}}}function c0(r){let t;return{c(){t=P("processing |")},m(e,n){v(e,t,n)},p:J,d(e){e&&y(t)}}}function p0(r){let t,e=r[1]+1+"",n,o,a,i;return{c(){t=P("queue: "),n=P(e),o=P("/"),a=P(r[2]),i=P(" |")},m(s,d){v(s,t,d),v(s,n,d),v(s,o,d),v(s,a,d),v(s,i,d)},p(s,d){d[0]&2&&e!==(e=s[1]+1+"")&&Y(n,e),d[0]&4&&Y(a,s[2])},d(s){s&&y(t),s&&y(n),s&&y(o),s&&y(a),s&&y(i)}}}function g0(r){let t,e=r[7],n=[];for(let o=0;o{i[c]=null}),Ir()),~e?(n=i[e],n?n.p(d,l):(n=i[e]=a[e](d),n.c()),M(n,1),n.m(t,null)):n=null),l[0]&256&&q(t,"inset-0",d[8]==="default"),l[0]&256&&q(t,"inset-x-0",d[8]==="center"),l[0]&256&&q(t,"top-0",d[8]==="center"),l[0]&8&&q(t,"opacity-0",!d[3]||d[3]==="complete"),l[0]&264&&q(t,"cover-bg",d[8]==="default"&&(d[3]==="pending"||d[3]==="error")),l[0]&8&&q(t,"generating",d[3]==="generating"),l[0]&32&&q(t,"!hidden",!d[5])},i(d){o||(M(n),o=!0)},o(d){V(n),o=!1},d(d){d&&y(t),~e&&i[e].d(),r[27](null)}}}let Gt=[],_e=!1;async function _0(r,t=!0){if(!(window.__gradio_mode__==="website"||window.__gradio_mode__!=="app"&&t!==!0)){if(Gt.push(r),!_e)_e=!0;else return;await Et(),requestAnimationFrame(()=>{let e=[0,0];for(let n=0;ne(24,o=N));let{eta:a=null}=t,{queue:i=!1}=t,{queue_position:s}=t,{queue_size:d}=t,{status:l}=t,{scroll_to_output:c=!1}=t,{timer:p=!0}=t,{visible:f=!0}=t,{message:u=null}=t,{progress:h=null}=t,{variant:S="default"}=t,x,O=!1,T=0,g=0,m=null,C=!1,w=0,E=null,k,Z=null,L=!0;const nr=()=>{e(21,T=performance.now()),e(22,g=0),O=!0,X()};function X(){requestAnimationFrame(()=>{e(22,g=(performance.now()-T)/1e3),O&&X()})}const F=()=>{e(22,g=0),O&&(O=!1)};Gl(()=>{O&&F()});let U=null;const Dr=()=>{e(13,C=!1)};function zr(N){lt.call(this,r,N)}function yr(N){wr[N?"unshift":"push"](()=>{Z=N,e(12,Z)})}function Ar(N){wr[N?"unshift":"push"](()=>{x=N,e(9,x)})}return r.$$set=N=>{"eta"in N&&e(0,a=N.eta),"queue"in N&&e(19,i=N.queue),"queue_position"in N&&e(1,s=N.queue_position),"queue_size"in N&&e(2,d=N.queue_size),"status"in N&&e(3,l=N.status),"scroll_to_output"in N&&e(20,c=N.scroll_to_output),"timer"in N&&e(4,p=N.timer),"visible"in N&&e(5,f=N.visible),"message"in N&&e(6,u=N.message),"progress"in N&&e(7,h=N.progress),"variant"in N&&e(8,S=N.variant)},r.$$.update=()=>{r.$$.dirty[0]&11010049&&(a===null?e(0,a=m):i&&e(0,a=(performance.now()-T)/1e3+a),a!=null&&(e(16,U=a.toFixed(1)),e(23,m=a))),r.$$.dirty[0]&4194305&&e(14,w=a===null||a<=0||!g?null:Math.min(g/a,1)),r.$$.dirty[0]&128&&h!=null&&e(15,L=!1),r.$$.dirty[0]&7296&&(h!=null?e(10,E=h.map(N=>N.index!=null&&N.length!=null?N.index/N.length:N.progress!=null?N.progress:void 0)):e(10,E=null),E?(e(11,k=E[E.length-1]),Z&&(k===0?Z.classList.remove("transition-transform"):Z.classList.add("transition-transform"))):e(11,k=void 0)),r.$$.dirty[0]&8&&(l==="pending"?nr():F()),r.$$.dirty[0]&17826312&&x&&c&&(l==="pending"||l==="complete")&&_0(x,o.autoscroll),r.$$.dirty[0]&72&&(Dr(),l==="error"&&u&&e(13,C=!0)),r.$$.dirty[0]&4194304&&e(17,n=g.toFixed(1))},[a,s,d,l,p,f,u,h,S,x,E,k,Z,C,w,L,U,n,Dr,i,c,T,g,m,o,zr,yr,Ar]}class Ze extends Or{constructor(t){super(),Pr(this,t,y0,h0,kr,{eta:0,queue:19,queue_position:1,queue_size:2,status:3,scroll_to_output:20,timer:4,visible:5,message:6,progress:7,variant:8},null,[-1,-1])}}function lo(r){let t,e;const n=[r[10]];let o={};for(let a=0;aSt(e,"value",i)),e.$on("change",r[13]),e.$on("submit",r[14]),e.$on("blur",r[15]),{c(){a&&a.c(),t=R(),hr(e.$$.fragment)},m(d,l){a&&a.m(d,l),v(d,t,l),pr(e,d,l),o=!0},p(d,l){d[10]?a?(a.p(d,l),l&1024&&M(a,1)):(a=lo(d),a.c(),M(a,1),a.m(t.parentNode,t)):a&&(Cr(),V(a,1,1,()=>{a=null}),Ir());const c={};l&2&&(c.label=d[1]),l&64&&(c.show_label=d[6]),l&16&&(c.lines=d[4]),l&256&&(c.type=d[8]),l&2192&&(c.max_lines=!d[7]&&d[11]==="static"?d[4]+1:d[7]),l&32&&(c.placeholder=d[5]),l&2048&&(c.disabled=d[11]==="static"),!n&&l&1&&(n=!0,c.value=d[0],Kt(()=>n=!1)),e.$set(c)},i(d){o||(M(a),M(e.$$.fragment,d),o=!0)},o(d){V(a),V(e.$$.fragment,d),o=!1},d(d){a&&a.d(d),d&&y(t),gr(e,d)}}}function x0(r){let t,e;return t=new Yc({props:{visible:r[3],elem_id:r[2],disable:typeof r[9].container=="boolean"&&!r[9].container,$$slots:{default:[v0]},$$scope:{ctx:r}}}),{c(){hr(t.$$.fragment)},m(n,o){pr(t,n,o),e=!0},p(n,[o]){const a={};o&8&&(a.visible=n[3]),o&4&&(a.elem_id=n[2]),o&512&&(a.disable=typeof n[9].container=="boolean"&&!n[9].container),o&69107&&(a.$$scope={dirty:o,ctx:n}),t.$set(a)},i(n){e||(M(t.$$.fragment,n),e=!0)},o(n){V(t.$$.fragment,n),e=!1},d(n){gr(t,n)}}}function k0(r,t,e){let{label:n="Textbox"}=t,{elem_id:o=""}=t,{visible:a=!0}=t,{value:i=""}=t,{lines:s}=t,{placeholder:d=""}=t,{show_label:l}=t,{max_lines:c}=t,{type:p="text"}=t,{style:f={}}=t,{loading_status:u=void 0}=t,{mode:h}=t;function S(g){i=g,e(0,i)}function x(g){lt.call(this,r,g)}function O(g){lt.call(this,r,g)}function T(g){lt.call(this,r,g)}return r.$$set=g=>{"label"in g&&e(1,n=g.label),"elem_id"in g&&e(2,o=g.elem_id),"visible"in g&&e(3,a=g.visible),"value"in g&&e(0,i=g.value),"lines"in g&&e(4,s=g.lines),"placeholder"in g&&e(5,d=g.placeholder),"show_label"in g&&e(6,l=g.show_label),"max_lines"in g&&e(7,c=g.max_lines),"type"in g&&e(8,p=g.type),"style"in g&&e(9,f=g.style),"loading_status"in g&&e(10,u=g.loading_status),"mode"in g&&e(11,h=g.mode)},[i,n,o,a,s,d,l,c,p,f,u,h,S,x,O,T]}class so extends Or{constructor(t){super(),Pr(this,t,k0,x0,kr,{label:1,elem_id:2,visible:3,value:0,lines:4,placeholder:5,show_label:6,max_lines:7,type:8,style:9,loading_status:10,mode:11})}get label(){return this.$$.ctx[1]}set label(t){this.$$set({label:t}),br()}get elem_id(){return this.$$.ctx[2]}set elem_id(t){this.$$set({elem_id:t}),br()}get visible(){return this.$$.ctx[3]}set visible(t){this.$$set({visible:t}),br()}get value(){return this.$$.ctx[0]}set value(t){this.$$set({value:t}),br()}get lines(){return this.$$.ctx[4]}set lines(t){this.$$set({lines:t}),br()}get placeholder(){return this.$$.ctx[5]}set placeholder(t){this.$$set({placeholder:t}),br()}get show_label(){return this.$$.ctx[6]}set show_label(t){this.$$set({show_label:t}),br()}get max_lines(){return this.$$.ctx[7]}set max_lines(t){this.$$set({max_lines:t}),br()}get type(){return this.$$.ctx[8]}set type(t){this.$$set({type:t}),br()}get style(){return this.$$.ctx[9]}set style(t){this.$$set({style:t}),br()}get loading_status(){return this.$$.ctx[10]}set loading_status(t){this.$$set({loading_status:t}),br()}get mode(){return this.$$.ctx[11]}set mode(t){this.$$set({mode:t}),br()}}function co(r){let t,e;return{c(){t=A("p"),e=P(r[0]),_(t,"class","my-4")},m(n,o){v(n,t,o),b(t,e)},p(n,o){o&1&&Y(e,n[0])},d(n){n&&y(t)}}}function po(r){let t;return{c(){t=A("p"),t.textContent="Incorrect Credentials",_(t,"class","my-4 text-red-600 font-semibold")},m(e,n){v(e,t,n)},d(e){e&&y(t)}}}function E0(r){let t,e,n,o,a,i;function s(p){r[8](p)}let d={label:"username",lines:1,show_label:!0,max_lines:1,mode:"dynamic"};r[2]!==void 0&&(d.value=r[2]),t=new so({props:d}),wr.push(()=>St(t,"value",s)),t.$on("submit",r[5]);function l(p){r[9](p)}let c={label:"password",lines:1,show_label:!0,max_lines:1,mode:"dynamic",type:"password"};return r[3]!==void 0&&(c.value=r[3]),o=new so({props:c}),wr.push(()=>St(o,"value",l)),o.$on("submit",r[5]),{c(){hr(t.$$.fragment),n=R(),hr(o.$$.fragment)},m(p,f){pr(t,p,f),v(p,n,f),pr(o,p,f),i=!0},p(p,f){const u={};!e&&f&4&&(e=!0,u.value=p[2],Kt(()=>e=!1)),t.$set(u);const h={};!a&&f&8&&(a=!0,h.value=p[3],Kt(()=>a=!1)),o.$set(h)},i(p){i||(M(t.$$.fragment,p),M(o.$$.fragment,p),i=!0)},o(p){V(t.$$.fragment,p),V(o.$$.fragment,p),i=!1},d(p){gr(t,p),p&&y(n),gr(o,p)}}}function S0(r){let t,e,n,o,a,i,s,d,l,c,p,f,u=r[0]&&co(r),h=r[4]&&po();return s=new jc({props:{$$slots:{default:[E0]},$$scope:{ctx:r}}}),{c(){t=A("div"),e=A("div"),n=A("h2"),n.textContent="Login",o=R(),u&&u.c(),a=R(),h&&h.c(),i=R(),hr(s.$$.fragment),d=R(),l=A("button"),l.textContent="Login",_(n,"class","text-2xl font-semibold mb-6"),_(l,"class","gr-button gr-button-lg gr-button-primary w-full mt-4"),_(e,"class","gr-panel !p-8"),_(t,"class","dark:bg-gray-950 w-full flex flex-col items-center justify-center"),q(t,"min-h-screen",r[1])},m(S,x){v(S,t,x),b(t,e),b(e,n),b(e,o),u&&u.m(e,null),b(e,a),h&&h.m(e,null),b(e,i),pr(s,e,null),b(e,d),b(e,l),c=!0,p||(f=K(l,"click",r[5]),p=!0)},p(S,[x]){S[0]?u?u.p(S,x):(u=co(S),u.c(),u.m(e,a)):u&&(u.d(1),u=null),S[4]?h||(h=po(),h.c(),h.m(e,i)):h&&(h.d(1),h=null);const O={};x&1036&&(O.$$scope={dirty:x,ctx:S}),s.$set(O),x&2&&q(t,"min-h-screen",S[1])},i(S){c||(M(s.$$.fragment,S),c=!0)},o(S){V(s.$$.fragment,S),c=!1},d(S){S&&y(t),u&&u.d(),h&&h.d(),gr(s),p=!1,f()}}}function A0(r,t,e){let{root:n}=t,{id:o}=t,{auth_message:a}=t,{app_mode:i}=t;window.__gradio_loader__[o].$set({status:"complete"});let s="",d="",l=!1;const c=async()=>{const u=new FormData;u.append("username",s),u.append("password",d),(await fetch(n+"login",{method:"POST",body:u})).status===400?(e(4,l=!0),e(2,s=""),e(3,d="")):location.reload()};function p(u){s=u,e(2,s)}function f(u){d=u,e(3,d)}return r.$$set=u=>{"root"in u&&e(6,n=u.root),"id"in u&&e(7,o=u.id),"auth_message"in u&&e(0,a=u.auth_message),"app_mode"in u&&e(1,i=u.app_mode)},[a,i,s,d,l,c,n,o,p,f]}class T0 extends Or{constructor(t){super(),Pr(this,t,A0,S0,kr,{root:6,id:7,auth_message:0,app_mode:1})}}let C0=-1;window.__gradio_loader__=[];const I0="./assets/index.cc0a8c0e.css",P0=["https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600&display=swap","https://fonts.googleapis.com/css?family=IBM Plex Mono"];let ye=null,Le=window.__gradio_mode__==="app";async function kl(r){const t=await(await fetch(r+"app_id")).text();ye===null?ye=t:ye!=t&&location.reload(),setTimeout(()=>kl(r),250)}async function O0(r){let t=await(await fetch(r+"config")).json();return t.root=r,t}async function L0(r){return location.origin==="http://localhost:3000"?await(await fetch("config")).json():r?(r.endsWith("/")||(r+="/"),await O0(r)):window.gradio_config}function N0(r,t){if(t){let e=document.createElement("style");e.innerHTML=t,r.appendChild(e)}}function El(r,t){const e=document.createElement("link");return e.rel="stylesheet",e.href=r,t.appendChild(e),new Promise((n,o)=>{e.addEventListener("load",()=>n()),e.addEventListener("error",()=>o(new Error(`Unable to preload CSS for ${r}`)))})}async function Sl(r,t){let e;try{let[n]=await Promise.all([L0(t),El(I0,r)]);e=n}catch(n){return console.error(n),null}return N0(r,e.css),window.__is_colab__=e.is_colab,e.root===void 0&&(e.root=""),e.dev_mode&&kl(e.root),e.target=r,e}function Al(r,t,e,n,o,a=!1){if(r.detail==="Not authenticated"||r.auth_required)new T0({target:e,props:{auth_message:r.auth_message,root:r.root,id:n,app_mode:Le}});else{let i=Math.random().toString(36).substring(2);r.fn=bc(i,r.root+"run/",r.is_space,a),new Rc({target:e,props:{...r,target:e,id:n,autoscroll:o,app_mode:Le}})}t&&t.append(e)}function R0(){P0.map(t=>El(t,document.head));class r extends HTMLElement{constructor(){super(),this._id=++C0,this.root=this.attachShadow({mode:"open"}),window.scoped_css_attach=e=>{this.root.append(e)},this.wrapper=document.createElement("div"),this.wrapper.classList.add("gradio-container"),this.wrapper.style.position="relative",this.wrapper.style.width="100%",this.wrapper.style.minHeight="100vh",this.theme="light",window.__gradio_loader__[this._id]=new Ze({target:this.wrapper,props:{status:"pending",timer:!1,queue_position:null,queue_size:null}}),this.root.append(this.wrapper),window.__gradio_mode__!=="website"&&(this.theme=Tl(this.wrapper))}async connectedCallback(){const e=new CustomEvent("domchange",{bubbles:!0,cancelable:!1,composed:!0});var n=new MutationObserver(f=>{this.dispatchEvent(e)});n.observe(this.root,{childList:!0});const o=this.getAttribute("host"),a=this.getAttribute("space"),i=o?`https://${o}`:a?(await(await fetch(`https://huggingface.co/api/spaces/${a}/host`)).json()).host:this.getAttribute("src"),s=this.getAttribute("control_page_title"),d=this.getAttribute("initial_height"),c=this.getAttribute("autoscroll")==="true";this.wrapper.style.minHeight=d||"300px";const p=await Sl(this.root,i);p===null?this.wrapper.remove():Al({...p,theme:this.theme,control_page_title:!!(s&&s==="true")},this.root,this.wrapper,this._id,c,!!a)}}customElements.define("gradio-app",r)}async function z0(){const r=document.querySelector("#root");r.classList.add("gradio-container"),window.__gradio_mode__!=="website"&&Tl(r),window.__gradio_loader__[0]=new Ze({target:r,props:{status:"pending",timer:!1,queue_position:null,queue_size:null}});const t=await Sl(r,null);Al({...t,control_page_title:!0},!1,r,0)}function Tl(r){let t=new URL(window.location.toString()),e="light";const n=t.searchParams.get("__theme");return n!==null?n==="dark"?e=Ne(r):n==="system"&&(e=go(r)):t.searchParams.get("__dark-theme")==="true"?e=Ne(r):e=go(r),e}function go(r){const t=e();window?.matchMedia("(prefers-color-scheme: dark)")?.addEventListener("change",e);function e(){let n="light";return(window?.matchMedia?.("(prefers-color-scheme: dark)").matches??null)&&(n=Ne(r)),n}return t}function Ne(r){return r.classList.add("dark"),Le&&(document.body.style.backgroundColor="rgb(11, 15, 25)"),"dark"}window.location!==window.parent.location?(window.scoped_css_attach=r=>{document.head.append(r)},z0()):R0();export{Vl as $,_r as A,or as B,qr as C,Cr as D,Ir as E,Ge as F,wn as G,Re as H,wr as I,Gl as J,lt as K,Kt as L,Zr as M,Ll as N,St as O,Yc as P,Wt as Q,te as R,Or as S,Ze as T,qe as U,vo as V,zl as W,Z0 as X,Fr as Y,Hn as Z,G as _,R as a,M0 as a0,$r as a1,Xl as a2,V0 as a3,X0 as a4,q0 as a5,Q0 as a6,Qc as a7,Sr as a8,br as a9,Et as aa,Wl as ab,Hl as ac,Ue as ad,Jr as ae,D0 as af,U0 as ag,jc as ah,G0 as ai,J0 as aj,H0 as ak,l0 as al,F0 as am,Bl as an,B0 as ao,Bn as ap,Y0 as aq,so as ar,W0 as as,De as at,_ as b,hr as c,q as d,A as e,v as f,b as g,Y as h,Pr as i,M as j,V as k,K as l,pr as m,y as n,gr as o,ze as p,Fe as q,Me as r,kr as s,P as t,je as u,K0 as v,Er as w,J as x,Qr as y,j0 as z}; diff --git a/gradio-modified/gradio/templates/frontend/assets/index.39f99b3e.js b/gradio-modified/gradio/templates/frontend/assets/index.39f99b3e.js new file mode 100644 index 0000000000000000000000000000000000000000..1a09d6fc582d974c7f907b3a7ed0e20152b7e1c0 --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/index.39f99b3e.js @@ -0,0 +1,2 @@ +import{S as b,i as d,s as g,p as q,e as w,b as c,d as m,f as v,l as C,u as S,q as j,r as K,j as h,k as y,n as k,Z as Q,K as z,c as R,m as X,o as Z,Q as A,X as D,t as E,h as F}from"./index.396f4a72.js";function G(n){let e,l,t,s,f;const r=n[7].default,a=q(r,n,n[6],null);return{c(){e=w("button"),a&&a.c(),c(e,"class",l="gr-button gr-button-"+n[3]+" gr-button-"+n[2]+" "+n[4]),c(e,"id",n[0]),m(e,"!hidden",!n[1])},m(i,_){v(i,e,_),a&&a.m(e,null),t=!0,s||(f=C(e,"click",n[8]),s=!0)},p(i,[_]){a&&a.p&&(!t||_&64)&&S(a,r,i,i[6],t?K(r,i[6],_,null):j(i[6]),null),(!t||_&28&&l!==(l="gr-button gr-button-"+i[3]+" gr-button-"+i[2]+" "+i[4]))&&c(e,"class",l),(!t||_&1)&&c(e,"id",i[0]),_&30&&m(e,"!hidden",!i[1])},i(i){t||(h(a,i),t=!0)},o(i){y(a,i),t=!1},d(i){i&&k(e),a&&a.d(i),s=!1,f()}}}function H(n,e,l){let t,{$$slots:s={},$$scope:f}=e,{style:r={}}=e,{elem_id:a=""}=e,{visible:i=!0}=e,{variant:_="secondary"}=e,{size:u="lg"}=e;function B(o){z.call(this,n,o)}return n.$$set=o=>{"style"in o&&l(5,r=o.style),"elem_id"in o&&l(0,a=o.elem_id),"visible"in o&&l(1,i=o.visible),"variant"in o&&l(2,_=o.variant),"size"in o&&l(3,u=o.size),"$$scope"in o&&l(6,f=o.$$scope)},n.$$.update=()=>{n.$$.dirty&32&&l(4,{classes:t}=Q(r,["full_width"]),t)},[a,i,_,u,t,r,f,s,B]}class I extends b{constructor(e){super(),d(this,e,H,G,g,{style:5,elem_id:0,visible:1,variant:2,size:3})}}function J(n){let e=n[5](n[3])+"",l;return{c(){l=E(e)},m(t,s){v(t,l,s)},p(t,s){s&40&&e!==(e=t[5](t[3])+"")&&F(l,e)},d(t){t&&k(l)}}}function L(n){let e,l;return e=new I({props:{variant:n[4],elem_id:n[1],style:n[0],visible:n[2],$$slots:{default:[J]},$$scope:{ctx:n}}}),e.$on("click",n[6]),{c(){R(e.$$.fragment)},m(t,s){X(e,t,s),l=!0},p(t,[s]){const f={};s&16&&(f.variant=t[4]),s&2&&(f.elem_id=t[1]),s&1&&(f.style=t[0]),s&4&&(f.visible=t[2]),s&168&&(f.$$scope={dirty:s,ctx:t}),e.$set(f)},i(t){l||(h(e.$$.fragment,t),l=!0)},o(t){y(e.$$.fragment,t),l=!1},d(t){Z(e,t)}}}function M(n,e,l){let t;A(n,D,u=>l(5,t=u));let{style:s={}}=e,{elem_id:f=""}=e,{visible:r=!0}=e,{value:a}=e,{variant:i="primary"}=e;function _(u){z.call(this,n,u)}return n.$$set=u=>{"style"in u&&l(0,s=u.style),"elem_id"in u&&l(1,f=u.elem_id),"visible"in u&&l(2,r=u.visible),"value"in u&&l(3,a=u.value),"variant"in u&&l(4,i=u.variant)},[s,f,r,a,i,t,_]}class N extends b{constructor(e){super(),d(this,e,M,L,g,{style:0,elem_id:1,visible:2,value:3,variant:4})}}var P=N;const T=["static"],U=n=>({type:"string",description:"button label",example_data:n.value||"Run"});export{P as Component,U as document,T as modes}; +//# sourceMappingURL=index.39f99b3e.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/index.459183ec.js b/gradio-modified/gradio/templates/frontend/assets/index.459183ec.js new file mode 100644 index 0000000000000000000000000000000000000000..349faf939c3f2b71b969de4cff67777b0e6aa961 --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/index.459183ec.js @@ -0,0 +1,2 @@ +import{S as N,i as q,s as A,a7 as D,e as m,t as j,a as y,b as f,f as v,g as _,h as C,n as k,c as B,m as I,j as S,k as R,o as M,C as E,w as T,d as z,M as O,a5 as fe,I as V,B as re,U as ue,V as ge,D as oe,E as ce,R as he}from"./index.396f4a72.js";const w=i=>{var e=null;return i<0?e=[52,152,219]:e=[231,76,60],de(_e(Math.abs(i),[255,255,255],e))},_e=(i,e,t)=>{i>1&&(i=1),i=Math.sqrt(i);var n=[0,0,0],c;for(c=0;c<3;c++)n[c]=Math.round(e[c]*(1-i)+t[c]*i);return n},de=i=>"rgb("+i[0]+", "+i[1]+", "+i[2]+")",H=(i,e,t,n,c)=>{var a=n/c,o=e/t,l=0,r=0,u=i?a>o:a{"interpretation"in a&&t(0,n=a.interpretation),"label"in a&&t(1,c=a.label)},[n,c]}class ke extends N{constructor(e){super(),q(this,e,ve,me,A,{interpretation:0,label:1})}}function L(i,e,t){const n=i.slice();return n[3]=e[t],n[5]=t,n}function pe(i){let e;return{c(){e=j(i[2])},m(t,n){v(t,e,n)},p(t,n){n&4&&C(e,t[2])},d(t){t&&k(e)}}}function P(i){let e,t=i[3]+"",n,c,a;return{c(){e=m("li"),n=j(t),c=y(),f(e,"class","dropdown-item first:rounded-t transition last:rounded-b py-2 px-3 block whitespace-nowrap cursor-pointer"),f(e,"style",a="background-color: "+w(i[0][i[5]]))},m(o,l){v(o,e,l),_(e,n),_(e,c)},p(o,l){l&2&&t!==(t=o[3]+"")&&C(n,t),l&1&&a!==(a="background-color: "+w(o[0][o[5]]))&&f(e,"style",a)},d(o){o&&k(e)}}}function we(i){let e,t,n,c,a;t=new D({props:{$$slots:{default:[pe]},$$scope:{ctx:i}}});let o=i[1],l=[];for(let r=0;r{"interpretation"in o&&t(0,n=o.interpretation),"choices"in o&&t(1,c=o.choices),"label"in o&&t(2,a=o.label)},[n,c,a]}class xe extends N{constructor(e){super(),q(this,e,ye,we,A,{interpretation:0,choices:1,label:2})}}function je(i){let e;return{c(){e=j(i[0])},m(t,n){v(t,e,n)},p(t,n){n&1&&C(e,t[0])},d(t){t&&k(e)}}}function Ce(i){let e,t,n,c,a,o,l,r,u,s,g,h,d;return t=new D({props:{$$slots:{default:[je]},$$scope:{ctx:i}}}),{c(){e=m("div"),B(t.$$.fragment),n=y(),c=m("button"),a=m("div"),l=y(),r=m("div"),u=T("svg"),s=T("line"),g=T("line"),f(a,"class","checkbox w-4 h-4 bg-white flex items-center justify-center border border-gray-400 box-border"),f(a,"style",o="background-color: "+w(i[2][0])),f(s,"x1","-7.5"),f(s,"y1","0"),f(s,"x2","-2.5"),f(s,"y2","5"),f(s,"stroke","black"),f(s,"stroke-width","4"),f(s,"stroke-linecap","round"),f(g,"x1","-2.5"),f(g,"y1","5"),f(g,"x2","7.5"),f(g,"y2","-7.5"),f(g,"stroke","black"),f(g,"stroke-width","4"),f(g,"stroke-linecap","round"),f(u,"class","check h-3 w-4 svelte-r8ethh"),f(u,"viewBox","-10 -10 20 20"),f(r,"class","checkbox w-4 h-4 bg-white flex items-center justify-center border border-gray-400 box-border"),f(r,"style",h="background-color: "+w(i[2][1])),f(c,"class","checkbox-item py-2 px-3 rounded cursor-pointer flex gap-1 svelte-r8ethh"),z(c,"selected",i[1]),f(e,"class","input-checkbox inline-block svelte-r8ethh")},m(b,p){v(b,e,p),I(t,e,null),_(e,n),_(e,c),_(c,a),_(c,l),_(c,r),_(r,u),_(u,s),_(u,g),d=!0},p(b,[p]){const x={};p&9&&(x.$$scope={dirty:p,ctx:b}),t.$set(x),(!d||p&4&&o!==(o="background-color: "+w(b[2][0])))&&f(a,"style",o),(!d||p&4&&h!==(h="background-color: "+w(b[2][1])))&&f(r,"style",h),p&2&&z(c,"selected",b[1])},i(b){d||(S(t.$$.fragment,b),d=!0)},o(b){R(t.$$.fragment,b),d=!1},d(b){b&&k(e),M(t)}}}function Se(i,e,t){let{label:n=""}=e,{original:c}=e,{interpretation:a}=e;return i.$$set=o=>{"label"in o&&t(0,n=o.label),"original"in o&&t(1,c=o.original),"interpretation"in o&&t(2,a=o.interpretation)},[n,c,a]}class Re extends N{constructor(e){super(),q(this,e,Se,Ce,A,{label:0,original:1,interpretation:2})}}function Q(i,e,t){const n=i.slice();return n[4]=e[t],n[6]=t,n}function Be(i){let e;return{c(){e=j(i[3])},m(t,n){v(t,e,n)},p(t,n){n&8&&C(e,t[3])},d(t){t&&k(e)}}}function W(i){let e,t,n,c,a,o,l,r,u,s,g=i[4]+"",h,d;return{c(){e=m("button"),t=m("div"),c=y(),a=m("div"),o=T("svg"),l=T("line"),r=T("line"),s=y(),h=j(g),d=y(),f(t,"class","checkbox w-4 h-4 bg-white flex items-center justify-center border border-gray-400 box-border svelte-h5sk3f"),f(t,"style",n="background-color: "+w(i[1][i[6]][0])),f(l,"x1","-7.5"),f(l,"y1","0"),f(l,"x2","-2.5"),f(l,"y2","5"),f(l,"stroke","black"),f(l,"stroke-width","4"),f(l,"stroke-linecap","round"),f(r,"x1","-2.5"),f(r,"y1","5"),f(r,"x2","7.5"),f(r,"y2","-7.5"),f(r,"stroke","black"),f(r,"stroke-width","4"),f(r,"stroke-linecap","round"),f(o,"class","check h-3 w-4 svelte-h5sk3f"),f(o,"viewBox","-10 -10 20 20"),f(a,"class","checkbox w-4 h-4 bg-white flex items-center justify-center border border-gray-400 box-border svelte-h5sk3f"),f(a,"style",u="background-color: "+w(i[1][i[6]][1])),f(e,"class","checkbox-item py-2 px-3 font-semibold rounded cursor-pointer flex items-center gap-1 svelte-h5sk3f"),z(e,"selected",i[0].includes(i[4]))},m(b,p){v(b,e,p),_(e,t),_(e,c),_(e,a),_(a,o),_(o,l),_(o,r),_(e,s),_(e,h),_(e,d)},p(b,p){p&2&&n!==(n="background-color: "+w(b[1][b[6]][0]))&&f(t,"style",n),p&2&&u!==(u="background-color: "+w(b[1][b[6]][1]))&&f(a,"style",u),p&4&&g!==(g=b[4]+"")&&C(h,g),p&5&&z(e,"selected",b[0].includes(b[4]))},d(b){b&&k(e)}}}function Ie(i){let e,t,n,c;t=new D({props:{$$slots:{default:[Be]},$$scope:{ctx:i}}});let a=i[2],o=[];for(let l=0;l{"original"in l&&t(0,n=l.original),"interpretation"in l&&t(1,c=l.interpretation),"choices"in l&&t(2,a=l.choices),"label"in l&&t(3,o=l.label)},[n,c,a,o]}class Ne extends N{constructor(e){super(),q(this,e,Me,Ie,A,{original:0,interpretation:1,choices:2,label:3})}}function X(i,e,t){const n=i.slice();return n[6]=e[t],n}function qe(i){let e;return{c(){e=j(i[5])},m(t,n){v(t,e,n)},p(t,n){n&32&&C(e,t[5])},d(t){t&&k(e)}}}function Y(i){let e,t;return{c(){e=m("div"),f(e,"class","flex-1 h-4"),f(e,"style",t="background-color: "+w(i[6]))},m(n,c){v(n,e,c)},p(n,c){c&2&&t!==(t="background-color: "+w(n[6]))&&f(e,"style",t)},d(n){n&&k(e)}}}function Ae(i){let e,t,n,c,a,o,l,r,u,s;t=new D({props:{$$slots:{default:[qe]},$$scope:{ctx:i}}});let g=i[1],h=[];for(let d=0;d{"original"in u&&t(0,n=u.original),"interpretation"in u&&t(1,c=u.interpretation),"minimum"in u&&t(2,a=u.minimum),"maximum"in u&&t(3,o=u.maximum),"step"in u&&t(4,l=u.step),"label"in u&&t(5,r=u.label)},[n,c,a,o,l,r]}class Ee extends N{constructor(e){super(),q(this,e,De,Ae,A,{original:0,interpretation:1,minimum:2,maximum:3,step:4,label:5})}}function Z(i,e,t){const n=i.slice();return n[4]=e[t],n[6]=t,n}function Te(i){let e;return{c(){e=j(i[3])},m(t,n){v(t,e,n)},p(t,n){n&8&&C(e,t[3])},d(t){t&&k(e)}}}function $(i){let e,t,n,c,a=i[4]+"",o,l;return{c(){e=m("button"),t=m("div"),c=y(),o=j(a),l=y(),f(t,"class","radio-circle w-4 h-4 rounded-full box-border svelte-145r163"),f(t,"style",n="background-color: "+w(i[1][i[6]])),f(e,"class","radio-item py-2 px-3 font-semibold rounded cursor-pointer flex items-center gap-2 svelte-145r163"),z(e,"selected",i[0]===i[4])},m(r,u){v(r,e,u),_(e,t),_(e,c),_(e,o),_(e,l)},p(r,u){u&2&&n!==(n="background-color: "+w(r[1][r[6]]))&&f(t,"style",n),u&4&&a!==(a=r[4]+"")&&C(o,a),u&5&&z(e,"selected",r[0]===r[4])},d(r){r&&k(e)}}}function ze(i){let e,t,n,c;t=new D({props:{$$slots:{default:[Te]},$$scope:{ctx:i}}});let a=i[2],o=[];for(let l=0;l{"original"in l&&t(0,n=l.original),"interpretation"in l&&t(1,c=l.interpretation),"choices"in l&&t(2,a=l.choices),"label"in l&&t(3,o=l.label)},[n,c,a,o]}class Ue extends N{constructor(e){super(),q(this,e,Ge,ze,A,{original:0,interpretation:1,choices:2,label:3})}}function Fe(i){let e;return{c(){e=j(i[1])},m(t,n){v(t,e,n)},p(t,n){n&2&&C(e,t[1])},d(t){t&&k(e)}}}function Oe(i){let e,t,n,c,a,o,l,r,u,s;return t=new D({props:{$$slots:{default:[Fe]},$$scope:{ctx:i}}}),{c(){e=m("div"),B(t.$$.fragment),n=y(),c=m("div"),a=m("div"),o=m("canvas"),l=y(),r=m("img"),f(a,"class","interpretation w-full h-full absolute top-0 left-0 flex justify-center items-center opacity-90 hover:opacity-20 transition"),f(r,"class","w-full h-full object-contain"),O(r.src,u=i[0])||f(r,"src",u),f(c,"class","image-preview w-full h-60 flex justify-center items-center bg-gray-200 dark:bg-gray-600 relative"),f(e,"class","input-image")},m(g,h){v(g,e,h),I(t,e,null),_(e,n),_(e,c),_(c,a),_(a,o),i[6](o),_(c,l),_(c,r),i[7](r),s=!0},p(g,[h]){const d={};h&514&&(d.$$scope={dirty:h,ctx:g}),t.$set(d),(!s||h&1&&!O(r.src,u=g[0]))&&f(r,"src",u)},i(g){s||(S(t.$$.fragment,g),s=!0)},o(g){R(t.$$.fragment,g),s=!1},d(g){g&&k(e),M(t),i[6](null),i[7](null)}}}function Ve(i,e,t){let{original:n}=e,{interpretation:c}=e,{shape:a}=e,{label:o=""}=e,l,r;const u=(h,d,b,p)=>{var x=b/h[0].length,G=p/h.length,U=0;h.forEach(function(ae){var F=0;ae.forEach(function(se){d.fillStyle=w(se),d.fillRect(F*x,U*G,x,G),F++}),U++})};fe(()=>{let h=H(!0,r.width,r.height,r.naturalWidth,r.naturalHeight);a&&(h=H(!0,h.width,h.height,a[0],a[1]));let d=h.width,b=h.height;l.setAttribute("height",`${b}`),l.setAttribute("width",`${d}`),u(c,l.getContext("2d"),d,b)});function s(h){V[h?"unshift":"push"](()=>{l=h,t(2,l)})}function g(h){V[h?"unshift":"push"](()=>{r=h,t(3,r)})}return i.$$set=h=>{"original"in h&&t(0,n=h.original),"interpretation"in h&&t(4,c=h.interpretation),"shape"in h&&t(5,a=h.shape),"label"in h&&t(1,o=h.label)},[n,o,l,r,c,a,s,g]}class He extends N{constructor(e){super(),q(this,e,Ve,Oe,A,{original:0,interpretation:4,shape:5,label:1})}}function ee(i,e,t){const n=i.slice();return n[2]=e[t],n}function Je(i){let e;return{c(){e=j(i[1])},m(t,n){v(t,e,n)},p(t,n){n&2&&C(e,t[1])},d(t){t&&k(e)}}}function te(i){let e,t;return{c(){e=m("div"),f(e,"class","flex-1 h-4"),f(e,"style",t="background-color: "+w(i[2]))},m(n,c){v(n,e,c)},p(n,c){c&1&&t!==(t="background-color: "+w(n[2]))&&f(e,"style",t)},d(n){n&&k(e)}}}function Ke(i){let e,t,n,c,a;t=new D({props:{$$slots:{default:[Je]},$$scope:{ctx:i}}});let o=i[0],l=[];for(let r=0;r{"interpretation"in a&&t(0,n=a.interpretation),"label"in a&&t(1,c=a.label)},[n,c]}class Pe extends N{constructor(e){super(),q(this,e,Le,Ke,A,{interpretation:0,label:1})}}function le(i,e,t){const n=i.slice();return n[2]=e[t][0],n[3]=e[t][1],n}function Qe(i){let e;return{c(){e=j(i[0])},m(t,n){v(t,e,n)},p(t,n){n&1&&C(e,t[0])},d(t){t&&k(e)}}}function ne(i){let e,t=i[2]+"",n,c,a;return{c(){e=m("span"),n=j(t),c=y(),f(e,"class","textspan p-1 bg-opacity-20 dark:bg-opacity-80"),f(e,"style",a="background-color: "+w(i[3]))},m(o,l){v(o,e,l),_(e,n),_(e,c)},p(o,l){l&2&&t!==(t=o[2]+"")&&C(n,t),l&2&&a!==(a="background-color: "+w(o[3]))&&f(e,"style",a)},d(o){o&&k(e)}}}function We(i){let e,t,n,c;t=new D({props:{$$slots:{default:[Qe]},$$scope:{ctx:i}}});let a=i[1],o=[];for(let l=0;l{"label"in a&&t(0,n=a.label),"interpretation"in a&&t(1,c=a.interpretation)},[n,c]}class Ye extends N{constructor(e){super(),q(this,e,Xe,We,A,{label:0,interpretation:1})}}const Ze={audio:Pe,dropdown:xe,checkbox:Re,checkboxgroup:Ne,number:ke,slider:Ee,radio:Ue,image:He,textbox:Ye};function ie(i){let e,t,n;const c=[i[0],{original:i[1].original},{interpretation:i[1].interpretation}];var a=i[2];function o(l){let r={};for(let u=0;u{M(s,1)}),ce()}a?(e=new a(o()),B(e.$$.fragment),S(e.$$.fragment,1),I(e,t.parentNode,t)):e=null}else a&&e.$set(u)},i(l){n||(e&&S(e.$$.fragment,l),n=!0)},o(l){e&&R(e.$$.fragment,l),n=!1},d(l){l&&k(t),e&&M(e,l)}}}function $e(i){let e,t,n=i[1]&&ie(i);return{c(){n&&n.c(),e=re()},m(c,a){n&&n.m(c,a),v(c,e,a),t=!0},p(c,[a]){c[1]?n?(n.p(c,a),a&2&&S(n,1)):(n=ie(c),n.c(),S(n,1),n.m(e.parentNode,e)):n&&(oe(),R(n,1,1,()=>{n=null}),ce())},i(c){t||(S(n),t=!0)},o(c){R(n),t=!1},d(c){n&&n.d(c),c&&k(e)}}}function et(i,e,t){let n,{component:c}=e,{component_props:a}=e,{value:o}=e;return i.$$set=l=>{"component"in l&&t(3,c=l.component),"component_props"in l&&t(0,a=l.component_props),"value"in l&&t(1,o=l.value)},i.$$.update=()=>{i.$$.dirty&8&&t(2,n=Ze[c])},[a,o,n,c]}class tt extends N{constructor(e){super(),q(this,e,et,$e,A,{component:3,component_props:0,value:1})}}var nt=tt;const it=["dynamic"];export{nt as Component,it as modes}; +//# sourceMappingURL=index.459183ec.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/index.4762eb88.js b/gradio-modified/gradio/templates/frontend/assets/index.4762eb88.js new file mode 100644 index 0000000000000000000000000000000000000000..dbc2f121513a625611808d75137a5006e5b91655 --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/index.4762eb88.js @@ -0,0 +1,2 @@ +import{S as j,i as q,s as y,e as g,a as B,t as F,b as d,d as S,f as D,g as m,l as I,h as K,x as T,n as E,F as L,P as O,c as h,m as k,j as v,k as C,o as w,R as P,T as R,I as U,O as V,U as z,V as A,L as G,K as H}from"./index.396f4a72.js";function J(s){let e,t,a,i,c,r,f;return{c(){e=g("label"),t=g("input"),a=B(),i=g("span"),c=F(s[2]),t.disabled=s[1],t.checked=s[0],d(t,"type","checkbox"),d(t,"name","test"),d(t,"class","gr-check-radio gr-checkbox"),d(i,"class","ml-2"),d(e,"class","flex items-center text-gray-700 text-sm space-x-2 rounded-lg cursor-pointer dark:bg-transparent "),S(e,"!cursor-not-allowed",s[1])},m(u,l){D(u,e,l),m(e,t),m(e,a),m(e,i),m(i,c),r||(f=I(t,"change",s[4]),r=!0)},p(u,[l]){l&2&&(t.disabled=u[1]),l&1&&(t.checked=u[0]),l&4&&K(c,u[2]),l&2&&S(e,"!cursor-not-allowed",u[1])},i:T,o:T,d(u){u&&E(e),r=!1,f()}}}function M(s,e,t){let{value:a}=e,{disabled:i=!1}=e,{label:c}=e;const r=L();function f(l){t(0,a=l.currentTarget.checked),r("change",a)}const u=l=>f(l);return s.$$set=l=>{"value"in l&&t(0,a=l.value),"disabled"in l&&t(1,i=l.disabled),"label"in l&&t(2,c=l.label)},[a,i,c,f,u]}class N extends j{constructor(e){super(),q(this,e,M,J,y,{value:0,disabled:1,label:2})}}function Q(s){let e,t,a,i,c;const r=[s[6]];let f={};for(let n=0;nV(a,"value",u)),a.$on("change",s[8]),{c(){h(e.$$.fragment),t=B(),h(a.$$.fragment)},m(n,b){k(e,n,b),D(n,t,b),k(a,n,b),c=!0},p(n,b){const o=b&64?z(r,[A(n[6])]):{};e.$set(o);const _={};b&8&&(_.label=n[3]),b&16&&(_.disabled=n[4]==="static"),!i&&b&1&&(i=!0,_.value=n[0],G(()=>i=!1)),a.$set(_)},i(n){c||(v(e.$$.fragment,n),v(a.$$.fragment,n),c=!0)},o(n){C(e.$$.fragment,n),C(a.$$.fragment,n),c=!1},d(n){w(e,n),n&&E(t),w(a,n)}}}function W(s){let e,t;return e=new O({props:{visible:s[2],elem_id:s[1],disable:typeof s[5].container=="boolean"&&!s[5].container,$$slots:{default:[Q]},$$scope:{ctx:s}}}),{c(){h(e.$$.fragment)},m(a,i){k(e,a,i),t=!0},p(a,[i]){const c={};i&4&&(c.visible=a[2]),i&2&&(c.elem_id=a[1]),i&32&&(c.disable=typeof a[5].container=="boolean"&&!a[5].container),i&601&&(c.$$scope={dirty:i,ctx:a}),e.$set(c)},i(a){t||(v(e.$$.fragment,a),t=!0)},o(a){C(e.$$.fragment,a),t=!1},d(a){w(e,a)}}}function X(s,e,t){let{elem_id:a=""}=e,{visible:i=!0}=e,{value:c=!1}=e,{label:r="Checkbox"}=e,{mode:f}=e,{style:u={}}=e,{loading_status:l}=e;function n(o){c=o,t(0,c)}function b(o){H.call(this,s,o)}return s.$$set=o=>{"elem_id"in o&&t(1,a=o.elem_id),"visible"in o&&t(2,i=o.visible),"value"in o&&t(0,c=o.value),"label"in o&&t(3,r=o.label),"mode"in o&&t(4,f=o.mode),"style"in o&&t(5,u=o.style),"loading_status"in o&&t(6,l=o.loading_status)},[c,a,i,r,f,u,l,n,b]}class Y extends j{constructor(e){super(),q(this,e,X,W,y,{elem_id:1,visible:2,value:0,label:3,mode:4,style:5,loading_status:6})}}var p=Y;const x=["static","dynamic"],$=s=>({type:"boolean",description:"checked status",example_data:s.value??!0});export{p as Component,$ as document,x as modes}; +//# sourceMappingURL=index.4762eb88.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/index.4f1294f6.js b/gradio-modified/gradio/templates/frontend/assets/index.4f1294f6.js new file mode 100644 index 0000000000000000000000000000000000000000..c931fb9bd3b5e972e8114003f95c431901e881a0 --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/index.4f1294f6.js @@ -0,0 +1,2 @@ +import{S as f,i as r,s as d,p as m,e as c,b as _,d as u,f as v,u as g,q as b,r as h,j as p,k as G,n as q}from"./index.396f4a72.js";function C(n){let s,l;const o=n[3].default,t=m(o,n,n[2],null);return{c(){s=c("div"),t&&t.c(),_(s,"id",n[0]),_(s,"class","svelte-10ogue4"),u(s,"hidden",!n[1])},m(e,i){v(e,s,i),t&&t.m(s,null),l=!0},p(e,[i]){t&&t.p&&(!l||i&4)&&g(t,o,e,e[2],l?h(o,e[2],i,null):b(e[2]),null),(!l||i&1)&&_(s,"id",e[0]),i&2&&u(s,"hidden",!e[1])},i(e){l||(p(t,e),l=!0)},o(e){G(t,e),l=!1},d(e){e&&q(s),t&&t.d(e)}}}function S(n,s,l){let{$$slots:o={},$$scope:t}=s,{elem_id:e=""}=s,{visible:i=!0}=s;return n.$$set=a=>{"elem_id"in a&&l(0,e=a.elem_id),"visible"in a&&l(1,i=a.visible),"$$scope"in a&&l(2,t=a.$$scope)},[e,i,t,o]}class j extends f{constructor(s){super(),r(this,s,S,C,d,{elem_id:0,visible:1})}}var w=j;const y=["static"];export{w as Component,y as modes}; +//# sourceMappingURL=index.4f1294f6.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/index.50b5507a.js b/gradio-modified/gradio/templates/frontend/assets/index.50b5507a.js new file mode 100644 index 0000000000000000000000000000000000000000..be267cb1caca9a9db2ebce29af342de8fa84e7de --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/index.50b5507a.js @@ -0,0 +1,2 @@ +import{S as pe,i as ke,s as ve,ae as te,P as we,c as M,m as N,l as T,j as y,k as B,o as S,Z as ye,R as je,T as ze,a as D,B as Ae,f as C,U as Be,V as Ce,D as E,E as H,n as G,aa as Ge,I as F,e as w,b as h,M as L,Y as J,d as A,g as j,t as ne,h as ie,C as oe,A as De,ai as Ie,x as U}from"./index.396f4a72.js";import{B as Re}from"./BlockLabel.37da86a3.js";import{M as Le}from"./ModifyUpload.2cfe71e4.js";import{n as K}from"./utils.27234e1d.js";import{I as Y}from"./Image.4a41f1aa.js";function O(t,e,l){const i=t.slice();return i[30]=e[l][0],i[31]=e[l][1],i[33]=l,i}function Q(t,e,l){const i=t.slice();return i[30]=e[l],i[34]=e,i[33]=l,i}function W(t){let e,l;return e=new Re({props:{show_label:t[1],Icon:Y,label:t[2]||"Gallery",disable:typeof t[6].container=="boolean"&&!t[6].container}}),{c(){M(e.$$.fragment)},m(i,o){N(e,i,o),l=!0},p(i,o){const n={};o[0]&2&&(n.show_label=i[1]),o[0]&4&&(n.label=i[2]||"Gallery"),o[0]&64&&(n.disable=typeof i[6].container=="boolean"&&!i[6].container),e.$set(n)},i(i){l||(y(e.$$.fragment,i),l=!0)},o(i){B(e.$$.fragment,i),l=!1},d(i){S(e,i)}}}function Me(t){let e,l,i,o,n,r,a=t[7]!==null&&X(t);const p=[Te,Se],m=[];function g(f,c){return f[10].length===0?0:1}return i=g(t),o=m[i]=p[i](t),{c(){a&&a.c(),e=D(),l=w("div"),o.c(),h(l,"class","overflow-y-auto h-full p-2"),te(()=>t[27].call(l)),A(l,"min-h-[350px]",t[6].height!=="auto"),A(l,"max-h-[55vh]",t[6].height!=="auto"),A(l,"xl:min-h-[450px]",t[6].height!=="auto")},m(f,c){a&&a.m(f,c),C(f,e,c),C(f,l,c),m[i].m(l,null),n=Ie(l,t[27].bind(l)),r=!0},p(f,c){f[7]!==null?a?(a.p(f,c),c[0]&128&&y(a,1)):(a=X(f),a.c(),y(a,1),a.m(e.parentNode,e)):a&&(E(),B(a,1,1,()=>{a=null}),H());let z=i;i=g(f),i===z?m[i].p(f,c):(E(),B(m[z],1,1,()=>{m[z]=null}),H(),o=m[i],o?o.p(f,c):(o=m[i]=p[i](f),o.c()),y(o,1),o.m(l,null)),c[0]&64&&A(l,"min-h-[350px]",f[6].height!=="auto"),c[0]&64&&A(l,"max-h-[55vh]",f[6].height!=="auto"),c[0]&64&&A(l,"xl:min-h-[450px]",f[6].height!=="auto")},i(f){r||(y(a),y(o),r=!0)},o(f){B(a),B(o),r=!1},d(f){a&&a.d(f),f&&G(e),f&&G(l),m[i].d(),n()}}}function Ne(t){let e,l,i,o;return i=new Y({}),{c(){e=w("div"),l=w("div"),M(i.$$.fragment),h(l,"class","h-5 dark:text-white opacity-50"),h(e,"class","h-full min-h-[15rem] flex justify-center items-center")},m(n,r){C(n,e,r),j(e,l),N(i,l,null),o=!0},p:U,i(n){o||(y(i.$$.fragment,n),o=!0)},o(n){B(i.$$.fragment,n),o=!1},d(n){n&&G(e),S(i)}}}function X(t){let e,l,i,o,n,r,a,p,m,g,f,c,z;l=new Le({}),l.$on("clear",t[21]);let s=t[10][t[7]][1]&&$(t),b=t[10],k=[];for(let u=0;ut[23](e,p),c=()=>t[23](null,p);function z(){return t[24](t[33])}return{c(){e=w("button"),l=w("img"),r=D(),h(l,"class","h-full w-full overflow-hidden object-contain"),L(l.src,i=t[30][0].data)||h(l,"src",i),h(l,"title",o=t[30][1]||null),h(l,"alt",n=t[30][1]||null),h(e,"class",a="gallery-item !flex-none !h-9 !w-9 transition-all duration-75 "+(t[7]===t[33]?"!ring-2 !ring-orange-500 hover:!ring-orange-500":"scale-90 transform")+" svelte-1g9btlg")},m(s,b){C(s,e,b),j(e,l),j(e,r),f(),m||(g=T(e,"click",z),m=!0)},p(s,b){t=s,b[0]&1024&&!L(l.src,i=t[30][0].data)&&h(l,"src",i),b[0]&1024&&o!==(o=t[30][1]||null)&&h(l,"title",o),b[0]&1024&&n!==(n=t[30][1]||null)&&h(l,"alt",n),b[0]&128&&a!==(a="gallery-item !flex-none !h-9 !w-9 transition-all duration-75 "+(t[7]===t[33]?"!ring-2 !ring-orange-500 hover:!ring-orange-500":"scale-90 transform")+" svelte-1g9btlg")&&h(e,"class",a),p!==t[33]&&(c(),p=t[33],f())},d(s){s&&G(e),c(),m=!1,g()}}}function Se(t){let e,l,i=t[10],o=[];for(let n=0;n{g=null}),H());let u=o;o=z(s),o===u?c[o].p(s,b):(E(),B(c[u],1,1,()=>{c[u]=null}),H(),n=c[o],n?n.p(s,b):(n=c[o]=f[o](s),n.c()),y(n,1),n.m(r.parentNode,r))},i(s){a||(y(e.$$.fragment,s),y(g),y(n),a=!0)},o(s){B(e.$$.fragment,s),B(g),B(n),a=!1},d(s){S(e,s),s&&G(l),g&&g.d(s),s&&G(i),c[o].d(s),s&&G(r)}}}function Ee(t){let e,l,i,o;return te(t[20]),e=new we({props:{visible:t[4],variant:"solid",color:"grey",padding:!1,elem_id:t[3],disable:typeof t[6].container=="boolean"&&!t[6].container,$$slots:{default:[qe]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment)},m(n,r){N(e,n,r),l=!0,i||(o=T(window,"resize",t[20]),i=!0)},p(n,r){const a={};r[0]&16&&(a.visible=n[4]),r[0]&8&&(a.elem_id=n[3]),r[0]&64&&(a.disable=typeof n[6].container=="boolean"&&!n[6].container),r[0]&64999|r[1]&16&&(a.$$scope={dirty:r,ctx:n}),e.$set(a)},i(n){l||(y(e.$$.fragment,n),l=!0)},o(n){B(e.$$.fragment,n),l=!1},d(n){S(e,n),i=!1,o()}}}function He(t,e,l){let i,o,n,r,a,{loading_status:p}=e,{show_label:m}=e,{label:g}=e,{root:f}=e,{root_url:c}=e,{elem_id:z=""}=e,{visible:s=!0}=e,{value:b=null}=e,{style:k={}}=e,u=null,d=null;function v(_){switch(_.code){case"Escape":_.preventDefault(),l(7,d=null);break;case"ArrowLeft":_.preventDefault(),l(7,d=o);break;case"ArrowRight":_.preventDefault(),l(7,d=n);break}}let I=[],R;async function ae(_){if(typeof _!="number")return;await Ge(),I[_].focus();const{left:P,width:he}=R.getBoundingClientRect(),{left:be,width:de}=I[_].getBoundingClientRect(),Z=be-P+de/2-he/2+R.scrollLeft;R.scrollTo({left:Z<0?0:Z,behavior:"smooth"})}let q=0,V=0;function se(){l(9,V=window.innerHeight)}const re=()=>l(7,d=null),fe=()=>l(7,d=n);function ue(_,P){F[_?"unshift":"push"](()=>{I[P]=_,l(11,I)})}const _e=_=>l(7,d=_);function ce(_){F[_?"unshift":"push"](()=>{R=_,l(12,R)})}const me=_=>l(7,d=r?_:d);function ge(){q=this.clientHeight,l(8,q)}return t.$$set=_=>{"loading_status"in _&&l(0,p=_.loading_status),"show_label"in _&&l(1,m=_.show_label),"label"in _&&l(2,g=_.label),"root"in _&&l(17,f=_.root),"root_url"in _&&l(18,c=_.root_url),"elem_id"in _&&l(3,z=_.elem_id),"visible"in _&&l(4,s=_.visible),"value"in _&&l(5,b=_.value),"style"in _&&l(6,k=_.style)},t.$$.update=()=>{t.$$.dirty[0]&393248&&l(10,i=b===null?null:b.map(_=>Array.isArray(_)?[K(_[0],c??f),_[1]]:[K(_,c??f),null])),t.$$.dirty[0]&524320&&u!==b&&(l(7,d=null),l(19,u=b)),t.$$.dirty[0]&1152&&(o=((d??0)+(i?.length??0)-1)%(i?.length??0)),t.$$.dirty[0]&1152&&l(15,n=((d??0)+1)%(i?.length??0)),t.$$.dirty[0]&128&&ae(d),t.$$.dirty[0]&768&&l(14,r=V>=q),t.$$.dirty[0]&64&&l(13,{classes:a}=ye(k,["grid"]),a)},[p,m,g,z,s,b,k,d,q,V,i,I,R,a,r,n,v,f,c,u,se,re,fe,ue,_e,ce,me,ge]}class Ue extends pe{constructor(e){super(),ke(this,e,He,Ee,ve,{loading_status:0,show_label:1,label:2,root:17,root_url:18,elem_id:3,visible:4,value:5,style:6},null,[-1,-1])}}var Ke=Ue;const Oe=["static"],Qe=t=>({type:"Array<{ name: string } | [{ name: string }, string]>",description:"list of objects with filename and optional caption"});export{Ke as Component,Qe as document,Oe as modes}; +//# sourceMappingURL=index.50b5507a.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/index.52ad5956.js b/gradio-modified/gradio/templates/frontend/assets/index.52ad5956.js new file mode 100644 index 0000000000000000000000000000000000000000..a58c5c6e9a479b4b4b05c4cb870463e57a54f02a --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/index.52ad5956.js @@ -0,0 +1,2 @@ +import{S as D,i as E,s as q,a7 as K,e as j,c as d,a as A,b as w,f as S,m as h,g as B,a8 as C,l as N,am as F,j as g,k,n as T,o as v,A as L,F as O,t as P,h as R,aa as U,P as V,R as z,T as G,I as H,O as J,U as M,V as Q,L as W,K as y}from"./index.396f4a72.js";function X(a){let e;return{c(){e=P(a[2])},m(t,l){S(t,e,l)},p(t,l){l&4&&R(e,t[2])},d(t){t&&T(e)}}}function Y(a){let e,t,l,s,u,_,o;return t=new K({props:{show_label:a[3],$$slots:{default:[X]},$$scope:{ctx:a}}}),{c(){e=j("label"),d(t.$$.fragment),l=A(),s=j("input"),w(s,"type","number"),w(s,"class","gr-box gr-input w-full gr-text-input"),s.disabled=a[1],w(e,"class","block")},m(b,r){S(b,e,r),h(t,e,null),B(e,l),B(e,s),C(s,a[0]),u=!0,_||(o=[N(s,"input",a[6]),N(s,"keypress",a[4]),N(s,"blur",a[5])],_=!0)},p(b,[r]){const n={};r&8&&(n.show_label=b[3]),r&516&&(n.$$scope={dirty:r,ctx:b}),t.$set(n),(!u||r&2)&&(s.disabled=b[1]),r&1&&F(s.value)!==b[0]&&C(s,b[0])},i(b){u||(g(t.$$.fragment,b),u=!0)},o(b){k(t.$$.fragment,b),u=!1},d(b){b&&T(e),v(t),_=!1,L(o)}}}function Z(a,e,t){let{value:l=0}=e,{disabled:s=!1}=e,{label:u}=e,{show_label:_}=e;const o=O();function b(f){!isNaN(f)&&f!==null&&o("change",f)}async function r(f){await U(),f.key==="Enter"&&(f.preventDefault(),o("submit"))}function n(f){o("blur")}function c(){l=F(this.value),t(0,l)}return a.$$set=f=>{"value"in f&&t(0,l=f.value),"disabled"in f&&t(1,s=f.disabled),"label"in f&&t(2,u=f.label),"show_label"in f&&t(3,_=f.show_label)},a.$$.update=()=>{a.$$.dirty&1&&b(l)},[l,s,u,_,r,n,c]}class p extends D{constructor(e){super(),E(this,e,Z,Y,q,{value:0,disabled:1,label:2,show_label:3})}}function x(a){let e,t,l,s,u;const _=[a[6]];let o={};for(let n=0;n<_.length;n+=1)o=z(o,_[n]);e=new G({props:o});function b(n){a[8](n)}let r={label:a[1],show_label:a[5],disabled:a[7]==="static"};return a[0]!==void 0&&(r.value=a[0]),l=new p({props:r}),H.push(()=>J(l,"value",b)),l.$on("change",a[9]),l.$on("submit",a[10]),l.$on("blur",a[11]),{c(){d(e.$$.fragment),t=A(),d(l.$$.fragment)},m(n,c){h(e,n,c),S(n,t,c),h(l,n,c),u=!0},p(n,c){const f=c&64?M(_,[Q(n[6])]):{};e.$set(f);const m={};c&2&&(m.label=n[1]),c&32&&(m.show_label=n[5]),c&128&&(m.disabled=n[7]==="static"),!s&&c&1&&(s=!0,m.value=n[0],W(()=>s=!1)),l.$set(m)},i(n){u||(g(e.$$.fragment,n),g(l.$$.fragment,n),u=!0)},o(n){k(e.$$.fragment,n),k(l.$$.fragment,n),u=!1},d(n){v(e,n),n&&T(t),v(l,n)}}}function $(a){let e,t;return e=new V({props:{visible:a[3],elem_id:a[2],disable:typeof a[4].container=="boolean"&&!a[4].container,$$slots:{default:[x]},$$scope:{ctx:a}}}),{c(){d(e.$$.fragment)},m(l,s){h(e,l,s),t=!0},p(l,[s]){const u={};s&8&&(u.visible=l[3]),s&4&&(u.elem_id=l[2]),s&16&&(u.disable=typeof l[4].container=="boolean"&&!l[4].container),s&4323&&(u.$$scope={dirty:s,ctx:l}),e.$set(u)},i(l){t||(g(e.$$.fragment,l),t=!0)},o(l){k(e.$$.fragment,l),t=!1},d(l){v(e,l)}}}function ee(a,e,t){let{label:l="Number"}=e,{elem_id:s=""}=e,{visible:u=!0}=e,{style:_={}}=e,{value:o=0}=e,{show_label:b}=e,{loading_status:r}=e,{mode:n}=e;function c(i){o=i,t(0,o)}function f(i){y.call(this,a,i)}function m(i){y.call(this,a,i)}function I(i){y.call(this,a,i)}return a.$$set=i=>{"label"in i&&t(1,l=i.label),"elem_id"in i&&t(2,s=i.elem_id),"visible"in i&&t(3,u=i.visible),"style"in i&&t(4,_=i.style),"value"in i&&t(0,o=i.value),"show_label"in i&&t(5,b=i.show_label),"loading_status"in i&&t(6,r=i.loading_status),"mode"in i&&t(7,n=i.mode)},[o,l,s,u,_,b,r,n,c,f,m,I]}class le extends D{constructor(e){super(),E(this,e,ee,$,q,{label:1,elem_id:2,visible:3,style:4,value:0,show_label:5,loading_status:6,mode:7})}}var te=le;const ne=["static","dynamic"],se=a=>({type:"number",description:"numeric value",example_data:a.value??1});export{te as Component,se as document,ne as modes}; +//# sourceMappingURL=index.52ad5956.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/index.52c17744.js b/gradio-modified/gradio/templates/frontend/assets/index.52c17744.js new file mode 100644 index 0000000000000000000000000000000000000000..14891bd2f3b46004e51054f0e9b72a0642dbae9d --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/index.52c17744.js @@ -0,0 +1,2 @@ +import{S as q,i as E,s as F,a7 as O,e as C,t as I,f as k,g as S,h as K,n as D,c as h,a as L,b as P,ae as R,m,af as T,l as U,j as g,k as w,o as v,C as V,F as z,ag as A,P as G,R as H,T as J,I as M,O as N,U as Q,V as W,L as X,K as Y}from"./index.396f4a72.js";function j(a,l,t){const n=a.slice();return n[7]=l[t],n}function Z(a){let l;return{c(){l=I(a[1])},m(t,n){k(t,l,n)},p(t,n){n&2&&K(l,t[1])},d(t){t&&D(l)}}}function B(a){let l,t=a[7]+"",n,s;return{c(){l=C("option"),n=I(t),l.__value=s=a[7],l.value=l.__value},m(i,_){k(i,l,_),S(l,n)},p(i,_){_&4&&t!==(t=i[7]+"")&&K(n,t),_&4&&s!==(s=i[7])&&(l.__value=s,l.value=l.__value)},d(i){i&&D(l)}}}function y(a){let l,t,n,s,i,_,d;t=new O({props:{show_label:a[4],$$slots:{default:[Z]},$$scope:{ctx:a}}});let r=a[2],u=[];for(let e=0;ea[5].call(s))},m(e,c){k(e,l,c),m(t,l,null),S(l,n),S(l,s);for(let b=0;b{"label"in e&&t(1,n=e.label),"value"in e&&t(0,s=e.value),"choices"in e&&t(2,i=e.choices),"disabled"in e&&t(3,_=e.disabled),"show_label"in e&&t(4,d=e.show_label)},a.$$.update=()=>{a.$$.dirty&1&&r("change",s)},[s,n,i,_,d,u]}class x extends q{constructor(l){super(),E(this,l,p,y,F,{label:1,value:0,choices:2,disabled:3,show_label:4})}}function $(a){let l,t,n,s,i;const _=[a[7]];let d={};for(let e=0;e<_.length;e+=1)d=H(d,_[e]);l=new J({props:d});function r(e){a[9](e)}let u={choices:a[4],label:a[1],show_label:a[5],disabled:a[8]==="static"};return a[0]!==void 0&&(u.value=a[0]),n=new x({props:u}),M.push(()=>N(n,"value",r)),n.$on("change",a[10]),{c(){h(l.$$.fragment),t=L(),h(n.$$.fragment)},m(e,c){m(l,e,c),k(e,t,c),m(n,e,c),i=!0},p(e,c){const b=c&128?Q(_,[W(e[7])]):{};l.$set(b);const f={};c&16&&(f.choices=e[4]),c&2&&(f.label=e[1]),c&32&&(f.show_label=e[5]),c&256&&(f.disabled=e[8]==="static"),!s&&c&1&&(s=!0,f.value=e[0],X(()=>s=!1)),n.$set(f)},i(e){i||(g(l.$$.fragment,e),g(n.$$.fragment,e),i=!0)},o(e){w(l.$$.fragment,e),w(n.$$.fragment,e),i=!1},d(e){v(l,e),e&&D(t),v(n,e)}}}function ee(a){let l,t;return l=new G({props:{visible:a[3],elem_id:a[2],disable:typeof a[6].container=="boolean"&&!a[6].container,$$slots:{default:[$]},$$scope:{ctx:a}}}),{c(){h(l.$$.fragment)},m(n,s){m(l,n,s),t=!0},p(n,[s]){const i={};s&8&&(i.visible=n[3]),s&4&&(i.elem_id=n[2]),s&64&&(i.disable=typeof n[6].container=="boolean"&&!n[6].container),s&2483&&(i.$$scope={dirty:s,ctx:n}),l.$set(i)},i(n){t||(g(l.$$.fragment,n),t=!0)},o(n){w(l.$$.fragment,n),t=!1},d(n){v(l,n)}}}function le(a,l,t){let{label:n="Dropdown"}=l,{elem_id:s=""}=l,{visible:i=!0}=l,{value:_=""}=l,{choices:d}=l,{show_label:r}=l,{style:u={}}=l,{loading_status:e}=l,{mode:c}=l;function b(o){_=o,t(0,_)}function f(o){Y.call(this,a,o)}return a.$$set=o=>{"label"in o&&t(1,n=o.label),"elem_id"in o&&t(2,s=o.elem_id),"visible"in o&&t(3,i=o.visible),"value"in o&&t(0,_=o.value),"choices"in o&&t(4,d=o.choices),"show_label"in o&&t(5,r=o.show_label),"style"in o&&t(6,u=o.style),"loading_status"in o&&t(7,e=o.loading_status),"mode"in o&&t(8,c=o.mode)},[_,n,s,i,d,r,u,e,c,b,f]}class te extends q{constructor(l){super(),E(this,l,le,ee,F,{label:1,elem_id:2,visible:3,value:0,choices:4,show_label:5,style:6,loading_status:7,mode:8})}}var ne=te;const se=["static","dynamic"],ie=a=>({type:"string",description:"selected choice",example_data:a.choices.length?a.choices[0]:""});export{ne as Component,ie as document,se as modes}; +//# sourceMappingURL=index.52c17744.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/index.536d0e14.js b/gradio-modified/gradio/templates/frontend/assets/index.536d0e14.js new file mode 100644 index 0000000000000000000000000000000000000000..2d105289308392ae9555275bd914448ab40b292d --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/index.536d0e14.js @@ -0,0 +1,2 @@ +import{T as s}from"./index.396f4a72.js";const o=["static"];export{s as Component,o as modes}; +//# sourceMappingURL=index.536d0e14.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/index.5cfaf6ac.js b/gradio-modified/gradio/templates/frontend/assets/index.5cfaf6ac.js new file mode 100644 index 0000000000000000000000000000000000000000..a333218ffca2abe6c116c7dea63fe2146a9ee94a --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/index.5cfaf6ac.js @@ -0,0 +1,2 @@ +import{S as Z,i as A,s as D,w as R,b as d,f as v,g as b,x as H,n as h,B as z,e as g,a as j,t as N,Y as S,h as E,C as K,d as C,P as O,c as L,m as M,j as k,k as p,o as B,F as Q,R as W,T as X,U as x,V as $,D as T,E as Y}from"./index.396f4a72.js";import{B as ee}from"./BlockLabel.37da86a3.js";function le(a){let e,n;return{c(){e=R("svg"),n=R("path"),d(n,"fill","currentColor"),d(n,"d","M4 2H2v26a2 2 0 0 0 2 2h26v-2H4v-3h22v-8H4v-4h14V5H4Zm20 17v4H4v-4ZM16 7v4H4V7Z"),d(e,"xmlns","http://www.w3.org/2000/svg"),d(e,"xmlns:xlink","http://www.w3.org/1999/xlink"),d(e,"aria-hidden","true"),d(e,"role","img"),d(e,"class","iconify iconify--carbon"),d(e,"width","100%"),d(e,"height","100%"),d(e,"preserveAspectRatio","xMidYMid meet"),d(e,"viewBox","0 0 32 32")},m(l,t){v(l,e,t),b(e,n)},p:H,i:H,o:H,d(l){l&&h(e)}}}class G extends Z{constructor(e){super(),A(this,e,null,le,D,{})}}function q(a,e,n){const l=a.slice();return l[3]=e[n],l}function F(a){let e,n=a[0].confidences,l=[];for(let t=0;t{"value"in i&&n(0,l=i.value),"show_label"in i&&n(1,t=i.show_label),"color"in i&&n(2,o=i.color)},[l,t,o]}class oe extends Z{constructor(e){super(),A(this,e,ne,te,D,{value:0,show_label:1,color:2})}}function U(a){let e,n;return e=new ee({props:{Icon:G,label:a[4],disable:typeof a[5].container=="boolean"&&!a[5].container}}),{c(){L(e.$$.fragment)},m(l,t){M(e,l,t),n=!0},p(l,t){const o={};t&16&&(o.label=l[4]),t&32&&(o.disable=typeof l[5].container=="boolean"&&!l[5].container),e.$set(o)},i(l){n||(k(e.$$.fragment,l),n=!0)},o(l){p(e.$$.fragment,l),n=!1},d(l){B(e,l)}}}function ie(a){let e,n,l,t;return l=new G({}),{c(){e=g("div"),n=g("div"),L(l.$$.fragment),d(n,"class","h-5 dark:text-white opacity-50"),d(e,"class","h-full min-h-[6rem] flex justify-center items-center")},m(o,i){v(o,e,i),b(e,n),M(l,n,null),t=!0},p:H,i(o){t||(k(l.$$.fragment,o),t=!0)},o(o){p(l.$$.fragment,o),t=!1},d(o){o&&h(e),B(l)}}}function ae(a){let e,n;return e=new oe({props:{value:a[3],show_label:a[7],color:a[2]}}),{c(){L(e.$$.fragment)},m(l,t){M(e,l,t),n=!0},p(l,t){const o={};t&8&&(o.value=l[3]),t&128&&(o.show_label=l[7]),t&4&&(o.color=l[2]),e.$set(o)},i(l){n||(k(e.$$.fragment,l),n=!0)},o(l){p(e.$$.fragment,l),n=!1},d(l){B(e,l)}}}function se(a){let e,n,l,t,o,i,s;const c=[a[6]];let w={};for(let r=0;r{u=null}),Y());let V=t;t=y(r),t===V?f[t].p(r,m):(T(),p(f[V],1,1,()=>{f[V]=null}),Y(),o=f[t],o?o.p(r,m):(o=f[t]=_[t](r),o.c()),k(o,1),o.m(i.parentNode,i))},i(r){s||(k(e.$$.fragment,r),k(u),k(o),s=!0)},o(r){p(e.$$.fragment,r),p(u),p(o),s=!1},d(r){B(e,r),r&&h(n),u&&u.d(r),r&&h(l),f[t].d(r),r&&h(i)}}}function fe(a){let e,n;return e=new O({props:{test_id:"label",visible:a[1],elem_id:a[0],disable:typeof a[5].container=="boolean"&&!a[5].container,$$slots:{default:[se]},$$scope:{ctx:a}}}),{c(){L(e.$$.fragment)},m(l,t){M(e,l,t),n=!0},p(l,[t]){const o={};t&2&&(o.visible=l[1]),t&1&&(o.elem_id=l[0]),t&32&&(o.disable=typeof l[5].container=="boolean"&&!l[5].container),t&764&&(o.$$scope={dirty:t,ctx:l}),e.$set(o)},i(l){n||(k(e.$$.fragment,l),n=!0)},o(l){p(e.$$.fragment,l),n=!1},d(l){B(e,l)}}}function re(a,e,n){let{elem_id:l=""}=e,{visible:t=!0}=e,{color:o=void 0}=e,{value:i}=e,{label:s="Label"}=e,{style:c={}}=e,{loading_status:w}=e,{show_label:u}=e;const _=Q();return a.$$set=f=>{"elem_id"in f&&n(0,l=f.elem_id),"visible"in f&&n(1,t=f.visible),"color"in f&&n(2,o=f.color),"value"in f&&n(3,i=f.value),"label"in f&&n(4,s=f.label),"style"in f&&n(5,c=f.style),"loading_status"in f&&n(6,w=f.loading_status),"show_label"in f&&n(7,u=f.show_label)},a.$$.update=()=>{a.$$.dirty&8&&_("change")},[l,t,o,i,s,c,w,u]}class ce extends Z{constructor(e){super(),A(this,e,re,fe,D,{elem_id:0,visible:1,color:2,value:3,label:4,style:5,loading_status:6,show_label:7})}}var _e=ce;const be=["static"],me=a=>({type:"{ label: string; confidences?: Array<{ label: string; confidence: number }>",description:"output label and optional set of confidences per label"});export{_e as Component,me as document,be as modes}; +//# sourceMappingURL=index.5cfaf6ac.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/index.5d3ef6e5.js b/gradio-modified/gradio/templates/frontend/assets/index.5d3ef6e5.js new file mode 100644 index 0000000000000000000000000000000000000000..c68d14834a9d31e5f5c219fde48e6794824a5954 --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/index.5d3ef6e5.js @@ -0,0 +1,2 @@ +import{S as L,i as q,s as G,c as N,a as B,B as S,m as C,f as k,D as O,k as D,E as Q,j as U,o as I,n as h,e as A,b,g as m,x as K,t as y,h as E,C as W,F as ne,aa as fe,I as Y,O as Z,L as x,P as oe,Q as ae,X as _e,R as se,T as re,U as ue,V as ce,K as T}from"./index.396f4a72.js";import{B as $}from"./BlockLabel.37da86a3.js";import{F as R}from"./File.60a988f4.js";import{U as ee}from"./Upload.5d0148e8.js";import{M as de}from"./ModifyUpload.2cfe71e4.js";import{n as be}from"./utils.27234e1d.js";const me=o=>{let e=["B","KB","MB","GB","PB"],i=0;for(;o>1024;)o/=1024,i++;let l=e[i];return o.toFixed(1)+" "+l},j=o=>{var e;return e=o.orig_name||o.name,e.length>30?`${e.substr(0,30)}...`:e},M=o=>o.data,P=o=>{var e=0;if(Array.isArray(o))for(var i of o)i.size!==void 0&&(e+=i.size);else e=o.size||0;return me(e)};function V(o,e,i){const l=o.slice();return l[3]=e[i],l}function ge(o){let e,i,l,t;return l=new R({}),{c(){e=A("div"),i=A("div"),N(l.$$.fragment),b(i,"class","h-5 dark:text-white opacity-50"),b(e,"class","h-full min-h-[15rem] flex justify-center items-center")},m(a,f){k(a,e,f),m(e,i),C(l,i,null),t=!0},p:K,i(a){t||(U(l.$$.fragment,a),t=!0)},o(a){D(l.$$.fragment,a),t=!1},d(a){a&&h(e),I(l)}}}function we(o){let e,i;function l(f,s){return s&1&&(i=null),i==null&&(i=!!Array.isArray(f[0])),i?ke:ve}let t=l(o,-1),a=t(o);return{c(){e=A("div"),a.c(),b(e,"class","file-preview overflow-y-scroll w-full max-h-60 flex flex-col justify-between mt-7 mb-7 dark:text-slate-200")},m(f,s){k(f,e,s),a.m(e,null)},p(f,s){t===(t=l(f,s))&&a?a.p(f,s):(a.d(1),a=t(f),a&&(a.c(),a.m(e,null)))},i:K,o:K,d(f){f&&h(e),a.d()}}}function ve(o){let e,i,l=j(o[0])+"",t,a,f,s=P(o[0])+"",r,u,n,_,c,d,z;return{c(){e=A("div"),i=A("div"),t=y(l),a=B(),f=A("div"),r=y(s),u=B(),n=A("div"),_=A("a"),c=y("Download"),b(i,"class","file-name w-5/12 p-2"),b(f,"class","file-size w-3/12 p-2"),b(_,"href",d=M(o[0])),b(_,"target",window.__is_colab__?"_blank":null),b(_,"download",z=window.__is_colab__?null:j(o[0])),b(_,"class","text-indigo-600 hover:underline dark:text-indigo-300"),b(n,"class","file-size w-3/12 p-2 hover:underline"),b(e,"class","flex flex-row")},m(g,p){k(g,e,p),m(e,i),m(i,t),m(e,a),m(e,f),m(f,r),m(e,u),m(e,n),m(n,_),m(_,c)},p(g,p){p&1&&l!==(l=j(g[0])+"")&&E(t,l),p&1&&s!==(s=P(g[0])+"")&&E(r,s),p&1&&d!==(d=M(g[0]))&&b(_,"href",d),p&1&&z!==(z=window.__is_colab__?null:j(g[0]))&&b(_,"download",z)},d(g){g&&h(e)}}}function ke(o){let e,i=o[0],l=[];for(let t=0;t{r[d]=null}),Q(),t=r[l],t?t.p(n,_):(t=r[l]=s[l](n),t.c()),U(t,1),t.m(a.parentNode,a))},i(n){f||(U(e.$$.fragment,n),U(t),f=!0)},o(n){D(e.$$.fragment,n),D(t),f=!1},d(n){I(e,n),n&&h(i),r[l].d(n),n&&h(a)}}}function pe(o,e,i){let{value:l}=e,{label:t}=e,{show_label:a}=e;return o.$$set=f=>{"value"in f&&i(0,l=f.value),"label"in f&&i(1,t=f.label),"show_label"in f&&i(2,a=f.show_label)},[l,t,a]}class Ae extends L{constructor(e){super(),q(this,e,pe,he,G,{value:0,label:1,show_label:2})}}function H(o,e,i){const l=o.slice();return l[15]=e[i],l}function ze(o){let e,i,l,t,a;i=new de({props:{absolute:!0}}),i.$on("clear",o[10]);function f(u,n){return n&1&&(t=null),t==null&&(t=!!Array.isArray(u[0])),t?je:Be}let s=f(o,-1),r=s(o);return{c(){e=A("div"),N(i.$$.fragment),l=B(),r.c(),b(e,"class","file-preview overflow-y-scroll w-full max-h-60 flex flex-col justify-between mt-7 mb-7 dark:text-slate-200")},m(u,n){k(u,e,n),C(i,e,null),m(e,l),r.m(e,null),a=!0},p(u,n){s===(s=f(u,n))&&r?r.p(u,n):(r.d(1),r=s(u),r&&(r.c(),r.m(e,null)))},i(u){a||(U(i.$$.fragment,u),a=!0)},o(u){D(i.$$.fragment,u),a=!1},d(u){u&&h(e),I(i),r.d()}}}function ye(o){let e,i,l;function t(f){o[13](f)}let a={filetype:o[8],file_count:o[6],$$slots:{default:[De]},$$scope:{ctx:o}};return o[7]!==void 0&&(a.dragging=o[7]),e=new ee({props:a}),Y.push(()=>Z(e,"dragging",t)),e.$on("load",o[9]),{c(){N(e.$$.fragment)},m(f,s){C(e,f,s),l=!0},p(f,s){const r={};s&256&&(r.filetype=f[8]),s&64&&(r.file_count=f[6]),s&262158&&(r.$$scope={dirty:s,ctx:f}),!i&&s&128&&(i=!0,r.dragging=f[7],x(()=>i=!1)),e.$set(r)},i(f){l||(U(e.$$.fragment,f),l=!0)},o(f){D(e.$$.fragment,f),l=!1},d(f){I(e,f)}}}function Fe(o){let e,i,l;function t(f){o[12](f)}let a={filetype:o[8],$$slots:{default:[Ue]},$$scope:{ctx:o}};return o[7]!==void 0&&(a.dragging=o[7]),e=new ee({props:a}),Y.push(()=>Z(e,"dragging",t)),e.$on("load",o[9]),{c(){N(e.$$.fragment)},m(f,s){C(e,f,s),l=!0},p(f,s){const r={};s&256&&(r.filetype=f[8]),s&262158&&(r.$$scope={dirty:s,ctx:f}),!i&&s&128&&(i=!0,r.dragging=f[7],x(()=>i=!1)),e.$set(r)},i(f){l||(U(e.$$.fragment,f),l=!0)},o(f){D(e.$$.fragment,f),l=!1},d(f){I(e,f)}}}function Be(o){let e,i,l=j(o[0])+"",t,a,f,s=P(o[0])+"",r,u,n,_,c,d,z;return{c(){e=A("div"),i=A("div"),t=y(l),a=B(),f=A("div"),r=y(s),u=B(),n=A("div"),_=A("a"),c=y("Download"),b(i,"class","file-name p-2"),b(f,"class","file-size p-2"),b(_,"href",d=M(o[0])),b(_,"download",z=j(o[0])),b(_,"class","text-indigo-600 hover:underline dark:text-indigo-300"),b(n,"class","file-size p-2 hover:underline"),b(e,"class","flex flex-row")},m(g,p){k(g,e,p),m(e,i),m(i,t),m(e,a),m(e,f),m(f,r),m(e,u),m(e,n),m(n,_),m(_,c)},p(g,p){p&1&&l!==(l=j(g[0])+"")&&E(t,l),p&1&&s!==(s=P(g[0])+"")&&E(r,s),p&1&&d!==(d=M(g[0]))&&b(_,"href",d),p&1&&z!==(z=j(g[0]))&&b(_,"download",z)},d(g){g&&h(e)}}}function je(o){let e,i=o[0],l=[];for(let t=0;t{r[d]=null}),Q(),t=r[l],t?t.p(n,_):(t=r[l]=s[l](n),t.c()),U(t,1),t.m(a.parentNode,a))},i(n){f||(U(e.$$.fragment,n),U(t),f=!0)},o(n){D(e.$$.fragment,n),D(t),f=!1},d(n){I(e,n),n&&h(i),r[l].d(n),n&&h(a)}}}function Ne(o,e,i){let{value:l}=e,{drop_text:t="Drop a file"}=e,{or_text:a="or"}=e,{upload_text:f="click to upload"}=e,{label:s=""}=e,{show_label:r}=e,{file_count:u}=e,{file_types:n=["file"]}=e;async function _({detail:w}){i(0,l=w),await fe(),d("change",l),d("upload",w)}function c({detail:w}){i(0,l=null),d("change",l),d("clear")}const d=ne();let z="";try{n.forEach(w=>i(8,z+=w+"/*, "))}catch(w){if(w instanceof TypeError)d("error","Please set file_types to a list.");else throw w}let g=!1;function p(w){g=w,i(7,g)}function F(w){g=w,i(7,g)}return o.$$set=w=>{"value"in w&&i(0,l=w.value),"drop_text"in w&&i(1,t=w.drop_text),"or_text"in w&&i(2,a=w.or_text),"upload_text"in w&&i(3,f=w.upload_text),"label"in w&&i(4,s=w.label),"show_label"in w&&i(5,r=w.show_label),"file_count"in w&&i(6,u=w.file_count),"file_types"in w&&i(11,n=w.file_types)},o.$$.update=()=>{o.$$.dirty&128&&d("drag",g)},[l,t,a,f,s,r,u,g,z,_,c,n,p,F]}class Ce extends L{constructor(e){super(),q(this,e,Ne,Ee,G,{value:0,drop_text:1,or_text:2,upload_text:3,label:4,show_label:5,file_count:6,file_types:11})}}function Ie(o){let e,i;return e=new Ae({props:{value:o[9],label:o[4],show_label:o[5]}}),{c(){N(e.$$.fragment)},m(l,t){C(e,l,t),i=!0},p(l,t){const a={};t&512&&(a.value=l[9]),t&16&&(a.label=l[4]),t&32&&(a.show_label=l[5]),e.$set(a)},i(l){i||(U(e.$$.fragment,l),i=!0)},o(l){D(e.$$.fragment,l),i=!1},d(l){I(e,l)}}}function Me(o){let e,i;return e=new Ce({props:{label:o[4],show_label:o[5],value:o[9],file_count:o[6],file_types:o[7],drop_text:o[11]("interface.drop_file"),or_text:o[11]("or"),upload_text:o[11]("interface.click_to_upload")}}),e.$on("change",o[14]),e.$on("drag",o[15]),e.$on("change",o[16]),e.$on("clear",o[17]),e.$on("upload",o[18]),{c(){N(e.$$.fragment)},m(l,t){C(e,l,t),i=!0},p(l,t){const a={};t&16&&(a.label=l[4]),t&32&&(a.show_label=l[5]),t&512&&(a.value=l[9]),t&64&&(a.file_count=l[6]),t&128&&(a.file_types=l[7]),t&2048&&(a.drop_text=l[11]("interface.drop_file")),t&2048&&(a.or_text=l[11]("or")),t&2048&&(a.upload_text=l[11]("interface.click_to_upload")),e.$set(a)},i(l){i||(U(e.$$.fragment,l),i=!0)},o(l){D(e.$$.fragment,l),i=!1},d(l){I(e,l)}}}function Pe(o){let e,i,l,t,a,f;const s=[o[8]];let r={};for(let c=0;c{n[g]=null}),Q(),t=n[l],t?t.p(c,d):(t=n[l]=u[l](c),t.c()),U(t,1),t.m(a.parentNode,a))},i(c){f||(U(e.$$.fragment,c),U(t),f=!0)},o(c){D(e.$$.fragment,c),D(t),f=!1},d(c){I(e,c),c&&h(i),n[l].d(c),c&&h(a)}}}function Se(o){let e,i;return e=new oe({props:{visible:o[2],variant:o[3]==="dynamic"&&o[0]===null?"dashed":"solid",color:o[10]?"green":"grey",padding:!1,elem_id:o[1],$$slots:{default:[Pe]},$$scope:{ctx:o}}}),{c(){N(e.$$.fragment)},m(l,t){C(e,l,t),i=!0},p(l,[t]){const a={};t&4&&(a.visible=l[2]),t&9&&(a.variant=l[3]==="dynamic"&&l[0]===null?"dashed":"solid"),t&1024&&(a.color=l[10]?"green":"grey"),t&2&&(a.elem_id=l[1]),t&528377&&(a.$$scope={dirty:t,ctx:l}),e.$set(a)},i(l){i||(U(e.$$.fragment,l),i=!0)},o(l){D(e.$$.fragment,l),i=!1},d(l){I(e,l)}}}function Te(o,e,i){let l;ae(o,_e,v=>i(11,l=v));let{elem_id:t=""}=e,{visible:a=!0}=e,{value:f=null}=e,{mode:s}=e,{root:r}=e,{label:u}=e,{show_label:n}=e,{file_count:_}=e,{file_types:c=["file"]}=e,{root_url:d}=e,{loading_status:z}=e,g,p=!1;const F=({detail:v})=>i(0,f=v),w=({detail:v})=>i(10,p=v);function le(v){T.call(this,o,v)}function te(v){T.call(this,o,v)}function ie(v){T.call(this,o,v)}return o.$$set=v=>{"elem_id"in v&&i(1,t=v.elem_id),"visible"in v&&i(2,a=v.visible),"value"in v&&i(0,f=v.value),"mode"in v&&i(3,s=v.mode),"root"in v&&i(12,r=v.root),"label"in v&&i(4,u=v.label),"show_label"in v&&i(5,n=v.show_label),"file_count"in v&&i(6,_=v.file_count),"file_types"in v&&i(7,c=v.file_types),"root_url"in v&&i(13,d=v.root_url),"loading_status"in v&&i(8,z=v.loading_status)},o.$$.update=()=>{o.$$.dirty&12289&&i(9,g=be(f,d??r))},[f,t,a,s,u,n,_,c,z,g,p,l,r,d,F,w,le,te,ie]}class Ke extends L{constructor(e){super(),q(this,e,Te,Se,G,{elem_id:1,visible:2,value:0,mode:3,root:12,label:4,show_label:5,file_count:6,file_types:7,root_url:13,loading_status:8})}}var Ve=Ke;const Xe=["static","dynamic"],He=o=>({type:"{ name: string; data: string }",description:"file name and base64 data as an object",example_data:{name:"zip.zip",data:"data:@file/octet-stream;base64,UEsFBgAAAAAAAAAAAAAAAAAAAAAAAA=="}});export{Ve as Component,He as document,Xe as modes}; +//# sourceMappingURL=index.5d3ef6e5.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/index.64cd2c53.css b/gradio-modified/gradio/templates/frontend/assets/index.64cd2c53.css new file mode 100644 index 0000000000000000000000000000000000000000..0107402b5cf065d10c4cfd756200b56b923f0cc9 --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/index.64cd2c53.css @@ -0,0 +1 @@ +input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input{-moz-appearance:textfield}.input-number{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.input-number:hover{--tw-shadow:0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.dark .input-number{--tw-bg-opacity:1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.input-dropdown .dark .selector{background-color:#0b0f19;--tw-bg-opacity:1;background-color:rgb(11 15 25 / var(--tw-bg-opacity))}.input-dropdown .selector{--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity));--tw-shadow:0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.input-dropdown .selector:hover{--tw-shadow:0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.input-dropdown .dark .selector{--tw-bg-opacity:1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.input-dropdown .dropdown-menu{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.input-dropdown .dark .dropdown-item{background-color:#0b0f19;--tw-bg-opacity:1;background-color:rgb(11 15 25 / var(--tw-bg-opacity))}.input-dropdown .dropdown-item{--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.input-dropdown .dropdown-item:hover{font-weight:600}.input-dropdown .dark .dropdown-item{--tw-bg-opacity:1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.selected.svelte-r8ethh .check.svelte-r8ethh{opacity:1}.input-checkbox.svelte-r8ethh .dark .checkbox-item.svelte-r8ethh{background-color:#0b0f19;--tw-bg-opacity:1;background-color:rgb(11 15 25 / var(--tw-bg-opacity))}.input-checkbox.svelte-r8ethh .checkbox-item.svelte-r8ethh{--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity));--tw-shadow:0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.input-checkbox.svelte-r8ethh .checkbox-item.svelte-r8ethh:hover{--tw-shadow:0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.input-checkbox.svelte-r8ethh .dark .checkbox-item.svelte-r8ethh{--tw-bg-opacity:1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.input-checkbox.svelte-r8ethh .checkbox-item.selected.svelte-r8ethh{--tw-bg-opacity:1;background-color:rgb(245 158 11 / var(--tw-bg-opacity));--tw-text-opacity:1;color:rgb(255 255 255 / var(--tw-text-opacity))}.input-checkbox.svelte-r8ethh .dark .checkbox-item.selected.svelte-r8ethh{--tw-bg-opacity:1;background-color:rgb(220 38 38 / var(--tw-bg-opacity))}.selected.svelte-h5sk3f .check.svelte-h5sk3f{opacity:1}.input-checkbox-group.svelte-h5sk3f .dark .checkbox-item.svelte-h5sk3f{background-color:#0b0f19;--tw-bg-opacity:1;background-color:rgb(11 15 25 / var(--tw-bg-opacity))}.input-checkbox-group.svelte-h5sk3f .checkbox-item.svelte-h5sk3f{--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity));--tw-shadow:0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.input-checkbox-group.svelte-h5sk3f .checkbox-item.svelte-h5sk3f:hover{--tw-shadow:0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.input-checkbox-group.svelte-h5sk3f .dark .checkbox-item.svelte-h5sk3f{--tw-bg-opacity:1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.input-checkbox-group.svelte-h5sk3f .checkbox.svelte-h5sk3f{--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.input-checkbox-group.svelte-h5sk3f .dark .checkbox.svelte-h5sk3f{--tw-bg-opacity:1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.input-checkbox-group.svelte-h5sk3f .checkbox-item.selected.svelte-h5sk3f{--tw-bg-opacity:1;background-color:rgb(245 158 11 / var(--tw-bg-opacity));--tw-text-opacity:1;color:rgb(255 255 255 / var(--tw-text-opacity))}.input-checkbox-group.svelte-h5sk3f .dark .checkbox-item.selected.svelte-h5sk3f{--tw-bg-opacity:1;background-color:rgb(220 38 38 / var(--tw-bg-opacity))}.input-checkbox-group.svelte-h5sk3f .selected .checkbox.svelte-h5sk3f{--tw-bg-opacity:1;background-color:rgb(217 119 6 / var(--tw-bg-opacity))}.input-checkbox-group.svelte-h5sk3f .dark .selected .checkbox.svelte-h5sk3f{--tw-bg-opacity:1;background-color:rgb(185 28 28 / var(--tw-bg-opacity))}.range.svelte-3aijhr.svelte-3aijhr::-webkit-slider-thumb{-webkit-appearance:none;height:1.25rem;width:1.25rem;cursor:pointer;appearance:none;border-radius:.25rem}.range.svelte-3aijhr.svelte-3aijhr::-moz-range-thumb{height:1.25rem;width:1.25rem;cursor:pointer;appearance:none;border-radius:.25rem}.input-slider.svelte-3aijhr .dark .range.svelte-3aijhr{background-color:#0b0f19;--tw-bg-opacity:1;background-color:rgb(11 15 25 / var(--tw-bg-opacity))}.input-slider.svelte-3aijhr .range.svelte-3aijhr{height:.75rem;--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity));--tw-shadow:0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.input-slider.svelte-3aijhr .range.svelte-3aijhr:hover{--tw-shadow:0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.input-slider.svelte-3aijhr .dark .range.svelte-3aijhr{--tw-bg-opacity:1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.input-slider.svelte-3aijhr .range.svelte-3aijhr::-webkit-slider-thumb{background-image:linear-gradient(to bottom,var(--tw-gradient-stops));--tw-gradient-from:#fbbf24;--tw-gradient-to:rgb(251 191 36 / 0);--tw-gradient-stops:var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to:#f59e0b;--tw-shadow:0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.input-slider.svelte-3aijhr .dark .range.svelte-3aijhr::-webkit-slider-thumb{--tw-gradient-from:#ef4444;--tw-gradient-to:rgb(239 68 68 / 0);--tw-gradient-stops:var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to:#dc2626}.input-slider.svelte-3aijhr .range.svelte-3aijhr::-moz-range-thumb{background-image:linear-gradient(to bottom,var(--tw-gradient-stops));--tw-gradient-from:#fbbf24;--tw-gradient-to:rgb(251 191 36 / 0);--tw-gradient-stops:var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to:#f59e0b;--tw-shadow:0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.input-radio.svelte-145r163 .dark .radio-item.svelte-145r163{background-color:#0b0f19;--tw-bg-opacity:1;background-color:rgb(11 15 25 / var(--tw-bg-opacity))}.input-radio.svelte-145r163 .radio-item.svelte-145r163{--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity));--tw-shadow:0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.input-radio.svelte-145r163 .radio-item.svelte-145r163:hover{--tw-shadow:0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.input-radio.svelte-145r163 .dark .radio-item.svelte-145r163{--tw-bg-opacity:1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.input-radio.svelte-145r163 .radio-circle.svelte-145r163{box-sizing:border-box;height:1rem;width:1rem;border-radius:9999px}.input-radio.svelte-145r163 .radio-item.selected.svelte-145r163{--tw-bg-opacity:1;background-color:rgb(245 158 11 / var(--tw-bg-opacity));--tw-text-opacity:1;color:rgb(255 255 255 / var(--tw-text-opacity));--tw-shadow:0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.input-radio.svelte-145r163 .dark .radio-item.selected.svelte-145r163{--tw-bg-opacity:1;background-color:rgb(220 38 38 / var(--tw-bg-opacity))} diff --git a/gradio-modified/gradio/templates/frontend/assets/index.64f1ca39.js b/gradio-modified/gradio/templates/frontend/assets/index.64f1ca39.js new file mode 100644 index 0000000000000000000000000000000000000000..be6128db34c2cd62551dfa89e85f5aaa1cce955d --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/index.64f1ca39.js @@ -0,0 +1,5 @@ +import{S as me,i as ce,s as be,w as Pe,b as c,f as y,g as E,x as j,n as S,e as P,d as A,l as R,y as de,z as Ve,t as C,h as N,A as re,B as ue,a as z,C as ul,c as q,m as G,j as F,k as T,o as Z,D as ge,E as he,F as He,G as Ml,H as Fl,I as Me,J as Il,_ as Ue,K as X,L as ol,M as Re,N as Tl,O as _l,P as Bl,Q as Dl,X as Ll,R as Ul,T as Cl,U as Nl,V as Ol}from"./index.396f4a72.js";import{U as Kl}from"./Upload.5d0148e8.js";import{M as jl}from"./ModifyUpload.2cfe71e4.js";import{B as dl}from"./BlockLabel.37da86a3.js";import{n as zl}from"./utils.27234e1d.js";function Ql(l){let e,i,n,a;return{c(){e=Pe("svg"),i=Pe("path"),n=Pe("circle"),a=Pe("circle"),c(i,"d","M9 18V5l12-2v13"),c(n,"cx","6"),c(n,"cy","18"),c(n,"r","3"),c(a,"cx","18"),c(a,"cy","16"),c(a,"r","3"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"width","100%"),c(e,"height","100%"),c(e,"viewBox","0 0 24 24"),c(e,"fill","none"),c(e,"stroke","currentColor"),c(e,"stroke-width","1.5"),c(e,"stroke-linecap","round"),c(e,"stroke-linejoin","round"),c(e,"class","feather feather-music")},m(f,t){y(f,e,t),E(e,i),E(e,n),E(e,a)},p:j,i:j,o:j,d(f){f&&S(e)}}}class Be extends me{constructor(e){super(),ce(this,e,null,Ql,be,{})}}function Ce(l,e,i){const n=l.slice();return n[27]=e[i],n[29]=i,n}function Ne(l){let e,i,n,a,f=(l[6]==="label"||l[7]==="label")&&Oe(l);return{c(){e=P("span"),f&&f.c(),c(e,"class","pip first"),c(e,"style",i=l[14]+": 0%;"),A(e,"selected",l[17](l[0])),A(e,"in-range",l[16](l[0]))},m(t,u){y(t,e,u),f&&f.m(e,null),n||(a=[R(e,"click",function(){de(l[20](l[0]))&&l[20](l[0]).apply(this,arguments)}),R(e,"touchend",Ve(function(){de(l[20](l[0]))&&l[20](l[0]).apply(this,arguments)}))],n=!0)},p(t,u){l=t,l[6]==="label"||l[7]==="label"?f?f.p(l,u):(f=Oe(l),f.c(),f.m(e,null)):f&&(f.d(1),f=null),u&16384&&i!==(i=l[14]+": 0%;")&&c(e,"style",i),u&131073&&A(e,"selected",l[17](l[0])),u&65537&&A(e,"in-range",l[16](l[0]))},d(t){t&&S(e),f&&f.d(),n=!1,re(a)}}}function Oe(l){let e,i=l[12](l[0],0,0)+"",n,a=l[10]&&Ke(l),f=l[11]&&je(l);return{c(){e=P("span"),a&&a.c(),n=C(i),f&&f.c(),c(e,"class","pipVal")},m(t,u){y(t,e,u),a&&a.m(e,null),E(e,n),f&&f.m(e,null)},p(t,u){t[10]?a?a.p(t,u):(a=Ke(t),a.c(),a.m(e,n)):a&&(a.d(1),a=null),u&4097&&i!==(i=t[12](t[0],0,0)+"")&&N(n,i),t[11]?f?f.p(t,u):(f=je(t),f.c(),f.m(e,null)):f&&(f.d(1),f=null)},d(t){t&&S(e),a&&a.d(),f&&f.d()}}}function Ke(l){let e,i;return{c(){e=P("span"),i=C(l[10]),c(e,"class","pipVal-prefix")},m(n,a){y(n,e,a),E(e,i)},p(n,a){a&1024&&N(i,n[10])},d(n){n&&S(e)}}}function je(l){let e,i;return{c(){e=P("span"),i=C(l[11]),c(e,"class","pipVal-suffix")},m(n,a){y(n,e,a),E(e,i)},p(n,a){a&2048&&N(i,n[11])},d(n){n&&S(e)}}}function ze(l){let e,i=Array(l[19]+1),n=[];for(let a=0;ad}=e,{focus:U=void 0}=e,{orientationStart:Y=void 0}=e,{percentOf:ee=void 0}=e,{moveHandle:W=void 0}=e;function ae(d){W(void 0,d)}return l.$$set=d=>{"range"in d&&i(21,_=d.range),"min"in d&&i(0,g=d.min),"max"in d&&i(1,o=d.max),"step"in d&&i(22,s=d.step),"values"in d&&i(23,m=d.values),"vertical"in d&&i(2,k=d.vertical),"reversed"in d&&i(3,p=d.reversed),"hoverable"in d&&i(4,h=d.hoverable),"disabled"in d&&i(5,V=d.disabled),"pipstep"in d&&i(24,w=d.pipstep),"all"in d&&i(6,I=d.all),"first"in d&&i(7,Q=d.first),"last"in d&&i(8,D=d.last),"rest"in d&&i(9,O=d.rest),"prefix"in d&&i(10,B=d.prefix),"suffix"in d&&i(11,J=d.suffix),"formatter"in d&&i(12,$=d.formatter),"focus"in d&&i(13,U=d.focus),"orientationStart"in d&&i(14,Y=d.orientationStart),"percentOf"in d&&i(15,ee=d.percentOf),"moveHandle"in d&&i(25,W=d.moveHandle)},l.$$.update=()=>{l.$$.dirty&20971527&&i(26,n=w||((o-g)/s>=(k?50:100)?(o-g)/(k?10:20):1)),l.$$.dirty&71303171&&i(19,a=parseInt((o-g)/(s*n),10)),l.$$.dirty&71303169&&i(18,f=function(d){return g+d*s*n}),l.$$.dirty&8388608&&i(17,t=function(d){return m.some(se=>se===d)}),l.$$.dirty&10485760&&i(16,u=function(d){if(_==="min")return m[0]>d;if(_==="max")return m[0]d})},[g,o,k,p,h,V,I,Q,D,O,B,J,$,U,Y,ee,u,t,f,a,ae,_,s,m,w,W,n]}class ql extends me{constructor(e){super(),ce(this,e,Xl,Yl,be,{range:21,min:0,max:1,step:22,values:23,vertical:2,reversed:3,hoverable:4,disabled:5,pipstep:24,all:6,first:7,last:8,rest:9,prefix:10,suffix:11,formatter:12,focus:13,orientationStart:14,percentOf:15,moveHandle:25})}}function $e(l,e,i){const n=l.slice();return n[63]=e[i],n[65]=i,n}function el(l){let e,i=l[21](l[63],l[65],l[23](l[63]))+"",n,a=l[18]&&ll(l),f=l[19]&&nl(l);return{c(){e=P("span"),a&&a.c(),n=C(i),f&&f.c(),c(e,"class","rangeFloat")},m(t,u){y(t,e,u),a&&a.m(e,null),E(e,n),f&&f.m(e,null)},p(t,u){t[18]?a?a.p(t,u):(a=ll(t),a.c(),a.m(e,n)):a&&(a.d(1),a=null),u[0]&10485761&&i!==(i=t[21](t[63],t[65],t[23](t[63]))+"")&&N(n,i),t[19]?f?f.p(t,u):(f=nl(t),f.c(),f.m(e,null)):f&&(f.d(1),f=null)},d(t){t&&S(e),a&&a.d(),f&&f.d()}}}function ll(l){let e,i;return{c(){e=P("span"),i=C(l[18]),c(e,"class","rangeFloat-prefix")},m(n,a){y(n,e,a),E(e,i)},p(n,a){a[0]&262144&&N(i,n[18])},d(n){n&&S(e)}}}function nl(l){let e,i;return{c(){e=P("span"),i=C(l[19]),c(e,"class","rangeFloat-suffix")},m(n,a){y(n,e,a),E(e,i)},p(n,a){a[0]&524288&&N(i,n[19])},d(n){n&&S(e)}}}function il(l){let e,i,n,a,f,t,u,_,g,o,s,m,k,p=l[7]&&el(l);return{c(){e=P("span"),i=P("span"),n=z(),p&&p.c(),c(i,"class","rangeNub"),c(e,"role","slider"),c(e,"class","rangeHandle"),c(e,"data-handle",a=l[65]),c(e,"style",f=l[28]+": "+l[29][l[65]]+"%; z-index: "+(l[26]===l[65]?3:2)+";"),c(e,"aria-valuemin",t=l[2]===!0&&l[65]===1?l[0][0]:l[3]),c(e,"aria-valuemax",u=l[2]===!0&&l[65]===0?l[0][1]:l[4]),c(e,"aria-valuenow",_=l[63]),c(e,"aria-valuetext",g=""+(l[18]+l[21](l[63],l[65],l[23](l[63]))+l[19])),c(e,"aria-orientation",o=l[6]?"vertical":"horizontal"),c(e,"aria-disabled",l[10]),c(e,"disabled",l[10]),c(e,"tabindex",s=l[10]?-1:0),A(e,"active",l[24]&&l[26]===l[65]),A(e,"press",l[25]&&l[26]===l[65])},m(h,V){y(h,e,V),E(e,i),E(e,n),p&&p.m(e,null),m||(k=[R(e,"blur",l[33]),R(e,"focus",l[34]),R(e,"keydown",l[35])],m=!0)},p(h,V){h[7]?p?p.p(h,V):(p=el(h),p.c(),p.m(e,null)):p&&(p.d(1),p=null),V[0]&872415232&&f!==(f=h[28]+": "+h[29][h[65]]+"%; z-index: "+(h[26]===h[65]?3:2)+";")&&c(e,"style",f),V[0]&13&&t!==(t=h[2]===!0&&h[65]===1?h[0][0]:h[3])&&c(e,"aria-valuemin",t),V[0]&21&&u!==(u=h[2]===!0&&h[65]===0?h[0][1]:h[4])&&c(e,"aria-valuemax",u),V[0]&1&&_!==(_=h[63])&&c(e,"aria-valuenow",_),V[0]&11272193&&g!==(g=""+(h[18]+h[21](h[63],h[65],h[23](h[63]))+h[19]))&&c(e,"aria-valuetext",g),V[0]&64&&o!==(o=h[6]?"vertical":"horizontal")&&c(e,"aria-orientation",o),V[0]&1024&&c(e,"aria-disabled",h[10]),V[0]&1024&&c(e,"disabled",h[10]),V[0]&1024&&s!==(s=h[10]?-1:0)&&c(e,"tabindex",s),V[0]&83886080&&A(e,"active",h[24]&&h[26]===h[65]),V[0]&100663296&&A(e,"press",h[25]&&h[26]===h[65])},d(h){h&&S(e),p&&p.d(),m=!1,re(k)}}}function al(l){let e,i;return{c(){e=P("span"),c(e,"class","rangeBar"),c(e,"style",i=l[28]+": "+l[31](l[29])+"%; "+l[27]+": "+l[32](l[29])+"%;")},m(n,a){y(n,e,a)},p(n,a){a[0]&939524096&&i!==(i=n[28]+": "+n[31](n[29])+"%; "+n[27]+": "+n[32](n[29])+"%;")&&c(e,"style",i)},d(n){n&&S(e)}}}function fl(l){let e,i;return e=new ql({props:{values:l[0],min:l[3],max:l[4],step:l[5],range:l[2],vertical:l[6],reversed:l[8],orientationStart:l[28],hoverable:l[9],disabled:l[10],all:l[13],first:l[14],last:l[15],rest:l[16],pipstep:l[12],prefix:l[18],suffix:l[19],formatter:l[20],focus:l[24],percentOf:l[23],moveHandle:l[30]}}),{c(){q(e.$$.fragment)},m(n,a){G(e,n,a),i=!0},p(n,a){const f={};a[0]&1&&(f.values=n[0]),a[0]&8&&(f.min=n[3]),a[0]&16&&(f.max=n[4]),a[0]&32&&(f.step=n[5]),a[0]&4&&(f.range=n[2]),a[0]&64&&(f.vertical=n[6]),a[0]&256&&(f.reversed=n[8]),a[0]&268435456&&(f.orientationStart=n[28]),a[0]&512&&(f.hoverable=n[9]),a[0]&1024&&(f.disabled=n[10]),a[0]&8192&&(f.all=n[13]),a[0]&16384&&(f.first=n[14]),a[0]&32768&&(f.last=n[15]),a[0]&65536&&(f.rest=n[16]),a[0]&4096&&(f.pipstep=n[12]),a[0]&262144&&(f.prefix=n[18]),a[0]&524288&&(f.suffix=n[19]),a[0]&1048576&&(f.formatter=n[20]),a[0]&16777216&&(f.focus=n[24]),a[0]&8388608&&(f.percentOf=n[23]),e.$set(f)},i(n){i||(F(e.$$.fragment,n),i=!0)},o(n){T(e.$$.fragment,n),i=!1},d(n){Z(e,n)}}}function Gl(l){let e,i,n,a,f,t,u=l[0],_=[];for(let s=0;s{o=null}),he()),(!a||m[0]&131072)&&c(e,"id",s[17]),m[0]&4&&A(e,"range",s[2]),m[0]&1024&&A(e,"disabled",s[10]),m[0]&512&&A(e,"hoverable",s[9]),m[0]&64&&A(e,"vertical",s[6]),m[0]&256&&A(e,"reversed",s[8]),m[0]&16777216&&A(e,"focus",s[24]),m[0]&4&&A(e,"min",s[2]==="min"),m[0]&4&&A(e,"max",s[2]==="max"),m[0]&2048&&A(e,"pips",s[11]),m[0]&122880&&A(e,"pip-labels",s[13]==="label"||s[14]==="label"||s[15]==="label"||s[16]==="label")},i(s){a||(F(o),a=!0)},o(s){T(o),a=!1},d(s){s&&S(e),ul(_,s),g&&g.d(),o&&o.d(),l[49](null),f=!1,re(t)}}}function tl(l){if(!l)return-1;for(var e=0;l=l.previousElementSibling;)e++;return e}function Te(l){return l.type.includes("touch")?l.touches[0]:l}function Zl(l,e,i){let n,a,f,t,u,_,g=j,o=()=>(g(),g=Fl(ne,r=>i(29,_=r)),ne);l.$$.on_destroy.push(()=>g());let{slider:s}=e,{range:m=!1}=e,{pushy:k=!1}=e,{min:p=0}=e,{max:h=100}=e,{step:V=1}=e,{values:w=[(h+p)/2]}=e,{vertical:I=!1}=e,{float:Q=!1}=e,{reversed:D=!1}=e,{hoverable:O=!0}=e,{disabled:B=!1}=e,{pips:J=!1}=e,{pipstep:$=void 0}=e,{all:U=void 0}=e,{first:Y=void 0}=e,{last:ee=void 0}=e,{rest:W=void 0}=e,{id:ae=void 0}=e,{prefix:d=""}=e,{suffix:se=""}=e,{formatter:ke=(r,v,M)=>r}=e,{handleFormatter:Ee=ke}=e,{precision:x=2}=e,{springValues:pe={stiffness:.15,damping:.4}}=e;const we=He();let ve=0,le=!1,fe=!1,te=!1,Ae=!1,b=w.length-1,L,K,ne;function Fe(r){const v=s.querySelectorAll(".handle"),M=Array.prototype.includes.call(v,r),H=Array.prototype.some.call(v,ie=>ie.contains(r));return M||H}function Ie(r){return m==="min"||m==="max"?r.slice(0,1):m?r.slice(0,2):r}function oe(){return s.getBoundingClientRect()}function ye(r){const v=oe();let M=0,H=0,ie=0;I?(M=r.clientY-v.top,H=M/v.height*100,H=D?H:100-H):(M=r.clientX-v.left,H=M/v.width*100,H=D?100-H:H),ie=(h-p)/100*H+p;let Le;return m===!0&&w[0]===w[1]?ie>w[1]?1:0:(Le=w.indexOf([...w].sort((Rl,Hl)=>Math.abs(ie-Rl)-Math.abs(ie-Hl))[0]),Le)}function Se(r){const v=oe();let M=0,H=0,ie=0;I?(M=r.clientY-v.top,H=M/v.height*100,H=D?H:100-H):(M=r.clientX-v.left,H=M/v.width*100,H=D?100-H:H),ie=(h-p)/100*H+p,_e(b,ie)}function _e(r,v){return v=f(v),typeof r>"u"&&(r=b),m&&(r===0&&v>w[1]?k?i(0,w[1]=v,w):v=w[1]:r===1&&vf(r))})}function De(){!B&&we("stop",{activeHandle:b,startValue:L,value:w[b],values:w.map(r=>f(r))})}function El(){!B&&we("change",{activeHandle:b,startValue:L,previousValue:typeof K>"u"?L:K,value:w[b],values:w.map(r=>f(r))})}function Pl(r){Me[r?"unshift":"push"](()=>{s=r,i(1,s)})}return l.$$set=r=>{"slider"in r&&i(1,s=r.slider),"range"in r&&i(2,m=r.range),"pushy"in r&&i(43,k=r.pushy),"min"in r&&i(3,p=r.min),"max"in r&&i(4,h=r.max),"step"in r&&i(5,V=r.step),"values"in r&&i(0,w=r.values),"vertical"in r&&i(6,I=r.vertical),"float"in r&&i(7,Q=r.float),"reversed"in r&&i(8,D=r.reversed),"hoverable"in r&&i(9,O=r.hoverable),"disabled"in r&&i(10,B=r.disabled),"pips"in r&&i(11,J=r.pips),"pipstep"in r&&i(12,$=r.pipstep),"all"in r&&i(13,U=r.all),"first"in r&&i(14,Y=r.first),"last"in r&&i(15,ee=r.last),"rest"in r&&i(16,W=r.rest),"id"in r&&i(17,ae=r.id),"prefix"in r&&i(18,d=r.prefix),"suffix"in r&&i(19,se=r.suffix),"formatter"in r&&i(20,ke=r.formatter),"handleFormatter"in r&&i(21,Ee=r.handleFormatter),"precision"in r&&i(44,x=r.precision),"springValues"in r&&i(45,pe=r.springValues)},l.$$.update=()=>{l.$$.dirty[0]&24&&i(48,a=function(r){return r<=p?p:r>=h?h:r}),l.$$.dirty[0]&56|l.$$.dirty[1]&139264&&i(47,f=function(r){if(r<=p)return p;if(r>=h)return h;let v=(r-p)%V,M=r-v;return Math.abs(v)*2>=V&&(M+=v>0?V:-V),M=a(M),parseFloat(M.toFixed(x))}),l.$$.dirty[0]&24|l.$$.dirty[1]&8192&&i(23,n=function(r){let v=(r-p)/(h-p)*100;return isNaN(v)||v<=0?0:v>=100?100:parseFloat(v.toFixed(x))}),l.$$.dirty[0]&12582937|l.$$.dirty[1]&114688&&(Array.isArray(w)||(i(0,w=[(h+p)/2]),console.error("'values' prop should be an Array (https://github.com/simeydotme/svelte-range-slider-pips#slider-props)")),i(0,w=Ie(w.map(r=>f(r)))),ve!==w.length?o(i(22,ne=Ml(w.map(r=>n(r)),pe))):ne.set(w.map(r=>n(r))),i(46,ve=w.length)),l.$$.dirty[0]&320&&i(28,t=I?D?"top":"bottom":D?"right":"left"),l.$$.dirty[0]&320&&i(27,u=I?D?"bottom":"top":D?"left":"right")},[w,s,m,p,h,V,I,Q,D,O,B,J,$,U,Y,ee,W,ae,d,se,ke,Ee,ne,n,le,te,b,u,t,_,_e,ml,cl,bl,gl,hl,kl,pl,wl,vl,Al,yl,Sl,k,x,pe,ve,f,a,Pl]}class Jl extends me{constructor(e){super(),ce(this,e,Zl,Gl,be,{slider:1,range:2,pushy:43,min:3,max:4,step:5,values:0,vertical:6,float:7,reversed:8,hoverable:9,disabled:10,pips:11,pipstep:12,all:13,first:14,last:15,rest:16,id:17,prefix:18,suffix:19,formatter:20,handleFormatter:21,precision:44,springValues:45},null,[-1,-1,-1])}}function Wl(l){let e,i,n,a,f,t,u,_,g;e=new jl({props:{editable:!0,absolute:!1}}),e.$on("clear",l[15]),e.$on("edit",l[28]);let o=l[10]==="edit"&&l[11]?.duration&&sl(l);return{c(){q(e.$$.fragment),i=z(),n=P("audio"),f=z(),o&&o.c(),t=ue(),c(n,"class","w-full h-14 p-2"),n.controls=!0,c(n,"preload","metadata"),Re(n.src,a=l[1].data)||c(n,"src",a)},m(s,m){G(e,s,m),y(s,i,m),y(s,n,m),l[29](n),y(s,f,m),o&&o.m(s,m),y(s,t,m),u=!0,_||(g=[Tl(l[16].call(null,n)),R(n,"play",l[24]),R(n,"pause",l[25]),R(n,"ended",l[26])],_=!0)},p(s,m){(!u||m[0]&2&&!Re(n.src,a=s[1].data))&&c(n,"src",a),s[10]==="edit"&&s[11]?.duration?o?(o.p(s,m),m[0]&3072&&F(o,1)):(o=sl(s),o.c(),F(o,1),o.m(t.parentNode,t)):o&&(ge(),T(o,1,1,()=>{o=null}),he())},i(s){u||(F(e.$$.fragment,s),F(o),u=!0)},o(s){T(e.$$.fragment,s),T(o),u=!1},d(s){Z(e,s),s&&S(i),s&&S(n),l[29](null),s&&S(f),o&&o.d(s),s&&S(t),_=!1,re(g)}}}function xl(l){let e,i,n,a;const f=[en,$l],t=[];function u(_,g){return _[4]==="microphone"?0:_[4]==="upload"?1:-1}return~(e=u(l))&&(i=t[e]=f[e](l)),{c(){i&&i.c(),n=ue()},m(_,g){~e&&t[e].m(_,g),y(_,n,g),a=!0},p(_,g){let o=e;e=u(_),e===o?~e&&t[e].p(_,g):(i&&(ge(),T(t[o],1,1,()=>{t[o]=null}),he()),~e?(i=t[e],i?i.p(_,g):(i=t[e]=f[e](_),i.c()),F(i,1),i.m(n.parentNode,n)):i=null)},i(_){a||(F(i),a=!0)},o(_){T(i),a=!1},d(_){~e&&t[e].d(_),_&&S(n)}}}function sl(l){let e,i,n;function a(t){l[30](t)}let f={range:!0,min:0,max:100,step:1};return l[12]!==void 0&&(f.values=l[12]),e=new Jl({props:f}),Me.push(()=>_l(e,"values",a)),e.$on("change",l[17]),{c(){q(e.$$.fragment)},m(t,u){G(e,t,u),n=!0},p(t,u){const _={};!i&&u[0]&4096&&(i=!0,_.values=t[12],ol(()=>i=!1)),e.$set(_)},i(t){n||(F(e.$$.fragment,t),n=!0)},o(t){T(e.$$.fragment,t),n=!1},d(t){Z(e,t)}}}function $l(l){let e,i,n;function a(t){l[27](t)}let f={filetype:"audio/*",$$slots:{default:[ln]},$$scope:{ctx:l}};return l[0]!==void 0&&(f.dragging=l[0]),e=new Kl({props:f}),Me.push(()=>_l(e,"dragging",a)),e.$on("load",l[18]),{c(){q(e.$$.fragment)},m(t,u){G(e,t,u),n=!0},p(t,u){const _={};u[0]&448|u[1]&512&&(_.$$scope={dirty:u,ctx:t}),!i&&u[0]&1&&(i=!0,_.dragging=t[0],ol(()=>i=!1)),e.$set(_)},i(t){n||(F(e.$$.fragment,t),n=!0)},o(t){T(e.$$.fragment,t),n=!1},d(t){Z(e,t)}}}function en(l){let e;function i(f,t){return f[9]?an:nn}let n=i(l),a=n(l);return{c(){e=P("div"),a.c(),c(e,"class","mt-6 p-2")},m(f,t){y(f,e,t),a.m(e,null)},p(f,t){n===(n=i(f))&&a?a.p(f,t):(a.d(1),a=n(f),a&&(a.c(),a.m(e,null)))},i:j,o:j,d(f){f&&S(e),a.d()}}}function ln(l){let e,i,n,a,f,t,u,_,g;return{c(){e=P("div"),i=C(l[6]),n=z(),a=P("span"),f=C("- "),t=C(l[7]),u=C(" -"),_=z(),g=C(l[8]),c(a,"class","text-gray-300"),c(e,"class","flex flex-col")},m(o,s){y(o,e,s),E(e,i),E(e,n),E(e,a),E(a,f),E(a,t),E(a,u),E(e,_),E(e,g)},p(o,s){s[0]&64&&N(i,o[6]),s[0]&128&&N(t,o[7]),s[0]&256&&N(g,o[8])},d(o){o&&S(e)}}}function nn(l){let e,i,n;return{c(){e=P("button"),e.innerHTML=` +
Record from microphone
`,c(e,"class","gr-button text-gray-800")},m(a,f){y(a,e,f),i||(n=R(e,"click",l[13]),i=!0)},p:j,d(a){a&&S(e),i=!1,n()}}}function an(l){let e,i,n;return{c(){e=P("button"),e.innerHTML=` + +
Stop recording
`,c(e,"class","gr-button !bg-red-500/10")},m(a,f){y(a,e,f),i||(n=R(e,"click",l[14]),i=!0)},p:j,d(a){a&&S(e),i=!1,n()}}}function fn(l){let e,i,n,a,f,t;e=new dl({props:{show_label:l[3],Icon:Be,label:l[2]||"Audio"}});const u=[xl,Wl],_=[];function g(o,s){return o[1]===null||o[5]?0:1}return n=g(l),a=_[n]=u[n](l),{c(){q(e.$$.fragment),i=z(),a.c(),f=ue()},m(o,s){G(e,o,s),y(o,i,s),_[n].m(o,s),y(o,f,s),t=!0},p(o,s){const m={};s[0]&8&&(m.show_label=o[3]),s[0]&4&&(m.label=o[2]||"Audio"),e.$set(m);let k=n;n=g(o),n===k?_[n].p(o,s):(ge(),T(_[k],1,1,()=>{_[k]=null}),he(),a=_[n],a?a.p(o,s):(a=_[n]=u[n](o),a.c()),F(a,1),a.m(f.parentNode,f))},i(o){t||(F(e.$$.fragment,o),F(a),t=!0)},o(o){T(e.$$.fragment,o),T(a),t=!1},d(o){Z(e,o),o&&S(i),_[n].d(o),o&&S(f)}}}const tn=500,rl=44;function sn(l){return new Promise((e,i)=>{let n=new FileReader;n.onerror=i,n.onload=()=>e(n.result),n.readAsDataURL(l)})}function rn(l,e,i){let{value:n=null}=e,{label:a}=e,{show_label:f}=e,{name:t}=e,{source:u}=e,{pending:_=!1}=e,{streaming:g=!1}=e,{drop_text:o="Drop an audio file"}=e,{or_text:s="or"}=e,{upload_text:m="click to upload"}=e,k=!1,p,h="",V,w=[],I=!1,Q,D=!1,O=[0,100],B=[],J;function $(){J=[Ue(()=>import("./module.2849491a.js"),["assets/module.2849491a.js","assets/module.e2741a44.js"]),Ue(()=>import("./module.d8037460.js"),["assets/module.d8037460.js","assets/module.e2741a44.js"])]}g&&$();const U=He(),Y=async(b,L)=>{let K=new Blob(b,{type:"audio/wav"});i(1,n={data:await sn(K),name:t}),U(L,n)};async function ee(){let b;try{b=await navigator.mediaDevices.getUserMedia({audio:!0})}catch(L){if(L instanceof DOMException&&L.name=="NotAllowedError"){U("error","Please allow access to the microphone for recording.");return}else throw L}if(b!=null){if(g){const[{MediaRecorder:L,register:K},{connect:ne}]=await Promise.all(J);await K(await ne()),p=new L(b,{mimeType:"audio/wav"});async function Fe(Ie){let oe=await Ie.data.arrayBuffer(),ye=new Uint8Array(oe);if(V||(i(21,V=new Uint8Array(oe.slice(0,rl))),ye=new Uint8Array(oe.slice(rl))),_)w.push(ye);else{let Se=[V].concat(w,[ye]);Y(Se,"stream"),i(22,w=[])}}p.addEventListener("dataavailable",Fe)}else p=new MediaRecorder(b),p.addEventListener("dataavailable",L=>{B.push(L.data)}),p.addEventListener("stop",async()=>{i(9,k=!1),await Y(B,"change"),B=[]});D=!0}}async function W(){i(9,k=!0),D||await ee(),i(21,V=void 0),g?p.start(tn):p.start()}Il(()=>{p&&p.state!=="inactive"&&p.stop()});const ae=async()=>{p.stop(),g&&(i(9,k=!1),_&&i(23,I=!0))};function d(){U("change"),U("clear"),i(10,h=""),i(1,n=null)}function se(b){function L(){const K=O[0]/100*b.duration,ne=O[1]/100*b.duration;b.currentTimene&&(b.currentTime=K,b.pause())}return b.addEventListener("timeupdate",L),{destroy:()=>b.removeEventListener("timeupdate",L)}}function ke({detail:{values:b}}){!n||(U("change",{data:n.data,name:t,crop_min:b[0],crop_max:b[1]}),U("edit"))}function Ee({detail:b}){i(1,n=b),U("change",{data:b.data,name:b.name}),U("upload",b)}let{dragging:x=!1}=e;function pe(b){X.call(this,l,b)}function we(b){X.call(this,l,b)}function ve(b){X.call(this,l,b)}function le(b){x=b,i(0,x)}const fe=()=>i(10,h="edit");function te(b){Me[b?"unshift":"push"](()=>{Q=b,i(11,Q)})}function Ae(b){O=b,i(12,O)}return l.$$set=b=>{"value"in b&&i(1,n=b.value),"label"in b&&i(2,a=b.label),"show_label"in b&&i(3,f=b.show_label),"name"in b&&i(19,t=b.name),"source"in b&&i(4,u=b.source),"pending"in b&&i(20,_=b.pending),"streaming"in b&&i(5,g=b.streaming),"drop_text"in b&&i(6,o=b.drop_text),"or_text"in b&&i(7,s=b.or_text),"upload_text"in b&&i(8,m=b.upload_text),"dragging"in b&&i(0,x=b.dragging)},l.$$.update=()=>{if(l.$$.dirty[0]&15728640&&I&&_===!1&&(i(23,I=!1),V&&w)){let b=[V].concat(w);i(22,w=[]),Y(b,"stream")}l.$$.dirty[0]&1&&U("drag",x)},[x,n,a,f,u,g,o,s,m,k,h,Q,O,W,ae,d,se,ke,Ee,t,_,V,w,I,pe,we,ve,le,fe,te,Ae]}class un extends me{constructor(e){super(),ce(this,e,rn,fn,be,{value:1,label:2,show_label:3,name:19,source:4,pending:20,streaming:5,drop_text:6,or_text:7,upload_text:8,dragging:0},null,[-1,-1])}}function on(l){let e,i,n,a;return{c(){e=P("audio"),c(e,"class","w-full h-14 p-2 mt-7"),e.controls=!0,c(e,"preload","metadata"),Re(e.src,i=l[0].data)||c(e,"src",i)},m(f,t){y(f,e,t),n||(a=[R(e,"play",l[4]),R(e,"pause",l[5]),R(e,"ended",l[6])],n=!0)},p(f,t){t&1&&!Re(e.src,i=f[0].data)&&c(e,"src",i)},i:j,o:j,d(f){f&&S(e),n=!1,re(a)}}}function _n(l){let e,i,n,a;return n=new Be({}),{c(){e=P("div"),i=P("div"),q(n.$$.fragment),c(i,"class","h-5 dark:text-white opacity-50"),c(e,"class","h-full min-h-[8rem] flex justify-center items-center")},m(f,t){y(f,e,t),E(e,i),G(n,i,null),a=!0},p:j,i(f){a||(F(n.$$.fragment,f),a=!0)},o(f){T(n.$$.fragment,f),a=!1},d(f){f&&S(e),Z(n)}}}function dn(l){let e,i,n,a,f,t;e=new dl({props:{show_label:l[2],Icon:Be,label:l[1]||"Audio"}});const u=[_n,on],_=[];function g(o,s){return o[0]===null?0:1}return n=g(l),a=_[n]=u[n](l),{c(){q(e.$$.fragment),i=z(),a.c(),f=ue()},m(o,s){G(e,o,s),y(o,i,s),_[n].m(o,s),y(o,f,s),t=!0},p(o,[s]){const m={};s&4&&(m.show_label=o[2]),s&2&&(m.label=o[1]||"Audio"),e.$set(m);let k=n;n=g(o),n===k?_[n].p(o,s):(ge(),T(_[k],1,1,()=>{_[k]=null}),he(),a=_[n],a?a.p(o,s):(a=_[n]=u[n](o),a.c()),F(a,1),a.m(f.parentNode,f))},i(o){t||(F(e.$$.fragment,o),F(a),t=!0)},o(o){T(e.$$.fragment,o),T(a),t=!1},d(o){Z(e,o),o&&S(i),_[n].d(o),o&&S(f)}}}function mn(l,e,i){let{value:n=null}=e,{label:a}=e,{name:f}=e,{show_label:t}=e;const u=He();function _(s){X.call(this,l,s)}function g(s){X.call(this,l,s)}function o(s){X.call(this,l,s)}return l.$$set=s=>{"value"in s&&i(0,n=s.value),"label"in s&&i(1,a=s.label),"name"in s&&i(3,f=s.name),"show_label"in s&&i(2,t=s.show_label)},l.$$.update=()=>{l.$$.dirty&9&&n&&u("change",{name:f,data:n?.data})},[n,a,t,f,_,g,o]}class cn extends me{constructor(e){super(),ce(this,e,mn,dn,be,{value:0,label:1,name:3,show_label:2})}}function bn(l){let e,i;return e=new cn({props:{show_label:l[8],value:l[11],name:l[11]?.name||"audio_file",label:l[7]}}),{c(){q(e.$$.fragment)},m(n,a){G(e,n,a),i=!0},p(n,a){const f={};a&256&&(f.show_label=n[8]),a&2048&&(f.value=n[11]),a&2048&&(f.name=n[11]?.name||"audio_file"),a&128&&(f.label=n[7]),e.$set(f)},i(n){i||(F(e.$$.fragment,n),i=!0)},o(n){T(e.$$.fragment,n),i=!1},d(n){Z(e,n)}}}function gn(l){let e,i;return e=new un({props:{label:l[7],show_label:l[8],value:l[11],name:l[5],source:l[6],pending:l[9],streaming:l[10],drop_text:l[13]("interface.drop_audio"),or_text:l[13]("or"),upload_text:l[13]("interface.click_to_upload")}}),e.$on("change",l[18]),e.$on("stream",l[19]),e.$on("drag",l[20]),e.$on("edit",l[21]),e.$on("play",l[22]),e.$on("pause",l[23]),e.$on("ended",l[24]),e.$on("upload",l[25]),e.$on("error",l[26]),{c(){q(e.$$.fragment)},m(n,a){G(e,n,a),i=!0},p(n,a){const f={};a&128&&(f.label=n[7]),a&256&&(f.show_label=n[8]),a&2048&&(f.value=n[11]),a&32&&(f.name=n[5]),a&64&&(f.source=n[6]),a&512&&(f.pending=n[9]),a&1024&&(f.streaming=n[10]),a&8192&&(f.drop_text=n[13]("interface.drop_audio")),a&8192&&(f.or_text=n[13]("or")),a&8192&&(f.upload_text=n[13]("interface.click_to_upload")),e.$set(f)},i(n){i||(F(e.$$.fragment,n),i=!0)},o(n){T(e.$$.fragment,n),i=!1},d(n){Z(e,n)}}}function hn(l){let e,i,n,a,f,t;const u=[l[1]];let _={};for(let m=0;m{o[h]=null}),he(),a=o[n],a?a.p(m,k):(a=o[n]=g[n](m),a.c()),F(a,1),a.m(f.parentNode,f))},i(m){t||(F(e.$$.fragment,m),F(a),t=!0)},o(m){T(e.$$.fragment,m),T(a),t=!1},d(m){Z(e,m),m&&S(i),o[n].d(m),m&&S(f)}}}function kn(l){let e,i;return e=new Bl({props:{variant:l[4]==="dynamic"&&l[0]===null&&l[6]==="upload"?"dashed":"solid",color:l[12]?"green":"grey",padding:!1,elem_id:l[2],visible:l[3],$$slots:{default:[hn]},$$scope:{ctx:l}}}),{c(){q(e.$$.fragment)},m(n,a){G(e,n,a),i=!0},p(n,[a]){const f={};a&81&&(f.variant=n[4]==="dynamic"&&n[0]===null&&n[6]==="upload"?"dashed":"solid"),a&4096&&(f.color=n[12]?"green":"grey"),a&4&&(f.elem_id=n[2]),a&8&&(f.visible=n[3]),a&134234099&&(f.$$scope={dirty:a,ctx:n}),e.$set(f)},i(n){i||(F(e.$$.fragment,n),i=!0)},o(n){T(e.$$.fragment,n),i=!1},d(n){Z(e,n)}}}function pn(l,e,i){let n;Dl(l,Ll,d=>i(13,n=d));let{style:a={}}=e;const f=He();let{elem_id:t=""}=e,{visible:u=!0}=e,{mode:_}=e,{value:g=null}=e,{name:o}=e,{source:s}=e,{label:m}=e,{root:k}=e,{show_label:p}=e,{pending:h}=e,{streaming:V}=e,{root_url:w}=e,{loading_status:I}=e,Q,D;const O=({detail:d})=>{i(0,g=d),f("change",g)},B=({detail:d})=>{i(0,g=d),f("stream",g)},J=({detail:d})=>i(12,D=d);function $(d){X.call(this,l,d)}function U(d){X.call(this,l,d)}function Y(d){X.call(this,l,d)}function ee(d){X.call(this,l,d)}function W(d){X.call(this,l,d)}const ae=({detail:d})=>{i(1,I=I||{}),i(1,I.status="error",I),i(1,I.message=d,I)};return l.$$set=d=>{"style"in d&&i(15,a=d.style),"elem_id"in d&&i(2,t=d.elem_id),"visible"in d&&i(3,u=d.visible),"mode"in d&&i(4,_=d.mode),"value"in d&&i(0,g=d.value),"name"in d&&i(5,o=d.name),"source"in d&&i(6,s=d.source),"label"in d&&i(7,m=d.label),"root"in d&&i(16,k=d.root),"show_label"in d&&i(8,p=d.show_label),"pending"in d&&i(9,h=d.pending),"streaming"in d&&i(10,V=d.streaming),"root_url"in d&&i(17,w=d.root_url),"loading_status"in d&&i(1,I=d.loading_status)},l.$$.update=()=>{l.$$.dirty&196609&&i(11,Q=zl(g,w??k))},[g,I,t,u,_,o,s,m,p,h,V,Q,D,n,f,a,k,w,O,B,J,$,U,Y,ee,W,ae]}class wn extends me{constructor(e){super(),ce(this,e,pn,kn,be,{style:15,elem_id:2,visible:3,mode:4,value:0,name:5,source:6,label:7,root:16,show_label:8,pending:9,streaming:10,root_url:17,loading_status:1})}}var En=wn;const Pn=["static","dynamic"],Rn=()=>({type:"{ name: string; data: string }",description:"audio data as base64 string",example_data:{name:"audio.wav",data:"data:audio/wav;base64,UklGRiQAAABXQVZFZm10IBAAAAABAAEARKwAAIhYAQACABAAZGF0YQAAAAA="}});export{En as Component,Rn as document,Pn as modes}; +//# sourceMappingURL=index.64f1ca39.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/index.67e8cf09.js b/gradio-modified/gradio/templates/frontend/assets/index.67e8cf09.js new file mode 100644 index 0000000000000000000000000000000000000000..e0396e80513d241a3ddf224c343d3c59ff477368 --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/index.67e8cf09.js @@ -0,0 +1,2 @@ +import{S as E,i as F,s as I,a7 as K,e as h,c as T,a as A,b as g,f as w,g as v,m as B,a8 as S,l as j,am as D,j as C,k as M,n as k,o as R,A as L,F as O,t as P,h as U,P as V,R as z,T as G,I as H,O as J,U as N,V as Q,L as W,K as X}from"./index.396f4a72.js";function Y(e){let l;return{c(){l=P(e[5])},m(a,n){w(a,l,n)},p(a,n){n&32&&U(l,a[5])},d(a){a&&k(l)}}}function Z(e){let l,a,n,_,b,m,r,f,o,t,d;return _=new K({props:{show_label:e[6],$$slots:{default:[Y]},$$scope:{ctx:e}}}),{c(){l=h("div"),a=h("div"),n=h("label"),T(_.$$.fragment),b=A(),m=h("input"),r=A(),f=h("input"),g(n,"for",e[7]),g(m,"type","number"),g(m,"class","gr-box gr-input gr-text-input text-center h-6"),g(m,"min",e[1]),g(m,"max",e[2]),g(m,"step",e[3]),m.disabled=e[4],g(a,"class","flex justify-between"),g(l,"class","w-full flex flex-col "),g(f,"type","range"),g(f,"id",e[7]),g(f,"name","cowbell"),g(f,"class","w-full disabled:cursor-not-allowed"),g(f,"min",e[1]),g(f,"max",e[2]),g(f,"step",e[3]),f.disabled=e[4]},m(s,u){w(s,l,u),v(l,a),v(a,n),B(_,n,null),v(a,b),v(a,m),S(m,e[0]),w(s,r,u),w(s,f,u),S(f,e[0]),o=!0,t||(d=[j(m,"input",e[10]),j(m,"blur",e[8]),j(f,"change",e[11]),j(f,"input",e[11])],t=!0)},p(s,[u]){const c={};u&64&&(c.show_label=s[6]),u&8224&&(c.$$scope={dirty:u,ctx:s}),_.$set(c),(!o||u&2)&&g(m,"min",s[1]),(!o||u&4)&&g(m,"max",s[2]),(!o||u&8)&&g(m,"step",s[3]),(!o||u&16)&&(m.disabled=s[4]),u&1&&D(m.value)!==s[0]&&S(m,s[0]),(!o||u&2)&&g(f,"min",s[1]),(!o||u&4)&&g(f,"max",s[2]),(!o||u&8)&&g(f,"step",s[3]),(!o||u&16)&&(f.disabled=s[4]),u&1&&S(f,s[0])},i(s){o||(C(_.$$.fragment,s),o=!0)},o(s){M(_.$$.fragment,s),o=!1},d(s){s&&k(l),R(_),s&&k(r),s&&k(f),t=!1,L(d)}}}let y=0;function p(e,l,a){let{value:n=0}=l,{style:_={}}=l,{minimum:b=0}=l,{maximum:m=100}=l,{step:r=1}=l,{disabled:f=!1}=l,{label:o}=l,{show_label:t}=l;const d=`range_id_${y++}`,s=O(),u=()=>a(0,n=Math.min(Math.max(n,b),m));function c(){n=D(this.value),a(0,n)}function q(){n=D(this.value),a(0,n)}return e.$$set=i=>{"value"in i&&a(0,n=i.value),"style"in i&&a(9,_=i.style),"minimum"in i&&a(1,b=i.minimum),"maximum"in i&&a(2,m=i.maximum),"step"in i&&a(3,r=i.step),"disabled"in i&&a(4,f=i.disabled),"label"in i&&a(5,o=i.label),"show_label"in i&&a(6,t=i.show_label)},e.$$.update=()=>{e.$$.dirty&1&&s("change",n)},[n,b,m,r,f,o,t,d,u,_,c,q]}class x extends E{constructor(l){super(),F(this,l,p,Z,I,{value:0,style:9,minimum:1,maximum:2,step:3,disabled:4,label:5,show_label:6})}}function $(e){let l,a,n,_,b;const m=[e[10]];let r={};for(let t=0;tJ(n,"value",f)),n.$on("change",e[12]),{c(){T(l.$$.fragment),a=A(),T(n.$$.fragment)},m(t,d){B(l,t,d),w(t,a,d),B(n,t,d),b=!0},p(t,d){const s=d&1024?N(m,[Q(t[10])]):{};l.$set(s);const u={};d&8&&(u.label=t[3]),d&512&&(u.show_label=t[9]),d&32&&(u.minimum=t[5]),d&64&&(u.maximum=t[6]),d&128&&(u.step=t[7]),d&16&&(u.style=t[4]),d&256&&(u.disabled=t[8]==="static"),!_&&d&1&&(_=!0,u.value=t[0],W(()=>_=!1)),n.$set(u)},i(t){b||(C(l.$$.fragment,t),C(n.$$.fragment,t),b=!0)},o(t){M(l.$$.fragment,t),M(n.$$.fragment,t),b=!1},d(t){R(l,t),t&&k(a),R(n,t)}}}function ee(e){let l,a;return l=new V({props:{visible:e[2],elem_id:e[1],disable:typeof e[4].container=="boolean"&&!e[4].container,$$slots:{default:[$]},$$scope:{ctx:e}}}),{c(){T(l.$$.fragment)},m(n,_){B(l,n,_),a=!0},p(n,[_]){const b={};_&4&&(b.visible=n[2]),_&2&&(b.elem_id=n[1]),_&16&&(b.disable=typeof n[4].container=="boolean"&&!n[4].container),_&10233&&(b.$$scope={dirty:_,ctx:n}),l.$set(b)},i(n){a||(C(l.$$.fragment,n),a=!0)},o(n){M(l.$$.fragment,n),a=!1},d(n){R(l,n)}}}function le(e,l,a){let{elem_id:n=""}=l,{visible:_=!0}=l,{value:b=0}=l,{label:m="Slider"}=l,{style:r={}}=l,{minimum:f}=l,{maximum:o}=l,{step:t}=l,{mode:d}=l,{show_label:s}=l,{loading_status:u}=l;function c(i){b=i,a(0,b)}function q(i){X.call(this,e,i)}return e.$$set=i=>{"elem_id"in i&&a(1,n=i.elem_id),"visible"in i&&a(2,_=i.visible),"value"in i&&a(0,b=i.value),"label"in i&&a(3,m=i.label),"style"in i&&a(4,r=i.style),"minimum"in i&&a(5,f=i.minimum),"maximum"in i&&a(6,o=i.maximum),"step"in i&&a(7,t=i.step),"mode"in i&&a(8,d=i.mode),"show_label"in i&&a(9,s=i.show_label),"loading_status"in i&&a(10,u=i.loading_status)},[b,n,_,m,r,f,o,t,d,s,u,c,q]}class ae extends E{constructor(l){super(),F(this,l,le,ee,I,{elem_id:1,visible:2,value:0,label:3,style:4,minimum:5,maximum:6,step:7,mode:8,show_label:9,loading_status:10})}}var ie=ae;const te=["static","dynamic"],se=e=>({type:"number",description:"selected value",example_data:e.value??e.minimum});export{ie as Component,se as document,te as modes}; +//# sourceMappingURL=index.67e8cf09.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/index.6b09b320.js b/gradio-modified/gradio/templates/frontend/assets/index.6b09b320.js new file mode 100644 index 0000000000000000000000000000000000000000..b167137379ac3b403eb5cf29048dc34116a896d5 --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/index.6b09b320.js @@ -0,0 +1,2 @@ +import{S as f,i as _,s as c,P as m,c as d,m as b,j as r,k as u,o as p,p as g,u as v,q as $,r as k}from"./index.396f4a72.js";function h(o){let s;const l=o[2].default,e=g(l,o,o[3],null);return{c(){e&&e.c()},m(t,n){e&&e.m(t,n),s=!0},p(t,n){e&&e.p&&(!s||n&8)&&v(e,l,t,t[3],s?k(l,t[3],n,null):$(t[3]),null)},i(t){s||(r(e,t),s=!0)},o(t){u(e,t),s=!1},d(t){e&&e.d(t)}}}function B(o){let s,l;return s=new m({props:{elem_id:o[0],visible:o[1],explicit_call:!0,$$slots:{default:[h]},$$scope:{ctx:o}}}),{c(){d(s.$$.fragment)},m(e,t){b(s,e,t),l=!0},p(e,[t]){const n={};t&1&&(n.elem_id=e[0]),t&2&&(n.visible=e[1]),t&8&&(n.$$scope={dirty:t,ctx:e}),s.$set(n)},i(e){l||(r(s.$$.fragment,e),l=!0)},o(e){u(s.$$.fragment,e),l=!1},d(e){p(s,e)}}}function q(o,s,l){let{$$slots:e={},$$scope:t}=s,{elem_id:n}=s,{visible:a=!0}=s;return o.$$set=i=>{"elem_id"in i&&l(0,n=i.elem_id),"visible"in i&&l(1,a=i.visible),"$$scope"in i&&l(3,t=i.$$scope)},[n,a,e,t]}class C extends f{constructor(s){super(),_(this,s,q,B,c,{elem_id:0,visible:1})}}var j=C;const w=["static"];export{j as Component,w as modes}; +//# sourceMappingURL=index.6b09b320.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/index.712d6db6.css b/gradio-modified/gradio/templates/frontend/assets/index.712d6db6.css new file mode 100644 index 0000000000000000000000000000000000000000..95c42cec798028dfb22a8042718ab313251a5faf --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/index.712d6db6.css @@ -0,0 +1 @@ +.rangeSlider{--pip:var(--range-pip, lightslategray);--pip-text:var(--range-pip-text, var(--pip));--pip-active:var(--range-pip-active, darkslategrey);--pip-active-text:var(--range-pip-active-text, var(--pip-active));--pip-hover:var(--range-pip-hover, darkslategrey);--pip-hover-text:var(--range-pip-hover-text, var(--pip-hover));--pip-in-range:var(--range-pip-in-range, var(--pip-active));--pip-in-range-text:var(--range-pip-in-range-text, var(--pip-active-text))}.rangePips{position:absolute;height:1em;left:0;right:0;bottom:-1em}.rangePips.vertical{height:auto;width:1em;inset:0 auto 0 100%}.rangePips .pip{height:.4em;position:absolute;top:.25em;width:1px;white-space:nowrap}.rangePips.vertical .pip{height:1px;width:.4em;left:.25em;top:auto;bottom:auto}.rangePips .pipVal{position:absolute;top:.4em;transform:translate(-50%,25%)}.rangePips.vertical .pipVal{position:absolute;top:0;left:.4em;transform:translate(25%,-50%)}.rangePips .pip{transition:all .15s ease}.rangePips .pipVal{transition:all .15s ease,font-weight 0s linear}.rangePips .pip{color:#789;color:var(--pip-text);background-color:#789;background-color:var(--pip)}.rangePips .pip.selected{color:#2f4f4f;color:var(--pip-active-text);background-color:#2f4f4f;background-color:var(--pip-active)}.rangePips.hoverable:not(.disabled) .pip:hover{color:#2f4f4f;color:var(--pip-hover-text);background-color:#2f4f4f;background-color:var(--pip-hover)}.rangePips .pip.in-range{color:#2f4f4f;color:var(--pip-in-range-text);background-color:#2f4f4f;background-color:var(--pip-in-range)}.rangePips .pip.selected{height:.75em}.rangePips.vertical .pip.selected{height:1px;width:.75em}.rangePips .pip.selected .pipVal{font-weight:700;top:.75em}.rangePips.vertical .pip.selected .pipVal{top:0;left:.75em}.rangePips.hoverable:not(.disabled) .pip:not(.selected):hover{transition:none}.rangePips.hoverable:not(.disabled) .pip:not(.selected):hover .pipVal{transition:none;font-weight:700}.rangeSlider{--slider:var(--range-slider, #d7dada);--handle-inactive:var(--range-handle-inactive, #99a2a2);--handle:var(--range-handle, #838de7);--handle-focus:var(--range-handle-focus, #4a40d4);--handle-border:var(--range-handle-border, var(--handle));--range-inactive:var(--range-range-inactive, var(--handle-inactive));--range:var(--range-range, var(--handle-focus));--float-inactive:var(--range-float-inactive, var(--handle-inactive));--float:var(--range-float, var(--handle-focus));--float-text:var(--range-float-text, white);position:relative;border-radius:100px;height:.5em;margin:1em;transition:opacity .2s ease;user-select:none}.rangeSlider *{user-select:none}.rangeSlider.pips{margin-bottom:1.8em}.rangeSlider.pip-labels{margin-bottom:2.8em}.rangeSlider.vertical{display:inline-block;border-radius:100px;width:.5em;min-height:200px}.rangeSlider.vertical.pips{margin-right:1.8em;margin-bottom:1em}.rangeSlider.vertical.pip-labels{margin-right:2.8em;margin-bottom:1em}.rangeSlider .rangeHandle{position:absolute;display:block;height:1.4em;width:1.4em;top:.25em;bottom:auto;transform:translateY(-50%) translate(-50%);z-index:2}.rangeSlider.reversed .rangeHandle{transform:translateY(-50%) translate(50%)}.rangeSlider.vertical .rangeHandle{left:.25em;top:auto;transform:translateY(50%) translate(-50%)}.rangeSlider.vertical.reversed .rangeHandle{transform:translateY(-50%) translate(-50%)}.rangeSlider .rangeNub,.rangeSlider .rangeHandle:before{position:absolute;left:0;top:0;display:block;border-radius:10em;height:100%;width:100%;transition:box-shadow .2s ease}.rangeSlider .rangeHandle:before{content:"";inset:1px;height:auto;width:auto;box-shadow:0 0 0 0 var(--handle-border);opacity:0}.rangeSlider.hoverable:not(.disabled) .rangeHandle:hover:before{box-shadow:0 0 0 8px var(--handle-border);opacity:.2}.rangeSlider.hoverable:not(.disabled) .rangeHandle.press:before,.rangeSlider.hoverable:not(.disabled) .rangeHandle.press:hover:before{box-shadow:0 0 0 12px var(--handle-border);opacity:.4}.rangeSlider.range:not(.min):not(.max) .rangeNub{border-radius:10em 10em 10em 1.6em}.rangeSlider.range .rangeHandle:nth-of-type(1) .rangeNub{transform:rotate(-135deg)}.rangeSlider.range .rangeHandle:nth-of-type(2) .rangeNub{transform:rotate(45deg)}.rangeSlider.range.reversed .rangeHandle:nth-of-type(1) .rangeNub{transform:rotate(45deg)}.rangeSlider.range.reversed .rangeHandle:nth-of-type(2) .rangeNub{transform:rotate(-135deg)}.rangeSlider.range.vertical .rangeHandle:nth-of-type(1) .rangeNub{transform:rotate(135deg)}.rangeSlider.range.vertical .rangeHandle:nth-of-type(2) .rangeNub{transform:rotate(-45deg)}.rangeSlider.range.vertical.reversed .rangeHandle:nth-of-type(1) .rangeNub{transform:rotate(-45deg)}.rangeSlider.range.vertical.reversed .rangeHandle:nth-of-type(2) .rangeNub{transform:rotate(135deg)}.rangeSlider .rangeFloat{display:block;position:absolute;left:50%;top:-.5em;transform:translate(-50%,-100%);text-align:center;opacity:0;pointer-events:none;white-space:nowrap;transition:all .2s ease;font-size:.9em;padding:.2em .4em;border-radius:.2em}.rangeSlider .rangeHandle.active .rangeFloat,.rangeSlider.hoverable .rangeHandle:hover .rangeFloat{opacity:1;top:-.2em;transform:translate(-50%,-100%)}.rangeSlider .rangeBar{position:absolute;display:block;transition:background .2s ease;border-radius:1em;height:.5em;top:0;user-select:none;z-index:1}.rangeSlider.vertical .rangeBar{width:.5em;height:auto}.rangeSlider{background-color:#d7dada;background-color:var(--slider)}.rangeSlider .rangeBar{background-color:#99a2a2;background-color:var(--range-inactive)}.rangeSlider.focus .rangeBar{background-color:#838de7;background-color:var(--range)}.rangeSlider .rangeNub{background-color:#99a2a2;background-color:var(--handle-inactive)}.rangeSlider.focus .rangeNub{background-color:#838de7;background-color:var(--handle)}.rangeSlider .rangeHandle.active .rangeNub{background-color:#4a40d4;background-color:var(--handle-focus)}.rangeSlider .rangeFloat{color:#fff;color:var(--float-text);background-color:#99a2a2;background-color:var(--float-inactive)}.rangeSlider.focus .rangeFloat{background-color:#4a40d4;background-color:var(--float)}.rangeSlider.disabled{opacity:.5}.rangeSlider.disabled .rangeNub{background-color:#d7dada;background-color:var(--slider)} diff --git a/gradio-modified/gradio/templates/frontend/assets/index.72f44ebf.css b/gradio-modified/gradio/templates/frontend/assets/index.72f44ebf.css new file mode 100644 index 0000000000000000000000000000000000000000..a8e10d6bda88dc19be39927585e164648344d37f --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/index.72f44ebf.css @@ -0,0 +1 @@ +.chat-message.svelte-1kgfmmo img{border-radius:13px;max-width:30vw} diff --git a/gradio-modified/gradio/templates/frontend/assets/index.75c2aff1.js b/gradio-modified/gradio/templates/frontend/assets/index.75c2aff1.js new file mode 100644 index 0000000000000000000000000000000000000000..3fd0418e2dea6249289c54a34d8551605ac51da3 --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/index.75c2aff1.js @@ -0,0 +1,2 @@ +import{S as q,i as A,s as D,a7 as I,e as w,a as T,t as E,b as d,d as j,f as g,g as k,l as K,h as F,n as m,c as v,m as C,j as y,k as G,o as S,C as L,F as P,Z as R,P as U,R as V,T as Z,I as z,O as H,U as J,V as M,L as N,K as Q}from"./index.396f4a72.js";function B(l,e,t){const s=l.slice();return s[10]=e[t],s}function W(l){let e;return{c(){e=E(l[3])},m(t,s){g(t,e,s)},p(t,s){s&8&&F(e,t[3])},d(t){t&&m(e)}}}function O(l){let e,t,s,c,o,u=l[10]+"",n,f,b,a;function r(){return l[8](l[10])}return{c(){e=w("label"),t=w("input"),c=T(),o=w("span"),n=E(u),t.disabled=l[2],t.checked=s=l[0].includes(l[10]),d(t,"type","checkbox"),d(t,"name","test"),d(t,"class","gr-check-radio gr-checkbox"),d(o,"class","ml-2"),d(e,"class",f="gr-input-label flex items-center text-gray-700 text-sm space-x-2 border py-1.5 px-3 rounded-lg cursor-pointer bg-white shadow-sm checked:shadow-inner "+l[5]),j(e,"!cursor-not-allowed",l[2])},m(h,i){g(h,e,i),k(e,t),k(e,c),k(e,o),k(o,n),b||(a=K(t,"change",r),b=!0)},p(h,i){l=h,i&4&&(t.disabled=l[2]),i&3&&s!==(s=l[0].includes(l[10]))&&(t.checked=s),i&2&&u!==(u=l[10]+"")&&F(n,u),i&32&&f!==(f="gr-input-label flex items-center text-gray-700 text-sm space-x-2 border py-1.5 px-3 rounded-lg cursor-pointer bg-white shadow-sm checked:shadow-inner "+l[5])&&d(e,"class",f),i&36&&j(e,"!cursor-not-allowed",l[2])},d(h){h&&m(e),b=!1,a()}}}function X(l){let e,t,s,c;e=new I({props:{show_label:l[4],$$slots:{default:[W]},$$scope:{ctx:l}}});let o=l[1],u=[];for(let n=0;n{c.includes(i)?c.splice(c.indexOf(i),1):c.push(i),a("change",c),t(0,c)},h=i=>r(i);return l.$$set=i=>{"value"in i&&t(0,c=i.value),"style"in i&&t(7,o=i.style),"choices"in i&&t(1,u=i.choices),"disabled"in i&&t(2,n=i.disabled),"label"in i&&t(3,f=i.label),"show_label"in i&&t(4,b=i.show_label)},l.$$.update=()=>{l.$$.dirty&128&&t(5,{item_container:s}=R(o,["item_container"]),s)},[c,u,n,f,b,s,r,o,h]}class p extends q{constructor(e){super(),A(this,e,Y,X,D,{value:0,style:7,choices:1,disabled:2,label:3,show_label:4})}}function x(l){let e,t,s,c,o;const u=[l[8]];let n={};for(let a=0;aH(s,"value",f)),s.$on("change",l[10]),{c(){v(e.$$.fragment),t=T(),v(s.$$.fragment)},m(a,r){C(e,a,r),g(a,t,r),C(s,a,r),o=!0},p(a,r){const h=r&256?J(u,[M(a[8])]):{};e.$set(h);const i={};r&8&&(i.choices=a[3]),r&64&&(i.label=a[6]),r&16&&(i.style=a[4]),r&128&&(i.show_label=a[7]),r&32&&(i.disabled=a[5]==="static"),!c&&r&1&&(c=!0,i.value=a[0],N(()=>c=!1)),s.$set(i)},i(a){o||(y(e.$$.fragment,a),y(s.$$.fragment,a),o=!0)},o(a){G(e.$$.fragment,a),G(s.$$.fragment,a),o=!1},d(a){S(e,a),a&&m(t),S(s,a)}}}function $(l){let e,t;return e=new U({props:{visible:l[2],elem_id:l[1],type:"fieldset",disable:typeof l[4].container=="boolean"&&!l[4].container,$$slots:{default:[x]},$$scope:{ctx:l}}}),{c(){v(e.$$.fragment)},m(s,c){C(e,s,c),t=!0},p(s,[c]){const o={};c&4&&(o.visible=s[2]),c&2&&(o.elem_id=s[1]),c&16&&(o.disable=typeof s[4].container=="boolean"&&!s[4].container),c&2553&&(o.$$scope={dirty:c,ctx:s}),e.$set(o)},i(s){t||(y(e.$$.fragment,s),t=!0)},o(s){G(e.$$.fragment,s),t=!1},d(s){S(e,s)}}}function ee(l,e,t){let{elem_id:s=""}=e,{visible:c=!0}=e,{value:o=[]}=e,{choices:u}=e,{style:n={}}=e,{mode:f}=e,{label:b="Checkbox Group"}=e,{show_label:a}=e,{loading_status:r}=e;function h(_){o=_,t(0,o)}function i(_){Q.call(this,l,_)}return l.$$set=_=>{"elem_id"in _&&t(1,s=_.elem_id),"visible"in _&&t(2,c=_.visible),"value"in _&&t(0,o=_.value),"choices"in _&&t(3,u=_.choices),"style"in _&&t(4,n=_.style),"mode"in _&&t(5,f=_.mode),"label"in _&&t(6,b=_.label),"show_label"in _&&t(7,a=_.show_label),"loading_status"in _&&t(8,r=_.loading_status)},[o,s,c,u,n,f,b,a,r,h,i]}class le extends q{constructor(e){super(),A(this,e,ee,$,D,{elem_id:1,visible:2,value:0,choices:3,style:4,mode:5,label:6,show_label:7,loading_status:8})}}var se=le;const ae=["static","dynamic"],ne=l=>({type:"Array",description:"list of selected choices",example_data:l.choices.length?[l.choices[0]]:[]});export{se as Component,ne as document,ae as modes}; +//# sourceMappingURL=index.75c2aff1.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/index.7a93f874.css b/gradio-modified/gradio/templates/frontend/assets/index.7a93f874.css new file mode 100644 index 0000000000000000000000000000000000000000..09a78b61537bec9361f7de86d0c04138bd97418c --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/index.7a93f874.css @@ -0,0 +1 @@ +.hl.svelte-o4yfdm+.hl.svelte-o4yfdm{margin-left:.25rem}.textspan.svelte-o4yfdm:last-child>.label.svelte-o4yfdm{margin-right:0} diff --git a/gradio-modified/gradio/templates/frontend/assets/index.7b27e54c.js b/gradio-modified/gradio/templates/frontend/assets/index.7b27e54c.js new file mode 100644 index 0000000000000000000000000000000000000000..bd6998add382231dfdd916a3cc399e0d2b461a98 --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/index.7b27e54c.js @@ -0,0 +1,2 @@ +import{S as s,i as o,s as a}from"./index.396f4a72.js";class n extends s{constructor(e){super(),o(this,e,null,null,a,{})}}var i=n;const l=["static"],r=t=>({type:"Any",description:"stored state value",example_data:""});export{i as Component,r as document,l as modes}; +//# sourceMappingURL=index.7b27e54c.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/index.7c49f899.js b/gradio-modified/gradio/templates/frontend/assets/index.7c49f899.js new file mode 100644 index 0000000000000000000000000000000000000000..d0532efb7556792d10268424bd04e5018bbf494a --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/index.7c49f899.js @@ -0,0 +1,2 @@ +import{S as g,i as $,s as b,e as h,t as y,b as v,f as C,g as k,h as z,n as w,p as I,a as A,d as _,u as S,q,r as j,j as f,k as c,a2 as D,Q as E,J,c as L,m as O,o as Q}from"./index.396f4a72.js";import{a as R}from"./CarouselItem.svelte_svelte_type_style_lang.cc0aed40.js";function p(n){let t,l;return{c(){t=h("div"),l=y(n[0]),v(t,"class","absolute left-0 top-0 py-1 px-2 rounded-br-lg shadow-sm text-xs text-gray-500 flex items-center pointer-events-none bg-white z-20 dark:bg-gray-800")},m(s,e){C(s,t,e),k(t,l)},p(s,e){e&1&&z(l,s[0])},d(s){s&&w(t)}}}function U(n){let t,l,s,e=n[0]&&p(n);const a=n[5].default,r=I(a,n,n[4],null);return{c(){t=h("div"),e&&e.c(),l=A(),r&&r.c(),v(t,"class","carousel-item hidden component min-h-[200px] border rounded-lg overflow-hidden relative svelte-89gglt"),_(t,"!block",n[1]===n[3])},m(o,i){C(o,t,i),e&&e.m(t,null),k(t,l),r&&r.m(t,null),s=!0},p(o,[i]){o[0]?e?e.p(o,i):(e=p(o),e.c(),e.m(t,l)):e&&(e.d(1),e=null),r&&r.p&&(!s||i&16)&&S(r,a,o,o[4],s?j(a,o[4],i,null):q(o[4]),null),i&10&&_(t,"!block",o[1]===o[3])},i(o){s||(f(r,o),s=!0)},o(o){c(r,o),s=!1},d(o){o&&w(t),e&&e.d(),r&&r.d(o)}}}function B(n,t,l){let s,{$$slots:e={},$$scope:a}=t,{label:r=void 0}=t;const{register:o,unregister:i,current:m}=D(R);E(n,m,u=>l(1,s=u));let d=o();return J(()=>i(d)),n.$$set=u=>{"label"in u&&l(0,r=u.label),"$$scope"in u&&l(4,a=u.$$scope)},[r,s,m,d,a,e]}class F extends g{constructor(t){super(),$(this,t,B,U,b,{label:0})}}function G(n){let t;const l=n[0].default,s=I(l,n,n[1],null);return{c(){s&&s.c()},m(e,a){s&&s.m(e,a),t=!0},p(e,a){s&&s.p&&(!t||a&2)&&S(s,l,e,e[1],t?j(l,e[1],a,null):q(e[1]),null)},i(e){t||(f(s,e),t=!0)},o(e){c(s,e),t=!1},d(e){s&&s.d(e)}}}function H(n){let t,l;return t=new F({props:{$$slots:{default:[G]},$$scope:{ctx:n}}}),{c(){L(t.$$.fragment)},m(s,e){O(t,s,e),l=!0},p(s,[e]){const a={};e&2&&(a.$$scope={dirty:e,ctx:s}),t.$set(a)},i(s){l||(f(t.$$.fragment,s),l=!0)},o(s){c(t.$$.fragment,s),l=!1},d(s){Q(t,s)}}}function K(n,t,l){let{$$slots:s={},$$scope:e}=t;return n.$$set=a=>{"$$scope"in a&&l(1,e=a.$$scope)},[s,e]}class M extends g{constructor(t){super(),$(this,t,K,H,b,{})}}var T=M;const V=["static"];export{T as Component,V as modes}; +//# sourceMappingURL=index.7c49f899.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/index.803c5e11.css b/gradio-modified/gradio/templates/frontend/assets/index.803c5e11.css new file mode 100644 index 0000000000000000000000000000000000000000..bca8fc3e5366c4dbbeef359caafacb668d901e99 --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/index.803c5e11.css @@ -0,0 +1 @@ +div.svelte-10ogue4>*:not(.absolute){border-radius:0!important}div.svelte-10ogue4>*:first-child{border-top-left-radius:.5rem!important;border-top-right-radius:.5rem!important}div.svelte-10ogue4>*:last-child{border-bottom-left-radius:.5rem!important;border-bottom-right-radius:.5rem!important}div.svelte-10ogue4>*+*:not(.absolute){border-top-width:0px!important} diff --git a/gradio-modified/gradio/templates/frontend/assets/index.8560880f.js b/gradio-modified/gradio/templates/frontend/assets/index.8560880f.js new file mode 100644 index 0000000000000000000000000000000000000000..8bc1f10be22dd7759764e3402871238664715b6b --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/index.8560880f.js @@ -0,0 +1,6 @@ +import{S as V,i as A,s as E,w as P,b as d,f as m,g as k,x as y,n as b,e as j,a as O,d as R,D as N,k as v,E as S,j as p,t as h,h as J,B as L,c as B,m as C,o as T,C as K,l as M,ae as x,an as ee,al as q,ao as te,J as le,P as ne,Q as ie,X as oe,F as re,R as se,T as ae,U as ce,V as fe}from"./index.396f4a72.js";import{B as ue}from"./BlockLabel.37da86a3.js";function _e(c){let e,t;return{c(){e=P("svg"),t=P("path"),d(t,"fill","currentColor"),d(t,"d","M5 3h2v2H5v5a2 2 0 0 1-2 2a2 2 0 0 1 2 2v5h2v2H5c-1.07-.27-2-.9-2-2v-4a2 2 0 0 0-2-2H0v-2h1a2 2 0 0 0 2-2V5a2 2 0 0 1 2-2m14 0a2 2 0 0 1 2 2v4a2 2 0 0 0 2 2h1v2h-1a2 2 0 0 0-2 2v4a2 2 0 0 1-2 2h-2v-2h2v-5a2 2 0 0 1 2-2a2 2 0 0 1-2-2V5h-2V3h2m-7 12a1 1 0 0 1 1 1a1 1 0 0 1-1 1a1 1 0 0 1-1-1a1 1 0 0 1 1-1m-4 0a1 1 0 0 1 1 1a1 1 0 0 1-1 1a1 1 0 0 1-1-1a1 1 0 0 1 1-1m8 0a1 1 0 0 1 1 1a1 1 0 0 1-1 1a1 1 0 0 1-1-1a1 1 0 0 1 1-1Z"),d(e,"xmlns","http://www.w3.org/2000/svg"),d(e,"xmlns:xlink","http://www.w3.org/1999/xlink"),d(e,"aria-hidden","true"),d(e,"role","img"),d(e,"class","iconify iconify--mdi"),d(e,"width","100%"),d(e,"height","100%"),d(e,"preserveAspectRatio","xMidYMid meet"),d(e,"viewBox","0 0 24 24")},m(n,i){m(n,e,i),k(e,t)},p:y,i:y,o:y,d(n){n&&b(e)}}}class W extends V{constructor(e){super(),A(this,e,null,_e,E,{})}}function z(c,e,t){const n=c.slice();return n[5]=e[t],n[7]=t,n}function F(c,e,t){const n=c.slice();return n[5]=e[t],n[7]=t,n}function de(c){let e,t;return{c(){e=j("div"),t=h(c[1]),d(e,"class","json-item inline"),d(e,"item-type","other")},m(n,i){m(n,e,i),k(e,t)},p(n,i){i&2&&J(t,n[1])},i:y,o:y,d(n){n&&b(e)}}}function me(c){let e,t;return{c(){e=j("div"),t=h(c[1]),d(e,"class","json-item inline text-blue-500"),d(e,"item-type","number")},m(n,i){m(n,e,i),k(e,t)},p(n,i){i&2&&J(t,n[1])},i:y,o:y,d(n){n&&b(e)}}}function be(c){let e,t=c[1].toLocaleString()+"",n;return{c(){e=j("div"),n=h(t),d(e,"class","json-item inline text-red-500"),d(e,"item-type","boolean")},m(i,o){m(i,e,o),k(e,n)},p(i,o){o&2&&t!==(t=i[1].toLocaleString()+"")&&J(n,t)},i:y,o:y,d(i){i&&b(e)}}}function pe(c){let e,t,n,i;return{c(){e=j("div"),t=h('"'),n=h(c[1]),i=h('"'),d(e,"class","json-item inline text-green-500"),d(e,"item-type","string")},m(o,s){m(o,e,s),k(e,t),k(e,n),k(e,i)},p(o,s){s&2&&J(n,o[1])},i:y,o:y,d(o){o&&b(e)}}}function ke(c){let e;return{c(){e=j("div"),e.textContent="null",d(e,"class","json-item inline text-gray-500 dark:text-gray-400"),d(e,"item-type","null")},m(t,n){m(t,e,n)},p:y,i:y,o:y,d(t){t&&b(e)}}}function ge(c){let e,t,n,i;const o=[ye,he],s=[];function u(l,a){return l[0]?0:1}return e=u(c),t=s[e]=o[e](c),{c(){t.c(),n=L()},m(l,a){s[e].m(l,a),m(l,n,a),i=!0},p(l,a){let r=e;e=u(l),e===r?s[e].p(l,a):(N(),v(s[r],1,1,()=>{s[r]=null}),S(),t=s[e],t?t.p(l,a):(t=s[e]=o[e](l),t.c()),p(t,1),t.m(n.parentNode,n))},i(l){i||(p(t),i=!0)},o(l){v(t),i=!1},d(l){s[e].d(l),l&&b(n)}}}function ve(c){let e,t,n,i;const o=[we,je],s=[];function u(l,a){return l[0]?0:1}return e=u(c),t=s[e]=o[e](c),{c(){t.c(),n=L()},m(l,a){s[e].m(l,a),m(l,n,a),i=!0},p(l,a){let r=e;e=u(l),e===r?s[e].p(l,a):(N(),v(s[r],1,1,()=>{s[r]=null}),S(),t=s[e],t?t.p(l,a):(t=s[e]=o[e](l),t.c()),p(t,1),t.m(n.parentNode,n))},i(l){i||(p(t),i=!0)},o(l){v(t),i=!1},d(l){s[e].d(l),l&&b(n)}}}function he(c){let e,t,n,i,o=Object.entries(c[1]),s=[];for(let l=0;lv(s[l],1,1,()=>{s[l]=null});return{c(){e=h(`{\r + `),t=j("div");for(let l=0;lv(s[l],1,1,()=>{s[l]=null});return{c(){e=h(`[\r + `),t=j("div");for(let l=0;l{l[g]=null}),S(),o=l[i],o?o.p(r,f):(o=l[i]=u[i](r),o.c()),p(o,1),o.m(n,null))},i(r){s||(p(o),s=!0)},o(r){v(o),s=!1},d(r){r&&b(e),r&&b(t),r&&b(n),l[i].d()}}}function Ne(c,e,t){let{value:n}=e,{depth:i}=e,{collapsed:o=i>4}=e;const s=()=>{t(0,o=!1)},u=()=>{t(0,o=!1)};return c.$$set=l=>{"value"in l&&t(1,n=l.value),"depth"in l&&t(2,i=l.depth),"collapsed"in l&&t(0,o=l.collapsed)},[o,n,i,s,u]}class I extends V{constructor(e){super(),A(this,e,Ne,Oe,E,{value:1,depth:2,collapsed:0})}}function Z(c){let e,t,n,i;return{c(){e=j("span"),e.textContent="COPIED",d(e,"class","font-bold dark:text-green-400 text-green-600 py-1 px-2 absolute block w-full text-left bg-white dark:bg-gray-900")},m(o,s){m(o,e,s),i=!0},i(o){i||(x(()=>{n&&n.end(1),t=ee(e,q,{duration:100}),t.start()}),i=!0)},o(o){t&&t.invalidate(),n=te(e,q,{duration:350}),i=!1},d(o){o&&b(e),o&&n&&n.end()}}}function Se(c){let e,t,n,i,o,s,u,l,a,r=c[2]&&Z();return s=new I({props:{value:c[0],depth:0}}),{c(){e=j("button"),t=j("span"),n=h(c[1]),i=O(),r&&r.c(),o=O(),B(s.$$.fragment),d(t,"class","py-1 px-2"),d(e,"class","transition-color overflow-hidden font-sans absolute right-0 top-0 rounded-bl-lg shadow-sm text-xs text-gray-500 flex items-center bg-white z-20 border-l border-b border-gray-100 dark:text-slate-200")},m(f,g){m(f,e,g),k(e,t),k(t,n),k(e,i),r&&r.m(e,null),m(f,o,g),C(s,f,g),u=!0,l||(a=M(e,"click",c[3]),l=!0)},p(f,[g]){(!u||g&2)&&J(n,f[1]),f[2]?r?g&4&&p(r,1):(r=Z(),r.c(),p(r,1),r.m(e,null)):r&&(N(),v(r,1,1,()=>{r=null}),S());const D={};g&1&&(D.value=f[0]),s.$set(D)},i(f){u||(p(r),p(s.$$.fragment,f),u=!0)},o(f){v(r),v(s.$$.fragment,f),u=!1},d(f){f&&b(e),r&&r.d(),f&&b(o),T(s,f),l=!1,a()}}}function Je(c,e,t){let{value:n={}}=e,{copy_to_clipboard:i="copy to clipboard"}=e,o=!1,s;function u(){t(2,o=!0),s&&clearTimeout(s),s=setTimeout(()=>{t(2,o=!1)},1e3)}async function l(){"clipboard"in navigator&&(await navigator.clipboard.writeText(JSON.stringify(n,null,2)),u())}return le(()=>{s&&clearTimeout(s)}),c.$$set=a=>{"value"in a&&t(0,n=a.value),"copy_to_clipboard"in a&&t(1,i=a.copy_to_clipboard)},[n,i,o,l]}class Be extends V{constructor(e){super(),A(this,e,Je,Se,E,{value:0,copy_to_clipboard:1})}}function G(c){let e,t;return e=new ue({props:{Icon:W,label:c[4],disable:typeof c[5].container=="boolean"&&!c[5].container}}),{c(){B(e.$$.fragment)},m(n,i){C(e,n,i),t=!0},p(n,i){const o={};i&16&&(o.label=n[4]),i&32&&(o.disable=typeof n[5].container=="boolean"&&!n[5].container),e.$set(o)},i(n){t||(p(e.$$.fragment,n),t=!0)},o(n){v(e.$$.fragment,n),t=!1},d(n){T(e,n)}}}function Ce(c){let e,t,n,i;return n=new W({}),{c(){e=j("div"),t=j("div"),B(n.$$.fragment),d(t,"class","h-7 dark:text-white opacity-50"),d(e,"class","h-full min-h-[6rem] flex justify-center items-center")},m(o,s){m(o,e,s),k(e,t),C(n,t,null),i=!0},p:y,i(o){i||(p(n.$$.fragment,o),i=!0)},o(o){v(n.$$.fragment,o),i=!1},d(o){o&&b(e),T(n)}}}function Te(c){let e,t;return e=new Be({props:{value:c[2],copy_to_clipboard:c[6]("interface.copy_to_clipboard")}}),{c(){B(e.$$.fragment)},m(n,i){C(e,n,i),t=!0},p(n,i){const o={};i&4&&(o.value=n[2]),i&64&&(o.copy_to_clipboard=n[6]("interface.copy_to_clipboard")),e.$set(o)},i(n){t||(p(e.$$.fragment,n),t=!0)},o(n){v(e.$$.fragment,n),t=!1},d(n){T(e,n)}}}function De(c){let e,t,n,i,o,s,u,l=c[4]&&G(c);const a=[c[3]];let r={};for(let _=0;_{l=null}),S());const $=w&8?ce(a,[fe(_[3])]):{};t.$set($);let H=i;i=D(_),i===H?g[i].p(_,w):(N(),v(g[H],1,1,()=>{g[H]=null}),S(),o=g[i],o?o.p(_,w):(o=g[i]=f[i](_),o.c()),p(o,1),o.m(s.parentNode,s))},i(_){u||(p(l),p(t.$$.fragment,_),p(o),u=!0)},o(_){v(l),v(t.$$.fragment,_),v(o),u=!1},d(_){l&&l.d(_),_&&b(e),T(t,_),_&&b(n),g[i].d(_),_&&b(s)}}}function Ve(c){let e,t;return e=new ne({props:{visible:c[1],test_id:"json",elem_id:c[0],disable:typeof c[5].container=="boolean"&&!c[5].container,$$slots:{default:[De]},$$scope:{ctx:c}}}),{c(){B(e.$$.fragment)},m(n,i){C(e,n,i),t=!0},p(n,[i]){const o={};i&2&&(o.visible=n[1]),i&1&&(o.elem_id=n[0]),i&32&&(o.disable=typeof n[5].container=="boolean"&&!n[5].container),i&380&&(o.$$scope={dirty:i,ctx:n}),e.$set(o)},i(n){t||(p(e.$$.fragment,n),t=!0)},o(n){v(e.$$.fragment,n),t=!1},d(n){T(e,n)}}}function Ae(c,e,t){let n;ie(c,oe,f=>t(6,n=f));let{elem_id:i=""}=e,{visible:o=!0}=e,{value:s}=e,{loading_status:u}=e,{label:l}=e,{style:a={}}=e;const r=re();return c.$$set=f=>{"elem_id"in f&&t(0,i=f.elem_id),"visible"in f&&t(1,o=f.visible),"value"in f&&t(2,s=f.value),"loading_status"in f&&t(3,u=f.loading_status),"label"in f&&t(4,l=f.label),"style"in f&&t(5,a=f.style)},c.$$.update=()=>{c.$$.dirty&4&&r("change")},[i,o,s,u,l,a,n]}class Ee extends V{constructor(e){super(),A(this,e,Ae,Ve,E,{elem_id:0,visible:1,value:2,loading_status:3,label:4,style:5})}}var Me=Ee;const Ie=["static"],Pe=c=>({type:"Object | Array",description:"JSON object"});export{Me as Component,Pe as document,Ie as modes}; +//# sourceMappingURL=index.8560880f.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/index.9578e2e6.js b/gradio-modified/gradio/templates/frontend/assets/index.9578e2e6.js new file mode 100644 index 0000000000000000000000000000000000000000..acd5d5d4e98304997f17adb5c58649d72b523cd2 --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/index.9578e2e6.js @@ -0,0 +1,2 @@ +import{S as r,i as h,s as g,p as c,e as d,b as o,d as f,f as q,u as v,q as b,r as w,j as C,k as R,n as S}from"./index.396f4a72.js";function j(s){let e,a;const u=s[5].default,t=c(u,s,s[4],null);return{c(){e=d("div"),t&&t.c(),o(e,"class","flex row w-full flex-wrap gap-4"),o(e,"id",s[1]),f(e,"gr-compact",s[3]==="compact"),f(e,"gr-panel",s[3]==="panel"),f(e,"unequal-height",s[0].equal_height===!1),f(e,"items-stretch",s[0].equal_height),f(e,"!hidden",!s[2])},m(l,i){q(l,e,i),t&&t.m(e,null),a=!0},p(l,[i]){t&&t.p&&(!a||i&16)&&v(t,u,l,l[4],a?w(u,l[4],i,null):b(l[4]),null),(!a||i&2)&&o(e,"id",l[1]),i&8&&f(e,"gr-compact",l[3]==="compact"),i&8&&f(e,"gr-panel",l[3]==="panel"),i&1&&f(e,"unequal-height",l[0].equal_height===!1),i&1&&f(e,"items-stretch",l[0].equal_height),i&4&&f(e,"!hidden",!l[2])},i(l){a||(C(t,l),a=!0)},o(l){R(t,l),a=!1},d(l){l&&S(e),t&&t.d(l)}}}function k(s,e,a){let{$$slots:u={},$$scope:t}=e,{style:l={}}=e,{elem_id:i}=e,{visible:_=!0}=e,{variant:m="default"}=e;return s.$$set=n=>{"style"in n&&a(0,l=n.style),"elem_id"in n&&a(1,i=n.elem_id),"visible"in n&&a(2,_=n.visible),"variant"in n&&a(3,m=n.variant),"$$scope"in n&&a(4,t=n.$$scope)},[l,i,_,m,t,u]}class z extends r{constructor(e){super(),h(this,e,k,j,g,{style:0,elem_id:1,visible:2,variant:3})}}var B=z;const D=["static"];export{B as Component,D as modes}; +//# sourceMappingURL=index.9578e2e6.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/index.971764a6.js b/gradio-modified/gradio/templates/frontend/assets/index.971764a6.js new file mode 100644 index 0000000000000000000000000000000000000000..057fede8c7d0c95671b763e6c85b5049ad284061 --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/index.971764a6.js @@ -0,0 +1,2 @@ +import{S as w,i as j,s as q,e as b,t as A,a as v,c as S,b as g,d as p,f as y,g as d,m as z,l as B,h as D,j as C,k,n as E,o as F,p as G,u as H,q as I,r as J}from"./index.396f4a72.js";import{C as K}from"./Column.06c172ac.js";function L(l){let e;const s=l[6].default,t=G(s,l,l[7],null);return{c(){t&&t.c()},m(n,i){t&&t.m(n,i),e=!0},p(n,i){t&&t.p&&(!e||i&128)&&H(t,s,n,n[7],e?J(s,n[7],i,null):I(n[7]),null)},i(n){e||(C(t,n),e=!0)},o(n){k(t,n),e=!1},d(n){t&&t.d(n)}}}function M(l){let e,s,t,n,i,u,m,r,f,_,o;return r=new K({props:{visible:l[3],$$slots:{default:[L]},$$scope:{ctx:l}}}),{c(){e=b("div"),s=b("div"),t=b("span"),n=A(l[0]),i=v(),u=b("span"),u.textContent="\u25BC",m=v(),S(r.$$.fragment),g(u,"class","transition"),p(u,"rotate-90",!l[3]),g(s,"class","w-full flex justify-between cursor-pointer"),g(e,"id",l[1]),g(e,"class","p-3 border border-gray-200 dark:border-gray-700 rounded-lg flex flex-col gap-3 hover:border-gray-300 dark:hover:border-gray-600 transition"),p(e,"hidden",!l[2])},m(a,c){y(a,e,c),d(e,s),d(s,t),d(t,n),d(s,i),d(s,u),d(e,m),z(r,e,null),f=!0,_||(o=B(s,"click",l[4]),_=!0)},p(a,[c]){(!f||c&1)&&D(n,a[0]),c&8&&p(u,"rotate-90",!a[3]);const h={};c&8&&(h.visible=a[3]),c&128&&(h.$$scope={dirty:c,ctx:a}),r.$set(h),(!f||c&2)&&g(e,"id",a[1]),c&4&&p(e,"hidden",!a[2])},i(a){f||(C(r.$$.fragment,a),f=!0)},o(a){k(r.$$.fragment,a),f=!1},d(a){a&&E(e),F(r),_=!1,o()}}}function N(l,e,s){let t,{$$slots:n={},$$scope:i}=e,{label:u}=e,{elem_id:m}=e,{visible:r=!0}=e,{open:f=!0}=e;const _=()=>{s(3,t=!t)};return l.$$set=o=>{"label"in o&&s(0,u=o.label),"elem_id"in o&&s(1,m=o.elem_id),"visible"in o&&s(2,r=o.visible),"open"in o&&s(5,f=o.open),"$$scope"in o&&s(7,i=o.$$scope)},l.$$.update=()=>{l.$$.dirty&32&&s(3,t=f)},[u,m,r,t,_,f,n,i]}class O extends w{constructor(e){super(),j(this,e,N,M,q,{label:0,elem_id:1,visible:2,open:5})}}var R=O;const T=["static"];export{R as Component,T as modes}; +//# sourceMappingURL=index.971764a6.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/index.977bc8b5.js b/gradio-modified/gradio/templates/frontend/assets/index.977bc8b5.js new file mode 100644 index 0000000000000000000000000000000000000000..a4c8d9df6dab3362c89a90961d64ab709d1ecc53 --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/index.977bc8b5.js @@ -0,0 +1,3 @@ +import{S as Q,i as W,s as Z,w as B,b as f,f as y,g as E,x as O,n as w,e as T,t as U,Y as X,ae as ye,ai as we,h as Y,a as D,C as q,B as I,N as Le,y as Ee,F as ge,ad as je,a6 as G,P as Ae,c as P,m as R,j as F,k as N,o as V,Q as Me,X as Ce,R as ze,T as Be,U as Te,V as Se,D as be,E as ke}from"./index.396f4a72.js";import{U as Fe}from"./Upload.5d0148e8.js";import{M as Ne}from"./ModifyUpload.2cfe71e4.js";import{B as Ue}from"./BlockLabel.37da86a3.js";import{g as Xe}from"./color.509e5f03.js";import{_ as J,m as K,Z as x}from"./linear.955f0731.js";import{a as Ye}from"./csv.27f5436c.js";import"./dsv.7fe76a93.js";function De(l){let e,t,n;return{c(){e=B("svg"),t=B("path"),n=B("path"),f(t,"d","M28.828 3.172a4.094 4.094 0 0 0-5.656 0L4.05 22.292A6.954 6.954 0 0 0 2 27.242V30h2.756a6.952 6.952 0 0 0 4.95-2.05L28.828 8.829a3.999 3.999 0 0 0 0-5.657zM10.91 18.26l2.829 2.829l-2.122 2.121l-2.828-2.828zm-2.619 8.276A4.966 4.966 0 0 1 4.756 28H4v-.759a4.967 4.967 0 0 1 1.464-3.535l1.91-1.91l2.829 2.828zM27.415 7.414l-12.261 12.26l-2.829-2.828l12.262-12.26a2.047 2.047 0 0 1 2.828 0a2 2 0 0 1 0 2.828z"),f(t,"fill","currentColor"),f(n,"d","M6.5 15a3.5 3.5 0 0 1-2.475-5.974l3.5-3.5a1.502 1.502 0 0 0 0-2.121a1.537 1.537 0 0 0-2.121 0L3.415 5.394L2 3.98l1.99-1.988a3.585 3.585 0 0 1 4.95 0a3.504 3.504 0 0 1 0 4.949L5.439 10.44a1.502 1.502 0 0 0 0 2.121a1.537 1.537 0 0 0 2.122 0l4.024-4.024L13 9.95l-4.025 4.024A3.475 3.475 0 0 1 6.5 15z"),f(n,"fill","currentColor"),f(e,"width","1em"),f(e,"height","1em"),f(e,"viewBox","0 0 32 32")},m(r,s){y(r,e,s),E(e,t),E(e,n)},p:O,i:O,o:O,d(r){r&&w(e)}}}class ve extends Q{constructor(e){super(),W(this,e,null,De,Z,{})}}function $(l){let e;return Array.isArray(l)?e=l.reduce((t,{values:n})=>[...t,...n.map(({y:r})=>r)],[]):e=l.values,[Math.min(...e),Math.max(...e)]}function ee(l,e,t){const n=Object.entries(l[0]).reduce((r,s,o)=>(!e&&o===0||e&&s[0]===e?r.x.name=s[0]:(!t||t&&t.includes(s[0]))&&r.y.push({name:s[0],values:[]}),r),{x:{name:"",values:[]},y:[]});for(let r=0;rl[6].call(e))},m(s,o){y(s,e,o),E(e,t),E(e,n),r=we(e,l[6].bind(e))},p(s,[o]){o&8&&X(t,"background",s[3]),o&1&&Y(n,s[0]),o&36&&X(e,"top",s[2]-s[5]/2+"px"),o&18&&X(e,"left",s[1]-s[4]-7+"px")},i:O,o:O,d(s){s&&w(e),r()}}}function Oe(l,e,t){let{text:n}=e,{x:r}=e,{y:s}=e,{color:o}=e,_,i;function b(){_=this.offsetWidth,i=this.offsetHeight,t(4,_),t(5,i)}return l.$$set=g=>{"text"in g&&t(0,n=g.text),"x"in g&&t(1,r=g.x),"y"in g&&t(2,s=g.y),"color"in g&&t(3,o=g.color)},[n,r,s,o,_,i,b]}class Pe extends Q{constructor(e){super(),W(this,e,Oe,He,Z,{text:0,x:1,y:2,color:3})}}function Re(l,{color:e,text:t}){let n;function r(i){return n=new Pe({props:{text:t,x:i.pageX,y:i.pageY,color:e},target:document.body}),i}function s(i){n.$set({x:i.pageX,y:i.pageY})}function o(){n.$destroy()}const _=l;return _.addEventListener("mouseover",r),_.addEventListener("mouseleave",o),_.addEventListener("mousemove",s),{destroy(){_.removeEventListener("mouseover",r),_.removeEventListener("mouseleave",o),_.removeEventListener("mousemove",s)}}}function le(l,e,t){const n=l.slice();n[16]=e[t].name,n[17]=e[t].values;const r=n[8][n[16]];return n[18]=r,n}function te(l,e,t){const n=l.slice();return n[0]=e[t].x,n[1]=e[t].y,n}function ne(l,e,t){const n=l.slice();n[16]=e[t].name,n[17]=e[t].values;const r=n[8][n[16]];return n[18]=r,n}function oe(l,e,t){const n=l.slice();return n[0]=e[t].x,n[1]=e[t].y,n}function re(l,e,t){const n=l.slice();return n[27]=e[t],n}function se(l,e,t){const n=l.slice();return n[27]=e[t],n}function ie(l,e,t){const n=l.slice();return n[16]=e[t].name,n}function ae(l){let e,t,n,r=l[16]+"",s,o;return{c(){e=T("div"),t=T("span"),n=D(),s=U(r),o=D(),f(t,"class","inline-block w-[12px] h-[12px] rounded-sm "),X(t,"background-color",l[8][l[16]]),f(e,"class","mx-2 flex gap-1 items-center")},m(_,i){y(_,e,i),E(e,t),E(e,n),E(e,s),E(e,o)},p(_,i){i[0]&260&&X(t,"background-color",_[8][_[16]]),i[0]&4&&r!==(r=_[16]+"")&&Y(s,r)},d(_){_&&w(e)}}}function fe(l){let e,t,n,r,s,o,_=l[27]+"",i,b,g;return{c(){e=B("line"),o=B("text"),i=U(_),f(e,"stroke-width","0.5"),f(e,"x1",t=l[5](l[27])),f(e,"x2",n=l[5](l[27])),f(e,"y1",r=l[4](l[9][0]l[9][l[9].length-1]?l[6][1]:l[9][l[9].length-1])),f(e,"stroke","#aaa"),f(o,"class","font-mono text-xs dark:fill-slate-200"),f(o,"text-anchor","middle"),f(o,"x",b=l[5](l[27])),f(o,"y",g=l[4](l[9][0])+30)},m(a,h){y(a,e,h),y(a,o,h),E(o,i)},p(a,h){h[0]&1056&&t!==(t=a[5](a[27]))&&f(e,"x1",t),h[0]&1056&&n!==(n=a[5](a[27]))&&f(e,"x2",n),h[0]&592&&r!==(r=a[4](a[9][0]a[9][a[9].length-1]?a[6][1]:a[9][a[9].length-1]))&&f(e,"y2",s),h[0]&1024&&_!==(_=a[27]+"")&&Y(i,_),h[0]&1056&&b!==(b=a[5](a[27]))&&f(o,"x",b),h[0]&528&&g!==(g=a[4](a[9][0])+30)&&f(o,"y",g)},d(a){a&&w(e),a&&w(o)}}}function _e(l){let e,t,n,r,s,o,_=l[27]+"",i,b,g;return{c(){e=B("line"),o=B("text"),i=U(_),f(e,"stroke-width","0.5"),f(e,"y1",t=l[4](l[27])),f(e,"y2",n=l[4](l[27])),f(e,"x1",r=l[5](l[10][0]l[10][l[10].length-1]?l[7][1]:l[10][l[10].length-1])),f(e,"stroke","#aaa"),f(o,"class","font-mono text-xs dark:fill-slate-200"),f(o,"text-anchor","end"),f(o,"y",b=l[4](l[27])+4),f(o,"x",g=l[5](l[10][0])-20)},m(a,h){y(a,e,h),y(a,o,h),E(o,i)},p(a,h){h[0]&528&&t!==(t=a[4](a[27]))&&f(e,"y1",t),h[0]&528&&n!==(n=a[4](a[27]))&&f(e,"y2",n),h[0]&1184&&r!==(r=a[5](a[10][0]a[10][a[10].length-1]?a[7][1]:a[10][a[10].length-1]))&&f(e,"x2",s),h[0]&512&&_!==(_=a[27]+"")&&Y(i,_),h[0]&528&&b!==(b=a[4](a[27])+4)&&f(o,"y",b),h[0]&1056&&g!==(g=a[5](a[10][0])-20)&&f(o,"x",g)},d(a){a&&w(e),a&&w(o)}}}function ue(l){let e,t,n,r,s,o,_=l[6][1]+"",i,b,g;return{c(){e=B("line"),o=B("text"),i=U(_),f(e,"stroke-width","0.5"),f(e,"y1",t=l[4](l[6][1])),f(e,"y2",n=l[4](l[6][1])),f(e,"x1",r=l[5](l[10][0])),f(e,"x2",s=l[5](l[7][1])),f(e,"stroke","#aaa"),f(o,"class","font-mono text-xs dark:fill-slate-200"),f(o,"text-anchor","end"),f(o,"y",b=l[4](l[6][1])+4),f(o,"x",g=l[5](l[10][0])-20)},m(a,h){y(a,e,h),y(a,o,h),E(o,i)},p(a,h){h[0]&80&&t!==(t=a[4](a[6][1]))&&f(e,"y1",t),h[0]&80&&n!==(n=a[4](a[6][1]))&&f(e,"y2",n),h[0]&1056&&r!==(r=a[5](a[10][0]))&&f(e,"x1",r),h[0]&160&&s!==(s=a[5](a[7][1]))&&f(e,"x2",s),h[0]&64&&_!==(_=a[6][1]+"")&&Y(i,_),h[0]&80&&b!==(b=a[4](a[6][1])+4)&&f(o,"y",b),h[0]&1056&&g!==(g=a[5](a[10][0])-20)&&f(o,"x",g)},d(a){a&&w(e),a&&w(o)}}}function ce(l){let e,t,n,r;return{c(){e=B("circle"),f(e,"r","3.5"),f(e,"cx",t=l[5](l[0])),f(e,"cy",n=l[4](l[1])),f(e,"stroke-width","1.5"),f(e,"stroke",r=l[18]),f(e,"fill","none")},m(s,o){y(s,e,o)},p(s,o){o[0]&36&&t!==(t=s[5](s[0]))&&f(e,"cx",t),o[0]&20&&n!==(n=s[4](s[1]))&&f(e,"cy",n),o[0]&260&&r!==(r=s[18])&&f(e,"stroke",r)},d(s){s&&w(e)}}}function me(l){let e,t,n,r=l[17],s=[];for(let o=0;ol[9][l[9].length-1]&&ue(l),A=l[2],M=[];for(let c=0;cc[9][c[9].length-1]?p?p.p(c,C):(p=ue(c),p.c(),p.m(s,null)):p&&(p.d(1),p=null),C[0]&308){A=c[2];let u;for(u=0;u{L("process",{x:n,y:r})});const j=({x:p,y:A})=>[_(p),i(A)];return l.$$set=p=>{"value"in p&&t(11,a=p.value),"x"in p&&t(0,h=p.x),"y"in p&&t(1,k=p.y),"colors"in p&&t(12,m=p.colors)},l.$$.update=()=>{l.$$.dirty[0]&2051&&t(3,{x:n,y:r}=ee(typeof a=="string"?Ye(a):a,h,k),n,(t(2,r),t(11,a),t(0,h),t(1,k))),l.$$.dirty[0]&8&&t(7,s=$(n)),l.$$.dirty[0]&4&&t(6,o=$(r)),l.$$.dirty[0]&128&&t(5,_=x(s,[0,600]).nice()),l.$$.dirty[0]&64&&t(4,i=x(o,[350,0]).nice()),l.$$.dirty[0]&32&&t(10,b=_.ticks(8)),l.$$.dirty[0]&16&&t(9,g=i.ticks(8)),l.$$.dirty[0]&4&&t(8,v=r.reduce((p,A,M)=>({...p,[A.name]:S(M)}),{}))},[h,k,r,n,i,_,o,s,v,g,b,a,m,j]}class pe extends Q{constructor(e){super(),W(this,e,qe,Ve,Z,{value:11,x:0,y:1,colors:12},null,[-1,-1])}}function Ie(l){let e,t,n;return t=new Fe({props:{filetype:"text/csv",include_file_metadata:!1,$$slots:{default:[Ze]},$$scope:{ctx:l}}}),t.$on("load",l[16]),{c(){e=T("div"),P(t.$$.fragment),f(e,"class","h-full min-h-[8rem]")},m(r,s){y(r,e,s),R(t,e,null),n=!0},p(r,s){const o={};s&1052672&&(o.$$scope={dirty:s,ctx:r}),t.$set(o)},i(r){n||(F(t.$$.fragment,r),n=!0)},o(r){N(t.$$.fragment,r),n=!1},d(r){r&&w(e),V(t)}}}function Qe(l){let e,t,n,r,s;return t=new Ne({}),t.$on("clear",l[14]),r=new pe({props:{value:l[10],y:l[3],x:l[4],colors:l[8]}}),r.$on("process",l[15]),{c(){e=T("div"),P(t.$$.fragment),n=D(),P(r.$$.fragment),f(e,"class","input-model w-full h-60 flex justify-center items-center bg-gray-200 dark:bg-gray-600 relative")},m(o,_){y(o,e,_),R(t,e,null),E(e,n),R(r,e,null),s=!0},p(o,_){const i={};_&1024&&(i.value=o[10]),_&8&&(i.y=o[3]),_&16&&(i.x=o[4]),_&256&&(i.colors=o[8]),r.$set(i)},i(o){s||(F(t.$$.fragment,o),F(r.$$.fragment,o),s=!0)},o(o){N(t.$$.fragment,o),N(r.$$.fragment,o),s=!1},d(o){o&&w(e),V(t),V(r)}}}function We(l){let e,t,n,r;const s=[Je,Ge],o=[];function _(i,b){return i[11]?0:1}return e=_(l),t=o[e]=s[e](l),{c(){t.c(),n=I()},m(i,b){o[e].m(i,b),y(i,n,b),r=!0},p(i,b){let g=e;e=_(i),e===g?o[e].p(i,b):(be(),N(o[g],1,1,()=>{o[g]=null}),ke(),t=o[e],t?t.p(i,b):(t=o[e]=s[e](i),t.c()),F(t,1),t.m(n.parentNode,n))},i(i){r||(F(t),r=!0)},o(i){N(t),r=!1},d(i){o[e].d(i),i&&w(n)}}}function Ze(l){let e=l[12]("interface.drop_csv")+"",t,n,r,s,o=l[12]("or")+"",_,i,b,g,a=l[12]("interface.click_to_upload")+"",h;return{c(){t=U(e),n=D(),r=T("br"),s=U("- "),_=U(o),i=U(" -"),b=T("br"),g=D(),h=U(a)},m(k,m){y(k,t,m),y(k,n,m),y(k,r,m),y(k,s,m),y(k,_,m),y(k,i,m),y(k,b,m),y(k,g,m),y(k,h,m)},p(k,m){m&4096&&e!==(e=k[12]("interface.drop_csv")+"")&&Y(t,e),m&4096&&o!==(o=k[12]("or")+"")&&Y(_,o),m&4096&&a!==(a=k[12]("interface.click_to_upload")+"")&&Y(h,a)},d(k){k&&w(t),k&&w(n),k&&w(r),k&&w(s),k&&w(_),k&&w(i),k&&w(b),k&&w(g),k&&w(h)}}}function Ge(l){let e,t,n,r;return n=new ve({}),{c(){e=T("div"),t=T("div"),P(n.$$.fragment),f(t,"class","h-5 dark:text-white opacity-50"),f(e,"class","h-full min-h-[15rem] flex justify-center items-center")},m(s,o){y(s,e,o),E(e,t),R(n,t,null),r=!0},p:O,i(s){r||(F(n.$$.fragment,s),r=!0)},o(s){N(n.$$.fragment,s),r=!1},d(s){s&&w(e),V(n)}}}function Je(l){let e,t;return e=new pe({props:{value:l[11],colors:l[8]}}),{c(){P(e.$$.fragment)},m(n,r){R(e,n,r),t=!0},p(n,r){const s={};r&2048&&(s.value=n[11]),r&256&&(s.colors=n[8]),e.$set(s)},i(n){t||(F(e.$$.fragment,n),t=!0)},o(n){N(e.$$.fragment,n),t=!1},d(n){V(e,n)}}}function Ke(l){let e,t,n,r,s,o,_,i;e=new Ue({props:{show_label:l[7],Icon:ve,label:l[6]||"TimeSeries"}});const b=[l[9]];let g={};for(let m=0;m{h[j]=null}),ke()),~s?(o=h[s],o?o.p(m,L):(o=h[s]=a[s](m),o.c()),F(o,1),o.m(_.parentNode,_)):o=null)},i(m){i||(F(e.$$.fragment,m),F(n.$$.fragment,m),F(o),i=!0)},o(m){N(e.$$.fragment,m),N(n.$$.fragment,m),N(o),i=!1},d(m){V(e,m),m&&w(t),V(n,m),m&&w(r),~s&&h[s].d(m),m&&w(_)}}}function xe(l){let e,t;return e=new Ae({props:{visible:l[2],variant:l[5]==="dynamic"&&!l[10]?"dashed":"solid",color:"grey",padding:!1,elem_id:l[1],$$slots:{default:[Ke]},$$scope:{ctx:l}}}),{c(){P(e.$$.fragment)},m(n,r){R(e,n,r),t=!0},p(n,[r]){const s={};r&4&&(s.visible=n[2]),r&1056&&(s.variant=n[5]==="dynamic"&&!n[10]?"dashed":"solid"),r&2&&(s.elem_id=n[1]),r&1056761&&(s.$$scope={dirty:r,ctx:n}),e.$set(s)},i(n){t||(F(e.$$.fragment,n),t=!0)},o(n){N(e.$$.fragment,n),t=!1},d(n){V(e,n)}}}function $e(l){return l.data.map(e=>e.reduce((t,n,r)=>({...t,[l.headers[r]]:n}),{}))}function el(l){const e=atob(l.split(",")[1]),t=l.split(",")[0].split(":")[1].split(";")[0],n=new ArrayBuffer(e.length),r=new Uint8Array(n);for(let s=0;st.push(r));for(let r=0;rs.push(o[r].y)),n.push(s)}return{headers:t,data:n}}function tl(l,e,t){let n,r;Me(l,Ce,d=>t(12,r=d));const s=ge();let{elem_id:o=""}=e,{visible:_=!0}=e,{value:i}=e,{y:b}=e,{x:g}=e,{mode:a}=e,{label:h}=e,{show_label:k}=e,{colors:m}=e,{loading_status:L}=e,v;function S(d){const c=new FileReader;c.addEventListener("loadend",C=>{t(10,v=C.srcElement.result)}),c.readAsText(d)}function j(d){d.headers&&t(10,v=d.headers.join(",")),d.data.forEach(C=>{t(10,v=v+` +`),t(10,v=v+C.join(","))})}function p(d){return t(0,i={data:d}),d}function A({detail:d}){t(0,i=null),s("change"),s("clear")}const M=({detail:{x:d,y:c}})=>t(0,i=ll(d,c)),H=({detail:d})=>p(d);return l.$$set=d=>{"elem_id"in d&&t(1,o=d.elem_id),"visible"in d&&t(2,_=d.visible),"value"in d&&t(0,i=d.value),"y"in d&&t(3,b=d.y),"x"in d&&t(4,g=d.x),"mode"in d&&t(5,a=d.mode),"label"in d&&t(6,h=d.label),"show_label"in d&&t(7,k=d.show_label),"colors"in d&&t(8,m=d.colors),"loading_status"in d&&t(9,L=d.loading_status)},l.$$.update=()=>{l.$$.dirty&1&&(i&&i.data&&typeof i.data=="string"?i?S(el(i.data)):t(10,v=null):i&&i.data&&typeof i.data!="string"&&(i||t(10,v=null),j(i))),l.$$.dirty&1025&&t(10,v=i==null?null:v),l.$$.dirty&33&&t(11,n=a==="static"&&i&&$e(i)),l.$$.dirty&1&&s("change")},[i,o,_,b,g,a,h,k,m,L,v,n,r,p,A,M,H]}class nl extends Q{constructor(e){super(),W(this,e,tl,xe,Z,{elem_id:1,visible:2,value:0,y:3,x:4,mode:5,label:6,show_label:7,colors:8,loading_status:9})}}var cl=nl;const ml=["static","dynamic"],hl=l=>({type:"{data: Array> | string; headers?: Array;}",description:"dataset of series"});export{cl as Component,hl as document,ml as modes}; +//# sourceMappingURL=index.977bc8b5.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/index.9a9131f6.js b/gradio-modified/gradio/templates/frontend/assets/index.9a9131f6.js new file mode 100644 index 0000000000000000000000000000000000000000..d0d5d4e6e332bfdeebdd65724d1788f436738c5e --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/index.9a9131f6.js @@ -0,0 +1,2 @@ +import{S as H,i as O,s as Q,w as A,b as f,f as B,g as h,x as U,n as N,e as C,a as D,t as W,c as T,M as ue,ae as he,d as se,Y as fe,m as V,l as M,z as ce,W as ke,D as Z,k as p,E as x,j as w,h as J,o as j,A as pe,as as we,at as ve,aa as ye,K as P,I as de,B as $,F as me,O as Be,L as Ne,P as Te,Q as Ve,X as je,R as Me,T as Ce,U as Pe,V as Ue}from"./index.396f4a72.js";import{n as ze}from"./utils.27234e1d.js";import{U as Fe}from"./Upload.5d0148e8.js";import{M as Xe}from"./ModifyUpload.2cfe71e4.js";import{B as ge}from"./BlockLabel.37da86a3.js";import{U as Se,W as qe}from"./Webcam.8816836e.js";function De(n){let e,l;return{c(){e=A("svg"),l=A("path"),f(l,"d","M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"),f(e,"xmlns","http://www.w3.org/2000/svg"),f(e,"width","100%"),f(e,"height","100%"),f(e,"viewBox","0 0 24 24"),f(e,"fill","none"),f(e,"stroke","currentColor"),f(e,"stroke-width","1.5"),f(e,"stroke-linecap","round"),f(e,"stroke-linejoin","round")},m(t,r){B(t,e,r),h(e,l)},p:U,i:U,o:U,d(t){t&&N(e)}}}class Ie extends H{constructor(e){super(),O(this,e,null,De,Q,{})}}function Re(n){let e,l,t;return{c(){e=A("svg"),l=A("rect"),t=A("rect"),f(l,"x","6"),f(l,"y","4"),f(l,"width","4"),f(l,"height","16"),f(t,"x","14"),f(t,"y","4"),f(t,"width","4"),f(t,"height","16"),f(e,"xmlns","http://www.w3.org/2000/svg"),f(e,"width","100%"),f(e,"height","100%"),f(e,"viewBox","0 0 24 24"),f(e,"fill","none"),f(e,"stroke","currentColor"),f(e,"stroke-width","1.5"),f(e,"stroke-linecap","round"),f(e,"stroke-linejoin","round")},m(r,i){B(r,e,i),h(e,l),h(e,t)},p:U,i:U,o:U,d(r){r&&N(e)}}}class We extends H{constructor(e){super(),O(this,e,null,Re,Q,{})}}function Ae(n){let e,l;return{c(){e=A("svg"),l=A("polygon"),f(l,"points","5 3 19 12 5 21 5 3"),f(e,"xmlns","http://www.w3.org/2000/svg"),f(e,"width","100%"),f(e,"height","100%"),f(e,"viewBox","0 0 24 24"),f(e,"fill","none"),f(e,"stroke","currentColor"),f(e,"stroke-width","1.5"),f(e,"stroke-linecap","round"),f(e,"stroke-linejoin","round")},m(t,r){B(t,e,r),h(e,l)},p:U,i:U,o:U,d(t){t&&N(e)}}}class Ee extends H{constructor(e){super(),O(this,e,null,Ae,Q,{})}}function Ke(n){let e,l,t;return{c(){e=A("svg"),l=A("polygon"),t=A("rect"),f(l,"points","23 7 16 12 23 17 23 7"),f(t,"x","1"),f(t,"y","5"),f(t,"width","15"),f(t,"height","14"),f(t,"rx","2"),f(t,"ry","2"),f(e,"xmlns","http://www.w3.org/2000/svg"),f(e,"width","100%"),f(e,"height","100%"),f(e,"viewBox","0 0 24 24"),f(e,"fill","none"),f(e,"stroke","currentColor"),f(e,"stroke-width","1.5"),f(e,"stroke-linecap","round"),f(e,"stroke-linejoin","round"),f(e,"class","feather feather-video")},m(r,i){B(r,e,i),h(e,l),h(e,t)},p:U,i:U,o:U,d(r){r&&N(e)}}}class ne extends H{constructor(e){super(),O(this,e,null,Ke,Q,{})}}const _e=n=>{let e=["B","KB","MB","GB","PB"],l=0;for(;n>1024;)n/=1024,l++;let t=e[l];return n.toFixed(1)+" "+t},Le=()=>!0;const{isNaN:Ge}=we;function He(n){let e,l;return e=new We({}),{c(){T(e.$$.fragment)},m(t,r){V(e,t,r),l=!0},i(t){l||(w(e.$$.fragment,t),l=!0)},o(t){p(e.$$.fragment,t),l=!1},d(t){j(e,t)}}}function Oe(n){let e,l;return e=new Ee({}),{c(){T(e.$$.fragment)},m(t,r){V(e,t,r),l=!0},i(t){l||(w(e.$$.fragment,t),l=!0)},o(t){p(e.$$.fragment,t),l=!1},d(t){j(e,t)}}}function Qe(n){let e,l;return e=new Se({}),{c(){T(e.$$.fragment)},m(t,r){V(e,t,r),l=!0},i(t){l||(w(e.$$.fragment,t),l=!0)},o(t){p(e.$$.fragment,t),l=!1},d(t){j(e,t)}}}function Ye(n){let e,l,t,r,i=!1,u,g=!0,a,_,o,c,s,b,F,y,S=ee(n[2])+"",I,E,R=ee(n[3])+"",K,L,m,G,k,X,z,d,te,re;function ie(){cancelAnimationFrame(u),l.paused||(u=ve(ie),i=!0),n[14].call(l)}const oe=[Qe,Oe,He],Y=[];function ae(v,q){return v[2]===v[3]?0:v[4]?1:2}return s=ae(n),b=Y[s]=oe[s](n),z=new Ie({}),{c(){e=C("div"),l=C("video"),t=C("track"),a=D(),_=C("div"),o=C("div"),c=C("span"),b.c(),F=D(),y=C("span"),I=W(S),E=W(" / "),K=W(R),L=D(),m=C("progress"),k=D(),X=C("div"),T(z.$$.fragment),f(t,"kind","captions"),ue(l.src,r=n[0])||f(l,"src",r),f(l,"preload","auto"),f(l,"class","w-full h-full object-contain bg-black svelte-1cgkd5k"),n[3]===void 0&&he(()=>n[15].call(l)),se(l,"mirror",n[1]),f(c,"class","w-6 cursor-pointer text-white flex justify-center svelte-1cgkd5k"),f(y,"class","font-mono shrink-0 text-xs mx-3 text-white svelte-1cgkd5k"),m.value=G=n[2]/n[3]||0,f(m,"class","rounded h-2 w-full mx-3 svelte-1cgkd5k"),f(X,"class","w-6 cursor-pointer text-white"),f(o,"class","flex w-full justify-space h-full items-center px-1.5 "),f(_,"class","wrap absolute bottom-0 transition duration-500 m-1.5 bg-slate-800 px-1 py-2.5 rounded-md svelte-1cgkd5k"),fe(_,"opacity",n[3]&&n[6]?1:0)},m(v,q){B(v,e,q),h(e,l),h(l,t),n[17](l),h(e,a),h(e,_),h(_,o),h(o,c),Y[s].m(c,null),h(o,F),h(o,y),h(y,I),h(y,E),h(y,K),h(o,L),h(o,m),h(o,k),h(o,X),V(z,X,null),d=!0,te||(re=[M(l,"mousemove",n[7]),M(l,"click",n[9]),M(l,"play",n[11]),M(l,"pause",n[12]),M(l,"ended",n[13]),M(l,"timeupdate",ie),M(l,"durationchange",n[15]),M(l,"play",n[16]),M(l,"pause",n[16]),M(c,"click",n[9]),M(m,"mousemove",n[8]),M(m,"touchmove",ce(n[8])),M(m,"click",ke(ce(n[10]))),M(X,"click",n[18]),M(_,"mousemove",n[7])],te=!0)},p(v,[q]){(!d||q&1&&!ue(l.src,r=v[0]))&&f(l,"src",r),!i&&q&4&&!Ge(v[2])&&(l.currentTime=v[2]),i=!1,q&16&&g!==(g=v[4])&&l[g?"pause":"play"](),q&2&&se(l,"mirror",v[1]);let le=s;s=ae(v),s!==le&&(Z(),p(Y[le],1,1,()=>{Y[le]=null}),x(),b=Y[s],b||(b=Y[s]=oe[s](v),b.c()),w(b,1),b.m(c,null)),(!d||q&4)&&S!==(S=ee(v[2])+"")&&J(I,S),(!d||q&8)&&R!==(R=ee(v[3])+"")&&J(K,R),(!d||q&12&&G!==(G=v[2]/v[3]||0))&&(m.value=G),(!d||q&72)&&fe(_,"opacity",v[3]&&v[6]?1:0)},i(v){d||(w(b),w(z.$$.fragment,v),d=!0)},o(v){p(b),p(z.$$.fragment,v),d=!1},d(v){v&&N(e),n[17](null),Y[s].d(),j(z),te=!1,pe(re)}}}function ee(n){if(isNaN(n)||!isFinite(n))return"...";const e=Math.floor(n/60);let l=Math.floor(n%60);return n<10&&(l=`0${l}`),`${e}:${l}`}function Je(n,e,l){let{src:t}=e,{mirror:r}=e,i=0,u,g=!0,a,_=!0,o;function c(){clearTimeout(o),o=setTimeout(()=>l(6,_=!1),2500),l(6,_=!0)}function s(k){if(!u)return;if(k.type==="click"){F(k);return}if(k.type!=="touchmove"&&!(k.buttons&1))return;const X=k.type==="touchmove"?k.touches[0].clientX:k.clientX,{left:z,right:d}=k.currentTarget.getBoundingClientRect();l(2,i=u*(X-z)/(d-z))}function b(){g?a.play():a.pause()}function F(k){const{left:X,right:z}=k.currentTarget.getBoundingClientRect();l(2,i=u*(k.clientX-X)/(z-X))}async function y(){await ye(),l(5,a.currentTime=9999,a),setTimeout(async()=>{l(5,a.currentTime=0,a)},50)}function S(k){P.call(this,n,k)}function I(k){P.call(this,n,k)}function E(k){P.call(this,n,k)}function R(){i=this.currentTime,l(2,i)}function K(){u=this.duration,l(3,u)}function L(){g=this.paused,l(4,g)}function m(k){de[k?"unshift":"push"](()=>{a=k,l(5,a)})}const G=()=>a.requestFullscreen();return n.$$set=k=>{"src"in k&&l(0,t=k.src),"mirror"in k&&l(1,r=k.mirror)},n.$$.update=()=>{n.$$.dirty&1&&t&&y()},[t,r,i,u,g,a,_,c,s,b,F,S,I,E,R,K,L,m,G]}class be extends H{constructor(e){super(),O(this,e,Je,Ye,Q,{src:0,mirror:1})}}function Ze(n){let e,l,t,r,i,u,g;e=new Xe({}),e.$on("clear",n[12]);const a=[et,$e],_=[];function o(c,s){return t==null&&(t=!!Le()),t?0:c[0].size?1:-1}return~(r=o(n))&&(i=_[r]=a[r](n)),{c(){T(e.$$.fragment),l=D(),i&&i.c(),u=$()},m(c,s){V(e,c,s),B(c,l,s),~r&&_[r].m(c,s),B(c,u,s),g=!0},p(c,s){let b=r;r=o(c),r===b?~r&&_[r].p(c,s):(i&&(Z(),p(_[b],1,1,()=>{_[b]=null}),x()),~r?(i=_[r],i?i.p(c,s):(i=_[r]=a[r](c),i.c()),w(i,1),i.m(u.parentNode,u)):i=null)},i(c){g||(w(e.$$.fragment,c),w(i),g=!0)},o(c){p(e.$$.fragment,c),p(i),g=!1},d(c){j(e,c),c&&N(l),~r&&_[r].d(c),c&&N(u)}}}function xe(n){let e,l,t,r;const i=[lt,tt],u=[];function g(a,_){return a[1]==="upload"?0:a[1]==="webcam"?1:-1}return~(e=g(n))&&(l=u[e]=i[e](n)),{c(){l&&l.c(),t=$()},m(a,_){~e&&u[e].m(a,_),B(a,t,_),r=!0},p(a,_){let o=e;e=g(a),e===o?~e&&u[e].p(a,_):(l&&(Z(),p(u[o],1,1,()=>{u[o]=null}),x()),~e?(l=u[e],l?l.p(a,_):(l=u[e]=i[e](a),l.c()),w(l,1),l.m(t.parentNode,t)):l=null)},i(a){r||(w(l),r=!0)},o(a){p(l),r=!1},d(a){~e&&u[e].d(a),a&&N(t)}}}function $e(n){let e,l=n[0].name+"",t,r,i,u=_e(n[0].size)+"",g;return{c(){e=C("div"),t=W(l),r=D(),i=C("div"),g=W(u),f(e,"class","file-name text-4xl p-6 break-all"),f(i,"class","file-size text-2xl p-2")},m(a,_){B(a,e,_),h(e,t),B(a,r,_),B(a,i,_),h(i,g)},p(a,_){_&1&&l!==(l=a[0].name+"")&&J(t,l),_&1&&u!==(u=_e(a[0].size)+"")&&J(g,u)},i:U,o:U,d(a){a&&N(e),a&&N(r),a&&N(i)}}}function et(n){let e,l;return e=new be({props:{src:n[0].data,mirror:n[4]&&n[1]==="webcam"}}),e.$on("play",n[16]),e.$on("pause",n[17]),e.$on("ended",n[18]),{c(){T(e.$$.fragment)},m(t,r){V(e,t,r),l=!0},p(t,r){const i={};r&1&&(i.src=t[0].data),r&18&&(i.mirror=t[4]&&t[1]==="webcam"),e.$set(i)},i(t){l||(w(e.$$.fragment,t),l=!0)},o(t){p(e.$$.fragment,t),l=!1},d(t){j(e,t)}}}function tt(n){let e,l;return e=new qe({props:{mirror_webcam:n[4],include_audio:n[5],mode:"video"}}),e.$on("error",n[14]),e.$on("capture",n[15]),{c(){T(e.$$.fragment)},m(t,r){V(e,t,r),l=!0},p(t,r){const i={};r&16&&(i.mirror_webcam=t[4]),r&32&&(i.include_audio=t[5]),e.$set(i)},i(t){l||(w(e.$$.fragment,t),l=!0)},o(t){p(e.$$.fragment,t),l=!1},d(t){j(e,t)}}}function lt(n){let e,l,t;function r(u){n[13](u)}let i={filetype:"video/mp4,video/x-m4v,video/*",$$slots:{default:[nt]},$$scope:{ctx:n}};return n[9]!==void 0&&(i.dragging=n[9]),e=new Fe({props:i}),de.push(()=>Be(e,"dragging",r)),e.$on("load",n[11]),{c(){T(e.$$.fragment)},m(u,g){V(e,u,g),t=!0},p(u,g){const a={};g&524736&&(a.$$scope={dirty:g,ctx:u}),!l&&g&512&&(l=!0,a.dragging=u[9],Ne(()=>l=!1)),e.$set(a)},i(u){t||(w(e.$$.fragment,u),t=!0)},o(u){p(e.$$.fragment,u),t=!1},d(u){j(e,u)}}}function nt(n){let e,l,t,r,i,u,g,a,_;return{c(){e=C("div"),l=W(n[6]),t=D(),r=C("span"),i=W("- "),u=W(n[7]),g=W(" -"),a=D(),_=W(n[8]),f(r,"class","text-gray-300"),f(e,"class","flex flex-col")},m(o,c){B(o,e,c),h(e,l),h(e,t),h(e,r),h(r,i),h(r,u),h(r,g),h(e,a),h(e,_)},p(o,c){c&64&&J(l,o[6]),c&128&&J(u,o[7]),c&256&&J(_,o[8])},d(o){o&&N(e)}}}function rt(n){let e,l,t,r,i,u;e=new ge({props:{show_label:n[3],Icon:ne,label:n[2]||"Video"}});const g=[xe,Ze],a=[];function _(o,c){return o[0]===null?0:1}return t=_(n),r=a[t]=g[t](n),{c(){T(e.$$.fragment),l=D(),r.c(),i=$()},m(o,c){V(e,o,c),B(o,l,c),a[t].m(o,c),B(o,i,c),u=!0},p(o,[c]){const s={};c&8&&(s.show_label=o[3]),c&4&&(s.label=o[2]||"Video"),e.$set(s);let b=t;t=_(o),t===b?a[t].p(o,c):(Z(),p(a[b],1,1,()=>{a[b]=null}),x(),r=a[t],r?r.p(o,c):(r=a[t]=g[t](o),r.c()),w(r,1),r.m(i.parentNode,i))},i(o){u||(w(e.$$.fragment,o),w(r),u=!0)},o(o){p(e.$$.fragment,o),p(r),u=!1},d(o){j(e,o),o&&N(l),a[t].d(o),o&&N(i)}}}function it(n,e,l){let{value:t=null}=e,{source:r}=e,{label:i=void 0}=e,{show_label:u}=e,{mirror_webcam:g}=e,{include_audio:a}=e,{drop_text:_="Drop a video file"}=e,{or_text:o="or"}=e,{upload_text:c="click to upload"}=e;const s=me();function b({detail:m}){s("change",m),s("upload",m),l(0,t=m)}function F({detail:m}){l(0,t=null),s("change",m),s("clear")}let y=!1;function S(m){y=m,l(9,y)}function I(m){P.call(this,n,m)}const E=({detail:m})=>s("change",m);function R(m){P.call(this,n,m)}function K(m){P.call(this,n,m)}function L(m){P.call(this,n,m)}return n.$$set=m=>{"value"in m&&l(0,t=m.value),"source"in m&&l(1,r=m.source),"label"in m&&l(2,i=m.label),"show_label"in m&&l(3,u=m.show_label),"mirror_webcam"in m&&l(4,g=m.mirror_webcam),"include_audio"in m&&l(5,a=m.include_audio),"drop_text"in m&&l(6,_=m.drop_text),"or_text"in m&&l(7,o=m.or_text),"upload_text"in m&&l(8,c=m.upload_text)},n.$$.update=()=>{n.$$.dirty&512&&s("drag",y)},[t,r,i,u,g,a,_,o,c,y,s,b,F,S,I,E,R,K,L]}class ot extends H{constructor(e){super(),O(this,e,it,rt,Q,{value:0,source:1,label:2,show_label:3,mirror_webcam:4,include_audio:5,drop_text:6,or_text:7,upload_text:8})}}function at(n){let e,l;return e=new be({props:{src:n[0].data,mirror:!1}}),e.$on("play",n[3]),e.$on("pause",n[4]),e.$on("ended",n[5]),{c(){T(e.$$.fragment)},m(t,r){V(e,t,r),l=!0},p(t,r){const i={};r&1&&(i.src=t[0].data),e.$set(i)},i(t){l||(w(e.$$.fragment,t),l=!0)},o(t){p(e.$$.fragment,t),l=!1},d(t){j(e,t)}}}function ut(n){let e,l,t,r;return t=new ne({}),{c(){e=C("div"),l=C("div"),T(t.$$.fragment),f(l,"class","h-5 dark:text-white opacity-50"),f(e,"class","h-full min-h-[15rem] flex justify-center items-center")},m(i,u){B(i,e,u),h(e,l),V(t,l,null),r=!0},p:U,i(i){r||(w(t.$$.fragment,i),r=!0)},o(i){p(t.$$.fragment,i),r=!1},d(i){i&&N(e),j(t)}}}function st(n){let e,l,t,r,i,u;e=new ge({props:{show_label:n[2],Icon:ne,label:n[1]||"Video"}});const g=[ut,at],a=[];function _(o,c){return o[0]===null?0:1}return t=_(n),r=a[t]=g[t](n),{c(){T(e.$$.fragment),l=D(),r.c(),i=$()},m(o,c){V(e,o,c),B(o,l,c),a[t].m(o,c),B(o,i,c),u=!0},p(o,[c]){const s={};c&4&&(s.show_label=o[2]),c&2&&(s.label=o[1]||"Video"),e.$set(s);let b=t;t=_(o),t===b?a[t].p(o,c):(Z(),p(a[b],1,1,()=>{a[b]=null}),x(),r=a[t],r?r.p(o,c):(r=a[t]=g[t](o),r.c()),w(r,1),r.m(i.parentNode,i))},i(o){u||(w(e.$$.fragment,o),w(r),u=!0)},o(o){p(e.$$.fragment,o),p(r),u=!1},d(o){j(e,o),o&&N(l),a[t].d(o),o&&N(i)}}}function ft(n,e,l){let{value:t=null}=e,{label:r=void 0}=e,{show_label:i}=e;const u=me();function g(o){P.call(this,n,o)}function a(o){P.call(this,n,o)}function _(o){P.call(this,n,o)}return n.$$set=o=>{"value"in o&&l(0,t=o.value),"label"in o&&l(1,r=o.label),"show_label"in o&&l(2,i=o.show_label)},n.$$.update=()=>{n.$$.dirty&1&&t&&u("change",t)},[t,r,i,g,a,_]}class ct extends H{constructor(e){super(),O(this,e,ft,st,Q,{value:0,label:1,show_label:2})}}function _t(n){let e,l;return e=new ot({props:{value:n[11],label:n[4],show_label:n[6],source:n[5],drop_text:n[13]("interface.drop_video"),or_text:n[13]("or"),upload_text:n[13]("interface.click_to_upload"),mirror_webcam:n[8],include_audio:n[9]}}),e.$on("change",n[16]),e.$on("drag",n[17]),e.$on("error",n[18]),e.$on("change",n[19]),e.$on("clear",n[20]),e.$on("play",n[21]),e.$on("pause",n[22]),e.$on("upload",n[23]),{c(){T(e.$$.fragment)},m(t,r){V(e,t,r),l=!0},p(t,r){const i={};r&2048&&(i.value=t[11]),r&16&&(i.label=t[4]),r&64&&(i.show_label=t[6]),r&32&&(i.source=t[5]),r&8192&&(i.drop_text=t[13]("interface.drop_video")),r&8192&&(i.or_text=t[13]("or")),r&8192&&(i.upload_text=t[13]("interface.click_to_upload")),r&256&&(i.mirror_webcam=t[8]),r&512&&(i.include_audio=t[9]),e.$set(i)},i(t){l||(w(e.$$.fragment,t),l=!0)},o(t){p(e.$$.fragment,t),l=!1},d(t){j(e,t)}}}function dt(n){let e,l;return e=new ct({props:{value:n[11],label:n[4],show_label:n[6]}}),{c(){T(e.$$.fragment)},m(t,r){V(e,t,r),l=!0},p(t,r){const i={};r&2048&&(i.value=t[11]),r&16&&(i.label=t[4]),r&64&&(i.show_label=t[6]),e.$set(i)},i(t){l||(w(e.$$.fragment,t),l=!0)},o(t){p(e.$$.fragment,t),l=!1},d(t){j(e,t)}}}function mt(n){let e,l,t,r,i,u;const g=[n[1]];let a={};for(let s=0;s{o[y]=null}),x(),r=o[t],r?r.p(s,b):(r=o[t]=_[t](s),r.c()),w(r,1),r.m(i.parentNode,i))},i(s){u||(w(e.$$.fragment,s),w(r),u=!0)},o(s){p(e.$$.fragment,s),p(r),u=!1},d(s){j(e,s),s&&N(l),o[t].d(s),s&&N(i)}}}function gt(n){let e,l;return e=new Te({props:{visible:n[3],variant:n[10]==="dynamic"&&n[0]===null&&n[5]==="upload"?"dashed":"solid",color:n[12]?"green":"grey",padding:!1,elem_id:n[2],style:{height:n[7].height,width:n[7].width},$$slots:{default:[mt]},$$scope:{ctx:n}}}),{c(){T(e.$$.fragment)},m(t,r){V(e,t,r),l=!0},p(t,[r]){const i={};r&8&&(i.visible=t[3]),r&1057&&(i.variant=t[10]==="dynamic"&&t[0]===null&&t[5]==="upload"?"dashed":"solid"),r&4096&&(i.color=t[12]?"green":"grey"),r&4&&(i.elem_id=t[2]),r&128&&(i.style={height:t[7].height,width:t[7].width}),r&16793459&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){l||(w(e.$$.fragment,t),l=!0)},o(t){p(e.$$.fragment,t),l=!1},d(t){j(e,t)}}}function bt(n,e,l){let t;Ve(n,je,d=>l(13,t=d));let{elem_id:r=""}=e,{visible:i=!0}=e,{value:u=null}=e,{label:g}=e,{source:a}=e,{root:_}=e,{root_url:o}=e,{show_label:c}=e,{loading_status:s}=e,{style:b={}}=e,{mirror_webcam:F}=e,{include_audio:y}=e,{mode:S}=e,I,E=!1;const R=({detail:d})=>l(0,u=d),K=({detail:d})=>l(12,E=d),L=({detail:d})=>{l(1,s=s||{}),l(1,s.status="error",s),l(1,s.message=d,s)};function m(d){P.call(this,n,d)}function G(d){P.call(this,n,d)}function k(d){P.call(this,n,d)}function X(d){P.call(this,n,d)}function z(d){P.call(this,n,d)}return n.$$set=d=>{"elem_id"in d&&l(2,r=d.elem_id),"visible"in d&&l(3,i=d.visible),"value"in d&&l(0,u=d.value),"label"in d&&l(4,g=d.label),"source"in d&&l(5,a=d.source),"root"in d&&l(14,_=d.root),"root_url"in d&&l(15,o=d.root_url),"show_label"in d&&l(6,c=d.show_label),"loading_status"in d&&l(1,s=d.loading_status),"style"in d&&l(7,b=d.style),"mirror_webcam"in d&&l(8,F=d.mirror_webcam),"include_audio"in d&&l(9,y=d.include_audio),"mode"in d&&l(10,S=d.mode)},n.$$.update=()=>{n.$$.dirty&49153&&l(11,I=ze(u,o??_))},[u,s,r,i,g,a,c,b,F,y,S,I,E,t,_,o,R,K,L,m,G,k,X,z]}class ht extends H{constructor(e){super(),O(this,e,bt,gt,Q,{elem_id:2,visible:3,value:0,label:4,source:5,root:14,root_url:15,show_label:6,loading_status:1,style:7,mirror_webcam:8,include_audio:9,mode:10})}}var Nt=ht;const Tt=["static","dynamic"],Vt=n=>({type:"{ name: string; data: string }",description:"file name and base64 data of video file"});export{Nt as Component,Vt as document,Tt as modes}; +//# sourceMappingURL=index.9a9131f6.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/index.a8b38f58.js b/gradio-modified/gradio/templates/frontend/assets/index.a8b38f58.js new file mode 100644 index 0000000000000000000000000000000000000000..673ba74d2ef2d0a215e957b49f16c7c7b46d7f63 --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/index.a8b38f58.js @@ -0,0 +1,2 @@ +import{S as T,i as H,s as L,e as S,b as c,Y as C,d as f,f as d,x as M,n as g,F as j,I as q,P as B,c as h,m as b,j as v,k,o as w,R as D,T as E,a as F,U as I,V as K,K as P}from"./index.396f4a72.js";function R(n){let e;return{c(){e=S("div"),c(e,"id",n[0]),c(e,"class","output-markdown gr-prose"),C(e,"max-width","100%"),f(e,"min-h-[6rem]",n[3]),f(e,"hidden",!n[1])},m(a,t){d(a,e,t),e.innerHTML=n[2],n[5](e)},p(a,[t]){t&4&&(e.innerHTML=a[2]),t&1&&c(e,"id",a[0]),t&8&&f(e,"min-h-[6rem]",a[3]),t&2&&f(e,"hidden",!a[1])},i:M,o:M,d(a){a&&g(e),n[5](null)}}}function U(n,e,a){let{elem_id:t=""}=e,{visible:l=!0}=e,{value:u}=e,{min_height:o=!1}=e;const m=j();let i;function r(s){q[s?"unshift":"push"](()=>{i=s,a(4,i)})}return n.$$set=s=>{"elem_id"in s&&a(0,t=s.elem_id),"visible"in s&&a(1,l=s.visible),"value"in s&&a(2,u=s.value),"min_height"in s&&a(3,o=s.min_height)},n.$$.update=()=>{n.$$.dirty&4&&m("change")},[t,l,u,o,i,r]}class V extends T{constructor(e){super(),H(this,e,U,R,L,{elem_id:0,visible:1,value:2,min_height:3})}}function Y(n){let e,a,t,l,u;const o=[n[3],{variant:"center"}];let m={};for(let i=0;i{"label"in s&&a(4,t=s.label),"elem_id"in s&&a(0,l=s.elem_id),"visible"in s&&a(1,u=s.visible),"value"in s&&a(2,o=s.value),"loading_status"in s&&a(3,m=s.loading_status)},n.$$.update=()=>{n.$$.dirty&16&&i("change")},[l,u,o,m,t,r]}class A extends T{constructor(e){super(),H(this,e,z,p,L,{label:4,elem_id:0,visible:1,value:2,loading_status:3})}}var J=A;const N=["static"],O=n=>({type:"string",description:"HTML rendering of markdown"});export{J as Component,O as document,N as modes}; +//# sourceMappingURL=index.a8b38f58.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/index.a8c8aa0f.js b/gradio-modified/gradio/templates/frontend/assets/index.a8c8aa0f.js new file mode 100644 index 0000000000000000000000000000000000000000..0a7b65170f0c0d9e324b0e7887362f89fb1a26ed --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/index.a8c8aa0f.js @@ -0,0 +1,13264 @@ +import{S as al,i as sl,s as cl,c as Mi,a as qr,B as ll,m as Ii,f as bn,D as ul,k as wn,E as hl,j as Fn,o as Di,n as yn,ad as Cf,a5 as Rf,I as dl,e as hr,b as Lo,g as ol,x as Do,F as Cv,aa as Pf,O as Rv,L as Ov,t as Io,h as rl,P as Mv,Q as Iv,X as Dv,R as Lv,T as Nv,U as wv,V as Fv,K as xf}from"./index.396f4a72.js";import{n as Bv}from"./utils.27234e1d.js";import{B as Of}from"./BlockLabel.37da86a3.js";import{F as fl}from"./File.60a988f4.js";import{c as Qr}from"./_commonjsHelpers.88e99c8f.js";import{U as Uv}from"./Upload.5d0148e8.js";import{M as Vv}from"./ModifyUpload.2cfe71e4.js";import{E as _b}from"./Model3D.b44fd6f2.js";var zn={exports:{}};(function(ft,Ze){(function(Ie,y){ft.exports=y()})(typeof self<"u"?self:typeof Qr<"u"?Qr:Qr,function(){return function(Ie){var y={};function f(U){if(y[U])return y[U].exports;var _=y[U]={i:U,l:!1,exports:{}};return Ie[U].call(_.exports,_,_.exports,f),_.l=!0,_.exports}return f.m=Ie,f.c=y,f.d=function(U,_,R){f.o(U,_)||Object.defineProperty(U,_,{enumerable:!0,get:R})},f.r=function(U){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(U,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(U,"__esModule",{value:!0})},f.t=function(U,_){if(1&_&&(U=f(U)),8&_||4&_&&typeof U=="object"&&U&&U.__esModule)return U;var R=Object.create(null);if(f.r(R),Object.defineProperty(R,"default",{enumerable:!0,value:U}),2&_&&typeof U!="string")for(var u in U)f.d(R,u,function(M){return U[M]}.bind(null,u));return R},f.n=function(U){var _=U&&U.__esModule?function(){return U.default}:function(){return U};return f.d(_,"a",_),_},f.o=function(U,_){return Object.prototype.hasOwnProperty.call(U,_)},f.p="",f(f.s=169)}([function(Ie,y,f){f.d(y,"d",function(){return C}),f.d(y,"e",function(){return P}),f.d(y,"f",function(){return m}),f.d(y,"b",function(){return c}),f.d(y,"a",function(){return T}),f.d(y,"c",function(){return S});var U=f(14),_=f(28),R=f(44),u=f(11),M=f(74),C=function(){function g(l,h){l===void 0&&(l=0),h===void 0&&(h=0),this.x=l,this.y=h}return g.prototype.toString=function(){return"{X: "+this.x+" Y: "+this.y+"}"},g.prototype.getClassName=function(){return"Vector2"},g.prototype.getHashCode=function(){var l=0|this.x;return l=397*l^(0|this.y)},g.prototype.toArray=function(l,h){return h===void 0&&(h=0),l[h]=this.x,l[h+1]=this.y,this},g.prototype.fromArray=function(l,h){return h===void 0&&(h=0),g.FromArrayToRef(l,h,this),this},g.prototype.asArray=function(){var l=new Array;return this.toArray(l,0),l},g.prototype.copyFrom=function(l){return this.x=l.x,this.y=l.y,this},g.prototype.copyFromFloats=function(l,h){return this.x=l,this.y=h,this},g.prototype.set=function(l,h){return this.copyFromFloats(l,h)},g.prototype.add=function(l){return new g(this.x+l.x,this.y+l.y)},g.prototype.addToRef=function(l,h){return h.x=this.x+l.x,h.y=this.y+l.y,this},g.prototype.addInPlace=function(l){return this.x+=l.x,this.y+=l.y,this},g.prototype.addVector3=function(l){return new g(this.x+l.x,this.y+l.y)},g.prototype.subtract=function(l){return new g(this.x-l.x,this.y-l.y)},g.prototype.subtractToRef=function(l,h){return h.x=this.x-l.x,h.y=this.y-l.y,this},g.prototype.subtractInPlace=function(l){return this.x-=l.x,this.y-=l.y,this},g.prototype.multiplyInPlace=function(l){return this.x*=l.x,this.y*=l.y,this},g.prototype.multiply=function(l){return new g(this.x*l.x,this.y*l.y)},g.prototype.multiplyToRef=function(l,h){return h.x=this.x*l.x,h.y=this.y*l.y,this},g.prototype.multiplyByFloats=function(l,h){return new g(this.x*l,this.y*h)},g.prototype.divide=function(l){return new g(this.x/l.x,this.y/l.y)},g.prototype.divideToRef=function(l,h){return h.x=this.x/l.x,h.y=this.y/l.y,this},g.prototype.divideInPlace=function(l){return this.divideToRef(l,this)},g.prototype.negate=function(){return new g(-this.x,-this.y)},g.prototype.negateInPlace=function(){return this.x*=-1,this.y*=-1,this},g.prototype.negateToRef=function(l){return l.copyFromFloats(-1*this.x,-1*this.y)},g.prototype.scaleInPlace=function(l){return this.x*=l,this.y*=l,this},g.prototype.scale=function(l){var h=new g(0,0);return this.scaleToRef(l,h),h},g.prototype.scaleToRef=function(l,h){return h.x=this.x*l,h.y=this.y*l,this},g.prototype.scaleAndAddToRef=function(l,h){return h.x+=this.x*l,h.y+=this.y*l,this},g.prototype.equals=function(l){return l&&this.x===l.x&&this.y===l.y},g.prototype.equalsWithEpsilon=function(l,h){return h===void 0&&(h=_.a),l&&U.a.WithinEpsilon(this.x,l.x,h)&&U.a.WithinEpsilon(this.y,l.y,h)},g.prototype.floor=function(){return new g(Math.floor(this.x),Math.floor(this.y))},g.prototype.fract=function(){return new g(this.x-Math.floor(this.x),this.y-Math.floor(this.y))},g.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},g.prototype.lengthSquared=function(){return this.x*this.x+this.y*this.y},g.prototype.normalize=function(){var l=this.length();return l===0||(this.x/=l,this.y/=l),this},g.prototype.clone=function(){return new g(this.x,this.y)},g.Zero=function(){return new g(0,0)},g.One=function(){return new g(1,1)},g.FromArray=function(l,h){return h===void 0&&(h=0),new g(l[h],l[h+1])},g.FromArrayToRef=function(l,h,v){v.x=l[h],v.y=l[h+1]},g.CatmullRom=function(l,h,v,E,D){var w=D*D,N=D*w;return new g(.5*(2*h.x+(-l.x+v.x)*D+(2*l.x-5*h.x+4*v.x-E.x)*w+(-l.x+3*h.x-3*v.x+E.x)*N),.5*(2*h.y+(-l.y+v.y)*D+(2*l.y-5*h.y+4*v.y-E.y)*w+(-l.y+3*h.y-3*v.y+E.y)*N))},g.Clamp=function(l,h,v){var E=l.x;E=(E=E>v.x?v.x:E)v.y?v.y:D)h.x?l.x:h.x,l.y>h.y?l.y:h.y)},g.Transform=function(l,h){var v=g.Zero();return g.TransformToRef(l,h,v),v},g.TransformToRef=function(l,h,v){var E=h.m,D=l.x*E[0]+l.y*E[4]+E[12],w=l.x*E[1]+l.y*E[5]+E[13];v.x=D,v.y=w},g.PointInTriangle=function(l,h,v,E){var D=.5*(-v.y*E.x+h.y*(-v.x+E.x)+h.x*(v.y-E.y)+v.x*E.y),w=D<0?-1:1,N=(h.y*E.x-h.x*E.y+(E.y-h.y)*l.x+(h.x-E.x)*l.y)*w,I=(h.x*v.y-h.y*v.x+(h.y-v.y)*l.x+(v.x-h.x)*l.y)*w;return N>0&&I>0&&N+I<2*D*w},g.Distance=function(l,h){return Math.sqrt(g.DistanceSquared(l,h))},g.DistanceSquared=function(l,h){var v=l.x-h.x,E=l.y-h.y;return v*v+E*E},g.Center=function(l,h){var v=l.add(h);return v.scaleInPlace(.5),v},g.DistanceOfPointFromSegment=function(l,h,v){var E=g.DistanceSquared(h,v);if(E===0)return g.Distance(l,h);var D=v.subtract(h),w=Math.max(0,Math.min(1,g.Dot(l.subtract(h),D)/E)),N=h.add(D.multiplyByFloats(w,w));return g.Distance(l,N)},g}(),P=function(){function g(l,h,v){l===void 0&&(l=0),h===void 0&&(h=0),v===void 0&&(v=0),this._isDirty=!0,this._x=l,this._y=h,this._z=v}return Object.defineProperty(g.prototype,"x",{get:function(){return this._x},set:function(l){this._x=l,this._isDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"y",{get:function(){return this._y},set:function(l){this._y=l,this._isDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"z",{get:function(){return this._z},set:function(l){this._z=l,this._isDirty=!0},enumerable:!1,configurable:!0}),g.prototype.toString=function(){return"{X: "+this._x+" Y:"+this._y+" Z:"+this._z+"}"},g.prototype.getClassName=function(){return"Vector3"},g.prototype.getHashCode=function(){var l=0|this._x;return l=397*(l=397*l^(0|this._y))^(0|this._z)},g.prototype.asArray=function(){var l=[];return this.toArray(l,0),l},g.prototype.toArray=function(l,h){return h===void 0&&(h=0),l[h]=this._x,l[h+1]=this._y,l[h+2]=this._z,this},g.prototype.fromArray=function(l,h){return h===void 0&&(h=0),g.FromArrayToRef(l,h,this),this},g.prototype.toQuaternion=function(){return c.RotationYawPitchRoll(this._y,this._x,this._z)},g.prototype.addInPlace=function(l){return this.addInPlaceFromFloats(l._x,l._y,l._z)},g.prototype.addInPlaceFromFloats=function(l,h,v){return this.x+=l,this.y+=h,this.z+=v,this},g.prototype.add=function(l){return new g(this._x+l._x,this._y+l._y,this._z+l._z)},g.prototype.addToRef=function(l,h){return h.copyFromFloats(this._x+l._x,this._y+l._y,this._z+l._z)},g.prototype.subtractInPlace=function(l){return this.x-=l._x,this.y-=l._y,this.z-=l._z,this},g.prototype.subtract=function(l){return new g(this._x-l._x,this._y-l._y,this._z-l._z)},g.prototype.subtractToRef=function(l,h){return this.subtractFromFloatsToRef(l._x,l._y,l._z,h)},g.prototype.subtractFromFloats=function(l,h,v){return new g(this._x-l,this._y-h,this._z-v)},g.prototype.subtractFromFloatsToRef=function(l,h,v,E){return E.copyFromFloats(this._x-l,this._y-h,this._z-v)},g.prototype.negate=function(){return new g(-this._x,-this._y,-this._z)},g.prototype.negateInPlace=function(){return this.x*=-1,this.y*=-1,this.z*=-1,this},g.prototype.negateToRef=function(l){return l.copyFromFloats(-1*this._x,-1*this._y,-1*this._z)},g.prototype.scaleInPlace=function(l){return this.x*=l,this.y*=l,this.z*=l,this},g.prototype.scale=function(l){return new g(this._x*l,this._y*l,this._z*l)},g.prototype.scaleToRef=function(l,h){return h.copyFromFloats(this._x*l,this._y*l,this._z*l)},g.prototype.scaleAndAddToRef=function(l,h){return h.addInPlaceFromFloats(this._x*l,this._y*l,this._z*l)},g.prototype.projectOnPlane=function(l,h){var v=g.Zero();return this.projectOnPlaneToRef(l,h,v),v},g.prototype.projectOnPlaneToRef=function(l,h,v){var E=l.normal,D=l.d,w=A.Vector3[0];this.subtractToRef(h,w),w.normalize();var N=g.Dot(w,E),I=-(g.Dot(h,E)+D)/N,V=w.scaleInPlace(I);h.addToRef(V,v)},g.prototype.equals=function(l){return l&&this._x===l._x&&this._y===l._y&&this._z===l._z},g.prototype.equalsWithEpsilon=function(l,h){return h===void 0&&(h=_.a),l&&U.a.WithinEpsilon(this._x,l._x,h)&&U.a.WithinEpsilon(this._y,l._y,h)&&U.a.WithinEpsilon(this._z,l._z,h)},g.prototype.equalsToFloats=function(l,h,v){return this._x===l&&this._y===h&&this._z===v},g.prototype.multiplyInPlace=function(l){return this.x*=l._x,this.y*=l._y,this.z*=l._z,this},g.prototype.multiply=function(l){return this.multiplyByFloats(l._x,l._y,l._z)},g.prototype.multiplyToRef=function(l,h){return h.copyFromFloats(this._x*l._x,this._y*l._y,this._z*l._z)},g.prototype.multiplyByFloats=function(l,h,v){return new g(this._x*l,this._y*h,this._z*v)},g.prototype.divide=function(l){return new g(this._x/l._x,this._y/l._y,this._z/l._z)},g.prototype.divideToRef=function(l,h){return h.copyFromFloats(this._x/l._x,this._y/l._y,this._z/l._z)},g.prototype.divideInPlace=function(l){return this.divideToRef(l,this)},g.prototype.minimizeInPlace=function(l){return this.minimizeInPlaceFromFloats(l._x,l._y,l._z)},g.prototype.maximizeInPlace=function(l){return this.maximizeInPlaceFromFloats(l._x,l._y,l._z)},g.prototype.minimizeInPlaceFromFloats=function(l,h,v){return lthis._x&&(this.x=l),h>this._y&&(this.y=h),v>this._z&&(this.z=v),this},g.prototype.isNonUniformWithinEpsilon=function(l){var h=Math.abs(this._x),v=Math.abs(this._y);if(!U.a.WithinEpsilon(h,v,l))return!0;var E=Math.abs(this._z);return!U.a.WithinEpsilon(h,E,l)||!U.a.WithinEpsilon(v,E,l)},Object.defineProperty(g.prototype,"isNonUniform",{get:function(){var l=Math.abs(this._x);return l!==Math.abs(this._y)||l!==Math.abs(this._z)},enumerable:!1,configurable:!0}),g.prototype.floor=function(){return new g(Math.floor(this._x),Math.floor(this._y),Math.floor(this._z))},g.prototype.fract=function(){return new g(this._x-Math.floor(this._x),this._y-Math.floor(this._y),this._z-Math.floor(this._z))},g.prototype.length=function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z)},g.prototype.lengthSquared=function(){return this._x*this._x+this._y*this._y+this._z*this._z},g.prototype.normalize=function(){return this.normalizeFromLength(this.length())},g.prototype.reorderInPlace=function(l){var h=this;return(l=l.toLowerCase())==="xyz"||(A.Vector3[0].copyFrom(this),["x","y","z"].forEach(function(v,E){h[v]=A.Vector3[0][l[E]]})),this},g.prototype.rotateByQuaternionToRef=function(l,h){return l.toRotationMatrix(A.Matrix[0]),g.TransformCoordinatesToRef(this,A.Matrix[0],h),h},g.prototype.rotateByQuaternionAroundPointToRef=function(l,h,v){return this.subtractToRef(h,A.Vector3[0]),A.Vector3[0].rotateByQuaternionToRef(l,A.Vector3[0]),h.addToRef(A.Vector3[0],v),v},g.prototype.cross=function(l){return g.Cross(this,l)},g.prototype.normalizeFromLength=function(l){return l===0||l===1?this:this.scaleInPlace(1/l)},g.prototype.normalizeToNew=function(){var l=new g(0,0,0);return this.normalizeToRef(l),l},g.prototype.normalizeToRef=function(l){var h=this.length();return h===0||h===1?l.copyFromFloats(this._x,this._y,this._z):this.scaleToRef(1/h,l)},g.prototype.clone=function(){return new g(this._x,this._y,this._z)},g.prototype.copyFrom=function(l){return this.copyFromFloats(l._x,l._y,l._z)},g.prototype.copyFromFloats=function(l,h,v){return this.x=l,this.y=h,this.z=v,this},g.prototype.set=function(l,h,v){return this.copyFromFloats(l,h,v)},g.prototype.setAll=function(l){return this.x=this.y=this.z=l,this},g.GetClipFactor=function(l,h,v,E){var D=g.Dot(l,v)-E;return D/(D-(g.Dot(h,v)-E))},g.GetAngleBetweenVectors=function(l,h,v){var E=l.normalizeToRef(A.Vector3[1]),D=h.normalizeToRef(A.Vector3[2]),w=g.Dot(E,D),N=A.Vector3[3];return g.CrossToRef(E,D,N),g.Dot(N,v)>0?Math.acos(w):-Math.acos(w)},g.FromArray=function(l,h){return h===void 0&&(h=0),new g(l[h],l[h+1],l[h+2])},g.FromFloatArray=function(l,h){return g.FromArray(l,h)},g.FromArrayToRef=function(l,h,v){v.x=l[h],v.y=l[h+1],v.z=l[h+2]},g.FromFloatArrayToRef=function(l,h,v){return g.FromArrayToRef(l,h,v)},g.FromFloatsToRef=function(l,h,v,E){E.copyFromFloats(l,h,v)},g.Zero=function(){return new g(0,0,0)},g.One=function(){return new g(1,1,1)},g.Up=function(){return new g(0,1,0)},Object.defineProperty(g,"UpReadOnly",{get:function(){return g._UpReadOnly},enumerable:!1,configurable:!0}),Object.defineProperty(g,"ZeroReadOnly",{get:function(){return g._ZeroReadOnly},enumerable:!1,configurable:!0}),g.Down=function(){return new g(0,-1,0)},g.Forward=function(l){return l===void 0&&(l=!1),new g(0,0,l?-1:1)},g.Backward=function(l){return l===void 0&&(l=!1),new g(0,0,l?1:-1)},g.Right=function(){return new g(1,0,0)},g.Left=function(){return new g(-1,0,0)},g.TransformCoordinates=function(l,h){var v=g.Zero();return g.TransformCoordinatesToRef(l,h,v),v},g.TransformCoordinatesToRef=function(l,h,v){g.TransformCoordinatesFromFloatsToRef(l._x,l._y,l._z,h,v)},g.TransformCoordinatesFromFloatsToRef=function(l,h,v,E,D){var w=E.m,N=l*w[0]+h*w[4]+v*w[8]+w[12],I=l*w[1]+h*w[5]+v*w[9]+w[13],V=l*w[2]+h*w[6]+v*w[10]+w[14],X=1/(l*w[3]+h*w[7]+v*w[11]+w[15]);D.x=N*X,D.y=I*X,D.z=V*X},g.TransformNormal=function(l,h){var v=g.Zero();return g.TransformNormalToRef(l,h,v),v},g.TransformNormalToRef=function(l,h,v){this.TransformNormalFromFloatsToRef(l._x,l._y,l._z,h,v)},g.TransformNormalFromFloatsToRef=function(l,h,v,E,D){var w=E.m;D.x=l*w[0]+h*w[4]+v*w[8],D.y=l*w[1]+h*w[5]+v*w[9],D.z=l*w[2]+h*w[6]+v*w[10]},g.CatmullRom=function(l,h,v,E,D){var w=D*D,N=D*w;return new g(.5*(2*h._x+(-l._x+v._x)*D+(2*l._x-5*h._x+4*v._x-E._x)*w+(-l._x+3*h._x-3*v._x+E._x)*N),.5*(2*h._y+(-l._y+v._y)*D+(2*l._y-5*h._y+4*v._y-E._y)*w+(-l._y+3*h._y-3*v._y+E._y)*N),.5*(2*h._z+(-l._z+v._z)*D+(2*l._z-5*h._z+4*v._z-E._z)*w+(-l._z+3*h._z-3*v._z+E._z)*N))},g.Clamp=function(l,h,v){var E=new g;return g.ClampToRef(l,h,v,E),E},g.ClampToRef=function(l,h,v,E){var D=l._x;D=(D=D>v._x?v._x:D)v._y?v._y:w)v._z?v._z:N)this.x&&(this.x=l.x),l.y>this.y&&(this.y=l.y),l.z>this.z&&(this.z=l.z),l.w>this.w&&(this.w=l.w),this},g.prototype.floor=function(){return new g(Math.floor(this.x),Math.floor(this.y),Math.floor(this.z),Math.floor(this.w))},g.prototype.fract=function(){return new g(this.x-Math.floor(this.x),this.y-Math.floor(this.y),this.z-Math.floor(this.z),this.w-Math.floor(this.w))},g.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},g.prototype.lengthSquared=function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},g.prototype.normalize=function(){var l=this.length();return l===0?this:this.scaleInPlace(1/l)},g.prototype.toVector3=function(){return new P(this.x,this.y,this.z)},g.prototype.clone=function(){return new g(this.x,this.y,this.z,this.w)},g.prototype.copyFrom=function(l){return this.x=l.x,this.y=l.y,this.z=l.z,this.w=l.w,this},g.prototype.copyFromFloats=function(l,h,v,E){return this.x=l,this.y=h,this.z=v,this.w=E,this},g.prototype.set=function(l,h,v,E){return this.copyFromFloats(l,h,v,E)},g.prototype.setAll=function(l){return this.x=this.y=this.z=this.w=l,this},g.FromArray=function(l,h){return h||(h=0),new g(l[h],l[h+1],l[h+2],l[h+3])},g.FromArrayToRef=function(l,h,v){v.x=l[h],v.y=l[h+1],v.z=l[h+2],v.w=l[h+3]},g.FromFloatArrayToRef=function(l,h,v){g.FromArrayToRef(l,h,v)},g.FromFloatsToRef=function(l,h,v,E,D){D.x=l,D.y=h,D.z=v,D.w=E},g.Zero=function(){return new g(0,0,0,0)},g.One=function(){return new g(1,1,1,1)},g.Normalize=function(l){var h=g.Zero();return g.NormalizeToRef(l,h),h},g.NormalizeToRef=function(l,h){h.copyFrom(l),h.normalize()},g.Minimize=function(l,h){var v=l.clone();return v.minimizeInPlace(h),v},g.Maximize=function(l,h){var v=l.clone();return v.maximizeInPlace(h),v},g.Distance=function(l,h){return Math.sqrt(g.DistanceSquared(l,h))},g.DistanceSquared=function(l,h){var v=l.x-h.x,E=l.y-h.y,D=l.z-h.z,w=l.w-h.w;return v*v+E*E+D*D+w*w},g.Center=function(l,h){var v=l.add(h);return v.scaleInPlace(.5),v},g.TransformNormal=function(l,h){var v=g.Zero();return g.TransformNormalToRef(l,h,v),v},g.TransformNormalToRef=function(l,h,v){var E=h.m,D=l.x*E[0]+l.y*E[4]+l.z*E[8],w=l.x*E[1]+l.y*E[5]+l.z*E[9],N=l.x*E[2]+l.y*E[6]+l.z*E[10];v.x=D,v.y=w,v.z=N,v.w=l.w},g.TransformNormalFromFloatsToRef=function(l,h,v,E,D,w){var N=D.m;w.x=l*N[0]+h*N[4]+v*N[8],w.y=l*N[1]+h*N[5]+v*N[9],w.z=l*N[2]+h*N[6]+v*N[10],w.w=E},g.FromVector3=function(l,h){return h===void 0&&(h=0),new g(l._x,l._y,l._z,h)},g}(),c=function(){function g(l,h,v,E){l===void 0&&(l=0),h===void 0&&(h=0),v===void 0&&(v=0),E===void 0&&(E=1),this._isDirty=!0,this._x=l,this._y=h,this._z=v,this._w=E}return Object.defineProperty(g.prototype,"x",{get:function(){return this._x},set:function(l){this._x=l,this._isDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"y",{get:function(){return this._y},set:function(l){this._y=l,this._isDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"z",{get:function(){return this._z},set:function(l){this._z=l,this._isDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"w",{get:function(){return this._w},set:function(l){this._w=l,this._isDirty=!0},enumerable:!1,configurable:!0}),g.prototype.toString=function(){return"{X: "+this._x+" Y:"+this._y+" Z:"+this._z+" W:"+this._w+"}"},g.prototype.getClassName=function(){return"Quaternion"},g.prototype.getHashCode=function(){var l=0|this._x;return l=397*(l=397*(l=397*l^(0|this._y))^(0|this._z))^(0|this._w)},g.prototype.asArray=function(){return[this._x,this._y,this._z,this._w]},g.prototype.equals=function(l){return l&&this._x===l._x&&this._y===l._y&&this._z===l._z&&this._w===l._w},g.prototype.equalsWithEpsilon=function(l,h){return h===void 0&&(h=_.a),l&&U.a.WithinEpsilon(this._x,l._x,h)&&U.a.WithinEpsilon(this._y,l._y,h)&&U.a.WithinEpsilon(this._z,l._z,h)&&U.a.WithinEpsilon(this._w,l._w,h)},g.prototype.clone=function(){return new g(this._x,this._y,this._z,this._w)},g.prototype.copyFrom=function(l){return this.x=l._x,this.y=l._y,this.z=l._z,this.w=l._w,this},g.prototype.copyFromFloats=function(l,h,v,E){return this.x=l,this.y=h,this.z=v,this.w=E,this},g.prototype.set=function(l,h,v,E){return this.copyFromFloats(l,h,v,E)},g.prototype.add=function(l){return new g(this._x+l._x,this._y+l._y,this._z+l._z,this._w+l._w)},g.prototype.addInPlace=function(l){return this._x+=l._x,this._y+=l._y,this._z+=l._z,this._w+=l._w,this},g.prototype.subtract=function(l){return new g(this._x-l._x,this._y-l._y,this._z-l._z,this._w-l._w)},g.prototype.scale=function(l){return new g(this._x*l,this._y*l,this._z*l,this._w*l)},g.prototype.scaleToRef=function(l,h){return h.x=this._x*l,h.y=this._y*l,h.z=this._z*l,h.w=this._w*l,this},g.prototype.scaleInPlace=function(l){return this.x*=l,this.y*=l,this.z*=l,this.w*=l,this},g.prototype.scaleAndAddToRef=function(l,h){return h.x+=this._x*l,h.y+=this._y*l,h.z+=this._z*l,h.w+=this._w*l,this},g.prototype.multiply=function(l){var h=new g(0,0,0,1);return this.multiplyToRef(l,h),h},g.prototype.multiplyToRef=function(l,h){var v=this._x*l._w+this._y*l._z-this._z*l._y+this._w*l._x,E=-this._x*l._z+this._y*l._w+this._z*l._x+this._w*l._y,D=this._x*l._y-this._y*l._x+this._z*l._w+this._w*l._z,w=-this._x*l._x-this._y*l._y-this._z*l._z+this._w*l._w;return h.copyFromFloats(v,E,D,w),this},g.prototype.multiplyInPlace=function(l){return this.multiplyToRef(l,this),this},g.prototype.conjugateToRef=function(l){return l.copyFromFloats(-this._x,-this._y,-this._z,this._w),this},g.prototype.conjugateInPlace=function(){return this.x*=-1,this.y*=-1,this.z*=-1,this},g.prototype.conjugate=function(){return new g(-this._x,-this._y,-this._z,this._w)},g.prototype.length=function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},g.prototype.normalize=function(){var l=this.length();if(l===0)return this;var h=1/l;return this.x*=h,this.y*=h,this.z*=h,this.w*=h,this},g.prototype.toEulerAngles=function(l){var h=P.Zero();return this.toEulerAnglesToRef(h),h},g.prototype.toEulerAnglesToRef=function(l){var h=this._z,v=this._x,E=this._y,D=this._w,w=D*D,N=h*h,I=v*v,V=E*E,X=E*h-v*D;return X<-.4999999?(l.y=2*Math.atan2(E,D),l.x=Math.PI/2,l.z=0):X>.4999999?(l.y=2*Math.atan2(E,D),l.x=-Math.PI/2,l.z=0):(l.z=Math.atan2(2*(v*E+h*D),-N-I+V+w),l.x=Math.asin(-2*(h*E-v*D)),l.y=Math.atan2(2*(h*v+E*D),N-I-V+w)),this},g.prototype.toRotationMatrix=function(l){return T.FromQuaternionToRef(this,l),this},g.prototype.fromRotationMatrix=function(l){return g.FromRotationMatrixToRef(l,this),this},g.FromRotationMatrix=function(l){var h=new g;return g.FromRotationMatrixToRef(l,h),h},g.FromRotationMatrixToRef=function(l,h){var v,E=l.m,D=E[0],w=E[4],N=E[8],I=E[1],V=E[5],X=E[9],j=E[2],ne=E[6],te=E[10],de=D+V+te;de>0?(v=.5/Math.sqrt(de+1),h.w=.25/v,h.x=(ne-X)*v,h.y=(N-j)*v,h.z=(I-w)*v):D>V&&D>te?(v=2*Math.sqrt(1+D-V-te),h.w=(ne-X)/v,h.x=.25*v,h.y=(w+I)/v,h.z=(N+j)/v):V>te?(v=2*Math.sqrt(1+V-D-te),h.w=(N-j)/v,h.x=(w+I)/v,h.y=.25*v,h.z=(X+ne)/v):(v=2*Math.sqrt(1+te-D-V),h.w=(I-w)/v,h.x=(N+j)/v,h.y=(X+ne)/v,h.z=.25*v)},g.Dot=function(l,h){return l._x*h._x+l._y*h._y+l._z*h._z+l._w*h._w},g.AreClose=function(l,h){return g.Dot(l,h)>=0},g.Zero=function(){return new g(0,0,0,0)},g.Inverse=function(l){return new g(-l._x,-l._y,-l._z,l._w)},g.InverseToRef=function(l,h){return h.set(-l._x,-l._y,-l._z,l._w),h},g.Identity=function(){return new g(0,0,0,1)},g.IsIdentity=function(l){return l&&l._x===0&&l._y===0&&l._z===0&&l._w===1},g.RotationAxis=function(l,h){return g.RotationAxisToRef(l,h,new g)},g.RotationAxisToRef=function(l,h,v){var E=Math.sin(h/2);return l.normalize(),v.w=Math.cos(h/2),v.x=l._x*E,v.y=l._y*E,v.z=l._z*E,v},g.FromArray=function(l,h){return h||(h=0),new g(l[h],l[h+1],l[h+2],l[h+3])},g.FromArrayToRef=function(l,h,v){v.x=l[h],v.y=l[h+1],v.z=l[h+2],v.w=l[h+3]},g.FromEulerAngles=function(l,h,v){var E=new g;return g.RotationYawPitchRollToRef(h,l,v,E),E},g.FromEulerAnglesToRef=function(l,h,v,E){return g.RotationYawPitchRollToRef(h,l,v,E),E},g.FromEulerVector=function(l){var h=new g;return g.RotationYawPitchRollToRef(l._y,l._x,l._z,h),h},g.FromEulerVectorToRef=function(l,h){return g.RotationYawPitchRollToRef(l._y,l._x,l._z,h),h},g.RotationYawPitchRoll=function(l,h,v){var E=new g;return g.RotationYawPitchRollToRef(l,h,v,E),E},g.RotationYawPitchRollToRef=function(l,h,v,E){var D=.5*v,w=.5*h,N=.5*l,I=Math.sin(D),V=Math.cos(D),X=Math.sin(w),j=Math.cos(w),ne=Math.sin(N),te=Math.cos(N);E.x=te*X*V+ne*j*I,E.y=ne*j*V-te*X*I,E.z=te*j*I-ne*X*V,E.w=te*j*V+ne*X*I},g.RotationAlphaBetaGamma=function(l,h,v){var E=new g;return g.RotationAlphaBetaGammaToRef(l,h,v,E),E},g.RotationAlphaBetaGammaToRef=function(l,h,v,E){var D=.5*(v+l),w=.5*(v-l),N=.5*h;E.x=Math.cos(w)*Math.sin(N),E.y=Math.sin(w)*Math.sin(N),E.z=Math.sin(D)*Math.cos(N),E.w=Math.cos(D)*Math.cos(N)},g.RotationQuaternionFromAxis=function(l,h,v){var E=new g(0,0,0,0);return g.RotationQuaternionFromAxisToRef(l,h,v,E),E},g.RotationQuaternionFromAxisToRef=function(l,h,v,E){var D=A.Matrix[0];T.FromXYZAxesToRef(l.normalize(),h.normalize(),v.normalize(),D),g.FromRotationMatrixToRef(D,E)},g.Slerp=function(l,h,v){var E=g.Identity();return g.SlerpToRef(l,h,v,E),E},g.SlerpToRef=function(l,h,v,E){var D,w,N=l._x*h._x+l._y*h._y+l._z*h._z+l._w*h._w,I=!1;if(N<0&&(I=!0,N=-N),N>.999999)w=1-v,D=I?-v:v;else{var V=Math.acos(N),X=1/Math.sin(V);w=Math.sin((1-v)*V)*X,D=I?-Math.sin(v*V)*X:Math.sin(v*V)*X}E.x=w*l._x+D*h._x,E.y=w*l._y+D*h._y,E.z=w*l._z+D*h._z,E.w=w*l._w+D*h._w},g.Hermite=function(l,h,v,E,D){var w=D*D,N=D*w,I=2*N-3*w+1,V=-2*N+3*w,X=N-2*w+D,j=N-w;return new g(l._x*I+v._x*V+h._x*X+E._x*j,l._y*I+v._y*V+h._y*X+E._y*j,l._z*I+v._z*V+h._z*X+E._z*j,l._w*I+v._w*V+h._w*X+E._w*j)},g}(),T=function(){function g(){this._isIdentity=!1,this._isIdentityDirty=!0,this._isIdentity3x2=!0,this._isIdentity3x2Dirty=!0,this.updateFlag=-1,M.a.MatrixTrackPrecisionChange&&M.a.MatrixTrackedMatrices.push(this),this._m=new M.a.MatrixCurrentType(16),this._updateIdentityStatus(!1)}return Object.defineProperty(g,"Use64Bits",{get:function(){return M.a.MatrixUse64Bits},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"m",{get:function(){return this._m},enumerable:!1,configurable:!0}),g.prototype._markAsUpdated=function(){this.updateFlag=g._updateFlagSeed++,this._isIdentity=!1,this._isIdentity3x2=!1,this._isIdentityDirty=!0,this._isIdentity3x2Dirty=!0},g.prototype._updateIdentityStatus=function(l,h,v,E){h===void 0&&(h=!1),v===void 0&&(v=!1),E===void 0&&(E=!0),this.updateFlag=g._updateFlagSeed++,this._isIdentity=l,this._isIdentity3x2=l||v,this._isIdentityDirty=!this._isIdentity&&h,this._isIdentity3x2Dirty=!this._isIdentity3x2&&E},g.prototype.isIdentity=function(){if(this._isIdentityDirty){this._isIdentityDirty=!1;var l=this._m;this._isIdentity=l[0]===1&&l[1]===0&&l[2]===0&&l[3]===0&&l[4]===0&&l[5]===1&&l[6]===0&&l[7]===0&&l[8]===0&&l[9]===0&&l[10]===1&&l[11]===0&&l[12]===0&&l[13]===0&&l[14]===0&&l[15]===1}return this._isIdentity},g.prototype.isIdentityAs3x2=function(){return this._isIdentity3x2Dirty&&(this._isIdentity3x2Dirty=!1,this._m[0]!==1||this._m[5]!==1||this._m[15]!==1||this._m[1]!==0||this._m[2]!==0||this._m[3]!==0||this._m[4]!==0||this._m[6]!==0||this._m[7]!==0||this._m[8]!==0||this._m[9]!==0||this._m[10]!==0||this._m[11]!==0||this._m[12]!==0||this._m[13]!==0||this._m[14]!==0?this._isIdentity3x2=!1:this._isIdentity3x2=!0),this._isIdentity3x2},g.prototype.determinant=function(){if(this._isIdentity===!0)return 1;var l=this._m,h=l[0],v=l[1],E=l[2],D=l[3],w=l[4],N=l[5],I=l[6],V=l[7],X=l[8],j=l[9],ne=l[10],te=l[11],de=l[12],pe=l[13],ae=l[14],ee=l[15],K=ne*ee-ae*te,$=j*ee-pe*te,L=j*ae-pe*ne,G=X*ee-de*te,Q=X*ae-ne*de,oe=X*pe-de*j;return h*+(N*K-I*$+V*L)+v*-(w*K-I*G+V*Q)+E*+(w*$-N*G+V*oe)+D*-(w*L-N*Q+I*oe)},g.prototype.toArray=function(){return this._m},g.prototype.asArray=function(){return this._m},g.prototype.invert=function(){return this.invertToRef(this),this},g.prototype.reset=function(){return g.FromValuesToRef(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,this),this._updateIdentityStatus(!1),this},g.prototype.add=function(l){var h=new g;return this.addToRef(l,h),h},g.prototype.addToRef=function(l,h){for(var v=this._m,E=h._m,D=l.m,w=0;w<16;w++)E[w]=v[w]+D[w];return h._markAsUpdated(),this},g.prototype.addToSelf=function(l){for(var h=this._m,v=l.m,E=0;E<16;E++)h[E]+=v[E];return this._markAsUpdated(),this},g.prototype.invertToRef=function(l){if(this._isIdentity===!0)return g.IdentityToRef(l),this;var h=this._m,v=h[0],E=h[1],D=h[2],w=h[3],N=h[4],I=h[5],V=h[6],X=h[7],j=h[8],ne=h[9],te=h[10],de=h[11],pe=h[12],ae=h[13],ee=h[14],K=h[15],$=te*K-ee*de,L=ne*K-ae*de,G=ne*ee-ae*te,Q=j*K-pe*de,oe=j*ee-te*pe,re=j*ae-pe*ne,Y=+(I*$-V*L+X*G),k=-(N*$-V*Q+X*oe),H=+(N*L-I*Q+X*re),Z=-(N*G-I*oe+V*re),W=v*Y+E*k+D*H+w*Z;if(W===0)return l.copyFrom(this),this;var q=1/W,he=V*K-ee*X,ge=I*K-ae*X,me=I*ee-ae*V,_e=N*K-pe*X,be=N*ee-pe*V,Pe=N*ae-pe*I,ye=V*de-te*X,Be=I*de-ne*X,ke=I*te-ne*V,We=N*de-j*X,je=N*te-j*V,He=N*ne-j*I,Qe=-(E*$-D*L+w*G),Ge=+(v*$-D*Q+w*oe),nt=-(v*L-E*Q+w*re),$e=+(v*G-E*oe+D*re),ct=+(E*he-D*ge+w*me),st=-(v*he-D*_e+w*be),mt=+(v*ge-E*_e+w*Pe),St=-(v*me-E*be+D*Pe),wt=-(E*ye-D*Be+w*ke),It=+(v*ye-D*We+w*je),Pt=-(v*Be-E*We+w*He),Ot=+(v*ke-E*je+D*He);return g.FromValuesToRef(Y*q,Qe*q,ct*q,wt*q,k*q,Ge*q,st*q,It*q,H*q,nt*q,mt*q,Pt*q,Z*q,$e*q,St*q,Ot*q,l),this},g.prototype.addAtIndex=function(l,h){return this._m[l]+=h,this._markAsUpdated(),this},g.prototype.multiplyAtIndex=function(l,h){return this._m[l]*=h,this._markAsUpdated(),this},g.prototype.setTranslationFromFloats=function(l,h,v){return this._m[12]=l,this._m[13]=h,this._m[14]=v,this._markAsUpdated(),this},g.prototype.addTranslationFromFloats=function(l,h,v){return this._m[12]+=l,this._m[13]+=h,this._m[14]+=v,this._markAsUpdated(),this},g.prototype.setTranslation=function(l){return this.setTranslationFromFloats(l._x,l._y,l._z)},g.prototype.getTranslation=function(){return new P(this._m[12],this._m[13],this._m[14])},g.prototype.getTranslationToRef=function(l){return l.x=this._m[12],l.y=this._m[13],l.z=this._m[14],this},g.prototype.removeRotationAndScaling=function(){var l=this.m;return g.FromValuesToRef(1,0,0,0,0,1,0,0,0,0,1,0,l[12],l[13],l[14],l[15],this),this._updateIdentityStatus(l[12]===0&&l[13]===0&&l[14]===0&&l[15]===1),this},g.prototype.multiply=function(l){var h=new g;return this.multiplyToRef(l,h),h},g.prototype.copyFrom=function(l){l.copyToArray(this._m);var h=l;return this._updateIdentityStatus(h._isIdentity,h._isIdentityDirty,h._isIdentity3x2,h._isIdentity3x2Dirty),this},g.prototype.copyToArray=function(l,h){h===void 0&&(h=0);var v=this._m;return l[h]=v[0],l[h+1]=v[1],l[h+2]=v[2],l[h+3]=v[3],l[h+4]=v[4],l[h+5]=v[5],l[h+6]=v[6],l[h+7]=v[7],l[h+8]=v[8],l[h+9]=v[9],l[h+10]=v[10],l[h+11]=v[11],l[h+12]=v[12],l[h+13]=v[13],l[h+14]=v[14],l[h+15]=v[15],this},g.prototype.multiplyToRef=function(l,h){return this._isIdentity?(h.copyFrom(l),this):l._isIdentity?(h.copyFrom(this),this):(this.multiplyToArray(l,h._m,0),h._markAsUpdated(),this)},g.prototype.multiplyToArray=function(l,h,v){var E=this._m,D=l.m,w=E[0],N=E[1],I=E[2],V=E[3],X=E[4],j=E[5],ne=E[6],te=E[7],de=E[8],pe=E[9],ae=E[10],ee=E[11],K=E[12],$=E[13],L=E[14],G=E[15],Q=D[0],oe=D[1],re=D[2],Y=D[3],k=D[4],H=D[5],Z=D[6],W=D[7],q=D[8],he=D[9],ge=D[10],me=D[11],_e=D[12],be=D[13],Pe=D[14],ye=D[15];return h[v]=w*Q+N*k+I*q+V*_e,h[v+1]=w*oe+N*H+I*he+V*be,h[v+2]=w*re+N*Z+I*ge+V*Pe,h[v+3]=w*Y+N*W+I*me+V*ye,h[v+4]=X*Q+j*k+ne*q+te*_e,h[v+5]=X*oe+j*H+ne*he+te*be,h[v+6]=X*re+j*Z+ne*ge+te*Pe,h[v+7]=X*Y+j*W+ne*me+te*ye,h[v+8]=de*Q+pe*k+ae*q+ee*_e,h[v+9]=de*oe+pe*H+ae*he+ee*be,h[v+10]=de*re+pe*Z+ae*ge+ee*Pe,h[v+11]=de*Y+pe*W+ae*me+ee*ye,h[v+12]=K*Q+$*k+L*q+G*_e,h[v+13]=K*oe+$*H+L*he+G*be,h[v+14]=K*re+$*Z+L*ge+G*Pe,h[v+15]=K*Y+$*W+L*me+G*ye,this},g.prototype.equals=function(l){var h=l;if(!h)return!1;if((this._isIdentity||h._isIdentity)&&!this._isIdentityDirty&&!h._isIdentityDirty)return this._isIdentity&&h._isIdentity;var v=this.m,E=h.m;return v[0]===E[0]&&v[1]===E[1]&&v[2]===E[2]&&v[3]===E[3]&&v[4]===E[4]&&v[5]===E[5]&&v[6]===E[6]&&v[7]===E[7]&&v[8]===E[8]&&v[9]===E[9]&&v[10]===E[10]&&v[11]===E[11]&&v[12]===E[12]&&v[13]===E[13]&&v[14]===E[14]&&v[15]===E[15]},g.prototype.clone=function(){var l=new g;return l.copyFrom(this),l},g.prototype.getClassName=function(){return"Matrix"},g.prototype.getHashCode=function(){for(var l=0|this._m[0],h=1;h<16;h++)l=397*l^(0|this._m[h]);return l},g.prototype.decompose=function(l,h,v){if(this._isIdentity)return v&&v.setAll(0),l&&l.setAll(1),h&&h.copyFromFloats(0,0,0,1),!0;var E=this._m;if(v&&v.copyFromFloats(E[12],E[13],E[14]),(l=l||A.Vector3[0]).x=Math.sqrt(E[0]*E[0]+E[1]*E[1]+E[2]*E[2]),l.y=Math.sqrt(E[4]*E[4]+E[5]*E[5]+E[6]*E[6]),l.z=Math.sqrt(E[8]*E[8]+E[9]*E[9]+E[10]*E[10]),this.determinant()<=0&&(l.y*=-1),l._x===0||l._y===0||l._z===0)return h&&h.copyFromFloats(0,0,0,1),!1;if(h){var D=1/l._x,w=1/l._y,N=1/l._z;g.FromValuesToRef(E[0]*D,E[1]*D,E[2]*D,0,E[4]*w,E[5]*w,E[6]*w,0,E[8]*N,E[9]*N,E[10]*N,0,0,0,0,1,A.Matrix[0]),c.FromRotationMatrixToRef(A.Matrix[0],h)}return!0},g.prototype.getRow=function(l){if(l<0||l>3)return null;var h=4*l;return new m(this._m[h+0],this._m[h+1],this._m[h+2],this._m[h+3])},g.prototype.setRow=function(l,h){return this.setRowFromFloats(l,h.x,h.y,h.z,h.w)},g.prototype.transpose=function(){return g.Transpose(this)},g.prototype.transposeToRef=function(l){return g.TransposeToRef(this,l),this},g.prototype.setRowFromFloats=function(l,h,v,E,D){if(l<0||l>3)return this;var w=4*l;return this._m[w+0]=h,this._m[w+1]=v,this._m[w+2]=E,this._m[w+3]=D,this._markAsUpdated(),this},g.prototype.scale=function(l){var h=new g;return this.scaleToRef(l,h),h},g.prototype.scaleToRef=function(l,h){for(var v=0;v<16;v++)h._m[v]=this._m[v]*l;return h._markAsUpdated(),this},g.prototype.scaleAndAddToRef=function(l,h){for(var v=0;v<16;v++)h._m[v]+=this._m[v]*l;return h._markAsUpdated(),this},g.prototype.toNormalMatrix=function(l){var h=A.Matrix[0];this.invertToRef(h),h.transposeToRef(l);var v=l._m;g.FromValuesToRef(v[0],v[1],v[2],0,v[4],v[5],v[6],0,v[8],v[9],v[10],0,0,0,0,1,l)},g.prototype.getRotationMatrix=function(){var l=new g;return this.getRotationMatrixToRef(l),l},g.prototype.getRotationMatrixToRef=function(l){var h=A.Vector3[0];if(!this.decompose(h))return g.IdentityToRef(l),this;var v=this._m,E=1/h._x,D=1/h._y,w=1/h._z;return g.FromValuesToRef(v[0]*E,v[1]*E,v[2]*E,0,v[4]*D,v[5]*D,v[6]*D,0,v[8]*w,v[9]*w,v[10]*w,0,0,0,0,1,l),this},g.prototype.toggleModelMatrixHandInPlace=function(){var l=this._m;l[2]*=-1,l[6]*=-1,l[8]*=-1,l[9]*=-1,l[14]*=-1,this._markAsUpdated()},g.prototype.toggleProjectionMatrixHandInPlace=function(){var l=this._m;l[8]*=-1,l[9]*=-1,l[10]*=-1,l[11]*=-1,this._markAsUpdated()},g.FromArray=function(l,h){h===void 0&&(h=0);var v=new g;return g.FromArrayToRef(l,h,v),v},g.FromArrayToRef=function(l,h,v){for(var E=0;E<16;E++)v._m[E]=l[E+h];v._markAsUpdated()},g.FromFloat32ArrayToRefScaled=function(l,h,v,E){for(var D=0;D<16;D++)E._m[D]=l[D+h]*v;E._markAsUpdated()},Object.defineProperty(g,"IdentityReadOnly",{get:function(){return g._identityReadOnly},enumerable:!1,configurable:!0}),g.FromValuesToRef=function(l,h,v,E,D,w,N,I,V,X,j,ne,te,de,pe,ae,ee){var K=ee._m;K[0]=l,K[1]=h,K[2]=v,K[3]=E,K[4]=D,K[5]=w,K[6]=N,K[7]=I,K[8]=V,K[9]=X,K[10]=j,K[11]=ne,K[12]=te,K[13]=de,K[14]=pe,K[15]=ae,ee._markAsUpdated()},g.FromValues=function(l,h,v,E,D,w,N,I,V,X,j,ne,te,de,pe,ae){var ee=new g,K=ee._m;return K[0]=l,K[1]=h,K[2]=v,K[3]=E,K[4]=D,K[5]=w,K[6]=N,K[7]=I,K[8]=V,K[9]=X,K[10]=j,K[11]=ne,K[12]=te,K[13]=de,K[14]=pe,K[15]=ae,ee._markAsUpdated(),ee},g.Compose=function(l,h,v){var E=new g;return g.ComposeToRef(l,h,v,E),E},g.ComposeToRef=function(l,h,v,E){var D=E._m,w=h._x,N=h._y,I=h._z,V=h._w,X=w+w,j=N+N,ne=I+I,te=w*X,de=w*j,pe=w*ne,ae=N*j,ee=N*ne,K=I*ne,$=V*X,L=V*j,G=V*ne,Q=l._x,oe=l._y,re=l._z;D[0]=(1-(ae+K))*Q,D[1]=(de+G)*Q,D[2]=(pe-L)*Q,D[3]=0,D[4]=(de-G)*oe,D[5]=(1-(te+K))*oe,D[6]=(ee+$)*oe,D[7]=0,D[8]=(pe+L)*re,D[9]=(ee-$)*re,D[10]=(1-(te+ae))*re,D[11]=0,D[12]=v._x,D[13]=v._y,D[14]=v._z,D[15]=1,E._markAsUpdated()},g.Identity=function(){var l=g.FromValues(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1);return l._updateIdentityStatus(!0),l},g.IdentityToRef=function(l){g.FromValuesToRef(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,l),l._updateIdentityStatus(!0)},g.Zero=function(){var l=g.FromValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);return l._updateIdentityStatus(!1),l},g.RotationX=function(l){var h=new g;return g.RotationXToRef(l,h),h},g.Invert=function(l){var h=new g;return l.invertToRef(h),h},g.RotationXToRef=function(l,h){var v=Math.sin(l),E=Math.cos(l);g.FromValuesToRef(1,0,0,0,0,E,v,0,0,-v,E,0,0,0,0,1,h),h._updateIdentityStatus(E===1&&v===0)},g.RotationY=function(l){var h=new g;return g.RotationYToRef(l,h),h},g.RotationYToRef=function(l,h){var v=Math.sin(l),E=Math.cos(l);g.FromValuesToRef(E,0,-v,0,0,1,0,0,v,0,E,0,0,0,0,1,h),h._updateIdentityStatus(E===1&&v===0)},g.RotationZ=function(l){var h=new g;return g.RotationZToRef(l,h),h},g.RotationZToRef=function(l,h){var v=Math.sin(l),E=Math.cos(l);g.FromValuesToRef(E,v,0,0,-v,E,0,0,0,0,1,0,0,0,0,1,h),h._updateIdentityStatus(E===1&&v===0)},g.RotationAxis=function(l,h){var v=new g;return g.RotationAxisToRef(l,h,v),v},g.RotationAxisToRef=function(l,h,v){var E=Math.sin(-h),D=Math.cos(-h),w=1-D;l.normalize();var N=v._m;N[0]=l._x*l._x*w+D,N[1]=l._x*l._y*w-l._z*E,N[2]=l._x*l._z*w+l._y*E,N[3]=0,N[4]=l._y*l._x*w+l._z*E,N[5]=l._y*l._y*w+D,N[6]=l._y*l._z*w-l._x*E,N[7]=0,N[8]=l._z*l._x*w-l._y*E,N[9]=l._z*l._y*w+l._x*E,N[10]=l._z*l._z*w+D,N[11]=0,N[12]=0,N[13]=0,N[14]=0,N[15]=1,v._markAsUpdated()},g.RotationAlignToRef=function(l,h,v){var E=P.Cross(h,l),D=P.Dot(h,l),w=1/(1+D),N=v._m;N[0]=E._x*E._x*w+D,N[1]=E._y*E._x*w-E._z,N[2]=E._z*E._x*w+E._y,N[3]=0,N[4]=E._x*E._y*w+E._z,N[5]=E._y*E._y*w+D,N[6]=E._z*E._y*w-E._x,N[7]=0,N[8]=E._x*E._z*w-E._y,N[9]=E._y*E._z*w+E._x,N[10]=E._z*E._z*w+D,N[11]=0,N[12]=0,N[13]=0,N[14]=0,N[15]=1,v._markAsUpdated()},g.RotationYawPitchRoll=function(l,h,v){var E=new g;return g.RotationYawPitchRollToRef(l,h,v,E),E},g.RotationYawPitchRollToRef=function(l,h,v,E){c.RotationYawPitchRollToRef(l,h,v,A.Quaternion[0]),A.Quaternion[0].toRotationMatrix(E)},g.Scaling=function(l,h,v){var E=new g;return g.ScalingToRef(l,h,v,E),E},g.ScalingToRef=function(l,h,v,E){g.FromValuesToRef(l,0,0,0,0,h,0,0,0,0,v,0,0,0,0,1,E),E._updateIdentityStatus(l===1&&h===1&&v===1)},g.Translation=function(l,h,v){var E=new g;return g.TranslationToRef(l,h,v,E),E},g.TranslationToRef=function(l,h,v,E){g.FromValuesToRef(1,0,0,0,0,1,0,0,0,0,1,0,l,h,v,1,E),E._updateIdentityStatus(l===0&&h===0&&v===0)},g.Lerp=function(l,h,v){var E=new g;return g.LerpToRef(l,h,v,E),E},g.LerpToRef=function(l,h,v,E){for(var D=E._m,w=l.m,N=h.m,I=0;I<16;I++)D[I]=w[I]*(1-v)+N[I]*v;E._markAsUpdated()},g.DecomposeLerp=function(l,h,v){var E=new g;return g.DecomposeLerpToRef(l,h,v,E),E},g.DecomposeLerpToRef=function(l,h,v,E){var D=A.Vector3[0],w=A.Quaternion[0],N=A.Vector3[1];l.decompose(D,w,N);var I=A.Vector3[2],V=A.Quaternion[1],X=A.Vector3[3];h.decompose(I,V,X);var j=A.Vector3[4];P.LerpToRef(D,I,v,j);var ne=A.Quaternion[2];c.SlerpToRef(w,V,v,ne);var te=A.Vector3[5];P.LerpToRef(N,X,v,te),g.ComposeToRef(j,ne,te,E)},g.LookAtLH=function(l,h,v){var E=new g;return g.LookAtLHToRef(l,h,v,E),E},g.LookAtLHToRef=function(l,h,v,E){var D=A.Vector3[0],w=A.Vector3[1],N=A.Vector3[2];h.subtractToRef(l,N),N.normalize(),P.CrossToRef(v,N,D);var I=D.lengthSquared();I===0?D.x=1:D.normalizeFromLength(Math.sqrt(I)),P.CrossToRef(N,D,w),w.normalize();var V=-P.Dot(D,l),X=-P.Dot(w,l),j=-P.Dot(N,l);g.FromValuesToRef(D._x,w._x,N._x,0,D._y,w._y,N._y,0,D._z,w._z,N._z,0,V,X,j,1,E)},g.LookAtRH=function(l,h,v){var E=new g;return g.LookAtRHToRef(l,h,v,E),E},g.LookAtRHToRef=function(l,h,v,E){var D=A.Vector3[0],w=A.Vector3[1],N=A.Vector3[2];l.subtractToRef(h,N),N.normalize(),P.CrossToRef(v,N,D);var I=D.lengthSquared();I===0?D.x=1:D.normalizeFromLength(Math.sqrt(I)),P.CrossToRef(N,D,w),w.normalize();var V=-P.Dot(D,l),X=-P.Dot(w,l),j=-P.Dot(N,l);g.FromValuesToRef(D._x,w._x,N._x,0,D._y,w._y,N._y,0,D._z,w._z,N._z,0,V,X,j,1,E)},g.OrthoLH=function(l,h,v,E){var D=new g;return g.OrthoLHToRef(l,h,v,E,D),D},g.OrthoLHToRef=function(l,h,v,E,D){var w=2/l,N=2/h,I=2/(E-v),V=-(E+v)/(E-v);g.FromValuesToRef(w,0,0,0,0,N,0,0,0,0,I,0,0,0,V,1,D),D._updateIdentityStatus(w===1&&N===1&&I===1&&V===0)},g.OrthoOffCenterLH=function(l,h,v,E,D,w){var N=new g;return g.OrthoOffCenterLHToRef(l,h,v,E,D,w,N),N},g.OrthoOffCenterLHToRef=function(l,h,v,E,D,w,N){var I=2/(h-l),V=2/(E-v),X=2/(w-D),j=-(w+D)/(w-D),ne=(l+h)/(l-h),te=(E+v)/(v-E);g.FromValuesToRef(I,0,0,0,0,V,0,0,0,0,X,0,ne,te,j,1,N),N._markAsUpdated()},g.OrthoOffCenterRH=function(l,h,v,E,D,w){var N=new g;return g.OrthoOffCenterRHToRef(l,h,v,E,D,w,N),N},g.OrthoOffCenterRHToRef=function(l,h,v,E,D,w,N){g.OrthoOffCenterLHToRef(l,h,v,E,D,w,N),N._m[10]*=-1},g.PerspectiveLH=function(l,h,v,E){var D=new g,w=2*v/l,N=2*v/h,I=(E+v)/(E-v),V=-2*E*v/(E-v);return g.FromValuesToRef(w,0,0,0,0,N,0,0,0,0,I,1,0,0,V,0,D),D._updateIdentityStatus(!1),D},g.PerspectiveFovLH=function(l,h,v,E){var D=new g;return g.PerspectiveFovLHToRef(l,h,v,E,D),D},g.PerspectiveFovLHToRef=function(l,h,v,E,D,w){w===void 0&&(w=!0);var N=v,I=E,V=1/Math.tan(.5*l),X=w?V/h:V,j=w?V:V*h,ne=(I+N)/(I-N),te=-2*I*N/(I-N);g.FromValuesToRef(X,0,0,0,0,j,0,0,0,0,ne,1,0,0,te,0,D),D._updateIdentityStatus(!1)},g.PerspectiveFovReverseLHToRef=function(l,h,v,E,D,w){w===void 0&&(w=!0);var N=1/Math.tan(.5*l),I=w?N/h:N,V=w?N:N*h;g.FromValuesToRef(I,0,0,0,0,V,0,0,0,0,-v,1,0,0,1,0,D),D._updateIdentityStatus(!1)},g.PerspectiveFovRH=function(l,h,v,E){var D=new g;return g.PerspectiveFovRHToRef(l,h,v,E,D),D},g.PerspectiveFovRHToRef=function(l,h,v,E,D,w){w===void 0&&(w=!0);var N=v,I=E,V=1/Math.tan(.5*l),X=w?V/h:V,j=w?V:V*h,ne=-(I+N)/(I-N),te=-2*I*N/(I-N);g.FromValuesToRef(X,0,0,0,0,j,0,0,0,0,ne,-1,0,0,te,0,D),D._updateIdentityStatus(!1)},g.PerspectiveFovReverseRHToRef=function(l,h,v,E,D,w){w===void 0&&(w=!0);var N=1/Math.tan(.5*l),I=w?N/h:N,V=w?N:N*h;g.FromValuesToRef(I,0,0,0,0,V,0,0,0,0,-v,-1,0,0,-1,0,D),D._updateIdentityStatus(!1)},g.PerspectiveFovWebVRToRef=function(l,h,v,E,D){D===void 0&&(D=!1);var w=D?-1:1,N=Math.tan(l.upDegrees*Math.PI/180),I=Math.tan(l.downDegrees*Math.PI/180),V=Math.tan(l.leftDegrees*Math.PI/180),X=Math.tan(l.rightDegrees*Math.PI/180),j=2/(V+X),ne=2/(N+I),te=E._m;te[0]=j,te[1]=te[2]=te[3]=te[4]=0,te[5]=ne,te[6]=te[7]=0,te[8]=(V-X)*j*.5,te[9]=-(N-I)*ne*.5,te[10]=-v/(h-v),te[11]=1*w,te[12]=te[13]=te[15]=0,te[14]=-2*v*h/(v-h),E._markAsUpdated()},g.GetFinalMatrix=function(l,h,v,E,D,w){var N=l.width,I=l.height,V=l.x,X=l.y,j=g.FromValues(N/2,0,0,0,0,-I/2,0,0,0,0,w-D,0,V+N/2,I/2+X,D,1),ne=A.Matrix[0];return h.multiplyToRef(v,ne),ne.multiplyToRef(E,ne),ne.multiply(j)},g.GetAsMatrix2x2=function(l){var h=l.m,v=[h[0],h[1],h[4],h[5]];return M.a.MatrixUse64Bits?v:new Float32Array(v)},g.GetAsMatrix3x3=function(l){var h=l.m,v=[h[0],h[1],h[2],h[4],h[5],h[6],h[8],h[9],h[10]];return M.a.MatrixUse64Bits?v:new Float32Array(v)},g.Transpose=function(l){var h=new g;return g.TransposeToRef(l,h),h},g.TransposeToRef=function(l,h){var v=h._m,E=l.m;v[0]=E[0],v[1]=E[4],v[2]=E[8],v[3]=E[12],v[4]=E[1],v[5]=E[5],v[6]=E[9],v[7]=E[13],v[8]=E[2],v[9]=E[6],v[10]=E[10],v[11]=E[14],v[12]=E[3],v[13]=E[7],v[14]=E[11],v[15]=E[15],h._updateIdentityStatus(l._isIdentity,l._isIdentityDirty)},g.Reflection=function(l){var h=new g;return g.ReflectionToRef(l,h),h},g.ReflectionToRef=function(l,h){l.normalize();var v=l.normal.x,E=l.normal.y,D=l.normal.z,w=-2*v,N=-2*E,I=-2*D;g.FromValuesToRef(w*v+1,N*v,I*v,0,w*E,N*E+1,I*E,0,w*D,N*D,I*D+1,0,w*l.d,N*l.d,I*l.d,1,h)},g.FromXYZAxesToRef=function(l,h,v,E){g.FromValuesToRef(l._x,l._y,l._z,0,h._x,h._y,h._z,0,v._x,v._y,v._z,0,0,0,0,1,E)},g.FromQuaternionToRef=function(l,h){var v=l._x*l._x,E=l._y*l._y,D=l._z*l._z,w=l._x*l._y,N=l._z*l._w,I=l._z*l._x,V=l._y*l._w,X=l._y*l._z,j=l._x*l._w;h._m[0]=1-2*(E+D),h._m[1]=2*(w+N),h._m[2]=2*(I-V),h._m[3]=0,h._m[4]=2*(w-N),h._m[5]=1-2*(D+v),h._m[6]=2*(X+j),h._m[7]=0,h._m[8]=2*(I+V),h._m[9]=2*(X-j),h._m[10]=1-2*(E+v),h._m[11]=0,h._m[12]=0,h._m[13]=0,h._m[14]=0,h._m[15]=1,h._markAsUpdated()},g._updateFlagSeed=0,g._identityReadOnly=g.Identity(),g}(),A=function(){function g(){}return g.Vector3=R.a.BuildArray(6,P.Zero),g.Matrix=R.a.BuildArray(2,T.Identity),g.Quaternion=R.a.BuildArray(3,c.Zero),g}(),S=function(){function g(){}return g.Vector2=R.a.BuildArray(3,C.Zero),g.Vector3=R.a.BuildArray(13,P.Zero),g.Vector4=R.a.BuildArray(3,m.Zero),g.Quaternion=R.a.BuildArray(2,c.Zero),g.Matrix=R.a.BuildArray(8,T.Identity),g}();u.a.RegisteredTypes["BABYLON.Vector2"]=C,u.a.RegisteredTypes["BABYLON.Vector3"]=P,u.a.RegisteredTypes["BABYLON.Vector4"]=m,u.a.RegisteredTypes["BABYLON.Matrix"]=T},function(Ie,y,f){f.d(y,"d",function(){return _}),f.d(y,"a",function(){return R}),f.d(y,"c",function(){return u}),f.d(y,"b",function(){return M}),f.d(y,"e",function(){return C}),f.d(y,"f",function(){return P});/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var U=function(m,c){return(U=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(T,A){T.__proto__=A}||function(T,A){for(var S in A)Object.prototype.hasOwnProperty.call(A,S)&&(T[S]=A[S])})(m,c)};function _(m,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");function T(){this.constructor=m}U(m,c),m.prototype=c===null?Object.create(c):(T.prototype=c.prototype,new T)}var R=function(){return(R=Object.assign||function(m){for(var c,T=1,A=arguments.length;T=0;h--)(S=m[h])&&(l=(g<3?S(l):g>3?S(c,T,l):S(c,T))||l);return g>3&&l&&Object.defineProperty(c,T,l),l}function M(m,c,T,A){return new(T||(T=Promise))(function(S,g){function l(E){try{v(A.next(E))}catch(D){g(D)}}function h(E){try{v(A.throw(E))}catch(D){g(D)}}function v(E){var D;E.done?S(E.value):(D=E.value,D instanceof T?D:new T(function(w){w(D)})).then(l,h)}v((A=A.apply(m,c||[])).next())})}function C(m,c){var T,A,S,g,l={label:0,sent:function(){if(1&S[0])throw S[1];return S[1]},trys:[],ops:[]};return g={next:h(0),throw:h(1),return:h(2)},typeof Symbol=="function"&&(g[Symbol.iterator]=function(){return this}),g;function h(v){return function(E){return function(D){if(T)throw new TypeError("Generator is already executing.");for(;l;)try{if(T=1,A&&(S=2&D[0]?A.return:D[0]?A.throw||((S=A.return)&&S.call(A),0):A.next)&&!(S=S.call(A,D[1])).done)return S;switch(A=0,S&&(D=[2&D[0],S.value]),D[0]){case 0:case 1:S=D;break;case 4:return l.label++,{value:D[1],done:!1};case 5:l.label++,A=D[1],D=[0];continue;case 7:D=l.ops.pop(),l.trys.pop();continue;default:if(S=l.trys,!((S=S.length>0&&S[S.length-1])||D[0]!==6&&D[0]!==2)){l=0;continue}if(D[0]===3&&(!S||D[1]>S[0]&&D[1]=2?"WEBGL2":"WEBGL1"};this._loadShader(N,"Vertex","",function(de){w._rawVertexSourceCode=de,w._loadShader(I,"Fragment","Pixel",function(pe){w._rawFragmentSourceCode=pe,M.a.Process(de,te,function(ae){V&&(ae=V("vertex",ae)),te.isFragment=!0,M.a.Process(pe,te,function(ee){V&&(ee=V("fragment",ee)),w._useFinalCode(ae,ee,m)},w._engine)},w._engine)})})}return Object.defineProperty(P.prototype,"onBindObservable",{get:function(){return this._onBindObservable||(this._onBindObservable=new U.c),this._onBindObservable},enumerable:!1,configurable:!0}),P.prototype._useFinalCode=function(m,c,T){if(T){var A=T.vertexElement||T.vertex||T.spectorName||T,S=T.fragmentElement||T.fragment||T.spectorName||T;this._vertexSourceCode="#define SHADER_NAME vertex:"+A+` +`+m,this._fragmentSourceCode="#define SHADER_NAME fragment:"+S+` +`+c}else this._vertexSourceCode=m,this._fragmentSourceCode=c;this._prepareEffect()},Object.defineProperty(P.prototype,"key",{get:function(){return this._key},enumerable:!1,configurable:!0}),P.prototype.isReady=function(){try{return this._isReadyInternal()}catch{return!1}},P.prototype._isReadyInternal=function(){return!!this._isReady||!!this._pipelineContext&&this._pipelineContext.isReady},P.prototype.getEngine=function(){return this._engine},P.prototype.getPipelineContext=function(){return this._pipelineContext},P.prototype.getAttributesNames=function(){return this._attributesNames},P.prototype.getAttributeLocation=function(m){return this._attributes[m]},P.prototype.getAttributeLocationByName=function(m){return this._attributeLocationByName[m]},P.prototype.getAttributesCount=function(){return this._attributes.length},P.prototype.getUniformIndex=function(m){return this._uniformsNames.indexOf(m)},P.prototype.getUniform=function(m){return this._uniforms[m]},P.prototype.getSamplers=function(){return this._samplerList},P.prototype.getUniformNames=function(){return this._uniformsNames},P.prototype.getUniformBuffersNames=function(){return this._uniformBuffersNamesList},P.prototype.getIndexParameters=function(){return this._indexParameters},P.prototype.getCompilationError=function(){return this._compilationError},P.prototype.allFallbacksProcessed=function(){return this._allFallbacksProcessed},P.prototype.executeWhenCompiled=function(m){var c=this;this.isReady()?m(this):(this.onCompileObservable.add(function(T){m(T)}),this._pipelineContext&&!this._pipelineContext.isAsync||setTimeout(function(){c._checkIsReady(null)},16))},P.prototype._checkIsReady=function(m){var c=this;try{if(this._isReadyInternal())return}catch(T){return void this._processCompilationErrors(T,m)}setTimeout(function(){c._checkIsReady(m)},16)},P.prototype._loadShader=function(m,c,T,A){var S;if(typeof HTMLElement<"u"&&m instanceof HTMLElement)return void A(R.a.GetDOMTextContent(m));m.substr(0,7)!=="source:"?m.substr(0,7)!=="base64:"?P.ShadersStore[m+c+"Shader"]?A(P.ShadersStore[m+c+"Shader"]):T&&P.ShadersStore[m+T+"Shader"]?A(P.ShadersStore[m+T+"Shader"]):(S=m[0]==="."||m[0]==="/"||m.indexOf("http")>-1?m:P.ShadersRepository+m,this._engine._loadFile(S+"."+c.toLowerCase()+".fx",A)):A(window.atob(m.substr(7))):A(m.substr(7))},Object.defineProperty(P.prototype,"vertexSourceCode",{get:function(){return this._vertexSourceCodeOverride&&this._fragmentSourceCodeOverride?this._vertexSourceCodeOverride:this._vertexSourceCode},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"fragmentSourceCode",{get:function(){return this._vertexSourceCodeOverride&&this._fragmentSourceCodeOverride?this._fragmentSourceCodeOverride:this._fragmentSourceCode},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"rawVertexSourceCode",{get:function(){return this._rawVertexSourceCode},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"rawFragmentSourceCode",{get:function(){return this._rawFragmentSourceCode},enumerable:!1,configurable:!0}),P.prototype._rebuildProgram=function(m,c,T,A){var S=this;this._isReady=!1,this._vertexSourceCodeOverride=m,this._fragmentSourceCodeOverride=c,this.onError=function(g,l){A&&A(l)},this.onCompiled=function(){var g=S.getEngine().scenes;if(g)for(var l=0;l=l&&(S="Offending line ["+l+"] in "+(T?"fragment":"vertex")+" code: "+h[l-1])}}return[m,S]},P.prototype._processCompilationErrors=function(m,c){var T,A,S,g,l;c===void 0&&(c=null),this._compilationError=m.message;var h=this._attributesNames,v=this._fallbacks;if(u.a.Error("Unable to compile effect:"),u.a.Error("Uniforms: "+this._uniformsNames.map(function(N){return" "+N})),u.a.Error("Attributes: "+h.map(function(N){return" "+N})),u.a.Error(`Defines:\r +`+this.defines),P.LogShaderCodeOnCompilationError){var E=null,D=null,w=null;!((S=this._pipelineContext)===null||S===void 0)&&S._getVertexShaderCode()&&(w=(T=this._getShaderCodeAndErrorLine(this._pipelineContext._getVertexShaderCode(),this._compilationError,!1))[0],E=T[1],w&&(u.a.Error("Vertex code:"),u.a.Error(w))),!((g=this._pipelineContext)===null||g===void 0)&&g._getFragmentShaderCode()&&(w=(A=this._getShaderCodeAndErrorLine((l=this._pipelineContext)===null||l===void 0?void 0:l._getFragmentShaderCode(),this._compilationError,!0))[0],D=A[1],w&&(u.a.Error("Fragment code:"),u.a.Error(w))),E&&u.a.Error(E),D&&u.a.Error(D)}u.a.Error("Error: "+this._compilationError),c&&(this._pipelineContext=c,this._isReady=!0,this.onError&&this.onError(this,this._compilationError),this.onErrorObservable.notifyObservers(this)),v?(this._pipelineContext=null,v.hasMoreFallbacks?(this._allFallbacksProcessed=!1,u.a.Error("Trying next fallback."),this.defines=v.reduce(this.defines,this),this._prepareEffect()):(this._allFallbacksProcessed=!0,this.onError&&this.onError(this,this._compilationError),this.onErrorObservable.notifyObservers(this),this.onErrorObservable.clear(),this._fallbacks&&this._fallbacks.unBindMesh())):this._allFallbacksProcessed=!0},Object.defineProperty(P.prototype,"isSupported",{get:function(){return this._compilationError===""},enumerable:!1,configurable:!0}),P.prototype._bindTexture=function(m,c){this._engine._bindTexture(this._samplers[m],c)},P.prototype.setTexture=function(m,c){this._engine.setTexture(this._samplers[m],this._uniforms[m],c)},P.prototype.setDepthStencilTexture=function(m,c){this._engine.setDepthStencilTexture(this._samplers[m],this._uniforms[m],c)},P.prototype.setTextureArray=function(m,c){var T=m+"Ex";if(this._samplerList.indexOf(T+"0")===-1){for(var A=this._samplerList.indexOf(m),S=1;S0},M.prototype.clear=function(){this._observers=new Array,this._onObserverAdded=null},M.prototype.clone=function(){var C=new M;return C._observers=this._observers.slice(0),C},M.prototype.hasSpecificMask=function(C){C===void 0&&(C=-1);for(var P=0,m=this._observers;P0},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"hasThinInstances",{get:function(){var G;return((G=this._thinInstanceDataStorage.instancesCount)!==null&&G!==void 0?G:0)>0},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"morphTargetManager",{get:function(){return this._internalMeshDataInfo._morphTargetManager},set:function(G){this._internalMeshDataInfo._morphTargetManager!==G&&(this._internalMeshDataInfo._morphTargetManager=G,this._syncGeometryWithMorphTargetManager())},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"source",{get:function(){return this._internalMeshDataInfo._source},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"cloneMeshMap",{get:function(){return this._internalMeshDataInfo.meshMap},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"isUnIndexed",{get:function(){return this._unIndexed},set:function(G){this._unIndexed!==G&&(this._unIndexed=G,this._markSubMeshesAsAttributesDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"worldMatrixInstancedBuffer",{get:function(){return this._instanceDataStorage.instancesData},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"manualUpdateOfWorldMatrixInstancedBuffer",{get:function(){return this._instanceDataStorage.manualUpdate},set:function(G){this._instanceDataStorage.manualUpdate=G},enumerable:!1,configurable:!0}),L.prototype.instantiateHierarchy=function(G,Q,oe){G===void 0&&(G=null);var re=!(this.getTotalVertices()>0)||Q&&Q.doNotInstantiate?this.clone("Clone of "+(this.name||this.id),G||this.parent,!0):this.createInstance("instance of "+(this.name||this.id));re&&(re.parent=G||this.parent,re.position=this.position.clone(),re.scaling=this.scaling.clone(),this.rotationQuaternion?re.rotationQuaternion=this.rotationQuaternion.clone():re.rotation=this.rotation.clone(),oe&&oe(this,re));for(var Y=0,k=this.getChildTransformNodes(!0);Y0},enumerable:!1,configurable:!0}),L.prototype.getLODLevels=function(){return this._internalMeshDataInfo._LODLevels},L.prototype._sortLODLevels=function(){this._internalMeshDataInfo._LODLevels.sort(function(G,Q){return G.distanceQ.distance?-1:0})},L.prototype.addLODLevel=function(G,Q){if(Q&&Q._masterMesh)return N.a.Warn("You cannot use a mesh as LOD level twice"),this;var oe=new j.a(G,Q);return this._internalMeshDataInfo._LODLevels.push(oe),Q&&(Q._masterMesh=this),this._sortLODLevels(),this},L.prototype.getLODLevelAtDistance=function(G){for(var Q=this._internalMeshDataInfo,oe=0;oeY)return this.onLODLevelSelection&&this.onLODLevelSelection(Y,this,this),this;for(var k=0;k0||this.hasThinInstances);this.computeWorldMatrix();var ge=this.material||q.defaultMaterial;if(ge){if(ge._storeEffectOnSubMeshes)for(var me=0,_e=this.subMeshes;me<_e.length;me++){var be=(je=_e[me]).getMaterial();if(be){if(be._storeEffectOnSubMeshes){if(!be.isReadyForSubMesh(this,je,he))return!1}else if(!be.isReady(this,he))return!1}}else if(!ge.isReady(this,he))return!1}for(var Pe=0,ye=this.lightSources;Pe0){var oe=this.getIndices();if(!oe)return null;var re=oe.length,Y=!1;if(G)Y=!0;else for(var k=0,H=this.subMeshes;kre){Y=!0;break}if(Z.verticesStart+Z.verticesCount>Q){Y=!0;break}}if(!Y)return this.subMeshes[0]}return this.releaseSubMeshes(),new g.a(0,0,Q,0,this.getTotalIndices(),this)},L.prototype.subdivide=function(G){if(!(G<1)){for(var Q=this.getTotalIndices(),oe=Q/G|0,re=0;oe%3!=0;)oe++;this.releaseSubMeshes();for(var Y=0;Y=Q);Y++)g.a.CreateFromIndices(0,re,Y===G-1?Q-re:oe,this),re+=oe;this.synchronizeInstances()}},L.prototype.setVerticesData=function(G,Q,oe,re){if(oe===void 0&&(oe=!1),this._geometry)this._geometry.setVerticesData(G,Q,oe,re);else{var Y=new T.a;Y.set(Q,G);var k=this.getScene();new A.a(A.a.RandomId(),k,Y,oe,this)}return this},L.prototype.removeVerticesData=function(G){this._geometry&&this._geometry.removeVerticesData(G)},L.prototype.markVerticesDataAsUpdatable=function(G,Q){Q===void 0&&(Q=!0);var oe=this.getVertexBuffer(G);oe&&oe.isUpdatable()!==Q&&this.setVerticesData(G,this.getVerticesData(G),Q)},L.prototype.setVerticesBuffer=function(G){return this._geometry||(this._geometry=A.a.CreateGeometryForMesh(this)),this._geometry.setVerticesBuffer(G),this},L.prototype.updateVerticesData=function(G,Q,oe,re){return this._geometry?(re?(this.makeGeometryUnique(),this.updateVerticesData(G,Q,oe,!1)):this._geometry.updateVerticesData(G,Q,oe),this):this},L.prototype.updateMeshPositions=function(G,Q){Q===void 0&&(Q=!0);var oe=this.getVerticesData(c.b.PositionKind);if(!oe)return this;if(G(oe),this.updateVerticesData(c.b.PositionKind,oe,!1,!1),Q){var re=this.getIndices(),Y=this.getVerticesData(c.b.NormalKind);if(!Y)return this;T.a.ComputeNormals(oe,re,Y),this.updateVerticesData(c.b.NormalKind,Y,!1,!1)}return this},L.prototype.makeGeometryUnique=function(){if(!this._geometry)return this;if(this._geometry.meshes.length===1)return this;var G=this._geometry,Q=this._geometry.copy(A.a.RandomId());return G.releaseForMesh(this,!0),Q.applyToMesh(this),this},L.prototype.setIndices=function(G,Q,oe){if(Q===void 0&&(Q=null),oe===void 0&&(oe=!1),this._geometry)this._geometry.setIndices(G,Q,oe);else{var re=new T.a;re.indices=G;var Y=this.getScene();new A.a(A.a.RandomId(),Y,re,oe,this)}return this},L.prototype.updateIndices=function(G,Q,oe){return oe===void 0&&(oe=!1),this._geometry?(this._geometry.updateIndices(G,Q,oe),this):this},L.prototype.toLeftHanded=function(){return this._geometry?(this._geometry.toLeftHanded(),this):this},L.prototype._bind=function(G,Q,oe){if(!this._geometry)return this;var re,Y=this.getScene().getEngine();if(this._unIndexed)re=null;else switch(oe){case h.a.PointFillMode:re=null;break;case h.a.WireFrameFillMode:re=G._getLinesIndexBuffer(this.getIndices(),Y);break;default:case h.a.TriangleFillMode:re=this._geometry.getIndexBuffer()}return this._geometry._bind(Q,re),this},L.prototype._draw=function(G,Q,oe){if(!this._geometry||!this._geometry.getVertexBuffers()||!this._unIndexed&&!this._geometry.getIndexBuffer())return this;this._internalMeshDataInfo._onBeforeDrawObservable&&this._internalMeshDataInfo._onBeforeDrawObservable.notifyObservers(this);var re=this.getScene().getEngine();return this._unIndexed||Q==h.a.PointFillMode?re.drawArraysType(Q,G.verticesStart,G.verticesCount,oe):Q==h.a.WireFrameFillMode?re.drawElementsType(Q,0,G._linesIndexCount,oe):re.drawElementsType(Q,G.indexStart,G.indexCount,oe),this},L.prototype.registerBeforeRender=function(G){return this.onBeforeRenderObservable.add(G),this},L.prototype.unregisterBeforeRender=function(G){return this.onBeforeRenderObservable.removeCallback(G),this},L.prototype.registerAfterRender=function(G){return this.onAfterRenderObservable.add(G),this},L.prototype.unregisterAfterRender=function(G){return this.onAfterRenderObservable.removeCallback(G),this},L.prototype._getInstancesRenderList=function(G,Q){if(Q===void 0&&(Q=!1),this._instanceDataStorage.isFrozen&&this._instanceDataStorage.previousBatch)return this._instanceDataStorage.previousBatch;var oe=this.getScene(),re=oe._isInIntermediateRendering(),Y=re?this._internalAbstractMeshDataInfo._onlyForInstancesIntermediate:this._internalAbstractMeshDataInfo._onlyForInstances,k=this._instanceDataStorage.batchCache;if(k.mustReturn=!1,k.renderSelf[G]=Q||!Y&&this.isEnabled()&&this.isVisible,k.visibleInstances[G]=null,this._instanceDataStorage.visibleInstances&&!Q){var H=this._instanceDataStorage.visibleInstances,Z=oe.getRenderId(),W=re?H.intermediateDefaultRenderId:H.defaultRenderId;k.visibleInstances[G]=H[Z],!k.visibleInstances[G]&&W&&(k.visibleInstances[G]=H[W])}return k.hardwareInstancedRendering[G]=!Q&&this._instanceDataStorage.hardwareInstancedRendering&&k.visibleInstances[G]!==null&&k.visibleInstances[G]!==void 0,this._instanceDataStorage.previousBatch=k,k},L.prototype._renderWithInstances=function(G,Q,oe,re,Y){var k=oe.visibleInstances[G._id];if(!k)return this;for(var H=this._instanceDataStorage,Z=H.instancesBufferSize,W=H.instancesBuffer,q=16*(k.length+1)*4;H.instancesBufferSizehe&&re++,be!==0&&me++,ge+=be,he=be}if(W[me]++,me>k&&(k=me),ge===0)Y++;else{var Pe=1/ge,ye=0;for(_e=0;_e.001&&H++}}var Be=this.skeleton.bones.length,ke=this.getVerticesData(c.b.MatricesIndicesKind),We=this.getVerticesData(c.b.MatricesIndicesExtraKind),je=0;for(q=0;q=Be||He<0)&&je++}return{skinned:!0,valid:Y===0&&H===0&&je===0,report:"Number of Weights = "+oe/4+` +Maximum influences = `+k+` +Missing Weights = `+Y+` +Not Sorted = `+re+` +Not Normalized = `+H+` +WeightCounts = [`+W+`] +Number of bones = `+Be+` +Bad Bone Indices = `+je}},L.prototype._checkDelayState=function(){var G=this.getScene();return this._geometry?this._geometry.load(G):this.delayLoadState===D.a.DELAYLOADSTATE_NOTLOADED&&(this.delayLoadState=D.a.DELAYLOADSTATE_LOADING,this._queueLoad(G)),this},L.prototype._queueLoad=function(G){var Q=this;G._addPendingData(this);var oe=this.delayLoadingFile.indexOf(".babylonbinarymeshdata")!==-1;return R.b.LoadFile(this.delayLoadingFile,function(re){re instanceof ArrayBuffer?Q._delayLoadingFunction(re,Q):Q._delayLoadingFunction(JSON.parse(re),Q),Q.instances.forEach(function(Y){Y.refreshBoundingInfo(),Y._syncSubMeshes()}),Q.delayLoadState=D.a.DELAYLOADSTATE_LOADED,G._removePendingData(Q)},function(){},G.offlineProvider,oe),this},L.prototype.isInFrustum=function(G){return this.delayLoadState!==D.a.DELAYLOADSTATE_LOADING&&!!$.prototype.isInFrustum.call(this,G)&&(this._checkDelayState(),!0)},L.prototype.setMaterialByID=function(G){var Q,oe=this.getScene().materials;for(Q=oe.length-1;Q>-1;Q--)if(oe[Q].id===G)return this.material=oe[Q],this;var re=this.getScene().multiMaterials;for(Q=re.length-1;Q>-1;Q--)if(re[Q].id===G)return this.material=re[Q],this;return this},L.prototype.getAnimatables=function(){var G=new Array;return this.material&&G.push(this.material),this.skeleton&&G.push(this.skeleton),G},L.prototype.bakeTransformIntoVertices=function(G){if(!this.isVerticesDataPresent(c.b.PositionKind))return this;var Q=this.subMeshes.splice(0);this._resetPointsArrayCache();var oe,re=this.getVerticesData(c.b.PositionKind),Y=new Array;for(oe=0;oe1)for(var oe=0,re=Q.meshes.slice(0);oe-1&&(re.morphTargetManager=Q.getMorphTargetManagerById(G.morphTargetManagerId)),G.skeletonId!==void 0&&G.skeletonId!==null&&(re.skeleton=Q.getLastSkeletonByID(G.skeletonId),G.numBoneInfluencers&&(re.numBoneInfluencers=G.numBoneInfluencers)),G.animations){for(var Y=0;Y4,he=q?this.getVerticesData(c.b.MatricesIndicesExtraKind):null,ge=q?this.getVerticesData(c.b.MatricesWeightsExtraKind):null,me=G.getTransformMatrices(this),_e=C.e.Zero(),be=new C.a,Pe=new C.a,ye=0,Be=0;Be0&&(C.a.FromFloat32ArrayToRefScaled(me,Math.floor(16*H[ye+W]),ke,Pe),be.addToSelf(Pe));if(q)for(W=0;W<4;W++)(ke=ge[ye+W])>0&&(C.a.FromFloat32ArrayToRefScaled(me,Math.floor(16*he[ye+W]),ke,Pe),be.addToSelf(Pe));C.e.TransformCoordinatesFromFloatsToRef(oe._sourcePositions[Be],oe._sourcePositions[Be+1],oe._sourcePositions[Be+2],be,_e),_e.toArray(Y,Be),Q&&(C.e.TransformNormalFromFloatsToRef(oe._sourceNormals[Be],oe._sourceNormals[Be+1],oe._sourceNormals[Be+2],be,_e),_e.toArray(k,Be)),be.reset()}return this.updateVerticesData(c.b.PositionKind,Y),Q&&this.updateVerticesData(c.b.NormalKind,k),this},L.MinMax=function(G){var Q=null,oe=null;return G.forEach(function(re){var Y=re.getBoundingInfo().boundingBox;Q&&oe?(Q.minimizeInPlace(Y.minimumWorld),oe.maximizeInPlace(Y.maximumWorld)):(Q=Y.minimumWorld,oe=Y.maximumWorld)}),Q&&oe?{min:Q,max:oe}:{min:C.e.Zero(),max:C.e.Zero()}},L.Center=function(G){var Q=G instanceof Array?L.MinMax(G):G;return C.e.Center(Q.min,Q.max)},L.MergeMeshes=function(G,Q,oe,re,Y,k){var H;if(Q===void 0&&(Q=!0),!oe){var Z=0;for(H=0;H=65536)return N.a.Warn("Cannot merge meshes because resulting mesh will have more than 65536 vertices. Please use allow32BitsIndices = true to use 32 bits indices"),null}if(k){var W,q,he=null;Y=!1}var ge,me=new Array,_e=new Array,be=null,Pe=new Array,ye=null;for(H=0;H
";_._AddLogEntry(M)},_._WarnDisabled=function(R){},_._WarnEnabled=function(R){var u=_._FormatMessage(R);console.warn("BJS - "+u);var M="
"+u+"

";_._AddLogEntry(M)},_._ErrorDisabled=function(R){},_._ErrorEnabled=function(R){_.errorsCount++;var u=_._FormatMessage(R);console.error("BJS - "+u);var M="
"+u+"

";_._AddLogEntry(M)},Object.defineProperty(_,"LogCache",{get:function(){return _._LogCache},enumerable:!1,configurable:!0}),_.ClearLogCache=function(){_._LogCache="",_.errorsCount=0},Object.defineProperty(_,"LogLevels",{set:function(R){(R&_.MessageLogLevel)===_.MessageLogLevel?_.Log=_._LogEnabled:_.Log=_._LogDisabled,(R&_.WarningLogLevel)===_.WarningLogLevel?_.Warn=_._WarnEnabled:_.Warn=_._WarnDisabled,(R&_.ErrorLogLevel)===_.ErrorLogLevel?_.Error=_._ErrorEnabled:_.Error=_._ErrorDisabled},enumerable:!1,configurable:!0}),_.NoneLogLevel=0,_.MessageLogLevel=1,_.WarningLogLevel=2,_.ErrorLogLevel=4,_.AllLogLevel=7,_._LogCache="",_.errorsCount=0,_.Log=_._LogEnabled,_.Warn=_._WarnEnabled,_.Error=_._ErrorEnabled,_}()},function(Ie,y,f){f.d(y,"a",function(){return M}),f.d(y,"b",function(){return C}),f.d(y,"c",function(){return P});var U=f(14),_=f(28),R=f(44),u=f(11),M=function(){function m(c,T,A){c===void 0&&(c=0),T===void 0&&(T=0),A===void 0&&(A=0),this.r=c,this.g=T,this.b=A}return m.prototype.toString=function(){return"{R: "+this.r+" G:"+this.g+" B:"+this.b+"}"},m.prototype.getClassName=function(){return"Color3"},m.prototype.getHashCode=function(){var c=255*this.r|0;return c=397*(c=397*c^(255*this.g|0))^(255*this.b|0)},m.prototype.toArray=function(c,T){return T===void 0&&(T=0),c[T]=this.r,c[T+1]=this.g,c[T+2]=this.b,this},m.prototype.fromArray=function(c,T){return T===void 0&&(T=0),m.FromArrayToRef(c,T,this),this},m.prototype.toColor4=function(c){return c===void 0&&(c=1),new C(this.r,this.g,this.b,c)},m.prototype.asArray=function(){var c=new Array;return this.toArray(c,0),c},m.prototype.toLuminance=function(){return .3*this.r+.59*this.g+.11*this.b},m.prototype.multiply=function(c){return new m(this.r*c.r,this.g*c.g,this.b*c.b)},m.prototype.multiplyToRef=function(c,T){return T.r=this.r*c.r,T.g=this.g*c.g,T.b=this.b*c.b,this},m.prototype.equals=function(c){return c&&this.r===c.r&&this.g===c.g&&this.b===c.b},m.prototype.equalsFloats=function(c,T,A){return this.r===c&&this.g===T&&this.b===A},m.prototype.scale=function(c){return new m(this.r*c,this.g*c,this.b*c)},m.prototype.scaleToRef=function(c,T){return T.r=this.r*c,T.g=this.g*c,T.b=this.b*c,this},m.prototype.scaleAndAddToRef=function(c,T){return T.r+=this.r*c,T.g+=this.g*c,T.b+=this.b*c,this},m.prototype.clampToRef=function(c,T,A){return c===void 0&&(c=0),T===void 0&&(T=1),A.r=U.a.Clamp(this.r,c,T),A.g=U.a.Clamp(this.g,c,T),A.b=U.a.Clamp(this.b,c,T),this},m.prototype.add=function(c){return new m(this.r+c.r,this.g+c.g,this.b+c.b)},m.prototype.addToRef=function(c,T){return T.r=this.r+c.r,T.g=this.g+c.g,T.b=this.b+c.b,this},m.prototype.subtract=function(c){return new m(this.r-c.r,this.g-c.g,this.b-c.b)},m.prototype.subtractToRef=function(c,T){return T.r=this.r-c.r,T.g=this.g-c.g,T.b=this.b-c.b,this},m.prototype.clone=function(){return new m(this.r,this.g,this.b)},m.prototype.copyFrom=function(c){return this.r=c.r,this.g=c.g,this.b=c.b,this},m.prototype.copyFromFloats=function(c,T,A){return this.r=c,this.g=T,this.b=A,this},m.prototype.set=function(c,T,A){return this.copyFromFloats(c,T,A)},m.prototype.toHexString=function(){var c=255*this.r|0,T=255*this.g|0,A=255*this.b|0;return"#"+U.a.ToHex(c)+U.a.ToHex(T)+U.a.ToHex(A)},m.prototype.toLinearSpace=function(){var c=new m;return this.toLinearSpaceToRef(c),c},m.prototype.toHSV=function(){var c=new m;return this.toHSVToRef(c),c},m.prototype.toHSVToRef=function(c){var T=this.r,A=this.g,S=this.b,g=Math.max(T,A,S),l=Math.min(T,A,S),h=0,v=0,E=g,D=g-l;g!==0&&(v=D/g),g!=l&&(g==T?(h=(A-S)/D,A=0&&l<=1?(v=g,E=h):l>=1&&l<=2?(v=h,E=g):l>=2&&l<=3?(E=g,D=h):l>=3&&l<=4?(E=h,D=g):l>=4&&l<=5?(v=h,D=g):l>=5&&l<=6&&(v=g,D=h);var w=A-g;S.set(v+w,E+w,D+w)},m.FromHexString=function(c){if(c.substring(0,1)!=="#"||c.length!==7)return new m(0,0,0);var T=parseInt(c.substring(1,3),16),A=parseInt(c.substring(3,5),16),S=parseInt(c.substring(5,7),16);return m.FromInts(T,A,S)},m.FromArray=function(c,T){return T===void 0&&(T=0),new m(c[T],c[T+1],c[T+2])},m.FromArrayToRef=function(c,T,A){T===void 0&&(T=0),A.r=c[T],A.g=c[T+1],A.b=c[T+2]},m.FromInts=function(c,T,A){return new m(c/255,T/255,A/255)},m.Lerp=function(c,T,A){var S=new m(0,0,0);return m.LerpToRef(c,T,A,S),S},m.LerpToRef=function(c,T,A,S){S.r=c.r+(T.r-c.r)*A,S.g=c.g+(T.g-c.g)*A,S.b=c.b+(T.b-c.b)*A},m.Red=function(){return new m(1,0,0)},m.Green=function(){return new m(0,1,0)},m.Blue=function(){return new m(0,0,1)},m.Black=function(){return new m(0,0,0)},Object.defineProperty(m,"BlackReadOnly",{get:function(){return m._BlackReadOnly},enumerable:!1,configurable:!0}),m.White=function(){return new m(1,1,1)},m.Purple=function(){return new m(.5,0,.5)},m.Magenta=function(){return new m(1,0,1)},m.Yellow=function(){return new m(1,1,0)},m.Gray=function(){return new m(.5,.5,.5)},m.Teal=function(){return new m(0,1,1)},m.Random=function(){return new m(Math.random(),Math.random(),Math.random())},m._BlackReadOnly=m.Black(),m}(),C=function(){function m(c,T,A,S){c===void 0&&(c=0),T===void 0&&(T=0),A===void 0&&(A=0),S===void 0&&(S=1),this.r=c,this.g=T,this.b=A,this.a=S}return m.prototype.addInPlace=function(c){return this.r+=c.r,this.g+=c.g,this.b+=c.b,this.a+=c.a,this},m.prototype.asArray=function(){var c=new Array;return this.toArray(c,0),c},m.prototype.toArray=function(c,T){return T===void 0&&(T=0),c[T]=this.r,c[T+1]=this.g,c[T+2]=this.b,c[T+3]=this.a,this},m.prototype.fromArray=function(c,T){return T===void 0&&(T=0),m.FromArrayToRef(c,T,this),this},m.prototype.equals=function(c){return c&&this.r===c.r&&this.g===c.g&&this.b===c.b&&this.a===c.a},m.prototype.add=function(c){return new m(this.r+c.r,this.g+c.g,this.b+c.b,this.a+c.a)},m.prototype.subtract=function(c){return new m(this.r-c.r,this.g-c.g,this.b-c.b,this.a-c.a)},m.prototype.subtractToRef=function(c,T){return T.r=this.r-c.r,T.g=this.g-c.g,T.b=this.b-c.b,T.a=this.a-c.a,this},m.prototype.scale=function(c){return new m(this.r*c,this.g*c,this.b*c,this.a*c)},m.prototype.scaleToRef=function(c,T){return T.r=this.r*c,T.g=this.g*c,T.b=this.b*c,T.a=this.a*c,this},m.prototype.scaleAndAddToRef=function(c,T){return T.r+=this.r*c,T.g+=this.g*c,T.b+=this.b*c,T.a+=this.a*c,this},m.prototype.clampToRef=function(c,T,A){return c===void 0&&(c=0),T===void 0&&(T=1),A.r=U.a.Clamp(this.r,c,T),A.g=U.a.Clamp(this.g,c,T),A.b=U.a.Clamp(this.b,c,T),A.a=U.a.Clamp(this.a,c,T),this},m.prototype.multiply=function(c){return new m(this.r*c.r,this.g*c.g,this.b*c.b,this.a*c.a)},m.prototype.multiplyToRef=function(c,T){return T.r=this.r*c.r,T.g=this.g*c.g,T.b=this.b*c.b,T.a=this.a*c.a,T},m.prototype.toString=function(){return"{R: "+this.r+" G:"+this.g+" B:"+this.b+" A:"+this.a+"}"},m.prototype.getClassName=function(){return"Color4"},m.prototype.getHashCode=function(){var c=255*this.r|0;return c=397*(c=397*(c=397*c^(255*this.g|0))^(255*this.b|0))^(255*this.a|0)},m.prototype.clone=function(){return new m(this.r,this.g,this.b,this.a)},m.prototype.copyFrom=function(c){return this.r=c.r,this.g=c.g,this.b=c.b,this.a=c.a,this},m.prototype.copyFromFloats=function(c,T,A,S){return this.r=c,this.g=T,this.b=A,this.a=S,this},m.prototype.set=function(c,T,A,S){return this.copyFromFloats(c,T,A,S)},m.prototype.toHexString=function(c){c===void 0&&(c=!1);var T=255*this.r|0,A=255*this.g|0,S=255*this.b|0;if(c)return"#"+U.a.ToHex(T)+U.a.ToHex(A)+U.a.ToHex(S);var g=255*this.a|0;return"#"+U.a.ToHex(T)+U.a.ToHex(A)+U.a.ToHex(S)+U.a.ToHex(g)},m.prototype.toLinearSpace=function(){var c=new m;return this.toLinearSpaceToRef(c),c},m.prototype.toLinearSpaceToRef=function(c){return c.r=Math.pow(this.r,_.c),c.g=Math.pow(this.g,_.c),c.b=Math.pow(this.b,_.c),c.a=this.a,this},m.prototype.toGammaSpace=function(){var c=new m;return this.toGammaSpaceToRef(c),c},m.prototype.toGammaSpaceToRef=function(c){return c.r=Math.pow(this.r,_.b),c.g=Math.pow(this.g,_.b),c.b=Math.pow(this.b,_.b),c.a=this.a,this},m.FromHexString=function(c){if(c.substring(0,1)!=="#"||c.length!==9)return new m(0,0,0,0);var T=parseInt(c.substring(1,3),16),A=parseInt(c.substring(3,5),16),S=parseInt(c.substring(5,7),16),g=parseInt(c.substring(7,9),16);return m.FromInts(T,A,S,g)},m.Lerp=function(c,T,A){var S=new m(0,0,0,0);return m.LerpToRef(c,T,A,S),S},m.LerpToRef=function(c,T,A,S){S.r=c.r+(T.r-c.r)*A,S.g=c.g+(T.g-c.g)*A,S.b=c.b+(T.b-c.b)*A,S.a=c.a+(T.a-c.a)*A},m.FromColor3=function(c,T){return T===void 0&&(T=1),new m(c.r,c.g,c.b,T)},m.FromArray=function(c,T){return T===void 0&&(T=0),new m(c[T],c[T+1],c[T+2],c[T+3])},m.FromArrayToRef=function(c,T,A){T===void 0&&(T=0),A.r=c[T],A.g=c[T+1],A.b=c[T+2],A.a=c[T+3]},m.FromInts=function(c,T,A,S){return new m(c/255,T/255,A/255,S/255)},m.CheckColors4=function(c,T){if(c.length===3*T){for(var A=[],S=0;S0?E.name:w+E.name,(S.a.StartsWith(E.url,"data:")||v.UseSerializedUrlIfAny&&E.url)&&(ae=E.url),X=new v(ae,D,!j,E.invertY,void 0,I)}return X},E,D);return V},v.CreateFromBase64String=function(E,D,w,N,I,V,X,j,ne){return V===void 0&&(V=v.TRILINEAR_SAMPLINGMODE),X===void 0&&(X=null),j===void 0&&(j=null),ne===void 0&&(ne=C.a.TEXTUREFORMAT_RGBA),new v("data:"+D,w,N,I,V,X,j,E,!1,ne)},v.LoadFromDataString=function(E,D,w,N,I,V,X,j,ne,te){return N===void 0&&(N=!1),I===void 0&&(I=!1),V===void 0&&(V=!0),X===void 0&&(X=v.TRILINEAR_SAMPLINGMODE),j===void 0&&(j=null),ne===void 0&&(ne=null),te===void 0&&(te=C.a.TEXTUREFORMAT_RGBA),E.substr(0,5)!=="data:"&&(E="data:"+E),new v(E,w,I,V,X,j,ne,D,N,te)},v.SerializeBuffers=!0,v.ForceSerializeBuffers=!1,v._CubeTextureParser=function(E,D,w){throw m.a.WarnImport("CubeTexture")},v._CreateMirror=function(E,D,w,N){throw m.a.WarnImport("MirrorTexture")},v._CreateRenderTargetTexture=function(E,D,w,N){throw m.a.WarnImport("RenderTargetTexture")},v.NEAREST_SAMPLINGMODE=C.a.TEXTURE_NEAREST_SAMPLINGMODE,v.NEAREST_NEAREST_MIPLINEAR=C.a.TEXTURE_NEAREST_NEAREST_MIPLINEAR,v.BILINEAR_SAMPLINGMODE=C.a.TEXTURE_BILINEAR_SAMPLINGMODE,v.LINEAR_LINEAR_MIPNEAREST=C.a.TEXTURE_LINEAR_LINEAR_MIPNEAREST,v.TRILINEAR_SAMPLINGMODE=C.a.TEXTURE_TRILINEAR_SAMPLINGMODE,v.LINEAR_LINEAR_MIPLINEAR=C.a.TEXTURE_LINEAR_LINEAR_MIPLINEAR,v.NEAREST_NEAREST_MIPNEAREST=C.a.TEXTURE_NEAREST_NEAREST_MIPNEAREST,v.NEAREST_LINEAR_MIPNEAREST=C.a.TEXTURE_NEAREST_LINEAR_MIPNEAREST,v.NEAREST_LINEAR_MIPLINEAR=C.a.TEXTURE_NEAREST_LINEAR_MIPLINEAR,v.NEAREST_LINEAR=C.a.TEXTURE_NEAREST_LINEAR,v.NEAREST_NEAREST=C.a.TEXTURE_NEAREST_NEAREST,v.LINEAR_NEAREST_MIPNEAREST=C.a.TEXTURE_LINEAR_NEAREST_MIPNEAREST,v.LINEAR_NEAREST_MIPLINEAR=C.a.TEXTURE_LINEAR_NEAREST_MIPLINEAR,v.LINEAR_LINEAR=C.a.TEXTURE_LINEAR_LINEAR,v.LINEAR_NEAREST=C.a.TEXTURE_LINEAR_NEAREST,v.EXPLICIT_MODE=C.a.TEXTURE_EXPLICIT_MODE,v.SPHERICAL_MODE=C.a.TEXTURE_SPHERICAL_MODE,v.PLANAR_MODE=C.a.TEXTURE_PLANAR_MODE,v.CUBIC_MODE=C.a.TEXTURE_CUBIC_MODE,v.PROJECTION_MODE=C.a.TEXTURE_PROJECTION_MODE,v.SKYBOX_MODE=C.a.TEXTURE_SKYBOX_MODE,v.INVCUBIC_MODE=C.a.TEXTURE_INVCUBIC_MODE,v.EQUIRECTANGULAR_MODE=C.a.TEXTURE_EQUIRECTANGULAR_MODE,v.FIXED_EQUIRECTANGULAR_MODE=C.a.TEXTURE_FIXED_EQUIRECTANGULAR_MODE,v.FIXED_EQUIRECTANGULAR_MIRRORED_MODE=C.a.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE,v.CLAMP_ADDRESSMODE=C.a.TEXTURE_CLAMP_ADDRESSMODE,v.WRAP_ADDRESSMODE=C.a.TEXTURE_WRAP_ADDRESSMODE,v.MIRROR_ADDRESSMODE=C.a.TEXTURE_MIRROR_ADDRESSMODE,v.UseSerializedUrlIfAny=!1,Object(U.c)([Object(_.c)()],v.prototype,"url",void 0),Object(U.c)([Object(_.c)()],v.prototype,"uOffset",void 0),Object(U.c)([Object(_.c)()],v.prototype,"vOffset",void 0),Object(U.c)([Object(_.c)()],v.prototype,"uScale",void 0),Object(U.c)([Object(_.c)()],v.prototype,"vScale",void 0),Object(U.c)([Object(_.c)()],v.prototype,"uAng",void 0),Object(U.c)([Object(_.c)()],v.prototype,"vAng",void 0),Object(U.c)([Object(_.c)()],v.prototype,"wAng",void 0),Object(U.c)([Object(_.c)()],v.prototype,"uRotationCenter",void 0),Object(U.c)([Object(_.c)()],v.prototype,"vRotationCenter",void 0),Object(U.c)([Object(_.c)()],v.prototype,"wRotationCenter",void 0),Object(U.c)([Object(_.c)()],v.prototype,"homogeneousRotationInUVTransform",void 0),Object(U.c)([Object(_.c)()],v.prototype,"isBlocking",null),v}(M.a);P.a.RegisteredTypes["BABYLON.Texture"]=l,_.a._TextureParser=l.Parse},function(Ie,y,f){f.d(y,"a",function(){return U});var U=function(){function _(){}return _.GetClass=function(R){return this.RegisteredTypes&&this.RegisteredTypes[R]?this.RegisteredTypes[R]:null},_.RegisteredTypes={},_}()},function(Ie,y,f){f.d(y,"b",function(){return l}),f.d(y,"c",function(){return h}),f.d(y,"a",function(){return v});var U=f(6),_=f(38),R=f(8),u=f(41),M=f(57),C=f(21),P=f(49),m=f(22),c=f(56),T=f(145),A=f(104),S=f(122),g=f(120),l=function(){function E(){}return Object.defineProperty(E,"BaseUrl",{get:function(){return c.a.BaseUrl},set:function(D){c.a.BaseUrl=D},enumerable:!1,configurable:!0}),Object.defineProperty(E,"DefaultRetryStrategy",{get:function(){return c.a.DefaultRetryStrategy},set:function(D){c.a.DefaultRetryStrategy=D},enumerable:!1,configurable:!0}),Object.defineProperty(E,"CorsBehavior",{get:function(){return c.a.CorsBehavior},set:function(D){c.a.CorsBehavior=D},enumerable:!1,configurable:!0}),Object.defineProperty(E,"UseFallbackTexture",{get:function(){return m.a.UseFallbackTexture},set:function(D){m.a.UseFallbackTexture=D},enumerable:!1,configurable:!0}),Object.defineProperty(E,"RegisteredExternalClasses",{get:function(){return S.a.RegisteredExternalClasses},set:function(D){S.a.RegisteredExternalClasses=D},enumerable:!1,configurable:!0}),Object.defineProperty(E,"fallbackTexture",{get:function(){return m.a.FallbackTexture},set:function(D){m.a.FallbackTexture=D},enumerable:!1,configurable:!0}),E.FetchToRef=function(D,w,N,I,V,X){var j=4*((Math.abs(D)*N%N|0)+(Math.abs(w)*I%I|0)*N);X.r=V[j]/255,X.g=V[j+1]/255,X.b=V[j+2]/255,X.a=V[j+3]/255},E.Mix=function(D,w,N){return D*(1-N)+w*N},E.Instantiate=function(D){return S.a.Instantiate(D)},E.Slice=function(D,w,N){return D.slice?D.slice(w,N):Array.prototype.slice.call(D,w,N)},E.SliceToArray=function(D,w,N){return Array.isArray(D)?D.slice(w,N):Array.prototype.slice.call(D,w,N)},E.SetImmediate=function(D){A.a.SetImmediate(D)},E.IsExponentOfTwo=function(D){var w=1;do w*=2;while(w=D)break;if(N(te),V&&V()){j.breakLoop();break}}j.executeNext()},X)},I)},E}();m.a.FallbackTexture="data:image/jpg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/4QBmRXhpZgAATU0AKgAAAAgABAEaAAUAAAABAAAAPgEbAAUAAAABAAAARgEoAAMAAAABAAIAAAExAAIAAAAQAAAATgAAAAAAAABgAAAAAQAAAGAAAAABcGFpbnQubmV0IDQuMC41AP/bAEMABAIDAwMCBAMDAwQEBAQFCQYFBQUFCwgIBgkNCw0NDQsMDA4QFBEODxMPDAwSGBITFRYXFxcOERkbGRYaFBYXFv/bAEMBBAQEBQUFCgYGChYPDA8WFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFv/AABEIAQABAAMBIgACEQEDEQH/xAAfAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgv/xAC1EAACAQMDAgQDBQUEBAAAAX0BAgMABBEFEiExQQYTUWEHInEUMoGRoQgjQrHBFVLR8CQzYnKCCQoWFxgZGiUmJygpKjQ1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4eLj5OXm5+jp6vHy8/T19vf4+fr/xAAfAQADAQEBAQEBAQEBAAAAAAAAAQIDBAUGBwgJCgv/xAC1EQACAQIEBAMEBwUEBAABAncAAQIDEQQFITEGEkFRB2FxEyIygQgUQpGhscEJIzNS8BVictEKFiQ04SXxFxgZGiYnKCkqNTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqCg4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2dri4+Tl5ufo6ery8/T19vf4+fr/2gAMAwEAAhEDEQA/APH6KKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FCiiigD6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++gooooA+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gUKKKKAPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76CiiigD5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BQooooA+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/voKKKKAPl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FCiiigD6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++gooooA+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gUKKKKAPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76CiiigD5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BQooooA+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/voKKKKAPl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FCiiigD6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++gooooA+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gUKKKKAPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76P//Z",T.a.Apply()},function(Ie,y,f){f.d(y,"a",function(){return S});var U=f(1),_=f(6),R=f(38),u=f(22),M=f(21),C=f(26),P=f(2),m=f(146),c=f(55),T=f(88),A=f(8),S=(f(123),f(129),f(124),function(g){function l(h,v,E,D){D===void 0&&(D=!1);var w=g.call(this,h,v,E,D)||this;if(w.enableOfflineSupport=!1,w.disableManifestCheck=!1,w.scenes=new Array,w.onNewSceneAddedObservable=new _.c,w.postProcesses=new Array,w.isPointerLock=!1,w.onResizeObservable=new _.c,w.onCanvasBlurObservable=new _.c,w.onCanvasFocusObservable=new _.c,w.onCanvasPointerOutObservable=new _.c,w.onBeginFrameObservable=new _.c,w.customAnimationFrameRequester=null,w.onEndFrameObservable=new _.c,w.onBeforeShaderCompilationObservable=new _.c,w.onAfterShaderCompilationObservable=new _.c,w._deterministicLockstep=!1,w._lockstepMaxSteps=4,w._timeStep=1/60,w._fps=60,w._deltaTime=0,w._drawCalls=new c.a,w.canvasTabIndex=1,w.disablePerformanceMonitorInBackground=!1,w._performanceMonitor=new m.a,l.Instances.push(w),!h)return w;if(E=w._creationOptions,h.getContext){var N=h;if(w._onCanvasFocus=function(){w.onCanvasFocusObservable.notifyObservers(w)},w._onCanvasBlur=function(){w.onCanvasBlurObservable.notifyObservers(w)},N.addEventListener("focus",w._onCanvasFocus),N.addEventListener("blur",w._onCanvasBlur),w._onBlur=function(){w.disablePerformanceMonitorInBackground&&w._performanceMonitor.disable(),w._windowIsBackground=!0},w._onFocus=function(){w.disablePerformanceMonitorInBackground&&w._performanceMonitor.enable(),w._windowIsBackground=!1},w._onCanvasPointerOut=function(X){w.onCanvasPointerOutObservable.notifyObservers(X)},N.addEventListener("pointerout",w._onCanvasPointerOut),R.a.IsWindowObjectExist()){var I=w.getHostWindow();I.addEventListener("blur",w._onBlur),I.addEventListener("focus",w._onFocus);var V=document;w._onFullscreenChange=function(){V.fullscreen!==void 0?w.isFullscreen=V.fullscreen:V.mozFullScreen!==void 0?w.isFullscreen=V.mozFullScreen:V.webkitIsFullScreen!==void 0?w.isFullscreen=V.webkitIsFullScreen:V.msIsFullScreen!==void 0&&(w.isFullscreen=V.msIsFullScreen),w.isFullscreen&&w._pointerLockRequested&&N&&l._RequestPointerlock(N)},document.addEventListener("fullscreenchange",w._onFullscreenChange,!1),document.addEventListener("mozfullscreenchange",w._onFullscreenChange,!1),document.addEventListener("webkitfullscreenchange",w._onFullscreenChange,!1),document.addEventListener("msfullscreenchange",w._onFullscreenChange,!1),w._onPointerLockChange=function(){w.isPointerLock=V.mozPointerLockElement===N||V.webkitPointerLockElement===N||V.msPointerLockElement===N||V.pointerLockElement===N},document.addEventListener("pointerlockchange",w._onPointerLockChange,!1),document.addEventListener("mspointerlockchange",w._onPointerLockChange,!1),document.addEventListener("mozpointerlockchange",w._onPointerLockChange,!1),document.addEventListener("webkitpointerlockchange",w._onPointerLockChange,!1),!l.audioEngine&&E.audioEngine&&l.AudioEngineFactory&&(l.audioEngine=l.AudioEngineFactory(w.getRenderingCanvas()))}w._connectVREvents(),w.enableOfflineSupport=l.OfflineProviderFactory!==void 0,E.doNotHandleTouchAction||w._disableTouchAction(),w._deterministicLockstep=!!E.deterministicLockstep,w._lockstepMaxSteps=E.lockstepMaxSteps||0,w._timeStep=E.timeStep||1/60}return w._prepareVRComponent(),E.autoEnableWebVR&&w.initWebVR(),w}return Object(U.d)(l,g),Object.defineProperty(l,"NpmPackage",{get:function(){return C.a.NpmPackage},enumerable:!1,configurable:!0}),Object.defineProperty(l,"Version",{get:function(){return C.a.Version},enumerable:!1,configurable:!0}),Object.defineProperty(l,"Instances",{get:function(){return u.a.Instances},enumerable:!1,configurable:!0}),Object.defineProperty(l,"LastCreatedEngine",{get:function(){return u.a.LastCreatedEngine},enumerable:!1,configurable:!0}),Object.defineProperty(l,"LastCreatedScene",{get:function(){return u.a.LastCreatedScene},enumerable:!1,configurable:!0}),l.MarkAllMaterialsAsDirty=function(h,v){for(var E=0;E0?this.customAnimationFrameRequester?(this.customAnimationFrameRequester.requestID=this._queueNewFrame(this.customAnimationFrameRequester.renderFunction||this._boundRenderFunction,this.customAnimationFrameRequester),this._frameHandler=this.customAnimationFrameRequester.requestID):this.isVRPresenting()?this._requestVRFrame():this._frameHandler=this._queueNewFrame(this._boundRenderFunction,this.getHostWindow()):this._renderingQueueLaunched=!1},l.prototype._renderViews=function(){return!1},l.prototype.switchFullscreen=function(h){this.isFullscreen?this.exitFullscreen():this.enterFullscreen(h)},l.prototype.enterFullscreen=function(h){this.isFullscreen||(this._pointerLockRequested=h,this._renderingCanvas&&l._RequestFullscreen(this._renderingCanvas))},l.prototype.exitFullscreen=function(){this.isFullscreen&&l._ExitFullscreen()},l.prototype.enterPointerlock=function(){this._renderingCanvas&&l._RequestPointerlock(this._renderingCanvas)},l.prototype.exitPointerlock=function(){l._ExitPointerlock()},l.prototype.beginFrame=function(){this._measureFps(),this.onBeginFrameObservable.notifyObservers(this),g.prototype.beginFrame.call(this)},l.prototype.endFrame=function(){g.prototype.endFrame.call(this),this._submitVRFrame(),this.onEndFrameObservable.notifyObservers(this)},l.prototype.resize=function(){this.isVRPresenting()||g.prototype.resize.call(this)},l.prototype.setSize=function(h,v){if(!this._renderingCanvas||!g.prototype.setSize.call(this,h,v))return!1;if(this.scenes){for(var E=0;E1&&w){var I=this.createTransformFeedback();this.bindTransformFeedback(I),this.setTranformFeedbackVaryings(N,w),h.transformFeedback=I}return D.linkProgram(N),this.webGLVersion>1&&w&&this.bindTransformFeedback(null),h.context=D,h.vertexShader=v,h.fragmentShader=E,h.isParallelCompiled||this._finalizePipelineContext(h),N},l.prototype._releaseTexture=function(h){g.prototype._releaseTexture.call(this,h),this.scenes.forEach(function(v){v.postProcesses.forEach(function(E){E._outputTexture==h&&(E._outputTexture=null)}),v.cameras.forEach(function(E){E._postProcesses.forEach(function(D){D&&D._outputTexture==h&&(D._outputTexture=null)})})})},l.prototype._rescaleTexture=function(h,v,E,D,w){var N=this;this._gl.texParameteri(this._gl.TEXTURE_2D,this._gl.TEXTURE_MAG_FILTER,this._gl.LINEAR),this._gl.texParameteri(this._gl.TEXTURE_2D,this._gl.TEXTURE_MIN_FILTER,this._gl.LINEAR),this._gl.texParameteri(this._gl.TEXTURE_2D,this._gl.TEXTURE_WRAP_S,this._gl.CLAMP_TO_EDGE),this._gl.texParameteri(this._gl.TEXTURE_2D,this._gl.TEXTURE_WRAP_T,this._gl.CLAMP_TO_EDGE);var I=this.createRenderTargetTexture({width:v.width,height:v.height},{generateMipMaps:!1,type:P.a.TEXTURETYPE_UNSIGNED_INT,samplingMode:P.a.TEXTURE_BILINEAR_SAMPLINGMODE,generateDepthBuffer:!1,generateStencilBuffer:!1});!this._rescalePostProcess&&l._RescalePostProcessFactory&&(this._rescalePostProcess=l._RescalePostProcessFactory(this)),this._rescalePostProcess.getEffect().executeWhenCompiled(function(){N._rescalePostProcess.onApply=function(X){X._bindTexture("textureSampler",h)};var V=E;V||(V=N.scenes[N.scenes.length-1]),V.postProcessManager.directRender([N._rescalePostProcess],I,!0),N._bindTextureDirectly(N._gl.TEXTURE_2D,v,!0),N._gl.copyTexImage2D(N._gl.TEXTURE_2D,0,D,0,0,v.width,v.height,0),N.unBindFramebuffer(I),N._releaseTexture(I),w&&w()})},l.prototype.getFps=function(){return this._fps},l.prototype.getDeltaTime=function(){return this._deltaTime},l.prototype._measureFps=function(){this._performanceMonitor.sampleFrame(),this._fps=this._performanceMonitor.averageFPS,this._deltaTime=this._performanceMonitor.instantaneousFrameTime||0},l.prototype._uploadImageToTexture=function(h,v,E,D){E===void 0&&(E=0),D===void 0&&(D=0);var w=this._gl,N=this._getWebGLTextureType(h.type),I=this._getInternalFormat(h.format),V=this._getRGBABufferInternalSizedFormat(h.type,I),X=h.isCube?w.TEXTURE_CUBE_MAP:w.TEXTURE_2D;this._bindTextureDirectly(X,h,!0),this._unpackFlipY(h.invertY);var j=w.TEXTURE_2D;h.isCube&&(j=w.TEXTURE_CUBE_MAP_POSITIVE_X+E),w.texImage2D(j,D,V,I,N,v),this._bindTextureDirectly(X,null,!0)},l.prototype.updateRenderTargetTextureSampleCount=function(h,v){if(this.webGLVersion<2||!h)return 1;if(h.samples===v)return v;var E=this._gl;if(v=Math.min(v,this.getCaps().maxMSAASamples),h._depthStencilBuffer&&(E.deleteRenderbuffer(h._depthStencilBuffer),h._depthStencilBuffer=null),h._MSAAFramebuffer&&(E.deleteFramebuffer(h._MSAAFramebuffer),h._MSAAFramebuffer=null),h._MSAARenderBuffer&&(E.deleteRenderbuffer(h._MSAARenderBuffer),h._MSAARenderBuffer=null),v>1&&E.renderbufferStorageMultisample){var D=E.createFramebuffer();if(!D)throw new Error("Unable to create multi sampled framebuffer");h._MSAAFramebuffer=D,this._bindUnboundFramebuffer(h._MSAAFramebuffer);var w=E.createRenderbuffer();if(!w)throw new Error("Unable to create multi sampled framebuffer");E.bindRenderbuffer(E.RENDERBUFFER,w),E.renderbufferStorageMultisample(E.RENDERBUFFER,v,this._getRGBAMultiSampleBufferFormat(h.type),h.width,h.height),E.framebufferRenderbuffer(E.FRAMEBUFFER,E.COLOR_ATTACHMENT0,E.RENDERBUFFER,w),h._MSAARenderBuffer=w}else this._bindUnboundFramebuffer(h._framebuffer);return h.samples=v,h._depthStencilBuffer=this._setupFramebufferDepthAttachments(h._generateStencilBuffer,h._generateDepthBuffer,h.width,h.height,v),this._bindUnboundFramebuffer(null),v},l.prototype.updateTextureComparisonFunction=function(h,v){if(this.webGLVersion!==1){var E=this._gl;h.isCube?(this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,h,!0),v===0?(E.texParameteri(E.TEXTURE_CUBE_MAP,E.TEXTURE_COMPARE_FUNC,P.a.LEQUAL),E.texParameteri(E.TEXTURE_CUBE_MAP,E.TEXTURE_COMPARE_MODE,E.NONE)):(E.texParameteri(E.TEXTURE_CUBE_MAP,E.TEXTURE_COMPARE_FUNC,v),E.texParameteri(E.TEXTURE_CUBE_MAP,E.TEXTURE_COMPARE_MODE,E.COMPARE_REF_TO_TEXTURE)),this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,null)):(this._bindTextureDirectly(this._gl.TEXTURE_2D,h,!0),v===0?(E.texParameteri(E.TEXTURE_2D,E.TEXTURE_COMPARE_FUNC,P.a.LEQUAL),E.texParameteri(E.TEXTURE_2D,E.TEXTURE_COMPARE_MODE,E.NONE)):(E.texParameteri(E.TEXTURE_2D,E.TEXTURE_COMPARE_FUNC,v),E.texParameteri(E.TEXTURE_2D,E.TEXTURE_COMPARE_MODE,E.COMPARE_REF_TO_TEXTURE)),this._bindTextureDirectly(this._gl.TEXTURE_2D,null)),h._comparisonFunction=v}else A.a.Error("WebGL 1 does not support texture comparison.")},l.prototype.createInstancesBuffer=function(h){var v=this._gl.createBuffer();if(!v)throw new Error("Unable to create instance buffer");var E=new T.a(v);return E.capacity=h,this.bindArrayBuffer(E),this._gl.bufferData(this._gl.ARRAY_BUFFER,h,this._gl.DYNAMIC_DRAW),E},l.prototype.deleteInstancesBuffer=function(h){this._gl.deleteBuffer(h)},l.prototype._clientWaitAsync=function(h,v,E){v===void 0&&(v=0),E===void 0&&(E=10);var D=this._gl;return new Promise(function(w,N){var I=function(){var V=D.clientWaitSync(h,v,0);V!=D.WAIT_FAILED?V!=D.TIMEOUT_EXPIRED?w():setTimeout(I,E):N()};I()})},l.prototype._readPixelsAsync=function(h,v,E,D,w,N,I){if(this._webGLVersion<2)throw new Error("_readPixelsAsync only work on WebGL2+");var V=this._gl,X=V.createBuffer();V.bindBuffer(V.PIXEL_PACK_BUFFER,X),V.bufferData(V.PIXEL_PACK_BUFFER,I.byteLength,V.STREAM_READ),V.readPixels(h,v,E,D,w,N,0),V.bindBuffer(V.PIXEL_PACK_BUFFER,null);var j=V.fenceSync(V.SYNC_GPU_COMMANDS_COMPLETE,0);return j?(V.flush(),this._clientWaitAsync(j,0,10).then(function(){return V.deleteSync(j),V.bindBuffer(V.PIXEL_PACK_BUFFER,X),V.getBufferSubData(V.PIXEL_PACK_BUFFER,0,I),V.bindBuffer(V.PIXEL_PACK_BUFFER,null),V.deleteBuffer(X),I})):null},l.prototype.dispose=function(){for(this.hideLoadingUI(),this.onNewSceneAddedObservable.clear();this.postProcesses.length;)this.postProcesses[0].dispose();for(this._rescalePostProcess&&this._rescalePostProcess.dispose();this.scenes.length;)this.scenes[0].dispose();l.Instances.length===1&&l.audioEngine&&l.audioEngine.dispose(),this.disableVR(),R.a.IsWindowObjectExist()&&(window.removeEventListener("blur",this._onBlur),window.removeEventListener("focus",this._onFocus),this._renderingCanvas&&(this._renderingCanvas.removeEventListener("focus",this._onCanvasFocus),this._renderingCanvas.removeEventListener("blur",this._onCanvasBlur),this._renderingCanvas.removeEventListener("pointerout",this._onCanvasPointerOut)),R.a.IsDocumentAvailable()&&(document.removeEventListener("fullscreenchange",this._onFullscreenChange),document.removeEventListener("mozfullscreenchange",this._onFullscreenChange),document.removeEventListener("webkitfullscreenchange",this._onFullscreenChange),document.removeEventListener("msfullscreenchange",this._onFullscreenChange),document.removeEventListener("pointerlockchange",this._onPointerLockChange),document.removeEventListener("mspointerlockchange",this._onPointerLockChange),document.removeEventListener("mozpointerlockchange",this._onPointerLockChange),document.removeEventListener("webkitpointerlockchange",this._onPointerLockChange))),g.prototype.dispose.call(this);var h=l.Instances.indexOf(this);h>=0&&l.Instances.splice(h,1),this.onResizeObservable.clear(),this.onCanvasBlurObservable.clear(),this.onCanvasFocusObservable.clear(),this.onCanvasPointerOutObservable.clear(),this.onBeginFrameObservable.clear(),this.onEndFrameObservable.clear()},l.prototype._disableTouchAction=function(){this._renderingCanvas&&this._renderingCanvas.setAttribute&&(this._renderingCanvas.setAttribute("touch-action","none"),this._renderingCanvas.style.touchAction="none",this._renderingCanvas.style.msTouchAction="none")},l.prototype.displayLoadingUI=function(){if(R.a.IsWindowObjectExist()){var h=this.loadingScreen;h&&h.displayLoadingUI()}},l.prototype.hideLoadingUI=function(){if(R.a.IsWindowObjectExist()){var h=this._loadingScreen;h&&h.hideLoadingUI()}},Object.defineProperty(l.prototype,"loadingScreen",{get:function(){return!this._loadingScreen&&this._renderingCanvas&&(this._loadingScreen=l.DefaultLoadingScreenFactory(this._renderingCanvas)),this._loadingScreen},set:function(h){this._loadingScreen=h},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"loadingUIText",{set:function(h){this.loadingScreen.loadingUIText=h},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"loadingUIBackgroundColor",{set:function(h){this.loadingScreen.loadingUIBackgroundColor=h},enumerable:!1,configurable:!0}),l._RequestPointerlock=function(h){h.requestPointerLock=h.requestPointerLock||h.msRequestPointerLock||h.mozRequestPointerLock||h.webkitRequestPointerLock,h.requestPointerLock&&h.requestPointerLock()},l._ExitPointerlock=function(){var h=document;document.exitPointerLock=document.exitPointerLock||h.msExitPointerLock||h.mozExitPointerLock||h.webkitExitPointerLock,document.exitPointerLock&&document.exitPointerLock()},l._RequestFullscreen=function(h){var v=h.requestFullscreen||h.msRequestFullscreen||h.webkitRequestFullscreen||h.mozRequestFullScreen;v&&v.call(h)},l._ExitFullscreen=function(){var h=document;document.exitFullscreen?document.exitFullscreen():h.mozCancelFullScreen?h.mozCancelFullScreen():h.webkitCancelFullScreen?h.webkitCancelFullScreen():h.msCancelFullScreen&&h.msCancelFullScreen()},l.ALPHA_DISABLE=P.a.ALPHA_DISABLE,l.ALPHA_ADD=P.a.ALPHA_ADD,l.ALPHA_COMBINE=P.a.ALPHA_COMBINE,l.ALPHA_SUBTRACT=P.a.ALPHA_SUBTRACT,l.ALPHA_MULTIPLY=P.a.ALPHA_MULTIPLY,l.ALPHA_MAXIMIZED=P.a.ALPHA_MAXIMIZED,l.ALPHA_ONEONE=P.a.ALPHA_ONEONE,l.ALPHA_PREMULTIPLIED=P.a.ALPHA_PREMULTIPLIED,l.ALPHA_PREMULTIPLIED_PORTERDUFF=P.a.ALPHA_PREMULTIPLIED_PORTERDUFF,l.ALPHA_INTERPOLATE=P.a.ALPHA_INTERPOLATE,l.ALPHA_SCREENMODE=P.a.ALPHA_SCREENMODE,l.DELAYLOADSTATE_NONE=P.a.DELAYLOADSTATE_NONE,l.DELAYLOADSTATE_LOADED=P.a.DELAYLOADSTATE_LOADED,l.DELAYLOADSTATE_LOADING=P.a.DELAYLOADSTATE_LOADING,l.DELAYLOADSTATE_NOTLOADED=P.a.DELAYLOADSTATE_NOTLOADED,l.NEVER=P.a.NEVER,l.ALWAYS=P.a.ALWAYS,l.LESS=P.a.LESS,l.EQUAL=P.a.EQUAL,l.LEQUAL=P.a.LEQUAL,l.GREATER=P.a.GREATER,l.GEQUAL=P.a.GEQUAL,l.NOTEQUAL=P.a.NOTEQUAL,l.KEEP=P.a.KEEP,l.REPLACE=P.a.REPLACE,l.INCR=P.a.INCR,l.DECR=P.a.DECR,l.INVERT=P.a.INVERT,l.INCR_WRAP=P.a.INCR_WRAP,l.DECR_WRAP=P.a.DECR_WRAP,l.TEXTURE_CLAMP_ADDRESSMODE=P.a.TEXTURE_CLAMP_ADDRESSMODE,l.TEXTURE_WRAP_ADDRESSMODE=P.a.TEXTURE_WRAP_ADDRESSMODE,l.TEXTURE_MIRROR_ADDRESSMODE=P.a.TEXTURE_MIRROR_ADDRESSMODE,l.TEXTUREFORMAT_ALPHA=P.a.TEXTUREFORMAT_ALPHA,l.TEXTUREFORMAT_LUMINANCE=P.a.TEXTUREFORMAT_LUMINANCE,l.TEXTUREFORMAT_LUMINANCE_ALPHA=P.a.TEXTUREFORMAT_LUMINANCE_ALPHA,l.TEXTUREFORMAT_RGB=P.a.TEXTUREFORMAT_RGB,l.TEXTUREFORMAT_RGBA=P.a.TEXTUREFORMAT_RGBA,l.TEXTUREFORMAT_RED=P.a.TEXTUREFORMAT_RED,l.TEXTUREFORMAT_R=P.a.TEXTUREFORMAT_R,l.TEXTUREFORMAT_RG=P.a.TEXTUREFORMAT_RG,l.TEXTUREFORMAT_RED_INTEGER=P.a.TEXTUREFORMAT_RED_INTEGER,l.TEXTUREFORMAT_R_INTEGER=P.a.TEXTUREFORMAT_R_INTEGER,l.TEXTUREFORMAT_RG_INTEGER=P.a.TEXTUREFORMAT_RG_INTEGER,l.TEXTUREFORMAT_RGB_INTEGER=P.a.TEXTUREFORMAT_RGB_INTEGER,l.TEXTUREFORMAT_RGBA_INTEGER=P.a.TEXTUREFORMAT_RGBA_INTEGER,l.TEXTURETYPE_UNSIGNED_BYTE=P.a.TEXTURETYPE_UNSIGNED_BYTE,l.TEXTURETYPE_UNSIGNED_INT=P.a.TEXTURETYPE_UNSIGNED_INT,l.TEXTURETYPE_FLOAT=P.a.TEXTURETYPE_FLOAT,l.TEXTURETYPE_HALF_FLOAT=P.a.TEXTURETYPE_HALF_FLOAT,l.TEXTURETYPE_BYTE=P.a.TEXTURETYPE_BYTE,l.TEXTURETYPE_SHORT=P.a.TEXTURETYPE_SHORT,l.TEXTURETYPE_UNSIGNED_SHORT=P.a.TEXTURETYPE_UNSIGNED_SHORT,l.TEXTURETYPE_INT=P.a.TEXTURETYPE_INT,l.TEXTURETYPE_UNSIGNED_INTEGER=P.a.TEXTURETYPE_UNSIGNED_INTEGER,l.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4=P.a.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4,l.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1=P.a.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1,l.TEXTURETYPE_UNSIGNED_SHORT_5_6_5=P.a.TEXTURETYPE_UNSIGNED_SHORT_5_6_5,l.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV=P.a.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV,l.TEXTURETYPE_UNSIGNED_INT_24_8=P.a.TEXTURETYPE_UNSIGNED_INT_24_8,l.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV=P.a.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV,l.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV=P.a.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV,l.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV=P.a.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV,l.TEXTURE_NEAREST_SAMPLINGMODE=P.a.TEXTURE_NEAREST_SAMPLINGMODE,l.TEXTURE_BILINEAR_SAMPLINGMODE=P.a.TEXTURE_BILINEAR_SAMPLINGMODE,l.TEXTURE_TRILINEAR_SAMPLINGMODE=P.a.TEXTURE_TRILINEAR_SAMPLINGMODE,l.TEXTURE_NEAREST_NEAREST_MIPLINEAR=P.a.TEXTURE_NEAREST_NEAREST_MIPLINEAR,l.TEXTURE_LINEAR_LINEAR_MIPNEAREST=P.a.TEXTURE_LINEAR_LINEAR_MIPNEAREST,l.TEXTURE_LINEAR_LINEAR_MIPLINEAR=P.a.TEXTURE_LINEAR_LINEAR_MIPLINEAR,l.TEXTURE_NEAREST_NEAREST_MIPNEAREST=P.a.TEXTURE_NEAREST_NEAREST_MIPNEAREST,l.TEXTURE_NEAREST_LINEAR_MIPNEAREST=P.a.TEXTURE_NEAREST_LINEAR_MIPNEAREST,l.TEXTURE_NEAREST_LINEAR_MIPLINEAR=P.a.TEXTURE_NEAREST_LINEAR_MIPLINEAR,l.TEXTURE_NEAREST_LINEAR=P.a.TEXTURE_NEAREST_LINEAR,l.TEXTURE_NEAREST_NEAREST=P.a.TEXTURE_NEAREST_NEAREST,l.TEXTURE_LINEAR_NEAREST_MIPNEAREST=P.a.TEXTURE_LINEAR_NEAREST_MIPNEAREST,l.TEXTURE_LINEAR_NEAREST_MIPLINEAR=P.a.TEXTURE_LINEAR_NEAREST_MIPLINEAR,l.TEXTURE_LINEAR_LINEAR=P.a.TEXTURE_LINEAR_LINEAR,l.TEXTURE_LINEAR_NEAREST=P.a.TEXTURE_LINEAR_NEAREST,l.TEXTURE_EXPLICIT_MODE=P.a.TEXTURE_EXPLICIT_MODE,l.TEXTURE_SPHERICAL_MODE=P.a.TEXTURE_SPHERICAL_MODE,l.TEXTURE_PLANAR_MODE=P.a.TEXTURE_PLANAR_MODE,l.TEXTURE_CUBIC_MODE=P.a.TEXTURE_CUBIC_MODE,l.TEXTURE_PROJECTION_MODE=P.a.TEXTURE_PROJECTION_MODE,l.TEXTURE_SKYBOX_MODE=P.a.TEXTURE_SKYBOX_MODE,l.TEXTURE_INVCUBIC_MODE=P.a.TEXTURE_INVCUBIC_MODE,l.TEXTURE_EQUIRECTANGULAR_MODE=P.a.TEXTURE_EQUIRECTANGULAR_MODE,l.TEXTURE_FIXED_EQUIRECTANGULAR_MODE=P.a.TEXTURE_FIXED_EQUIRECTANGULAR_MODE,l.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE=P.a.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE,l.SCALEMODE_FLOOR=P.a.SCALEMODE_FLOOR,l.SCALEMODE_NEAREST=P.a.SCALEMODE_NEAREST,l.SCALEMODE_CEILING=P.a.SCALEMODE_CEILING,l._RescalePostProcessFactory=null,l}(C.a))},function(Ie,y,f){f.d(y,"a",function(){return U});var U=function(){function _(){}return _.WithinEpsilon=function(R,u,M){M===void 0&&(M=1401298e-51);var C=R-u;return-M<=C&&C<=M},_.ToHex=function(R){var u=R.toString(16);return R<=15?("0"+u).toUpperCase():u.toUpperCase()},_.Sign=function(R){return(R=+R)==0||isNaN(R)?R:R>0?1:-1},_.Clamp=function(R,u,M){return u===void 0&&(u=0),M===void 0&&(M=1),Math.min(M,Math.max(u,R))},_.Log2=function(R){return Math.log(R)*Math.LOG2E},_.Repeat=function(R,u){return R-Math.floor(R/u)*u},_.Normalize=function(R,u,M){return(R-u)/(M-u)},_.Denormalize=function(R,u,M){return R*(M-u)+u},_.DeltaAngle=function(R,u){var M=_.Repeat(u-R,360);return M>180&&(M-=360),M},_.PingPong=function(R,u){var M=_.Repeat(R,2*u);return u-Math.abs(M-u)},_.SmoothStep=function(R,u,M){var C=_.Clamp(M);return u*(C=-2*C*C*C+3*C*C)+R*(1-C)},_.MoveTowards=function(R,u,M){return Math.abs(u-R)<=M?u:R+_.Sign(u-R)*M},_.MoveTowardsAngle=function(R,u,M){var C=_.DeltaAngle(R,u),P=0;return-M180&&(C-=360),R+C*_.Clamp(M)},_.InverseLerp=function(R,u,M){return R!=u?_.Clamp((M-R)/(u-R)):0},_.Hermite=function(R,u,M,C,P){var m=P*P,c=P*m;return R*(2*c-3*m+1)+M*(-2*c+3*m)+u*(c-2*m+P)+C*(c-m)},_.RandomRange=function(R,u){return R===u?R:Math.random()*(u-R)+R},_.RangeToPercent=function(R,u,M){return(R-u)/(M-u)},_.PercentToRange=function(R,u,M){return(M-u)*R+u},_.NormalizeRadians=function(R){return R-=_.TwoPi*Math.floor((R+Math.PI)/_.TwoPi)},_.TwoPi=2*Math.PI,_}()},function(Ie,y,f){f.d(y,"a",function(){return c});var U=f(8),_=f(20),R=f(22),u=f(4),M=f(48),C=f(2),P=f(9),m=f(119),c=function(){function T(){}return T.BindEyePosition=function(A,S,g){if(g===void 0&&(g="vEyePosition"),S._forcedViewPosition)A.setVector3(g,S._forcedViewPosition);else{var l=S.activeCamera.globalPosition;l||(l=S.activeCamera.devicePosition),A.setVector3(g,S._mirroredCameraPosition?S._mirroredCameraPosition:l)}},T.PrepareDefinesForMergedUV=function(A,S,g){S._needUVs=!0,S[g]=!0,A.getTextureMatrix().isIdentityAs3x2()?(S[g+"DIRECTUV"]=A.coordinatesIndex+1,A.coordinatesIndex===0?S.MAINUV1=!0:S.MAINUV2=!0):S[g+"DIRECTUV"]=0},T.BindTextureMatrix=function(A,S,g){var l=A.getTextureMatrix();S.updateMatrix(g+"Matrix",l)},T.GetFogState=function(A,S){return S.fogEnabled&&A.applyFog&&S.fogMode!==_.a.FOGMODE_NONE},T.PrepareDefinesForMisc=function(A,S,g,l,h,v,E){E._areMiscDirty&&(E.LOGARITHMICDEPTH=g,E.POINTSIZE=l,E.FOG=h&&this.GetFogState(A,S),E.NONUNIFORMSCALING=A.nonUniformScaling,E.ALPHATEST=v)},T.PrepareDefinesForFrameBoundValues=function(A,S,g,l,h,v){h===void 0&&(h=null),v===void 0&&(v=!1);var E,D,w,N,I,V,X=!1;E=h??(A.clipPlane!==void 0&&A.clipPlane!==null),D=h??(A.clipPlane2!==void 0&&A.clipPlane2!==null),w=h??(A.clipPlane3!==void 0&&A.clipPlane3!==null),N=h??(A.clipPlane4!==void 0&&A.clipPlane4!==null),I=h??(A.clipPlane5!==void 0&&A.clipPlane5!==null),V=h??(A.clipPlane6!==void 0&&A.clipPlane6!==null),g.CLIPPLANE!==E&&(g.CLIPPLANE=E,X=!0),g.CLIPPLANE2!==D&&(g.CLIPPLANE2=D,X=!0),g.CLIPPLANE3!==w&&(g.CLIPPLANE3=w,X=!0),g.CLIPPLANE4!==N&&(g.CLIPPLANE4=N,X=!0),g.CLIPPLANE5!==I&&(g.CLIPPLANE5=I,X=!0),g.CLIPPLANE6!==V&&(g.CLIPPLANE6=V,X=!0),g.DEPTHPREPASS!==!S.getColorWrite()&&(g.DEPTHPREPASS=!g.DEPTHPREPASS,X=!0),g.INSTANCES!==l&&(g.INSTANCES=l,X=!0),g.THIN_INSTANCES!==v&&(g.THIN_INSTANCES=v,X=!0),X&&g.markAsUnprocessed()},T.PrepareDefinesForBones=function(A,S){if(A.useBones&&A.computeBonesUsingShaders&&A.skeleton){S.NUM_BONE_INFLUENCERS=A.numBoneInfluencers;var g=S.BONETEXTURE!==void 0;if(A.skeleton.isUsingTextureForMatrices&&g)S.BONETEXTURE=!0;else{S.BonesPerMesh=A.skeleton.bones.length+1,S.BONETEXTURE=!g&&void 0;var l=A.getScene().prePassRenderer;if(l&&l.enabled){var h=l.excludedSkinnedMesh.indexOf(A)===-1;S.BONES_VELOCITY_ENABLED=h}}}else S.NUM_BONE_INFLUENCERS=0,S.BonesPerMesh=0},T.PrepareDefinesForMorphTargets=function(A,S){var g=A.morphTargetManager;g?(S.MORPHTARGETS_UV=g.supportsUVs&&S.UV1,S.MORPHTARGETS_TANGENT=g.supportsTangents&&S.TANGENT,S.MORPHTARGETS_NORMAL=g.supportsNormals&&S.NORMAL,S.MORPHTARGETS=g.numInfluencers>0,S.NUM_MORPH_INFLUENCERS=g.numInfluencers):(S.MORPHTARGETS_UV=!1,S.MORPHTARGETS_TANGENT=!1,S.MORPHTARGETS_NORMAL=!1,S.MORPHTARGETS=!1,S.NUM_MORPH_INFLUENCERS=0)},T.PrepareDefinesForAttributes=function(A,S,g,l,h,v){if(h===void 0&&(h=!1),v===void 0&&(v=!0),!S._areAttributesDirty&&S._needNormals===S._normals&&S._needUVs===S._uvs)return!1;if(S._normals=S._needNormals,S._uvs=S._needUVs,S.NORMAL=S._needNormals&&A.isVerticesDataPresent(u.b.NormalKind),S._needNormals&&A.isVerticesDataPresent(u.b.TangentKind)&&(S.TANGENT=!0),S._needUVs?(S.UV1=A.isVerticesDataPresent(u.b.UVKind),S.UV2=A.isVerticesDataPresent(u.b.UV2Kind)):(S.UV1=!1,S.UV2=!1),g){var E=A.useVertexColors&&A.isVerticesDataPresent(u.b.ColorKind);S.VERTEXCOLOR=E,S.VERTEXALPHA=A.hasVertexAlpha&&E&&v}return l&&this.PrepareDefinesForBones(A,S),h&&this.PrepareDefinesForMorphTargets(A,S),!0},T.PrepareDefinesForMultiview=function(A,S){if(A.activeCamera){var g=S.MULTIVIEW;S.MULTIVIEW=A.activeCamera.outputRenderTarget!==null&&A.activeCamera.outputRenderTarget.getViewCount()>1,S.MULTIVIEW!=g&&S.markAsUnprocessed()}},T.PrepareDefinesForPrePass=function(A,S,g){var l=S.PREPASS;if(S._arePrePassDirty){var h=[{type:C.a.PREPASS_POSITION_TEXTURE_TYPE,define:"PREPASS_POSITION",index:"PREPASS_POSITION_INDEX"},{type:C.a.PREPASS_VELOCITY_TEXTURE_TYPE,define:"PREPASS_VELOCITY",index:"PREPASS_VELOCITY_INDEX"},{type:C.a.PREPASS_REFLECTIVITY_TEXTURE_TYPE,define:"PREPASS_REFLECTIVITY",index:"PREPASS_REFLECTIVITY_INDEX"},{type:C.a.PREPASS_IRRADIANCE_TEXTURE_TYPE,define:"PREPASS_IRRADIANCE",index:"PREPASS_IRRADIANCE_INDEX"},{type:C.a.PREPASS_ALBEDO_TEXTURE_TYPE,define:"PREPASS_ALBEDO",index:"PREPASS_ALBEDO_INDEX"},{type:C.a.PREPASS_DEPTHNORMAL_TEXTURE_TYPE,define:"PREPASS_DEPTHNORMAL",index:"PREPASS_DEPTHNORMAL_INDEX"}];if(A.prePassRenderer&&A.prePassRenderer.enabled&&g){S.PREPASS=!0,S.SCENE_MRT_COUNT=A.prePassRenderer.mrtCount;for(var v=0;v0&&(E.shadowEnabled=!0,D.prepareDefines(h,l))}}g.lightmapMode!=M.a.LIGHTMAP_DEFAULT?(E.lightmapMode=!0,h["LIGHTMAPEXCLUDED"+l]=!0,h["LIGHTMAPNOSPECULAR"+l]=g.lightmapMode==M.a.LIGHTMAP_SHADOWSONLY):(h["LIGHTMAPEXCLUDED"+l]=!1,h["LIGHTMAPNOSPECULAR"+l]=!1)},T.PrepareDefinesForLights=function(A,S,g,l,h,v){if(h===void 0&&(h=4),v===void 0&&(v=!1),!g._areLightsDirty)return g._needNormals;var E=0,D={needNormals:!1,needRebuild:!1,lightmapMode:!1,shadowEnabled:!1,specularEnabled:!1};if(A.lightsEnabled&&!v)for(var w=0,N=S.lightSources;w0&&(h=l+v,S.addFallback(h,"LIGHT"+v)),A.SHADOWS||(A["SHADOW"+v]&&S.addFallback(l,"SHADOW"+v),A["SHADOWPCF"+v]&&S.addFallback(l,"SHADOWPCF"+v),A["SHADOWPCSS"+v]&&S.addFallback(l,"SHADOWPCSS"+v),A["SHADOWPOISSON"+v]&&S.addFallback(l,"SHADOWPOISSON"+v),A["SHADOWESM"+v]&&S.addFallback(l,"SHADOWESM"+v),A["SHADOWCLOSEESM"+v]&&S.addFallback(l,"SHADOWCLOSEESM"+v));return h++},T.PrepareAttributesForMorphTargetsInfluencers=function(A,S,g){this._TmpMorphInfluencers.NUM_MORPH_INFLUENCERS=g,this.PrepareAttributesForMorphTargets(A,S,this._TmpMorphInfluencers)},T.PrepareAttributesForMorphTargets=function(A,S,g){var l=g.NUM_MORPH_INFLUENCERS;if(l>0&&R.a.LastCreatedEngine)for(var h=R.a.LastCreatedEngine.getCaps().maxVertexAttribs,v=S.morphTargetManager,E=v&&v.supportsNormals&&g.NORMAL,D=v&&v.supportsTangents&&g.TANGENT,w=v&&v.supportsUVs&&g.UV1,N=0;Nh&&U.a.Error("Cannot add more vertex attributes for mesh "+S.name)},T.PrepareAttributesForBones=function(A,S,g,l){g.NUM_BONE_INFLUENCERS>0&&(l.addCPUSkinningFallback(0,S),A.push(u.b.MatricesIndicesKind),A.push(u.b.MatricesWeightsKind),g.NUM_BONE_INFLUENCERS>4&&(A.push(u.b.MatricesIndicesExtraKind),A.push(u.b.MatricesWeightsExtraKind)))},T.PrepareAttributesForInstances=function(A,S){(S.INSTANCES||S.THIN_INSTANCES)&&this.PushAttributesForInstances(A)},T.PushAttributesForInstances=function(A){A.push("world0"),A.push("world1"),A.push("world2"),A.push("world3")},T.BindLightProperties=function(A,S,g){A.transferToEffect(S,g+"")},T.BindLight=function(A,S,g,l,h,v){v===void 0&&(v=!1),A._bindLight(S,g,l,h,v)},T.BindLights=function(A,S,g,l,h,v){h===void 0&&(h=4),v===void 0&&(v=!1);for(var E=Math.min(S.lightSources.length,h),D=0;D-1){var h=l.getTransformMatrixTexture(A);S.setTexture("boneSampler",h),S.setFloat("boneTextureWidth",4*(l.bones.length+1))}else{var v=l.getTransformMatrices(A);v&&(S.setMatrices("mBones",v),g&&A.getScene().prePassRenderer&&A.getScene().prePassRenderer.getIndex(C.a.PREPASS_VELOCITY_TEXTURE_TYPE)&&(g.previousBones[A.uniqueId]&&S.setMatrices("mPreviousBones",g.previousBones[A.uniqueId]),T._CopyBonesTransformationMatrices(v,g.previousBones[A.uniqueId])))}}},T._CopyBonesTransformationMatrices=function(A,S){return S.set(A),S},T.BindMorphTargetParameters=function(A,S){var g=A.morphTargetManager;A&&g&&S.setFloatArray("morphTargetInfluences",g.influences)},T.BindLogDepth=function(A,S,g){A.LOGARITHMICDEPTH&&S.setFloat("logarithmicDepthConstant",2/(Math.log(g.activeCamera.maxZ+1)/Math.LN2))},T.BindClipPlane=function(A,S){m.a.BindClipPlane(A,S)},T._TmpMorphInfluencers={NUM_MORPH_INFLUENCERS:0},T._tempFogColor=P.a.Black(),T}()},function(Ie,y,f){f.d(y,"a",function(){return C});var U=f(0),_=f(4),R=f(21),u=f(9),M=f(8),C=function(){function P(){}return P.prototype.set=function(m,c){switch(m.length||M.a.Warn("Setting vertex data kind '"+c+"' with an empty array"),c){case _.b.PositionKind:this.positions=m;break;case _.b.NormalKind:this.normals=m;break;case _.b.TangentKind:this.tangents=m;break;case _.b.UVKind:this.uvs=m;break;case _.b.UV2Kind:this.uvs2=m;break;case _.b.UV3Kind:this.uvs3=m;break;case _.b.UV4Kind:this.uvs4=m;break;case _.b.UV5Kind:this.uvs5=m;break;case _.b.UV6Kind:this.uvs6=m;break;case _.b.ColorKind:this.colors=m;break;case _.b.MatricesIndicesKind:this.matricesIndices=m;break;case _.b.MatricesWeightsKind:this.matricesWeights=m;break;case _.b.MatricesIndicesExtraKind:this.matricesIndicesExtra=m;break;case _.b.MatricesWeightsExtraKind:this.matricesWeightsExtra=m}},P.prototype.applyToMesh=function(m,c){return this._applyTo(m,c),this},P.prototype.applyToGeometry=function(m,c){return this._applyTo(m,c),this},P.prototype.updateMesh=function(m){return this._update(m),this},P.prototype.updateGeometry=function(m){return this._update(m),this},P.prototype._applyTo=function(m,c){return c===void 0&&(c=!1),this.positions&&m.setVerticesData(_.b.PositionKind,this.positions,c),this.normals&&m.setVerticesData(_.b.NormalKind,this.normals,c),this.tangents&&m.setVerticesData(_.b.TangentKind,this.tangents,c),this.uvs&&m.setVerticesData(_.b.UVKind,this.uvs,c),this.uvs2&&m.setVerticesData(_.b.UV2Kind,this.uvs2,c),this.uvs3&&m.setVerticesData(_.b.UV3Kind,this.uvs3,c),this.uvs4&&m.setVerticesData(_.b.UV4Kind,this.uvs4,c),this.uvs5&&m.setVerticesData(_.b.UV5Kind,this.uvs5,c),this.uvs6&&m.setVerticesData(_.b.UV6Kind,this.uvs6,c),this.colors&&m.setVerticesData(_.b.ColorKind,this.colors,c),this.matricesIndices&&m.setVerticesData(_.b.MatricesIndicesKind,this.matricesIndices,c),this.matricesWeights&&m.setVerticesData(_.b.MatricesWeightsKind,this.matricesWeights,c),this.matricesIndicesExtra&&m.setVerticesData(_.b.MatricesIndicesExtraKind,this.matricesIndicesExtra,c),this.matricesWeightsExtra&&m.setVerticesData(_.b.MatricesWeightsExtraKind,this.matricesWeightsExtra,c),this.indices?m.setIndices(this.indices,null,c):m.setIndices([],null),this},P.prototype._update=function(m,c,T){return this.positions&&m.updateVerticesData(_.b.PositionKind,this.positions,c,T),this.normals&&m.updateVerticesData(_.b.NormalKind,this.normals,c,T),this.tangents&&m.updateVerticesData(_.b.TangentKind,this.tangents,c,T),this.uvs&&m.updateVerticesData(_.b.UVKind,this.uvs,c,T),this.uvs2&&m.updateVerticesData(_.b.UV2Kind,this.uvs2,c,T),this.uvs3&&m.updateVerticesData(_.b.UV3Kind,this.uvs3,c,T),this.uvs4&&m.updateVerticesData(_.b.UV4Kind,this.uvs4,c,T),this.uvs5&&m.updateVerticesData(_.b.UV5Kind,this.uvs5,c,T),this.uvs6&&m.updateVerticesData(_.b.UV6Kind,this.uvs6,c,T),this.colors&&m.updateVerticesData(_.b.ColorKind,this.colors,c,T),this.matricesIndices&&m.updateVerticesData(_.b.MatricesIndicesKind,this.matricesIndices,c,T),this.matricesWeights&&m.updateVerticesData(_.b.MatricesWeightsKind,this.matricesWeights,c,T),this.matricesIndicesExtra&&m.updateVerticesData(_.b.MatricesIndicesExtraKind,this.matricesIndicesExtra,c,T),this.matricesWeightsExtra&&m.updateVerticesData(_.b.MatricesWeightsExtraKind,this.matricesWeightsExtra,c,T),this.indices&&m.setIndices(this.indices,null),this},P.prototype.transform=function(m){var c,T=m.determinant()<0,A=U.e.Zero();if(this.positions){var S=U.e.Zero();for(c=0;cA.bbSize.y?A.bbSize.x:A.bbSize.y;ct=ct>A.bbSize.z?ct:A.bbSize.z,H=A.subDiv.X*re/A.bbSize.x,Z=A.subDiv.Y*re/A.bbSize.y,W=A.subDiv.Z*re/A.bbSize.z,q=A.subDiv.max*A.subDiv.max,A.facetPartitioning.length=0}for(S=0;Sre.LongPressDelay&&!H._isPointerSwiping()&&(H._startingPointerTime=0,W.processTrigger(I.a.ACTION_OnLongPressTrigger,E.a.CreateNew(_e.pickedMesh,k)))},re.LongPressDelay)}}else for(var q=0,he=Z._pointerDownStage;qre.DragMovementThreshold||Math.abs(this._startingPointerPosition.y-this._pointerY)>re.DragMovementThreshold},re.prototype.simulatePointerUp=function(Y,k,H){var Z=new PointerEvent("pointerup",k),W=new ae;H?W.doubleClick=!0:W.singleClick=!0,this._checkPrePointerObservable(Y,Z,te.a.POINTERUP)||this._processPointerUp(Y,Z,W)},re.prototype._processPointerUp=function(Y,k,H){var Z=this._scene;if(Y&&Y&&Y.pickedMesh){if(this._pickedUpMesh=Y.pickedMesh,this._pickedDownMesh===this._pickedUpMesh&&(Z.onPointerPick&&Z.onPointerPick(k,Y),H.singleClick&&!H.ignore&&Z.onPointerObservable.hasObservers())){var W=te.a.POINTERPICK,q=new te.b(W,k,Y);this._setRayOnPointerInfo(q),Z.onPointerObservable.notifyObservers(q,W)}var he=Y.pickedMesh._getActionManagerForTrigger();if(he&&!H.ignore){he.processTrigger(I.a.ACTION_OnPickUpTrigger,E.a.CreateNew(Y.pickedMesh,k)),!H.hasSwiped&&H.singleClick&&he.processTrigger(I.a.ACTION_OnPickTrigger,E.a.CreateNew(Y.pickedMesh,k));var ge=Y.pickedMesh._getActionManagerForTrigger(I.a.ACTION_OnDoublePickTrigger);H.doubleClick&&ge&&ge.processTrigger(I.a.ACTION_OnDoublePickTrigger,E.a.CreateNew(Y.pickedMesh,k))}}else if(!H.ignore)for(var me=0,_e=Z._pointerUpStage;me<_e.length;me++)Y=_e[me].action(this._unTranslatedPointerX,this._unTranslatedPointerY,Y,k);if(this._pickedDownMesh&&this._pickedDownMesh!==this._pickedUpMesh){var be=this._pickedDownMesh._getActionManagerForTrigger(I.a.ACTION_OnPickOutTrigger);be&&be.processTrigger(I.a.ACTION_OnPickOutTrigger,E.a.CreateNew(this._pickedDownMesh,k))}var Pe=0;Z.onPointerObservable.hasObservers()&&(!H.ignore&&!H.hasSwiped&&(H.singleClick&&Z.onPointerObservable.hasSpecificMask(te.a.POINTERTAP)?Pe=te.a.POINTERTAP:H.doubleClick&&Z.onPointerObservable.hasSpecificMask(te.a.POINTERDOUBLETAP)&&(Pe=te.a.POINTERDOUBLETAP),Pe)&&(q=new te.b(Pe,k,Y),this._setRayOnPointerInfo(q),Z.onPointerObservable.notifyObservers(q,Pe)),H.ignore||(Pe=te.a.POINTERUP,q=new te.b(Pe,k,Y),this._setRayOnPointerInfo(q),Z.onPointerObservable.notifyObservers(q,Pe))),Z.onPointerUp&&!H.ignore&&Z.onPointerUp(k,Y,Pe)},re.prototype.isPointerCaptured=function(Y){return Y===void 0&&(Y=0),this._pointerCaptures[Y]},re.prototype.attachControl=function(Y,k,H,Z){var W=this;Y===void 0&&(Y=!0),k===void 0&&(k=!0),H===void 0&&(H=!0),Z===void 0&&(Z=null);var q=this._scene;if(Z||(Z=q.getEngine().getInputElement()),Z){this._alreadyAttached&&this.detachControl(),this._alreadyAttachedTo=Z;var he=q.getEngine();this._initActionManager=function(be,Pe){if(!W._meshPickProceed){var ye=q.pick(W._unTranslatedPointerX,W._unTranslatedPointerY,q.pointerDownPredicate,!1,q.cameraToUseForPointers);W._currentPickResult=ye,ye&&(be=ye.hit&&ye.pickedMesh?ye.pickedMesh._getActionManagerForTrigger():null),W._meshPickProceed=!0}return be},this._delayedSimpleClick=function(be,Pe,ye){(Date.now()-W._previousStartingPointerTime>re.DoubleClickDelay&&!W._doubleClickOccured||be!==W._previousButtonPressed)&&(W._doubleClickOccured=!1,Pe.singleClick=!0,Pe.ignore=!1,ye(Pe,W._currentPickResult))},this._initClickEvent=function(be,Pe,ye,Be){var ke=new ae;W._currentPickResult=null;var We=null,je=be.hasSpecificMask(te.a.POINTERPICK)||Pe.hasSpecificMask(te.a.POINTERPICK)||be.hasSpecificMask(te.a.POINTERTAP)||Pe.hasSpecificMask(te.a.POINTERTAP)||be.hasSpecificMask(te.a.POINTERDOUBLETAP)||Pe.hasSpecificMask(te.a.POINTERDOUBLETAP);!je&&de.a&&(We=W._initActionManager(We,ke))&&(je=We.hasPickTriggers);var He=!1;if(je){var Qe=ye.button;if(ke.hasSwiped=W._isPointerSwiping(),!ke.hasSwiped){var Ge=!re.ExclusiveDoubleClickMode;Ge||(Ge=!be.hasSpecificMask(te.a.POINTERDOUBLETAP)&&!Pe.hasSpecificMask(te.a.POINTERDOUBLETAP))&&!de.a.HasSpecificTrigger(I.a.ACTION_OnDoublePickTrigger)&&(We=W._initActionManager(We,ke))&&(Ge=!We.hasSpecificTrigger(I.a.ACTION_OnDoublePickTrigger)),Ge?(Date.now()-W._previousStartingPointerTime>re.DoubleClickDelay||Qe!==W._previousButtonPressed)&&(ke.singleClick=!0,Be(ke,W._currentPickResult),He=!0):(W._previousDelayedSimpleClickTimeout=W._delayedSimpleClickTimeout,W._delayedSimpleClickTimeout=window.setTimeout(W._delayedSimpleClick.bind(W,Qe,ke,Be),re.DoubleClickDelay));var nt=be.hasSpecificMask(te.a.POINTERDOUBLETAP)||Pe.hasSpecificMask(te.a.POINTERDOUBLETAP);!nt&&de.a.HasSpecificTrigger(I.a.ACTION_OnDoublePickTrigger)&&(We=W._initActionManager(We,ke))&&(nt=We.hasSpecificTrigger(I.a.ACTION_OnDoublePickTrigger)),nt&&(Qe===W._previousButtonPressed&&Date.now()-W._previousStartingPointerTime0){for(var k=0,H=this._transientComponents;k0)return!1;for(k=0;k0,q=0,he=this._isReadyForMeshStage;q0){for(var ge=0,me=this.activeCameras;ge0},enumerable:!1,configurable:!0}),Y.prototype.executeWhenReady=function(k){var H=this;this.onReadyObservable.add(k),this._executeWhenReadyTimeoutId===-1&&(this._executeWhenReadyTimeoutId=setTimeout(function(){H._checkIsReady()},150))},Y.prototype.whenReadyAsync=function(){var k=this;return new Promise(function(H){k.executeWhenReady(function(){H()})})},Y.prototype._checkIsReady=function(){var k=this;return this._registerTransientComponents(),this.isReady()?(this.onReadyObservable.notifyObservers(this),this.onReadyObservable.clear(),void(this._executeWhenReadyTimeoutId=-1)):this._isDisposed?(this.onReadyObservable.clear(),void(this._executeWhenReadyTimeoutId=-1)):void(this._executeWhenReadyTimeoutId=setTimeout(function(){k._checkIsReady()},150))},Object.defineProperty(Y.prototype,"animatables",{get:function(){return this._activeAnimatables},enumerable:!1,configurable:!0}),Y.prototype.resetLastAnimationTimeFrame=function(){this._animationTimeLast=R.a.Now},Y.prototype.getViewMatrix=function(){return this._viewMatrix},Y.prototype.getProjectionMatrix=function(){return this._projectionMatrix},Y.prototype.getTransformMatrix=function(){return this._transformMatrix},Y.prototype.setTransformMatrix=function(k,H,Z,W){this._viewUpdateFlag===k.updateFlag&&this._projectionUpdateFlag===H.updateFlag||(this._viewUpdateFlag=k.updateFlag,this._projectionUpdateFlag=H.updateFlag,this._viewMatrix=k,this._projectionMatrix=H,this._viewMatrix.multiplyToRef(this._projectionMatrix,this._transformMatrix),this._frustumPlanes?L.a.GetPlanesToRef(this._transformMatrix,this._frustumPlanes):this._frustumPlanes=L.a.GetPlanes(this._transformMatrix),this._multiviewSceneUbo&&this._multiviewSceneUbo.useUbo?this._updateMultiviewUbo(Z,W):this._sceneUbo.useUbo&&(this._sceneUbo.updateMatrix("viewProjection",this._transformMatrix),this._sceneUbo.updateMatrix("view",this._viewMatrix),this._sceneUbo.update()))},Y.prototype.getSceneUniformBuffer=function(){return this._multiviewSceneUbo?this._multiviewSceneUbo:this._sceneUbo},Y.prototype.getUniqueId=function(){return G.a.UniqueId},Y.prototype.addMesh=function(k,H){var Z=this;H===void 0&&(H=!1),this._blockEntityCollection||(this.meshes.push(k),k._resyncLightSources(),k.parent||k._addToSceneRootNodes(),this.onNewMeshAddedObservable.notifyObservers(k),H&&k.getChildMeshes().forEach(function(W){Z.addMesh(W)}))},Y.prototype.removeMesh=function(k,H){var Z=this;H===void 0&&(H=!1);var W=this.meshes.indexOf(k);return W!==-1&&(this.meshes[W]=this.meshes[this.meshes.length-1],this.meshes.pop(),k.parent||k._removeFromSceneRootNodes()),this.onMeshRemovedObservable.notifyObservers(k),H&&k.getChildMeshes().forEach(function(q){Z.removeMesh(q)}),W},Y.prototype.addTransformNode=function(k){this._blockEntityCollection||(k._indexInSceneTransformNodesArray=this.transformNodes.length,this.transformNodes.push(k),k.parent||k._addToSceneRootNodes(),this.onNewTransformNodeAddedObservable.notifyObservers(k))},Y.prototype.removeTransformNode=function(k){var H=k._indexInSceneTransformNodesArray;if(H!==-1){if(H!==this.transformNodes.length-1){var Z=this.transformNodes[this.transformNodes.length-1];this.transformNodes[H]=Z,Z._indexInSceneTransformNodesArray=H}k._indexInSceneTransformNodesArray=-1,this.transformNodes.pop(),k.parent||k._removeFromSceneRootNodes()}return this.onTransformNodeRemovedObservable.notifyObservers(k),H},Y.prototype.removeSkeleton=function(k){var H=this.skeletons.indexOf(k);return H!==-1&&(this.skeletons.splice(H,1),this.onSkeletonRemovedObservable.notifyObservers(k)),H},Y.prototype.removeMorphTargetManager=function(k){var H=this.morphTargetManagers.indexOf(k);return H!==-1&&this.morphTargetManagers.splice(H,1),H},Y.prototype.removeLight=function(k){var H=this.lights.indexOf(k);if(H!==-1){for(var Z=0,W=this.meshes;Z0?this.activeCamera=this.cameras[0]:this.activeCamera=null),this.onCameraRemovedObservable.notifyObservers(k),H},Y.prototype.removeParticleSystem=function(k){var H=this.particleSystems.indexOf(k);return H!==-1&&this.particleSystems.splice(H,1),H},Y.prototype.removeAnimation=function(k){var H=this.animations.indexOf(k);return H!==-1&&this.animations.splice(H,1),H},Y.prototype.stopAnimation=function(k,H,Z){},Y.prototype.removeAnimationGroup=function(k){var H=this.animationGroups.indexOf(k);return H!==-1&&this.animationGroups.splice(H,1),H},Y.prototype.removeMultiMaterial=function(k){var H=this.multiMaterials.indexOf(k);return H!==-1&&this.multiMaterials.splice(H,1),this.onMultiMaterialRemovedObservable.notifyObservers(k),H},Y.prototype.removeMaterial=function(k){var H=k._indexInSceneMaterialArray;if(H!==-1&&H=0;H--)if(this.materials[H].id===k)return this.materials[H];return null},Y.prototype.getMaterialByName=function(k){for(var H=0;H=0;H--)if(this.meshes[H].id===k)return this.meshes[H];return null},Y.prototype.getLastEntryByID=function(k){var H;for(H=this.meshes.length-1;H>=0;H--)if(this.meshes[H].id===k)return this.meshes[H];for(H=this.transformNodes.length-1;H>=0;H--)if(this.transformNodes[H].id===k)return this.transformNodes[H];for(H=this.cameras.length-1;H>=0;H--)if(this.cameras[H].id===k)return this.cameras[H];for(H=this.lights.length-1;H>=0;H--)if(this.lights[H].id===k)return this.lights[H];return null},Y.prototype.getNodeByID=function(k){var H=this.getMeshByID(k);if(H)return H;var Z=this.getTransformNodeByID(k);if(Z)return Z;var W=this.getLightByID(k);if(W)return W;var q=this.getCameraByID(k);if(q)return q;var he=this.getBoneByID(k);return he||null},Y.prototype.getNodeByName=function(k){var H=this.getMeshByName(k);if(H)return H;var Z=this.getTransformNodeByName(k);if(Z)return Z;var W=this.getLightByName(k);if(W)return W;var q=this.getCameraByName(k);if(q)return q;var he=this.getBoneByName(k);return he||null},Y.prototype.getMeshByName=function(k){for(var H=0;H=0;H--)if(this.skeletons[H].id===k)return this.skeletons[H];return null},Y.prototype.getSkeletonByUniqueId=function(k){for(var H=0;H0&&(me.layerMask&this.activeCamera.layerMask)!=0&&(this._skipFrustumClipping||me.alwaysSelectAsActiveMesh||me.isInFrustum(this._frustumPlanes)))){this._activeMeshes.push(me),this.activeCamera._activeMeshes.push(me),_e!==me&&_e._activate(this._renderId,!1);for(var be=0,Pe=this._preActiveMeshStage;be0)for(var Z=this.getActiveSubMeshCandidates(H),W=Z.length,q=0;q1)this.activeCamera.outputRenderTarget._bindFrameBuffer();else{var k=this.activeCamera.outputRenderTarget.getInternalTexture();k?this.getEngine().bindFramebuffer(k):X.a.Error("Camera contains invalid customDefaultRenderTarget")}else this.getEngine().restoreDefaultFramebuffer()},Y.prototype._renderForCamera=function(k,H){if(!k||!k._skipRendering){var Z=this._engine;if(this._activeCamera=k,!this.activeCamera)throw new Error("Active camera not set");Z.setViewport(this.activeCamera.viewport),this.resetCachedMaterial(),this._renderId++,this.getEngine().getCaps().multiview&&k.outputRenderTarget&&k.outputRenderTarget.getViewCount()>1?this.setTransformMatrix(k._rigCameras[0].getViewMatrix(),k._rigCameras[0].getProjectionMatrix(),k._rigCameras[1].getViewMatrix(),k._rigCameras[1].getProjectionMatrix()):this.updateTransformMatrix(),this.onBeforeCameraRenderObservable.notifyObservers(this.activeCamera),this._evaluateActiveMeshes();for(var W=0;W0&&this._renderTargets.concatWithNoDuplicate(k.customRenderTargets),H&&H.customRenderTargets&&H.customRenderTargets.length>0&&this._renderTargets.concatWithNoDuplicate(H.customRenderTargets);for(var he=0,ge=this._gatherActiveCameraRenderTargetsStage;he0){_.b.StartPerformanceCounter("Render targets",this._renderTargets.length>0);for(var _e=0;_e0),this._renderId++}for(var ye=0,Be=this._cameraDrawRenderTargetStage;ye1&&this.getEngine().getCaps().multiview)return this._renderForCamera(k),void this.onAfterRenderCameraObservable.notifyObservers(k);if(k._useMultiviewToSingleView)this._renderMultiviewToSingleView(k);else for(var H=0;H-1&&(W.trigger===I.a.ACTION_OnIntersectionExitTrigger&&W._executeCurrent(E.a.CreateNew(H,void 0,he)),H.actionManager.hasSpecificTrigger(I.a.ACTION_OnIntersectionExitTrigger,function(_e){var be=_e instanceof T.a?_e:_e.mesh;return he===be})&&W.trigger!==I.a.ACTION_OnIntersectionExitTrigger||H._intersectionsInProgress.splice(me,1))}}}},Y.prototype._advancePhysicsEngineStep=function(k){},Y.prototype._animate=function(){},Y.prototype.animate=function(){if(this._engine.isDeterministicLockStep()){var k=Math.max(Y.MinDeltaTime,Math.min(this._engine.getDeltaTime(),Y.MaxDeltaTime))+this._timeAccumulator,H=this._engine.getTimeStep(),Z=1e3/H/1e3,W=0,q=this._engine.getLockstepMaxSteps(),he=Math.floor(k/H);for(he=Math.min(he,q);k>0&&W0)for(var q=0;q0),this._intermediateRendering=!0;for(var be=0;be0),this._intermediateRendering=!1,this._renderId++}this.activeCamera=_e,this._activeCamera&&this._activeCamera.cameraRigMode!==A.a.RIG_MODE_CUSTOM&&!this.prePass&&this._bindFrameBuffer(),this.onAfterRenderTargetsRenderObservable.notifyObservers(this);for(var ye=0,Be=this._beforeClearStage;ye0)for(q=0;q0&&this._engine.clear(null,!1,!0,!0),this._processSubCameras(this.activeCameras[q]);else{if(!this.activeCamera)throw new Error("No camera defined");this._processSubCameras(this.activeCamera)}this._checkIntersections();for(var je=0,He=this._afterRenderStage;je-1&&this._engine.scenes.splice(q,1),this._engine.wipeCaches(!0),this._isDisposed=!0},Object.defineProperty(Y.prototype,"isDisposed",{get:function(){return this._isDisposed},enumerable:!1,configurable:!0}),Y.prototype.clearCachedVertexData=function(){for(var k=0;k-1?(m.a.Error("You're trying to reuse a post process not defined as reusable."),0):(E==null||E<0?this._postProcesses.push(v):this._postProcesses[E]===null?this._postProcesses[E]=v:this._postProcesses.splice(E,0,v),this._cascadePostProcessesToRigCams(),this._scene.prePassRenderer&&this._scene.prePassRenderer.markAsDirty(),this._postProcesses.indexOf(v))},h.prototype.detachPostProcess=function(v){var E=this._postProcesses.indexOf(v);E!==-1&&(this._postProcesses[E]=null),this._scene.prePassRenderer&&this._scene.prePassRenderer.markAsDirty(),this._cascadePostProcessesToRigCams()},h.prototype.getWorldMatrix=function(){return this._isSynchronizedViewMatrix()||this.getViewMatrix(),this._worldMatrix},h.prototype._getViewMatrix=function(){return C.a.Identity()},h.prototype.getViewMatrix=function(v){return!v&&this._isSynchronizedViewMatrix()||(this.updateCache(),this._computedViewMatrix=this._getViewMatrix(),this._currentRenderId=this.getScene().getRenderId(),this._childUpdateId++,this._refreshFrustumPlanes=!0,this._cameraRigParams&&this._cameraRigParams.vrPreViewMatrix&&this._computedViewMatrix.multiplyToRef(this._cameraRigParams.vrPreViewMatrix,this._computedViewMatrix),this.parent&&this.parent.onViewMatrixChangedObservable&&this.parent.onViewMatrixChangedObservable.notifyObservers(this.parent),this.onViewMatrixChangedObservable.notifyObservers(this),this._computedViewMatrix.invertToRef(this._worldMatrix)),this._computedViewMatrix},h.prototype.freezeProjectionMatrix=function(v){this._doNotComputeProjectionMatrix=!0,v!==void 0&&(this._projectionMatrix=v)},h.prototype.unfreezeProjectionMatrix=function(){this._doNotComputeProjectionMatrix=!1},h.prototype.getProjectionMatrix=function(v){var E,D,w,N,I,V,X,j;if(this._doNotComputeProjectionMatrix||!v&&this._isSynchronizedProjectionMatrix())return this._projectionMatrix;this._cache.mode=this.mode,this._cache.minZ=this.minZ,this._cache.maxZ=this.maxZ,this._refreshFrustumPlanes=!0;var ne=this.getEngine(),te=this.getScene();if(this.mode===h.PERSPECTIVE_CAMERA){this._cache.fov=this.fov,this._cache.fovMode=this.fovMode,this._cache.aspectRatio=ne.getAspectRatio(this),this.minZ<=0&&(this.minZ=.1);var de=ne.useReverseDepthBuffer;(te.useRightHandedSystem?de?C.a.PerspectiveFovReverseRHToRef:C.a.PerspectiveFovRHToRef:de?C.a.PerspectiveFovReverseLHToRef:C.a.PerspectiveFovLHToRef)(this.fov,ne.getAspectRatio(this),this.minZ,this.maxZ,this._projectionMatrix,this.fovMode===h.FOVMODE_VERTICAL_FIXED)}else{var pe=ne.getRenderWidth()/2,ae=ne.getRenderHeight()/2;te.useRightHandedSystem?C.a.OrthoOffCenterRHToRef((E=this.orthoLeft)!==null&&E!==void 0?E:-pe,(D=this.orthoRight)!==null&&D!==void 0?D:pe,(w=this.orthoBottom)!==null&&w!==void 0?w:-ae,(N=this.orthoTop)!==null&&N!==void 0?N:ae,this.minZ,this.maxZ,this._projectionMatrix):C.a.OrthoOffCenterLHToRef((I=this.orthoLeft)!==null&&I!==void 0?I:-pe,(V=this.orthoRight)!==null&&V!==void 0?V:pe,(X=this.orthoBottom)!==null&&X!==void 0?X:-ae,(j=this.orthoTop)!==null&&j!==void 0?j:ae,this.minZ,this.maxZ,this._projectionMatrix),this._cache.orthoLeft=this.orthoLeft,this._cache.orthoRight=this.orthoRight,this._cache.orthoBottom=this.orthoBottom,this._cache.orthoTop=this.orthoTop,this._cache.renderWidth=ne.getRenderWidth(),this._cache.renderHeight=ne.getRenderHeight()}return this.onProjectionMatrixChangedObservable.notifyObservers(this),this._projectionMatrix},h.prototype.getTransformationMatrix=function(){return this._computedViewMatrix.multiplyToRef(this._projectionMatrix,this._transformMatrix),this._transformMatrix},h.prototype._updateFrustumPlanes=function(){this._refreshFrustumPlanes&&(this.getTransformationMatrix(),this._frustumPlanes?S.a.GetPlanesToRef(this._transformMatrix,this._frustumPlanes):this._frustumPlanes=S.a.GetPlanes(this._transformMatrix),this._refreshFrustumPlanes=!1)},h.prototype.isInFrustum=function(v,E){if(E===void 0&&(E=!1),this._updateFrustumPlanes(),E&&this.rigCameras.length>0){var D=!1;return this.rigCameras.forEach(function(w){w._updateFrustumPlanes(),D=D||v.isInFrustum(w._frustumPlanes)}),D}return v.isInFrustum(this._frustumPlanes)},h.prototype.isCompletelyInFrustum=function(v){return this._updateFrustumPlanes(),v.isCompletelyInFrustum(this._frustumPlanes)},h.prototype.getForwardRay=function(v,E,D){throw T.a.WarnImport("Ray")},h.prototype.getForwardRayToRef=function(v,E,D,w){throw T.a.WarnImport("Ray")},h.prototype.dispose=function(v,E){for(E===void 0&&(E=!1),this.onViewMatrixChangedObservable.clear(),this.onProjectionMatrixChangedObservable.clear(),this.onAfterCheckInputsObservable.clear(),this.onRestoreStateObservable.clear(),this.inputs&&this.inputs.clear(),this.getScene().stopAnimation(this),this.getScene().removeCamera(this);this._rigCameras.length>0;){var D=this._rigCameras.pop();D&&D.dispose()}if(this._rigPostProcess)this._rigPostProcess.dispose(this),this._rigPostProcess=null,this._postProcesses=[];else if(this.cameraRigMode!==h.RIG_MODE_NONE)this._rigPostProcess=null,this._postProcesses=[];else for(var w=this._postProcesses.length;--w>=0;){var N=this._postProcesses[w];N&&N.dispose(this)}for(w=this.customRenderTargets.length;--w>=0;)this.customRenderTargets[w].dispose();this.customRenderTargets=[],this._activeMeshes.dispose(),l.prototype.dispose.call(this,v,E)},Object.defineProperty(h.prototype,"isLeftCamera",{get:function(){return this._isLeftCamera},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"isRightCamera",{get:function(){return this._isRightCamera},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"leftCamera",{get:function(){return this._rigCameras.length<1?null:this._rigCameras[0]},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"rightCamera",{get:function(){return this._rigCameras.length<2?null:this._rigCameras[1]},enumerable:!1,configurable:!0}),h.prototype.getLeftTarget=function(){return this._rigCameras.length<1?null:this._rigCameras[0].getTarget()},h.prototype.getRightTarget=function(){return this._rigCameras.length<2?null:this._rigCameras[1].getTarget()},h.prototype.setCameraRigMode=function(v,E){if(this.cameraRigMode!==v){for(;this._rigCameras.length>0;){var D=this._rigCameras.pop();D&&D.dispose()}if(this.cameraRigMode=v,this._cameraRigParams={},this._cameraRigParams.interaxialDistance=E.interaxialDistance||.0637,this._cameraRigParams.stereoHalfAngle=u.b.ToRadians(this._cameraRigParams.interaxialDistance/.0637),this.cameraRigMode!==h.RIG_MODE_NONE){var w=this.createRigCamera(this.name+"_L",0);w&&(w._isLeftCamera=!0);var N=this.createRigCamera(this.name+"_R",1);N&&(N._isRightCamera=!0),w&&N&&(this._rigCameras.push(w),this._rigCameras.push(N))}switch(this.cameraRigMode){case h.RIG_MODE_STEREOSCOPIC_ANAGLYPH:h._setStereoscopicAnaglyphRigMode(this);break;case h.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:case h.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED:case h.RIG_MODE_STEREOSCOPIC_OVERUNDER:case h.RIG_MODE_STEREOSCOPIC_INTERLACED:h._setStereoscopicRigMode(this);break;case h.RIG_MODE_VR:h._setVRRigMode(this,E);break;case h.RIG_MODE_WEBVR:h._setWebVRRigMode(this,E)}this._cascadePostProcessesToRigCams(),this.update()}},h._setStereoscopicRigMode=function(v){throw"Import Cameras/RigModes/stereoscopicRigMode before using stereoscopic rig mode"},h._setStereoscopicAnaglyphRigMode=function(v){throw"Import Cameras/RigModes/stereoscopicAnaglyphRigMode before using stereoscopic anaglyph rig mode"},h._setVRRigMode=function(v,E){throw"Import Cameras/RigModes/vrRigMode before using VR rig mode"},h._setWebVRRigMode=function(v,E){throw"Import Cameras/RigModes/WebVRRigMode before using Web VR rig mode"},h.prototype._getVRProjectionMatrix=function(){return C.a.PerspectiveFovLHToRef(this._cameraRigParams.vrMetrics.aspectRatioFov,this._cameraRigParams.vrMetrics.aspectRatio,this.minZ,this.maxZ,this._cameraRigParams.vrWorkMatrix),this._cameraRigParams.vrWorkMatrix.multiplyToRef(this._cameraRigParams.vrHMatrix,this._projectionMatrix),this._projectionMatrix},h.prototype._updateCameraRotationMatrix=function(){},h.prototype._updateWebVRCameraRotationMatrix=function(){},h.prototype._getWebVRProjectionMatrix=function(){return C.a.Identity()},h.prototype._getWebVRViewMatrix=function(){return C.a.Identity()},h.prototype.setCameraRigParameter=function(v,E){this._cameraRigParams||(this._cameraRigParams={}),this._cameraRigParams[v]=E,v==="interaxialDistance"&&(this._cameraRigParams.stereoHalfAngle=u.b.ToRadians(E/.0637))},h.prototype.createRigCamera=function(v,E){return null},h.prototype._updateRigCameras=function(){for(var v=0;v=1)&&(this.needAlphaBlending()||g.visibility<1||g.hasVertexAlpha)},S.prototype.needAlphaTesting=function(){return!!this._forceAlphaTest},S.prototype._shouldTurnAlphaTestOn=function(g){return!this.needAlphaBlendingForMesh(g)&&this.needAlphaTesting()},S.prototype.getAlphaTestTexture=function(){return null},S.prototype.markDirty=function(){for(var g=0,l=this.getScene().meshes;g1&&be.renderbufferStorageMultisample?be.renderbufferStorageMultisample(be.RENDERBUFFER,he,me,W,q):be.renderbufferStorage(be.RENDERBUFFER,ge,W,q),be.framebufferRenderbuffer(be.FRAMEBUFFER,_e,be.RENDERBUFFER,Pe),be.bindRenderbuffer(be.RENDERBUFFER,null),Pe},this._boundUniforms={};var te=null;if(I){if(X=X||{},E.a.SetMatrixPrecision(!!X.useHighPrecisionMatrix),I.getContext){if(te=I,this._renderingCanvas=te,V!=null&&(X.antialias=V),X.deterministicLockstep===void 0&&(X.deterministicLockstep=!1),X.lockstepMaxSteps===void 0&&(X.lockstepMaxSteps=4),X.timeStep===void 0&&(X.timeStep=1/60),X.preserveDrawingBuffer===void 0&&(X.preserveDrawingBuffer=!1),X.audioEngine===void 0&&(X.audioEngine=!0),X.stencil===void 0&&(X.stencil=!0),X.premultipliedAlpha===!1&&(this.premultipliedAlpha=!1),X.xrCompatible===void 0&&(X.xrCompatible=!0),this._doNotHandleContextLost=!!X.doNotHandleContextLost,navigator&&navigator.userAgent){var de=navigator.userAgent;this.hostInformation.isMobile=de.indexOf("Mobile")!==-1;for(var pe=0,ae=N.ExceptionList;pe0&&parseInt(Q[Q.length-1])>=G)continue}for(var oe=0,re=$;oe1?this._shaderProcessor=new g.a:this._shaderProcessor=new S,this._badOS=/iPad/i.test(navigator.userAgent)||/iPhone/i.test(navigator.userAgent),this._badDesktopOS=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),this._creationOptions=X,console.log("Babylon.js v"+N.Version+" - "+this.description)}}return Object.defineProperty(N,"NpmPackage",{get:function(){return"babylonjs@4.2.2"},enumerable:!1,configurable:!0}),Object.defineProperty(N,"Version",{get:function(){return"4.2.2"},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"description",{get:function(){var I="WebGL"+this.webGLVersion;return this._caps.parallelShaderCompile&&(I+=" - Parallel shader compilation"),I},enumerable:!1,configurable:!0}),Object.defineProperty(N,"ShadersRepository",{get:function(){return _.a.ShadersRepository},set:function(I){_.a.ShadersRepository=I},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"supportsUniformBuffers",{get:function(){return this.webGLVersion>1&&!this.disableUniformBuffers},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"_shouldUseHighPrecisionShader",{get:function(){return!(!this._caps.highPrecisionShaderSupported||!this._highPrecisionShadersAllowed)},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"needPOTTextures",{get:function(){return this._webGLVersion<2||this.forcePOTTextures},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"doNotHandleContextLost",{get:function(){return this._doNotHandleContextLost},set:function(I){this._doNotHandleContextLost=I},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"_supportsHardwareTextureRescaling",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"framebufferDimensionsObject",{set:function(I){this._framebufferDimensionsObject=I},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"currentViewport",{get:function(){return this._cachedViewport},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"emptyTexture",{get:function(){return this._emptyTexture||(this._emptyTexture=this.createRawTexture(new Uint8Array(4),1,1,m.a.TEXTUREFORMAT_RGBA,!1,!1,m.a.TEXTURE_NEAREST_SAMPLINGMODE)),this._emptyTexture},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"emptyTexture3D",{get:function(){return this._emptyTexture3D||(this._emptyTexture3D=this.createRawTexture3D(new Uint8Array(4),1,1,1,m.a.TEXTUREFORMAT_RGBA,!1,!1,m.a.TEXTURE_NEAREST_SAMPLINGMODE)),this._emptyTexture3D},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"emptyTexture2DArray",{get:function(){return this._emptyTexture2DArray||(this._emptyTexture2DArray=this.createRawTexture2DArray(new Uint8Array(4),1,1,1,m.a.TEXTUREFORMAT_RGBA,!1,!1,m.a.TEXTURE_NEAREST_SAMPLINGMODE)),this._emptyTexture2DArray},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"emptyCubeTexture",{get:function(){if(!this._emptyCubeTexture){var I=new Uint8Array(4),V=[I,I,I,I,I,I];this._emptyCubeTexture=this.createRawCubeTexture(V,1,m.a.TEXTUREFORMAT_RGBA,m.a.TEXTURETYPE_UNSIGNED_INT,!1,!1,m.a.TEXTURE_NEAREST_SAMPLINGMODE)}return this._emptyCubeTexture},enumerable:!1,configurable:!0}),N.prototype._rebuildInternalTextures=function(){for(var I=0,V=this._internalTexturesCache.slice();I1?this._gl.getParameter(this._gl.MAX_SAMPLES):1,maxCubemapTextureSize:this._gl.getParameter(this._gl.MAX_CUBE_MAP_TEXTURE_SIZE),maxRenderTextureSize:this._gl.getParameter(this._gl.MAX_RENDERBUFFER_SIZE),maxVertexAttribs:this._gl.getParameter(this._gl.MAX_VERTEX_ATTRIBS),maxVaryingVectors:this._gl.getParameter(this._gl.MAX_VARYING_VECTORS),maxFragmentUniformVectors:this._gl.getParameter(this._gl.MAX_FRAGMENT_UNIFORM_VECTORS),maxVertexUniformVectors:this._gl.getParameter(this._gl.MAX_VERTEX_UNIFORM_VECTORS),parallelShaderCompile:this._gl.getExtension("KHR_parallel_shader_compile"),standardDerivatives:this._webGLVersion>1||this._gl.getExtension("OES_standard_derivatives")!==null,maxAnisotropy:1,astc:this._gl.getExtension("WEBGL_compressed_texture_astc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_astc"),bptc:this._gl.getExtension("EXT_texture_compression_bptc")||this._gl.getExtension("WEBKIT_EXT_texture_compression_bptc"),s3tc:this._gl.getExtension("WEBGL_compressed_texture_s3tc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc"),pvrtc:this._gl.getExtension("WEBGL_compressed_texture_pvrtc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),etc1:this._gl.getExtension("WEBGL_compressed_texture_etc1")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_etc1"),etc2:this._gl.getExtension("WEBGL_compressed_texture_etc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_etc")||this._gl.getExtension("WEBGL_compressed_texture_es3_0"),textureAnisotropicFilterExtension:this._gl.getExtension("EXT_texture_filter_anisotropic")||this._gl.getExtension("WEBKIT_EXT_texture_filter_anisotropic")||this._gl.getExtension("MOZ_EXT_texture_filter_anisotropic"),uintIndices:this._webGLVersion>1||this._gl.getExtension("OES_element_index_uint")!==null,fragmentDepthSupported:this._webGLVersion>1||this._gl.getExtension("EXT_frag_depth")!==null,highPrecisionShaderSupported:!1,timerQuery:this._gl.getExtension("EXT_disjoint_timer_query_webgl2")||this._gl.getExtension("EXT_disjoint_timer_query"),canUseTimestampForTimerQuery:!1,drawBuffersExtension:!1,maxMSAASamples:1,colorBufferFloat:this._webGLVersion>1&&this._gl.getExtension("EXT_color_buffer_float"),textureFloat:!!(this._webGLVersion>1||this._gl.getExtension("OES_texture_float")),textureHalfFloat:!!(this._webGLVersion>1||this._gl.getExtension("OES_texture_half_float")),textureHalfFloatRender:!1,textureFloatLinearFiltering:!1,textureFloatRender:!1,textureHalfFloatLinearFiltering:!1,vertexArrayObject:!1,instancedArrays:!1,textureLOD:!!(this._webGLVersion>1||this._gl.getExtension("EXT_shader_texture_lod")),blendMinMax:!1,multiview:this._gl.getExtension("OVR_multiview2"),oculusMultiview:this._gl.getExtension("OCULUS_multiview"),depthTextureExtension:!1},this._glVersion=this._gl.getParameter(this._gl.VERSION);var I=this._gl.getExtension("WEBGL_debug_renderer_info");if(I!=null&&(this._glRenderer=this._gl.getParameter(I.UNMASKED_RENDERER_WEBGL),this._glVendor=this._gl.getParameter(I.UNMASKED_VENDOR_WEBGL)),this._glVendor||(this._glVendor="Unknown vendor"),this._glRenderer||(this._glRenderer="Unknown renderer"),this._gl.HALF_FLOAT_OES!==36193&&(this._gl.HALF_FLOAT_OES=36193),this._gl.RGBA16F!==34842&&(this._gl.RGBA16F=34842),this._gl.RGBA32F!==34836&&(this._gl.RGBA32F=34836),this._gl.DEPTH24_STENCIL8!==35056&&(this._gl.DEPTH24_STENCIL8=35056),this._caps.timerQuery&&(this._webGLVersion===1&&(this._gl.getQuery=this._caps.timerQuery.getQueryEXT.bind(this._caps.timerQuery)),this._caps.canUseTimestampForTimerQuery=this._gl.getQuery(this._caps.timerQuery.TIMESTAMP_EXT,this._caps.timerQuery.QUERY_COUNTER_BITS_EXT)>0),this._caps.maxAnisotropy=this._caps.textureAnisotropicFilterExtension?this._gl.getParameter(this._caps.textureAnisotropicFilterExtension.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0,this._caps.textureFloatLinearFiltering=!(!this._caps.textureFloat||!this._gl.getExtension("OES_texture_float_linear")),this._caps.textureFloatRender=!(!this._caps.textureFloat||!this._canRenderToFloatFramebuffer()),this._caps.textureHalfFloatLinearFiltering=!!(this._webGLVersion>1||this._caps.textureHalfFloat&&this._gl.getExtension("OES_texture_half_float_linear")),this._webGLVersion>1&&this._gl.HALF_FLOAT_OES!==5131&&(this._gl.HALF_FLOAT_OES=5131),this._caps.textureHalfFloatRender=this._caps.textureHalfFloat&&this._canRenderToHalfFloatFramebuffer(),this._webGLVersion>1)this._caps.drawBuffersExtension=!0,this._caps.maxMSAASamples=this._gl.getParameter(this._gl.MAX_SAMPLES);else{var V=this._gl.getExtension("WEBGL_draw_buffers");if(V!==null){this._caps.drawBuffersExtension=!0,this._gl.drawBuffers=V.drawBuffersWEBGL.bind(V),this._gl.DRAW_FRAMEBUFFER=this._gl.FRAMEBUFFER;for(var X=0;X<16;X++)this._gl["COLOR_ATTACHMENT"+X+"_WEBGL"]=V["COLOR_ATTACHMENT"+X+"_WEBGL"]}}if(this._webGLVersion>1)this._caps.depthTextureExtension=!0;else{var j=this._gl.getExtension("WEBGL_depth_texture");j!=null&&(this._caps.depthTextureExtension=!0,this._gl.UNSIGNED_INT_24_8=j.UNSIGNED_INT_24_8_WEBGL)}if(this.disableVertexArrayObjects)this._caps.vertexArrayObject=!1;else if(this._webGLVersion>1)this._caps.vertexArrayObject=!0;else{var ne=this._gl.getExtension("OES_vertex_array_object");ne!=null&&(this._caps.vertexArrayObject=!0,this._gl.createVertexArray=ne.createVertexArrayOES.bind(ne),this._gl.bindVertexArray=ne.bindVertexArrayOES.bind(ne),this._gl.deleteVertexArray=ne.deleteVertexArrayOES.bind(ne))}if(this._webGLVersion>1)this._caps.instancedArrays=!0;else{var te=this._gl.getExtension("ANGLE_instanced_arrays");te!=null?(this._caps.instancedArrays=!0,this._gl.drawArraysInstanced=te.drawArraysInstancedANGLE.bind(te),this._gl.drawElementsInstanced=te.drawElementsInstancedANGLE.bind(te),this._gl.vertexAttribDivisor=te.vertexAttribDivisorANGLE.bind(te)):this._caps.instancedArrays=!1}if(this._gl.getShaderPrecisionFormat){var de=this._gl.getShaderPrecisionFormat(this._gl.VERTEX_SHADER,this._gl.HIGH_FLOAT),pe=this._gl.getShaderPrecisionFormat(this._gl.FRAGMENT_SHADER,this._gl.HIGH_FLOAT);de&&pe&&(this._caps.highPrecisionShaderSupported=de.precision!==0&&pe.precision!==0)}if(this._webGLVersion>1)this._caps.blendMinMax=!0;else{var ae=this._gl.getExtension("EXT_blend_minmax");ae!=null&&(this._caps.blendMinMax=!0,this._gl.MAX=ae.MAX_EXT,this._gl.MIN=ae.MIN_EXT)}this._depthCullingState.depthTest=!0,this._depthCullingState.depthFunc=this._gl.LEQUAL,this._depthCullingState.depthMask=!0,this._maxSimultaneousTextures=this._caps.maxCombinedTexturesImageUnits;for(var ee=0;ee=0&&this._activeRenderLoops.splice(V,1)}else this._activeRenderLoops=[]},N.prototype._renderLoop=function(){if(!this._contextWasLost){var I=!0;if(!this.renderEvenInBackground&&this._windowIsBackground&&(I=!1),I){this.beginFrame();for(var V=0;V0?this._frameHandler=this._queueNewFrame(this._boundRenderFunction,this.getHostWindow()):this._renderingQueueLaunched=!1},N.prototype.getRenderingCanvas=function(){return this._renderingCanvas},N.prototype.getHostWindow=function(){return A.a.IsWindowObjectExist()?this._renderingCanvas&&this._renderingCanvas.ownerDocument&&this._renderingCanvas.ownerDocument.defaultView?this._renderingCanvas.ownerDocument.defaultView:window:null},N.prototype.getRenderWidth=function(I){return I===void 0&&(I=!1),!I&&this._currentRenderTarget?this._currentRenderTarget.width:this._framebufferDimensionsObject?this._framebufferDimensionsObject.framebufferWidth:this._gl.drawingBufferWidth},N.prototype.getRenderHeight=function(I){return I===void 0&&(I=!1),!I&&this._currentRenderTarget?this._currentRenderTarget.height:this._framebufferDimensionsObject?this._framebufferDimensionsObject.framebufferHeight:this._gl.drawingBufferHeight},N.prototype._queueNewFrame=function(I,V){return N.QueueNewFrame(I,V)},N.prototype.runRenderLoop=function(I){this._activeRenderLoops.indexOf(I)===-1&&(this._activeRenderLoops.push(I),this._renderingQueueLaunched||(this._renderingQueueLaunched=!0,this._boundRenderFunction=this._renderLoop.bind(this),this._frameHandler=this._queueNewFrame(this._boundRenderFunction,this.getHostWindow())))},N.prototype.clear=function(I,V,X,j){j===void 0&&(j=!1),this.applyStates();var ne=0;V&&I&&(this._gl.clearColor(I.r,I.g,I.b,I.a!==void 0?I.a:1),ne|=this._gl.COLOR_BUFFER_BIT),X&&(this.useReverseDepthBuffer?(this._depthCullingState.depthFunc=this._gl.GREATER,this._gl.clearDepth(0)):this._gl.clearDepth(1),ne|=this._gl.DEPTH_BUFFER_BIT),j&&(this._gl.clearStencil(0),ne|=this._gl.STENCIL_BUFFER_BIT),this._gl.clear(ne)},N.prototype._viewport=function(I,V,X,j){I===this._viewportCached.x&&V===this._viewportCached.y&&X===this._viewportCached.z&&j===this._viewportCached.w||(this._viewportCached.x=I,this._viewportCached.y=V,this._viewportCached.z=X,this._viewportCached.w=j,this._gl.viewport(I,V,X,j))},N.prototype.setViewport=function(I,V,X){var j=V||this.getRenderWidth(),ne=X||this.getRenderHeight(),te=I.x||0,de=I.y||0;this._cachedViewport=I,this._viewport(te*j,de*ne,j*I.width,ne*I.height)},N.prototype.beginFrame=function(){},N.prototype.endFrame=function(){this._badOS&&this.flushFramebuffer()},N.prototype.resize=function(){var I,V;A.a.IsWindowObjectExist()?(I=this._renderingCanvas?this._renderingCanvas.clientWidth||this._renderingCanvas.width:window.innerWidth,V=this._renderingCanvas?this._renderingCanvas.clientHeight||this._renderingCanvas.height:window.innerHeight):(I=this._renderingCanvas?this._renderingCanvas.width:100,V=this._renderingCanvas?this._renderingCanvas.height:100),this.setSize(I/this._hardwareScalingLevel,V/this._hardwareScalingLevel)},N.prototype.setSize=function(I,V){return!!this._renderingCanvas&&(I|=0,V|=0,(this._renderingCanvas.width!==I||this._renderingCanvas.height!==V)&&(this._renderingCanvas.width=I,this._renderingCanvas.height=V,!0))},N.prototype.bindFramebuffer=function(I,V,X,j,ne,te,de){V===void 0&&(V=0),te===void 0&&(te=0),de===void 0&&(de=0),this._currentRenderTarget&&this.unBindFramebuffer(this._currentRenderTarget),this._currentRenderTarget=I,this._bindUnboundFramebuffer(I._MSAAFramebuffer?I._MSAAFramebuffer:I._framebuffer);var pe=this._gl;I.is2DArray?pe.framebufferTextureLayer(pe.FRAMEBUFFER,pe.COLOR_ATTACHMENT0,I._webGLTexture,te,de):I.isCube&&pe.framebufferTexture2D(pe.FRAMEBUFFER,pe.COLOR_ATTACHMENT0,pe.TEXTURE_CUBE_MAP_POSITIVE_X+V,I._webGLTexture,te);var ae=I._depthStencilTexture;if(ae){var ee=ae._generateStencilBuffer?pe.DEPTH_STENCIL_ATTACHMENT:pe.DEPTH_ATTACHMENT;I.is2DArray?pe.framebufferTextureLayer(pe.FRAMEBUFFER,ee,ae._webGLTexture,te,de):I.isCube?pe.framebufferTexture2D(pe.FRAMEBUFFER,ee,pe.TEXTURE_CUBE_MAP_POSITIVE_X+V,ae._webGLTexture,te):pe.framebufferTexture2D(pe.FRAMEBUFFER,ee,pe.TEXTURE_2D,ae._webGLTexture,te)}this._cachedViewport&&!ne?this.setViewport(this._cachedViewport,X,j):(X||(X=I.width,te&&(X/=Math.pow(2,te))),j||(j=I.height,te&&(j/=Math.pow(2,te))),this._viewport(0,0,X,j)),this.wipeCaches()},N.prototype._bindUnboundFramebuffer=function(I){this._currentFramebuffer!==I&&(this._gl.bindFramebuffer(this._gl.FRAMEBUFFER,I),this._currentFramebuffer=I)},N.prototype.unBindFramebuffer=function(I,V,X){V===void 0&&(V=!1),this._currentRenderTarget=null;var j=this._gl;if(I._MSAAFramebuffer){if(I._textureArray)return void this.unBindMultiColorAttachmentFramebuffer(I._textureArray,V,X);j.bindFramebuffer(j.READ_FRAMEBUFFER,I._MSAAFramebuffer),j.bindFramebuffer(j.DRAW_FRAMEBUFFER,I._framebuffer),j.blitFramebuffer(0,0,I.width,I.height,0,0,I.width,I.height,j.COLOR_BUFFER_BIT,j.NEAREST)}!I.generateMipMaps||V||I.isCube||(this._bindTextureDirectly(j.TEXTURE_2D,I,!0),j.generateMipmap(j.TEXTURE_2D),this._bindTextureDirectly(j.TEXTURE_2D,null)),X&&(I._MSAAFramebuffer&&this._bindUnboundFramebuffer(I._framebuffer),X()),this._bindUnboundFramebuffer(null)},N.prototype.flushFramebuffer=function(){this._gl.flush()},N.prototype.restoreDefaultFramebuffer=function(){this._currentRenderTarget?this.unBindFramebuffer(this._currentRenderTarget):this._bindUnboundFramebuffer(null),this._cachedViewport&&this.setViewport(this._cachedViewport),this.wipeCaches()},N.prototype._resetVertexBufferBinding=function(){this.bindArrayBuffer(null),this._cachedVertexBuffers=null},N.prototype.createVertexBuffer=function(I){return this._createVertexBuffer(I,this._gl.STATIC_DRAW)},N.prototype._createVertexBuffer=function(I,V){var X=this._gl.createBuffer();if(!X)throw new Error("Unable to create vertex buffer");var j=new l.a(X);return this.bindArrayBuffer(j),I instanceof Array?this._gl.bufferData(this._gl.ARRAY_BUFFER,new Float32Array(I),this._gl.STATIC_DRAW):this._gl.bufferData(this._gl.ARRAY_BUFFER,I,this._gl.STATIC_DRAW),this._resetVertexBufferBinding(),j.references=1,j},N.prototype.createDynamicVertexBuffer=function(I){return this._createVertexBuffer(I,this._gl.DYNAMIC_DRAW)},N.prototype._resetIndexBufferBinding=function(){this.bindIndexBuffer(null),this._cachedIndexBuffer=null},N.prototype.createIndexBuffer=function(I,V){var X=this._gl.createBuffer(),j=new l.a(X);if(!X)throw new Error("Unable to create index buffer");this.bindIndexBuffer(j);var ne=this._normalizeIndexData(I);return this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER,ne,V?this._gl.DYNAMIC_DRAW:this._gl.STATIC_DRAW),this._resetIndexBufferBinding(),j.references=1,j.is32Bits=ne.BYTES_PER_ELEMENT===4,j},N.prototype._normalizeIndexData=function(I){if(I instanceof Uint16Array)return I;if(this._caps.uintIndices){if(I instanceof Uint32Array)return I;for(var V=0;V=65535)return new Uint32Array(I);return new Uint16Array(I)}return new Uint16Array(I)},N.prototype.bindArrayBuffer=function(I){this._vaoRecordInProgress||this._unbindVertexArrayObject(),this.bindBuffer(I,this._gl.ARRAY_BUFFER)},N.prototype.bindUniformBlock=function(I,V,X){var j=I.program,ne=this._gl.getUniformBlockIndex(j,V);this._gl.uniformBlockBinding(j,ne,X)},N.prototype.bindIndexBuffer=function(I){this._vaoRecordInProgress||this._unbindVertexArrayObject(),this.bindBuffer(I,this._gl.ELEMENT_ARRAY_BUFFER)},N.prototype.bindBuffer=function(I,V){(this._vaoRecordInProgress||this._currentBoundBuffer[V]!==I)&&(this._gl.bindBuffer(V,I?I.underlyingResource:null),this._currentBoundBuffer[V]=I)},N.prototype.updateArrayBuffer=function(I){this._gl.bufferSubData(this._gl.ARRAY_BUFFER,0,I)},N.prototype._vertexAttribPointer=function(I,V,X,j,ne,te,de){var pe=this._currentBufferPointers[V];if(pe){var ae=!1;pe.active?(pe.buffer!==I&&(pe.buffer=I,ae=!0),pe.size!==X&&(pe.size=X,ae=!0),pe.type!==j&&(pe.type=j,ae=!0),pe.normalized!==ne&&(pe.normalized=ne,ae=!0),pe.stride!==te&&(pe.stride=te,ae=!0),pe.offset!==de&&(pe.offset=de,ae=!0)):(ae=!0,pe.active=!0,pe.index=V,pe.size=X,pe.type=j,pe.normalized=ne,pe.stride=te,pe.offset=de,pe.buffer=I),(ae||this._vaoRecordInProgress)&&(this.bindArrayBuffer(I),this._gl.vertexAttribPointer(V,X,j,ne,te,de))}},N.prototype._bindIndexBufferWithCache=function(I){I!=null&&this._cachedIndexBuffer!==I&&(this._cachedIndexBuffer=I,this.bindIndexBuffer(I),this._uintIndicesCurrentlySet=I.is32Bits)},N.prototype._bindVertexBuffersAttributes=function(I,V){var X=V.getAttributesNames();this._vaoRecordInProgress||this._unbindVertexArrayObject(),this.unbindAllAttributes();for(var j=0;j=0){var te=I[X[j]];if(!te)continue;this._gl.enableVertexAttribArray(ne),this._vaoRecordInProgress||(this._vertexAttribArraysEnabled[ne]=!0);var de=te.getBuffer();de&&(this._vertexAttribPointer(de,ne,te.getSize(),te.type,te.normalized,te.byteStride,te.byteOffset),te.getIsInstanced()&&(this._gl.vertexAttribDivisor(ne,te.getInstanceDivisor()),this._vaoRecordInProgress||(this._currentInstanceLocations.push(ne),this._currentInstanceBuffers.push(de))))}}},N.prototype.recordVertexArrayObject=function(I,V,X){var j=this._gl.createVertexArray();return this._vaoRecordInProgress=!0,this._gl.bindVertexArray(j),this._mustWipeVertexAttributes=!0,this._bindVertexBuffersAttributes(I,X),this.bindIndexBuffer(V),this._vaoRecordInProgress=!1,this._gl.bindVertexArray(null),j},N.prototype.bindVertexArrayObject=function(I,V){this._cachedVertexArrayObject!==I&&(this._cachedVertexArrayObject=I,this._gl.bindVertexArray(I),this._cachedVertexBuffers=null,this._cachedIndexBuffer=null,this._uintIndicesCurrentlySet=V!=null&&V.is32Bits,this._mustWipeVertexAttributes=!0)},N.prototype.bindBuffersDirectly=function(I,V,X,j,ne){if(this._cachedVertexBuffers!==I||this._cachedEffectForVertexBuffers!==ne){this._cachedVertexBuffers=I,this._cachedEffectForVertexBuffers=ne;var te=ne.getAttributesCount();this._unbindVertexArrayObject(),this.unbindAllAttributes();for(var de=0,pe=0;pe=0&&(this._gl.enableVertexAttribArray(ae),this._vertexAttribArraysEnabled[ae]=!0,this._vertexAttribPointer(I,ae,X[pe],this._gl.FLOAT,!1,j,de)),de+=4*X[pe]}}this._bindIndexBufferWithCache(V)},N.prototype._unbindVertexArrayObject=function(){this._cachedVertexArrayObject&&(this._cachedVertexArrayObject=null,this._gl.bindVertexArray(null))},N.prototype.bindBuffers=function(I,V,X){this._cachedVertexBuffers===I&&this._cachedEffectForVertexBuffers===X||(this._cachedVertexBuffers=I,this._cachedEffectForVertexBuffers=X,this._bindVertexBuffersAttributes(I,X)),this._bindIndexBufferWithCache(V)},N.prototype.unbindInstanceAttributes=function(){for(var I,V=0,X=this._currentInstanceLocations.length;V1?`#version 300 es +#define WEBGL2 +`:"",pe=this._compileShader(V,"vertex",j,de),ae=this._compileShader(X,"fragment",j,de);return this._createShaderProgram(I,pe,ae,ne,te)},N.prototype.createPipelineContext=function(){var I=new h.a;return I.engine=this,this._caps.parallelShaderCompile&&(I.isParallelCompiled=!0),I},N.prototype._createShaderProgram=function(I,V,X,j,ne){var te=j.createProgram();if(I.program=te,!te)throw new Error("Unable to create program");return j.attachShader(te,V),j.attachShader(te,X),j.linkProgram(te),I.context=j,I.vertexShader=V,I.fragmentShader=X,I.isParallelCompiled||this._finalizePipelineContext(I),te},N.prototype._finalizePipelineContext=function(I){var V=I.context,X=I.vertexShader,j=I.fragmentShader,ne=I.program;if(!V.getProgramParameter(ne,V.LINK_STATUS)){var te,de;if(!this._gl.getShaderParameter(X,this._gl.COMPILE_STATUS)&&(te=this._gl.getShaderInfoLog(X)))throw I.vertexCompilationError=te,new Error("VERTEX SHADER "+te);if(!this._gl.getShaderParameter(j,this._gl.COMPILE_STATUS)&&(te=this._gl.getShaderInfoLog(j)))throw I.fragmentCompilationError=te,new Error("FRAGMENT SHADER "+te);if(de=V.getProgramInfoLog(ne))throw I.programLinkError=de,new Error(de)}if(this.validateShaderPrograms&&(V.validateProgram(ne),!V.getProgramParameter(ne,V.VALIDATE_STATUS)&&(de=V.getProgramInfoLog(ne))))throw I.programValidationError=de,new Error(de);V.deleteShader(X),V.deleteShader(j),I.vertexShader=void 0,I.fragmentShader=void 0,I.onCompiled&&(I.onCompiled(),I.onCompiled=void 0)},N.prototype._preparePipelineContext=function(I,V,X,j,ne,te,de){var pe=I;pe.program=j?this.createRawShaderProgram(pe,V,X,void 0,de):this.createShaderProgram(pe,V,X,te,void 0,de),pe.program.__SPECTOR_rebuildProgram=ne},N.prototype._isRenderingStateCompiled=function(I){var V=I;return!!this._gl.getProgramParameter(V.program,this._caps.parallelShaderCompile.COMPLETION_STATUS_KHR)&&(this._finalizePipelineContext(V),!0)},N.prototype._executeWhenRenderingStateIsCompiled=function(I,V){var X=I;if(X.isParallelCompiled){var j=X.onCompiled;X.onCompiled=j?function(){j(),V()}:V}else V()},N.prototype.getUniforms=function(I,V){for(var X=new Array,j=I,ne=0;ne-1?I.substring(H).toLowerCase():""),W=null;Z.indexOf("?")>-1&&(Z=Z.split("?")[0]);for(var q=0,he=N._TextureLoaders;qGe||ye.height>Ge||!G._supportsHardwareTextureRescaling)return G._prepareWorkingCanvas(),!(!G._workingCanvas||!G._workingContext)&&(G._workingCanvas.width=Be,G._workingCanvas.height=ke,G._workingContext.drawImage(ye,0,0,ye.width,ye.height,0,0,Be,ke),je.texImage2D(je.TEXTURE_2D,0,Qe,Qe,je.UNSIGNED_BYTE,G._workingCanvas),Y.width=Be,Y.height=ke,!1);var nt=new c.a(G,c.b.Temp);return G._bindTextureDirectly(je.TEXTURE_2D,nt,!0),je.texImage2D(je.TEXTURE_2D,0,Qe,Qe,je.UNSIGNED_BYTE,ye),G._rescaleTexture(nt,Y,j,Qe,function(){G._releaseTexture(nt),G._bindTextureDirectly(je.TEXTURE_2D,Y,!0),We()}),!0},ne)};!Q||re?pe&&(pe.decoding||pe.close)?Pe(pe):N._FileToolsLoadImage(I,Pe,_e,j?j.offlineProvider:null,$):typeof pe=="string"||pe instanceof ArrayBuffer||ArrayBuffer.isView(pe)||pe instanceof Blob?N._FileToolsLoadImage(pe,Pe,_e,j?j.offlineProvider:null,$):pe&&Pe(pe)}return Y},N._FileToolsLoadImage=function(I,V,X,j,ne){throw R.a.WarnImport("FileTools")},N.prototype._rescaleTexture=function(I,V,X,j,ne){},N.prototype.createRawTexture=function(I,V,X,j,ne,te,de,pe,ae){throw ae===void 0&&(ae=m.a.TEXTURETYPE_UNSIGNED_INT),R.a.WarnImport("Engine.RawTexture")},N.prototype.createRawCubeTexture=function(I,V,X,j,ne,te,de,pe){throw R.a.WarnImport("Engine.RawTexture")},N.prototype.createRawTexture3D=function(I,V,X,j,ne,te,de,pe,ae,ee){throw ee===void 0&&(ee=m.a.TEXTURETYPE_UNSIGNED_INT),R.a.WarnImport("Engine.RawTexture")},N.prototype.createRawTexture2DArray=function(I,V,X,j,ne,te,de,pe,ae,ee){throw ee===void 0&&(ee=m.a.TEXTURETYPE_UNSIGNED_INT),R.a.WarnImport("Engine.RawTexture")},N.prototype._unpackFlipY=function(I){this._unpackFlipYCached!==I&&(this._gl.pixelStorei(this._gl.UNPACK_FLIP_Y_WEBGL,I?1:0),this.enableUnpackFlipYCached&&(this._unpackFlipYCached=I))},N.prototype._getUnpackAlignement=function(){return this._gl.getParameter(this._gl.UNPACK_ALIGNMENT)},N.prototype._getTextureTarget=function(I){return I.isCube?this._gl.TEXTURE_CUBE_MAP:I.is3D?this._gl.TEXTURE_3D:I.is2DArray||I.isMultiview?this._gl.TEXTURE_2D_ARRAY:this._gl.TEXTURE_2D},N.prototype.updateTextureSamplingMode=function(I,V,X){X===void 0&&(X=!1);var j=this._getTextureTarget(V),ne=this._getSamplingParameters(I,V.generateMipMaps||X);this._setTextureParameterInteger(j,this._gl.TEXTURE_MAG_FILTER,ne.mag,V),this._setTextureParameterInteger(j,this._gl.TEXTURE_MIN_FILTER,ne.min),X&&(V.generateMipMaps=!0,this._gl.generateMipmap(j)),this._bindTextureDirectly(j,null),V.samplingMode=I},N.prototype.updateTextureWrappingMode=function(I,V,X,j){X===void 0&&(X=null),j===void 0&&(j=null);var ne=this._getTextureTarget(I);V!==null&&(this._setTextureParameterInteger(ne,this._gl.TEXTURE_WRAP_S,this._getTextureWrapMode(V),I),I._cachedWrapU=V),X!==null&&(this._setTextureParameterInteger(ne,this._gl.TEXTURE_WRAP_T,this._getTextureWrapMode(X),I),I._cachedWrapV=X),(I.is2DArray||I.is3D)&&j!==null&&(this._setTextureParameterInteger(ne,this._gl.TEXTURE_WRAP_R,this._getTextureWrapMode(j),I),I._cachedWrapR=j),this._bindTextureDirectly(ne,null)},N.prototype._setupDepthStencilTexture=function(I,V,X,j,ne){var te=V.width||V,de=V.height||V,pe=V.layers||0;I.baseWidth=te,I.baseHeight=de,I.width=te,I.height=de,I.is2DArray=pe>0,I.depth=pe,I.isReady=!0,I.samples=1,I.generateMipMaps=!1,I._generateDepthBuffer=!0,I._generateStencilBuffer=X,I.samplingMode=j?m.a.TEXTURE_BILINEAR_SAMPLINGMODE:m.a.TEXTURE_NEAREST_SAMPLINGMODE,I.type=m.a.TEXTURETYPE_UNSIGNED_INT,I._comparisonFunction=ne;var ae=this._gl,ee=this._getTextureTarget(I),K=this._getSamplingParameters(I.samplingMode,!1);ae.texParameteri(ee,ae.TEXTURE_MAG_FILTER,K.mag),ae.texParameteri(ee,ae.TEXTURE_MIN_FILTER,K.min),ae.texParameteri(ee,ae.TEXTURE_WRAP_S,ae.CLAMP_TO_EDGE),ae.texParameteri(ee,ae.TEXTURE_WRAP_T,ae.CLAMP_TO_EDGE),ne===0?(ae.texParameteri(ee,ae.TEXTURE_COMPARE_FUNC,m.a.LEQUAL),ae.texParameteri(ee,ae.TEXTURE_COMPARE_MODE,ae.NONE)):(ae.texParameteri(ee,ae.TEXTURE_COMPARE_FUNC,ne),ae.texParameteri(ee,ae.TEXTURE_COMPARE_MODE,ae.COMPARE_REF_TO_TEXTURE))},N.prototype._uploadCompressedDataToTextureDirectly=function(I,V,X,j,ne,te,de){te===void 0&&(te=0),de===void 0&&(de=0);var pe=this._gl,ae=pe.TEXTURE_2D;I.isCube&&(ae=pe.TEXTURE_CUBE_MAP_POSITIVE_X+te),this._gl.compressedTexImage2D(ae,de,V,X,j,0,ne)},N.prototype._uploadDataToTextureDirectly=function(I,V,X,j,ne,te){X===void 0&&(X=0),j===void 0&&(j=0),te===void 0&&(te=!1);var de=this._gl,pe=this._getWebGLTextureType(I.type),ae=this._getInternalFormat(I.format),ee=ne===void 0?this._getRGBABufferInternalSizedFormat(I.type,I.format):this._getInternalFormat(ne);this._unpackFlipY(I.invertY);var K=de.TEXTURE_2D;I.isCube&&(K=de.TEXTURE_CUBE_MAP_POSITIVE_X+X);var $=Math.round(Math.log(I.width)*Math.LOG2E),L=Math.round(Math.log(I.height)*Math.LOG2E),G=te?I.width:Math.pow(2,Math.max($-j,0)),Q=te?I.height:Math.pow(2,Math.max(L-j,0));de.texImage2D(K,j,ee,G,Q,0,ae,pe,V)},N.prototype.updateTextureData=function(I,V,X,j,ne,te,de,pe){de===void 0&&(de=0),pe===void 0&&(pe=0);var ae=this._gl,ee=this._getWebGLTextureType(I.type),K=this._getInternalFormat(I.format);this._unpackFlipY(I.invertY);var $=ae.TEXTURE_2D;I.isCube&&($=ae.TEXTURE_CUBE_MAP_POSITIVE_X+de),ae.texSubImage2D($,pe,X,j,ne,te,K,ee,V)},N.prototype._uploadArrayBufferViewToTexture=function(I,V,X,j){X===void 0&&(X=0),j===void 0&&(j=0);var ne=this._gl,te=I.isCube?ne.TEXTURE_CUBE_MAP:ne.TEXTURE_2D;this._bindTextureDirectly(te,I,!0),this._uploadDataToTextureDirectly(I,V,X,j),this._bindTextureDirectly(te,null,!0)},N.prototype._prepareWebGLTextureContinuation=function(I,V,X,j,ne){var te=this._gl;if(te){var de=this._getSamplingParameters(ne,!X);te.texParameteri(te.TEXTURE_2D,te.TEXTURE_MAG_FILTER,de.mag),te.texParameteri(te.TEXTURE_2D,te.TEXTURE_MIN_FILTER,de.min),X||j||te.generateMipmap(te.TEXTURE_2D),this._bindTextureDirectly(te.TEXTURE_2D,null),V&&V._removePendingData(I),I.onLoadedObservable.notifyObservers(I),I.onLoadedObservable.clear()}},N.prototype._prepareWebGLTexture=function(I,V,X,j,ne,te,de,pe,ae){var ee=this;ae===void 0&&(ae=m.a.TEXTURE_TRILINEAR_SAMPLINGMODE);var K=this.getCaps().maxTextureSize,$=Math.min(K,this.needPOTTextures?N.GetExponentOfTwo(X,K):X),L=Math.min(K,this.needPOTTextures?N.GetExponentOfTwo(j,K):j),G=this._gl;G&&(I._webGLTexture?(this._bindTextureDirectly(G.TEXTURE_2D,I,!0),this._unpackFlipY(ne===void 0||!!ne),I.baseWidth=X,I.baseHeight=j,I.width=$,I.height=L,I.isReady=!0,pe($,L,function(){ee._prepareWebGLTextureContinuation(I,V,te,de,ae)})||this._prepareWebGLTextureContinuation(I,V,te,de,ae)):V&&V._removePendingData(I))},N.prototype._setupFramebufferDepthAttachments=function(I,V,X,j,ne){ne===void 0&&(ne=1);var te=this._gl;if(I&&V)return this._getDepthStencilBuffer(X,j,ne,te.DEPTH_STENCIL,te.DEPTH24_STENCIL8,te.DEPTH_STENCIL_ATTACHMENT);if(V){var de=te.DEPTH_COMPONENT16;return this._webGLVersion>1&&(de=te.DEPTH_COMPONENT32F),this._getDepthStencilBuffer(X,j,ne,de,de,te.DEPTH_ATTACHMENT)}return I?this._getDepthStencilBuffer(X,j,ne,te.STENCIL_INDEX8,te.STENCIL_INDEX8,te.STENCIL_ATTACHMENT):null},N.prototype._releaseFramebufferObjects=function(I){var V=this._gl;I._framebuffer&&(V.deleteFramebuffer(I._framebuffer),I._framebuffer=null),I._depthStencilBuffer&&(V.deleteRenderbuffer(I._depthStencilBuffer),I._depthStencilBuffer=null),I._MSAAFramebuffer&&(V.deleteFramebuffer(I._MSAAFramebuffer),I._MSAAFramebuffer=null),I._MSAARenderBuffer&&(V.deleteRenderbuffer(I._MSAARenderBuffer),I._MSAARenderBuffer=null)},N.prototype._releaseTexture=function(I){this._releaseFramebufferObjects(I),this._deleteTexture(I._webGLTexture),this.unbindAllTextures();var V=this._internalTexturesCache.indexOf(I);V!==-1&&this._internalTexturesCache.splice(V,1),I._lodTextureHigh&&I._lodTextureHigh.dispose(),I._lodTextureMid&&I._lodTextureMid.dispose(),I._lodTextureLow&&I._lodTextureLow.dispose(),I._irradianceTexture&&I._irradianceTexture.dispose()},N.prototype._deleteTexture=function(I){this._gl.deleteTexture(I)},N.prototype._setProgram=function(I){this._currentProgram!==I&&(this._gl.useProgram(I),this._currentProgram=I)},N.prototype.bindSamplers=function(I){var V=I.getPipelineContext();this._setProgram(V.program);for(var X=I.getSamplers(),j=0;j-1;return X&&te&&(this._activeChannel=V._associatedChannel),this._boundTexturesCache[this._activeChannel]!==V||j?(this._activateCurrentTexture(),V&&V.isMultiview?this._gl.bindTexture(I,V?V._colorTextureArray:null):this._gl.bindTexture(I,V?V._webGLTexture:null),this._boundTexturesCache[this._activeChannel]=V,V&&(V._associatedChannel=this._activeChannel)):X&&(ne=!0,this._activateCurrentTexture()),te&&!X&&this._bindSamplerUniformToChannel(V._associatedChannel,this._activeChannel),ne},N.prototype._bindTexture=function(I,V){if(I!==void 0){V&&(V._associatedChannel=I),this._activeChannel=I;var X=V?this._getTextureTarget(V):this._gl.TEXTURE_2D;this._bindTextureDirectly(X,V)}},N.prototype.unbindAllTextures=function(){for(var I=0;I1&&(this._bindTextureDirectly(this._gl.TEXTURE_3D,null),this._bindTextureDirectly(this._gl.TEXTURE_2D_ARRAY,null))},N.prototype.setTexture=function(I,V,X){I!==void 0&&(V&&(this._boundUniforms[I]=V),this._setTexture(I,X))},N.prototype._bindSamplerUniformToChannel=function(I,V){var X=this._boundUniforms[I];X&&X._currentState!==V&&(this._gl.uniform1i(X,V),X._currentState=V)},N.prototype._getTextureWrapMode=function(I){switch(I){case m.a.TEXTURE_WRAP_ADDRESSMODE:return this._gl.REPEAT;case m.a.TEXTURE_CLAMP_ADDRESSMODE:return this._gl.CLAMP_TO_EDGE;case m.a.TEXTURE_MIRROR_ADDRESSMODE:return this._gl.MIRRORED_REPEAT}return this._gl.REPEAT},N.prototype._setTexture=function(I,V,X,j){if(X===void 0&&(X=!1),j===void 0&&(j=!1),!V)return this._boundTexturesCache[I]!=null&&(this._activeChannel=I,this._bindTextureDirectly(this._gl.TEXTURE_2D,null),this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,null),this.webGLVersion>1&&(this._bindTextureDirectly(this._gl.TEXTURE_3D,null),this._bindTextureDirectly(this._gl.TEXTURE_2D_ARRAY,null))),!1;if(V.video)this._activeChannel=I,V.update();else if(V.delayLoadState===m.a.DELAYLOADSTATE_NOTLOADED)return V.delayLoad(),!1;var ne;ne=j?V.depthStencilTexture:V.isReady()?V.getInternalTexture():V.isCube?this.emptyCubeTexture:V.is3D?this.emptyTexture3D:V.is2DArray?this.emptyTexture2DArray:this.emptyTexture,!X&&ne&&(ne._associatedChannel=I);var te=!0;this._boundTexturesCache[I]===ne&&(X||this._bindSamplerUniformToChannel(ne._associatedChannel,I),te=!1),this._activeChannel=I;var de=this._getTextureTarget(ne);if(te&&this._bindTextureDirectly(de,ne,X),ne&&!ne.isMultiview){if(ne.isCube&&ne._cachedCoordinatesMode!==V.coordinatesMode){ne._cachedCoordinatesMode=V.coordinatesMode;var pe=V.coordinatesMode!==m.a.TEXTURE_CUBIC_MODE&&V.coordinatesMode!==m.a.TEXTURE_SKYBOX_MODE?m.a.TEXTURE_WRAP_ADDRESSMODE:m.a.TEXTURE_CLAMP_ADDRESSMODE;V.wrapU=pe,V.wrapV=pe}ne._cachedWrapU!==V.wrapU&&(ne._cachedWrapU=V.wrapU,this._setTextureParameterInteger(de,this._gl.TEXTURE_WRAP_S,this._getTextureWrapMode(V.wrapU),ne)),ne._cachedWrapV!==V.wrapV&&(ne._cachedWrapV=V.wrapV,this._setTextureParameterInteger(de,this._gl.TEXTURE_WRAP_T,this._getTextureWrapMode(V.wrapV),ne)),ne.is3D&&ne._cachedWrapR!==V.wrapR&&(ne._cachedWrapR=V.wrapR,this._setTextureParameterInteger(de,this._gl.TEXTURE_WRAP_R,this._getTextureWrapMode(V.wrapR),ne)),this._setAnisotropicLevel(de,ne,V.anisotropicFilteringLevel)}return!0},N.prototype.setTextureArray=function(I,V,X){if(I!==void 0&&V){this._textureUnits&&this._textureUnits.length===X.length||(this._textureUnits=new Int32Array(X.length));for(var j=0;j=this._caps.maxVertexAttribs||!this._vertexAttribArraysEnabled[I]||this.disableAttributeByIndex(I)}},N.prototype.releaseEffects=function(){for(var I in this._compiledEffects){var V=this._compiledEffects[I].getPipelineContext();this._deletePipelineContext(V)}this._compiledEffects={}},N.prototype.dispose=function(){this.stopRenderLoop(),this.onBeforeTextureInitObservable&&this.onBeforeTextureInitObservable.clear(),this._emptyTexture&&(this._releaseTexture(this._emptyTexture),this._emptyTexture=null),this._emptyCubeTexture&&(this._releaseTexture(this._emptyCubeTexture),this._emptyCubeTexture=null),this._dummyFramebuffer&&this._gl.deleteFramebuffer(this._dummyFramebuffer),this.releaseEffects(),this.unbindAllAttributes(),this._boundUniforms=[],A.a.IsWindowObjectExist()&&this._renderingCanvas&&(this._doNotHandleContextLost||(this._renderingCanvas.removeEventListener("webglcontextlost",this._onContextLost),this._renderingCanvas.removeEventListener("webglcontextrestored",this._onContextRestored))),this._workingCanvas=null,this._workingContext=null,this._currentBufferPointers=[],this._renderingCanvas=null,this._currentProgram=null,this._boundRenderFunction=null,_.a.ResetCache();for(var I=0,V=this._activeRequests;I1?this._caps.colorBufferFloat:this._canRenderToFramebuffer(m.a.TEXTURETYPE_FLOAT)},N.prototype._canRenderToHalfFloatFramebuffer=function(){return this._webGLVersion>1?this._caps.colorBufferFloat:this._canRenderToFramebuffer(m.a.TEXTURETYPE_HALF_FLOAT)},N.prototype._canRenderToFramebuffer=function(I){for(var V=this._gl;V.getError()!==V.NO_ERROR;);var X=!0,j=V.createTexture();V.bindTexture(V.TEXTURE_2D,j),V.texImage2D(V.TEXTURE_2D,0,this._getRGBABufferInternalSizedFormat(I),1,1,0,V.RGBA,this._getWebGLTextureType(I),null),V.texParameteri(V.TEXTURE_2D,V.TEXTURE_MIN_FILTER,V.NEAREST),V.texParameteri(V.TEXTURE_2D,V.TEXTURE_MAG_FILTER,V.NEAREST);var ne=V.createFramebuffer();V.bindFramebuffer(V.FRAMEBUFFER,ne),V.framebufferTexture2D(V.FRAMEBUFFER,V.COLOR_ATTACHMENT0,V.TEXTURE_2D,j,0);var te=V.checkFramebufferStatus(V.FRAMEBUFFER);if((X=(X=X&&te===V.FRAMEBUFFER_COMPLETE)&&V.getError()===V.NO_ERROR)&&(V.clear(V.COLOR_BUFFER_BIT),X=X&&V.getError()===V.NO_ERROR),X){V.bindFramebuffer(V.FRAMEBUFFER,null);var de=V.RGBA,pe=V.UNSIGNED_BYTE,ae=new Uint8Array(4);V.readPixels(0,0,1,1,de,pe,ae),X=X&&V.getError()===V.NO_ERROR}for(V.deleteTexture(j),V.deleteFramebuffer(ne),V.bindFramebuffer(V.FRAMEBUFFER,null);!X&&V.getError()!==V.NO_ERROR;);return X},N.prototype._getWebGLTextureType=function(I){if(this._webGLVersion===1){switch(I){case m.a.TEXTURETYPE_FLOAT:return this._gl.FLOAT;case m.a.TEXTURETYPE_HALF_FLOAT:return this._gl.HALF_FLOAT_OES;case m.a.TEXTURETYPE_UNSIGNED_BYTE:return this._gl.UNSIGNED_BYTE;case m.a.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4:return this._gl.UNSIGNED_SHORT_4_4_4_4;case m.a.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1:return this._gl.UNSIGNED_SHORT_5_5_5_1;case m.a.TEXTURETYPE_UNSIGNED_SHORT_5_6_5:return this._gl.UNSIGNED_SHORT_5_6_5}return this._gl.UNSIGNED_BYTE}switch(I){case m.a.TEXTURETYPE_BYTE:return this._gl.BYTE;case m.a.TEXTURETYPE_UNSIGNED_BYTE:return this._gl.UNSIGNED_BYTE;case m.a.TEXTURETYPE_SHORT:return this._gl.SHORT;case m.a.TEXTURETYPE_UNSIGNED_SHORT:return this._gl.UNSIGNED_SHORT;case m.a.TEXTURETYPE_INT:return this._gl.INT;case m.a.TEXTURETYPE_UNSIGNED_INTEGER:return this._gl.UNSIGNED_INT;case m.a.TEXTURETYPE_FLOAT:return this._gl.FLOAT;case m.a.TEXTURETYPE_HALF_FLOAT:return this._gl.HALF_FLOAT;case m.a.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4:return this._gl.UNSIGNED_SHORT_4_4_4_4;case m.a.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1:return this._gl.UNSIGNED_SHORT_5_5_5_1;case m.a.TEXTURETYPE_UNSIGNED_SHORT_5_6_5:return this._gl.UNSIGNED_SHORT_5_6_5;case m.a.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV:return this._gl.UNSIGNED_INT_2_10_10_10_REV;case m.a.TEXTURETYPE_UNSIGNED_INT_24_8:return this._gl.UNSIGNED_INT_24_8;case m.a.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV:return this._gl.UNSIGNED_INT_10F_11F_11F_REV;case m.a.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV:return this._gl.UNSIGNED_INT_5_9_9_9_REV;case m.a.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV:return this._gl.FLOAT_32_UNSIGNED_INT_24_8_REV}return this._gl.UNSIGNED_BYTE},N.prototype._getInternalFormat=function(I){var V=this._gl.RGBA;switch(I){case m.a.TEXTUREFORMAT_ALPHA:V=this._gl.ALPHA;break;case m.a.TEXTUREFORMAT_LUMINANCE:V=this._gl.LUMINANCE;break;case m.a.TEXTUREFORMAT_LUMINANCE_ALPHA:V=this._gl.LUMINANCE_ALPHA;break;case m.a.TEXTUREFORMAT_RED:V=this._gl.RED;break;case m.a.TEXTUREFORMAT_RG:V=this._gl.RG;break;case m.a.TEXTUREFORMAT_RGB:V=this._gl.RGB;break;case m.a.TEXTUREFORMAT_RGBA:V=this._gl.RGBA}if(this._webGLVersion>1)switch(I){case m.a.TEXTUREFORMAT_RED_INTEGER:V=this._gl.RED_INTEGER;break;case m.a.TEXTUREFORMAT_RG_INTEGER:V=this._gl.RG_INTEGER;break;case m.a.TEXTUREFORMAT_RGB_INTEGER:V=this._gl.RGB_INTEGER;break;case m.a.TEXTUREFORMAT_RGBA_INTEGER:V=this._gl.RGBA_INTEGER}return V},N.prototype._getRGBABufferInternalSizedFormat=function(I,V){if(this._webGLVersion===1){if(V!==void 0)switch(V){case m.a.TEXTUREFORMAT_ALPHA:return this._gl.ALPHA;case m.a.TEXTUREFORMAT_LUMINANCE:return this._gl.LUMINANCE;case m.a.TEXTUREFORMAT_LUMINANCE_ALPHA:return this._gl.LUMINANCE_ALPHA;case m.a.TEXTUREFORMAT_RGB:return this._gl.RGB}return this._gl.RGBA}switch(I){case m.a.TEXTURETYPE_BYTE:switch(V){case m.a.TEXTUREFORMAT_RED:return this._gl.R8_SNORM;case m.a.TEXTUREFORMAT_RG:return this._gl.RG8_SNORM;case m.a.TEXTUREFORMAT_RGB:return this._gl.RGB8_SNORM;case m.a.TEXTUREFORMAT_RED_INTEGER:return this._gl.R8I;case m.a.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG8I;case m.a.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB8I;case m.a.TEXTUREFORMAT_RGBA_INTEGER:return this._gl.RGBA8I;default:return this._gl.RGBA8_SNORM}case m.a.TEXTURETYPE_UNSIGNED_BYTE:switch(V){case m.a.TEXTUREFORMAT_RED:return this._gl.R8;case m.a.TEXTUREFORMAT_RG:return this._gl.RG8;case m.a.TEXTUREFORMAT_RGB:return this._gl.RGB8;case m.a.TEXTUREFORMAT_RGBA:return this._gl.RGBA8;case m.a.TEXTUREFORMAT_RED_INTEGER:return this._gl.R8UI;case m.a.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG8UI;case m.a.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB8UI;case m.a.TEXTUREFORMAT_RGBA_INTEGER:return this._gl.RGBA8UI;case m.a.TEXTUREFORMAT_ALPHA:return this._gl.ALPHA;case m.a.TEXTUREFORMAT_LUMINANCE:return this._gl.LUMINANCE;case m.a.TEXTUREFORMAT_LUMINANCE_ALPHA:return this._gl.LUMINANCE_ALPHA;default:return this._gl.RGBA8}case m.a.TEXTURETYPE_SHORT:switch(V){case m.a.TEXTUREFORMAT_RED_INTEGER:return this._gl.R16I;case m.a.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG16I;case m.a.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB16I;case m.a.TEXTUREFORMAT_RGBA_INTEGER:default:return this._gl.RGBA16I}case m.a.TEXTURETYPE_UNSIGNED_SHORT:switch(V){case m.a.TEXTUREFORMAT_RED_INTEGER:return this._gl.R16UI;case m.a.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG16UI;case m.a.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB16UI;case m.a.TEXTUREFORMAT_RGBA_INTEGER:default:return this._gl.RGBA16UI}case m.a.TEXTURETYPE_INT:switch(V){case m.a.TEXTUREFORMAT_RED_INTEGER:return this._gl.R32I;case m.a.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG32I;case m.a.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB32I;case m.a.TEXTUREFORMAT_RGBA_INTEGER:default:return this._gl.RGBA32I}case m.a.TEXTURETYPE_UNSIGNED_INTEGER:switch(V){case m.a.TEXTUREFORMAT_RED_INTEGER:return this._gl.R32UI;case m.a.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG32UI;case m.a.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB32UI;case m.a.TEXTUREFORMAT_RGBA_INTEGER:default:return this._gl.RGBA32UI}case m.a.TEXTURETYPE_FLOAT:switch(V){case m.a.TEXTUREFORMAT_RED:return this._gl.R32F;case m.a.TEXTUREFORMAT_RG:return this._gl.RG32F;case m.a.TEXTUREFORMAT_RGB:return this._gl.RGB32F;case m.a.TEXTUREFORMAT_RGBA:default:return this._gl.RGBA32F}case m.a.TEXTURETYPE_HALF_FLOAT:switch(V){case m.a.TEXTUREFORMAT_RED:return this._gl.R16F;case m.a.TEXTUREFORMAT_RG:return this._gl.RG16F;case m.a.TEXTUREFORMAT_RGB:return this._gl.RGB16F;case m.a.TEXTUREFORMAT_RGBA:default:return this._gl.RGBA16F}case m.a.TEXTURETYPE_UNSIGNED_SHORT_5_6_5:return this._gl.RGB565;case m.a.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV:return this._gl.R11F_G11F_B10F;case m.a.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV:return this._gl.RGB9_E5;case m.a.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4:return this._gl.RGBA4;case m.a.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1:return this._gl.RGB5_A1;case m.a.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV:switch(V){case m.a.TEXTUREFORMAT_RGBA:return this._gl.RGB10_A2;case m.a.TEXTUREFORMAT_RGBA_INTEGER:return this._gl.RGB10_A2UI;default:return this._gl.RGB10_A2}}return this._gl.RGBA8},N.prototype._getRGBAMultiSampleBufferFormat=function(I){return I===m.a.TEXTURETYPE_FLOAT?this._gl.RGBA32F:I===m.a.TEXTURETYPE_HALF_FLOAT?this._gl.RGBA16F:this._gl.RGBA8},N.prototype._loadFile=function(I,V,X,j,ne,te){var de=this,pe=N._FileToolsLoadFile(I,V,X,j,ne,te);return this._activeRequests.push(pe),pe.onCompleteObservable.add(function(ae){de._activeRequests.splice(de._activeRequests.indexOf(ae),1)}),pe},N._FileToolsLoadFile=function(I,V,X,j,ne,te){throw R.a.WarnImport("FileTools")},N.prototype.readPixels=function(I,V,X,j,ne){ne===void 0&&(ne=!0);var te=ne?4:3,de=ne?this._gl.RGBA:this._gl.RGB,pe=new Uint8Array(j*X*te);return this._gl.readPixels(I,V,X,j,de,this._gl.UNSIGNED_BYTE,pe),pe},Object.defineProperty(N,"IsSupported",{get:function(){return this.isSupported()},enumerable:!1,configurable:!0}),N.isSupported=function(){if(this._HasMajorPerformanceCaveat!==null)return!this._HasMajorPerformanceCaveat;if(this._IsSupported===null)try{var I=v.a.CreateCanvas(1,1),V=I.getContext("webgl")||I.getContext("experimental-webgl");this._IsSupported=V!=null&&!!window.WebGLRenderingContext}catch{this._IsSupported=!1}return this._IsSupported},Object.defineProperty(N,"HasMajorPerformanceCaveat",{get:function(){if(this._HasMajorPerformanceCaveat===null)try{var I=v.a.CreateCanvas(1,1),V=I.getContext("webgl",{failIfMajorPerformanceCaveat:!0})||I.getContext("experimental-webgl",{failIfMajorPerformanceCaveat:!0});this._HasMajorPerformanceCaveat=!V}catch{this._HasMajorPerformanceCaveat=!1}return this._HasMajorPerformanceCaveat},enumerable:!1,configurable:!0}),N.CeilingPOT=function(I){return I--,I|=I>>1,I|=I>>2,I|=I>>4,I|=I>>8,I|=I>>16,++I},N.FloorPOT=function(I){return I|=I>>1,I|=I>>2,I|=I>>4,I|=I>>8,(I|=I>>16)-(I>>1)},N.NearestPOT=function(I){var V=N.CeilingPOT(I),X=N.FloorPOT(I);return V-I>I-X?X:V},N.GetExponentOfTwo=function(I,V,X){var j;switch(X===void 0&&(X=m.a.SCALEMODE_NEAREST),X){case m.a.SCALEMODE_FLOOR:j=N.FloorPOT(I);break;case m.a.SCALEMODE_NEAREST:j=N.NearestPOT(I);break;case m.a.SCALEMODE_CEILING:default:j=N.CeilingPOT(I)}return Math.min(j,V)},N.QueueNewFrame=function(I,V){return A.a.IsWindowObjectExist()?(V||(V=window),V.requestPostAnimationFrame?V.requestPostAnimationFrame(I):V.requestAnimationFrame?V.requestAnimationFrame(I):V.msRequestAnimationFrame?V.msRequestAnimationFrame(I):V.webkitRequestAnimationFrame?V.webkitRequestAnimationFrame(I):V.mozRequestAnimationFrame?V.mozRequestAnimationFrame(I):V.oRequestAnimationFrame?V.oRequestAnimationFrame(I):window.setTimeout(I,16)):typeof requestAnimationFrame<"u"?requestAnimationFrame(I):setTimeout(I,16)},N.prototype.getHostDocument=function(){return this._renderingCanvas&&this._renderingCanvas.ownerDocument?this._renderingCanvas.ownerDocument:document},N.ExceptionList=[{key:"Chrome/63.0",capture:"63\\.0\\.3239\\.(\\d+)",captureConstraint:108,targets:["uniformBuffer"]},{key:"Firefox/58",capture:null,captureConstraint:null,targets:["uniformBuffer"]},{key:"Firefox/59",capture:null,captureConstraint:null,targets:["uniformBuffer"]},{key:"Chrome/72.+?Mobile",capture:null,captureConstraint:null,targets:["vao"]},{key:"Chrome/73.+?Mobile",capture:null,captureConstraint:null,targets:["vao"]},{key:"Chrome/74.+?Mobile",capture:null,captureConstraint:null,targets:["vao"]},{key:"Mac OS.+Chrome/71",capture:null,captureConstraint:null,targets:["vao"]},{key:"Mac OS.+Chrome/72",capture:null,captureConstraint:null,targets:["vao"]}],N._TextureLoaders=[],N.CollisionsEpsilon=.001,N._IsSupported=null,N._HasMajorPerformanceCaveat=null,N}()},function(Ie,y,f){f.d(y,"b",function(){return U}),f.d(y,"a",function(){return C});var U,_=f(6),R=f(102),u=f(2),M=f(21);(function(P){P[P.Unknown=0]="Unknown",P[P.Url=1]="Url",P[P.Temp=2]="Temp",P[P.Raw=3]="Raw",P[P.Dynamic=4]="Dynamic",P[P.RenderTarget=5]="RenderTarget",P[P.MultiRenderTarget=6]="MultiRenderTarget",P[P.Cube=7]="Cube",P[P.CubeRaw=8]="CubeRaw",P[P.CubePrefiltered=9]="CubePrefiltered",P[P.Raw3D=10]="Raw3D",P[P.Raw2DArray=11]="Raw2DArray",P[P.Depth=12]="Depth",P[P.CubeRawRGBD=13]="CubeRawRGBD"})(U||(U={}));var C=function(){function P(m,c,T){T===void 0&&(T=!1),this.isReady=!1,this.isCube=!1,this.is3D=!1,this.is2DArray=!1,this.isMultiview=!1,this.url="",this.samplingMode=-1,this.generateMipMaps=!1,this.samples=0,this.type=-1,this.format=-1,this.onLoadedObservable=new _.c,this.width=0,this.height=0,this.depth=0,this.baseWidth=0,this.baseHeight=0,this.baseDepth=0,this.invertY=!1,this._invertVScale=!1,this._associatedChannel=-1,this._source=U.Unknown,this._buffer=null,this._bufferView=null,this._bufferViewArray=null,this._bufferViewArrayArray=null,this._size=0,this._extension="",this._files=null,this._workingCanvas=null,this._workingContext=null,this._framebuffer=null,this._depthStencilBuffer=null,this._MSAAFramebuffer=null,this._MSAARenderBuffer=null,this._attachments=null,this._textureArray=null,this._cachedCoordinatesMode=null,this._cachedWrapU=null,this._cachedWrapV=null,this._cachedWrapR=null,this._cachedAnisotropicFilteringLevel=null,this._isDisabled=!1,this._compression=null,this._generateStencilBuffer=!1,this._generateDepthBuffer=!1,this._comparisonFunction=0,this._sphericalPolynomial=null,this._lodGenerationScale=0,this._lodGenerationOffset=0,this._colorTextureArray=null,this._depthStencilTextureArray=null,this._lodTextureHigh=null,this._lodTextureMid=null,this._lodTextureLow=null,this._isRGBD=!1,this._linearSpecularLOD=!1,this._irradianceTexture=null,this._webGLTexture=null,this._references=1,this._gammaSpace=null,this._engine=m,this._source=c,T||(this._webGLTexture=m._createTexture())}return P.prototype.getEngine=function(){return this._engine},Object.defineProperty(P.prototype,"source",{get:function(){return this._source},enumerable:!1,configurable:!0}),P.prototype.incrementReferences=function(){this._references++},P.prototype.updateSize=function(m,c,T){T===void 0&&(T=1),this.width=m,this.height=c,this.depth=T,this.baseWidth=m,this.baseHeight=c,this.baseDepth=T,this._size=m*c*T},P.prototype._rebuild=function(){var m,c,T=this;switch(this.isReady=!1,this._cachedCoordinatesMode=null,this._cachedWrapU=null,this._cachedWrapV=null,this._cachedAnisotropicFilteringLevel=null,this.source){case U.Temp:return;case U.Url:return void(c=this._engine.createTexture((m=this._originalUrl)!==null&&m!==void 0?m:this.url,!this.generateMipMaps,this.invertY,null,this.samplingMode,function(){c._swapAndDie(T),T.isReady=!0},null,this._buffer,void 0,this.format));case U.Raw:return(c=this._engine.createRawTexture(this._bufferView,this.baseWidth,this.baseHeight,this.format,this.generateMipMaps,this.invertY,this.samplingMode,this._compression))._swapAndDie(this),void(this.isReady=!0);case U.Raw3D:return(c=this._engine.createRawTexture3D(this._bufferView,this.baseWidth,this.baseHeight,this.baseDepth,this.format,this.generateMipMaps,this.invertY,this.samplingMode,this._compression))._swapAndDie(this),void(this.isReady=!0);case U.Raw2DArray:return(c=this._engine.createRawTexture2DArray(this._bufferView,this.baseWidth,this.baseHeight,this.baseDepth,this.format,this.generateMipMaps,this.invertY,this.samplingMode,this._compression))._swapAndDie(this),void(this.isReady=!0);case U.Dynamic:return(c=this._engine.createDynamicTexture(this.baseWidth,this.baseHeight,this.generateMipMaps,this.samplingMode))._swapAndDie(this),void this._engine.updateDynamicTexture(this,this._engine.getRenderingCanvas(),this.invertY,void 0,void 0,!0);case U.RenderTarget:var A=new R.a;if(A.generateDepthBuffer=this._generateDepthBuffer,A.generateMipMaps=this.generateMipMaps,A.generateStencilBuffer=this._generateStencilBuffer,A.samplingMode=this.samplingMode,A.type=this.type,this.isCube)c=this._engine.createRenderTargetCubeTexture(this.width,A);else{var S={width:this.width,height:this.height,layers:this.is2DArray?this.depth:void 0};c=this._engine.createRenderTargetTexture(S,A)}return c._swapAndDie(this),void(this.isReady=!0);case U.Depth:var g={bilinearFiltering:this.samplingMode!==u.a.TEXTURE_BILINEAR_SAMPLINGMODE,comparisonFunction:this._comparisonFunction,generateStencil:this._generateStencilBuffer,isCube:this.isCube},l={width:this.width,height:this.height,layers:this.is2DArray?this.depth:void 0};return(c=this._engine.createDepthStencilTexture(l,g))._swapAndDie(this),void(this.isReady=!0);case U.Cube:return void(c=this._engine.createCubeTexture(this.url,null,this._files,!this.generateMipMaps,function(){c._swapAndDie(T),T.isReady=!0},null,this.format,this._extension));case U.CubeRaw:return(c=this._engine.createRawCubeTexture(this._bufferViewArray,this.width,this.format,this.type,this.generateMipMaps,this.invertY,this.samplingMode,this._compression))._swapAndDie(this),void(this.isReady=!0);case U.CubeRawRGBD:return c=this._engine.createRawCubeTexture(null,this.width,this.format,this.type,this.generateMipMaps,this.invertY,this.samplingMode,this._compression),void P._UpdateRGBDAsync(c,this._bufferViewArrayArray,this._sphericalPolynomial,this._lodGenerationScale,this._lodGenerationOffset).then(function(){c._swapAndDie(T),T.isReady=!0});case U.CubePrefiltered:return void((c=this._engine.createPrefilteredCubeTexture(this.url,null,this._lodGenerationScale,this._lodGenerationOffset,function(h){h&&h._swapAndDie(T),T.isReady=!0},null,this.format,this._extension))._sphericalPolynomial=this._sphericalPolynomial)}},P.prototype._swapAndDie=function(m){m._webGLTexture=this._webGLTexture,m._isRGBD=this._isRGBD,this._framebuffer&&(m._framebuffer=this._framebuffer),this._depthStencilBuffer&&(m._depthStencilBuffer=this._depthStencilBuffer),m._depthStencilTexture=this._depthStencilTexture,this._lodTextureHigh&&(m._lodTextureHigh&&m._lodTextureHigh.dispose(),m._lodTextureHigh=this._lodTextureHigh),this._lodTextureMid&&(m._lodTextureMid&&m._lodTextureMid.dispose(),m._lodTextureMid=this._lodTextureMid),this._lodTextureLow&&(m._lodTextureLow&&m._lodTextureLow.dispose(),m._lodTextureLow=this._lodTextureLow),this._irradianceTexture&&(m._irradianceTexture&&m._irradianceTexture.dispose(),m._irradianceTexture=this._irradianceTexture);var c,T=this._engine.getLoadedTexturesCache();(c=T.indexOf(this))!==-1&&T.splice(c,1),(c=T.indexOf(m))===-1&&T.push(m)},P.prototype.dispose=function(){this._webGLTexture&&(this._references--,this._references===0&&(this._engine._releaseTexture(this),this._webGLTexture=null))},P._UpdateRGBDAsync=function(m,c,T,A,S){throw M.a.WarnImport("environmentTextureTools")},P}()},function(Ie,y,f){f.d(y,"b",function(){return U}),f.d(y,"c",function(){return _}),f.d(y,"a",function(){return R});var U=1/2.2,_=2.2,R=.001},function(Ie,y,f){f.d(y,"a",function(){return P});var U=f(1),_=f(0),R=f(3),u=f(6),M=f(22),C=f(21),P=function(){function m(c,T){T===void 0&&(T=null),this.state="",this.metadata=null,this.reservedDataStore=null,this._doNotSerialize=!1,this._isDisposed=!1,this.animations=new Array,this._ranges={},this.onReady=null,this._isEnabled=!0,this._isParentEnabled=!0,this._isReady=!0,this._currentRenderId=-1,this._parentUpdateId=-1,this._childUpdateId=-1,this._waitingParentId=null,this._cache={},this._parentNode=null,this._children=null,this._worldMatrix=_.a.Identity(),this._worldMatrixDeterminant=0,this._worldMatrixDeterminantIsDirty=!0,this._sceneRootNodesIndex=-1,this._animationPropertiesOverride=null,this._isNode=!0,this.onDisposeObservable=new u.c,this._onDisposeObserver=null,this._behaviors=new Array,this.name=c,this.id=c,this._scene=T||M.a.LastCreatedScene,this.uniqueId=this._scene.getUniqueId(),this._initCache()}return m.AddNodeConstructor=function(c,T){this._NodeConstructors[c]=T},m.Construct=function(c,T,A,S){var g=this._NodeConstructors[c];return g?g(T,A,S):null},Object.defineProperty(m.prototype,"doNotSerialize",{get:function(){return!!this._doNotSerialize||!!this._parentNode&&this._parentNode.doNotSerialize},set:function(c){this._doNotSerialize=c},enumerable:!1,configurable:!0}),m.prototype.isDisposed=function(){return this._isDisposed},Object.defineProperty(m.prototype,"parent",{get:function(){return this._parentNode},set:function(c){if(this._parentNode!==c){var T=this._parentNode;if(this._parentNode&&this._parentNode._children!==void 0&&this._parentNode._children!==null){var A=this._parentNode._children.indexOf(this);A!==-1&&this._parentNode._children.splice(A,1),c||this._isDisposed||this._addToSceneRootNodes()}this._parentNode=c,this._parentNode&&(this._parentNode._children!==void 0&&this._parentNode._children!==null||(this._parentNode._children=new Array),this._parentNode._children.push(this),T||this._removeFromSceneRootNodes()),this._syncParentEnabledState()}},enumerable:!1,configurable:!0}),m.prototype._addToSceneRootNodes=function(){this._sceneRootNodesIndex===-1&&(this._sceneRootNodesIndex=this._scene.rootNodes.length,this._scene.rootNodes.push(this))},m.prototype._removeFromSceneRootNodes=function(){if(this._sceneRootNodesIndex!==-1){var c=this._scene.rootNodes,T=c.length-1;c[this._sceneRootNodesIndex]=c[T],c[this._sceneRootNodesIndex]._sceneRootNodesIndex=this._sceneRootNodesIndex,this._scene.rootNodes.pop(),this._sceneRootNodesIndex=-1}},Object.defineProperty(m.prototype,"animationPropertiesOverride",{get:function(){return this._animationPropertiesOverride?this._animationPropertiesOverride:this._scene.animationPropertiesOverride},set:function(c){this._animationPropertiesOverride=c},enumerable:!1,configurable:!0}),m.prototype.getClassName=function(){return"Node"},Object.defineProperty(m.prototype,"onDispose",{set:function(c){this._onDisposeObserver&&this.onDisposeObservable.remove(this._onDisposeObserver),this._onDisposeObserver=this.onDisposeObservable.add(c)},enumerable:!1,configurable:!0}),m.prototype.getScene=function(){return this._scene},m.prototype.getEngine=function(){return this._scene.getEngine()},m.prototype.addBehavior=function(c,T){var A=this;return T===void 0&&(T=!1),this._behaviors.indexOf(c)!==-1||(c.init(),this._scene.isLoading&&!T?this._scene.onDataLoadedObservable.addOnce(function(){c.attach(A)}):c.attach(this),this._behaviors.push(c)),this},m.prototype.removeBehavior=function(c){var T=this._behaviors.indexOf(c);return T===-1||(this._behaviors[T].detach(),this._behaviors.splice(T,1)),this},Object.defineProperty(m.prototype,"behaviors",{get:function(){return this._behaviors},enumerable:!1,configurable:!0}),m.prototype.getBehaviorByName=function(c){for(var T=0,A=this._behaviors;T +#if defined(BUMP) || !defined(NORMAL) +#extension GL_OES_standard_derivatives : enable +#endif +#include[SCENE_MRT_COUNT] +#define CUSTOM_FRAGMENT_BEGIN +#ifdef LOGARITHMICDEPTH +#extension GL_EXT_frag_depth : enable +#endif + +#define RECIPROCAL_PI2 0.15915494 +uniform vec3 vEyePosition; +uniform vec3 vAmbientColor; + +varying vec3 vPositionW; +#ifdef NORMAL +varying vec3 vNormalW; +#endif +#ifdef VERTEXCOLOR +varying vec4 vColor; +#endif +#ifdef MAINUV1 +varying vec2 vMainUV1; +#endif +#ifdef MAINUV2 +varying vec2 vMainUV2; +#endif + +#include + +#include<__decl__lightFragment>[0..maxSimultaneousLights] +#include +#include + +#ifdef DIFFUSE +#if DIFFUSEDIRECTUV == 1 +#define vDiffuseUV vMainUV1 +#elif DIFFUSEDIRECTUV == 2 +#define vDiffuseUV vMainUV2 +#else +varying vec2 vDiffuseUV; +#endif +uniform sampler2D diffuseSampler; +#endif +#ifdef AMBIENT +#if AMBIENTDIRECTUV == 1 +#define vAmbientUV vMainUV1 +#elif AMBIENTDIRECTUV == 2 +#define vAmbientUV vMainUV2 +#else +varying vec2 vAmbientUV; +#endif +uniform sampler2D ambientSampler; +#endif +#ifdef OPACITY +#if OPACITYDIRECTUV == 1 +#define vOpacityUV vMainUV1 +#elif OPACITYDIRECTUV == 2 +#define vOpacityUV vMainUV2 +#else +varying vec2 vOpacityUV; +#endif +uniform sampler2D opacitySampler; +#endif +#ifdef EMISSIVE +#if EMISSIVEDIRECTUV == 1 +#define vEmissiveUV vMainUV1 +#elif EMISSIVEDIRECTUV == 2 +#define vEmissiveUV vMainUV2 +#else +varying vec2 vEmissiveUV; +#endif +uniform sampler2D emissiveSampler; +#endif +#ifdef LIGHTMAP +#if LIGHTMAPDIRECTUV == 1 +#define vLightmapUV vMainUV1 +#elif LIGHTMAPDIRECTUV == 2 +#define vLightmapUV vMainUV2 +#else +varying vec2 vLightmapUV; +#endif +uniform sampler2D lightmapSampler; +#endif +#ifdef REFRACTION +#ifdef REFRACTIONMAP_3D +uniform samplerCube refractionCubeSampler; +#else +uniform sampler2D refraction2DSampler; +#endif +#endif +#if defined(SPECULAR) && defined(SPECULARTERM) +#if SPECULARDIRECTUV == 1 +#define vSpecularUV vMainUV1 +#elif SPECULARDIRECTUV == 2 +#define vSpecularUV vMainUV2 +#else +varying vec2 vSpecularUV; +#endif +uniform sampler2D specularSampler; +#endif +#ifdef ALPHATEST +uniform float alphaCutOff; +#endif + +#include + +#ifdef REFLECTION +#ifdef REFLECTIONMAP_3D +uniform samplerCube reflectionCubeSampler; +#else +uniform sampler2D reflection2DSampler; +#endif +#ifdef REFLECTIONMAP_SKYBOX +varying vec3 vPositionUVW; +#else +#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED) +varying vec3 vDirectionW; +#endif +#endif +#include +#endif +#include +#include +#include +#include +#include +#include +#include +#define CUSTOM_FRAGMENT_DEFINITIONS +void main(void) { +#define CUSTOM_FRAGMENT_MAIN_BEGIN +#include +vec3 viewDirectionW=normalize(vEyePosition-vPositionW); + +vec4 baseColor=vec4(1.,1.,1.,1.); +vec3 diffuseColor=vDiffuseColor.rgb; + +float alpha=vDiffuseColor.a; + +#ifdef NORMAL +vec3 normalW=normalize(vNormalW); +#else +vec3 normalW=normalize(-cross(dFdx(vPositionW),dFdy(vPositionW))); +#endif +#include +#ifdef TWOSIDEDLIGHTING +normalW=gl_FrontFacing ? normalW : -normalW; +#endif +#ifdef DIFFUSE +baseColor=texture2D(diffuseSampler,vDiffuseUV+uvOffset); +#if defined(ALPHATEST) && !defined(ALPHATEST_AFTERALLALPHACOMPUTATIONS) +if (baseColor.a +#ifdef VERTEXCOLOR +baseColor.rgb*=vColor.rgb; +#endif +#ifdef DETAIL +baseColor.rgb=baseColor.rgb*2.0*mix(0.5,detailColor.r,vDetailInfos.y); +#endif +#define CUSTOM_FRAGMENT_UPDATE_DIFFUSE + +vec3 baseAmbientColor=vec3(1.,1.,1.); +#ifdef AMBIENT +baseAmbientColor=texture2D(ambientSampler,vAmbientUV+uvOffset).rgb*vAmbientInfos.y; +#endif +#define CUSTOM_FRAGMENT_BEFORE_LIGHTS + +#ifdef SPECULARTERM +float glossiness=vSpecularColor.a; +vec3 specularColor=vSpecularColor.rgb; +#ifdef SPECULAR +vec4 specularMapColor=texture2D(specularSampler,vSpecularUV+uvOffset); +specularColor=specularMapColor.rgb; +#ifdef GLOSSINESS +glossiness=glossiness*specularMapColor.a; +#endif +#endif +#else +float glossiness=0.; +#endif + +vec3 diffuseBase=vec3(0.,0.,0.); +lightingInfo info; +#ifdef SPECULARTERM +vec3 specularBase=vec3(0.,0.,0.); +#endif +float shadow=1.; +#ifdef LIGHTMAP +vec4 lightmapColor=texture2D(lightmapSampler,vLightmapUV+uvOffset); +#ifdef RGBDLIGHTMAP +lightmapColor.rgb=fromRGBD(lightmapColor); +#endif +lightmapColor.rgb*=vLightmapInfos.y; +#endif +#include[0..maxSimultaneousLights] + +vec4 refractionColor=vec4(0.,0.,0.,1.); +#ifdef REFRACTION +vec3 refractionVector=normalize(refract(-viewDirectionW,normalW,vRefractionInfos.y)); +#ifdef REFRACTIONMAP_3D +refractionVector.y=refractionVector.y*vRefractionInfos.w; +if (dot(refractionVector,viewDirectionW)<1.0) { +refractionColor=textureCube(refractionCubeSampler,refractionVector); +} +#else +vec3 vRefractionUVW=vec3(refractionMatrix*(view*vec4(vPositionW+refractionVector*vRefractionInfos.z,1.0))); +vec2 refractionCoords=vRefractionUVW.xy/vRefractionUVW.z; +refractionCoords.y=1.0-refractionCoords.y; +refractionColor=texture2D(refraction2DSampler,refractionCoords); +#endif +#ifdef RGBDREFRACTION +refractionColor.rgb=fromRGBD(refractionColor); +#endif +#ifdef IS_REFRACTION_LINEAR +refractionColor.rgb=toGammaSpace(refractionColor.rgb); +#endif +refractionColor.rgb*=vRefractionInfos.x; +#endif + +vec4 reflectionColor=vec4(0.,0.,0.,1.); +#ifdef REFLECTION +vec3 vReflectionUVW=computeReflectionCoords(vec4(vPositionW,1.0),normalW); +#ifdef REFLECTIONMAP_3D +#ifdef ROUGHNESS +float bias=vReflectionInfos.y; +#ifdef SPECULARTERM +#ifdef SPECULAR +#ifdef GLOSSINESS +bias*=(1.0-specularMapColor.a); +#endif +#endif +#endif +reflectionColor=textureCube(reflectionCubeSampler,vReflectionUVW,bias); +#else +reflectionColor=textureCube(reflectionCubeSampler,vReflectionUVW); +#endif +#else +vec2 coords=vReflectionUVW.xy; +#ifdef REFLECTIONMAP_PROJECTION +coords/=vReflectionUVW.z; +#endif +coords.y=1.0-coords.y; +reflectionColor=texture2D(reflection2DSampler,coords); +#endif +#ifdef RGBDREFLECTION +reflectionColor.rgb=fromRGBD(reflectionColor); +#endif +#ifdef IS_REFLECTION_LINEAR +reflectionColor.rgb=toGammaSpace(reflectionColor.rgb); +#endif +reflectionColor.rgb*=vReflectionInfos.x; +#ifdef REFLECTIONFRESNEL +float reflectionFresnelTerm=computeFresnelTerm(viewDirectionW,normalW,reflectionRightColor.a,reflectionLeftColor.a); +#ifdef REFLECTIONFRESNELFROMSPECULAR +#ifdef SPECULARTERM +reflectionColor.rgb*=specularColor.rgb*(1.0-reflectionFresnelTerm)+reflectionFresnelTerm*reflectionRightColor.rgb; +#else +reflectionColor.rgb*=reflectionLeftColor.rgb*(1.0-reflectionFresnelTerm)+reflectionFresnelTerm*reflectionRightColor.rgb; +#endif +#else +reflectionColor.rgb*=reflectionLeftColor.rgb*(1.0-reflectionFresnelTerm)+reflectionFresnelTerm*reflectionRightColor.rgb; +#endif +#endif +#endif +#ifdef REFRACTIONFRESNEL +float refractionFresnelTerm=computeFresnelTerm(viewDirectionW,normalW,refractionRightColor.a,refractionLeftColor.a); +refractionColor.rgb*=refractionLeftColor.rgb*(1.0-refractionFresnelTerm)+refractionFresnelTerm*refractionRightColor.rgb; +#endif +#ifdef OPACITY +vec4 opacityMap=texture2D(opacitySampler,vOpacityUV+uvOffset); +#ifdef OPACITYRGB +opacityMap.rgb=opacityMap.rgb*vec3(0.3,0.59,0.11); +alpha*=(opacityMap.x+opacityMap.y+opacityMap.z)* vOpacityInfos.y; +#else +alpha*=opacityMap.a*vOpacityInfos.y; +#endif +#endif +#ifdef VERTEXALPHA +alpha*=vColor.a; +#endif +#ifdef OPACITYFRESNEL +float opacityFresnelTerm=computeFresnelTerm(viewDirectionW,normalW,opacityParts.z,opacityParts.w); +alpha+=opacityParts.x*(1.0-opacityFresnelTerm)+opacityFresnelTerm*opacityParts.y; +#endif +#ifdef ALPHATEST +#ifdef ALPHATEST_AFTERALLALPHACOMPUTATIONS +if (alpha +#include + + +#ifdef IMAGEPROCESSINGPOSTPROCESS +color.rgb=toLinearSpace(color.rgb); +#else +#ifdef IMAGEPROCESSING +color.rgb=toLinearSpace(color.rgb); +color=applyImageProcessing(color); +#endif +#endif +color.a*=visibility; +#ifdef PREMULTIPLYALPHA + +color.rgb*=color.a; +#endif +#define CUSTOM_FRAGMENT_BEFORE_FRAGCOLOR +#ifdef PREPASS +gl_FragData[0]=color; +#ifdef PREPASS_POSITION +gl_FragData[PREPASS_POSITION_INDEX]=vec4(vPositionW,1.0); +#endif +#ifdef PREPASS_VELOCITY +vec2 a=(vCurrentPosition.xy/vCurrentPosition.w)*0.5+0.5; +vec2 b=(vPreviousPosition.xy/vPreviousPosition.w)*0.5+0.5; +vec2 velocity=abs(a-b); +velocity=vec2(pow(velocity.x,1.0/3.0),pow(velocity.y,1.0/3.0))*sign(a-b)*0.5+0.5; +gl_FragData[PREPASS_VELOCITY_INDEX]=vec4(velocity,0.0,1.0); +#endif +#ifdef PREPASS_IRRADIANCE +gl_FragData[PREPASS_IRRADIANCE_INDEX]=vec4(0.0,0.0,0.0,1.0); +#endif +#ifdef PREPASS_DEPTHNORMAL +gl_FragData[PREPASS_DEPTHNORMAL_INDEX]=vec4(vViewPos.z,(view*vec4(normalW,0.0)).rgb); +#endif +#ifdef PREPASS_ALBEDO +gl_FragData[PREPASS_ALBEDO_INDEX]=vec4(0.0,0.0,0.0,1.0); +#endif +#ifdef PREPASS_REFLECTIVITY +#if defined(SPECULAR) +gl_FragData[PREPASS_REFLECTIVITY_INDEX]=specularMapColor; +#else +gl_FragData[PREPASS_REFLECTIVITY_INDEX]=vec4(0.0,0.0,0.0,1.0); +#endif +#endif +#endif +#if !defined(PREPASS) || defined(WEBGL2) +gl_FragColor=color; +#endif +} +`;E.a.ShadersStore.defaultPixelShader=N;var I=` +uniform mat4 viewProjection; +uniform mat4 view; +#ifdef DIFFUSE +uniform mat4 diffuseMatrix; +uniform vec2 vDiffuseInfos; +#endif +#ifdef AMBIENT +uniform mat4 ambientMatrix; +uniform vec2 vAmbientInfos; +#endif +#ifdef OPACITY +uniform mat4 opacityMatrix; +uniform vec2 vOpacityInfos; +#endif +#ifdef EMISSIVE +uniform vec2 vEmissiveInfos; +uniform mat4 emissiveMatrix; +#endif +#ifdef LIGHTMAP +uniform vec2 vLightmapInfos; +uniform mat4 lightmapMatrix; +#endif +#if defined(SPECULAR) && defined(SPECULARTERM) +uniform vec2 vSpecularInfos; +uniform mat4 specularMatrix; +#endif +#ifdef BUMP +uniform vec3 vBumpInfos; +uniform mat4 bumpMatrix; +#endif +#ifdef REFLECTION +uniform mat4 reflectionMatrix; +#endif +#ifdef POINTSIZE +uniform float pointSize; +#endif +`;E.a.IncludesShadersStore.defaultVertexDeclaration=I,f(78),f(79),f(163),f(164),f(117),f(137),f(93),f(94),f(100),f(80),f(81),f(165),f(156),f(111),f(157),f(138),E.a.IncludesShadersStore.pointCloudVertex=`#ifdef POINTSIZE +gl_PointSize=pointSize; +#endif`,f(158);var V=`#include<__decl__defaultVertex> + +#define CUSTOM_VERTEX_BEGIN +attribute vec3 position; +#ifdef NORMAL +attribute vec3 normal; +#endif +#ifdef TANGENT +attribute vec4 tangent; +#endif +#ifdef UV1 +attribute vec2 uv; +#endif +#ifdef UV2 +attribute vec2 uv2; +#endif +#ifdef VERTEXCOLOR +attribute vec4 color; +#endif +#include +#include + +#include +#include +#ifdef MAINUV1 +varying vec2 vMainUV1; +#endif +#ifdef MAINUV2 +varying vec2 vMainUV2; +#endif +#if defined(DIFFUSE) && DIFFUSEDIRECTUV == 0 +varying vec2 vDiffuseUV; +#endif +#if defined(DETAIL) && DETAILDIRECTUV == 0 +varying vec2 vDetailUV; +#endif +#if defined(AMBIENT) && AMBIENTDIRECTUV == 0 +varying vec2 vAmbientUV; +#endif +#if defined(OPACITY) && OPACITYDIRECTUV == 0 +varying vec2 vOpacityUV; +#endif +#if defined(EMISSIVE) && EMISSIVEDIRECTUV == 0 +varying vec2 vEmissiveUV; +#endif +#if defined(LIGHTMAP) && LIGHTMAPDIRECTUV == 0 +varying vec2 vLightmapUV; +#endif +#if defined(SPECULAR) && defined(SPECULARTERM) && SPECULARDIRECTUV == 0 +varying vec2 vSpecularUV; +#endif +#if defined(BUMP) && BUMPDIRECTUV == 0 +varying vec2 vBumpUV; +#endif + +varying vec3 vPositionW; +#ifdef NORMAL +varying vec3 vNormalW; +#endif +#ifdef VERTEXCOLOR +varying vec4 vColor; +#endif +#include +#include +#include +#include<__decl__lightFragment>[0..maxSimultaneousLights] +#include +#include[0..maxSimultaneousMorphTargets] +#ifdef REFLECTIONMAP_SKYBOX +varying vec3 vPositionUVW; +#endif +#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED) +varying vec3 vDirectionW; +#endif +#include +#define CUSTOM_VERTEX_DEFINITIONS +void main(void) { +#define CUSTOM_VERTEX_MAIN_BEGIN +vec3 positionUpdated=position; +#ifdef NORMAL +vec3 normalUpdated=normal; +#endif +#ifdef TANGENT +vec4 tangentUpdated=tangent; +#endif +#ifdef UV1 +vec2 uvUpdated=uv; +#endif +#include[0..maxSimultaneousMorphTargets] +#ifdef REFLECTIONMAP_SKYBOX +vPositionUVW=positionUpdated; +#endif +#define CUSTOM_VERTEX_UPDATE_POSITION +#define CUSTOM_VERTEX_UPDATE_NORMAL +#include +#if defined(PREPASS) && defined(PREPASS_VELOCITY) && !defined(BONES_VELOCITY_ENABLED) + +vCurrentPosition=viewProjection*finalWorld*vec4(positionUpdated,1.0); +vPreviousPosition=previousViewProjection*previousWorld*vec4(positionUpdated,1.0); +#endif +#include +vec4 worldPos=finalWorld*vec4(positionUpdated,1.0); +#ifdef NORMAL +mat3 normalWorld=mat3(finalWorld); +#if defined(INSTANCES) && defined(THIN_INSTANCES) +vNormalW=normalUpdated/vec3(dot(normalWorld[0],normalWorld[0]),dot(normalWorld[1],normalWorld[1]),dot(normalWorld[2],normalWorld[2])); +vNormalW=normalize(normalWorld*vNormalW); +#else +#ifdef NONUNIFORMSCALING +normalWorld=transposeMat3(inverseMat3(normalWorld)); +#endif +vNormalW=normalize(normalWorld*normalUpdated); +#endif +#endif +#define CUSTOM_VERTEX_UPDATE_WORLDPOS +#ifdef MULTIVIEW +if (gl_ViewID_OVR == 0u) { +gl_Position=viewProjection*worldPos; +} else { +gl_Position=viewProjectionR*worldPos; +} +#else +gl_Position=viewProjection*worldPos; +#endif +vPositionW=vec3(worldPos); +#include +#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED) +vDirectionW=normalize(vec3(finalWorld*vec4(positionUpdated,0.0))); +#endif + +#ifndef UV1 +vec2 uvUpdated=vec2(0.,0.); +#endif +#ifndef UV2 +vec2 uv2=vec2(0.,0.); +#endif +#ifdef MAINUV1 +vMainUV1=uvUpdated; +#endif +#ifdef MAINUV2 +vMainUV2=uv2; +#endif +#if defined(DIFFUSE) && DIFFUSEDIRECTUV == 0 +if (vDiffuseInfos.x == 0.) +{ +vDiffuseUV=vec2(diffuseMatrix*vec4(uvUpdated,1.0,0.0)); +} +else +{ +vDiffuseUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0)); +} +#endif +#if defined(DETAIL) && DETAILDIRECTUV == 0 +if (vDetailInfos.x == 0.) +{ +vDetailUV=vec2(detailMatrix*vec4(uvUpdated,1.0,0.0)); +} +else +{ +vDetailUV=vec2(detailMatrix*vec4(uv2,1.0,0.0)); +} +#endif +#if defined(AMBIENT) && AMBIENTDIRECTUV == 0 +if (vAmbientInfos.x == 0.) +{ +vAmbientUV=vec2(ambientMatrix*vec4(uvUpdated,1.0,0.0)); +} +else +{ +vAmbientUV=vec2(ambientMatrix*vec4(uv2,1.0,0.0)); +} +#endif +#if defined(OPACITY) && OPACITYDIRECTUV == 0 +if (vOpacityInfos.x == 0.) +{ +vOpacityUV=vec2(opacityMatrix*vec4(uvUpdated,1.0,0.0)); +} +else +{ +vOpacityUV=vec2(opacityMatrix*vec4(uv2,1.0,0.0)); +} +#endif +#if defined(EMISSIVE) && EMISSIVEDIRECTUV == 0 +if (vEmissiveInfos.x == 0.) +{ +vEmissiveUV=vec2(emissiveMatrix*vec4(uvUpdated,1.0,0.0)); +} +else +{ +vEmissiveUV=vec2(emissiveMatrix*vec4(uv2,1.0,0.0)); +} +#endif +#if defined(LIGHTMAP) && LIGHTMAPDIRECTUV == 0 +if (vLightmapInfos.x == 0.) +{ +vLightmapUV=vec2(lightmapMatrix*vec4(uvUpdated,1.0,0.0)); +} +else +{ +vLightmapUV=vec2(lightmapMatrix*vec4(uv2,1.0,0.0)); +} +#endif +#if defined(SPECULAR) && defined(SPECULARTERM) && SPECULARDIRECTUV == 0 +if (vSpecularInfos.x == 0.) +{ +vSpecularUV=vec2(specularMatrix*vec4(uvUpdated,1.0,0.0)); +} +else +{ +vSpecularUV=vec2(specularMatrix*vec4(uv2,1.0,0.0)); +} +#endif +#if defined(BUMP) && BUMPDIRECTUV == 0 +if (vBumpInfos.x == 0.) +{ +vBumpUV=vec2(bumpMatrix*vec4(uvUpdated,1.0,0.0)); +} +else +{ +vBumpUV=vec2(bumpMatrix*vec4(uv2,1.0,0.0)); +} +#endif +#include +#include +#include +#include[0..maxSimultaneousLights] +#ifdef VERTEXCOLOR + +vColor=color; +#endif +#include +#include +#define CUSTOM_VERTEX_MAIN_END +} +`;E.a.ShadersStore.defaultVertexShader=V;var X=f(2),j=f(67),ne=f(92),te={effect:null,subMesh:null},de=function(ae){function ee(){var K=ae.call(this)||this;return K.MAINUV1=!1,K.MAINUV2=!1,K.DIFFUSE=!1,K.DIFFUSEDIRECTUV=0,K.DETAIL=!1,K.DETAILDIRECTUV=0,K.DETAIL_NORMALBLENDMETHOD=0,K.AMBIENT=!1,K.AMBIENTDIRECTUV=0,K.OPACITY=!1,K.OPACITYDIRECTUV=0,K.OPACITYRGB=!1,K.REFLECTION=!1,K.EMISSIVE=!1,K.EMISSIVEDIRECTUV=0,K.SPECULAR=!1,K.SPECULARDIRECTUV=0,K.BUMP=!1,K.BUMPDIRECTUV=0,K.PARALLAX=!1,K.PARALLAXOCCLUSION=!1,K.SPECULAROVERALPHA=!1,K.CLIPPLANE=!1,K.CLIPPLANE2=!1,K.CLIPPLANE3=!1,K.CLIPPLANE4=!1,K.CLIPPLANE5=!1,K.CLIPPLANE6=!1,K.ALPHATEST=!1,K.DEPTHPREPASS=!1,K.ALPHAFROMDIFFUSE=!1,K.POINTSIZE=!1,K.FOG=!1,K.SPECULARTERM=!1,K.DIFFUSEFRESNEL=!1,K.OPACITYFRESNEL=!1,K.REFLECTIONFRESNEL=!1,K.REFRACTIONFRESNEL=!1,K.EMISSIVEFRESNEL=!1,K.FRESNEL=!1,K.NORMAL=!1,K.UV1=!1,K.UV2=!1,K.VERTEXCOLOR=!1,K.VERTEXALPHA=!1,K.NUM_BONE_INFLUENCERS=0,K.BonesPerMesh=0,K.BONETEXTURE=!1,K.BONES_VELOCITY_ENABLED=!1,K.INSTANCES=!1,K.THIN_INSTANCES=!1,K.GLOSSINESS=!1,K.ROUGHNESS=!1,K.EMISSIVEASILLUMINATION=!1,K.LINKEMISSIVEWITHDIFFUSE=!1,K.REFLECTIONFRESNELFROMSPECULAR=!1,K.LIGHTMAP=!1,K.LIGHTMAPDIRECTUV=0,K.OBJECTSPACE_NORMALMAP=!1,K.USELIGHTMAPASSHADOWMAP=!1,K.REFLECTIONMAP_3D=!1,K.REFLECTIONMAP_SPHERICAL=!1,K.REFLECTIONMAP_PLANAR=!1,K.REFLECTIONMAP_CUBIC=!1,K.USE_LOCAL_REFLECTIONMAP_CUBIC=!1,K.REFLECTIONMAP_PROJECTION=!1,K.REFLECTIONMAP_SKYBOX=!1,K.REFLECTIONMAP_EXPLICIT=!1,K.REFLECTIONMAP_EQUIRECTANGULAR=!1,K.REFLECTIONMAP_EQUIRECTANGULAR_FIXED=!1,K.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED=!1,K.INVERTCUBICMAP=!1,K.LOGARITHMICDEPTH=!1,K.REFRACTION=!1,K.REFRACTIONMAP_3D=!1,K.REFLECTIONOVERALPHA=!1,K.TWOSIDEDLIGHTING=!1,K.SHADOWFLOAT=!1,K.MORPHTARGETS=!1,K.MORPHTARGETS_NORMAL=!1,K.MORPHTARGETS_TANGENT=!1,K.MORPHTARGETS_UV=!1,K.NUM_MORPH_INFLUENCERS=0,K.NONUNIFORMSCALING=!1,K.PREMULTIPLYALPHA=!1,K.ALPHATEST_AFTERALLALPHACOMPUTATIONS=!1,K.ALPHABLEND=!0,K.PREPASS=!1,K.PREPASS_IRRADIANCE=!1,K.PREPASS_IRRADIANCE_INDEX=-1,K.PREPASS_ALBEDO=!1,K.PREPASS_ALBEDO_INDEX=-1,K.PREPASS_DEPTHNORMAL=!1,K.PREPASS_DEPTHNORMAL_INDEX=-1,K.PREPASS_POSITION=!1,K.PREPASS_POSITION_INDEX=-1,K.PREPASS_VELOCITY=!1,K.PREPASS_VELOCITY_INDEX=-1,K.PREPASS_REFLECTIVITY=!1,K.PREPASS_REFLECTIVITY_INDEX=-1,K.SCENE_MRT_COUNT=0,K.RGBDLIGHTMAP=!1,K.RGBDREFLECTION=!1,K.RGBDREFRACTION=!1,K.IMAGEPROCESSING=!1,K.VIGNETTE=!1,K.VIGNETTEBLENDMODEMULTIPLY=!1,K.VIGNETTEBLENDMODEOPAQUE=!1,K.TONEMAPPING=!1,K.TONEMAPPING_ACES=!1,K.CONTRAST=!1,K.COLORCURVES=!1,K.COLORGRADING=!1,K.COLORGRADING3D=!1,K.SAMPLER3DGREENDEPTH=!1,K.SAMPLER3DBGRMAP=!1,K.IMAGEPROCESSINGPOSTPROCESS=!1,K.MULTIVIEW=!1,K.IS_REFLECTION_LINEAR=!1,K.IS_REFRACTION_LINEAR=!1,K.EXPOSURE=!1,K.rebuild(),K}return Object(U.d)(ee,ae),ee.prototype.setReflectionMode=function(K){for(var $=0,L=["REFLECTIONMAP_CUBIC","REFLECTIONMAP_EXPLICIT","REFLECTIONMAP_PLANAR","REFLECTIONMAP_PROJECTION","REFLECTIONMAP_PROJECTION","REFLECTIONMAP_SKYBOX","REFLECTIONMAP_SPHERICAL","REFLECTIONMAP_EQUIRECTANGULAR","REFLECTIONMAP_EQUIRECTANGULAR_FIXED","REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED"];$0,Q.REFLECTIONOVERALPHA=this._useReflectionOverAlpha,Q.INVERTCUBICMAP=this._reflectionTexture.coordinatesMode===l.a.INVCUBIC_MODE,Q.REFLECTIONMAP_3D=this._reflectionTexture.isCube,Q.RGBDREFLECTION=this._reflectionTexture.isRGBD,this._reflectionTexture.coordinatesMode){case l.a.EXPLICIT_MODE:Q.setReflectionMode("REFLECTIONMAP_EXPLICIT");break;case l.a.PLANAR_MODE:Q.setReflectionMode("REFLECTIONMAP_PLANAR");break;case l.a.PROJECTION_MODE:Q.setReflectionMode("REFLECTIONMAP_PROJECTION");break;case l.a.SKYBOX_MODE:Q.setReflectionMode("REFLECTIONMAP_SKYBOX");break;case l.a.SPHERICAL_MODE:Q.setReflectionMode("REFLECTIONMAP_SPHERICAL");break;case l.a.EQUIRECTANGULAR_MODE:Q.setReflectionMode("REFLECTIONMAP_EQUIRECTANGULAR");break;case l.a.FIXED_EQUIRECTANGULAR_MODE:Q.setReflectionMode("REFLECTIONMAP_EQUIRECTANGULAR_FIXED");break;case l.a.FIXED_EQUIRECTANGULAR_MIRRORED_MODE:Q.setReflectionMode("REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED");break;case l.a.CUBIC_MODE:case l.a.INVCUBIC_MODE:default:Q.setReflectionMode("REFLECTIONMAP_CUBIC")}Q.USE_LOCAL_REFLECTIONMAP_CUBIC=!!this._reflectionTexture.boundingBoxSize}else Q.REFLECTION=!1;if(this._emissiveTexture&&ee.EmissiveTextureEnabled){if(!this._emissiveTexture.isReadyOrNotBlocking())return!1;g.a.PrepareDefinesForMergedUV(this._emissiveTexture,Q,"EMISSIVE")}else Q.EMISSIVE=!1;if(this._lightmapTexture&&ee.LightmapTextureEnabled){if(!this._lightmapTexture.isReadyOrNotBlocking())return!1;g.a.PrepareDefinesForMergedUV(this._lightmapTexture,Q,"LIGHTMAP"),Q.USELIGHTMAPASSHADOWMAP=this._useLightmapAsShadowmap,Q.RGBDLIGHTMAP=this._lightmapTexture.isRGBD}else Q.LIGHTMAP=!1;if(this._specularTexture&&ee.SpecularTextureEnabled){if(!this._specularTexture.isReadyOrNotBlocking())return!1;g.a.PrepareDefinesForMergedUV(this._specularTexture,Q,"SPECULAR"),Q.GLOSSINESS=this._useGlossinessFromSpecularMapAlpha}else Q.SPECULAR=!1;if(G.getEngine().getCaps().standardDerivatives&&this._bumpTexture&&ee.BumpTextureEnabled){if(!this._bumpTexture.isReady())return!1;g.a.PrepareDefinesForMergedUV(this._bumpTexture,Q,"BUMP"),Q.PARALLAX=this._useParallax,Q.PARALLAXOCCLUSION=this._useParallaxOcclusion,Q.OBJECTSPACE_NORMALMAP=this._useObjectSpaceNormalMap}else Q.BUMP=!1;if(this._refractionTexture&&ee.RefractionTextureEnabled){if(!this._refractionTexture.isReadyOrNotBlocking())return!1;Q._needUVs=!0,Q.REFRACTION=!0,Q.REFRACTIONMAP_3D=this._refractionTexture.isCube,Q.RGBDREFRACTION=this._refractionTexture.isRGBD}else Q.REFRACTION=!1;Q.TWOSIDEDLIGHTING=!this._backFaceCulling&&this._twoSidedLighting}else Q.DIFFUSE=!1,Q.AMBIENT=!1,Q.OPACITY=!1,Q.REFLECTION=!1,Q.EMISSIVE=!1,Q.LIGHTMAP=!1,Q.BUMP=!1,Q.REFRACTION=!1;Q.ALPHAFROMDIFFUSE=this._shouldUseAlphaFromDiffuseTexture(),Q.EMISSIVEASILLUMINATION=this._useEmissiveAsIllumination,Q.LINKEMISSIVEWITHDIFFUSE=this._linkEmissiveWithDiffuse,Q.SPECULAROVERALPHA=this._useSpecularOverAlpha,Q.PREMULTIPLYALPHA=this.alphaMode===X.a.ALPHA_PREMULTIPLIED||this.alphaMode===X.a.ALPHA_PREMULTIPLIED_PORTERDUFF,Q.ALPHATEST_AFTERALLALPHACOMPUTATIONS=this.transparencyMode!==null,Q.ALPHABLEND=this.transparencyMode===null||this.needAlphaBlendingForMesh(K)}if(!this.detailMap.isReadyForSubMesh(Q,G))return!1;if(Q._areImageProcessingDirty&&this._imageProcessingConfiguration){if(!this._imageProcessingConfiguration.isReady())return!1;this._imageProcessingConfiguration.prepareDefines(Q),Q.IS_REFLECTION_LINEAR=this.reflectionTexture!=null&&!this.reflectionTexture.gammaSpace,Q.IS_REFRACTION_LINEAR=this.refractionTexture!=null&&!this.refractionTexture.gammaSpace}if(Q._areFresnelDirty&&(ee.FresnelEnabled?(this._diffuseFresnelParameters||this._opacityFresnelParameters||this._emissiveFresnelParameters||this._refractionFresnelParameters||this._reflectionFresnelParameters)&&(Q.DIFFUSEFRESNEL=this._diffuseFresnelParameters&&this._diffuseFresnelParameters.isEnabled,Q.OPACITYFRESNEL=this._opacityFresnelParameters&&this._opacityFresnelParameters.isEnabled,Q.REFLECTIONFRESNEL=this._reflectionFresnelParameters&&this._reflectionFresnelParameters.isEnabled,Q.REFLECTIONFRESNELFROMSPECULAR=this._useReflectionFresnelFromSpecular,Q.REFRACTIONFRESNEL=this._refractionFresnelParameters&&this._refractionFresnelParameters.isEnabled,Q.EMISSIVEFRESNEL=this._emissiveFresnelParameters&&this._emissiveFresnelParameters.isEnabled,Q._needNormals=!0,Q.FRESNEL=!0):Q.FRESNEL=!1),g.a.PrepareDefinesForMisc(K,G,this._useLogarithmicDepth,this.pointsCloud,this.fogEnabled,this._shouldTurnAlphaTestOn(K)||this._forceAlphaTest,Q),g.a.PrepareDefinesForAttributes(K,Q,!0,!0,!0),g.a.PrepareDefinesForFrameBoundValues(G,oe,Q,L,null,$.getRenderingMesh().hasThinInstances),this.detailMap.prepareDefines(Q,G),Q.isDirty){var re=Q._areLightsDisposed;Q.markAsProcessed();var Y=new j.a;Q.REFLECTION&&Y.addFallback(0,"REFLECTION"),Q.SPECULAR&&Y.addFallback(0,"SPECULAR"),Q.BUMP&&Y.addFallback(0,"BUMP"),Q.PARALLAX&&Y.addFallback(1,"PARALLAX"),Q.PARALLAXOCCLUSION&&Y.addFallback(0,"PARALLAXOCCLUSION"),Q.SPECULAROVERALPHA&&Y.addFallback(0,"SPECULAROVERALPHA"),Q.FOG&&Y.addFallback(1,"FOG"),Q.POINTSIZE&&Y.addFallback(0,"POINTSIZE"),Q.LOGARITHMICDEPTH&&Y.addFallback(0,"LOGARITHMICDEPTH"),g.a.HandleFallbacksForShadows(Q,Y,this._maxSimultaneousLights),Q.SPECULARTERM&&Y.addFallback(0,"SPECULARTERM"),Q.DIFFUSEFRESNEL&&Y.addFallback(1,"DIFFUSEFRESNEL"),Q.OPACITYFRESNEL&&Y.addFallback(2,"OPACITYFRESNEL"),Q.REFLECTIONFRESNEL&&Y.addFallback(3,"REFLECTIONFRESNEL"),Q.EMISSIVEFRESNEL&&Y.addFallback(4,"EMISSIVEFRESNEL"),Q.FRESNEL&&Y.addFallback(4,"FRESNEL"),Q.MULTIVIEW&&Y.addFallback(0,"MULTIVIEW");var k=[P.b.PositionKind];Q.NORMAL&&k.push(P.b.NormalKind),Q.UV1&&k.push(P.b.UVKind),Q.UV2&&k.push(P.b.UV2Kind),Q.VERTEXCOLOR&&k.push(P.b.ColorKind),g.a.PrepareAttributesForBones(k,K,Q,Y),g.a.PrepareAttributesForInstances(k,Q),g.a.PrepareAttributesForMorphTargets(k,K,Q);var H="default",Z=["world","view","viewProjection","vEyePosition","vLightsType","vAmbientColor","vDiffuseColor","vSpecularColor","vEmissiveColor","visibility","vFogInfos","vFogColor","pointSize","vDiffuseInfos","vAmbientInfos","vOpacityInfos","vReflectionInfos","vEmissiveInfos","vSpecularInfos","vBumpInfos","vLightmapInfos","vRefractionInfos","mBones","vClipPlane","vClipPlane2","vClipPlane3","vClipPlane4","vClipPlane5","vClipPlane6","diffuseMatrix","ambientMatrix","opacityMatrix","reflectionMatrix","emissiveMatrix","specularMatrix","bumpMatrix","normalMatrix","lightmapMatrix","refractionMatrix","diffuseLeftColor","diffuseRightColor","opacityParts","reflectionLeftColor","reflectionRightColor","emissiveLeftColor","emissiveRightColor","refractionLeftColor","refractionRightColor","vReflectionPosition","vReflectionSize","logarithmicDepthConstant","vTangentSpaceParams","alphaCutOff","boneTextureWidth"],W=["diffuseSampler","ambientSampler","opacitySampler","reflectionCubeSampler","reflection2DSampler","emissiveSampler","specularSampler","bumpSampler","lightmapSampler","refractionCubeSampler","refraction2DSampler","boneSampler"],q=["Material","Scene"];ne.a.AddUniforms(Z),ne.a.AddSamplers(W),m.a.AddUniforms(Z),m.a.AddSamplers(Z),c.a&&(c.a.PrepareUniforms(Z,Q),c.a.PrepareSamplers(W,Q)),g.a.PrepareUniformsAndSamplersList({uniformsNames:Z,uniformBuffersNames:q,samplers:W,defines:Q,maxSimultaneousLights:this._maxSimultaneousLights});var he={};this.customShaderNameResolve&&(H=this.customShaderNameResolve(H,Z,q,W,Q,k,he));var ge=Q.toString(),me=$.effect,_e=G.getEngine().createEffect(H,{attributes:k,uniformsNames:Z,uniformBuffersNames:q,samplers:W,defines:ge,fallbacks:Y,onCompiled:this.onCompiled,onError:this.onError,indexParameters:{maxSimultaneousLights:this._maxSimultaneousLights,maxSimultaneousMorphTargets:Q.NUM_MORPH_INFLUENCERS},processFinalCode:he.processFinalCode,multiTarget:Q.PREPASS},oe);if(_e)if(this._onEffectCreatedObservable&&(te.effect=_e,te.subMesh=$,this._onEffectCreatedObservable.notifyObservers(te)),this.allowShaderHotSwapping&&me&&!_e.isReady()){if(_e=me,this._rebuildInParallel=!0,Q.markAsUnprocessed(),re)return Q._areLightsDisposed=!0,!1}else this._rebuildInParallel=!1,G.resetCachedMaterial(),$.setEffect(_e,Q),this.buildUniformLayout()}return!(!$.effect||!$.effect.isReady())&&(Q._renderId=G.getRenderId(),$.effect._wasPreviouslyReady=!0,!0)},ee.prototype.buildUniformLayout=function(){var K=this._uniformBuffer;K.addUniform("diffuseLeftColor",4),K.addUniform("diffuseRightColor",4),K.addUniform("opacityParts",4),K.addUniform("reflectionLeftColor",4),K.addUniform("reflectionRightColor",4),K.addUniform("refractionLeftColor",4),K.addUniform("refractionRightColor",4),K.addUniform("emissiveLeftColor",4),K.addUniform("emissiveRightColor",4),K.addUniform("vDiffuseInfos",2),K.addUniform("vAmbientInfos",2),K.addUniform("vOpacityInfos",2),K.addUniform("vReflectionInfos",2),K.addUniform("vReflectionPosition",3),K.addUniform("vReflectionSize",3),K.addUniform("vEmissiveInfos",2),K.addUniform("vLightmapInfos",2),K.addUniform("vSpecularInfos",2),K.addUniform("vBumpInfos",3),K.addUniform("diffuseMatrix",16),K.addUniform("ambientMatrix",16),K.addUniform("opacityMatrix",16),K.addUniform("reflectionMatrix",16),K.addUniform("emissiveMatrix",16),K.addUniform("lightmapMatrix",16),K.addUniform("specularMatrix",16),K.addUniform("bumpMatrix",16),K.addUniform("vTangentSpaceParams",2),K.addUniform("pointSize",1),K.addUniform("refractionMatrix",16),K.addUniform("vRefractionInfos",4),K.addUniform("vSpecularColor",4),K.addUniform("vEmissiveColor",3),K.addUniform("visibility",1),K.addUniform("vDiffuseColor",4),ne.a.PrepareUniformBuffer(K),K.create()},ee.prototype.unbind=function(){if(this._activeEffect){var K=!1;this._reflectionTexture&&this._reflectionTexture.isRenderTarget&&(this._activeEffect.setTexture("reflection2DSampler",null),K=!0),this._refractionTexture&&this._refractionTexture.isRenderTarget&&(this._activeEffect.setTexture("refraction2DSampler",null),K=!0),K&&this._markAllSubMeshesAsTexturesDirty()}ae.prototype.unbind.call(this)},ee.prototype.bindForSubMesh=function(K,$,L){var G=this.getScene(),Q=L._materialDefines;if(Q){var oe=L.effect;if(oe){this._activeEffect=oe,Q.INSTANCES&&!Q.THIN_INSTANCES||this.bindOnlyWorldMatrix(K),this.prePassConfiguration.bindForSubMesh(this._activeEffect,G,$,K,this.isFrozen),Q.OBJECTSPACE_NORMALMAP&&(K.toNormalMatrix(this._normalMatrix),this.bindOnlyNormalMatrix(this._normalMatrix));var re=this._mustRebind(G,oe,$.visibility);g.a.BindBonesParameters($,oe);var Y=this._uniformBuffer;if(re){if(Y.bindToEffect(oe,"Material"),this.bindViewProjection(oe),!Y.useUbo||!this.isFrozen||!Y.isSync){if(ee.FresnelEnabled&&Q.FRESNEL&&(this.diffuseFresnelParameters&&this.diffuseFresnelParameters.isEnabled&&(Y.updateColor4("diffuseLeftColor",this.diffuseFresnelParameters.leftColor,this.diffuseFresnelParameters.power),Y.updateColor4("diffuseRightColor",this.diffuseFresnelParameters.rightColor,this.diffuseFresnelParameters.bias)),this.opacityFresnelParameters&&this.opacityFresnelParameters.isEnabled&&Y.updateColor4("opacityParts",new C.a(this.opacityFresnelParameters.leftColor.toLuminance(),this.opacityFresnelParameters.rightColor.toLuminance(),this.opacityFresnelParameters.bias),this.opacityFresnelParameters.power),this.reflectionFresnelParameters&&this.reflectionFresnelParameters.isEnabled&&(Y.updateColor4("reflectionLeftColor",this.reflectionFresnelParameters.leftColor,this.reflectionFresnelParameters.power),Y.updateColor4("reflectionRightColor",this.reflectionFresnelParameters.rightColor,this.reflectionFresnelParameters.bias)),this.refractionFresnelParameters&&this.refractionFresnelParameters.isEnabled&&(Y.updateColor4("refractionLeftColor",this.refractionFresnelParameters.leftColor,this.refractionFresnelParameters.power),Y.updateColor4("refractionRightColor",this.refractionFresnelParameters.rightColor,this.refractionFresnelParameters.bias)),this.emissiveFresnelParameters&&this.emissiveFresnelParameters.isEnabled&&(Y.updateColor4("emissiveLeftColor",this.emissiveFresnelParameters.leftColor,this.emissiveFresnelParameters.power),Y.updateColor4("emissiveRightColor",this.emissiveFresnelParameters.rightColor,this.emissiveFresnelParameters.bias))),G.texturesEnabled){if(this._diffuseTexture&&ee.DiffuseTextureEnabled&&(Y.updateFloat2("vDiffuseInfos",this._diffuseTexture.coordinatesIndex,this._diffuseTexture.level),g.a.BindTextureMatrix(this._diffuseTexture,Y,"diffuse")),this._ambientTexture&&ee.AmbientTextureEnabled&&(Y.updateFloat2("vAmbientInfos",this._ambientTexture.coordinatesIndex,this._ambientTexture.level),g.a.BindTextureMatrix(this._ambientTexture,Y,"ambient")),this._opacityTexture&&ee.OpacityTextureEnabled&&(Y.updateFloat2("vOpacityInfos",this._opacityTexture.coordinatesIndex,this._opacityTexture.level),g.a.BindTextureMatrix(this._opacityTexture,Y,"opacity")),this._hasAlphaChannel()&&oe.setFloat("alphaCutOff",this.alphaCutOff),this._reflectionTexture&&ee.ReflectionTextureEnabled&&(Y.updateFloat2("vReflectionInfos",this._reflectionTexture.level,this.roughness),Y.updateMatrix("reflectionMatrix",this._reflectionTexture.getReflectionTextureMatrix()),this._reflectionTexture.boundingBoxSize)){var k=this._reflectionTexture;Y.updateVector3("vReflectionPosition",k.boundingBoxPosition),Y.updateVector3("vReflectionSize",k.boundingBoxSize)}if(this._emissiveTexture&&ee.EmissiveTextureEnabled&&(Y.updateFloat2("vEmissiveInfos",this._emissiveTexture.coordinatesIndex,this._emissiveTexture.level),g.a.BindTextureMatrix(this._emissiveTexture,Y,"emissive")),this._lightmapTexture&&ee.LightmapTextureEnabled&&(Y.updateFloat2("vLightmapInfos",this._lightmapTexture.coordinatesIndex,this._lightmapTexture.level),g.a.BindTextureMatrix(this._lightmapTexture,Y,"lightmap")),this._specularTexture&&ee.SpecularTextureEnabled&&(Y.updateFloat2("vSpecularInfos",this._specularTexture.coordinatesIndex,this._specularTexture.level),g.a.BindTextureMatrix(this._specularTexture,Y,"specular")),this._bumpTexture&&G.getEngine().getCaps().standardDerivatives&&ee.BumpTextureEnabled&&(Y.updateFloat3("vBumpInfos",this._bumpTexture.coordinatesIndex,1/this._bumpTexture.level,this.parallaxScaleBias),g.a.BindTextureMatrix(this._bumpTexture,Y,"bump"),G._mirroredCameraPosition?Y.updateFloat2("vTangentSpaceParams",this._invertNormalMapX?1:-1,this._invertNormalMapY?1:-1):Y.updateFloat2("vTangentSpaceParams",this._invertNormalMapX?-1:1,this._invertNormalMapY?-1:1)),this._refractionTexture&&ee.RefractionTextureEnabled){var H=1;this._refractionTexture.isCube||(Y.updateMatrix("refractionMatrix",this._refractionTexture.getReflectionTextureMatrix()),this._refractionTexture.depth&&(H=this._refractionTexture.depth)),Y.updateFloat4("vRefractionInfos",this._refractionTexture.level,this.indexOfRefraction,H,this.invertRefractionY?-1:1)}}this.pointsCloud&&Y.updateFloat("pointSize",this.pointSize),Q.SPECULARTERM&&Y.updateColor4("vSpecularColor",this.specularColor,this.specularPower),Y.updateColor3("vEmissiveColor",ee.EmissiveTextureEnabled?this.emissiveColor:C.a.BlackReadOnly),Y.updateColor4("vDiffuseColor",this.diffuseColor,this.alpha)}Y.updateFloat("visibility",$.visibility),G.texturesEnabled&&(this._diffuseTexture&&ee.DiffuseTextureEnabled&&oe.setTexture("diffuseSampler",this._diffuseTexture),this._ambientTexture&&ee.AmbientTextureEnabled&&oe.setTexture("ambientSampler",this._ambientTexture),this._opacityTexture&&ee.OpacityTextureEnabled&&oe.setTexture("opacitySampler",this._opacityTexture),this._reflectionTexture&&ee.ReflectionTextureEnabled&&(this._reflectionTexture.isCube?oe.setTexture("reflectionCubeSampler",this._reflectionTexture):oe.setTexture("reflection2DSampler",this._reflectionTexture)),this._emissiveTexture&&ee.EmissiveTextureEnabled&&oe.setTexture("emissiveSampler",this._emissiveTexture),this._lightmapTexture&&ee.LightmapTextureEnabled&&oe.setTexture("lightmapSampler",this._lightmapTexture),this._specularTexture&&ee.SpecularTextureEnabled&&oe.setTexture("specularSampler",this._specularTexture),this._bumpTexture&&G.getEngine().getCaps().standardDerivatives&&ee.BumpTextureEnabled&&oe.setTexture("bumpSampler",this._bumpTexture),this._refractionTexture&&ee.RefractionTextureEnabled)&&(H=1,this._refractionTexture.isCube?oe.setTexture("refractionCubeSampler",this._refractionTexture):oe.setTexture("refraction2DSampler",this._refractionTexture)),this.detailMap.bindForSubMesh(Y,G,this.isFrozen),g.a.BindClipPlane(oe,G),G.ambientColor.multiplyToRef(this.ambientColor,this._globalAmbientColor),g.a.BindEyePosition(oe,G),oe.setColor3("vAmbientColor",this._globalAmbientColor)}!re&&this.isFrozen||(G.lightsEnabled&&!this._disableLighting&&g.a.BindLights(G,$,oe,Q,this._maxSimultaneousLights,this._rebuildInParallel),(G.fogEnabled&&$.applyFog&&G.fogMode!==u.a.FOGMODE_NONE||this._reflectionTexture||this._refractionTexture)&&this.bindView(oe),g.a.BindFogParameters(G,$,oe),Q.NUM_MORPH_INFLUENCERS&&g.a.BindMorphTargetParameters($,oe),this.useLogarithmicDepth&&g.a.BindLogDepth(Q,oe,G),this._imageProcessingConfiguration&&!this._imageProcessingConfiguration.applyByPostProcess&&this._imageProcessingConfiguration.bind(this._activeEffect)),Y.update(),this._afterBind($,this._activeEffect)}}},ee.prototype.getAnimatables=function(){var K=[];return this._diffuseTexture&&this._diffuseTexture.animations&&this._diffuseTexture.animations.length>0&&K.push(this._diffuseTexture),this._ambientTexture&&this._ambientTexture.animations&&this._ambientTexture.animations.length>0&&K.push(this._ambientTexture),this._opacityTexture&&this._opacityTexture.animations&&this._opacityTexture.animations.length>0&&K.push(this._opacityTexture),this._reflectionTexture&&this._reflectionTexture.animations&&this._reflectionTexture.animations.length>0&&K.push(this._reflectionTexture),this._emissiveTexture&&this._emissiveTexture.animations&&this._emissiveTexture.animations.length>0&&K.push(this._emissiveTexture),this._specularTexture&&this._specularTexture.animations&&this._specularTexture.animations.length>0&&K.push(this._specularTexture),this._bumpTexture&&this._bumpTexture.animations&&this._bumpTexture.animations.length>0&&K.push(this._bumpTexture),this._lightmapTexture&&this._lightmapTexture.animations&&this._lightmapTexture.animations.length>0&&K.push(this._lightmapTexture),this._refractionTexture&&this._refractionTexture.animations&&this._refractionTexture.animations.length>0&&K.push(this._refractionTexture),this.detailMap.getAnimatables(K),K},ee.prototype.getActiveTextures=function(){var K=ae.prototype.getActiveTextures.call(this);return this._diffuseTexture&&K.push(this._diffuseTexture),this._ambientTexture&&K.push(this._ambientTexture),this._opacityTexture&&K.push(this._opacityTexture),this._reflectionTexture&&K.push(this._reflectionTexture),this._emissiveTexture&&K.push(this._emissiveTexture),this._specularTexture&&K.push(this._specularTexture),this._bumpTexture&&K.push(this._bumpTexture),this._lightmapTexture&&K.push(this._lightmapTexture),this._refractionTexture&&K.push(this._refractionTexture),this.detailMap.getActiveTextures(K),K},ee.prototype.hasTexture=function(K){return!!ae.prototype.hasTexture.call(this,K)||this._diffuseTexture===K||this._ambientTexture===K||this._opacityTexture===K||this._reflectionTexture===K||this._emissiveTexture===K||this._specularTexture===K||this._bumpTexture===K||this._lightmapTexture===K||this._refractionTexture===K||this.detailMap.hasTexture(K)},ee.prototype.dispose=function(K,$){var L,G,Q,oe,re,Y,k,H,Z;$&&((L=this._diffuseTexture)===null||L===void 0||L.dispose(),(G=this._ambientTexture)===null||G===void 0||G.dispose(),(Q=this._opacityTexture)===null||Q===void 0||Q.dispose(),(oe=this._reflectionTexture)===null||oe===void 0||oe.dispose(),(re=this._emissiveTexture)===null||re===void 0||re.dispose(),(Y=this._specularTexture)===null||Y===void 0||Y.dispose(),(k=this._bumpTexture)===null||k===void 0||k.dispose(),(H=this._lightmapTexture)===null||H===void 0||H.dispose(),(Z=this._refractionTexture)===null||Z===void 0||Z.dispose()),this.detailMap.dispose($),this._imageProcessingConfiguration&&this._imageProcessingObserver&&this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver),ae.prototype.dispose.call(this,K,$)},ee.prototype.clone=function(K){var $=this,L=_.a.Clone(function(){return new ee(K,$.getScene())},this);return L.name=K,L.id=K,L},ee.prototype.serialize=function(){return _.a.Serialize(this)},ee.Parse=function(K,$,L){return _.a.Parse(function(){return new ee(K.name,$)},K,$,L)},Object.defineProperty(ee,"DiffuseTextureEnabled",{get:function(){return v.a.DiffuseTextureEnabled},set:function(K){v.a.DiffuseTextureEnabled=K},enumerable:!1,configurable:!0}),Object.defineProperty(ee,"DetailTextureEnabled",{get:function(){return v.a.DetailTextureEnabled},set:function(K){v.a.DetailTextureEnabled=K},enumerable:!1,configurable:!0}),Object.defineProperty(ee,"AmbientTextureEnabled",{get:function(){return v.a.AmbientTextureEnabled},set:function(K){v.a.AmbientTextureEnabled=K},enumerable:!1,configurable:!0}),Object.defineProperty(ee,"OpacityTextureEnabled",{get:function(){return v.a.OpacityTextureEnabled},set:function(K){v.a.OpacityTextureEnabled=K},enumerable:!1,configurable:!0}),Object.defineProperty(ee,"ReflectionTextureEnabled",{get:function(){return v.a.ReflectionTextureEnabled},set:function(K){v.a.ReflectionTextureEnabled=K},enumerable:!1,configurable:!0}),Object.defineProperty(ee,"EmissiveTextureEnabled",{get:function(){return v.a.EmissiveTextureEnabled},set:function(K){v.a.EmissiveTextureEnabled=K},enumerable:!1,configurable:!0}),Object.defineProperty(ee,"SpecularTextureEnabled",{get:function(){return v.a.SpecularTextureEnabled},set:function(K){v.a.SpecularTextureEnabled=K},enumerable:!1,configurable:!0}),Object.defineProperty(ee,"BumpTextureEnabled",{get:function(){return v.a.BumpTextureEnabled},set:function(K){v.a.BumpTextureEnabled=K},enumerable:!1,configurable:!0}),Object.defineProperty(ee,"LightmapTextureEnabled",{get:function(){return v.a.LightmapTextureEnabled},set:function(K){v.a.LightmapTextureEnabled=K},enumerable:!1,configurable:!0}),Object.defineProperty(ee,"RefractionTextureEnabled",{get:function(){return v.a.RefractionTextureEnabled},set:function(K){v.a.RefractionTextureEnabled=K},enumerable:!1,configurable:!0}),Object.defineProperty(ee,"ColorGradingTextureEnabled",{get:function(){return v.a.ColorGradingTextureEnabled},set:function(K){v.a.ColorGradingTextureEnabled=K},enumerable:!1,configurable:!0}),Object.defineProperty(ee,"FresnelEnabled",{get:function(){return v.a.FresnelEnabled},set:function(K){v.a.FresnelEnabled=K},enumerable:!1,configurable:!0}),Object(U.c)([Object(_.m)("diffuseTexture")],ee.prototype,"_diffuseTexture",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsTexturesAndMiscDirty")],ee.prototype,"diffuseTexture",void 0),Object(U.c)([Object(_.m)("ambientTexture")],ee.prototype,"_ambientTexture",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"ambientTexture",void 0),Object(U.c)([Object(_.m)("opacityTexture")],ee.prototype,"_opacityTexture",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsTexturesAndMiscDirty")],ee.prototype,"opacityTexture",void 0),Object(U.c)([Object(_.m)("reflectionTexture")],ee.prototype,"_reflectionTexture",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"reflectionTexture",void 0),Object(U.c)([Object(_.m)("emissiveTexture")],ee.prototype,"_emissiveTexture",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"emissiveTexture",void 0),Object(U.c)([Object(_.m)("specularTexture")],ee.prototype,"_specularTexture",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"specularTexture",void 0),Object(U.c)([Object(_.m)("bumpTexture")],ee.prototype,"_bumpTexture",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"bumpTexture",void 0),Object(U.c)([Object(_.m)("lightmapTexture")],ee.prototype,"_lightmapTexture",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"lightmapTexture",void 0),Object(U.c)([Object(_.m)("refractionTexture")],ee.prototype,"_refractionTexture",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"refractionTexture",void 0),Object(U.c)([Object(_.e)("ambient")],ee.prototype,"ambientColor",void 0),Object(U.c)([Object(_.e)("diffuse")],ee.prototype,"diffuseColor",void 0),Object(U.c)([Object(_.e)("specular")],ee.prototype,"specularColor",void 0),Object(U.c)([Object(_.e)("emissive")],ee.prototype,"emissiveColor",void 0),Object(U.c)([Object(_.c)()],ee.prototype,"specularPower",void 0),Object(U.c)([Object(_.c)("useAlphaFromDiffuseTexture")],ee.prototype,"_useAlphaFromDiffuseTexture",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsTexturesAndMiscDirty")],ee.prototype,"useAlphaFromDiffuseTexture",void 0),Object(U.c)([Object(_.c)("useEmissiveAsIllumination")],ee.prototype,"_useEmissiveAsIllumination",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"useEmissiveAsIllumination",void 0),Object(U.c)([Object(_.c)("linkEmissiveWithDiffuse")],ee.prototype,"_linkEmissiveWithDiffuse",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"linkEmissiveWithDiffuse",void 0),Object(U.c)([Object(_.c)("useSpecularOverAlpha")],ee.prototype,"_useSpecularOverAlpha",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"useSpecularOverAlpha",void 0),Object(U.c)([Object(_.c)("useReflectionOverAlpha")],ee.prototype,"_useReflectionOverAlpha",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"useReflectionOverAlpha",void 0),Object(U.c)([Object(_.c)("disableLighting")],ee.prototype,"_disableLighting",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsLightsDirty")],ee.prototype,"disableLighting",void 0),Object(U.c)([Object(_.c)("useObjectSpaceNormalMap")],ee.prototype,"_useObjectSpaceNormalMap",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"useObjectSpaceNormalMap",void 0),Object(U.c)([Object(_.c)("useParallax")],ee.prototype,"_useParallax",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"useParallax",void 0),Object(U.c)([Object(_.c)("useParallaxOcclusion")],ee.prototype,"_useParallaxOcclusion",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"useParallaxOcclusion",void 0),Object(U.c)([Object(_.c)()],ee.prototype,"parallaxScaleBias",void 0),Object(U.c)([Object(_.c)("roughness")],ee.prototype,"_roughness",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"roughness",void 0),Object(U.c)([Object(_.c)()],ee.prototype,"indexOfRefraction",void 0),Object(U.c)([Object(_.c)()],ee.prototype,"invertRefractionY",void 0),Object(U.c)([Object(_.c)()],ee.prototype,"alphaCutOff",void 0),Object(U.c)([Object(_.c)("useLightmapAsShadowmap")],ee.prototype,"_useLightmapAsShadowmap",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"useLightmapAsShadowmap",void 0),Object(U.c)([Object(_.h)("diffuseFresnelParameters")],ee.prototype,"_diffuseFresnelParameters",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsFresnelDirty")],ee.prototype,"diffuseFresnelParameters",void 0),Object(U.c)([Object(_.h)("opacityFresnelParameters")],ee.prototype,"_opacityFresnelParameters",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsFresnelAndMiscDirty")],ee.prototype,"opacityFresnelParameters",void 0),Object(U.c)([Object(_.h)("reflectionFresnelParameters")],ee.prototype,"_reflectionFresnelParameters",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsFresnelDirty")],ee.prototype,"reflectionFresnelParameters",void 0),Object(U.c)([Object(_.h)("refractionFresnelParameters")],ee.prototype,"_refractionFresnelParameters",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsFresnelDirty")],ee.prototype,"refractionFresnelParameters",void 0),Object(U.c)([Object(_.h)("emissiveFresnelParameters")],ee.prototype,"_emissiveFresnelParameters",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsFresnelDirty")],ee.prototype,"emissiveFresnelParameters",void 0),Object(U.c)([Object(_.c)("useReflectionFresnelFromSpecular")],ee.prototype,"_useReflectionFresnelFromSpecular",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsFresnelDirty")],ee.prototype,"useReflectionFresnelFromSpecular",void 0),Object(U.c)([Object(_.c)("useGlossinessFromSpecularMapAlpha")],ee.prototype,"_useGlossinessFromSpecularMapAlpha",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"useGlossinessFromSpecularMapAlpha",void 0),Object(U.c)([Object(_.c)("maxSimultaneousLights")],ee.prototype,"_maxSimultaneousLights",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsLightsDirty")],ee.prototype,"maxSimultaneousLights",void 0),Object(U.c)([Object(_.c)("invertNormalMapX")],ee.prototype,"_invertNormalMapX",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"invertNormalMapX",void 0),Object(U.c)([Object(_.c)("invertNormalMapY")],ee.prototype,"_invertNormalMapY",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"invertNormalMapY",void 0),Object(U.c)([Object(_.c)("twoSidedLighting")],ee.prototype,"_twoSidedLighting",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"twoSidedLighting",void 0),Object(U.c)([Object(_.c)()],ee.prototype,"useLogarithmicDepth",null),ee}(S.a);h.a.RegisteredTypes["BABYLON.StandardMaterial"]=pe,u.a.DefaultMaterialFactory=function(ae){return new pe("default material",ae)}},function(Ie,y,f){f.d(y,"a",function(){return I});var U=f(1),_=f(12),R=f(6),u=f(0),M=f(13),C=f(4),P=f(16),m=f(46),c=f(54),T=f(43),A=f(2),S=f(147),g=f(21),l=f(101),h=f(9),v=f(28),E=f(23),D=f(11),w=function(){this.facetNb=0,this.partitioningSubdivisions=10,this.partitioningBBoxRatio=1.01,this.facetDataEnabled=!1,this.facetParameters={},this.bbSize=u.e.Zero(),this.subDiv={max:1,X:1,Y:1,Z:1},this.facetDepthSort=!1,this.facetDepthSortEnabled=!1},N=function(){this._hasVertexAlpha=!1,this._useVertexColors=!0,this._numBoneInfluencers=4,this._applyFog=!0,this._receiveShadows=!1,this._facetData=new w,this._visibility=1,this._skeleton=null,this._layerMask=268435455,this._computeBonesUsingShaders=!0,this._isActive=!1,this._onlyForInstances=!1,this._isActiveIntermediate=!1,this._onlyForInstancesIntermediate=!1,this._actAsRegularMesh=!1,this._currentLOD=null,this._currentLODIsUpToDate=!1},I=function(V){function X(j,ne){ne===void 0&&(ne=null);var te=V.call(this,j,ne,!1)||this;return te._internalAbstractMeshDataInfo=new N,te.cullingStrategy=X.CULLINGSTRATEGY_BOUNDINGSPHERE_ONLY,te.onCollideObservable=new R.c,te.onCollisionPositionChangeObservable=new R.c,te.onMaterialChangedObservable=new R.c,te.definedFacingForward=!0,te._occlusionQuery=null,te._renderingGroup=null,te.alphaIndex=Number.MAX_VALUE,te.isVisible=!0,te.isPickable=!0,te.showSubMeshesBoundingBox=!1,te.isBlocker=!1,te.enablePointerMoveEvents=!1,te._renderingGroupId=0,te._material=null,te.outlineColor=h.a.Red(),te.outlineWidth=.02,te.overlayColor=h.a.Red(),te.overlayAlpha=.5,te.useOctreeForRenderingSelection=!0,te.useOctreeForPicking=!0,te.useOctreeForCollisions=!0,te.alwaysSelectAsActiveMesh=!1,te.doNotSyncBoundingInfo=!1,te.actionManager=null,te._meshCollisionData=new S.a,te.ellipsoid=new u.e(.5,1,.5),te.ellipsoidOffset=new u.e(0,0,0),te.edgesWidth=1,te.edgesColor=new h.b(1,0,0,1),te._edgesRenderer=null,te._masterMesh=null,te._boundingInfo=null,te._renderId=0,te._intersectionsInProgress=new Array,te._unIndexed=!1,te._lightSources=new Array,te._waitingData={lods:null,actions:null,freezeWorldMatrix:null},te._bonesTransformMatrices=null,te._transformMatrixTexture=null,te.onRebuildObservable=new R.c,te._onCollisionPositionChange=function(de,pe,ae){ae===void 0&&(ae=null),pe.subtractToRef(te._meshCollisionData._oldPositionForCollisions,te._meshCollisionData._diffPositionForCollisions),te._meshCollisionData._diffPositionForCollisions.length()>M.a.CollisionsEpsilon&&te.position.addInPlace(te._meshCollisionData._diffPositionForCollisions),ae&&te.onCollideObservable.notifyObservers(ae),te.onCollisionPositionChangeObservable.notifyObservers(te.position)},te.getScene().addMesh(te),te._resyncLightSources(),te}return Object(U.d)(X,V),Object.defineProperty(X,"BILLBOARDMODE_NONE",{get:function(){return m.a.BILLBOARDMODE_NONE},enumerable:!1,configurable:!0}),Object.defineProperty(X,"BILLBOARDMODE_X",{get:function(){return m.a.BILLBOARDMODE_X},enumerable:!1,configurable:!0}),Object.defineProperty(X,"BILLBOARDMODE_Y",{get:function(){return m.a.BILLBOARDMODE_Y},enumerable:!1,configurable:!0}),Object.defineProperty(X,"BILLBOARDMODE_Z",{get:function(){return m.a.BILLBOARDMODE_Z},enumerable:!1,configurable:!0}),Object.defineProperty(X,"BILLBOARDMODE_ALL",{get:function(){return m.a.BILLBOARDMODE_ALL},enumerable:!1,configurable:!0}),Object.defineProperty(X,"BILLBOARDMODE_USE_POSITION",{get:function(){return m.a.BILLBOARDMODE_USE_POSITION},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"facetNb",{get:function(){return this._internalAbstractMeshDataInfo._facetData.facetNb},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"partitioningSubdivisions",{get:function(){return this._internalAbstractMeshDataInfo._facetData.partitioningSubdivisions},set:function(j){this._internalAbstractMeshDataInfo._facetData.partitioningSubdivisions=j},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"partitioningBBoxRatio",{get:function(){return this._internalAbstractMeshDataInfo._facetData.partitioningBBoxRatio},set:function(j){this._internalAbstractMeshDataInfo._facetData.partitioningBBoxRatio=j},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"mustDepthSortFacets",{get:function(){return this._internalAbstractMeshDataInfo._facetData.facetDepthSort},set:function(j){this._internalAbstractMeshDataInfo._facetData.facetDepthSort=j},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"facetDepthSortFrom",{get:function(){return this._internalAbstractMeshDataInfo._facetData.facetDepthSortFrom},set:function(j){this._internalAbstractMeshDataInfo._facetData.facetDepthSortFrom=j},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"isFacetDataEnabled",{get:function(){return this._internalAbstractMeshDataInfo._facetData.facetDataEnabled},enumerable:!1,configurable:!0}),X.prototype._updateNonUniformScalingState=function(j){return!!V.prototype._updateNonUniformScalingState.call(this,j)&&(this._markSubMeshesAsMiscDirty(),!0)},Object.defineProperty(X.prototype,"onCollide",{set:function(j){this._meshCollisionData._onCollideObserver&&this.onCollideObservable.remove(this._meshCollisionData._onCollideObserver),this._meshCollisionData._onCollideObserver=this.onCollideObservable.add(j)},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"onCollisionPositionChange",{set:function(j){this._meshCollisionData._onCollisionPositionChangeObserver&&this.onCollisionPositionChangeObservable.remove(this._meshCollisionData._onCollisionPositionChangeObserver),this._meshCollisionData._onCollisionPositionChangeObserver=this.onCollisionPositionChangeObservable.add(j)},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"visibility",{get:function(){return this._internalAbstractMeshDataInfo._visibility},set:function(j){this._internalAbstractMeshDataInfo._visibility!==j&&(this._internalAbstractMeshDataInfo._visibility=j,this._markSubMeshesAsMiscDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"renderingGroupId",{get:function(){return this._renderingGroupId},set:function(j){this._renderingGroupId=j},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"material",{get:function(){return this._material},set:function(j){this._material!==j&&(this._material&&this._material.meshMap&&(this._material.meshMap[this.uniqueId]=void 0),this._material=j,j&&j.meshMap&&(j.meshMap[this.uniqueId]=this),this.onMaterialChangedObservable.hasObservers()&&this.onMaterialChangedObservable.notifyObservers(this),this.subMeshes&&this._unBindEffect())},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"receiveShadows",{get:function(){return this._internalAbstractMeshDataInfo._receiveShadows},set:function(j){this._internalAbstractMeshDataInfo._receiveShadows!==j&&(this._internalAbstractMeshDataInfo._receiveShadows=j,this._markSubMeshesAsLightDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"hasVertexAlpha",{get:function(){return this._internalAbstractMeshDataInfo._hasVertexAlpha},set:function(j){this._internalAbstractMeshDataInfo._hasVertexAlpha!==j&&(this._internalAbstractMeshDataInfo._hasVertexAlpha=j,this._markSubMeshesAsAttributesDirty(),this._markSubMeshesAsMiscDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"useVertexColors",{get:function(){return this._internalAbstractMeshDataInfo._useVertexColors},set:function(j){this._internalAbstractMeshDataInfo._useVertexColors!==j&&(this._internalAbstractMeshDataInfo._useVertexColors=j,this._markSubMeshesAsAttributesDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"computeBonesUsingShaders",{get:function(){return this._internalAbstractMeshDataInfo._computeBonesUsingShaders},set:function(j){this._internalAbstractMeshDataInfo._computeBonesUsingShaders!==j&&(this._internalAbstractMeshDataInfo._computeBonesUsingShaders=j,this._markSubMeshesAsAttributesDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"numBoneInfluencers",{get:function(){return this._internalAbstractMeshDataInfo._numBoneInfluencers},set:function(j){this._internalAbstractMeshDataInfo._numBoneInfluencers!==j&&(this._internalAbstractMeshDataInfo._numBoneInfluencers=j,this._markSubMeshesAsAttributesDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"applyFog",{get:function(){return this._internalAbstractMeshDataInfo._applyFog},set:function(j){this._internalAbstractMeshDataInfo._applyFog!==j&&(this._internalAbstractMeshDataInfo._applyFog=j,this._markSubMeshesAsMiscDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"layerMask",{get:function(){return this._internalAbstractMeshDataInfo._layerMask},set:function(j){j!==this._internalAbstractMeshDataInfo._layerMask&&(this._internalAbstractMeshDataInfo._layerMask=j,this._resyncLightSources())},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"collisionMask",{get:function(){return this._meshCollisionData._collisionMask},set:function(j){this._meshCollisionData._collisionMask=isNaN(j)?-1:j},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"collisionResponse",{get:function(){return this._meshCollisionData._collisionResponse},set:function(j){this._meshCollisionData._collisionResponse=j},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"collisionGroup",{get:function(){return this._meshCollisionData._collisionGroup},set:function(j){this._meshCollisionData._collisionGroup=isNaN(j)?-1:j},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"surroundingMeshes",{get:function(){return this._meshCollisionData._surroundingMeshes},set:function(j){this._meshCollisionData._surroundingMeshes=j},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"lightSources",{get:function(){return this._lightSources},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"_positions",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"skeleton",{get:function(){return this._internalAbstractMeshDataInfo._skeleton},set:function(j){var ne=this._internalAbstractMeshDataInfo._skeleton;ne&&ne.needInitialSkinMatrix&&ne._unregisterMeshWithPoseMatrix(this),j&&j.needInitialSkinMatrix&&j._registerMeshWithPoseMatrix(this),this._internalAbstractMeshDataInfo._skeleton=j,this._internalAbstractMeshDataInfo._skeleton||(this._bonesTransformMatrices=null),this._markSubMeshesAsAttributesDirty()},enumerable:!1,configurable:!0}),X.prototype.getClassName=function(){return"AbstractMesh"},X.prototype.toString=function(j){var ne="Name: "+this.name+", isInstance: "+(this.getClassName()!=="InstancedMesh"?"YES":"NO");ne+=", # of submeshes: "+(this.subMeshes?this.subMeshes.length:0);var te=this._internalAbstractMeshDataInfo._skeleton;return te&&(ne+=", skeleton: "+te.name),j&&(ne+=", billboard mode: "+["NONE","X","Y",null,"Z",null,null,"ALL"][this.billboardMode],ne+=", freeze wrld mat: "+(this._isWorldMatrixFrozen||this._waitingData.freezeWorldMatrix?"YES":"NO")),ne},X.prototype._getEffectiveParent=function(){return this._masterMesh&&this.billboardMode!==m.a.BILLBOARDMODE_NONE?this._masterMesh:V.prototype._getEffectiveParent.call(this)},X.prototype._getActionManagerForTrigger=function(j,ne){if(ne===void 0&&(ne=!0),this.actionManager&&(ne||this.actionManager.isRecursive)){if(!j)return this.actionManager;if(this.actionManager.hasSpecificTrigger(j))return this.actionManager}return this.parent?this.parent._getActionManagerForTrigger(j,!1):null},X.prototype._rebuild=function(){if(this.onRebuildObservable.notifyObservers(this),this._occlusionQuery&&(this._occlusionQuery=null),this.subMeshes)for(var j=0,ne=this.subMeshes;j4,ae=pe?this.getVerticesData(C.b.MatricesIndicesExtraKind):null,ee=pe?this.getVerticesData(C.b.MatricesWeightsExtraKind):null;this.skeleton.prepare();for(var K=this.skeleton.getTransformMatrices(this),$=u.c.Vector3[0],L=u.c.Matrix[0],G=u.c.Matrix[1],Q=0,oe=0;oe0&&(u.a.FromFloat32ArrayToRefScaled(K,Math.floor(16*te[Q+re]),Y,G),L.addToSelf(G));if(pe)for(re=0;re<4;re++)(Y=ee[Q+re])>0&&(u.a.FromFloat32ArrayToRefScaled(K,Math.floor(16*ae[Q+re]),Y,G),L.addToSelf(G));u.e.TransformCoordinatesFromFloatsToRef(ne[oe],ne[oe+1],ne[oe+2],L,$),$.toArray(ne,oe),this._positions&&this._positions[oe/3].copyFrom($)}}}return ne},X.prototype._updateBoundingInfo=function(){var j=this._effectiveMesh;return this._boundingInfo?this._boundingInfo.update(j.worldMatrixFromCache):this._boundingInfo=new T.a(this.absolutePosition,this.absolutePosition,j.worldMatrixFromCache),this._updateSubMeshesBoundingInfo(j.worldMatrixFromCache),this},X.prototype._updateSubMeshesBoundingInfo=function(j){if(!this.subMeshes)return this;for(var ne=this.subMeshes.length,te=0;te1||!de.IsGlobal)&&de.updateBoundingInfo(j)}return this},X.prototype._afterComputeWorldMatrix=function(){this.doNotSyncBoundingInfo||this._updateBoundingInfo()},Object.defineProperty(X.prototype,"_effectiveMesh",{get:function(){return this.skeleton&&this.skeleton.overrideMesh||this},enumerable:!1,configurable:!0}),X.prototype.isInFrustum=function(j){return this._boundingInfo!==null&&this._boundingInfo.isInFrustum(j,this.cullingStrategy)},X.prototype.isCompletelyInFrustum=function(j){return this._boundingInfo!==null&&this._boundingInfo.isCompletelyInFrustum(j)},X.prototype.intersectsMesh=function(j,ne,te){if(ne===void 0&&(ne=!1),!this._boundingInfo||!j._boundingInfo)return!1;if(this._boundingInfo.intersects(j._boundingInfo,ne))return!0;if(te){for(var de=0,pe=this.getChildMeshes();de1&&!ae._checkCollision(j)||this._collideForSubMesh(ae,ne,j)}return this},X.prototype._checkCollision=function(j){if(!this._boundingInfo||!this._boundingInfo._checkCollision(j))return this;var ne=u.c.Matrix[0],te=u.c.Matrix[1];return u.a.ScalingToRef(1/j._radius.x,1/j._radius.y,1/j._radius.z,ne),this.worldMatrixFromCache.multiplyToRef(ne,te),this._processCollisionsForSubMeshes(j,te),this},X.prototype._generatePointsArray=function(){return!1},X.prototype.intersects=function(j,ne,te,de,pe,ae){var ee;de===void 0&&(de=!1),ae===void 0&&(ae=!1);var K=new c.a,$=this.getClassName()==="InstancedLinesMesh"||this.getClassName()==="LinesMesh"?this.intersectionThreshold:0,L=this._boundingInfo;if(!this.subMeshes||!L||!(ae||j.intersectsSphere(L.boundingSphere,$)&&j.intersectsBox(L.boundingBox,$)))return K;if(de)return K.hit=!ae,K.pickedMesh=ae?null:this,K.distance=ae?0:u.e.Distance(j.origin,L.boundingSphere.center),K.subMeshId=0,K;if(!this._generatePointsArray())return K;for(var G=null,Q=this._scene.getIntersectingSubMeshCandidates(this,j),oe=Q.length,re=!1,Y=0;Y1)||H.canIntersects(j)){var Z=H.intersects(j,this._positions,this.getIndices(),ne,te);if(Z&&(ne||!G||Z.distance65535){ae=!0;break}j.depthSortedIndices=ae?new Uint32Array(te):new Uint16Array(te)}if(j.facetDepthSortFunction=function(re,Y){return Y.sqDistance-re.sqDistance},!j.facetDepthSortFrom){var K=this.getScene().activeCamera;j.facetDepthSortFrom=K?K.position:u.e.Zero()}j.depthSortedFacets=[];for(var $=0;$v.a?pe.maximum.x-pe.minimum.x:v.a,j.bbSize.y=pe.maximum.y-pe.minimum.y>v.a?pe.maximum.y-pe.minimum.y:v.a,j.bbSize.z=pe.maximum.z-pe.minimum.z>v.a?pe.maximum.z-pe.minimum.z:v.a;var G=j.bbSize.x>j.bbSize.y?j.bbSize.x:j.bbSize.y;if(G=G>j.bbSize.z?G:j.bbSize.z,j.subDiv.max=j.partitioningSubdivisions,j.subDiv.X=Math.floor(j.subDiv.max*j.bbSize.x/G),j.subDiv.Y=Math.floor(j.subDiv.max*j.bbSize.y/G),j.subDiv.Z=Math.floor(j.subDiv.max*j.bbSize.z/G),j.subDiv.X=j.subDiv.X<1?1:j.subDiv.X,j.subDiv.Y=j.subDiv.Y<1?1:j.subDiv.Y,j.subDiv.Z=j.subDiv.Z<1?1:j.subDiv.Z,j.facetParameters.facetNormals=this.getFacetLocalNormals(),j.facetParameters.facetPositions=this.getFacetLocalPositions(),j.facetParameters.facetPartitioning=this.getFacetLocalPartitioning(),j.facetParameters.bInfo=pe,j.facetParameters.bbSize=j.bbSize,j.facetParameters.subDiv=j.subDiv,j.facetParameters.ratio=this.partitioningBBoxRatio,j.facetParameters.depthSort=j.facetDepthSort,j.facetDepthSort&&j.facetDepthSortEnabled&&(this.computeWorldMatrix(!0),this._worldMatrix.invertToRef(j.invertedMatrix),u.e.TransformCoordinatesToRef(j.facetDepthSortFrom,j.invertedMatrix,j.facetDepthSortOrigin),j.facetParameters.distanceTo=j.facetDepthSortOrigin),j.facetParameters.depthSortedFacets=j.depthSortedFacets,P.a.ComputeNormals(ne,te,de,j.facetParameters),j.facetDepthSort&&j.facetDepthSortEnabled){j.depthSortedFacets.sort(j.facetDepthSortFunction);var Q=j.depthSortedIndices.length/3|0;for($=0;$pe.subDiv.max||ee<0||ee>pe.subDiv.max||K<0||K>pe.subDiv.max?null:pe.facetPartitioning[ae+pe.subDiv.max*ee+pe.subDiv.max*pe.subDiv.max*K]},X.prototype.getClosestFacetAtCoordinates=function(j,ne,te,de,pe,ae){pe===void 0&&(pe=!1),ae===void 0&&(ae=!0);var ee=this.getWorldMatrix(),K=u.c.Matrix[5];ee.invertToRef(K);var $=u.c.Vector3[8];u.e.TransformCoordinatesFromFloatsToRef(j,ne,te,K,$);var L=this.getClosestFacetAtLocalCoordinates($.x,$.y,$.z,de,pe,ae);return de&&u.e.TransformCoordinatesFromFloatsToRef(de.x,de.y,de.z,ee,de),L},X.prototype.getClosestFacetAtLocalCoordinates=function(j,ne,te,de,pe,ae){pe===void 0&&(pe=!1),ae===void 0&&(ae=!0);var ee=null,K=0,$=0,L=0,G=0,Q=0,oe=0,re=0,Y=0,k=this.getFacetLocalPositions(),H=this.getFacetLocalNormals(),Z=this.getFacetsAtLocalCoordinates(j,ne,te);if(!Z)return null;for(var W,q,he,ge=Number.MAX_VALUE,me=ge,_e=0;_e=0||pe&&!ae&&G<=0)&&(G=q.x*he.x+q.y*he.y+q.z*he.z,Q=-(q.x*j+q.y*ne+q.z*te-G)/(q.x*q.x+q.y*q.y+q.z*q.z),(me=(K=(oe=j+q.x*Q)-j)*K+($=(re=ne+q.y*Q)-ne)*$+(L=(Y=te+q.z*Q)-te)*L)100&&(this.soft=!0),this._physicsEngine=this._scene.getPhysicsEngine(),this._physicsEngine?(this.object.rotationQuaternion||(this.object.rotation?this.object.rotationQuaternion=R.b.RotationYawPitchRoll(this.object.rotation.y,this.object.rotation.x,this.object.rotation.z):this.object.rotationQuaternion=new R.b),this._options.mass=S.mass===void 0?0:S.mass,this._options.friction=S.friction===void 0?.2:S.friction,this._options.restitution=S.restitution===void 0?.2:S.restitution,this.soft&&(this._options.mass=this._options.mass>0?this._options.mass:1,this._options.pressure=S.pressure===void 0?200:S.pressure,this._options.stiffness=S.stiffness===void 0?1:S.stiffness,this._options.velocityIterations=S.velocityIterations===void 0?20:S.velocityIterations,this._options.positionIterations=S.positionIterations===void 0?20:S.positionIterations,this._options.fixedPoints=S.fixedPoints===void 0?0:S.fixedPoints,this._options.margin=S.margin===void 0?0:S.margin,this._options.damping=S.damping===void 0?0:S.damping,this._options.path=S.path===void 0?null:S.path,this._options.shape=S.shape===void 0?null:S.shape),this._joints=[],!this.object.parent||this._options.ignoreParent?this._init():this.object.parent.physicsImpostor&&U.a.Warn("You must affect impostors to children before affecting impostor to parent.")):U.a.Error("Physics not enabled. Please use scene.enablePhysics(...) before creating impostors."))):U.a.Error("No object was provided. A physics object is obligatory")}return Object.defineProperty(c.prototype,"isDisposed",{get:function(){return this._isDisposed},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"mass",{get:function(){return this._physicsEngine?this._physicsEngine.getPhysicsPlugin().getBodyMass(this):0},set:function(T){this.setMass(T)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"friction",{get:function(){return this._physicsEngine?this._physicsEngine.getPhysicsPlugin().getBodyFriction(this):0},set:function(T){this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().setBodyFriction(this,T)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"restitution",{get:function(){return this._physicsEngine?this._physicsEngine.getPhysicsPlugin().getBodyRestitution(this):0},set:function(T){this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().setBodyRestitution(this,T)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"pressure",{get:function(){if(!this._physicsEngine)return 0;var T=this._physicsEngine.getPhysicsPlugin();return T.setBodyPressure?T.getBodyPressure(this):0},set:function(T){if(this._physicsEngine){var A=this._physicsEngine.getPhysicsPlugin();A.setBodyPressure&&A.setBodyPressure(this,T)}},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"stiffness",{get:function(){if(!this._physicsEngine)return 0;var T=this._physicsEngine.getPhysicsPlugin();return T.getBodyStiffness?T.getBodyStiffness(this):0},set:function(T){if(this._physicsEngine){var A=this._physicsEngine.getPhysicsPlugin();A.setBodyStiffness&&A.setBodyStiffness(this,T)}},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"velocityIterations",{get:function(){if(!this._physicsEngine)return 0;var T=this._physicsEngine.getPhysicsPlugin();return T.getBodyVelocityIterations?T.getBodyVelocityIterations(this):0},set:function(T){if(this._physicsEngine){var A=this._physicsEngine.getPhysicsPlugin();A.setBodyVelocityIterations&&A.setBodyVelocityIterations(this,T)}},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"positionIterations",{get:function(){if(!this._physicsEngine)return 0;var T=this._physicsEngine.getPhysicsPlugin();return T.getBodyPositionIterations?T.getBodyPositionIterations(this):0},set:function(T){if(this._physicsEngine){var A=this._physicsEngine.getPhysicsPlugin();A.setBodyPositionIterations&&A.setBodyPositionIterations(this,T)}},enumerable:!1,configurable:!0}),c.prototype._init=function(){this._physicsEngine&&(this._physicsEngine.removeImpostor(this),this.physicsBody=null,this._parent=this._parent||this._getPhysicsParent(),this._isDisposed||this.parent&&!this._options.ignoreParent||this._physicsEngine.addImpostor(this))},c.prototype._getPhysicsParent=function(){return this.object.parent instanceof u.a?this.object.parent.physicsImpostor:null},c.prototype.isBodyInitRequired=function(){return this._bodyUpdateRequired||!this._physicsBody&&!this._parent},c.prototype.setScalingUpdated=function(){this.forceUpdate()},c.prototype.forceUpdate=function(){this._init(),this.parent&&!this._options.ignoreParent&&this.parent.forceUpdate()},Object.defineProperty(c.prototype,"physicsBody",{get:function(){return this._parent&&!this._options.ignoreParent?this._parent.physicsBody:this._physicsBody},set:function(T){this._physicsBody&&this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().removePhysicsBody(this),this._physicsBody=T,this.resetUpdateFlags()},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"parent",{get:function(){return!this._options.ignoreParent&&this._parent?this._parent:null},set:function(T){this._parent=T},enumerable:!1,configurable:!0}),c.prototype.resetUpdateFlags=function(){this._bodyUpdateRequired=!1},c.prototype.getObjectExtendSize=function(){if(this.object.getBoundingInfo){var T=this.object.rotationQuaternion,A=this.object.scaling.clone();this.object.rotationQuaternion=c.IDENTITY_QUATERNION;var S=this.object.computeWorldMatrix&&this.object.computeWorldMatrix(!0);S&&S.decompose(A,void 0,void 0);var g=this.object.getBoundingInfo().boundingBox.extendSize.scale(2).multiplyInPlace(A);return this.object.rotationQuaternion=T,this.object.computeWorldMatrix&&this.object.computeWorldMatrix(!0),g}return c.DEFAULT_OBJECT_SIZE},c.prototype.getObjectCenter=function(){return this.object.getBoundingInfo?this.object.getBoundingInfo().boundingBox.centerWorld:this.object.position},c.prototype.getParam=function(T){return this._options[T]},c.prototype.setParam=function(T,A){this._options[T]=A,this._bodyUpdateRequired=!0},c.prototype.setMass=function(T){this.getParam("mass")!==T&&this.setParam("mass",T),this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().setBodyMass(this,T)},c.prototype.getLinearVelocity=function(){return this._physicsEngine?this._physicsEngine.getPhysicsPlugin().getLinearVelocity(this):R.e.Zero()},c.prototype.setLinearVelocity=function(T){this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().setLinearVelocity(this,T)},c.prototype.getAngularVelocity=function(){return this._physicsEngine?this._physicsEngine.getPhysicsPlugin().getAngularVelocity(this):R.e.Zero()},c.prototype.setAngularVelocity=function(T){this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().setAngularVelocity(this,T)},c.prototype.executeNativeFunction=function(T){this._physicsEngine&&T(this._physicsEngine.getPhysicsPlugin().world,this.physicsBody)},c.prototype.registerBeforePhysicsStep=function(T){this._onBeforePhysicsStepCallbacks.push(T)},c.prototype.unregisterBeforePhysicsStep=function(T){var A=this._onBeforePhysicsStepCallbacks.indexOf(T);A>-1?this._onBeforePhysicsStepCallbacks.splice(A,1):U.a.Warn("Function to remove was not found")},c.prototype.registerAfterPhysicsStep=function(T){this._onAfterPhysicsStepCallbacks.push(T)},c.prototype.unregisterAfterPhysicsStep=function(T){var A=this._onAfterPhysicsStepCallbacks.indexOf(T);A>-1?this._onAfterPhysicsStepCallbacks.splice(A,1):U.a.Warn("Function to remove was not found")},c.prototype.registerOnPhysicsCollide=function(T,A){var S=T instanceof Array?T:[T];this._onPhysicsCollideCallbacks.push({callback:A,otherImpostors:S})},c.prototype.unregisterOnPhysicsCollide=function(T,A){var S=T instanceof Array?T:[T],g=-1;this._onPhysicsCollideCallbacks.some(function(l,h){if(l.callback===A&&l.otherImpostors.length===S.length){var v=l.otherImpostors.every(function(E){return S.indexOf(E)>-1});return v&&(g=h),v}return!1})?this._onPhysicsCollideCallbacks.splice(g,1):U.a.Warn("Function to remove was not found")},c.prototype.getParentsRotation=function(){var T=this.object.parent;for(this._tmpQuat.copyFromFloats(0,0,0,1);T;)T.rotationQuaternion?this._tmpQuat2.copyFrom(T.rotationQuaternion):R.b.RotationYawPitchRollToRef(T.rotation.y,T.rotation.x,T.rotation.z,this._tmpQuat2),this._tmpQuat.multiplyToRef(this._tmpQuat2,this._tmpQuat),T=T.parent;return this._tmpQuat},c.prototype.applyForce=function(T,A){return this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().applyForce(this,T,A),this},c.prototype.applyImpulse=function(T,A){return this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().applyImpulse(this,T,A),this},c.prototype.createJoint=function(T,A,S){var g=new C.e(A,S);return this.addJoint(T,g),this},c.prototype.addJoint=function(T,A){return this._joints.push({otherImpostor:T,joint:A}),this._physicsEngine&&this._physicsEngine.addJoint(this,T,A),this},c.prototype.addAnchor=function(T,A,S,g,l){if(!this._physicsEngine)return this;var h=this._physicsEngine.getPhysicsPlugin();return h.appendAnchor?(this._physicsEngine&&h.appendAnchor(this,T,A,S,g,l),this):this},c.prototype.addHook=function(T,A,S,g){if(!this._physicsEngine)return this;var l=this._physicsEngine.getPhysicsPlugin();return l.appendAnchor?(this._physicsEngine&&l.appendHook(this,T,A,S,g),this):this},c.prototype.sleep=function(){return this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().sleepBody(this),this},c.prototype.wakeUp=function(){return this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().wakeUpBody(this),this},c.prototype.clone=function(T){return T?new c(T,this.type,this._options,this._scene):null},c.prototype.dispose=function(){var T=this;this._physicsEngine&&(this._joints.forEach(function(A){T._physicsEngine&&T._physicsEngine.removeJoint(T,A.otherImpostor,A.joint)}),this._physicsEngine.removeImpostor(this),this.parent&&this.parent.forceUpdate(),this._isDisposed=!0)},c.prototype.setDeltaPosition=function(T){this._deltaPosition.copyFrom(T)},c.prototype.setDeltaRotation=function(T){this._deltaRotation||(this._deltaRotation=new R.b),this._deltaRotation.copyFrom(T),this._deltaRotationConjugated=this._deltaRotation.conjugate()},c.prototype.getBoxSizeToRef=function(T){return this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().getBoxSizeToRef(this,T),this},c.prototype.getRadius=function(){return this._physicsEngine?this._physicsEngine.getPhysicsPlugin().getRadius(this):0},c.prototype.syncBoneWithImpostor=function(T,A,S,g,l){var h=c._tmpVecs[0],v=this.object;if(v.rotationQuaternion)if(l){var E=c._tmpQuat;v.rotationQuaternion.multiplyToRef(l,E),T.setRotationQuaternion(E,P.c.WORLD,A)}else T.setRotationQuaternion(v.rotationQuaternion,P.c.WORLD,A);h.x=0,h.y=0,h.z=0,S&&(h.x=S.x,h.y=S.y,h.z=S.z,T.getDirectionToRef(h,A,h),g==null&&(g=S.length()),h.x*=g,h.y*=g,h.z*=g),T.getParent()?(h.addInPlace(v.getAbsolutePosition()),T.setAbsolutePosition(h,A)):(A.setAbsolutePosition(v.getAbsolutePosition()),A.position.x-=h.x,A.position.y-=h.y,A.position.z-=h.z)},c.prototype.syncImpostorWithBone=function(T,A,S,g,l,h){var v=this.object;if(v.rotationQuaternion)if(l){var E=c._tmpQuat;T.getRotationQuaternionToRef(P.c.WORLD,A,E),E.multiplyToRef(l,v.rotationQuaternion)}else T.getRotationQuaternionToRef(P.c.WORLD,A,v.rotationQuaternion);var D=c._tmpVecs[0],w=c._tmpVecs[1];h||((h=c._tmpVecs[2]).x=0,h.y=1,h.z=0),T.getDirectionToRef(h,A,w),T.getAbsolutePositionToRef(A,D),g==null&&S&&(g=S.length()),g!=null&&(D.x+=w.x*g,D.y+=w.y*g,D.z+=w.z*g),v.setAbsolutePosition(D)},c.DEFAULT_OBJECT_SIZE=new R.e(1,1,1),c.IDENTITY_QUATERNION=R.b.Identity(),c._tmpVecs=_.a.BuildArray(3,R.e.Zero),c._tmpQuat=R.b.Identity(),c.NoImpostor=0,c.SphereImpostor=1,c.BoxImpostor=2,c.PlaneImpostor=3,c.MeshImpostor=4,c.CapsuleImpostor=6,c.CylinderImpostor=7,c.ParticleImpostor=8,c.HeightmapImpostor=9,c.ConvexHullImpostor=10,c.CustomImpostor=100,c.RopeImpostor=101,c.ClothImpostor=102,c.SoftbodyImpostor=103,c}()},function(Ie,y,f){f.d(y,"a",function(){return _}),f.d(y,"b",function(){return R});var U=f(1),_=function(){function u(M){this.length=0,this.data=new Array(M),this._id=u._GlobalId++}return u.prototype.push=function(M){this.data[this.length++]=M,this.length>this.data.length&&(this.data.length*=2)},u.prototype.forEach=function(M){for(var C=0;Cthis.data.length&&(this.data.length=2*(this.length+M.length));for(var C=0;C=this.length?-1:C},u.prototype.contains=function(M){return this.indexOf(M)!==-1},u._GlobalId=0,u}(),R=function(u){function M(){var C=u!==null&&u.apply(this,arguments)||this;return C._duplicateId=0,C}return Object(U.d)(M,u),M.prototype.push=function(C){u.prototype.push.call(this,C),C.__smartArrayFlags||(C.__smartArrayFlags={}),C.__smartArrayFlags[this._id]=this._duplicateId},M.prototype.pushNoDuplicate=function(C){return(!C.__smartArrayFlags||C.__smartArrayFlags[this._id]!==this._duplicateId)&&(this.push(C),!0)},M.prototype.reset=function(){u.prototype.reset.call(this),this._duplicateId++},M.prototype.concatWithNoDuplicate=function(C){if(C.length!==0){this.length+C.length>this.data.length&&(this.data.length=2*(this.length+C.length));for(var P=0;P>2,m=(3&u)<<4|(M=g>4,c=(15&M)<<2|(C=g>6,T=63&C,isNaN(M)?c=T=64:isNaN(C)&&(T=64),S+=A.charAt(P)+A.charAt(m)+A.charAt(c)+A.charAt(T);return S},_.PadNumber=function(R,u){for(var M=String(R);M.length0)):!S._pointerCaptures[D.pointerId]&&v.distance>E.distance&&(S.mainSceneTrackerPredicate&&S.mainSceneTrackerPredicate(E.pickedMesh)?(S._notifyObservers(g,E,D),g.skipOnPointerObservable=!0):S._lastPointerEvents[D.pointerId]&&(S.onPointerOutObservable.notifyObservers(D.pointerId),delete S._lastPointerEvents[D.pointerId])),g.type===R.a.POINTERUP&&S._pointerCaptures[D.pointerId]&&(S._pointerCaptures[D.pointerId]=!1))}}}}),this._originalPointerObserver&&T.onPrePointerObservable.makeObserverTopPriority(this._originalPointerObserver)),this.utilityLayerScene.autoClear=!1,this._afterRenderObserver=this.originalScene.onAfterCameraRenderObservable.add(function(g){S.shouldRender&&g==S.getRenderCamera()&&S.render()}),this._sceneDisposeObserver=this.originalScene.onDisposeObservable.add(function(){S.dispose()}),this._updateCamera()}return c.prototype.getRenderCamera=function(T){if(this._renderCamera)return this._renderCamera;var A=void 0;return A=this.originalScene.activeCameras&&this.originalScene.activeCameras.length>1?this.originalScene.activeCameras[this.originalScene.activeCameras.length-1]:this.originalScene.activeCamera,T&&A&&A.isRigCamera?A.rigParent:A},c.prototype.setRenderCamera=function(T){this._renderCamera=T},c.prototype._getSharedGizmoLight=function(){return this._sharedGizmoLight||(this._sharedGizmoLight=new M.a("shared gizmo light",new C.e(0,1,0),this.utilityLayerScene),this._sharedGizmoLight.intensity=2,this._sharedGizmoLight.groundColor=P.a.Gray()),this._sharedGizmoLight},Object.defineProperty(c,"DefaultUtilityLayer",{get:function(){return c._DefaultUtilityLayer==null&&(c._DefaultUtilityLayer=new c(u.a.LastCreatedScene),c._DefaultUtilityLayer.originalScene.onDisposeObservable.addOnce(function(){c._DefaultUtilityLayer=null})),c._DefaultUtilityLayer},enumerable:!1,configurable:!0}),Object.defineProperty(c,"DefaultKeepDepthUtilityLayer",{get:function(){return c._DefaultKeepDepthUtilityLayer==null&&(c._DefaultKeepDepthUtilityLayer=new c(u.a.LastCreatedScene),c._DefaultKeepDepthUtilityLayer.utilityLayerScene.autoClearDepthAndStencil=!1,c._DefaultKeepDepthUtilityLayer.originalScene.onDisposeObservable.addOnce(function(){c._DefaultKeepDepthUtilityLayer=null})),c._DefaultKeepDepthUtilityLayer},enumerable:!1,configurable:!0}),c.prototype._notifyObservers=function(T,A,S){T.skipOnPointerObservable||(this.utilityLayerScene.onPointerObservable.notifyObservers(new R.b(T.type,T.event,A),T.type),this._lastPointerEvents[S.pointerId]=!0)},c.prototype.render=function(){if(this._updateCamera(),this.utilityLayerScene.activeCamera){var T=this.utilityLayerScene.activeCamera.getScene(),A=this.utilityLayerScene.activeCamera;A._scene=this.utilityLayerScene,A.leftCamera&&(A.leftCamera._scene=this.utilityLayerScene),A.rightCamera&&(A.rightCamera._scene=this.utilityLayerScene),this.utilityLayerScene.render(!1),A._scene=T,A.leftCamera&&(A.leftCamera._scene=T),A.rightCamera&&(A.rightCamera._scene=T)}},c.prototype.dispose=function(){this.onPointerOutObservable.clear(),this._afterRenderObserver&&this.originalScene.onAfterCameraRenderObservable.remove(this._afterRenderObserver),this._sceneDisposeObserver&&this.originalScene.onDisposeObservable.remove(this._sceneDisposeObserver),this._originalPointerObserver&&this.originalScene.onPrePointerObservable.remove(this._originalPointerObserver),this.utilityLayerScene.dispose()},c.prototype._updateCamera=function(){this.utilityLayerScene.cameraToUseForPointers=this.getRenderCamera(),this.utilityLayerScene.activeCamera=this.getRenderCamera()},c._DefaultUtilityLayer=null,c._DefaultKeepDepthUtilityLayer=null,c}()},function(Ie,y,f){f.d(y,"a",function(){return _});var U=f(139),_=function(){function R(){}return R.EnableFor=function(u){u._tags=u._tags||{},u.hasTags=function(){return R.HasTags(u)},u.addTags=function(M){return R.AddTagsTo(u,M)},u.removeTags=function(M){return R.RemoveTagsFrom(u,M)},u.matchesTagsQuery=function(M){return R.MatchesQuery(u,M)}},R.DisableFor=function(u){delete u._tags,delete u.hasTags,delete u.addTags,delete u.removeTags,delete u.matchesTagsQuery},R.HasTags=function(u){if(!u._tags)return!1;var M=u._tags;for(var C in M)if(M.hasOwnProperty(C))return!0;return!1},R.GetTags=function(u,M){if(M===void 0&&(M=!0),!u._tags)return null;if(M){var C=[];for(var P in u._tags)u._tags.hasOwnProperty(P)&&u._tags[P]===!0&&C.push(P);return C.join(" ")}return u._tags},R.AddTagsTo=function(u,M){M&&typeof M=="string"&&M.split(" ").forEach(function(C,P,m){R._AddTagTo(u,C)})},R._AddTagTo=function(u,M){(M=M.trim())!==""&&M!=="true"&&M!=="false"&&(M.match(/[\s]/)||M.match(/^([!]|([|]|[&]){2})/)||(R.EnableFor(u),u._tags[M]=!0))},R.RemoveTagsFrom=function(u,M){if(R.HasTags(u)){var C=M.split(" ");for(var P in C)R._RemoveTagFrom(u,C[P])}},R._RemoveTagFrom=function(u,M){delete u._tags[M]},R.MatchesQuery=function(u,M){return M===void 0||(M===""?R.HasTags(u):U.a.Eval(M,function(C){return R.HasTags(u)&&u._tags[C]}))},R}()},function(Ie,y,f){f.d(y,"a",function(){return U});var U=function(){function _(){}return _.IsWindowObjectExist=function(){return typeof window<"u"},_.IsNavigatorAvailable=function(){return typeof navigator<"u"},_.IsDocumentAvailable=function(){return typeof document<"u"},_.GetDOMTextContent=function(R){for(var u="",M=R.firstChild;M;)M.nodeType===3&&(u+=M.textContent),M=M.nextSibling;return u},_}()},function(Ie,y,f){f.d(y,"a",function(){return P});var U=f(44),_=f(0),R=f(54),u=f(114),M=f(20),C=f(24),P=function(){function m(c,T,A){A===void 0&&(A=Number.MAX_VALUE),this.origin=c,this.direction=T,this.length=A}return m.prototype.intersectsBoxMinMax=function(c,T,A){A===void 0&&(A=0);var S,g,l,h,v=m._TmpVector3[0].copyFromFloats(c.x-A,c.y-A,c.z-A),E=m._TmpVector3[1].copyFromFloats(T.x+A,T.y+A,T.z+A),D=0,w=Number.MAX_VALUE;if(Math.abs(this.direction.x)<1e-7){if(this.origin.xE.x)return!1}else if(S=1/this.direction.x,g=(v.x-this.origin.x)*S,(l=(E.x-this.origin.x)*S)===-1/0&&(l=1/0),g>l&&(h=g,g=l,l=h),(D=Math.max(g,D))>(w=Math.min(l,w)))return!1;if(Math.abs(this.direction.y)<1e-7){if(this.origin.yE.y)return!1}else if(S=1/this.direction.y,g=(v.y-this.origin.y)*S,(l=(E.y-this.origin.y)*S)===-1/0&&(l=1/0),g>l&&(h=g,g=l,l=h),(D=Math.max(g,D))>(w=Math.min(l,w)))return!1;if(Math.abs(this.direction.z)<1e-7){if(this.origin.zE.z)return!1}else if(S=1/this.direction.z,g=(v.z-this.origin.z)*S,(l=(E.z-this.origin.z)*S)===-1/0&&(l=1/0),g>l&&(h=g,g=l,l=h),(D=Math.max(g,D))>(w=Math.min(l,w)))return!1;return!0},m.prototype.intersectsBox=function(c,T){return T===void 0&&(T=0),this.intersectsBoxMinMax(c.minimum,c.maximum,T)},m.prototype.intersectsSphere=function(c,T){T===void 0&&(T=0);var A=c.center.x-this.origin.x,S=c.center.y-this.origin.y,g=c.center.z-this.origin.z,l=A*A+S*S+g*g,h=c.radius+T,v=h*h;if(l<=v)return!0;var E=A*this.direction.x+S*this.direction.y+g*this.direction.z;return!(E<0)&&l-E*E<=v},m.prototype.intersectsTriangle=function(c,T,A){var S=m._TmpVector3[0],g=m._TmpVector3[1],l=m._TmpVector3[2],h=m._TmpVector3[3],v=m._TmpVector3[4];T.subtractToRef(c,S),A.subtractToRef(c,g),_.e.CrossToRef(this.direction,g,l);var E=_.e.Dot(S,l);if(E===0)return null;var D=1/E;this.origin.subtractToRef(c,h);var w=_.e.Dot(h,l)*D;if(w<0||w>1)return null;_.e.CrossToRef(h,S,v);var N=_.e.Dot(this.direction,v)*D;if(N<0||w+N>1)return null;var I=_.e.Dot(g,v)*D;return I>this.length?null:new u.a(1-w-N,w,I)},m.prototype.intersectsPlane=function(c){var T,A=_.e.Dot(c.normal,this.direction);if(Math.abs(A)<999999997475243e-21)return null;var S=_.e.Dot(c.normal,this.origin);return(T=(-c.d-S)/A)<0?T<-999999997475243e-21?null:0:T},m.prototype.intersectsAxis=function(c,T){switch(T===void 0&&(T=0),c){case"y":return(A=(this.origin.y-T)/this.direction.y)>0?null:new _.e(this.origin.x+this.direction.x*-A,T,this.origin.z+this.direction.z*-A);case"x":return(A=(this.origin.x-T)/this.direction.x)>0?null:new _.e(T,this.origin.y+this.direction.y*-A,this.origin.z+this.direction.z*-A);case"z":var A;return(A=(this.origin.z-T)/this.direction.z)>0?null:new _.e(this.origin.x+this.direction.x*-A,this.origin.y+this.direction.y*-A,T);default:return null}},m.prototype.intersectsMesh=function(c,T){var A=_.c.Matrix[0];return c.getWorldMatrix().invertToRef(A),this._tmpRay?m.TransformToRef(this,A,this._tmpRay):this._tmpRay=m.Transform(this,A),c.intersects(this._tmpRay,T)},m.prototype.intersectsMeshes=function(c,T,A){A?A.length=0:A=[];for(var S=0;ST.distance?1:0},m.prototype.intersectionSegment=function(c,T,A){var S=this.origin,g=_.c.Vector3[0],l=_.c.Vector3[1],h=_.c.Vector3[2],v=_.c.Vector3[3];T.subtractToRef(c,g),this.direction.scaleToRef(m.rayl,h),S.addToRef(h,l),c.subtractToRef(S,v);var E,D,w,N,I=_.e.Dot(g,g),V=_.e.Dot(g,h),X=_.e.Dot(h,h),j=_.e.Dot(g,v),ne=_.e.Dot(h,v),te=I*X-V*V,de=te,pe=te;tede&&(D=de,N=ne+V,pe=X)),N<0?(N=0,-j<0?D=0:-j>I?D=de:(D=-j,de=I)):N>pe&&(N=pe,-j+V<0?D=0:-j+V>I?D=de:(D=-j+V,de=I)),E=Math.abs(D)0&&w<=this.length&&K.lengthSquared()=m.distance?null:E:null},M.a.prototype._internalPick=function(m,c,T,A,S){if(!R.a)return null;for(var g=null,l=0;l0&&(m.push(g-1),m.push(g)),g++}var D=new R.a;return D.indices=m,D.positions=c,A&&(D.colors=S),D},R.a.CreateDashedLines=function(P){var m,c,T=P.dashSize||3,A=P.gapSize||1,S=P.dashNb||200,g=P.points,l=new Array,h=new Array,v=U.e.Zero(),E=0,D=0,w=0,N=0,I=0;for(I=0;I0)if(typeof g[0]=="object")for(var h=0;hP.max||P.min>C.max)},T=function(){function A(S,g,l){this._isLocked=!1,this.boundingBox=new u.a(S,g,l),this.boundingSphere=new M.a(S,g,l)}return A.prototype.reConstruct=function(S,g,l){this.boundingBox.reConstruct(S,g,l),this.boundingSphere.reConstruct(S,g,l)},Object.defineProperty(A.prototype,"minimum",{get:function(){return this.boundingBox.minimum},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"maximum",{get:function(){return this.boundingBox.maximum},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"isLocked",{get:function(){return this._isLocked},set:function(S){this._isLocked=S},enumerable:!1,configurable:!0}),A.prototype.update=function(S){this._isLocked||(this.boundingBox._update(S),this.boundingSphere._update(S))},A.prototype.centerOn=function(S,g){var l=A.TmpVector3[0].copyFrom(S).subtractInPlace(g),h=A.TmpVector3[1].copyFrom(S).addInPlace(g);return this.boundingBox.reConstruct(l,h,this.boundingBox.getWorldMatrix()),this.boundingSphere.reConstruct(l,h,this.boundingBox.getWorldMatrix()),this},A.prototype.scale=function(S){return this.boundingBox.scale(S),this.boundingSphere.scale(S),this},A.prototype.isInFrustum=function(S,g){return g===void 0&&(g=R.a.MESHES_CULLINGSTRATEGY_STANDARD),!(g!==R.a.MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION&&g!==R.a.MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION_THEN_BSPHERE_ONLY||!this.boundingSphere.isCenterInFrustum(S))||!!this.boundingSphere.isInFrustum(S)&&(!(g!==R.a.MESHES_CULLINGSTRATEGY_BOUNDINGSPHERE_ONLY&&g!==R.a.MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION_THEN_BSPHERE_ONLY)||this.boundingBox.isInFrustum(S))},Object.defineProperty(A.prototype,"diagonalLength",{get:function(){var S=this.boundingBox;return S.maximumWorld.subtractToRef(S.minimumWorld,A.TmpVector3[0]).length()},enumerable:!1,configurable:!0}),A.prototype.isCompletelyInFrustum=function(S){return this.boundingBox.isCompletelyInFrustum(S)},A.prototype._checkCollision=function(S){return S._canDoCollision(this.boundingSphere.centerWorld,this.boundingSphere.radiusWorld,this.boundingBox.minimumWorld,this.boundingBox.maximumWorld)},A.prototype.intersectsPoint=function(S){return!!this.boundingSphere.centerWorld&&!!this.boundingSphere.intersectsPoint(S)&&!!this.boundingBox.intersectsPoint(S)},A.prototype.intersects=function(S,g){if(!M.a.Intersects(this.boundingSphere,S.boundingSphere)||!u.a.Intersects(this.boundingBox,S.boundingBox))return!1;if(!g)return!0;var l=this.boundingBox,h=S.boundingBox;return!!c(l.directions[0],l,h)&&!!c(l.directions[1],l,h)&&!!c(l.directions[2],l,h)&&!!c(h.directions[0],l,h)&&!!c(h.directions[1],l,h)&&!!c(h.directions[2],l,h)&&!!c(_.e.Cross(l.directions[0],h.directions[0]),l,h)&&!!c(_.e.Cross(l.directions[0],h.directions[1]),l,h)&&!!c(_.e.Cross(l.directions[0],h.directions[2]),l,h)&&!!c(_.e.Cross(l.directions[1],h.directions[0]),l,h)&&!!c(_.e.Cross(l.directions[1],h.directions[1]),l,h)&&!!c(_.e.Cross(l.directions[1],h.directions[2]),l,h)&&!!c(_.e.Cross(l.directions[2],h.directions[0]),l,h)&&!!c(_.e.Cross(l.directions[2],h.directions[1]),l,h)&&!!c(_.e.Cross(l.directions[2],h.directions[2]),l,h)},A.TmpVector3=U.a.BuildArray(2,_.e.Zero),A}()},function(Ie,y,f){f.d(y,"a",function(){return U});var U=function(){function _(){}return _.BuildArray=function(R,u){for(var M=[],C=0;C1)?1:M.arc||1,A=M.slice&&M.slice<=0?1:M.slice||1,S=M.sideOrientation===0?0:M.sideOrientation||R.a.DEFAULTSIDE,g=!!M.dedupTopBottomIndices,l=new U.e(P/2,m/2,c/2),h=2+C,v=2*h,E=[],D=[],w=[],N=[],I=0;I<=h;I++){for(var V=I/h,X=V*Math.PI*A,j=0;j<=v;j++){var ne=j/v,te=ne*Math.PI*2*T,de=U.a.RotationZ(-X),pe=U.a.RotationY(te),ae=U.e.TransformCoordinates(U.e.Up(),de),ee=U.e.TransformCoordinates(ae,pe),K=ee.multiply(l),$=ee.divide(l).normalize();D.push(K.x,K.y,K.z),w.push($.x,$.y,$.z),N.push(ne,V)}if(I>0)for(var L=D.length/3,G=L-2*(v+1);G+v+21&&(E.push(G),E.push(G+1),E.push(G+v+1)),(I0&&this.includedOnlyMeshes.indexOf(A)===-1)&&!(this.excludedMeshes&&this.excludedMeshes.length>0&&this.excludedMeshes.indexOf(A)!==-1)&&(this.includeOnlyWithLayerMask===0||(this.includeOnlyWithLayerMask&A.layerMask)!=0)&&!(this.excludeWithLayerMask!==0&&this.excludeWithLayerMask&A.layerMask)},T.CompareLightsPriority=function(A,S){return A.shadowEnabled!==S.shadowEnabled?(S.shadowEnabled?1:0)-(A.shadowEnabled?1:0):S.renderPriority-A.renderPriority},T.prototype.dispose=function(A,S){S===void 0&&(S=!1),this._shadowGenerator&&(this._shadowGenerator.dispose(),this._shadowGenerator=null),this.getScene().stopAnimation(this);for(var g=0,l=this.getScene().meshes;g0&&(A.excludedMeshesIds=[],this.excludedMeshes.forEach(function(S){A.excludedMeshesIds.push(S.id)})),this.includedOnlyMeshes.length>0&&(A.includedOnlyMeshesIds=[],this.includedOnlyMeshes.forEach(function(S){A.includedOnlyMeshesIds.push(S.id)})),_.a.AppendSerializedAnimations(this,A),A.ranges=this.serializeAnimationRanges(),A},T.GetConstructorFromName=function(A,S,g){var l=M.a.Construct("Light_Type_"+A,S,g);return l||null},T.Parse=function(A,S){var g=T.GetConstructorFromName(A.type,A.name,S);if(!g)return null;var l=_.a.Parse(g,A,S);if(A.excludedMeshesIds&&(l._excludedMeshesIds=A.excludedMeshesIds),A.includedOnlyMeshesIds&&(l._includedOnlyMeshesIds=A.includedOnlyMeshesIds),A.parentId&&(l._waitingParentId=A.parentId),A.falloffType!==void 0&&(l.falloffType=A.falloffType),A.lightmapMode!==void 0&&(l.lightmapMode=A.lightmapMode),A.animations){for(var h=0;h=0&&this._scene.textures.splice(S,1),this._scene.onTextureRemovedObservable.notifyObservers(this),this._scene=null}this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear(),T.prototype.dispose.call(this)},A.prototype.serialize=function(){if(!this.name)return null;var S=_.a.Serialize(this);return _.a.AppendSerializedAnimations(this,S),S},A.WhenAllReady=function(S,g){var l=S.length;if(l!==0)for(var h=0;h1)?1:m.arc||1,w=m.sideOrientation===0?0:m.sideOrientation||u.a.DEFAULTSIDE,N=m.faceUV||new Array(3),I=m.faceColors,V=2+(1+(D!==1&&v?2:0))*(h?l:1);for(S=0;S1e3&&(this._lastSecAverage=this._lastSecAccumulated/this._lastSecValueCount,this._lastSecTime=u,this._lastSecAccumulated=0,this._lastSecValueCount=0)},R.Enabled=!0,R}()},function(Ie,y,f){f.d(y,"b",function(){return A}),f.d(y,"d",function(){return S}),f.d(y,"c",function(){return g}),f.d(y,"a",function(){return l});var U=f(1),_=f(49),R=f(38),u=f(6),M=f(83),C=f(140),P=function(h){function v(){return h!==null&&h.apply(this,arguments)||this}return Object(U.d)(v,h),v._setPrototypeOf=Object.setPrototypeOf||function(E,D){return E.__proto__=D,E},v}(Error),m=f(34),c=f(26),T=f(128),A=function(h){function v(E,D){var w=h.call(this,E)||this;return w.name="LoadFileError",P._setPrototypeOf(w,v.prototype),D instanceof _.a?w.request=D:w.file=D,w}return Object(U.d)(v,h),v}(P),S=function(h){function v(E,D){var w=h.call(this,E)||this;return w.request=D,w.name="RequestFileError",P._setPrototypeOf(w,v.prototype),w}return Object(U.d)(v,h),v}(P),g=function(h){function v(E,D){var w=h.call(this,E)||this;return w.file=D,w.name="ReadFileError",P._setPrototypeOf(w,v.prototype),w}return Object(U.d)(v,h),v}(P),l=function(){function h(){}return h._CleanUrl=function(v){return v=v.replace(/#/gm,"%23")},h.SetCorsBehavior=function(v,E){if((!v||v.indexOf("data:")!==0)&&h.CorsBehavior)if(typeof h.CorsBehavior=="string"||this.CorsBehavior instanceof String)E.crossOrigin=h.CorsBehavior;else{var D=h.CorsBehavior(v);D&&(E.crossOrigin=D)}},h.LoadImage=function(v,E,D,w,N){var I;N===void 0&&(N="");var V=!1;if(v instanceof ArrayBuffer||ArrayBuffer.isView(v)?typeof Blob<"u"?(I=URL.createObjectURL(new Blob([v],{type:N})),V=!0):I="data:"+N+";base64,"+m.a.EncodeArrayBufferToBase64(v):v instanceof Blob?(I=URL.createObjectURL(v),V=!0):(I=h._CleanUrl(v),I=h.PreprocessUrl(v)),typeof Image>"u")return h.LoadFile(I,function(ae){createImageBitmap(new Blob([ae],{type:N})).then(function(ee){E(ee),V&&URL.revokeObjectURL(I)}).catch(function(ee){D&&D("Error while trying to load image: "+v,ee)})},void 0,w||void 0,!0,function(ae,ee){D&&D("Error while trying to load image: "+v,ee)}),null;var X=new Image;h.SetCorsBehavior(I,X);var j=function(){X.removeEventListener("load",j),X.removeEventListener("error",ne),E(X),V&&X.src&&URL.revokeObjectURL(X.src)},ne=function(ae){if(X.removeEventListener("load",j),X.removeEventListener("error",ne),D){var ee=v.toString();D("Error while trying to load image: "+(ee.length<32?ee:ee.slice(0,32)+"..."),ae)}V&&X.src&&URL.revokeObjectURL(X.src)};X.addEventListener("load",j),X.addEventListener("error",ne);var te=function(){X.src=I};if(I.substr(0,5)!=="data:"&&w&&w.enableTexturesOffline)w.open(function(){w&&w.loadImage(I,X)},te);else{if(I.indexOf("file:")!==-1){var de=decodeURIComponent(I.substring(5).toLowerCase());if(M.a.FilesToLoad[de]){try{var pe;try{pe=URL.createObjectURL(M.a.FilesToLoad[de])}catch{pe=URL.createObjectURL(M.a.FilesToLoad[de])}X.src=pe,V=!0}catch{X.src=""}return X}}te()}return X},h.ReadFile=function(v,E,D,w,N){var I=new FileReader,V={onCompleteObservable:new u.c,abort:function(){return I.abort()}};return I.onloadend=function(X){return V.onCompleteObservable.notifyObservers(V)},N&&(I.onerror=function(X){N(new g("Unable to read "+v.name,v))}),I.onload=function(X){E(X.target.result)},D&&(I.onprogress=D),w?I.readAsArrayBuffer(v):I.readAsText(v),V},h.LoadFile=function(v,E,D,w,N,I){if(v.indexOf("file:")!==-1){var V=decodeURIComponent(v.substring(5).toLowerCase());V.indexOf("./")===0&&(V=V.substring(2));var X=M.a.FilesToLoad[V];if(X)return h.ReadFile(X,E,D,N,I?function(j){return I(void 0,new A(j.message,j.file))}:void 0)}return h.RequestFile(v,function(j,ne){E(j,ne?ne.responseURL:void 0)},D,w,N,I?function(j){I(j.request,new A(j.message,j.request))}:void 0)},h.RequestFile=function(v,E,D,w,N,I,V){v=h._CleanUrl(v),v=h.PreprocessUrl(v);var X=h.BaseUrl+v,j=!1,ne={onCompleteObservable:new u.c,abort:function(){return j=!0}},te=function(){var pe=new _.a,ae=null;ne.abort=function(){j=!0,pe.readyState!==(XMLHttpRequest.DONE||4)&&pe.abort(),ae!==null&&(clearTimeout(ae),ae=null)};var ee=function(K){pe.open("GET",X),V&&V(pe),N&&(pe.responseType="arraybuffer"),D&&pe.addEventListener("progress",D);var $=function(){pe.removeEventListener("loadend",$),ne.onCompleteObservable.notifyObservers(ne),ne.onCompleteObservable.clear()};pe.addEventListener("loadend",$);var L=function(){if(!j&&pe.readyState===(XMLHttpRequest.DONE||4)){if(pe.removeEventListener("readystatechange",L),pe.status>=200&&pe.status<300||pe.status===0&&(!R.a.IsWindowObjectExist()||h.IsFileURL()))return void E(N?pe.response:pe.responseText,pe);var G=h.DefaultRetryStrategy;if(G){var Q=G(X,pe,K);if(Q!==-1)return pe.removeEventListener("loadend",$),pe=new _.a,void(ae=setTimeout(function(){return ee(K+1)},Q))}var oe=new S("Error status: "+pe.status+" "+pe.statusText+" - Unable to load "+X,pe);I&&I(oe)}};pe.addEventListener("readystatechange",L),pe.send()};ee(0)};if(w&&w.enableSceneOffline){var de=function(pe){pe&&pe.status>400?I&&I(pe):te()};w.open(function(){w&&w.loadFile(h.BaseUrl+v,function(pe){j||E(pe),ne.onCompleteObservable.notifyObservers(ne)},D?function(pe){j||D(pe)}:void 0,de,N)},de)}else te();return ne},h.IsFileURL=function(){return typeof location<"u"&&location.protocol==="file:"},h.DefaultRetryStrategy=C.a.ExponentialBackoff(),h.BaseUrl="",h.CorsBehavior="anonymous",h.PreprocessUrl=function(v){return v},h}();c.a._FileToolsLoadImage=l.LoadImage.bind(l),c.a._FileToolsLoadFile=l.LoadFile.bind(l),T.a._FileToolsLoadFile=l.LoadFile.bind(l)},function(Ie,y,f){f.d(y,"a",function(){return _});var U=f(38),_=function(){function R(){}return Object.defineProperty(R,"Now",{get:function(){return U.a.IsWindowObjectExist()&&window.performance&&window.performance.now?window.performance.now():Date.now()},enumerable:!1,configurable:!0}),R}()},function(Ie,y,f){f.d(y,"a",function(){return U});var U=function(){function _(R,u,M,C){this.x=R,this.y=u,this.width=M,this.height=C}return _.prototype.toGlobal=function(R,u){return new _(this.x*R,this.y*u,this.width*R,this.height*u)},_.prototype.toGlobalToRef=function(R,u,M){return M.x=this.x*R,M.y=this.y*u,M.width=this.width*R,M.height=this.height*u,this},_.prototype.clone=function(){return new _(this.x,this.y,this.width,this.height)},_}()},function(Ie,y,f){var U="helperFunctions",_=`const float PI=3.1415926535897932384626433832795; +const float HALF_MIN=5.96046448e-08; +const float LinearEncodePowerApprox=2.2; +const float GammaEncodePowerApprox=1.0/LinearEncodePowerApprox; +const vec3 LuminanceEncodeApprox=vec3(0.2126,0.7152,0.0722); +const float Epsilon=0.0000001; +#define saturate(x) clamp(x,0.0,1.0) +#define absEps(x) abs(x)+Epsilon +#define maxEps(x) max(x,Epsilon) +#define saturateEps(x) clamp(x,Epsilon,1.0) +mat3 transposeMat3(mat3 inMatrix) { +vec3 i0=inMatrix[0]; +vec3 i1=inMatrix[1]; +vec3 i2=inMatrix[2]; +mat3 outMatrix=mat3( +vec3(i0.x,i1.x,i2.x), +vec3(i0.y,i1.y,i2.y), +vec3(i0.z,i1.z,i2.z) +); +return outMatrix; +} + +mat3 inverseMat3(mat3 inMatrix) { +float a00=inMatrix[0][0],a01=inMatrix[0][1],a02=inMatrix[0][2]; +float a10=inMatrix[1][0],a11=inMatrix[1][1],a12=inMatrix[1][2]; +float a20=inMatrix[2][0],a21=inMatrix[2][1],a22=inMatrix[2][2]; +float b01=a22*a11-a12*a21; +float b11=-a22*a10+a12*a20; +float b21=a21*a10-a11*a20; +float det=a00*b01+a01*b11+a02*b21; +return mat3(b01,(-a22*a01+a02*a21),(a12*a01-a02*a11), +b11,(a22*a00-a02*a20),(-a12*a00+a02*a10), +b21,(-a21*a00+a01*a20),(a11*a00-a01*a10))/det; +} +float toLinearSpace(float color) +{ +return pow(color,LinearEncodePowerApprox); +} +vec3 toLinearSpace(vec3 color) +{ +return pow(color,vec3(LinearEncodePowerApprox)); +} +vec4 toLinearSpace(vec4 color) +{ +return vec4(pow(color.rgb,vec3(LinearEncodePowerApprox)),color.a); +} +vec3 toGammaSpace(vec3 color) +{ +return pow(color,vec3(GammaEncodePowerApprox)); +} +vec4 toGammaSpace(vec4 color) +{ +return vec4(pow(color.rgb,vec3(GammaEncodePowerApprox)),color.a); +} +float toGammaSpace(float color) +{ +return pow(color,GammaEncodePowerApprox); +} +float square(float value) +{ +return value*value; +} +float pow5(float value) { +float sq=value*value; +return sq*sq*value; +} +float getLuminance(vec3 color) +{ +return clamp(dot(color,LuminanceEncodeApprox),0.,1.); +} + +float getRand(vec2 seed) { +return fract(sin(dot(seed.xy ,vec2(12.9898,78.233)))*43758.5453); +} +float dither(vec2 seed,float varianceAmount) { +float rand=getRand(seed); +float dither=mix(-varianceAmount/255.0,varianceAmount/255.0,rand); +return dither; +} + +const float rgbdMaxRange=255.0; +vec4 toRGBD(vec3 color) { +float maxRGB=maxEps(max(color.r,max(color.g,color.b))); +float D=max(rgbdMaxRange/maxRGB,1.); +D=clamp(floor(D)/255.0,0.,1.); + +vec3 rgb=color.rgb*D; + +rgb=toGammaSpace(rgb); +return vec4(rgb,D); +} +vec3 fromRGBD(vec4 rgbd) { + +rgbd.rgb=toLinearSpace(rgbd.rgb); + +return rgbd.rgb/rgbd.a; +} +`;f(5).a.IncludesShadersStore[U]=_},function(Ie,y,f){f.d(y,"a",function(){return _});var U=f(0),_=function(){function R(){}return R._RemoveAndStorePivotPoint=function(u){u&&R._PivotCached===0&&(u.getPivotPointToRef(R._OldPivotPoint),R._PivotPostMultiplyPivotMatrix=u._postMultiplyPivotMatrix,R._OldPivotPoint.equalsToFloats(0,0,0)||(u.setPivotMatrix(U.a.IdentityReadOnly),R._OldPivotPoint.subtractToRef(u.getPivotPoint(),R._PivotTranslation),R._PivotTmpVector.copyFromFloats(1,1,1),R._PivotTmpVector.subtractInPlace(u.scaling),R._PivotTmpVector.multiplyInPlace(R._PivotTranslation),u.position.addInPlace(R._PivotTmpVector))),R._PivotCached++},R._RestorePivotPoint=function(u){u&&!R._OldPivotPoint.equalsToFloats(0,0,0)&&R._PivotCached===1&&(u.setPivotPoint(R._OldPivotPoint),u._postMultiplyPivotMatrix=R._PivotPostMultiplyPivotMatrix,R._PivotTmpVector.copyFromFloats(1,1,1),R._PivotTmpVector.subtractInPlace(u.scaling),R._PivotTmpVector.multiplyInPlace(R._PivotTranslation),u.position.subtractInPlace(R._PivotTmpVector)),this._PivotCached--},R._PivotCached=0,R._OldPivotPoint=new U.e,R._PivotTranslation=new U.e,R._PivotTmpVector=new U.e,R._PivotPostMultiplyPivotMatrix=!1,R}()},function(Ie,y,f){f.d(y,"a",function(){return C});var U=f(4),_=f(114),R=f(43),u=f(2),M=f(101),C=function(){function P(m,c,T,A,S,g,l,h,v){h===void 0&&(h=!0),v===void 0&&(v=!0),this.materialIndex=m,this.verticesStart=c,this.verticesCount=T,this.indexStart=A,this.indexCount=S,this._materialDefines=null,this._materialEffect=null,this._effectOverride=null,this._linesIndexCount=0,this._linesIndexBuffer=null,this._lastColliderWorldVertices=null,this._lastColliderTransformMatrix=null,this._renderId=0,this._alphaIndex=0,this._distanceToCamera=0,this._currentMaterial=null,this._mesh=g,this._renderingMesh=l||g,v&&g.subMeshes.push(this),this._trianglePlanes=[],this._id=g.subMeshes.length-1,h&&(this.refreshBoundingInfo(),g.computeWorldMatrix(!0))}return Object.defineProperty(P.prototype,"materialDefines",{get:function(){return this._materialDefines},set:function(m){this._materialDefines=m},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"effect",{get:function(){var m;return(m=this._effectOverride)!==null&&m!==void 0?m:this._materialEffect},enumerable:!1,configurable:!0}),P.prototype.setEffect=function(m,c){c===void 0&&(c=null),this._materialEffect!==m?(this._materialDefines=c,this._materialEffect=m):m||(this._materialDefines=null)},P.AddToMesh=function(m,c,T,A,S,g,l,h){return h===void 0&&(h=!0),new P(m,c,T,A,S,g,l,h)},Object.defineProperty(P.prototype,"IsGlobal",{get:function(){return this.verticesStart===0&&this.verticesCount===this._mesh.getTotalVertices()},enumerable:!1,configurable:!0}),P.prototype.getBoundingInfo=function(){return this.IsGlobal?this._mesh.getBoundingInfo():this._boundingInfo},P.prototype.setBoundingInfo=function(m){return this._boundingInfo=m,this},P.prototype.getMesh=function(){return this._mesh},P.prototype.getRenderingMesh=function(){return this._renderingMesh},P.prototype.getReplacementMesh=function(){return this._mesh._internalAbstractMeshDataInfo._actAsRegularMesh?this._mesh:null},P.prototype.getEffectiveMesh=function(){var m=this._mesh._internalAbstractMeshDataInfo._actAsRegularMesh?this._mesh:null;return m||this._renderingMesh},P.prototype.getMaterial=function(){var m=this._renderingMesh.material;if(m==null)return this._mesh.getScene().defaultMaterial;if(this._IsMultiMaterial(m)){var c=m.getSubMaterial(this.materialIndex);return this._currentMaterial!==c&&(this._currentMaterial=c,this._materialDefines=null),c}return m},P.prototype._IsMultiMaterial=function(m){return m.getSubMaterial!==void 0},P.prototype.refreshBoundingInfo=function(m){if(m===void 0&&(m=null),this._lastColliderWorldVertices=null,this.IsGlobal||!this._renderingMesh||!this._renderingMesh.geometry)return this;if(m||(m=this._renderingMesh.getVerticesData(U.b.PositionKind)),!m)return this._boundingInfo=this._mesh.getBoundingInfo(),this;var c,T=this._renderingMesh.getIndices();if(this.indexStart===0&&this.indexCount===T.length){var A=this._renderingMesh.getBoundingInfo();c={minimum:A.minimum.clone(),maximum:A.maximum.clone()}}else c=Object(M.b)(m,T,this.indexStart,this.indexCount,this._renderingMesh.geometry.boundingBias);return this._boundingInfo?this._boundingInfo.reConstruct(c.minimum,c.maximum):this._boundingInfo=new R.a(c.minimum,c.maximum),this},P.prototype._checkCollision=function(m){return this.getBoundingInfo()._checkCollision(m)},P.prototype.updateBoundingInfo=function(m){var c=this.getBoundingInfo();return c||(this.refreshBoundingInfo(),c=this.getBoundingInfo()),c&&c.update(m),this},P.prototype.isInFrustum=function(m){var c=this.getBoundingInfo();return!!c&&c.isInFrustum(m,this._mesh.cullingStrategy)},P.prototype.isCompletelyInFrustum=function(m){var c=this.getBoundingInfo();return!!c&&c.isCompletelyInFrustum(m)},P.prototype.render=function(m){return this._renderingMesh.render(this,m,this._mesh._internalAbstractMeshDataInfo._actAsRegularMesh?this._mesh:void 0),this},P.prototype._getLinesIndexBuffer=function(m,c){if(!this._linesIndexBuffer){for(var T=[],A=this.indexStart;Al&&(l=E)}return new P(m,g,l-g+1,c,T,A,S)},P}()},function(Ie,y,f){f.d(y,"a",function(){return C});var U=f(1),_=f(8),R=f(10),u=f(2),M=(f(126),f(70)),C=function(P){function m(c,T,A,S,g,l,h){A===void 0&&(A=null),g===void 0&&(g=u.a.TEXTURE_TRILINEAR_SAMPLINGMODE),l===void 0&&(l=u.a.TEXTUREFORMAT_RGBA);var v=P.call(this,null,A,!S,h,g,void 0,void 0,void 0,void 0,l)||this;v.name=c,v.wrapU=R.a.CLAMP_ADDRESSMODE,v.wrapV=R.a.CLAMP_ADDRESSMODE,v._generateMipMaps=S;var E=v._getEngine();if(!E)return v;T.getContext?(v._canvas=T,v._texture=E.createDynamicTexture(T.width,T.height,S,g)):(v._canvas=M.a.CreateCanvas(1,1),T.width||T.width===0?v._texture=E.createDynamicTexture(T.width,T.height,S,g):v._texture=E.createDynamicTexture(T,T,S,g));var D=v.getSize();return v._canvas.width=D.width,v._canvas.height=D.height,v._context=v._canvas.getContext("2d"),v}return Object(U.d)(m,P),m.prototype.getClassName=function(){return"DynamicTexture"},Object.defineProperty(m.prototype,"canRescale",{get:function(){return!0},enumerable:!1,configurable:!0}),m.prototype._recreate=function(c){this._canvas.width=c.width,this._canvas.height=c.height,this.releaseInternalTexture(),this._texture=this._getEngine().createDynamicTexture(c.width,c.height,this._generateMipMaps,this.samplingMode)},m.prototype.scale=function(c){var T=this.getSize();T.width*=c,T.height*=c,this._recreate(T)},m.prototype.scaleTo=function(c,T){var A=this.getSize();A.width=c,A.height=T,this._recreate(A)},m.prototype.getContext=function(){return this._context},m.prototype.clear=function(){var c=this.getSize();this._context.fillRect(0,0,c.width,c.height)},m.prototype.update=function(c,T){T===void 0&&(T=!1),this._getEngine().updateDynamicTexture(this._texture,this._canvas,c===void 0||c,T,this._format||void 0)},m.prototype.drawText=function(c,T,A,S,g,l,h,v){v===void 0&&(v=!0);var E=this.getSize();if(l&&(this._context.fillStyle=l,this._context.fillRect(0,0,E.width,E.height)),this._context.font=S,T==null){var D=this._context.measureText(c);T=(E.width-D.width)/2}if(A==null){var w=parseInt(S.replace(/\D/g,""));A=E.height/2+w/3.65}this._context.fillStyle=g||"",this._context.fillText(c,T,A),v&&this.update(h)},m.prototype.clone=function(){var c=this.getScene();if(!c)return this;var T=this.getSize(),A=new m(this.name,T,c,this._generateMipMaps);return A.hasAlpha=this.hasAlpha,A.level=this.level,A.wrapU=this.wrapU,A.wrapV=this.wrapV,A},m.prototype.serialize=function(){var c=this.getScene();c&&!c.isReady()&&_.a.Warn("The scene must be ready before serializing the dynamic texture");var T=P.prototype.serialize.call(this);return this._IsCanvasElement(this._canvas)&&(T.base64String=this._canvas.toDataURL()),T.invertY=this._invertY,T.samplingMode=this.samplingMode,T},m.prototype._IsCanvasElement=function(c){return c.toDataURL!==void 0},m.prototype._rebuild=function(){this.update()},m}(R.a)},function(Ie,y,f){f.d(y,"a",function(){return M});var U=f(0),_=f(9),R=f(7),u=f(16);u.a.CreateBox=function(C){var P,m=[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23],c=[0,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0],T=[],A=C.width||C.size||1,S=C.height||C.size||1,g=C.depth||C.size||1,l=C.wrap||!1,h=C.topBaseAt===void 0?1:C.topBaseAt,v=C.bottomBaseAt===void 0?0:C.bottomBaseAt,E=[2,0,3,1][h=(h+4)%4],D=[2,0,1,3][v=(v+4)%4],w=[1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,1,-1,1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1];if(l){m=[2,3,0,2,0,1,4,5,6,4,6,7,9,10,11,9,11,8,12,14,15,12,13,14],w=[-1,1,1,1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1];for(var N=[[1,1,1],[-1,1,1],[-1,1,-1],[1,1,-1]],I=[[-1,-1,1],[1,-1,1],[1,-1,-1],[-1,-1,-1]],V=[17,18,19,16],X=[22,23,20,21];E>0;)N.unshift(N.pop()),V.unshift(V.pop()),E--;for(;D>0;)I.unshift(I.pop()),X.unshift(X.pop()),D--;N=N.flat(),I=I.flat(),w=w.concat(N).concat(I),m.push(V[0],V[2],V[3],V[0],V[1],V[2]),m.push(X[0],X[2],X[3],X[0],X[1],X[2])}var j=[A/2,S/2,g/2];P=w.reduce(function(G,Q,oe){return G.concat(Q*j[oe%3])},[]);for(var ne=C.sideOrientation===0?0:C.sideOrientation||u.a.DEFAULTSIDE,te=C.faceUV||new Array(6),de=C.faceColors,pe=[],ae=0;ae<6;ae++)te[ae]===void 0&&(te[ae]=new U.f(0,0,1,1)),de&&de[ae]===void 0&&(de[ae]=new _.b(1,1,1,1));for(var ee=0;ee<6;ee++)if(T.push(te[ee].z,te[ee].w),T.push(te[ee].x,te[ee].w),T.push(te[ee].x,te[ee].y),T.push(te[ee].z,te[ee].y),de)for(var K=0;K<4;K++)pe.push(de[ee].r,de[ee].g,de[ee].b,de[ee].a);u.a._ComputeSides(ne,P,m,c,T,C.frontUVs,C.backUVs);var $=new u.a;if($.indices=m,$.positions=P,$.normals=c,$.uvs=T,de){var L=ne===u.a.DOUBLESIDE?pe.concat(pe):pe;$.colors=L}return $},R.a.CreateBox=function(C,P,m,c,T){m===void 0&&(m=null);var A={size:P,sideOrientation:T,updatable:c};return M.CreateBox(C,A,m)};var M=function(){function C(){}return C.CreateBox=function(P,m,c){c===void 0&&(c=null);var T=new R.a(P,c);return m.sideOrientation=R.a._GetDefaultSideOrientation(m.sideOrientation),T._originalBuilderSideOrientation=m.sideOrientation,u.a.CreateBox(m).applyToMesh(T,m.updatable),T},C}()},function(Ie,y,f){f.d(y,"a",function(){return _});var U=f(0),_=function(){function R(u,M,C,P){this.normal=new U.e(u,M,C),this.d=P}return R.prototype.asArray=function(){return[this.normal.x,this.normal.y,this.normal.z,this.d]},R.prototype.clone=function(){return new R(this.normal.x,this.normal.y,this.normal.z,this.d)},R.prototype.getClassName=function(){return"Plane"},R.prototype.getHashCode=function(){var u=this.normal.getHashCode();return u=397*u^(0|this.d)},R.prototype.normalize=function(){var u=Math.sqrt(this.normal.x*this.normal.x+this.normal.y*this.normal.y+this.normal.z*this.normal.z),M=0;return u!==0&&(M=1/u),this.normal.x*=M,this.normal.y*=M,this.normal.z*=M,this.d*=M,this},R.prototype.transform=function(u){var M=R._TmpMatrix;u.invertToRef(M);var C=M.m,P=this.normal.x,m=this.normal.y,c=this.normal.z,T=this.d;return new R(P*C[0]+m*C[1]+c*C[2]+T*C[3],P*C[4]+m*C[5]+c*C[6]+T*C[7],P*C[8]+m*C[9]+c*C[10]+T*C[11],P*C[12]+m*C[13]+c*C[14]+T*C[15])},R.prototype.dotCoordinate=function(u){return this.normal.x*u.x+this.normal.y*u.y+this.normal.z*u.z+this.d},R.prototype.copyFromPoints=function(u,M,C){var P,m=M.x-u.x,c=M.y-u.y,T=M.z-u.z,A=C.x-u.x,S=C.y-u.y,g=C.z-u.z,l=c*g-T*S,h=T*A-m*g,v=m*S-c*A,E=Math.sqrt(l*l+h*h+v*v);return P=E!==0?1/E:0,this.normal.x=l*P,this.normal.y=h*P,this.normal.z=v*P,this.d=-(this.normal.x*u.x+this.normal.y*u.y+this.normal.z*u.z),this},R.prototype.isFrontFacingTo=function(u,M){return U.e.Dot(this.normal,u)<=M},R.prototype.signedDistanceTo=function(u){return U.e.Dot(u,this.normal)+this.d},R.FromArray=function(u){return new R(u[0],u[1],u[2],u[3])},R.FromPoints=function(u,M,C){var P=new R(0,0,0,0);return P.copyFromPoints(u,M,C),P},R.FromPositionAndNormal=function(u,M){var C=new R(0,0,0,0);return M.normalize(),C.normal=M,C.d=-(M.x*u.x+M.y*u.y+M.z*u.z),C},R.SignedDistanceToPlaneFromPositionAndNormal=function(u,M,C){var P=-(M.x*u.x+M.y*u.y+M.z*u.z);return U.e.Dot(C,M)+P},R._TmpMatrix=U.a.Identity(),R}()},function(Ie,y,f){f.d(y,"a",function(){return m});var U=f(7),_=f(20),R=f(6),u=f(0),M=f(18),C=f(39),P=f(60),m=(f(84),function(){function c(T){this._useAlternatePickedPointAboveMaxDragAngleDragSpeed=-1.1,this.maxDragAngle=0,this._useAlternatePickedPointAboveMaxDragAngle=!1,this.currentDraggingPointerID=-1,this.dragging=!1,this.dragDeltaRatio=.2,this.updateDragPlane=!0,this._debugMode=!1,this._moving=!1,this.onDragObservable=new R.c,this.onDragStartObservable=new R.c,this.onDragEndObservable=new R.c,this.moveAttached=!0,this.enabled=!0,this.startAndReleaseDragOnPointerEvents=!0,this.detachCameraControls=!0,this.useObjectOrientationForDragging=!0,this.validateDrag=function(S){return!0},this._tmpVector=new u.e(0,0,0),this._alternatePickedPoint=new u.e(0,0,0),this._worldDragAxis=new u.e(0,0,0),this._targetPosition=new u.e(0,0,0),this._attachedToElement=!1,this._startDragRay=new C.a(new u.e,new u.e),this._lastPointerRay={},this._dragDelta=new u.e,this._pointA=new u.e(0,0,0),this._pointC=new u.e(0,0,0),this._localAxis=new u.e(0,0,0),this._lookAt=new u.e(0,0,0),this._options=T||{};var A=0;if(this._options.dragAxis&&A++,this._options.dragPlaneNormal&&A++,A>1)throw"Multiple drag modes specified in dragBehavior options. Only one expected"}return Object.defineProperty(c.prototype,"options",{get:function(){return this._options},set:function(T){this._options=T},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"name",{get:function(){return"PointerDrag"},enumerable:!1,configurable:!0}),c.prototype.init=function(){},c.prototype.attach=function(T,A){var S=this;this._scene=T.getScene(),this.attachedNode=T,c._planeScene||(this._debugMode?c._planeScene=this._scene:(c._planeScene=new _.a(this._scene.getEngine(),{virtual:!0}),c._planeScene.detachControl(),this._scene.onDisposeObservable.addOnce(function(){c._planeScene.dispose(),c._planeScene=null}))),this._dragPlane=U.a.CreatePlane("pointerDragPlane",this._debugMode?1:1e4,c._planeScene,!1,U.a.DOUBLESIDE),this.lastDragPosition=new u.e(0,0,0);var g=A||function(l){return S.attachedNode==l||l.isDescendantOf(S.attachedNode)};this._pointerObserver=this._scene.onPointerObservable.add(function(l,h){if(S.enabled){if(l.type==M.a.POINTERDOWN)S.startAndReleaseDragOnPointerEvents&&!S.dragging&&l.pickInfo&&l.pickInfo.hit&&l.pickInfo.pickedMesh&&l.pickInfo.pickedPoint&&l.pickInfo.ray&&g(l.pickInfo.pickedMesh)&&S._startDrag(l.event.pointerId,l.pickInfo.ray,l.pickInfo.pickedPoint);else if(l.type==M.a.POINTERUP)S.startAndReleaseDragOnPointerEvents&&S.currentDraggingPointerID==l.event.pointerId&&S.releaseDrag();else if(l.type==M.a.POINTERMOVE){var v=l.event.pointerId;if(S.currentDraggingPointerID===c._AnyMouseID&&v!==c._AnyMouseID){var E=l.event;(E.pointerType==="mouse"||!S._scene.getEngine().hostInformation.isMobile&&E instanceof MouseEvent)&&(S._lastPointerRay[S.currentDraggingPointerID]&&(S._lastPointerRay[v]=S._lastPointerRay[S.currentDraggingPointerID],delete S._lastPointerRay[S.currentDraggingPointerID]),S.currentDraggingPointerID=v)}S._lastPointerRay[v]||(S._lastPointerRay[v]=new C.a(new u.e,new u.e)),l.pickInfo&&l.pickInfo.ray&&(S._lastPointerRay[v].origin.copyFrom(l.pickInfo.ray.origin),S._lastPointerRay[v].direction.copyFrom(l.pickInfo.ray.direction),S.currentDraggingPointerID==v&&S.dragging&&S._moveDrag(l.pickInfo.ray))}}}),this._beforeRenderObserver=this._scene.onBeforeRenderObservable.add(function(){S._moving&&S.moveAttached&&(P.a._RemoveAndStorePivotPoint(S.attachedNode),S._targetPosition.subtractToRef(S.attachedNode.absolutePosition,S._tmpVector),S._tmpVector.scaleInPlace(S.dragDeltaRatio),S.attachedNode.getAbsolutePosition().addToRef(S._tmpVector,S._tmpVector),S.validateDrag(S._tmpVector)&&S.attachedNode.setAbsolutePosition(S._tmpVector),P.a._RestorePivotPoint(S.attachedNode))})},c.prototype.releaseDrag=function(){if(this.dragging&&(this.dragging=!1,this.onDragEndObservable.notifyObservers({dragPlanePoint:this.lastDragPosition,pointerId:this.currentDraggingPointerID})),this.currentDraggingPointerID=-1,this._moving=!1,this.detachCameraControls&&this._attachedToElement&&this._scene.activeCamera&&!this._scene.activeCamera.leftCamera){if(this._scene.activeCamera.getClassName()==="ArcRotateCamera"){var T=this._scene.activeCamera;T.attachControl(!T.inputs||T.inputs.noPreventDefault,T._useCtrlForPanning,T._panningMouseButton)}else this._scene.activeCamera.attachControl(!this._scene.activeCamera.inputs||this._scene.activeCamera.inputs.noPreventDefault);this._attachedToElement=!1}},c.prototype.startDrag=function(T,A,S){T===void 0&&(T=c._AnyMouseID),this._startDrag(T,A,S);var g=this._lastPointerRay[T];T===c._AnyMouseID&&(g=this._lastPointerRay[Object.keys(this._lastPointerRay)[0]]),g&&this._moveDrag(g)},c.prototype._startDrag=function(T,A,S){if(this._scene.activeCamera&&!this.dragging&&this.attachedNode){P.a._RemoveAndStorePivotPoint(this.attachedNode),A?(this._startDragRay.direction.copyFrom(A.direction),this._startDragRay.origin.copyFrom(A.origin)):(this._startDragRay.origin.copyFrom(this._scene.activeCamera.position),this.attachedNode.getWorldMatrix().getTranslationToRef(this._tmpVector),this._tmpVector.subtractToRef(this._scene.activeCamera.position,this._startDragRay.direction)),this._updateDragPlanePosition(this._startDragRay,S||this._tmpVector);var g=this._pickWithRayOnDragPlane(this._startDragRay);g&&(this.dragging=!0,this.currentDraggingPointerID=T,this.lastDragPosition.copyFrom(g),this.onDragStartObservable.notifyObservers({dragPlanePoint:g,pointerId:this.currentDraggingPointerID}),this._targetPosition.copyFrom(this.attachedNode.absolutePosition),this.detachCameraControls&&this._scene.activeCamera&&this._scene.activeCamera.inputs&&!this._scene.activeCamera.leftCamera&&(this._scene.activeCamera.inputs.attachedToElement?(this._scene.activeCamera.detachControl(),this._attachedToElement=!0):this._attachedToElement=!1)),P.a._RestorePivotPoint(this.attachedNode)}},c.prototype._moveDrag=function(T){this._moving=!0;var A=this._pickWithRayOnDragPlane(T);if(A){this.updateDragPlane&&this._updateDragPlanePosition(T,A);var S=0;this._options.dragAxis?(this.useObjectOrientationForDragging?u.e.TransformCoordinatesToRef(this._options.dragAxis,this.attachedNode.getWorldMatrix().getRotationMatrix(),this._worldDragAxis):this._worldDragAxis.copyFrom(this._options.dragAxis),A.subtractToRef(this.lastDragPosition,this._tmpVector),S=u.e.Dot(this._tmpVector,this._worldDragAxis),this._worldDragAxis.scaleToRef(S,this._dragDelta)):(S=this._dragDelta.length(),A.subtractToRef(this.lastDragPosition,this._dragDelta)),this._targetPosition.addInPlace(this._dragDelta),this.onDragObservable.notifyObservers({dragDistance:S,delta:this._dragDelta,dragPlanePoint:A,dragPlaneNormal:this._dragPlane.forward,pointerId:this.currentDraggingPointerID}),this.lastDragPosition.copyFrom(A)}},c.prototype._pickWithRayOnDragPlane=function(T){var A=this;if(!T)return null;var S=Math.acos(u.e.Dot(this._dragPlane.forward,T.direction));if(S>Math.PI/2&&(S=Math.PI-S),this.maxDragAngle>0&&S>this.maxDragAngle){if(this._useAlternatePickedPointAboveMaxDragAngle){this._tmpVector.copyFrom(T.direction),this.attachedNode.absolutePosition.subtractToRef(T.origin,this._alternatePickedPoint),this._alternatePickedPoint.normalize(),this._alternatePickedPoint.scaleInPlace(this._useAlternatePickedPointAboveMaxDragAngleDragSpeed*u.e.Dot(this._alternatePickedPoint,this._tmpVector)),this._tmpVector.addInPlace(this._alternatePickedPoint);var g=u.e.Dot(this._dragPlane.forward,this._tmpVector);return this._dragPlane.forward.scaleToRef(-g,this._alternatePickedPoint),this._alternatePickedPoint.addInPlace(this._tmpVector),this._alternatePickedPoint.addInPlace(this.attachedNode.absolutePosition),this._alternatePickedPoint}return null}var l=c._planeScene.pickWithRay(T,function(h){return h==A._dragPlane});return l&&l.hit&&l.pickedMesh&&l.pickedPoint?l.pickedPoint:null},c.prototype._updateDragPlanePosition=function(T,A){this._pointA.copyFrom(A),this._options.dragAxis?(this.useObjectOrientationForDragging?u.e.TransformCoordinatesToRef(this._options.dragAxis,this.attachedNode.getWorldMatrix().getRotationMatrix(),this._localAxis):this._localAxis.copyFrom(this._options.dragAxis),T.origin.subtractToRef(this._pointA,this._pointC),this._pointC.normalize(),Math.abs(u.e.Dot(this._localAxis,this._pointC))>.999?Math.abs(u.e.Dot(u.e.UpReadOnly,this._pointC))>.999?this._lookAt.copyFrom(u.e.Right()):this._lookAt.copyFrom(u.e.UpReadOnly):(u.e.CrossToRef(this._localAxis,this._pointC,this._lookAt),u.e.CrossToRef(this._localAxis,this._lookAt,this._lookAt),this._lookAt.normalize()),this._dragPlane.position.copyFrom(this._pointA),this._pointA.addToRef(this._lookAt,this._lookAt),this._dragPlane.lookAt(this._lookAt)):this._options.dragPlaneNormal?(this.useObjectOrientationForDragging?u.e.TransformCoordinatesToRef(this._options.dragPlaneNormal,this.attachedNode.getWorldMatrix().getRotationMatrix(),this._localAxis):this._localAxis.copyFrom(this._options.dragPlaneNormal),this._dragPlane.position.copyFrom(this._pointA),this._pointA.addToRef(this._localAxis,this._lookAt),this._dragPlane.lookAt(this._lookAt)):(this._dragPlane.position.copyFrom(this._pointA),this._dragPlane.lookAt(T.origin)),this._dragPlane.position.copyFrom(this.attachedNode.absolutePosition),this._dragPlane.computeWorldMatrix(!0)},c.prototype.detach=function(){this._pointerObserver&&this._scene.onPointerObservable.remove(this._pointerObserver),this._beforeRenderObserver&&this._scene.onBeforeRenderObservable.remove(this._beforeRenderObserver),this.releaseDrag()},c._AnyMouseID=-2,c}())},function(Ie,y,f){f.d(y,"a",function(){return _}),f.d(y,"b",function(){return R}),f.d(y,"c",function(){return u});var U=f(1),_=function(){function M(){}return M.KEYDOWN=1,M.KEYUP=2,M}(),R=function(M,C){this.type=M,this.event=C},u=function(M){function C(P,m){var c=M.call(this,P,m)||this;return c.type=P,c.event=m,c.skipOnPointerObservable=!1,c}return Object(U.d)(C,M),C}(R)},function(Ie,y,f){f.d(y,"a",function(){return U});var U=function(){function _(){this._defines={},this._currentRank=32,this._maxRank=-1,this._mesh=null}return _.prototype.unBindMesh=function(){this._mesh=null},_.prototype.addFallback=function(R,u){this._defines[R]||(Rthis._maxRank&&(this._maxRank=R),this._defines[R]=new Array),this._defines[R].push(u)},_.prototype.addCPUSkinningFallback=function(R,u){this._mesh=u,Rthis._maxRank&&(this._maxRank=R)},Object.defineProperty(_.prototype,"hasMoreFallbacks",{get:function(){return this._currentRank<=this._maxRank},enumerable:!1,configurable:!0}),_.prototype.reduce=function(R,u){if(this._mesh&&this._mesh.computeBonesUsingShaders&&this._mesh.numBoneInfluencers>0){this._mesh.computeBonesUsingShaders=!1,R=R.replace("#define NUM_BONE_INFLUENCERS "+this._mesh.numBoneInfluencers,"#define NUM_BONE_INFLUENCERS 0"),u._bonesComputationForcedToCPU=!0;for(var M=this._mesh.getScene(),C=0;C0&&(P.computeBonesUsingShaders=!1)}}else{var T=this._defines[this._currentRank];if(T)for(C=0;C=this.subMaterials.length?this.getScene().defaultMaterial:this.subMaterials[m]},P.prototype.getActiveTextures=function(){var m;return(m=C.prototype.getActiveTextures.call(this)).concat.apply(m,this.subMaterials.map(function(c){return c?c.getActiveTextures():[]}))},P.prototype.hasTexture=function(m){var c;if(C.prototype.hasTexture.call(this,m))return!0;for(var T=0;T=0&&A.multiMaterials.splice(S,1),C.prototype.dispose.call(this,m,c)}},P.ParseMultiMaterial=function(m,c){var T=new P(m.name,c);T.id=m.id,R.a&&R.a.AddTagsTo(T,m.tags);for(var A=0;A"u")return new OffscreenCanvas(R,u);var M=document.createElement("canvas");return M.width=R,M.height=u,M},_}()},function(Ie,y,f){f.d(y,"a",function(){return S});var U=f(0),_=f(9),R=f(16),u=f(4),M=f(61),C=f(69),P=f(43),m=f(2),c=f(12),T=f(37),A=f(101),S=function(){function g(l,h,v,E,D){E===void 0&&(E=!1),D===void 0&&(D=null),this.delayLoadState=m.a.DELAYLOADSTATE_NONE,this._totalVertices=0,this._isDisposed=!1,this._indexBufferIsUpdatable=!1,this._positionsCache=[],this.useBoundingInfoFromGeometry=!1,this.id=l,this.uniqueId=h.getUniqueId(),this._engine=h.getEngine(),this._meshes=[],this._scene=h,this._vertexBuffers={},this._indices=[],this._updatable=E,v?this.setAllVerticesData(v,E):(this._totalVertices=0,this._indices=[]),this._engine.getCaps().vertexArrayObject&&(this._vertexArrayObjects={}),D&&(this.applyToMesh(D),D.computeWorldMatrix(!0))}return Object.defineProperty(g.prototype,"boundingBias",{get:function(){return this._boundingBias},set:function(l){this._boundingBias?this._boundingBias.copyFrom(l):this._boundingBias=l.clone(),this._updateBoundingInfo(!0,null)},enumerable:!1,configurable:!0}),g.CreateGeometryForMesh=function(l){var h=new g(g.RandomId(),l.getScene());return h.applyToMesh(l),h},Object.defineProperty(g.prototype,"meshes",{get:function(){return this._meshes},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"extend",{get:function(){return this._extend},enumerable:!1,configurable:!0}),g.prototype.getScene=function(){return this._scene},g.prototype.getEngine=function(){return this._engine},g.prototype.isReady=function(){return this.delayLoadState===m.a.DELAYLOADSTATE_LOADED||this.delayLoadState===m.a.DELAYLOADSTATE_NONE},Object.defineProperty(g.prototype,"doNotSerialize",{get:function(){for(var l=0;l0&&(this._indexBuffer=this._engine.createIndexBuffer(this._indices)),this._indexBuffer&&(this._indexBuffer.references=h),l._syncGeometryWithMorphTargetManager(),l.synchronizeInstances()},g.prototype.notifyUpdate=function(l){this.onGeometryUpdated&&this.onGeometryUpdated(this,l);for(var h=0,v=this._meshes;h0){for(var h=0;h0){for(h=0;h0){for(h=0;h0){var N=new Float32Array(l,w.positionsAttrDesc.offset,w.positionsAttrDesc.count);h.setVerticesData(u.b.PositionKind,N,!1)}if(w.normalsAttrDesc&&w.normalsAttrDesc.count>0){var I=new Float32Array(l,w.normalsAttrDesc.offset,w.normalsAttrDesc.count);h.setVerticesData(u.b.NormalKind,I,!1)}if(w.tangetsAttrDesc&&w.tangetsAttrDesc.count>0){var V=new Float32Array(l,w.tangetsAttrDesc.offset,w.tangetsAttrDesc.count);h.setVerticesData(u.b.TangentKind,V,!1)}if(w.uvsAttrDesc&&w.uvsAttrDesc.count>0){var X=new Float32Array(l,w.uvsAttrDesc.offset,w.uvsAttrDesc.count);h.setVerticesData(u.b.UVKind,X,!1)}if(w.uvs2AttrDesc&&w.uvs2AttrDesc.count>0){var j=new Float32Array(l,w.uvs2AttrDesc.offset,w.uvs2AttrDesc.count);h.setVerticesData(u.b.UV2Kind,j,!1)}if(w.uvs3AttrDesc&&w.uvs3AttrDesc.count>0){var ne=new Float32Array(l,w.uvs3AttrDesc.offset,w.uvs3AttrDesc.count);h.setVerticesData(u.b.UV3Kind,ne,!1)}if(w.uvs4AttrDesc&&w.uvs4AttrDesc.count>0){var te=new Float32Array(l,w.uvs4AttrDesc.offset,w.uvs4AttrDesc.count);h.setVerticesData(u.b.UV4Kind,te,!1)}if(w.uvs5AttrDesc&&w.uvs5AttrDesc.count>0){var de=new Float32Array(l,w.uvs5AttrDesc.offset,w.uvs5AttrDesc.count);h.setVerticesData(u.b.UV5Kind,de,!1)}if(w.uvs6AttrDesc&&w.uvs6AttrDesc.count>0){var pe=new Float32Array(l,w.uvs6AttrDesc.offset,w.uvs6AttrDesc.count);h.setVerticesData(u.b.UV6Kind,pe,!1)}if(w.colorsAttrDesc&&w.colorsAttrDesc.count>0){var ae=new Float32Array(l,w.colorsAttrDesc.offset,w.colorsAttrDesc.count);h.setVerticesData(u.b.ColorKind,ae,!1,w.colorsAttrDesc.stride)}if(w.matricesIndicesAttrDesc&&w.matricesIndicesAttrDesc.count>0){for(var ee=new Int32Array(l,w.matricesIndicesAttrDesc.offset,w.matricesIndicesAttrDesc.count),K=[],$=0;$>8),K.push((16711680&L)>>16),K.push(L>>24&255)}h.setVerticesData(u.b.MatricesIndicesKind,K,!1)}if(w.matricesIndicesExtraAttrDesc&&w.matricesIndicesExtraAttrDesc.count>0){for(ee=new Int32Array(l,w.matricesIndicesExtraAttrDesc.offset,w.matricesIndicesExtraAttrDesc.count),K=[],$=0;$>8),K.push((16711680&L)>>16),K.push(L>>24&255);h.setVerticesData(u.b.MatricesIndicesExtraKind,K,!1)}if(w.matricesWeightsAttrDesc&&w.matricesWeightsAttrDesc.count>0){var G=new Float32Array(l,w.matricesWeightsAttrDesc.offset,w.matricesWeightsAttrDesc.count);h.setVerticesData(u.b.MatricesWeightsKind,G,!1)}if(w.indicesAttrDesc&&w.indicesAttrDesc.count>0){var Q=new Int32Array(l,w.indicesAttrDesc.offset,w.indicesAttrDesc.count);h.setIndices(Q,null)}if(w.subMeshesAttrDesc&&w.subMeshesAttrDesc.count>0){var oe=new Int32Array(l,w.subMeshesAttrDesc.offset,5*w.subMeshesAttrDesc.count);for(h.subMeshes=[],$=0;$>8),K.push((16711680&W)>>16),K.push(W>>24&255)}h.setVerticesData(u.b.MatricesIndicesKind,K,l.matricesIndices._updatable)}if(l.matricesIndicesExtra)if(l.matricesIndicesExtra._isExpanded)delete l.matricesIndices._isExpanded,h.setVerticesData(u.b.MatricesIndicesExtraKind,l.matricesIndicesExtra,l.matricesIndicesExtra._updatable);else{for(K=[],$=0;$>8),K.push((16711680&W)>>16),K.push(W>>24&255);h.setVerticesData(u.b.MatricesIndicesExtraKind,K,l.matricesIndicesExtra._updatable)}l.matricesWeights&&(g._CleanMatricesWeights(l,h),h.setVerticesData(u.b.MatricesWeightsKind,l.matricesWeights,l.matricesWeights._updatable)),l.matricesWeightsExtra&&h.setVerticesData(u.b.MatricesWeightsExtraKind,l.matricesWeightsExtra,l.matricesWeights._updatable),h.setIndices(l.indices,null)}if(l.subMeshes){h.subMeshes=[];for(var q=0;q-1){var E=h.getScene().getLastSkeletonByID(l.skeletonId);if(E){v=E.bones.length;for(var D=h.getVerticesData(u.b.MatricesIndicesKind),w=h.getVerticesData(u.b.MatricesIndicesExtraKind),N=l.matricesWeights,I=l.matricesWeightsExtra,V=l.numBoneInfluencer,X=N.length,j=0;jV-1)&&(te=V-1),ne>.001){var ae=1/ne;for(de=0;de<4;de++)N[j+de]*=ae;if(I)for(de=0;de<4;de++)I[j+de]*=ae}else te>=4?(I[j+te-4]=1-ne,w[j+te-4]=v):(N[j+te]=1-ne,D[j+te]=v)}h.setVerticesData(u.b.MatricesIndicesKind,D),l.matricesWeightsExtra&&h.setVerticesData(u.b.MatricesIndicesExtraKind,w)}}}},g.Parse=function(l,h,v){if(h.getGeometryByID(l.id))return null;var E=new g(l.id,h,void 0,l.updatable);return T.a&&T.a.AddTagsTo(E,l.tags),l.delayLoadingFile?(E.delayLoadState=m.a.DELAYLOADSTATE_NOTLOADED,E.delayLoadingFile=v+l.delayLoadingFile,E._boundingInfo=new P.a(U.e.FromArray(l.boundingBoxMinimum),U.e.FromArray(l.boundingBoxMaximum)),E._delayInfo=[],l.hasUVs&&E._delayInfo.push(u.b.UVKind),l.hasUVs2&&E._delayInfo.push(u.b.UV2Kind),l.hasUVs3&&E._delayInfo.push(u.b.UV3Kind),l.hasUVs4&&E._delayInfo.push(u.b.UV4Kind),l.hasUVs5&&E._delayInfo.push(u.b.UV5Kind),l.hasUVs6&&E._delayInfo.push(u.b.UV6Kind),l.hasColors&&E._delayInfo.push(u.b.ColorKind),l.hasMatricesIndices&&E._delayInfo.push(u.b.MatricesIndicesKind),l.hasMatricesWeights&&E._delayInfo.push(u.b.MatricesWeightsKind),E._delayLoadingFunction=R.a.ImportVertexData):R.a.ImportVertexData(l,E),h.pushGeometry(E,!0),E},g}()},function(Ie,y,f){f.d(y,"e",function(){return U}),f.d(y,"c",function(){return M}),f.d(y,"a",function(){return C}),f.d(y,"b",function(){return P}),f.d(y,"f",function(){return m}),f.d(y,"g",function(){return c}),f.d(y,"d",function(){return T});var U,_=f(14),R=f(0),u=f(28);(function(A){A[A.CW=0]="CW",A[A.CCW=1]="CCW"})(U||(U={}));var M=function(){function A(){}return A.Interpolate=function(S,g,l,h,v){for(var E=1-3*h+3*g,D=3*h-6*g,w=3*g,N=S,I=0;I<5;I++){var V=N*N;N-=(E*(V*N)+D*V+w*N-S)*(1/(3*E*V+2*D*N+w)),N=Math.min(1,Math.max(0,N))}return 3*Math.pow(1-N,2)*N*l+3*(1-N)*Math.pow(N,2)*v+Math.pow(N,3)},A}(),C=function(){function A(S){this._radians=S,this._radians<0&&(this._radians+=2*Math.PI)}return A.prototype.degrees=function(){return 180*this._radians/Math.PI},A.prototype.radians=function(){return this._radians},A.BetweenTwoPoints=function(S,g){var l=g.subtract(S);return new A(Math.atan2(l.y,l.x))},A.FromRadians=function(S){return new A(S)},A.FromDegrees=function(S){return new A(S*Math.PI/180)},A}(),P=function(A,S,g){this.startPoint=A,this.midPoint=S,this.endPoint=g;var l=Math.pow(S.x,2)+Math.pow(S.y,2),h=(Math.pow(A.x,2)+Math.pow(A.y,2)-l)/2,v=(l-Math.pow(g.x,2)-Math.pow(g.y,2))/2,E=(A.x-S.x)*(S.y-g.y)-(S.x-g.x)*(A.y-S.y);this.centerPoint=new R.d((h*(S.y-g.y)-v*(A.y-S.y))/E,((A.x-S.x)*v-(S.x-g.x)*h)/E),this.radius=this.centerPoint.subtract(this.startPoint).length(),this.startAngle=C.BetweenTwoPoints(this.centerPoint,this.startPoint);var D=this.startAngle.degrees(),w=C.BetweenTwoPoints(this.centerPoint,this.midPoint).degrees(),N=C.BetweenTwoPoints(this.centerPoint,this.endPoint).degrees();w-D>180&&(w-=360),w-D<-180&&(w+=360),N-w>180&&(N-=360),N-w<-180&&(N+=360),this.orientation=w-D<0?U.CW:U.CCW,this.angle=C.FromDegrees(this.orientation===U.CW?D-N:N-D)},m=function(){function A(S,g){this._points=new Array,this._length=0,this.closed=!1,this._points.push(new R.d(S,g))}return A.prototype.addLineTo=function(S,g){if(this.closed)return this;var l=new R.d(S,g),h=this._points[this._points.length-1];return this._points.push(l),this._length+=l.subtract(h).length(),this},A.prototype.addArcTo=function(S,g,l,h,v){if(v===void 0&&(v=36),this.closed)return this;var E=this._points[this._points.length-1],D=new R.d(S,g),w=new R.d(l,h),N=new P(E,D,w),I=N.angle.radians()/v;N.orientation===U.CW&&(I*=-1);for(var V=N.startAngle.radians()+I,X=0;X1)return R.d.Zero();for(var g=S*this.length(),l=0,h=0;h=l&&g<=w){var N=D.normalize(),I=g-l;return new R.d(E.x+N.x*I,E.y+N.y*I)}l=w}return R.d.Zero()},A.StartingAt=function(S,g){return new A(S,g)},A}(),c=function(){function A(S,g,l,h){g===void 0&&(g=null),h===void 0&&(h=!1),this.path=S,this._curve=new Array,this._distances=new Array,this._tangents=new Array,this._normals=new Array,this._binormals=new Array,this._pointAtData={id:0,point:R.e.Zero(),previousPointArrayIndex:0,position:0,subPosition:0,interpolateReady:!1,interpolationMatrix:R.a.Identity()};for(var v=0;vg){var l=S;S=g,g=l}var h=this.getCurve(),v=this.getPointAt(S),E=this.getPreviousPointIndexAt(S),D=this.getPointAt(g),w=this.getPreviousPointIndexAt(g)+1,N=[];return S!==0&&(E++,N.push(v)),N.push.apply(N,h.slice(E,w)),g===1&&S!==1||N.push(D),new A(N,this.getNormalAt(S),this._raw,this._alignTangentsWithPath)},A.prototype.update=function(S,g,l){g===void 0&&(g=null),l===void 0&&(l=!1);for(var h=0;hg+1;)g++,l=this._curve[S].subtract(this._curve[S-g]);return l},A.prototype._normalVector=function(S,g){var l,h,v=S.length();return v===0&&(v=1),g==null?(h=_.a.WithinEpsilon(Math.abs(S.y)/v,1,u.a)?_.a.WithinEpsilon(Math.abs(S.x)/v,1,u.a)?_.a.WithinEpsilon(Math.abs(S.z)/v,1,u.a)?R.e.Zero():new R.e(0,0,1):new R.e(1,0,0):new R.e(0,-1,0),l=R.e.Cross(S,h)):(l=R.e.Cross(S,g),R.e.CrossToRef(l,S,l)),l.normalize(),l},A.prototype._updatePointAtData=function(S,g){if(g===void 0&&(g=!1),this._pointAtData.id===S)return this._pointAtData.interpolateReady||this._updateInterpolationMatrix(),this._pointAtData;this._pointAtData.id=S;var l=this.getPoints();if(S<=0)return this._setPointAtData(0,0,l[0],0,g);if(S>=1)return this._setPointAtData(1,1,l[l.length-1],l.length-1,g);for(var h,v=l[0],E=0,D=S*this.length(),w=1;wD){var I=(E-D)/N,V=v.subtract(h),X=h.add(V.scaleInPlace(I));return this._setPointAtData(S,1-I,X,w-1,g)}v=h}return this._pointAtData},A.prototype._setPointAtData=function(S,g,l,h,v){return this._pointAtData.point=l,this._pointAtData.position=S,this._pointAtData.subPosition=g,this._pointAtData.previousPointArrayIndex=h,this._pointAtData.interpolateReady=v,v&&this._updateInterpolationMatrix(),this._pointAtData},A.prototype._updateInterpolationMatrix=function(){this._pointAtData.interpolationMatrix=R.a.Identity();var S=this._pointAtData.previousPointArrayIndex;if(S!==this._tangents.length-1){var g=S+1,l=this._tangents[S].clone(),h=this._normals[S].clone(),v=this._binormals[S].clone(),E=this._tangents[g].clone(),D=this._normals[g].clone(),w=this._binormals[g].clone(),N=R.b.RotationQuaternionFromAxis(h,v,l),I=R.b.RotationQuaternionFromAxis(D,w,E);R.b.Slerp(N,I,this._pointAtData.subPosition).toRotationMatrix(this._pointAtData.interpolationMatrix)}},A}(),T=function(){function A(S){this._length=0,this._points=S,this._length=this._computeLength(S)}return A.CreateQuadraticBezier=function(S,g,l,h){h=h>2?h:3;for(var v=new Array,E=function(w,N,I,V){return(1-w)*(1-w)*N+2*w*(1-w)*I+w*w*V},D=0;D<=h;D++)v.push(new R.e(E(D/h,S.x,g.x,l.x),E(D/h,S.y,g.y,l.y),E(D/h,S.z,g.z,l.z)));return new A(v)},A.CreateCubicBezier=function(S,g,l,h,v){v=v>3?v:4;for(var E=new Array,D=function(N,I,V,X,j){return(1-N)*(1-N)*(1-N)*I+3*N*(1-N)*(1-N)*V+3*N*N*(1-N)*X+N*N*N*j},w=0;w<=v;w++)E.push(new R.e(D(w/v,S.x,g.x,l.x,h.x),D(w/v,S.y,g.y,l.y,h.y),D(w/v,S.z,g.z,l.z,h.z)));return new A(E)},A.CreateHermiteSpline=function(S,g,l,h,v){for(var E=new Array,D=1/v,w=0;w<=v;w++)E.push(R.e.Hermite(S,g,l,h,w*D));return new A(E)},A.CreateCatmullRomSpline=function(S,g,l){var h=new Array,v=1/g,E=0;if(l){for(var D=S.length,w=0;w1&&(this._multiview=!0,X.push("#define MULTIVIEW"),this._options.uniforms.indexOf("viewProjection")!==-1&&this._options.uniforms.push("viewProjectionR")===-1&&this._options.uniforms.push("viewProjectionR"));for(var te=0;te4&&(j.push(u.b.MatricesIndicesExtraKind),j.push(u.b.MatricesWeightsExtraKind));var pe=E.skeleton;de=E.numBoneInfluencers,X.push("#define NUM_BONE_INFLUENCERS "+de),ne.addCPUSkinningFallback(0,E),pe.isUsingTextureForMatrices?(X.push("#define BONETEXTURE"),this._options.uniforms.indexOf("boneTextureWidth")===-1&&this._options.uniforms.push("boneTextureWidth"),this._options.samplers.indexOf("boneSampler")===-1&&this._options.samplers.push("boneSampler")):(X.push("#define BonesPerMesh "+(pe.bones.length+1)),this._options.uniforms.indexOf("mBones")===-1&&this._options.uniforms.push("mBones"))}else X.push("#define NUM_BONE_INFLUENCERS 0");for(var ae in this._textures)if(!this._textures[ae].isReady())return!1;E&&this._shouldTurnAlphaTestOn(E)&&X.push("#define ALPHATEST");var ee=this._shaderPath,K=this._options.uniforms,$=this._options.uniformBuffers,L=this._options.samplers;this.customShaderNameResolve&&(K=K.slice(),$=$.slice(),L=L.slice(),ee=this.customShaderNameResolve(ee,K,$,L,X,j));var G=this._effect,Q=X.join(` +`);return this._cachedDefines!==Q&&(this._cachedDefines=Q,this._effect=V.createEffect(ee,{attributes:j,uniformsNames:K,uniformBuffersNames:$,samplers:L,defines:Q,fallbacks:ne,onCompiled:this.onCompiled,onError:this.onError,indexParameters:{maxSimultaneousMorphTargets:de}},V),this._onEffectCreatedObservable&&(g.effect=this._effect,this._onEffectCreatedObservable.notifyObservers(g))),(N=!(!((w=this._effect)===null||w===void 0)&&w.isReady()))!==null&&N!==void 0&&!N&&(G!==this._effect&&I.resetCachedMaterial(),this._renderId=I.getRenderId(),this._effect._wasPreviouslyReady=!0,!0)},v.prototype.bindOnlyWorldMatrix=function(E,D){var w=this.getScene(),N=D??this._effect;N&&(this._options.uniforms.indexOf("world")!==-1&&N.setMatrix("world",E),this._options.uniforms.indexOf("worldView")!==-1&&(E.multiplyToRef(w.getViewMatrix(),this._cachedWorldViewMatrix),N.setMatrix("worldView",this._cachedWorldViewMatrix)),this._options.uniforms.indexOf("worldViewProjection")!==-1&&(E.multiplyToRef(w.getTransformMatrix(),this._cachedWorldViewProjectionMatrix),N.setMatrix("worldViewProjection",this._cachedWorldViewProjectionMatrix)))},v.prototype.bindForSubMesh=function(E,D,w){this.bind(E,D,w._effectOverride)},v.prototype.bind=function(E,D,w){this.bindOnlyWorldMatrix(E,w);var N=w??this._effect;if(N&&this.getScene().getCachedMaterial()!==this){var I;for(I in this._options.uniforms.indexOf("view")!==-1&&N.setMatrix("view",this.getScene().getViewMatrix()),this._options.uniforms.indexOf("projection")!==-1&&N.setMatrix("projection",this.getScene().getProjectionMatrix()),this._options.uniforms.indexOf("viewProjection")!==-1&&(N.setMatrix("viewProjection",this.getScene().getTransformMatrix()),this._multiview&&N.setMatrix("viewProjectionR",this.getScene()._transformMatrixR)),this.getScene().activeCamera&&this._options.uniforms.indexOf("cameraPosition")!==-1&&N.setVector3("cameraPosition",this.getScene().activeCamera.globalPosition),C.a.BindBonesParameters(D,N),this._textures)N.setTexture(I,this._textures[I]);for(I in this._textureArrays)N.setTextureArray(I,this._textureArrays[I]);for(I in this._ints)N.setInt(I,this._ints[I]);for(I in this._floats)N.setFloat(I,this._floats[I]);for(I in this._floatsArrays)N.setArray(I,this._floatsArrays[I]);for(I in this._colors3)N.setColor3(I,this._colors3[I]);for(I in this._colors3Arrays)N.setArray3(I,this._colors3Arrays[I]);for(I in this._colors4){var V=this._colors4[I];N.setFloat4(I,V.r,V.g,V.b,V.a)}for(I in this._colors4Arrays)N.setArray4(I,this._colors4Arrays[I]);for(I in this._vectors2)N.setVector2(I,this._vectors2[I]);for(I in this._vectors3)N.setVector3(I,this._vectors3[I]);for(I in this._vectors4)N.setVector4(I,this._vectors4[I]);for(I in this._matrices)N.setMatrix(I,this._matrices[I]);for(I in this._matrixArrays)N.setMatrices(I,this._matrixArrays[I]);for(I in this._matrices3x3)N.setMatrix3x3(I,this._matrices3x3[I]);for(I in this._matrices2x2)N.setMatrix2x2(I,this._matrices2x2[I]);for(I in this._vectors2Arrays)N.setArray2(I,this._vectors2Arrays[I]);for(I in this._vectors3Arrays)N.setArray3(I,this._vectors3Arrays[I]);for(I in this._vectors4Arrays)N.setArray4(I,this._vectors4Arrays[I])}var X=this._effect;this._effect=N,this._afterBind(D),this._effect=X},v.prototype._afterBind=function(E){h.prototype._afterBind.call(this,E),this.getScene()._cachedEffect=this._effect},v.prototype.getActiveTextures=function(){var E=h.prototype.getActiveTextures.call(this);for(var D in this._textures)E.push(this._textures[D]);for(var D in this._textureArrays)for(var w=this._textureArrays[D],N=0;NI.snapDistance){var ee=Math.floor(Math.abs(j)/I.snapDistance);j%=I.snapDistance,ae.delta.normalizeToRef(ne),ne.scaleInPlace(I.snapDistance*ee),I.attachedNode.getWorldMatrix().addTranslationFromFloats(ne.x,ne.y,ne.z),I.attachedNode.updateCache(),te.snapDistance=I.snapDistance*ee,I.onSnapObservable.notifyObservers(te)}I._matrixChanged()}}),I.dragBehavior.onDragStartObservable.add(function(){I._dragging=!0}),I.dragBehavior.onDragEndObservable.add(function(){I._dragging=!1});var de=E._getSharedGizmoLight();de.includedOnlyMeshes=de.includedOnlyMeshes.concat(I._rootMesh.getChildMeshes(!1));var pe={gizmoMeshes:V.getChildMeshes(),colliderMeshes:X.getChildMeshes(),material:I._coloredMaterial,hoverMaterial:I._hoverMaterial,disableMaterial:I._disableMaterial,active:!1};return(N=I._parent)===null||N===void 0||N.addToAxisCache(X,pe),I._pointerObserver=E.utilityLayerScene.onPointerObservable.add(function(ae){var ee;if(!I._customMeshSet&&(I._isHovered=pe.colliderMeshes.indexOf((ee=ae?.pickInfo)===null||ee===void 0?void 0:ee.pickedMesh)!=-1,!I._parent)){var K=I._isHovered||I._dragging?I._hoverMaterial:I._coloredMaterial;pe.gizmoMeshes.forEach(function($){$.material=K,$.color&&($.color=K.diffuseColor)})}}),I}return Object(U.d)(l,g),l._CreateArrow=function(h,v,E,D){E===void 0&&(E=1),D===void 0&&(D=!1);var w=new u.a("arrow",h),N=C.a.CreateCylinder("cylinder",{diameterTop:0,height:.075,diameterBottom:.0375*(1+(E-1)/4),tessellation:96},h),I=C.a.CreateCylinder("cylinder",{diameterTop:.005*E,height:.275,diameterBottom:.005*E,tessellation:96},h);return N.parent=w,N.material=v,N.rotation.x=Math.PI/2,N.position.z+=.3,I.parent=w,I.material=v,I.position.z+=.1375,I.rotation.x=Math.PI/2,D&&(I.visibility=0,N.visibility=0),w},l._CreateArrowInstance=function(h,v){for(var E=new u.a("arrow",h),D=0,w=v.getChildMeshes();D0 +#ifdef BONETEXTURE +uniform sampler2D boneSampler; +uniform float boneTextureWidth; +#else +uniform mat4 mBones[BonesPerMesh]; +#ifdef BONES_VELOCITY_ENABLED +uniform mat4 mPreviousBones[BonesPerMesh]; +#endif +#endif +attribute vec4 matricesIndices; +attribute vec4 matricesWeights; +#if NUM_BONE_INFLUENCERS>4 +attribute vec4 matricesIndicesExtra; +attribute vec4 matricesWeightsExtra; +#endif +#ifdef BONETEXTURE +#define inline +mat4 readMatrixFromRawSampler(sampler2D smp,float index) +{ +float offset=index*4.0; +float dx=1.0/boneTextureWidth; +vec4 m0=texture2D(smp,vec2(dx*(offset+0.5),0.)); +vec4 m1=texture2D(smp,vec2(dx*(offset+1.5),0.)); +vec4 m2=texture2D(smp,vec2(dx*(offset+2.5),0.)); +vec4 m3=texture2D(smp,vec2(dx*(offset+3.5),0.)); +return mat4(m0,m1,m2,m3); +} +#endif +#endif`;f(5).a.IncludesShadersStore[U]=_},function(Ie,y,f){var U="instancesDeclaration",_=`#ifdef INSTANCES +attribute vec4 world0; +attribute vec4 world1; +attribute vec4 world2; +attribute vec4 world3; +#ifdef THIN_INSTANCES +uniform mat4 world; +#endif +#else +uniform mat4 world; +#endif`;f(5).a.IncludesShadersStore[U]=_},function(Ie,y,f){var U="instancesVertex",_=`#ifdef INSTANCES +mat4 finalWorld=mat4(world0,world1,world2,world3); +#ifdef THIN_INSTANCES +finalWorld=world*finalWorld; +#endif +#else +mat4 finalWorld=world; +#endif`;f(5).a.IncludesShadersStore[U]=_},function(Ie,y,f){var U=`#if NUM_BONE_INFLUENCERS>0 +mat4 influence; +#ifdef BONETEXTURE +influence=readMatrixFromRawSampler(boneSampler,matricesIndices[0])*matricesWeights[0]; +#if NUM_BONE_INFLUENCERS>1 +influence+=readMatrixFromRawSampler(boneSampler,matricesIndices[1])*matricesWeights[1]; +#endif +#if NUM_BONE_INFLUENCERS>2 +influence+=readMatrixFromRawSampler(boneSampler,matricesIndices[2])*matricesWeights[2]; +#endif +#if NUM_BONE_INFLUENCERS>3 +influence+=readMatrixFromRawSampler(boneSampler,matricesIndices[3])*matricesWeights[3]; +#endif +#if NUM_BONE_INFLUENCERS>4 +influence+=readMatrixFromRawSampler(boneSampler,matricesIndicesExtra[0])*matricesWeightsExtra[0]; +#endif +#if NUM_BONE_INFLUENCERS>5 +influence+=readMatrixFromRawSampler(boneSampler,matricesIndicesExtra[1])*matricesWeightsExtra[1]; +#endif +#if NUM_BONE_INFLUENCERS>6 +influence+=readMatrixFromRawSampler(boneSampler,matricesIndicesExtra[2])*matricesWeightsExtra[2]; +#endif +#if NUM_BONE_INFLUENCERS>7 +influence+=readMatrixFromRawSampler(boneSampler,matricesIndicesExtra[3])*matricesWeightsExtra[3]; +#endif +#else +influence=mBones[int(matricesIndices[0])]*matricesWeights[0]; +#if NUM_BONE_INFLUENCERS>1 +influence+=mBones[int(matricesIndices[1])]*matricesWeights[1]; +#endif +#if NUM_BONE_INFLUENCERS>2 +influence+=mBones[int(matricesIndices[2])]*matricesWeights[2]; +#endif +#if NUM_BONE_INFLUENCERS>3 +influence+=mBones[int(matricesIndices[3])]*matricesWeights[3]; +#endif +#if NUM_BONE_INFLUENCERS>4 +influence+=mBones[int(matricesIndicesExtra[0])]*matricesWeightsExtra[0]; +#endif +#if NUM_BONE_INFLUENCERS>5 +influence+=mBones[int(matricesIndicesExtra[1])]*matricesWeightsExtra[1]; +#endif +#if NUM_BONE_INFLUENCERS>6 +influence+=mBones[int(matricesIndicesExtra[2])]*matricesWeightsExtra[2]; +#endif +#if NUM_BONE_INFLUENCERS>7 +influence+=mBones[int(matricesIndicesExtra[3])]*matricesWeightsExtra[3]; +#endif +#endif +finalWorld=finalWorld*influence; +#endif`;f(5).a.IncludesShadersStore.bonesVertex=U},function(Ie,y,f){f.d(y,"a",function(){return C});var U=f(0),_=f(7),R=f(4),u=f(16),M=f(43);u.a.CreateRibbon=function(P){var m=P.pathArray,c=P.closeArray||!1,T=P.closePath||!1,A=P.invertUV||!1,S=Math.floor(m[0].length/2),g=P.offset||S;g=g>S?S:Math.floor(g);var l,h,v,E,D=P.sideOrientation===0?0:P.sideOrientation||u.a.DEFAULTSIDE,w=P.uvs,N=P.colors,I=[],V=[],X=[],j=[],ne=[],te=[],de=[],pe=[],ae=[],ee=[];if(m.length<2){var K=[],$=[];for(v=0;v0&&(Q=L[E].subtract(L[E-1]).length()+de[h],ne[h].push(Q),de[h]=Q),E++;T&&(E--,I.push(L[0].x,L[0].y,L[0].z),Q=L[E].subtract(L[0]).length()+de[h],ne[h].push(Q),de[h]=Q),ae[h]=G+k,ee[h]=Y,Y+=G+k}var H,Z,W=null,q=null;for(v=0;v=U.a.ACTION_OnPickTrigger&&M<=U.a.ACTION_OnPickUpTrigger)return!0}return!1},enumerable:!1,configurable:!0}),R.HasSpecificTrigger=function(u){for(var M in R.Triggers)if(R.Triggers.hasOwnProperty(M)&&parseInt(M)===u)return!0;return!1},R.Triggers={},R}()},function(Ie,y,f){f.d(y,"a",function(){return C});var U=f(1),_=f(25),R=f(3),u=f(19),M=f(15),C=function(){function P(m){this._texture=null,this.diffuseBlendLevel=1,this.roughnessBlendLevel=1,this.bumpLevel=1,this._normalBlendMethod=_.a.MATERIAL_NORMALBLENDMETHOD_WHITEOUT,this._isEnabled=!1,this.isEnabled=!1,this._internalMarkAllSubMeshesAsTexturesDirty=m}return P.prototype._markAllSubMeshesAsTexturesDirty=function(){this._internalMarkAllSubMeshesAsTexturesDirty()},P.prototype.isReadyForSubMesh=function(m,c){var T=c.getEngine();return!(m._areTexturesDirty&&c.texturesEnabled&&T.getCaps().standardDerivatives&&this._texture&&u.a.DetailTextureEnabled&&!this._texture.isReady())},P.prototype.prepareDefines=function(m,c){if(this._isEnabled){m.DETAIL_NORMALBLENDMETHOD=this._normalBlendMethod;var T=c.getEngine();m._areTexturesDirty&&(T.getCaps().standardDerivatives&&this._texture&&u.a.DetailTextureEnabled&&this._isEnabled?(M.a.PrepareDefinesForMergedUV(this._texture,m,"DETAIL"),m.DETAIL_NORMALBLENDMETHOD=this._normalBlendMethod):m.DETAIL=!1)}else m.DETAIL=!1},P.prototype.bindForSubMesh=function(m,c,T){this._isEnabled&&(m.useUbo&&T&&m.isSync||this._texture&&u.a.DetailTextureEnabled&&(m.updateFloat4("vDetailInfos",this._texture.coordinatesIndex,this.diffuseBlendLevel,this.bumpLevel,this.roughnessBlendLevel),M.a.BindTextureMatrix(this._texture,m,"detail")),c.texturesEnabled&&this._texture&&u.a.DetailTextureEnabled&&m.setTexture("detailSampler",this._texture))},P.prototype.hasTexture=function(m){return this._texture===m},P.prototype.getActiveTextures=function(m){this._texture&&m.push(this._texture)},P.prototype.getAnimatables=function(m){this._texture&&this._texture.animations&&this._texture.animations.length>0&&m.push(this._texture)},P.prototype.dispose=function(m){var c;m&&((c=this._texture)===null||c===void 0||c.dispose())},P.prototype.getClassName=function(){return"DetailMap"},P.AddUniforms=function(m){m.push("vDetailInfos")},P.AddSamplers=function(m){m.push("detailSampler")},P.PrepareUniformBuffer=function(m){m.addUniform("vDetailInfos",4),m.addUniform("detailMatrix",16)},P.prototype.copyTo=function(m){R.a.Clone(function(){return m},this)},P.prototype.serialize=function(){return R.a.Serialize(this)},P.prototype.parse=function(m,c,T){var A=this;R.a.Parse(function(){return A},m,c,T)},Object(U.c)([Object(R.m)("detailTexture"),Object(R.b)("_markAllSubMeshesAsTexturesDirty")],P.prototype,"texture",void 0),Object(U.c)([Object(R.c)()],P.prototype,"diffuseBlendLevel",void 0),Object(U.c)([Object(R.c)()],P.prototype,"roughnessBlendLevel",void 0),Object(U.c)([Object(R.c)()],P.prototype,"bumpLevel",void 0),Object(U.c)([Object(R.c)(),Object(R.b)("_markAllSubMeshesAsTexturesDirty")],P.prototype,"normalBlendMethod",void 0),Object(U.c)([Object(R.c)(),Object(R.b)("_markAllSubMeshesAsTexturesDirty")],P.prototype,"isEnabled",void 0),P}()},function(Ie,y,f){var U="morphTargetsVertexGlobalDeclaration",_=`#ifdef MORPHTARGETS +uniform float morphTargetInfluences[NUM_MORPH_INFLUENCERS]; +#endif`;f(5).a.IncludesShadersStore[U]=_},function(Ie,y,f){var U="morphTargetsVertexDeclaration",_=`#ifdef MORPHTARGETS +attribute vec3 position{X}; +#ifdef MORPHTARGETS_NORMAL +attribute vec3 normal{X}; +#endif +#ifdef MORPHTARGETS_TANGENT +attribute vec3 tangent{X}; +#endif +#ifdef MORPHTARGETS_UV +attribute vec2 uv_{X}; +#endif +#endif`;f(5).a.IncludesShadersStore[U]=_},function(Ie,y,f){f.d(y,"a",function(){return u});var U=f(25),_=f(4),R=f(2),u=function(){function M(C){this._vertexBuffers={},this._scene=C}return M.prototype._prepareBuffers=function(){if(!this._vertexBuffers[_.b.PositionKind]){var C=[];C.push(1,1),C.push(-1,1),C.push(-1,-1),C.push(1,-1),this._vertexBuffers[_.b.PositionKind]=new _.b(this._scene.getEngine(),C,_.b.PositionKind,!1,!1,2),this._buildIndexBuffer()}},M.prototype._buildIndexBuffer=function(){var C=[];C.push(0),C.push(1),C.push(2),C.push(0),C.push(2),C.push(3),this._indexBuffer=this._scene.getEngine().createIndexBuffer(C)},M.prototype._rebuild=function(){var C=this._vertexBuffers[_.b.PositionKind];C&&(C._rebuild(),this._buildIndexBuffer())},M.prototype._prepareFrame=function(C,P){C===void 0&&(C=null),P===void 0&&(P=null);var m=this._scene.activeCamera;return!!m&&!(!(P=P||m._postProcesses.filter(function(c){return c!=null}))||P.length===0||!this._scene.postProcessesEnabled)&&(P[0].activate(m,C,P!=null),!0)},M.prototype.directRender=function(C,P,m,c,T,A){P===void 0&&(P=null),m===void 0&&(m=!1),c===void 0&&(c=0),T===void 0&&(T=0),A===void 0&&(A=!1);for(var S=this._scene.getEngine(),g=0;g3?0:v,E);var ae=R.a.CreateRibbon(P,{pathArray:te,closeArray:l,closePath:h,updatable:w,sideOrientation:N,invertUV:V,frontUVs:X||void 0,backUVs:j||void 0},D);return ae._creationDataStorage.pathArray=te,ae._creationDataStorage.path3D=ne,ae._creationDataStorage.cap=v,ae},C}()},function(Ie,y,f){f.d(y,"b",function(){return c}),f.d(y,"a",function(){return T});var U=f(1),_=f(9),R=f(4),u=f(7),M=f(151),C=f(25),P=f(73),m=f(15),c=(f(166),f(167),function(A){function S(g,l,h,v,E,D,w){l===void 0&&(l=null),h===void 0&&(h=null),v===void 0&&(v=null);var N=A.call(this,g,l,h,v,E)||this;N.useVertexColor=D,N.useVertexAlpha=w,N.color=new _.a(1,1,1),N.alpha=1,v&&(N.color=v.color.clone(),N.alpha=v.alpha,N.useVertexColor=v.useVertexColor,N.useVertexAlpha=v.useVertexAlpha),N.intersectionThreshold=.1;var I={attributes:[R.b.PositionKind,"world0","world1","world2","world3"],uniforms:["vClipPlane","vClipPlane2","vClipPlane3","vClipPlane4","vClipPlane5","vClipPlane6","world","viewProjection"],needAlphaBlending:!0,defines:[]};return w===!1&&(I.needAlphaBlending=!1),D?(I.defines.push("#define VERTEXCOLOR"),I.attributes.push(R.b.ColorKind)):(I.uniforms.push("color"),N.color4=new _.b),N._colorShader=new P.a("colorShader",N.getScene(),"color",I),N}return Object(U.d)(S,A),S.prototype._addClipPlaneDefine=function(g){var l="#define "+g;this._colorShader.options.defines.indexOf(l)===-1&&this._colorShader.options.defines.push(l)},S.prototype._removeClipPlaneDefine=function(g){var l="#define "+g,h=this._colorShader.options.defines.indexOf(l);h!==-1&&this._colorShader.options.defines.splice(h,1)},S.prototype.isReady=function(){var g=this.getScene();return g.clipPlane?this._addClipPlaneDefine("CLIPPLANE"):this._removeClipPlaneDefine("CLIPPLANE"),g.clipPlane2?this._addClipPlaneDefine("CLIPPLANE2"):this._removeClipPlaneDefine("CLIPPLANE2"),g.clipPlane3?this._addClipPlaneDefine("CLIPPLANE3"):this._removeClipPlaneDefine("CLIPPLANE3"),g.clipPlane4?this._addClipPlaneDefine("CLIPPLANE4"):this._removeClipPlaneDefine("CLIPPLANE4"),g.clipPlane5?this._addClipPlaneDefine("CLIPPLANE5"):this._removeClipPlaneDefine("CLIPPLANE5"),g.clipPlane6?this._addClipPlaneDefine("CLIPPLANE6"):this._removeClipPlaneDefine("CLIPPLANE6"),!!this._colorShader.isReady(this)&&A.prototype.isReady.call(this)},S.prototype.getClassName=function(){return"LinesMesh"},Object.defineProperty(S.prototype,"material",{get:function(){return this._colorShader},set:function(g){},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"checkCollisions",{get:function(){return!1},enumerable:!1,configurable:!0}),S.prototype._bind=function(g,l,h){if(!this._geometry)return this;var v=this._colorShader.getEffect(),E=this.isUnIndexed?null:this._geometry.getIndexBuffer();if(this._geometry._bind(v,E),!this.useVertexColor){var D=this.color,w=D.r,N=D.g,I=D.b;this.color4.set(w,N,I,this.alpha),this._colorShader.setColor4("color",this.color4)}return m.a.BindClipPlane(v,this.getScene()),this},S.prototype._draw=function(g,l,h){if(!this._geometry||!this._geometry.getVertexBuffers()||!this._unIndexed&&!this._geometry.getIndexBuffer())return this;var v=this.getScene().getEngine();return this._unIndexed?v.drawArraysType(C.a.LineListDrawMode,g.verticesStart,g.verticesCount,h):v.drawElementsType(C.a.LineListDrawMode,g.indexStart,g.indexCount,h),this},S.prototype.dispose=function(g){this._colorShader.dispose(!1,!1,!0),A.prototype.dispose.call(this,g)},S.prototype.clone=function(g,l,h){return l===void 0&&(l=null),new S(g,this.getScene(),l,this,h)},S.prototype.createInstance=function(g){return new T(g,this)},S}(u.a)),T=function(A){function S(g,l){var h=A.call(this,g,l)||this;return h.intersectionThreshold=l.intersectionThreshold,h}return Object(U.d)(S,A),S.prototype.getClassName=function(){return"InstancedLinesMesh"},S}(M.a)},function(Ie,y,f){f.r(y),f.d(y,"AxesViewer",function(){return C}),f.d(y,"BoneAxesViewer",function(){return c}),f.d(y,"DebugLayerTab",function(){return U}),f.d(y,"DebugLayer",function(){return l}),f.d(y,"PhysicsViewer",function(){return V}),f.d(y,"RayHelper",function(){return j}),f.d(y,"SkeletonViewer",function(){return K});var U,_=f(0),R=f(30),u=f(75),M=f(9),C=function(){function $(L,G,Q,oe,re,Y){if(G===void 0&&(G=1),Q===void 0&&(Q=2),this._scaleLinesFactor=4,this._instanced=!1,this.scene=null,this.scaleLines=1,this.scaleLines=G,!oe){var k=new R.a("",L);k.disableLighting=!0,k.emissiveColor=M.a.Red().scale(.5),oe=u.a._CreateArrow(L,k)}if(!re){var H=new R.a("",L);H.disableLighting=!0,H.emissiveColor=M.a.Green().scale(.5),re=u.a._CreateArrow(L,H)}if(!Y){var Z=new R.a("",L);Z.disableLighting=!0,Z.emissiveColor=M.a.Blue().scale(.5),Y=u.a._CreateArrow(L,Z)}this._xAxis=oe,this._xAxis.scaling.setAll(this.scaleLines*this._scaleLinesFactor),this._yAxis=re,this._yAxis.scaling.setAll(this.scaleLines*this._scaleLinesFactor),this._zAxis=Y,this._zAxis.scaling.setAll(this.scaleLines*this._scaleLinesFactor),Q!=null&&($._SetRenderingGroupId(this._xAxis,Q),$._SetRenderingGroupId(this._yAxis,Q),$._SetRenderingGroupId(this._zAxis,Q)),this.scene=L,this.update(new _.e,_.e.Right(),_.e.Up(),_.e.Forward())}return Object.defineProperty($.prototype,"xAxis",{get:function(){return this._xAxis},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"yAxis",{get:function(){return this._yAxis},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"zAxis",{get:function(){return this._zAxis},enumerable:!1,configurable:!0}),$.prototype.update=function(L,G,Q,oe){this._xAxis.position.copyFrom(L),this._xAxis.setDirection(G),this._xAxis.scaling.setAll(this.scaleLines*this._scaleLinesFactor),this._yAxis.position.copyFrom(L),this._yAxis.setDirection(Q),this._yAxis.scaling.setAll(this.scaleLines*this._scaleLinesFactor),this._zAxis.position.copyFrom(L),this._zAxis.setDirection(oe),this._zAxis.scaling.setAll(this.scaleLines*this._scaleLinesFactor)},$.prototype.createInstance=function(){var L=u.a._CreateArrowInstance(this.scene,this._xAxis),G=u.a._CreateArrowInstance(this.scene,this._yAxis),Q=u.a._CreateArrowInstance(this.scene,this._zAxis),oe=new $(this.scene,this.scaleLines,null,L,G,Q);return oe._instanced=!0,oe},$.prototype.dispose=function(){this._xAxis&&this._xAxis.dispose(!1,!this._instanced),this._yAxis&&this._yAxis.dispose(!1,!this._instanced),this._zAxis&&this._zAxis.dispose(!1,!this._instanced),this.scene=null},$._SetRenderingGroupId=function(L,G){L.getChildMeshes().forEach(function(Q){Q.renderingGroupId=G})},$}(),P=f(1),m=f(23),c=function($){function L(G,Q,oe,re){re===void 0&&(re=1);var Y=$.call(this,G,re)||this;return Y.pos=_.e.Zero(),Y.xaxis=_.e.Zero(),Y.yaxis=_.e.Zero(),Y.zaxis=_.e.Zero(),Y.mesh=oe,Y.bone=Q,Y}return Object(P.d)(L,$),L.prototype.update=function(){if(this.mesh&&this.bone){var G=this.bone;G._markAsDirtyAndCompose(),G.getAbsolutePositionToRef(this.mesh,this.pos),G.getDirectionToRef(m.a.X,this.mesh,this.xaxis),G.getDirectionToRef(m.a.Y,this.mesh,this.yaxis),G.getDirectionToRef(m.a.Z,this.mesh,this.zaxis),$.prototype.update.call(this,this.pos,this.xaxis,this.yaxis,this.zaxis)}},L.prototype.dispose=function(){this.mesh&&(this.mesh=null,this.bone=null,$.prototype.dispose.call(this))},L}(C),T=f(12),A=f(6),S=f(20),g=f(13);Object.defineProperty(S.a.prototype,"debugLayer",{get:function(){return this._debugLayer||(this._debugLayer=new l(this)),this._debugLayer},enumerable:!0,configurable:!0}),function($){$[$.Properties=0]="Properties",$[$.Debug=1]="Debug",$[$.Statistics=2]="Statistics",$[$.Tools=3]="Tools",$[$.Settings=4]="Settings"}(U||(U={}));var l=function(){function $(L){var G=this;this.BJSINSPECTOR=this._getGlobalInspector(),this._scene=L,this._scene.onDisposeObservable.add(function(){G._scene._debugLayer&&G._scene._debugLayer.hide()})}return Object.defineProperty($.prototype,"onPropertyChangedObservable",{get:function(){return this.BJSINSPECTOR&&this.BJSINSPECTOR.Inspector?this.BJSINSPECTOR.Inspector.OnPropertyChangedObservable:(this._onPropertyChangedObservable||(this._onPropertyChangedObservable=new A.c),this._onPropertyChangedObservable)},enumerable:!1,configurable:!0}),$.prototype._createInspector=function(L){if(!this.isVisible()){if(this._onPropertyChangedObservable){for(var G=0,Q=this._onPropertyChangedObservable.observers;G-1&&this._debugMeshMeshes.splice(Y,1),this._numMeshes--,this._numMeshes>0?(this._meshes[oe]=this._meshes[this._numMeshes],this._impostors[oe]=this._impostors[this._numMeshes],this._meshes[this._numMeshes]=null,this._impostors[this._numMeshes]=null):(this._meshes[0]=null,this._impostors[0]=null),G=!0;break}G&&this._numMeshes===0&&this._scene.unregisterBeforeRender(this._renderFunction)}},$.prototype._getDebugMaterial=function(L){return this._debugMaterial||(this._debugMaterial=new R.a("",L),this._debugMaterial.wireframe=!0,this._debugMaterial.emissiveColor=M.a.White(),this._debugMaterial.disableLighting=!0),this._debugMaterial},$.prototype._getDebugBoxMesh=function(L){return this._debugBoxMesh||(this._debugBoxMesh=v.a.CreateBox("physicsBodyBoxViewMesh",{size:1},L),this._debugBoxMesh.rotationQuaternion=_.b.Identity(),this._debugBoxMesh.material=this._getDebugMaterial(L),this._debugBoxMesh.setEnabled(!1)),this._debugBoxMesh.createInstance("physicsBodyBoxViewInstance")},$.prototype._getDebugSphereMesh=function(L){return this._debugSphereMesh||(this._debugSphereMesh=E.a.CreateSphere("physicsBodySphereViewMesh",{diameter:1},L),this._debugSphereMesh.rotationQuaternion=_.b.Identity(),this._debugSphereMesh.material=this._getDebugMaterial(L),this._debugSphereMesh.setEnabled(!1)),this._debugSphereMesh.createInstance("physicsBodyBoxViewInstance")},$.prototype._getDebugCylinderMesh=function(L){return this._debugCylinderMesh||(this._debugCylinderMesh=I.a.CreateCylinder("physicsBodyCylinderViewMesh",{diameterTop:1,diameterBottom:1,height:1},L),this._debugCylinderMesh.rotationQuaternion=_.b.Identity(),this._debugCylinderMesh.material=this._getDebugMaterial(L),this._debugCylinderMesh.setEnabled(!1)),this._debugCylinderMesh.createInstance("physicsBodyBoxViewInstance")},$.prototype._getDebugMeshMesh=function(L,G){var Q=new h.a(L.name,G,null,L);return Q.position=_.e.Zero(),Q.setParent(L),Q.material=this._getDebugMaterial(G),this._debugMeshMeshes.push(Q),Q},$.prototype._getDebugMesh=function(L,G){var Q=this;if(!this._utilityLayer||G&&G.parent&&G.parent.physicsImpostor)return null;var oe=null,re=this._utilityLayer.utilityLayerScene;switch(L.type){case w.a.BoxImpostor:oe=this._getDebugBoxMesh(re),L.getBoxSizeToRef(oe.scaling);break;case w.a.SphereImpostor:oe=this._getDebugSphereMesh(re);var Y=L.getRadius();oe.scaling.x=2*Y,oe.scaling.y=2*Y,oe.scaling.z=2*Y;break;case w.a.MeshImpostor:G&&(oe=this._getDebugMeshMesh(G,re));break;case w.a.NoImpostor:G&&G.getChildMeshes().filter(function(H){return H.physicsImpostor?1:0}).forEach(function(H){Q._getDebugBoxMesh(re).parent=H});break;case w.a.CylinderImpostor:oe=this._getDebugCylinderMesh(re);var k=L.object.getBoundingInfo();oe.scaling.x=k.boundingBox.maximum.x-k.boundingBox.minimum.x,oe.scaling.y=k.boundingBox.maximum.y-k.boundingBox.minimum.y,oe.scaling.z=k.boundingBox.maximum.z-k.boundingBox.minimum.z}return oe},$.prototype.dispose=function(){for(var L=this._numMeshes,G=0;G$.DISPLAY_SPHERE_AND_SPURS&&(Ge=$.DISPLAY_LINES),this.displayMode=Ge,this.update(),this._bindObs()}return $.CreateBoneWeightShader=function(L,G){var Q,oe,re,Y,k,H,Z=L.skeleton,W=(Q=L.colorBase)!==null&&Q!==void 0?Q:M.a.Black(),q=(oe=L.colorZero)!==null&&oe!==void 0?oe:M.a.Blue(),he=(re=L.colorQuarter)!==null&&re!==void 0?re:M.a.Green(),ge=(Y=L.colorHalf)!==null&&Y!==void 0?Y:M.a.Yellow(),me=(k=L.colorFull)!==null&&k!==void 0?k:M.a.Red(),_e=(H=L.targetBoneIndex)!==null&&H!==void 0?H:0;ae.a.ShadersStore["boneWeights:"+Z.name+"VertexShader"]=`precision highp float; + + attribute vec3 position; + attribute vec2 uv; + + uniform mat4 view; + uniform mat4 projection; + uniform mat4 worldViewProjection; + + #include + #if NUM_BONE_INFLUENCERS == 0 + attribute vec4 matricesIndices; + attribute vec4 matricesWeights; + #endif + + #include + + varying vec3 vColor; + + uniform vec3 colorBase; + uniform vec3 colorZero; + uniform vec3 colorQuarter; + uniform vec3 colorHalf; + uniform vec3 colorFull; + + uniform float targetBoneIndex; + + void main() { + vec3 positionUpdated = position; + + #include + #include + + vec4 worldPos = finalWorld * vec4(positionUpdated, 1.0); + + vec3 color = colorBase; + float totalWeight = 0.; + if(matricesIndices[0] == targetBoneIndex && matricesWeights[0] > 0.){ + totalWeight += matricesWeights[0]; + } + if(matricesIndices[1] == targetBoneIndex && matricesWeights[1] > 0.){ + totalWeight += matricesWeights[1]; + } + if(matricesIndices[2] == targetBoneIndex && matricesWeights[2] > 0.){ + totalWeight += matricesWeights[2]; + } + if(matricesIndices[3] == targetBoneIndex && matricesWeights[3] > 0.){ + totalWeight += matricesWeights[3]; + } + + color = mix(color, colorZero, smoothstep(0., 0.25, totalWeight)); + color = mix(color, colorQuarter, smoothstep(0.25, 0.5, totalWeight)); + color = mix(color, colorHalf, smoothstep(0.5, 0.75, totalWeight)); + color = mix(color, colorFull, smoothstep(0.75, 1.0, totalWeight)); + vColor = color; + + gl_Position = projection * view * worldPos; + }`,ae.a.ShadersStore["boneWeights:"+Z.name+"FragmentShader"]=` + precision highp float; + varying vec3 vPosition; + + varying vec3 vColor; + + void main() { + vec4 color = vec4(vColor, 1.0); + gl_FragColor = color; + } + `;var be=new te.a("boneWeight:"+Z.name,G,{vertex:"boneWeights:"+Z.name,fragment:"boneWeights:"+Z.name},{attributes:["position","normal","matricesIndices","matricesWeights"],uniforms:["world","worldView","worldViewProjection","view","projection","viewProjection","colorBase","colorZero","colorQuarter","colorHalf","colorFull","targetBoneIndex"]});return be.setColor3("colorBase",W),be.setColor3("colorZero",q),be.setColor3("colorQuarter",he),be.setColor3("colorHalf",ge),be.setColor3("colorFull",me),be.setFloat("targetBoneIndex",_e),be.getClassName=function(){return"BoneWeightShader"},be.transparencyMode=ne.a.MATERIAL_OPAQUE,be},$.CreateSkeletonMapShader=function(L,G){var Q,oe=L.skeleton,re=(Q=L.colorMap)!==null&&Q!==void 0?Q:[{color:new M.a(1,.38,.18),location:0},{color:new M.a(.59,.18,1),location:.2},{color:new M.a(.59,1,.18),location:.4},{color:new M.a(1,.87,.17),location:.6},{color:new M.a(1,.17,.42),location:.8},{color:new M.a(.17,.68,1),location:1}],Y=oe.bones.length+1,k=$._CreateBoneMapColorBuffer(Y,re,G),H=new te.a("boneWeights:"+oe.name,G,{vertexSource:`precision highp float; + + attribute vec3 position; + attribute vec2 uv; + + uniform mat4 view; + uniform mat4 projection; + uniform mat4 worldViewProjection; + uniform float colorMap[`+4*oe.bones.length+`]; + + #include + #if NUM_BONE_INFLUENCERS == 0 + attribute vec4 matricesIndices; + attribute vec4 matricesWeights; + #endif + #include + + varying vec3 vColor; + + void main() { + vec3 positionUpdated = position; + + #include + #include + + vec3 color = vec3(0.); + bool first = true; + + for (int i = 0; i < 4; i++) { + int boneIdx = int(matricesIndices[i]); + float boneWgt = matricesWeights[i]; + + vec3 c = vec3(colorMap[boneIdx * 4 + 0], colorMap[boneIdx * 4 + 1], colorMap[boneIdx * 4 + 2]); + + if (boneWgt > 0.) { + if (first) { + first = false; + color = c; + } else { + color = mix(color, c, boneWgt); + } + } + } + + vColor = color; + + vec4 worldPos = finalWorld * vec4(positionUpdated, 1.0); + + gl_Position = projection * view * worldPos; + }`,fragmentSource:` + precision highp float; + varying vec3 vColor; + + void main() { + vec4 color = vec4( vColor, 1.0 ); + gl_FragColor = color; + } + `},{attributes:["position","normal","matricesIndices","matricesWeights"],uniforms:["world","worldView","worldViewProjection","view","projection","viewProjection","colorMap"]});return H.setFloats("colorMap",k),H.getClassName=function(){return"SkeletonMapShader"},H.transparencyMode=ne.a.MATERIAL_OPAQUE,H},$._CreateBoneMapColorBuffer=function(L,G,Q){var oe=new de.a("temp",{width:L,height:1},Q,!1),re=oe.getContext(),Y=re.createLinearGradient(0,0,L,0);G.forEach(function(W){Y.addColorStop(W.location,W.color.toHexString())}),re.fillStyle=Y,re.fillRect(0,0,L,1),oe.update();for(var k=[],H=re.getImageData(0,0,L,1).data,Z=0;Z$.DISPLAY_SPHERE_AND_SPURS&&(L=$.DISPLAY_LINES),this.options.displayMode=L},enumerable:!1,configurable:!0}),$.prototype._bindObs=function(){var L=this;switch(this.displayMode){case $.DISPLAY_LINES:this._obs=this.scene.onBeforeRenderObservable.add(function(){L._displayLinesUpdate()})}},$.prototype.update=function(){switch(this.displayMode){case $.DISPLAY_LINES:this._displayLinesUpdate();break;case $.DISPLAY_SPHERES:this._buildSpheresAndSpurs(!0);break;case $.DISPLAY_SPHERE_AND_SPURS:this._buildSpheresAndSpurs(!1)}this._buildLocalAxes()},Object.defineProperty($.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(L){this.isEnabled!==L&&(this._isEnabled=L,this.debugMesh&&this.debugMesh.setEnabled(L),L&&!this._obs?this._bindObs():!L&&this._obs&&(this.scene.onBeforeRenderObservable.remove(this._obs),this._obs=null))},enumerable:!1,configurable:!0}),$.prototype._getBonePosition=function(L,G,Q,oe,re,Y){oe===void 0&&(oe=0),re===void 0&&(re=0),Y===void 0&&(Y=0);var k=_.c.Matrix[0],H=G.getParent();if(k.copyFrom(G.getLocalMatrix()),oe!==0||re!==0||Y!==0){var Z=_.c.Matrix[1];_.a.IdentityToRef(Z),Z.setTranslationFromFloats(oe,re,Y),Z.multiplyToRef(k,k)}H&&k.multiplyToRef(H.getAbsoluteTransform(),k),k.multiplyToRef(Q,k),L.x=k.m[12],L.y=k.m[13],L.z=k.m[14]},$.prototype._getLinesForBonesWithLength=function(L,G){for(var Q=L.length,oe=this.mesh._effectiveMesh.position,re=0,Y=0;Y=0;Y--){var k=L[Y],H=k.getParent();if(H&&(this._boneIndices.has(k.getIndex())||this.options.useAllBones)){var Z=this._debugLines[Q];Z||(Z=[_.e.Zero(),_.e.Zero()],this._debugLines[Q]=Z),k.getAbsolutePositionToRef(oe,Z[0]),H.getAbsolutePositionToRef(oe,Z[1]),Z[0].subtractInPlace(re),Z[1].subtractInPlace(re),Q++}}},$.prototype._revert=function(L){this.options.pauseAnimations&&(this.scene.animationsEnabled=L,this.utilityLayer.utilityLayerScene.animationsEnabled=L)},$.prototype._getAbsoluteBindPoseToRef=function(L,G){L!==null&&L._index!==-1?(this._getAbsoluteBindPoseToRef(L.getParent(),G),L.getBindPose().multiplyToRef(G,G)):G.copyFrom(_.a.Identity())},$.prototype._buildSpheresAndSpurs=function(L){var G,Q;L===void 0&&(L=!0),this._debugMesh&&(this._debugMesh.dispose(),this._debugMesh=null,this.ready=!1),this._ready=!1;var oe=(G=this.utilityLayer)===null||G===void 0?void 0:G.utilityLayerScene,re=this.skeleton.bones,Y=[],k=[],H=this.scene.animationsEnabled;try{this.options.pauseAnimations&&(this.scene.animationsEnabled=!1,oe.animationsEnabled=!1),this.options.returnToRest&&this.skeleton.returnToRest(),this.autoUpdateBonesMatrices&&this.skeleton.computeAbsoluteTransforms();for(var Z=Number.NEGATIVE_INFINITY,W=this.options.displayOptions||{},q=function(He){var Qe=re[He];if(Qe._index===-1||!he._boneIndices.has(Qe.getIndex())&&!he.options.useAllBones)return"continue";var Ge=new _.a;he._getAbsoluteBindPoseToRef(Qe,Ge);var nt=new _.e;Ge.decompose(void 0,void 0,nt),Qe.children.forEach(function(It,Pt){var Ot=new _.a;It.getBindPose().multiplyToRef(Ge,Ot);var on=new _.e;Ot.decompose(void 0,void 0,on);var Zt=_.e.Distance(nt,on);if(Zt>Z&&(Z=Zt),!L){for(var tn=on.clone().subtract(nt.clone()),De=tn.length(),Pn=tn.normalize().scale(De),nn=W.midStep||.165,xn=W.midStepFactor||.215,Ue=Pn.scale(nn),Cn=ee.a.ExtrudeShapeCustom("skeletonViewer",{shape:[new _.e(1,-1,0),new _.e(1,1,0),new _.e(-1,1,0),new _.e(-1,-1,0),new _.e(1,-1,0)],path:[_.e.Zero(),Ue,Pn],scaleFunction:function(No){switch(No){case 0:case 2:return 0;case 1:return De*xn}return 0},sideOrientation:h.a.DEFAULTSIDE,updatable:!1},oe),dr=Cn.getTotalVertices(),Xe=[],An=[],ei=0;ei9?An.push(It.getIndex(),0,0,0):An.push(Qe.getIndex(),0,0,0);Cn.position=nt.clone(),Cn.setVerticesData(pe.b.MatricesWeightsKind,Xe,!1),Cn.setVerticesData(pe.b.MatricesIndicesKind,An,!1),Cn.convertToFlatShadedMesh(),k.push(Cn)}});for(var $e=W.sphereBaseSize||.2,ct=E.a.CreateSphere("skeletonViewer",{segments:6,diameter:$e,updatable:!0},oe),st=ct.getTotalVertices(),mt=[],St=[],wt=0;wth-c)&&!(g-vv-T)&&!(l-EE-A)},M.prototype.intersectsSphere=function(C){return M.IntersectsSphere(this.minimumWorld,this.maximumWorld,C.centerWorld,C.radiusWorld)},M.prototype.intersectsMinMax=function(C,P){var m=this.minimumWorld,c=this.maximumWorld,T=m.x,A=m.y,S=m.z,g=c.x,l=c.y,h=c.z,v=C.x,E=C.y,D=C.z,w=P.x,N=P.y,I=P.z;return!(gw)&&!(lN)&&!(hI)},M.Intersects=function(C,P){return C.intersectsMinMax(P.minimumWorld,P.maximumWorld)},M.IntersectsSphere=function(C,P,m,c){var T=M.TmpVector3[0];return _.e.ClampToRef(m,C,P,T),_.e.DistanceSquared(m,T)<=c*c},M.IsCompletelyInFrustum=function(C,P){for(var m=0;m<6;++m)for(var c=P[m],T=0;T<8;++T)if(c.dotCoordinate(C[T])<0)return!1;return!0},M.IsInFrustum=function(C,P){for(var m=0;m<6;++m){for(var c=!0,T=P[m],A=0;A<8;++A)if(T.dotCoordinate(C[A])>=0){c=!1;break}if(c)return!1}return!0},M.TmpVector3=U.a.BuildArray(3,_.e.Zero),M}()},function(Ie,y,f){f.d(y,"a",function(){return _});var U=f(38),_=function(){function R(){}return R.SetImmediate=function(u){U.a.IsWindowObjectExist()&&window.setImmediate?window.setImmediate(u):setTimeout(u,1)},R}()},function(Ie,y,f){f.d(y,"a",function(){return R});var U=f(0),_=f(2),R=function(){function u(){this.previousWorldMatrices={},this.previousBones={}}return u.AddUniforms=function(M){M.push("previousWorld","previousViewProjection")},u.AddSamplers=function(M){},u.prototype.bindForSubMesh=function(M,C,P,m,c){C.prePassRenderer&&C.prePassRenderer.enabled&&C.prePassRenderer.getIndex(_.a.PREPASS_VELOCITY_TEXTURE_TYPE)!==-1&&(this.previousWorldMatrices[P.uniqueId]||(this.previousWorldMatrices[P.uniqueId]=U.a.Identity()),this.previousViewProjection||(this.previousViewProjection=C.getTransformMatrix()),M.setMatrix("previousWorld",this.previousWorldMatrices[P.uniqueId]),M.setMatrix("previousViewProjection",this.previousViewProjection),this.previousWorldMatrices[P.uniqueId]=m.clone(),this.previousViewProjection=C.getTransformMatrix().clone())},u}()},function(Ie,y,f){var U="lightFragmentDeclaration",_=`#ifdef LIGHT{X} +uniform vec4 vLightData{X}; +uniform vec4 vLightDiffuse{X}; +#ifdef SPECULARTERM +uniform vec4 vLightSpecular{X}; +#else +vec4 vLightSpecular{X}=vec4(0.); +#endif +#ifdef SHADOW{X} +#ifdef SHADOWCSM{X} +uniform mat4 lightMatrix{X}[SHADOWCSMNUM_CASCADES{X}]; +uniform float viewFrustumZ{X}[SHADOWCSMNUM_CASCADES{X}]; +uniform float frustumLengths{X}[SHADOWCSMNUM_CASCADES{X}]; +uniform float cascadeBlendFactor{X}; +varying vec4 vPositionFromLight{X}[SHADOWCSMNUM_CASCADES{X}]; +varying float vDepthMetric{X}[SHADOWCSMNUM_CASCADES{X}]; +varying vec4 vPositionFromCamera{X}; +#if defined(SHADOWPCSS{X}) +uniform highp sampler2DArrayShadow shadowSampler{X}; +uniform highp sampler2DArray depthSampler{X}; +uniform vec2 lightSizeUVCorrection{X}[SHADOWCSMNUM_CASCADES{X}]; +uniform float depthCorrection{X}[SHADOWCSMNUM_CASCADES{X}]; +uniform float penumbraDarkness{X}; +#elif defined(SHADOWPCF{X}) +uniform highp sampler2DArrayShadow shadowSampler{X}; +#else +uniform highp sampler2DArray shadowSampler{X}; +#endif +#ifdef SHADOWCSMDEBUG{X} +const vec3 vCascadeColorsMultiplier{X}[8]=vec3[8] +( +vec3 ( 1.5,0.0,0.0 ), +vec3 ( 0.0,1.5,0.0 ), +vec3 ( 0.0,0.0,5.5 ), +vec3 ( 1.5,0.0,5.5 ), +vec3 ( 1.5,1.5,0.0 ), +vec3 ( 1.0,1.0,1.0 ), +vec3 ( 0.0,1.0,5.5 ), +vec3 ( 0.5,3.5,0.75 ) +); +vec3 shadowDebug{X}; +#endif +#ifdef SHADOWCSMUSESHADOWMAXZ{X} +int index{X}=-1; +#else +int index{X}=SHADOWCSMNUM_CASCADES{X}-1; +#endif +float diff{X}=0.; +#elif defined(SHADOWCUBE{X}) +uniform samplerCube shadowSampler{X}; +#else +varying vec4 vPositionFromLight{X}; +varying float vDepthMetric{X}; +#if defined(SHADOWPCSS{X}) +uniform highp sampler2DShadow shadowSampler{X}; +uniform highp sampler2D depthSampler{X}; +#elif defined(SHADOWPCF{X}) +uniform highp sampler2DShadow shadowSampler{X}; +#else +uniform sampler2D shadowSampler{X}; +#endif +uniform mat4 lightMatrix{X}; +#endif +uniform vec4 shadowsInfo{X}; +uniform vec2 depthValues{X}; +#endif +#ifdef SPOTLIGHT{X} +uniform vec4 vLightDirection{X}; +uniform vec4 vLightFalloff{X}; +#elif defined(POINTLIGHT{X}) +uniform vec4 vLightFalloff{X}; +#elif defined(HEMILIGHT{X}) +uniform vec3 vLightGround{X}; +#endif +#ifdef PROJECTEDLIGHTTEXTURE{X} +uniform mat4 textureProjectionMatrix{X}; +uniform sampler2D projectionLightSampler{X}; +#endif +#endif`;f(5).a.IncludesShadersStore[U]=_},function(Ie,y,f){var U="lightUboDeclaration",_=`#ifdef LIGHT{X} +uniform Light{X} +{ +vec4 vLightData; +vec4 vLightDiffuse; +vec4 vLightSpecular; +#ifdef SPOTLIGHT{X} +vec4 vLightDirection; +vec4 vLightFalloff; +#elif defined(POINTLIGHT{X}) +vec4 vLightFalloff; +#elif defined(HEMILIGHT{X}) +vec3 vLightGround; +#endif +vec4 shadowsInfo; +vec2 depthValues; +} light{X}; +#ifdef PROJECTEDLIGHTTEXTURE{X} +uniform mat4 textureProjectionMatrix{X}; +uniform sampler2D projectionLightSampler{X}; +#endif +#ifdef SHADOW{X} +#ifdef SHADOWCSM{X} +uniform mat4 lightMatrix{X}[SHADOWCSMNUM_CASCADES{X}]; +uniform float viewFrustumZ{X}[SHADOWCSMNUM_CASCADES{X}]; +uniform float frustumLengths{X}[SHADOWCSMNUM_CASCADES{X}]; +uniform float cascadeBlendFactor{X}; +varying vec4 vPositionFromLight{X}[SHADOWCSMNUM_CASCADES{X}]; +varying float vDepthMetric{X}[SHADOWCSMNUM_CASCADES{X}]; +varying vec4 vPositionFromCamera{X}; +#if defined(SHADOWPCSS{X}) +uniform highp sampler2DArrayShadow shadowSampler{X}; +uniform highp sampler2DArray depthSampler{X}; +uniform vec2 lightSizeUVCorrection{X}[SHADOWCSMNUM_CASCADES{X}]; +uniform float depthCorrection{X}[SHADOWCSMNUM_CASCADES{X}]; +uniform float penumbraDarkness{X}; +#elif defined(SHADOWPCF{X}) +uniform highp sampler2DArrayShadow shadowSampler{X}; +#else +uniform highp sampler2DArray shadowSampler{X}; +#endif +#ifdef SHADOWCSMDEBUG{X} +const vec3 vCascadeColorsMultiplier{X}[8]=vec3[8] +( +vec3 ( 1.5,0.0,0.0 ), +vec3 ( 0.0,1.5,0.0 ), +vec3 ( 0.0,0.0,5.5 ), +vec3 ( 1.5,0.0,5.5 ), +vec3 ( 1.5,1.5,0.0 ), +vec3 ( 1.0,1.0,1.0 ), +vec3 ( 0.0,1.0,5.5 ), +vec3 ( 0.5,3.5,0.75 ) +); +vec3 shadowDebug{X}; +#endif +#ifdef SHADOWCSMUSESHADOWMAXZ{X} +int index{X}=-1; +#else +int index{X}=SHADOWCSMNUM_CASCADES{X}-1; +#endif +float diff{X}=0.; +#elif defined(SHADOWCUBE{X}) +uniform samplerCube shadowSampler{X}; +#else +varying vec4 vPositionFromLight{X}; +varying float vDepthMetric{X}; +#if defined(SHADOWPCSS{X}) +uniform highp sampler2DShadow shadowSampler{X}; +uniform highp sampler2D depthSampler{X}; +#elif defined(SHADOWPCF{X}) +uniform highp sampler2DShadow shadowSampler{X}; +#else +uniform sampler2D shadowSampler{X}; +#endif +uniform mat4 lightMatrix{X}; +#endif +#endif +#endif`;f(5).a.IncludesShadersStore[U]=_},function(Ie,y,f){var U="imageProcessingDeclaration",_=`#ifdef EXPOSURE +uniform float exposureLinear; +#endif +#ifdef CONTRAST +uniform float contrast; +#endif +#ifdef VIGNETTE +uniform vec2 vInverseScreenSize; +uniform vec4 vignetteSettings1; +uniform vec4 vignetteSettings2; +#endif +#ifdef COLORCURVES +uniform vec4 vCameraColorCurveNegative; +uniform vec4 vCameraColorCurveNeutral; +uniform vec4 vCameraColorCurvePositive; +#endif +#ifdef COLORGRADING +#ifdef COLORGRADING3D +uniform highp sampler3D txColorTransform; +#else +uniform sampler2D txColorTransform; +#endif +uniform vec4 colorTransformSettings; +#endif`;f(5).a.IncludesShadersStore[U]=_},function(Ie,y,f){var U="imageProcessingFunctions",_=`#if defined(COLORGRADING) && !defined(COLORGRADING3D) + +#define inline +vec3 sampleTexture3D(sampler2D colorTransform,vec3 color,vec2 sampler3dSetting) +{ +float sliceSize=2.0*sampler3dSetting.x; +#ifdef SAMPLER3DGREENDEPTH +float sliceContinuous=(color.g-sampler3dSetting.x)*sampler3dSetting.y; +#else +float sliceContinuous=(color.b-sampler3dSetting.x)*sampler3dSetting.y; +#endif +float sliceInteger=floor(sliceContinuous); + + +float sliceFraction=sliceContinuous-sliceInteger; +#ifdef SAMPLER3DGREENDEPTH +vec2 sliceUV=color.rb; +#else +vec2 sliceUV=color.rg; +#endif +sliceUV.x*=sliceSize; +sliceUV.x+=sliceInteger*sliceSize; +sliceUV=saturate(sliceUV); +vec4 slice0Color=texture2D(colorTransform,sliceUV); +sliceUV.x+=sliceSize; +sliceUV=saturate(sliceUV); +vec4 slice1Color=texture2D(colorTransform,sliceUV); +vec3 result=mix(slice0Color.rgb,slice1Color.rgb,sliceFraction); +#ifdef SAMPLER3DBGRMAP +color.rgb=result.rgb; +#else +color.rgb=result.bgr; +#endif +return color; +} +#endif +#ifdef TONEMAPPING_ACES + + + + + +const mat3 ACESInputMat=mat3( +vec3(0.59719,0.07600,0.02840), +vec3(0.35458,0.90834,0.13383), +vec3(0.04823,0.01566,0.83777) +); + +const mat3 ACESOutputMat=mat3( +vec3( 1.60475,-0.10208,-0.00327), +vec3(-0.53108,1.10813,-0.07276), +vec3(-0.07367,-0.00605,1.07602) +); +vec3 RRTAndODTFit(vec3 v) +{ +vec3 a=v*(v+0.0245786)-0.000090537; +vec3 b=v*(0.983729*v+0.4329510)+0.238081; +return a/b; +} +vec3 ACESFitted(vec3 color) +{ +color=ACESInputMat*color; + +color=RRTAndODTFit(color); +color=ACESOutputMat*color; + +color=saturate(color); +return color; +} +#endif +vec4 applyImageProcessing(vec4 result) { +#ifdef EXPOSURE +result.rgb*=exposureLinear; +#endif +#ifdef VIGNETTE + +vec2 viewportXY=gl_FragCoord.xy*vInverseScreenSize; +viewportXY=viewportXY*2.0-1.0; +vec3 vignetteXY1=vec3(viewportXY*vignetteSettings1.xy+vignetteSettings1.zw,1.0); +float vignetteTerm=dot(vignetteXY1,vignetteXY1); +float vignette=pow(vignetteTerm,vignetteSettings2.w); + +vec3 vignetteColor=vignetteSettings2.rgb; +#ifdef VIGNETTEBLENDMODEMULTIPLY +vec3 vignetteColorMultiplier=mix(vignetteColor,vec3(1,1,1),vignette); +result.rgb*=vignetteColorMultiplier; +#endif +#ifdef VIGNETTEBLENDMODEOPAQUE +result.rgb=mix(vignetteColor,result.rgb,vignette); +#endif +#endif +#ifdef TONEMAPPING +#ifdef TONEMAPPING_ACES +result.rgb=ACESFitted(result.rgb); +#else +const float tonemappingCalibration=1.590579; +result.rgb=1.0-exp2(-tonemappingCalibration*result.rgb); +#endif +#endif + +result.rgb=toGammaSpace(result.rgb); +result.rgb=saturate(result.rgb); +#ifdef CONTRAST + +vec3 resultHighContrast=result.rgb*result.rgb*(3.0-2.0*result.rgb); +if (contrast<1.0) { + +result.rgb=mix(vec3(0.5,0.5,0.5),result.rgb,contrast); +} else { + +result.rgb=mix(result.rgb,resultHighContrast,contrast-1.0); +} +#endif + +#ifdef COLORGRADING +vec3 colorTransformInput=result.rgb*colorTransformSettings.xxx+colorTransformSettings.yyy; +#ifdef COLORGRADING3D +vec3 colorTransformOutput=texture(txColorTransform,colorTransformInput).rgb; +#else +vec3 colorTransformOutput=sampleTexture3D(txColorTransform,colorTransformInput,colorTransformSettings.yz).rgb; +#endif +result.rgb=mix(result.rgb,colorTransformOutput,colorTransformSettings.www); +#endif +#ifdef COLORCURVES + +float luma=getLuminance(result.rgb); +vec2 curveMix=clamp(vec2(luma*3.0-1.5,luma*-3.0+1.5),vec2(0.0),vec2(1.0)); +vec4 colorCurve=vCameraColorCurveNeutral+curveMix.x*vCameraColorCurvePositive-curveMix.y*vCameraColorCurveNegative; +result.rgb*=colorCurve.rgb; +result.rgb=mix(vec3(luma),result.rgb,colorCurve.a); +#endif +return result; +}`;f(5).a.IncludesShadersStore[U]=_},function(Ie,y,f){var U="clipPlaneFragment",_=`#ifdef CLIPPLANE +if (fClipDistance>0.0) +{ +discard; +} +#endif +#ifdef CLIPPLANE2 +if (fClipDistance2>0.0) +{ +discard; +} +#endif +#ifdef CLIPPLANE3 +if (fClipDistance3>0.0) +{ +discard; +} +#endif +#ifdef CLIPPLANE4 +if (fClipDistance4>0.0) +{ +discard; +} +#endif +#ifdef CLIPPLANE5 +if (fClipDistance5>0.0) +{ +discard; +} +#endif +#ifdef CLIPPLANE6 +if (fClipDistance6>0.0) +{ +discard; +} +#endif`;f(5).a.IncludesShadersStore[U]=_},function(Ie,y,f){var U="clipPlaneVertex",_=`#ifdef CLIPPLANE +fClipDistance=dot(worldPos,vClipPlane); +#endif +#ifdef CLIPPLANE2 +fClipDistance2=dot(worldPos,vClipPlane2); +#endif +#ifdef CLIPPLANE3 +fClipDistance3=dot(worldPos,vClipPlane3); +#endif +#ifdef CLIPPLANE4 +fClipDistance4=dot(worldPos,vClipPlane4); +#endif +#ifdef CLIPPLANE5 +fClipDistance5=dot(worldPos,vClipPlane5); +#endif +#ifdef CLIPPLANE6 +fClipDistance6=dot(worldPos,vClipPlane6); +#endif`;f(5).a.IncludesShadersStore[U]=_},function(Ie,y,f){f.d(y,"a",function(){return U});var U=function(){function _(){this._count=0,this._data={}}return _.prototype.copyFrom=function(R){var u=this;this.clear(),R.forEach(function(M,C){return u.add(M,C)})},_.prototype.get=function(R){var u=this._data[R];if(u!==void 0)return u},_.prototype.getOrAddWithFactory=function(R,u){var M=this.get(R);return M!==void 0||(M=u(R))&&this.add(R,M),M},_.prototype.getOrAdd=function(R,u){var M=this.get(R);return M!==void 0?M:(this.add(R,u),u)},_.prototype.contains=function(R){return this._data[R]!==void 0},_.prototype.add=function(R,u){return this._data[R]===void 0&&(this._data[R]=u,++this._count,!0)},_.prototype.set=function(R,u){return this._data[R]!==void 0&&(this._data[R]=u,!0)},_.prototype.getAndRemove=function(R){var u=this.get(R);return u!==void 0?(delete this._data[R],--this._count,u):null},_.prototype.remove=function(R){return!!this.contains(R)&&(delete this._data[R],--this._count,!0)},_.prototype.clear=function(){this._data={},this._count=0},Object.defineProperty(_.prototype,"count",{get:function(){return this._count},enumerable:!1,configurable:!0}),_.prototype.forEach=function(R){for(var u in this._data)R(u,this._data[u])},_.prototype.first=function(R){for(var u in this._data){var M=R(u,this._data[u]);if(M)return M}return null},_}()},function(Ie,y,f){f.d(y,"a",function(){return R});var U=f(44),_=f(0),R=function(){function u(M,C,P){this.center=_.e.Zero(),this.centerWorld=_.e.Zero(),this.minimum=_.e.Zero(),this.maximum=_.e.Zero(),this.reConstruct(M,C,P)}return u.prototype.reConstruct=function(M,C,P){this.minimum.copyFrom(M),this.maximum.copyFrom(C);var m=_.e.Distance(M,C);C.addToRef(M,this.center).scaleInPlace(.5),this.radius=.5*m,this._update(P||_.a.IdentityReadOnly)},u.prototype.scale=function(M){var C=this.radius*M,P=u.TmpVector3,m=P[0].setAll(C),c=this.center.subtractToRef(m,P[1]),T=this.center.addToRef(m,P[2]);return this.reConstruct(c,T,this._worldMatrix),this},u.prototype.getWorldMatrix=function(){return this._worldMatrix},u.prototype._update=function(M){if(M.isIdentity())this.centerWorld.copyFrom(this.center),this.radiusWorld=this.radius;else{_.e.TransformCoordinatesToRef(this.center,M,this.centerWorld);var C=u.TmpVector3[0];_.e.TransformNormalFromFloatsToRef(1,1,1,M,C),this.radiusWorld=Math.max(Math.abs(C.x),Math.abs(C.y),Math.abs(C.z))*this.radius}},u.prototype.isInFrustum=function(M){for(var C=this.centerWorld,P=this.radiusWorld,m=0;m<6;m++)if(M[m].dotCoordinate(C)<=-P)return!1;return!0},u.prototype.isCenterInFrustum=function(M){for(var C=this.centerWorld,P=0;P<6;P++)if(M[P].dotCoordinate(C)<0)return!1;return!0},u.prototype.intersectsPoint=function(M){var C=_.e.DistanceSquared(this.centerWorld,M);return!(this.radiusWorld*this.radiusWorld=C&&u===0?R instanceof Array?this._gl.bufferSubData(this._gl.ARRAY_BUFFER,u,new Float32Array(R)):this._gl.bufferSubData(this._gl.ARRAY_BUFFER,u,R):R instanceof Array?this._gl.bufferSubData(this._gl.ARRAY_BUFFER,0,new Float32Array(R).subarray(u,u+M)):(R=R instanceof ArrayBuffer?new Uint8Array(R,u,M):new Uint8Array(R.buffer,R.byteOffset+u,M),this._gl.bufferSubData(this._gl.ARRAY_BUFFER,0,R)),this._resetVertexBufferBinding()}},function(Ie,y,f){var U="fogFragmentDeclaration",_=`#ifdef FOG +#define FOGMODE_NONE 0. +#define FOGMODE_EXP 1. +#define FOGMODE_EXP2 2. +#define FOGMODE_LINEAR 3. +#define E 2.71828 +uniform vec4 vFogInfos; +uniform vec3 vFogColor; +varying vec3 vFogDistance; +float CalcFogFactor() +{ +float fogCoeff=1.0; +float fogStart=vFogInfos.y; +float fogEnd=vFogInfos.z; +float fogDensity=vFogInfos.w; +float fogDistance=length(vFogDistance); +if (FOGMODE_LINEAR == vFogInfos.x) +{ +fogCoeff=(fogEnd-fogDistance)/(fogEnd-fogStart); +} +else if (FOGMODE_EXP == vFogInfos.x) +{ +fogCoeff=1.0/pow(E,fogDistance*fogDensity); +} +else if (FOGMODE_EXP2 == vFogInfos.x) +{ +fogCoeff=1.0/pow(E,fogDistance*fogDistance*fogDensity*fogDensity); +} +return clamp(fogCoeff,0.0,1.0); +} +#endif`;f(5).a.IncludesShadersStore[U]=_},function(Ie,y,f){var U=f(26),_=f(27);U.a.prototype.createDynamicTexture=function(R,u,M,C){var P=new _.a(this,_.b.Dynamic);return P.baseWidth=R,P.baseHeight=u,M&&(R=this.needPOTTextures?U.a.GetExponentOfTwo(R,this._caps.maxTextureSize):R,u=this.needPOTTextures?U.a.GetExponentOfTwo(u,this._caps.maxTextureSize):u),P.width=R,P.height=u,P.isReady=!1,P.generateMipMaps=M,P.samplingMode=C,this.updateTextureSamplingMode(C,P),this._internalTexturesCache.push(P),P},U.a.prototype.updateDynamicTexture=function(R,u,M,C,P,m){if(C===void 0&&(C=!1),m===void 0&&(m=!1),R){var c=this._gl,T=c.TEXTURE_2D,A=this._bindTextureDirectly(T,R,!0,m);this._unpackFlipY(M===void 0?R.invertY:M),C&&c.pixelStorei(c.UNPACK_PREMULTIPLY_ALPHA_WEBGL,1);var S=this._getWebGLTextureType(R.type),g=this._getInternalFormat(P||R.format),l=this._getRGBABufferInternalSizedFormat(R.type,g);c.texImage2D(T,0,l,g,S,u),R.generateMipMaps&&c.generateMipmap(T),A||this._bindTextureDirectly(T,null),C&&c.pixelStorei(c.UNPACK_PREMULTIPLY_ALPHA_WEBGL,0),R.isReady=!0}}},function(Ie,y,f){f.r(y),f.d(y,"AbstractScene",function(){return U.a}),f.d(y,"AbstractActionManager",function(){return _.a}),f.d(y,"Action",function(){return P}),f.d(y,"ActionEvent",function(){return m.a}),f.d(y,"ActionManager",function(){return pe}),f.d(y,"Condition",function(){return T}),f.d(y,"ValueCondition",function(){return A}),f.d(y,"PredicateCondition",function(){return S}),f.d(y,"StateCondition",function(){return g}),f.d(y,"SwitchBooleanAction",function(){return v}),f.d(y,"SetStateAction",function(){return E}),f.d(y,"SetValueAction",function(){return D}),f.d(y,"IncrementValueAction",function(){return w}),f.d(y,"PlayAnimationAction",function(){return N}),f.d(y,"StopAnimationAction",function(){return I}),f.d(y,"DoNothingAction",function(){return V}),f.d(y,"CombineAction",function(){return X}),f.d(y,"ExecuteCodeAction",function(){return j}),f.d(y,"SetParentAction",function(){return ne}),f.d(y,"PlaySoundAction",function(){return ae}),f.d(y,"StopSoundAction",function(){return ee}),f.d(y,"InterpolateValueAction",function(){return H}),f.d(y,"Animatable",function(){return ke}),f.d(y,"_IAnimationState",function(){return Y}),f.d(y,"Animation",function(){return k}),f.d(y,"TargetedAnimation",function(){return We}),f.d(y,"AnimationGroup",function(){return je}),f.d(y,"AnimationPropertiesOverride",function(){return He}),f.d(y,"EasingFunction",function(){return Ge}),f.d(y,"CircleEase",function(){return nt}),f.d(y,"BackEase",function(){return $e}),f.d(y,"BounceEase",function(){return ct}),f.d(y,"CubicEase",function(){return st}),f.d(y,"ElasticEase",function(){return mt}),f.d(y,"ExponentialEase",function(){return St}),f.d(y,"PowerEase",function(){return wt}),f.d(y,"QuadraticEase",function(){return It}),f.d(y,"QuarticEase",function(){return Pt}),f.d(y,"QuinticEase",function(){return Ot}),f.d(y,"SineEase",function(){return on}),f.d(y,"BezierCurveEase",function(){return Zt}),f.d(y,"RuntimeAnimation",function(){return me}),f.d(y,"AnimationEvent",function(){return tn}),f.d(y,"AnimationKeyInterpolation",function(){return K}),f.d(y,"AnimationRange",function(){return G}),f.d(y,"KeepAssets",function(){return Pn}),f.d(y,"InstantiatedEntries",function(){return nn}),f.d(y,"AssetContainer",function(){return xn}),f.d(y,"Analyser",function(){return Cn}),f.d(y,"AudioEngine",function(){return dr}),f.d(y,"AudioSceneComponent",function(){return ti}),f.d(y,"Sound",function(){return ei}),f.d(y,"SoundTrack",function(){return No}),f.d(y,"WeightedSound",function(){return Mf}),f.d(y,"AutoRotationBehavior",function(){return _l}),f.d(y,"BouncingBehavior",function(){return ml}),f.d(y,"FramingBehavior",function(){return gl}),f.d(y,"AttachToBoxBehavior",function(){return If}),f.d(y,"FadeInOutBehavior",function(){return Df}),f.d(y,"MultiPointerScaleBehavior",function(){return Lf}),f.d(y,"PointerDragBehavior",function(){return vi.a}),f.d(y,"SixDofDragBehavior",function(){return vl}),f.d(y,"Bone",function(){return Be}),f.d(y,"BoneIKController",function(){return Nf}),f.d(y,"BoneLookController",function(){return wf}),f.d(y,"Skeleton",function(){return wo}),f.d(y,"ArcRotateCameraGamepadInput",function(){return ja}),f.d(y,"ArcRotateCameraKeyboardMoveInput",function(){return Ha}),f.d(y,"ArcRotateCameraMouseWheelInput",function(){return Wa}),f.d(y,"ArcRotateCameraPointersInput",function(){return Xa}),f.d(y,"ArcRotateCameraVRDeviceOrientationInput",function(){return Ya}),f.d(y,"FlyCameraKeyboardInput",function(){return Ka}),f.d(y,"FlyCameraMouseInput",function(){return Qa}),f.d(y,"FollowCameraKeyboardMoveInput",function(){return qa}),f.d(y,"FollowCameraMouseWheelInput",function(){return Za}),f.d(y,"FollowCameraPointersInput",function(){return Ja}),f.d(y,"FreeCameraDeviceOrientationInput",function(){return is}),f.d(y,"FreeCameraGamepadInput",function(){return rs}),f.d(y,"FreeCameraKeyboardMoveInput",function(){return $a}),f.d(y,"FreeCameraMouseInput",function(){return es}),f.d(y,"FreeCameraMouseWheelInput",function(){return ts}),f.d(y,"FreeCameraTouchInput",function(){return ns}),f.d(y,"FreeCameraVirtualJoystickInput",function(){return as}),f.d(y,"CameraInputTypes",function(){return un}),f.d(y,"CameraInputsManager",function(){return Zr}),f.d(y,"Camera",function(){return gt.a}),f.d(y,"TargetCamera",function(){return Li}),f.d(y,"FreeCamera",function(){return Yn}),f.d(y,"FreeCameraInputsManager",function(){return Jr}),f.d(y,"TouchCamera",function(){return ss}),f.d(y,"ArcRotateCamera",function(){return Zi}),f.d(y,"ArcRotateCameraInputsManager",function(){return Fo}),f.d(y,"DeviceOrientationCamera",function(){return Bo}),f.d(y,"FlyCamera",function(){return Uf}),f.d(y,"FlyCameraInputsManager",function(){return Pl}),f.d(y,"FollowCamera",function(){return Cl}),f.d(y,"ArcFollowCamera",function(){return Rl}),f.d(y,"FollowCameraInputsManager",function(){return xl}),f.d(y,"GamepadCamera",function(){return Uo}),f.d(y,"AnaglyphArcRotateCamera",function(){return Nl}),f.d(y,"AnaglyphFreeCamera",function(){return wl}),f.d(y,"AnaglyphGamepadCamera",function(){return Fl}),f.d(y,"AnaglyphUniversalCamera",function(){return Bl}),f.d(y,"StereoscopicArcRotateCamera",function(){return Ul}),f.d(y,"StereoscopicFreeCamera",function(){return Vl}),f.d(y,"StereoscopicGamepadCamera",function(){return kl}),f.d(y,"StereoscopicUniversalCamera",function(){return Gl}),f.d(y,"UniversalCamera",function(){return _r}),f.d(y,"VirtualJoysticksCamera",function(){return zl}),f.d(y,"VRCameraMetrics",function(){return mr}),f.d(y,"VRDeviceOrientationArcRotateCamera",function(){return Xl}),f.d(y,"VRDeviceOrientationFreeCamera",function(){return Vo}),f.d(y,"VRDeviceOrientationGamepadCamera",function(){return Yl}),f.d(y,"OnAfterEnteringVRObservableEvent",function(){return Kf}),f.d(y,"VRExperienceHelper",function(){return Zl}),f.d(y,"WebVRFreeCamera",function(){return Go}),f.d(y,"Collider",function(){return Jl}),f.d(y,"DefaultCollisionCoordinator",function(){return $l}),f.d(y,"PickingInfo",function(){return tr.a}),f.d(y,"IntersectionInfo",function(){return Qf.a}),f.d(y,"_MeshCollisionData",function(){return qf.a}),f.d(y,"BoundingBox",function(){return ms.a}),f.d(y,"BoundingInfo",function(){return Ui.a}),f.d(y,"BoundingSphere",function(){return eu.a}),f.d(y,"Octree",function(){return eo}),f.d(y,"OctreeBlock",function(){return tu}),f.d(y,"OctreeSceneComponent",function(){return Ts}),f.d(y,"Ray",function(){return dn.a}),f.d(y,"AxesViewer",function(){return nr.AxesViewer}),f.d(y,"BoneAxesViewer",function(){return nr.BoneAxesViewer}),f.d(y,"DebugLayerTab",function(){return nr.DebugLayerTab}),f.d(y,"DebugLayer",function(){return nr.DebugLayer}),f.d(y,"PhysicsViewer",function(){return nr.PhysicsViewer}),f.d(y,"RayHelper",function(){return nr.RayHelper}),f.d(y,"SkeletonViewer",function(){return nr.SkeletonViewer}),f.d(y,"DeviceInputSystem",function(){return nu}),f.d(y,"DeviceType",function(){return Kt}),f.d(y,"PointerInput",function(){return gs}),f.d(y,"DualShockInput",function(){return vs}),f.d(y,"XboxInput",function(){return bs}),f.d(y,"SwitchInput",function(){return ys}),f.d(y,"DeviceSource",function(){return iu}),f.d(y,"DeviceSourceManager",function(){return Zf}),f.d(y,"Constants",function(){return h.a}),f.d(y,"ThinEngine",function(){return Bt.a}),f.d(y,"Engine",function(){return Ue.a}),f.d(y,"EngineStore",function(){return te.a}),f.d(y,"NullEngineOptions",function(){return ru.b}),f.d(y,"NullEngine",function(){return ru.a}),f.d(y,"_OcclusionDataStorage",function(){return au}),f.d(y,"_forceTransformFeedbackToBundle",function(){return Jf}),f.d(y,"EngineView",function(){return $f}),f.d(y,"WebGLPipelineContext",function(){return tp.a}),f.d(y,"WebGL2ShaderProcessor",function(){return su.a}),f.d(y,"NativeEngine",function(){return ap}),f.d(y,"ShaderCodeInliner",function(){return Ss}),f.d(y,"PerformanceConfigurator",function(){return sp.a}),f.d(y,"KeyboardEventTypes",function(){return qi.a}),f.d(y,"KeyboardInfo",function(){return qi.b}),f.d(y,"KeyboardInfoPre",function(){return qi.c}),f.d(y,"PointerEventTypes",function(){return Tt.a}),f.d(y,"PointerInfoBase",function(){return Tt.c}),f.d(y,"PointerInfoPre",function(){return Tt.d}),f.d(y,"PointerInfo",function(){return Tt.b}),f.d(y,"ClipboardEventTypes",function(){return Wo}),f.d(y,"ClipboardInfo",function(){return cp}),f.d(y,"DaydreamController",function(){return Ps}),f.d(y,"GearVRController",function(){return xs}),f.d(y,"GenericController",function(){return Xo}),f.d(y,"OculusTouchController",function(){return Cs}),f.d(y,"PoseEnabledControllerType",function(){return ii}),f.d(y,"PoseEnabledControllerHelper",function(){return Ni}),f.d(y,"PoseEnabledController",function(){return pr}),f.d(y,"ViveController",function(){return hu}),f.d(y,"WebVRController",function(){return Fi}),f.d(y,"WindowsMotionController",function(){return Yo}),f.d(y,"XRWindowsMotionController",function(){return up}),f.d(y,"StickValues",function(){return Ff}),f.d(y,"Gamepad",function(){return hn}),f.d(y,"GenericPad",function(){return El}),f.d(y,"GamepadManager",function(){return Il}),f.d(y,"GamepadSystemSceneComponent",function(){return Dl}),f.d(y,"Xbox360Button",function(){return Rn}),f.d(y,"Xbox360Dpad",function(){return Ji}),f.d(y,"Xbox360Pad",function(){return Ol}),f.d(y,"DualShockButton",function(){return Hn}),f.d(y,"DualShockDpad",function(){return $i}),f.d(y,"DualShockPad",function(){return Ml}),f.d(y,"AxisDragGizmo",function(){return Ko.a}),f.d(y,"AxisScaleGizmo",function(){return io}),f.d(y,"BoundingBoxGizmo",function(){return du}),f.d(y,"Gizmo",function(){return Bn.a}),f.d(y,"GizmoManager",function(){return hp}),f.d(y,"PlaneRotationGizmo",function(){return Qo}),f.d(y,"PositionGizmo",function(){return pu}),f.d(y,"RotationGizmo",function(){return fu}),f.d(y,"ScaleGizmo",function(){return _u}),f.d(y,"LightGizmo",function(){return dp}),f.d(y,"CameraGizmo",function(){return pp}),f.d(y,"PlaneDragGizmo",function(){return qo}),f.d(y,"EnvironmentHelper",function(){return Ls}),f.d(y,"PhotoDome",function(){return xp}),f.d(y,"_forceSceneHelpersToBundle",function(){return g_}),f.d(y,"VideoDome",function(){return v_}),f.d(y,"EngineInstrumentation",function(){return b_}),f.d(y,"SceneInstrumentation",function(){return y_}),f.d(y,"_TimeToken",function(){return ou}),f.d(y,"EffectLayer",function(){return ho}),f.d(y,"EffectLayerSceneComponent",function(){return Du}),f.d(y,"GlowLayer",function(){return oa}),f.d(y,"HighlightLayer",function(){return Gs}),f.d(y,"Layer",function(){return R_}),f.d(y,"LayerSceneComponent",function(){return Nu}),f.d(y,"LensFlare",function(){return wu}),f.d(y,"LensFlareSystem",function(){return zs}),f.d(y,"LensFlareSystemSceneComponent",function(){return Fu}),f.d(y,"Light",function(){return Pi.a}),f.d(y,"ShadowLight",function(){return Zo}),f.d(y,"ShadowGenerator",function(){return kn}),f.d(y,"CascadedShadowGenerator",function(){return js}),f.d(y,"ShadowGeneratorSceneComponent",function(){return ju}),f.d(y,"DirectionalLight",function(){return Os}),f.d(y,"HemisphericLight",function(){return ko.a}),f.d(y,"PointLight",function(){return Hs}),f.d(y,"SpotLight",function(){return Ms}),f.d(y,"DefaultLoadingScreen",function(){return Hu}),f.d(y,"_BabylonLoaderRegistered",function(){return Y_}),f.d(y,"BabylonFileLoaderConfiguration",function(){return ua}),f.d(y,"SceneLoaderAnimationGroupLoadingMode",function(){return Si}),f.d(y,"SceneLoader",function(){return Ut}),f.d(y,"SceneLoaderFlags",function(){return Ai.a}),f.d(y,"BackgroundMaterial",function(){return oo}),f.d(y,"ColorCurves",function(){return Q_.a}),f.d(y,"EffectFallbacks",function(){return Sr.a}),f.d(y,"Effect",function(){return ze.a}),f.d(y,"FresnelParameters",function(){return nh}),f.d(y,"ImageProcessingConfigurationDefines",function(){return vn.b}),f.d(y,"ImageProcessingConfiguration",function(){return vn.a}),f.d(y,"Material",function(){return Ht.a}),f.d(y,"MaterialDefines",function(){return $o.a}),f.d(y,"ThinMaterialHelper",function(){return ih.a}),f.d(y,"MaterialHelper",function(){return et.a}),f.d(y,"MultiMaterial",function(){return ir.a}),f.d(y,"PBRMaterialDefines",function(){return ws}),f.d(y,"PBRBaseMaterial",function(){return pn}),f.d(y,"PBRBaseSimpleMaterial",function(){return Qs}),f.d(y,"PBRMaterial",function(){return co}),f.d(y,"PBRMetallicRoughnessMaterial",function(){return rh}),f.d(y,"PBRSpecularGlossinessMaterial",function(){return oh}),f.d(y,"PushMaterial",function(){return ea.a}),f.d(y,"ShaderMaterial",function(){return ha.a}),f.d(y,"StandardMaterialDefines",function(){return Ft.b}),f.d(y,"StandardMaterial",function(){return Ft.a}),f.d(y,"BaseTexture",function(){return Wn.a}),f.d(y,"ColorGradingTexture",function(){return ah}),f.d(y,"CubeTexture",function(){return oi}),f.d(y,"DynamicTexture",function(){return bi.a}),f.d(y,"EquiRectangularCubeTexture",function(){return sh}),f.d(y,"HDRFiltering",function(){return Ku}),f.d(y,"HDRCubeTexture",function(){return sa}),f.d(y,"HtmlElementTexture",function(){return q_}),f.d(y,"InternalTextureSource",function(){return Ct.b}),f.d(y,"InternalTexture",function(){return Ct.a}),f.d(y,"_DDSTextureLoader",function(){return yu}),f.d(y,"_ENVTextureLoader",function(){return Tu}),f.d(y,"_KTXTextureLoader",function(){return Eu}),f.d(y,"_TGATextureLoader",function(){return ch}),f.d(y,"_BasisTextureLoader",function(){return lh}),f.d(y,"MirrorTexture",function(){return Ds}),f.d(y,"MultiRenderTarget",function(){return qs}),f.d(y,"TexturePacker",function(){return $_}),f.d(y,"TexturePackerFrame",function(){return Zs}),f.d(y,"CustomProceduralTexture",function(){return tm}),f.d(y,"NoiseProceduralTexture",function(){return hh}),f.d(y,"ProceduralTexture",function(){return _o}),f.d(y,"ProceduralTextureSceneComponent",function(){return uh}),f.d(y,"RawCubeTexture",function(){return im}),f.d(y,"RawTexture",function(){return ni}),f.d(y,"RawTexture2DArray",function(){return rm}),f.d(y,"RawTexture3D",function(){return om}),f.d(y,"RefractionTexture",function(){return am}),f.d(y,"RenderTargetTexture",function(){return sn}),f.d(y,"Texture",function(){return we.a}),f.d(y,"VideoTexture",function(){return Iu}),f.d(y,"UniformBuffer",function(){return jl.a}),f.d(y,"MaterialFlags",function(){return ut.a}),f.d(y,"NodeMaterialBlockTargets",function(){return Ce}),f.d(y,"NodeMaterialBlockConnectionPointTypes",function(){return le}),f.d(y,"NodeMaterialBlockConnectionPointMode",function(){return gn}),f.d(y,"NodeMaterialSystemValues",function(){return bt}),f.d(y,"NodeMaterialModes",function(){return Mn}),f.d(y,"NodeMaterialConnectionPointCompatibilityStates",function(){return ci}),f.d(y,"NodeMaterialConnectionPointDirection",function(){return Tn}),f.d(y,"NodeMaterialConnectionPoint",function(){return fa}),f.d(y,"NodeMaterialBlock",function(){return pt}),f.d(y,"NodeMaterialDefines",function(){return bo}),f.d(y,"NodeMaterial",function(){return va}),f.d(y,"VertexOutputBlock",function(){return mo}),f.d(y,"BonesBlock",function(){return mh}),f.d(y,"InstancesBlock",function(){return gh}),f.d(y,"MorphTargetsBlock",function(){return vh}),f.d(y,"LightInformationBlock",function(){return bh}),f.d(y,"FragmentOutputBlock",function(){return Lr}),f.d(y,"ImageProcessingBlock",function(){return yh}),f.d(y,"PerturbNormalBlock",function(){return Th}),f.d(y,"DiscardBlock",function(){return Eh}),f.d(y,"FrontFacingBlock",function(){return Sh}),f.d(y,"DerivativeBlock",function(){return Ah}),f.d(y,"FragCoordBlock",function(){return Ph}),f.d(y,"ScreenSizeBlock",function(){return xh}),f.d(y,"FogBlock",function(){return Ch}),f.d(y,"LightBlock",function(){return Rh}),f.d(y,"TextureBlock",function(){return Oh}),f.d(y,"ReflectionTextureBlock",function(){return Mh}),f.d(y,"CurrentScreenBlock",function(){return $s}),f.d(y,"InputBlock",function(){return At}),f.d(y,"AnimatedInputBlockTypes",function(){return zi}),f.d(y,"MultiplyBlock",function(){return _a}),f.d(y,"AddBlock",function(){return Ih}),f.d(y,"ScaleBlock",function(){return Dh}),f.d(y,"ClampBlock",function(){return Lh}),f.d(y,"CrossBlock",function(){return Nh}),f.d(y,"DotBlock",function(){return wh}),f.d(y,"TransformBlock",function(){return pa}),f.d(y,"RemapBlock",function(){return ic}),f.d(y,"NormalizeBlock",function(){return Fh}),f.d(y,"TrigonometryBlockOperations",function(){return rn}),f.d(y,"TrigonometryBlock",function(){return uc}),f.d(y,"ColorMergerBlock",function(){return Bh}),f.d(y,"VectorMergerBlock",function(){return go}),f.d(y,"ColorSplitterBlock",function(){return lc}),f.d(y,"VectorSplitterBlock",function(){return Uh}),f.d(y,"LerpBlock",function(){return Vh}),f.d(y,"DivideBlock",function(){return kh}),f.d(y,"SubtractBlock",function(){return Gh}),f.d(y,"StepBlock",function(){return zh}),f.d(y,"OneMinusBlock",function(){return fc}),f.d(y,"ViewDirectionBlock",function(){return pc}),f.d(y,"FresnelBlock",function(){return jh}),f.d(y,"MaxBlock",function(){return Hh}),f.d(y,"MinBlock",function(){return Wh}),f.d(y,"DistanceBlock",function(){return Xh}),f.d(y,"LengthBlock",function(){return Yh}),f.d(y,"NegateBlock",function(){return Kh}),f.d(y,"PowBlock",function(){return Qh}),f.d(y,"RandomNumberBlock",function(){return qh}),f.d(y,"ArcTan2Block",function(){return Zh}),f.d(y,"SmoothStepBlock",function(){return Jh}),f.d(y,"ReciprocalBlock",function(){return $h}),f.d(y,"ReplaceColorBlock",function(){return ed}),f.d(y,"PosterizeBlock",function(){return td}),f.d(y,"WaveBlockKind",function(){return rr}),f.d(y,"WaveBlock",function(){return nd}),f.d(y,"GradientBlockColorStep",function(){return ba}),f.d(y,"GradientBlock",function(){return id}),f.d(y,"NLerpBlock",function(){return rd}),f.d(y,"WorleyNoise3DBlock",function(){return od}),f.d(y,"SimplexPerlin3DBlock",function(){return ad}),f.d(y,"NormalBlendBlock",function(){return sd}),f.d(y,"Rotate2dBlock",function(){return cd}),f.d(y,"ReflectBlock",function(){return ld}),f.d(y,"RefractBlock",function(){return ud}),f.d(y,"DesaturateBlock",function(){return hd}),f.d(y,"PBRMetallicRoughnessBlock",function(){return dd}),f.d(y,"SheenBlock",function(){return _c}),f.d(y,"AnisotropyBlock",function(){return mc}),f.d(y,"ReflectionBlock",function(){return gc}),f.d(y,"ClearCoatBlock",function(){return ya}),f.d(y,"RefractionBlock",function(){return vc}),f.d(y,"SubSurfaceBlock",function(){return Ta}),f.d(y,"ParticleTextureBlock",function(){return ec}),f.d(y,"ParticleRampGradientBlock",function(){return tc}),f.d(y,"ParticleBlendMultiplyBlock",function(){return nc}),f.d(y,"ModBlock",function(){return fd}),f.d(y,"NodeMaterialOptimizer",function(){return hm}),f.d(y,"PropertyTypeForEdition",function(){return Lt}),f.d(y,"editableInPropertyPage",function(){return Vt}),f.d(y,"EffectRenderer",function(){return Xu}),f.d(y,"EffectWrapper",function(){return Yu}),f.d(y,"ShadowDepthWrapper",function(){return pm}),f.d(y,"Scalar",function(){return $.a}),f.d(y,"extractMinAndMaxIndexed",function(){return pd.b}),f.d(y,"extractMinAndMax",function(){return pd.a}),f.d(y,"Space",function(){return ye.c}),f.d(y,"Axis",function(){return ye.a}),f.d(y,"Coordinate",function(){return ye.b}),f.d(y,"Color3",function(){return M.a}),f.d(y,"Color4",function(){return M.b}),f.d(y,"TmpColors",function(){return M.c}),f.d(y,"ToGammaSpace",function(){return Gt.b}),f.d(y,"ToLinearSpace",function(){return Gt.c}),f.d(y,"Epsilon",function(){return Gt.a}),f.d(y,"Frustum",function(){return Wl.a}),f.d(y,"Orientation",function(){return Qe.e}),f.d(y,"BezierCurve",function(){return Qe.c}),f.d(y,"Angle",function(){return Qe.a}),f.d(y,"Arc2",function(){return Qe.b}),f.d(y,"Path2",function(){return Qe.f}),f.d(y,"Path3D",function(){return Qe.g}),f.d(y,"Curve3",function(){return Qe.d}),f.d(y,"Plane",function(){return vr.a}),f.d(y,"Size",function(){return oe.a}),f.d(y,"Vector2",function(){return u.d}),f.d(y,"Vector3",function(){return u.e}),f.d(y,"Vector4",function(){return u.f}),f.d(y,"Quaternion",function(){return u.b}),f.d(y,"Matrix",function(){return u.a}),f.d(y,"TmpVectors",function(){return u.c}),f.d(y,"PositionNormalVertex",function(){return Is}),f.d(y,"PositionNormalTextureVertex",function(){return fp}),f.d(y,"Viewport",function(){return Kn.a}),f.d(y,"SphericalHarmonics",function(){return Es}),f.d(y,"SphericalPolynomial",function(){return no}),f.d(y,"AbstractMesh",function(){return Dt.a}),f.d(y,"Buffer",function(){return Oe.a}),f.d(y,"VertexBuffer",function(){return Oe.b}),f.d(y,"DracoCompression",function(){return mm}),f.d(y,"CSG",function(){return bm}),f.d(y,"Geometry",function(){return Ws.a}),f.d(y,"GroundMesh",function(){return jo}),f.d(y,"TrailMesh",function(){return ym}),f.d(y,"InstancedMesh",function(){return Tm.a}),f.d(y,"LinesMesh",function(){return To.b}),f.d(y,"InstancedLinesMesh",function(){return To.a}),f.d(y,"_CreationDataStorage",function(){return De.b}),f.d(y,"_InstancesBatch",function(){return De.c}),f.d(y,"Mesh",function(){return De.a}),f.d(y,"VertexData",function(){return dt.a}),f.d(y,"MeshBuilder",function(){return Am}),f.d(y,"SimplificationSettings",function(){return Pm}),f.d(y,"SimplificationQueue",function(){return yd}),f.d(y,"SimplificationType",function(){return Ao}),f.d(y,"QuadraticErrorSimplification",function(){return Ed}),f.d(y,"SimplicationQueueSceneComponent",function(){return Sd}),f.d(y,"Polygon",function(){return Sm}),f.d(y,"PolygonMeshBuilder",function(){return vd}),f.d(y,"SubMesh",function(){return yo.a}),f.d(y,"MeshLODLevel",function(){return Om.a}),f.d(y,"TransformNode",function(){return Er.a}),f.d(y,"BoxBuilder",function(){return Tr.a}),f.d(y,"TiledBoxBuilder",function(){return gd}),f.d(y,"DiscBuilder",function(){return Ea}),f.d(y,"RibbonBuilder",function(){return Eo.a}),f.d(y,"SphereBuilder",function(){return Un.a}),f.d(y,"HemisphereBuilder",function(){return Jo}),f.d(y,"CylinderBuilder",function(){return fi.a}),f.d(y,"TorusBuilder",function(){return gr}),f.d(y,"TorusKnotBuilder",function(){return Tc}),f.d(y,"LinesBuilder",function(){return cn.a}),f.d(y,"PolygonBuilder",function(){return So}),f.d(y,"ShapeBuilder",function(){return la.a}),f.d(y,"LatheBuilder",function(){return Sc}),f.d(y,"PlaneBuilder",function(){return Rs.a}),f.d(y,"TiledPlaneBuilder",function(){return bd}),f.d(y,"GroundBuilder",function(){return Bi}),f.d(y,"TubeBuilder",function(){return Ac}),f.d(y,"PolyhedronBuilder",function(){return ro}),f.d(y,"IcoSphereBuilder",function(){return Pc}),f.d(y,"DecalBuilder",function(){return xc}),f.d(y,"CapsuleBuilder",function(){return Cc}),f.d(y,"DataBuffer",function(){return cu.a}),f.d(y,"WebGLDataBuffer",function(){return Mm.a}),f.d(y,"MorphTarget",function(){return Qu}),f.d(y,"MorphTargetManager",function(){return ca}),f.d(y,"RecastJSPlugin",function(){return Im}),f.d(y,"RecastJSCrowd",function(){return Ad}),f.d(y,"Node",function(){return Q.a}),f.d(y,"Database",function(){return Pd}),f.d(y,"BaseParticleSystem",function(){return vo}),f.d(y,"BoxParticleEmitter",function(){return Nr}),f.d(y,"ConeParticleEmitter",function(){return rc}),f.d(y,"CylinderParticleEmitter",function(){return ma}),f.d(y,"CylinderDirectedParticleEmitter",function(){return oc}),f.d(y,"HemisphericParticleEmitter",function(){return ac}),f.d(y,"PointParticleEmitter",function(){return sc}),f.d(y,"SphereParticleEmitter",function(){return ga}),f.d(y,"SphereDirectedParticleEmitter",function(){return cc}),f.d(y,"CustomParticleEmitter",function(){return wr}),f.d(y,"MeshParticleEmitter",function(){return ph}),f.d(y,"GPUParticleSystem",function(){return or}),f.d(y,"Particle",function(){return Cd}),f.d(y,"ParticleHelper",function(){return Vm}),f.d(y,"ParticleSystem",function(){return ln}),f.d(y,"ParticleSystemSet",function(){return Sa}),f.d(y,"SolidParticle",function(){return Mc}),f.d(y,"ModelShape",function(){return Ic}),f.d(y,"DepthSortedParticle",function(){return Rd}),f.d(y,"SolidParticleVertex",function(){return Od}),f.d(y,"SolidParticleSystem",function(){return km}),f.d(y,"CloudPoint",function(){return Md}),f.d(y,"PointsGroup",function(){return Aa}),f.d(y,"PointColor",function(){return En}),f.d(y,"PointsCloudSystem",function(){return Gm}),f.d(y,"SubEmitterType",function(){return Fr}),f.d(y,"SubEmitter",function(){return Po}),f.d(y,"PhysicsEngine",function(){return Ir}),f.d(y,"PhysicsEngineSceneComponent",function(){return Id}),f.d(y,"PhysicsHelper",function(){return zm}),f.d(y,"PhysicsRadialExplosionEventOptions",function(){return Ur}),f.d(y,"PhysicsUpdraftEventOptions",function(){return Dc}),f.d(y,"PhysicsVortexEventOptions",function(){return Lc}),f.d(y,"PhysicsRadialImpulseFalloff",function(){return xo}),f.d(y,"PhysicsUpdraftMode",function(){return Br}),f.d(y,"PhysicsImpostor",function(){return xt.a}),f.d(y,"PhysicsJoint",function(){return en.e}),f.d(y,"DistanceJoint",function(){return en.a}),f.d(y,"MotorEnabledJoint",function(){return en.d}),f.d(y,"HingeJoint",function(){return en.c}),f.d(y,"Hinge2Joint",function(){return en.b}),f.d(y,"CannonJSPlugin",function(){return Ks}),f.d(y,"AmmoJSPlugin",function(){return Zu}),f.d(y,"OimoJSPlugin",function(){return qu}),f.d(y,"AnaglyphPostProcess",function(){return ls}),f.d(y,"BlackAndWhitePostProcess",function(){return Ld}),f.d(y,"BloomEffect",function(){return Fc}),f.d(y,"BloomMergePostProcess",function(){return wc}),f.d(y,"BlurPostProcess",function(){return _n}),f.d(y,"ChromaticAberrationPostProcess",function(){return Bc}),f.d(y,"CircleOfConfusionPostProcess",function(){return Uc}),f.d(y,"ColorCorrectionPostProcess",function(){return Nd}),f.d(y,"ConvolutionPostProcess",function(){return wd}),f.d(y,"DepthOfFieldBlurPostProcess",function(){return Pa}),f.d(y,"DepthOfFieldEffectBlurLevel",function(){return ar}),f.d(y,"DepthOfFieldEffect",function(){return Vc}),f.d(y,"DepthOfFieldMergePostProcessOptions",function(){return eg}),f.d(y,"DepthOfFieldMergePostProcess",function(){return Fd}),f.d(y,"DisplayPassPostProcess",function(){return Bd}),f.d(y,"ExtractHighlightsPostProcess",function(){return Nc}),f.d(y,"FilterPostProcess",function(){return Ud}),f.d(y,"FxaaPostProcess",function(){return Co}),f.d(y,"GrainPostProcess",function(){return kc}),f.d(y,"HighlightsPostProcess",function(){return sg}),f.d(y,"ImageProcessingPostProcess",function(){return zo}),f.d(y,"MotionBlurPostProcess",function(){return Gc}),f.d(y,"PassPostProcess",function(){return wi}),f.d(y,"PassCubePostProcess",function(){return zf}),f.d(y,"PostProcess",function(){return _t}),f.d(y,"PostProcessManager",function(){return hs.a}),f.d(y,"RefractionPostProcess",function(){return kd}),f.d(y,"DefaultRenderingPipeline",function(){return jd}),f.d(y,"LensRenderingPipeline",function(){return mg}),f.d(y,"SSAO2RenderingPipeline",function(){return Hd}),f.d(y,"SSAORenderingPipeline",function(){return Tg}),f.d(y,"StandardRenderingPipeline",function(){return Wd}),f.d(y,"PostProcessRenderEffect",function(){return Rt}),f.d(y,"PostProcessRenderPipeline",function(){return Vr}),f.d(y,"PostProcessRenderPipelineManager",function(){return Gd}),f.d(y,"PostProcessRenderPipelineManagerSceneComponent",function(){return zd}),f.d(y,"SharpenPostProcess",function(){return zc}),f.d(y,"StereoscopicInterlacePostProcessI",function(){return xg}),f.d(y,"StereoscopicInterlacePostProcess",function(){return Cg}),f.d(y,"TonemappingOperator",function(){return sr}),f.d(y,"TonemapPostProcess",function(){return Og}),f.d(y,"VolumetricLightScatteringPostProcess",function(){return Xd}),f.d(y,"VRDistortionCorrectionPostProcess",function(){return us}),f.d(y,"VRMultiviewToSingleviewPostProcess",function(){return ds}),f.d(y,"ScreenSpaceReflectionPostProcess",function(){return jc}),f.d(y,"ScreenSpaceCurvaturePostProcess",function(){return Yd}),f.d(y,"ReflectionProbe",function(){return Ju}),f.d(y,"BoundingBoxRenderer",function(){return Kd}),f.d(y,"DepthRenderer",function(){return aa}),f.d(y,"DepthRendererSceneComponent",function(){return Qd}),f.d(y,"EdgesRenderer",function(){return Hc}),f.d(y,"LineEdgesRenderer",function(){return qd}),f.d(y,"GeometryBufferRenderer",function(){return li}),f.d(y,"GeometryBufferRendererSceneComponent",function(){return Vd}),f.d(y,"PrePassRenderer",function(){return Wc}),f.d(y,"PrePassRendererSceneComponent",function(){return Zd}),f.d(y,"SubSurfaceSceneComponent",function(){return $d}),f.d(y,"OutlineRenderer",function(){return ef}),f.d(y,"RenderingGroup",function(){return zg.a}),f.d(y,"RenderingGroupInfo",function(){return $r.a}),f.d(y,"RenderingManager",function(){return $r.b}),f.d(y,"UtilityLayerRenderer",function(){return On.a}),f.d(y,"Scene",function(){return _e.a}),f.d(y,"SceneComponentConstants",function(){return at.a}),f.d(y,"Stage",function(){return at.b}),f.d(y,"Sprite",function(){return tf}),f.d(y,"SpriteManager",function(){return rf}),f.d(y,"SpriteMap",function(){return Kg}),f.d(y,"SpritePackedManager",function(){return Qg}),f.d(y,"SpriteSceneComponent",function(){return nf}),f.d(y,"AlphaState",function(){return qg.a}),f.d(y,"DepthCullingState",function(){return Zg.a}),f.d(y,"StencilState",function(){return Jg.a}),f.d(y,"AndOrNotEvaluator",function(){return $g.a}),f.d(y,"AssetTaskState",function(){return _i}),f.d(y,"AbstractAssetTask",function(){return mi}),f.d(y,"AssetsProgressEvent",function(){return of}),f.d(y,"ContainerAssetTask",function(){return af}),f.d(y,"MeshAssetTask",function(){return sf}),f.d(y,"TextFileAssetTask",function(){return cf}),f.d(y,"BinaryFileAssetTask",function(){return lf}),f.d(y,"ImageAssetTask",function(){return uf}),f.d(y,"TextureAssetTask",function(){return hf}),f.d(y,"CubeTextureAssetTask",function(){return df}),f.d(y,"HDRCubeTextureAssetTask",function(){return ff}),f.d(y,"EquiRectangularCubeTextureAssetTask",function(){return pf}),f.d(y,"AssetsManager",function(){return ev}),f.d(y,"BasisTranscodeConfiguration",function(){return Z_}),f.d(y,"BasisTools",function(){return po}),f.d(y,"DDSTools",function(){return ki}),f.d(y,"expandToProperty",function(){return L.b}),f.d(y,"serialize",function(){return L.c}),f.d(y,"serializeAsTexture",function(){return L.m}),f.d(y,"serializeAsColor3",function(){return L.e}),f.d(y,"serializeAsFresnelParameters",function(){return L.h}),f.d(y,"serializeAsVector2",function(){return L.n}),f.d(y,"serializeAsVector3",function(){return L.o}),f.d(y,"serializeAsMeshReference",function(){return L.k}),f.d(y,"serializeAsColorCurves",function(){return L.g}),f.d(y,"serializeAsColor4",function(){return L.f}),f.d(y,"serializeAsImageProcessingConfiguration",function(){return L.i}),f.d(y,"serializeAsQuaternion",function(){return L.l}),f.d(y,"serializeAsMatrix",function(){return L.j}),f.d(y,"serializeAsCameraReference",function(){return L.d}),f.d(y,"SerializationHelper",function(){return L.a}),f.d(y,"Deferred",function(){return tv}),f.d(y,"EnvironmentTextureTools",function(){return Ei}),f.d(y,"MeshExploder",function(){return nv}),f.d(y,"FilesInput",function(){return iv}),f.d(y,"CubeMapToSphericalPolynomialTools",function(){return Ho}),f.d(y,"HDRTools",function(){return Wu}),f.d(y,"PanoramaToCubeMapTools",function(){return Xs}),f.d(y,"KhronosTextureContainer",function(){return ra}),f.d(y,"EventState",function(){return R.a}),f.d(y,"Observer",function(){return R.d}),f.d(y,"MultiObserver",function(){return R.b}),f.d(y,"Observable",function(){return R.c}),f.d(y,"PerformanceMonitor",function(){return _f.a}),f.d(y,"RollingAverage",function(){return _f.b}),f.d(y,"PromisePolyfill",function(){return rv.a}),f.d(y,"SceneOptimization",function(){return gi}),f.d(y,"TextureOptimization",function(){return xa}),f.d(y,"HardwareScalingOptimization",function(){return Yc}),f.d(y,"ShadowsOptimization",function(){return Ca}),f.d(y,"PostProcessesOptimization",function(){return Ra}),f.d(y,"LensFlaresOptimization",function(){return Oa}),f.d(y,"CustomOptimization",function(){return mf}),f.d(y,"ParticlesOptimization",function(){return Ma}),f.d(y,"RenderTargetsOptimization",function(){return Kc}),f.d(y,"MergeMeshesOptimization",function(){return Ia}),f.d(y,"SceneOptimizerOptions",function(){return Qc}),f.d(y,"SceneOptimizer",function(){return ov}),f.d(y,"SceneSerializer",function(){return Zc}),f.d(y,"SmartArray",function(){return di.a}),f.d(y,"SmartArrayNoDuplicate",function(){return di.b}),f.d(y,"StringDictionary",function(){return Al.a}),f.d(y,"Tags",function(){return av.a}),f.d(y,"TextureTools",function(){return sv}),f.d(y,"TGATools",function(){return da}),f.d(y,"Tools",function(){return Xe.b}),f.d(y,"className",function(){return Xe.c}),f.d(y,"AsyncLoop",function(){return Xe.a}),f.d(y,"VideoRecorder",function(){return cv}),f.d(y,"JoystickAxis",function(){return an}),f.d(y,"VirtualJoystick",function(){return os}),f.d(y,"WorkerPool",function(){return Bs}),f.d(y,"Logger",function(){return l.a}),f.d(y,"_TypeStore",function(){return C.a}),f.d(y,"FilesInputStore",function(){return As.a}),f.d(y,"DeepCopier",function(){return de.a}),f.d(y,"PivotTools",function(){return jn.a}),f.d(y,"PrecisionDate",function(){return be.a}),f.d(y,"ScreenshotTools",function(){return Ro}),f.d(y,"WebRequest",function(){return re.a}),f.d(y,"InspectableType",function(){return Xc}),f.d(y,"BRDFTextureTools",function(){return ta}),f.d(y,"RGBDTextureTools",function(){return mu}),f.d(y,"ColorGradient",function(){return Rc}),f.d(y,"Color3Gradient",function(){return xd}),f.d(y,"FactorGradient",function(){return Oc}),f.d(y,"GradientHelper",function(){return In}),f.d(y,"PerfCounter",function(){return Xn.a}),f.d(y,"RetryStrategy",function(){return lv.a}),f.d(y,"CanvasGenerator",function(){return fs.a}),f.d(y,"LoadFileError",function(){return to.b}),f.d(y,"RequestFileError",function(){return to.d}),f.d(y,"ReadFileError",function(){return to.c}),f.d(y,"FileTools",function(){return to.a}),f.d(y,"StringTools",function(){return Qn.a}),f.d(y,"DataReader",function(){return uv}),f.d(y,"MinMaxReducer",function(){return Vu}),f.d(y,"DepthReducer",function(){return ku}),f.d(y,"DataStorage",function(){return hv}),f.d(y,"SceneRecorder",function(){return dv}),f.d(y,"KhronosTextureContainer2",function(){return Us}),f.d(y,"Trajectory",function(){return fv}),f.d(y,"TrajectoryClassifier",function(){return pv}),f.d(y,"TimerState",function(){return Gi}),f.d(y,"setAndStartTimer",function(){return ks}),f.d(y,"AdvancedTimer",function(){return __}),f.d(y,"CopyTools",function(){return _v.a}),f.d(y,"WebXRCamera",function(){return Su}),f.d(y,"WebXREnterExitUIButton",function(){return Ru}),f.d(y,"WebXREnterExitUIOptions",function(){return p_}),f.d(y,"WebXREnterExitUI",function(){return Ou}),f.d(y,"WebXRExperienceHelper",function(){return Au}),f.d(y,"WebXRInput",function(){return Cu}),f.d(y,"WebXRInputSource",function(){return xu}),f.d(y,"WebXRManagedOutputCanvasOptions",function(){return ps}),f.d(y,"WebXRManagedOutputCanvas",function(){return Kl}),f.d(y,"WebXRState",function(){return fn}),f.d(y,"WebXRTrackingState",function(){return er}),f.d(y,"WebXRSessionManager",function(){return _s}),f.d(y,"WebXRDefaultExperienceOptions",function(){return m_}),f.d(y,"WebXRDefaultExperience",function(){return Mu}),f.d(y,"WebXRFeatureName",function(){return ai}),f.d(y,"WebXRFeaturesManager",function(){return qn}),f.d(y,"WebXRAbstractFeature",function(){return si}),f.d(y,"WebXRHitTestLegacy",function(){return La}),f.d(y,"WebXRAnchorSystem",function(){return Na}),f.d(y,"WebXRPlaneDetector",function(){return wa}),f.d(y,"WebXRBackgroundRemover",function(){return Fa}),f.d(y,"WebXRMotionControllerTeleportation",function(){return uo}),f.d(y,"WebXRControllerPointerSelection",function(){return lo}),f.d(y,"IWebXRControllerPhysicsOptions",function(){return vv}),f.d(y,"WebXRControllerPhysics",function(){return Ba}),f.d(y,"WebXRHitTest",function(){return Ua}),f.d(y,"WebXRFeaturePointSystem",function(){return Va}),f.d(y,"WebXRHand",function(){return yf}),f.d(y,"WebXRHandTracking",function(){return ka}),f.d(y,"WebXRAbstractMotionController",function(){return Rr}),f.d(y,"WebXRControllerComponent",function(){return Cr}),f.d(y,"WebXRGenericTriggerMotionController",function(){return Vs}),f.d(y,"WebXRMicrosoftMixedRealityController",function(){return Tf}),f.d(y,"WebXRMotionControllerManager",function(){return Vn}),f.d(y,"WebXROculusTouchMotionController",function(){return $c}),f.d(y,"WebXRHTCViveMotionController",function(){return Ef}),f.d(y,"WebXRProfiledMotionController",function(){return Pu});var U=f(35),_=f(91),R=f(6),u=f(0),M=f(9),C=f(11),P=function(){function r(t,e){this.triggerOptions=t,this.onBeforeExecuteObservable=new R.c,t.parameter?(this.trigger=t.trigger,this._triggerParameter=t.parameter):t.trigger?this.trigger=t.trigger:this.trigger=t,this._nextActiveAction=this,this._condition=e}return r.prototype._prepare=function(){},r.prototype.getTriggerParameter=function(){return this._triggerParameter},r.prototype._executeCurrent=function(t){if(this._nextActiveAction._condition){var e=this._nextActiveAction._condition,n=this._actionManager.getScene().getRenderId();if(e._evaluationId===n){if(!e._currentResult)return}else{if(e._evaluationId=n,!e.isValid())return void(e._currentResult=!1);e._currentResult=!0}}this.onBeforeExecuteObservable.notifyObservers(this),this._nextActiveAction.execute(t),this.skipToNextActiveAction()},r.prototype.execute=function(t){},r.prototype.skipToNextActiveAction=function(){this._nextActiveAction._child?(this._nextActiveAction._child._actionManager||(this._nextActiveAction._child._actionManager=this._actionManager),this._nextActiveAction=this._nextActiveAction._child):this._nextActiveAction=this},r.prototype.then=function(t){return this._child=t,t._actionManager=this._actionManager,t._prepare(),t},r.prototype._getProperty=function(t){return this._actionManager._getProperty(t)},r.prototype._getEffectiveTarget=function(t,e){return this._actionManager._getEffectiveTarget(t,e)},r.prototype.serialize=function(t){},r.prototype._serialize=function(t,e){var n={type:1,children:[],name:t.name,properties:t.properties||[]};if(this._child&&this._child.serialize(n),this._condition){var i=this._condition.serialize();return i.children.push(n),e&&e.children.push(i),i}return e&&e.children.push(n),n},r._SerializeValueAsString=function(t){return typeof t=="number"?t.toString():typeof t=="boolean"?t?"true":"false":t instanceof u.d?t.x+", "+t.y:t instanceof u.e?t.x+", "+t.y+", "+t.z:t instanceof M.a?t.r+", "+t.g+", "+t.b:t instanceof M.b?t.r+", "+t.g+", "+t.b+", "+t.a:t},r._GetTargetProperty=function(t){return{name:"target",targetType:t._isMesh?"MeshProperties":t._isLight?"LightProperties":t._isCamera?"CameraProperties":"SceneProperties",value:t._isScene?"Scene":t.name}},r}();C.a.RegisteredTypes["BABYLON.Action"]=P;var m=f(47),c=f(1),T=function(){function r(t){this._actionManager=t}return r.prototype.isValid=function(){return!0},r.prototype._getProperty=function(t){return this._actionManager._getProperty(t)},r.prototype._getEffectiveTarget=function(t,e){return this._actionManager._getEffectiveTarget(t,e)},r.prototype.serialize=function(){},r.prototype._serialize=function(t){return{type:2,children:[],name:t.name,properties:t.properties}},r}(),A=function(r){function t(e,n,i,o,a){a===void 0&&(a=t.IsEqual);var s=r.call(this,e)||this;return s.propertyPath=i,s.value=o,s.operator=a,s._target=n,s._effectiveTarget=s._getEffectiveTarget(n,s.propertyPath),s._property=s._getProperty(s.propertyPath),s}return Object(c.d)(t,r),Object.defineProperty(t,"IsEqual",{get:function(){return t._IsEqual},enumerable:!1,configurable:!0}),Object.defineProperty(t,"IsDifferent",{get:function(){return t._IsDifferent},enumerable:!1,configurable:!0}),Object.defineProperty(t,"IsGreater",{get:function(){return t._IsGreater},enumerable:!1,configurable:!0}),Object.defineProperty(t,"IsLesser",{get:function(){return t._IsLesser},enumerable:!1,configurable:!0}),t.prototype.isValid=function(){switch(this.operator){case t.IsGreater:return this._effectiveTarget[this._property]>this.value;case t.IsLesser:return this._effectiveTarget[this._property]-1&&this._scene.actionManagers.splice(e,1)},t.prototype.getScene=function(){return this._scene},t.prototype.hasSpecificTriggers=function(e){for(var n=0;n-1)return!0}return!1},t.prototype.hasSpecificTriggers2=function(e,n){for(var i=0;i=t.OnPickTrigger&&n.trigger<=t.OnPointerOutTrigger)return!0}return!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasPickTriggers",{get:function(){for(var e=0;e=t.OnPickTrigger&&n.trigger<=t.OnPickUpTrigger)return!0}return!1},enumerable:!1,configurable:!0}),t.prototype.registerAction=function(e){return e.trigger===t.OnEveryFrameTrigger&&this.getScene().actionManager!==this?(l.a.Warn("OnEveryFrameTrigger can only be used with scene.actionManager"),null):(this.actions.push(e),t.Triggers[e.trigger]?t.Triggers[e.trigger]++:t.Triggers[e.trigger]=1,e._actionManager=this,e._prepare(),e)},t.prototype.unregisterAction=function(e){var n=this.actions.indexOf(e);return n!==-1&&(this.actions.splice(n,1),t.Triggers[e.trigger]-=1,t.Triggers[e.trigger]===0&&delete t.Triggers[e.trigger],e._actionManager=null,!0)},t.prototype.processTrigger=function(e,n){for(var i=0;i0;if(F.type===2?ce.push(o):ce.push(z),ve){for(var Te=new Array,Re=0;Re0){var x=b.properties[0].value,O=b.properties[0].targetType===null?x:i.getMeshByName(x);O._meshId&&(O.mesh=i.getMeshByID(O._meshId)),p={trigger:t[b.name],parameter:O}}else p=t[b.name];for(var B=0;B=0?e:0;var s=0,d=a._keys[0],p=a._keys.length-1,b=a._keys[p],x={referenceValue:d.value,referencePosition:u.c.Vector3[0],referenceQuaternion:u.c.Quaternion[0],referenceScaling:u.c.Vector3[1],keyPosition:u.c.Vector3[2],keyQuaternion:u.c.Quaternion[1],keyScaling:u.c.Vector3[3]},O=!1,B=d.frame,F=b.frame;if(n){var z=a.getRange(n);z&&(B=z.from,F=z.to)}var J=d.frame===B,ie=b.frame===F;if(a._keys.length===1){var se=a._getKeyValue(a._keys[0]);x.referenceValue=se.clone?se.clone():se,O=!0}else e<=d.frame?(se=a._getKeyValue(d.value),x.referenceValue=se.clone?se.clone():se,O=!0):e>=b.frame&&(se=a._getKeyValue(b.value),x.referenceValue=se.clone?se.clone():se,O=!0);for(var ce=0;!O||!J||!ie&&ce=ue.frame&&e<=fe.frame){if(se=void 0,e===ue.frame)se=a._getKeyValue(ue.value);else if(e===fe.frame)se=a._getKeyValue(fe.value);else{var ve={key:ce,repeatCount:0,loopMode:this.ANIMATIONLOOPMODE_CONSTANT};se=a._interpolate(e,ve)}x.referenceValue=se.clone?se.clone():se,O=!0}if(!J&&B>=ue.frame&&B<=fe.frame){if(B===ue.frame)s=ce;else if(B===fe.frame)s=ce+1;else{ve={key:ce,repeatCount:0,loopMode:this.ANIMATIONLOOPMODE_CONSTANT};var Te={frame:B,value:(se=a._interpolate(B,ve)).clone?se.clone():se};a._keys.splice(ce+1,0,Te),s=ce+1}J=!0}!ie&&F>=ue.frame&&F<=fe.frame&&(F===ue.frame?p=ce:F===fe.frame?p=ce+1:(ve={key:ce,repeatCount:0,loopMode:this.ANIMATIONLOOPMODE_CONSTANT},Te={frame:F,value:(se=a._interpolate(F,ve)).clone?se.clone():se},a._keys.splice(ce+1,0,Te),p=ce+1),ie=!0),ce++}for(a.dataType===r.ANIMATIONTYPE_QUATERNION?x.referenceValue.normalize().conjugateInPlace():a.dataType===r.ANIMATIONTYPE_MATRIX&&(x.referenceValue.decompose(x.referenceScaling,x.referenceQuaternion,x.referencePosition),x.referenceQuaternion.normalize().conjugateInPlace()),ce=s;ce<=p;ce++)if(Te=a._keys[ce],!ce||a.dataType===r.ANIMATIONTYPE_FLOAT||Te.value!==d.value)switch(a.dataType){case r.ANIMATIONTYPE_MATRIX:Te.value.decompose(x.keyScaling,x.keyQuaternion,x.keyPosition),x.keyPosition.subtractInPlace(x.referencePosition),x.keyScaling.divideInPlace(x.referenceScaling),x.referenceQuaternion.multiplyToRef(x.keyQuaternion,x.keyQuaternion),u.a.ComposeToRef(x.keyScaling,x.keyQuaternion,x.keyPosition,Te.value);break;case r.ANIMATIONTYPE_QUATERNION:x.referenceValue.multiplyToRef(Te.value,Te.value);break;case r.ANIMATIONTYPE_VECTOR2:case r.ANIMATIONTYPE_VECTOR3:case r.ANIMATIONTYPE_COLOR3:case r.ANIMATIONTYPE_COLOR4:Te.value.subtractToRef(x.referenceValue,Te.value);break;case r.ANIMATIONTYPE_SIZE:Te.value.width-=x.referenceValue.width,Te.value.height-=x.referenceValue.height;break;default:Te.value-=x.referenceValue}return a},r.TransitionTo=function(t,e,n,i,o,a,s,d){if(d===void 0&&(d=null),s<=0)return n[t]=e,d&&d(),null;var p=o*(s/1e3);a.setKeys([{frame:0,value:n[t].clone?n[t].clone():n[t]},{frame:p,value:e}]),n.animations||(n.animations=[]),n.animations.push(a);var b=i.beginAnimation(n,0,p,!1);return b.onAnimationEnd=d,b},Object.defineProperty(r.prototype,"runtimeAnimations",{get:function(){return this._runtimeAnimations},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"hasRunningRuntimeAnimations",{get:function(){for(var t=0,e=this._runtimeAnimations;t=0;a--)this._keys[a].frame>=i&&this._keys[a].frame<=o&&this._keys.splice(a,1);this._ranges[t]=null}},r.prototype.getRange=function(t){return this._ranges[t]},r.prototype.getKeys=function(){return this._keys},r.prototype.getHighestFrame=function(){for(var t=0,e=0,n=this._keys.length;e0)return e.highLimitValue.clone?e.highLimitValue.clone():e.highLimitValue;var n=this._keys;if(n.length===1)return this._getKeyValue(n[0].value);var i=e.key;if(n[i].frame>=t)for(;i-1>=0&&n[i].frame>=t;)i--;for(var o=i;o=t){e.key=o;var s=n[o],d=this._getKeyValue(s.value);if(s.interpolation===K.STEP)return d;var p=this._getKeyValue(a.value),b=s.outTangent!==void 0&&a.inTangent!==void 0,x=a.frame-s.frame,O=(t-s.frame)/x,B=this.getEasingFunction();switch(B!=null&&(O=B.ease(O)),this.dataType){case r.ANIMATIONTYPE_FLOAT:var F=b?this.floatInterpolateFunctionWithTangents(d,s.outTangent*x,p,a.inTangent*x,O):this.floatInterpolateFunction(d,p,O);switch(e.loopMode){case r.ANIMATIONLOOPMODE_CYCLE:case r.ANIMATIONLOOPMODE_CONSTANT:return F;case r.ANIMATIONLOOPMODE_RELATIVE:return e.offsetValue*e.repeatCount+F}break;case r.ANIMATIONTYPE_QUATERNION:var z=b?this.quaternionInterpolateFunctionWithTangents(d,s.outTangent.scale(x),p,a.inTangent.scale(x),O):this.quaternionInterpolateFunction(d,p,O);switch(e.loopMode){case r.ANIMATIONLOOPMODE_CYCLE:case r.ANIMATIONLOOPMODE_CONSTANT:return z;case r.ANIMATIONLOOPMODE_RELATIVE:return z.addInPlace(e.offsetValue.scale(e.repeatCount))}return z;case r.ANIMATIONTYPE_VECTOR3:var J=b?this.vector3InterpolateFunctionWithTangents(d,s.outTangent.scale(x),p,a.inTangent.scale(x),O):this.vector3InterpolateFunction(d,p,O);switch(e.loopMode){case r.ANIMATIONLOOPMODE_CYCLE:case r.ANIMATIONLOOPMODE_CONSTANT:return J;case r.ANIMATIONLOOPMODE_RELATIVE:return J.add(e.offsetValue.scale(e.repeatCount))}case r.ANIMATIONTYPE_VECTOR2:var ie=b?this.vector2InterpolateFunctionWithTangents(d,s.outTangent.scale(x),p,a.inTangent.scale(x),O):this.vector2InterpolateFunction(d,p,O);switch(e.loopMode){case r.ANIMATIONLOOPMODE_CYCLE:case r.ANIMATIONLOOPMODE_CONSTANT:return ie;case r.ANIMATIONLOOPMODE_RELATIVE:return ie.add(e.offsetValue.scale(e.repeatCount))}case r.ANIMATIONTYPE_SIZE:switch(e.loopMode){case r.ANIMATIONLOOPMODE_CYCLE:case r.ANIMATIONLOOPMODE_CONSTANT:return this.sizeInterpolateFunction(d,p,O);case r.ANIMATIONLOOPMODE_RELATIVE:return this.sizeInterpolateFunction(d,p,O).add(e.offsetValue.scale(e.repeatCount))}case r.ANIMATIONTYPE_COLOR3:switch(e.loopMode){case r.ANIMATIONLOOPMODE_CYCLE:case r.ANIMATIONLOOPMODE_CONSTANT:return this.color3InterpolateFunction(d,p,O);case r.ANIMATIONLOOPMODE_RELATIVE:return this.color3InterpolateFunction(d,p,O).add(e.offsetValue.scale(e.repeatCount))}case r.ANIMATIONTYPE_COLOR4:switch(e.loopMode){case r.ANIMATIONLOOPMODE_CYCLE:case r.ANIMATIONLOOPMODE_CONSTANT:return this.color4InterpolateFunction(d,p,O);case r.ANIMATIONLOOPMODE_RELATIVE:return this.color4InterpolateFunction(d,p,O).add(e.offsetValue.scale(e.repeatCount))}case r.ANIMATIONTYPE_MATRIX:switch(e.loopMode){case r.ANIMATIONLOOPMODE_CYCLE:case r.ANIMATIONLOOPMODE_CONSTANT:if(r.AllowMatricesInterpolation)return this.matrixInterpolateFunction(d,p,O,e.workValue);case r.ANIMATIONLOOPMODE_RELATIVE:return d}}break}}return this._getKeyValue(n[n.length-1].value)},r.prototype.matrixInterpolateFunction=function(t,e,n,i){return r.AllowMatrixDecomposeForInterpolation?i?(u.a.DecomposeLerpToRef(t,e,n,i),i):u.a.DecomposeLerp(t,e,n):i?(u.a.LerpToRef(t,e,n,i),i):u.a.Lerp(t,e,n)},r.prototype.clone=function(){var t=new r(this.name,this.targetPropertyPath.join("."),this.framePerSecond,this.dataType,this.loopMode);if(t.enableBlending=this.enableBlending,t.blendingSpeed=this.blendingSpeed,this._keys&&t.setKeys(this._keys),this._ranges)for(var e in t._ranges={},this._ranges){var n=this._ranges[e];n&&(t._ranges[e]=n.clone())}return t},r.prototype.setKeys=function(t){this._keys=t.slice(0)},r.prototype.serialize=function(){var t={};t.name=this.name,t.property=this.targetProperty,t.framePerSecond=this.framePerSecond,t.dataType=this.dataType,t.loopBehavior=this.loopMode,t.enableBlending=this.enableBlending,t.blendingSpeed=this.blendingSpeed;var e=this.dataType;t.keys=[];for(var n=this.getKeys(),i=0;i=1&&(s=p.values[1]),p.values.length>=2&&(d=p.values[2]);break;case r.ANIMATIONTYPE_QUATERNION:if(e=u.b.FromArray(p.values),p.values.length>=8){var b=u.b.FromArray(p.values.slice(4,8));b.equals(u.b.Zero())||(s=b)}if(p.values.length>=12){var x=u.b.FromArray(p.values.slice(8,12));x.equals(u.b.Zero())||(d=x)}break;case r.ANIMATIONTYPE_MATRIX:e=u.a.FromArray(p.values);break;case r.ANIMATIONTYPE_COLOR3:e=M.a.FromArray(p.values);break;case r.ANIMATIONTYPE_COLOR4:e=M.b.FromArray(p.values);break;case r.ANIMATIONTYPE_VECTOR3:default:e=u.e.FromArray(p.values)}var O={};O.frame=p.frame,O.value=e,s!=null&&(O.inTangent=s),d!=null&&(O.outTangent=d),a.push(O)}if(i.setKeys(a),t.ranges)for(n=0;n0&&x.forEach(function(O){o._events.push(O._clone())}),this._enableBlending=t&&t.animationPropertiesOverride?t.animationPropertiesOverride.enableBlending:this._animation.enableBlending}return Object.defineProperty(r.prototype,"currentFrame",{get:function(){return this._currentFrame},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"weight",{get:function(){return this._weight},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"currentValue",{get:function(){return this._currentValue},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"targetPath",{get:function(){return this._targetPath},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"target",{get:function(){return this._currentActiveTarget},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isAdditive",{get:function(){return this._host&&this._host.isAdditive},enumerable:!1,configurable:!0}),r.prototype._preparePath=function(t,e){e===void 0&&(e=0);var n=this._animation.targetPropertyPath;if(n.length>1){for(var i=t[n[0]],o=1;o-1&&this._animation.runtimeAnimations.splice(t,1)},r.prototype.setValue=function(t,e){if(this._targetIsArray)for(var n=0;ne[e.length-1].frame&&(t=e[e.length-1].frame);var n=this._events;if(n.length)for(var i=0;ithis._maxFrame)&&(e=this._minFrame),(nthis._maxFrame)&&(n=this._maxFrame);var b,x,O=n-e,B=t*(s.framePerSecond*o)/1e3+this._ratioOffset,F=0;if(this._previousDelay=t,this._previousRatio=B,!i&&n>=e&&B>=O)p=!1,F=s._getKeyValue(this._maxValue);else if(!i&&e>=n&&B<=O)p=!1,F=s._getKeyValue(this._minValue);else if(this._animationState.loopMode!==k.ANIMATIONLOOPMODE_CYCLE){var z=n.toString()+e.toString();if(!this._offsetsCache[z]){this._animationState.repeatCount=0,this._animationState.loopMode=k.ANIMATIONLOOPMODE_CYCLE;var J=s._interpolate(e,this._animationState),ie=s._interpolate(n,this._animationState);switch(this._animationState.loopMode=this._getCorrectLoopMode(),s.dataType){case k.ANIMATIONTYPE_FLOAT:this._offsetsCache[z]=ie-J;break;case k.ANIMATIONTYPE_QUATERNION:this._offsetsCache[z]=ie.subtract(J);break;case k.ANIMATIONTYPE_VECTOR3:this._offsetsCache[z]=ie.subtract(J);case k.ANIMATIONTYPE_VECTOR2:this._offsetsCache[z]=ie.subtract(J);case k.ANIMATIONTYPE_SIZE:this._offsetsCache[z]=ie.subtract(J);case k.ANIMATIONTYPE_COLOR3:this._offsetsCache[z]=ie.subtract(J)}this._highLimitsCache[z]=ie}F=this._highLimitsCache[z],b=this._offsetsCache[z]}if(b===void 0)switch(s.dataType){case k.ANIMATIONTYPE_FLOAT:b=0;break;case k.ANIMATIONTYPE_QUATERNION:b=Z;break;case k.ANIMATIONTYPE_VECTOR3:b=W;break;case k.ANIMATIONTYPE_VECTOR2:b=q;break;case k.ANIMATIONTYPE_SIZE:b=he;break;case k.ANIMATIONTYPE_COLOR3:b=ge}if(this._host&&this._host.syncRoot){var se=this._host.syncRoot;x=e+(n-e)*((se.masterFrame-se.fromFrame)/(se.toFrame-se.fromFrame))}else x=p&&O!==0?e+B%O:n;var ce=this._events;if((O>0&&this.currentFrame>x||O<0&&this.currentFrame>0,this._animationState.highLimitValue=F,this._animationState.offsetValue=b;var fe=s._interpolate(x,this._animationState);if(this.setValue(fe,a),ce.length){for(ue=0;ue0&&x>=ce[ue].frame&&ce[ue].frame>=e||O<0&&x<=ce[ue].frame&&ce[ue].frame<=e){var ve=ce[ue];ve.isDone||(ve.onlyOnce&&(ce.splice(ue,1),ue--),ve.isDone=!0,ve.action(x))}}return p||(this._stopped=!0),p},r}(),_e=f(20),be=f(57),Pe=f(44),ye=f(23),Be=function(r){function t(e,n,i,o,a,s,d){i===void 0&&(i=null),o===void 0&&(o=null),a===void 0&&(a=null),s===void 0&&(s=null),d===void 0&&(d=null);var p=r.call(this,e,n.getScene())||this;return p.name=e,p.children=new Array,p.animations=new Array,p._index=null,p._absoluteTransform=new u.a,p._invertedAbsoluteTransform=new u.a,p._scalingDeterminant=1,p._worldTransform=new u.a,p._needToDecompose=!0,p._needToCompose=!1,p._linkedTransformNode=null,p._waitingTransformNodeId=null,p._skeleton=n,p._localMatrix=o?o.clone():u.a.Identity(),p._restPose=a||p._localMatrix.clone(),p._bindPose=p._localMatrix.clone(),p._baseMatrix=s||p._localMatrix.clone(),p._index=d,n.bones.push(p),p.setParent(i,!1),(s||o)&&p._updateDifferenceMatrix(),p}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"_matrix",{get:function(){return this._compose(),this._localMatrix},set:function(e){this._localMatrix.copyFrom(e),this._needToDecompose=!0},enumerable:!1,configurable:!0}),t.prototype.getClassName=function(){return"Bone"},t.prototype.getSkeleton=function(){return this._skeleton},t.prototype.getParent=function(){return this._parent},t.prototype.getChildren=function(){return this.children},t.prototype.getIndex=function(){return this._index===null?this.getSkeleton().bones.indexOf(this):this._index},t.prototype.setParent=function(e,n){if(n===void 0&&(n=!0),this._parent!==e){if(this._parent){var i=this._parent.children.indexOf(this);i!==-1&&this._parent.children.splice(i,1)}this._parent=e,this._parent&&this._parent.children.push(this),n&&this._updateDifferenceMatrix(),this.markAsDirty()}},t.prototype.getLocalMatrix=function(){return this._compose(),this._localMatrix},t.prototype.getBaseMatrix=function(){return this._baseMatrix},t.prototype.getRestPose=function(){return this._restPose},t.prototype.setRestPose=function(e){this._restPose.copyFrom(e)},t.prototype.getBindPose=function(){return this._bindPose},t.prototype.setBindPose=function(e){this._bindPose.copyFrom(e)},t.prototype.getWorldMatrix=function(){return this._worldTransform},t.prototype.returnToRest=function(){this._skeleton._numBonesWithLinkedTransformNode>0?this.updateMatrix(this._restPose,!1,!1):this.updateMatrix(this._restPose,!1,!0)},t.prototype.getInvertedAbsoluteTransform=function(){return this._invertedAbsoluteTransform},t.prototype.getAbsoluteTransform=function(){return this._absoluteTransform},t.prototype.linkTransformNode=function(e){this._linkedTransformNode&&this._skeleton._numBonesWithLinkedTransformNode--,this._linkedTransformNode=e,this._linkedTransformNode&&this._skeleton._numBonesWithLinkedTransformNode++},t.prototype.getTransformNode=function(){return this._linkedTransformNode},Object.defineProperty(t.prototype,"position",{get:function(){return this._decompose(),this._localPosition},set:function(e){this._decompose(),this._localPosition.copyFrom(e),this._markAsDirtyAndCompose()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rotation",{get:function(){return this.getRotation()},set:function(e){this.setRotation(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rotationQuaternion",{get:function(){return this._decompose(),this._localRotation},set:function(e){this.setRotationQuaternion(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scaling",{get:function(){return this.getScale()},set:function(e){this.setScale(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"animationPropertiesOverride",{get:function(){return this._skeleton.animationPropertiesOverride},enumerable:!1,configurable:!0}),t.prototype._decompose=function(){this._needToDecompose&&(this._needToDecompose=!1,this._localScaling||(this._localScaling=u.e.Zero(),this._localRotation=u.b.Zero(),this._localPosition=u.e.Zero()),this._localMatrix.decompose(this._localScaling,this._localRotation,this._localPosition))},t.prototype._compose=function(){this._needToCompose&&(this._localScaling?(this._needToCompose=!1,u.a.ComposeToRef(this._localScaling,this._localRotation,this._localPosition,this._localMatrix)):this._needToCompose=!1)},t.prototype.updateMatrix=function(e,n,i){n===void 0&&(n=!0),i===void 0&&(i=!0),this._baseMatrix.copyFrom(e),n&&this._updateDifferenceMatrix(),i?(this._needToCompose=!1,this._localMatrix.copyFrom(e),this._markAsDirtyAndDecompose()):this.markAsDirty()},t.prototype._updateDifferenceMatrix=function(e,n){if(n===void 0&&(n=!0),e||(e=this._baseMatrix),this._parent?e.multiplyToRef(this._parent._absoluteTransform,this._absoluteTransform):this._absoluteTransform.copyFrom(e),this._absoluteTransform.invertToRef(this._invertedAbsoluteTransform),n)for(var i=0;i-1&&(this._scene._activeAnimatables.splice(e,1),this._scene._activeAnimatables.push(this))}return this},r.prototype.getAnimations=function(){return this._runtimeAnimations},r.prototype.appendAnimations=function(t,e){for(var n=this,i=0;i-1){for(var i=(a=this._runtimeAnimations).length-1;i>=0;i--){var o=a[i];t&&o.animation.name!=t||e&&!e(o.target)||(o.dispose(),a.splice(i,1))}a.length==0&&(this._scene._activeAnimatables.splice(n,1),this._raiseOnAnimationEnd())}}else if((i=this._scene._activeAnimatables.indexOf(this))>-1){this._scene._activeAnimatables.splice(i,1);var a=this._runtimeAnimations;for(i=0;i0)return;this._animationTimeLast=r}this.deltaTime=this.useConstantAnimationDeltaTime?16:(r-this._animationTimeLast)*this.animationTimeScale,this._animationTimeLast=r;var t=this._activeAnimatables;if(t.length!==0){this._animationTime+=this.deltaTime;for(var e=this._animationTime,n=0;ne&&i>0&&(i*=-1),s&&this.stopAnimation(r,void 0,d),a||(a=new ke(this,r,t,e,n,i,o,void 0,p,b));var x=!d||d(r);if(r.animations&&x&&a.appendAnimations(r,r.animations),r.getAnimatables)for(var O=r.getAnimatables(),B=0;Bn&&o>0&&(o*=-1),new ke(this,r,e,n,i,o,a,t,s,d)},_e.a.prototype.beginDirectHierarchyAnimation=function(r,t,e,n,i,o,a,s,d,p){p===void 0&&(p=!1);var b=r.getDescendants(t),x=[];x.push(this.beginDirectAnimation(r,e,n,i,o,a,s,d,p));for(var O=0,B=b;O0)i.copyFrom(n);else if(r.animations.length===1){if(u.b.SlerpToRef(n,e.currentValue,Math.min(1,r.totalWeight),i),r.totalAdditiveWeight===0)return i}else if(r.animations.length>1){var o=1,a=void 0,s=void 0;if(r.totalWeight<1){var d=1-r.totalWeight;s=[],(a=[]).push(n),s.push(d)}else{if(r.animations.length===2&&(u.b.SlerpToRef(r.animations[0].currentValue,r.animations[1].currentValue,r.animations[1].weight/r.totalWeight,t),r.totalAdditiveWeight===0))return t;a=[],s=[],o=r.totalWeight}for(var p=0;p=p&&a.frame<=b&&(n?(d=a.value.clone(),z?(s=d.getTranslation(),d.setTranslation(s.scaleInPlace(J))):ie&&i?(s=d.getTranslation(),d.setTranslation(s.multiplyInPlace(i))):d=a.value):d=a.value,se.push({frame:a.frame+e,value:d}));return this.animations[0].createRange(t,p+e,b+e),!0};var We=function(){function r(){}return r.prototype.getClassName=function(){return"TargetedAnimation"},r.prototype.serialize=function(){var t={};return t.animation=this.animation.serialize(),t.targetId=this.target.id,t},r}(),je=function(){function r(t,e){e===void 0&&(e=null),this.name=t,this._targetedAnimations=new Array,this._animatables=new Array,this._from=Number.MAX_VALUE,this._to=-Number.MAX_VALUE,this._speedRatio=1,this._loopAnimation=!1,this._isAdditive=!1,this.onAnimationEndObservable=new R.c,this.onAnimationLoopObservable=new R.c,this.onAnimationGroupLoopObservable=new R.c,this.onAnimationGroupEndObservable=new R.c,this.onAnimationGroupPauseObservable=new R.c,this.onAnimationGroupPlayObservable=new R.c,this._scene=e||te.a.LastCreatedScene,this.uniqueId=this._scene.getUniqueId(),this._scene.addAnimationGroup(this)}return Object.defineProperty(r.prototype,"from",{get:function(){return this._from},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"to",{get:function(){return this._to},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isStarted",{get:function(){return this._isStarted},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isPlaying",{get:function(){return this._isStarted&&!this._isPaused},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"speedRatio",{get:function(){return this._speedRatio},set:function(t){if(this._speedRatio!==t){this._speedRatio=t;for(var e=0;ei[0].frame&&(this._from=i[0].frame),this._tot){var s={frame:t,value:o.value,inTangent:o.inTangent,outTangent:o.outTangent,interpolation:o.interpolation};i.splice(0,0,s)}a.framei&&this._speedRatio>0&&(this._speedRatio=-e);return this._isStarted=!0,this._isPaused=!1,this.onAnimationGroupPlayObservable.notifyObservers(this),this},r.prototype.pause=function(){if(!this._isStarted)return this;this._isPaused=!0;for(var t=0;t-1&&this._scene.animationGroups.splice(t,1),this.onAnimationEndObservable.clear(),this.onAnimationGroupEndObservable.clear(),this.onAnimationGroupPauseObservable.clear(),this.onAnimationGroupPlayObservable.clear(),this.onAnimationLoopObservable.clear(),this.onAnimationGroupLoopObservable.clear()},r.prototype._checkAnimationGroupEnded=function(t){var e=this._animatables.indexOf(t);e>-1&&this._animatables.splice(e,1),this._animatables.length===0&&(this._isStarted=!1,this.onAnimationGroupEndObservable.notifyObservers(this))},r.prototype.clone=function(t,e){for(var n=new r(t||this.name,this._scene),i=0,o=this._targetedAnimations;i=.5?.5*(1-this.easeInCore(2*(1-t)))+.5:.5*this.easeInCore(2*t)},r.EASINGMODE_EASEIN=0,r.EASINGMODE_EASEOUT=1,r.EASINGMODE_EASEINOUT=2,r}(),nt=function(r){function t(){return r!==null&&r.apply(this,arguments)||this}return Object(c.d)(t,r),t.prototype.easeInCore=function(e){return e=Math.max(0,Math.min(1,e)),1-Math.sqrt(1-e*e)},t}(Ge),$e=function(r){function t(e){e===void 0&&(e=1);var n=r.call(this)||this;return n.amplitude=e,n}return Object(c.d)(t,r),t.prototype.easeInCore=function(e){var n=Math.max(0,this.amplitude);return Math.pow(e,3)-e*n*Math.sin(3.141592653589793*e)},t}(Ge),ct=function(r){function t(e,n){e===void 0&&(e=3),n===void 0&&(n=2);var i=r.call(this)||this;return i.bounces=e,i.bounciness=n,i}return Object(c.d)(t,r),t.prototype.easeInCore=function(e){var n=Math.max(0,this.bounces),i=this.bounciness;i<=1&&(i=1.001);var o=Math.pow(i,n),a=1-i,s=(1-o)/a+.5*o,d=e*s,p=Math.log(-d*(1-i)+1)/Math.log(i),b=Math.floor(p),x=b+1,O=(1-Math.pow(i,b))/(a*s),B=.5*(O+(1-Math.pow(i,x))/(a*s)),F=e-B,z=B-O;return-Math.pow(1/i,n-b)/(z*z)*(F-z)*(F+z)},t}(Ge),st=function(r){function t(){return r!==null&&r.apply(this,arguments)||this}return Object(c.d)(t,r),t.prototype.easeInCore=function(e){return e*e*e},t}(Ge),mt=function(r){function t(e,n){e===void 0&&(e=3),n===void 0&&(n=3);var i=r.call(this)||this;return i.oscillations=e,i.springiness=n,i}return Object(c.d)(t,r),t.prototype.easeInCore=function(e){var n=Math.max(0,this.oscillations),i=Math.max(0,this.springiness);return(i==0?e:(Math.exp(i*e)-1)/(Math.exp(i)-1))*Math.sin((6.283185307179586*n+1.5707963267948966)*e)},t}(Ge),St=function(r){function t(e){e===void 0&&(e=2);var n=r.call(this)||this;return n.exponent=e,n}return Object(c.d)(t,r),t.prototype.easeInCore=function(e){return this.exponent<=0?e:(Math.exp(this.exponent*e)-1)/(Math.exp(this.exponent)-1)},t}(Ge),wt=function(r){function t(e){e===void 0&&(e=2);var n=r.call(this)||this;return n.power=e,n}return Object(c.d)(t,r),t.prototype.easeInCore=function(e){var n=Math.max(0,this.power);return Math.pow(e,n)},t}(Ge),It=function(r){function t(){return r!==null&&r.apply(this,arguments)||this}return Object(c.d)(t,r),t.prototype.easeInCore=function(e){return e*e},t}(Ge),Pt=function(r){function t(){return r!==null&&r.apply(this,arguments)||this}return Object(c.d)(t,r),t.prototype.easeInCore=function(e){return e*e*e*e},t}(Ge),Ot=function(r){function t(){return r!==null&&r.apply(this,arguments)||this}return Object(c.d)(t,r),t.prototype.easeInCore=function(e){return e*e*e*e*e},t}(Ge),on=function(r){function t(){return r!==null&&r.apply(this,arguments)||this}return Object(c.d)(t,r),t.prototype.easeInCore=function(e){return 1-Math.sin(1.5707963267948966*(1-e))},t}(Ge),Zt=function(r){function t(e,n,i,o){e===void 0&&(e=0),n===void 0&&(n=0),i===void 0&&(i=1),o===void 0&&(o=1);var a=r.call(this)||this;return a.x1=e,a.y1=n,a.x2=i,a.y2=o,a}return Object(c.d)(t,r),t.prototype.easeInCore=function(e){return Qe.c.Interpolate(e,this.x1,this.y1,this.x2,this.y2)},t}(Ge),tn=function(){function r(t,e,n){this.frame=t,this.action=e,this.onlyOnce=n,this.isDone=!1}return r.prototype._clone=function(){return new r(this.frame,this.action,this.onlyOnce)},r}(),De=f(7),Pn=function(r){function t(){return r!==null&&r.apply(this,arguments)||this}return Object(c.d)(t,r),t}(U.a),nn=function(){this.rootNodes=[],this.skeletons=[],this.animationGroups=[]},xn=function(r){function t(e){var n=r.call(this)||this;return n._wasAddedToScene=!1,n.scene=e,n.sounds=[],n.effectLayers=[],n.layers=[],n.lensFlareSystems=[],n.proceduralTextures=[],n.reflectionProbes=[],e.onDisposeObservable.add(function(){n._wasAddedToScene||n.dispose()}),n}return Object(c.d)(t,r),t.prototype.instantiateModelsToScene=function(e,n){var i=this;n===void 0&&(n=!1);var o={},a={},s=new nn,d=[],p=[],b={doNotInstantiate:!0},x=function(O,B){if(o[O.uniqueId]=B.uniqueId,a[B.uniqueId]=B,e&&(B.name=e(O.name)),B instanceof De.a){var F=B;if(F.morphTargetManager){var z=O.morphTargetManager;F.morphTargetManager=z.clone();for(var J=0;J-1&&d.animations.splice(J,1)}},b=0,x=s.animations;b0&&(B=!0,this._soundLoaded(e));break;case"String":O.push(e);case"Array":O.length===0&&(O=e);for(var F=0;F0&&(this._htmlAudioElement.currentTime=0)):this._streamingSource.disconnect(),this.isPlaying=!1;else if(Ue.a.audioEngine.audioContext&&this._soundSource){var n=t?Ue.a.audioEngine.audioContext.currentTime+t:Ue.a.audioEngine.audioContext.currentTime;this._soundSource.stop(n),this._soundSource.onended=function(){e.isPlaying=!1},this.isPaused||(this._startOffset=0)}}},r.prototype.pause=function(){this.isPlaying&&(this.isPaused=!0,this._streaming?this._htmlAudioElement?this._htmlAudioElement.pause():this._streamingSource.disconnect():Ue.a.audioEngine.audioContext&&(this.stop(0),this._startOffset+=Ue.a.audioEngine.audioContext.currentTime-this._startTime))},r.prototype.setVolume=function(t,e){Ue.a.audioEngine.canUseWebAudio&&this._soundGain&&(e&&Ue.a.audioEngine.audioContext?(this._soundGain.gain.cancelScheduledValues(Ue.a.audioEngine.audioContext.currentTime),this._soundGain.gain.setValueAtTime(this._soundGain.gain.value,Ue.a.audioEngine.audioContext.currentTime),this._soundGain.gain.linearRampToValueAtTime(t,Ue.a.audioEngine.audioContext.currentTime+e)):this._soundGain.gain.value=t),this._volume=t},r.prototype.setPlaybackRate=function(t){this._playbackRate=t,this.isPlaying&&(this._streaming&&this._htmlAudioElement?this._htmlAudioElement.playbackRate=this._playbackRate:this._soundSource&&(this._soundSource.playbackRate.value=this._playbackRate))},r.prototype.getVolume=function(){return this._volume},r.prototype.attachToMesh=function(t){var e=this;this._connectedTransformNode&&this._registerFunc&&(this._connectedTransformNode.unregisterAfterWorldMatrixUpdate(this._registerFunc),this._registerFunc=null),this._connectedTransformNode=t,this.spatialSound||(this.spatialSound=!0,this._createSpatialParameters(),this.isPlaying&&this.loop&&(this.stop(),this.play(0,this._offset,this._length))),this._onRegisterAfterWorldMatrixUpdate(this._connectedTransformNode),this._registerFunc=function(n){return e._onRegisterAfterWorldMatrixUpdate(n)},this._connectedTransformNode.registerAfterWorldMatrixUpdate(this._registerFunc)},r.prototype.detachFromMesh=function(){this._connectedTransformNode&&this._registerFunc&&(this._connectedTransformNode.unregisterAfterWorldMatrixUpdate(this._registerFunc),this._registerFunc=null,this._connectedTransformNode=null)},r.prototype._onRegisterAfterWorldMatrixUpdate=function(t){if(this._positionInEmitterSpace)t.worldMatrixFromCache.invertToRef(u.c.Matrix[0]),this.setPosition(u.c.Matrix[0].getTranslation());else if(t.getBoundingInfo){var e=t.getBoundingInfo();this.setPosition(e.boundingSphere.centerWorld)}else this.setPosition(t.absolutePosition);Ue.a.audioEngine.canUseWebAudio&&this._isDirectional&&this.isPlaying&&this._updateDirection()},r.prototype.clone=function(){var t=this;if(this._streaming)return null;var e=function(){t._isReadyToPlay?(i._audioBuffer=t.getAudioBuffer(),i._isReadyToPlay=!0,i.autoplay&&i.play(0,t._offset,t._length)):window.setTimeout(e,300)},n={autoplay:this.autoplay,loop:this.loop,volume:this._volume,spatialSound:this.spatialSound,maxDistance:this.maxDistance,useCustomAttenuation:this.useCustomAttenuation,rolloffFactor:this.rolloffFactor,refDistance:this.refDistance,distanceModel:this.distanceModel},i=new r(this.name+"_cloned",new ArrayBuffer(0),this._scene,null,n);return this.useCustomAttenuation&&i.setAttenuationFunction(this._customAttenuationFunction),i.setPosition(this._position),i.setPlaybackRate(this._playbackRate),e(),i},r.prototype.getAudioBuffer=function(){return this._audioBuffer},r.prototype.getSoundSource=function(){return this._soundSource},r.prototype.getSoundGain=function(){return this._soundGain},r.prototype.serialize=function(){var t={name:this.name,url:this.name,autoplay:this.autoplay,loop:this.loop,volume:this._volume,spatialSound:this.spatialSound,maxDistance:this.maxDistance,rolloffFactor:this.rolloffFactor,refDistance:this.refDistance,distanceModel:this.distanceModel,playbackRate:this._playbackRate,panningModel:this._panningModel,soundTrackId:this.soundTrackId,metadata:this.metadata};return this.spatialSound&&(this._connectedTransformNode&&(t.connectedMeshId=this._connectedTransformNode.id),t.position=this._position.asArray(),t.refDistance=this.refDistance,t.distanceModel=this.distanceModel,t.isDirectional=this._isDirectional,t.localDirectionToMesh=this._localDirection.asArray(),t.coneInnerAngle=this._coneInnerAngle,t.coneOuterAngle=this._coneOuterAngle,t.coneOuterGain=this._coneOuterGain),t},r.Parse=function(t,e,n,i){var o,a=t.name;o=t.url?n+t.url:n+a;var s,d={autoplay:t.autoplay,loop:t.loop,volume:t.volume,spatialSound:t.spatialSound,maxDistance:t.maxDistance,rolloffFactor:t.rolloffFactor,refDistance:t.refDistance,distanceModel:t.distanceModel,playbackRate:t.playbackRate};if(i){var p=function(){i._isReadyToPlay?(s._audioBuffer=i.getAudioBuffer(),s._isReadyToPlay=!0,s.autoplay&&s.play(0,s._offset,s._length)):window.setTimeout(p,300)};s=new r(a,new ArrayBuffer(0),e,null,d),p()}else s=new r(a,o,e,function(){e._removePendingData(s)},d),e._addPendingData(s);if(t.position){var b=u.e.FromArray(t.position);s.setPosition(b)}if(t.isDirectional&&(s.setDirectionalCone(t.coneInnerAngle||360,t.coneOuterAngle||360,t.coneOuterGain||0),t.localDirectionToMesh)){var x=u.e.FromArray(t.localDirectionToMesh);s.setLocalDirectionToMesh(x)}if(t.connectedMeshId){var O=e.getMeshByID(t.connectedMeshId);O&&s.attachToMesh(O)}return t.metadata&&(s.metadata=t.metadata),s},r._SceneComponentInitialization=function(t){throw An.a.WarnImport("AudioSceneComponent")},r}(),No=function(){function r(t,e){e===void 0&&(e={}),this.id=-1,this._isInitialized=!1,this._scene=t,this.soundCollection=new Array,this._options=e,!this._options.mainTrack&&this._scene.soundTracks&&(this._scene.soundTracks.push(this),this.id=this._scene.soundTracks.length-1)}return r.prototype._initializeSoundTrackAudioGraph=function(){Ue.a.audioEngine.canUseWebAudio&&Ue.a.audioEngine.audioContext&&(this._outputAudioNode=Ue.a.audioEngine.audioContext.createGain(),this._outputAudioNode.connect(Ue.a.audioEngine.masterGain),this._options&&this._options.volume&&(this._outputAudioNode.gain.value=this._options.volume),this._isInitialized=!0)},r.prototype.dispose=function(){if(Ue.a.audioEngine&&Ue.a.audioEngine.canUseWebAudio){for(this._connectedAnalyser&&this._connectedAnalyser.stopDebugCanvas();this.soundCollection.length;)this.soundCollection[0].dispose();this._outputAudioNode&&this._outputAudioNode.disconnect(),this._outputAudioNode=null}},r.prototype.addSound=function(t){this._isInitialized||this._initializeSoundTrackAudioGraph(),Ue.a.audioEngine.canUseWebAudio&&this._outputAudioNode&&t.connectToSoundTrackAudioNode(this._outputAudioNode),t.soundTrackId&&(t.soundTrackId===-1?this._scene.mainSoundTrack.removeSound(t):this._scene.soundTracks&&this._scene.soundTracks[t.soundTrackId].removeSound(t)),this.soundCollection.push(t),t.soundTrackId=this.id},r.prototype.removeSound=function(t){var e=this.soundCollection.indexOf(t);e!==-1&&this.soundCollection.splice(e,1)},r.prototype.setVolume=function(t){Ue.a.audioEngine.canUseWebAudio&&this._outputAudioNode&&(this._outputAudioNode.gain.value=t)},r.prototype.switchPanningModelToHRTF=function(){if(Ue.a.audioEngine.canUseWebAudio)for(var t=0;t0?e.activeCameras[0]:e.activeCamera){this._cachedCameraPosition.equals(o.globalPosition)||(this._cachedCameraPosition.copyFrom(o.globalPosition),n.audioContext.listener.setPosition(o.globalPosition.x,o.globalPosition.y,o.globalPosition.z)),o.rigCameras&&o.rigCameras.length>0&&(o=o.rigCameras[0]);var a=u.a.Invert(o.getViewMatrix()),s=u.e.TransformNormal(e.useRightHandedSystem?r._CameraDirectionRH:r._CameraDirectionLH,a);s.normalize(),isNaN(s.x)||isNaN(s.y)||isNaN(s.z)||this._cachedCameraDirection.equals(s)||(this._cachedCameraDirection.copyFrom(s),n.audioContext.listener.setOrientation(s.x,s.y,s.z,0,1,0))}else n.audioContext.listener.setPosition(0,0,0)}var d;for(d=0;d0?1/o:0,p=0;p0},enumerable:!1,configurable:!0}),r.prototype.init=function(){},r.prototype.attach=function(t){var e=this;this._attachedCamera=t;var n=this._attachedCamera.getScene();this._onPrePointerObservableObserver=n.onPrePointerObservable.add(function(i){i.type!==Tt.a.POINTERDOWN?i.type===Tt.a.POINTERUP&&(e._isPointerDown=!1):e._isPointerDown=!0}),this._onAfterCheckInputsObserver=t.onAfterCheckInputsObservable.add(function(){var i=be.a.Now,o=0;e._lastFrameTime!=null&&(o=i-e._lastFrameTime),e._lastFrameTime=i,e._applyUserInteraction();var a=i-e._lastInteractionTime-e._idleRotationWaitTime,s=Math.max(Math.min(a/e._idleRotationSpinupTime,1),0);e._cameraRotationSpeed=e._idleRotationSpeed*s,e._attachedCamera&&(e._attachedCamera.alpha-=e._cameraRotationSpeed*(o/1e3))})},r.prototype.detach=function(){if(this._attachedCamera){var t=this._attachedCamera.getScene();this._onPrePointerObservableObserver&&t.onPrePointerObservable.remove(this._onPrePointerObservableObserver),this._attachedCamera.onAfterCheckInputsObservable.remove(this._onAfterCheckInputsObserver),this._attachedCamera=null}},r.prototype._userIsZooming=function(){return!!this._attachedCamera&&this._attachedCamera.inertialRadiusOffset!==0},r.prototype._shouldAnimationStopForInteraction=function(){if(!this._attachedCamera)return!1;var t=!1;return this._lastFrameRadius===this._attachedCamera.radius&&this._attachedCamera.inertialRadiusOffset!==0&&(t=!0),this._lastFrameRadius=this._attachedCamera.radius,this._zoomStopsAnimation?t:this._userIsZooming()},r.prototype._applyUserInteraction=function(){this._userIsMoving()&&!this._shouldAnimationStopForInteraction()&&(this._lastInteractionTime=be.a.Now)},r.prototype._userIsMoving=function(){return!!this._attachedCamera&&(this._attachedCamera.inertialAlphaOffset!==0||this._attachedCamera.inertialBetaOffset!==0||this._attachedCamera.inertialRadiusOffset!==0||this._attachedCamera.inertialPanningX!==0||this._attachedCamera.inertialPanningY!==0||this._isPointerDown)},r}(),ml=function(){function r(){this.transitionDuration=450,this.lowerRadiusTransitionRange=2,this.upperRadiusTransitionRange=-2,this._autoTransitionRange=!1,this._radiusIsAnimating=!1,this._radiusBounceTransition=null,this._animatables=new Array}return Object.defineProperty(r.prototype,"name",{get:function(){return"Bouncing"},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"autoTransitionRange",{get:function(){return this._autoTransitionRange},set:function(t){var e=this;if(this._autoTransitionRange!==t){this._autoTransitionRange=t;var n=this._attachedCamera;n&&(t?this._onMeshTargetChangedObserver=n.onMeshTargetChangedObservable.add(function(i){if(i){i.computeWorldMatrix(!0);var o=i.getBoundingInfo().diagonalLength;e.lowerRadiusTransitionRange=.05*o,e.upperRadiusTransitionRange=.05*o}}):this._onMeshTargetChangedObserver&&n.onMeshTargetChangedObservable.remove(this._onMeshTargetChangedObserver))}},enumerable:!1,configurable:!0}),r.prototype.init=function(){},r.prototype.attach=function(t){var e=this;this._attachedCamera=t,this._onAfterCheckInputsObserver=t.onAfterCheckInputsObservable.add(function(){e._attachedCamera&&(e._isRadiusAtLimit(e._attachedCamera.lowerRadiusLimit)&&e._applyBoundRadiusAnimation(e.lowerRadiusTransitionRange),e._isRadiusAtLimit(e._attachedCamera.upperRadiusLimit)&&e._applyBoundRadiusAnimation(e.upperRadiusTransitionRange))})},r.prototype.detach=function(){this._attachedCamera&&(this._onAfterCheckInputsObserver&&this._attachedCamera.onAfterCheckInputsObservable.remove(this._onAfterCheckInputsObserver),this._onMeshTargetChangedObserver&&this._attachedCamera.onMeshTargetChangedObservable.remove(this._onMeshTargetChangedObserver),this._attachedCamera=null)},r.prototype._isRadiusAtLimit=function(t){return!!this._attachedCamera&&this._attachedCamera.radius===t&&!this._radiusIsAnimating},r.prototype._applyBoundRadiusAnimation=function(t){var e=this;if(this._attachedCamera){this._radiusBounceTransition||(r.EasingFunction.setEasingMode(r.EasingMode),this._radiusBounceTransition=k.CreateAnimation("radius",k.ANIMATIONTYPE_FLOAT,60,r.EasingFunction)),this._cachedWheelPrecision=this._attachedCamera.wheelPrecision,this._attachedCamera.wheelPrecision=1/0,this._attachedCamera.inertialRadiusOffset=0,this.stopAllAnimations(),this._radiusIsAnimating=!0;var n=k.TransitionTo("radius",this._attachedCamera.radius+t,this._attachedCamera,this._attachedCamera.getScene(),60,this._radiusBounceTransition,this.transitionDuration,function(){return e._clearAnimationLocks()});n&&this._animatables.push(n)}},r.prototype._clearAnimationLocks=function(){this._radiusIsAnimating=!1,this._attachedCamera&&(this._attachedCamera.wheelPrecision=this._cachedWheelPrecision)},r.prototype.stopAllAnimations=function(){for(this._attachedCamera&&(this._attachedCamera.animations=[]);this._animatables.length;)this._animatables[0].onAnimationEnd=null,this._animatables[0].stop(),this._animatables.shift()},r.EasingFunction=new $e(.3),r.EasingMode=Ge.EASINGMODE_EASEOUT,r}(),gl=function(){function r(){this._mode=r.FitFrustumSidesMode,this._radiusScale=1,this._positionScale=.5,this._defaultElevation=.3,this._elevationReturnTime=1500,this._elevationReturnWaitTime=1e3,this._zoomStopsAnimation=!1,this._framingTime=1500,this.autoCorrectCameraLimitsAndSensibility=!0,this._isPointerDown=!1,this._lastInteractionTime=-1/0,this._animatables=new Array,this._betaIsAnimating=!1}return Object.defineProperty(r.prototype,"name",{get:function(){return"Framing"},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"mode",{get:function(){return this._mode},set:function(t){this._mode=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"radiusScale",{get:function(){return this._radiusScale},set:function(t){this._radiusScale=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"positionScale",{get:function(){return this._positionScale},set:function(t){this._positionScale=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"defaultElevation",{get:function(){return this._defaultElevation},set:function(t){this._defaultElevation=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"elevationReturnTime",{get:function(){return this._elevationReturnTime},set:function(t){this._elevationReturnTime=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"elevationReturnWaitTime",{get:function(){return this._elevationReturnWaitTime},set:function(t){this._elevationReturnWaitTime=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"zoomStopsAnimation",{get:function(){return this._zoomStopsAnimation},set:function(t){this._zoomStopsAnimation=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"framingTime",{get:function(){return this._framingTime},set:function(t){this._framingTime=t},enumerable:!1,configurable:!0}),r.prototype.init=function(){},r.prototype.attach=function(t){var e=this;this._attachedCamera=t;var n=this._attachedCamera.getScene();r.EasingFunction.setEasingMode(r.EasingMode),this._onPrePointerObservableObserver=n.onPrePointerObservable.add(function(i){i.type!==Tt.a.POINTERDOWN?i.type===Tt.a.POINTERUP&&(e._isPointerDown=!1):e._isPointerDown=!0}),this._onMeshTargetChangedObserver=t.onMeshTargetChangedObservable.add(function(i){i&&e.zoomOnMesh(i)}),this._onAfterCheckInputsObserver=t.onAfterCheckInputsObservable.add(function(){e._applyUserInteraction(),e._maintainCameraAboveGround()})},r.prototype.detach=function(){if(this._attachedCamera){var t=this._attachedCamera.getScene();this._onPrePointerObservableObserver&&t.onPrePointerObservable.remove(this._onPrePointerObservableObserver),this._onAfterCheckInputsObserver&&this._attachedCamera.onAfterCheckInputsObservable.remove(this._onAfterCheckInputsObserver),this._onMeshTargetChangedObserver&&this._attachedCamera.onMeshTargetChangedObservable.remove(this._onMeshTargetChangedObserver),this._attachedCamera=null}},r.prototype.zoomOnMesh=function(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=null),t.computeWorldMatrix(!0);var i=t.getBoundingInfo().boundingBox;this.zoomOnBoundingInfo(i.minimumWorld,i.maximumWorld,e,n)},r.prototype.zoomOnMeshHierarchy=function(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=null),t.computeWorldMatrix(!0);var i=t.getHierarchyBoundingVectors(!0);this.zoomOnBoundingInfo(i.min,i.max,e,n)},r.prototype.zoomOnMeshesHierarchy=function(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=null);for(var i=new u.e(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),o=new u.e(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),a=0;ap.upperRadiusLimit?p.upperRadiusLimit:d),d):0},r.prototype._maintainCameraAboveGround=function(){var t=this;if(!(this._elevationReturnTime<0)){var e=be.a.Now-this._lastInteractionTime,n=.5*Math.PI-this._defaultElevation,i=.5*Math.PI;if(this._attachedCamera&&!this._betaIsAnimating&&this._attachedCamera.beta>i&&e>=this._elevationReturnWaitTime){this._betaIsAnimating=!0,this.stopAllAnimations(),this._betaTransition||(this._betaTransition=k.CreateAnimation("beta",k.ANIMATIONTYPE_FLOAT,60,r.EasingFunction));var o=k.TransitionTo("beta",n,this._attachedCamera,this._attachedCamera.getScene(),60,this._betaTransition,this._elevationReturnTime,function(){t._clearAnimationLocks(),t.stopAllAnimations()});o&&this._animatables.push(o)}}},r.prototype._getFrustumSlope=function(){var t=this._attachedCamera;if(!t)return u.d.Zero();var e=t.getScene().getEngine().getAspectRatio(t),n=Math.tan(t.fov/2),i=n*e;return new u.d(i,n)},r.prototype._clearAnimationLocks=function(){this._betaIsAnimating=!1},r.prototype._applyUserInteraction=function(){this.isUserIsMoving&&(this._lastInteractionTime=be.a.Now,this.stopAllAnimations(),this._clearAnimationLocks())},r.prototype.stopAllAnimations=function(){for(this._attachedCamera&&(this._attachedCamera.animations=[]);this._animatables.length;)this._animatables[0]&&(this._animatables[0].onAnimationEnd=null,this._animatables[0].stop()),this._animatables.shift()},Object.defineProperty(r.prototype,"isUserIsMoving",{get:function(){return!!this._attachedCamera&&(this._attachedCamera.inertialAlphaOffset!==0||this._attachedCamera.inertialBetaOffset!==0||this._attachedCamera.inertialRadiusOffset!==0||this._attachedCamera.inertialPanningX!==0||this._attachedCamera.inertialPanningY!==0||this._isPointerDown)},enumerable:!1,configurable:!0}),r.EasingFunction=new St,r.EasingMode=Ge.EASINGMODE_EASEINOUT,r.IgnoreBoundsSizeMode=0,r.FitFrustumSidesMode=1,r}(),fr=function(r,t,e,n){t===void 0&&(t=new u.e),e===void 0&&(e=0),n===void 0&&(n=!1),this.direction=r,this.rotatedDirection=t,this.diff=e,this.ignore=n},If=function(){function r(t){this.ui=t,this.name="AttachToBoxBehavior",this.distanceAwayFromFace=.15,this.distanceAwayFromBottomOfFace=.15,this._faceVectors=[new fr(u.e.Up()),new fr(u.e.Down()),new fr(u.e.Left()),new fr(u.e.Right()),new fr(u.e.Forward()),new fr(u.e.Forward().scaleInPlace(-1))],this._tmpMatrix=new u.a,this._tmpVector=new u.e,this._zeroVector=u.e.Zero(),this._lookAtTmpMatrix=new u.a}return r.prototype.init=function(){},r.prototype._closestFace=function(t){var e=this;return this._faceVectors.forEach(function(n){e._target.rotationQuaternion||(e._target.rotationQuaternion=u.b.RotationYawPitchRoll(e._target.rotation.y,e._target.rotation.x,e._target.rotation.z)),e._target.rotationQuaternion.toRotationMatrix(e._tmpMatrix),u.e.TransformCoordinatesToRef(n.direction,e._tmpMatrix,n.rotatedDirection),n.diff=u.e.GetAngleBetweenVectors(n.rotatedDirection,t,u.e.Cross(n.rotatedDirection,t))}),this._faceVectors.reduce(function(n,i){return n.ignore?i:i.ignore||n.diff1)return t._setAllVisibility(t._ownerNode,1),void(t._hoverValue=t.fadeInTime+t.delay);if(t._ownerNode.visibility<0&&(t._setAllVisibility(t._ownerNode,0),t._hoverValue<0))return void(t._hoverValue=0);setTimeout(t._update,t._millisecondsPerFrame)}}}return Object.defineProperty(r.prototype,"name",{get:function(){return"FadeInOut"},enumerable:!1,configurable:!0}),r.prototype.init=function(){},r.prototype.attach=function(t){this._ownerNode=t,this._setAllVisibility(this._ownerNode,0)},r.prototype.detach=function(){this._ownerNode=null},r.prototype.fadeIn=function(t){this._hovered=t,this._update()},r.prototype._setAllVisibility=function(t,e){var n=this;t.visibility=e,t.getChildMeshes().forEach(function(i){n._setAllVisibility(i,e)})},r}(),vi=f(65),Lf=function(){function r(){this._startDistance=0,this._initialScale=new u.e(0,0,0),this._targetScale=new u.e(0,0,0),this._sceneRenderObserver=null,this._dragBehaviorA=new vi.a({}),this._dragBehaviorA.moveAttached=!1,this._dragBehaviorB=new vi.a({}),this._dragBehaviorB.moveAttached=!1}return Object.defineProperty(r.prototype,"name",{get:function(){return"MultiPointerScale"},enumerable:!1,configurable:!0}),r.prototype.init=function(){},r.prototype._getCurrentDistance=function(){return this._dragBehaviorA.lastDragPosition.subtract(this._dragBehaviorB.lastDragPosition).length()},r.prototype.attach=function(t){var e=this;this._ownerNode=t,this._dragBehaviorA.onDragStartObservable.add(function(n){e._dragBehaviorA.dragging&&e._dragBehaviorB.dragging&&(e._dragBehaviorA.currentDraggingPointerID==e._dragBehaviorB.currentDraggingPointerID?e._dragBehaviorA.releaseDrag():(e._initialScale.copyFrom(t.scaling),e._startDistance=e._getCurrentDistance()))}),this._dragBehaviorB.onDragStartObservable.add(function(n){e._dragBehaviorA.dragging&&e._dragBehaviorB.dragging&&(e._dragBehaviorA.currentDraggingPointerID==e._dragBehaviorB.currentDraggingPointerID?e._dragBehaviorB.releaseDrag():(e._initialScale.copyFrom(t.scaling),e._startDistance=e._getCurrentDistance()))}),[this._dragBehaviorA,this._dragBehaviorB].forEach(function(n){n.onDragObservable.add(function(){if(e._dragBehaviorA.dragging&&e._dragBehaviorB.dragging){var i=e._getCurrentDistance()/e._startDistance;e._initialScale.scaleToRef(i,e._targetScale)}})}),t.addBehavior(this._dragBehaviorA),t.addBehavior(this._dragBehaviorB),this._sceneRenderObserver=t.getScene().onBeforeRenderObservable.add(function(){if(e._dragBehaviorA.dragging&&e._dragBehaviorB.dragging){var n=e._targetScale.subtract(t.scaling).scaleInPlace(.1);n.length()>.01&&t.scaling.addInPlace(n)}})},r.prototype.detach=function(){var t=this;this._ownerNode.getScene().onBeforeRenderObservable.remove(this._sceneRenderObserver),[this._dragBehaviorA,this._dragBehaviorB].forEach(function(e){e.onDragStartObservable.clear(),e.onDragObservable.clear(),t._ownerNode.removeBehavior(e)})},r}(),Dt=f(31),gt=f(24),jn=f(60),vl=function(){function r(){this._sceneRenderObserver=null,this._targetPosition=new u.e(0,0,0),this._moving=!1,this._startingOrientation=new u.b,this._attachedToElement=!1,this.zDragFactor=3,this.rotateDraggedObject=!0,this.dragging=!1,this.dragDeltaRatio=.2,this.currentDraggingPointerID=-1,this.detachCameraControls=!0,this.onDragStartObservable=new R.c,this.onDragObservable=new R.c,this.onDragEndObservable=new R.c}return Object.defineProperty(r.prototype,"name",{get:function(){return"SixDofDrag"},enumerable:!1,configurable:!0}),r.prototype.init=function(){},Object.defineProperty(r.prototype,"_pointerCamera",{get:function(){return this._scene.cameraToUseForPointers?this._scene.cameraToUseForPointers:this._scene.activeCamera},enumerable:!1,configurable:!0}),r.prototype.attach=function(t){var e=this;this._ownerNode=t,this._scene=this._ownerNode.getScene(),r._virtualScene||(r._virtualScene=new _e.a(this._scene.getEngine(),{virtual:!0}),r._virtualScene.detachControl(),this._scene.getEngine().scenes.pop());var n=null,i=new u.e(0,0,0);this._virtualOriginMesh=new Dt.a("",r._virtualScene),this._virtualOriginMesh.rotationQuaternion=new u.b,this._virtualDragMesh=new Dt.a("",r._virtualScene),this._virtualDragMesh.rotationQuaternion=new u.b,this._pointerObserver=this._scene.onPointerObservable.add(function(a,s){if(a.type==Tt.a.POINTERDOWN){if(!e.dragging&&a.pickInfo&&a.pickInfo.hit&&a.pickInfo.pickedMesh&&a.pickInfo.ray&&(O=a.pickInfo.pickedMesh,e._ownerNode==O||O.isDescendantOf(e._ownerNode))){e._pointerCamera&&e._pointerCamera.cameraRigMode==gt.a.RIG_MODE_NONE&&a.pickInfo.ray.origin.copyFrom(e._pointerCamera.globalPosition),n=e._ownerNode,jn.a._RemoveAndStorePivotPoint(n),i.copyFrom(a.pickInfo.ray.origin),e._virtualOriginMesh.position.copyFrom(a.pickInfo.ray.origin),e._virtualOriginMesh.lookAt(a.pickInfo.ray.origin.add(a.pickInfo.ray.direction)),e._virtualOriginMesh.removeChild(e._virtualDragMesh),n.computeWorldMatrix(),e._virtualDragMesh.position.copyFrom(n.absolutePosition),n.rotationQuaternion||(n.rotationQuaternion=u.b.RotationYawPitchRoll(n.rotation.y,n.rotation.x,n.rotation.z));var d=n.parent;n.setParent(null),e._virtualDragMesh.rotationQuaternion.copyFrom(n.rotationQuaternion),n.setParent(d),e._virtualOriginMesh.addChild(e._virtualDragMesh),e._targetPosition.copyFrom(e._virtualDragMesh.absolutePosition),e.dragging=!0,e.currentDraggingPointerID=a.event.pointerId,e.detachCameraControls&&e._pointerCamera&&!e._pointerCamera.leftCamera&&(e._pointerCamera.inputs.attachedToElement?(e._pointerCamera.detachControl(),e._attachedToElement=!0):e._attachedToElement=!1),jn.a._RestorePivotPoint(n),e.onDragStartObservable.notifyObservers({})}}else if(a.type==Tt.a.POINTERUP||a.type==Tt.a.POINTERDOUBLETAP)e.currentDraggingPointerID==a.event.pointerId&&(e.dragging=!1,e._moving=!1,e.currentDraggingPointerID=-1,n=null,e._virtualOriginMesh.removeChild(e._virtualDragMesh),e.detachCameraControls&&e._attachedToElement&&e._pointerCamera&&!e._pointerCamera.leftCamera&&(e._pointerCamera.attachControl(!0),e._attachedToElement=!1),e.onDragEndObservable.notifyObservers({}));else if(a.type==Tt.a.POINTERMOVE&&e.currentDraggingPointerID==a.event.pointerId&&e.dragging&&a.pickInfo&&a.pickInfo.ray&&n){var p=e.zDragFactor;e._pointerCamera&&e._pointerCamera.cameraRigMode==gt.a.RIG_MODE_NONE&&(a.pickInfo.ray.origin.copyFrom(e._pointerCamera.globalPosition),p=0);var b=a.pickInfo.ray.origin.subtract(i);i.copyFrom(a.pickInfo.ray.origin);var x=-u.e.Dot(b,a.pickInfo.ray.direction);e._virtualOriginMesh.addChild(e._virtualDragMesh),e._virtualDragMesh.position.z-=e._virtualDragMesh.position.z<1?x*e.zDragFactor:x*p*e._virtualDragMesh.position.z,e._virtualDragMesh.position.z<0&&(e._virtualDragMesh.position.z=0),e._virtualOriginMesh.position.copyFrom(a.pickInfo.ray.origin),e._virtualOriginMesh.lookAt(a.pickInfo.ray.origin.add(a.pickInfo.ray.direction)),e._virtualOriginMesh.removeChild(e._virtualDragMesh),e._targetPosition.copyFrom(e._virtualDragMesh.absolutePosition),n.parent&&u.e.TransformCoordinatesToRef(e._targetPosition,u.a.Invert(n.parent.getWorldMatrix()),e._targetPosition),e._moving||e._startingOrientation.copyFrom(e._virtualDragMesh.rotationQuaternion),e._moving=!0}var O});var o=new u.b;this._sceneRenderObserver=t.getScene().onBeforeRenderObservable.add(function(){if(e.dragging&&e._moving&&n){if(jn.a._RemoveAndStorePivotPoint(n),n.position.addInPlace(e._targetPosition.subtract(n.position).scale(e.dragDeltaRatio)),e.rotateDraggedObject){o.copyFrom(e._startingOrientation),o.x=-o.x,o.y=-o.y,o.z=-o.z,e._virtualDragMesh.rotationQuaternion.multiplyToRef(o,o),u.b.RotationYawPitchRollToRef(o.toEulerAngles("xyz").y,0,0,o),o.multiplyToRef(e._startingOrientation,o);var a=n.parent;(!a||a.scaling&&!a.scaling.isNonUniformWithinEpsilon(.001))&&(n.setParent(null),u.b.SlerpToRef(n.rotationQuaternion,o,e.dragDeltaRatio,n.rotationQuaternion),n.setParent(a))}jn.a._RestorePivotPoint(n),e.onDragObservable.notifyObservers()}})},r.prototype.detach=function(){this._scene&&(this.detachCameraControls&&this._attachedToElement&&this._pointerCamera&&!this._pointerCamera.leftCamera&&(this._pointerCamera.attachControl(!0),this._attachedToElement=!1),this._scene.onPointerObservable.remove(this._pointerObserver)),this._ownerNode&&this._ownerNode.getScene().onBeforeRenderObservable.remove(this._sceneRenderObserver),this._virtualOriginMesh&&this._virtualOriginMesh.dispose(),this._virtualDragMesh&&this._virtualDragMesh.dispose(),this.onDragEndObservable.clear(),this.onDragObservable.clear(),this.onDragStartObservable.clear()},r}(),Nf=function(){function r(t,e,n){if(this.targetPosition=u.e.Zero(),this.poleTargetPosition=u.e.Zero(),this.poleTargetLocalOffset=u.e.Zero(),this.poleAngle=0,this.slerpAmount=1,this._bone1Quat=u.b.Identity(),this._bone1Mat=u.a.Identity(),this._bone2Ang=Math.PI,this._maxAngle=Math.PI,this._rightHandedSystem=!1,this._bendAxis=u.e.Right(),this._slerping=!1,this._adjustRoll=0,this._bone2=e,this._bone1=e.getParent(),this._bone1){this.mesh=t;var i=e.getPosition();if(e.getAbsoluteTransform().determinant()>0&&(this._rightHandedSystem=!0,this._bendAxis.x=0,this._bendAxis.y=0,this._bendAxis.z=-1,i.x>i.y&&i.x>i.z&&(this._adjustRoll=.5*Math.PI,this._bendAxis.z=1)),this._bone1.length){var o=this._bone1.getScale(),a=this._bone2.getScale();this._bone1Length=this._bone1.length*o.y*this.mesh.scaling.y,this._bone2Length=this._bone2.length*a.y*this.mesh.scaling.y}else if(this._bone1.children[0]){t.computeWorldMatrix(!0);var s=this._bone2.children[0].getAbsolutePosition(t),d=this._bone2.getAbsolutePosition(t),p=this._bone1.getAbsolutePosition(t);this._bone1Length=u.e.Distance(s,d),this._bone2Length=u.e.Distance(d,p)}this._bone1.getRotationMatrixToRef(ye.c.WORLD,t,this._bone1Mat),this.maxAngle=Math.PI,n&&(n.targetMesh&&(this.targetMesh=n.targetMesh,this.targetMesh.computeWorldMatrix(!0)),n.poleTargetMesh?(this.poleTargetMesh=n.poleTargetMesh,this.poleTargetMesh.computeWorldMatrix(!0)):n.poleTargetBone?this.poleTargetBone=n.poleTargetBone:this._bone1.getParent()&&(this.poleTargetBone=this._bone1.getParent()),n.poleTargetLocalOffset&&this.poleTargetLocalOffset.copyFrom(n.poleTargetLocalOffset),n.poleAngle&&(this.poleAngle=n.poleAngle),n.bendAxis&&this._bendAxis.copyFrom(n.bendAxis),n.maxAngle&&(this.maxAngle=n.maxAngle),n.slerpAmount&&(this.slerpAmount=n.slerpAmount))}}return Object.defineProperty(r.prototype,"maxAngle",{get:function(){return this._maxAngle},set:function(t){this._setMaxAngle(t)},enumerable:!1,configurable:!0}),r.prototype._setMaxAngle=function(t){t<0&&(t=0),(t>Math.PI||t==null)&&(t=Math.PI),this._maxAngle=t;var e=this._bone1Length,n=this._bone2Length;this._maxReach=Math.sqrt(e*e+n*n-2*e*n*Math.cos(t))},r.prototype.update=function(){var t=this._bone1;if(t){var e=this.targetPosition,n=this.poleTargetPosition,i=r._tmpMats[0],o=r._tmpMats[1];this.targetMesh&&e.copyFrom(this.targetMesh.getAbsolutePosition()),this.poleTargetBone?this.poleTargetBone.getAbsolutePositionFromLocalToRef(this.poleTargetLocalOffset,this.mesh,n):this.poleTargetMesh&&u.e.TransformCoordinatesToRef(this.poleTargetLocalOffset,this.poleTargetMesh.getWorldMatrix(),n);var a=r._tmpVecs[0],s=r._tmpVecs[1],d=r._tmpVecs[2],p=r._tmpVecs[3],b=r._tmpVecs[4],x=r._tmpQuat;t.getAbsolutePositionToRef(this.mesh,a),n.subtractToRef(a,b),b.x==0&&b.y==0&&b.z==0?b.y=1:b.normalize(),e.subtractToRef(a,p),p.normalize(),u.e.CrossToRef(p,b,s),s.normalize(),u.e.CrossToRef(p,s,d),d.normalize(),u.a.FromXYZAxesToRef(d,p,s,i);var O=this._bone1Length,B=this._bone2Length,F=u.e.Distance(a,e);this._maxReach>0&&(F=Math.min(this._maxReach,F));var z=(B*B+F*F-O*O)/(2*B*F),J=(F*F+O*O-B*B)/(2*F*O);z>1&&(z=1),J>1&&(J=1),z<-1&&(z=-1),J<-1&&(J=-1);var ie=Math.acos(z),se=Math.acos(J),ce=-ie-se;if(this._rightHandedSystem)u.a.RotationYawPitchRollToRef(0,0,this._adjustRoll,o),o.multiplyToRef(i,i),u.a.RotationAxisToRef(this._bendAxis,se,o),o.multiplyToRef(i,i);else{var ue=r._tmpVecs[5];ue.copyFrom(this._bendAxis),ue.x*=-1,u.a.RotationAxisToRef(ue,-se,o),o.multiplyToRef(i,i)}this.poleAngle&&(u.a.RotationAxisToRef(p,this.poleAngle,o),i.multiplyToRef(o,i)),this._bone1&&(this.slerpAmount<1?(this._slerping||u.b.FromRotationMatrixToRef(this._bone1Mat,this._bone1Quat),u.b.FromRotationMatrixToRef(i,x),u.b.SlerpToRef(this._bone1Quat,x,this.slerpAmount,this._bone1Quat),ce=this._bone2Ang*(1-this.slerpAmount)+ce*this.slerpAmount,this._bone1.setRotationQuaternion(this._bone1Quat,ye.c.WORLD,this.mesh),this._slerping=!0):(this._bone1.setRotationMatrix(i,ye.c.WORLD,this.mesh),this._bone1Mat.copyFrom(i),this._slerping=!1)),this._bone2.setAxisAngle(this._bendAxis,ce,ye.c.LOCAL),this._bone2Ang=ce}},r._tmpVecs=[u.e.Zero(),u.e.Zero(),u.e.Zero(),u.e.Zero(),u.e.Zero(),u.e.Zero()],r._tmpQuat=u.b.Identity(),r._tmpMats=[u.a.Identity(),u.a.Identity()],r}(),wf=function(){function r(t,e,n,i){if(this.upAxis=u.e.Up(),this.upAxisSpace=ye.c.LOCAL,this.adjustYaw=0,this.adjustPitch=0,this.adjustRoll=0,this.slerpAmount=1,this._boneQuat=u.b.Identity(),this._slerping=!1,this._firstFrameSkipped=!1,this._fowardAxis=u.e.Forward(),this.mesh=t,this.bone=e,this.target=n,i&&(i.adjustYaw&&(this.adjustYaw=i.adjustYaw),i.adjustPitch&&(this.adjustPitch=i.adjustPitch),i.adjustRoll&&(this.adjustRoll=i.adjustRoll),i.maxYaw!=null?this.maxYaw=i.maxYaw:this.maxYaw=Math.PI,i.minYaw!=null?this.minYaw=i.minYaw:this.minYaw=-Math.PI,i.maxPitch!=null?this.maxPitch=i.maxPitch:this.maxPitch=Math.PI,i.minPitch!=null?this.minPitch=i.minPitch:this.minPitch=-Math.PI,i.slerpAmount!=null&&(this.slerpAmount=i.slerpAmount),i.upAxis!=null&&(this.upAxis=i.upAxis),i.upAxisSpace!=null&&(this.upAxisSpace=i.upAxisSpace),i.yawAxis!=null||i.pitchAxis!=null)){var o=ye.a.Y,a=ye.a.X;i.yawAxis!=null&&(o=i.yawAxis.clone()).normalize(),i.pitchAxis!=null&&(a=i.pitchAxis.clone()).normalize();var s=u.e.Cross(a,o);this._transformYawPitch=u.a.Identity(),u.a.FromXYZAxesToRef(a,o,s,this._transformYawPitch),this._transformYawPitchInv=this._transformYawPitch.clone(),this._transformYawPitch.invert()}e.getParent()||this.upAxisSpace!=ye.c.BONE||(this.upAxisSpace=ye.c.LOCAL)}return Object.defineProperty(r.prototype,"minYaw",{get:function(){return this._minYaw},set:function(t){this._minYaw=t,this._minYawSin=Math.sin(t),this._minYawCos=Math.cos(t),this._maxYaw!=null&&(this._midYawConstraint=.5*this._getAngleDiff(this._minYaw,this._maxYaw)+this._minYaw,this._yawRange=this._maxYaw-this._minYaw)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"maxYaw",{get:function(){return this._maxYaw},set:function(t){this._maxYaw=t,this._maxYawSin=Math.sin(t),this._maxYawCos=Math.cos(t),this._minYaw!=null&&(this._midYawConstraint=.5*this._getAngleDiff(this._minYaw,this._maxYaw)+this._minYaw,this._yawRange=this._maxYaw-this._minYaw)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"minPitch",{get:function(){return this._minPitch},set:function(t){this._minPitch=t,this._minPitchTan=Math.tan(t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"maxPitch",{get:function(){return this._maxPitch},set:function(t){this._maxPitch=t,this._maxPitchTan=Math.tan(t)},enumerable:!1,configurable:!0}),r.prototype.update=function(){if(this.slerpAmount<1&&!this._firstFrameSkipped)this._firstFrameSkipped=!0;else{var t=this.bone,e=r._tmpVecs[0];t.getAbsolutePositionToRef(this.mesh,e);var n=this.target,i=r._tmpMats[0],o=r._tmpMats[1],a=this.mesh,s=t.getParent(),d=r._tmpVecs[1];d.copyFrom(this.upAxis),this.upAxisSpace==ye.c.BONE&&s?(this._transformYawPitch&&u.e.TransformCoordinatesToRef(d,this._transformYawPitchInv,d),s.getDirectionToRef(d,this.mesh,d)):this.upAxisSpace==ye.c.LOCAL&&(a.getDirectionToRef(d,d),a.scaling.x==1&&a.scaling.y==1&&a.scaling.z==1||d.normalize());var p=!1,b=!1;if(this._maxYaw==Math.PI&&this._minYaw==-Math.PI||(p=!0),this._maxPitch==Math.PI&&this._minPitch==-Math.PI||(b=!0),p||b){var x=r._tmpMats[2],O=r._tmpMats[3];if(this.upAxisSpace==ye.c.BONE&&d.y==1&&s)s.getRotationMatrixToRef(ye.c.WORLD,this.mesh,x);else if(this.upAxisSpace!=ye.c.LOCAL||d.y!=1||s){(F=r._tmpVecs[2]).copyFrom(this._fowardAxis),this._transformYawPitch&&u.e.TransformCoordinatesToRef(F,this._transformYawPitchInv,F),s?s.getDirectionToRef(F,this.mesh,F):a.getDirectionToRef(F,F);var B=u.e.Cross(d,F);B.normalize();var F=u.e.Cross(B,d);u.a.FromXYZAxesToRef(B,d,F,x)}else x.copyFrom(a.getWorldMatrix());x.invertToRef(O);var z=null;if(b){var J=r._tmpVecs[3];n.subtractToRef(e,J),u.e.TransformCoordinatesToRef(J,O,J),z=Math.sqrt(J.x*J.x+J.z*J.z);var ie=Math.atan2(J.y,z),se=ie;ie>this._maxPitch?(J.y=this._maxPitchTan*z,se=this._maxPitch):iethis._maxYaw||ceMath.PI?this._isAngleBetween(ce,this._maxYaw,this._midYawConstraint)?(J.z=this._maxYawCos*z,J.x=this._maxYawSin*z,ue=this._maxYaw):this._isAngleBetween(ce,this._midYawConstraint,this._minYaw)&&(J.z=this._minYawCos*z,J.x=this._minYawSin*z,ue=this._minYaw):ce>this._maxYaw?(J.z=this._maxYawCos*z,J.x=this._maxYawSin*z,ue=this._maxYaw):ceMath.PI){var fe=r._tmpVecs[8];fe.copyFrom(ye.a.Z),this._transformYawPitch&&u.e.TransformCoordinatesToRef(fe,this._transformYawPitchInv,fe);var ve=r._tmpMats[4];this._boneQuat.toRotationMatrix(ve),this.mesh.getWorldMatrix().multiplyToRef(ve,ve),u.e.TransformCoordinatesToRef(fe,ve,fe),u.e.TransformCoordinatesToRef(fe,O,fe);var Te=Math.atan2(fe.x,fe.z);if(this._getAngleBetween(Te,ce)>this._getAngleBetween(Te,this._midYawConstraint)){z==null&&(z=Math.sqrt(J.x*J.x+J.z*J.z));var Re=this._getAngleBetween(Te,this._maxYaw);this._getAngleBetween(Te,this._minYaw)Math.PI?n-=2*Math.PI:n<-Math.PI&&(n+=2*Math.PI),n},r.prototype._getAngleBetween=function(t,e){var n=0;return(n=(t=(t%=2*Math.PI)<0?t+2*Math.PI:t)<(e=(e%=2*Math.PI)<0?e+2*Math.PI:e)?e-t:t-e)>Math.PI&&(n=2*Math.PI-n),n},r.prototype._isAngleBetween=function(t,e,n){if(t=(t%=2*Math.PI)<0?t+2*Math.PI:t,(e=(e%=2*Math.PI)<0?e+2*Math.PI:e)<(n=(n%=2*Math.PI)<0?n+2*Math.PI:n)){if(t>e&&tn&&t>Re,Ee=0;Ee<6;Ee++){var Se=Te[Re][Ee];ve&&(Se=bl(Se,Ae,Ae,i)),B.texImage2D(Ee,Re,fe,Ae,Ae,0,ue,ce,Se)}O._bindTextureDirectly(B.TEXTURE_CUBE_MAP,null)}else O.updateRawCubeTexture(F,se,n,i,x);F.isReady=!0,t?._removePendingData(F),d&&d()}})(z)},void 0,t?.offlineProvider,!0,function(z,J){t?._removePendingData(F),p&&z&&p(z.status+" "+z.statusText,J)}),F},Bt.a.prototype.createRawTexture2DArray=yl(!1),Bt.a.prototype.createRawTexture3D=yl(!0),Bt.a.prototype.updateRawTexture2DArray=Tl(!1),Bt.a.prototype.updateRawTexture3D=Tl(!0);var ni=function(r){function t(e,n,i,o,a,s,d,p,b){s===void 0&&(s=!0),d===void 0&&(d=!1),p===void 0&&(p=h.a.TEXTURE_TRILINEAR_SAMPLINGMODE),b===void 0&&(b=h.a.TEXTURETYPE_UNSIGNED_INT);var x=r.call(this,null,a,!s,d)||this;return x.format=o,x._engine&&(x._texture=x._engine.createRawTexture(e,n,i,o,s,d,p,null,b),x.wrapU=we.a.CLAMP_ADDRESSMODE,x.wrapV=we.a.CLAMP_ADDRESSMODE),x}return Object(c.d)(t,r),t.prototype.update=function(e){this._getEngine().updateRawTexture(this._texture,e,this._texture.format,this._texture.invertY,null,this._texture.type)},t.CreateLuminanceTexture=function(e,n,i,o,a,s,d){return a===void 0&&(a=!0),s===void 0&&(s=!1),d===void 0&&(d=h.a.TEXTURE_TRILINEAR_SAMPLINGMODE),new t(e,n,i,h.a.TEXTUREFORMAT_LUMINANCE,o,a,s,d)},t.CreateLuminanceAlphaTexture=function(e,n,i,o,a,s,d){return a===void 0&&(a=!0),s===void 0&&(s=!1),d===void 0&&(d=h.a.TEXTURE_TRILINEAR_SAMPLINGMODE),new t(e,n,i,h.a.TEXTUREFORMAT_LUMINANCE_ALPHA,o,a,s,d)},t.CreateAlphaTexture=function(e,n,i,o,a,s,d){return a===void 0&&(a=!0),s===void 0&&(s=!1),d===void 0&&(d=h.a.TEXTURE_TRILINEAR_SAMPLINGMODE),new t(e,n,i,h.a.TEXTUREFORMAT_ALPHA,o,a,s,d)},t.CreateRGBTexture=function(e,n,i,o,a,s,d,p){return a===void 0&&(a=!0),s===void 0&&(s=!1),d===void 0&&(d=h.a.TEXTURE_TRILINEAR_SAMPLINGMODE),p===void 0&&(p=h.a.TEXTURETYPE_UNSIGNED_INT),new t(e,n,i,h.a.TEXTUREFORMAT_RGB,o,a,s,d,p)},t.CreateRGBATexture=function(e,n,i,o,a,s,d,p){return a===void 0&&(a=!0),s===void 0&&(s=!1),d===void 0&&(d=h.a.TEXTURE_TRILINEAR_SAMPLINGMODE),p===void 0&&(p=h.a.TEXTURETYPE_UNSIGNED_INT),new t(e,n,i,h.a.TEXTUREFORMAT_RGBA,o,a,s,d,p)},t.CreateRTexture=function(e,n,i,o,a,s,d,p){return a===void 0&&(a=!0),s===void 0&&(s=!1),d===void 0&&(d=we.a.TRILINEAR_SAMPLINGMODE),p===void 0&&(p=h.a.TEXTURETYPE_FLOAT),new t(e,n,i,h.a.TEXTUREFORMAT_R,o,a,s,d,p)},t}(we.a),wo=function(){function r(t,e,n){this.name=t,this.id=e,this.bones=new Array,this.needInitialSkinMatrix=!1,this.overrideMesh=null,this._isDirty=!0,this._meshesWithPoseMatrix=new Array,this._identity=u.a.Identity(),this._ranges={},this._lastAbsoluteTransformsUpdateId=-1,this._canUseTextureForBones=!1,this._uniqueId=0,this._numBonesWithLinkedTransformNode=0,this._hasWaitingData=null,this._waitingOverrideMeshId=null,this.doNotSerialize=!1,this._useTextureToStoreBoneMatrices=!0,this._animationPropertiesOverride=null,this.onBeforeComputeObservable=new R.c,this.bones=[],this._scene=n||te.a.LastCreatedScene,this._uniqueId=this._scene.getUniqueId(),this._scene.addSkeleton(this),this._isDirty=!0;var i=this._scene.getEngine().getCaps();this._canUseTextureForBones=i.textureFloat&&i.maxVertexTextureImageUnits>0}return Object.defineProperty(r.prototype,"useTextureToStoreBoneMatrices",{get:function(){return this._useTextureToStoreBoneMatrices},set:function(t){this._useTextureToStoreBoneMatrices=t,this._markAsDirty()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"animationPropertiesOverride",{get:function(){return this._animationPropertiesOverride?this._animationPropertiesOverride:this._scene.animationPropertiesOverride},set:function(t){this._animationPropertiesOverride=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isUsingTextureForMatrices",{get:function(){return this.useTextureToStoreBoneMatrices&&this._canUseTextureForBones},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"uniqueId",{get:function(){return this._uniqueId},enumerable:!1,configurable:!0}),r.prototype.getClassName=function(){return"Skeleton"},r.prototype.getChildren=function(){return this.bones.filter(function(t){return!t.getParent()})},r.prototype.getTransformMatrices=function(t){return this.needInitialSkinMatrix&&t._bonesTransformMatrices?t._bonesTransformMatrices:(this._transformMatrices||this.prepare(),this._transformMatrices)},r.prototype.getTransformMatrixTexture=function(t){return this.needInitialSkinMatrix&&t._transformMatrixTexture?t._transformMatrixTexture:this._transformMatrixTexture},r.prototype.getScene=function(){return this._scene},r.prototype.toString=function(t){var e="Name: "+this.name+", nBones: "+this.bones.length;if(e+=", nAnimationRanges: "+(this._ranges?Object.keys(this._ranges).length:"none"),t){e+=", Ranges: {";var n=!0;for(var i in this._ranges)n&&(e+=", ",n=!1),e+=i;e+="}"}return e},r.prototype.getBoneIndexByName=function(t){for(var e=0,n=this.bones.length;e-1&&this._meshesWithPoseMatrix.splice(e,1)},r.prototype._computeTransformMatrices=function(t,e){this.onBeforeComputeObservable.notifyObservers(this);for(var n=0;n0)for(var t=0,e=this.bones;t0&&(s.animation=o.animations[0].serialize()),n.ranges=[],this._ranges){var p=this._ranges[d];if(p){var b={};b.name=d,b.from=p.from,b.to=p.to,n.ranges.push(b)}}}return n},r.Parse=function(t,e){var n,i=new r(t.name,t.id,e);for(t.dimensionsAtRest&&(i.dimensionsAtRest=u.e.FromArray(t.dimensionsAtRest)),i.needInitialSkinMatrix=t.needInitialSkinMatrix,t.overrideMeshId&&(i._hasWaitingData=!0,i._waitingOverrideMeshId=t.overrideMeshId),n=0;n-1&&(s=i.bones[o.parentBoneIndex]);var d=o.rest?u.a.FromArray(o.rest):null,p=new Be(o.name,i,s,u.a.FromArray(o.matrix),d,null,a);o.id!==void 0&&o.id!==null&&(p.id=o.id),o.length&&(p.length=o.length),o.metadata&&(p.metadata=o.metadata),o.animation&&p.animations.push(k.Parse(o.animation)),o.linkedTransformNodeId!==void 0&&o.linkedTransformNodeId!==null&&(i._hasWaitingData=!0,p._waitingTransformNodeId=o.linkedTransformNodeId)}if(t.ranges)for(n=0;n0&&(t=this._meshesWithPoseMatrix[0].getPoseMatrix()),t},r.prototype.sortBones=function(){for(var t=new Array,e=new Array(this.bones.length),n=0;n=2&&(this._leftStick={x:this.browserGamepad.axes[this._leftStickAxisX],y:this.browserGamepad.axes[this._leftStickAxisY]}),this.browserGamepad.axes.length>=4&&(this._rightStick={x:this.browserGamepad.axes[this._rightStickAxisX],y:this.browserGamepad.axes[this._rightStickAxisY]})}return Object.defineProperty(r.prototype,"isConnected",{get:function(){return this._isConnected},enumerable:!1,configurable:!0}),r.prototype.onleftstickchanged=function(t){this._onleftstickchanged=t},r.prototype.onrightstickchanged=function(t){this._onrightstickchanged=t},Object.defineProperty(r.prototype,"leftStick",{get:function(){return this._leftStick},set:function(t){!this._onleftstickchanged||this._leftStick.x===t.x&&this._leftStick.y===t.y||this._onleftstickchanged(t),this._leftStick=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"rightStick",{get:function(){return this._rightStick},set:function(t){!this._onrightstickchanged||this._rightStick.x===t.x&&this._rightStick.y===t.y||this._onrightstickchanged(t),this._rightStick=t},enumerable:!1,configurable:!0}),r.prototype.update=function(){this._leftStick&&(this.leftStick={x:this.browserGamepad.axes[this._leftStickAxisX],y:this.browserGamepad.axes[this._leftStickAxisY]},this._invertLeftStickY&&(this.leftStick.y*=-1)),this._rightStick&&(this.rightStick={x:this.browserGamepad.axes[this._rightStickAxisX],y:this.browserGamepad.axes[this._rightStickAxisY]})},r.prototype.dispose=function(){},r.GAMEPAD=0,r.GENERIC=1,r.XBOX=2,r.POSE_ENABLED=3,r.DUALSHOCK=4,r}(),El=function(r){function t(e,n,i){var o=r.call(this,e,n,i)||this;return o.onButtonDownObservable=new R.c,o.onButtonUpObservable=new R.c,o.type=hn.GENERIC,o._buttons=new Array(i.buttons.length),o}return Object(c.d)(t,r),t.prototype.onbuttondown=function(e){this._onbuttondown=e},t.prototype.onbuttonup=function(e){this._onbuttonup=e},t.prototype._setButtonValue=function(e,n,i){return e!==n&&(e===1&&(this._onbuttondown&&this._onbuttondown(i),this.onButtonDownObservable.notifyObservers(i)),e===0&&(this._onbuttonup&&this._onbuttonup(i),this.onButtonUpObservable.notifyObservers(i))),e},t.prototype.update=function(){r.prototype.update.call(this);for(var e=0;e.005&&(t.inertialAlphaOffset+=n)}if(e.y!=0){var i=e.y/this.gamepadRotationSensibility*this._yAxisScale;i!=0&&Math.abs(i)>.005&&(t.inertialBetaOffset+=i)}}var o=this.gamepad.leftStick;if(o&&o.y!=0){var a=o.y/this.gamepadMoveSensibility;a!=0&&Math.abs(a)>.005&&(this.camera.inertialRadiusOffset-=a)}}},r.prototype.getClassName=function(){return"ArcRotateCameraGamepadInput"},r.prototype.getSimpleName=function(){return"gamepad"},Object(c.c)([Object(L.c)()],r.prototype,"gamepadRotationSensibility",void 0),Object(c.c)([Object(L.c)()],r.prototype,"gamepadMoveSensibility",void 0),r}();un.ArcRotateCameraGamepadInput=ja;var qi=f(66),Ha=function(){function r(){this.keysUp=[38],this.keysDown=[40],this.keysLeft=[37],this.keysRight=[39],this.keysReset=[220],this.panningSensibility=50,this.zoomingSensibility=25,this.useAltToZoom=!0,this.angularSpeed=.01,this._keys=new Array}return r.prototype.attachControl=function(t){var e=this;t=Xe.b.BackCompatCameraNoPreventDefault(arguments),this._onCanvasBlurObserver||(this._scene=this.camera.getScene(),this._engine=this._scene.getEngine(),this._onCanvasBlurObserver=this._engine.onCanvasBlurObservable.add(function(){e._keys=[]}),this._onKeyboardObserver=this._scene.onKeyboardObservable.add(function(n){var i,o=n.event;o.metaKey||(n.type===qi.a.KEYDOWN?(e._ctrlPressed=o.ctrlKey,e._altPressed=o.altKey,(e.keysUp.indexOf(o.keyCode)!==-1||e.keysDown.indexOf(o.keyCode)!==-1||e.keysLeft.indexOf(o.keyCode)!==-1||e.keysRight.indexOf(o.keyCode)!==-1||e.keysReset.indexOf(o.keyCode)!==-1)&&((i=e._keys.indexOf(o.keyCode))===-1&&e._keys.push(o.keyCode),o.preventDefault&&(t||o.preventDefault()))):e.keysUp.indexOf(o.keyCode)===-1&&e.keysDown.indexOf(o.keyCode)===-1&&e.keysLeft.indexOf(o.keyCode)===-1&&e.keysRight.indexOf(o.keyCode)===-1&&e.keysReset.indexOf(o.keyCode)===-1||((i=e._keys.indexOf(o.keyCode))>=0&&e._keys.splice(i,1),o.preventDefault&&(t||o.preventDefault())))}))},r.prototype.detachControl=function(t){this._scene&&(this._onKeyboardObserver&&this._scene.onKeyboardObservable.remove(this._onKeyboardObserver),this._onCanvasBlurObserver&&this._engine.onCanvasBlurObservable.remove(this._onCanvasBlurObserver),this._onKeyboardObserver=null,this._onCanvasBlurObserver=null),this._keys=[]},r.prototype.checkInputs=function(){if(this._onKeyboardObserver)for(var t=this.camera,e=0;e0?n/(1+this.wheelDeltaPercentage):n*(1+this.wheelDeltaPercentage)},r.prototype.attachControl=function(t){var e=this;t=Xe.b.BackCompatCameraNoPreventDefault(arguments),this._wheel=function(n,i){if(n.type===Tt.a.POINTERWHEEL){var o=n.event,a=0,s=o,d=0;if(d=s.wheelDelta?s.wheelDelta:60*-(o.deltaY||o.detail),e.wheelDeltaPercentage){if((a=e.computeDeltaFromMouseWheelLegacyEvent(d,e.camera.radius))>0){for(var p=e.camera.radius,b=e.camera.inertialRadiusOffset+a,x=0;x<20&&Math.abs(b)>.001;x++)p-=b,b*=e.camera.inertia;p=$.a.Clamp(p,0,Number.MAX_VALUE),a=e.computeDeltaFromMouseWheelLegacyEvent(d,p)}}else a=d/(40*e.wheelPrecision);a&&(e.camera.inertialRadiusOffset+=a),o.preventDefault&&(t||o.preventDefault())}},this._observer=this.camera.getScene().onPointerObservable.add(this._wheel,Tt.a.POINTERWHEEL)},r.prototype.detachControl=function(t){this._observer&&(this.camera.getScene().onPointerObservable.remove(this._observer),this._observer=null,this._wheel=null)},r.prototype.getClassName=function(){return"ArcRotateCameraMouseWheelInput"},r.prototype.getSimpleName=function(){return"mousewheel"},Object(c.c)([Object(L.c)()],r.prototype,"wheelPrecision",void 0),Object(c.c)([Object(L.c)()],r.prototype,"wheelDeltaPercentage",void 0),r}();un.ArcRotateCameraMouseWheelInput=Wa;var Sl=function(){function r(){this.buttons=[0,1,2]}return r.prototype.attachControl=function(t){var e=this;t=Xe.b.BackCompatCameraNoPreventDefault(arguments);var n=this.camera.getEngine(),i=n.getInputElement(),o=0,a=null;this.pointA=null,this.pointB=null,this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._buttonsPressed=0,this._pointerInput=function(d,p){var b=d.event,x=b.pointerType==="touch";if(!n.isInVRExclusivePointerMode&&(d.type===Tt.a.POINTERMOVE||e.buttons.indexOf(b.button)!==-1)){var O=b.srcElement||b.target;if(e._altKey=b.altKey,e._ctrlKey=b.ctrlKey,e._metaKey=b.metaKey,e._shiftKey=b.shiftKey,e._buttonsPressed=b.buttons,n.isPointerLock){var B=b.movementX||b.mozMovementX||b.webkitMovementX||b.msMovementX||0,F=b.movementY||b.mozMovementY||b.webkitMovementY||b.msMovementY||0;e.onTouch(null,B,F),e.pointA=null,e.pointB=null}else if(d.type===Tt.a.POINTERDOWN&&O){try{O.setPointerCapture(b.pointerId)}catch{}e.pointA===null?e.pointA={x:b.clientX,y:b.clientY,pointerId:b.pointerId,type:b.pointerType}:e.pointB===null&&(e.pointB={x:b.clientX,y:b.clientY,pointerId:b.pointerId,type:b.pointerType}),e.onButtonDown(b),t||(b.preventDefault(),i&&i.focus())}else if(d.type===Tt.a.POINTERDOUBLETAP)e.onDoubleTap(b.pointerType);else if(d.type===Tt.a.POINTERUP&&O){try{O.releasePointerCapture(b.pointerId)}catch{}x||(e.pointB=null),n._badOS?e.pointA=e.pointB=null:e.pointB&&e.pointA&&e.pointA.pointerId==b.pointerId?(e.pointA=e.pointB,e.pointB=null):e.pointA&&e.pointB&&e.pointB.pointerId==b.pointerId?e.pointB=null:e.pointA=e.pointB=null,(o!==0||a)&&(e.onMultiTouch(e.pointA,e.pointB,o,0,a,null),o=0,a=null),e.onButtonUp(b),t||b.preventDefault()}else if(d.type===Tt.a.POINTERMOVE){if(t||b.preventDefault(),e.pointA&&e.pointB===null)B=b.clientX-e.pointA.x,F=b.clientY-e.pointA.y,e.onTouch(e.pointA,B,F),e.pointA.x=b.clientX,e.pointA.y=b.clientY;else if(e.pointA&&e.pointB){var z=e.pointA.pointerId===b.pointerId?e.pointA:e.pointB;z.x=b.clientX,z.y=b.clientY;var J=e.pointA.x-e.pointB.x,ie=e.pointA.y-e.pointB.y,se=J*J+ie*ie,ce={x:(e.pointA.x+e.pointB.x)/2,y:(e.pointA.y+e.pointB.y)/2,pointerId:b.pointerId,type:d.type};e.onMultiTouch(e.pointA,e.pointB,o,se,a,ce),a=ce,o=se}}}},this._observer=this.camera.getScene().onPointerObservable.add(this._pointerInput,Tt.a.POINTERDOWN|Tt.a.POINTERUP|Tt.a.POINTERMOVE),this._onLostFocus=function(){e.pointA=e.pointB=null,o=0,a=null,e.onLostFocus()},i&&i.addEventListener("contextmenu",this.onContextMenu.bind(this),!1);var s=this.camera.getScene().getEngine().getHostWindow();s&&Xe.b.RegisterTopRootEvents(s,[{name:"blur",handler:this._onLostFocus}])},r.prototype.detachControl=function(t){if(this._onLostFocus){var e=this.camera.getScene().getEngine().getHostWindow();e&&Xe.b.UnregisterTopRootEvents(e,[{name:"blur",handler:this._onLostFocus}])}if(this._observer){if(this.camera.getScene().onPointerObservable.remove(this._observer),this._observer=null,this.onContextMenu){var n=this.camera.getScene().getEngine().getInputElement();n&&n.removeEventListener("contextmenu",this.onContextMenu)}this._onLostFocus=null}this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._buttonsPressed=0},r.prototype.getClassName=function(){return"BaseCameraPointersInput"},r.prototype.getSimpleName=function(){return"pointers"},r.prototype.onDoubleTap=function(t){},r.prototype.onTouch=function(t,e,n){},r.prototype.onMultiTouch=function(t,e,n,i,o,a){},r.prototype.onContextMenu=function(t){t.preventDefault()},r.prototype.onButtonDown=function(t){},r.prototype.onButtonUp=function(t){},r.prototype.onLostFocus=function(){},Object(c.c)([Object(L.c)()],r.prototype,"buttons",void 0),r}(),Xa=function(r){function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.buttons=[0,1,2],e.angularSensibilityX=1e3,e.angularSensibilityY=1e3,e.pinchPrecision=12,e.pinchDeltaPercentage=0,e.useNaturalPinchZoom=!1,e.panningSensibility=1e3,e.multiTouchPanning=!0,e.multiTouchPanAndZoom=!0,e.pinchInwards=!0,e._isPanClick=!1,e._twoFingerActivityCount=0,e._isPinching=!1,e}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"ArcRotateCameraPointersInput"},t.prototype.onTouch=function(e,n,i){this.panningSensibility!==0&&(this._ctrlKey&&this.camera._useCtrlForPanning||this._isPanClick)?(this.camera.inertialPanningX+=-n/this.panningSensibility,this.camera.inertialPanningY+=i/this.panningSensibility):(this.camera.inertialAlphaOffset-=n/this.angularSensibilityX,this.camera.inertialBetaOffset-=i/this.angularSensibilityY)},t.prototype.onDoubleTap=function(e){this.camera.useInputToRestoreState&&this.camera.restoreState()},t.prototype.onMultiTouch=function(e,n,i,o,a,s){if(!(i===0&&a===null||o===0&&s===null)){var d=this.pinchInwards?1:-1;if(this.multiTouchPanAndZoom){if(this.useNaturalPinchZoom?this.camera.radius=this.camera.radius*Math.sqrt(i)/Math.sqrt(o):this.pinchDeltaPercentage?this.camera.inertialRadiusOffset+=.001*(o-i)*this.camera.radius*this.pinchDeltaPercentage:this.camera.inertialRadiusOffset+=(o-i)/(this.pinchPrecision*d*(this.angularSensibilityX+this.angularSensibilityY)/2),this.panningSensibility!==0&&a&&s){var p=s.x-a.x,b=s.y-a.y;this.camera.inertialPanningX+=-p/this.panningSensibility,this.camera.inertialPanningY+=b/this.panningSensibility}}else{this._twoFingerActivityCount++;var x=Math.sqrt(i),O=Math.sqrt(o);this._isPinching||this._twoFingerActivityCount<20&&Math.abs(O-x)>this.camera.pinchToPanMaxDistance?(this.pinchDeltaPercentage?this.camera.inertialRadiusOffset+=.001*(o-i)*this.camera.radius*this.pinchDeltaPercentage:this.camera.inertialRadiusOffset+=(o-i)/(this.pinchPrecision*d*(this.angularSensibilityX+this.angularSensibilityY)/2),this._isPinching=!0):this.panningSensibility!==0&&this.multiTouchPanning&&s&&a&&(p=s.x-a.x,b=s.y-a.y,this.camera.inertialPanningX+=-p/this.panningSensibility,this.camera.inertialPanningY+=b/this.panningSensibility)}}},t.prototype.onButtonDown=function(e){this._isPanClick=e.button===this.camera._panningMouseButton},t.prototype.onButtonUp=function(e){this._twoFingerActivityCount=0,this._isPinching=!1},t.prototype.onLostFocus=function(){this._isPanClick=!1,this._twoFingerActivityCount=0,this._isPinching=!1},Object(c.c)([Object(L.c)()],t.prototype,"buttons",void 0),Object(c.c)([Object(L.c)()],t.prototype,"angularSensibilityX",void 0),Object(c.c)([Object(L.c)()],t.prototype,"angularSensibilityY",void 0),Object(c.c)([Object(L.c)()],t.prototype,"pinchPrecision",void 0),Object(c.c)([Object(L.c)()],t.prototype,"pinchDeltaPercentage",void 0),Object(c.c)([Object(L.c)()],t.prototype,"useNaturalPinchZoom",void 0),Object(c.c)([Object(L.c)()],t.prototype,"panningSensibility",void 0),Object(c.c)([Object(L.c)()],t.prototype,"multiTouchPanning",void 0),Object(c.c)([Object(L.c)()],t.prototype,"multiTouchPanAndZoom",void 0),t}(Sl);un.ArcRotateCameraPointersInput=Xa;var Fo=function(r){function t(e){return r.call(this,e)||this}return Object(c.d)(t,r),t.prototype.addMouseWheel=function(){return this.add(new Wa),this},t.prototype.addPointers=function(){return this.add(new Xa),this},t.prototype.addKeyboard=function(){return this.add(new Ha),this},t}(Zr);Fo.prototype.addVRDeviceOrientation=function(){return this.add(new Ya),this};var Ya=function(){function r(){this.alphaCorrection=1,this.gammaCorrection=1,this._alpha=0,this._gamma=0,this._dirty=!1,this._deviceOrientationHandler=this._onOrientationEvent.bind(this)}return r.prototype.attachControl=function(t){var e=this;t=Xe.b.BackCompatCameraNoPreventDefault(arguments),this.camera.attachControl(t);var n=this.camera.getScene().getEngine().getHostWindow();n&&(typeof DeviceOrientationEvent<"u"&&typeof DeviceOrientationEvent.requestPermission=="function"?DeviceOrientationEvent.requestPermission().then(function(i){i==="granted"?n.addEventListener("deviceorientation",e._deviceOrientationHandler):Xe.b.Warn("Permission not granted.")}).catch(function(i){Xe.b.Error(i)}):n.addEventListener("deviceorientation",this._deviceOrientationHandler))},r.prototype._onOrientationEvent=function(t){t.alpha!==null&&(this._alpha=(0|+t.alpha)*this.alphaCorrection),t.gamma!==null&&(this._gamma=(0|+t.gamma)*this.gammaCorrection),this._dirty=!0},r.prototype.checkInputs=function(){this._dirty&&(this._dirty=!1,this._gamma<0&&(this._gamma=180+this._gamma),this.camera.alpha=-this._alpha/180*Math.PI%Math.PI*2,this.camera.beta=this._gamma/180*Math.PI)},r.prototype.detachControl=function(t){window.removeEventListener("deviceorientation",this._deviceOrientationHandler)},r.prototype.getClassName=function(){return"ArcRotateCameraVRDeviceOrientationInput"},r.prototype.getSimpleName=function(){return"VRDeviceOrientation"},r}();un.ArcRotateCameraVRDeviceOrientationInput=Ya;var Ka=function(){function r(){this.keysForward=[87],this.keysBackward=[83],this.keysUp=[69],this.keysDown=[81],this.keysRight=[68],this.keysLeft=[65],this._keys=new Array}return r.prototype.attachControl=function(t){var e=this;t=Xe.b.BackCompatCameraNoPreventDefault(arguments),this._onCanvasBlurObserver||(this._scene=this.camera.getScene(),this._engine=this._scene.getEngine(),this._onCanvasBlurObserver=this._engine.onCanvasBlurObservable.add(function(){e._keys=[]}),this._onKeyboardObserver=this._scene.onKeyboardObservable.add(function(n){var i,o=n.event;n.type===qi.a.KEYDOWN?e.keysForward.indexOf(o.keyCode)===-1&&e.keysBackward.indexOf(o.keyCode)===-1&&e.keysUp.indexOf(o.keyCode)===-1&&e.keysDown.indexOf(o.keyCode)===-1&&e.keysLeft.indexOf(o.keyCode)===-1&&e.keysRight.indexOf(o.keyCode)===-1||((i=e._keys.indexOf(o.keyCode))===-1&&e._keys.push(o.keyCode),t||o.preventDefault()):e.keysForward.indexOf(o.keyCode)===-1&&e.keysBackward.indexOf(o.keyCode)===-1&&e.keysUp.indexOf(o.keyCode)===-1&&e.keysDown.indexOf(o.keyCode)===-1&&e.keysLeft.indexOf(o.keyCode)===-1&&e.keysRight.indexOf(o.keyCode)===-1||((i=e._keys.indexOf(o.keyCode))>=0&&e._keys.splice(i,1),t||o.preventDefault())}))},r.prototype.detachControl=function(t){this._scene&&(this._onKeyboardObserver&&this._scene.onKeyboardObservable.remove(this._onKeyboardObserver),this._onCanvasBlurObserver&&this._engine.onCanvasBlurObservable.remove(this._onCanvasBlurObserver),this._onKeyboardObserver=null,this._onCanvasBlurObserver=null),this._keys=[]},r.prototype.getClassName=function(){return"FlyCameraKeyboardInput"},r.prototype._onLostFocus=function(t){this._keys=[]},r.prototype.getSimpleName=function(){return"keyboard"},r.prototype.checkInputs=function(){if(this._onKeyboardObserver)for(var t=this.camera,e=0;e=0&&e._keys.splice(i,1),o.preventDefault&&(t||o.preventDefault())))}))},r.prototype.detachControl=function(t){this._scene&&(this._onKeyboardObserver&&this._scene.onKeyboardObservable.remove(this._onKeyboardObserver),this._onCanvasBlurObserver&&this._engine.onCanvasBlurObservable.remove(this._onCanvasBlurObserver),this._onKeyboardObserver=null,this._onCanvasBlurObserver=null),this._keys=[]},r.prototype.checkInputs=function(){var t=this;this._onKeyboardObserver&&this._keys.forEach(function(e){t.keysHeightOffsetIncr.indexOf(e)!==-1&&t._modifierHeightOffset()?t.camera.heightOffset+=t.heightSensibility:t.keysHeightOffsetDecr.indexOf(e)!==-1&&t._modifierHeightOffset()?t.camera.heightOffset-=t.heightSensibility:t.keysRotationOffsetIncr.indexOf(e)!==-1&&t._modifierRotationOffset()?(t.camera.rotationOffset+=t.rotationSensibility,t.camera.rotationOffset%=360):t.keysRotationOffsetDecr.indexOf(e)!==-1&&t._modifierRotationOffset()?(t.camera.rotationOffset-=t.rotationSensibility,t.camera.rotationOffset%=360):t.keysRadiusIncr.indexOf(e)!==-1&&t._modifierRadius()?t.camera.radius+=t.radiusSensibility:t.keysRadiusDecr.indexOf(e)!==-1&&t._modifierRadius()&&(t.camera.radius-=t.radiusSensibility)})},r.prototype.getClassName=function(){return"FollowCameraKeyboardMoveInput"},r.prototype.getSimpleName=function(){return"keyboard"},r.prototype._modifierHeightOffset=function(){return this.keysHeightOffsetModifierAlt===this._altPressed&&this.keysHeightOffsetModifierCtrl===this._ctrlPressed&&this.keysHeightOffsetModifierShift===this._shiftPressed},r.prototype._modifierRotationOffset=function(){return this.keysRotationOffsetModifierAlt===this._altPressed&&this.keysRotationOffsetModifierCtrl===this._ctrlPressed&&this.keysRotationOffsetModifierShift===this._shiftPressed},r.prototype._modifierRadius=function(){return this.keysRadiusModifierAlt===this._altPressed&&this.keysRadiusModifierCtrl===this._ctrlPressed&&this.keysRadiusModifierShift===this._shiftPressed},Object(c.c)([Object(L.c)()],r.prototype,"keysHeightOffsetIncr",void 0),Object(c.c)([Object(L.c)()],r.prototype,"keysHeightOffsetDecr",void 0),Object(c.c)([Object(L.c)()],r.prototype,"keysHeightOffsetModifierAlt",void 0),Object(c.c)([Object(L.c)()],r.prototype,"keysHeightOffsetModifierCtrl",void 0),Object(c.c)([Object(L.c)()],r.prototype,"keysHeightOffsetModifierShift",void 0),Object(c.c)([Object(L.c)()],r.prototype,"keysRotationOffsetIncr",void 0),Object(c.c)([Object(L.c)()],r.prototype,"keysRotationOffsetDecr",void 0),Object(c.c)([Object(L.c)()],r.prototype,"keysRotationOffsetModifierAlt",void 0),Object(c.c)([Object(L.c)()],r.prototype,"keysRotationOffsetModifierCtrl",void 0),Object(c.c)([Object(L.c)()],r.prototype,"keysRotationOffsetModifierShift",void 0),Object(c.c)([Object(L.c)()],r.prototype,"keysRadiusIncr",void 0),Object(c.c)([Object(L.c)()],r.prototype,"keysRadiusDecr",void 0),Object(c.c)([Object(L.c)()],r.prototype,"keysRadiusModifierAlt",void 0),Object(c.c)([Object(L.c)()],r.prototype,"keysRadiusModifierCtrl",void 0),Object(c.c)([Object(L.c)()],r.prototype,"keysRadiusModifierShift",void 0),Object(c.c)([Object(L.c)()],r.prototype,"heightSensibility",void 0),Object(c.c)([Object(L.c)()],r.prototype,"rotationSensibility",void 0),Object(c.c)([Object(L.c)()],r.prototype,"radiusSensibility",void 0),r}();un.FollowCameraKeyboardMoveInput=qa;var Za=function(){function r(){this.axisControlRadius=!0,this.axisControlHeight=!1,this.axisControlRotation=!1,this.wheelPrecision=3,this.wheelDeltaPercentage=0}return r.prototype.attachControl=function(t){var e=this;t=Xe.b.BackCompatCameraNoPreventDefault(arguments),this._wheel=function(n,i){if(n.type===Tt.a.POINTERWHEEL){var o=n.event,a=0,s=Math.max(-1,Math.min(1,o.deltaY||o.wheelDelta||-o.detail));e.wheelDeltaPercentage?(console.assert(e.axisControlRadius+e.axisControlHeight+e.axisControlRotation<=1,"wheelDeltaPercentage only usable when mouse wheel controlls ONE axis. Currently enabled: axisControlRadius: "+e.axisControlRadius+", axisControlHeightOffset: "+e.axisControlHeight+", axisControlRotationOffset: "+e.axisControlRotation),e.axisControlRadius?a=.01*s*e.wheelDeltaPercentage*e.camera.radius:e.axisControlHeight?a=.01*s*e.wheelDeltaPercentage*e.camera.heightOffset:e.axisControlRotation&&(a=.01*s*e.wheelDeltaPercentage*e.camera.rotationOffset)):a=s*e.wheelPrecision,a&&(e.axisControlRadius?e.camera.radius+=a:e.axisControlHeight?e.camera.heightOffset-=a:e.axisControlRotation&&(e.camera.rotationOffset-=a)),o.preventDefault&&(t||o.preventDefault())}},this._observer=this.camera.getScene().onPointerObservable.add(this._wheel,Tt.a.POINTERWHEEL)},r.prototype.detachControl=function(t){this._observer&&(this.camera.getScene().onPointerObservable.remove(this._observer),this._observer=null,this._wheel=null)},r.prototype.getClassName=function(){return"ArcRotateCameraMouseWheelInput"},r.prototype.getSimpleName=function(){return"mousewheel"},Object(c.c)([Object(L.c)()],r.prototype,"axisControlRadius",void 0),Object(c.c)([Object(L.c)()],r.prototype,"axisControlHeight",void 0),Object(c.c)([Object(L.c)()],r.prototype,"axisControlRotation",void 0),Object(c.c)([Object(L.c)()],r.prototype,"wheelPrecision",void 0),Object(c.c)([Object(L.c)()],r.prototype,"wheelDeltaPercentage",void 0),r}();un.FollowCameraMouseWheelInput=Za;var Ja=function(r){function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.angularSensibilityX=1,e.angularSensibilityY=1,e.pinchPrecision=1e4,e.pinchDeltaPercentage=0,e.axisXControlRadius=!1,e.axisXControlHeight=!1,e.axisXControlRotation=!0,e.axisYControlRadius=!1,e.axisYControlHeight=!0,e.axisYControlRotation=!1,e.axisPinchControlRadius=!0,e.axisPinchControlHeight=!1,e.axisPinchControlRotation=!1,e.warningEnable=!0,e._warningCounter=0,e}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"FollowCameraPointersInput"},t.prototype.onTouch=function(e,n,i){this._warning(),this.axisXControlRotation?this.camera.rotationOffset+=n/this.angularSensibilityX:this.axisYControlRotation&&(this.camera.rotationOffset+=i/this.angularSensibilityX),this.axisXControlHeight?this.camera.heightOffset+=n/this.angularSensibilityY:this.axisYControlHeight&&(this.camera.heightOffset+=i/this.angularSensibilityY),this.axisXControlRadius?this.camera.radius-=n/this.angularSensibilityY:this.axisYControlRadius&&(this.camera.radius-=i/this.angularSensibilityY)},t.prototype.onMultiTouch=function(e,n,i,o,a,s){if(!(i===0&&a===null||o===0&&s===null)){var d=(o-i)/(this.pinchPrecision*(this.angularSensibilityX+this.angularSensibilityY)/2);this.pinchDeltaPercentage?(d*=.01*this.pinchDeltaPercentage,this.axisPinchControlRotation&&(this.camera.rotationOffset+=d*this.camera.rotationOffset),this.axisPinchControlHeight&&(this.camera.heightOffset+=d*this.camera.heightOffset),this.axisPinchControlRadius&&(this.camera.radius-=d*this.camera.radius)):(this.axisPinchControlRotation&&(this.camera.rotationOffset+=d),this.axisPinchControlHeight&&(this.camera.heightOffset+=d),this.axisPinchControlRadius&&(this.camera.radius-=d))}},t.prototype._warning=function(){if(this.warningEnable&&this._warningCounter++%100==0){var e="It probably only makes sense to control ONE camera property with each pointer axis. Set 'warningEnable = false' if you are sure. Currently enabled: ";console.assert(this.axisXControlRotation+this.axisXControlHeight+this.axisXControlRadius<=1,e+"axisXControlRotation: "+this.axisXControlRotation+", axisXControlHeight: "+this.axisXControlHeight+", axisXControlRadius: "+this.axisXControlRadius),console.assert(this.axisYControlRotation+this.axisYControlHeight+this.axisYControlRadius<=1,e+"axisYControlRotation: "+this.axisYControlRotation+", axisYControlHeight: "+this.axisYControlHeight+", axisYControlRadius: "+this.axisYControlRadius),console.assert(this.axisPinchControlRotation+this.axisPinchControlHeight+this.axisPinchControlRadius<=1,e+"axisPinchControlRotation: "+this.axisPinchControlRotation+", axisPinchControlHeight: "+this.axisPinchControlHeight+", axisPinchControlRadius: "+this.axisPinchControlRadius)}},Object(c.c)([Object(L.c)()],t.prototype,"angularSensibilityX",void 0),Object(c.c)([Object(L.c)()],t.prototype,"angularSensibilityY",void 0),Object(c.c)([Object(L.c)()],t.prototype,"pinchPrecision",void 0),Object(c.c)([Object(L.c)()],t.prototype,"pinchDeltaPercentage",void 0),Object(c.c)([Object(L.c)()],t.prototype,"axisXControlRadius",void 0),Object(c.c)([Object(L.c)()],t.prototype,"axisXControlHeight",void 0),Object(c.c)([Object(L.c)()],t.prototype,"axisXControlRotation",void 0),Object(c.c)([Object(L.c)()],t.prototype,"axisYControlRadius",void 0),Object(c.c)([Object(L.c)()],t.prototype,"axisYControlHeight",void 0),Object(c.c)([Object(L.c)()],t.prototype,"axisYControlRotation",void 0),Object(c.c)([Object(L.c)()],t.prototype,"axisPinchControlRadius",void 0),Object(c.c)([Object(L.c)()],t.prototype,"axisPinchControlHeight",void 0),Object(c.c)([Object(L.c)()],t.prototype,"axisPinchControlRotation",void 0),t}(Sl);un.FollowCameraPointersInput=Ja;var $a=function(){function r(){this.keysUp=[38],this.keysUpward=[33],this.keysDown=[40],this.keysDownward=[34],this.keysLeft=[37],this.keysRight=[39],this._keys=new Array}return r.prototype.attachControl=function(t){var e=this;t=Xe.b.BackCompatCameraNoPreventDefault(arguments),this._onCanvasBlurObserver||(this._scene=this.camera.getScene(),this._engine=this._scene.getEngine(),this._onCanvasBlurObserver=this._engine.onCanvasBlurObservable.add(function(){e._keys=[]}),this._onKeyboardObserver=this._scene.onKeyboardObservable.add(function(n){var i,o=n.event;o.metaKey||(n.type===qi.a.KEYDOWN?e.keysUp.indexOf(o.keyCode)===-1&&e.keysDown.indexOf(o.keyCode)===-1&&e.keysLeft.indexOf(o.keyCode)===-1&&e.keysRight.indexOf(o.keyCode)===-1&&e.keysUpward.indexOf(o.keyCode)===-1&&e.keysDownward.indexOf(o.keyCode)===-1||((i=e._keys.indexOf(o.keyCode))===-1&&e._keys.push(o.keyCode),t||o.preventDefault()):e.keysUp.indexOf(o.keyCode)===-1&&e.keysDown.indexOf(o.keyCode)===-1&&e.keysLeft.indexOf(o.keyCode)===-1&&e.keysRight.indexOf(o.keyCode)===-1&&e.keysUpward.indexOf(o.keyCode)===-1&&e.keysDownward.indexOf(o.keyCode)===-1||((i=e._keys.indexOf(o.keyCode))>=0&&e._keys.splice(i,1),t||o.preventDefault()))}))},r.prototype.detachControl=function(t){this._scene&&(this._onKeyboardObserver&&this._scene.onKeyboardObservable.remove(this._onKeyboardObserver),this._onCanvasBlurObserver&&this._engine.onCanvasBlurObservable.remove(this._onCanvasBlurObserver),this._onKeyboardObserver=null,this._onCanvasBlurObserver=null),this._keys=[]},r.prototype.checkInputs=function(){if(this._onKeyboardObserver)for(var t=this.camera,e=0;e1)t.cameraRotation.x=-this._offsetY/this.touchAngularSensibility;else{var e=t._computeLocalCameraSpeed(),n=new u.e(0,0,e*this._offsetY/this.touchMoveSensibility);u.a.RotationYawPitchRollToRef(t.rotation.y,t.rotation.x,0,t._cameraRotationMatrix),t.cameraDirection.addInPlace(u.e.TransformCoordinates(n,t._cameraRotationMatrix))}}},r.prototype.getClassName=function(){return"FreeCameraTouchInput"},r.prototype.getSimpleName=function(){return"touch"},Object(c.c)([Object(L.c)()],r.prototype,"touchAngularSensibility",void 0),Object(c.c)([Object(L.c)()],r.prototype,"touchMoveSensibility",void 0),r}();un.FreeCameraTouchInput=ns;var Jr=function(r){function t(e){var n=r.call(this,e)||this;return n._mouseInput=null,n._mouseWheelInput=null,n}return Object(c.d)(t,r),t.prototype.addKeyboard=function(){return this.add(new $a),this},t.prototype.addMouse=function(e){return e===void 0&&(e=!0),this._mouseInput||(this._mouseInput=new es(e),this.add(this._mouseInput)),this},t.prototype.removeMouse=function(){return this._mouseInput&&this.remove(this._mouseInput),this},t.prototype.addMouseWheel=function(){return this._mouseWheelInput||(this._mouseWheelInput=new ts,this.add(this._mouseWheelInput)),this},t.prototype.removeMouseWheel=function(){return this._mouseWheelInput&&this.remove(this._mouseWheelInput),this},t.prototype.addTouch=function(){return this.add(new ns),this},t.prototype.clear=function(){r.prototype.clear.call(this),this._mouseInput=null},t}(Zr);Jr.prototype.addDeviceOrientation=function(){return this._deviceOrientationInput||(this._deviceOrientationInput=new is,this.add(this._deviceOrientationInput)),this};var is=function(){function r(){var t=this;this._screenOrientationAngle=0,this._screenQuaternion=new u.b,this._alpha=0,this._beta=0,this._gamma=0,this._onDeviceOrientationChangedObservable=new R.c,this._orientationChanged=function(){t._screenOrientationAngle=window.orientation!==void 0?+window.orientation:window.screen.orientation&&window.screen.orientation.angle?window.screen.orientation.angle:0,t._screenOrientationAngle=-Xe.b.ToRadians(t._screenOrientationAngle/2),t._screenQuaternion.copyFromFloats(0,Math.sin(t._screenOrientationAngle),0,Math.cos(t._screenOrientationAngle))},this._deviceOrientation=function(e){t._alpha=e.alpha!==null?e.alpha:0,t._beta=e.beta!==null?e.beta:0,t._gamma=e.gamma!==null?e.gamma:0,e.alpha!==null&&t._onDeviceOrientationChangedObservable.notifyObservers()},this._constantTranform=new u.b(-Math.sqrt(.5),0,0,Math.sqrt(.5)),this._orientationChanged()}return r.WaitForOrientationChangeAsync=function(t){return new Promise(function(e,n){var i=!1,o=function(){window.removeEventListener("deviceorientation",o),i=!0,e()};t&&setTimeout(function(){i||(window.removeEventListener("deviceorientation",o),n("WaitForOrientationChangeAsync timed out"))},t),typeof DeviceOrientationEvent<"u"&&typeof DeviceOrientationEvent.requestPermission=="function"?DeviceOrientationEvent.requestPermission().then(function(a){a=="granted"?window.addEventListener("deviceorientation",o):Xe.b.Warn("Permission not granted.")}).catch(function(a){Xe.b.Error(a)}):window.addEventListener("deviceorientation",o)})},Object.defineProperty(r.prototype,"camera",{get:function(){return this._camera},set:function(t){var e=this;this._camera=t,this._camera==null||this._camera.rotationQuaternion||(this._camera.rotationQuaternion=new u.b),this._camera&&this._camera.onDisposeObservable.add(function(){e._onDeviceOrientationChangedObservable.clear()})},enumerable:!1,configurable:!0}),r.prototype.attachControl=function(){var t=this,e=this.camera.getScene().getEngine().getHostWindow();if(e){var n=function(){e.addEventListener("orientationchange",t._orientationChanged),e.addEventListener("deviceorientation",t._deviceOrientation),t._orientationChanged()};typeof DeviceOrientationEvent<"u"&&typeof DeviceOrientationEvent.requestPermission=="function"?DeviceOrientationEvent.requestPermission().then(function(i){i==="granted"?n():Xe.b.Warn("Permission not granted.")}).catch(function(i){Xe.b.Error(i)}):n()}},r.prototype.detachControl=function(t){window.removeEventListener("orientationchange",this._orientationChanged),window.removeEventListener("deviceorientation",this._deviceOrientation),this._alpha=0},r.prototype.checkInputs=function(){this._alpha&&(u.b.RotationYawPitchRollToRef(Xe.b.ToRadians(this._alpha),Xe.b.ToRadians(this._beta),-Xe.b.ToRadians(this._gamma),this.camera.rotationQuaternion),this._camera.rotationQuaternion.multiplyInPlace(this._screenQuaternion),this._camera.rotationQuaternion.multiplyInPlace(this._constantTranform),this._camera.rotationQuaternion.z*=-1,this._camera.rotationQuaternion.w*=-1)},r.prototype.getClassName=function(){return"FreeCameraDeviceOrientationInput"},r.prototype.getSimpleName=function(){return"deviceOrientation"},r}();un.FreeCameraDeviceOrientationInput=is;var rs=function(){function r(){this.gamepadAngularSensibility=200,this.gamepadMoveSensibility=40,this._yAxisScale=1,this._cameraTransform=u.a.Identity(),this._deltaTransform=u.e.Zero(),this._vector3=u.e.Zero(),this._vector2=u.d.Zero()}return Object.defineProperty(r.prototype,"invertYAxis",{get:function(){return this._yAxisScale!==1},set:function(t){this._yAxisScale=t?-1:1},enumerable:!1,configurable:!0}),r.prototype.attachControl=function(){var t=this,e=this.camera.getScene().gamepadManager;this._onGamepadConnectedObserver=e.onGamepadConnectedObservable.add(function(n){n.type!==hn.POSE_ENABLED&&(t.gamepad&&n.type!==hn.XBOX||(t.gamepad=n))}),this._onGamepadDisconnectedObserver=e.onGamepadDisconnectedObservable.add(function(n){t.gamepad===n&&(t.gamepad=null)}),this.gamepad=e.getGamepadByType(hn.XBOX),!this.gamepad&&e.gamepads.length&&(this.gamepad=e.gamepads[0])},r.prototype.detachControl=function(t){this.camera.getScene().gamepadManager.onGamepadConnectedObservable.remove(this._onGamepadConnectedObserver),this.camera.getScene().gamepadManager.onGamepadDisconnectedObservable.remove(this._onGamepadDisconnectedObserver),this.gamepad=null},r.prototype.checkInputs=function(){if(this.gamepad&&this.gamepad.leftStick){var t=this.camera,e=this.gamepad.leftStick,n=e.x/this.gamepadMoveSensibility,i=e.y/this.gamepadMoveSensibility;e.x=Math.abs(n)>.005?0+n:0,e.y=Math.abs(i)>.005?0+i:0;var o=this.gamepad.rightStick;if(o){var a=o.x/this.gamepadAngularSensibility,s=o.y/this.gamepadAngularSensibility*this._yAxisScale;o.x=Math.abs(a)>.001?0+a:0,o.y=Math.abs(s)>.001?0+s:0}else o={x:0,y:0};t.rotationQuaternion?t.rotationQuaternion.toRotationMatrix(this._cameraTransform):u.a.RotationYawPitchRollToRef(t.rotation.y,t.rotation.x,0,this._cameraTransform);var d=50*t._computeLocalCameraSpeed();this._vector3.copyFromFloats(e.x*d,0,-e.y*d),u.e.TransformCoordinatesToRef(this._vector3,this._cameraTransform,this._deltaTransform),t.cameraDirection.addInPlace(this._deltaTransform),this._vector2.copyFromFloats(o.y,o.x),t.cameraRotation.addInPlace(this._vector2)}},r.prototype.getClassName=function(){return"FreeCameraGamepadInput"},r.prototype.getSimpleName=function(){return"gamepad"},Object(c.c)([Object(L.c)()],r.prototype,"gamepadAngularSensibility",void 0),Object(c.c)([Object(L.c)()],r.prototype,"gamepadMoveSensibility",void 0),r}();un.FreeCameraGamepadInput=rs;var an,Al=f(112);(function(r){r[r.X=0]="X",r[r.Y=1]="Y",r[r.Z=2]="Z"})(an||(an={}));var os=function(){function r(t,e){var n=this,i=Object(c.a)(Object(c.a)({},r._GetDefaultOptions()),e);if(this._leftJoystick=!!t,r._globalJoystickIndex++,this._axisTargetedByLeftAndRight=an.X,this._axisTargetedByUpAndDown=an.Y,this.reverseLeftRight=!1,this.reverseUpDown=!1,this._touches=new Al.a,this.deltaPosition=u.e.Zero(),this._joystickSensibility=25,this._inversedSensibility=1/(this._joystickSensibility/1e3),this._onResize=function(a){r.vjCanvasWidth=window.innerWidth,r.vjCanvasHeight=window.innerHeight,r.Canvas&&(r.Canvas.width=r.vjCanvasWidth,r.Canvas.height=r.vjCanvasHeight),r.halfWidth=r.vjCanvasWidth/2},!r.Canvas){window.addEventListener("resize",this._onResize,!1),r.Canvas=document.createElement("canvas"),r.vjCanvasWidth=window.innerWidth,r.vjCanvasHeight=window.innerHeight,r.Canvas.width=window.innerWidth,r.Canvas.height=window.innerHeight,r.Canvas.style.width="100%",r.Canvas.style.height="100%",r.Canvas.style.position="absolute",r.Canvas.style.backgroundColor="transparent",r.Canvas.style.top="0px",r.Canvas.style.left="0px",r.Canvas.style.zIndex="5",r.Canvas.style.msTouchAction="none",r.Canvas.style.touchAction="none",r.Canvas.setAttribute("touch-action","none");var o=r.Canvas.getContext("2d");if(!o)throw new Error("Unable to create canvas for virtual joystick");r.vjCanvasContext=o,r.vjCanvasContext.strokeStyle="#ffffff",r.vjCanvasContext.lineWidth=2,document.body.appendChild(r.Canvas)}r.halfWidth=r.Canvas.width/2,this.pressed=!1,this.limitToContainer=i.limitToContainer,this._joystickColor=i.color,this.containerSize=i.containerSize,this.puckSize=i.puckSize,i.position&&this.setPosition(i.position.x,i.position.y),i.puckImage&&this.setPuckImage(i.puckImage),i.containerImage&&this.setContainerImage(i.containerImage),i.alwaysVisible&&r._alwaysVisibleSticks++,this.alwaysVisible=i.alwaysVisible,this._joystickPointerID=-1,this._joystickPointerPos=new u.d(0,0),this._joystickPreviousPointerPos=new u.d(0,0),this._joystickPointerStartPos=new u.d(0,0),this._deltaJoystickVector=new u.d(0,0),this._onPointerDownHandlerRef=function(a){n._onPointerDown(a)},this._onPointerMoveHandlerRef=function(a){n._onPointerMove(a)},this._onPointerUpHandlerRef=function(a){n._onPointerUp(a)},r.Canvas.addEventListener("pointerdown",this._onPointerDownHandlerRef,!1),r.Canvas.addEventListener("pointermove",this._onPointerMoveHandlerRef,!1),r.Canvas.addEventListener("pointerup",this._onPointerUpHandlerRef,!1),r.Canvas.addEventListener("pointerout",this._onPointerUpHandlerRef,!1),r.Canvas.addEventListener("contextmenu",function(a){a.preventDefault()},!1),requestAnimationFrame(function(){n._drawVirtualJoystick()})}return r._GetDefaultOptions=function(){return{puckSize:40,containerSize:60,color:"cyan",puckImage:void 0,containerImage:void 0,position:void 0,alwaysVisible:!1,limitToContainer:!1}},r.prototype.setJoystickSensibility=function(t){this._joystickSensibility=t,this._inversedSensibility=1/(this._joystickSensibility/1e3)},r.prototype._onPointerDown=function(t){t.preventDefault(),(this._leftJoystick===!0?t.clientXr.halfWidth)&&this._joystickPointerID<0?(this._joystickPointerID=t.pointerId,this._joystickPosition?(this._joystickPointerStartPos=this._joystickPosition.clone(),this._joystickPointerPos=this._joystickPosition.clone(),this._joystickPreviousPointerPos=this._joystickPosition.clone(),this._onPointerMove(t)):(this._joystickPointerStartPos.x=t.clientX,this._joystickPointerStartPos.y=t.clientY,this._joystickPointerPos=this._joystickPointerStartPos.clone(),this._joystickPreviousPointerPos=this._joystickPointerStartPos.clone()),this._deltaJoystickVector.x=0,this._deltaJoystickVector.y=0,this.pressed=!0,this._touches.add(t.pointerId.toString(),t)):r._globalJoystickIndex<2&&this._action&&(this._action(),this._touches.add(t.pointerId.toString(),{x:t.clientX,y:t.clientY,prevX:t.clientX,prevY:t.clientY}))},r.prototype._onPointerMove=function(t){if(this._joystickPointerID==t.pointerId){if(this.limitToContainer){var e=new u.d(t.clientX-this._joystickPointerStartPos.x,t.clientY-this._joystickPointerStartPos.y),n=e.length();n>this.containerSize&&e.scaleInPlace(this.containerSize/n),this._joystickPointerPos.x=this._joystickPointerStartPos.x+e.x,this._joystickPointerPos.y=this._joystickPointerStartPos.y+e.y}else this._joystickPointerPos.x=t.clientX,this._joystickPointerPos.y=t.clientY;this._deltaJoystickVector=this._joystickPointerPos.clone(),this._deltaJoystickVector=this._deltaJoystickVector.subtract(this._joystickPointerStartPos),0=0?this.rotation.y=-Math.atan(n.z/n.x)+Math.PI/2:this.rotation.y=-Math.atan(n.z/n.x)-Math.PI/2,this.rotation.z=0,isNaN(this.rotation.x)&&(this.rotation.x=0),isNaN(this.rotation.y)&&(this.rotation.y=0),isNaN(this.rotation.z)&&(this.rotation.z=0),this.rotationQuaternion&&u.b.RotationYawPitchRollToRef(this.rotation.y,this.rotation.x,this.rotation.z,this.rotationQuaternion)},Object.defineProperty(t.prototype,"target",{get:function(){return this.getTarget()},set:function(e){this.setTarget(e)},enumerable:!1,configurable:!0}),t.prototype.getTarget=function(){return this._currentTarget},t.prototype._decideIfNeedsToMove=function(){return Math.abs(this.cameraDirection.x)>0||Math.abs(this.cameraDirection.y)>0||Math.abs(this.cameraDirection.z)>0},t.prototype._updatePosition=function(){if(this.parent)return this.parent.getWorldMatrix().invertToRef(u.c.Matrix[0]),u.e.TransformNormalToRef(this.cameraDirection,u.c.Matrix[0],u.c.Vector3[0]),void this.position.addInPlace(u.c.Vector3[0]);this.position.addInPlace(this.cameraDirection)},t.prototype._checkInputs=function(){var e=this.invertRotation?-this.inverseRotationSpeed:1,n=this._decideIfNeedsToMove(),i=Math.abs(this.cameraRotation.x)>0||Math.abs(this.cameraRotation.y)>0;n&&this._updatePosition(),i&&(this.rotationQuaternion&&this.rotationQuaternion.toEulerAnglesToRef(this.rotation),this.rotation.x+=this.cameraRotation.x*e,this.rotation.y+=this.cameraRotation.y*e,!this.noRotationConstraint&&(this.rotation.x>1.570796&&(this.rotation.x=1.570796),this.rotation.x<-1.570796&&(this.rotation.x=-1.570796)),this.rotationQuaternion&&this.rotation.lengthSquared()&&u.b.RotationYawPitchRollToRef(this.rotation.y,this.rotation.x,this.rotation.z,this.rotationQuaternion)),n&&(Math.abs(this.cameraDirection.x)Ue.a.CollisionsEpsilon&&(a.position.addInPlace(a._diffPosition),a.onCollide&&p&&a.onCollide(p))},a.inputs=new Jr(a),a.inputs.addKeyboard().addMouse(),a}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"angularSensibility",{get:function(){var e=this.inputs.attached.mouse;return e?e.angularSensibility:0},set:function(e){var n=this.inputs.attached.mouse;n&&(n.angularSensibility=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysUp",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysUp:[]},set:function(e){var n=this.inputs.attached.keyboard;n&&(n.keysUp=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysUpward",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysUpward:[]},set:function(e){var n=this.inputs.attached.keyboard;n&&(n.keysUpward=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysDown",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysDown:[]},set:function(e){var n=this.inputs.attached.keyboard;n&&(n.keysDown=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysDownward",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysDownward:[]},set:function(e){var n=this.inputs.attached.keyboard;n&&(n.keysDownward=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysLeft",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysLeft:[]},set:function(e){var n=this.inputs.attached.keyboard;n&&(n.keysLeft=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysRight",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysRight:[]},set:function(e){var n=this.inputs.attached.keyboard;n&&(n.keysRight=e)},enumerable:!1,configurable:!0}),t.prototype.attachControl=function(e,n){n=Xe.b.BackCompatCameraNoPreventDefault(arguments),this.inputs.attachElement(n)},t.prototype.detachControl=function(e){this.inputs.detachElement(),this.cameraDirection=new u.e(0,0,0),this.cameraRotation=new u.d(0,0)},Object.defineProperty(t.prototype,"collisionMask",{get:function(){return this._collisionMask},set:function(e){this._collisionMask=isNaN(e)?-1:e},enumerable:!1,configurable:!0}),t.prototype._collideWithWorld=function(e){(this.parent?u.e.TransformCoordinates(this.position,this.parent.getWorldMatrix()):this.position).subtractFromFloatsToRef(0,this.ellipsoid.y,0,this._oldPosition),this._oldPosition.addInPlace(this.ellipsoidOffset);var n=this.getScene().collisionCoordinator;this._collider||(this._collider=n.createCollider()),this._collider._radius=this.ellipsoid,this._collider.collisionMask=this._collisionMask;var i=e;this.applyGravity&&(i=e.add(this.getScene().gravity)),n.getNewPosition(this._oldPosition,i,this._collider,3,null,this._onCollisionPositionChange,this.uniqueId)},t.prototype._checkInputs=function(){this._localDirection||(this._localDirection=u.e.Zero(),this._transformedDirection=u.e.Zero()),this.inputs.checkInputs(),r.prototype._checkInputs.call(this)},t.prototype._decideIfNeedsToMove=function(){return this._needMoveForGravity||Math.abs(this.cameraDirection.x)>0||Math.abs(this.cameraDirection.y)>0||Math.abs(this.cameraDirection.z)>0},t.prototype._updatePosition=function(){this.checkCollisions&&this.getScene().collisionsEnabled?this._collideWithWorld(this.cameraDirection):r.prototype._updatePosition.call(this)},t.prototype.dispose=function(){this.inputs.clear(),r.prototype.dispose.call(this)},t.prototype.getClassName=function(){return"FreeCamera"},Object(c.c)([Object(L.o)()],t.prototype,"ellipsoid",void 0),Object(c.c)([Object(L.o)()],t.prototype,"ellipsoidOffset",void 0),Object(c.c)([Object(L.c)()],t.prototype,"checkCollisions",void 0),Object(c.c)([Object(L.c)()],t.prototype,"applyGravity",void 0),t}(Li);Q.a.AddNodeConstructor("TouchCamera",function(r,t){return function(){return new ss(r,u.e.Zero(),t)}});var ss=function(r){function t(e,n,i){var o=r.call(this,e,n,i)||this;return o.inputs.addTouch(),o._setupInputs(),o}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"touchAngularSensibility",{get:function(){var e=this.inputs.attached.touch;return e?e.touchAngularSensibility:0},set:function(e){var n=this.inputs.attached.touch;n&&(n.touchAngularSensibility=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"touchMoveSensibility",{get:function(){var e=this.inputs.attached.touch;return e?e.touchMoveSensibility:0},set:function(e){var n=this.inputs.attached.touch;n&&(n.touchMoveSensibility=e)},enumerable:!1,configurable:!0}),t.prototype.getClassName=function(){return"TouchCamera"},t.prototype._setupInputs=function(){var e=this.inputs.attached.touch,n=this.inputs.attached.mouse;n?n.touchEnabled=!1:e.allowMouse=!0},t}(Yn);Q.a.AddNodeConstructor("ArcRotateCamera",function(r,t){return function(){return new Zi(r,0,0,1,u.e.Zero(),t)}});var Zi=function(r){function t(e,n,i,o,a,s,d){d===void 0&&(d=!0);var p=r.call(this,e,u.e.Zero(),s,d)||this;return p.inertialAlphaOffset=0,p.inertialBetaOffset=0,p.inertialRadiusOffset=0,p.lowerAlphaLimit=null,p.upperAlphaLimit=null,p.lowerBetaLimit=.01,p.upperBetaLimit=Math.PI-.01,p.lowerRadiusLimit=null,p.upperRadiusLimit=null,p.inertialPanningX=0,p.inertialPanningY=0,p.pinchToPanMaxDistance=20,p.panningDistanceLimit=null,p.panningOriginTarget=u.e.Zero(),p.panningInertia=.9,p.zoomOnFactor=1,p.targetScreenOffset=u.d.Zero(),p.allowUpsideDown=!0,p.useInputToRestoreState=!0,p._viewMatrix=new u.a,p.panningAxis=new u.e(1,1,0),p.onMeshTargetChangedObservable=new R.c,p.checkCollisions=!1,p.collisionRadius=new u.e(.5,.5,.5),p._previousPosition=u.e.Zero(),p._collisionVelocity=u.e.Zero(),p._newPosition=u.e.Zero(),p._computationVector=u.e.Zero(),p._onCollisionPositionChange=function(b,x,O){O===void 0&&(O=null),O?(p.setPosition(x),p.onCollide&&p.onCollide(O)):p._previousPosition.copyFrom(p._position);var B=Math.cos(p.alpha),F=Math.sin(p.alpha),z=Math.cos(p.beta),J=Math.sin(p.beta);J===0&&(J=1e-4);var ie=p._getTargetPosition();p._computationVector.copyFromFloats(p.radius*B*J,p.radius*z,p.radius*F*J),ie.addToRef(p._computationVector,p._newPosition),p._position.copyFrom(p._newPosition);var se=p.upVector;p.allowUpsideDown&&p.beta<0&&(se=(se=se.clone()).negate()),p._computeViewMatrix(p._position,ie,se),p._viewMatrix.addAtIndex(12,p.targetScreenOffset.x),p._viewMatrix.addAtIndex(13,p.targetScreenOffset.y),p._collisionTriggered=!1},p._target=u.e.Zero(),a&&p.setTarget(a),p.alpha=n,p.beta=i,p.radius=o,p.getViewMatrix(),p.inputs=new Fo(p),p.inputs.addKeyboard().addMouseWheel().addPointers(),p}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"target",{get:function(){return this._target},set:function(e){this.setTarget(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"position",{get:function(){return this._position},set:function(e){this.setPosition(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"upVector",{get:function(){return this._upVector},set:function(e){this._upToYMatrix||(this._YToUpMatrix=new u.a,this._upToYMatrix=new u.a,this._upVector=u.e.Zero()),e.normalize(),this._upVector.copyFrom(e),this.setMatUp()},enumerable:!1,configurable:!0}),t.prototype.setMatUp=function(){u.a.RotationAlignToRef(u.e.UpReadOnly,this._upVector,this._YToUpMatrix),u.a.RotationAlignToRef(this._upVector,u.e.UpReadOnly,this._upToYMatrix)},Object.defineProperty(t.prototype,"angularSensibilityX",{get:function(){var e=this.inputs.attached.pointers;return e?e.angularSensibilityX:0},set:function(e){var n=this.inputs.attached.pointers;n&&(n.angularSensibilityX=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"angularSensibilityY",{get:function(){var e=this.inputs.attached.pointers;return e?e.angularSensibilityY:0},set:function(e){var n=this.inputs.attached.pointers;n&&(n.angularSensibilityY=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pinchPrecision",{get:function(){var e=this.inputs.attached.pointers;return e?e.pinchPrecision:0},set:function(e){var n=this.inputs.attached.pointers;n&&(n.pinchPrecision=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pinchDeltaPercentage",{get:function(){var e=this.inputs.attached.pointers;return e?e.pinchDeltaPercentage:0},set:function(e){var n=this.inputs.attached.pointers;n&&(n.pinchDeltaPercentage=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"useNaturalPinchZoom",{get:function(){var e=this.inputs.attached.pointers;return!!e&&e.useNaturalPinchZoom},set:function(e){var n=this.inputs.attached.pointers;n&&(n.useNaturalPinchZoom=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"panningSensibility",{get:function(){var e=this.inputs.attached.pointers;return e?e.panningSensibility:0},set:function(e){var n=this.inputs.attached.pointers;n&&(n.panningSensibility=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysUp",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysUp:[]},set:function(e){var n=this.inputs.attached.keyboard;n&&(n.keysUp=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysDown",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysDown:[]},set:function(e){var n=this.inputs.attached.keyboard;n&&(n.keysDown=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysLeft",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysLeft:[]},set:function(e){var n=this.inputs.attached.keyboard;n&&(n.keysLeft=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysRight",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysRight:[]},set:function(e){var n=this.inputs.attached.keyboard;n&&(n.keysRight=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"wheelPrecision",{get:function(){var e=this.inputs.attached.mousewheel;return e?e.wheelPrecision:0},set:function(e){var n=this.inputs.attached.mousewheel;n&&(n.wheelPrecision=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"wheelDeltaPercentage",{get:function(){var e=this.inputs.attached.mousewheel;return e?e.wheelDeltaPercentage:0},set:function(e){var n=this.inputs.attached.mousewheel;n&&(n.wheelDeltaPercentage=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bouncingBehavior",{get:function(){return this._bouncingBehavior},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"useBouncingBehavior",{get:function(){return this._bouncingBehavior!=null},set:function(e){e!==this.useBouncingBehavior&&(e?(this._bouncingBehavior=new ml,this.addBehavior(this._bouncingBehavior)):this._bouncingBehavior&&(this.removeBehavior(this._bouncingBehavior),this._bouncingBehavior=null))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"framingBehavior",{get:function(){return this._framingBehavior},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"useFramingBehavior",{get:function(){return this._framingBehavior!=null},set:function(e){e!==this.useFramingBehavior&&(e?(this._framingBehavior=new gl,this.addBehavior(this._framingBehavior)):this._framingBehavior&&(this.removeBehavior(this._framingBehavior),this._framingBehavior=null))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"autoRotationBehavior",{get:function(){return this._autoRotationBehavior},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"useAutoRotationBehavior",{get:function(){return this._autoRotationBehavior!=null},set:function(e){e!==this.useAutoRotationBehavior&&(e?(this._autoRotationBehavior=new _l,this.addBehavior(this._autoRotationBehavior)):this._autoRotationBehavior&&(this.removeBehavior(this._autoRotationBehavior),this._autoRotationBehavior=null))},enumerable:!1,configurable:!0}),t.prototype._initCache=function(){r.prototype._initCache.call(this),this._cache._target=new u.e(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),this._cache.alpha=void 0,this._cache.beta=void 0,this._cache.radius=void 0,this._cache.targetScreenOffset=u.d.Zero()},t.prototype._updateCache=function(e){e||r.prototype._updateCache.call(this),this._cache._target.copyFrom(this._getTargetPosition()),this._cache.alpha=this.alpha,this._cache.beta=this.beta,this._cache.radius=this.radius,this._cache.targetScreenOffset.copyFrom(this.targetScreenOffset)},t.prototype._getTargetPosition=function(){if(this._targetHost&&this._targetHost.getAbsolutePosition){var e=this._targetHost.absolutePosition;this._targetBoundingCenter?e.addToRef(this._targetBoundingCenter,this._target):this._target.copyFrom(e)}var n=this._getLockedTargetPosition();return n||this._target},t.prototype.storeState=function(){return this._storedAlpha=this.alpha,this._storedBeta=this.beta,this._storedRadius=this.radius,this._storedTarget=this._getTargetPosition().clone(),this._storedTargetScreenOffset=this.targetScreenOffset.clone(),r.prototype.storeState.call(this)},t.prototype._restoreStateValues=function(){return!!r.prototype._restoreStateValues.call(this)&&(this.setTarget(this._storedTarget.clone()),this.alpha=this._storedAlpha,this.beta=this._storedBeta,this.radius=this._storedRadius,this.targetScreenOffset=this._storedTargetScreenOffset.clone(),this.inertialAlphaOffset=0,this.inertialBetaOffset=0,this.inertialRadiusOffset=0,this.inertialPanningX=0,this.inertialPanningY=0,!0)},t.prototype._isSynchronizedViewMatrix=function(){return!!r.prototype._isSynchronizedViewMatrix.call(this)&&this._cache._target.equals(this._getTargetPosition())&&this._cache.alpha===this.alpha&&this._cache.beta===this.beta&&this._cache.radius===this.radius&&this._cache.targetScreenOffset.equals(this.targetScreenOffset)},t.prototype.attachControl=function(e,n,i,o){var a=this;i===void 0&&(i=!0),o===void 0&&(o=2),n=Xe.b.BackCompatCameraNoPreventDefault(arguments),this._useCtrlForPanning=i,this._panningMouseButton=o,typeof arguments[0]=="boolean"&&(arguments.length>1&&(this._useCtrlForPanning=arguments[1]),arguments.length>2&&(this._panningMouseButton=arguments[2])),this.inputs.attachElement(n),this._reset=function(){a.inertialAlphaOffset=0,a.inertialBetaOffset=0,a.inertialRadiusOffset=0,a.inertialPanningX=0,a.inertialPanningY=0}},t.prototype.detachControl=function(e){this.inputs.detachElement(),this._reset&&this._reset()},t.prototype._checkInputs=function(){if(!this._collisionTriggered){if(this.inputs.checkInputs(),this.inertialAlphaOffset!==0||this.inertialBetaOffset!==0||this.inertialRadiusOffset!==0){var e=this.inertialAlphaOffset;this.beta<=0&&(e*=-1),this.getScene().useRightHandedSystem&&(e*=-1),this.parent&&this.parent._getWorldMatrixDeterminant()<0&&(e*=-1),this.alpha+=e,this.beta+=this.inertialBetaOffset,this.radius-=this.inertialRadiusOffset,this.inertialAlphaOffset*=this.inertia,this.inertialBetaOffset*=this.inertia,this.inertialRadiusOffset*=this.inertia,Math.abs(this.inertialAlphaOffset)Math.PI&&(this.beta=this.beta-2*Math.PI):this.betathis.upperBetaLimit&&(this.beta=this.upperBetaLimit),this.lowerAlphaLimit!==null&&this.alphathis.upperAlphaLimit&&(this.alpha=this.upperAlphaLimit),this.lowerRadiusLimit!==null&&this.radiusthis.upperRadiusLimit&&(this.radius=this.upperRadiusLimit,this.inertialRadiusOffset=0)},t.prototype.rebuildAnglesAndRadius=function(){this._position.subtractToRef(this._getTargetPosition(),this._computationVector),this._upVector.x===0&&this._upVector.y===1&&this._upVector.z===0||u.e.TransformCoordinatesToRef(this._computationVector,this._upToYMatrix,this._computationVector),this.radius=this._computationVector.length(),this.radius===0&&(this.radius=1e-4);var e=this.alpha;this._computationVector.x===0&&this._computationVector.z===0?this.alpha=Math.PI/2:this.alpha=Math.acos(this._computationVector.x/Math.sqrt(Math.pow(this._computationVector.x,2)+Math.pow(this._computationVector.z,2))),this._computationVector.z<0&&(this.alpha=2*Math.PI-this.alpha);var n=Math.round((e-this.alpha)/(2*Math.PI));this.alpha+=2*n*Math.PI,this.beta=Math.acos(this._computationVector.y/this.radius),this._checkLimits()},t.prototype.setPosition=function(e){this._position.equals(e)||(this._position.copyFrom(e),this.rebuildAnglesAndRadius())},t.prototype.setTarget=function(e,n,i){if(n===void 0&&(n=!1),i===void 0&&(i=!1),e.getBoundingInfo)this._targetBoundingCenter=n?e.getBoundingInfo().boundingBox.centerWorld.clone():null,e.computeWorldMatrix(),this._targetHost=e,this._target=this._getTargetPosition(),this.onMeshTargetChangedObservable.notifyObservers(this._targetHost);else{var o=e,a=this._getTargetPosition();if(a&&!i&&a.equals(o))return;this._targetHost=null,this._target=o,this._targetBoundingCenter=null,this.onMeshTargetChangedObservable.notifyObservers(null)}this.rebuildAnglesAndRadius()},t.prototype._getViewMatrix=function(){var e=Math.cos(this.alpha),n=Math.sin(this.alpha),i=Math.cos(this.beta),o=Math.sin(this.beta);o===0&&(o=1e-4),this.radius===0&&(this.radius=1e-4);var a=this._getTargetPosition();if(this._computationVector.copyFromFloats(this.radius*e*o,this.radius*i,this.radius*n*o),this._upVector.x===0&&this._upVector.y===1&&this._upVector.z===0||u.e.TransformCoordinatesToRef(this._computationVector,this._YToUpMatrix,this._computationVector),a.addToRef(this._computationVector,this._newPosition),this.getScene().collisionsEnabled&&this.checkCollisions){var s=this.getScene().collisionCoordinator;this._collider||(this._collider=s.createCollider()),this._collider._radius=this.collisionRadius,this._newPosition.subtractToRef(this._position,this._collisionVelocity),this._collisionTriggered=!0,s.getNewPosition(this._position,this._collisionVelocity,this._collider,3,null,this._onCollisionPositionChange,this.uniqueId)}else{this._position.copyFrom(this._newPosition);var d=this.upVector;this.allowUpsideDown&&o<0&&(d=d.negate()),this._computeViewMatrix(this._position,a,d),this._viewMatrix.addAtIndex(12,this.targetScreenOffset.x),this._viewMatrix.addAtIndex(13,this.targetScreenOffset.y)}return this._currentTarget=a,this._viewMatrix},t.prototype.zoomOn=function(e,n){n===void 0&&(n=!1),e=e||this.getScene().meshes;var i=De.a.MinMax(e),o=u.e.Distance(i.min,i.max);this.radius=o*this.zoomOnFactor,this.focusOn({min:i.min,max:i.max,distance:o},n)},t.prototype.focusOn=function(e,n){var i,o;if(n===void 0&&(n=!1),e.min===void 0){var a=e||this.getScene().meshes;i=De.a.MinMax(a),o=u.e.Distance(i.min,i.max)}else i=e,o=e.distance;this._target=De.a.Center(i),n||(this.maxZ=2*o)},t.prototype.createRigCamera=function(e,n){var i=0;switch(this.cameraRigMode){case gt.a.RIG_MODE_STEREOSCOPIC_ANAGLYPH:case gt.a.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:case gt.a.RIG_MODE_STEREOSCOPIC_OVERUNDER:case gt.a.RIG_MODE_STEREOSCOPIC_INTERLACED:case gt.a.RIG_MODE_VR:i=this._cameraRigParams.stereoHalfAngle*(n===0?1:-1);break;case gt.a.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED:i=this._cameraRigParams.stereoHalfAngle*(n===0?-1:1)}var o=new t(e,this.alpha+i,this.beta,this.radius,this._target,this.getScene());return o._cameraRigParams={},o.isRigCamera=!0,o.rigParent=this,o.upVector=this.upVector,o},t.prototype._updateRigCameras=function(){var e=this._rigCameras[0],n=this._rigCameras[1];switch(e.beta=n.beta=this.beta,this.cameraRigMode){case gt.a.RIG_MODE_STEREOSCOPIC_ANAGLYPH:case gt.a.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:case gt.a.RIG_MODE_STEREOSCOPIC_OVERUNDER:case gt.a.RIG_MODE_STEREOSCOPIC_INTERLACED:case gt.a.RIG_MODE_VR:e.alpha=this.alpha-this._cameraRigParams.stereoHalfAngle,n.alpha=this.alpha+this._cameraRigParams.stereoHalfAngle;break;case gt.a.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED:e.alpha=this.alpha+this._cameraRigParams.stereoHalfAngle,n.alpha=this.alpha-this._cameraRigParams.stereoHalfAngle}r.prototype._updateRigCameras.call(this)},t.prototype.dispose=function(){this.inputs.clear(),r.prototype.dispose.call(this)},t.prototype.getClassName=function(){return"ArcRotateCamera"},Object(c.c)([Object(L.c)()],t.prototype,"alpha",void 0),Object(c.c)([Object(L.c)()],t.prototype,"beta",void 0),Object(c.c)([Object(L.c)()],t.prototype,"radius",void 0),Object(c.c)([Object(L.o)("target")],t.prototype,"_target",void 0),Object(c.c)([Object(L.c)()],t.prototype,"inertialAlphaOffset",void 0),Object(c.c)([Object(L.c)()],t.prototype,"inertialBetaOffset",void 0),Object(c.c)([Object(L.c)()],t.prototype,"inertialRadiusOffset",void 0),Object(c.c)([Object(L.c)()],t.prototype,"lowerAlphaLimit",void 0),Object(c.c)([Object(L.c)()],t.prototype,"upperAlphaLimit",void 0),Object(c.c)([Object(L.c)()],t.prototype,"lowerBetaLimit",void 0),Object(c.c)([Object(L.c)()],t.prototype,"upperBetaLimit",void 0),Object(c.c)([Object(L.c)()],t.prototype,"lowerRadiusLimit",void 0),Object(c.c)([Object(L.c)()],t.prototype,"upperRadiusLimit",void 0),Object(c.c)([Object(L.c)()],t.prototype,"inertialPanningX",void 0),Object(c.c)([Object(L.c)()],t.prototype,"inertialPanningY",void 0),Object(c.c)([Object(L.c)()],t.prototype,"pinchToPanMaxDistance",void 0),Object(c.c)([Object(L.c)()],t.prototype,"panningDistanceLimit",void 0),Object(c.c)([Object(L.o)()],t.prototype,"panningOriginTarget",void 0),Object(c.c)([Object(L.c)()],t.prototype,"panningInertia",void 0),Object(c.c)([Object(L.c)()],t.prototype,"zoomOnFactor",void 0),Object(c.c)([Object(L.c)()],t.prototype,"targetScreenOffset",void 0),Object(c.c)([Object(L.c)()],t.prototype,"allowUpsideDown",void 0),Object(c.c)([Object(L.c)()],t.prototype,"useInputToRestoreState",void 0),t}(Li);Q.a.AddNodeConstructor("DeviceOrientationCamera",function(r,t){return function(){return new Bo(r,u.e.Zero(),t)}});var Bo=function(r){function t(e,n,i){var o=r.call(this,e,n,i)||this;return o._tmpDragQuaternion=new u.b,o._disablePointerInputWhenUsingDeviceOrientation=!0,o._dragFactor=0,o._quaternionCache=new u.b,o.inputs.addDeviceOrientation(),o.inputs._deviceOrientationInput&&o.inputs._deviceOrientationInput._onDeviceOrientationChangedObservable.addOnce(function(){o._disablePointerInputWhenUsingDeviceOrientation&&o.inputs._mouseInput&&(o.inputs._mouseInput._allowCameraRotation=!1,o.inputs._mouseInput.onPointerMovedObservable.add(function(a){o._dragFactor!=0&&(o._initialQuaternion||(o._initialQuaternion=new u.b),u.b.FromEulerAnglesToRef(0,a.offsetX*o._dragFactor,0,o._tmpDragQuaternion),o._initialQuaternion.multiplyToRef(o._tmpDragQuaternion,o._initialQuaternion))}))}),o}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"disablePointerInputWhenUsingDeviceOrientation",{get:function(){return this._disablePointerInputWhenUsingDeviceOrientation},set:function(e){this._disablePointerInputWhenUsingDeviceOrientation=e},enumerable:!1,configurable:!0}),t.prototype.enableHorizontalDragging=function(e){e===void 0&&(e=1/300),this._dragFactor=e},t.prototype.getClassName=function(){return"DeviceOrientationCamera"},t.prototype._checkInputs=function(){r.prototype._checkInputs.call(this),this._quaternionCache.copyFrom(this.rotationQuaternion),this._initialQuaternion&&this._initialQuaternion.multiplyToRef(this.rotationQuaternion,this.rotationQuaternion)},t.prototype.resetToCurrentRotation=function(e){var n=this;e===void 0&&(e=ye.a.Y),this.rotationQuaternion&&(this._initialQuaternion||(this._initialQuaternion=new u.b),this._initialQuaternion.copyFrom(this._quaternionCache||this.rotationQuaternion),["x","y","z"].forEach(function(i){e[i]?n._initialQuaternion[i]*=-1:n._initialQuaternion[i]=0}),this._initialQuaternion.normalize(),this._initialQuaternion.multiplyToRef(this.rotationQuaternion,this.rotationQuaternion))},t}(Yn),Pl=function(r){function t(e){return r.call(this,e)||this}return Object(c.d)(t,r),t.prototype.addKeyboard=function(){return this.add(new Ka),this},t.prototype.addMouse=function(e){return e===void 0&&(e=!0),this.add(new Qa(e)),this},t}(Zr),Uf=function(r){function t(e,n,i,o){o===void 0&&(o=!0);var a=r.call(this,e,n,i,o)||this;return a.ellipsoid=new u.e(1,1,1),a.ellipsoidOffset=new u.e(0,0,0),a.checkCollisions=!1,a.applyGravity=!1,a.cameraDirection=u.e.Zero(),a._trackRoll=0,a.rollCorrect=100,a.bankedTurn=!1,a.bankedTurnLimit=Math.PI/2,a.bankedTurnMultiplier=1,a._needMoveForGravity=!1,a._oldPosition=u.e.Zero(),a._diffPosition=u.e.Zero(),a._newPosition=u.e.Zero(),a._collisionMask=-1,a._onCollisionPositionChange=function(s,d,p){p===void 0&&(p=null);var b;b=d,a._newPosition.copyFrom(b),a._newPosition.subtractToRef(a._oldPosition,a._diffPosition),a._diffPosition.length()>Ue.a.CollisionsEpsilon&&(a.position.addInPlace(a._diffPosition),a.onCollide&&p&&a.onCollide(p))},a.inputs=new Pl(a),a.inputs.addKeyboard().addMouse(),a}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"angularSensibility",{get:function(){var e=this.inputs.attached.mouse;return e?e.angularSensibility:0},set:function(e){var n=this.inputs.attached.mouse;n&&(n.angularSensibility=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysForward",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysForward:[]},set:function(e){var n=this.inputs.attached.keyboard;n&&(n.keysForward=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysBackward",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysBackward:[]},set:function(e){var n=this.inputs.attached.keyboard;n&&(n.keysBackward=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysUp",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysUp:[]},set:function(e){var n=this.inputs.attached.keyboard;n&&(n.keysUp=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysDown",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysDown:[]},set:function(e){var n=this.inputs.attached.keyboard;n&&(n.keysDown=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysLeft",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysLeft:[]},set:function(e){var n=this.inputs.attached.keyboard;n&&(n.keysLeft=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysRight",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysRight:[]},set:function(e){var n=this.inputs.attached.keyboard;n&&(n.keysRight=e)},enumerable:!1,configurable:!0}),t.prototype.attachControl=function(e,n){n=Xe.b.BackCompatCameraNoPreventDefault(arguments),this.inputs.attachElement(n)},t.prototype.detachControl=function(){this.inputs.detachElement(),this.cameraDirection=new u.e(0,0,0)},Object.defineProperty(t.prototype,"collisionMask",{get:function(){return this._collisionMask},set:function(e){this._collisionMask=isNaN(e)?-1:e},enumerable:!1,configurable:!0}),t.prototype._collideWithWorld=function(e){(this.parent?u.e.TransformCoordinates(this.position,this.parent.getWorldMatrix()):this.position).subtractFromFloatsToRef(0,this.ellipsoid.y,0,this._oldPosition),this._oldPosition.addInPlace(this.ellipsoidOffset);var n=this.getScene().collisionCoordinator;this._collider||(this._collider=n.createCollider()),this._collider._radius=this.ellipsoid,this._collider.collisionMask=this._collisionMask;var i=e;this.applyGravity&&(i=e.add(this.getScene().gravity)),n.getNewPosition(this._oldPosition,i,this._collider,3,null,this._onCollisionPositionChange,this.uniqueId)},t.prototype._checkInputs=function(){this._localDirection||(this._localDirection=u.e.Zero(),this._transformedDirection=u.e.Zero()),this.inputs.checkInputs(),r.prototype._checkInputs.call(this)},t.prototype._decideIfNeedsToMove=function(){return this._needMoveForGravity||Math.abs(this.cameraDirection.x)>0||Math.abs(this.cameraDirection.y)>0||Math.abs(this.cameraDirection.z)>0},t.prototype._updatePosition=function(){this.checkCollisions&&this.getScene().collisionsEnabled?this._collideWithWorld(this.cameraDirection):r.prototype._updatePosition.call(this)},t.prototype.restoreRoll=function(e){var n=this._trackRoll,i=n-this.rotation.z;Math.abs(i)>=.001&&(this.rotation.z+=i/e,Math.abs(n-this.rotation.z)<=.001&&(this.rotation.z=n))},t.prototype.dispose=function(){this.inputs.clear(),r.prototype.dispose.call(this)},t.prototype.getClassName=function(){return"FlyCamera"},Object(c.c)([Object(L.o)()],t.prototype,"ellipsoid",void 0),Object(c.c)([Object(L.o)()],t.prototype,"ellipsoidOffset",void 0),Object(c.c)([Object(L.c)()],t.prototype,"checkCollisions",void 0),Object(c.c)([Object(L.c)()],t.prototype,"applyGravity",void 0),t}(Li),xl=function(r){function t(e){return r.call(this,e)||this}return Object(c.d)(t,r),t.prototype.addKeyboard=function(){return this.add(new qa),this},t.prototype.addMouseWheel=function(){return this.add(new Za),this},t.prototype.addPointers=function(){return this.add(new Ja),this},t.prototype.addVRDeviceOrientation=function(){return console.warn("DeviceOrientation support not yet implemented for FollowCamera."),this},t}(Zr);Q.a.AddNodeConstructor("FollowCamera",function(r,t){return function(){return new Cl(r,u.e.Zero(),t)}}),Q.a.AddNodeConstructor("ArcFollowCamera",function(r,t){return function(){return new Rl(r,0,0,1,null,t)}});var ii,Cl=function(r){function t(e,n,i,o){o===void 0&&(o=null);var a=r.call(this,e,n,i)||this;return a.radius=12,a.lowerRadiusLimit=null,a.upperRadiusLimit=null,a.rotationOffset=0,a.lowerRotationOffsetLimit=null,a.upperRotationOffsetLimit=null,a.heightOffset=4,a.lowerHeightOffsetLimit=null,a.upperHeightOffsetLimit=null,a.cameraAcceleration=.05,a.maxCameraSpeed=20,a.lockedTarget=o,a.inputs=new xl(a),a.inputs.addKeyboard().addMouseWheel().addPointers(),a}return Object(c.d)(t,r),t.prototype._follow=function(e){if(e){var n;if(e.rotationQuaternion){var i=new u.a;e.rotationQuaternion.toRotationMatrix(i),n=Math.atan2(i.m[8],i.m[10])}else n=e.rotation.y;var o=Xe.b.ToRadians(this.rotationOffset)+n,a=e.getAbsolutePosition(),s=a.x+Math.sin(o)*this.radius,d=a.z+Math.cos(o)*this.radius,p=s-this.position.x,b=a.y+this.heightOffset-this.position.y,x=d-this.position.z,O=p*this.cameraAcceleration*2,B=b*this.cameraAcceleration,F=x*this.cameraAcceleration*2;(O>this.maxCameraSpeed||O<-this.maxCameraSpeed)&&(O=O<1?-this.maxCameraSpeed:this.maxCameraSpeed),(B>this.maxCameraSpeed||B<-this.maxCameraSpeed)&&(B=B<1?-this.maxCameraSpeed:this.maxCameraSpeed),(F>this.maxCameraSpeed||F<-this.maxCameraSpeed)&&(F=F<1?-this.maxCameraSpeed:this.maxCameraSpeed),this.position=new u.e(this.position.x+O,this.position.y+B,this.position.z+F),this.setTarget(a)}},t.prototype.attachControl=function(e,n){n=Xe.b.BackCompatCameraNoPreventDefault(arguments),this.inputs.attachElement(n),this._reset=function(){}},t.prototype.detachControl=function(e){this.inputs.detachElement(),this._reset&&this._reset()},t.prototype._checkInputs=function(){this.inputs.checkInputs(),this._checkLimits(),r.prototype._checkInputs.call(this),this.lockedTarget&&this._follow(this.lockedTarget)},t.prototype._checkLimits=function(){this.lowerRadiusLimit!==null&&this.radiusthis.upperRadiusLimit&&(this.radius=this.upperRadiusLimit),this.lowerHeightOffsetLimit!==null&&this.heightOffsetthis.upperHeightOffsetLimit&&(this.heightOffset=this.upperHeightOffsetLimit),this.lowerRotationOffsetLimit!==null&&this.rotationOffsetthis.upperRotationOffsetLimit&&(this.rotationOffset=this.upperRotationOffsetLimit)},t.prototype.getClassName=function(){return"FollowCamera"},Object(c.c)([Object(L.c)()],t.prototype,"radius",void 0),Object(c.c)([Object(L.c)()],t.prototype,"lowerRadiusLimit",void 0),Object(c.c)([Object(L.c)()],t.prototype,"upperRadiusLimit",void 0),Object(c.c)([Object(L.c)()],t.prototype,"rotationOffset",void 0),Object(c.c)([Object(L.c)()],t.prototype,"lowerRotationOffsetLimit",void 0),Object(c.c)([Object(L.c)()],t.prototype,"upperRotationOffsetLimit",void 0),Object(c.c)([Object(L.c)()],t.prototype,"heightOffset",void 0),Object(c.c)([Object(L.c)()],t.prototype,"lowerHeightOffsetLimit",void 0),Object(c.c)([Object(L.c)()],t.prototype,"upperHeightOffsetLimit",void 0),Object(c.c)([Object(L.c)()],t.prototype,"cameraAcceleration",void 0),Object(c.c)([Object(L.c)()],t.prototype,"maxCameraSpeed",void 0),Object(c.c)([Object(L.k)("lockedTargetId")],t.prototype,"lockedTarget",void 0),t}(Li),Rl=function(r){function t(e,n,i,o,a,s){var d=r.call(this,e,u.e.Zero(),s)||this;return d.alpha=n,d.beta=i,d.radius=o,d._cartesianCoordinates=u.e.Zero(),d._meshTarget=a,d._follow(),d}return Object(c.d)(t,r),t.prototype._follow=function(){if(this._meshTarget){this._cartesianCoordinates.x=this.radius*Math.cos(this.alpha)*Math.cos(this.beta),this._cartesianCoordinates.y=this.radius*Math.sin(this.beta),this._cartesianCoordinates.z=this.radius*Math.sin(this.alpha)*Math.cos(this.beta);var e=this._meshTarget.getAbsolutePosition();this.position=e.add(this._cartesianCoordinates),this.setTarget(e)}},t.prototype._checkInputs=function(){r.prototype._checkInputs.call(this),this._follow()},t.prototype.getClassName=function(){return"ArcFollowCamera"},t}(Li),cs=f(38),dn=f(39);(function(r){r[r.VIVE=0]="VIVE",r[r.OCULUS=1]="OCULUS",r[r.WINDOWS=2]="WINDOWS",r[r.GEAR_VR=3]="GEAR_VR",r[r.DAYDREAM=4]="DAYDREAM",r[r.GENERIC=5]="GENERIC"})(ii||(ii={}));var Rn,Ji,Ni=function(){function r(){}return r.InitiateController=function(t){for(var e=0,n=this._ControllerFactories;ethis._maxRotationDistFromHeadset){var o=i-(i<0?-this._maxRotationDistFromHeadset:this._maxRotationDistFromHeadset);this._draggedRoomRotation+=o;var a=Math.sin(-o),s=Math.cos(-o);this._calculatedPosition.x=this._calculatedPosition.x*s-this._calculatedPosition.z*a,this._calculatedPosition.z=this._calculatedPosition.x*a+this._calculatedPosition.z*s}}u.e.TransformCoordinatesToRef(this._calculatedPosition,this._deviceToWorld,this.devicePosition),this._deviceToWorld.getRotationMatrixToRef(this._workingMatrix),u.b.FromRotationMatrixToRef(this._workingMatrix,this.deviceRotationQuaternion),this.deviceRotationQuaternion.multiplyInPlace(this._calculatedRotation),this._mesh&&(this._mesh.position.copyFrom(this.devicePosition),this._mesh.rotationQuaternion&&this._mesh.rotationQuaternion.copyFrom(this.deviceRotationQuaternion))}},t.prototype.updateFromDevice=function(e){if(!this.isXR&&e){this.rawPose=e,e.position&&(this._deviceRoomPosition.copyFromFloats(e.position[0],e.position[1],-e.position[2]),this._mesh&&this._mesh.getScene().useRightHandedSystem&&(this._deviceRoomPosition.z*=-1),this._trackPosition&&this._deviceRoomPosition.scaleToRef(this.deviceScaleFactor,this._calculatedPosition),this._calculatedPosition.addInPlace(this.position));var n=this.rawPose;e.orientation&&n.orientation&&n.orientation.length===4&&(this._deviceRoomRotationQuaternion.copyFromFloats(n.orientation[0],n.orientation[1],-n.orientation[2],-n.orientation[3]),this._mesh&&(this._mesh.getScene().useRightHandedSystem?(this._deviceRoomRotationQuaternion.z*=-1,this._deviceRoomRotationQuaternion.w*=-1):this._deviceRoomRotationQuaternion.multiplyToRef(this._leftHandSystemQuaternion,this._deviceRoomRotationQuaternion)),this._deviceRoomRotationQuaternion.multiplyToRef(this.rotationQuaternion,this._calculatedRotation))}},t.prototype.attachToMesh=function(e){if(this._mesh&&(this._mesh.parent=null),this._mesh=e,this._poseControlledCamera&&(this._mesh.parent=this._poseControlledCamera),this._mesh.rotationQuaternion||(this._mesh.rotationQuaternion=new u.b),!this.isXR&&(this._updatePoseAndMesh(),this._pointingPoseNode)){for(var n=[],i=this._pointingPoseNode;i.parent;)n.push(i.parent),i=i.parent;n.reverse().forEach(function(o){o.computeWorldMatrix(!0)})}this._meshAttachedObservable.notifyObservers(e)},t.prototype.attachToPoseControlledCamera=function(e){this._poseControlledCamera=e,this._mesh&&(this._mesh.parent=this._poseControlledCamera)},t.prototype.dispose=function(){this._mesh&&this._mesh.dispose(),this._mesh=null,r.prototype.dispose.call(this)},Object.defineProperty(t.prototype,"mesh",{get:function(){return this._mesh},enumerable:!1,configurable:!0}),t.prototype.getForwardRay=function(e){if(e===void 0&&(e=100),!this.mesh)return new dn.a(u.e.Zero(),new u.e(0,0,1),e);var n=this._pointingPoseNode?this._pointingPoseNode.getWorldMatrix():this.mesh.getWorldMatrix(),i=n.getTranslation(),o=new u.e(0,0,-1),a=u.e.TransformNormal(o,n),s=u.e.Normalize(a);return new dn.a(i,s,e)},t.POINTING_POSE="POINTING_POSE",t}(hn);(function(r){r[r.A=0]="A",r[r.B=1]="B",r[r.X=2]="X",r[r.Y=3]="Y",r[r.LB=4]="LB",r[r.RB=5]="RB",r[r.Back=8]="Back",r[r.Start=9]="Start",r[r.LeftStick=10]="LeftStick",r[r.RightStick=11]="RightStick"})(Rn||(Rn={})),function(r){r[r.Up=12]="Up",r[r.Down=13]="Down",r[r.Left=14]="Left",r[r.Right=15]="Right"}(Ji||(Ji={}));var Hn,$i,Ol=function(r){function t(e,n,i,o){o===void 0&&(o=!1);var a=r.call(this,e,n,i,0,1,2,3)||this;return a._leftTrigger=0,a._rightTrigger=0,a.onButtonDownObservable=new R.c,a.onButtonUpObservable=new R.c,a.onPadDownObservable=new R.c,a.onPadUpObservable=new R.c,a._buttonA=0,a._buttonB=0,a._buttonX=0,a._buttonY=0,a._buttonBack=0,a._buttonStart=0,a._buttonLB=0,a._buttonRB=0,a._buttonLeftStick=0,a._buttonRightStick=0,a._dPadUp=0,a._dPadDown=0,a._dPadLeft=0,a._dPadRight=0,a._isXboxOnePad=!1,a.type=hn.XBOX,a._isXboxOnePad=o,a}return Object(c.d)(t,r),t.prototype.onlefttriggerchanged=function(e){this._onlefttriggerchanged=e},t.prototype.onrighttriggerchanged=function(e){this._onrighttriggerchanged=e},Object.defineProperty(t.prototype,"leftTrigger",{get:function(){return this._leftTrigger},set:function(e){this._onlefttriggerchanged&&this._leftTrigger!==e&&this._onlefttriggerchanged(e),this._leftTrigger=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rightTrigger",{get:function(){return this._rightTrigger},set:function(e){this._onrighttriggerchanged&&this._rightTrigger!==e&&this._onrighttriggerchanged(e),this._rightTrigger=e},enumerable:!1,configurable:!0}),t.prototype.onbuttondown=function(e){this._onbuttondown=e},t.prototype.onbuttonup=function(e){this._onbuttonup=e},t.prototype.ondpaddown=function(e){this._ondpaddown=e},t.prototype.ondpadup=function(e){this._ondpadup=e},t.prototype._setButtonValue=function(e,n,i){return e!==n&&(e===1&&(this._onbuttondown&&this._onbuttondown(i),this.onButtonDownObservable.notifyObservers(i)),e===0&&(this._onbuttonup&&this._onbuttonup(i),this.onButtonUpObservable.notifyObservers(i))),e},t.prototype._setDPadValue=function(e,n,i){return e!==n&&(e===1&&(this._ondpaddown&&this._ondpaddown(i),this.onPadDownObservable.notifyObservers(i)),e===0&&(this._ondpadup&&this._ondpadup(i),this.onPadUpObservable.notifyObservers(i))),e},Object.defineProperty(t.prototype,"buttonA",{get:function(){return this._buttonA},set:function(e){this._buttonA=this._setButtonValue(e,this._buttonA,Rn.A)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonB",{get:function(){return this._buttonB},set:function(e){this._buttonB=this._setButtonValue(e,this._buttonB,Rn.B)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonX",{get:function(){return this._buttonX},set:function(e){this._buttonX=this._setButtonValue(e,this._buttonX,Rn.X)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonY",{get:function(){return this._buttonY},set:function(e){this._buttonY=this._setButtonValue(e,this._buttonY,Rn.Y)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonStart",{get:function(){return this._buttonStart},set:function(e){this._buttonStart=this._setButtonValue(e,this._buttonStart,Rn.Start)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonBack",{get:function(){return this._buttonBack},set:function(e){this._buttonBack=this._setButtonValue(e,this._buttonBack,Rn.Back)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonLB",{get:function(){return this._buttonLB},set:function(e){this._buttonLB=this._setButtonValue(e,this._buttonLB,Rn.LB)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonRB",{get:function(){return this._buttonRB},set:function(e){this._buttonRB=this._setButtonValue(e,this._buttonRB,Rn.RB)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonLeftStick",{get:function(){return this._buttonLeftStick},set:function(e){this._buttonLeftStick=this._setButtonValue(e,this._buttonLeftStick,Rn.LeftStick)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonRightStick",{get:function(){return this._buttonRightStick},set:function(e){this._buttonRightStick=this._setButtonValue(e,this._buttonRightStick,Rn.RightStick)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dPadUp",{get:function(){return this._dPadUp},set:function(e){this._dPadUp=this._setDPadValue(e,this._dPadUp,Ji.Up)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dPadDown",{get:function(){return this._dPadDown},set:function(e){this._dPadDown=this._setDPadValue(e,this._dPadDown,Ji.Down)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dPadLeft",{get:function(){return this._dPadLeft},set:function(e){this._dPadLeft=this._setDPadValue(e,this._dPadLeft,Ji.Left)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dPadRight",{get:function(){return this._dPadRight},set:function(e){this._dPadRight=this._setDPadValue(e,this._dPadRight,Ji.Right)},enumerable:!1,configurable:!0}),t.prototype.update=function(){r.prototype.update.call(this),this._isXboxOnePad,this.buttonA=this.browserGamepad.buttons[0].value,this.buttonB=this.browserGamepad.buttons[1].value,this.buttonX=this.browserGamepad.buttons[2].value,this.buttonY=this.browserGamepad.buttons[3].value,this.buttonLB=this.browserGamepad.buttons[4].value,this.buttonRB=this.browserGamepad.buttons[5].value,this.leftTrigger=this.browserGamepad.buttons[6].value,this.rightTrigger=this.browserGamepad.buttons[7].value,this.buttonBack=this.browserGamepad.buttons[8].value,this.buttonStart=this.browserGamepad.buttons[9].value,this.buttonLeftStick=this.browserGamepad.buttons[10].value,this.buttonRightStick=this.browserGamepad.buttons[11].value,this.dPadUp=this.browserGamepad.buttons[12].value,this.dPadDown=this.browserGamepad.buttons[13].value,this.dPadLeft=this.browserGamepad.buttons[14].value,this.dPadRight=this.browserGamepad.buttons[15].value},t.prototype.dispose=function(){r.prototype.dispose.call(this),this.onButtonDownObservable.clear(),this.onButtonUpObservable.clear(),this.onPadDownObservable.clear(),this.onPadUpObservable.clear()},t}(hn);(function(r){r[r.Cross=0]="Cross",r[r.Circle=1]="Circle",r[r.Square=2]="Square",r[r.Triangle=3]="Triangle",r[r.L1=4]="L1",r[r.R1=5]="R1",r[r.Share=8]="Share",r[r.Options=9]="Options",r[r.LeftStick=10]="LeftStick",r[r.RightStick=11]="RightStick"})(Hn||(Hn={})),function(r){r[r.Up=12]="Up",r[r.Down=13]="Down",r[r.Left=14]="Left",r[r.Right=15]="Right"}($i||($i={}));var Ml=function(r){function t(e,n,i){var o=r.call(this,e.replace("STANDARD GAMEPAD","SONY PLAYSTATION DUALSHOCK"),n,i,0,1,2,3)||this;return o._leftTrigger=0,o._rightTrigger=0,o.onButtonDownObservable=new R.c,o.onButtonUpObservable=new R.c,o.onPadDownObservable=new R.c,o.onPadUpObservable=new R.c,o._buttonCross=0,o._buttonCircle=0,o._buttonSquare=0,o._buttonTriangle=0,o._buttonShare=0,o._buttonOptions=0,o._buttonL1=0,o._buttonR1=0,o._buttonLeftStick=0,o._buttonRightStick=0,o._dPadUp=0,o._dPadDown=0,o._dPadLeft=0,o._dPadRight=0,o.type=hn.DUALSHOCK,o}return Object(c.d)(t,r),t.prototype.onlefttriggerchanged=function(e){this._onlefttriggerchanged=e},t.prototype.onrighttriggerchanged=function(e){this._onrighttriggerchanged=e},Object.defineProperty(t.prototype,"leftTrigger",{get:function(){return this._leftTrigger},set:function(e){this._onlefttriggerchanged&&this._leftTrigger!==e&&this._onlefttriggerchanged(e),this._leftTrigger=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rightTrigger",{get:function(){return this._rightTrigger},set:function(e){this._onrighttriggerchanged&&this._rightTrigger!==e&&this._onrighttriggerchanged(e),this._rightTrigger=e},enumerable:!1,configurable:!0}),t.prototype.onbuttondown=function(e){this._onbuttondown=e},t.prototype.onbuttonup=function(e){this._onbuttonup=e},t.prototype.ondpaddown=function(e){this._ondpaddown=e},t.prototype.ondpadup=function(e){this._ondpadup=e},t.prototype._setButtonValue=function(e,n,i){return e!==n&&(e===1&&(this._onbuttondown&&this._onbuttondown(i),this.onButtonDownObservable.notifyObservers(i)),e===0&&(this._onbuttonup&&this._onbuttonup(i),this.onButtonUpObservable.notifyObservers(i))),e},t.prototype._setDPadValue=function(e,n,i){return e!==n&&(e===1&&(this._ondpaddown&&this._ondpaddown(i),this.onPadDownObservable.notifyObservers(i)),e===0&&(this._ondpadup&&this._ondpadup(i),this.onPadUpObservable.notifyObservers(i))),e},Object.defineProperty(t.prototype,"buttonCross",{get:function(){return this._buttonCross},set:function(e){this._buttonCross=this._setButtonValue(e,this._buttonCross,Hn.Cross)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonCircle",{get:function(){return this._buttonCircle},set:function(e){this._buttonCircle=this._setButtonValue(e,this._buttonCircle,Hn.Circle)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonSquare",{get:function(){return this._buttonSquare},set:function(e){this._buttonSquare=this._setButtonValue(e,this._buttonSquare,Hn.Square)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonTriangle",{get:function(){return this._buttonTriangle},set:function(e){this._buttonTriangle=this._setButtonValue(e,this._buttonTriangle,Hn.Triangle)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonOptions",{get:function(){return this._buttonOptions},set:function(e){this._buttonOptions=this._setButtonValue(e,this._buttonOptions,Hn.Options)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonShare",{get:function(){return this._buttonShare},set:function(e){this._buttonShare=this._setButtonValue(e,this._buttonShare,Hn.Share)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonL1",{get:function(){return this._buttonL1},set:function(e){this._buttonL1=this._setButtonValue(e,this._buttonL1,Hn.L1)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonR1",{get:function(){return this._buttonR1},set:function(e){this._buttonR1=this._setButtonValue(e,this._buttonR1,Hn.R1)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonLeftStick",{get:function(){return this._buttonLeftStick},set:function(e){this._buttonLeftStick=this._setButtonValue(e,this._buttonLeftStick,Hn.LeftStick)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonRightStick",{get:function(){return this._buttonRightStick},set:function(e){this._buttonRightStick=this._setButtonValue(e,this._buttonRightStick,Hn.RightStick)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dPadUp",{get:function(){return this._dPadUp},set:function(e){this._dPadUp=this._setDPadValue(e,this._dPadUp,$i.Up)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dPadDown",{get:function(){return this._dPadDown},set:function(e){this._dPadDown=this._setDPadValue(e,this._dPadDown,$i.Down)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dPadLeft",{get:function(){return this._dPadLeft},set:function(e){this._dPadLeft=this._setDPadValue(e,this._dPadLeft,$i.Left)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dPadRight",{get:function(){return this._dPadRight},set:function(e){this._dPadRight=this._setDPadValue(e,this._dPadRight,$i.Right)},enumerable:!1,configurable:!0}),t.prototype.update=function(){r.prototype.update.call(this),this.buttonCross=this.browserGamepad.buttons[0].value,this.buttonCircle=this.browserGamepad.buttons[1].value,this.buttonSquare=this.browserGamepad.buttons[2].value,this.buttonTriangle=this.browserGamepad.buttons[3].value,this.buttonL1=this.browserGamepad.buttons[4].value,this.buttonR1=this.browserGamepad.buttons[5].value,this.leftTrigger=this.browserGamepad.buttons[6].value,this.rightTrigger=this.browserGamepad.buttons[7].value,this.buttonShare=this.browserGamepad.buttons[8].value,this.buttonOptions=this.browserGamepad.buttons[9].value,this.buttonLeftStick=this.browserGamepad.buttons[10].value,this.buttonRightStick=this.browserGamepad.buttons[11].value,this.dPadUp=this.browserGamepad.buttons[12].value,this.dPadDown=this.browserGamepad.buttons[13].value,this.dPadLeft=this.browserGamepad.buttons[14].value,this.dPadRight=this.browserGamepad.buttons[15].value},t.prototype.dispose=function(){r.prototype.dispose.call(this),this.onButtonDownObservable.clear(),this.onButtonUpObservable.clear(),this.onPadDownObservable.clear(),this.onPadUpObservable.clear()},t}(hn),Il=function(){function r(t){var e=this;if(this._scene=t,this._babylonGamepads=[],this._oneGamepadConnected=!1,this._isMonitoring=!1,this.onGamepadDisconnectedObservable=new R.c,cs.a.IsWindowObjectExist()?(this._gamepadEventSupported="GamepadEvent"in window,this._gamepadSupport=navigator.getGamepads||navigator.webkitGetGamepads||navigator.msGetGamepads||navigator.webkitGamepads):this._gamepadEventSupported=!1,this.onGamepadConnectedObservable=new R.c(function(i){for(var o in e._babylonGamepads){var a=e._babylonGamepads[o];a&&a._isConnected&&e.onGamepadConnectedObservable.notifyObserver(i,a)}}),this._onGamepadConnectedEvent=function(i){var o,a=i.gamepad;a.index in e._babylonGamepads&&e._babylonGamepads[a.index].isConnected||(e._babylonGamepads[a.index]?((o=e._babylonGamepads[a.index]).browserGamepad=a,o._isConnected=!0):o=e._addNewGamepad(a),e.onGamepadConnectedObservable.notifyObservers(o),e._startMonitoringGamepads())},this._onGamepadDisconnectedEvent=function(i){var o=i.gamepad;for(var a in e._babylonGamepads)if(e._babylonGamepads[a].index===o.index){var s=e._babylonGamepads[a];s._isConnected=!1,e.onGamepadDisconnectedObservable.notifyObservers(s),s.dispose&&s.dispose();break}},this._gamepadSupport)if(this._updateGamepadObjects(),this._babylonGamepads.length&&this._startMonitoringGamepads(),this._gamepadEventSupported){var n=this._scene?this._scene.getEngine().getHostWindow():window;n&&(n.addEventListener("gamepadconnected",this._onGamepadConnectedEvent,!1),n.addEventListener("gamepaddisconnected",this._onGamepadDisconnectedEvent,!1))}else this._startMonitoringGamepads()}return Object.defineProperty(r.prototype,"gamepads",{get:function(){return this._babylonGamepads},enumerable:!1,configurable:!0}),r.prototype.getGamepadByType=function(t){t===void 0&&(t=hn.XBOX);for(var e=0,n=this._babylonGamepads;e1&&(p=a.generateStencil?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT24),o.is2DArray?e.texImage3D(i,0,p,o.width,o.height,n,0,d,s,null):e.texImage2D(i,0,p,o.width,o.height,0,d,s,null),this._bindTextureDirectly(i,null),o};var _t=function(){function r(t,e,n,i,o,a,s,d,p,b,x,O,B,F,z){s===void 0&&(s=h.a.TEXTURE_NEAREST_SAMPLINGMODE),b===void 0&&(b=null),x===void 0&&(x=h.a.TEXTURETYPE_UNSIGNED_INT),O===void 0&&(O="postprocess"),F===void 0&&(F=!1),z===void 0&&(z=h.a.TEXTUREFORMAT_RGBA),this.width=-1,this.height=-1,this.nodeMaterialSource=null,this._outputTexture=null,this.autoClear=!0,this.alphaMode=h.a.ALPHA_DISABLE,this.animations=new Array,this.enablePixelPerfectMode=!1,this.forceFullscreenViewport=!0,this.scaleMode=h.a.SCALEMODE_FLOOR,this.alwaysForcePOT=!1,this._samples=1,this.adaptScaleToCurrentViewport=!1,this._reusable=!1,this._textures=new di.a(2),this._currentRenderTextureInd=0,this._scaleRatio=new u.d(1,1),this._texelSize=u.d.Zero(),this.onActivateObservable=new R.c,this.onSizeChangedObservable=new R.c,this.onApplyObservable=new R.c,this.onBeforeRenderObservable=new R.c,this.onAfterRenderObservable=new R.c,this.name=t,a!=null?(this._camera=a,this._scene=a.getScene(),a.attachPostProcess(this),this._engine=this._scene.getEngine(),this._scene.postProcesses.push(this),this.uniqueId=this._scene.getUniqueId()):d&&(this._engine=d,this._engine.postProcesses.push(this)),this._options=o,this.renderTargetSamplingMode=s||h.a.TEXTURE_NEAREST_SAMPLINGMODE,this._reusable=p||!1,this._textureType=x,this._textureFormat=z,this._samplers=i||[],this._samplers.push("textureSampler"),this._fragmentUrl=e,this._vertexUrl=O,this._parameters=n||[],this._parameters.push("scale"),this._indexParameters=B,F||this.updateEffect(b)}return Object.defineProperty(r.prototype,"samples",{get:function(){return this._samples},set:function(t){var e=this;this._samples=Math.min(t,this._engine.getCaps().maxMSAASamples),this._textures.forEach(function(n){n.samples!==e._samples&&e._engine.updateRenderTargetTextureSampleCount(n,e._samples)})},enumerable:!1,configurable:!0}),r.prototype.getEffectName=function(){return this._fragmentUrl},Object.defineProperty(r.prototype,"onActivate",{set:function(t){this._onActivateObserver&&this.onActivateObservable.remove(this._onActivateObserver),t&&(this._onActivateObserver=this.onActivateObservable.add(t))},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onSizeChanged",{set:function(t){this._onSizeChangedObserver&&this.onSizeChangedObservable.remove(this._onSizeChangedObserver),this._onSizeChangedObserver=this.onSizeChangedObservable.add(t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onApply",{set:function(t){this._onApplyObserver&&this.onApplyObservable.remove(this._onApplyObserver),this._onApplyObserver=this.onApplyObservable.add(t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onBeforeRender",{set:function(t){this._onBeforeRenderObserver&&this.onBeforeRenderObservable.remove(this._onBeforeRenderObserver),this._onBeforeRenderObserver=this.onBeforeRenderObservable.add(t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onAfterRender",{set:function(t){this._onAfterRenderObserver&&this.onAfterRenderObservable.remove(this._onAfterRenderObserver),this._onAfterRenderObserver=this.onAfterRenderObservable.add(t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"inputTexture",{get:function(){return this._textures.data[this._currentRenderTextureInd]},set:function(t){this._forcedOutputTexture=t},enumerable:!1,configurable:!0}),r.prototype.restoreDefaultInputTexture=function(){this._forcedOutputTexture=null},r.prototype.getCamera=function(){return this._camera},Object.defineProperty(r.prototype,"texelSize",{get:function(){return this._shareOutputWithPostProcess?this._shareOutputWithPostProcess.texelSize:(this._forcedOutputTexture&&this._texelSize.copyFromFloats(1/this._forcedOutputTexture.width,1/this._forcedOutputTexture.height),this._texelSize)},enumerable:!1,configurable:!0}),r.prototype.getClassName=function(){return"PostProcess"},r.prototype.getEngine=function(){return this._engine},r.prototype.getEffect=function(){return this._effect},r.prototype.shareOutputWith=function(t){return this._disposeTextures(),this._shareOutputWithPostProcess=t,this},r.prototype.useOwnOutput=function(){this._textures.length==0&&(this._textures=new di.a(2)),this._shareOutputWithPostProcess=null},r.prototype.updateEffect=function(t,e,n,i,o,a,s,d){t===void 0&&(t=null),e===void 0&&(e=null),n===void 0&&(n=null),this._effect=this._engine.createEffect({vertex:s??this._vertexUrl,fragment:d??this._fragmentUrl},["position"],e||this._parameters,n||this._samplers,t!==null?t:"",void 0,o,a,i||this._indexParameters)},r.prototype.isReusable=function(){return this._reusable},r.prototype.markTextureDirty=function(){this.width=-1},r.prototype.activate=function(t,e,n){var i=this;e===void 0&&(e=null);var o=(t=t||this._camera).getScene(),a=o.getEngine(),s=a.getCaps().maxTextureSize,d=(e?e.width:this._engine.getRenderWidth(!0))*this._options|0,p=(e?e.height:this._engine.getRenderHeight(!0))*this._options|0,b=t.parent;!b||b.leftCamera!=t&&b.rightCamera!=t||(d/=2);var x,O=this._options.width||d,B=this._options.height||p,F=this.renderTargetSamplingMode!==h.a.TEXTURE_NEAREST_LINEAR&&this.renderTargetSamplingMode!==h.a.TEXTURE_NEAREST_NEAREST&&this.renderTargetSamplingMode!==h.a.TEXTURE_LINEAR_LINEAR;if(!this._shareOutputWithPostProcess&&!this._forcedOutputTexture){if(this.adaptScaleToCurrentViewport){var z=a.currentViewport;z&&(O*=z.width,B*=z.height)}if((F||this.alwaysForcePOT)&&(this._options.width||(O=a.needPOTTextures?Ue.a.GetExponentOfTwo(O,s,this.scaleMode):O),this._options.height||(B=a.needPOTTextures?Ue.a.GetExponentOfTwo(B,s,this.scaleMode):B)),this.width!==O||this.height!==B){if(this._textures.length>0){for(var J=0;J0)for(var t=0;t0){var n=this._camera._getFirstPostProcess();n&&n.markTextureDirty()}this.onActivateObservable.clear(),this.onAfterRenderObservable.clear(),this.onApplyObservable.clear(),this.onBeforeRenderObservable.clear(),this.onSizeChangedObservable.clear()}},r.prototype.serialize=function(){var t=L.a.Serialize(this);return t.customType="BABYLON."+this.getClassName(),t.cameraId=this.getCamera().id,t.reusable=this._reusable,t.options=this._options,t.textureType=this._textureType,t},r.Parse=function(t,e,n){var i=C.a.GetClass(t.customType);if(!i||!i._Parse)return null;var o=e.getCameraByID(t.cameraId);return o?i._Parse(t,o,e,n):null},Object(c.c)([Object(L.c)()],r.prototype,"uniqueId",void 0),Object(c.c)([Object(L.c)()],r.prototype,"name",void 0),Object(c.c)([Object(L.c)()],r.prototype,"width",void 0),Object(c.c)([Object(L.c)()],r.prototype,"height",void 0),Object(c.c)([Object(L.c)()],r.prototype,"renderTargetSamplingMode",void 0),Object(c.c)([Object(L.f)()],r.prototype,"clearColor",void 0),Object(c.c)([Object(L.c)()],r.prototype,"autoClear",void 0),Object(c.c)([Object(L.c)()],r.prototype,"alphaMode",void 0),Object(c.c)([Object(L.c)()],r.prototype,"alphaConstants",void 0),Object(c.c)([Object(L.c)()],r.prototype,"enablePixelPerfectMode",void 0),Object(c.c)([Object(L.c)()],r.prototype,"forceFullscreenViewport",void 0),Object(c.c)([Object(L.c)()],r.prototype,"scaleMode",void 0),Object(c.c)([Object(L.c)()],r.prototype,"alwaysForcePOT",void 0),Object(c.c)([Object(L.c)("samples")],r.prototype,"_samples",void 0),Object(c.c)([Object(L.c)()],r.prototype,"adaptScaleToCurrentViewport",void 0),r}();C.a.RegisteredTypes["BABYLON.PostProcess"]=_t;var kf=` +varying vec2 vUV; +uniform sampler2D textureSampler; +void main(void) +{ +gl_FragColor=texture2D(textureSampler,vUV); +}`;ze.a.ShadersStore.passPixelShader=kf;var Gf=` +varying vec2 vUV; +uniform samplerCube textureSampler; +void main(void) +{ +vec2 uv=vUV*2.0-1.0; +#ifdef POSITIVEX +gl_FragColor=textureCube(textureSampler,vec3(1.001,uv.y,uv.x)); +#endif +#ifdef NEGATIVEX +gl_FragColor=textureCube(textureSampler,vec3(-1.001,uv.y,uv.x)); +#endif +#ifdef POSITIVEY +gl_FragColor=textureCube(textureSampler,vec3(uv.y,1.001,uv.x)); +#endif +#ifdef NEGATIVEY +gl_FragColor=textureCube(textureSampler,vec3(uv.y,-1.001,uv.x)); +#endif +#ifdef POSITIVEZ +gl_FragColor=textureCube(textureSampler,vec3(uv,1.001)); +#endif +#ifdef NEGATIVEZ +gl_FragColor=textureCube(textureSampler,vec3(uv,-1.001)); +#endif +}`;ze.a.ShadersStore.passCubePixelShader=Gf;var wi=function(r){function t(e,n,i,o,a,s,d,p){return i===void 0&&(i=null),d===void 0&&(d=h.a.TEXTURETYPE_UNSIGNED_INT),p===void 0&&(p=!1),r.call(this,e,"pass",null,null,n,i,o,a,s,void 0,d,void 0,null,p)||this}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"PassPostProcess"},t._Parse=function(e,n,i,o){return L.a.Parse(function(){return new t(e.name,e.options,n,e.renderTargetSamplingMode,i.getEngine(),e.reusable)},e,i,o)},t}(_t);C.a.RegisteredTypes["BABYLON.PassPostProcess"]=wi;var zf=function(r){function t(e,n,i,o,a,s,d,p){i===void 0&&(i=null),d===void 0&&(d=h.a.TEXTURETYPE_UNSIGNED_INT),p===void 0&&(p=!1);var b=r.call(this,e,"passCube",null,null,n,i,o,a,s,"#define POSITIVEX",d,void 0,null,p)||this;return b._face=0,b}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"face",{get:function(){return this._face},set:function(e){if(!(e<0||e>5))switch(this._face=e,this._face){case 0:this.updateEffect("#define POSITIVEX");break;case 1:this.updateEffect("#define NEGATIVEX");break;case 2:this.updateEffect("#define POSITIVEY");break;case 3:this.updateEffect("#define NEGATIVEY");break;case 4:this.updateEffect("#define POSITIVEZ");break;case 5:this.updateEffect("#define NEGATIVEZ")}},enumerable:!1,configurable:!0}),t.prototype.getClassName=function(){return"PassCubePostProcess"},t._Parse=function(e,n,i,o){return L.a.Parse(function(){return new t(e.name,e.options,n,e.renderTargetSamplingMode,i.getEngine(),e.reusable)},e,i,o)},t}(_t);Ue.a._RescalePostProcessFactory=function(r){return new wi("rescale",1,null,h.a.TEXTURE_BILINEAR_SAMPLINGMODE,r,!1,h.a.TEXTURETYPE_UNSIGNED_INT)};var jf=` +varying vec2 vUV; +uniform sampler2D textureSampler; +uniform sampler2D leftSampler; +void main(void) +{ +vec4 leftFrag=texture2D(leftSampler,vUV); +leftFrag=vec4(1.0,leftFrag.g,leftFrag.b,1.0); +vec4 rightFrag=texture2D(textureSampler,vUV); +rightFrag=vec4(rightFrag.r,1.0,1.0,1.0); +gl_FragColor=vec4(rightFrag.rgb*leftFrag.rgb,1.0); +}`;ze.a.ShadersStore.anaglyphPixelShader=jf;var ls=function(r){function t(e,n,i,o,a,s){var d=r.call(this,e,"anaglyph",null,["leftSampler"],n,i[1],o,a,s)||this;return d._passedProcess=i[0]._rigPostProcess,d.onApplyObservable.add(function(p){p.setTextureFromPostProcess("leftSampler",d._passedProcess)}),d}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"AnaglyphPostProcess"},t}(_t);C.a.RegisteredTypes["BABYLON.AnaglyphPostProcess"]=ls,gt.a._setStereoscopicAnaglyphRigMode=function(r){r._rigCameras[0]._rigPostProcess=new wi(r.name+"_passthru",1,r._rigCameras[0]),r._rigCameras[1]._rigPostProcess=new ls(r.name+"_anaglyph",1,r._rigCameras)},Q.a.AddNodeConstructor("AnaglyphArcRotateCamera",function(r,t,e){return function(){return new Nl(r,0,0,1,u.e.Zero(),e.interaxial_distance,t)}});var Nl=function(r){function t(e,n,i,o,a,s,d){var p=r.call(this,e,n,i,o,a,d)||this;return p.interaxialDistance=s,p.setCameraRigMode(gt.a.RIG_MODE_STEREOSCOPIC_ANAGLYPH,{interaxialDistance:s}),p}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"AnaglyphArcRotateCamera"},t}(Zi);Q.a.AddNodeConstructor("AnaglyphFreeCamera",function(r,t,e){return function(){return new wl(r,u.e.Zero(),e.interaxial_distance,t)}});var wl=function(r){function t(e,n,i,o){var a=r.call(this,e,n,o)||this;return a.interaxialDistance=i,a.setCameraRigMode(gt.a.RIG_MODE_STEREOSCOPIC_ANAGLYPH,{interaxialDistance:i}),a}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"AnaglyphFreeCamera"},t}(Yn);Q.a.AddNodeConstructor("AnaglyphGamepadCamera",function(r,t,e){return function(){return new Fl(r,u.e.Zero(),e.interaxial_distance,t)}});var Fl=function(r){function t(e,n,i,o){var a=r.call(this,e,n,o)||this;return a.interaxialDistance=i,a.setCameraRigMode(gt.a.RIG_MODE_STEREOSCOPIC_ANAGLYPH,{interaxialDistance:i}),a}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"AnaglyphGamepadCamera"},t}(Uo);Q.a.AddNodeConstructor("AnaglyphUniversalCamera",function(r,t,e){return function(){return new Bl(r,u.e.Zero(),e.interaxial_distance,t)}});var Bl=function(r){function t(e,n,i,o){var a=r.call(this,e,n,o)||this;return a.interaxialDistance=i,a.setCameraRigMode(gt.a.RIG_MODE_STEREOSCOPIC_ANAGLYPH,{interaxialDistance:i}),a}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"AnaglyphUniversalCamera"},t}(_r),Kn=f(58);gt.a._setStereoscopicRigMode=function(r){var t=r.cameraRigMode===gt.a.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL||r.cameraRigMode===gt.a.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED,e=r.cameraRigMode===gt.a.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED;r._rigCameras[e?1:0].viewport=new Kn.a(0,0,t?.5:1,t?1:.5),r._rigCameras[e?0:1].viewport=new Kn.a(t?.5:0,t?0:.5,t?.5:1,t?1:.5)},Q.a.AddNodeConstructor("StereoscopicArcRotateCamera",function(r,t,e){return function(){return new Ul(r,0,0,1,u.e.Zero(),e.interaxial_distance,e.isStereoscopicSideBySide,t)}});var Ul=function(r){function t(e,n,i,o,a,s,d,p){var b=r.call(this,e,n,i,o,a,p)||this;return b.interaxialDistance=s,b.isStereoscopicSideBySide=d,b.setCameraRigMode(d?gt.a.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:gt.a.RIG_MODE_STEREOSCOPIC_OVERUNDER,{interaxialDistance:s}),b}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"StereoscopicArcRotateCamera"},t}(Zi);Q.a.AddNodeConstructor("StereoscopicFreeCamera",function(r,t,e){return function(){return new Vl(r,u.e.Zero(),e.interaxial_distance,e.isStereoscopicSideBySide,t)}});var Vl=function(r){function t(e,n,i,o,a){var s=r.call(this,e,n,a)||this;return s.interaxialDistance=i,s.isStereoscopicSideBySide=o,s.setCameraRigMode(o?gt.a.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:gt.a.RIG_MODE_STEREOSCOPIC_OVERUNDER,{interaxialDistance:i}),s}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"StereoscopicFreeCamera"},t}(Yn);Q.a.AddNodeConstructor("StereoscopicGamepadCamera",function(r,t,e){return function(){return new kl(r,u.e.Zero(),e.interaxial_distance,e.isStereoscopicSideBySide,t)}});var kl=function(r){function t(e,n,i,o,a){var s=r.call(this,e,n,a)||this;return s.interaxialDistance=i,s.isStereoscopicSideBySide=o,s.setCameraRigMode(o?gt.a.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:gt.a.RIG_MODE_STEREOSCOPIC_OVERUNDER,{interaxialDistance:i}),s}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"StereoscopicGamepadCamera"},t}(Uo);Q.a.AddNodeConstructor("StereoscopicFreeCamera",function(r,t,e){return function(){return new Gl(r,u.e.Zero(),e.interaxial_distance,e.isStereoscopicSideBySide,t)}});var Gl=function(r){function t(e,n,i,o,a){var s=r.call(this,e,n,a)||this;return s.interaxialDistance=i,s.isStereoscopicSideBySide=o,s.setCameraRigMode(o?gt.a.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:gt.a.RIG_MODE_STEREOSCOPIC_OVERUNDER,{interaxialDistance:i}),s}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"StereoscopicUniversalCamera"},t}(_r);Q.a.AddNodeConstructor("VirtualJoysticksCamera",function(r,t){return function(){return new zl(r,u.e.Zero(),t)}});var zl=function(r){function t(e,n,i){var o=r.call(this,e,n,i)||this;return o.inputs.addVirtualJoystick(),o}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"VirtualJoysticksCamera"},t}(Yn),mr=function(){function r(){this.compensateDistortion=!0,this.multiviewEnabled=!1}return Object.defineProperty(r.prototype,"aspectRatio",{get:function(){return this.hResolution/(2*this.vResolution)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"aspectRatioFov",{get:function(){return 2*Math.atan(this.postProcessScaleFactor*this.vScreenSize/(2*this.eyeToScreenDistance))},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"leftHMatrix",{get:function(){var t=4*(this.hScreenSize/4-this.lensSeparationDistance/2)/this.hScreenSize;return u.a.Translation(t,0,0)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"rightHMatrix",{get:function(){var t=4*(this.hScreenSize/4-this.lensSeparationDistance/2)/this.hScreenSize;return u.a.Translation(-t,0,0)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"leftPreViewMatrix",{get:function(){return u.a.Translation(.5*this.interpupillaryDistance,0,0)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"rightPreViewMatrix",{get:function(){return u.a.Translation(-.5*this.interpupillaryDistance,0,0)},enumerable:!1,configurable:!0}),r.GetDefault=function(){var t=new r;return t.hResolution=1280,t.vResolution=800,t.hScreenSize=.149759993,t.vScreenSize=.0935999975,t.vScreenCenter=.0467999987,t.eyeToScreenDistance=.0410000011,t.lensSeparationDistance=.063500002,t.interpupillaryDistance=.064000003,t.distortionK=[1,.219999999,.239999995,0],t.chromaAbCorrection=[.995999992,-.00400000019,1.01400006,0],t.postProcessScaleFactor=1.714605507808412,t.lensCenterOffset=.151976421,t},r}(),Hf=` +varying vec2 vUV; +uniform sampler2D textureSampler; +uniform vec2 LensCenter; +uniform vec2 Scale; +uniform vec2 ScaleIn; +uniform vec4 HmdWarpParam; +vec2 HmdWarp(vec2 in01) { +vec2 theta=(in01-LensCenter)*ScaleIn; +float rSq=theta.x*theta.x+theta.y*theta.y; +vec2 rvector=theta*(HmdWarpParam.x+HmdWarpParam.y*rSq+HmdWarpParam.z*rSq*rSq+HmdWarpParam.w*rSq*rSq*rSq); +return LensCenter+Scale*rvector; +} +void main(void) +{ +vec2 tc=HmdWarp(vUV); +if (tc.x <0.0 || tc.x>1.0 || tc.y<0.0 || tc.y>1.0) +gl_FragColor=vec4(0.0,0.0,0.0,0.0); +else{ +gl_FragColor=texture2D(textureSampler,tc); +} +}`;ze.a.ShadersStore.vrDistortionCorrectionPixelShader=Hf;var us=function(r){function t(e,n,i,o){var a=r.call(this,e,"vrDistortionCorrection",["LensCenter","Scale","ScaleIn","HmdWarpParam"],null,o.postProcessScaleFactor,n,we.a.BILINEAR_SAMPLINGMODE)||this;return a._isRightEye=i,a._distortionFactors=o.distortionK,a._postProcessScaleFactor=o.postProcessScaleFactor,a._lensCenterOffset=o.lensCenterOffset,a.adaptScaleToCurrentViewport=!0,a.onSizeChangedObservable.add(function(){a._scaleIn=new u.d(2,2/a.aspectRatio),a._scaleFactor=new u.d(1/a._postProcessScaleFactor*.5,1/a._postProcessScaleFactor*.5*a.aspectRatio),a._lensCenter=new u.d(a._isRightEye?.5-.5*a._lensCenterOffset:.5+.5*a._lensCenterOffset,.5)}),a.onApplyObservable.add(function(s){s.setFloat2("LensCenter",a._lensCenter.x,a._lensCenter.y),s.setFloat2("Scale",a._scaleFactor.x,a._scaleFactor.y),s.setFloat2("ScaleIn",a._scaleIn.x,a._scaleIn.y),s.setFloat4("HmdWarpParam",a._distortionFactors[0],a._distortionFactors[1],a._distortionFactors[2],a._distortionFactors[3])}),a}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"VRDistortionCorrectionPostProcess"},t}(_t),Wf=`precision mediump sampler2DArray; +varying vec2 vUV; +uniform sampler2DArray multiviewSampler; +uniform int imageIndex; +void main(void) +{ +gl_FragColor=texture(multiviewSampler,vec3(vUV,imageIndex)); +}`;ze.a.ShadersStore.vrMultiviewToSingleviewPixelShader=Wf;var jl=f(85),hs=f(95),$r=f(96);Bt.a.prototype.createRenderTargetCubeTexture=function(r,t){var e=Object(c.a)({generateMipMaps:!0,generateDepthBuffer:!0,generateStencilBuffer:!1,type:h.a.TEXTURETYPE_UNSIGNED_INT,samplingMode:h.a.TEXTURE_TRILINEAR_SAMPLINGMODE,format:h.a.TEXTUREFORMAT_RGBA},t);e.generateStencilBuffer=e.generateDepthBuffer&&e.generateStencilBuffer,(e.type!==h.a.TEXTURETYPE_FLOAT||this._caps.textureFloatLinearFiltering)&&(e.type!==h.a.TEXTURETYPE_HALF_FLOAT||this._caps.textureHalfFloatLinearFiltering)||(e.samplingMode=h.a.TEXTURE_NEAREST_SAMPLINGMODE);var n=this._gl,i=new Ct.a(this,Ct.b.RenderTarget);this._bindTextureDirectly(n.TEXTURE_CUBE_MAP,i,!0);var o=this._getSamplingParameters(e.samplingMode,e.generateMipMaps);e.type!==h.a.TEXTURETYPE_FLOAT||this._caps.textureFloat||(e.type=h.a.TEXTURETYPE_UNSIGNED_INT,l.a.Warn("Float textures are not supported. Cube render target forced to TEXTURETYPE_UNESIGNED_BYTE type")),n.texParameteri(n.TEXTURE_CUBE_MAP,n.TEXTURE_MAG_FILTER,o.mag),n.texParameteri(n.TEXTURE_CUBE_MAP,n.TEXTURE_MIN_FILTER,o.min),n.texParameteri(n.TEXTURE_CUBE_MAP,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_CUBE_MAP,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE);for(var a=0;a<6;a++)n.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+a,0,this._getRGBABufferInternalSizedFormat(e.type,e.format),r,r,0,this._getInternalFormat(e.format),this._getWebGLTextureType(e.type),null);var s=n.createFramebuffer();return this._bindUnboundFramebuffer(s),i._depthStencilBuffer=this._setupFramebufferDepthAttachments(e.generateStencilBuffer,e.generateDepthBuffer,r,r),e.generateMipMaps&&n.generateMipmap(n.TEXTURE_CUBE_MAP),this._bindTextureDirectly(n.TEXTURE_CUBE_MAP,null),this._bindUnboundFramebuffer(null),i._framebuffer=s,i.width=r,i.height=r,i.isReady=!0,i.isCube=!0,i.samples=1,i.generateMipMaps=e.generateMipMaps,i.samplingMode=e.samplingMode,i.type=e.type,i.format=e.format,i._generateDepthBuffer=e.generateDepthBuffer,i._generateStencilBuffer=e.generateStencilBuffer,this._internalTexturesCache.push(i),i};var sn=function(r){function t(e,n,i,o,a,s,d,p,b,x,O,B,F){a===void 0&&(a=!0),s===void 0&&(s=h.a.TEXTURETYPE_UNSIGNED_INT),d===void 0&&(d=!1),p===void 0&&(p=we.a.TRILINEAR_SAMPLINGMODE),b===void 0&&(b=!0),x===void 0&&(x=!1),O===void 0&&(O=!1),B===void 0&&(B=h.a.TEXTUREFORMAT_RGBA),F===void 0&&(F=!1);var z=r.call(this,null,i,!o)||this;return z.renderParticles=!0,z.renderSprites=!1,z.ignoreCameraViewport=!1,z.onBeforeBindObservable=new R.c,z.onAfterUnbindObservable=new R.c,z.onBeforeRenderObservable=new R.c,z.onAfterRenderObservable=new R.c,z.onClearObservable=new R.c,z.onResizeObservable=new R.c,z._currentRefreshId=-1,z._refreshRate=1,z._samples=1,z.boundingBoxPosition=u.e.Zero(),(i=z.getScene())&&(z._coordinatesMode=we.a.PROJECTION_MODE,z.renderList=new Array,z.name=e,z.isRenderTarget=!0,z._initialSizeParameter=n,z._processSizeParameter(n),z._resizeObserver=z.getScene().getEngine().onResizeObservable.add(function(){}),z._generateMipMaps=!!o,z._doNotChangeAspectRatio=a,z._renderingManager=new $r.b(i),z._renderingManager._useSceneAutoClearSetup=!0,O||(z._renderTargetOptions={generateMipMaps:o,type:s,format:B,samplingMode:p,generateDepthBuffer:b,generateStencilBuffer:x},p===we.a.NEAREST_SAMPLINGMODE&&(z.wrapU=we.a.CLAMP_ADDRESSMODE,z.wrapV=we.a.CLAMP_ADDRESSMODE),F||(d?(z._texture=i.getEngine().createRenderTargetCubeTexture(z.getRenderSize(),z._renderTargetOptions),z.coordinatesMode=we.a.INVCUBIC_MODE,z._textureMatrix=u.a.Identity()):z._texture=i.getEngine().createRenderTargetTexture(z._size,z._renderTargetOptions)))),z}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"renderList",{get:function(){return this._renderList},set:function(e){this._renderList=e,this._renderList&&this._hookArray(this._renderList)},enumerable:!1,configurable:!0}),t.prototype._hookArray=function(e){var n=this,i=e.push;e.push=function(){for(var a=[],s=0;s0&&(this._postProcesses[0].autoClear=!1))}},t.prototype._shouldRender=function(){return this._currentRefreshId===-1||this.refreshRate===this._currentRefreshId?(this._currentRefreshId=1,!0):(this._currentRefreshId++,!1)},t.prototype.getRenderSize=function(){return this.getRenderWidth()},t.prototype.getRenderWidth=function(){return this._size.width?this._size.width:this._size},t.prototype.getRenderHeight=function(){return this._size.width?this._size.height:this._size},t.prototype.getRenderLayers=function(){var e=this._size.layers;return e||0},Object.defineProperty(t.prototype,"canRescale",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype.scale=function(e){var n=Math.max(1,this.getRenderSize()*e);this.resize(n)},t.prototype.getReflectionTextureMatrix=function(){return this.isCube?this._textureMatrix:r.prototype.getReflectionTextureMatrix.call(this)},t.prototype.resize=function(e){var n=this.isCube;this.releaseInternalTexture();var i=this.getScene();i&&(this._processSizeParameter(e),this._texture=n?i.getEngine().createRenderTargetCubeTexture(this.getRenderSize(),this._renderTargetOptions):i.getEngine().createRenderTargetTexture(this._size,this._renderTargetOptions),this.onResizeObservable.hasObservers()&&this.onResizeObservable.notifyObservers(this))},t.prototype.render=function(e,n){if(e===void 0&&(e=!1),n===void 0&&(n=!1),p=this.getScene()){var i,o=p.getEngine();if(this.useCameraPostProcesses!==void 0&&(e=this.useCameraPostProcesses),this._waitingRenderList){this.renderList=[];for(var a=0;a1||this.activeCamera&&this.activeCamera!==p.activeCamera)&&p.setTransformMatrix(p.activeCamera.getViewMatrix(),p.activeCamera.getProjectionMatrix(!0)),o.setViewport(p.activeCamera.viewport)),p.resetCachedMaterial()}},t.prototype._bestReflectionRenderTargetDimension=function(e,n){var i=e*n,o=Ue.a.NearestPOT(i+16384/(128+i));return Math.min(Ue.a.FloorPOT(e),o)},t.prototype._prepareRenderingManager=function(e,n,i,o){var a=this.getScene();if(a){this._renderingManager.reset();for(var s=a.getRenderId(),d=0;d=0&&this._renderingManager.dispatchParticles(z)}}},t.prototype._bindFrameBuffer=function(e,n){e===void 0&&(e=0),n===void 0&&(n=0);var i=this.getScene();if(i){var o=i.getEngine();this._texture&&o.bindFramebuffer(this._texture,this.isCube?e:void 0,void 0,void 0,this.ignoreCameraViewport,0,n)}},t.prototype.unbindFrameBuffer=function(e,n){var i=this;this._texture&&e.unBindFramebuffer(this._texture,this.isCube,function(){i.onAfterRenderObservable.notifyObservers(n)})},t.prototype.renderToTarget=function(e,n,i,o,a){o===void 0&&(o=0),a===void 0&&(a=null);var s=this.getScene();if(s){var d=s.getEngine();if(this._texture){this._postProcessManager?this._postProcessManager._prepareFrame(this._texture,this._postProcesses):n&&s.postProcessManager._prepareFrame(this._texture)||this._bindFrameBuffer(e,o),this.is2DArray?this.onBeforeRenderObservable.notifyObservers(o):this.onBeforeRenderObservable.notifyObservers(e);var p=null,b=this.renderList?this.renderList:s.getActiveMeshes().data,x=this.renderList?this.renderList.length:s.getActiveMeshes().length;this.getCustomRenderList&&(p=this.getCustomRenderList(this.is2DArray?o:e,b,x)),p?this._prepareRenderingManager(p,p.length,a,!1):(this._defaultRenderListPrepared||(this._prepareRenderingManager(b,x,a,!this.renderList),this._defaultRenderListPrepared=!0),p=b),this.onClearObservable.hasObservers()?this.onClearObservable.notifyObservers(d):d.clear(this.clearColor||s.clearColor,!0,!0,!0),this._doNotChangeAspectRatio||s.updateTransformMatrix(!0);for(var O=0,B=s._beforeRenderTargetDrawStage;O=0&&e.customRenderTargets.splice(n,1);for(var i=0,o=e.cameras;i=0&&a.customRenderTargets.splice(n,1)}this.depthStencilTexture&&this.getScene().getEngine()._releaseTexture(this.depthStencilTexture),r.prototype.dispose.call(this)}},t.prototype._rebuild=function(){this.refreshRate===t.REFRESHRATE_RENDER_ONCE&&(this.refreshRate=t.REFRESHRATE_RENDER_ONCE),this._postProcessManager&&this._postProcessManager._rebuild()},t.prototype.freeRenderingGroups=function(){this._renderingManager&&this._renderingManager.freeRenderingGroups()},t.prototype.getViewCount=function(){return 1},t.REFRESHRATE_RENDER_ONCE=0,t.REFRESHRATE_RENDER_ONEVERYFRAME=1,t.REFRESHRATE_RENDER_ONEVERYTWOFRAMES=2,t}(we.a);we.a._CreateRenderTargetTexture=function(r,t,e,n){return new sn(r,t,e,n)};var Hl=function(r){function t(e,n){n===void 0&&(n=512);var i=r.call(this,"multiview rtt",n,e,!1,!0,Ct.b.Unknown,!1,void 0,!1,!1,!0,void 0,!0)||this,o=e.getEngine().createMultiviewRenderTargetTexture(i.getRenderWidth(),i.getRenderHeight());return o.isMultiview=!0,o.format=h.a.TEXTUREFORMAT_RGBA,i._texture=o,i.samples=i._getEngine().getCaps().maxSamples||i.samples,i}return Object(c.d)(t,r),t.prototype._bindFrameBuffer=function(e){this._texture&&this.getScene().getEngine().bindMultiviewFramebuffer(this._texture)},t.prototype.getViewCount=function(){return 2},t}(sn),Wl=f(90);Ue.a.prototype.createMultiviewRenderTargetTexture=function(r,t){var e=this._gl;if(!this.getCaps().multiview)throw"Multiview is not supported";var n=new Ct.a(this,Ct.b.Unknown,!0);return n.width=r,n.height=t,n._framebuffer=e.createFramebuffer(),n._colorTextureArray=e.createTexture(),e.bindTexture(e.TEXTURE_2D_ARRAY,n._colorTextureArray),e.texStorage3D(e.TEXTURE_2D_ARRAY,1,e.RGBA8,r,t,2),n._depthStencilTextureArray=e.createTexture(),e.bindTexture(e.TEXTURE_2D_ARRAY,n._depthStencilTextureArray),e.texStorage3D(e.TEXTURE_2D_ARRAY,1,e.DEPTH32F_STENCIL8,r,t,2),n.isReady=!0,n},Ue.a.prototype.bindMultiviewFramebuffer=function(r){var t=this._gl,e=this.getCaps().oculusMultiview||this.getCaps().multiview;if(this.bindFramebuffer(r,void 0,void 0,void 0,!0),t.bindFramebuffer(t.DRAW_FRAMEBUFFER,r._framebuffer),!r._colorTextureArray||!r._depthStencilTextureArray)throw"Invalid multiview frame buffer";this.getCaps().oculusMultiview?(e.framebufferTextureMultisampleMultiviewOVR(t.DRAW_FRAMEBUFFER,t.COLOR_ATTACHMENT0,r._colorTextureArray,0,r.samples,0,2),e.framebufferTextureMultisampleMultiviewOVR(t.DRAW_FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,r._depthStencilTextureArray,0,r.samples,0,2)):(e.framebufferTextureMultiviewOVR(t.DRAW_FRAMEBUFFER,t.COLOR_ATTACHMENT0,r._colorTextureArray,0,0,2),e.framebufferTextureMultiviewOVR(t.DRAW_FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,r._depthStencilTextureArray,0,0,2))},gt.a.prototype._useMultiviewToSingleView=!1,gt.a.prototype._multiviewTexture=null,gt.a.prototype._resizeOrCreateMultiviewTexture=function(r,t){this._multiviewTexture?this._multiviewTexture.getRenderWidth()==r&&this._multiviewTexture.getRenderHeight()==t||(this._multiviewTexture.dispose(),this._multiviewTexture=new Hl(this.getScene(),{width:r,height:t})):this._multiviewTexture=new Hl(this.getScene(),{width:r,height:t})},_e.a.prototype._transformMatrixR=u.a.Zero(),_e.a.prototype._multiviewSceneUbo=null,_e.a.prototype._createMultiviewUbo=function(){this._multiviewSceneUbo=new jl.a(this.getEngine(),void 0,!0),this._multiviewSceneUbo.addUniform("viewProjection",16),this._multiviewSceneUbo.addUniform("viewProjectionR",16),this._multiviewSceneUbo.addUniform("view",16)},_e.a.prototype._updateMultiviewUbo=function(r,t){r&&t&&r.multiplyToRef(t,this._transformMatrixR),r&&t&&(r.multiplyToRef(t,u.c.Matrix[0]),Wl.a.GetRightPlaneToRef(u.c.Matrix[0],this._frustumPlanes[3])),this._multiviewSceneUbo&&(this._multiviewSceneUbo.updateMatrix("viewProjection",this.getTransformMatrix()),this._multiviewSceneUbo.updateMatrix("viewProjectionR",this._transformMatrixR),this._multiviewSceneUbo.updateMatrix("view",this._viewMatrix),this._multiviewSceneUbo.update())},_e.a.prototype._renderMultiviewToSingleView=function(r){r._resizeOrCreateMultiviewTexture(r._rigPostProcess&&r._rigPostProcess&&r._rigPostProcess.width>0?r._rigPostProcess.width:this.getEngine().getRenderWidth(!0),r._rigPostProcess&&r._rigPostProcess&&r._rigPostProcess.height>0?r._rigPostProcess.height:this.getEngine().getRenderHeight(!0)),this._multiviewSceneUbo||this._createMultiviewUbo(),r.outputRenderTarget=r._multiviewTexture,this._renderForCamera(r),r.outputRenderTarget=null;for(var t=0;t=2&&e.onControllersAttachedObservable.notifyObservers(e.controllers)}}})},t}(Yn),Fi=function(r){function t(e){var n=r.call(this,e)||this;return n.onTriggerStateChangedObservable=new R.c,n.onMainButtonStateChangedObservable=new R.c,n.onSecondaryButtonStateChangedObservable=new R.c,n.onPadStateChangedObservable=new R.c,n.onPadValuesChangedObservable=new R.c,n.pad={x:0,y:0},n._changes={pressChanged:!1,touchChanged:!1,valueChanged:!1,changed:!1},n._buttons=new Array(e.buttons.length),n.hand=e.hand,n}return Object(c.d)(t,r),t.prototype.onButtonStateChange=function(e){this._onButtonStateChange=e},Object.defineProperty(t.prototype,"defaultModel",{get:function(){return this._defaultModel},enumerable:!1,configurable:!0}),t.prototype.update=function(){r.prototype.update.call(this);for(var e=0;e +#include +#include +void main(void) +{ +vec4 result=texture2D(textureSampler,vUV); +#ifdef IMAGEPROCESSING +#ifndef FROMLINEARSPACE + +result.rgb=toLinearSpace(result.rgb); +#endif +result=applyImageProcessing(result); +#else + +#ifdef FROMLINEARSPACE +result=applyImageProcessing(result); +#endif +#endif +gl_FragColor=result; +}`);ze.a.ShadersStore.imageProcessingPixelShader=Xf;var zo=function(r){function t(e,n,i,o,a,s,d,p){i===void 0&&(i=null),d===void 0&&(d=h.a.TEXTURETYPE_UNSIGNED_INT);var b=r.call(this,e,"imageProcessing",[],[],n,i,o,a,s,null,d,"postprocess",null,!0)||this;return b._fromLinearSpace=!0,b._defines={IMAGEPROCESSING:!1,VIGNETTE:!1,VIGNETTEBLENDMODEMULTIPLY:!1,VIGNETTEBLENDMODEOPAQUE:!1,TONEMAPPING:!1,TONEMAPPING_ACES:!1,CONTRAST:!1,COLORCURVES:!1,COLORGRADING:!1,COLORGRADING3D:!1,FROMLINEARSPACE:!1,SAMPLER3DGREENDEPTH:!1,SAMPLER3DBGRMAP:!1,IMAGEPROCESSINGPOSTPROCESS:!1,EXPOSURE:!1},p?(p.applyByPostProcess=!0,b._attachImageProcessingConfiguration(p,!0),b.fromLinearSpace=!1):(b._attachImageProcessingConfiguration(null,!0),b.imageProcessingConfiguration.applyByPostProcess=!0),b.onApply=function(x){b.imageProcessingConfiguration.bind(x,b.aspectRatio)},b}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"imageProcessingConfiguration",{get:function(){return this._imageProcessingConfiguration},set:function(e){e.applyByPostProcess=!0,this._attachImageProcessingConfiguration(e)},enumerable:!1,configurable:!0}),t.prototype._attachImageProcessingConfiguration=function(e,n){var i=this;if(n===void 0&&(n=!1),e!==this._imageProcessingConfiguration){if(this._imageProcessingConfiguration&&this._imageProcessingObserver&&this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver),e)this._imageProcessingConfiguration=e;else{var o=null,a=this.getEngine(),s=this.getCamera();if(s)o=s.getScene();else if(a&&a.scenes){var d=a.scenes;o=d[d.length-1]}else o=te.a.LastCreatedScene;this._imageProcessingConfiguration=o?o.imageProcessingConfiguration:new vn.a}this._imageProcessingConfiguration&&(this._imageProcessingObserver=this._imageProcessingConfiguration.onUpdateParameters.add(function(){i._updateParameters()})),n||this._updateParameters()}},Object.defineProperty(t.prototype,"isSupported",{get:function(){var e=this.getEffect();return!e||e.isSupported},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"colorCurves",{get:function(){return this.imageProcessingConfiguration.colorCurves},set:function(e){this.imageProcessingConfiguration.colorCurves=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"colorCurvesEnabled",{get:function(){return this.imageProcessingConfiguration.colorCurvesEnabled},set:function(e){this.imageProcessingConfiguration.colorCurvesEnabled=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"colorGradingTexture",{get:function(){return this.imageProcessingConfiguration.colorGradingTexture},set:function(e){this.imageProcessingConfiguration.colorGradingTexture=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"colorGradingEnabled",{get:function(){return this.imageProcessingConfiguration.colorGradingEnabled},set:function(e){this.imageProcessingConfiguration.colorGradingEnabled=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"exposure",{get:function(){return this.imageProcessingConfiguration.exposure},set:function(e){this.imageProcessingConfiguration.exposure=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toneMappingEnabled",{get:function(){return this._imageProcessingConfiguration.toneMappingEnabled},set:function(e){this._imageProcessingConfiguration.toneMappingEnabled=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toneMappingType",{get:function(){return this._imageProcessingConfiguration.toneMappingType},set:function(e){this._imageProcessingConfiguration.toneMappingType=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"contrast",{get:function(){return this.imageProcessingConfiguration.contrast},set:function(e){this.imageProcessingConfiguration.contrast=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vignetteStretch",{get:function(){return this.imageProcessingConfiguration.vignetteStretch},set:function(e){this.imageProcessingConfiguration.vignetteStretch=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vignetteCentreX",{get:function(){return this.imageProcessingConfiguration.vignetteCentreX},set:function(e){this.imageProcessingConfiguration.vignetteCentreX=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vignetteCentreY",{get:function(){return this.imageProcessingConfiguration.vignetteCentreY},set:function(e){this.imageProcessingConfiguration.vignetteCentreY=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vignetteWeight",{get:function(){return this.imageProcessingConfiguration.vignetteWeight},set:function(e){this.imageProcessingConfiguration.vignetteWeight=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vignetteColor",{get:function(){return this.imageProcessingConfiguration.vignetteColor},set:function(e){this.imageProcessingConfiguration.vignetteColor=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vignetteCameraFov",{get:function(){return this.imageProcessingConfiguration.vignetteCameraFov},set:function(e){this.imageProcessingConfiguration.vignetteCameraFov=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vignetteBlendMode",{get:function(){return this.imageProcessingConfiguration.vignetteBlendMode},set:function(e){this.imageProcessingConfiguration.vignetteBlendMode=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vignetteEnabled",{get:function(){return this.imageProcessingConfiguration.vignetteEnabled},set:function(e){this.imageProcessingConfiguration.vignetteEnabled=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fromLinearSpace",{get:function(){return this._fromLinearSpace},set:function(e){this._fromLinearSpace!==e&&(this._fromLinearSpace=e,this._updateParameters())},enumerable:!1,configurable:!0}),t.prototype.getClassName=function(){return"ImageProcessingPostProcess"},t.prototype._updateParameters=function(){this._defines.FROMLINEARSPACE=this._fromLinearSpace,this.imageProcessingConfiguration.prepareDefines(this._defines,!0);var e="";for(var n in this._defines)this._defines[n]&&(e+="#define "+n+`;\r +`);var i=["textureSampler"],o=["scale"];vn.a&&(vn.a.PrepareSamplers(i,this._defines),vn.a.PrepareUniforms(o,this._defines)),this.updateEffect(e,o,i)},t.prototype.dispose=function(e){r.prototype.dispose.call(this,e),this._imageProcessingConfiguration&&this._imageProcessingObserver&&this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver),this._imageProcessingConfiguration&&(this.imageProcessingConfiguration.applyByPostProcess=!1)},Object(c.c)([Object(L.c)()],t.prototype,"_fromLinearSpace",void 0),t}(_t),dt=f(16),Oe=f(4);De.a._GroundMeshParser=function(r,t){return jo.Parse(r,t)};var jo=function(r){function t(e,n){var i=r.call(this,e,n)||this;return i.generateOctree=!1,i}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"GroundMesh"},Object.defineProperty(t.prototype,"subdivisions",{get:function(){return Math.min(this._subdivisionsX,this._subdivisionsY)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"subdivisionsX",{get:function(){return this._subdivisionsX},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"subdivisionsY",{get:function(){return this._subdivisionsY},enumerable:!1,configurable:!0}),t.prototype.optimize=function(e,n){n===void 0&&(n=32),this._subdivisionsX=e,this._subdivisionsY=e,this.subdivide(e),this.createOrUpdateSubmeshesOctree&&this.createOrUpdateSubmeshesOctree(n)},t.prototype.getHeightAtCoordinates=function(e,n){var i=this.getWorldMatrix(),o=u.c.Matrix[5];i.invertToRef(o);var a=u.c.Vector3[8];if(u.e.TransformCoordinatesFromFloatsToRef(e,0,n,o,a),e=a.x,n=a.z,ethis._maxX||nthis._maxZ)return this.position.y;this._heightQuads&&this._heightQuads.length!=0||(this._initHeightQuads(),this._computeHeightQuads());var s=this._getFacetAt(e,n),d=-(s.x*e+s.z*n+s.w)/s.y;return u.e.TransformCoordinatesFromFloatsToRef(0,d,0,i,a),a.y},t.prototype.getNormalAtCoordinates=function(e,n){var i=new u.e(0,1,0);return this.getNormalAtCoordinatesToRef(e,n,i),i},t.prototype.getNormalAtCoordinatesToRef=function(e,n,i){var o=this.getWorldMatrix(),a=u.c.Matrix[5];o.invertToRef(a);var s=u.c.Vector3[8];if(u.e.TransformCoordinatesFromFloatsToRef(e,0,n,a,s),e=s.x,n=s.z,ethis._maxX||nthis._maxZ)return this;this._heightQuads&&this._heightQuads.length!=0||(this._initHeightQuads(),this._computeHeightQuads());var d=this._getFacetAt(e,n);return u.e.TransformNormalFromFloatsToRef(d.x,d.y,d.z,o,i),this},t.prototype.updateCoordinateHeights=function(){return this._heightQuads&&this._heightQuads.length!=0||this._initHeightQuads(),this._computeHeightQuads(),this},t.prototype._getFacetAt=function(e,n){var i=Math.floor((e+this._maxX)*this._subdivisionsX/this._width),o=Math.floor(-(n+this._maxZ)*this._subdivisionsY/this._height+this._subdivisionsY),a=this._heightQuads[o*this._subdivisionsX+i];return nr.maxHeight){p=!0;var b=r.maxHeight;r.maxHeight=r.minHeight,r.minHeight=b}for(t=0;t<=r.subdivisions;t++)for(e=0;e<=r.subdivisions;e++){var x=new u.e(e*r.width/r.subdivisions-r.width/2,0,(r.subdivisions-t)*r.height/r.subdivisions-r.height/2),O=4*(((x.x+r.width/2)/r.width*(r.bufferWidth-1)|0)+((1-(x.z+r.height/2)/r.height)*(r.bufferHeight-1)|0)*r.bufferWidth),B=r.buffer[O]/255,F=r.buffer[O+1]/255,z=r.buffer[O+2]/255,J=r.buffer[O+3]/255;p&&(B=1-B,F=1-F,z=1-z);var ie=B*s.r+F*s.g+z*s.b;x.y=J>=d?r.minHeight+(r.maxHeight-r.minHeight)*ie:r.minHeight-Gt.a,i.push(x.x,x.y,x.z),o.push(0,0,0),a.push(e/r.subdivisions,1-t/r.subdivisions)}for(t=0;t=r.minHeight,Te=i[3*ce+1]>=r.minHeight,Re=i[3*ue+1]>=r.minHeight;ve&&Te&&Re&&(n.push(se),n.push(ce),n.push(ue)),i[3*fe+1]>=r.minHeight&&ve&&Re&&(n.push(fe),n.push(se),n.push(ue))}dt.a.ComputeNormals(i,n,o);var Ae=new dt.a;return Ae.indices=n,Ae.positions=i,Ae.normals=o,Ae.uvs=a,Ae},De.a.CreateGround=function(r,t,e,n,i,o){var a={width:t,height:e,subdivisions:n,updatable:o};return Bi.CreateGround(r,a,i)},De.a.CreateTiledGround=function(r,t,e,n,i,o,a,s,d){var p={xmin:t,zmin:e,xmax:n,zmax:i,subdivisions:o,precision:a,updatable:d};return Bi.CreateTiledGround(r,p,s)},De.a.CreateGroundFromHeightMap=function(r,t,e,n,i,o,a,s,d,p,b){var x={width:e,height:n,subdivisions:i,minHeight:o,maxHeight:a,updatable:d,onReady:p,alphaFilter:b};return Bi.CreateGroundFromHeightMap(r,t,x,s)};var Bi=function(){function r(){}return r.CreateGround=function(t,e,n){var i=new jo(t,n);return i._setReady(!1),i._subdivisionsX=e.subdivisionsX||e.subdivisions||1,i._subdivisionsY=e.subdivisionsY||e.subdivisions||1,i._width=e.width||1,i._height=e.height||1,i._maxX=i._width/2,i._maxZ=i._height/2,i._minX=-i._maxX,i._minZ=-i._maxZ,dt.a.CreateGround(e).applyToMesh(i,e.updatable),i._setReady(!0),i},r.CreateTiledGround=function(t,e,n){n===void 0&&(n=null);var i=new De.a(t,n);return dt.a.CreateTiledGround(e).applyToMesh(i,e.updatable),i},r.CreateGroundFromHeightMap=function(t,e,n,i){i===void 0&&(i=null);var o=n.width||10,a=n.height||10,s=n.subdivisions||1,d=n.minHeight||0,p=n.maxHeight||1,b=n.colorFilter||new M.a(.3,.59,.11),x=n.alphaFilter||0,O=n.updatable,B=n.onReady;i=i||te.a.LastCreatedScene;var F=new jo(t,i);return F._subdivisionsX=s,F._subdivisionsY=s,F._width=o,F._height=a,F._maxX=F._width/2,F._maxZ=F._height/2,F._minX=-F._maxX,F._minZ=-F._maxZ,F._setReady(!1),Xe.b.LoadImage(e,function(z){var J=z.width,ie=z.height,se=fs.a.CreateCanvas(J,ie).getContext("2d");if(!se)throw new Error("Unable to get 2d context for CreateGroundFromHeightMap");if(!i.isDisposed){se.drawImage(z,0,0);var ce=se.getImageData(0,0,J,ie).data;dt.a.CreateGroundFromHeightMap({width:o,height:a,subdivisions:s,minHeight:d,maxHeight:p,colorFilter:b,buffer:ce,bufferWidth:J,bufferHeight:ie,alphaFilter:x}).applyToMesh(F,O),B&&B(F),F._setReady(!0)}},function(){},i.offlineProvider),F},r}();dt.a.CreateTorus=function(r){for(var t=[],e=[],n=[],i=[],o=r.diameter||1,a=r.thickness||.5,s=r.tessellation||16,d=r.sideOrientation===0?0:r.sideOrientation||dt.a.DEFAULTSIDE,p=s+1,b=0;b<=s;b++)for(var x=b/s,O=b*Math.PI*2/s-Math.PI/2,B=u.a.Translation(o/2,0,0).multiply(u.a.RotationY(O)),F=0;F<=s;F++){var z=1-F/s,J=F*Math.PI*2/s+Math.PI,ie=Math.cos(J),se=Math.sin(J),ce=new u.e(ie,se,0),ue=ce.scale(a/2),fe=new u.d(x,z);ue=u.e.TransformCoordinates(ue,B),ce=u.e.TransformNormal(ce,B),e.push(ue.x,ue.y,ue.z),n.push(ce.x,ce.y,ce.z),i.push(fe.x,fe.y);var ve=(b+1)%p,Te=(F+1)%p;t.push(b*p+F),t.push(b*p+Te),t.push(ve*p+F),t.push(b*p+Te),t.push(ve*p+Te),t.push(ve*p+F)}dt.a._ComputeSides(d,e,t,n,i,r.frontUVs,r.backUVs);var Re=new dt.a;return Re.indices=t,Re.positions=e,Re.normals=n,Re.uvs=i,Re},De.a.CreateTorus=function(r,t,e,n,i,o,a){var s={diameter:t,thickness:e,tessellation:n,sideOrientation:a,updatable:o};return gr.CreateTorus(r,s,i)};var fn,er,gr=function(){function r(){}return r.CreateTorus=function(t,e,n){var i=new De.a(t,n);return e.sideOrientation=De.a._GetDefaultSideOrientation(e.sideOrientation),i._originalBuilderSideOrientation=e.sideOrientation,dt.a.CreateTorus(e).applyToMesh(i,e.updatable),i},r}(),fi=f(53),ps=function(){function r(){}return r.GetDefaults=function(t){var e=new r;return e.canvasOptions={antialias:!0,depth:!0,stencil:!t||t.isStencilEnable,alpha:!0,multiview:!1,framebufferScaleFactor:1},e.newCanvasCssStyle="position:absolute; bottom:0px;right:0px;z-index:10;width:90%;height:100%;background-color: #000000;",e},r}(),Kl=function(){function r(t,e){var n=this;if(e===void 0&&(e=ps.GetDefaults()),this._options=e,this._canvas=null,this.xrLayer=null,this.onXRLayerInitObservable=new R.c,this._engine=t.scene.getEngine(),e.canvasElement)this._setManagedOutputCanvas(e.canvasElement);else{var i=document.createElement("canvas");i.style.cssText=this._options.newCanvasCssStyle||"position:absolute; bottom:0px;right:0px;",this._setManagedOutputCanvas(i)}t.onXRSessionInit.add(function(){n._addCanvas()}),t.onXRSessionEnded.add(function(){n._removeCanvas()})}return r.prototype.dispose=function(){this._removeCanvas(),this._setManagedOutputCanvas(null)},r.prototype.initializeXRLayerAsync=function(t){var e=this,n=function(){var i=new XRWebGLLayer(t,e.canvasContext,e._options.canvasOptions);return e.onXRLayerInitObservable.notifyObservers(i),i};return this.canvasContext.makeXRCompatible?this.canvasContext.makeXRCompatible().then(function(){return e.xrLayer=n(),e.xrLayer}):(this.xrLayer=n(),Promise.resolve(this.xrLayer))},r.prototype._addCanvas=function(){var t=this;this._canvas&&this._canvas!==this._engine.getRenderingCanvas()&&document.body.appendChild(this._canvas),this.xrLayer?this._setCanvasSize(!0):this.onXRLayerInitObservable.addOnce(function(e){t._setCanvasSize(!0,e)})},r.prototype._removeCanvas=function(){this._canvas&&document.body.contains(this._canvas)&&this._canvas!==this._engine.getRenderingCanvas()&&document.body.removeChild(this._canvas),this._setCanvasSize(!1)},r.prototype._setCanvasSize=function(t,e){t===void 0&&(t=!0),e===void 0&&(e=this.xrLayer),this._canvas&&(t?e&&(this._canvas!==this._engine.getRenderingCanvas()?(this._canvas.style.width=e.framebufferWidth+"px",this._canvas.style.height=e.framebufferHeight+"px"):this._engine.setSize(e.framebufferWidth,e.framebufferHeight)):this._originalCanvasSize&&(this._canvas!==this._engine.getRenderingCanvas()?(this._canvas.style.width=this._originalCanvasSize.width+"px",this._canvas.style.height=this._originalCanvasSize.height+"px"):this._engine.setSize(this._originalCanvasSize.width,this._originalCanvasSize.height)))},r.prototype._setManagedOutputCanvas=function(t){this._removeCanvas(),t?(this._originalCanvasSize={width:t.offsetWidth,height:t.offsetHeight},this._canvas=t,this.canvasContext=this._canvas.getContext("webgl2"),this.canvasContext||(this.canvasContext=this._canvas.getContext("webgl"))):(this._canvas=null,this.canvasContext=null)},r}(),_s=function(){function r(t){this.scene=t,this._sessionEnded=!1,this.baseLayer=null,this.currentTimestamp=-1,this.defaultHeightCompensation=1.7,this.onXRFrameObservable=new R.c,this.onXRReferenceSpaceChanged=new R.c,this.onXRSessionEnded=new R.c,this.onXRSessionInit=new R.c}return Object.defineProperty(r.prototype,"referenceSpace",{get:function(){return this._referenceSpace},set:function(t){this._referenceSpace=t,this.onXRReferenceSpaceChanged.notifyObservers(this._referenceSpace)},enumerable:!1,configurable:!0}),r.prototype.dispose=function(){this._sessionEnded||this.exitXRAsync(),this.onXRFrameObservable.clear(),this.onXRSessionEnded.clear(),this.onXRReferenceSpaceChanged.clear(),this.onXRSessionInit.clear()},r.prototype.exitXRAsync=function(){return this.session&&!this._sessionEnded?(this._sessionEnded=!0,this.session.end().catch(function(t){l.a.Warn("Could not end XR session.")})):Promise.resolve()},r.prototype.getRenderTargetTextureForEye=function(t){return this._rttProvider.getRenderTargetForEye(t)},r.prototype.getWebXRRenderTarget=function(t){var e=this.scene.getEngine();return this._xrNavigator.xr.native?this._xrNavigator.xr.getWebXRRenderTarget(e):((t=t||ps.GetDefaults(e)).canvasElement=e.getRenderingCanvas()||void 0,new Kl(this,t))},r.prototype.initializeAsync=function(){return this._xrNavigator=navigator,this._xrNavigator.xr?Promise.resolve():Promise.reject("WebXR not available")},r.prototype.initializeSessionAsync=function(t,e){var n=this;return t===void 0&&(t="immersive-vr"),e===void 0&&(e={}),this._xrNavigator.xr.requestSession(t,e).then(function(i){return n.session=i,n.onXRSessionInit.notifyObservers(i),n._sessionEnded=!1,n.session.addEventListener("end",function(){var o=n.scene.getEngine();n._sessionEnded=!0,n._rttProvider=null,o.framebufferDimensionsObject=null,o.restoreDefaultFramebuffer(),o.customAnimationFrameRequester=null,n.onXRSessionEnded.notifyObservers(null),o._renderLoop()},{once:!0}),n.session})},r.prototype.isSessionSupportedAsync=function(t){return r.IsSessionSupportedAsync(t)},r.prototype.resetReferenceSpace=function(){this.referenceSpace=this.baseReferenceSpace},r.prototype.runXRRenderLoop=function(){var t=this,e=this.scene.getEngine();if(e.customAnimationFrameRequester={requestAnimationFrame:this.session.requestAnimationFrame.bind(this.session),renderFunction:function(i,o){t._sessionEnded||(t.currentFrame=o,t.currentTimestamp=i,o&&(e.framebufferDimensionsObject=t.baseLayer,t.onXRFrameObservable.notifyObservers(o),e._renderLoop(),e.framebufferDimensionsObject=null))}},this._xrNavigator.xr.native)this._rttProvider=this._xrNavigator.xr.getNativeRenderTargetProvider(this.session,this._createRenderTargetTexture.bind(this));else{var n=this._createRenderTargetTexture(this.baseLayer.framebufferWidth,this.baseLayer.framebufferHeight,this.baseLayer.framebuffer);this._rttProvider={getRenderTargetForEye:function(){return n}},e.framebufferDimensionsObject=this.baseLayer}typeof window<"u"&&window.cancelAnimationFrame&&window.cancelAnimationFrame(e._frameHandler),e._renderLoop()},r.prototype.setReferenceSpaceTypeAsync=function(t){var e=this;return t===void 0&&(t="local-floor"),this.session.requestReferenceSpace(t).then(function(n){return n},function(n){return l.a.Error("XR.requestReferenceSpace failed for the following reason: "),l.a.Error(n),l.a.Log('Defaulting to universally-supported "viewer" reference space type.'),e.session.requestReferenceSpace("viewer").then(function(i){var o=new XRRigidTransform({x:0,y:-e.defaultHeightCompensation,z:0});return i.getOffsetReferenceSpace(o)},function(i){throw l.a.Error(i),'XR initialization failed: required "viewer" reference space type not supported.'})}).then(function(n){return e.session.requestReferenceSpace("viewer").then(function(i){return e.viewerReferenceSpace=i,n})}).then(function(n){return e.referenceSpace=e.baseReferenceSpace=n,e.referenceSpace})},r.prototype.updateRenderStateAsync=function(t){return t.baseLayer&&(this.baseLayer=t.baseLayer),this.session.updateRenderState(t)},r.IsSessionSupportedAsync=function(t){if(!navigator.xr)return Promise.resolve(!1);var e=navigator.xr.isSessionSupported||navigator.xr.supportsSession;return e?e.call(navigator.xr,t).then(function(n){var i=n===void 0||n;return Promise.resolve(i)}).catch(function(n){return l.a.Warn(n),Promise.resolve(!1)}):Promise.resolve(!1)},r.prototype._createRenderTargetTexture=function(t,e,n){n===void 0&&(n=null);var i=new Ct.a(this.scene.getEngine(),Ct.b.Unknown,!0);i.width=t,i.height=e,i._framebuffer=n;var o=new sn("XR renderTargetTexture",{width:t,height:e},this.scene,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,!0);return o._texture=i,o},r}();(function(r){r[r.ENTERING_XR=0]="ENTERING_XR",r[r.EXITING_XR=1]="EXITING_XR",r[r.IN_XR=2]="IN_XR",r[r.NOT_IN_XR=3]="NOT_IN_XR"})(fn||(fn={})),function(r){r[r.NOT_TRACKING=0]="NOT_TRACKING",r[r.TRACKING_LOST=1]="TRACKING_LOST",r[r.TRACKING=2]="TRACKING"}(er||(er={}));var ri,Ql=function(){function r(t,e){if(e===void 0&&(e=null),this.scene=t,this._pointerDownOnMeshAsked=!1,this._isActionableMesh=!1,this._teleportationRequestInitiated=!1,this._teleportationBackRequestInitiated=!1,this._rotationRightAsked=!1,this._rotationLeftAsked=!1,this._dpadPressed=!0,this._activePointer=!1,this._id=r._idCounter++,e)this._gazeTracker=e.clone("gazeTracker");else{this._gazeTracker=De.a.CreateTorus("gazeTracker",.0035,.0025,20,t,!1),this._gazeTracker.bakeCurrentTransformIntoVertices(),this._gazeTracker.isPickable=!1,this._gazeTracker.isVisible=!1;var n=new Ft.a("targetMat",t);n.specularColor=M.a.Black(),n.emissiveColor=new M.a(.7,.7,.7),n.backFaceCulling=!1,this._gazeTracker.material=n}}return r.prototype._getForwardRay=function(t){return new dn.a(u.e.Zero(),new u.e(0,0,t))},r.prototype._selectionPointerDown=function(){this._pointerDownOnMeshAsked=!0,this._currentHit&&this.scene.simulatePointerDown(this._currentHit,{pointerId:this._id})},r.prototype._selectionPointerUp=function(){this._currentHit&&this.scene.simulatePointerUp(this._currentHit,{pointerId:this._id}),this._pointerDownOnMeshAsked=!1},r.prototype._activatePointer=function(){this._activePointer=!0},r.prototype._deactivatePointer=function(){this._activePointer=!1},r.prototype._updatePointerDistance=function(t){},r.prototype.dispose=function(){this._interactionsEnabled=!1,this._teleportationEnabled=!1,this._gazeTracker&&this._gazeTracker.dispose()},r._idCounter=0,r}(),Yf=function(r){function t(e,n,i){var o=r.call(this,n,i)||this;o.webVRController=e,o._laserPointer=De.a.CreateCylinder("laserPointer",1,.004,2e-4,20,1,n,!1);var a=new Ft.a("laserPointerMat",n);if(a.emissiveColor=new M.a(.7,.7,.7),a.alpha=.6,o._laserPointer.material=a,o._laserPointer.rotation.x=Math.PI/2,o._laserPointer.position.z=-.5,o._laserPointer.isVisible=!1,o._laserPointer.isPickable=!1,!e.mesh){var s=new De.a("preloadControllerMesh",n),d=new De.a(pr.POINTING_POSE,n);d.rotation.x=-.7,s.addChild(d),e.attachToMesh(s)}return o._setLaserPointerParent(e.mesh),o._meshAttachedObserver=e._meshAttachedObservable.add(function(p){o._setLaserPointerParent(p)}),o}return Object(c.d)(t,r),t.prototype._getForwardRay=function(e){return this.webVRController.getForwardRay(e)},t.prototype._activatePointer=function(){r.prototype._activatePointer.call(this),this._laserPointer.isVisible=!0},t.prototype._deactivatePointer=function(){r.prototype._deactivatePointer.call(this),this._laserPointer.isVisible=!1},t.prototype._setLaserPointerColor=function(e){this._laserPointer.material.emissiveColor=e},t.prototype._setLaserPointerLightingDisabled=function(e){this._laserPointer.material.disableLighting=e},t.prototype._setLaserPointerParent=function(e){var n=function(s){s.isPickable=!1,s.getChildMeshes().forEach(function(d){n(d)})};n(e);var i=e.getChildren(void 0,!1),o=e;this.webVRController._pointingPoseNode=null;for(var a=0;a=0){o=i[a],this.webVRController._pointingPoseNode=o;break}this._laserPointer.parent=o},t.prototype._updatePointerDistance=function(e){e===void 0&&(e=100),this._laserPointer.scaling.y=e,this._laserPointer.position.z=-e/2},t.prototype.dispose=function(){r.prototype.dispose.call(this),this._laserPointer.dispose(),this._meshAttachedObserver&&this.webVRController._meshAttachedObservable.remove(this._meshAttachedObserver)},t}(Ql),ql=function(r){function t(e,n){var i=r.call(this,n)||this;return i.getCamera=e,i}return Object(c.d)(t,r),t.prototype._getForwardRay=function(e){var n=this.getCamera();return n?n.getForwardRay(e):new dn.a(u.e.Zero(),u.e.Forward())},t}(Ql),Kf=function(){},Zl=function(){function r(t,e){var n=this;if(e===void 0&&(e={}),this.webVROptions=e,this._webVRsupported=!1,this._webVRready=!1,this._webVRrequesting=!1,this._webVRpresenting=!1,this._fullscreenVRpresenting=!1,this.enableGazeEvenWhenNoPointerLock=!1,this.exitVROnDoubleTap=!0,this.onEnteringVRObservable=new R.c,this.onAfterEnteringVRObservable=new R.c,this.onExitingVRObservable=new R.c,this.onControllerMeshLoadedObservable=new R.c,this._useCustomVRButton=!1,this._teleportationRequested=!1,this._teleportActive=!1,this._floorMeshesCollection=[],this._teleportationMode=r.TELEPORTATIONMODE_CONSTANTTIME,this._teleportationTime=122,this._teleportationSpeed=20,this._rotationAllowed=!0,this._teleportBackwardsVector=new u.e(0,-1,-1),this._isDefaultTeleportationTarget=!0,this._teleportationFillColor="#444444",this._teleportationBorderColor="#FFFFFF",this._rotationAngle=0,this._haloCenter=new u.e(0,0,0),this._padSensibilityUp=.65,this._padSensibilityDown=.35,this._leftController=null,this._rightController=null,this._gazeColor=new M.a(.7,.7,.7),this._laserColor=new M.a(.7,.7,.7),this._pickedLaserColor=new M.a(.2,.2,1),this._pickedGazeColor=new M.a(0,0,1),this.onNewMeshSelected=new R.c,this.onMeshSelectedWithController=new R.c,this.onNewMeshPicked=new R.c,this.onBeforeCameraTeleport=new R.c,this.onAfterCameraTeleport=new R.c,this.onSelectedMeshUnselected=new R.c,this.teleportationEnabled=!0,this._teleportationInitialized=!1,this._interactionsEnabled=!1,this._interactionsRequested=!1,this._displayGaze=!0,this._displayLaserPointer=!0,this.updateGazeTrackerScale=!0,this.updateGazeTrackerColor=!0,this.updateControllerLaserColor=!0,this.requestPointerLockOnFullScreen=!0,this.xrTestDone=!1,this._onResize=function(){n.moveButtonToBottomRight(),n._fullscreenVRpresenting&&n._webVRready&&n.exitVR()},this._onFullscreenChange=function(){var o=document;o.fullscreen!==void 0?n._fullscreenVRpresenting=document.fullscreen:o.mozFullScreen!==void 0?n._fullscreenVRpresenting=o.mozFullScreen:o.webkitIsFullScreen!==void 0?n._fullscreenVRpresenting=o.webkitIsFullScreen:o.msIsFullScreen!==void 0?n._fullscreenVRpresenting=o.msIsFullScreen:document.msFullscreenElement!==void 0&&(n._fullscreenVRpresenting=document.msFullscreenElement),!n._fullscreenVRpresenting&&n._inputElement&&(n.exitVR(),!n._useCustomVRButton&&n._btnVR&&(n._btnVR.style.top=n._inputElement.offsetTop+n._inputElement.offsetHeight-70+"px",n._btnVR.style.left=n._inputElement.offsetLeft+n._inputElement.offsetWidth-100+"px",n.updateButtonVisibility()))},this._cachedAngularSensibility={angularSensibilityX:null,angularSensibilityY:null,angularSensibility:null},this.beforeRender=function(){n._leftController&&n._leftController._activePointer&&n._castRayAndSelectObject(n._leftController),n._rightController&&n._rightController._activePointer&&n._castRayAndSelectObject(n._rightController),n._noControllerIsActive&&(n._scene.getEngine().isPointerLock||n.enableGazeEvenWhenNoPointerLock)?n._castRayAndSelectObject(n._cameraGazer):n._cameraGazer._gazeTracker.isVisible=!1},this._onNewGamepadConnected=function(o){if(o.type!==hn.POSE_ENABLED)o.leftStick&&o.onleftstickchanged(function(d){n._teleportationInitialized&&n.teleportationEnabled&&(!n._leftController&&!n._rightController||n._leftController&&!n._leftController._activePointer&&n._rightController&&!n._rightController._activePointer)&&(n._checkTeleportWithRay(d,n._cameraGazer),n._checkTeleportBackwards(d,n._cameraGazer))}),o.rightStick&&o.onrightstickchanged(function(d){n._teleportationInitialized&&n._checkRotate(d,n._cameraGazer)}),o.type===hn.XBOX&&(o.onbuttondown(function(d){n._interactionsEnabled&&d===Rn.A&&n._cameraGazer._selectionPointerDown()}),o.onbuttonup(function(d){n._interactionsEnabled&&d===Rn.A&&n._cameraGazer._selectionPointerUp()}));else{var a=o,s=new Yf(a,n._scene,n._cameraGazer._gazeTracker);a.hand==="right"||n._leftController&&n._leftController.webVRController!=a?n._rightController=s:n._leftController=s,n._tryEnableInteractionOnController(s)}},this._tryEnableInteractionOnController=function(o){n._interactionsRequested&&!o._interactionsEnabled&&n._enableInteractionOnController(o),n._teleportationRequested&&!o._teleportationEnabled&&n._enableTeleportationOnController(o)},this._onNewGamepadDisconnected=function(o){o instanceof Fi&&(o.hand==="left"&&n._leftController!=null&&(n._leftController.dispose(),n._leftController=null),o.hand==="right"&&n._rightController!=null&&(n._rightController.dispose(),n._rightController=null))},this._workingVector=u.e.Zero(),this._workingQuaternion=u.b.Identity(),this._workingMatrix=u.a.Identity(),this._scene=t,this._inputElement=t.getEngine().getInputElement(),"getVRDisplays"in navigator||(e.useXR=!0),e.createFallbackVRDeviceOrientationFreeCamera===void 0&&(e.createFallbackVRDeviceOrientationFreeCamera=!0),e.createDeviceOrientationCamera===void 0&&(e.createDeviceOrientationCamera=!0),e.laserToggle===void 0&&(e.laserToggle=!0),e.defaultHeight===void 0&&(e.defaultHeight=1.7),e.useCustomVRButton&&(this._useCustomVRButton=!0,e.customVRButton&&(this._btnVR=e.customVRButton)),e.rayLength&&(this._rayLength=e.rayLength),this._defaultHeight=e.defaultHeight,e.positionScale&&(this._rayLength*=e.positionScale,this._defaultHeight*=e.positionScale),this._hasEnteredVR=!1,this._scene.activeCamera?this._position=this._scene.activeCamera.position.clone():this._position=new u.e(0,this._defaultHeight,0),e.createDeviceOrientationCamera||!this._scene.activeCamera){if(this._deviceOrientationCamera=new Bo("deviceOrientationVRHelper",this._position.clone(),t),this._scene.activeCamera&&(this._deviceOrientationCamera.minZ=this._scene.activeCamera.minZ,this._deviceOrientationCamera.maxZ=this._scene.activeCamera.maxZ,this._scene.activeCamera instanceof Li&&this._scene.activeCamera.rotation)){var i=this._scene.activeCamera;i.rotationQuaternion?this._deviceOrientationCamera.rotationQuaternion.copyFrom(i.rotationQuaternion):this._deviceOrientationCamera.rotationQuaternion.copyFrom(u.b.RotationYawPitchRoll(i.rotation.y,i.rotation.x,i.rotation.z)),this._deviceOrientationCamera.rotation=i.rotation.clone()}this._scene.activeCamera=this._deviceOrientationCamera,this._inputElement&&this._scene.activeCamera.attachControl()}else this._existingCamera=this._scene.activeCamera;this.webVROptions.useXR&&navigator.xr?_s.IsSessionSupportedAsync("immersive-vr").then(function(o){o?(l.a.Log("Using WebXR. It is recommended to use the WebXRDefaultExperience directly"),t.createDefaultXRExperienceAsync({floorMeshes:e.floorMeshes||[]}).then(function(a){n.xr=a,n.xrTestDone=!0,n._cameraGazer=new ql(function(){return n.xr.baseExperience.camera},t),n.xr.baseExperience.onStateChangedObservable.add(function(s){switch(s){case fn.ENTERING_XR:n.onEnteringVRObservable.notifyObservers(n),n._interactionsEnabled||n.xr.pointerSelection.detach(),n.xr.pointerSelection.displayLaserPointer=n._displayLaserPointer;break;case fn.EXITING_XR:n.onExitingVRObservable.notifyObservers(n),n._scene.getEngine().resize();break;case fn.IN_XR:n._hasEnteredVR=!0;break;case fn.NOT_IN_XR:n._hasEnteredVR=!1}})})):n.completeVRInit(t,e)}):this.completeVRInit(t,e)}return Object.defineProperty(r.prototype,"onEnteringVR",{get:function(){return this.onEnteringVRObservable},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onExitingVR",{get:function(){return this.onExitingVRObservable},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onControllerMeshLoaded",{get:function(){return this.onControllerMeshLoadedObservable},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"teleportationTarget",{get:function(){return this._teleportationTarget},set:function(t){t&&(t.name="teleportationTarget",this._isDefaultTeleportationTarget=!1,this._teleportationTarget=t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"gazeTrackerMesh",{get:function(){return this._cameraGazer._gazeTracker},set:function(t){t&&(this._cameraGazer._gazeTracker&&this._cameraGazer._gazeTracker.dispose(),this._leftController&&this._leftController._gazeTracker&&this._leftController._gazeTracker.dispose(),this._rightController&&this._rightController._gazeTracker&&this._rightController._gazeTracker.dispose(),this._cameraGazer._gazeTracker=t,this._cameraGazer._gazeTracker.bakeCurrentTransformIntoVertices(),this._cameraGazer._gazeTracker.isPickable=!1,this._cameraGazer._gazeTracker.isVisible=!1,this._cameraGazer._gazeTracker.name="gazeTracker",this._leftController&&(this._leftController._gazeTracker=this._cameraGazer._gazeTracker.clone("gazeTracker")),this._rightController&&(this._rightController._gazeTracker=this._cameraGazer._gazeTracker.clone("gazeTracker")))},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"leftControllerGazeTrackerMesh",{get:function(){return this._leftController?this._leftController._gazeTracker:null},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"rightControllerGazeTrackerMesh",{get:function(){return this._rightController?this._rightController._gazeTracker:null},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"displayGaze",{get:function(){return this._displayGaze},set:function(t){this._displayGaze=t,t||(this._cameraGazer._gazeTracker.isVisible=!1,this._leftController&&(this._leftController._gazeTracker.isVisible=!1),this._rightController&&(this._rightController._gazeTracker.isVisible=!1))},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"displayLaserPointer",{get:function(){return this._displayLaserPointer},set:function(t){this._displayLaserPointer=t,t?(this._rightController&&this._rightController._activatePointer(),this._leftController&&this._leftController._activatePointer()):(this._rightController&&(this._rightController._deactivatePointer(),this._rightController._gazeTracker.isVisible=!1),this._leftController&&(this._leftController._deactivatePointer(),this._leftController._gazeTracker.isVisible=!1))},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"deviceOrientationCamera",{get:function(){return this._deviceOrientationCamera},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"currentVRCamera",{get:function(){return this._webVRready?this._webVRCamera:this._scene.activeCamera},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"webVRCamera",{get:function(){return this._webVRCamera},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"vrDeviceOrientationCamera",{get:function(){return this._vrDeviceOrientationCamera},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"vrButton",{get:function(){return this._btnVR},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"_teleportationRequestInitiated",{get:function(){return this._cameraGazer._teleportationRequestInitiated||this._leftController!==null&&this._leftController._teleportationRequestInitiated||this._rightController!==null&&this._rightController._teleportationRequestInitiated},enumerable:!1,configurable:!0}),r.prototype.completeVRInit=function(t,e){var n=this;if(this.xrTestDone=!0,e.createFallbackVRDeviceOrientationFreeCamera&&(e.useMultiview&&(e.vrDeviceOrientationCameraMetrics||(e.vrDeviceOrientationCameraMetrics=mr.GetDefault()),e.vrDeviceOrientationCameraMetrics.multiviewEnabled=!0),this._vrDeviceOrientationCamera=new Vo("VRDeviceOrientationVRHelper",this._position,this._scene,!0,e.vrDeviceOrientationCameraMetrics),this._vrDeviceOrientationCamera.angularSensibility=Number.MAX_VALUE),this._webVRCamera=new Go("WebVRHelper",this._position,this._scene,e),this._webVRCamera.useStandingMatrix(),this._cameraGazer=new ql(function(){return n.currentVRCamera},t),!this._useCustomVRButton){this._btnVR=document.createElement("BUTTON"),this._btnVR.className="babylonVRicon",this._btnVR.id="babylonVRiconbtn",this._btnVR.title="Click to switch to VR";var i=".babylonVRicon { position: absolute; right: 20px; height: 50px; width: 80px; background-color: rgba(51,51,51,0.7); background-image: url("+(window.SVGSVGElement?"data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%222048%22%20height%3D%221152%22%20viewBox%3D%220%200%202048%201152%22%20version%3D%221.1%22%3E%3Cpath%20transform%3D%22rotate%28180%201024%2C576.0000000000001%29%22%20d%3D%22m1109%2C896q17%2C0%2030%2C-12t13%2C-30t-12.5%2C-30.5t-30.5%2C-12.5l-170%2C0q-18%2C0%20-30.5%2C12.5t-12.5%2C30.5t13%2C30t30%2C12l170%2C0zm-85%2C256q59%2C0%20132.5%2C-1.5t154.5%2C-5.5t164.5%2C-11.5t163%2C-20t150%2C-30t124.5%2C-41.5q23%2C-11%2042%2C-24t38%2C-30q27%2C-25%2041%2C-61.5t14%2C-72.5l0%2C-257q0%2C-123%20-47%2C-232t-128%2C-190t-190%2C-128t-232%2C-47l-81%2C0q-37%2C0%20-68.5%2C14t-60.5%2C34.5t-55.5%2C45t-53%2C45t-53%2C34.5t-55.5%2C14t-55.5%2C-14t-53%2C-34.5t-53%2C-45t-55.5%2C-45t-60.5%2C-34.5t-68.5%2C-14l-81%2C0q-123%2C0%20-232%2C47t-190%2C128t-128%2C190t-47%2C232l0%2C257q0%2C68%2038%2C115t97%2C73q54%2C24%20124.5%2C41.5t150%2C30t163%2C20t164.5%2C11.5t154.5%2C5.5t132.5%2C1.5zm939%2C-298q0%2C39%20-24.5%2C67t-58.5%2C42q-54%2C23%20-122%2C39.5t-143.5%2C28t-155.5%2C19t-157%2C11t-148.5%2C5t-129.5%2C1.5q-59%2C0%20-130%2C-1.5t-148%2C-5t-157%2C-11t-155.5%2C-19t-143.5%2C-28t-122%2C-39.5q-34%2C-14%20-58.5%2C-42t-24.5%2C-67l0%2C-257q0%2C-106%2040.5%2C-199t110%2C-162.5t162.5%2C-109.5t199%2C-40l81%2C0q27%2C0%2052%2C14t50%2C34.5t51%2C44.5t55.5%2C44.5t63.5%2C34.5t74%2C14t74%2C-14t63.5%2C-34.5t55.5%2C-44.5t51%2C-44.5t50%2C-34.5t52%2C-14l14%2C0q37%2C0%2070%2C0.5t64.5%2C4.5t63.5%2C12t68%2C23q71%2C30%20128.5%2C78.5t98.5%2C110t63.5%2C133.5t22.5%2C149l0%2C257z%22%20fill%3D%22white%22%20/%3E%3C/svg%3E%0A":"https://cdn.babylonjs.com/Assets/vrButton.png")+"); background-size: 80%; background-repeat:no-repeat; background-position: center; border: none; outline: none; transition: transform 0.125s ease-out } .babylonVRicon:hover { transform: scale(1.05) } .babylonVRicon:active {background-color: rgba(51,51,51,1) } .babylonVRicon:focus {background-color: rgba(51,51,51,1) }";i+=".babylonVRicon.vrdisplaypresenting { display: none; }";var o=document.createElement("style");o.appendChild(document.createTextNode(i)),document.getElementsByTagName("head")[0].appendChild(o),this.moveButtonToBottomRight()}this._btnVR&&this._btnVR.addEventListener("click",function(){n.isInVRMode?n._scene.getEngine().disableVR():n.enterVR()});var a=this._scene.getEngine().getHostWindow();a&&(a.addEventListener("resize",this._onResize),document.addEventListener("fullscreenchange",this._onFullscreenChange,!1),document.addEventListener("mozfullscreenchange",this._onFullscreenChange,!1),document.addEventListener("webkitfullscreenchange",this._onFullscreenChange,!1),document.addEventListener("msfullscreenchange",this._onFullscreenChange,!1),document.onmsfullscreenchange=this._onFullscreenChange,e.createFallbackVRDeviceOrientationFreeCamera?this.displayVRButton():this._scene.getEngine().onVRDisplayChangedObservable.add(function(s){s.vrDisplay&&n.displayVRButton()}),this._onKeyDown=function(s){s.keyCode===27&&n.isInVRMode&&n.exitVR()},document.addEventListener("keydown",this._onKeyDown),this._scene.onPrePointerObservable.add(function(){n._hasEnteredVR&&n.exitVROnDoubleTap&&(n.exitVR(),n._fullscreenVRpresenting&&n._scene.getEngine().exitFullscreen())},Tt.a.POINTERDOUBLETAP,!1),this._onVRDisplayChanged=function(s){return n.onVRDisplayChanged(s)},this._onVrDisplayPresentChange=function(){return n.onVrDisplayPresentChange()},this._onVRRequestPresentStart=function(){n._webVRrequesting=!0,n.updateButtonVisibility()},this._onVRRequestPresentComplete=function(){n._webVRrequesting=!1,n.updateButtonVisibility()},t.getEngine().onVRDisplayChangedObservable.add(this._onVRDisplayChanged),t.getEngine().onVRRequestPresentStart.add(this._onVRRequestPresentStart),t.getEngine().onVRRequestPresentComplete.add(this._onVRRequestPresentComplete),a.addEventListener("vrdisplaypresentchange",this._onVrDisplayPresentChange),t.onDisposeObservable.add(function(){n.dispose()}),this._webVRCamera.onControllerMeshLoadedObservable.add(function(s){return n._onDefaultMeshLoaded(s)}),this._scene.gamepadManager.onGamepadConnectedObservable.add(this._onNewGamepadConnected),this._scene.gamepadManager.onGamepadDisconnectedObservable.add(this._onNewGamepadDisconnected),this.updateButtonVisibility(),this._circleEase=new nt,this._circleEase.setEasingMode(Ge.EASINGMODE_EASEINOUT),this._teleportationEasing=this._circleEase,t.onPointerObservable.add(function(s){n._interactionsEnabled&&t.activeCamera===n.vrDeviceOrientationCamera&&s.event.pointerType==="mouse"&&(s.type===Tt.a.POINTERDOWN?n._cameraGazer._selectionPointerDown():s.type===Tt.a.POINTERUP&&n._cameraGazer._selectionPointerUp())}),this.webVROptions.floorMeshes&&this.enableTeleportation({floorMeshes:this.webVROptions.floorMeshes}))},r.prototype._onDefaultMeshLoaded=function(t){this._leftController&&this._leftController.webVRController==t&&t.mesh&&this._leftController._setLaserPointerParent(t.mesh),this._rightController&&this._rightController.webVRController==t&&t.mesh&&this._rightController._setLaserPointerParent(t.mesh);try{this.onControllerMeshLoadedObservable.notifyObservers(t)}catch(e){l.a.Warn("Error in your custom logic onControllerMeshLoaded: "+e)}},Object.defineProperty(r.prototype,"isInVRMode",{get:function(){return this.xr&&this.webVROptions.useXR&&this.xr.baseExperience.state===fn.IN_XR||this._webVRpresenting||this._fullscreenVRpresenting},enumerable:!1,configurable:!0}),r.prototype.onVrDisplayPresentChange=function(){var t=this._scene.getEngine().getVRDevice();if(t){var e=this._webVRpresenting;this._webVRpresenting=t.isPresenting,e&&!this._webVRpresenting&&this.exitVR()}else l.a.Warn("Detected VRDisplayPresentChange on an unknown VRDisplay. Did you can enterVR on the vrExperienceHelper?");this.updateButtonVisibility()},r.prototype.onVRDisplayChanged=function(t){this._webVRsupported=t.vrSupported,this._webVRready=!!t.vrDisplay,this._webVRpresenting=t.vrDisplay&&t.vrDisplay.isPresenting,this.updateButtonVisibility()},r.prototype.moveButtonToBottomRight=function(){if(this._inputElement&&!this._useCustomVRButton&&this._btnVR){var t=this._inputElement.getBoundingClientRect();this._btnVR.style.top=t.top+t.height-70+"px",this._btnVR.style.left=t.left+t.width-100+"px"}},r.prototype.displayVRButton=function(){this._useCustomVRButton||this._btnVRDisplayed||!this._btnVR||(document.body.appendChild(this._btnVR),this._btnVRDisplayed=!0)},r.prototype.updateButtonVisibility=function(){this._btnVR&&!this._useCustomVRButton&&(this._btnVR.className="babylonVRicon",this.isInVRMode?this._btnVR.className+=" vrdisplaypresenting":(this._webVRready&&(this._btnVR.className+=" vrdisplayready"),this._webVRsupported&&(this._btnVR.className+=" vrdisplaysupported"),this._webVRrequesting&&(this._btnVR.className+=" vrdisplayrequesting")))},r.prototype.enterVR=function(){var t=this;if(this.xr)this.xr.baseExperience.enterXRAsync("immersive-vr","local-floor",this.xr.renderTarget);else{if(this.onEnteringVRObservable)try{this.onEnteringVRObservable.notifyObservers(this)}catch(o){l.a.Warn("Error in your custom logic onEnteringVR: "+o)}if(this._scene.activeCamera){if(this._position=this._scene.activeCamera.position.clone(),this.vrDeviceOrientationCamera&&(this.vrDeviceOrientationCamera.rotation=u.b.FromRotationMatrix(this._scene.activeCamera.getWorldMatrix().getRotationMatrix()).toEulerAngles(),this.vrDeviceOrientationCamera.angularSensibility=2e3),this.webVRCamera){var e=this.webVRCamera.deviceRotationQuaternion.toEulerAngles().y,n=u.b.FromRotationMatrix(this._scene.activeCamera.getWorldMatrix().getRotationMatrix()).toEulerAngles().y-e,i=this.webVRCamera.rotationQuaternion.toEulerAngles().y;this.webVRCamera.rotationQuaternion=u.b.FromEulerAngles(0,i+n,0)}this._existingCamera=this._scene.activeCamera,this._existingCamera.angularSensibilityX&&(this._cachedAngularSensibility.angularSensibilityX=this._existingCamera.angularSensibilityX,this._existingCamera.angularSensibilityX=Number.MAX_VALUE),this._existingCamera.angularSensibilityY&&(this._cachedAngularSensibility.angularSensibilityY=this._existingCamera.angularSensibilityY,this._existingCamera.angularSensibilityY=Number.MAX_VALUE),this._existingCamera.angularSensibility&&(this._cachedAngularSensibility.angularSensibility=this._existingCamera.angularSensibility,this._existingCamera.angularSensibility=Number.MAX_VALUE)}this._webVRrequesting||(this._webVRready?this._webVRpresenting||(this._scene.getEngine().onVRRequestPresentComplete.addOnce(function(o){t.onAfterEnteringVRObservable.notifyObservers({success:o})}),this._webVRCamera.position=this._position,this._scene.activeCamera=this._webVRCamera):this._vrDeviceOrientationCamera&&(this._vrDeviceOrientationCamera.position=this._position,this._scene.activeCamera&&(this._vrDeviceOrientationCamera.minZ=this._scene.activeCamera.minZ),this._scene.activeCamera=this._vrDeviceOrientationCamera,this._scene.getEngine().enterFullscreen(this.requestPointerLockOnFullScreen),this.updateButtonVisibility(),this._vrDeviceOrientationCamera.onViewMatrixChangedObservable.addOnce(function(){t.onAfterEnteringVRObservable.notifyObservers({success:!0})})),this._scene.activeCamera&&this._inputElement&&this._scene.activeCamera.attachControl(),this._interactionsEnabled&&this._scene.registerBeforeRender(this.beforeRender),this._displayLaserPointer&&[this._leftController,this._rightController].forEach(function(o){o&&o._activatePointer()}),this._hasEnteredVR=!0)}},r.prototype.exitVR=function(){if(this.xr)this.xr.baseExperience.exitXRAsync();else if(this._hasEnteredVR){if(this.onExitingVRObservable)try{this.onExitingVRObservable.notifyObservers(this)}catch(e){l.a.Warn("Error in your custom logic onExitingVR: "+e)}this._webVRpresenting&&this._scene.getEngine().disableVR(),this._scene.activeCamera&&(this._position=this._scene.activeCamera.position.clone()),this.vrDeviceOrientationCamera&&(this.vrDeviceOrientationCamera.angularSensibility=Number.MAX_VALUE),this._deviceOrientationCamera?(this._deviceOrientationCamera.position=this._position,this._scene.activeCamera=this._deviceOrientationCamera,this._cachedAngularSensibility.angularSensibilityX&&(this._deviceOrientationCamera.angularSensibilityX=this._cachedAngularSensibility.angularSensibilityX,this._cachedAngularSensibility.angularSensibilityX=null),this._cachedAngularSensibility.angularSensibilityY&&(this._deviceOrientationCamera.angularSensibilityY=this._cachedAngularSensibility.angularSensibilityY,this._cachedAngularSensibility.angularSensibilityY=null),this._cachedAngularSensibility.angularSensibility&&(this._deviceOrientationCamera.angularSensibility=this._cachedAngularSensibility.angularSensibility,this._cachedAngularSensibility.angularSensibility=null)):this._existingCamera&&(this._existingCamera.position=this._position,this._scene.activeCamera=this._existingCamera,this._inputElement&&this._scene.activeCamera.attachControl(),this._cachedAngularSensibility.angularSensibilityX&&(this._existingCamera.angularSensibilityX=this._cachedAngularSensibility.angularSensibilityX,this._cachedAngularSensibility.angularSensibilityX=null),this._cachedAngularSensibility.angularSensibilityY&&(this._existingCamera.angularSensibilityY=this._cachedAngularSensibility.angularSensibilityY,this._cachedAngularSensibility.angularSensibilityY=null),this._cachedAngularSensibility.angularSensibility&&(this._existingCamera.angularSensibility=this._cachedAngularSensibility.angularSensibility,this._cachedAngularSensibility.angularSensibility=null)),this.updateButtonVisibility(),this._interactionsEnabled&&(this._scene.unregisterBeforeRender(this.beforeRender),this._cameraGazer._gazeTracker.isVisible=!1,this._leftController&&(this._leftController._gazeTracker.isVisible=!1),this._rightController&&(this._rightController._gazeTracker.isVisible=!1)),this._scene.getEngine().resize(),[this._leftController,this._rightController].forEach(function(e){e&&e._deactivatePointer()}),this._hasEnteredVR=!1;var t=this._scene.getEngine();t._onVrDisplayPresentChange&&t._onVrDisplayPresentChange()}},Object.defineProperty(r.prototype,"position",{get:function(){return this._position},set:function(t){this._position=t,this._scene.activeCamera&&(this._scene.activeCamera.position=t)},enumerable:!1,configurable:!0}),r.prototype.enableInteractions=function(){var t=this;if(!this._interactionsEnabled){if(this._interactionsRequested=!0,this.xr)return void(this.xr.baseExperience.state===fn.IN_XR&&this.xr.pointerSelection.attach());this._leftController&&this._enableInteractionOnController(this._leftController),this._rightController&&this._enableInteractionOnController(this._rightController),this.raySelectionPredicate=function(e){return e.isVisible&&(e.isPickable||e.name===t._floorMeshName)},this.meshSelectionPredicate=function(){return!0},this._raySelectionPredicate=function(e){return!!(t._isTeleportationFloor(e)||e.name.indexOf("gazeTracker")===-1&&e.name.indexOf("teleportationTarget")===-1&&e.name.indexOf("torusTeleportation")===-1)&&t.raySelectionPredicate(e)},this._interactionsEnabled=!0}},Object.defineProperty(r.prototype,"_noControllerIsActive",{get:function(){return!(this._leftController&&this._leftController._activePointer||this._rightController&&this._rightController._activePointer)},enumerable:!1,configurable:!0}),r.prototype._isTeleportationFloor=function(t){for(var e=0;e-1||this._floorMeshesCollection.push(t))},r.prototype.removeFloorMesh=function(t){if(this._floorMeshesCollection){var e=this._floorMeshesCollection.indexOf(t);e!==-1&&this._floorMeshesCollection.splice(e,1)}},r.prototype.enableTeleportation=function(t){var e=this;if(t===void 0&&(t={}),!this._teleportationInitialized){if(this._teleportationRequested=!0,this.enableInteractions(),this.webVROptions.useXR&&(t.floorMeshes||t.floorMeshName)){var n=t.floorMeshes||[];if(!n.length){var i=this._scene.getMeshByName(t.floorMeshName);i&&n.push(i)}if(this.xr)return n.forEach(function(s){e.xr.teleportation.addFloorMesh(s)}),void(this.xr.teleportation.attached||this.xr.teleportation.attach());if(!this.xrTestDone){var o=function(){e.xrTestDone&&(e._scene.unregisterBeforeRender(o),e.xr?e.xr.teleportation.attached||e.xr.teleportation.attach():e.enableTeleportation(t))};return void this._scene.registerBeforeRender(o)}}t.floorMeshName&&(this._floorMeshName=t.floorMeshName),t.floorMeshes&&(this._floorMeshesCollection=t.floorMeshes),t.teleportationMode&&(this._teleportationMode=t.teleportationMode),t.teleportationTime&&t.teleportationTime>0&&(this._teleportationTime=t.teleportationTime),t.teleportationSpeed&&t.teleportationSpeed>0&&(this._teleportationSpeed=t.teleportationSpeed),t.easingFunction!==void 0&&(this._teleportationEasing=t.easingFunction),this._leftController!=null&&this._enableTeleportationOnController(this._leftController),this._rightController!=null&&this._enableTeleportationOnController(this._rightController);var a=new vn.a;a.vignetteColor=new M.b(0,0,0,0),a.vignetteEnabled=!0,this._postProcessMove=new zo("postProcessMove",1,this._webVRCamera,void 0,void 0,void 0,void 0,a),this._webVRCamera.detachPostProcess(this._postProcessMove),this._teleportationInitialized=!0,this._isDefaultTeleportationTarget&&(this._createTeleportationCircles(),this._teleportationTarget.scaling.scaleInPlace(this._webVRCamera.deviceScaleFactor))}},r.prototype._enableInteractionOnController=function(t){var e=this;t.webVRController.mesh&&(t._interactionsEnabled=!0,this.isInVRMode&&this._displayLaserPointer&&t._activatePointer(),this.webVROptions.laserToggle&&t.webVRController.onMainButtonStateChangedObservable.add(function(n){e._displayLaserPointer&&n.value===1&&(t._activePointer?t._deactivatePointer():t._activatePointer(),e.displayGaze&&(t._gazeTracker.isVisible=t._activePointer))}),t.webVRController.onTriggerStateChangedObservable.add(function(n){var i=t;e._noControllerIsActive&&(i=e._cameraGazer),i._pointerDownOnMeshAsked?n.valuee._padSensibilityUp&&i._selectionPointerDown()}))},r.prototype._checkTeleportWithRay=function(t,e){this._teleportationRequestInitiated&&!e._teleportationRequestInitiated||(e._teleportationRequestInitiated?Math.sqrt(t.y*t.y+t.x*t.x)-this._padSensibilityDown&&(e._rotationLeftAsked=!1):t.x<-this._padSensibilityUp&&e._dpadPressed&&(e._rotationLeftAsked=!0,this._rotationAllowed&&this._rotateCamera(!1)),e._rotationRightAsked?t.xthis._padSensibilityUp&&e._dpadPressed&&(e._rotationRightAsked=!0,this._rotationAllowed&&this._rotateCamera(!0)))},r.prototype._checkTeleportBackwards=function(t,e){if(!e._teleportationRequestInitiated)if(t.y>this._padSensibilityUp&&e._dpadPressed){if(!e._teleportationBackRequestInitiated){if(!this.currentVRCamera)return;var n=u.b.FromRotationMatrix(this.currentVRCamera.getWorldMatrix().getRotationMatrix()),i=this.currentVRCamera.position;this.currentVRCamera.devicePosition&&this.currentVRCamera.deviceRotationQuaternion&&(n=this.currentVRCamera.deviceRotationQuaternion,i=this.currentVRCamera.devicePosition),n.toEulerAnglesToRef(this._workingVector),this._workingVector.z=0,this._workingVector.x=0,u.b.RotationYawPitchRollToRef(this._workingVector.y,this._workingVector.x,this._workingVector.z,this._workingQuaternion),this._workingQuaternion.toRotationMatrix(this._workingMatrix),u.e.TransformCoordinatesToRef(this._teleportBackwardsVector,this._workingMatrix,this._workingVector);var o=new dn.a(i,this._workingVector),a=this._scene.pickWithRay(o,this._raySelectionPredicate);a&&a.pickedPoint&&a.pickedMesh&&this._isTeleportationFloor(a.pickedMesh)&&a.distance<5&&this.teleportCamera(a.pickedPoint),e._teleportationBackRequestInitiated=!0}}else e._teleportationBackRequestInitiated=!1},r.prototype._enableTeleportationOnController=function(t){var e=this;t.webVRController.mesh&&(t._interactionsEnabled||this._enableInteractionOnController(t),t._interactionsEnabled=!0,t._teleportationEnabled=!0,t.webVRController.controllerType===ii.VIVE&&(t._dpadPressed=!1,t.webVRController.onPadStateChangedObservable.add(function(n){t._dpadPressed=n.pressed,t._dpadPressed||(t._rotationLeftAsked=!1,t._rotationRightAsked=!1,t._teleportationBackRequestInitiated=!1)})),t.webVRController.onPadValuesChangedObservable.add(function(n){e.teleportationEnabled&&(e._checkTeleportBackwards(n,t),e._checkTeleportWithRay(n,t)),e._checkRotate(n,t)}))},r.prototype._createTeleportationCircles=function(){this._teleportationTarget=De.a.CreateGround("teleportationTarget",2,2,2,this._scene),this._teleportationTarget.isPickable=!1;var t=new bi.a("DynamicTexture",512,this._scene,!0);t.hasAlpha=!0;var e=t.getContext();e.beginPath(),e.arc(256,256,200,0,2*Math.PI,!1),e.fillStyle=this._teleportationFillColor,e.fill(),e.lineWidth=10,e.strokeStyle=this._teleportationBorderColor,e.stroke(),e.closePath(),t.update();var n=new Ft.a("TextPlaneMaterial",this._scene);n.diffuseTexture=t,this._teleportationTarget.material=n;var i=De.a.CreateTorus("torusTeleportation",.75,.1,25,this._scene,!1);i.isPickable=!1,i.parent=this._teleportationTarget;var o=new k("animationInnerCircle","position.y",30,k.ANIMATIONTYPE_FLOAT,k.ANIMATIONLOOPMODE_CYCLE),a=[];a.push({frame:0,value:0}),a.push({frame:30,value:.4}),a.push({frame:60,value:0}),o.setKeys(a);var s=new on;s.setEasingMode(Ge.EASINGMODE_EASEINOUT),o.setEasingFunction(s),i.animations=[],i.animations.push(o),this._scene.beginAnimation(i,0,60,!0),this._hideTeleportationTarget()},r.prototype._displayTeleportationTarget=function(){this._teleportActive=!0,this._teleportationInitialized&&(this._teleportationTarget.isVisible=!0,this._isDefaultTeleportationTarget&&(this._teleportationTarget.getChildren()[0].isVisible=!0))},r.prototype._hideTeleportationTarget=function(){this._teleportActive=!1,this._teleportationInitialized&&(this._teleportationTarget.isVisible=!1,this._isDefaultTeleportationTarget&&(this._teleportationTarget.getChildren()[0].isVisible=!1))},r.prototype._rotateCamera=function(t){var e=this;if(this.currentVRCamera instanceof Yn){t?this._rotationAngle++:this._rotationAngle--,this.currentVRCamera.animations=[];var n=u.b.FromRotationMatrix(u.a.RotationY(Math.PI/4*this._rotationAngle)),i=new k("animationRotation","rotationQuaternion",90,k.ANIMATIONTYPE_QUATERNION,k.ANIMATIONLOOPMODE_CONSTANT),o=[];o.push({frame:0,value:this.currentVRCamera.rotationQuaternion}),o.push({frame:6,value:n}),i.setKeys(o),i.setEasingFunction(this._circleEase),this.currentVRCamera.animations.push(i),this._postProcessMove.animations=[];var a=new k("animationPP","vignetteWeight",90,k.ANIMATIONTYPE_FLOAT,k.ANIMATIONLOOPMODE_CONSTANT),s=[];s.push({frame:0,value:0}),s.push({frame:3,value:4}),s.push({frame:6,value:0}),a.setKeys(s),a.setEasingFunction(this._circleEase),this._postProcessMove.animations.push(a);var d=new k("animationPP2","vignetteStretch",90,k.ANIMATIONTYPE_FLOAT,k.ANIMATIONLOOPMODE_CONSTANT),p=[];p.push({frame:0,value:0}),p.push({frame:3,value:10}),p.push({frame:6,value:0}),d.setKeys(p),d.setEasingFunction(this._circleEase),this._postProcessMove.animations.push(d),this._postProcessMove.imageProcessingConfiguration.vignetteWeight=0,this._postProcessMove.imageProcessingConfiguration.vignetteStretch=0,this._postProcessMove.samples=4,this._webVRCamera.attachPostProcess(this._postProcessMove),this._scene.beginAnimation(this._postProcessMove,0,6,!1,1,function(){e._webVRCamera.detachPostProcess(e._postProcessMove)}),this._scene.beginAnimation(this.currentVRCamera,0,6,!1,1)}},r.prototype._moveTeleportationSelectorTo=function(t,e,n){if(t.pickedPoint){e._teleportationRequestInitiated&&(this._displayTeleportationTarget(),this._haloCenter.copyFrom(t.pickedPoint),this._teleportationTarget.position.copyFrom(t.pickedPoint));var i=this._convertNormalToDirectionOfRay(t.getNormal(!0,!1),n);if(i){var o=u.e.Cross(ye.a.Y,i),a=u.e.Cross(i,o);u.e.RotationFromAxisToRef(a,i,o,this._teleportationTarget.rotation)}this._teleportationTarget.position.y+=.1}},r.prototype.teleportCamera=function(t){var e=this;if(this.currentVRCamera instanceof Yn){this.webVRCamera.leftCamera?(this._workingVector.copyFrom(this.webVRCamera.leftCamera.globalPosition),this._workingVector.subtractInPlace(this.webVRCamera.position),t.subtractToRef(this._workingVector,this._workingVector)):this._workingVector.copyFrom(t),this.isInVRMode?this._workingVector.y+=this.webVRCamera.deviceDistanceToRoomGround()*this._webVRCamera.deviceScaleFactor:this._workingVector.y+=this._defaultHeight,this.onBeforeCameraTeleport.notifyObservers(this._workingVector);var n,i;if(this._teleportationMode==r.TELEPORTATIONMODE_CONSTANTSPEED){i=90;var o=u.e.Distance(this.currentVRCamera.position,this._workingVector);n=this._teleportationSpeed/o}else i=Math.round(90*this._teleportationTime/1e3),n=1;this.currentVRCamera.animations=[];var a=new k("animationCameraTeleportation","position",90,k.ANIMATIONTYPE_VECTOR3,k.ANIMATIONLOOPMODE_CONSTANT),s=[{frame:0,value:this.currentVRCamera.position},{frame:i,value:this._workingVector}];a.setKeys(s),a.setEasingFunction(this._teleportationEasing),this.currentVRCamera.animations.push(a),this._postProcessMove.animations=[];var d=Math.round(i/2),p=new k("animationPP","vignetteWeight",90,k.ANIMATIONTYPE_FLOAT,k.ANIMATIONLOOPMODE_CONSTANT),b=[];b.push({frame:0,value:0}),b.push({frame:d,value:8}),b.push({frame:i,value:0}),p.setKeys(b),this._postProcessMove.animations.push(p);var x=new k("animationPP2","vignetteStretch",90,k.ANIMATIONTYPE_FLOAT,k.ANIMATIONLOOPMODE_CONSTANT),O=[];O.push({frame:0,value:0}),O.push({frame:d,value:10}),O.push({frame:i,value:0}),x.setKeys(O),this._postProcessMove.animations.push(x),this._postProcessMove.imageProcessingConfiguration.vignetteWeight=0,this._postProcessMove.imageProcessingConfiguration.vignetteStretch=0,this._webVRCamera.attachPostProcess(this._postProcessMove),this._scene.beginAnimation(this._postProcessMove,0,i,!1,n,function(){e._webVRCamera.detachPostProcess(e._postProcessMove)}),this._scene.beginAnimation(this.currentVRCamera,0,i,!1,n,function(){e.onAfterCameraTeleport.notifyObservers(e._workingVector)}),this._hideTeleportationTarget()}},r.prototype._convertNormalToDirectionOfRay=function(t,e){return t&&Math.acos(u.e.Dot(t,e.direction))s){var d=s;s=a,a=d}return a>0&&a0&&s=0))},r.prototype._canDoCollision=function(t,e,n,i){var o=u.e.Distance(this._basePointWorld,t),a=Math.max(this._radius.x,this._radius.y,this._radius.z);return!(o>this._velocityWorldLength+a+e)&&!!function(s,d,p,b){return!(s.x>p.x+b)&&!(p.x-b>d.x)&&!(s.y>p.y+b)&&!(p.y-b>d.y)&&!(s.z>p.z+b)&&!(p.z-b>d.z)}(n,i,this._basePointWorld,this._velocityWorldLength+a)},r.prototype._testTriangle=function(t,e,n,i,o,a,s){var d,p=!1;e||(e=[]),e[t]||(e[t]=new vr.a(0,0,0,0),e[t].copyFromPoints(n,i,o));var b=e[t];if(a||b.isFrontFacingTo(this._normalizedVelocity,0)){var x=b.signedDistanceTo(this._basePoint),O=u.e.Dot(b.normal,this._velocity);if(O==0){if(Math.abs(x)>=1)return;p=!0,d=0}else{var B=(1-x)/O;if((d=(-1-x)/O)>B){var F=B;B=d,d=F}if(d>1||B<0)return;d<0&&(d=0),d>1&&(d=1)}this._collisionPoint.copyFromFloats(0,0,0);var z=!1,J=1;if(p||(this._basePoint.subtractToRef(b.normal,this._planeIntersectionPoint),this._velocity.scaleToRef(d,this._tempVector),this._planeIntersectionPoint.addInPlace(this._tempVector),this._checkPointInTriangle(this._planeIntersectionPoint,n,i,o,b.normal)&&(z=!0,J=d,this._collisionPoint.copyFrom(this._planeIntersectionPoint))),!z){var ie=this._velocity.lengthSquared(),se=ie;this._basePoint.subtractToRef(n,this._tempVector);var ce=2*u.e.Dot(this._velocity,this._tempVector),ue=this._tempVector.lengthSquared()-1,fe=br(se,ce,ue,J);fe.found&&(J=fe.root,z=!0,this._collisionPoint.copyFrom(n)),this._basePoint.subtractToRef(i,this._tempVector),ce=2*u.e.Dot(this._velocity,this._tempVector),ue=this._tempVector.lengthSquared()-1,(fe=br(se,ce,ue,J)).found&&(J=fe.root,z=!0,this._collisionPoint.copyFrom(i)),this._basePoint.subtractToRef(o,this._tempVector),ce=2*u.e.Dot(this._velocity,this._tempVector),ue=this._tempVector.lengthSquared()-1,(fe=br(se,ce,ue,J)).found&&(J=fe.root,z=!0,this._collisionPoint.copyFrom(o)),i.subtractToRef(n,this._edge),n.subtractToRef(this._basePoint,this._baseToVertex);var ve=this._edge.lengthSquared(),Te=u.e.Dot(this._edge,this._velocity),Re=u.e.Dot(this._edge,this._baseToVertex);if(se=ve*-ie+Te*Te,ce=ve*(2*u.e.Dot(this._velocity,this._baseToVertex))-2*Te*Re,ue=ve*(1-this._baseToVertex.lengthSquared())+Re*Re,(fe=br(se,ce,ue,J)).found){var Ae=(Te*fe.root-Re)/ve;Ae>=0&&Ae<=1&&(J=fe.root,z=!0,this._edge.scaleInPlace(Ae),n.addToRef(this._edge,this._collisionPoint))}o.subtractToRef(i,this._edge),i.subtractToRef(this._basePoint,this._baseToVertex),ve=this._edge.lengthSquared(),Te=u.e.Dot(this._edge,this._velocity),Re=u.e.Dot(this._edge,this._baseToVertex),se=ve*-ie+Te*Te,ce=ve*(2*u.e.Dot(this._velocity,this._baseToVertex))-2*Te*Re,ue=ve*(1-this._baseToVertex.lengthSquared())+Re*Re,(fe=br(se,ce,ue,J)).found&&(Ae=(Te*fe.root-Re)/ve)>=0&&Ae<=1&&(J=fe.root,z=!0,this._edge.scaleInPlace(Ae),i.addToRef(this._edge,this._collisionPoint)),n.subtractToRef(o,this._edge),o.subtractToRef(this._basePoint,this._baseToVertex),ve=this._edge.lengthSquared(),Te=u.e.Dot(this._edge,this._velocity),Re=u.e.Dot(this._edge,this._baseToVertex),se=ve*-ie+Te*Te,ce=ve*(2*u.e.Dot(this._velocity,this._baseToVertex))-2*Te*Re,ue=ve*(1-this._baseToVertex.lengthSquared())+Re*Re,(fe=br(se,ce,ue,J)).found&&(Ae=(Te*fe.root-Re)/ve)>=0&&Ae<=1&&(J=fe.root,z=!0,this._edge.scaleInPlace(Ae),o.addToRef(this._edge,this._collisionPoint))}if(z){var Ee=J*this._velocity.length();(!this.collisionFound||Ee=i)o.copyFrom(t);else{var d=a?a.collisionMask:n.collisionMask;n._initialize(t,e,s);for(var p=a&&a.surroundingMeshes||this._scene.meshes,b=0;bthis.capacity&&this._depth-1&&this.entries.splice(n,1)}},r.prototype.addEntries=function(t){for(var e=0;e=i.buttons.length?o[n]=i.axes[n-i.buttons.length].valueOf():o[n]=i.buttons[n].value}},r.prototype._getGamepadDeviceType=function(t){return t.indexOf("054c")!==-1?Kt.DualShock:t.indexOf("Xbox One")!==-1||t.search("Xbox 360")!==-1||t.search("xinput")!==-1?Kt.Xbox:t.indexOf("057e")!==-1?Kt.Switch:Kt.Generic},r._MAX_KEYCODES=255,r._MAX_POINTER_INPUTS=7,r}(),iu=function(){function r(t,e,n){n===void 0&&(n=0),this.deviceType=e,this.deviceSlot=n,this.onInputChangedObservable=new R.c,this._deviceInputSystem=t}return r.prototype.getInput=function(t){return this._deviceInputSystem.pollInput(this.deviceType,this.deviceSlot,t)},r}(),Zf=function(){function r(t){var e=this;this.onDeviceConnectedObservable=new R.c(function(i){e.getDevices().forEach(function(o){e.onDeviceConnectedObservable.notifyObserver(i,o)})}),this.onDeviceDisconnectedObservable=new R.c;var n=Object.keys(Kt).length/2;this._devices=new Array(n),this._firstDevice=new Array(n),this._deviceInputSystem=nu.Create(t),this._deviceInputSystem.onDeviceConnected=function(i,o){e._addDevice(i,o),e.onDeviceConnectedObservable.notifyObservers(e.getDeviceSource(i,o))},this._deviceInputSystem.onDeviceDisconnected=function(i,o){var a=e.getDeviceSource(i,o);e._removeDevice(i,o),e.onDeviceDisconnectedObservable.notifyObservers(a)},this._deviceInputSystem.onInputChanged||(this._deviceInputSystem.onInputChanged=function(i,o,a,s,d){var p;(p=e.getDeviceSource(i,o))===null||p===void 0||p.onInputChangedObservable.notifyObservers({inputIndex:a,previousState:s,currentState:d})})}return r.prototype.getDeviceSource=function(t,e){if(e===void 0){if(this._firstDevice[t]===void 0)return null;e=this._firstDevice[t]}return this._devices[t]&&this._devices[t][e]!==void 0?this._devices[t][e]:null},r.prototype.getDeviceSources=function(t){return this._devices[t].filter(function(e){return!!e})},r.prototype.getDevices=function(){var t=new Array;return this._devices.forEach(function(e){t.push.apply(t,e)}),t},r.prototype.dispose=function(){this.onDeviceConnectedObservable.clear(),this.onDeviceDisconnectedObservable.clear(),this._deviceInputSystem.dispose()},r.prototype._addDevice=function(t,e){this._devices[t]||(this._devices[t]=new Array),this._devices[t][e]||(this._devices[t][e]=new iu(this._deviceInputSystem,t,e),this._updateFirstDevices(t))},r.prototype._removeDevice=function(t,e){delete this._devices[t][e],this._updateFirstDevices(t)},r.prototype._updateFirstDevices=function(t){switch(t){case Kt.Keyboard:case Kt.Mouse:this._firstDevice[t]=0;break;case Kt.Touch:case Kt.DualShock:case Kt.Xbox:case Kt.Switch:case Kt.Generic:var e=this._devices[t];delete this._firstDevice[t];for(var n=0;nr.occlusionRetryCount))return!1;r.isOcclusionQueryInProgress=!1,r.occlusionInternalRetryCounter=0,r.isOccluded=r.occlusionType!==Dt.a.OCCLUSION_TYPE_OPTIMISTIC&&r.isOccluded}var n=this.getScene();if(n.getBoundingBoxRenderer){var i=n.getBoundingBoxRenderer();this._occlusionQuery||(this._occlusionQuery=t.createQuery()),t.beginOcclusionQuery(r.occlusionQueryAlgorithmType,this._occlusionQuery),i.renderOcclusionBoundingBox(this),t.endOcclusionQuery(r.occlusionQueryAlgorithmType),this._occlusionDataStorage.isOcclusionQueryInProgress=!0}return r.isOccluded};var Jf=!0;Ue.a.prototype.createTransformFeedback=function(){return this._gl.createTransformFeedback()},Ue.a.prototype.deleteTransformFeedback=function(r){this._gl.deleteTransformFeedback(r)},Ue.a.prototype.bindTransformFeedback=function(r){this._gl.bindTransformFeedback(this._gl.TRANSFORM_FEEDBACK,r)},Ue.a.prototype.beginTransformFeedback=function(r){r===void 0&&(r=!0),this._gl.beginTransformFeedback(r?this._gl.POINTS:this._gl.TRIANGLES)},Ue.a.prototype.endTransformFeedback=function(){this._gl.endTransformFeedback()},Ue.a.prototype.setTranformFeedbackVaryings=function(r,t){this._gl.transformFeedbackVaryings(r,t,this._gl.INTERLEAVED_ATTRIBS)},Ue.a.prototype.bindTransformFeedbackBuffer=function(r){this._gl.bindBufferBase(this._gl.TRANSFORM_FEEDBACK_BUFFER,0,r?r.underlyingResource:null)},f(126),Bt.a.prototype.updateVideoTexture=function(r,t,e){if(r&&!r._isDisabled){var n=this._bindTextureDirectly(this._gl.TEXTURE_2D,r,!0);this._unpackFlipY(!e);try{if(this._videoTextureSupported===void 0&&(this._gl.getError(),this._gl.texImage2D(this._gl.TEXTURE_2D,0,this._gl.RGBA,this._gl.RGBA,this._gl.UNSIGNED_BYTE,t),this._gl.getError()!==0?this._videoTextureSupported=!1:this._videoTextureSupported=!0),this._videoTextureSupported)this._gl.texImage2D(this._gl.TEXTURE_2D,0,this._gl.RGBA,this._gl.RGBA,this._gl.UNSIGNED_BYTE,t);else{if(!r._workingCanvas){r._workingCanvas=fs.a.CreateCanvas(r.width,r.height);var i=r._workingCanvas.getContext("2d");if(!i)throw new Error("Unable to get 2d context");r._workingContext=i,r._workingCanvas.width=r.width,r._workingCanvas.height=r.height}r._workingContext.clearRect(0,0,r.width,r.height),r._workingContext.drawImage(t,0,0,t.videoWidth,t.videoHeight,0,0,r.width,r.height),this._gl.texImage2D(this._gl.TEXTURE_2D,0,this._gl.RGBA,this._gl.RGBA,this._gl.UNSIGNED_BYTE,r._workingCanvas)}r.generateMipMaps&&this._gl.generateMipmap(this._gl.TEXTURE_2D),n||this._bindTextureDirectly(this._gl.TEXTURE_2D,null),r.isReady=!0}catch{r._isDisabled=!0}}},Bt.a.prototype.restoreSingleAttachment=function(){var r=this._gl;this.bindAttachments([r.BACK])},Bt.a.prototype.buildTextureLayout=function(r){for(var t=this._gl,e=[],n=0;n1?"COLOR_ATTACHMENT"+a:"COLOR_ATTACHMENT"+a+"_WEBGL"],n.readBuffer(i[a]),n.drawBuffers(i),n.blitFramebuffer(0,0,s.width,s.height,0,0,s.width,s.height,n.COLOR_BUFFER_BIT,n.NEAREST)}for(a=0;a1?"COLOR_ATTACHMENT"+a:"COLOR_ATTACHMENT"+a+"_WEBGL"];n.drawBuffers(i)}for(a=0;a1?"COLOR_ATTACHMENT"+se:"COLOR_ATTACHMENT"+se+"_WEBGL"];z.push(ve),J.push(Te),x.activeTexture(x["TEXTURE"+se]),x.bindTexture(x.TEXTURE_2D,ve._webGLTexture),x.texParameteri(x.TEXTURE_2D,x.TEXTURE_MAG_FILTER,fe.mag),x.texParameteri(x.TEXTURE_2D,x.TEXTURE_MIN_FILTER,fe.min),x.texParameteri(x.TEXTURE_2D,x.TEXTURE_WRAP_S,x.CLAMP_TO_EDGE),x.texParameteri(x.TEXTURE_2D,x.TEXTURE_WRAP_T,x.CLAMP_TO_EDGE),x.texImage2D(x.TEXTURE_2D,0,this._getRGBABufferInternalSizedFormat(ue),B,F,0,x.RGBA,this._getWebGLTextureType(ue),null),x.framebufferTexture2D(x.DRAW_FRAMEBUFFER,Te,x.TEXTURE_2D,ve._webGLTexture,0),e&&this._gl.generateMipmap(this._gl.TEXTURE_2D),this._bindTextureDirectly(x.TEXTURE_2D,null),ve._framebuffer=O,ve._depthStencilBuffer=ie,ve.baseWidth=B,ve.baseHeight=F,ve.width=B,ve.height=F,ve.isReady=!0,ve.samples=1,ve.generateMipMaps=e,ve.samplingMode=ce,ve.type=ue,ve._generateDepthBuffer=n,ve._generateStencilBuffer=i,ve._attachments=J,ve._textureArray=z,this._internalTexturesCache.push(ve)}if(o&&this._caps.depthTextureExtension){var Re=new Ct.a(this,Ct.b.MultiRenderTarget);x.activeTexture(x.TEXTURE0),x.bindTexture(x.TEXTURE_2D,Re._webGLTexture),x.texParameteri(x.TEXTURE_2D,x.TEXTURE_MAG_FILTER,x.NEAREST),x.texParameteri(x.TEXTURE_2D,x.TEXTURE_MIN_FILTER,x.NEAREST),x.texParameteri(x.TEXTURE_2D,x.TEXTURE_WRAP_S,x.CLAMP_TO_EDGE),x.texParameteri(x.TEXTURE_2D,x.TEXTURE_WRAP_T,x.CLAMP_TO_EDGE),x.texImage2D(x.TEXTURE_2D,0,this.webGLVersion<2?x.DEPTH_COMPONENT:x.DEPTH_COMPONENT16,B,F,0,x.DEPTH_COMPONENT,x.UNSIGNED_SHORT,null),x.framebufferTexture2D(x.FRAMEBUFFER,x.DEPTH_ATTACHMENT,x.TEXTURE_2D,Re._webGLTexture,0),Re._framebuffer=O,Re.baseWidth=B,Re.baseHeight=F,Re.width=B,Re.height=F,Re.isReady=!0,Re.samples=1,Re.generateMipMaps=e,Re.samplingMode=x.NEAREST,Re._generateDepthBuffer=n,Re._generateStencilBuffer=i,z.push(Re),this._internalTexturesCache.push(Re)}return x.drawBuffers(J),this._bindUnboundFramebuffer(null),this.resetTextureCache(),z},Bt.a.prototype.updateMultipleRenderTargetTextureSampleCount=function(r,t){if(this.webGLVersion<2||!r)return 1;if(r[0].samples===t)return t;var e=r[0]._attachments.length;if(e===0)return 1;var n=this._gl;t=Math.min(t,this.getCaps().maxMSAASamples),r[0]._depthStencilBuffer&&(n.deleteRenderbuffer(r[0]._depthStencilBuffer),r[0]._depthStencilBuffer=null),r[0]._MSAAFramebuffer&&(n.deleteFramebuffer(r[0]._MSAAFramebuffer),r[0]._MSAAFramebuffer=null);for(var i=0;i1&&n.renderbufferStorageMultisample){var o=n.createFramebuffer();if(!o)throw new Error("Unable to create multi sampled framebuffer");this._bindUnboundFramebuffer(o);var a=this._setupFramebufferDepthAttachments(r[0]._generateStencilBuffer,r[0]._generateDepthBuffer,r[0].width,r[0].height,t),s=[];for(i=0;i1?"COLOR_ATTACHMENT"+i:"COLOR_ATTACHMENT"+i+"_WEBGL"],b=n.createRenderbuffer();if(!b)throw new Error("Unable to create multi sampled framebuffer");n.bindRenderbuffer(n.RENDERBUFFER,b),n.renderbufferStorageMultisample(n.RENDERBUFFER,t,this._getRGBAMultiSampleBufferFormat(d.type),d.width,d.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,p,n.RENDERBUFFER,b),d._MSAAFramebuffer=o,d._MSAARenderBuffer=b,d.samples=t,d._depthStencilBuffer=a,n.bindRenderbuffer(n.RENDERBUFFER,null),s.push(p)}n.drawBuffers(s)}else this._bindUnboundFramebuffer(r[0]._framebuffer);return this._bindUnboundFramebuffer(null),t};var to=f(56);Bt.a.prototype._createDepthStencilCubeTexture=function(r,t){var e=new Ct.a(this,Ct.b.Unknown);if(e.isCube=!0,this.webGLVersion===1)return l.a.Error("Depth cube texture is not supported by WebGL 1."),e;var n=Object(c.a)({bilinearFiltering:!1,comparisonFunction:0,generateStencil:!1},t),i=this._gl;this._bindTextureDirectly(i.TEXTURE_CUBE_MAP,e,!0),this._setupDepthStencilTexture(e,r,n.generateStencil,n.bilinearFiltering,n.comparisonFunction);for(var o=0;o<6;o++)n.generateStencil?i.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+o,0,i.DEPTH24_STENCIL8,r,r,0,i.DEPTH_STENCIL,i.UNSIGNED_INT_24_8,null):i.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+o,0,i.DEPTH_COMPONENT24,r,r,0,i.DEPTH_COMPONENT,i.UNSIGNED_INT,null);return this._bindTextureDirectly(i.TEXTURE_CUBE_MAP,null),e},Bt.a.prototype._partialLoadFile=function(r,t,e,n,i){i===void 0&&(i=null),this._loadFile(r,function(o){e[t]=o,e._internalCount++,e._internalCount===6&&n(e)},void 0,void 0,!0,function(o,a){i&&o&&i(o.status+" "+o.statusText,a)})},Bt.a.prototype._cascadeLoadFiles=function(r,t,e,n){n===void 0&&(n=null);var i=[];i._internalCount=0;for(var o=0;o<6;o++)this._partialLoadFile(e[o],o,i,t,n)},Bt.a.prototype._cascadeLoadImgs=function(r,t,e,n,i){n===void 0&&(n=null);var o=[];o._internalCount=0;for(var a=0;a<6;a++)this._partialLoadImg(e[a],a,o,r,t,n,i)},Bt.a.prototype._partialLoadImg=function(r,t,e,n,i,o,a){var s;o===void 0&&(o=null),s=to.a.LoadImage(r,function(){s&&(e[t]=s,e._internalCount++,n&&n._removePendingData(s)),e._internalCount===6&&i(e)},function(d,p){n&&n._removePendingData(s),o&&o(d,p)},n?n.offlineProvider:null,a),n&&s&&n._addPendingData(s)},Bt.a.prototype._setCubeMapTextureParams=function(r,t){var e=this._gl;e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_MIN_FILTER,t?e.LINEAR_MIPMAP_LINEAR:e.LINEAR),e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),r.samplingMode=t?h.a.TEXTURE_TRILINEAR_SAMPLINGMODE:h.a.TEXTURE_LINEAR_LINEAR,this._bindTextureDirectly(e.TEXTURE_CUBE_MAP,null)},Bt.a.prototype.createCubeTexture=function(r,t,e,n,i,o,a,s,d,p,b,x,O){var B=this;i===void 0&&(i=null),o===void 0&&(o=null),s===void 0&&(s=null),d===void 0&&(d=!1),p===void 0&&(p=0),b===void 0&&(b=0),x===void 0&&(x=null);var F=this._gl,z=x||new Ct.a(this,Ct.b.Cube);z.isCube=!0,z.url=r,z.generateMipMaps=!n,z._lodGenerationScale=p,z._lodGenerationOffset=b,this._doNotHandleContextLost||(z._extension=s,z._files=e);var J=r;this._transformTextureUrl&&!x&&(r=this._transformTextureUrl(r));for(var ie=r.lastIndexOf("."),se=s||(ie>-1?r.substring(ie).toLowerCase():""),ce=null,ue=0,fe=Bt.a._TextureLoaders;ue-1?r.substring(e,r.length):"";return(t>-1?r.substring(0,t):r)+this._textureFormatInUse+n}Object.defineProperty(Ue.a.prototype,"texturesSupported",{get:function(){var r=new Array;return this._caps.astc&&r.push("-astc.ktx"),this._caps.s3tc&&r.push("-dxt.ktx"),this._caps.pvrtc&&r.push("-pvrtc.ktx"),this._caps.etc2&&r.push("-etc2.ktx"),this._caps.etc1&&r.push("-etc1.ktx"),r},enumerable:!0,configurable:!0}),Object.defineProperty(Ue.a.prototype,"textureFormatInUse",{get:function(){return this._textureFormatInUse||null},enumerable:!0,configurable:!0}),Ue.a.prototype.setCompressedTextureExclusions=function(r){this._excludedCompressedTextures=r},Ue.a.prototype.setTextureFormatToUse=function(r){for(var t=this.texturesSupported,e=0,n=t.length;e +void main(void) +{ +gl_FragColor=toRGBD(texture2D(textureSampler,vUV).rgb); +}`;ze.a.ShadersStore.rgbdEncodePixelShader=ip;var rp=` +varying vec2 vUV; +uniform sampler2D textureSampler; +#include +void main(void) +{ +gl_FragColor=vec4(fromRGBD(texture2D(textureSampler,vUV)),1.0); +}`;ze.a.ShadersStore.rgbdDecodePixelShader=rp;var Ei=function(){function r(){}return r.GetEnvInfo=function(t){for(var e=new DataView(t.buffer,t.byteOffset,t.byteLength),n=0,i=0;i"u")Ye=createImageBitmap(Me).then(function(it){return n._OnImageReadyAsync(it,o,a,d,Fe,xe,Ee,s,b,p,t)});else{var tt=new Image;tt.src=Fe,Ye=new Promise(function(it,lt){tt.onload=function(){n._OnImageReadyAsync(tt,o,a,d,Fe,xe,Ee,s,b,p,t).then(function(){return it()}).catch(function(Ke){lt(Ke)})},tt.onerror=function(Ke){lt(Ke)}})}ue.push(Ye)},Le=0;Le<6;Le++)Se(Le)};for(F=0;F=0&&F.push(J.substring(ie+1))}a!=="void"&&F.push("return"),this._functionDescr.push({name:s,type:a,parameters:F,body:O,callIndex:0}),t=x+1;var se=e>0?this._sourceCode.substring(0,e):"",ce=x+1=0},r.prototype._extractBetweenMarkers=function(t,e,n,i){for(var o=i,a=0,s="";o0?this._sourceCode.substring(0,b):"",fe=O+1"u"&&(window.URL={createObjectURL:function(){},revokeObjectURL:function(){}}),typeof Blob>"u"&&(window.Blob=function(){}),e._shaderProcessor=new su.a,e}return Object(c.d)(t,r),t.prototype.getHardwareScalingLevel=function(){return 1},t.prototype.dispose=function(){r.prototype.dispose.call(this),this._boundBuffersVertexArray&&this._native.deleteVertexArray(this._boundBuffersVertexArray),this._native.dispose()},t.prototype._queueNewFrame=function(e,n){return n.requestAnimationFrame&&n!==window?n.requestAnimationFrame(e):this._native.requestAnimationFrame(e),0},t.prototype._bindUnboundFramebuffer=function(e){this._currentFramebuffer!==e&&(this._currentFramebuffer&&this._native.unbindFramebuffer(this._currentFramebuffer),e&&this._native.bindFramebuffer(e),this._currentFramebuffer=e)},t.prototype.getHostDocument=function(){return null},t.prototype.clear=function(e,n,i,o){o===void 0&&(o=!1);var a=0;n&&e&&(this._native.clearColor(e.r,e.g,e.b,e.a!==void 0?e.a:1),a|=this._native.CLEAR_FLAG_COLOR),i&&(this._native.clearDepth(1),a|=this._native.CLEAR_FLAG_DEPTH),o&&(this._native.clearStencil(0),a|=this._native.CLEAR_FLAG_STENCIL),this._native.clear(a)},t.prototype.createIndexBuffer=function(e,n){var i=this._normalizeIndexData(e),o=new lu;if(o.references=1,o.is32Bits=i.BYTES_PER_ELEMENT===4,i.length){if(o.nativeIndexBuffer=this._native.createIndexBuffer(i,n!=null&&n),o.nativeVertexBuffer===this.INVALID_HANDLE)throw new Error("Could not create a native index buffer.")}else o.nativeVertexBuffer=this.INVALID_HANDLE;return o},t.prototype.createVertexBuffer=function(e,n){var i=new lu;if(i.references=1,i.nativeVertexBuffer=this._native.createVertexBuffer(ArrayBuffer.isView(e)?e:new Float32Array(e),n!=null&&n),i.nativeVertexBuffer===this.INVALID_HANDLE)throw new Error("Could not create a native vertex buffer.");return i},t.prototype._recordVertexArrayObject=function(e,n,i,o){i&&this._native.recordIndexBuffer(e,i.nativeIndexBuffer);for(var a=o.getAttributesNames(),s=0;s=0){var p=n[a[s]];if(p){var b=p.getBuffer();b&&this._native.recordVertexBuffer(e,b.nativeVertexBuffer,d,p.byteOffset,p.byteStride,p.getSize(),this._getNativeAttribType(p.type),p.normalized)}}}},t.prototype.bindBuffers=function(e,n,i){this._boundBuffersVertexArray&&this._native.deleteVertexArray(this._boundBuffersVertexArray),this._boundBuffersVertexArray=this._native.createVertexArray(),this._recordVertexArrayObject(this._boundBuffersVertexArray,e,n,i),this._native.bindVertexArray(this._boundBuffersVertexArray)},t.prototype.recordVertexArrayObject=function(e,n,i){var o=this._native.createVertexArray();return this._recordVertexArrayObject(o,e,n,i),o},t.prototype.bindVertexArrayObject=function(e){this._native.bindVertexArray(e)},t.prototype.releaseVertexArrayObject=function(e){this._native.deleteVertexArray(e)},t.prototype.getAttributes=function(e,n){var i=e;return this._native.getAttributes(i.nativeProgram,n)},t.prototype.drawElementsType=function(e,n,i,o){this._drawCalls.addCount(1,!1),this._native.drawIndexed(e,n,i)},t.prototype.drawArraysType=function(e,n,i,o){this._drawCalls.addCount(1,!1),this._native.draw(e,n,i)},t.prototype.createPipelineContext=function(){return new op},t.prototype._preparePipelineContext=function(e,n,i,o,a,s,d){var p=e;p.nativeProgram=o?this.createRawShaderProgram(e,n,i,void 0,d):this.createShaderProgram(e,n,i,s,void 0,d)},t.prototype._isRenderingStateCompiled=function(e){return!0},t.prototype._executeWhenRenderingStateIsCompiled=function(e,n){n()},t.prototype.createRawShaderProgram=function(e,n,i,o,a){throw new Error("Not Supported")},t.prototype.createShaderProgram=function(e,n,i,o,a,s){this.onBeforeShaderCompilationObservable.notifyObservers(this);var d=new Ss(n);d.processCode(),n=d.code;var p=new Ss(i);p.processCode(),i=p.code,n=Bt.a._ConcatenateShader(n,o),i=Bt.a._ConcatenateShader(i,o);var b=this._native.createProgram(n,i);return this.onAfterShaderCompilationObservable.notifyObservers(this),b},t.prototype._setProgram=function(e){this._currentProgram!==e&&(this._native.setProgram(e),this._currentProgram=e)},t.prototype._releaseEffect=function(e){},t.prototype._deletePipelineContext=function(e){},t.prototype.getUniforms=function(e,n){var i=e;return this._native.getUniforms(i.nativeProgram,n)},t.prototype.bindUniformBlock=function(e,n,i){throw new Error("Not Implemented")},t.prototype.bindSamplers=function(e){var n=e.getPipelineContext();this._setProgram(n.nativeProgram);for(var i=e.getSamplers(),o=0;o-1?e.substring(ue).toLowerCase():""),ve=null,Te=0,Re=Ue.a._TextureLoaders;Te-1?e.substring(J).toLowerCase():""))===".env"){if(i&&i.length===6)throw new Error("Multi-file loading not allowed on env files.");this._loadFile(e,function(se){return function(ce){var ue=Ei.GetEnvInfo(ce);if(z.width=ue.width,z.height=ue.width,Ei.UploadEnvSpherical(z,ue),ue.version!==1)throw new Error('Unsupported babylon environment map version "'+ue.version+'"');var fe=ue.specular;if(!fe)throw new Error("Nothing else parsed so far");z._lodGenerationScale=fe.lodGenerationScale;var ve=Ei.CreateImageDataArrayBufferViews(ce,ue);z.format=h.a.TEXTUREFORMAT_RGBA,z.type=h.a.TEXTURETYPE_UNSIGNED_INT,z.generateMipMaps=!0,z.getEngine().updateTextureSamplingMode(we.a.TRILINEAR_SAMPLINGMODE,z),z._isRGBD=!0,z.invertY=!0,F._native.loadCubeTextureWithMips(z._webGLTexture,ve,function(){z.isReady=!0,a&&a()},function(){throw new Error("Could not load a native cube texture.")})}(new Uint8Array(se))},void 0,void 0,!0,function(se,ce){s&&se&&s(se.status+" "+se.statusText,ce)})}else{if(!i||i.length!==6)throw new Error("Cannot load cubemap because 6 files were not defined");var ie=[i[0],i[3],i[1],i[4],i[2],i[5]];Promise.all(ie.map(function(se){return Xe.b.LoadFileAsync(se).then(function(ce){return new Uint8Array(ce)})})).then(function(se){return new Promise(function(ce,ue){F._native.loadCubeTexture(z._webGLTexture,se,!o,ce,ue)})}).then(function(){z.isReady=!0,a&&a()},function(se){s&&s("Failed to load cubemap: "+se.message,se)})}return this._internalTexturesCache.push(z),z},t.prototype.createRenderTargetTexture=function(e,n){var i=new Ll.a;n!==void 0&&typeof n=="object"?(i.generateMipMaps=n.generateMipMaps,i.generateDepthBuffer=n.generateDepthBuffer===void 0||n.generateDepthBuffer,i.generateStencilBuffer=i.generateDepthBuffer&&n.generateStencilBuffer,i.type=n.type===void 0?h.a.TEXTURETYPE_UNSIGNED_INT:n.type,i.samplingMode=n.samplingMode===void 0?h.a.TEXTURE_TRILINEAR_SAMPLINGMODE:n.samplingMode,i.format=n.format===void 0?h.a.TEXTUREFORMAT_RGBA:n.format):(i.generateMipMaps=n,i.generateDepthBuffer=!0,i.generateStencilBuffer=!1,i.type=h.a.TEXTURETYPE_UNSIGNED_INT,i.samplingMode=h.a.TEXTURE_TRILINEAR_SAMPLINGMODE,i.format=h.a.TEXTUREFORMAT_RGBA),(i.type!==h.a.TEXTURETYPE_FLOAT||this._caps.textureFloatLinearFiltering)&&(i.type!==h.a.TEXTURETYPE_HALF_FLOAT||this._caps.textureHalfFloatLinearFiltering)||(i.samplingMode=h.a.TEXTURE_NEAREST_SAMPLINGMODE);var o=new uu(this,Ct.b.RenderTarget),a=e.width||e,s=e.height||e;i.type!==h.a.TEXTURETYPE_FLOAT||this._caps.textureFloat||(i.type=h.a.TEXTURETYPE_UNSIGNED_INT,l.a.Warn("Float textures are not supported. Render target forced to TEXTURETYPE_UNSIGNED_BYTE type"));var d=this._native.createFramebuffer(o._webGLTexture,a,s,this._getNativeTextureFormat(i.format,i.type),i.samplingMode,!!i.generateStencilBuffer,i.generateDepthBuffer,!!i.generateMipMaps);return o._framebuffer=d,o.baseWidth=a,o.baseHeight=s,o.width=a,o.height=s,o.isReady=!0,o.samples=1,o.generateMipMaps=!!i.generateMipMaps,o.samplingMode=i.samplingMode,o.type=i.type,o.format=i.format,o._generateDepthBuffer=i.generateDepthBuffer,o._generateStencilBuffer=!!i.generateStencilBuffer,this._internalTexturesCache.push(o),o},t.prototype.updateTextureSamplingMode=function(e,n){if(n._webGLTexture){var i=this._getNativeSamplingMode(e);this._native.setTextureSampling(n._webGLTexture,i)}n.samplingMode=e},t.prototype.bindFramebuffer=function(e,n,i,o,a){if(n)throw new Error("Cuboid frame buffers are not yet supported in NativeEngine.");if(i||o)throw new Error("Required width/height for frame buffers not yet supported in NativeEngine.");e._depthStencilTexture?this._bindUnboundFramebuffer(e._depthStencilTexture._framebuffer):this._bindUnboundFramebuffer(e._framebuffer)},t.prototype.unBindFramebuffer=function(e,n,i){n===void 0&&(n=!1),n&&l.a.Warn("Disabling mipmap generation not yet supported in NativeEngine. Ignoring."),i&&i(),this._bindUnboundFramebuffer(null)},t.prototype.createDynamicVertexBuffer=function(e){return this.createVertexBuffer(e,!0)},t.prototype.updateDynamicIndexBuffer=function(e,n,i){i===void 0&&(i=0);var o=e,a=this._normalizeIndexData(n);o.is32Bits=a.BYTES_PER_ELEMENT===4,this._native.updateDynamicIndexBuffer(o.nativeIndexBuffer,a,i)},t.prototype.updateDynamicVertexBuffer=function(e,n,i,o){var a=e,s=ArrayBuffer.isView(n)?n:new Float32Array(n);this._native.updateDynamicVertexBuffer(a.nativeVertexBuffer,s,i??0,o??s.byteLength)},t.prototype._setTexture=function(e,n,i,o){o===void 0&&(o=!1);var a,s=this._boundUniforms[e];if(!s)return!1;if(!n)return this._boundTexturesCache[e]!=null&&(this._activeChannel=e,this._native.setTexture(s,null)),!1;if(n.video)this._activeChannel=e,n.update();else if(n.delayLoadState===h.a.DELAYLOADSTATE_NOTLOADED)return n.delayLoad(),!1;return a=o?n.depthStencilTexture:n.isReady()?n.getInternalTexture():n.isCube?this.emptyCubeTexture:n.is3D?this.emptyTexture3D:n.is2DArray?this.emptyTexture2DArray:this.emptyTexture,this._activeChannel=e,!(!a||!a._webGLTexture)&&(this._native.setTextureWrapMode(a._webGLTexture,this._getAddressMode(n.wrapU),this._getAddressMode(n.wrapV),this._getAddressMode(n.wrapR)),this._updateAnisotropicLevel(n),this._native.setTexture(s,a._webGLTexture),!0)},t.prototype._updateAnisotropicLevel=function(e){var n=e.getInternalTexture(),i=e.anisotropicFilteringLevel;n&&n._webGLTexture&&n._cachedAnisotropicFilteringLevel!==i&&(this._native.setTextureAnisotropicLevel(n._webGLTexture,i),n._cachedAnisotropicFilteringLevel=i)},t.prototype._getAddressMode=function(e){switch(e){case h.a.TEXTURE_WRAP_ADDRESSMODE:return this._native.ADDRESS_MODE_WRAP;case h.a.TEXTURE_CLAMP_ADDRESSMODE:return this._native.ADDRESS_MODE_CLAMP;case h.a.TEXTURE_MIRROR_ADDRESSMODE:return this._native.ADDRESS_MODE_MIRROR;default:throw new Error("Unexpected wrap mode: "+e+".")}},t.prototype._bindTexture=function(e,n){var i=this._boundUniforms[e];i&&this._native.setTexture(i,n._webGLTexture)},t.prototype._deleteBuffer=function(e){e.nativeIndexBuffer&&(this._native.deleteIndexBuffer(e.nativeIndexBuffer),delete e.nativeIndexBuffer),e.nativeVertexBuffer&&(this._native.deleteVertexBuffer(e.nativeVertexBuffer),delete e.nativeVertexBuffer)},t.prototype.releaseEffects=function(){},t.prototype._uploadCompressedDataToTextureDirectly=function(e,n,i,o,a,s,d){throw new Error("_uploadCompressedDataToTextureDirectly not implemented.")},t.prototype._uploadDataToTextureDirectly=function(e,n,i,o){throw new Error("_uploadDataToTextureDirectly not implemented.")},t.prototype._uploadArrayBufferViewToTexture=function(e,n,i,o){throw new Error("_uploadArrayBufferViewToTexture not implemented.")},t.prototype._uploadImageToTexture=function(e,n,i,o){throw new Error("_uploadArrayBufferViewToTexture not implemented.")},t.prototype._getNativeSamplingMode=function(e){switch(e){case h.a.TEXTURE_NEAREST_NEAREST:return this._native.TEXTURE_NEAREST_NEAREST;case h.a.TEXTURE_LINEAR_LINEAR:return this._native.TEXTURE_LINEAR_LINEAR;case h.a.TEXTURE_LINEAR_LINEAR_MIPLINEAR:return this._native.TEXTURE_LINEAR_LINEAR_MIPLINEAR;case h.a.TEXTURE_NEAREST_NEAREST_MIPNEAREST:return this._native.TEXTURE_NEAREST_NEAREST_MIPNEAREST;case h.a.TEXTURE_NEAREST_LINEAR_MIPNEAREST:return this._native.TEXTURE_NEAREST_LINEAR_MIPNEAREST;case h.a.TEXTURE_NEAREST_LINEAR_MIPLINEAR:return this._native.TEXTURE_NEAREST_LINEAR_MIPLINEAR;case h.a.TEXTURE_NEAREST_LINEAR:return this._native.TEXTURE_NEAREST_LINEAR;case h.a.TEXTURE_NEAREST_NEAREST_MIPLINEAR:return this._native.TEXTURE_NEAREST_NEAREST_MIPLINEAR;case h.a.TEXTURE_LINEAR_NEAREST_MIPNEAREST:return this._native.TEXTURE_LINEAR_NEAREST_MIPNEAREST;case h.a.TEXTURE_LINEAR_NEAREST_MIPLINEAR:return this._native.TEXTURE_LINEAR_NEAREST_MIPLINEAR;case h.a.TEXTURE_LINEAR_LINEAR_MIPNEAREST:return this._native.TEXTURE_LINEAR_LINEAR_MIPNEAREST;case h.a.TEXTURE_LINEAR_NEAREST:return this._native.TEXTURE_LINEAR_NEAREST;default:throw new Error("Unsupported sampling mode: "+e+".")}},t.prototype._getNativeTextureFormat=function(e,n){if(e==h.a.TEXTUREFORMAT_RGBA&&n==h.a.TEXTURETYPE_UNSIGNED_INT)return this._native.TEXTURE_FORMAT_RGBA8;if(e==h.a.TEXTUREFORMAT_RGBA&&n==h.a.TEXTURETYPE_FLOAT)return this._native.TEXTURE_FORMAT_RGBA32F;throw new Error("Unsupported texture format or type: format "+e+", type "+n+".")},t.prototype._getNativeAlphaMode=function(e){switch(e){case h.a.ALPHA_DISABLE:return this._native.ALPHA_DISABLE;case h.a.ALPHA_ADD:return this._native.ALPHA_ADD;case h.a.ALPHA_COMBINE:return this._native.ALPHA_COMBINE;case h.a.ALPHA_SUBTRACT:return this._native.ALPHA_SUBTRACT;case h.a.ALPHA_MULTIPLY:return this._native.ALPHA_MULTIPLY;case h.a.ALPHA_MAXIMIZED:return this._native.ALPHA_MAXIMIZED;case h.a.ALPHA_ONEONE:return this._native.ALPHA_ONEONE;case h.a.ALPHA_PREMULTIPLIED:return this._native.ALPHA_PREMULTIPLIED;case h.a.ALPHA_PREMULTIPLIED_PORTERDUFF:return this._native.ALPHA_PREMULTIPLIED_PORTERDUFF;case h.a.ALPHA_INTERPOLATE:return this._native.ALPHA_INTERPOLATE;case h.a.ALPHA_SCREENMODE:return this._native.ALPHA_SCREENMODE;default:throw new Error("Unsupported alpha mode: "+e+".")}},t.prototype._getNativeAttribType=function(e){switch(e){case Oe.b.UNSIGNED_BYTE:return this._native.ATTRIB_TYPE_UINT8;case Oe.b.SHORT:return this._native.ATTRIB_TYPE_INT16;case Oe.b.FLOAT:return this._native.ATTRIB_TYPE_FLOAT;default:throw new Error("Unsupported attribute type: "+e+".")}},t}(Ue.a),sp=f(74),Wo=function(){function r(){}return r.COPY=1,r.CUT=2,r.PASTE=3,r}(),cp=function(){function r(t,e){this.type=t,this.event=e}return r.GetTypeFromCharacter=function(t){switch(t){case 67:return Wo.COPY;case 86:return Wo.PASTE;case 88:return Wo.CUT;default:return-1}},r}(),As=f(83),Ai=f(69);(function(r){r[r.Clean=0]="Clean",r[r.Stop=1]="Stop",r[r.Sync=2]="Sync",r[r.NoSync=3]="NoSync"})(Si||(Si={}));var Ut=function(){function r(){}return Object.defineProperty(r,"ForceFullSceneLoadingForIncremental",{get:function(){return Ai.a.ForceFullSceneLoadingForIncremental},set:function(t){Ai.a.ForceFullSceneLoadingForIncremental=t},enumerable:!1,configurable:!0}),Object.defineProperty(r,"ShowLoadingScreen",{get:function(){return Ai.a.ShowLoadingScreen},set:function(t){Ai.a.ShowLoadingScreen=t},enumerable:!1,configurable:!0}),Object.defineProperty(r,"loggingLevel",{get:function(){return Ai.a.loggingLevel},set:function(t){Ai.a.loggingLevel=t},enumerable:!1,configurable:!0}),Object.defineProperty(r,"CleanBoneMatrixWeights",{get:function(){return Ai.a.CleanBoneMatrixWeights},set:function(t){Ai.a.CleanBoneMatrixWeights=t},enumerable:!1,configurable:!0}),r.GetDefaultPlugin=function(){return r._registeredPlugins[".babylon"]},r._GetPluginForExtension=function(t){var e=r._registeredPlugins[t];return e||(l.a.Warn("Unable to find a plugin to load "+t+" files. Trying to use .babylon default plugin. To load from a specific filetype (eg. gltf) see: https://doc.babylonjs.com/how_to/load_from_any_file_type"),r.GetDefaultPlugin())},r._GetPluginForDirectLoad=function(t){for(var e in r._registeredPlugins){var n=r._registeredPlugins[e].plugin;if(n.canDirectLoad&&n.canDirectLoad(t))return r._registeredPlugins[e]}return r.GetDefaultPlugin()},r._GetPluginForFilename=function(t){var e=t.indexOf("?");e!==-1&&(t=t.substring(0,e));var n=t.lastIndexOf("."),i=t.substring(n,t.length).toLowerCase();return r._GetPluginForExtension(i)},r._GetDirectLoad=function(t){return t.substr(0,5)==="data:"?t.substr(5):null},r._LoadData=function(t,e,n,i,o,a,s){var d,p=r._GetDirectLoad(t.name),b=s?r._GetPluginForExtension(s):p?r._GetPluginForDirectLoad(t.name):r._GetPluginForFilename(t.name);if(!(d=b.plugin.createPlugin!==void 0?b.plugin.createPlugin():b.plugin))throw"The loader plugin corresponding to the file type you are trying to load has not been found. If using es6, please import the plugin you wish to use before.";if(r.OnPluginActivatedObservable.notifyObservers(d),p){if(d.directLoad){var x=d.directLoad(e,p);x.then?x.then(function(Ae){n(d,Ae)}).catch(function(Ae){o("Error in directLoad of _loadData: "+Ae,Ae)}):n(d,x)}else n(d,p);return d}var O=b.isBinary,B=function(Ae,Ee){e.isDisposed?o("Scene has been disposed"):n(d,Ae,Ee)},F=null,z=!1,J=d.onDisposeObservable;J&&J.add(function(){z=!0,F&&(F.abort(),F=null),a()});var ie=function(){if(!z){var Ae=function(Se,Le){B(Se,Le?Le.responseURL:void 0)},Ee=function(Se){o(Se.message,Se)};F=d.requestFile?d.requestFile(e,t.url,Ae,i,O,Ee):e._requestFile(t.url,Ae,i,!0,O,Ee)}},se=t.file||As.a.FilesToLoad[t.name.toLowerCase()];if(t.rootUrl.indexOf("file:")===-1||t.rootUrl.indexOf("file:")!==-1&&!se){var ce=e.getEngine(),ue=ce.enableOfflineSupport;if(ue){for(var fe=!1,ve=0,Te=e.disableOfflineSupportExceptionRules;veF.snapDistance?(Fe=Math.floor(Math.abs(Re)/F.snapDistance),Re<0&&(Fe*=-1),Re%=F.snapDistance,Ae.scaleToRef(F.snapDistance*Fe,Ae),Me=!0):Ae.scaleInPlace(0)),u.a.ScalingToRef(1+Ae.x,1+Ae.y,1+Ae.z,F._tmpMatrix2),F._tmpMatrix2.multiplyToRef(F.attachedNode.getWorldMatrix(),F._tmpMatrix),F._tmpMatrix.decompose(F._tmpVector),Math.abs(F._tmpVector.x)<1e5&&Math.abs(F._tmpVector.y)<1e5&&Math.abs(F._tmpVector.z)<1e5&&F.attachedNode.getWorldMatrix().copyFrom(F._tmpMatrix),Me&&(Ee.snapDistance=F.snapDistance*Fe,F.onSnapObservable.notifyObservers(Ee)),F._matrixChanged()}}),F.dragBehavior.onDragStartObservable.add(function(){F._dragging=!0}),F.dragBehavior.onDragObservable.add(function(xe){return ve(xe.dragDistance)}),F.dragBehavior.onDragEndObservable.add(Te),(p=(d=(s=o?.uniformScaleGizmo)===null||s===void 0?void 0:s.dragBehavior)===null||d===void 0?void 0:d.onDragObservable)===null||p===void 0||p.add(function(xe){return ve(xe.delta.y)}),(O=(x=(b=o?.uniformScaleGizmo)===null||b===void 0?void 0:b.dragBehavior)===null||x===void 0?void 0:x.onDragEndObservable)===null||O===void 0||O.add(Te);var Se={gizmoMeshes:[J,ie],colliderMeshes:[se.arrowMesh,se.arrowTail],material:F._coloredMaterial,hoverMaterial:F._hoverMaterial,disableMaterial:F._disableMaterial,active:!1};(B=F._parent)===null||B===void 0||B.addToAxisCache(F._gizmoMesh,Se),F._pointerObserver=i.utilityLayerScene.onPointerObservable.add(function(xe){var Ne;if(!F._customMeshSet&&(F._isHovered=Se.colliderMeshes.indexOf((Ne=xe?.pickInfo)===null||Ne===void 0?void 0:Ne.pickedMesh)!=-1,!F._parent)){var Me=F._isHovered||F._dragging?F._hoverMaterial:F._coloredMaterial;Se.gizmoMeshes.forEach(function(Fe){Fe.material=Me,Fe.color&&(Fe.color=Me.diffuseColor)})}});var Le=i._getSharedGizmoLight();return Le.includedOnlyMeshes=Le.includedOnlyMeshes.concat(F._rootMesh.getChildMeshes()),F}return Object(c.d)(t,r),t.prototype._createGizmoMesh=function(e,n,i){i===void 0&&(i=!1);var o=Tr.a.CreateBox("yPosMesh",{size:.4*(1+(n-1)/4)},this.gizmoLayer.utilityLayerScene),a=fi.a.CreateCylinder("cylinder",{diameterTop:.005*n,height:.275,diameterBottom:.005*n,tessellation:96},this.gizmoLayer.utilityLayerScene);return o.scaling.scaleInPlace(.1),o.material=this._coloredMaterial,o.rotation.x=Math.PI/2,o.position.z+=.3,a.material=this._coloredMaterial,a.position.z+=.1375,a.rotation.x=Math.PI/2,i&&(o.visibility=0,a.visibility=0),e.addChild(o),e.addChild(a),{arrowMesh:o,arrowTail:a}},t.prototype._attachedNodeChanged=function(e){this.dragBehavior&&(this.dragBehavior.enabled=!!e)},Object.defineProperty(t.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(e){this._isEnabled=e,e?this._parent&&(this.attachedMesh=this._parent.attachedMesh,this.attachedNode=this._parent.attachedNode):(this.attachedMesh=null,this.attachedNode=null)},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){this.onSnapObservable.clear(),this.gizmoLayer.utilityLayerScene.onPointerObservable.remove(this._pointerObserver),this.dragBehavior.detach(),this._gizmoMesh&&this._gizmoMesh.dispose(),[this._coloredMaterial,this._hoverMaterial,this._disableMaterial].forEach(function(e){e&&e.dispose()}),r.prototype.dispose.call(this)},t.prototype.setCustomMesh=function(e,n){var i=this;n===void 0&&(n=!1),r.prototype.setCustomMesh.call(this,e),n&&(this._rootMesh.getChildMeshes().forEach(function(o){o.material=i._coloredMaterial,o.color&&(o.color=i._coloredMaterial.diffuseColor)}),this._customMeshSet=!1)},t}(Bn.a),Un=f(45),cn=f(40),du=function(r){function t(e,n){e===void 0&&(e=M.a.Gray()),n===void 0&&(n=On.a.DefaultKeepDepthUtilityLayer);var i=r.call(this,n)||this;i._boundingDimensions=new u.e(1,1,1),i._renderObserver=null,i._pointerObserver=null,i._scaleDragSpeed=.2,i._tmpQuaternion=new u.b,i._tmpVector=new u.e(0,0,0),i._tmpRotationMatrix=new u.a,i.ignoreChildren=!1,i.includeChildPredicate=null,i.rotationSphereSize=.1,i.scaleBoxSize=.1,i.fixedDragMeshScreenSize=!1,i.fixedDragMeshBoundsSize=!1,i.fixedDragMeshScreenSizeDistanceFactor=10,i.onDragStartObservable=new R.c,i.onScaleBoxDragObservable=new R.c,i.onScaleBoxDragEndObservable=new R.c,i.onRotationSphereDragObservable=new R.c,i.onRotationSphereDragEndObservable=new R.c,i.scalePivot=null,i._existingMeshScale=new u.e,i._dragMesh=null,i.pointerDragBehavior=new vi.a,i.updateScale=!1,i._anchorMesh=new Dt.a("anchor",n.utilityLayerScene),i.coloredMaterial=new Ft.a("",n.utilityLayerScene),i.coloredMaterial.disableLighting=!0,i.hoverColoredMaterial=new Ft.a("",n.utilityLayerScene),i.hoverColoredMaterial.disableLighting=!0,i._lineBoundingBox=new Dt.a("",n.utilityLayerScene),i._lineBoundingBox.rotationQuaternion=new u.b;var o=[];o.push(cn.a.CreateLines("lines",{points:[new u.e(0,0,0),new u.e(i._boundingDimensions.x,0,0)]},n.utilityLayerScene)),o.push(cn.a.CreateLines("lines",{points:[new u.e(0,0,0),new u.e(0,i._boundingDimensions.y,0)]},n.utilityLayerScene)),o.push(cn.a.CreateLines("lines",{points:[new u.e(0,0,0),new u.e(0,0,i._boundingDimensions.z)]},n.utilityLayerScene)),o.push(cn.a.CreateLines("lines",{points:[new u.e(i._boundingDimensions.x,0,0),new u.e(i._boundingDimensions.x,i._boundingDimensions.y,0)]},n.utilityLayerScene)),o.push(cn.a.CreateLines("lines",{points:[new u.e(i._boundingDimensions.x,0,0),new u.e(i._boundingDimensions.x,0,i._boundingDimensions.z)]},n.utilityLayerScene)),o.push(cn.a.CreateLines("lines",{points:[new u.e(0,i._boundingDimensions.y,0),new u.e(i._boundingDimensions.x,i._boundingDimensions.y,0)]},n.utilityLayerScene)),o.push(cn.a.CreateLines("lines",{points:[new u.e(0,i._boundingDimensions.y,0),new u.e(0,i._boundingDimensions.y,i._boundingDimensions.z)]},n.utilityLayerScene)),o.push(cn.a.CreateLines("lines",{points:[new u.e(0,0,i._boundingDimensions.z),new u.e(i._boundingDimensions.x,0,i._boundingDimensions.z)]},n.utilityLayerScene)),o.push(cn.a.CreateLines("lines",{points:[new u.e(0,0,i._boundingDimensions.z),new u.e(0,i._boundingDimensions.y,i._boundingDimensions.z)]},n.utilityLayerScene)),o.push(cn.a.CreateLines("lines",{points:[new u.e(i._boundingDimensions.x,i._boundingDimensions.y,i._boundingDimensions.z),new u.e(0,i._boundingDimensions.y,i._boundingDimensions.z)]},n.utilityLayerScene)),o.push(cn.a.CreateLines("lines",{points:[new u.e(i._boundingDimensions.x,i._boundingDimensions.y,i._boundingDimensions.z),new u.e(i._boundingDimensions.x,0,i._boundingDimensions.z)]},n.utilityLayerScene)),o.push(cn.a.CreateLines("lines",{points:[new u.e(i._boundingDimensions.x,i._boundingDimensions.y,i._boundingDimensions.z),new u.e(i._boundingDimensions.x,i._boundingDimensions.y,0)]},n.utilityLayerScene)),o.forEach(function(J){J.color=e,J.position.addInPlace(new u.e(-i._boundingDimensions.x/2,-i._boundingDimensions.y/2,-i._boundingDimensions.z/2)),J.isPickable=!1,i._lineBoundingBox.addChild(J)}),i._rootMesh.addChild(i._lineBoundingBox),i.setColor(e),i._rotateSpheresParent=new Dt.a("",n.utilityLayerScene),i._rotateSpheresParent.rotationQuaternion=new u.b;for(var a=function(J){var ie=Un.a.CreateSphere("",{diameter:1},n.utilityLayerScene);ie.rotationQuaternion=new u.b,ie.material=s.coloredMaterial,(x=new vi.a({})).moveAttached=!1,x.updateDragPlane=!1,ie.addBehavior(x);var se=new u.e(1,0,0),ce=0;x.onDragStartObservable.add(function(){se.copyFrom(ie.forward),ce=0}),x.onDragObservable.add(function(ue){if(i.onRotationSphereDragObservable.notifyObservers({}),i.attachedMesh){var fe=i.attachedMesh.parent;if(fe&&fe.scaling&&fe.scaling.isNonUniformWithinEpsilon(.001))return void l.a.Warn("BoundingBoxGizmo controls are not supported on child meshes with non-uniform parent scaling");jn.a._RemoveAndStorePivotPoint(i.attachedMesh);var ve=se,Te=ue.dragPlaneNormal.scale(u.e.Dot(ue.dragPlaneNormal,ve)),Re=ve.subtract(Te).normalizeToNew(),Ae=u.e.Dot(Re,ue.delta)<0?Math.abs(ue.delta.length()):-Math.abs(ue.delta.length());Ae=Ae/i._boundingDimensions.length()*i._anchorMesh.scaling.length(),i.attachedMesh.rotationQuaternion||(i.attachedMesh.rotationQuaternion=u.b.RotationYawPitchRoll(i.attachedMesh.rotation.y,i.attachedMesh.rotation.x,i.attachedMesh.rotation.z)),i._anchorMesh.rotationQuaternion||(i._anchorMesh.rotationQuaternion=u.b.RotationYawPitchRoll(i._anchorMesh.rotation.y,i._anchorMesh.rotation.x,i._anchorMesh.rotation.z)),ce+=Ae,Math.abs(ce)<=2*Math.PI&&(J>=8?u.b.RotationYawPitchRollToRef(0,0,Ae,i._tmpQuaternion):J>=4?u.b.RotationYawPitchRollToRef(Ae,0,0,i._tmpQuaternion):u.b.RotationYawPitchRollToRef(0,Ae,0,i._tmpQuaternion),i._anchorMesh.addChild(i.attachedMesh),i._anchorMesh.rotationQuaternion.multiplyToRef(i._tmpQuaternion,i._anchorMesh.rotationQuaternion),i._anchorMesh.removeChild(i.attachedMesh),i.attachedMesh.setParent(fe)),i.updateBoundingBox(),jn.a._RestorePivotPoint(i.attachedMesh)}i._updateDummy()}),x.onDragStartObservable.add(function(){i.onDragStartObservable.notifyObservers({}),i._selectNode(ie)}),x.onDragEndObservable.add(function(){i.onRotationSphereDragEndObservable.notifyObservers({}),i._selectNode(null),i._updateDummy()}),s._rotateSpheresParent.addChild(ie)},s=this,d=0;d<12;d++)a(d);i._rootMesh.addChild(i._rotateSpheresParent),i._scaleBoxesParent=new Dt.a("",n.utilityLayerScene),i._scaleBoxesParent.rotationQuaternion=new u.b;for(var p=0;p<3;p++)for(var b=0;b<3;b++)for(var x,O=function(){var J=(p===1?1:0)+(b===1?1:0)+(F===1?1:0);if(J===1||J===3)return"continue";var ie=Tr.a.CreateBox("",{size:1},n.utilityLayerScene);ie.material=B.coloredMaterial,ie.metadata=J===2;var se=new u.e(p-1,b-1,F-1).normalize();(x=new vi.a({dragAxis:se})).updateDragPlane=!1,x.moveAttached=!1,ie.addBehavior(x),x.onDragObservable.add(function(ce){if(i.onScaleBoxDragObservable.notifyObservers({}),i.attachedMesh){var ue=i.attachedMesh.parent;if(ue&&ue.scaling&&ue.scaling.isNonUniformWithinEpsilon(.001))return void l.a.Warn("BoundingBoxGizmo controls are not supported on child meshes with non-uniform parent scaling");jn.a._RemoveAndStorePivotPoint(i.attachedMesh);var fe=ce.dragDistance/i._boundingDimensions.length()*i._anchorMesh.scaling.length(),ve=new u.e(fe,fe,fe);J===2&&(ve.x*=Math.abs(se.x),ve.y*=Math.abs(se.y),ve.z*=Math.abs(se.z)),ve.scaleInPlace(i._scaleDragSpeed),i.updateBoundingBox(),i.scalePivot?(i.attachedMesh.getWorldMatrix().getRotationMatrixToRef(i._tmpRotationMatrix),i._boundingDimensions.scaleToRef(.5,i._tmpVector),u.e.TransformCoordinatesToRef(i._tmpVector,i._tmpRotationMatrix,i._tmpVector),i._anchorMesh.position.subtractInPlace(i._tmpVector),i._boundingDimensions.multiplyToRef(i.scalePivot,i._tmpVector),u.e.TransformCoordinatesToRef(i._tmpVector,i._tmpRotationMatrix,i._tmpVector),i._anchorMesh.position.addInPlace(i._tmpVector)):(ie.absolutePosition.subtractToRef(i._anchorMesh.position,i._tmpVector),i._anchorMesh.position.subtractInPlace(i._tmpVector)),i._anchorMesh.addChild(i.attachedMesh),i._anchorMesh.scaling.addInPlace(ve),(i._anchorMesh.scaling.x<0||i._anchorMesh.scaling.y<0||i._anchorMesh.scaling.z<0)&&i._anchorMesh.scaling.subtractInPlace(ve),i._anchorMesh.removeChild(i.attachedMesh),i.attachedMesh.setParent(ue),jn.a._RestorePivotPoint(i.attachedMesh)}i._updateDummy()}),x.onDragStartObservable.add(function(){i.onDragStartObservable.notifyObservers({}),i._selectNode(ie)}),x.onDragEndObservable.add(function(){i.onScaleBoxDragEndObservable.notifyObservers({}),i._selectNode(null),i._updateDummy()}),B._scaleBoxesParent.addChild(ie)},B=this,F=0;F<3;F++)O();i._rootMesh.addChild(i._scaleBoxesParent);var z=new Array;return i._pointerObserver=n.utilityLayerScene.onPointerObservable.add(function(J){z[J.event.pointerId]?J.pickInfo&&J.pickInfo.pickedMesh!=z[J.event.pointerId]&&(z[J.event.pointerId].material=i.coloredMaterial,delete z[J.event.pointerId]):i._rotateSpheresParent.getChildMeshes().concat(i._scaleBoxesParent.getChildMeshes()).forEach(function(ie){J.pickInfo&&J.pickInfo.pickedMesh==ie&&(z[J.event.pointerId]=ie,ie.material=i.hoverColoredMaterial)})}),i._renderObserver=i.gizmoLayer.originalScene.onBeforeRenderObservable.add(function(){i.attachedMesh&&!i._existingMeshScale.equals(i.attachedMesh.scaling)?i.updateBoundingBox():(i.fixedDragMeshScreenSize||i.fixedDragMeshBoundsSize)&&(i._updateRotationSpheres(),i._updateScaleBoxes()),i._dragMesh&&i.attachedMesh&&i.pointerDragBehavior.dragging&&(i._lineBoundingBox.position.rotateByQuaternionToRef(i._rootMesh.rotationQuaternion,i._tmpVector),i.attachedMesh.setAbsolutePosition(i._dragMesh.position.add(i._tmpVector.scale(-1))))}),i.updateBoundingBox(),i}return Object(c.d)(t,r),t.prototype.setColor=function(e){this.coloredMaterial.emissiveColor=e,this.hoverColoredMaterial.emissiveColor=e.clone().add(new M.a(.3,.3,.3)),this._lineBoundingBox.getChildren().forEach(function(n){n.color&&(n.color=e)})},t.prototype._attachedNodeChanged=function(e){var n=this;if(e){jn.a._RemoveAndStorePivotPoint(e);var i=e.parent;this._anchorMesh.addChild(e),this._anchorMesh.removeChild(e),e.setParent(i),jn.a._RestorePivotPoint(e),this.updateBoundingBox(),e.getChildMeshes(!1).forEach(function(o){o.markAsDirty("scaling")}),this.gizmoLayer.utilityLayerScene.onAfterRenderObservable.addOnce(function(){n._updateDummy()})}},t.prototype._selectNode=function(e){this._rotateSpheresParent.getChildMeshes().concat(this._scaleBoxesParent.getChildMeshes()).forEach(function(n){n.isVisible=!e||n==e})},t.prototype.updateBoundingBox=function(){if(this.attachedMesh){jn.a._RemoveAndStorePivotPoint(this.attachedMesh);var e=this.attachedMesh.parent;this.attachedMesh.setParent(null);var n=null;this.attachedMesh.skeleton&&(n=this.attachedMesh.skeleton.overrideMesh,this.attachedMesh.skeleton.overrideMesh=null),this._update(),this.attachedMesh.rotationQuaternion||(this.attachedMesh.rotationQuaternion=u.b.RotationYawPitchRoll(this.attachedMesh.rotation.y,this.attachedMesh.rotation.x,this.attachedMesh.rotation.z)),this._anchorMesh.rotationQuaternion||(this._anchorMesh.rotationQuaternion=u.b.RotationYawPitchRoll(this._anchorMesh.rotation.y,this._anchorMesh.rotation.x,this._anchorMesh.rotation.z)),this._anchorMesh.rotationQuaternion.copyFrom(this.attachedMesh.rotationQuaternion),this._tmpQuaternion.copyFrom(this.attachedMesh.rotationQuaternion),this._tmpVector.copyFrom(this.attachedMesh.position),this.attachedMesh.rotationQuaternion.set(0,0,0,1),this.attachedMesh.position.set(0,0,0);var i=this.attachedMesh.getHierarchyBoundingVectors(!this.ignoreChildren,this.includeChildPredicate);i.max.subtractToRef(i.min,this._boundingDimensions),this._lineBoundingBox.scaling.copyFrom(this._boundingDimensions),this._lineBoundingBox.position.set((i.max.x+i.min.x)/2,(i.max.y+i.min.y)/2,(i.max.z+i.min.z)/2),this._rotateSpheresParent.position.copyFrom(this._lineBoundingBox.position),this._scaleBoxesParent.position.copyFrom(this._lineBoundingBox.position),this._lineBoundingBox.computeWorldMatrix(),this._anchorMesh.position.copyFrom(this._lineBoundingBox.absolutePosition),this.attachedMesh.rotationQuaternion.copyFrom(this._tmpQuaternion),this.attachedMesh.position.copyFrom(this._tmpVector),this.attachedMesh.setParent(e),this.attachedMesh.skeleton&&(this.attachedMesh.skeleton.overrideMesh=n)}this._updateRotationSpheres(),this._updateScaleBoxes(),this.attachedMesh&&(this._existingMeshScale.copyFrom(this.attachedMesh.scaling),jn.a._RestorePivotPoint(this.attachedMesh))},t.prototype._updateRotationSpheres=function(){for(var e=this._rotateSpheresParent.getChildMeshes(),n=0;n<3;n++)for(var i=0;i<2;i++)for(var o=0;o<2;o++){var a=4*n+2*i+o;if(n==0&&(e[a].position.set(this._boundingDimensions.x/2,this._boundingDimensions.y*i,this._boundingDimensions.z*o),e[a].position.addInPlace(new u.e(-this._boundingDimensions.x/2,-this._boundingDimensions.y/2,-this._boundingDimensions.z/2)),e[a].lookAt(u.e.Cross(e[a].position.normalizeToNew(),u.e.Right()).normalizeToNew().add(e[a].position))),n==1&&(e[a].position.set(this._boundingDimensions.x*i,this._boundingDimensions.y/2,this._boundingDimensions.z*o),e[a].position.addInPlace(new u.e(-this._boundingDimensions.x/2,-this._boundingDimensions.y/2,-this._boundingDimensions.z/2)),e[a].lookAt(u.e.Cross(e[a].position.normalizeToNew(),u.e.Up()).normalizeToNew().add(e[a].position))),n==2&&(e[a].position.set(this._boundingDimensions.x*i,this._boundingDimensions.y*o,this._boundingDimensions.z/2),e[a].position.addInPlace(new u.e(-this._boundingDimensions.x/2,-this._boundingDimensions.y/2,-this._boundingDimensions.z/2)),e[a].lookAt(u.e.Cross(e[a].position.normalizeToNew(),u.e.Forward()).normalizeToNew().add(e[a].position))),this.fixedDragMeshScreenSize&&this.gizmoLayer.utilityLayerScene.activeCamera){e[a].absolutePosition.subtractToRef(this.gizmoLayer.utilityLayerScene.activeCamera.position,this._tmpVector);var s=this.rotationSphereSize*this._tmpVector.length()/this.fixedDragMeshScreenSizeDistanceFactor;e[a].scaling.set(s,s,s)}else this.fixedDragMeshBoundsSize?e[a].scaling.set(this.rotationSphereSize*this._boundingDimensions.x,this.rotationSphereSize*this._boundingDimensions.y,this.rotationSphereSize*this._boundingDimensions.z):e[a].scaling.set(this.rotationSphereSize,this.rotationSphereSize,this.rotationSphereSize)}},t.prototype._updateScaleBoxes=function(){for(var e=this._scaleBoxesParent.getChildMeshes(),n=0,i=0;i<3;i++)for(var o=0;o<3;o++)for(var a=0;a<3;a++){var s=(i===1?1:0)+(o===1?1:0)+(a===1?1:0);if(s!==1&&s!==3){if(e[n])if(e[n].position.set(this._boundingDimensions.x*(i/2),this._boundingDimensions.y*(o/2),this._boundingDimensions.z*(a/2)),e[n].position.addInPlace(new u.e(-this._boundingDimensions.x/2,-this._boundingDimensions.y/2,-this._boundingDimensions.z/2)),this.fixedDragMeshScreenSize&&this.gizmoLayer.utilityLayerScene.activeCamera){e[n].absolutePosition.subtractToRef(this.gizmoLayer.utilityLayerScene.activeCamera.position,this._tmpVector);var d=this.scaleBoxSize*this._tmpVector.length()/this.fixedDragMeshScreenSizeDistanceFactor;e[n].scaling.set(d,d,d)}else this.fixedDragMeshBoundsSize?e[n].scaling.set(this.scaleBoxSize*this._boundingDimensions.x,this.scaleBoxSize*this._boundingDimensions.y,this.scaleBoxSize*this._boundingDimensions.z):e[n].scaling.set(this.scaleBoxSize,this.scaleBoxSize,this.scaleBoxSize);n++}}},t.prototype.setEnabledRotationAxis=function(e){this._rotateSpheresParent.getChildMeshes().forEach(function(n,i){i<4?n.setEnabled(e.indexOf("x")!=-1):i<8?n.setEnabled(e.indexOf("y")!=-1):n.setEnabled(e.indexOf("z")!=-1)})},t.prototype.setEnabledScaling=function(e,n){n===void 0&&(n=!1),this._scaleBoxesParent.getChildMeshes().forEach(function(i,o){var a=e;n&&i.metadata===!0&&(a=!1),i.setEnabled(a)})},t.prototype._updateDummy=function(){this._dragMesh&&(this._dragMesh.position.copyFrom(this._lineBoundingBox.getAbsolutePosition()),this._dragMesh.scaling.copyFrom(this._lineBoundingBox.scaling),this._dragMesh.rotationQuaternion.copyFrom(this._rootMesh.rotationQuaternion))},t.prototype.enableDragBehavior=function(){this._dragMesh=De.a.CreateBox("dummy",1,this.gizmoLayer.utilityLayerScene),this._dragMesh.visibility=0,this._dragMesh.rotationQuaternion=new u.b,this.pointerDragBehavior.useObjectOrientationForDragging=!1,this._dragMesh.addBehavior(this.pointerDragBehavior)},t.prototype.dispose=function(){this.gizmoLayer.utilityLayerScene.onPointerObservable.remove(this._pointerObserver),this.gizmoLayer.originalScene.onBeforeRenderObservable.remove(this._renderObserver),this._lineBoundingBox.dispose(),this._rotateSpheresParent.dispose(),this._scaleBoxesParent.dispose(),this._dragMesh&&this._dragMesh.dispose(),r.prototype.dispose.call(this)},t.MakeNotPickableAndWrapInBoundingBox=function(e){var n=function(d){d.isPickable=!1,d.getChildMeshes().forEach(function(p){n(p)})};n(e),e.rotationQuaternion||(e.rotationQuaternion=u.b.RotationYawPitchRoll(e.rotation.y,e.rotation.x,e.rotation.z));var i=e.position.clone(),o=e.rotationQuaternion.clone();e.rotationQuaternion.set(0,0,0,1),e.position.set(0,0,0);var a=Tr.a.CreateBox("box",{size:1},e.getScene()),s=e.getHierarchyBoundingVectors();return s.max.subtractToRef(s.min,a.scaling),a.scaling.y===0&&(a.scaling.y=Gt.a),a.scaling.x===0&&(a.scaling.x=Gt.a),a.scaling.z===0&&(a.scaling.z=Gt.a),a.position.set((s.max.x+s.min.x)/2,(s.max.y+s.min.y)/2,(s.max.z+s.min.z)/2),e.addChild(a),e.rotationQuaternion.copyFrom(o),e.position.copyFrom(i),e.removeChild(a),a.addChild(e),a.visibility=0,a},t.prototype.setCustomMesh=function(e){l.a.Error("Custom meshes are not supported on this gizmo")},t}(Bn.a),Qo=function(r){function t(e,n,i,o,a,s,d){var p;n===void 0&&(n=M.a.Gray()),i===void 0&&(i=On.a.DefaultUtilityLayer),o===void 0&&(o=32),a===void 0&&(a=null),d===void 0&&(d=1);var b=r.call(this,i)||this;b._pointerObserver=null,b.snapDistance=0,b.onSnapObservable=new R.c,b._isEnabled=!0,b._parent=null,b._dragging=!1,b._parent=a,b._coloredMaterial=new Ft.a("",i.utilityLayerScene),b._coloredMaterial.diffuseColor=n,b._coloredMaterial.specularColor=n.subtract(new M.a(.1,.1,.1)),b._hoverMaterial=new Ft.a("",i.utilityLayerScene),b._hoverMaterial.diffuseColor=M.a.Yellow(),b._disableMaterial=new Ft.a("",i.utilityLayerScene),b._disableMaterial.diffuseColor=M.a.Gray(),b._disableMaterial.alpha=.4,b._gizmoMesh=new De.a("",i.utilityLayerScene);var x=b._createGizmoMesh(b._gizmoMesh,d,o),O=x.rotationMesh,B=x.collider,F=[];b._rotationCircle=b.setupRotationCircle(F,b._gizmoMesh),b._gizmoMesh.lookAt(b._rootMesh.position.add(e)),b._rootMesh.addChild(b._gizmoMesh),b._gizmoMesh.scaling.scaleInPlace(1/3),b.dragBehavior=new vi.a({dragPlaneNormal:e}),b.dragBehavior.moveAttached=!1,b.dragBehavior.maxDragAngle=9*Math.PI/20,b.dragBehavior._useAlternatePickedPointAboveMaxDragAngle=!0,b._rootMesh.addBehavior(b.dragBehavior);var z=0,J=new u.e,ie=new u.e,se=new u.a,ce=new u.e,ue=new u.e;b.dragBehavior.onDragStartObservable.add(function(Se){if(b.attachedNode){J.copyFrom(Se.dragPlanePoint);var Le=new u.e(0,0,1),xe=b._rotationCircle.getDirection(Le);xe.normalize(),b._gizmoMesh.removeChild(b._rotationCircle),J.copyFrom(Se.dragPlanePoint),ie=Se.dragPlanePoint;var Ne=b._rotationCircle.getAbsolutePosition().clone(),Me=b._rotationCircle.getAbsolutePosition().clone().addInPlace(xe),Fe=Se.dragPlanePoint,Ye=u.e.GetAngleBetweenVectors(Me.subtract(Ne),Fe.subtract(Ne),b._rotationCircle.up);b._rotationCircle.addRotation(0,Ye,0),b._dragging=!0}}),b.dragBehavior.onDragEndObservable.add(function(){z=0,b.updateRotationCircle(b._rotationCircle,F,z,ie),b._gizmoMesh.addChild(b._rotationCircle),b._dragging=!1});var fe={snapDistance:0},ve=0,Te=new u.a,Re=new u.b;b.dragBehavior.onDragObservable.add(function(Se){if(b.attachedNode){var Le=new u.e(1,1,1),xe=new u.b(0,0,0,1),Ne=new u.e(0,0,0);b.attachedNode.getWorldMatrix().decompose(Le,xe,Ne);var Me=Se.dragPlanePoint.subtract(Ne).normalize(),Fe=J.subtract(Ne).normalize(),Ye=u.e.Cross(Me,Fe),tt=u.e.Dot(Me,Fe),it=Math.atan2(Ye.length(),tt);ce.copyFrom(e),ue.copyFrom(e),b.updateGizmoRotationToMatchAttachedMesh&&(xe.toRotationMatrix(se),ue=u.e.TransformCoordinates(ce,se));var lt=!1;if(i.utilityLayerScene.activeCamera){var Ke=i.utilityLayerScene.activeCamera.position.subtract(Ne);u.e.Dot(Ke,ue)>0&&(ce.scaleInPlace(-1),ue.scaleInPlace(-1),lt=!0)}u.e.Dot(ue,Ye)>0&&(it=-it);var ot=!1;if(b.snapDistance!=0)if(ve+=it,Math.abs(ve)>b.snapDistance){var rt=Math.floor(Math.abs(ve)/b.snapDistance);ve<0&&(rt*=-1),ve%=b.snapDistance,it=b.snapDistance*rt,ot=!0}else it=0;z+=lt?-it:it,b.updateRotationCircle(b._rotationCircle,F,z,ie);var qe=Math.sin(it/2);if(Re.set(ce.x*qe,ce.y*qe,ce.z*qe,Math.cos(it/2)),Te.determinant()>0){var ht=new u.e;Re.toEulerAnglesToRef(ht),u.b.RotationYawPitchRollToRef(ht.y,-ht.x,-ht.z,Re)}b.updateGizmoRotationToMatchAttachedMesh?xe.multiplyToRef(Re,xe):Re.multiplyToRef(xe,xe),b.attachedNode.getWorldMatrix().copyFrom(u.a.Compose(Le,xe,Ne)),J.copyFrom(Se.dragPlanePoint),ot&&(fe.snapDistance=it,b.onSnapObservable.notifyObservers(fe)),b._matrixChanged()}});var Ae=i._getSharedGizmoLight();Ae.includedOnlyMeshes=Ae.includedOnlyMeshes.concat(b._rootMesh.getChildMeshes(!1));var Ee={colliderMeshes:[B],gizmoMeshes:[O],material:b._coloredMaterial,hoverMaterial:b._hoverMaterial,disableMaterial:b._disableMaterial,active:!1};return(p=b._parent)===null||p===void 0||p.addToAxisCache(b._gizmoMesh,Ee),b._pointerObserver=i.utilityLayerScene.onPointerObservable.add(function(Se){var Le;if(!b._customMeshSet&&(b._isHovered=Ee.colliderMeshes.indexOf((Le=Se?.pickInfo)===null||Le===void 0?void 0:Le.pickedMesh)!=-1,!b._parent)){var xe=b._isHovered||b._dragging?b._hoverMaterial:b._coloredMaterial;Ee.gizmoMeshes.forEach(function(Ne){Ne.material=xe,Ne.color&&(Ne.color=xe.diffuseColor)})}}),b}return Object(c.d)(t,r),t.prototype._createGizmoMesh=function(e,n,i){var o=De.a.CreateTorus("ignore",.6,.03*n,i,this.gizmoLayer.utilityLayerScene);o.visibility=0;var a=De.a.CreateTorus("",.6,.005*n,i,this.gizmoLayer.utilityLayerScene);return a.material=this._coloredMaterial,a.rotation.x=Math.PI/2,o.rotation.x=Math.PI/2,e.addChild(a),e.addChild(o),{rotationMesh:a,collider:o}},t.prototype._attachedNodeChanged=function(e){this.dragBehavior&&(this.dragBehavior.enabled=!!e)},t.prototype.setupRotationCircle=function(e,n){for(var i=t._CircleConstants.pi2/t._CircleConstants.tessellation,o=-Math.PI/2;o0?p:-1*p,x=n>0?a:-1*a;s[d].set(t._CircleConstants.radius*Math.sin(b)*Math.cos(x),0,t._CircleConstants.radius*Math.cos(b)*Math.cos(x))}else s[d].set(0,0,0);d++}o++}},t.prototype.updateRotationCircle=function(e,n,i,o){this.updateRotationPath(n,i),De.a.CreateRibbon("rotationCircle",n,!1,!1,0,this.gizmoLayer.utilityLayerScene,void 0,void 0,e.geometry?e:void 0)},Object.defineProperty(t.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(e){this._isEnabled=e,e?this._parent&&(this.attachedMesh=this._parent.attachedMesh):this.attachedMesh=null},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){this.onSnapObservable.clear(),this.gizmoLayer.utilityLayerScene.onPointerObservable.remove(this._pointerObserver),this.dragBehavior.detach(),this._gizmoMesh&&this._gizmoMesh.dispose(),this._rotationCircle&&this._rotationCircle.dispose(),[this._coloredMaterial,this._hoverMaterial,this._disableMaterial].forEach(function(e){e&&e.dispose()}),r.prototype.dispose.call(this)},t._CircleConstants={radius:.3,pi2:2*Math.PI,tessellation:70,rotationCircleRange:4},t}(Bn.a),fu=function(r){function t(e,n,i,o,a){e===void 0&&(e=On.a.DefaultUtilityLayer),n===void 0&&(n=32),i===void 0&&(i=!1),o===void 0&&(o=1);var s=r.call(this,e)||this;return s.onDragStartObservable=new R.c,s.onDragEndObservable=new R.c,s._observables=[],s._gizmoAxisCache=new Map,s.xGizmo=new Qo(new u.e(1,0,0),M.a.Red().scale(.5),e,n,s,i,o),s.yGizmo=new Qo(new u.e(0,1,0),M.a.Green().scale(.5),e,n,s,i,o),s.zGizmo=new Qo(new u.e(0,0,1),M.a.Blue().scale(.5),e,n,s,i,o),[s.xGizmo,s.yGizmo,s.zGizmo].forEach(function(d){d.dragBehavior.onDragStartObservable.add(function(){s.onDragStartObservable.notifyObservers({})}),d.dragBehavior.onDragEndObservable.add(function(){s.onDragEndObservable.notifyObservers({})})}),s.attachedMesh=null,s.attachedNode=null,a?a.addToAxisCache(s._gizmoAxisCache):Bn.a.GizmoAxisPointerObserver(e,s._gizmoAxisCache),s}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"attachedMesh",{get:function(){return this._meshAttached},set:function(e){this._meshAttached=e,this._nodeAttached=e,this._checkBillboardTransform(),[this.xGizmo,this.yGizmo,this.zGizmo].forEach(function(n){n.isEnabled?n.attachedMesh=e:n.attachedMesh=null})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attachedNode",{get:function(){return this._nodeAttached},set:function(e){this._meshAttached=null,this._nodeAttached=e,this._checkBillboardTransform(),[this.xGizmo,this.yGizmo,this.zGizmo].forEach(function(n){n.isEnabled?n.attachedNode=e:n.attachedNode=null})},enumerable:!1,configurable:!0}),t.prototype._checkBillboardTransform=function(){this._nodeAttached&&this._nodeAttached.billboardMode&&console.log("Rotation Gizmo will not work with transforms in billboard mode.")},Object.defineProperty(t.prototype,"isHovered",{get:function(){var e=!1;return[this.xGizmo,this.yGizmo,this.zGizmo].forEach(function(n){e=e||n.isHovered}),e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"updateGizmoRotationToMatchAttachedMesh",{get:function(){return this.xGizmo.updateGizmoRotationToMatchAttachedMesh},set:function(e){this.xGizmo&&(this.xGizmo.updateGizmoRotationToMatchAttachedMesh=e,this.yGizmo.updateGizmoRotationToMatchAttachedMesh=e,this.zGizmo.updateGizmoRotationToMatchAttachedMesh=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"snapDistance",{get:function(){return this.xGizmo.snapDistance},set:function(e){this.xGizmo&&(this.xGizmo.snapDistance=e,this.yGizmo.snapDistance=e,this.zGizmo.snapDistance=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scaleRatio",{get:function(){return this.xGizmo.scaleRatio},set:function(e){this.xGizmo&&(this.xGizmo.scaleRatio=e,this.yGizmo.scaleRatio=e,this.zGizmo.scaleRatio=e)},enumerable:!1,configurable:!0}),t.prototype.addToAxisCache=function(e,n){this._gizmoAxisCache.set(e,n)},t.prototype.dispose=function(){var e=this;this.xGizmo.dispose(),this.yGizmo.dispose(),this.zGizmo.dispose(),this.onDragStartObservable.clear(),this.onDragEndObservable.clear(),this._observables.forEach(function(n){e.gizmoLayer.utilityLayerScene.onPointerObservable.remove(n)})},t.prototype.setCustomMesh=function(e){l.a.Error("Custom meshes are not supported on this gizmo, please set the custom meshes on the gizmos contained within this one (gizmo.xGizmo, gizmo.yGizmo, gizmo.zGizmo)")},t}(Bn.a),Er=f(46),Rs=f(84),qo=function(r){function t(e,n,i,o){var a;n===void 0&&(n=M.a.Gray()),i===void 0&&(i=On.a.DefaultUtilityLayer),o===void 0&&(o=null);var s=r.call(this,i)||this;s._pointerObserver=null,s.snapDistance=0,s.onSnapObservable=new R.c,s._isEnabled=!1,s._parent=null,s._dragging=!1,s._parent=o,s._coloredMaterial=new Ft.a("",i.utilityLayerScene),s._coloredMaterial.diffuseColor=n,s._coloredMaterial.specularColor=n.subtract(new M.a(.1,.1,.1)),s._hoverMaterial=new Ft.a("",i.utilityLayerScene),s._hoverMaterial.diffuseColor=M.a.Yellow(),s._disableMaterial=new Ft.a("",i.utilityLayerScene),s._disableMaterial.diffuseColor=M.a.Gray(),s._disableMaterial.alpha=.4,s._gizmoMesh=t._CreatePlane(i.utilityLayerScene,s._coloredMaterial),s._gizmoMesh.lookAt(s._rootMesh.position.add(e)),s._gizmoMesh.scaling.scaleInPlace(1/3),s._gizmoMesh.parent=s._rootMesh;var d=0,p=new u.e,b={snapDistance:0};s.dragBehavior=new vi.a({dragPlaneNormal:e}),s.dragBehavior.moveAttached=!1,s._rootMesh.addBehavior(s.dragBehavior),s.dragBehavior.onDragObservable.add(function(B){if(s.attachedNode){if(s.snapDistance==0)s.attachedNode.getWorldMatrix().addTranslationFromFloats(B.delta.x,B.delta.y,B.delta.z);else if(d+=B.dragDistance,Math.abs(d)>s.snapDistance){var F=Math.floor(Math.abs(d)/s.snapDistance);d%=s.snapDistance,B.delta.normalizeToRef(p),p.scaleInPlace(s.snapDistance*F),s.attachedNode.getWorldMatrix().addTranslationFromFloats(p.x,p.y,p.z),b.snapDistance=s.snapDistance*F,s.onSnapObservable.notifyObservers(b)}s._matrixChanged()}}),s.dragBehavior.onDragStartObservable.add(function(){s._dragging=!0}),s.dragBehavior.onDragEndObservable.add(function(){s._dragging=!1});var x=i._getSharedGizmoLight();x.includedOnlyMeshes=x.includedOnlyMeshes.concat(s._rootMesh.getChildMeshes(!1));var O={gizmoMeshes:s._gizmoMesh.getChildMeshes(),colliderMeshes:s._gizmoMesh.getChildMeshes(),material:s._coloredMaterial,hoverMaterial:s._hoverMaterial,disableMaterial:s._disableMaterial,active:!1};return(a=s._parent)===null||a===void 0||a.addToAxisCache(s._gizmoMesh,O),s._pointerObserver=i.utilityLayerScene.onPointerObservable.add(function(B){var F;if(!s._customMeshSet&&(s._isHovered=O.colliderMeshes.indexOf((F=B?.pickInfo)===null||F===void 0?void 0:F.pickedMesh)!=-1,!s._parent)){var z=s._isHovered||s._dragging?s._hoverMaterial:s._coloredMaterial;O.gizmoMeshes.forEach(function(J){J.material=z})}}),s}return Object(c.d)(t,r),t._CreatePlane=function(e,n){var i=new Er.a("plane",e),o=Rs.a.CreatePlane("dragPlane",{width:.1375,height:.1375,sideOrientation:2},e);return o.material=n,o.parent=i,i},t.prototype._attachedNodeChanged=function(e){this.dragBehavior&&(this.dragBehavior.enabled=!!e)},Object.defineProperty(t.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(e){this._isEnabled=e,e?this._parent&&(this.attachedNode=this._parent.attachedNode):this.attachedNode=null},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){this.onSnapObservable.clear(),this.gizmoLayer.utilityLayerScene.onPointerObservable.remove(this._pointerObserver),this.dragBehavior.detach(),r.prototype.dispose.call(this),this._gizmoMesh&&this._gizmoMesh.dispose(),[this._coloredMaterial,this._hoverMaterial,this._disableMaterial].forEach(function(e){e&&e.dispose()})},t}(Bn.a),pu=function(r){function t(e,n,i){e===void 0&&(e=On.a.DefaultUtilityLayer),n===void 0&&(n=1);var o=r.call(this,e)||this;return o._meshAttached=null,o._nodeAttached=null,o._observables=[],o._gizmoAxisCache=new Map,o.onDragStartObservable=new R.c,o.onDragEndObservable=new R.c,o._planarGizmoEnabled=!1,o.xGizmo=new Ko.a(new u.e(1,0,0),M.a.Red().scale(.5),e,o,n),o.yGizmo=new Ko.a(new u.e(0,1,0),M.a.Green().scale(.5),e,o,n),o.zGizmo=new Ko.a(new u.e(0,0,1),M.a.Blue().scale(.5),e,o,n),o.xPlaneGizmo=new qo(new u.e(1,0,0),M.a.Red().scale(.5),o.gizmoLayer,o),o.yPlaneGizmo=new qo(new u.e(0,1,0),M.a.Green().scale(.5),o.gizmoLayer,o),o.zPlaneGizmo=new qo(new u.e(0,0,1),M.a.Blue().scale(.5),o.gizmoLayer,o),[o.xGizmo,o.yGizmo,o.zGizmo,o.xPlaneGizmo,o.yPlaneGizmo,o.zPlaneGizmo].forEach(function(a){a.dragBehavior.onDragStartObservable.add(function(){o.onDragStartObservable.notifyObservers({})}),a.dragBehavior.onDragEndObservable.add(function(){o.onDragEndObservable.notifyObservers({})})}),o.attachedMesh=null,i?i.addToAxisCache(o._gizmoAxisCache):Bn.a.GizmoAxisPointerObserver(e,o._gizmoAxisCache),o}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"attachedMesh",{get:function(){return this._meshAttached},set:function(e){this._meshAttached=e,this._nodeAttached=e,[this.xGizmo,this.yGizmo,this.zGizmo,this.xPlaneGizmo,this.yPlaneGizmo,this.zPlaneGizmo].forEach(function(n){n.isEnabled?n.attachedMesh=e:n.attachedMesh=null})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attachedNode",{get:function(){return this._nodeAttached},set:function(e){this._meshAttached=null,this._nodeAttached=null,[this.xGizmo,this.yGizmo,this.zGizmo,this.xPlaneGizmo,this.yPlaneGizmo,this.zPlaneGizmo].forEach(function(n){n.isEnabled?n.attachedNode=e:n.attachedNode=null})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isHovered",{get:function(){var e=!1;return[this.xGizmo,this.yGizmo,this.zGizmo,this.xPlaneGizmo,this.yPlaneGizmo,this.zPlaneGizmo].forEach(function(n){e=e||n.isHovered}),e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"planarGizmoEnabled",{get:function(){return this._planarGizmoEnabled},set:function(e){var n=this;this._planarGizmoEnabled=e,[this.xPlaneGizmo,this.yPlaneGizmo,this.zPlaneGizmo].forEach(function(i){i&&(i.isEnabled=e,e&&(i.attachedMesh?i.attachedMesh=n.attachedMesh:i.attachedNode=n.attachedNode))},this)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"updateGizmoRotationToMatchAttachedMesh",{get:function(){return this._updateGizmoRotationToMatchAttachedMesh},set:function(e){this._updateGizmoRotationToMatchAttachedMesh=e,[this.xGizmo,this.yGizmo,this.zGizmo,this.xPlaneGizmo,this.yPlaneGizmo,this.zPlaneGizmo].forEach(function(n){n&&(n.updateGizmoRotationToMatchAttachedMesh=e)})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"snapDistance",{get:function(){return this._snapDistance},set:function(e){this._snapDistance=e,[this.xGizmo,this.yGizmo,this.zGizmo,this.xPlaneGizmo,this.yPlaneGizmo,this.zPlaneGizmo].forEach(function(n){n&&(n.snapDistance=e)})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scaleRatio",{get:function(){return this._scaleRatio},set:function(e){this._scaleRatio=e,[this.xGizmo,this.yGizmo,this.zGizmo,this.xPlaneGizmo,this.yPlaneGizmo,this.zPlaneGizmo].forEach(function(n){n&&(n.scaleRatio=e)})},enumerable:!1,configurable:!0}),t.prototype.addToAxisCache=function(e,n){this._gizmoAxisCache.set(e,n)},t.prototype.dispose=function(){var e=this;[this.xGizmo,this.yGizmo,this.zGizmo,this.xPlaneGizmo,this.yPlaneGizmo,this.zPlaneGizmo].forEach(function(n){n&&n.dispose()}),this._observables.forEach(function(n){e.gizmoLayer.utilityLayerScene.onPointerObservable.remove(n)}),this.onDragStartObservable.clear(),this.onDragEndObservable.clear()},t.prototype.setCustomMesh=function(e){l.a.Error("Custom meshes are not supported on this gizmo, please set the custom meshes on the gizmos contained within this one (gizmo.xGizmo, gizmo.yGizmo, gizmo.zGizmo,gizmo.xPlaneGizmo, gizmo.yPlaneGizmo, gizmo.zPlaneGizmo)")},t}(Bn.a);dt.a.CreatePolyhedron=function(r){var t=[];t[0]={vertex:[[0,0,1.732051],[1.632993,0,-.5773503],[-.8164966,1.414214,-.5773503],[-.8164966,-1.414214,-.5773503]],face:[[0,1,2],[0,2,3],[0,3,1],[1,3,2]]},t[1]={vertex:[[0,0,1.414214],[1.414214,0,0],[0,1.414214,0],[-1.414214,0,0],[0,-1.414214,0],[0,0,-1.414214]],face:[[0,1,2],[0,2,3],[0,3,4],[0,4,1],[1,4,5],[1,5,2],[2,5,3],[3,5,4]]},t[2]={vertex:[[0,0,1.070466],[.7136442,0,.7978784],[-.3568221,.618034,.7978784],[-.3568221,-.618034,.7978784],[.7978784,.618034,.3568221],[.7978784,-.618034,.3568221],[-.9341724,.381966,.3568221],[.1362939,1,.3568221],[.1362939,-1,.3568221],[-.9341724,-.381966,.3568221],[.9341724,.381966,-.3568221],[.9341724,-.381966,-.3568221],[-.7978784,.618034,-.3568221],[-.1362939,1,-.3568221],[-.1362939,-1,-.3568221],[-.7978784,-.618034,-.3568221],[.3568221,.618034,-.7978784],[.3568221,-.618034,-.7978784],[-.7136442,0,-.7978784],[0,0,-1.070466]],face:[[0,1,4,7,2],[0,2,6,9,3],[0,3,8,5,1],[1,5,11,10,4],[2,7,13,12,6],[3,9,15,14,8],[4,10,16,13,7],[5,8,14,17,11],[6,12,18,15,9],[10,11,17,19,16],[12,13,16,19,18],[14,15,18,19,17]]},t[3]={vertex:[[0,0,1.175571],[1.051462,0,.5257311],[.3249197,1,.5257311],[-.8506508,.618034,.5257311],[-.8506508,-.618034,.5257311],[.3249197,-1,.5257311],[.8506508,.618034,-.5257311],[.8506508,-.618034,-.5257311],[-.3249197,1,-.5257311],[-1.051462,0,-.5257311],[-.3249197,-1,-.5257311],[0,0,-1.175571]],face:[[0,1,2],[0,2,3],[0,3,4],[0,4,5],[0,5,1],[1,5,7],[1,7,6],[1,6,2],[2,6,8],[2,8,3],[3,8,9],[3,9,4],[4,9,10],[4,10,5],[5,10,7],[6,7,11],[6,11,8],[7,10,11],[8,11,9],[9,11,10]]},t[4]={vertex:[[0,0,1.070722],[.7148135,0,.7971752],[-.104682,.7071068,.7971752],[-.6841528,.2071068,.7971752],[-.104682,-.7071068,.7971752],[.6101315,.7071068,.5236279],[1.04156,.2071068,.1367736],[.6101315,-.7071068,.5236279],[-.3574067,1,.1367736],[-.7888348,-.5,.5236279],[-.9368776,.5,.1367736],[-.3574067,-1,.1367736],[.3574067,1,-.1367736],[.9368776,-.5,-.1367736],[.7888348,.5,-.5236279],[.3574067,-1,-.1367736],[-.6101315,.7071068,-.5236279],[-1.04156,-.2071068,-.1367736],[-.6101315,-.7071068,-.5236279],[.104682,.7071068,-.7971752],[.6841528,-.2071068,-.7971752],[.104682,-.7071068,-.7971752],[-.7148135,0,-.7971752],[0,0,-1.070722]],face:[[0,2,3],[1,6,5],[4,9,11],[7,15,13],[8,16,10],[12,14,19],[17,22,18],[20,21,23],[0,1,5,2],[0,3,9,4],[0,4,7,1],[1,7,13,6],[2,5,12,8],[2,8,10,3],[3,10,17,9],[4,11,15,7],[5,6,14,12],[6,13,20,14],[8,12,19,16],[9,17,18,11],[10,16,22,17],[11,18,21,15],[13,15,21,20],[14,20,23,19],[16,19,23,22],[18,22,23,21]]},t[5]={vertex:[[0,0,1.322876],[1.309307,0,.1889822],[-.9819805,.8660254,.1889822],[.1636634,-1.299038,.1889822],[.3273268,.8660254,-.9449112],[-.8183171,-.4330127,-.9449112]],face:[[0,3,1],[2,4,5],[0,1,4,2],[0,2,5,3],[1,3,5,4]]},t[6]={vertex:[[0,0,1.159953],[1.013464,0,.5642542],[-.3501431,.9510565,.5642542],[-.7715208,-.6571639,.5642542],[.6633206,.9510565,-.03144481],[.8682979,-.6571639,-.3996071],[-1.121664,.2938926,-.03144481],[-.2348831,-1.063314,-.3996071],[.5181548,.2938926,-.9953061],[-.5850262,-.112257,-.9953061]],face:[[0,1,4,2],[0,2,6,3],[1,5,8,4],[3,6,9,7],[5,7,9,8],[0,3,7,5,1],[2,4,8,9,6]]},t[7]={vertex:[[0,0,1.118034],[.8944272,0,.6708204],[-.2236068,.8660254,.6708204],[-.7826238,-.4330127,.6708204],[.6708204,.8660254,.2236068],[1.006231,-.4330127,-.2236068],[-1.006231,.4330127,.2236068],[-.6708204,-.8660254,-.2236068],[.7826238,.4330127,-.6708204],[.2236068,-.8660254,-.6708204],[-.8944272,0,-.6708204],[0,0,-1.118034]],face:[[0,1,4,2],[0,2,6,3],[1,5,8,4],[3,6,10,7],[5,9,11,8],[7,10,11,9],[0,3,7,9,5,1],[2,4,8,11,10,6]]},t[8]={vertex:[[-.729665,.670121,.319155],[-.655235,-.29213,-.754096],[-.093922,-.607123,.537818],[.702196,.595691,.485187],[.776626,-.36656,-.588064]],face:[[1,4,2],[0,1,2],[3,0,2],[4,3,2],[4,1,0,3]]},t[9]={vertex:[[-.868849,-.100041,.61257],[-.329458,.976099,.28078],[-.26629,-.013796,-.477654],[-.13392,-1.034115,.229829],[.738834,.707117,-.307018],[.859683,-.535264,-.338508]],face:[[3,0,2],[5,3,2],[4,5,2],[1,4,2],[0,1,2],[0,3,5,4,1]]},t[10]={vertex:[[-.610389,.243975,.531213],[-.187812,-.48795,-.664016],[-.187812,.9759,-.664016],[.187812,-.9759,.664016],[.798201,.243975,.132803]],face:[[1,3,0],[3,4,0],[3,1,4],[0,2,1],[0,4,2],[2,4,1]]},t[11]={vertex:[[-1.028778,.392027,-.048786],[-.640503,-.646161,.621837],[-.125162,-.395663,-.540059],[.004683,.888447,-.651988],[.125161,.395663,.540059],[.632925,-.791376,.433102],[1.031672,.157063,-.354165]],face:[[3,2,0],[2,1,0],[2,5,1],[0,4,3],[0,1,4],[4,1,5],[2,3,6],[3,4,6],[5,2,6],[4,5,6]]},t[12]={vertex:[[-.669867,.334933,-.529576],[-.669867,.334933,.529577],[-.4043,1.212901,0],[-.334933,-.669867,-.529576],[-.334933,-.669867,.529577],[.334933,.669867,-.529576],[.334933,.669867,.529577],[.4043,-1.212901,0],[.669867,-.334933,-.529576],[.669867,-.334933,.529577]],face:[[8,9,7],[6,5,2],[3,8,7],[5,0,2],[4,3,7],[0,1,2],[9,4,7],[1,6,2],[9,8,5,6],[8,3,0,5],[3,4,1,0],[4,9,6,1]]},t[13]={vertex:[[-.931836,.219976,-.264632],[-.636706,.318353,.692816],[-.613483,-.735083,-.264632],[-.326545,.979634,0],[-.318353,-.636706,.692816],[-.159176,.477529,-.856368],[.159176,-.477529,-.856368],[.318353,.636706,.692816],[.326545,-.979634,0],[.613482,.735082,-.264632],[.636706,-.318353,.692816],[.931835,-.219977,-.264632]],face:[[11,10,8],[7,9,3],[6,11,8],[9,5,3],[2,6,8],[5,0,3],[4,2,8],[0,1,3],[10,4,8],[1,7,3],[10,11,9,7],[11,6,5,9],[6,2,0,5],[2,4,1,0],[4,10,7,1]]},t[14]={vertex:[[-.93465,.300459,-.271185],[-.838689,-.260219,-.516017],[-.711319,.717591,.128359],[-.710334,-.156922,.080946],[-.599799,.556003,-.725148],[-.503838,-.004675,-.969981],[-.487004,.26021,.48049],[-.460089,-.750282,-.512622],[-.376468,.973135,-.325605],[-.331735,-.646985,.084342],[-.254001,.831847,.530001],[-.125239,-.494738,-.966586],[.029622,.027949,.730817],[.056536,-.982543,-.262295],[.08085,1.087391,.076037],[.125583,-.532729,.485984],[.262625,.599586,.780328],[.391387,-.726999,-.716259],[.513854,-.868287,.139347],[.597475,.85513,.326364],[.641224,.109523,.783723],[.737185,-.451155,.538891],[.848705,-.612742,-.314616],[.976075,.365067,.32976],[1.072036,-.19561,.084927]],face:[[15,18,21],[12,20,16],[6,10,2],[3,0,1],[9,7,13],[2,8,4,0],[0,4,5,1],[1,5,11,7],[7,11,17,13],[13,17,22,18],[18,22,24,21],[21,24,23,20],[20,23,19,16],[16,19,14,10],[10,14,8,2],[15,9,13,18],[12,15,21,20],[6,12,16,10],[3,6,2,0],[9,3,1,7],[9,15,12,6,3],[22,17,11,5,4,8,14,19,23,24]]};var e,n,i,o,a,s,d=r.type&&(r.type<0||r.type>=t.length)?0:r.type||0,p=r.size,b=r.sizeX||p||1,x=r.sizeY||p||1,O=r.sizeZ||p||1,B=r.custom||t[d],F=B.face.length,z=r.faceUV||new Array(F),J=r.faceColors,ie=r.flat===void 0||r.flat,se=r.sideOrientation===0?0:r.sideOrientation||dt.a.DEFAULTSIDE,ce=new Array,ue=new Array,fe=new Array,ve=new Array,Te=new Array,Re=0,Ae=0,Ee=new Array,Se=0,Le=0;if(ie)for(Le=0;Le0&&t.forEach(function(n,i){e._gizmoAxisCache.set(i,n)})},r.prototype.dispose=function(){var t=this;for(var e in this._pointerObservers.forEach(function(i){t.scene.onPointerObservable.remove(i)}),this.gizmos){var n=this.gizmos[e];n&&n.dispose()}this._defaultKeepDepthUtilityLayer.dispose(),this._defaultUtilityLayer.dispose(),this.boundingBoxDragBehavior.detach(),this.onAttachedToMeshObservable.clear()},r}(),Pi=f(48),Zo=function(r){function t(){var e=r!==null&&r.apply(this,arguments)||this;return e._needProjectionMatrixCompute=!0,e}return Object(c.d)(t,r),t.prototype._setPosition=function(e){this._position=e},Object.defineProperty(t.prototype,"position",{get:function(){return this._position},set:function(e){this._setPosition(e)},enumerable:!1,configurable:!0}),t.prototype._setDirection=function(e){this._direction=e},Object.defineProperty(t.prototype,"direction",{get:function(){return this._direction},set:function(e){this._setDirection(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shadowMinZ",{get:function(){return this._shadowMinZ},set:function(e){this._shadowMinZ=e,this.forceProjectionMatrixCompute()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shadowMaxZ",{get:function(){return this._shadowMaxZ},set:function(e){this._shadowMaxZ=e,this.forceProjectionMatrixCompute()},enumerable:!1,configurable:!0}),t.prototype.computeTransformedInformation=function(){return!(!this.parent||!this.parent.getWorldMatrix)&&(this.transformedPosition||(this.transformedPosition=u.e.Zero()),u.e.TransformCoordinatesToRef(this.position,this.parent.getWorldMatrix(),this.transformedPosition),this.direction&&(this.transformedDirection||(this.transformedDirection=u.e.Zero()),u.e.TransformNormalToRef(this.direction,this.parent.getWorldMatrix(),this.transformedDirection)),!0)},t.prototype.getDepthScale=function(){return 50},t.prototype.getShadowDirection=function(e){return this.transformedDirection?this.transformedDirection:this.direction},t.prototype.getAbsolutePosition=function(){return this.transformedPosition?this.transformedPosition:this.position},t.prototype.setDirectionToTarget=function(e){return this.direction=u.e.Normalize(e.subtract(this.position)),this.direction},t.prototype.getRotation=function(){this.direction.normalize();var e=u.e.Cross(this.direction,ye.a.Y),n=u.e.Cross(e,this.direction);return u.e.RotationFromAxis(e,n,this.direction)},t.prototype.needCube=function(){return!1},t.prototype.needProjectionMatrixCompute=function(){return this._needProjectionMatrixCompute},t.prototype.forceProjectionMatrixCompute=function(){this._needProjectionMatrixCompute=!0},t.prototype._initCache=function(){r.prototype._initCache.call(this),this._cache.position=u.e.Zero()},t.prototype._isSynchronized=function(){return!!this._cache.position.equals(this.position)},t.prototype.computeWorldMatrix=function(e){return!e&&this.isSynchronized()?(this._currentRenderId=this.getScene().getRenderId(),this._worldMatrix):(this._updateCache(),this._cache.position.copyFrom(this.position),this._worldMatrix||(this._worldMatrix=u.a.Identity()),u.a.TranslationToRef(this.position.x,this.position.y,this.position.z,this._worldMatrix),this.parent&&this.parent.getWorldMatrix&&(this._worldMatrix.multiplyToRef(this.parent.getWorldMatrix(),this._worldMatrix),this._markSyncedWithParent()),this._worldMatrixDeterminantIsDirty=!0,this._worldMatrix)},t.prototype.getDepthMinZ=function(e){return this.shadowMinZ!==void 0?this.shadowMinZ:e.minZ},t.prototype.getDepthMaxZ=function(e){return this.shadowMaxZ!==void 0?this.shadowMaxZ:e.maxZ},t.prototype.setShadowProjectionMatrix=function(e,n,i){return this.customProjectionMatrixBuilder?this.customProjectionMatrixBuilder(n,i,e):this._setDefaultShadowProjectionMatrix(e,n,i),this},Object(c.c)([Object(L.o)()],t.prototype,"position",null),Object(c.c)([Object(L.o)()],t.prototype,"direction",null),Object(c.c)([Object(L.c)()],t.prototype,"shadowMinZ",null),Object(c.c)([Object(L.c)()],t.prototype,"shadowMaxZ",null),t}(Pi.a);Q.a.AddNodeConstructor("Light_Type_1",function(r,t){return function(){return new Os(r,u.e.Zero(),t)}});var Os=function(r){function t(e,n,i){var o=r.call(this,e,i)||this;return o._shadowFrustumSize=0,o._shadowOrthoScale=.1,o.autoUpdateExtends=!0,o.autoCalcShadowZBounds=!1,o._orthoLeft=Number.MAX_VALUE,o._orthoRight=Number.MIN_VALUE,o._orthoTop=Number.MIN_VALUE,o._orthoBottom=Number.MAX_VALUE,o.position=n.scale(-1),o.direction=n,o}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"shadowFrustumSize",{get:function(){return this._shadowFrustumSize},set:function(e){this._shadowFrustumSize=e,this.forceProjectionMatrixCompute()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shadowOrthoScale",{get:function(){return this._shadowOrthoScale},set:function(e){this._shadowOrthoScale=e,this.forceProjectionMatrixCompute()},enumerable:!1,configurable:!0}),t.prototype.getClassName=function(){return"DirectionalLight"},t.prototype.getTypeID=function(){return Pi.a.LIGHTTYPEID_DIRECTIONALLIGHT},t.prototype._setDefaultShadowProjectionMatrix=function(e,n,i){this.shadowFrustumSize>0?this._setDefaultFixedFrustumShadowProjectionMatrix(e):this._setDefaultAutoExtendShadowProjectionMatrix(e,n,i)},t.prototype._setDefaultFixedFrustumShadowProjectionMatrix=function(e){var n=this.getScene().activeCamera;n&&u.a.OrthoLHToRef(this.shadowFrustumSize,this.shadowFrustumSize,this.shadowMinZ!==void 0?this.shadowMinZ:n.minZ,this.shadowMaxZ!==void 0?this.shadowMaxZ:n.maxZ,e)},t.prototype._setDefaultAutoExtendShadowProjectionMatrix=function(e,n,i){var o=this.getScene().activeCamera;if(o){if(this.autoUpdateExtends||this._orthoLeft===Number.MAX_VALUE){var a=u.e.Zero();this._orthoLeft=Number.MAX_VALUE,this._orthoRight=Number.MIN_VALUE,this._orthoTop=Number.MIN_VALUE,this._orthoBottom=Number.MAX_VALUE;for(var s=Number.MAX_VALUE,d=Number.MIN_VALUE,p=0;pthis._orthoRight&&(this._orthoRight=a.x),a.y>this._orthoTop&&(this._orthoTop=a.y),this.autoCalcShadowZBounds&&(a.zd&&(d=a.z))}this.autoCalcShadowZBounds&&(this._shadowMinZ=s,this._shadowMaxZ=d)}var B=this._orthoRight-this._orthoLeft,F=this._orthoTop-this._orthoBottom;u.a.OrthoOffCenterLHToRef(this._orthoLeft-B*this.shadowOrthoScale,this._orthoRight+B*this.shadowOrthoScale,this._orthoBottom-F*this.shadowOrthoScale,this._orthoTop+F*this.shadowOrthoScale,this.shadowMinZ!==void 0?this.shadowMinZ:o.minZ,this.shadowMaxZ!==void 0?this.shadowMaxZ:o.maxZ,e)}},t.prototype._buildUniformLayout=function(){this._uniformBuffer.addUniform("vLightData",4),this._uniformBuffer.addUniform("vLightDiffuse",4),this._uniformBuffer.addUniform("vLightSpecular",4),this._uniformBuffer.addUniform("shadowsInfo",3),this._uniformBuffer.addUniform("depthValues",2),this._uniformBuffer.create()},t.prototype.transferToEffect=function(e,n){return this.computeTransformedInformation()?(this._uniformBuffer.updateFloat4("vLightData",this.transformedDirection.x,this.transformedDirection.y,this.transformedDirection.z,1,n),this):(this._uniformBuffer.updateFloat4("vLightData",this.direction.x,this.direction.y,this.direction.z,1,n),this)},t.prototype.transferToNodeMaterialEffect=function(e,n){return this.computeTransformedInformation()?(e.setFloat3(n,this.transformedDirection.x,this.transformedDirection.y,this.transformedDirection.z),this):(e.setFloat3(n,this.direction.x,this.direction.y,this.direction.z),this)},t.prototype.getDepthMinZ=function(e){return 1},t.prototype.getDepthMaxZ=function(e){return 1},t.prototype.prepareLightSpecificDefines=function(e,n){e["DIRLIGHT"+n]=!0},Object(c.c)([Object(L.c)()],t.prototype,"shadowFrustumSize",null),Object(c.c)([Object(L.c)()],t.prototype,"shadowOrthoScale",null),Object(c.c)([Object(L.c)()],t.prototype,"autoUpdateExtends",void 0),Object(c.c)([Object(L.c)()],t.prototype,"autoCalcShadowZBounds",void 0),t}(Zo);De.a.CreateHemisphere=function(r,t,e,n){var i={segments:t,diameter:e};return Jo.CreateHemisphere(r,i,n)};var Jo=function(){function r(){}return r.CreateHemisphere=function(t,e,n){e.diameter||(e.diameter=1),e.segments||(e.segments=16);var i=Un.a.CreateSphere("",{slice:.5,diameter:e.diameter,segments:e.segments},n),o=De.a.CreateDisc("",e.diameter/2,3*e.segments+(4-e.segments),n);o.rotation.x=-Math.PI/2,o.parent=i;var a=De.a.MergeMeshes([o,i],!0);return a.name=t,a},r}();Q.a.AddNodeConstructor("Light_Type_2",function(r,t){return function(){return new Ms(r,u.e.Zero(),u.e.Zero(),0,0,t)}});var Ms=function(r){function t(e,n,i,o,a,s){var d=r.call(this,e,s)||this;return d._innerAngle=0,d._projectionTextureMatrix=u.a.Zero(),d._projectionTextureLightNear=1e-6,d._projectionTextureLightFar=1e3,d._projectionTextureUpDirection=u.e.Up(),d._projectionTextureViewLightDirty=!0,d._projectionTextureProjectionLightDirty=!0,d._projectionTextureDirty=!0,d._projectionTextureViewTargetVector=u.e.Zero(),d._projectionTextureViewLightMatrix=u.a.Zero(),d._projectionTextureProjectionLightMatrix=u.a.Zero(),d._projectionTextureScalingMatrix=u.a.FromValues(.5,0,0,0,0,.5,0,0,0,0,.5,0,.5,.5,.5,1),d.position=n,d.direction=i,d.angle=o,d.exponent=a,d}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"angle",{get:function(){return this._angle},set:function(e){this._angle=e,this._cosHalfAngle=Math.cos(.5*e),this._projectionTextureProjectionLightDirty=!0,this.forceProjectionMatrixCompute(),this._computeAngleValues()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"innerAngle",{get:function(){return this._innerAngle},set:function(e){this._innerAngle=e,this._computeAngleValues()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shadowAngleScale",{get:function(){return this._shadowAngleScale},set:function(e){this._shadowAngleScale=e,this.forceProjectionMatrixCompute()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"projectionTextureMatrix",{get:function(){return this._projectionTextureMatrix},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"projectionTextureLightNear",{get:function(){return this._projectionTextureLightNear},set:function(e){this._projectionTextureLightNear=e,this._projectionTextureProjectionLightDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"projectionTextureLightFar",{get:function(){return this._projectionTextureLightFar},set:function(e){this._projectionTextureLightFar=e,this._projectionTextureProjectionLightDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"projectionTextureUpDirection",{get:function(){return this._projectionTextureUpDirection},set:function(e){this._projectionTextureUpDirection=e,this._projectionTextureProjectionLightDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"projectionTexture",{get:function(){return this._projectionTexture},set:function(e){var n=this;this._projectionTexture!==e&&(this._projectionTexture=e,this._projectionTextureDirty=!0,this._projectionTexture&&!this._projectionTexture.isReady()&&(t._IsProceduralTexture(this._projectionTexture)?this._projectionTexture.getEffect().executeWhenCompiled(function(){n._markMeshesAsLightDirty()}):t._IsTexture(this._projectionTexture)&&this._projectionTexture.onLoadObservable.addOnce(function(){n._markMeshesAsLightDirty()})))},enumerable:!1,configurable:!0}),t._IsProceduralTexture=function(e){return e.onGeneratedObservable!==void 0},t._IsTexture=function(e){return e.onLoadObservable!==void 0},t.prototype.getClassName=function(){return"SpotLight"},t.prototype.getTypeID=function(){return Pi.a.LIGHTTYPEID_SPOTLIGHT},t.prototype._setDirection=function(e){r.prototype._setDirection.call(this,e),this._projectionTextureViewLightDirty=!0},t.prototype._setPosition=function(e){r.prototype._setPosition.call(this,e),this._projectionTextureViewLightDirty=!0},t.prototype._setDefaultShadowProjectionMatrix=function(e,n,i){var o=this.getScene().activeCamera;if(o){this._shadowAngleScale=this._shadowAngleScale||1;var a=this._shadowAngleScale*this._angle;u.a.PerspectiveFovLHToRef(a,1,this.getDepthMinZ(o),this.getDepthMaxZ(o),e)}},t.prototype._computeProjectionTextureViewLightMatrix=function(){this._projectionTextureViewLightDirty=!1,this._projectionTextureDirty=!0,this.position.addToRef(this.direction,this._projectionTextureViewTargetVector),u.a.LookAtLHToRef(this.position,this._projectionTextureViewTargetVector,this._projectionTextureUpDirection,this._projectionTextureViewLightMatrix)},t.prototype._computeProjectionTextureProjectionLightMatrix=function(){this._projectionTextureProjectionLightDirty=!1,this._projectionTextureDirty=!0;var e=this.projectionTextureLightFar,n=this.projectionTextureLightNear,i=e/(e-n),o=-i*n,a=1/Math.tan(this._angle/2);u.a.FromValuesToRef(a/1,0,0,0,0,a,0,0,0,0,i,1,0,0,o,0,this._projectionTextureProjectionLightMatrix)},t.prototype._computeProjectionTextureMatrix=function(){if(this._projectionTextureDirty=!1,this._projectionTextureViewLightMatrix.multiplyToRef(this._projectionTextureProjectionLightMatrix,this._projectionTextureMatrix),this._projectionTexture instanceof we.a){var e=this._projectionTexture.uScale/2,n=this._projectionTexture.vScale/2;u.a.FromValuesToRef(e,0,0,0,0,n,0,0,0,0,.5,0,.5,.5,.5,1,this._projectionTextureScalingMatrix)}this._projectionTextureMatrix.multiplyToRef(this._projectionTextureScalingMatrix,this._projectionTextureMatrix)},t.prototype._buildUniformLayout=function(){this._uniformBuffer.addUniform("vLightData",4),this._uniformBuffer.addUniform("vLightDiffuse",4),this._uniformBuffer.addUniform("vLightSpecular",4),this._uniformBuffer.addUniform("vLightDirection",3),this._uniformBuffer.addUniform("vLightFalloff",4),this._uniformBuffer.addUniform("shadowsInfo",3),this._uniformBuffer.addUniform("depthValues",2),this._uniformBuffer.create()},t.prototype._computeAngleValues=function(){this._lightAngleScale=1/Math.max(.001,Math.cos(.5*this._innerAngle)-this._cosHalfAngle),this._lightAngleOffset=-this._cosHalfAngle*this._lightAngleScale},t.prototype.transferTexturesToEffect=function(e,n){return this.projectionTexture&&this.projectionTexture.isReady()&&(this._projectionTextureViewLightDirty&&this._computeProjectionTextureViewLightMatrix(),this._projectionTextureProjectionLightDirty&&this._computeProjectionTextureProjectionLightMatrix(),this._projectionTextureDirty&&this._computeProjectionTextureMatrix(),e.setMatrix("textureProjectionMatrix"+n,this._projectionTextureMatrix),e.setTexture("projectionLightSampler"+n,this.projectionTexture)),this},t.prototype.transferToEffect=function(e,n){var i;return this.computeTransformedInformation()?(this._uniformBuffer.updateFloat4("vLightData",this.transformedPosition.x,this.transformedPosition.y,this.transformedPosition.z,this.exponent,n),i=u.e.Normalize(this.transformedDirection)):(this._uniformBuffer.updateFloat4("vLightData",this.position.x,this.position.y,this.position.z,this.exponent,n),i=u.e.Normalize(this.direction)),this._uniformBuffer.updateFloat4("vLightDirection",i.x,i.y,i.z,this._cosHalfAngle,n),this._uniformBuffer.updateFloat4("vLightFalloff",this.range,this._inverseSquaredRange,this._lightAngleScale,this._lightAngleOffset,n),this},t.prototype.transferToNodeMaterialEffect=function(e,n){var i;return i=this.computeTransformedInformation()?u.e.Normalize(this.transformedDirection):u.e.Normalize(this.direction),this.getScene().useRightHandedSystem?e.setFloat3(n,-i.x,-i.y,-i.z):e.setFloat3(n,i.x,i.y,i.z),this},t.prototype.dispose=function(){r.prototype.dispose.call(this),this._projectionTexture&&this._projectionTexture.dispose()},t.prototype.prepareLightSpecificDefines=function(e,n){e["SPOTLIGHT"+n]=!0,e["PROJECTEDLIGHTTEXTURE"+n]=!(!this.projectionTexture||!this.projectionTexture.isReady())},Object(c.c)([Object(L.c)()],t.prototype,"angle",null),Object(c.c)([Object(L.c)()],t.prototype,"innerAngle",null),Object(c.c)([Object(L.c)()],t.prototype,"shadowAngleScale",null),Object(c.c)([Object(L.c)()],t.prototype,"exponent",void 0),Object(c.c)([Object(L.c)()],t.prototype,"projectionTextureLightNear",null),Object(c.c)([Object(L.c)()],t.prototype,"projectionTextureLightFar",null),Object(c.c)([Object(L.c)()],t.prototype,"projectionTextureUpDirection",null),Object(c.c)([Object(L.m)("projectedLightTexture")],t.prototype,"_projectionTexture",void 0),t}(Zo),dp=function(r){function t(e){e===void 0&&(e=On.a.DefaultUtilityLayer);var n=r.call(this,e)||this;return n._cachedPosition=new u.e,n._cachedForward=new u.e(0,0,1),n._pointerObserver=null,n.onClickedObservable=new R.c,n._light=null,n.attachedMesh=new Dt.a("",n.gizmoLayer.utilityLayerScene),n._attachedMeshParent=new Er.a("parent",n.gizmoLayer.utilityLayerScene),n.attachedMesh.parent=n._attachedMeshParent,n._material=new Ft.a("light",n.gizmoLayer.utilityLayerScene),n._material.diffuseColor=new M.a(.5,.5,.5),n._material.specularColor=new M.a(.1,.1,.1),n._pointerObserver=e.utilityLayerScene.onPointerObservable.add(function(i){n._light&&(n._isHovered=!(!i.pickInfo||n._rootMesh.getChildMeshes().indexOf(i.pickInfo.pickedMesh)==-1),n._isHovered&&i.event.button===0&&n.onClickedObservable.notifyObservers(n._light))},Tt.a.POINTERDOWN),n}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"light",{get:function(){return this._light},set:function(e){var n=this;if(this._light=e,e){this._lightMesh&&this._lightMesh.dispose(),e instanceof ko.a?this._lightMesh=t._CreateHemisphericLightMesh(this.gizmoLayer.utilityLayerScene):this._lightMesh=e instanceof Os?t._CreateDirectionalLightMesh(this.gizmoLayer.utilityLayerScene):e instanceof Ms?t._CreateSpotLightMesh(this.gizmoLayer.utilityLayerScene):t._CreatePointLightMesh(this.gizmoLayer.utilityLayerScene),this._lightMesh.getChildMeshes(!1).forEach(function(o){o.material=n._material}),this._lightMesh.parent=this._rootMesh;var i=this.gizmoLayer._getSharedGizmoLight();i.includedOnlyMeshes=i.includedOnlyMeshes.concat(this._lightMesh.getChildMeshes(!1)),this._lightMesh.rotationQuaternion=new u.b,this.attachedMesh.reservedDataStore||(this.attachedMesh.reservedDataStore={}),this.attachedMesh.reservedDataStore.lightGizmo=this,e.parent&&this._attachedMeshParent.freezeWorldMatrix(e.parent.getWorldMatrix()),e.position&&(this.attachedMesh.position.copyFrom(e.position),this.attachedMesh.computeWorldMatrix(!0),this._cachedPosition.copyFrom(this.attachedMesh.position)),e.direction&&(this.attachedMesh.setDirection(e.direction),this.attachedMesh.computeWorldMatrix(!0),this._cachedForward.copyFrom(this.attachedMesh.forward)),this._update()}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"material",{get:function(){return this._material},enumerable:!1,configurable:!0}),t.prototype._update=function(){r.prototype._update.call(this),this._light&&(this._light.parent&&this._attachedMeshParent.freezeWorldMatrix(this._light.parent.getWorldMatrix()),this._light.position&&(this.attachedMesh.position.equals(this._cachedPosition)?(this.attachedMesh.position.copyFrom(this._light.position),this.attachedMesh.computeWorldMatrix(!0),this._cachedPosition.copyFrom(this.attachedMesh.position)):(this._light.position.copyFrom(this.attachedMesh.position),this._cachedPosition.copyFrom(this.attachedMesh.position))),this._light.direction&&(u.e.DistanceSquared(this.attachedMesh.forward,this._cachedForward)>1e-4?(this._light.direction.copyFrom(this.attachedMesh.forward),this._cachedForward.copyFrom(this.attachedMesh.forward)):u.e.DistanceSquared(this.attachedMesh.forward,this._light.direction)>1e-4&&(this.attachedMesh.setDirection(this._light.direction),this.attachedMesh.computeWorldMatrix(!0),this._cachedForward.copyFrom(this.attachedMesh.forward))))},t.prototype.dispose=function(){this.onClickedObservable.clear(),this.gizmoLayer.utilityLayerScene.onPointerObservable.remove(this._pointerObserver),this._material.dispose(),r.prototype.dispose.call(this),this._attachedMeshParent.dispose()},t._CreateHemisphericLightMesh=function(e){var n=new De.a("hemisphereLight",e),i=Jo.CreateHemisphere(n.name,{segments:10,diameter:1},e);i.position.z=-.15,i.rotation.x=Math.PI/2,i.parent=n;var o=this._CreateLightLines(3,e);return o.parent=n,o.position.z,n.scaling.scaleInPlace(t._Scale),n.rotation.x=Math.PI/2,n},t._CreatePointLightMesh=function(e){var n=new De.a("pointLight",e),i=Un.a.CreateSphere(n.name,{segments:10,diameter:1},e);return i.rotation.x=Math.PI/2,i.parent=n,this._CreateLightLines(5,e).parent=n,n.scaling.scaleInPlace(t._Scale),n.rotation.x=Math.PI/2,n},t._CreateSpotLightMesh=function(e){var n=new De.a("spotLight",e);Un.a.CreateSphere(n.name,{segments:10,diameter:1},e).parent=n;var i=Jo.CreateHemisphere(n.name,{segments:10,diameter:2},e);return i.parent=n,i.rotation.x=-Math.PI/2,this._CreateLightLines(2,e).parent=n,n.scaling.scaleInPlace(t._Scale),n.rotation.x=Math.PI/2,n},t._CreateDirectionalLightMesh=function(e){var n=new De.a("directionalLight",e),i=new De.a(n.name,e);i.parent=n,Un.a.CreateSphere(n.name,{diameter:1.2,segments:10},e).parent=i;var o=De.a.CreateCylinder(n.name,6,.3,.3,6,1,e);o.parent=i,(a=o.clone(n.name)).scaling.y=.5,a.position.x+=1.25,(s=o.clone(n.name)).scaling.y=.5,s.position.x+=-1.25;var a,s,d=De.a.CreateCylinder(n.name,1,0,.6,6,1,e);return d.position.y+=3,d.parent=i,(a=d.clone(n.name)).position.y=1.5,a.position.x+=1.25,(s=d.clone(n.name)).position.y=1.5,s.position.x+=-1.25,i.scaling.scaleInPlace(t._Scale),i.rotation.z=Math.PI/2,i.rotation.y=Math.PI/2,n},t._Scale=.007,t._CreateLightLines=function(e,n){var i=new De.a("root",n);i.rotation.x=Math.PI/2;var o=new De.a("linePivot",n);o.parent=i;var a=De.a.CreateCylinder("line",2,.2,.3,6,1,n);if(a.position.y=a.scaling.y/2+1.2,a.parent=o,e<2)return o;for(var s=0;s<4;s++)(d=o.clone("lineParentClone")).rotation.z=Math.PI/4,d.rotation.y=Math.PI/2+Math.PI/2*s,d.getChildMeshes()[0].scaling.y=.5,d.getChildMeshes()[0].scaling.x=d.getChildMeshes()[0].scaling.z=.8,d.getChildMeshes()[0].position.y=d.getChildMeshes()[0].scaling.y/2+1.2;if(e<3)return i;for(s=0;s<4;s++)(d=o.clone("linePivotClone")).rotation.z=Math.PI/2,d.rotation.y=Math.PI/2*s;if(e<4)return i;for(s=0;s<4;s++){var d;(d=o.clone("linePivotClone")).rotation.z=Math.PI+Math.PI/4,d.rotation.y=Math.PI/2+Math.PI/2*s,d.getChildMeshes()[0].scaling.y=.5,d.getChildMeshes()[0].scaling.x=d.getChildMeshes()[0].scaling.z=.8,d.getChildMeshes()[0].position.y=d.getChildMeshes()[0].scaling.y/2+1.2}return e<5||((d=o.clone("linePivotClone")).rotation.z=Math.PI),i},t}(Bn.a),Is=function(){function r(t,e){t===void 0&&(t=u.e.Zero()),e===void 0&&(e=u.e.Up()),this.position=t,this.normal=e}return r.prototype.clone=function(){return new r(this.position.clone(),this.normal.clone())},r}(),fp=function(){function r(t,e,n){t===void 0&&(t=u.e.Zero()),e===void 0&&(e=u.e.Up()),n===void 0&&(n=u.d.Zero()),this.position=t,this.normal=e,this.uv=n}return r.prototype.clone=function(){return new r(this.position.clone(),this.normal.clone(),this.uv.clone())},r}(),pp=function(r){function t(e){e===void 0&&(e=On.a.DefaultUtilityLayer);var n=r.call(this,e)||this;return n._pointerObserver=null,n.onClickedObservable=new R.c,n._camera=null,n._invProjection=new u.a,n._material=new Ft.a("cameraGizmoMaterial",n.gizmoLayer.utilityLayerScene),n._material.diffuseColor=new M.a(.5,.5,.5),n._material.specularColor=new M.a(.1,.1,.1),n._pointerObserver=e.utilityLayerScene.onPointerObservable.add(function(i){n._camera&&(n._isHovered=!(!i.pickInfo||n._rootMesh.getChildMeshes().indexOf(i.pickInfo.pickedMesh)==-1),n._isHovered&&i.event.button===0&&n.onClickedObservable.notifyObservers(n._camera))},Tt.a.POINTERDOWN),n}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"displayFrustum",{get:function(){return this._cameraLinesMesh.isEnabled()},set:function(e){this._cameraLinesMesh.setEnabled(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"camera",{get:function(){return this._camera},set:function(e){var n=this;if(this._camera=e,this.attachedNode=e,e){this._cameraMesh&&this._cameraMesh.dispose(),this._cameraLinesMesh&&this._cameraLinesMesh.dispose(),this._cameraMesh=t._CreateCameraMesh(this.gizmoLayer.utilityLayerScene),this._cameraLinesMesh=t._CreateCameraFrustum(this.gizmoLayer.utilityLayerScene),this._cameraMesh.getChildMeshes(!1).forEach(function(o){o.material=n._material}),this._cameraMesh.parent=this._rootMesh,this._cameraLinesMesh.parent=this._rootMesh,this.gizmoLayer.utilityLayerScene.activeCamera&&this.gizmoLayer.utilityLayerScene.activeCamera.maxZ<1.5*e.maxZ&&(this.gizmoLayer.utilityLayerScene.activeCamera.maxZ=1.5*e.maxZ),this.attachedNode.reservedDataStore||(this.attachedNode.reservedDataStore={}),this.attachedNode.reservedDataStore.cameraGizmo=this;var i=this.gizmoLayer._getSharedGizmoLight();i.includedOnlyMeshes=i.includedOnlyMeshes.concat(this._cameraMesh.getChildMeshes(!1)),this._update()}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"material",{get:function(){return this._material},enumerable:!1,configurable:!0}),t.prototype._update=function(){r.prototype._update.call(this),this._camera&&(this._camera.getProjectionMatrix().invertToRef(this._invProjection),this._cameraLinesMesh.setPivotMatrix(this._invProjection,!1),this._cameraLinesMesh.scaling.x=1/this._rootMesh.scaling.x,this._cameraLinesMesh.scaling.y=1/this._rootMesh.scaling.y,this._cameraLinesMesh.scaling.z=1/this._rootMesh.scaling.z,this._cameraMesh.parent=null,this._cameraMesh.rotation.y=.5*Math.PI*(this._camera.getScene().useRightHandedSystem?1:-1),this._cameraMesh.parent=this._rootMesh)},t.prototype.dispose=function(){this.onClickedObservable.clear(),this.gizmoLayer.utilityLayerScene.onPointerObservable.remove(this._pointerObserver),this._cameraMesh&&this._cameraMesh.dispose(),this._cameraLinesMesh&&this._cameraLinesMesh.dispose(),this._material.dispose(),r.prototype.dispose.call(this)},t._CreateCameraMesh=function(e){var n=new De.a("rootCameraGizmo",e),i=new De.a(n.name,e);i.parent=n,Tr.a.CreateBox(n.name,{width:1,height:.8,depth:.5},e).parent=i;var o=fi.a.CreateCylinder(n.name,{height:.5,diameterTop:.8,diameterBottom:.8},e);o.parent=i,o.position.y=.3,o.position.x=-.6,o.rotation.x=.5*Math.PI;var a=fi.a.CreateCylinder(n.name,{height:.5,diameterTop:.6,diameterBottom:.6},e);a.parent=i,a.position.y=.5,a.position.x=.4,a.rotation.x=.5*Math.PI;var s=fi.a.CreateCylinder(n.name,{height:.5,diameterTop:.5,diameterBottom:.5},e);return s.parent=i,s.position.y=0,s.position.x=.6,s.rotation.z=.5*Math.PI,n.scaling.scaleInPlace(t._Scale),i.position.x=-.9,n},t._CreateCameraFrustum=function(e){var n=new De.a("rootCameraGizmo",e),i=new De.a(n.name,e);i.parent=n;for(var o=0;o<4;o+=2)for(var a=0;a<4;a+=2){var s;(s=cn.a.CreateLines("lines",{points:[new u.e(-1+a,-1+o,-1),new u.e(-1+a,-1+o,1)]},e)).parent=i,s.alwaysSelectAsActiveMesh=!0,s.isPickable=!1,(s=cn.a.CreateLines("lines",{points:[new u.e(-1,-1+a,-1+o),new u.e(1,-1+a,-1+o)]},e)).parent=i,s.alwaysSelectAsActiveMesh=!0,s.isPickable=!1,(s=cn.a.CreateLines("lines",{points:[new u.e(-1+a,-1,-1+o),new u.e(-1+a,1,-1+o)]},e)).parent=i,s.alwaysSelectAsActiveMesh=!0,s.isPickable=!1}return n},t._Scale=.05,t}(Bn.a);ze.a.IncludesShadersStore.kernelBlurVaryingDeclaration="varying vec2 sampleCoord{X};";var _p=`vec4 pack(float depth) +{ +const vec4 bit_shift=vec4(255.0*255.0*255.0,255.0*255.0,255.0,1.0); +const vec4 bit_mask=vec4(0.0,1.0/255.0,1.0/255.0,1.0/255.0); +vec4 res=fract(depth*bit_shift); +res-=res.xxyz*bit_mask; +return res; +} +float unpack(vec4 color) +{ +const vec4 bit_shift=vec4(1.0/(255.0*255.0*255.0),1.0/(255.0*255.0),1.0/255.0,1.0); +return dot(color,bit_shift); +}`;ze.a.IncludesShadersStore.packingFunctions=_p;var mp=`#ifdef DOF +factor=sampleCoC(sampleCoord{X}); +computedWeight=KERNEL_WEIGHT{X}*factor; +sumOfWeights+=computedWeight; +#else +computedWeight=KERNEL_WEIGHT{X}; +#endif +#ifdef PACKEDFLOAT +blend+=unpack(texture2D(textureSampler,sampleCoord{X}))*computedWeight; +#else +blend+=texture2D(textureSampler,sampleCoord{X})*computedWeight; +#endif`;ze.a.IncludesShadersStore.kernelBlurFragment=mp;var gp=`#ifdef DOF +factor=sampleCoC(sampleCenter+delta*KERNEL_DEP_OFFSET{X}); +computedWeight=KERNEL_DEP_WEIGHT{X}*factor; +sumOfWeights+=computedWeight; +#else +computedWeight=KERNEL_DEP_WEIGHT{X}; +#endif +#ifdef PACKEDFLOAT +blend+=unpack(texture2D(textureSampler,sampleCenter+delta*KERNEL_DEP_OFFSET{X}))*computedWeight; +#else +blend+=texture2D(textureSampler,sampleCenter+delta*KERNEL_DEP_OFFSET{X})*computedWeight; +#endif`;ze.a.IncludesShadersStore.kernelBlurFragment2=gp;var vp=` +uniform sampler2D textureSampler; +uniform vec2 delta; + +varying vec2 sampleCenter; +#ifdef DOF +uniform sampler2D circleOfConfusionSampler; +uniform vec2 cameraMinMaxZ; +float sampleDistance(const in vec2 offset) { +float depth=texture2D(circleOfConfusionSampler,offset).g; +return cameraMinMaxZ.x+(cameraMinMaxZ.y-cameraMinMaxZ.x)*depth; +} +float sampleCoC(const in vec2 offset) { +float coc=texture2D(circleOfConfusionSampler,offset).r; +return coc; +} +#endif +#include[0..varyingCount] +#ifdef PACKEDFLOAT +#include +#endif +void main(void) +{ +float computedWeight=0.0; +#ifdef PACKEDFLOAT +float blend=0.; +#else +vec4 blend=vec4(0.); +#endif +#ifdef DOF +float sumOfWeights=CENTER_WEIGHT; +float factor=0.0; + +#ifdef PACKEDFLOAT +blend+=unpack(texture2D(textureSampler,sampleCenter))*CENTER_WEIGHT; +#else +blend+=texture2D(textureSampler,sampleCenter)*CENTER_WEIGHT; +#endif +#endif +#include[0..varyingCount] +#include[0..depCount] +#ifdef PACKEDFLOAT +gl_FragColor=pack(blend); +#else +gl_FragColor=blend; +#endif +#ifdef DOF +gl_FragColor/=sumOfWeights; +#endif +}`;ze.a.ShadersStore.kernelBlurPixelShader=vp,ze.a.IncludesShadersStore.kernelBlurVertex="sampleCoord{X}=sampleCenter+delta*KERNEL_OFFSET{X};";var bp=` +attribute vec2 position; + +uniform vec2 delta; + +varying vec2 sampleCenter; +#include[0..varyingCount] +const vec2 madd=vec2(0.5,0.5); +void main(void) { +sampleCenter=(position*madd+madd); +#include[0..varyingCount] +gl_Position=vec4(position,0.0,1.0); +}`;ze.a.ShadersStore.kernelBlurVertexShader=bp;var _n=function(r){function t(e,n,i,o,a,s,d,p,b,x,O){s===void 0&&(s=we.a.BILINEAR_SAMPLINGMODE),b===void 0&&(b=h.a.TEXTURETYPE_UNSIGNED_INT),x===void 0&&(x=""),O===void 0&&(O=!1);var B=r.call(this,e,"kernelBlur",["delta","direction","cameraMinMaxZ"],["circleOfConfusionSampler"],o,a,s,d,p,null,b,"kernelBlur",{varyingCount:0,depCount:0},!0)||this;return B.blockCompilation=O,B._packedFloat=!1,B._staticDefines="",B._staticDefines=x,B.direction=n,B.onApplyObservable.add(function(F){B._outputTexture?F.setFloat2("delta",1/B._outputTexture.width*B.direction.x,1/B._outputTexture.height*B.direction.y):F.setFloat2("delta",1/B.width*B.direction.x,1/B.height*B.direction.y)}),B.kernel=i,B}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"kernel",{get:function(){return this._idealKernel},set:function(e){this._idealKernel!==e&&(e=Math.max(e,1),this._idealKernel=e,this._kernel=this._nearestBestKernel(e),this.blockCompilation||this._updateParameters())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"packedFloat",{get:function(){return this._packedFloat},set:function(e){this._packedFloat!==e&&(this._packedFloat=e,this.blockCompilation||this._updateParameters())},enumerable:!1,configurable:!0}),t.prototype.getClassName=function(){return"BlurPostProcess"},t.prototype.updateEffect=function(e,n,i,o,a,s){this._updateParameters(a,s)},t.prototype._updateParameters=function(e,n){for(var i=this._kernel,o=(i-1)/2,a=[],s=[],d=0,p=0;p0)return Math.max(a,3)}return Math.max(n,3)},t.prototype._gaussianWeight=function(e){var n=-e*e/.2222222222222222;return 1/(Math.sqrt(2*Math.PI)*(1/3))*Math.exp(n)},t.prototype._glslFloat=function(e,n){return n===void 0&&(n=8),e.toFixed(n).replace(/0+$/,"")},t._Parse=function(e,n,i,o){return L.a.Parse(function(){return new t(e.name,e.direction,e.kernel,e.options,n,e.renderTargetSamplingMode,i.getEngine(),e.reusable,e.textureType,void 0,!1)},e,i,o)},Object(c.c)([Object(L.c)("kernel")],t.prototype,"_kernel",void 0),Object(c.c)([Object(L.c)("packedFloat")],t.prototype,"_packedFloat",void 0),Object(c.c)([Object(L.n)()],t.prototype,"direction",void 0),t}(_t);C.a.RegisteredTypes["BABYLON.BlurPostProcess"]=_n;var Ds=function(r){function t(e,n,i,o,a,s,d){a===void 0&&(a=h.a.TEXTURETYPE_UNSIGNED_INT),s===void 0&&(s=we.a.BILINEAR_SAMPLINGMODE),d===void 0&&(d=!0);var p=r.call(this,e,n,i,o,!0,a,!1,s,d)||this;return p.scene=i,p.mirrorPlane=new vr.a(0,1,0,1),p._transformMatrix=u.a.Zero(),p._mirrorMatrix=u.a.Zero(),p._adaptiveBlurKernel=0,p._blurKernelX=0,p._blurKernelY=0,p._blurRatio=1,p.ignoreCameraViewport=!0,p._updateGammaSpace(),p._imageProcessingConfigChangeObserver=i.imageProcessingConfiguration.onUpdateParameters.add(function(){p._updateGammaSpace}),p.onBeforeRenderObservable.add(function(){u.a.ReflectionToRef(p.mirrorPlane,p._mirrorMatrix),p._savedViewMatrix=i.getViewMatrix(),p._mirrorMatrix.multiplyToRef(p._savedViewMatrix,p._transformMatrix),i.setTransformMatrix(p._transformMatrix,i.getProjectionMatrix()),i.clipPlane=p.mirrorPlane,i.getEngine().cullBackFaces=!1,i._mirroredCameraPosition=u.e.TransformCoordinates(i.activeCamera.globalPosition,p._mirrorMatrix)}),p.onAfterRenderObservable.add(function(){i.setTransformMatrix(p._savedViewMatrix,i.getProjectionMatrix()),i.getEngine().cullBackFaces=!0,i._mirroredCameraPosition=null,i.clipPlane=null}),p}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"blurRatio",{get:function(){return this._blurRatio},set:function(e){this._blurRatio!==e&&(this._blurRatio=e,this._preparePostProcesses())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"adaptiveBlurKernel",{set:function(e){this._adaptiveBlurKernel=e,this._autoComputeBlurKernel()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"blurKernel",{set:function(e){this.blurKernelX=e,this.blurKernelY=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"blurKernelX",{get:function(){return this._blurKernelX},set:function(e){this._blurKernelX!==e&&(this._blurKernelX=e,this._preparePostProcesses())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"blurKernelY",{get:function(){return this._blurKernelY},set:function(e){this._blurKernelY!==e&&(this._blurKernelY=e,this._preparePostProcesses())},enumerable:!1,configurable:!0}),t.prototype._autoComputeBlurKernel=function(){var e=this.getScene().getEngine(),n=this.getRenderWidth()/e.getRenderWidth(),i=this.getRenderHeight()/e.getRenderHeight();this.blurKernelX=this._adaptiveBlurKernel*n,this.blurKernelY=this._adaptiveBlurKernel*i},t.prototype._onRatioRescale=function(){this._sizeRatio&&(this.resize(this._initialSizeParameter),this._adaptiveBlurKernel||this._preparePostProcesses()),this._adaptiveBlurKernel&&this._autoComputeBlurKernel()},t.prototype._updateGammaSpace=function(){this.gammaSpace=!this.scene.imageProcessingConfiguration.isEnabled||!this.scene.imageProcessingConfiguration.applyByPostProcess},t.prototype._preparePostProcesses=function(){if(this.clearPostProcesses(!0),this._blurKernelX&&this._blurKernelY){var e=this.getScene().getEngine(),n=e.getCaps().textureFloatRender?h.a.TEXTURETYPE_FLOAT:h.a.TEXTURETYPE_HALF_FLOAT;this._blurX=new _n("horizontal blur",new u.d(1,0),this._blurKernelX,this._blurRatio,null,we.a.BILINEAR_SAMPLINGMODE,e,!1,n),this._blurX.autoClear=!1,this._blurRatio===1&&this.samples<2&&this._texture?this._blurX.inputTexture=this._texture:this._blurX.alwaysForcePOT=!0,this._blurY=new _n("vertical blur",new u.d(0,1),this._blurKernelY,this._blurRatio,null,we.a.BILINEAR_SAMPLINGMODE,e,!1,n),this._blurY.autoClear=!1,this._blurY.alwaysForcePOT=this._blurRatio!==1,this.addPostProcess(this._blurX),this.addPostProcess(this._blurY)}else this._blurY&&(this.removePostProcess(this._blurY),this._blurY.dispose(),this._blurY=null),this._blurX&&(this.removePostProcess(this._blurX),this._blurX.dispose(),this._blurX=null)},t.prototype.clone=function(){var e=this.getScene();if(!e)return this;var n=this.getSize(),i=new t(this.name,n.width,e,this._renderTargetOptions.generateMipMaps,this._renderTargetOptions.type,this._renderTargetOptions.samplingMode,this._renderTargetOptions.generateDepthBuffer);return i.hasAlpha=this.hasAlpha,i.level=this.level,i.mirrorPlane=this.mirrorPlane.clone(),this.renderList&&(i.renderList=this.renderList.slice(0)),i},t.prototype.serialize=function(){if(!this.name)return null;var e=r.prototype.serialize.call(this);return e.mirrorPlane=this.mirrorPlane.asArray(),e},t.prototype.dispose=function(){r.prototype.dispose.call(this),this.scene.imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingConfigChangeObserver)},t}(sn);we.a._CreateMirror=function(r,t,e,n){return new Ds(r,t,e,n)};var Qn=f(34),oi=function(r){function t(e,n,i,o,a,s,d,p,b,x,O,B,F,z){var J;i===void 0&&(i=null),o===void 0&&(o=!1),a===void 0&&(a=null),s===void 0&&(s=null),d===void 0&&(d=null),p===void 0&&(p=h.a.TEXTUREFORMAT_RGBA),b===void 0&&(b=!1),x===void 0&&(x=null),O===void 0&&(O=!1),B===void 0&&(B=.8),F===void 0&&(F=0);var ie=r.call(this,n)||this;if(ie.onLoadObservable=new R.c,ie.boundingBoxPosition=u.e.Zero(),ie._rotationY=0,ie._files=null,ie._forcedExtension=null,ie._extensions=null,ie.name=e,ie.url=e,ie._noMipmap=o,ie.hasAlpha=!1,ie._format=p,ie.isCube=!0,ie._textureMatrix=u.a.Identity(),ie._createPolynomials=O,ie.coordinatesMode=we.a.CUBIC_MODE,ie._extensions=i,ie._files=a,ie._forcedExtension=x,ie._loaderOptions=z,!e&&!a)return ie;var se=e.lastIndexOf("."),ce=x||(se>-1?e.substring(se).toLowerCase():""),ue=ce===".dds",fe=ce===".env";if(fe?(ie.gammaSpace=!1,ie._prefiltered=!1,ie.anisotropicFilteringLevel=1):(ie._prefiltered=b,b&&(ie.gammaSpace=!1,ie.anisotropicFilteringLevel=1)),ie._texture=ie._getFromCache(e,o),!a&&(fe||ue||i||(i=["_px.jpg","_py.jpg","_pz.jpg","_nx.jpg","_ny.jpg","_nz.jpg"]),a=[],i))for(var ve=0;ve +#define RECIPROCAL_PI2 0.15915494 + +uniform vec3 vEyePosition; + +varying vec3 vPositionW; +#ifdef MAINUV1 +varying vec2 vMainUV1; +#endif +#ifdef MAINUV2 +varying vec2 vMainUV2; +#endif +#ifdef NORMAL +varying vec3 vNormalW; +#endif +#ifdef DIFFUSE +#if DIFFUSEDIRECTUV == 1 +#define vDiffuseUV vMainUV1 +#elif DIFFUSEDIRECTUV == 2 +#define vDiffuseUV vMainUV2 +#else +varying vec2 vDiffuseUV; +#endif +uniform sampler2D diffuseSampler; +#endif + +#ifdef REFLECTION +#ifdef REFLECTIONMAP_3D +#define sampleReflection(s,c) textureCube(s,c) +uniform samplerCube reflectionSampler; +#ifdef TEXTURELODSUPPORT +#define sampleReflectionLod(s,c,l) textureCubeLodEXT(s,c,l) +#else +uniform samplerCube reflectionSamplerLow; +uniform samplerCube reflectionSamplerHigh; +#endif +#else +#define sampleReflection(s,c) texture2D(s,c) +uniform sampler2D reflectionSampler; +#ifdef TEXTURELODSUPPORT +#define sampleReflectionLod(s,c,l) texture2DLodEXT(s,c,l) +#else +uniform samplerCube reflectionSamplerLow; +uniform samplerCube reflectionSamplerHigh; +#endif +#endif +#ifdef REFLECTIONMAP_SKYBOX +varying vec3 vPositionUVW; +#else +#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED) +varying vec3 vDirectionW; +#endif +#endif +#include +#endif + +#ifndef FROMLINEARSPACE +#define FROMLINEARSPACE; +#endif + +#ifndef SHADOWONLY +#define SHADOWONLY; +#endif +#include + +#include<__decl__lightFragment>[0..maxSimultaneousLights] +#include +#include +#include +#include +#include + +#include +#ifdef REFLECTIONFRESNEL +#define FRESNEL_MAXIMUM_ON_ROUGH 0.25 +vec3 fresnelSchlickEnvironmentGGX(float VdotN,vec3 reflectance0,vec3 reflectance90,float smoothness) +{ + +float weight=mix(FRESNEL_MAXIMUM_ON_ROUGH,1.0,smoothness); +return reflectance0+weight*(reflectance90-reflectance0)*pow5(saturate(1.0-VdotN)); +} +#endif +void main(void) { +#include +vec3 viewDirectionW=normalize(vEyePosition-vPositionW); + +#ifdef NORMAL +vec3 normalW=normalize(vNormalW); +#else +vec3 normalW=vec3(0.0,1.0,0.0); +#endif + +float shadow=1.; +float globalShadow=0.; +float shadowLightCount=0.; +#include[0..maxSimultaneousLights] +#ifdef SHADOWINUSE +globalShadow/=shadowLightCount; +#else +globalShadow=1.0; +#endif +#ifndef BACKMAT_SHADOWONLY + +vec4 reflectionColor=vec4(1.,1.,1.,1.); +#ifdef REFLECTION +vec3 reflectionVector=computeReflectionCoords(vec4(vPositionW,1.0),normalW); +#ifdef REFLECTIONMAP_OPPOSITEZ +reflectionVector.z*=-1.0; +#endif + +#ifdef REFLECTIONMAP_3D +vec3 reflectionCoords=reflectionVector; +#else +vec2 reflectionCoords=reflectionVector.xy; +#ifdef REFLECTIONMAP_PROJECTION +reflectionCoords/=reflectionVector.z; +#endif +reflectionCoords.y=1.0-reflectionCoords.y; +#endif +#ifdef REFLECTIONBLUR +float reflectionLOD=vReflectionInfos.y; +#ifdef TEXTURELODSUPPORT + +reflectionLOD=reflectionLOD*log2(vReflectionMicrosurfaceInfos.x)*vReflectionMicrosurfaceInfos.y+vReflectionMicrosurfaceInfos.z; +reflectionColor=sampleReflectionLod(reflectionSampler,reflectionCoords,reflectionLOD); +#else +float lodReflectionNormalized=saturate(reflectionLOD); +float lodReflectionNormalizedDoubled=lodReflectionNormalized*2.0; +vec4 reflectionSpecularMid=sampleReflection(reflectionSampler,reflectionCoords); +if(lodReflectionNormalizedDoubled<1.0){ +reflectionColor=mix( +sampleReflection(reflectionSamplerHigh,reflectionCoords), +reflectionSpecularMid, +lodReflectionNormalizedDoubled +); +} else { +reflectionColor=mix( +reflectionSpecularMid, +sampleReflection(reflectionSamplerLow,reflectionCoords), +lodReflectionNormalizedDoubled-1.0 +); +} +#endif +#else +vec4 reflectionSample=sampleReflection(reflectionSampler,reflectionCoords); +reflectionColor=reflectionSample; +#endif +#ifdef RGBDREFLECTION +reflectionColor.rgb=fromRGBD(reflectionColor); +#endif +#ifdef GAMMAREFLECTION +reflectionColor.rgb=toLinearSpace(reflectionColor.rgb); +#endif +#ifdef REFLECTIONBGR +reflectionColor.rgb=reflectionColor.bgr; +#endif + +reflectionColor.rgb*=vReflectionInfos.x; +#endif + +vec3 diffuseColor=vec3(1.,1.,1.); +float finalAlpha=alpha; +#ifdef DIFFUSE +vec4 diffuseMap=texture2D(diffuseSampler,vDiffuseUV); +#ifdef GAMMADIFFUSE +diffuseMap.rgb=toLinearSpace(diffuseMap.rgb); +#endif + +diffuseMap.rgb*=vDiffuseInfos.y; +#ifdef DIFFUSEHASALPHA +finalAlpha*=diffuseMap.a; +#endif +diffuseColor=diffuseMap.rgb; +#endif + +#ifdef REFLECTIONFRESNEL +vec3 colorBase=diffuseColor; +#else +vec3 colorBase=reflectionColor.rgb*diffuseColor; +#endif +colorBase=max(colorBase,0.0); + +#ifdef USERGBCOLOR +vec3 finalColor=colorBase; +#else +#ifdef USEHIGHLIGHTANDSHADOWCOLORS +vec3 mainColor=mix(vPrimaryColorShadow.rgb,vPrimaryColor.rgb,colorBase); +#else +vec3 mainColor=vPrimaryColor.rgb; +#endif +vec3 finalColor=colorBase*mainColor; +#endif + +#ifdef REFLECTIONFRESNEL +vec3 reflectionAmount=vReflectionControl.xxx; +vec3 reflectionReflectance0=vReflectionControl.yyy; +vec3 reflectionReflectance90=vReflectionControl.zzz; +float VdotN=dot(normalize(vEyePosition),normalW); +vec3 planarReflectionFresnel=fresnelSchlickEnvironmentGGX(saturate(VdotN),reflectionReflectance0,reflectionReflectance90,1.0); +reflectionAmount*=planarReflectionFresnel; +#ifdef REFLECTIONFALLOFF +float reflectionDistanceFalloff=1.0-saturate(length(vPositionW.xyz-vBackgroundCenter)*vReflectionControl.w); +reflectionDistanceFalloff*=reflectionDistanceFalloff; +reflectionAmount*=reflectionDistanceFalloff; +#endif +finalColor=mix(finalColor,reflectionColor.rgb,saturate(reflectionAmount)); +#endif +#ifdef OPACITYFRESNEL +float viewAngleToFloor=dot(normalW,normalize(vEyePosition-vBackgroundCenter)); + +const float startAngle=0.1; +float fadeFactor=saturate(viewAngleToFloor/startAngle); +finalAlpha*=fadeFactor*fadeFactor; +#endif + +#ifdef SHADOWINUSE +finalColor=mix(finalColor*shadowLevel,finalColor,globalShadow); +#endif + +vec4 color=vec4(finalColor,finalAlpha); +#else +vec4 color=vec4(vPrimaryColor.rgb,(1.0-clamp(globalShadow,0.,1.))*alpha); +#endif +#include +#ifdef IMAGEPROCESSINGPOSTPROCESS + + +color.rgb=clamp(color.rgb,0.,30.0); +#else + +color=applyImageProcessing(color); +#endif +#ifdef PREMULTIPLYALPHA + +color.rgb*=color.a; +#endif +#ifdef NOISE +color.rgb+=dither(vPositionW.xy,0.5); +color=max(color,0.0); +#endif +gl_FragColor=color; +} +`;ze.a.ShadersStore.backgroundPixelShader=Ep;var Sp=`uniform mat4 view; +uniform mat4 viewProjection; +uniform float shadowLevel; +#ifdef DIFFUSE +uniform mat4 diffuseMatrix; +uniform vec2 vDiffuseInfos; +#endif +#ifdef REFLECTION +uniform vec2 vReflectionInfos; +uniform mat4 reflectionMatrix; +uniform vec3 vReflectionMicrosurfaceInfos; +uniform float fFovMultiplier; +#endif +#ifdef POINTSIZE +uniform float pointSize; +#endif`;ze.a.IncludesShadersStore.backgroundVertexDeclaration=Sp,f(78),f(79),f(117),f(137),f(80),f(81),f(111),f(157),f(138);var Ap=`precision highp float; +#include<__decl__backgroundVertex> +#include + +attribute vec3 position; +#ifdef NORMAL +attribute vec3 normal; +#endif +#include + +#include + +varying vec3 vPositionW; +#ifdef NORMAL +varying vec3 vNormalW; +#endif +#ifdef UV1 +attribute vec2 uv; +#endif +#ifdef UV2 +attribute vec2 uv2; +#endif +#ifdef MAINUV1 +varying vec2 vMainUV1; +#endif +#ifdef MAINUV2 +varying vec2 vMainUV2; +#endif +#if defined(DIFFUSE) && DIFFUSEDIRECTUV == 0 +varying vec2 vDiffuseUV; +#endif +#include +#include +#include<__decl__lightFragment>[0..maxSimultaneousLights] +#ifdef REFLECTIONMAP_SKYBOX +varying vec3 vPositionUVW; +#endif +#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED) +varying vec3 vDirectionW; +#endif +void main(void) { +#ifdef REFLECTIONMAP_SKYBOX +vPositionUVW=position; +#endif +#include +#include +#ifdef MULTIVIEW +if (gl_ViewID_OVR == 0u) { +gl_Position=viewProjection*finalWorld*vec4(position,1.0); +} else { +gl_Position=viewProjectionR*finalWorld*vec4(position,1.0); +} +#else +gl_Position=viewProjection*finalWorld*vec4(position,1.0); +#endif +vec4 worldPos=finalWorld*vec4(position,1.0); +vPositionW=vec3(worldPos); +#ifdef NORMAL +mat3 normalWorld=mat3(finalWorld); +#ifdef NONUNIFORMSCALING +normalWorld=transposeMat3(inverseMat3(normalWorld)); +#endif +vNormalW=normalize(normalWorld*normal); +#endif +#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED) +vDirectionW=normalize(vec3(finalWorld*vec4(position,0.0))); +#ifdef EQUIRECTANGULAR_RELFECTION_FOV +mat3 screenToWorld=inverseMat3(mat3(finalWorld*viewProjection)); +vec3 segment=mix(vDirectionW,screenToWorld*vec3(0.0,0.0,1.0),abs(fFovMultiplier-1.0)); +if (fFovMultiplier<=1.0) { +vDirectionW=normalize(segment); +} else { +vDirectionW=normalize(vDirectionW+(vDirectionW-segment)); +} +#endif +#endif +#ifndef UV1 +vec2 uv=vec2(0.,0.); +#endif +#ifndef UV2 +vec2 uv2=vec2(0.,0.); +#endif +#ifdef MAINUV1 +vMainUV1=uv; +#endif +#ifdef MAINUV2 +vMainUV2=uv2; +#endif +#if defined(DIFFUSE) && DIFFUSEDIRECTUV == 0 +if (vDiffuseInfos.x == 0.) +{ +vDiffuseUV=vec2(diffuseMatrix*vec4(uv,1.0,0.0)); +} +else +{ +vDiffuseUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0)); +} +#endif + +#include + +#include + +#include[0..maxSimultaneousLights] + +#ifdef VERTEXCOLOR +vColor=color; +#endif + +#ifdef POINTSIZE +gl_PointSize=pointSize; +#endif +} +`;ze.a.ShadersStore.backgroundVertexShader=Ap;var Sr=f(67),Pp=function(r){function t(){var e=r.call(this)||this;return e.DIFFUSE=!1,e.DIFFUSEDIRECTUV=0,e.GAMMADIFFUSE=!1,e.DIFFUSEHASALPHA=!1,e.OPACITYFRESNEL=!1,e.REFLECTIONBLUR=!1,e.REFLECTIONFRESNEL=!1,e.REFLECTIONFALLOFF=!1,e.TEXTURELODSUPPORT=!1,e.PREMULTIPLYALPHA=!1,e.USERGBCOLOR=!1,e.USEHIGHLIGHTANDSHADOWCOLORS=!1,e.BACKMAT_SHADOWONLY=!1,e.NOISE=!1,e.REFLECTIONBGR=!1,e.IMAGEPROCESSING=!1,e.VIGNETTE=!1,e.VIGNETTEBLENDMODEMULTIPLY=!1,e.VIGNETTEBLENDMODEOPAQUE=!1,e.TONEMAPPING=!1,e.TONEMAPPING_ACES=!1,e.CONTRAST=!1,e.COLORCURVES=!1,e.COLORGRADING=!1,e.COLORGRADING3D=!1,e.SAMPLER3DGREENDEPTH=!1,e.SAMPLER3DBGRMAP=!1,e.IMAGEPROCESSINGPOSTPROCESS=!1,e.EXPOSURE=!1,e.MULTIVIEW=!1,e.REFLECTION=!1,e.REFLECTIONMAP_3D=!1,e.REFLECTIONMAP_SPHERICAL=!1,e.REFLECTIONMAP_PLANAR=!1,e.REFLECTIONMAP_CUBIC=!1,e.REFLECTIONMAP_PROJECTION=!1,e.REFLECTIONMAP_SKYBOX=!1,e.REFLECTIONMAP_EXPLICIT=!1,e.REFLECTIONMAP_EQUIRECTANGULAR=!1,e.REFLECTIONMAP_EQUIRECTANGULAR_FIXED=!1,e.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED=!1,e.INVERTCUBICMAP=!1,e.REFLECTIONMAP_OPPOSITEZ=!1,e.LODINREFLECTIONALPHA=!1,e.GAMMAREFLECTION=!1,e.RGBDREFLECTION=!1,e.EQUIRECTANGULAR_RELFECTION_FOV=!1,e.MAINUV1=!1,e.MAINUV2=!1,e.UV1=!1,e.UV2=!1,e.CLIPPLANE=!1,e.CLIPPLANE2=!1,e.CLIPPLANE3=!1,e.CLIPPLANE4=!1,e.CLIPPLANE5=!1,e.CLIPPLANE6=!1,e.POINTSIZE=!1,e.FOG=!1,e.NORMAL=!1,e.NUM_BONE_INFLUENCERS=0,e.BonesPerMesh=0,e.INSTANCES=!1,e.SHADOWFLOAT=!1,e.rebuild(),e}return Object(c.d)(t,r),t}($o.a),oo=function(r){function t(e,n){var i=r.call(this,e,n)||this;return i.primaryColor=M.a.White(),i._primaryColorShadowLevel=0,i._primaryColorHighlightLevel=0,i.reflectionTexture=null,i.reflectionBlur=0,i.diffuseTexture=null,i._shadowLights=null,i.shadowLights=null,i.shadowLevel=0,i.sceneCenter=u.e.Zero(),i.opacityFresnel=!0,i.reflectionFresnel=!1,i.reflectionFalloffDistance=0,i.reflectionAmount=1,i.reflectionReflectance0=.05,i.reflectionReflectance90=.5,i.useRGBColor=!0,i.enableNoise=!1,i._fovMultiplier=1,i.useEquirectangularFOV=!1,i._maxSimultaneousLights=4,i.maxSimultaneousLights=4,i._shadowOnly=!1,i.shadowOnly=!1,i._imageProcessingObserver=null,i.switchToBGR=!1,i._renderTargets=new di.a(16),i._reflectionControls=u.f.Zero(),i._white=M.a.White(),i._primaryShadowColor=M.a.Black(),i._primaryHighlightColor=M.a.Black(),i._attachImageProcessingConfiguration(null),i.getRenderTargetTextures=function(){return i._renderTargets.reset(),i._diffuseTexture&&i._diffuseTexture.isRenderTarget&&i._renderTargets.push(i._diffuseTexture),i._reflectionTexture&&i._reflectionTexture.isRenderTarget&&i._renderTargets.push(i._reflectionTexture),i._renderTargets},i}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"_perceptualColor",{get:function(){return this.__perceptualColor},set:function(e){this.__perceptualColor=e,this._computePrimaryColorFromPerceptualColor(),this._markAllSubMeshesAsLightsDirty()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"primaryColorShadowLevel",{get:function(){return this._primaryColorShadowLevel},set:function(e){this._primaryColorShadowLevel=e,this._computePrimaryColors(),this._markAllSubMeshesAsLightsDirty()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"primaryColorHighlightLevel",{get:function(){return this._primaryColorHighlightLevel},set:function(e){this._primaryColorHighlightLevel=e,this._computePrimaryColors(),this._markAllSubMeshesAsLightsDirty()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"reflectionStandardFresnelWeight",{set:function(e){var n=e;n<.5?(n*=2,this.reflectionReflectance0=t.StandardReflectance0*n,this.reflectionReflectance90=t.StandardReflectance90*n):(n=2*n-1,this.reflectionReflectance0=t.StandardReflectance0+(1-t.StandardReflectance0)*n,this.reflectionReflectance90=t.StandardReflectance90+(1-t.StandardReflectance90)*n)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fovMultiplier",{get:function(){return this._fovMultiplier},set:function(e){isNaN(e)&&(e=1),this._fovMultiplier=Math.max(0,Math.min(2,e))},enumerable:!1,configurable:!0}),t.prototype._attachImageProcessingConfiguration=function(e){var n=this;e!==this._imageProcessingConfiguration&&(this._imageProcessingConfiguration&&this._imageProcessingObserver&&this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver),this._imageProcessingConfiguration=e||this.getScene().imageProcessingConfiguration,this._imageProcessingConfiguration&&(this._imageProcessingObserver=this._imageProcessingConfiguration.onUpdateParameters.add(function(){n._computePrimaryColorFromPerceptualColor(),n._markAllSubMeshesAsImageProcessingDirty()})))},Object.defineProperty(t.prototype,"imageProcessingConfiguration",{get:function(){return this._imageProcessingConfiguration},set:function(e){this._attachImageProcessingConfiguration(e),this._markAllSubMeshesAsTexturesDirty()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cameraColorCurvesEnabled",{get:function(){return this.imageProcessingConfiguration.colorCurvesEnabled},set:function(e){this.imageProcessingConfiguration.colorCurvesEnabled=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cameraColorGradingEnabled",{get:function(){return this.imageProcessingConfiguration.colorGradingEnabled},set:function(e){this.imageProcessingConfiguration.colorGradingEnabled=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cameraToneMappingEnabled",{get:function(){return this._imageProcessingConfiguration.toneMappingEnabled},set:function(e){this._imageProcessingConfiguration.toneMappingEnabled=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cameraExposure",{get:function(){return this._imageProcessingConfiguration.exposure},set:function(e){this._imageProcessingConfiguration.exposure=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cameraContrast",{get:function(){return this._imageProcessingConfiguration.contrast},set:function(e){this._imageProcessingConfiguration.contrast=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cameraColorGradingTexture",{get:function(){return this._imageProcessingConfiguration.colorGradingTexture},set:function(e){this.imageProcessingConfiguration.colorGradingTexture=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cameraColorCurves",{get:function(){return this.imageProcessingConfiguration.colorCurves},set:function(e){this.imageProcessingConfiguration.colorCurves=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasRenderTargetTextures",{get:function(){return!(!this._diffuseTexture||!this._diffuseTexture.isRenderTarget)||!(!this._reflectionTexture||!this._reflectionTexture.isRenderTarget)},enumerable:!1,configurable:!0}),t.prototype.needAlphaTesting=function(){return!0},t.prototype.needAlphaBlending=function(){return this.alpha<1||this._diffuseTexture!=null&&this._diffuseTexture.hasAlpha||this._shadowOnly},t.prototype.isReadyForSubMesh=function(e,n,i){var o=this;if(i===void 0&&(i=!1),n.effect&&this.isFrozen&&n.effect._wasPreviouslyReady)return!0;n._materialDefines||(n._materialDefines=new Pp);var a=this.getScene(),s=n._materialDefines;if(this._isReadyForSubMesh(n))return!0;var d=a.getEngine();if(et.a.PrepareDefinesForLights(a,e,s,!1,this._maxSimultaneousLights),s._needNormals=!0,et.a.PrepareDefinesForMultiview(a,s),s._areTexturesDirty){if(s._needUVs=!1,a.texturesEnabled){if(a.getEngine().getCaps().textureLOD&&(s.TEXTURELODSUPPORT=!0),this._diffuseTexture&&ut.a.DiffuseTextureEnabled){if(!this._diffuseTexture.isReadyOrNotBlocking())return!1;et.a.PrepareDefinesForMergedUV(this._diffuseTexture,s,"DIFFUSE"),s.DIFFUSEHASALPHA=this._diffuseTexture.hasAlpha,s.GAMMADIFFUSE=this._diffuseTexture.gammaSpace,s.OPACITYFRESNEL=this._opacityFresnel}else s.DIFFUSE=!1,s.DIFFUSEHASALPHA=!1,s.GAMMADIFFUSE=!1,s.OPACITYFRESNEL=!1;var p=this._reflectionTexture;if(p&&ut.a.ReflectionTextureEnabled){if(!p.isReadyOrNotBlocking())return!1;switch(s.REFLECTION=!0,s.GAMMAREFLECTION=p.gammaSpace,s.RGBDREFLECTION=p.isRGBD,s.REFLECTIONBLUR=this._reflectionBlur>0,s.REFLECTIONMAP_OPPOSITEZ=this.getScene().useRightHandedSystem?!p.invertZ:p.invertZ,s.LODINREFLECTIONALPHA=p.lodLevelInAlpha,s.EQUIRECTANGULAR_RELFECTION_FOV=this.useEquirectangularFOV,s.REFLECTIONBGR=this.switchToBGR,p.coordinatesMode===we.a.INVCUBIC_MODE&&(s.INVERTCUBICMAP=!0),s.REFLECTIONMAP_3D=p.isCube,p.coordinatesMode){case we.a.EXPLICIT_MODE:s.REFLECTIONMAP_EXPLICIT=!0;break;case we.a.PLANAR_MODE:s.REFLECTIONMAP_PLANAR=!0;break;case we.a.PROJECTION_MODE:s.REFLECTIONMAP_PROJECTION=!0;break;case we.a.SKYBOX_MODE:s.REFLECTIONMAP_SKYBOX=!0;break;case we.a.SPHERICAL_MODE:s.REFLECTIONMAP_SPHERICAL=!0;break;case we.a.EQUIRECTANGULAR_MODE:s.REFLECTIONMAP_EQUIRECTANGULAR=!0;break;case we.a.FIXED_EQUIRECTANGULAR_MODE:s.REFLECTIONMAP_EQUIRECTANGULAR_FIXED=!0;break;case we.a.FIXED_EQUIRECTANGULAR_MIRRORED_MODE:s.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED=!0;break;case we.a.CUBIC_MODE:case we.a.INVCUBIC_MODE:default:s.REFLECTIONMAP_CUBIC=!0}this.reflectionFresnel?(s.REFLECTIONFRESNEL=!0,s.REFLECTIONFALLOFF=this.reflectionFalloffDistance>0,this._reflectionControls.x=this.reflectionAmount,this._reflectionControls.y=this.reflectionReflectance0,this._reflectionControls.z=this.reflectionReflectance90,this._reflectionControls.w=1/this.reflectionFalloffDistance):(s.REFLECTIONFRESNEL=!1,s.REFLECTIONFALLOFF=!1)}else s.REFLECTION=!1,s.REFLECTIONFRESNEL=!1,s.REFLECTIONFALLOFF=!1,s.REFLECTIONBLUR=!1,s.REFLECTIONMAP_3D=!1,s.REFLECTIONMAP_SPHERICAL=!1,s.REFLECTIONMAP_PLANAR=!1,s.REFLECTIONMAP_CUBIC=!1,s.REFLECTIONMAP_PROJECTION=!1,s.REFLECTIONMAP_SKYBOX=!1,s.REFLECTIONMAP_EXPLICIT=!1,s.REFLECTIONMAP_EQUIRECTANGULAR=!1,s.REFLECTIONMAP_EQUIRECTANGULAR_FIXED=!1,s.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED=!1,s.INVERTCUBICMAP=!1,s.REFLECTIONMAP_OPPOSITEZ=!1,s.LODINREFLECTIONALPHA=!1,s.GAMMAREFLECTION=!1,s.RGBDREFLECTION=!1}s.PREMULTIPLYALPHA=this.alphaMode===h.a.ALPHA_PREMULTIPLIED||this.alphaMode===h.a.ALPHA_PREMULTIPLIED_PORTERDUFF,s.USERGBCOLOR=this._useRGBColor,s.NOISE=this._enableNoise}if(s._areLightsDirty&&(s.USEHIGHLIGHTANDSHADOWCOLORS=!this._useRGBColor&&(this._primaryColorShadowLevel!==0||this._primaryColorHighlightLevel!==0),s.BACKMAT_SHADOWONLY=this._shadowOnly),s._areImageProcessingDirty&&this._imageProcessingConfiguration){if(!this._imageProcessingConfiguration.isReady())return!1;this._imageProcessingConfiguration.prepareDefines(s)}if(et.a.PrepareDefinesForMisc(e,a,!1,this.pointsCloud,this.fogEnabled,this._shouldTurnAlphaTestOn(e),s),et.a.PrepareDefinesForFrameBoundValues(a,d,s,i,null,n.getRenderingMesh().hasThinInstances),et.a.PrepareDefinesForAttributes(e,s,!1,!0,!1)&&e&&(a.getEngine().getCaps().standardDerivatives||e.isVerticesDataPresent(Oe.b.NormalKind)||(e.createNormals(!0),l.a.Warn("BackgroundMaterial: Normals have been created for the mesh: "+e.name))),s.isDirty){s.markAsProcessed(),a.resetCachedMaterial();var b=new Sr.a;s.FOG&&b.addFallback(0,"FOG"),s.POINTSIZE&&b.addFallback(1,"POINTSIZE"),s.MULTIVIEW&&b.addFallback(0,"MULTIVIEW"),et.a.HandleFallbacksForShadows(s,b,this._maxSimultaneousLights);var x=[Oe.b.PositionKind];s.NORMAL&&x.push(Oe.b.NormalKind),s.UV1&&x.push(Oe.b.UVKind),s.UV2&&x.push(Oe.b.UV2Kind),et.a.PrepareAttributesForBones(x,e,s,b),et.a.PrepareAttributesForInstances(x,s);var O=["world","view","viewProjection","vEyePosition","vLightsType","vFogInfos","vFogColor","pointSize","vClipPlane","vClipPlane2","vClipPlane3","vClipPlane4","vClipPlane5","vClipPlane6","mBones","vPrimaryColor","vPrimaryColorShadow","vReflectionInfos","reflectionMatrix","vReflectionMicrosurfaceInfos","fFovMultiplier","shadowLevel","alpha","vBackgroundCenter","vReflectionControl","vDiffuseInfos","diffuseMatrix"],B=["diffuseSampler","reflectionSampler","reflectionSamplerLow","reflectionSamplerHigh"],F=["Material","Scene"];vn.a&&(vn.a.PrepareUniforms(O,s),vn.a.PrepareSamplers(B,s)),et.a.PrepareUniformsAndSamplersList({uniformsNames:O,uniformBuffersNames:F,samplers:B,defines:s,maxSimultaneousLights:this._maxSimultaneousLights});var z=s.toString();n.setEffect(a.getEngine().createEffect("background",{attributes:x,uniformsNames:O,uniformBuffersNames:F,samplers:B,defines:z,fallbacks:b,onCompiled:function(J){o.onCompiled&&o.onCompiled(J),o.bindSceneUniformBuffer(J,a.getSceneUniformBuffer())},onError:this.onError,indexParameters:{maxSimultaneousLights:this._maxSimultaneousLights}},d),s),this.buildUniformLayout()}return!(!n.effect||!n.effect.isReady())&&(s._renderId=a.getRenderId(),n.effect._wasPreviouslyReady=!0,!0)},t.prototype._computePrimaryColorFromPerceptualColor=function(){this.__perceptualColor&&(this._primaryColor.copyFrom(this.__perceptualColor),this._primaryColor.toLinearSpaceToRef(this._primaryColor),this._imageProcessingConfiguration&&this._primaryColor.scaleToRef(1/this._imageProcessingConfiguration.exposure,this._primaryColor),this._computePrimaryColors())},t.prototype._computePrimaryColors=function(){this._primaryColorShadowLevel===0&&this._primaryColorHighlightLevel===0||(this._primaryColor.scaleToRef(this._primaryColorShadowLevel,this._primaryShadowColor),this._primaryColor.subtractToRef(this._primaryShadowColor,this._primaryShadowColor),this._white.subtractToRef(this._primaryColor,this._primaryHighlightColor),this._primaryHighlightColor.scaleToRef(this._primaryColorHighlightLevel,this._primaryHighlightColor),this._primaryColor.addToRef(this._primaryHighlightColor,this._primaryHighlightColor))},t.prototype.buildUniformLayout=function(){this._uniformBuffer.addUniform("vPrimaryColor",4),this._uniformBuffer.addUniform("vPrimaryColorShadow",4),this._uniformBuffer.addUniform("vDiffuseInfos",2),this._uniformBuffer.addUniform("vReflectionInfos",2),this._uniformBuffer.addUniform("diffuseMatrix",16),this._uniformBuffer.addUniform("reflectionMatrix",16),this._uniformBuffer.addUniform("vReflectionMicrosurfaceInfos",3),this._uniformBuffer.addUniform("fFovMultiplier",1),this._uniformBuffer.addUniform("pointSize",1),this._uniformBuffer.addUniform("shadowLevel",1),this._uniformBuffer.addUniform("alpha",1),this._uniformBuffer.addUniform("vBackgroundCenter",3),this._uniformBuffer.addUniform("vReflectionControl",4),this._uniformBuffer.create()},t.prototype.unbind=function(){this._diffuseTexture&&this._diffuseTexture.isRenderTarget&&this._uniformBuffer.setTexture("diffuseSampler",null),this._reflectionTexture&&this._reflectionTexture.isRenderTarget&&this._uniformBuffer.setTexture("reflectionSampler",null),r.prototype.unbind.call(this)},t.prototype.bindOnlyWorldMatrix=function(e){this._activeEffect.setMatrix("world",e)},t.prototype.bindForSubMesh=function(e,n,i){var o=this.getScene(),a=i._materialDefines;if(a){var s=i.effect;if(s){this._activeEffect=s,this.bindOnlyWorldMatrix(e),et.a.BindBonesParameters(n,this._activeEffect);var d=this._mustRebind(o,s,n.visibility);if(d){this._uniformBuffer.bindToEffect(s,"Material"),this.bindViewProjection(s);var p=this._reflectionTexture;this._uniformBuffer.useUbo&&this.isFrozen&&this._uniformBuffer.isSync||(o.texturesEnabled&&(this._diffuseTexture&&ut.a.DiffuseTextureEnabled&&(this._uniformBuffer.updateFloat2("vDiffuseInfos",this._diffuseTexture.coordinatesIndex,this._diffuseTexture.level),et.a.BindTextureMatrix(this._diffuseTexture,this._uniformBuffer,"diffuse")),p&&ut.a.ReflectionTextureEnabled&&(this._uniformBuffer.updateMatrix("reflectionMatrix",p.getReflectionTextureMatrix()),this._uniformBuffer.updateFloat2("vReflectionInfos",p.level,this._reflectionBlur),this._uniformBuffer.updateFloat3("vReflectionMicrosurfaceInfos",p.getSize().width,p.lodGenerationScale,p.lodGenerationOffset))),this.shadowLevel>0&&this._uniformBuffer.updateFloat("shadowLevel",this.shadowLevel),this._uniformBuffer.updateFloat("alpha",this.alpha),this.pointsCloud&&this._uniformBuffer.updateFloat("pointSize",this.pointSize),a.USEHIGHLIGHTANDSHADOWCOLORS?(this._uniformBuffer.updateColor4("vPrimaryColor",this._primaryHighlightColor,1),this._uniformBuffer.updateColor4("vPrimaryColorShadow",this._primaryShadowColor,1)):this._uniformBuffer.updateColor4("vPrimaryColor",this._primaryColor,1)),this._uniformBuffer.updateFloat("fFovMultiplier",this._fovMultiplier),o.texturesEnabled&&(this._diffuseTexture&&ut.a.DiffuseTextureEnabled&&this._uniformBuffer.setTexture("diffuseSampler",this._diffuseTexture),p&&ut.a.ReflectionTextureEnabled&&(a.REFLECTIONBLUR&&a.TEXTURELODSUPPORT?this._uniformBuffer.setTexture("reflectionSampler",p):a.REFLECTIONBLUR?(this._uniformBuffer.setTexture("reflectionSampler",p._lodTextureMid||p),this._uniformBuffer.setTexture("reflectionSamplerLow",p._lodTextureLow||p),this._uniformBuffer.setTexture("reflectionSamplerHigh",p._lodTextureHigh||p)):this._uniformBuffer.setTexture("reflectionSampler",p),a.REFLECTIONFRESNEL&&(this._uniformBuffer.updateFloat3("vBackgroundCenter",this.sceneCenter.x,this.sceneCenter.y,this.sceneCenter.z),this._uniformBuffer.updateFloat4("vReflectionControl",this._reflectionControls.x,this._reflectionControls.y,this._reflectionControls.z,this._reflectionControls.w)))),et.a.BindClipPlane(this._activeEffect,o),et.a.BindEyePosition(s,o)}!d&&this.isFrozen||(o.lightsEnabled&&et.a.BindLights(o,n,this._activeEffect,a,this._maxSimultaneousLights,!1),this.bindView(s),et.a.BindFogParameters(o,n,this._activeEffect,!0),this._imageProcessingConfiguration&&this._imageProcessingConfiguration.bind(this._activeEffect)),this._uniformBuffer.update(),this._afterBind(n,this._activeEffect)}}},t.prototype.hasTexture=function(e){return!!r.prototype.hasTexture.call(this,e)||this._reflectionTexture===e||this._diffuseTexture===e},t.prototype.dispose=function(e,n){e===void 0&&(e=!1),n===void 0&&(n=!1),n&&(this.diffuseTexture&&this.diffuseTexture.dispose(),this.reflectionTexture&&this.reflectionTexture.dispose()),this._renderTargets.dispose(),this._imageProcessingConfiguration&&this._imageProcessingObserver&&this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver),r.prototype.dispose.call(this,e)},t.prototype.clone=function(e){var n=this;return L.a.Clone(function(){return new t(e,n.getScene())},this)},t.prototype.serialize=function(){var e=L.a.Serialize(this);return e.customType="BABYLON.BackgroundMaterial",e},t.prototype.getClassName=function(){return"BackgroundMaterial"},t.Parse=function(e,n,i){return L.a.Parse(function(){return new t(e.name,n)},e,n,i)},t.StandardReflectance0=.05,t.StandardReflectance90=.5,Object(c.c)([Object(L.e)()],t.prototype,"_primaryColor",void 0),Object(c.c)([Object(L.b)("_markAllSubMeshesAsLightsDirty")],t.prototype,"primaryColor",void 0),Object(c.c)([Object(L.e)()],t.prototype,"__perceptualColor",void 0),Object(c.c)([Object(L.c)()],t.prototype,"_primaryColorShadowLevel",void 0),Object(c.c)([Object(L.c)()],t.prototype,"_primaryColorHighlightLevel",void 0),Object(c.c)([Object(L.b)("_markAllSubMeshesAsLightsDirty")],t.prototype,"primaryColorHighlightLevel",null),Object(c.c)([Object(L.m)()],t.prototype,"_reflectionTexture",void 0),Object(c.c)([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"reflectionTexture",void 0),Object(c.c)([Object(L.c)()],t.prototype,"_reflectionBlur",void 0),Object(c.c)([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"reflectionBlur",void 0),Object(c.c)([Object(L.m)()],t.prototype,"_diffuseTexture",void 0),Object(c.c)([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"diffuseTexture",void 0),Object(c.c)([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"shadowLights",void 0),Object(c.c)([Object(L.c)()],t.prototype,"_shadowLevel",void 0),Object(c.c)([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"shadowLevel",void 0),Object(c.c)([Object(L.o)()],t.prototype,"_sceneCenter",void 0),Object(c.c)([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"sceneCenter",void 0),Object(c.c)([Object(L.c)()],t.prototype,"_opacityFresnel",void 0),Object(c.c)([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"opacityFresnel",void 0),Object(c.c)([Object(L.c)()],t.prototype,"_reflectionFresnel",void 0),Object(c.c)([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"reflectionFresnel",void 0),Object(c.c)([Object(L.c)()],t.prototype,"_reflectionFalloffDistance",void 0),Object(c.c)([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"reflectionFalloffDistance",void 0),Object(c.c)([Object(L.c)()],t.prototype,"_reflectionAmount",void 0),Object(c.c)([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"reflectionAmount",void 0),Object(c.c)([Object(L.c)()],t.prototype,"_reflectionReflectance0",void 0),Object(c.c)([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"reflectionReflectance0",void 0),Object(c.c)([Object(L.c)()],t.prototype,"_reflectionReflectance90",void 0),Object(c.c)([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"reflectionReflectance90",void 0),Object(c.c)([Object(L.c)()],t.prototype,"_useRGBColor",void 0),Object(c.c)([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useRGBColor",void 0),Object(c.c)([Object(L.c)()],t.prototype,"_enableNoise",void 0),Object(c.c)([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"enableNoise",void 0),Object(c.c)([Object(L.c)()],t.prototype,"_maxSimultaneousLights",void 0),Object(c.c)([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"maxSimultaneousLights",void 0),Object(c.c)([Object(L.c)()],t.prototype,"_shadowOnly",void 0),Object(c.c)([Object(L.b)("_markAllSubMeshesAsLightsDirty")],t.prototype,"shadowOnly",void 0),Object(c.c)([Object(L.i)()],t.prototype,"_imageProcessingConfiguration",void 0),t}(ea.a);C.a.RegisteredTypes["BABYLON.BackgroundMaterial"]=oo;var Ls=function(){function r(t,e){var n=this;this._errorHandler=function(i,o){n.onErrorObservable.notifyObservers({message:i,exception:o})},this._options=Object(c.a)(Object(c.a)({},r._getDefaultOptions()),t),this._scene=e,this.onErrorObservable=new R.c,this._setupBackground(),this._setupImageProcessing()}return r._getDefaultOptions=function(){return{createGround:!0,groundSize:15,groundTexture:this._groundTextureCDNUrl,groundColor:new M.a(.2,.2,.3).toLinearSpace().scale(3),groundOpacity:.9,enableGroundShadow:!0,groundShadowLevel:.5,enableGroundMirror:!1,groundMirrorSizeRatio:.3,groundMirrorBlurKernel:64,groundMirrorAmount:1,groundMirrorFresnelWeight:1,groundMirrorFallOffDistance:0,groundMirrorTextureType:h.a.TEXTURETYPE_UNSIGNED_INT,groundYBias:1e-5,createSkybox:!0,skyboxSize:20,skyboxTexture:this._skyboxTextureCDNUrl,skyboxColor:new M.a(.2,.2,.3).toLinearSpace().scale(3),backgroundYRotation:0,sizeAuto:!0,rootPosition:u.e.Zero(),setupImageProcessing:!0,environmentTexture:this._environmentTextureCDNUrl,cameraExposure:.8,cameraContrast:1.2,toneMappingEnabled:!0}},Object.defineProperty(r.prototype,"rootMesh",{get:function(){return this._rootMesh},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"skybox",{get:function(){return this._skybox},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"skyboxTexture",{get:function(){return this._skyboxTexture},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"skyboxMaterial",{get:function(){return this._skyboxMaterial},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"ground",{get:function(){return this._ground},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"groundTexture",{get:function(){return this._groundTexture},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"groundMirror",{get:function(){return this._groundMirror},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"groundMirrorRenderList",{get:function(){return this._groundMirror?this._groundMirror.renderList:null},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"groundMaterial",{get:function(){return this._groundMaterial},enumerable:!1,configurable:!0}),r.prototype.updateOptions=function(t){var e=Object(c.a)(Object(c.a)({},this._options),t);this._ground&&!e.createGround&&(this._ground.dispose(),this._ground=null),this._groundMaterial&&!e.createGround&&(this._groundMaterial.dispose(),this._groundMaterial=null),this._groundTexture&&this._options.groundTexture!=e.groundTexture&&(this._groundTexture.dispose(),this._groundTexture=null),this._skybox&&!e.createSkybox&&(this._skybox.dispose(),this._skybox=null),this._skyboxMaterial&&!e.createSkybox&&(this._skyboxMaterial.dispose(),this._skyboxMaterial=null),this._skyboxTexture&&this._options.skyboxTexture!=e.skyboxTexture&&(this._skyboxTexture.dispose(),this._skyboxTexture=null),this._groundMirror&&!e.enableGroundMirror&&(this._groundMirror.dispose(),this._groundMirror=null),this._scene.environmentTexture&&this._options.environmentTexture!=e.environmentTexture&&this._scene.environmentTexture.dispose(),this._options=e,this._setupBackground(),this._setupImageProcessing()},r.prototype.setMainColor=function(t){this.groundMaterial&&(this.groundMaterial.primaryColor=t),this.skyboxMaterial&&(this.skyboxMaterial.primaryColor=t),this.groundMirror&&(this.groundMirror.clearColor=new M.b(t.r,t.g,t.b,1))},r.prototype._setupImageProcessing=function(){this._options.setupImageProcessing&&(this._scene.imageProcessingConfiguration.contrast=this._options.cameraContrast,this._scene.imageProcessingConfiguration.exposure=this._options.cameraExposure,this._scene.imageProcessingConfiguration.toneMappingEnabled=this._options.toneMappingEnabled,this._setupEnvironmentTexture())},r.prototype._setupEnvironmentTexture=function(){if(!this._scene.environmentTexture)if(this._options.environmentTexture instanceof Wn.a)this._scene.environmentTexture=this._options.environmentTexture;else{var t=oi.CreateFromPrefilteredData(this._options.environmentTexture,this._scene);this._scene.environmentTexture=t}},r.prototype._setupBackground=function(){this._rootMesh||(this._rootMesh=new De.a("BackgroundHelper",this._scene)),this._rootMesh.rotation.y=this._options.backgroundYRotation;var t=this._getSceneSize();this._options.createGround&&(this._setupGround(t),this._setupGroundMaterial(),this._setupGroundDiffuseTexture(),this._options.enableGroundMirror&&this._setupGroundMirrorTexture(t),this._setupMirrorInGroundMaterial()),this._options.createSkybox&&(this._setupSkybox(t),this._setupSkyboxMaterial(),this._setupSkyboxReflectionTexture()),this._rootMesh.position.x=t.rootPosition.x,this._rootMesh.position.z=t.rootPosition.z,this._rootMesh.position.y=t.rootPosition.y},r.prototype._getSceneSize=function(){var t=this,e=this._options.groundSize,n=this._options.skyboxSize,i=this._options.rootPosition;if(!this._scene.meshes||this._scene.meshes.length===1)return{groundSize:e,skyboxSize:n,rootPosition:i};var o=this._scene.getWorldExtends(function(d){return d!==t._ground&&d!==t._rootMesh&&d!==t._skybox}),a=o.max.subtract(o.min);if(this._options.sizeAuto){this._scene.activeCamera instanceof Zi&&this._scene.activeCamera.upperRadiusLimit&&(n=e=2*this._scene.activeCamera.upperRadiusLimit);var s=a.length();s>e&&(n=e=2*s),e*=1.1,n*=1.5,(i=o.min.add(a.scale(.5))).y=o.min.y-this._options.groundYBias}return{groundSize:e,skyboxSize:n,rootPosition:i}},r.prototype._setupGround=function(t){var e=this;this._ground&&!this._ground.isDisposed()||(this._ground=De.a.CreatePlane("BackgroundPlane",t.groundSize,this._scene),this._ground.rotation.x=Math.PI/2,this._ground.parent=this._rootMesh,this._ground.onDisposeObservable.add(function(){e._ground=null})),this._ground.receiveShadows=this._options.enableGroundShadow},r.prototype._setupGroundMaterial=function(){this._groundMaterial||(this._groundMaterial=new oo("BackgroundPlaneMaterial",this._scene)),this._groundMaterial.alpha=this._options.groundOpacity,this._groundMaterial.alphaMode=h.a.ALPHA_PREMULTIPLIED_PORTERDUFF,this._groundMaterial.shadowLevel=this._options.groundShadowLevel,this._groundMaterial.primaryColor=this._options.groundColor,this._groundMaterial.useRGBColor=!1,this._groundMaterial.enableNoise=!0,this._ground&&(this._ground.material=this._groundMaterial)},r.prototype._setupGroundDiffuseTexture=function(){this._groundMaterial&&(this._groundTexture||(this._options.groundTexture instanceof Wn.a?this._groundMaterial.diffuseTexture=this._options.groundTexture:(this._groundTexture=new we.a(this._options.groundTexture,this._scene,void 0,void 0,void 0,void 0,this._errorHandler),this._groundTexture.gammaSpace=!1,this._groundTexture.hasAlpha=!0,this._groundMaterial.diffuseTexture=this._groundTexture)))},r.prototype._setupGroundMirrorTexture=function(t){var e=we.a.CLAMP_ADDRESSMODE;if(!this._groundMirror&&(this._groundMirror=new Ds("BackgroundPlaneMirrorTexture",{ratio:this._options.groundMirrorSizeRatio},this._scene,!1,this._options.groundMirrorTextureType,we.a.BILINEAR_SAMPLINGMODE,!0),this._groundMirror.mirrorPlane=new vr.a(0,-1,0,t.rootPosition.y),this._groundMirror.anisotropicFilteringLevel=1,this._groundMirror.wrapU=e,this._groundMirror.wrapV=e,this._groundMirror.gammaSpace=!1,this._groundMirror.renderList))for(var n=0;n0&&t.push(this._texture),this._textureRoughness&&this._textureRoughness.animations&&this._textureRoughness.animations.length>0&&t.push(this._textureRoughness),this._bumpTexture&&this._bumpTexture.animations&&this._bumpTexture.animations.length>0&&t.push(this._bumpTexture),this._tintTexture&&this._tintTexture.animations&&this._tintTexture.animations.length>0&&t.push(this._tintTexture)},r.prototype.dispose=function(t){var e,n,i,o;t&&((e=this._texture)===null||e===void 0||e.dispose(),(n=this._textureRoughness)===null||n===void 0||n.dispose(),(i=this._bumpTexture)===null||i===void 0||i.dispose(),(o=this._tintTexture)===null||o===void 0||o.dispose())},r.prototype.getClassName=function(){return"PBRClearCoatConfiguration"},r.AddFallbacks=function(t,e,n){return t.CLEARCOAT_BUMP&&e.addFallback(n++,"CLEARCOAT_BUMP"),t.CLEARCOAT_TINT&&e.addFallback(n++,"CLEARCOAT_TINT"),t.CLEARCOAT&&e.addFallback(n++,"CLEARCOAT"),n},r.AddUniforms=function(t){t.push("vClearCoatTangentSpaceParams","vClearCoatParams","vClearCoatRefractionParams","vClearCoatTintParams","clearCoatColorAtDistance","clearCoatMatrix","clearCoatRoughnessMatrix","clearCoatBumpMatrix","clearCoatTintMatrix","vClearCoatInfos","vClearCoatBumpInfos","vClearCoatTintInfos")},r.AddSamplers=function(t){t.push("clearCoatSampler","clearCoatRoughnessSampler","clearCoatBumpSampler","clearCoatTintSampler")},r.PrepareUniformBuffer=function(t){t.addUniform("vClearCoatParams",2),t.addUniform("vClearCoatRefractionParams",4),t.addUniform("vClearCoatInfos",4),t.addUniform("clearCoatMatrix",16),t.addUniform("clearCoatRoughnessMatrix",16),t.addUniform("vClearCoatBumpInfos",2),t.addUniform("vClearCoatTangentSpaceParams",2),t.addUniform("clearCoatBumpMatrix",16),t.addUniform("vClearCoatTintParams",4),t.addUniform("clearCoatColorAtDistance",1),t.addUniform("vClearCoatTintInfos",2),t.addUniform("clearCoatTintMatrix",16)},r.prototype.copyTo=function(t){L.a.Clone(function(){return t},this)},r.prototype.serialize=function(){return L.a.Serialize(this)},r.prototype.parse=function(t,e,n){var i=this;L.a.Parse(function(){return i},t,e,n)},r._DefaultIndexOfRefraction=1.5,Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"isEnabled",void 0),Object(c.c)([Object(L.c)()],r.prototype,"intensity",void 0),Object(c.c)([Object(L.c)()],r.prototype,"roughness",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"indexOfRefraction",void 0),Object(c.c)([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"texture",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"useRoughnessFromMainTexture",void 0),Object(c.c)([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"textureRoughness",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"remapF0OnInterfaceChange",void 0),Object(c.c)([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"bumpTexture",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"isTintEnabled",void 0),Object(c.c)([Object(L.e)()],r.prototype,"tintColor",void 0),Object(c.c)([Object(L.c)()],r.prototype,"tintColorAtDistance",void 0),Object(c.c)([Object(L.c)()],r.prototype,"tintThickness",void 0),Object(c.c)([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"tintTexture",void 0),r}(),Pr=function(){function r(t){this._isEnabled=!1,this.isEnabled=!1,this.intensity=1,this.direction=new u.d(1,0),this._texture=null,this.texture=null,this._internalMarkAllSubMeshesAsTexturesDirty=t}return r.prototype._markAllSubMeshesAsTexturesDirty=function(){this._internalMarkAllSubMeshesAsTexturesDirty()},r.prototype.isReadyForSubMesh=function(t,e){return!(t._areTexturesDirty&&e.texturesEnabled&&this._texture&&ut.a.AnisotropicTextureEnabled&&!this._texture.isReadyOrNotBlocking())},r.prototype.prepareDefines=function(t,e,n){this._isEnabled?(t.ANISOTROPIC=this._isEnabled,this._isEnabled&&!e.isVerticesDataPresent(Oe.b.TangentKind)&&(t._needUVs=!0,t.MAINUV1=!0),t._areTexturesDirty&&n.texturesEnabled&&(this._texture&&ut.a.AnisotropicTextureEnabled?et.a.PrepareDefinesForMergedUV(this._texture,t,"ANISOTROPIC_TEXTURE"):t.ANISOTROPIC_TEXTURE=!1)):(t.ANISOTROPIC=!1,t.ANISOTROPIC_TEXTURE=!1)},r.prototype.bindForSubMesh=function(t,e,n){t.useUbo&&n&&t.isSync||(this._texture&&ut.a.AnisotropicTextureEnabled&&(t.updateFloat2("vAnisotropyInfos",this._texture.coordinatesIndex,this._texture.level),et.a.BindTextureMatrix(this._texture,t,"anisotropy")),t.updateFloat3("vAnisotropy",this.direction.x,this.direction.y,this.intensity)),e.texturesEnabled&&this._texture&&ut.a.AnisotropicTextureEnabled&&t.setTexture("anisotropySampler",this._texture)},r.prototype.hasTexture=function(t){return this._texture===t},r.prototype.getActiveTextures=function(t){this._texture&&t.push(this._texture)},r.prototype.getAnimatables=function(t){this._texture&&this._texture.animations&&this._texture.animations.length>0&&t.push(this._texture)},r.prototype.dispose=function(t){t&&this._texture&&this._texture.dispose()},r.prototype.getClassName=function(){return"PBRAnisotropicConfiguration"},r.AddFallbacks=function(t,e,n){return t.ANISOTROPIC&&e.addFallback(n++,"ANISOTROPIC"),n},r.AddUniforms=function(t){t.push("vAnisotropy","vAnisotropyInfos","anisotropyMatrix")},r.PrepareUniformBuffer=function(t){t.addUniform("vAnisotropy",3),t.addUniform("vAnisotropyInfos",2),t.addUniform("anisotropyMatrix",16)},r.AddSamplers=function(t){t.push("anisotropySampler")},r.prototype.copyTo=function(t){L.a.Clone(function(){return t},this)},r.prototype.serialize=function(){return L.a.Serialize(this)},r.prototype.parse=function(t,e,n){var i=this;L.a.Parse(function(){return i},t,e,n)},Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"isEnabled",void 0),Object(c.c)([Object(L.c)()],r.prototype,"intensity",void 0),Object(c.c)([Object(L.n)()],r.prototype,"direction",void 0),Object(c.c)([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"texture",void 0),r}(),Cp=function(){function r(t){this._useEnergyConservation=r.DEFAULT_USE_ENERGY_CONSERVATION,this.useEnergyConservation=r.DEFAULT_USE_ENERGY_CONSERVATION,this._useSmithVisibilityHeightCorrelated=r.DEFAULT_USE_SMITH_VISIBILITY_HEIGHT_CORRELATED,this.useSmithVisibilityHeightCorrelated=r.DEFAULT_USE_SMITH_VISIBILITY_HEIGHT_CORRELATED,this._useSphericalHarmonics=r.DEFAULT_USE_SPHERICAL_HARMONICS,this.useSphericalHarmonics=r.DEFAULT_USE_SPHERICAL_HARMONICS,this._useSpecularGlossinessInputEnergyConservation=r.DEFAULT_USE_SPECULAR_GLOSSINESS_INPUT_ENERGY_CONSERVATION,this.useSpecularGlossinessInputEnergyConservation=r.DEFAULT_USE_SPECULAR_GLOSSINESS_INPUT_ENERGY_CONSERVATION,this._internalMarkAllSubMeshesAsMiscDirty=t}return r.prototype._markAllSubMeshesAsMiscDirty=function(){this._internalMarkAllSubMeshesAsMiscDirty()},r.prototype.prepareDefines=function(t){t.BRDF_V_HEIGHT_CORRELATED=this._useSmithVisibilityHeightCorrelated,t.MS_BRDF_ENERGY_CONSERVATION=this._useEnergyConservation&&this._useSmithVisibilityHeightCorrelated,t.SPHERICAL_HARMONICS=this._useSphericalHarmonics,t.SPECULAR_GLOSSINESS_ENERGY_CONSERVATION=this._useSpecularGlossinessInputEnergyConservation},r.prototype.getClassName=function(){return"PBRBRDFConfiguration"},r.prototype.copyTo=function(t){L.a.Clone(function(){return t},this)},r.prototype.serialize=function(){return L.a.Serialize(this)},r.prototype.parse=function(t,e,n){var i=this;L.a.Parse(function(){return i},t,e,n)},r.DEFAULT_USE_ENERGY_CONSERVATION=!0,r.DEFAULT_USE_SMITH_VISIBILITY_HEIGHT_CORRELATED=!0,r.DEFAULT_USE_SPHERICAL_HARMONICS=!0,r.DEFAULT_USE_SPECULAR_GLOSSINESS_INPUT_ENERGY_CONSERVATION=!0,Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsMiscDirty")],r.prototype,"useEnergyConservation",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsMiscDirty")],r.prototype,"useSmithVisibilityHeightCorrelated",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsMiscDirty")],r.prototype,"useSphericalHarmonics",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsMiscDirty")],r.prototype,"useSpecularGlossinessInputEnergyConservation",void 0),r}(),ao=function(){function r(t){this._isEnabled=!1,this.isEnabled=!1,this._linkSheenWithAlbedo=!1,this.linkSheenWithAlbedo=!1,this.intensity=1,this.color=M.a.White(),this._texture=null,this.texture=null,this._useRoughnessFromMainTexture=!0,this.useRoughnessFromMainTexture=!0,this._roughness=null,this.roughness=null,this._textureRoughness=null,this.textureRoughness=null,this._albedoScaling=!1,this.albedoScaling=!1,this._internalMarkAllSubMeshesAsTexturesDirty=t}return r.prototype._markAllSubMeshesAsTexturesDirty=function(){this._internalMarkAllSubMeshesAsTexturesDirty()},r.prototype.isReadyForSubMesh=function(t,e){return!(t._areTexturesDirty&&e.texturesEnabled&&(this._texture&&ut.a.SheenTextureEnabled&&!this._texture.isReadyOrNotBlocking()||this._textureRoughness&&ut.a.SheenTextureEnabled&&!this._textureRoughness.isReadyOrNotBlocking()))},r.prototype.prepareDefines=function(t,e){var n;this._isEnabled?(t.SHEEN=this._isEnabled,t.SHEEN_LINKWITHALBEDO=this._linkSheenWithAlbedo,t.SHEEN_ROUGHNESS=this._roughness!==null,t.SHEEN_ALBEDOSCALING=this._albedoScaling,t.SHEEN_USE_ROUGHNESS_FROM_MAINTEXTURE=this._useRoughnessFromMainTexture,t.SHEEN_TEXTURE_ROUGHNESS_IDENTICAL=this._texture!==null&&this._texture._texture===((n=this._textureRoughness)===null||n===void 0?void 0:n._texture)&&this._texture.checkTransformsAreIdentical(this._textureRoughness),t._areTexturesDirty&&e.texturesEnabled&&(this._texture&&ut.a.SheenTextureEnabled?et.a.PrepareDefinesForMergedUV(this._texture,t,"SHEEN_TEXTURE"):t.SHEEN_TEXTURE=!1,this._textureRoughness&&ut.a.SheenTextureEnabled?et.a.PrepareDefinesForMergedUV(this._textureRoughness,t,"SHEEN_TEXTURE_ROUGHNESS"):t.SHEEN_TEXTURE_ROUGHNESS=!1)):(t.SHEEN=!1,t.SHEEN_TEXTURE=!1,t.SHEEN_TEXTURE_ROUGHNESS=!1,t.SHEEN_LINKWITHALBEDO=!1,t.SHEEN_ROUGHNESS=!1,t.SHEEN_ALBEDOSCALING=!1,t.SHEEN_USE_ROUGHNESS_FROM_MAINTEXTURE=!1,t.SHEEN_TEXTURE_ROUGHNESS_IDENTICAL=!1)},r.prototype.bindForSubMesh=function(t,e,n,i){var o,a,s,d,p,b,x,O,B=i._materialDefines,F=B.SHEEN_TEXTURE_ROUGHNESS_IDENTICAL;t.useUbo&&n&&t.isSync||(F&&ut.a.SheenTextureEnabled?(t.updateFloat4("vSheenInfos",this._texture.coordinatesIndex,this._texture.level,-1,-1),et.a.BindTextureMatrix(this._texture,t,"sheen")):(this._texture||this._textureRoughness)&&ut.a.SheenTextureEnabled&&(t.updateFloat4("vSheenInfos",(a=(o=this._texture)===null||o===void 0?void 0:o.coordinatesIndex)!==null&&a!==void 0?a:0,(d=(s=this._texture)===null||s===void 0?void 0:s.level)!==null&&d!==void 0?d:0,(b=(p=this._textureRoughness)===null||p===void 0?void 0:p.coordinatesIndex)!==null&&b!==void 0?b:0,(O=(x=this._textureRoughness)===null||x===void 0?void 0:x.level)!==null&&O!==void 0?O:0),this._texture&&et.a.BindTextureMatrix(this._texture,t,"sheen"),!this._textureRoughness||F||B.SHEEN_USE_ROUGHNESS_FROM_MAINTEXTURE||et.a.BindTextureMatrix(this._textureRoughness,t,"sheenRoughness")),t.updateFloat4("vSheenColor",this.color.r,this.color.g,this.color.b,this.intensity),this._roughness!==null&&t.updateFloat("vSheenRoughness",this._roughness)),e.texturesEnabled&&(this._texture&&ut.a.SheenTextureEnabled&&t.setTexture("sheenSampler",this._texture),this._textureRoughness&&!F&&!B.SHEEN_USE_ROUGHNESS_FROM_MAINTEXTURE&&ut.a.SheenTextureEnabled&&t.setTexture("sheenRoughnessSampler",this._textureRoughness))},r.prototype.hasTexture=function(t){return this._texture===t||this._textureRoughness===t},r.prototype.getActiveTextures=function(t){this._texture&&t.push(this._texture),this._textureRoughness&&t.push(this._textureRoughness)},r.prototype.getAnimatables=function(t){this._texture&&this._texture.animations&&this._texture.animations.length>0&&t.push(this._texture),this._textureRoughness&&this._textureRoughness.animations&&this._textureRoughness.animations.length>0&&t.push(this._textureRoughness)},r.prototype.dispose=function(t){var e,n;t&&((e=this._texture)===null||e===void 0||e.dispose(),(n=this._textureRoughness)===null||n===void 0||n.dispose())},r.prototype.getClassName=function(){return"PBRSheenConfiguration"},r.AddFallbacks=function(t,e,n){return t.SHEEN&&e.addFallback(n++,"SHEEN"),n},r.AddUniforms=function(t){t.push("vSheenColor","vSheenRoughness","vSheenInfos","sheenMatrix","sheenRoughnessMatrix")},r.PrepareUniformBuffer=function(t){t.addUniform("vSheenColor",4),t.addUniform("vSheenRoughness",1),t.addUniform("vSheenInfos",4),t.addUniform("sheenMatrix",16),t.addUniform("sheenRoughnessMatrix",16)},r.AddSamplers=function(t){t.push("sheenSampler"),t.push("sheenRoughnessSampler")},r.prototype.copyTo=function(t){L.a.Clone(function(){return t},this)},r.prototype.serialize=function(){return L.a.Serialize(this)},r.prototype.parse=function(t,e,n){var i=this;L.a.Parse(function(){return i},t,e,n)},Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"isEnabled",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"linkSheenWithAlbedo",void 0),Object(c.c)([Object(L.c)()],r.prototype,"intensity",void 0),Object(c.c)([Object(L.e)()],r.prototype,"color",void 0),Object(c.c)([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"texture",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"useRoughnessFromMainTexture",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"roughness",void 0),Object(c.c)([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"textureRoughness",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"albedoScaling",void 0),r}(),so=function(){function r(t,e,n){this._isRefractionEnabled=!1,this.isRefractionEnabled=!1,this._isTranslucencyEnabled=!1,this.isTranslucencyEnabled=!1,this._isScatteringEnabled=!1,this.isScatteringEnabled=!1,this._scatteringDiffusionProfileIndex=0,this.refractionIntensity=1,this.translucencyIntensity=1,this.useAlbedoToTintRefraction=!1,this._thicknessTexture=null,this.thicknessTexture=null,this._refractionTexture=null,this.refractionTexture=null,this._indexOfRefraction=1.5,this.indexOfRefraction=1.5,this._volumeIndexOfRefraction=-1,this._invertRefractionY=!1,this.invertRefractionY=!1,this._linkRefractionWithTransparency=!1,this.linkRefractionWithTransparency=!1,this.minimumThickness=0,this.maximumThickness=1,this.tintColor=M.a.White(),this.tintColorAtDistance=1,this.diffusionDistance=M.a.White(),this._useMaskFromThicknessTexture=!1,this.useMaskFromThicknessTexture=!1,this._useMaskFromThicknessTextureGltf=!1,this.useMaskFromThicknessTextureGltf=!1,this._internalMarkAllSubMeshesAsTexturesDirty=t,this._internalMarkScenePrePassDirty=e,this._scene=n}return Object.defineProperty(r.prototype,"scatteringDiffusionProfile",{get:function(){return this._scene.subSurfaceConfiguration?this._scene.subSurfaceConfiguration.ssDiffusionProfileColors[this._scatteringDiffusionProfileIndex]:null},set:function(t){this._scene.enableSubSurfaceForPrePass()&&t&&(this._scatteringDiffusionProfileIndex=this._scene.subSurfaceConfiguration.addDiffusionProfile(t))},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"volumeIndexOfRefraction",{get:function(){return this._volumeIndexOfRefraction>=1?this._volumeIndexOfRefraction:this._indexOfRefraction},set:function(t){this._volumeIndexOfRefraction=t>=1?t:-1},enumerable:!1,configurable:!0}),r.prototype._markAllSubMeshesAsTexturesDirty=function(){this._internalMarkAllSubMeshesAsTexturesDirty()},r.prototype._markScenePrePassDirty=function(){this._internalMarkAllSubMeshesAsTexturesDirty(),this._internalMarkScenePrePassDirty()},r.prototype.isReadyForSubMesh=function(t,e){if(t._areTexturesDirty&&e.texturesEnabled){if(this._thicknessTexture&&ut.a.ThicknessTextureEnabled&&!this._thicknessTexture.isReadyOrNotBlocking())return!1;var n=this._getRefractionTexture(e);if(n&&ut.a.RefractionTextureEnabled&&!n.isReadyOrNotBlocking())return!1}return!0},r.prototype.prepareDefines=function(t,e){if(t._areTexturesDirty&&(t.SUBSURFACE=!1,t.SS_TRANSLUCENCY=this._isTranslucencyEnabled,t.SS_SCATTERING=this._isScatteringEnabled,t.SS_THICKNESSANDMASK_TEXTURE=!1,t.SS_MASK_FROM_THICKNESS_TEXTURE=!1,t.SS_MASK_FROM_THICKNESS_TEXTURE_GLTF=!1,t.SS_REFRACTION=!1,t.SS_REFRACTIONMAP_3D=!1,t.SS_GAMMAREFRACTION=!1,t.SS_RGBDREFRACTION=!1,t.SS_LINEARSPECULARREFRACTION=!1,t.SS_REFRACTIONMAP_OPPOSITEZ=!1,t.SS_LODINREFRACTIONALPHA=!1,t.SS_LINKREFRACTIONTOTRANSPARENCY=!1,t.SS_ALBEDOFORREFRACTIONTINT=!1,(this._isRefractionEnabled||this._isTranslucencyEnabled||this._isScatteringEnabled)&&(t.SUBSURFACE=!0,t._areTexturesDirty&&e.texturesEnabled&&this._thicknessTexture&&ut.a.ThicknessTextureEnabled&&et.a.PrepareDefinesForMergedUV(this._thicknessTexture,t,"SS_THICKNESSANDMASK_TEXTURE"),t.SS_MASK_FROM_THICKNESS_TEXTURE=this._useMaskFromThicknessTexture,t.SS_MASK_FROM_THICKNESS_TEXTURE_GLTF=this._useMaskFromThicknessTextureGltf),this._isRefractionEnabled&&e.texturesEnabled)){var n=this._getRefractionTexture(e);n&&ut.a.RefractionTextureEnabled&&(t.SS_REFRACTION=!0,t.SS_REFRACTIONMAP_3D=n.isCube,t.SS_GAMMAREFRACTION=n.gammaSpace,t.SS_RGBDREFRACTION=n.isRGBD,t.SS_LINEARSPECULARREFRACTION=n.linearSpecularLOD,t.SS_REFRACTIONMAP_OPPOSITEZ=n.invertZ,t.SS_LODINREFRACTIONALPHA=n.lodLevelInAlpha,t.SS_LINKREFRACTIONTOTRANSPARENCY=this._linkRefractionWithTransparency,t.SS_ALBEDOFORREFRACTIONTINT=this.useAlbedoToTintRefraction)}},r.prototype.bindForSubMesh=function(t,e,n,i,o,a){var s=this._getRefractionTexture(e);if(!t.useUbo||!i||!t.isSync){if(this._thicknessTexture&&ut.a.ThicknessTextureEnabled&&(t.updateFloat2("vThicknessInfos",this._thicknessTexture.coordinatesIndex,this._thicknessTexture.level),et.a.BindTextureMatrix(this._thicknessTexture,t,"thickness")),t.updateFloat2("vThicknessParam",this.minimumThickness,this.maximumThickness-this.minimumThickness),s&&ut.a.RefractionTextureEnabled){t.updateMatrix("refractionMatrix",s.getReflectionTextureMatrix());var d=1;s.isCube||s.depth&&(d=s.depth);var p=s.getSize().width,b=this.volumeIndexOfRefraction;t.updateFloat4("vRefractionInfos",s.level,1/b,d,this._invertRefractionY?-1:1),t.updateFloat3("vRefractionMicrosurfaceInfos",p,s.lodGenerationScale,s.lodGenerationOffset),a&&t.updateFloat2("vRefractionFilteringInfo",p,$.a.Log2(p))}this.isScatteringEnabled&&t.updateFloat("scatteringDiffusionProfile",this._scatteringDiffusionProfileIndex),t.updateColor3("vDiffusionDistance",this.diffusionDistance),t.updateFloat4("vTintColor",this.tintColor.r,this.tintColor.g,this.tintColor.b,this.tintColorAtDistance),t.updateFloat3("vSubSurfaceIntensity",this.refractionIntensity,this.translucencyIntensity,0)}e.texturesEnabled&&(this._thicknessTexture&&ut.a.ThicknessTextureEnabled&&t.setTexture("thicknessSampler",this._thicknessTexture),s&&ut.a.RefractionTextureEnabled&&(o?t.setTexture("refractionSampler",s):(t.setTexture("refractionSampler",s._lodTextureMid||s),t.setTexture("refractionSamplerLow",s._lodTextureLow||s),t.setTexture("refractionSamplerHigh",s._lodTextureHigh||s))))},r.prototype.unbind=function(t){return!(!this._refractionTexture||!this._refractionTexture.isRenderTarget)&&(t.setTexture("refractionSampler",null),!0)},r.prototype._getRefractionTexture=function(t){return this._refractionTexture?this._refractionTexture:this._isRefractionEnabled?t.environmentTexture:null},Object.defineProperty(r.prototype,"disableAlphaBlending",{get:function(){return this.isRefractionEnabled&&this._linkRefractionWithTransparency},enumerable:!1,configurable:!0}),r.prototype.fillRenderTargetTextures=function(t){ut.a.RefractionTextureEnabled&&this._refractionTexture&&this._refractionTexture.isRenderTarget&&t.push(this._refractionTexture)},r.prototype.hasTexture=function(t){return this._thicknessTexture===t||this._refractionTexture===t},r.prototype.hasRenderTargetTextures=function(){return!!(ut.a.RefractionTextureEnabled&&this._refractionTexture&&this._refractionTexture.isRenderTarget)},r.prototype.getActiveTextures=function(t){this._thicknessTexture&&t.push(this._thicknessTexture),this._refractionTexture&&t.push(this._refractionTexture)},r.prototype.getAnimatables=function(t){this._thicknessTexture&&this._thicknessTexture.animations&&this._thicknessTexture.animations.length>0&&t.push(this._thicknessTexture),this._refractionTexture&&this._refractionTexture.animations&&this._refractionTexture.animations.length>0&&t.push(this._refractionTexture)},r.prototype.dispose=function(t){t&&(this._thicknessTexture&&this._thicknessTexture.dispose(),this._refractionTexture&&this._refractionTexture.dispose())},r.prototype.getClassName=function(){return"PBRSubSurfaceConfiguration"},r.AddFallbacks=function(t,e,n){return t.SS_SCATTERING&&e.addFallback(n++,"SS_SCATTERING"),t.SS_TRANSLUCENCY&&e.addFallback(n++,"SS_TRANSLUCENCY"),n},r.AddUniforms=function(t){t.push("vDiffusionDistance","vTintColor","vSubSurfaceIntensity","vRefractionMicrosurfaceInfos","vRefractionFilteringInfo","vRefractionInfos","vThicknessInfos","vThicknessParam","refractionMatrix","thicknessMatrix","scatteringDiffusionProfile")},r.AddSamplers=function(t){t.push("thicknessSampler","refractionSampler","refractionSamplerLow","refractionSamplerHigh")},r.PrepareUniformBuffer=function(t){t.addUniform("vRefractionMicrosurfaceInfos",3),t.addUniform("vRefractionFilteringInfo",2),t.addUniform("vRefractionInfos",4),t.addUniform("refractionMatrix",16),t.addUniform("vThicknessInfos",2),t.addUniform("thicknessMatrix",16),t.addUniform("vThicknessParam",2),t.addUniform("vDiffusionDistance",3),t.addUniform("vTintColor",4),t.addUniform("vSubSurfaceIntensity",3),t.addUniform("scatteringDiffusionProfile",1)},r.prototype.copyTo=function(t){L.a.Clone(function(){return t},this)},r.prototype.serialize=function(){return L.a.Serialize(this)},r.prototype.parse=function(t,e,n){var i=this;L.a.Parse(function(){return i},t,e,n)},Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"isRefractionEnabled",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"isTranslucencyEnabled",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markScenePrePassDirty")],r.prototype,"isScatteringEnabled",void 0),Object(c.c)([Object(L.c)()],r.prototype,"_scatteringDiffusionProfileIndex",void 0),Object(c.c)([Object(L.c)()],r.prototype,"refractionIntensity",void 0),Object(c.c)([Object(L.c)()],r.prototype,"translucencyIntensity",void 0),Object(c.c)([Object(L.c)()],r.prototype,"useAlbedoToTintRefraction",void 0),Object(c.c)([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"thicknessTexture",void 0),Object(c.c)([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"refractionTexture",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"indexOfRefraction",void 0),Object(c.c)([Object(L.c)()],r.prototype,"_volumeIndexOfRefraction",void 0),Object(c.c)([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"volumeIndexOfRefraction",null),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"invertRefractionY",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"linkRefractionWithTransparency",void 0),Object(c.c)([Object(L.c)()],r.prototype,"minimumThickness",void 0),Object(c.c)([Object(L.c)()],r.prototype,"maximumThickness",void 0),Object(c.c)([Object(L.e)()],r.prototype,"tintColor",void 0),Object(c.c)([Object(L.c)()],r.prototype,"tintColorAtDistance",void 0),Object(c.c)([Object(L.e)()],r.prototype,"diffusionDistance",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"useMaskFromThicknessTexture",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"useMaskFromThicknessTextureGltf",void 0),r}(),Ns=f(105),Ht=f(25),Rp=(f(160),`uniform vec3 vReflectionColor; +uniform vec4 vAlbedoColor; + +uniform vec4 vLightingIntensity; +uniform vec4 vReflectivityColor; +uniform vec4 vMetallicReflectanceFactors; +uniform vec3 vEmissiveColor; +uniform float visibility; + +#ifdef ALBEDO +uniform vec2 vAlbedoInfos; +#endif +#ifdef AMBIENT +uniform vec4 vAmbientInfos; +#endif +#ifdef BUMP +uniform vec3 vBumpInfos; +uniform vec2 vTangentSpaceParams; +#endif +#ifdef OPACITY +uniform vec2 vOpacityInfos; +#endif +#ifdef EMISSIVE +uniform vec2 vEmissiveInfos; +#endif +#ifdef LIGHTMAP +uniform vec2 vLightmapInfos; +#endif +#ifdef REFLECTIVITY +uniform vec3 vReflectivityInfos; +#endif +#ifdef MICROSURFACEMAP +uniform vec2 vMicroSurfaceSamplerInfos; +#endif + +#if defined(REFLECTIONMAP_SPHERICAL) || defined(REFLECTIONMAP_PROJECTION) || defined(SS_REFRACTION) +uniform mat4 view; +#endif + +#ifdef REFLECTION +uniform vec2 vReflectionInfos; +#ifdef REALTIME_FILTERING +uniform vec2 vReflectionFilteringInfo; +#endif +uniform mat4 reflectionMatrix; +uniform vec3 vReflectionMicrosurfaceInfos; +#if defined(USE_LOCAL_REFLECTIONMAP_CUBIC) && defined(REFLECTIONMAP_CUBIC) +uniform vec3 vReflectionPosition; +uniform vec3 vReflectionSize; +#endif +#endif + +#ifdef CLEARCOAT +uniform vec2 vClearCoatParams; +uniform vec4 vClearCoatRefractionParams; +#if defined(CLEARCOAT_TEXTURE) || defined(CLEARCOAT_TEXTURE_ROUGHNESS) +uniform vec4 vClearCoatInfos; +#endif +#ifdef CLEARCOAT_TEXTURE +uniform mat4 clearCoatMatrix; +#endif +#ifdef CLEARCOAT_TEXTURE_ROUGHNESS +uniform mat4 clearCoatRoughnessMatrix; +#endif +#ifdef CLEARCOAT_BUMP +uniform vec2 vClearCoatBumpInfos; +uniform vec2 vClearCoatTangentSpaceParams; +uniform mat4 clearCoatBumpMatrix; +#endif +#ifdef CLEARCOAT_TINT +uniform vec4 vClearCoatTintParams; +uniform float clearCoatColorAtDistance; +#ifdef CLEARCOAT_TINT_TEXTURE +uniform vec2 vClearCoatTintInfos; +uniform mat4 clearCoatTintMatrix; +#endif +#endif +#endif + +#ifdef ANISOTROPIC +uniform vec3 vAnisotropy; +#ifdef ANISOTROPIC_TEXTURE +uniform vec2 vAnisotropyInfos; +uniform mat4 anisotropyMatrix; +#endif +#endif + +#ifdef SHEEN +uniform vec4 vSheenColor; +#ifdef SHEEN_ROUGHNESS +uniform float vSheenRoughness; +#endif +#if defined(SHEEN_TEXTURE) || defined(SHEEN_TEXTURE_ROUGHNESS) +uniform vec4 vSheenInfos; +#endif +#ifdef SHEEN_TEXTURE +uniform mat4 sheenMatrix; +#endif +#ifdef SHEEN_TEXTURE_ROUGHNESS +uniform mat4 sheenRoughnessMatrix; +#endif +#endif + +#ifdef SUBSURFACE +#ifdef SS_REFRACTION +uniform vec3 vRefractionMicrosurfaceInfos; +uniform vec4 vRefractionInfos; +uniform mat4 refractionMatrix; +#ifdef REALTIME_FILTERING +uniform vec2 vRefractionFilteringInfo; +#endif +#endif +#ifdef SS_THICKNESSANDMASK_TEXTURE +uniform vec2 vThicknessInfos; +uniform mat4 thicknessMatrix; +#endif +uniform vec2 vThicknessParam; +uniform vec3 vDiffusionDistance; +uniform vec4 vTintColor; +uniform vec3 vSubSurfaceIntensity; +#endif +#ifdef PREPASS +#ifdef PREPASS_IRRADIANCE +uniform float scatteringDiffusionProfile; +#endif +#endif`);ze.a.IncludesShadersStore.pbrFragmentDeclaration=Rp;var Op=`layout(std140,column_major) uniform; +uniform Material +{ +uniform vec2 vAlbedoInfos; +uniform vec4 vAmbientInfos; +uniform vec2 vOpacityInfos; +uniform vec2 vEmissiveInfos; +uniform vec2 vLightmapInfos; +uniform vec3 vReflectivityInfos; +uniform vec2 vMicroSurfaceSamplerInfos; +uniform vec2 vReflectionInfos; +uniform vec2 vReflectionFilteringInfo; +uniform vec3 vReflectionPosition; +uniform vec3 vReflectionSize; +uniform vec3 vBumpInfos; +uniform mat4 albedoMatrix; +uniform mat4 ambientMatrix; +uniform mat4 opacityMatrix; +uniform mat4 emissiveMatrix; +uniform mat4 lightmapMatrix; +uniform mat4 reflectivityMatrix; +uniform mat4 microSurfaceSamplerMatrix; +uniform mat4 bumpMatrix; +uniform vec2 vTangentSpaceParams; +uniform mat4 reflectionMatrix; +uniform vec3 vReflectionColor; +uniform vec4 vAlbedoColor; +uniform vec4 vLightingIntensity; +uniform vec3 vReflectionMicrosurfaceInfos; +uniform float pointSize; +uniform vec4 vReflectivityColor; +uniform vec3 vEmissiveColor; +uniform float visibility; +uniform vec4 vMetallicReflectanceFactors; +uniform vec2 vMetallicReflectanceInfos; +uniform mat4 metallicReflectanceMatrix; +uniform vec2 vClearCoatParams; +uniform vec4 vClearCoatRefractionParams; +uniform vec4 vClearCoatInfos; +uniform mat4 clearCoatMatrix; +uniform mat4 clearCoatRoughnessMatrix; +uniform vec2 vClearCoatBumpInfos; +uniform vec2 vClearCoatTangentSpaceParams; +uniform mat4 clearCoatBumpMatrix; +uniform vec4 vClearCoatTintParams; +uniform float clearCoatColorAtDistance; +uniform vec2 vClearCoatTintInfos; +uniform mat4 clearCoatTintMatrix; +uniform vec3 vAnisotropy; +uniform vec2 vAnisotropyInfos; +uniform mat4 anisotropyMatrix; +uniform vec4 vSheenColor; +uniform float vSheenRoughness; +uniform vec4 vSheenInfos; +uniform mat4 sheenMatrix; +uniform mat4 sheenRoughnessMatrix; +uniform vec3 vRefractionMicrosurfaceInfos; +uniform vec2 vRefractionFilteringInfo; +uniform vec4 vRefractionInfos; +uniform mat4 refractionMatrix; +uniform vec2 vThicknessInfos; +uniform mat4 thicknessMatrix; +uniform vec2 vThicknessParam; +uniform vec3 vDiffusionDistance; +uniform vec4 vTintColor; +uniform vec3 vSubSurfaceIntensity; +uniform float scatteringDiffusionProfile; +uniform vec4 vDetailInfos; +uniform mat4 detailMatrix; +}; +uniform Scene { +mat4 viewProjection; +#ifdef MULTIVIEW +mat4 viewProjectionR; +#endif +mat4 view; +};`;ze.a.IncludesShadersStore.pbrUboDeclaration=Op;var Mp=`uniform vec4 vEyePosition; +uniform vec3 vAmbientColor; +uniform vec4 vCameraInfos; + +varying vec3 vPositionW; +#if DEBUGMODE>0 +uniform vec2 vDebugMode; +varying vec4 vClipSpacePosition; +#endif +#ifdef MAINUV1 +varying vec2 vMainUV1; +#endif +#ifdef MAINUV2 +varying vec2 vMainUV2; +#endif +#ifdef NORMAL +varying vec3 vNormalW; +#if defined(USESPHERICALFROMREFLECTIONMAP) && defined(USESPHERICALINVERTEX) +varying vec3 vEnvironmentIrradiance; +#endif +#endif +#ifdef VERTEXCOLOR +varying vec4 vColor; +#endif`;ze.a.IncludesShadersStore.pbrFragmentExtraDeclaration=Mp;var Ip=`#ifdef ALBEDO +#if ALBEDODIRECTUV == 1 +#define vAlbedoUV vMainUV1 +#elif ALBEDODIRECTUV == 2 +#define vAlbedoUV vMainUV2 +#else +varying vec2 vAlbedoUV; +#endif +uniform sampler2D albedoSampler; +#endif +#ifdef AMBIENT +#if AMBIENTDIRECTUV == 1 +#define vAmbientUV vMainUV1 +#elif AMBIENTDIRECTUV == 2 +#define vAmbientUV vMainUV2 +#else +varying vec2 vAmbientUV; +#endif +uniform sampler2D ambientSampler; +#endif +#ifdef OPACITY +#if OPACITYDIRECTUV == 1 +#define vOpacityUV vMainUV1 +#elif OPACITYDIRECTUV == 2 +#define vOpacityUV vMainUV2 +#else +varying vec2 vOpacityUV; +#endif +uniform sampler2D opacitySampler; +#endif +#ifdef EMISSIVE +#if EMISSIVEDIRECTUV == 1 +#define vEmissiveUV vMainUV1 +#elif EMISSIVEDIRECTUV == 2 +#define vEmissiveUV vMainUV2 +#else +varying vec2 vEmissiveUV; +#endif +uniform sampler2D emissiveSampler; +#endif +#ifdef LIGHTMAP +#if LIGHTMAPDIRECTUV == 1 +#define vLightmapUV vMainUV1 +#elif LIGHTMAPDIRECTUV == 2 +#define vLightmapUV vMainUV2 +#else +varying vec2 vLightmapUV; +#endif +uniform sampler2D lightmapSampler; +#endif +#ifdef REFLECTIVITY +#if REFLECTIVITYDIRECTUV == 1 +#define vReflectivityUV vMainUV1 +#elif REFLECTIVITYDIRECTUV == 2 +#define vReflectivityUV vMainUV2 +#else +varying vec2 vReflectivityUV; +#endif +uniform sampler2D reflectivitySampler; +#endif +#ifdef MICROSURFACEMAP +#if MICROSURFACEMAPDIRECTUV == 1 +#define vMicroSurfaceSamplerUV vMainUV1 +#elif MICROSURFACEMAPDIRECTUV == 2 +#define vMicroSurfaceSamplerUV vMainUV2 +#else +varying vec2 vMicroSurfaceSamplerUV; +#endif +uniform sampler2D microSurfaceSampler; +#endif +#ifdef METALLIC_REFLECTANCE +#if METALLIC_REFLECTANCEDIRECTUV == 1 +#define vMetallicReflectanceUV vMainUV1 +#elif METALLIC_REFLECTANCEDIRECTUV == 2 +#define vMetallicReflectanceUV vMainUV2 +#else +varying vec2 vMetallicReflectanceUV; +#endif +uniform sampler2D metallicReflectanceSampler; +#endif +#ifdef CLEARCOAT +#if defined(CLEARCOAT_TEXTURE) +#if CLEARCOAT_TEXTUREDIRECTUV == 1 +#define vClearCoatUV vMainUV1 +#elif CLEARCOAT_TEXTUREDIRECTUV == 2 +#define vClearCoatUV vMainUV2 +#else +varying vec2 vClearCoatUV; +#endif +#endif +#if defined(CLEARCOAT_TEXTURE_ROUGHNESS) +#if CLEARCOAT_TEXTURE_ROUGHNESSDIRECTUV == 1 +#define vClearCoatRoughnessUV vMainUV1 +#elif CLEARCOAT_TEXTURE_ROUGHNESSDIRECTUV == 2 +#define vClearCoatRoughnessUV vMainUV2 +#else +varying vec2 vClearCoatRoughnessUV; +#endif +#endif +#ifdef CLEARCOAT_TEXTURE +uniform sampler2D clearCoatSampler; +#endif +#if defined(CLEARCOAT_TEXTURE_ROUGHNESS) && !defined(CLEARCOAT_TEXTURE_ROUGHNESS_IDENTICAL) +uniform sampler2D clearCoatRoughnessSampler; +#endif +#ifdef CLEARCOAT_BUMP +#if CLEARCOAT_BUMPDIRECTUV == 1 +#define vClearCoatBumpUV vMainUV1 +#elif CLEARCOAT_BUMPDIRECTUV == 2 +#define vClearCoatBumpUV vMainUV2 +#else +varying vec2 vClearCoatBumpUV; +#endif +uniform sampler2D clearCoatBumpSampler; +#endif +#ifdef CLEARCOAT_TINT_TEXTURE +#if CLEARCOAT_TINT_TEXTUREDIRECTUV == 1 +#define vClearCoatTintUV vMainUV1 +#elif CLEARCOAT_TINT_TEXTUREDIRECTUV == 2 +#define vClearCoatTintUV vMainUV2 +#else +varying vec2 vClearCoatTintUV; +#endif +uniform sampler2D clearCoatTintSampler; +#endif +#endif +#ifdef SHEEN +#ifdef SHEEN_TEXTURE +#if SHEEN_TEXTUREDIRECTUV == 1 +#define vSheenUV vMainUV1 +#elif SHEEN_TEXTUREDIRECTUV == 2 +#define vSheenUV vMainUV2 +#else +varying vec2 vSheenUV; +#endif +#endif +#ifdef SHEEN_TEXTURE_ROUGHNESS +#if SHEEN_TEXTURE_ROUGHNESSDIRECTUV == 1 +#define vSheenRoughnessUV vMainUV1 +#elif SHEEN_TEXTURE_ROUGHNESSDIRECTUV == 2 +#define vSheenRoughnessUV vMainUV2 +#else +varying vec2 vSheenRoughnessUV; +#endif +#endif +#ifdef SHEEN_TEXTURE +uniform sampler2D sheenSampler; +#endif +#if defined(SHEEN_ROUGHNESS) && defined(SHEEN_TEXTURE_ROUGHNESS) && !defined(SHEEN_TEXTURE_ROUGHNESS_IDENTICAL) +uniform sampler2D sheenRoughnessSampler; +#endif +#endif +#ifdef ANISOTROPIC +#ifdef ANISOTROPIC_TEXTURE +#if ANISOTROPIC_TEXTUREDIRECTUV == 1 +#define vAnisotropyUV vMainUV1 +#elif ANISOTROPIC_TEXTUREDIRECTUV == 2 +#define vAnisotropyUV vMainUV2 +#else +varying vec2 vAnisotropyUV; +#endif +uniform sampler2D anisotropySampler; +#endif +#endif + +#ifdef REFLECTION +#ifdef REFLECTIONMAP_3D +#define sampleReflection(s,c) textureCube(s,c) +uniform samplerCube reflectionSampler; +#ifdef LODBASEDMICROSFURACE +#define sampleReflectionLod(s,c,l) textureCubeLodEXT(s,c,l) +#else +uniform samplerCube reflectionSamplerLow; +uniform samplerCube reflectionSamplerHigh; +#endif +#ifdef USEIRRADIANCEMAP +uniform samplerCube irradianceSampler; +#endif +#else +#define sampleReflection(s,c) texture2D(s,c) +uniform sampler2D reflectionSampler; +#ifdef LODBASEDMICROSFURACE +#define sampleReflectionLod(s,c,l) texture2DLodEXT(s,c,l) +#else +uniform sampler2D reflectionSamplerLow; +uniform sampler2D reflectionSamplerHigh; +#endif +#ifdef USEIRRADIANCEMAP +uniform sampler2D irradianceSampler; +#endif +#endif +#ifdef REFLECTIONMAP_SKYBOX +varying vec3 vPositionUVW; +#else +#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED) +varying vec3 vDirectionW; +#endif +#endif +#endif +#ifdef ENVIRONMENTBRDF +uniform sampler2D environmentBrdfSampler; +#endif + +#ifdef SUBSURFACE +#ifdef SS_REFRACTION +#ifdef SS_REFRACTIONMAP_3D +#define sampleRefraction(s,c) textureCube(s,c) +uniform samplerCube refractionSampler; +#ifdef LODBASEDMICROSFURACE +#define sampleRefractionLod(s,c,l) textureCubeLodEXT(s,c,l) +#else +uniform samplerCube refractionSamplerLow; +uniform samplerCube refractionSamplerHigh; +#endif +#else +#define sampleRefraction(s,c) texture2D(s,c) +uniform sampler2D refractionSampler; +#ifdef LODBASEDMICROSFURACE +#define sampleRefractionLod(s,c,l) texture2DLodEXT(s,c,l) +#else +uniform sampler2D refractionSamplerLow; +uniform sampler2D refractionSamplerHigh; +#endif +#endif +#endif +#ifdef SS_THICKNESSANDMASK_TEXTURE +#if SS_THICKNESSANDMASK_TEXTUREDIRECTUV == 1 +#define vThicknessUV vMainUV1 +#elif SS_THICKNESSANDMASK_TEXTUREDIRECTUV == 2 +#define vThicknessUV vMainUV2 +#else +varying vec2 vThicknessUV; +#endif +uniform sampler2D thicknessSampler; +#endif +#endif`;ze.a.IncludesShadersStore.pbrFragmentSamplersDeclaration=Ip,f(116),ze.a.IncludesShadersStore.subSurfaceScatteringFunctions=`bool testLightingForSSS(float diffusionProfile) +{ +return diffusionProfile<1.; +}`;var Dp=` + + + + + + + + + + + + + + + + + + + + + + + + + + + + +vec3 hemisphereCosSample(vec2 u) { + +float phi=2.*PI*u.x; +float cosTheta2=1.-u.y; +float cosTheta=sqrt(cosTheta2); +float sinTheta=sqrt(1.-cosTheta2); +return vec3(sinTheta*cos(phi),sinTheta*sin(phi),cosTheta); +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +vec3 hemisphereImportanceSampleDggx(vec2 u,float a) { + +float phi=2.*PI*u.x; + +float cosTheta2=(1.-u.y)/(1.+(a+1.)*((a-1.)*u.y)); +float cosTheta=sqrt(cosTheta2); +float sinTheta=sqrt(1.-cosTheta2); +return vec3(sinTheta*cos(phi),sinTheta*sin(phi),cosTheta); +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +vec3 hemisphereImportanceSampleDCharlie(vec2 u,float a) { + +float phi=2.*PI*u.x; +float sinTheta=pow(u.y,a/(2.*a+1.)); +float cosTheta=sqrt(1.-sinTheta*sinTheta); +return vec3(sinTheta*cos(phi),sinTheta*sin(phi),cosTheta); +}`;ze.a.IncludesShadersStore.importanceSampling=Dp;var Lp=` +#define RECIPROCAL_PI2 0.15915494 +#define RECIPROCAL_PI 0.31830988618 + +#define MINIMUMVARIANCE 0.0005 +float convertRoughnessToAverageSlope(float roughness) +{ + +return square(roughness)+MINIMUMVARIANCE; +} +float fresnelGrazingReflectance(float reflectance0) { + + +float reflectance90=saturate(reflectance0*25.0); +return reflectance90; +} +vec2 getAARoughnessFactors(vec3 normalVector) { +#ifdef SPECULARAA +vec3 nDfdx=dFdx(normalVector.xyz); +vec3 nDfdy=dFdy(normalVector.xyz); +float slopeSquare=max(dot(nDfdx,nDfdx),dot(nDfdy,nDfdy)); + +float geometricRoughnessFactor=pow(saturate(slopeSquare),0.333); + +float geometricAlphaGFactor=sqrt(slopeSquare); + +geometricAlphaGFactor*=0.75; +return vec2(geometricRoughnessFactor,geometricAlphaGFactor); +#else +return vec2(0.); +#endif +} +#ifdef ANISOTROPIC + + +vec2 getAnisotropicRoughness(float alphaG,float anisotropy) { +float alphaT=max(alphaG*(1.0+anisotropy),MINIMUMVARIANCE); +float alphaB=max(alphaG*(1.0-anisotropy),MINIMUMVARIANCE); +return vec2(alphaT,alphaB); +} + + +vec3 getAnisotropicBentNormals(const vec3 T,const vec3 B,const vec3 N,const vec3 V,float anisotropy) { +vec3 anisotropicFrameDirection=anisotropy>=0.0 ? B : T; +vec3 anisotropicFrameTangent=cross(normalize(anisotropicFrameDirection),V); +vec3 anisotropicFrameNormal=cross(anisotropicFrameTangent,anisotropicFrameDirection); +vec3 anisotropicNormal=normalize(mix(N,anisotropicFrameNormal,abs(anisotropy))); +return anisotropicNormal; + +} +#endif +#if defined(CLEARCOAT) || defined(SS_REFRACTION) + + + +vec3 cocaLambert(vec3 alpha,float distance) { +return exp(-alpha*distance); +} + +vec3 cocaLambert(float NdotVRefract,float NdotLRefract,vec3 alpha,float thickness) { +return cocaLambert(alpha,(thickness*((NdotLRefract+NdotVRefract)/(NdotLRefract*NdotVRefract)))); +} + +vec3 computeColorAtDistanceInMedia(vec3 color,float distance) { +return -log(color)/distance; +} +vec3 computeClearCoatAbsorption(float NdotVRefract,float NdotLRefract,vec3 clearCoatColor,float clearCoatThickness,float clearCoatIntensity) { +vec3 clearCoatAbsorption=mix(vec3(1.0), +cocaLambert(NdotVRefract,NdotLRefract,clearCoatColor,clearCoatThickness), +clearCoatIntensity); +return clearCoatAbsorption; +} +#endif + + + + +#ifdef MICROSURFACEAUTOMATIC +float computeDefaultMicroSurface(float microSurface,vec3 reflectivityColor) +{ +const float kReflectivityNoAlphaWorkflow_SmoothnessMax=0.95; +float reflectivityLuminance=getLuminance(reflectivityColor); +float reflectivityLuma=sqrt(reflectivityLuminance); +microSurface=reflectivityLuma*kReflectivityNoAlphaWorkflow_SmoothnessMax; +return microSurface; +} +#endif`;ze.a.IncludesShadersStore.pbrHelperFunctions=Lp;var Np=`#ifdef USESPHERICALFROMREFLECTIONMAP +#ifdef SPHERICAL_HARMONICS +uniform vec3 vSphericalL00; +uniform vec3 vSphericalL1_1; +uniform vec3 vSphericalL10; +uniform vec3 vSphericalL11; +uniform vec3 vSphericalL2_2; +uniform vec3 vSphericalL2_1; +uniform vec3 vSphericalL20; +uniform vec3 vSphericalL21; +uniform vec3 vSphericalL22; + + + + + + + +vec3 computeEnvironmentIrradiance(vec3 normal) { +return vSphericalL00 ++vSphericalL1_1*(normal.y) ++vSphericalL10*(normal.z) ++vSphericalL11*(normal.x) ++vSphericalL2_2*(normal.y*normal.x) ++vSphericalL2_1*(normal.y*normal.z) ++vSphericalL20*((3.0*normal.z*normal.z)-1.0) ++vSphericalL21*(normal.z*normal.x) ++vSphericalL22*(normal.x*normal.x-(normal.y*normal.y)); +} +#else +uniform vec3 vSphericalX; +uniform vec3 vSphericalY; +uniform vec3 vSphericalZ; +uniform vec3 vSphericalXX_ZZ; +uniform vec3 vSphericalYY_ZZ; +uniform vec3 vSphericalZZ; +uniform vec3 vSphericalXY; +uniform vec3 vSphericalYZ; +uniform vec3 vSphericalZX; + +vec3 computeEnvironmentIrradiance(vec3 normal) { + + + + + + + + + +float Nx=normal.x; +float Ny=normal.y; +float Nz=normal.z; +vec3 C1=vSphericalZZ.rgb; +vec3 Cx=vSphericalX.rgb; +vec3 Cy=vSphericalY.rgb; +vec3 Cz=vSphericalZ.rgb; +vec3 Cxx_zz=vSphericalXX_ZZ.rgb; +vec3 Cyy_zz=vSphericalYY_ZZ.rgb; +vec3 Cxy=vSphericalXY.rgb; +vec3 Cyz=vSphericalYZ.rgb; +vec3 Czx=vSphericalZX.rgb; +vec3 a1=Cyy_zz*Ny+Cy; +vec3 a2=Cyz*Nz+a1; +vec3 b1=Czx*Nz+Cx; +vec3 b2=Cxy*Ny+b1; +vec3 b3=Cxx_zz*Nx+b2; +vec3 t1=Cz*Nz+C1; +vec3 t2=a2*Ny+t1; +vec3 t3=b3*Nx+t2; +return t3; +} +#endif +#endif`;ze.a.IncludesShadersStore.harmonicsFunctions=Np;var wp=` +struct preLightingInfo +{ + +vec3 lightOffset; +float lightDistanceSquared; +float lightDistance; + +float attenuation; + +vec3 L; +vec3 H; +float NdotV; +float NdotLUnclamped; +float NdotL; +float VdotH; +float roughness; +}; +preLightingInfo computePointAndSpotPreLightingInfo(vec4 lightData,vec3 V,vec3 N) { +preLightingInfo result; + +result.lightOffset=lightData.xyz-vPositionW; +result.lightDistanceSquared=dot(result.lightOffset,result.lightOffset); + +result.lightDistance=sqrt(result.lightDistanceSquared); + +result.L=normalize(result.lightOffset); +result.H=normalize(V+result.L); +result.VdotH=saturate(dot(V,result.H)); +result.NdotLUnclamped=dot(N,result.L); +result.NdotL=saturateEps(result.NdotLUnclamped); +return result; +} +preLightingInfo computeDirectionalPreLightingInfo(vec4 lightData,vec3 V,vec3 N) { +preLightingInfo result; + +result.lightDistance=length(-lightData.xyz); + +result.L=normalize(-lightData.xyz); +result.H=normalize(V+result.L); +result.VdotH=saturate(dot(V,result.H)); +result.NdotLUnclamped=dot(N,result.L); +result.NdotL=saturateEps(result.NdotLUnclamped); +return result; +} +preLightingInfo computeHemisphericPreLightingInfo(vec4 lightData,vec3 V,vec3 N) { +preLightingInfo result; + + +result.NdotL=dot(N,lightData.xyz)*0.5+0.5; +result.NdotL=saturateEps(result.NdotL); +result.NdotLUnclamped=result.NdotL; +#ifdef SPECULARTERM +result.L=normalize(lightData.xyz); +result.H=normalize(V+result.L); +result.VdotH=saturate(dot(V,result.H)); +#endif +return result; +}`;ze.a.IncludesShadersStore.pbrDirectLightingSetupFunctions=wp;var Fp=`float computeDistanceLightFalloff_Standard(vec3 lightOffset,float range) +{ +return max(0.,1.0-length(lightOffset)/range); +} +float computeDistanceLightFalloff_Physical(float lightDistanceSquared) +{ +return 1.0/maxEps(lightDistanceSquared); +} +float computeDistanceLightFalloff_GLTF(float lightDistanceSquared,float inverseSquaredRange) +{ +float lightDistanceFalloff=1.0/maxEps(lightDistanceSquared); +float factor=lightDistanceSquared*inverseSquaredRange; +float attenuation=saturate(1.0-factor*factor); +attenuation*=attenuation; + +lightDistanceFalloff*=attenuation; +return lightDistanceFalloff; +} +float computeDistanceLightFalloff(vec3 lightOffset,float lightDistanceSquared,float range,float inverseSquaredRange) +{ +#ifdef USEPHYSICALLIGHTFALLOFF +return computeDistanceLightFalloff_Physical(lightDistanceSquared); +#elif defined(USEGLTFLIGHTFALLOFF) +return computeDistanceLightFalloff_GLTF(lightDistanceSquared,inverseSquaredRange); +#else +return computeDistanceLightFalloff_Standard(lightOffset,range); +#endif +} +float computeDirectionalLightFalloff_Standard(vec3 lightDirection,vec3 directionToLightCenterW,float cosHalfAngle,float exponent) +{ +float falloff=0.0; +float cosAngle=maxEps(dot(-lightDirection,directionToLightCenterW)); +if (cosAngle>=cosHalfAngle) +{ +falloff=max(0.,pow(cosAngle,exponent)); +} +return falloff; +} +float computeDirectionalLightFalloff_Physical(vec3 lightDirection,vec3 directionToLightCenterW,float cosHalfAngle) +{ +const float kMinusLog2ConeAngleIntensityRatio=6.64385618977; + + + + + +float concentrationKappa=kMinusLog2ConeAngleIntensityRatio/(1.0-cosHalfAngle); + + +vec4 lightDirectionSpreadSG=vec4(-lightDirection*concentrationKappa,-concentrationKappa); +float falloff=exp2(dot(vec4(directionToLightCenterW,1.0),lightDirectionSpreadSG)); +return falloff; +} +float computeDirectionalLightFalloff_GLTF(vec3 lightDirection,vec3 directionToLightCenterW,float lightAngleScale,float lightAngleOffset) +{ + + + +float cd=dot(-lightDirection,directionToLightCenterW); +float falloff=saturate(cd*lightAngleScale+lightAngleOffset); + +falloff*=falloff; +return falloff; +} +float computeDirectionalLightFalloff(vec3 lightDirection,vec3 directionToLightCenterW,float cosHalfAngle,float exponent,float lightAngleScale,float lightAngleOffset) +{ +#ifdef USEPHYSICALLIGHTFALLOFF +return computeDirectionalLightFalloff_Physical(lightDirection,directionToLightCenterW,cosHalfAngle); +#elif defined(USEGLTFLIGHTFALLOFF) +return computeDirectionalLightFalloff_GLTF(lightDirection,directionToLightCenterW,lightAngleScale,lightAngleOffset); +#else +return computeDirectionalLightFalloff_Standard(lightDirection,directionToLightCenterW,cosHalfAngle,exponent); +#endif +}`;ze.a.IncludesShadersStore.pbrDirectLightingFalloffFunctions=Fp;var Bp=` +#define FRESNEL_MAXIMUM_ON_ROUGH 0.25 + + + + +#ifdef MS_BRDF_ENERGY_CONSERVATION + + +vec3 getEnergyConservationFactor(const vec3 specularEnvironmentR0,const vec3 environmentBrdf) { +return 1.0+specularEnvironmentR0*(1.0/environmentBrdf.y-1.0); +} +#endif +#ifdef ENVIRONMENTBRDF +vec3 getBRDFLookup(float NdotV,float perceptualRoughness) { + +vec2 UV=vec2(NdotV,perceptualRoughness); + +vec4 brdfLookup=texture2D(environmentBrdfSampler,UV); +#ifdef ENVIRONMENTBRDF_RGBD +brdfLookup.rgb=fromRGBD(brdfLookup.rgba); +#endif +return brdfLookup.rgb; +} +vec3 getReflectanceFromBRDFLookup(const vec3 specularEnvironmentR0,const vec3 specularEnvironmentR90,const vec3 environmentBrdf) { +#ifdef BRDF_V_HEIGHT_CORRELATED +vec3 reflectance=(specularEnvironmentR90-specularEnvironmentR0)*environmentBrdf.x+specularEnvironmentR0*environmentBrdf.y; + +#else +vec3 reflectance=specularEnvironmentR0*environmentBrdf.x+specularEnvironmentR90*environmentBrdf.y; +#endif +return reflectance; +} +vec3 getReflectanceFromBRDFLookup(const vec3 specularEnvironmentR0,const vec3 environmentBrdf) { +#ifdef BRDF_V_HEIGHT_CORRELATED +vec3 reflectance=mix(environmentBrdf.xxx,environmentBrdf.yyy,specularEnvironmentR0); +#else +vec3 reflectance=specularEnvironmentR0*environmentBrdf.x+environmentBrdf.y; +#endif +return reflectance; +} +#endif + +#if !defined(ENVIRONMENTBRDF) || defined(REFLECTIONMAP_SKYBOX) || defined(ALPHAFRESNEL) +vec3 getReflectanceFromAnalyticalBRDFLookup_Jones(float VdotN,vec3 reflectance0,vec3 reflectance90,float smoothness) +{ + +float weight=mix(FRESNEL_MAXIMUM_ON_ROUGH,1.0,smoothness); +return reflectance0+weight*(reflectance90-reflectance0)*pow5(saturate(1.0-VdotN)); +} +#endif +#if defined(SHEEN) && defined(ENVIRONMENTBRDF) + +vec3 getSheenReflectanceFromBRDFLookup(const vec3 reflectance0,const vec3 environmentBrdf) { +vec3 sheenEnvironmentReflectance=reflectance0*environmentBrdf.b; +return sheenEnvironmentReflectance; +} +#endif + + + + + + + + + + + + + + + + + + + + + + + + +vec3 fresnelSchlickGGX(float VdotH,vec3 reflectance0,vec3 reflectance90) +{ +return reflectance0+(reflectance90-reflectance0)*pow5(1.0-VdotH); +} +float fresnelSchlickGGX(float VdotH,float reflectance0,float reflectance90) +{ +return reflectance0+(reflectance90-reflectance0)*pow5(1.0-VdotH); +} +#ifdef CLEARCOAT + + + + + +vec3 getR0RemappedForClearCoat(vec3 f0) { +#ifdef CLEARCOAT_DEFAULTIOR +#ifdef MOBILE +return saturate(f0*(f0*0.526868+0.529324)-0.0482256); +#else +return saturate(f0*(f0*(0.941892-0.263008*f0)+0.346479)-0.0285998); +#endif +#else +vec3 s=sqrt(f0); +vec3 t=(vClearCoatRefractionParams.z+vClearCoatRefractionParams.w*s)/(vClearCoatRefractionParams.w+vClearCoatRefractionParams.z*s); +return t*t; +#endif +} +#endif + + + + + + +float normalDistributionFunction_TrowbridgeReitzGGX(float NdotH,float alphaG) +{ + + + +float a2=square(alphaG); +float d=NdotH*NdotH*(a2-1.0)+1.0; +return a2/(PI*d*d); +} +#ifdef SHEEN + + +float normalDistributionFunction_CharlieSheen(float NdotH,float alphaG) +{ +float invR=1./alphaG; +float cos2h=NdotH*NdotH; +float sin2h=1.-cos2h; +return (2.+invR)*pow(sin2h,invR*.5)/(2.*PI); +} +#endif +#ifdef ANISOTROPIC + + +float normalDistributionFunction_BurleyGGX_Anisotropic(float NdotH,float TdotH,float BdotH,const vec2 alphaTB) { +float a2=alphaTB.x*alphaTB.y; +vec3 v=vec3(alphaTB.y*TdotH,alphaTB.x*BdotH,a2*NdotH); +float v2=dot(v,v); +float w2=a2/v2; +return a2*w2*w2*RECIPROCAL_PI; +} +#endif + + + + +#ifdef BRDF_V_HEIGHT_CORRELATED + + + +float smithVisibility_GGXCorrelated(float NdotL,float NdotV,float alphaG) { +#ifdef MOBILE + +float GGXV=NdotL*(NdotV*(1.0-alphaG)+alphaG); +float GGXL=NdotV*(NdotL*(1.0-alphaG)+alphaG); +return 0.5/(GGXV+GGXL); +#else +float a2=alphaG*alphaG; +float GGXV=NdotL*sqrt(NdotV*(NdotV-a2*NdotV)+a2); +float GGXL=NdotV*sqrt(NdotL*(NdotL-a2*NdotL)+a2); +return 0.5/(GGXV+GGXL); +#endif +} +#else + + + + + + + + + + + + + + + +float smithVisibilityG1_TrowbridgeReitzGGXFast(float dot,float alphaG) +{ +#ifdef MOBILE + +return 1.0/(dot+alphaG+(1.0-alphaG)*dot )); +#else +float alphaSquared=alphaG*alphaG; +return 1.0/(dot+sqrt(alphaSquared+(1.0-alphaSquared)*dot*dot)); +#endif +} +float smithVisibility_TrowbridgeReitzGGXFast(float NdotL,float NdotV,float alphaG) +{ +float visibility=smithVisibilityG1_TrowbridgeReitzGGXFast(NdotL,alphaG)*smithVisibilityG1_TrowbridgeReitzGGXFast(NdotV,alphaG); + +return visibility; +} +#endif +#ifdef ANISOTROPIC + + +float smithVisibility_GGXCorrelated_Anisotropic(float NdotL,float NdotV,float TdotV,float BdotV,float TdotL,float BdotL,const vec2 alphaTB) { +float lambdaV=NdotL*length(vec3(alphaTB.x*TdotV,alphaTB.y*BdotV,NdotV)); +float lambdaL=NdotV*length(vec3(alphaTB.x*TdotL,alphaTB.y*BdotL,NdotL)); +float v=0.5/(lambdaV+lambdaL); +return v; +} +#endif +#ifdef CLEARCOAT +float visibility_Kelemen(float VdotH) { + + + +return 0.25/(VdotH*VdotH); +} +#endif +#ifdef SHEEN + + + +float visibility_Ashikhmin(float NdotL,float NdotV) +{ +return 1./(4.*(NdotL+NdotV-NdotL*NdotV)); +} + +#endif + + + + + + + +float diffuseBRDF_Burley(float NdotL,float NdotV,float VdotH,float roughness) { + + +float diffuseFresnelNV=pow5(saturateEps(1.0-NdotL)); +float diffuseFresnelNL=pow5(saturateEps(1.0-NdotV)); +float diffuseFresnel90=0.5+2.0*VdotH*VdotH*roughness; +float fresnel = +(1.0+(diffuseFresnel90-1.0)*diffuseFresnelNL) * +(1.0+(diffuseFresnel90-1.0)*diffuseFresnelNV); +return fresnel/PI; +} +#ifdef SS_TRANSLUCENCY + + +vec3 transmittanceBRDF_Burley(const vec3 tintColor,const vec3 diffusionDistance,float thickness) { +vec3 S=1./maxEps(diffusionDistance); +vec3 temp=exp((-0.333333333*thickness)*S); +return tintColor.rgb*0.25*(temp*temp*temp+3.0*temp); +} + + +float computeWrappedDiffuseNdotL(float NdotL,float w) { +float t=1.0+w; +float invt2=1.0/square(t); +return saturate((NdotL+w)*invt2); +} +#endif +`;ze.a.IncludesShadersStore.pbrBRDFFunctions=Bp;var Up=`#ifdef NUM_SAMPLES +#if NUM_SAMPLES>0 +#ifdef WEBGL2 + + +float radicalInverse_VdC(uint bits) +{ +bits=(bits << 16u) | (bits >> 16u); +bits=((bits & 0x55555555u) << 1u) | ((bits & 0xAAAAAAAAu) >> 1u); +bits=((bits & 0x33333333u) << 2u) | ((bits & 0xCCCCCCCCu) >> 2u); +bits=((bits & 0x0F0F0F0Fu) << 4u) | ((bits & 0xF0F0F0F0u) >> 4u); +bits=((bits & 0x00FF00FFu) << 8u) | ((bits & 0xFF00FF00u) >> 8u); +return float(bits)*2.3283064365386963e-10; +} +vec2 hammersley(uint i,uint N) +{ +return vec2(float(i)/float(N),radicalInverse_VdC(i)); +} +#else +float vanDerCorpus(int n,int base) +{ +float invBase=1.0/float(base); +float denom=1.0; +float result=0.0; +for(int i=0; i<32; ++i) +{ +if(n>0) +{ +denom=mod(float(n),2.0); +result+=denom*invBase; +invBase=invBase/2.0; +n=int(float(n)/2.0); +} +} +return result; +} +vec2 hammersley(int i,int N) +{ +return vec2(float(i)/float(N),vanDerCorpus(i,2)); +} +#endif +float log4(float x) { +return log2(x)/2.; +} +const float NUM_SAMPLES_FLOAT=float(NUM_SAMPLES); +const float NUM_SAMPLES_FLOAT_INVERSED=1./NUM_SAMPLES_FLOAT; +const float K=4.; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#define inline +vec3 irradiance(samplerCube inputTexture,vec3 inputN,vec2 filteringInfo) +{ +vec3 n=normalize(inputN); +vec3 result=vec3(0.0); +vec3 tangent=abs(n.z)<0.999 ? vec3(0.,0.,1.) : vec3(1.,0.,0.); +tangent=normalize(cross(tangent,n)); +vec3 bitangent=cross(n,tangent); +mat3 tbn=mat3(tangent,bitangent,n); +float maxLevel=filteringInfo.y; +float dim0=filteringInfo.x; +float omegaP=(4.*PI)/(6.*dim0*dim0); +#ifdef WEBGL2 +for(uint i=0u; i0.) { +float pdf_inversed=PI/NoL; +float omegaS=NUM_SAMPLES_FLOAT_INVERSED*pdf_inversed; +float l=log4(omegaS)-log4(omegaP)+log4(K); +float mipLevel=clamp(l,0.0,maxLevel); +vec3 c=textureCubeLodEXT(inputTexture,tbn*Ls,mipLevel).rgb; +#ifdef GAMMA_INPUT +c=toLinearSpace(c); +#endif +result+=c; +} +} +result=result*NUM_SAMPLES_FLOAT_INVERSED; +return result; +} +#define inline +vec3 radiance(float alphaG,samplerCube inputTexture,vec3 inputN,vec2 filteringInfo) +{ +vec3 n=normalize(inputN); +if (alphaG == 0.) { +vec3 c=textureCube(inputTexture,n).rgb; +#ifdef GAMMA_INPUT +c=toLinearSpace(c); +#endif +return c; +} +vec3 result=vec3(0.); +vec3 tangent=abs(n.z)<0.999 ? vec3(0.,0.,1.) : vec3(1.,0.,0.); +tangent=normalize(cross(tangent,n)); +vec3 bitangent=cross(n,tangent); +mat3 tbn=mat3(tangent,bitangent,n); +float maxLevel=filteringInfo.y; +float dim0=filteringInfo.x; +float omegaP=(4.*PI)/(6.*dim0*dim0); +float weight=0.; +#ifdef WEBGL2 +for(uint i=0u; i0.) { +float pdf_inversed=4./normalDistributionFunction_TrowbridgeReitzGGX(NoH,alphaG); +float omegaS=NUM_SAMPLES_FLOAT_INVERSED*pdf_inversed; +float l=log4(omegaS)-log4(omegaP)+log4(K); +float mipLevel=clamp(float(l),0.0,maxLevel); +weight+=NoL; +vec3 c=textureCubeLodEXT(inputTexture,tbn*L,mipLevel).rgb; +#ifdef GAMMA_INPUT +c=toLinearSpace(c); +#endif +result+=c*NoL; +} +} +result=result/weight; +return result; +} +#endif +#endif`;ze.a.IncludesShadersStore.hdrFilteringFunctions=Up;var Vp=`#define CLEARCOATREFLECTANCE90 1.0 + +struct lightingInfo +{ +vec3 diffuse; +#ifdef SPECULARTERM +vec3 specular; +#endif +#ifdef CLEARCOAT + + +vec4 clearCoat; +#endif +#ifdef SHEEN +vec3 sheen; +#endif +}; + +float adjustRoughnessFromLightProperties(float roughness,float lightRadius,float lightDistance) { +#if defined(USEPHYSICALLIGHTFALLOFF) || defined(USEGLTFLIGHTFALLOFF) + +float lightRoughness=lightRadius/lightDistance; + +float totalRoughness=saturate(lightRoughness+roughness); +return totalRoughness; +#else +return roughness; +#endif +} +vec3 computeHemisphericDiffuseLighting(preLightingInfo info,vec3 lightColor,vec3 groundColor) { +return mix(groundColor,lightColor,info.NdotL); +} +vec3 computeDiffuseLighting(preLightingInfo info,vec3 lightColor) { +float diffuseTerm=diffuseBRDF_Burley(info.NdotL,info.NdotV,info.VdotH,info.roughness); +return diffuseTerm*info.attenuation*info.NdotL*lightColor; +} +#define inline +vec3 computeProjectionTextureDiffuseLighting(sampler2D projectionLightSampler,mat4 textureProjectionMatrix){ +vec4 strq=textureProjectionMatrix*vec4(vPositionW,1.0); +strq/=strq.w; +vec3 textureColor=texture2D(projectionLightSampler,strq.xy).rgb; +return toLinearSpace(textureColor); +} +#ifdef SS_TRANSLUCENCY +vec3 computeDiffuseAndTransmittedLighting(preLightingInfo info,vec3 lightColor,vec3 transmittance) { +float NdotL=absEps(info.NdotLUnclamped); + +float wrapNdotL=computeWrappedDiffuseNdotL(NdotL,0.02); + +float trAdapt=step(0.,info.NdotLUnclamped); +vec3 transmittanceNdotL=mix(transmittance*wrapNdotL,vec3(wrapNdotL),trAdapt); +float diffuseTerm=diffuseBRDF_Burley(NdotL,info.NdotV,info.VdotH,info.roughness); +return diffuseTerm*transmittanceNdotL*info.attenuation*lightColor; +} +#endif +#ifdef SPECULARTERM +vec3 computeSpecularLighting(preLightingInfo info,vec3 N,vec3 reflectance0,vec3 reflectance90,float geometricRoughnessFactor,vec3 lightColor) { +float NdotH=saturateEps(dot(N,info.H)); +float roughness=max(info.roughness,geometricRoughnessFactor); +float alphaG=convertRoughnessToAverageSlope(roughness); +vec3 fresnel=fresnelSchlickGGX(info.VdotH,reflectance0,reflectance90); +float distribution=normalDistributionFunction_TrowbridgeReitzGGX(NdotH,alphaG); +#ifdef BRDF_V_HEIGHT_CORRELATED +float smithVisibility=smithVisibility_GGXCorrelated(info.NdotL,info.NdotV,alphaG); +#else +float smithVisibility=smithVisibility_TrowbridgeReitzGGXFast(info.NdotL,info.NdotV,alphaG); +#endif +vec3 specTerm=fresnel*distribution*smithVisibility; +return specTerm*info.attenuation*info.NdotL*lightColor; +} +#endif +#ifdef ANISOTROPIC +vec3 computeAnisotropicSpecularLighting(preLightingInfo info,vec3 V,vec3 N,vec3 T,vec3 B,float anisotropy,vec3 reflectance0,vec3 reflectance90,float geometricRoughnessFactor,vec3 lightColor) { +float NdotH=saturateEps(dot(N,info.H)); +float TdotH=dot(T,info.H); +float BdotH=dot(B,info.H); +float TdotV=dot(T,V); +float BdotV=dot(B,V); +float TdotL=dot(T,info.L); +float BdotL=dot(B,info.L); +float alphaG=convertRoughnessToAverageSlope(info.roughness); +vec2 alphaTB=getAnisotropicRoughness(alphaG,anisotropy); +alphaTB=max(alphaTB,square(geometricRoughnessFactor)); +vec3 fresnel=fresnelSchlickGGX(info.VdotH,reflectance0,reflectance90); +float distribution=normalDistributionFunction_BurleyGGX_Anisotropic(NdotH,TdotH,BdotH,alphaTB); +float smithVisibility=smithVisibility_GGXCorrelated_Anisotropic(info.NdotL,info.NdotV,TdotV,BdotV,TdotL,BdotL,alphaTB); +vec3 specTerm=fresnel*distribution*smithVisibility; +return specTerm*info.attenuation*info.NdotL*lightColor; +} +#endif +#ifdef CLEARCOAT +vec4 computeClearCoatLighting(preLightingInfo info,vec3 Ncc,float geometricRoughnessFactor,float clearCoatIntensity,vec3 lightColor) { +float NccdotL=saturateEps(dot(Ncc,info.L)); +float NccdotH=saturateEps(dot(Ncc,info.H)); +float clearCoatRoughness=max(info.roughness,geometricRoughnessFactor); +float alphaG=convertRoughnessToAverageSlope(clearCoatRoughness); +float fresnel=fresnelSchlickGGX(info.VdotH,vClearCoatRefractionParams.x,CLEARCOATREFLECTANCE90); +fresnel*=clearCoatIntensity; +float distribution=normalDistributionFunction_TrowbridgeReitzGGX(NccdotH,alphaG); +float kelemenVisibility=visibility_Kelemen(info.VdotH); +float clearCoatTerm=fresnel*distribution*kelemenVisibility; +return vec4( +clearCoatTerm*info.attenuation*NccdotL*lightColor, +1.0-fresnel +); +} +vec3 computeClearCoatLightingAbsorption(float NdotVRefract,vec3 L,vec3 Ncc,vec3 clearCoatColor,float clearCoatThickness,float clearCoatIntensity) { +vec3 LRefract=-refract(L,Ncc,vClearCoatRefractionParams.y); +float NdotLRefract=saturateEps(dot(Ncc,LRefract)); +vec3 absorption=computeClearCoatAbsorption(NdotVRefract,NdotLRefract,clearCoatColor,clearCoatThickness,clearCoatIntensity); +return absorption; +} +#endif +#ifdef SHEEN +vec3 computeSheenLighting(preLightingInfo info,vec3 N,vec3 reflectance0,vec3 reflectance90,float geometricRoughnessFactor,vec3 lightColor) { +float NdotH=saturateEps(dot(N,info.H)); +float roughness=max(info.roughness,geometricRoughnessFactor); +float alphaG=convertRoughnessToAverageSlope(roughness); + + +float fresnel=1.; +float distribution=normalDistributionFunction_CharlieSheen(NdotH,alphaG); + +float visibility=visibility_Ashikhmin(info.NdotL,info.NdotV); + +float sheenTerm=fresnel*distribution*visibility; +return sheenTerm*info.attenuation*info.NdotL*lightColor; +} +#endif +`;ze.a.IncludesShadersStore.pbrDirectLightingFunctions=Vp;var kp=`#if defined(REFLECTION) || defined(SS_REFRACTION) +float getLodFromAlphaG(float cubeMapDimensionPixels,float microsurfaceAverageSlope) { +float microsurfaceAverageSlopeTexels=cubeMapDimensionPixels*microsurfaceAverageSlope; +float lod=log2(microsurfaceAverageSlopeTexels); +return lod; +} +float getLinearLodFromRoughness(float cubeMapDimensionPixels,float roughness) { +float lod=log2(cubeMapDimensionPixels)*roughness; +return lod; +} +#endif +#if defined(ENVIRONMENTBRDF) && defined(RADIANCEOCCLUSION) +float environmentRadianceOcclusion(float ambientOcclusion,float NdotVUnclamped) { + + +float temp=NdotVUnclamped+ambientOcclusion; +return saturate(square(temp)-1.0+ambientOcclusion); +} +#endif +#if defined(ENVIRONMENTBRDF) && defined(HORIZONOCCLUSION) +float environmentHorizonOcclusion(vec3 view,vec3 normal,vec3 geometricNormal) { + +vec3 reflection=reflect(view,normal); +float temp=saturate(1.0+1.1*dot(reflection,geometricNormal)); +return square(temp); +} +#endif + + + + +#if defined(LODINREFLECTIONALPHA) || defined(SS_LODINREFRACTIONALPHA) + + +#define UNPACK_LOD(x) (1.0-x)*255.0 +float getLodFromAlphaG(float cubeMapDimensionPixels,float alphaG,float NdotV) { +float microsurfaceAverageSlope=alphaG; + + + + + + +microsurfaceAverageSlope*=sqrt(abs(NdotV)); +return getLodFromAlphaG(cubeMapDimensionPixels,microsurfaceAverageSlope); +} +#endif`;ze.a.IncludesShadersStore.pbrIBLFunctions=kp,f(132),f(133);var Gp=`struct albedoOpacityOutParams +{ +vec3 surfaceAlbedo; +float alpha; +}; +#define pbr_inline +void albedoOpacityBlock( +const in vec4 vAlbedoColor, +#ifdef ALBEDO +const in vec4 albedoTexture, +const in vec2 albedoInfos, +#endif +#ifdef OPACITY +const in vec4 opacityMap, +const in vec2 vOpacityInfos, +#endif +#ifdef DETAIL +const in vec4 detailColor, +const in vec4 vDetailInfos, +#endif +out albedoOpacityOutParams outParams +) +{ + +vec3 surfaceAlbedo=vAlbedoColor.rgb; +float alpha=vAlbedoColor.a; +#ifdef ALBEDO +#if defined(ALPHAFROMALBEDO) || defined(ALPHATEST) +alpha*=albedoTexture.a; +#endif +#ifdef GAMMAALBEDO +surfaceAlbedo*=toLinearSpace(albedoTexture.rgb); +#else +surfaceAlbedo*=albedoTexture.rgb; +#endif +surfaceAlbedo*=albedoInfos.y; +#endif +#ifdef VERTEXCOLOR +surfaceAlbedo*=vColor.rgb; +#endif +#ifdef DETAIL +float detailAlbedo=2.0*mix(0.5,detailColor.r,vDetailInfos.y); +surfaceAlbedo.rgb=surfaceAlbedo.rgb*detailAlbedo*detailAlbedo; +#endif +#define CUSTOM_FRAGMENT_UPDATE_ALBEDO + +#ifdef OPACITY +#ifdef OPACITYRGB +alpha=getLuminance(opacityMap.rgb); +#else +alpha*=opacityMap.a; +#endif +alpha*=vOpacityInfos.y; +#endif +#ifdef VERTEXALPHA +alpha*=vColor.a; +#endif +#if !defined(SS_LINKREFRACTIONTOTRANSPARENCY) && !defined(ALPHAFRESNEL) +#ifdef ALPHATEST +if (alpha0 +vec4 surfaceMetallicColorMap; +vec4 surfaceReflectivityColorMap; +vec2 metallicRoughness; +vec3 metallicF0; +#endif +}; +#define pbr_inline +void reflectivityBlock( +const in vec4 vReflectivityColor, +#ifdef METALLICWORKFLOW +const in vec3 surfaceAlbedo, +const in vec4 metallicReflectanceFactors, +#endif +#ifdef REFLECTIVITY +const in vec3 reflectivityInfos, +const in vec4 surfaceMetallicOrReflectivityColorMap, +#endif +#if defined(METALLICWORKFLOW) && defined(REFLECTIVITY) && defined(AOSTOREINMETALMAPRED) +const in vec3 ambientOcclusionColorIn, +#endif +#ifdef MICROSURFACEMAP +const in vec4 microSurfaceTexel, +#endif +#ifdef DETAIL +const in vec4 detailColor, +const in vec4 vDetailInfos, +#endif +out reflectivityOutParams outParams +) +{ +float microSurface=vReflectivityColor.a; +vec3 surfaceReflectivityColor=vReflectivityColor.rgb; +#ifdef METALLICWORKFLOW +vec2 metallicRoughness=surfaceReflectivityColor.rg; +#ifdef REFLECTIVITY +#if DEBUGMODE>0 +outParams.surfaceMetallicColorMap=surfaceMetallicOrReflectivityColorMap; +#endif +#ifdef AOSTOREINMETALMAPRED +vec3 aoStoreInMetalMap=vec3(surfaceMetallicOrReflectivityColorMap.r,surfaceMetallicOrReflectivityColorMap.r,surfaceMetallicOrReflectivityColorMap.r); +outParams.ambientOcclusionColor=mix(ambientOcclusionColorIn,aoStoreInMetalMap,reflectivityInfos.z); +#endif +#ifdef METALLNESSSTOREINMETALMAPBLUE +metallicRoughness.r*=surfaceMetallicOrReflectivityColorMap.b; +#else +metallicRoughness.r*=surfaceMetallicOrReflectivityColorMap.r; +#endif +#ifdef ROUGHNESSSTOREINMETALMAPALPHA +metallicRoughness.g*=surfaceMetallicOrReflectivityColorMap.a; +#else +#ifdef ROUGHNESSSTOREINMETALMAPGREEN +metallicRoughness.g*=surfaceMetallicOrReflectivityColorMap.g; +#endif +#endif +#endif +#ifdef DETAIL +float detailRoughness=mix(0.5,detailColor.b,vDetailInfos.w); +float loLerp=mix(0.,metallicRoughness.g,detailRoughness*2.); +float hiLerp=mix(metallicRoughness.g,1.,(detailRoughness-0.5)*2.); +metallicRoughness.g=mix(loLerp,hiLerp,step(detailRoughness,0.5)); +#endif +#ifdef MICROSURFACEMAP +metallicRoughness.g*=microSurfaceTexel.r; +#endif +#if DEBUGMODE>0 +outParams.metallicRoughness=metallicRoughness; +#endif +#define CUSTOM_FRAGMENT_UPDATE_METALLICROUGHNESS + +microSurface=1.0-metallicRoughness.g; + +vec3 baseColor=surfaceAlbedo; +#ifdef FROSTBITE_REFLECTANCE + + + + + + +outParams.surfaceAlbedo=baseColor.rgb*(1.0-metallicRoughness.r); + +surfaceReflectivityColor=mix(0.16*reflectance*reflectance,baseColor,metallicRoughness.r); +#else +vec3 metallicF0=metallicReflectanceFactors.rgb; +#if DEBUGMODE>0 +outParams.metallicF0=metallicF0; +#endif + +outParams.surfaceAlbedo=mix(baseColor.rgb*(1.0-metallicF0),vec3(0.,0.,0.),metallicRoughness.r); + +surfaceReflectivityColor=mix(metallicF0,baseColor,metallicRoughness.r); +#endif +#else +#ifdef REFLECTIVITY +surfaceReflectivityColor*=surfaceMetallicOrReflectivityColorMap.rgb; +#if DEBUGMODE>0 +outParams.surfaceReflectivityColorMap=surfaceMetallicOrReflectivityColorMap; +#endif +#ifdef MICROSURFACEFROMREFLECTIVITYMAP +microSurface*=surfaceMetallicOrReflectivityColorMap.a; +microSurface*=reflectivityInfos.z; +#else +#ifdef MICROSURFACEAUTOMATIC +microSurface*=computeDefaultMicroSurface(microSurface,surfaceReflectivityColor); +#endif +#ifdef MICROSURFACEMAP +microSurface*=microSurfaceTexel.r; +#endif +#define CUSTOM_FRAGMENT_UPDATE_MICROSURFACE +#endif +#endif +#endif + +microSurface=saturate(microSurface); + +float roughness=1.-microSurface; +outParams.microSurface=microSurface; +outParams.roughness=roughness; +outParams.surfaceReflectivityColor=surfaceReflectivityColor; +} +`;ze.a.IncludesShadersStore.pbrBlockReflectivity=zp;var jp=`struct ambientOcclusionOutParams +{ +vec3 ambientOcclusionColor; +#if DEBUGMODE>0 +vec3 ambientOcclusionColorMap; +#endif +}; +#define pbr_inline +void ambientOcclusionBlock( +#ifdef AMBIENT +const in vec3 ambientOcclusionColorMap_, +const in vec4 vAmbientInfos, +#endif +out ambientOcclusionOutParams outParams +) +{ +vec3 ambientOcclusionColor=vec3(1.,1.,1.); +#ifdef AMBIENT +vec3 ambientOcclusionColorMap=ambientOcclusionColorMap_*vAmbientInfos.y; +#ifdef AMBIENTINGRAYSCALE +ambientOcclusionColorMap=vec3(ambientOcclusionColorMap.r,ambientOcclusionColorMap.r,ambientOcclusionColorMap.r); +#endif +ambientOcclusionColor=mix(ambientOcclusionColor,ambientOcclusionColorMap,vAmbientInfos.z); +#if DEBUGMODE>0 +outParams.ambientOcclusionColorMap=ambientOcclusionColorMap; +#endif +#endif +outParams.ambientOcclusionColor=ambientOcclusionColor; +} +`;ze.a.IncludesShadersStore.pbrBlockAmbientOcclusion=jp;var Hp=`#ifdef ALPHAFRESNEL +#if defined(ALPHATEST) || defined(ALPHABLEND) +struct alphaFresnelOutParams +{ +float alpha; +}; +#define pbr_inline +void alphaFresnelBlock( +const in vec3 normalW, +const in vec3 viewDirectionW, +const in float alpha, +const in float microSurface, +out alphaFresnelOutParams outParams +) +{ + + + +float opacityPerceptual=alpha; +#ifdef LINEARALPHAFRESNEL +float opacity0=opacityPerceptual; +#else +float opacity0=opacityPerceptual*opacityPerceptual; +#endif +float opacity90=fresnelGrazingReflectance(opacity0); +vec3 normalForward=faceforward(normalW,-viewDirectionW,normalW); + +outParams.alpha=getReflectanceFromAnalyticalBRDFLookup_Jones(saturate(dot(viewDirectionW,normalForward)),vec3(opacity0),vec3(opacity90),sqrt(microSurface)).x; +#ifdef ALPHATEST +if (outParams.alpha0 +vec3 anisotropyMapData; +#endif +}; +#define pbr_inline +void anisotropicBlock( +const in vec3 vAnisotropy, +#ifdef ANISOTROPIC_TEXTURE +const in vec3 anisotropyMapData, +#endif +const in mat3 TBN, +const in vec3 normalW, +const in vec3 viewDirectionW, +out anisotropicOutParams outParams +) +{ +float anisotropy=vAnisotropy.b; +vec3 anisotropyDirection=vec3(vAnisotropy.xy,0.); +#ifdef ANISOTROPIC_TEXTURE +anisotropy*=anisotropyMapData.b; +anisotropyDirection.rg*=anisotropyMapData.rg*2.0-1.0; +#if DEBUGMODE>0 +outParams.anisotropyMapData=anisotropyMapData; +#endif +#endif +mat3 anisoTBN=mat3(normalize(TBN[0]),normalize(TBN[1]),normalize(TBN[2])); +vec3 anisotropicTangent=normalize(anisoTBN*anisotropyDirection); +vec3 anisotropicBitangent=normalize(cross(anisoTBN[2],anisotropicTangent)); +outParams.anisotropy=anisotropy; +outParams.anisotropicTangent=anisotropicTangent; +outParams.anisotropicBitangent=anisotropicBitangent; +outParams.anisotropicNormal=getAnisotropicBentNormals(anisotropicTangent,anisotropicBitangent,normalW,viewDirectionW,anisotropy); +} +#endif +`;ze.a.IncludesShadersStore.pbrBlockAnisotropic=Wp;var Xp=`#ifdef REFLECTION +struct reflectionOutParams +{ +vec4 environmentRadiance; +vec3 environmentIrradiance; +#ifdef REFLECTIONMAP_3D +vec3 reflectionCoords; +#else +vec2 reflectionCoords; +#endif +#ifdef SS_TRANSLUCENCY +#ifdef USESPHERICALFROMREFLECTIONMAP +#if !defined(NORMAL) || !defined(USESPHERICALINVERTEX) +vec3 irradianceVector; +#endif +#endif +#endif +}; +#define pbr_inline +void createReflectionCoords( +const in vec3 vPositionW, +const in vec3 normalW, +#ifdef ANISOTROPIC +const in anisotropicOutParams anisotropicOut, +#endif +#ifdef REFLECTIONMAP_3D +out vec3 reflectionCoords +#else +out vec2 reflectionCoords +#endif +) +{ +#ifdef ANISOTROPIC +vec3 reflectionVector=computeReflectionCoords(vec4(vPositionW,1.0),anisotropicOut.anisotropicNormal); +#else +vec3 reflectionVector=computeReflectionCoords(vec4(vPositionW,1.0),normalW); +#endif +#ifdef REFLECTIONMAP_OPPOSITEZ +reflectionVector.z*=-1.0; +#endif + +#ifdef REFLECTIONMAP_3D +reflectionCoords=reflectionVector; +#else +reflectionCoords=reflectionVector.xy; +#ifdef REFLECTIONMAP_PROJECTION +reflectionCoords/=reflectionVector.z; +#endif +reflectionCoords.y=1.0-reflectionCoords.y; +#endif +} +#define pbr_inline +#define inline +void sampleReflectionTexture( +const in float alphaG, +const in vec3 vReflectionMicrosurfaceInfos, +const in vec2 vReflectionInfos, +const in vec3 vReflectionColor, +#if defined(LODINREFLECTIONALPHA) && !defined(REFLECTIONMAP_SKYBOX) +const in float NdotVUnclamped, +#endif +#ifdef LINEARSPECULARREFLECTION +const in float roughness, +#endif +#ifdef REFLECTIONMAP_3D +const in samplerCube reflectionSampler, +const vec3 reflectionCoords, +#else +const in sampler2D reflectionSampler, +const vec2 reflectionCoords, +#endif +#ifndef LODBASEDMICROSFURACE +#ifdef REFLECTIONMAP_3D +const in samplerCube reflectionSamplerLow, +const in samplerCube reflectionSamplerHigh, +#else +const in sampler2D reflectionSamplerLow, +const in sampler2D reflectionSamplerHigh, +#endif +#endif +#ifdef REALTIME_FILTERING +const in vec2 vReflectionFilteringInfo, +#endif +out vec4 environmentRadiance +) +{ + +#if defined(LODINREFLECTIONALPHA) && !defined(REFLECTIONMAP_SKYBOX) +float reflectionLOD=getLodFromAlphaG(vReflectionMicrosurfaceInfos.x,alphaG,NdotVUnclamped); +#elif defined(LINEARSPECULARREFLECTION) +float reflectionLOD=getLinearLodFromRoughness(vReflectionMicrosurfaceInfos.x,roughness); +#else +float reflectionLOD=getLodFromAlphaG(vReflectionMicrosurfaceInfos.x,alphaG); +#endif +#ifdef LODBASEDMICROSFURACE + +reflectionLOD=reflectionLOD*vReflectionMicrosurfaceInfos.y+vReflectionMicrosurfaceInfos.z; +#ifdef LODINREFLECTIONALPHA + + + + + + + + + +float automaticReflectionLOD=UNPACK_LOD(sampleReflection(reflectionSampler,reflectionCoords).a); +float requestedReflectionLOD=max(automaticReflectionLOD,reflectionLOD); +#else +float requestedReflectionLOD=reflectionLOD; +#endif +#ifdef REALTIME_FILTERING +environmentRadiance=vec4(radiance(alphaG,reflectionSampler,reflectionCoords,vReflectionFilteringInfo),1.0); +#else +environmentRadiance=sampleReflectionLod(reflectionSampler,reflectionCoords,reflectionLOD); +#endif +#else +float lodReflectionNormalized=saturate(reflectionLOD/log2(vReflectionMicrosurfaceInfos.x)); +float lodReflectionNormalizedDoubled=lodReflectionNormalized*2.0; +vec4 environmentMid=sampleReflection(reflectionSampler,reflectionCoords); +if (lodReflectionNormalizedDoubled<1.0){ +environmentRadiance=mix( +sampleReflection(reflectionSamplerHigh,reflectionCoords), +environmentMid, +lodReflectionNormalizedDoubled +); +} else { +environmentRadiance=mix( +environmentMid, +sampleReflection(reflectionSamplerLow,reflectionCoords), +lodReflectionNormalizedDoubled-1.0 +); +} +#endif +#ifdef RGBDREFLECTION +environmentRadiance.rgb=fromRGBD(environmentRadiance); +#endif +#ifdef GAMMAREFLECTION +environmentRadiance.rgb=toLinearSpace(environmentRadiance.rgb); +#endif + +environmentRadiance.rgb*=vReflectionInfos.x; +environmentRadiance.rgb*=vReflectionColor.rgb; +} +#define pbr_inline +#define inline +void reflectionBlock( +const in vec3 vPositionW, +const in vec3 normalW, +const in float alphaG, +const in vec3 vReflectionMicrosurfaceInfos, +const in vec2 vReflectionInfos, +const in vec3 vReflectionColor, +#ifdef ANISOTROPIC +const in anisotropicOutParams anisotropicOut, +#endif +#if defined(LODINREFLECTIONALPHA) && !defined(REFLECTIONMAP_SKYBOX) +const in float NdotVUnclamped, +#endif +#ifdef LINEARSPECULARREFLECTION +const in float roughness, +#endif +#ifdef REFLECTIONMAP_3D +const in samplerCube reflectionSampler, +#else +const in sampler2D reflectionSampler, +#endif +#if defined(NORMAL) && defined(USESPHERICALINVERTEX) +const in vec3 vEnvironmentIrradiance, +#endif +#ifdef USESPHERICALFROMREFLECTIONMAP +#if !defined(NORMAL) || !defined(USESPHERICALINVERTEX) +const in mat4 reflectionMatrix, +#endif +#endif +#ifdef USEIRRADIANCEMAP +#ifdef REFLECTIONMAP_3D +const in samplerCube irradianceSampler, +#else +const in sampler2D irradianceSampler, +#endif +#endif +#ifndef LODBASEDMICROSFURACE +#ifdef REFLECTIONMAP_3D +const in samplerCube reflectionSamplerLow, +const in samplerCube reflectionSamplerHigh, +#else +const in sampler2D reflectionSamplerLow, +const in sampler2D reflectionSamplerHigh, +#endif +#endif +#ifdef REALTIME_FILTERING +const in vec2 vReflectionFilteringInfo, +#endif +out reflectionOutParams outParams +) +{ + +vec4 environmentRadiance=vec4(0.,0.,0.,0.); +#ifdef REFLECTIONMAP_3D +vec3 reflectionCoords=vec3(0.); +#else +vec2 reflectionCoords=vec2(0.); +#endif +createReflectionCoords( +vPositionW, +normalW, +#ifdef ANISOTROPIC +anisotropicOut, +#endif +reflectionCoords +); +sampleReflectionTexture( +alphaG, +vReflectionMicrosurfaceInfos, +vReflectionInfos, +vReflectionColor, +#if defined(LODINREFLECTIONALPHA) && !defined(REFLECTIONMAP_SKYBOX) +NdotVUnclamped, +#endif +#ifdef LINEARSPECULARREFLECTION +roughness, +#endif +#ifdef REFLECTIONMAP_3D +reflectionSampler, +reflectionCoords, +#else +reflectionSampler, +reflectionCoords, +#endif +#ifndef LODBASEDMICROSFURACE +reflectionSamplerLow, +reflectionSamplerHigh, +#endif +#ifdef REALTIME_FILTERING +vReflectionFilteringInfo, +#endif +environmentRadiance +); + +vec3 environmentIrradiance=vec3(0.,0.,0.); +#ifdef USESPHERICALFROMREFLECTIONMAP +#if defined(NORMAL) && defined(USESPHERICALINVERTEX) +environmentIrradiance=vEnvironmentIrradiance; +#else +#ifdef ANISOTROPIC +vec3 irradianceVector=vec3(reflectionMatrix*vec4(anisotropicOut.anisotropicNormal,0)).xyz; +#else +vec3 irradianceVector=vec3(reflectionMatrix*vec4(normalW,0)).xyz; +#endif +#ifdef REFLECTIONMAP_OPPOSITEZ +irradianceVector.z*=-1.0; +#endif +#ifdef INVERTCUBICMAP +irradianceVector.y*=-1.0; +#endif +#if defined(REALTIME_FILTERING) +environmentIrradiance=irradiance(reflectionSampler,irradianceVector,vReflectionFilteringInfo); +#else +environmentIrradiance=computeEnvironmentIrradiance(irradianceVector); +#endif +#ifdef SS_TRANSLUCENCY +outParams.irradianceVector=irradianceVector; +#endif +#endif +#elif defined(USEIRRADIANCEMAP) +vec4 environmentIrradiance4=sampleReflection(irradianceSampler,reflectionCoords); +environmentIrradiance=environmentIrradiance4.rgb; +#ifdef RGBDREFLECTION +environmentIrradiance.rgb=fromRGBD(environmentIrradiance4); +#endif +#ifdef GAMMAREFLECTION +environmentIrradiance.rgb=toLinearSpace(environmentIrradiance.rgb); +#endif +#endif +environmentIrradiance*=vReflectionColor.rgb; +outParams.environmentRadiance=environmentRadiance; +outParams.environmentIrradiance=environmentIrradiance; +outParams.reflectionCoords=reflectionCoords; +} +#endif +`;ze.a.IncludesShadersStore.pbrBlockReflection=Xp;var Yp=`#ifdef SHEEN +struct sheenOutParams +{ +float sheenIntensity; +vec3 sheenColor; +float sheenRoughness; +#ifdef SHEEN_LINKWITHALBEDO +vec3 surfaceAlbedo; +#endif +#if defined(ENVIRONMENTBRDF) && defined(SHEEN_ALBEDOSCALING) +float sheenAlbedoScaling; +#endif +#if defined(REFLECTION) && defined(ENVIRONMENTBRDF) +vec3 finalSheenRadianceScaled; +#endif +#if DEBUGMODE>0 +vec4 sheenMapData; +vec3 sheenEnvironmentReflectance; +#endif +}; +#define pbr_inline +#define inline +void sheenBlock( +const in vec4 vSheenColor, +#ifdef SHEEN_ROUGHNESS +const in float vSheenRoughness, +#if defined(SHEEN_TEXTURE_ROUGHNESS) && !defined(SHEEN_TEXTURE_ROUGHNESS_IDENTICAL) && !defined(SHEEN_USE_ROUGHNESS_FROM_MAINTEXTURE) +const in vec4 sheenMapRoughnessData, +#endif +#endif +const in float roughness, +#ifdef SHEEN_TEXTURE +const in vec4 sheenMapData, +#endif +const in float reflectance, +#ifdef SHEEN_LINKWITHALBEDO +const in vec3 baseColor, +const in vec3 surfaceAlbedo, +#endif +#ifdef ENVIRONMENTBRDF +const in float NdotV, +const in vec3 environmentBrdf, +#endif +#if defined(REFLECTION) && defined(ENVIRONMENTBRDF) +const in vec2 AARoughnessFactors, +const in vec3 vReflectionMicrosurfaceInfos, +const in vec2 vReflectionInfos, +const in vec3 vReflectionColor, +const in vec4 vLightingIntensity, +#ifdef REFLECTIONMAP_3D +const in samplerCube reflectionSampler, +const in vec3 reflectionCoords, +#else +const in sampler2D reflectionSampler, +const in vec2 reflectionCoords, +#endif +const in float NdotVUnclamped, +#ifndef LODBASEDMICROSFURACE +#ifdef REFLECTIONMAP_3D +const in samplerCube reflectionSamplerLow, +const in samplerCube reflectionSamplerHigh, +#else +const in sampler2D reflectionSamplerLow, +const in sampler2D reflectionSamplerHigh, +#endif +#endif +#ifdef REALTIME_FILTERING +const in vec2 vReflectionFilteringInfo, +#endif +#if !defined(REFLECTIONMAP_SKYBOX) && defined(RADIANCEOCCLUSION) +const in float seo, +#endif +#if !defined(REFLECTIONMAP_SKYBOX) && defined(HORIZONOCCLUSION) && defined(BUMP) && defined(REFLECTIONMAP_3D) +const in float eho, +#endif +#endif +out sheenOutParams outParams +) +{ +float sheenIntensity=vSheenColor.a; +#ifdef SHEEN_TEXTURE +#if DEBUGMODE>0 +outParams.sheenMapData=sheenMapData; +#endif +#endif +#ifdef SHEEN_LINKWITHALBEDO +float sheenFactor=pow5(1.0-sheenIntensity); +vec3 sheenColor=baseColor.rgb*(1.0-sheenFactor); +float sheenRoughness=sheenIntensity; +outParams.surfaceAlbedo=surfaceAlbedo*sheenFactor; +#ifdef SHEEN_TEXTURE +sheenIntensity*=sheenMapData.a; +#endif +#else +vec3 sheenColor=vSheenColor.rgb; +#ifdef SHEEN_TEXTURE +sheenColor.rgb*=sheenMapData.rgb; +#endif +#ifdef SHEEN_ROUGHNESS +float sheenRoughness=vSheenRoughness; +#ifdef SHEEN_USE_ROUGHNESS_FROM_MAINTEXTURE +#if defined(SHEEN_TEXTURE) +sheenRoughness*=sheenMapData.a; +#endif +#elif defined(SHEEN_TEXTURE_ROUGHNESS) +#ifdef SHEEN_TEXTURE_ROUGHNESS_IDENTICAL +sheenRoughness*=sheenMapData.a; +#else +sheenRoughness*=sheenMapRoughnessData.a; +#endif +#endif +#else +float sheenRoughness=roughness; +#ifdef SHEEN_TEXTURE +sheenIntensity*=sheenMapData.a; +#endif +#endif + +#if !defined(SHEEN_ALBEDOSCALING) +sheenIntensity*=(1.-reflectance); +#endif + +sheenColor*=sheenIntensity; +#endif + +#ifdef ENVIRONMENTBRDF + +#ifdef SHEEN_ROUGHNESS +vec3 environmentSheenBrdf=getBRDFLookup(NdotV,sheenRoughness); +#else +vec3 environmentSheenBrdf=environmentBrdf; +#endif + +#endif +#if defined(REFLECTION) && defined(ENVIRONMENTBRDF) +float sheenAlphaG=convertRoughnessToAverageSlope(sheenRoughness); +#ifdef SPECULARAA + +sheenAlphaG+=AARoughnessFactors.y; +#endif +vec4 environmentSheenRadiance=vec4(0.,0.,0.,0.); +sampleReflectionTexture( +sheenAlphaG, +vReflectionMicrosurfaceInfos, +vReflectionInfos, +vReflectionColor, +#if defined(LODINREFLECTIONALPHA) && !defined(REFLECTIONMAP_SKYBOX) +NdotVUnclamped, +#endif +#ifdef LINEARSPECULARREFLECTION +sheenRoughness, +#endif +reflectionSampler, +reflectionCoords, +#ifndef LODBASEDMICROSFURACE +reflectionSamplerLow, +reflectionSamplerHigh, +#endif +#ifdef REALTIME_FILTERING +vReflectionFilteringInfo, +#endif +environmentSheenRadiance +); +vec3 sheenEnvironmentReflectance=getSheenReflectanceFromBRDFLookup(sheenColor,environmentSheenBrdf); +#if !defined(REFLECTIONMAP_SKYBOX) && defined(RADIANCEOCCLUSION) +sheenEnvironmentReflectance*=seo; +#endif +#if !defined(REFLECTIONMAP_SKYBOX) && defined(HORIZONOCCLUSION) && defined(BUMP) && defined(REFLECTIONMAP_3D) +sheenEnvironmentReflectance*=eho; +#endif +#if DEBUGMODE>0 +outParams.sheenEnvironmentReflectance=sheenEnvironmentReflectance; +#endif +outParams.finalSheenRadianceScaled= +environmentSheenRadiance.rgb * +sheenEnvironmentReflectance * +vLightingIntensity.z; + + + + + +#endif +#if defined(ENVIRONMENTBRDF) && defined(SHEEN_ALBEDOSCALING) + + + +outParams.sheenAlbedoScaling=1.0-sheenIntensity*max(max(sheenColor.r,sheenColor.g),sheenColor.b)*environmentSheenBrdf.b; +#endif + +outParams.sheenIntensity=sheenIntensity; +outParams.sheenColor=sheenColor; +outParams.sheenRoughness=sheenRoughness; +} +#endif +`;ze.a.IncludesShadersStore.pbrBlockSheen=Yp;var Kp=`struct clearcoatOutParams +{ +vec3 specularEnvironmentR0; +float conservationFactor; +vec3 clearCoatNormalW; +vec2 clearCoatAARoughnessFactors; +float clearCoatIntensity; +float clearCoatRoughness; +#ifdef REFLECTION +vec3 finalClearCoatRadianceScaled; +#endif +#ifdef CLEARCOAT_TINT +vec3 absorption; +float clearCoatNdotVRefract; +vec3 clearCoatColor; +float clearCoatThickness; +#endif +#if defined(ENVIRONMENTBRDF) && defined(MS_BRDF_ENERGY_CONSERVATION) +vec3 energyConservationFactorClearCoat; +#endif +#if DEBUGMODE>0 +mat3 TBNClearCoat; +vec2 clearCoatMapData; +vec4 clearCoatTintMapData; +vec4 environmentClearCoatRadiance; +float clearCoatNdotV; +vec3 clearCoatEnvironmentReflectance; +#endif +}; +#ifdef CLEARCOAT +#define pbr_inline +#define inline +void clearcoatBlock( +const in vec3 vPositionW, +const in vec3 geometricNormalW, +const in vec3 viewDirectionW, +const in vec2 vClearCoatParams, +#if defined(CLEARCOAT_TEXTURE_ROUGHNESS) && !defined(CLEARCOAT_TEXTURE_ROUGHNESS_IDENTICAL) && !defined(CLEARCOAT_USE_ROUGHNESS_FROM_MAINTEXTURE) +const in vec4 clearCoatMapRoughnessData, +#endif +const in vec3 specularEnvironmentR0, +#ifdef CLEARCOAT_TEXTURE +const in vec2 clearCoatMapData, +#endif +#ifdef CLEARCOAT_TINT +const in vec4 vClearCoatTintParams, +const in float clearCoatColorAtDistance, +const in vec4 vClearCoatRefractionParams, +#ifdef CLEARCOAT_TINT_TEXTURE +const in vec4 clearCoatTintMapData, +#endif +#endif +#ifdef CLEARCOAT_BUMP +const in vec2 vClearCoatBumpInfos, +const in vec4 clearCoatBumpMapData, +const in vec2 vClearCoatBumpUV, +#if defined(TANGENT) && defined(NORMAL) +const in mat3 vTBN, +#else +const in vec2 vClearCoatTangentSpaceParams, +#endif +#ifdef OBJECTSPACE_NORMALMAP +const in mat4 normalMatrix, +#endif +#endif +#if defined(FORCENORMALFORWARD) && defined(NORMAL) +const in vec3 faceNormal, +#endif +#ifdef REFLECTION +const in vec3 vReflectionMicrosurfaceInfos, +const in vec2 vReflectionInfos, +const in vec3 vReflectionColor, +const in vec4 vLightingIntensity, +#ifdef REFLECTIONMAP_3D +const in samplerCube reflectionSampler, +#else +const in sampler2D reflectionSampler, +#endif +#ifndef LODBASEDMICROSFURACE +#ifdef REFLECTIONMAP_3D +const in samplerCube reflectionSamplerLow, +const in samplerCube reflectionSamplerHigh, +#else +const in sampler2D reflectionSamplerLow, +const in sampler2D reflectionSamplerHigh, +#endif +#endif +#ifdef REALTIME_FILTERING +const in vec2 vReflectionFilteringInfo, +#endif +#endif +#if defined(ENVIRONMENTBRDF) && !defined(REFLECTIONMAP_SKYBOX) +#ifdef RADIANCEOCCLUSION +const in float ambientMonochrome, +#endif +#endif +out clearcoatOutParams outParams +) +{ + +float clearCoatIntensity=vClearCoatParams.x; +float clearCoatRoughness=vClearCoatParams.y; +#ifdef CLEARCOAT_TEXTURE +clearCoatIntensity*=clearCoatMapData.x; +#ifdef CLEARCOAT_USE_ROUGHNESS_FROM_MAINTEXTURE +clearCoatRoughness*=clearCoatMapData.y; +#endif +#if DEBUGMODE>0 +outParams.clearCoatMapData=clearCoatMapData; +#endif +#endif +#if defined(CLEARCOAT_TEXTURE_ROUGHNESS) && !defined(CLEARCOAT_USE_ROUGHNESS_FROM_MAINTEXTURE) +#ifdef CLEARCOAT_TEXTURE_ROUGHNESS_IDENTICAL +clearCoatRoughness*=clearCoatMapData.y; +#else +clearCoatRoughness*=clearCoatMapRoughnessData.y; +#endif +#endif +outParams.clearCoatIntensity=clearCoatIntensity; +outParams.clearCoatRoughness=clearCoatRoughness; +#ifdef CLEARCOAT_TINT +vec3 clearCoatColor=vClearCoatTintParams.rgb; +float clearCoatThickness=vClearCoatTintParams.a; +#ifdef CLEARCOAT_TINT_TEXTURE +clearCoatColor*=clearCoatTintMapData.rgb; +clearCoatThickness*=clearCoatTintMapData.a; +#if DEBUGMODE>0 +outParams.clearCoatTintMapData=clearCoatTintMapData; +#endif +#endif +outParams.clearCoatColor=computeColorAtDistanceInMedia(clearCoatColor,clearCoatColorAtDistance); +outParams.clearCoatThickness=clearCoatThickness; +#endif + + + + +#ifdef CLEARCOAT_REMAP_F0 +vec3 specularEnvironmentR0Updated=getR0RemappedForClearCoat(specularEnvironmentR0); +#else +vec3 specularEnvironmentR0Updated=specularEnvironmentR0; +#endif +outParams.specularEnvironmentR0=mix(specularEnvironmentR0,specularEnvironmentR0Updated,clearCoatIntensity); + +vec3 clearCoatNormalW=geometricNormalW; +#ifdef CLEARCOAT_BUMP +#ifdef NORMALXYSCALE +float clearCoatNormalScale=1.0; +#else +float clearCoatNormalScale=vClearCoatBumpInfos.y; +#endif +#if defined(TANGENT) && defined(NORMAL) +mat3 TBNClearCoat=vTBN; +#else +mat3 TBNClearCoat=cotangent_frame(clearCoatNormalW*clearCoatNormalScale,vPositionW,vClearCoatBumpUV,vClearCoatTangentSpaceParams); +#endif +#if DEBUGMODE>0 +outParams.TBNClearCoat=TBNClearCoat; +#endif +#ifdef OBJECTSPACE_NORMALMAP +clearCoatNormalW=normalize(clearCoatBumpMapData.xyz*2.0-1.0); +clearCoatNormalW=normalize(mat3(normalMatrix)*clearCoatNormalW); +#else +clearCoatNormalW=perturbNormal(TBNClearCoat,clearCoatBumpMapData.xyz,vClearCoatBumpInfos.y); +#endif +#endif +#if defined(FORCENORMALFORWARD) && defined(NORMAL) +clearCoatNormalW*=sign(dot(clearCoatNormalW,faceNormal)); +#endif +#if defined(TWOSIDEDLIGHTING) && defined(NORMAL) +clearCoatNormalW=gl_FrontFacing ? clearCoatNormalW : -clearCoatNormalW; +#endif +outParams.clearCoatNormalW=clearCoatNormalW; + +outParams.clearCoatAARoughnessFactors=getAARoughnessFactors(clearCoatNormalW.xyz); + +float clearCoatNdotVUnclamped=dot(clearCoatNormalW,viewDirectionW); + +float clearCoatNdotV=absEps(clearCoatNdotVUnclamped); +#if DEBUGMODE>0 +outParams.clearCoatNdotV=clearCoatNdotV; +#endif +#ifdef CLEARCOAT_TINT + +vec3 clearCoatVRefract=-refract(vPositionW,clearCoatNormalW,vClearCoatRefractionParams.y); + +outParams.clearCoatNdotVRefract=absEps(dot(clearCoatNormalW,clearCoatVRefract)); +#endif +#if defined(ENVIRONMENTBRDF) && !defined(REFLECTIONMAP_SKYBOX) + +vec3 environmentClearCoatBrdf=getBRDFLookup(clearCoatNdotV,clearCoatRoughness); +#endif + +#if defined(REFLECTION) +float clearCoatAlphaG=convertRoughnessToAverageSlope(clearCoatRoughness); +#ifdef SPECULARAA + +clearCoatAlphaG+=outParams.clearCoatAARoughnessFactors.y; +#endif +vec4 environmentClearCoatRadiance=vec4(0.,0.,0.,0.); +vec3 clearCoatReflectionVector=computeReflectionCoords(vec4(vPositionW,1.0),clearCoatNormalW); +#ifdef REFLECTIONMAP_OPPOSITEZ +clearCoatReflectionVector.z*=-1.0; +#endif + +#ifdef REFLECTIONMAP_3D +vec3 clearCoatReflectionCoords=clearCoatReflectionVector; +#else +vec2 clearCoatReflectionCoords=clearCoatReflectionVector.xy; +#ifdef REFLECTIONMAP_PROJECTION +clearCoatReflectionCoords/=clearCoatReflectionVector.z; +#endif +clearCoatReflectionCoords.y=1.0-clearCoatReflectionCoords.y; +#endif +sampleReflectionTexture( +clearCoatAlphaG, +vReflectionMicrosurfaceInfos, +vReflectionInfos, +vReflectionColor, +#if defined(LODINREFLECTIONALPHA) && !defined(REFLECTIONMAP_SKYBOX) +clearCoatNdotVUnclamped, +#endif +#ifdef LINEARSPECULARREFLECTION +clearCoatRoughness, +#endif +reflectionSampler, +clearCoatReflectionCoords, +#ifndef LODBASEDMICROSFURACE +reflectionSamplerLow, +reflectionSamplerHigh, +#endif +#ifdef REALTIME_FILTERING +vReflectionFilteringInfo, +#endif +environmentClearCoatRadiance +); +#if DEBUGMODE>0 +outParams.environmentClearCoatRadiance=environmentClearCoatRadiance; +#endif + +#if defined(ENVIRONMENTBRDF) && !defined(REFLECTIONMAP_SKYBOX) +vec3 clearCoatEnvironmentReflectance=getReflectanceFromBRDFLookup(vec3(vClearCoatRefractionParams.x),environmentClearCoatBrdf); +#ifdef RADIANCEOCCLUSION +float clearCoatSeo=environmentRadianceOcclusion(ambientMonochrome,clearCoatNdotVUnclamped); +clearCoatEnvironmentReflectance*=clearCoatSeo; +#endif +#ifdef HORIZONOCCLUSION +#ifdef BUMP +#ifdef REFLECTIONMAP_3D +float clearCoatEho=environmentHorizonOcclusion(-viewDirectionW,clearCoatNormalW,geometricNormalW); +clearCoatEnvironmentReflectance*=clearCoatEho; +#endif +#endif +#endif +#else + +vec3 clearCoatEnvironmentReflectance=getReflectanceFromAnalyticalBRDFLookup_Jones(clearCoatNdotV,vec3(1.),vec3(1.),sqrt(1.-clearCoatRoughness)); +#endif +clearCoatEnvironmentReflectance*=clearCoatIntensity; +#if DEBUGMODE>0 +outParams.clearCoatEnvironmentReflectance=clearCoatEnvironmentReflectance; +#endif +outParams.finalClearCoatRadianceScaled= +environmentClearCoatRadiance.rgb * +clearCoatEnvironmentReflectance * +vLightingIntensity.z; +#endif +#if defined(CLEARCOAT_TINT) + +outParams.absorption=computeClearCoatAbsorption(outParams.clearCoatNdotVRefract,outParams.clearCoatNdotVRefract,outParams.clearCoatColor,clearCoatThickness,clearCoatIntensity); +#endif + +float fresnelIBLClearCoat=fresnelSchlickGGX(clearCoatNdotV,vClearCoatRefractionParams.x,CLEARCOATREFLECTANCE90); +fresnelIBLClearCoat*=clearCoatIntensity; +outParams.conservationFactor=(1.-fresnelIBLClearCoat); +#if defined(ENVIRONMENTBRDF) && defined(MS_BRDF_ENERGY_CONSERVATION) +outParams.energyConservationFactorClearCoat=getEnergyConservationFactor(outParams.specularEnvironmentR0,environmentClearCoatBrdf); +#endif +} +#endif +`;ze.a.IncludesShadersStore.pbrBlockClearcoat=Kp;var Qp=`struct subSurfaceOutParams +{ +vec3 specularEnvironmentReflectance; +#ifdef SS_REFRACTION +vec3 finalRefraction; +vec3 surfaceAlbedo; +#ifdef SS_LINKREFRACTIONTOTRANSPARENCY +float alpha; +#endif +#ifdef REFLECTION +float refractionFactorForIrradiance; +#endif +#endif +#ifdef SS_TRANSLUCENCY +vec3 transmittance; +float translucencyIntensity; +#ifdef REFLECTION +vec3 refractionIrradiance; +#endif +#endif +#if DEBUGMODE>0 +vec4 thicknessMap; +vec4 environmentRefraction; +vec3 refractionTransmittance; +#endif +}; +#ifdef SUBSURFACE +#define pbr_inline +#define inline +void subSurfaceBlock( +const in vec3 vSubSurfaceIntensity, +const in vec2 vThicknessParam, +const in vec4 vTintColor, +const in vec3 normalW, +const in vec3 specularEnvironmentReflectance, +#ifdef SS_THICKNESSANDMASK_TEXTURE +const in vec4 thicknessMap, +#endif +#ifdef REFLECTION +#ifdef SS_TRANSLUCENCY +const in mat4 reflectionMatrix, +#ifdef USESPHERICALFROMREFLECTIONMAP +#if !defined(NORMAL) || !defined(USESPHERICALINVERTEX) +const in vec3 irradianceVector_, +#endif +#if defined(REALTIME_FILTERING) +const in samplerCube reflectionSampler, +const in vec2 vReflectionFilteringInfo, +#endif +#endif +#ifdef USEIRRADIANCEMAP +#ifdef REFLECTIONMAP_3D +const in samplerCube irradianceSampler, +#else +const in sampler2D irradianceSampler, +#endif +#endif +#endif +#endif +#ifdef SS_REFRACTION +const in vec3 vPositionW, +const in vec3 viewDirectionW, +const in mat4 view, +const in vec3 surfaceAlbedo, +const in vec4 vRefractionInfos, +const in mat4 refractionMatrix, +const in vec3 vRefractionMicrosurfaceInfos, +const in vec4 vLightingIntensity, +#ifdef SS_LINKREFRACTIONTOTRANSPARENCY +const in float alpha, +#endif +#ifdef SS_LODINREFRACTIONALPHA +const in float NdotVUnclamped, +#endif +#ifdef SS_LINEARSPECULARREFRACTION +const in float roughness, +#else +const in float alphaG, +#endif +#ifdef SS_REFRACTIONMAP_3D +const in samplerCube refractionSampler, +#ifndef LODBASEDMICROSFURACE +const in samplerCube refractionSamplerLow, +const in samplerCube refractionSamplerHigh, +#endif +#else +const in sampler2D refractionSampler, +#ifndef LODBASEDMICROSFURACE +const in sampler2D refractionSamplerLow, +const in sampler2D refractionSamplerHigh, +#endif +#endif +#ifdef ANISOTROPIC +const in anisotropicOutParams anisotropicOut, +#endif +#ifdef REALTIME_FILTERING +const in vec2 vRefractionFilteringInfo, +#endif +#endif +#ifdef SS_TRANSLUCENCY +const in vec3 vDiffusionDistance, +#endif +out subSurfaceOutParams outParams +) +{ +outParams.specularEnvironmentReflectance=specularEnvironmentReflectance; + + + +#ifdef SS_REFRACTION +float refractionIntensity=vSubSurfaceIntensity.x; +#ifdef SS_LINKREFRACTIONTOTRANSPARENCY +refractionIntensity*=(1.0-alpha); + +outParams.alpha=1.0; +#endif +#endif +#ifdef SS_TRANSLUCENCY +float translucencyIntensity=vSubSurfaceIntensity.y; +#endif +#ifdef SS_THICKNESSANDMASK_TEXTURE +float thickness=thicknessMap.r*vThicknessParam.y+vThicknessParam.x; +#if DEBUGMODE>0 +outParams.thicknessMap=thicknessMap; +#endif +#ifdef SS_MASK_FROM_THICKNESS_TEXTURE +#ifdef SS_REFRACTION +refractionIntensity*=thicknessMap.g; +#endif +#ifdef SS_TRANSLUCENCY +translucencyIntensity*=thicknessMap.b; +#endif +#elif defined(SS_MASK_FROM_THICKNESS_TEXTURE_GLTF) +#ifdef SS_REFRACTION +refractionIntensity*=thicknessMap.r; +#elif defined(SS_TRANSLUCENCY) +translucencyIntensity*=thicknessMap.r; +#endif +thickness=thicknessMap.g*vThicknessParam.y+vThicknessParam.x; +#endif +#else +float thickness=vThicknessParam.y; +#endif + + + +#ifdef SS_TRANSLUCENCY +thickness=maxEps(thickness); +vec3 transmittance=transmittanceBRDF_Burley(vTintColor.rgb,vDiffusionDistance,thickness); +transmittance*=translucencyIntensity; +outParams.transmittance=transmittance; +outParams.translucencyIntensity=translucencyIntensity; +#endif + + + +#ifdef SS_REFRACTION +vec4 environmentRefraction=vec4(0.,0.,0.,0.); +#ifdef ANISOTROPIC +vec3 refractionVector=refract(-viewDirectionW,anisotropicOut.anisotropicNormal,vRefractionInfos.y); +#else +vec3 refractionVector=refract(-viewDirectionW,normalW,vRefractionInfos.y); +#endif +#ifdef SS_REFRACTIONMAP_OPPOSITEZ +refractionVector.z*=-1.0; +#endif + +#ifdef SS_REFRACTIONMAP_3D +refractionVector.y=refractionVector.y*vRefractionInfos.w; +vec3 refractionCoords=refractionVector; +refractionCoords=vec3(refractionMatrix*vec4(refractionCoords,0)); +#else +vec3 vRefractionUVW=vec3(refractionMatrix*(view*vec4(vPositionW+refractionVector*vRefractionInfos.z,1.0))); +vec2 refractionCoords=vRefractionUVW.xy/vRefractionUVW.z; +refractionCoords.y=1.0-refractionCoords.y; +#endif +#ifdef SS_LODINREFRACTIONALPHA +float refractionLOD=getLodFromAlphaG(vRefractionMicrosurfaceInfos.x,alphaG,NdotVUnclamped); +#elif defined(SS_LINEARSPECULARREFRACTION) +float refractionLOD=getLinearLodFromRoughness(vRefractionMicrosurfaceInfos.x,roughness); +#else +float refractionLOD=getLodFromAlphaG(vRefractionMicrosurfaceInfos.x,alphaG); +#endif +#ifdef LODBASEDMICROSFURACE + +refractionLOD=refractionLOD*vRefractionMicrosurfaceInfos.y+vRefractionMicrosurfaceInfos.z; +#ifdef SS_LODINREFRACTIONALPHA + + + + + + + + + +float automaticRefractionLOD=UNPACK_LOD(sampleRefraction(refractionSampler,refractionCoords).a); +float requestedRefractionLOD=max(automaticRefractionLOD,refractionLOD); +#else +float requestedRefractionLOD=refractionLOD; +#endif +#ifdef REALTIME_FILTERING +environmentRefraction=vec4(radiance(alphaG,refractionSampler,refractionCoords,vRefractionFilteringInfo),1.0); +#else +environmentRefraction=sampleRefractionLod(refractionSampler,refractionCoords,requestedRefractionLOD); +#endif +#else +float lodRefractionNormalized=saturate(refractionLOD/log2(vRefractionMicrosurfaceInfos.x)); +float lodRefractionNormalizedDoubled=lodRefractionNormalized*2.0; +vec4 environmentRefractionMid=sampleRefraction(refractionSampler,refractionCoords); +if (lodRefractionNormalizedDoubled<1.0){ +environmentRefraction=mix( +sampleRefraction(refractionSamplerHigh,refractionCoords), +environmentRefractionMid, +lodRefractionNormalizedDoubled +); +} else { +environmentRefraction=mix( +environmentRefractionMid, +sampleRefraction(refractionSamplerLow,refractionCoords), +lodRefractionNormalizedDoubled-1.0 +); +} +#endif +#ifdef SS_RGBDREFRACTION +environmentRefraction.rgb=fromRGBD(environmentRefraction); +#endif +#ifdef SS_GAMMAREFRACTION +environmentRefraction.rgb=toLinearSpace(environmentRefraction.rgb); +#endif + +environmentRefraction.rgb*=vRefractionInfos.x; +#endif + + + +#ifdef SS_REFRACTION +vec3 refractionTransmittance=vec3(refractionIntensity); +#ifdef SS_THICKNESSANDMASK_TEXTURE +vec3 volumeAlbedo=computeColorAtDistanceInMedia(vTintColor.rgb,vTintColor.w); + + + + + +refractionTransmittance*=cocaLambert(volumeAlbedo,thickness); +#elif defined(SS_LINKREFRACTIONTOTRANSPARENCY) + +float maxChannel=max(max(surfaceAlbedo.r,surfaceAlbedo.g),surfaceAlbedo.b); +vec3 volumeAlbedo=saturate(maxChannel*surfaceAlbedo); + +environmentRefraction.rgb*=volumeAlbedo; +#else + +vec3 volumeAlbedo=computeColorAtDistanceInMedia(vTintColor.rgb,vTintColor.w); +refractionTransmittance*=cocaLambert(volumeAlbedo,vThicknessParam.y); +#endif +#ifdef SS_ALBEDOFORREFRACTIONTINT + +environmentRefraction.rgb*=surfaceAlbedo.rgb; +#endif + +outParams.surfaceAlbedo=surfaceAlbedo*(1.-refractionIntensity); +#ifdef REFLECTION + +outParams.refractionFactorForIrradiance=(1.-refractionIntensity); + +#endif + +vec3 bounceSpecularEnvironmentReflectance=(2.0*specularEnvironmentReflectance)/(1.0+specularEnvironmentReflectance); +outParams.specularEnvironmentReflectance=mix(bounceSpecularEnvironmentReflectance,specularEnvironmentReflectance,refractionIntensity); + +refractionTransmittance*=1.0-outParams.specularEnvironmentReflectance; +#if DEBUGMODE>0 +outParams.refractionTransmittance=refractionTransmittance; +#endif +outParams.finalRefraction=environmentRefraction.rgb*refractionTransmittance*vLightingIntensity.z; +#if DEBUGMODE>0 +outParams.environmentRefraction=environmentRefraction; +#endif +#endif + + + +#if defined(REFLECTION) && defined(SS_TRANSLUCENCY) +#if defined(NORMAL) && defined(USESPHERICALINVERTEX) || !defined(USESPHERICALFROMREFLECTIONMAP) +vec3 irradianceVector=vec3(reflectionMatrix*vec4(normalW,0)).xyz; +#ifdef REFLECTIONMAP_OPPOSITEZ +irradianceVector.z*=-1.0; +#endif +#ifdef INVERTCUBICMAP +irradianceVector.y*=-1.0; +#endif +#else +vec3 irradianceVector=irradianceVector_; +#endif +#if defined(USESPHERICALFROMREFLECTIONMAP) +#if defined(REALTIME_FILTERING) +vec3 refractionIrradiance=irradiance(reflectionSampler,-irradianceVector,vReflectionFilteringInfo); +#else +vec3 refractionIrradiance=computeEnvironmentIrradiance(-irradianceVector); +#endif +#elif defined(USEIRRADIANCEMAP) +#ifdef REFLECTIONMAP_3D +vec3 irradianceCoords=irradianceVector; +#else +vec2 irradianceCoords=irradianceVector.xy; +#ifdef REFLECTIONMAP_PROJECTION +irradianceCoords/=irradianceVector.z; +#endif +irradianceCoords.y=1.0-irradianceCoords.y; +#endif +vec4 refractionIrradiance=sampleReflection(irradianceSampler,-irradianceCoords); +#ifdef RGBDREFLECTION +refractionIrradiance.rgb=fromRGBD(refractionIrradiance); +#endif +#ifdef GAMMAREFLECTION +refractionIrradiance.rgb=toLinearSpace(refractionIrradiance.rgb); +#endif +#else +vec4 refractionIrradiance=vec4(0.); +#endif +refractionIrradiance.rgb*=transmittance; +outParams.refractionIrradiance=refractionIrradiance.rgb; +#endif +} +#endif +`;ze.a.IncludesShadersStore.pbrBlockSubSurface=Qp;var qp=`vec3 viewDirectionW=normalize(vEyePosition.xyz-vPositionW); +#ifdef NORMAL +vec3 normalW=normalize(vNormalW); +#else +vec3 normalW=normalize(cross(dFdx(vPositionW),dFdy(vPositionW)))*vEyePosition.w; +#endif +vec3 geometricNormalW=normalW; +#if defined(TWOSIDEDLIGHTING) && defined(NORMAL) +geometricNormalW=gl_FrontFacing ? geometricNormalW : -geometricNormalW; +#endif +`;ze.a.IncludesShadersStore.pbrBlockNormalGeometric=qp,f(134);var Zp=`#if defined(FORCENORMALFORWARD) && defined(NORMAL) +vec3 faceNormal=normalize(cross(dFdx(vPositionW),dFdy(vPositionW)))*vEyePosition.w; +#if defined(TWOSIDEDLIGHTING) +faceNormal=gl_FrontFacing ? faceNormal : -faceNormal; +#endif +normalW*=sign(dot(normalW,faceNormal)); +#endif +#if defined(TWOSIDEDLIGHTING) && defined(NORMAL) +normalW=gl_FrontFacing ? normalW : -normalW; +#endif +`;ze.a.IncludesShadersStore.pbrBlockNormalFinal=Zp,f(162);var Jp=`#ifdef LIGHTMAP +vec4 lightmapColor=texture2D(lightmapSampler,vLightmapUV+uvOffset); +#ifdef RGBDLIGHTMAP +lightmapColor.rgb=fromRGBD(lightmapColor); +#endif +#ifdef GAMMALIGHTMAP +lightmapColor.rgb=toLinearSpace(lightmapColor.rgb); +#endif +lightmapColor.rgb*=vLightmapInfos.y; +#endif +`;ze.a.IncludesShadersStore.pbrBlockLightmapInit=Jp;var $p=`float NdotVUnclamped=dot(normalW,viewDirectionW); + +float NdotV=absEps(NdotVUnclamped); +float alphaG=convertRoughnessToAverageSlope(roughness); +vec2 AARoughnessFactors=getAARoughnessFactors(normalW.xyz); +#ifdef SPECULARAA + +alphaG+=AARoughnessFactors.y; +#endif +#if defined(ENVIRONMENTBRDF) + +vec3 environmentBrdf=getBRDFLookup(NdotV,roughness); +#endif +#if defined(ENVIRONMENTBRDF) && !defined(REFLECTIONMAP_SKYBOX) +#ifdef RADIANCEOCCLUSION +#ifdef AMBIENTINGRAYSCALE +float ambientMonochrome=aoOut.ambientOcclusionColor.r; +#else +float ambientMonochrome=getLuminance(aoOut.ambientOcclusionColor); +#endif +float seo=environmentRadianceOcclusion(ambientMonochrome,NdotVUnclamped); +#endif +#ifdef HORIZONOCCLUSION +#ifdef BUMP +#ifdef REFLECTIONMAP_3D +float eho=environmentHorizonOcclusion(-viewDirectionW,normalW,geometricNormalW); +#endif +#endif +#endif +#endif +`;ze.a.IncludesShadersStore.pbrBlockGeometryInfo=$p;var e_=`float reflectance=max(max(reflectivityOut.surfaceReflectivityColor.r,reflectivityOut.surfaceReflectivityColor.g),reflectivityOut.surfaceReflectivityColor.b); +vec3 specularEnvironmentR0=reflectivityOut.surfaceReflectivityColor.rgb; +#ifdef METALLICWORKFLOW +vec3 specularEnvironmentR90=vec3(metallicReflectanceFactors.a); +#else +vec3 specularEnvironmentR90=vec3(1.0,1.0,1.0); +#endif + +#ifdef ALPHAFRESNEL +float reflectance90=fresnelGrazingReflectance(reflectance); +specularEnvironmentR90=specularEnvironmentR90*reflectance90; +#endif +`;ze.a.IncludesShadersStore.pbrBlockReflectance0=e_;var t_=`#if defined(ENVIRONMENTBRDF) && !defined(REFLECTIONMAP_SKYBOX) +vec3 specularEnvironmentReflectance=getReflectanceFromBRDFLookup(clearcoatOut.specularEnvironmentR0,specularEnvironmentR90,environmentBrdf); +#ifdef RADIANCEOCCLUSION +specularEnvironmentReflectance*=seo; +#endif +#ifdef HORIZONOCCLUSION +#ifdef BUMP +#ifdef REFLECTIONMAP_3D +specularEnvironmentReflectance*=eho; +#endif +#endif +#endif +#else + +vec3 specularEnvironmentReflectance=getReflectanceFromAnalyticalBRDFLookup_Jones(NdotV,clearcoatOut.specularEnvironmentR0,specularEnvironmentR90,sqrt(microSurface)); +#endif +#ifdef CLEARCOAT +specularEnvironmentReflectance*=clearcoatOut.conservationFactor; +#if defined(CLEARCOAT_TINT) +specularEnvironmentReflectance*=clearcoatOut.absorption; +#endif +#endif +`;ze.a.IncludesShadersStore.pbrBlockReflectance=t_;var n_=`vec3 diffuseBase=vec3(0.,0.,0.); +#ifdef SPECULARTERM +vec3 specularBase=vec3(0.,0.,0.); +#endif +#ifdef CLEARCOAT +vec3 clearCoatBase=vec3(0.,0.,0.); +#endif +#ifdef SHEEN +vec3 sheenBase=vec3(0.,0.,0.); +#endif + +preLightingInfo preInfo; +lightingInfo info; +float shadow=1.; +#if defined(CLEARCOAT) && defined(CLEARCOAT_TINT) +vec3 absorption=vec3(0.); +#endif +`;ze.a.IncludesShadersStore.pbrBlockDirectLighting=n_;var i_=` + + + +#if defined(ENVIRONMENTBRDF) +#ifdef MS_BRDF_ENERGY_CONSERVATION +vec3 energyConservationFactor=getEnergyConservationFactor(clearcoatOut.specularEnvironmentR0,environmentBrdf); +#endif +#endif +#ifndef METALLICWORKFLOW +#ifdef SPECULAR_GLOSSINESS_ENERGY_CONSERVATION +surfaceAlbedo.rgb=(1.-reflectance)*surfaceAlbedo.rgb; +#endif +#endif +#if defined(SHEEN) && defined(SHEEN_ALBEDOSCALING) && defined(ENVIRONMENTBRDF) +surfaceAlbedo.rgb=sheenOut.sheenAlbedoScaling*surfaceAlbedo.rgb; +#endif + +#ifdef REFLECTION +vec3 finalIrradiance=reflectionOut.environmentIrradiance; +#if defined(CLEARCOAT) +finalIrradiance*=clearcoatOut.conservationFactor; +#if defined(CLEARCOAT_TINT) +finalIrradiance*=clearcoatOut.absorption; +#endif +#endif +#if defined(SS_REFRACTION) +finalIrradiance*=subSurfaceOut.refractionFactorForIrradiance; +#endif +#if defined(SS_TRANSLUCENCY) +finalIrradiance*=(1.0-subSurfaceOut.translucencyIntensity); +finalIrradiance+=subSurfaceOut.refractionIrradiance; +#endif +finalIrradiance*=surfaceAlbedo.rgb; +finalIrradiance*=vLightingIntensity.z; +finalIrradiance*=aoOut.ambientOcclusionColor; +#endif + +#ifdef SPECULARTERM +vec3 finalSpecular=specularBase; +finalSpecular=max(finalSpecular,0.0); +vec3 finalSpecularScaled=finalSpecular*vLightingIntensity.x*vLightingIntensity.w; +#if defined(ENVIRONMENTBRDF) && defined(MS_BRDF_ENERGY_CONSERVATION) +finalSpecularScaled*=energyConservationFactor; +#endif +#if defined(SHEEN) && defined(ENVIRONMENTBRDF) && defined(SHEEN_ALBEDOSCALING) +finalSpecularScaled*=sheenOut.sheenAlbedoScaling; +#endif +#endif + +#ifdef REFLECTION +vec3 finalRadiance=reflectionOut.environmentRadiance.rgb; +finalRadiance*=subSurfaceOut.specularEnvironmentReflectance; +vec3 finalRadianceScaled=finalRadiance*vLightingIntensity.z; +#if defined(ENVIRONMENTBRDF) && defined(MS_BRDF_ENERGY_CONSERVATION) +finalRadianceScaled*=energyConservationFactor; +#endif +#if defined(SHEEN) && defined(ENVIRONMENTBRDF) && defined(SHEEN_ALBEDOSCALING) +finalRadianceScaled*=sheenOut.sheenAlbedoScaling; +#endif +#endif + +#ifdef SHEEN +vec3 finalSheen=sheenBase*sheenOut.sheenColor; +finalSheen=max(finalSheen,0.0); +vec3 finalSheenScaled=finalSheen*vLightingIntensity.x*vLightingIntensity.w; +#if defined(CLEARCOAT) && defined(REFLECTION) && defined(ENVIRONMENTBRDF) +sheenOut.finalSheenRadianceScaled*=clearcoatOut.conservationFactor; +#if defined(CLEARCOAT_TINT) +sheenOut.finalSheenRadianceScaled*=clearcoatOut.absorption; +#endif +#endif +#endif + +#ifdef CLEARCOAT +vec3 finalClearCoat=clearCoatBase; +finalClearCoat=max(finalClearCoat,0.0); +vec3 finalClearCoatScaled=finalClearCoat*vLightingIntensity.x*vLightingIntensity.w; +#if defined(ENVIRONMENTBRDF) && defined(MS_BRDF_ENERGY_CONSERVATION) +finalClearCoatScaled*=clearcoatOut.energyConservationFactorClearCoat; +#endif +#ifdef SS_REFRACTION +subSurfaceOut.finalRefraction*=clearcoatOut.conservationFactor; +#ifdef CLEARCOAT_TINT +subSurfaceOut.finalRefraction*=clearcoatOut.absorption; +#endif +#endif +#endif + +#ifdef ALPHABLEND +float luminanceOverAlpha=0.0; +#if defined(REFLECTION) && defined(RADIANCEOVERALPHA) +luminanceOverAlpha+=getLuminance(finalRadianceScaled); +#if defined(CLEARCOAT) +luminanceOverAlpha+=getLuminance(clearcoatOut.finalClearCoatRadianceScaled); +#endif +#endif +#if defined(SPECULARTERM) && defined(SPECULAROVERALPHA) +luminanceOverAlpha+=getLuminance(finalSpecularScaled); +#endif +#if defined(CLEARCOAT) && defined(CLEARCOATOVERALPHA) +luminanceOverAlpha+=getLuminance(finalClearCoatScaled); +#endif +#if defined(RADIANCEOVERALPHA) || defined(SPECULAROVERALPHA) || defined(CLEARCOATOVERALPHA) +alpha=saturate(alpha+luminanceOverAlpha*luminanceOverAlpha); +#endif +#endif +`;ze.a.IncludesShadersStore.pbrBlockFinalLitComponents=i_;var r_=` +vec3 finalDiffuse=diffuseBase; +finalDiffuse*=surfaceAlbedo.rgb; +finalDiffuse=max(finalDiffuse,0.0); +finalDiffuse*=vLightingIntensity.x; + +vec3 finalAmbient=vAmbientColor; +finalAmbient*=surfaceAlbedo.rgb; + +vec3 finalEmissive=vEmissiveColor; +#ifdef EMISSIVE +vec3 emissiveColorTex=texture2D(emissiveSampler,vEmissiveUV+uvOffset).rgb; +finalEmissive*=toLinearSpace(emissiveColorTex.rgb); +finalEmissive*=vEmissiveInfos.y; +#endif +finalEmissive*=vLightingIntensity.y; + +#ifdef AMBIENT +vec3 ambientOcclusionForDirectDiffuse=mix(vec3(1.),aoOut.ambientOcclusionColor,vAmbientInfos.w); +#else +vec3 ambientOcclusionForDirectDiffuse=aoOut.ambientOcclusionColor; +#endif +finalAmbient*=aoOut.ambientOcclusionColor; +finalDiffuse*=ambientOcclusionForDirectDiffuse; +`;ze.a.IncludesShadersStore.pbrBlockFinalUnlitComponents=r_;var o_=`vec4 finalColor=vec4( +finalAmbient + +finalDiffuse + +#ifndef UNLIT +#ifdef REFLECTION +finalIrradiance + +#endif +#ifdef SPECULARTERM +finalSpecularScaled + +#endif +#ifdef SHEEN +finalSheenScaled + +#endif +#ifdef CLEARCOAT +finalClearCoatScaled + +#endif +#ifdef REFLECTION +finalRadianceScaled + +#if defined(SHEEN) && defined(ENVIRONMENTBRDF) +sheenOut.finalSheenRadianceScaled + +#endif +#ifdef CLEARCOAT +clearcoatOut.finalClearCoatRadianceScaled + +#endif +#endif +#ifdef SS_REFRACTION +subSurfaceOut.finalRefraction + +#endif +#endif +finalEmissive, +alpha); + +#ifdef LIGHTMAP +#ifndef LIGHTMAPEXCLUDED +#ifdef USELIGHTMAPASSHADOWMAP +finalColor.rgb*=lightmapColor.rgb; +#else +finalColor.rgb+=lightmapColor.rgb; +#endif +#endif +#endif +#define CUSTOM_FRAGMENT_BEFORE_FOG + +finalColor=max(finalColor,0.0); +`;ze.a.IncludesShadersStore.pbrBlockFinalColorComposition=o_,f(155);var a_=`#ifdef IMAGEPROCESSINGPOSTPROCESS + + +finalColor.rgb=clamp(finalColor.rgb,0.,30.0); +#else + +finalColor=applyImageProcessing(finalColor); +#endif +finalColor.a*=visibility; +#ifdef PREMULTIPLYALPHA + +finalColor.rgb*=finalColor.a; +#endif +`;ze.a.IncludesShadersStore.pbrBlockImageProcessing=a_;var s_=`#if DEBUGMODE>0 +if (vClipSpacePosition.x/vClipSpacePosition.w>=vDebugMode.x) { + +#if DEBUGMODE == 1 +gl_FragColor.rgb=vPositionW.rgb; +#define DEBUGMODE_NORMALIZE +#elif DEBUGMODE == 2 && defined(NORMAL) +gl_FragColor.rgb=vNormalW.rgb; +#define DEBUGMODE_NORMALIZE +#elif DEBUGMODE == 3 && defined(BUMP) || DEBUGMODE == 3 && defined(PARALLAX) || DEBUGMODE == 3 && defined(ANISOTROPIC) + +gl_FragColor.rgb=TBN[0]; +#define DEBUGMODE_NORMALIZE +#elif DEBUGMODE == 4 && defined(BUMP) || DEBUGMODE == 4 && defined(PARALLAX) || DEBUGMODE == 4 && defined(ANISOTROPIC) + +gl_FragColor.rgb=TBN[1]; +#define DEBUGMODE_NORMALIZE +#elif DEBUGMODE == 5 + +gl_FragColor.rgb=normalW; +#define DEBUGMODE_NORMALIZE +#elif DEBUGMODE == 6 && defined(MAINUV1) +gl_FragColor.rgb=vec3(vMainUV1,0.0); +#elif DEBUGMODE == 7 && defined(MAINUV2) +gl_FragColor.rgb=vec3(vMainUV2,0.0); +#elif DEBUGMODE == 8 && defined(CLEARCOAT) && defined(CLEARCOAT_BUMP) + +gl_FragColor.rgb=clearcoatOut.TBNClearCoat[0]; +#define DEBUGMODE_NORMALIZE +#elif DEBUGMODE == 9 && defined(CLEARCOAT) && defined(CLEARCOAT_BUMP) + +gl_FragColor.rgb=clearcoatOut.TBNClearCoat[1]; +#define DEBUGMODE_NORMALIZE +#elif DEBUGMODE == 10 && defined(CLEARCOAT) + +gl_FragColor.rgb=clearcoatOut.clearCoatNormalW; +#define DEBUGMODE_NORMALIZE +#elif DEBUGMODE == 11 && defined(ANISOTROPIC) +gl_FragColor.rgb=anisotropicOut.anisotropicNormal; +#define DEBUGMODE_NORMALIZE +#elif DEBUGMODE == 12 && defined(ANISOTROPIC) +gl_FragColor.rgb=anisotropicOut.anisotropicTangent; +#define DEBUGMODE_NORMALIZE +#elif DEBUGMODE == 13 && defined(ANISOTROPIC) +gl_FragColor.rgb=anisotropicOut.anisotropicBitangent; +#define DEBUGMODE_NORMALIZE + +#elif DEBUGMODE == 20 && defined(ALBEDO) +gl_FragColor.rgb=albedoTexture.rgb; +#elif DEBUGMODE == 21 && defined(AMBIENT) +gl_FragColor.rgb=aoOut.ambientOcclusionColorMap.rgb; +#elif DEBUGMODE == 22 && defined(OPACITY) +gl_FragColor.rgb=opacityMap.rgb; +#elif DEBUGMODE == 23 && defined(EMISSIVE) +gl_FragColor.rgb=emissiveColorTex.rgb; +#define DEBUGMODE_GAMMA +#elif DEBUGMODE == 24 && defined(LIGHTMAP) +gl_FragColor.rgb=lightmapColor.rgb; +#define DEBUGMODE_GAMMA +#elif DEBUGMODE == 25 && defined(REFLECTIVITY) && defined(METALLICWORKFLOW) +gl_FragColor.rgb=reflectivityOut.surfaceMetallicColorMap.rgb; +#elif DEBUGMODE == 26 && defined(REFLECTIVITY) && !defined(METALLICWORKFLOW) +gl_FragColor.rgb=reflectivityOut.surfaceReflectivityColorMap.rgb; +#define DEBUGMODE_GAMMA +#elif DEBUGMODE == 27 && defined(CLEARCOAT) && defined(CLEARCOAT_TEXTURE) +gl_FragColor.rgb=vec3(clearcoatOut.clearCoatMapData.rg,0.0); +#elif DEBUGMODE == 28 && defined(CLEARCOAT) && defined(CLEARCOAT_TINT) && defined(CLEARCOAT_TINT_TEXTURE) +gl_FragColor.rgb=clearcoatOut.clearCoatTintMapData.rgb; +#elif DEBUGMODE == 29 && defined(SHEEN) && defined(SHEEN_TEXTURE) +gl_FragColor.rgb=sheenOut.sheenMapData.rgb; +#elif DEBUGMODE == 30 && defined(ANISOTROPIC) && defined(ANISOTROPIC_TEXTURE) +gl_FragColor.rgb=anisotropicOut.anisotropyMapData.rgb; +#elif DEBUGMODE == 31 && defined(SUBSURFACE) && defined(SS_THICKNESSANDMASK_TEXTURE) +gl_FragColor.rgb=subSurfaceOut.thicknessMap.rgb; + +#elif DEBUGMODE == 40 && defined(SS_REFRACTION) + +gl_FragColor.rgb=subSurfaceOut.environmentRefraction.rgb; +#define DEBUGMODE_GAMMA +#elif DEBUGMODE == 41 && defined(REFLECTION) +gl_FragColor.rgb=reflectionOut.environmentRadiance.rgb; +#define DEBUGMODE_GAMMA +#elif DEBUGMODE == 42 && defined(CLEARCOAT) && defined(REFLECTION) +gl_FragColor.rgb=clearcoatOut.environmentClearCoatRadiance.rgb; +#define DEBUGMODE_GAMMA + +#elif DEBUGMODE == 50 +gl_FragColor.rgb=diffuseBase.rgb; +#define DEBUGMODE_GAMMA +#elif DEBUGMODE == 51 && defined(SPECULARTERM) +gl_FragColor.rgb=specularBase.rgb; +#define DEBUGMODE_GAMMA +#elif DEBUGMODE == 52 && defined(CLEARCOAT) +gl_FragColor.rgb=clearCoatBase.rgb; +#define DEBUGMODE_GAMMA +#elif DEBUGMODE == 53 && defined(SHEEN) +gl_FragColor.rgb=sheenBase.rgb; +#define DEBUGMODE_GAMMA +#elif DEBUGMODE == 54 && defined(REFLECTION) +gl_FragColor.rgb=reflectionOut.environmentIrradiance.rgb; +#define DEBUGMODE_GAMMA + +#elif DEBUGMODE == 60 +gl_FragColor.rgb=surfaceAlbedo.rgb; +#define DEBUGMODE_GAMMA +#elif DEBUGMODE == 61 +gl_FragColor.rgb=clearcoatOut.specularEnvironmentR0; +#define DEBUGMODE_GAMMA +#elif DEBUGMODE == 62 && defined(METALLICWORKFLOW) +gl_FragColor.rgb=vec3(reflectivityOut.metallicRoughness.r); +#elif DEBUGMODE == 71 && defined(METALLICWORKFLOW) +gl_FragColor.rgb=reflectivityOut.metallicF0; +#elif DEBUGMODE == 63 +gl_FragColor.rgb=vec3(roughness); +#elif DEBUGMODE == 64 +gl_FragColor.rgb=vec3(alphaG); +#elif DEBUGMODE == 65 +gl_FragColor.rgb=vec3(NdotV); +#elif DEBUGMODE == 66 && defined(CLEARCOAT) && defined(CLEARCOAT_TINT) +gl_FragColor.rgb=clearcoatOut.clearCoatColor.rgb; +#define DEBUGMODE_GAMMA +#elif DEBUGMODE == 67 && defined(CLEARCOAT) +gl_FragColor.rgb=vec3(clearcoatOut.clearCoatRoughness); +#elif DEBUGMODE == 68 && defined(CLEARCOAT) +gl_FragColor.rgb=vec3(clearcoatOut.clearCoatNdotV); +#elif DEBUGMODE == 69 && defined(SUBSURFACE) && defined(SS_TRANSLUCENCY) +gl_FragColor.rgb=subSurfaceOut.transmittance; +#elif DEBUGMODE == 70 && defined(SUBSURFACE) && defined(SS_REFRACTION) +gl_FragColor.rgb=subSurfaceOut.refractionTransmittance; + +#elif DEBUGMODE == 80 && defined(RADIANCEOCCLUSION) +gl_FragColor.rgb=vec3(seo); +#elif DEBUGMODE == 81 && defined(HORIZONOCCLUSION) +gl_FragColor.rgb=vec3(eho); +#elif DEBUGMODE == 82 && defined(MS_BRDF_ENERGY_CONSERVATION) +gl_FragColor.rgb=vec3(energyConservationFactor); +#elif DEBUGMODE == 83 && defined(ENVIRONMENTBRDF) && !defined(REFLECTIONMAP_SKYBOX) +gl_FragColor.rgb=specularEnvironmentReflectance; +#define DEBUGMODE_GAMMA +#elif DEBUGMODE == 84 && defined(CLEARCOAT) && defined(ENVIRONMENTBRDF) && !defined(REFLECTIONMAP_SKYBOX) +gl_FragColor.rgb=clearcoatOut.clearCoatEnvironmentReflectance; +#define DEBUGMODE_GAMMA +#elif DEBUGMODE == 85 && defined(SHEEN) && defined(REFLECTION) +gl_FragColor.rgb=sheenOut.sheenEnvironmentReflectance; +#define DEBUGMODE_GAMMA +#elif DEBUGMODE == 86 && defined(ALPHABLEND) +gl_FragColor.rgb=vec3(luminanceOverAlpha); +#elif DEBUGMODE == 87 +gl_FragColor.rgb=vec3(alpha); +#endif +gl_FragColor.rgb*=vDebugMode.y; +#ifdef DEBUGMODE_NORMALIZE +gl_FragColor.rgb=normalize(gl_FragColor.rgb)*0.5+0.5; +#endif +#ifdef DEBUGMODE_GAMMA +gl_FragColor.rgb=toGammaSpace(gl_FragColor.rgb); +#endif +gl_FragColor.a=1.0; +#ifdef PREPASS +gl_FragData[0]=toLinearSpace(gl_FragColor); +gl_FragData[1]=vec4(0.,0.,0.,0.); +#endif +return; +} +#endif`;ze.a.IncludesShadersStore.pbrDebug=s_;var c_=`#if defined(BUMP) || !defined(NORMAL) || defined(FORCENORMALFORWARD) || defined(SPECULARAA) || defined(CLEARCOAT_BUMP) || defined(ANISOTROPIC) +#extension GL_OES_standard_derivatives : enable +#endif +#ifdef LODBASEDMICROSFURACE +#extension GL_EXT_shader_texture_lod : enable +#endif +#define CUSTOM_FRAGMENT_BEGIN +#ifdef LOGARITHMICDEPTH +#extension GL_EXT_frag_depth : enable +#endif +#include[SCENE_MRT_COUNT] +precision highp float; + +#ifndef FROMLINEARSPACE +#define FROMLINEARSPACE +#endif + +#include<__decl__pbrFragment> +#include +#include<__decl__lightFragment>[0..maxSimultaneousLights] +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef REFLECTION +#include +#endif +#define CUSTOM_FRAGMENT_DEFINITIONS +#include +#include +#include +#include +#include +#include +#include +#include +#include + +void main(void) { +#define CUSTOM_FRAGMENT_MAIN_BEGIN +#include + +#include +#include +#include + +albedoOpacityOutParams albedoOpacityOut; +#ifdef ALBEDO +vec4 albedoTexture=texture2D(albedoSampler,vAlbedoUV+uvOffset); +#endif +#ifdef OPACITY +vec4 opacityMap=texture2D(opacitySampler,vOpacityUV+uvOffset); +#endif +albedoOpacityBlock( +vAlbedoColor, +#ifdef ALBEDO +albedoTexture, +vAlbedoInfos, +#endif +#ifdef OPACITY +opacityMap, +vOpacityInfos, +#endif +#ifdef DETAIL +detailColor, +vDetailInfos, +#endif +albedoOpacityOut +); +vec3 surfaceAlbedo=albedoOpacityOut.surfaceAlbedo; +float alpha=albedoOpacityOut.alpha; +#define CUSTOM_FRAGMENT_UPDATE_ALPHA +#include +#define CUSTOM_FRAGMENT_BEFORE_LIGHTS + +ambientOcclusionOutParams aoOut; +#ifdef AMBIENT +vec3 ambientOcclusionColorMap=texture2D(ambientSampler,vAmbientUV+uvOffset).rgb; +#endif +ambientOcclusionBlock( +#ifdef AMBIENT +ambientOcclusionColorMap, +vAmbientInfos, +#endif +aoOut +); +#include +#ifdef UNLIT +vec3 diffuseBase=vec3(1.,1.,1.); +#else + +vec3 baseColor=surfaceAlbedo; +reflectivityOutParams reflectivityOut; +#if defined(REFLECTIVITY) +vec4 surfaceMetallicOrReflectivityColorMap=texture2D(reflectivitySampler,vReflectivityUV+uvOffset); +vec4 baseReflectivity=surfaceMetallicOrReflectivityColorMap; +#ifndef METALLICWORKFLOW +surfaceMetallicOrReflectivityColorMap=toLinearSpace(surfaceMetallicOrReflectivityColorMap); +surfaceMetallicOrReflectivityColorMap.rgb*=vReflectivityInfos.y; +#endif +#endif +#if defined(MICROSURFACEMAP) +vec4 microSurfaceTexel=texture2D(microSurfaceSampler,vMicroSurfaceSamplerUV+uvOffset)*vMicroSurfaceSamplerInfos.y; +#endif +#ifdef METALLICWORKFLOW +vec4 metallicReflectanceFactors=vMetallicReflectanceFactors; +#ifdef METALLIC_REFLECTANCE +vec4 metallicReflectanceFactorsMap=texture2D(metallicReflectanceSampler,vMetallicReflectanceUV+uvOffset); +metallicReflectanceFactorsMap=toLinearSpace(metallicReflectanceFactorsMap); +metallicReflectanceFactors*=metallicReflectanceFactorsMap; +#endif +#endif +reflectivityBlock( +vReflectivityColor, +#ifdef METALLICWORKFLOW +surfaceAlbedo, +metallicReflectanceFactors, +#endif +#ifdef REFLECTIVITY +vReflectivityInfos, +surfaceMetallicOrReflectivityColorMap, +#endif +#if defined(METALLICWORKFLOW) && defined(REFLECTIVITY) && defined(AOSTOREINMETALMAPRED) +aoOut.ambientOcclusionColor, +#endif +#ifdef MICROSURFACEMAP +microSurfaceTexel, +#endif +#ifdef DETAIL +detailColor, +vDetailInfos, +#endif +reflectivityOut +); +float microSurface=reflectivityOut.microSurface; +float roughness=reflectivityOut.roughness; +#ifdef METALLICWORKFLOW +surfaceAlbedo=reflectivityOut.surfaceAlbedo; +#endif +#if defined(METALLICWORKFLOW) && defined(REFLECTIVITY) && defined(AOSTOREINMETALMAPRED) +aoOut.ambientOcclusionColor=reflectivityOut.ambientOcclusionColor; +#endif + +#ifdef ALPHAFRESNEL +#if defined(ALPHATEST) || defined(ALPHABLEND) +alphaFresnelOutParams alphaFresnelOut; +alphaFresnelBlock( +normalW, +viewDirectionW, +alpha, +microSurface, +alphaFresnelOut +); +alpha=alphaFresnelOut.alpha; +#endif +#endif + +#include + +#ifdef ANISOTROPIC +anisotropicOutParams anisotropicOut; +#ifdef ANISOTROPIC_TEXTURE +vec3 anisotropyMapData=texture2D(anisotropySampler,vAnisotropyUV+uvOffset).rgb*vAnisotropyInfos.y; +#endif +anisotropicBlock( +vAnisotropy, +#ifdef ANISOTROPIC_TEXTURE +anisotropyMapData, +#endif +TBN, +normalW, +viewDirectionW, +anisotropicOut +); +#endif + +#ifdef REFLECTION +reflectionOutParams reflectionOut; +reflectionBlock( +vPositionW, +normalW, +alphaG, +vReflectionMicrosurfaceInfos, +vReflectionInfos, +vReflectionColor, +#ifdef ANISOTROPIC +anisotropicOut, +#endif +#if defined(LODINREFLECTIONALPHA) && !defined(REFLECTIONMAP_SKYBOX) +NdotVUnclamped, +#endif +#ifdef LINEARSPECULARREFLECTION +roughness, +#endif +reflectionSampler, +#if defined(NORMAL) && defined(USESPHERICALINVERTEX) +vEnvironmentIrradiance, +#endif +#ifdef USESPHERICALFROMREFLECTIONMAP +#if !defined(NORMAL) || !defined(USESPHERICALINVERTEX) +reflectionMatrix, +#endif +#endif +#ifdef USEIRRADIANCEMAP +irradianceSampler, +#endif +#ifndef LODBASEDMICROSFURACE +reflectionSamplerLow, +reflectionSamplerHigh, +#endif +#ifdef REALTIME_FILTERING +vReflectionFilteringInfo, +#endif +reflectionOut +); +#endif + +#include + +#ifdef SHEEN +sheenOutParams sheenOut; +#ifdef SHEEN_TEXTURE +vec4 sheenMapData=toLinearSpace(texture2D(sheenSampler,vSheenUV+uvOffset))*vSheenInfos.y; +#endif +#if defined(SHEEN_ROUGHNESS) && defined(SHEEN_TEXTURE_ROUGHNESS) && !defined(SHEEN_TEXTURE_ROUGHNESS_IDENTICAL) && !defined(SHEEN_USE_ROUGHNESS_FROM_MAINTEXTURE) +vec4 sheenMapRoughnessData=texture2D(sheenRoughnessSampler,vSheenRoughnessUV+uvOffset)*vSheenInfos.w; +#endif +sheenBlock( +vSheenColor, +#ifdef SHEEN_ROUGHNESS +vSheenRoughness, +#if defined(SHEEN_TEXTURE_ROUGHNESS) && !defined(SHEEN_TEXTURE_ROUGHNESS_IDENTICAL) && !defined(SHEEN_USE_ROUGHNESS_FROM_MAINTEXTURE) +sheenMapRoughnessData, +#endif +#endif +roughness, +#ifdef SHEEN_TEXTURE +sheenMapData, +#endif +reflectance, +#ifdef SHEEN_LINKWITHALBEDO +baseColor, +surfaceAlbedo, +#endif +#ifdef ENVIRONMENTBRDF +NdotV, +environmentBrdf, +#endif +#if defined(REFLECTION) && defined(ENVIRONMENTBRDF) +AARoughnessFactors, +vReflectionMicrosurfaceInfos, +vReflectionInfos, +vReflectionColor, +vLightingIntensity, +reflectionSampler, +reflectionOut.reflectionCoords, +NdotVUnclamped, +#ifndef LODBASEDMICROSFURACE +reflectionSamplerLow, +reflectionSamplerHigh, +#endif +#ifdef REALTIME_FILTERING +vReflectionFilteringInfo, +#endif +#if !defined(REFLECTIONMAP_SKYBOX) && defined(RADIANCEOCCLUSION) +seo, +#endif +#if !defined(REFLECTIONMAP_SKYBOX) && defined(HORIZONOCCLUSION) && defined(BUMP) && defined(REFLECTIONMAP_3D) +eho, +#endif +#endif +sheenOut +); +#ifdef SHEEN_LINKWITHALBEDO +surfaceAlbedo=sheenOut.surfaceAlbedo; +#endif +#endif + +clearcoatOutParams clearcoatOut; +#ifdef CLEARCOAT +#ifdef CLEARCOAT_TEXTURE +vec2 clearCoatMapData=texture2D(clearCoatSampler,vClearCoatUV+uvOffset).rg*vClearCoatInfos.y; +#endif +#if defined(CLEARCOAT_TEXTURE_ROUGHNESS) && !defined(CLEARCOAT_TEXTURE_ROUGHNESS_IDENTICAL) && !defined(CLEARCOAT_USE_ROUGHNESS_FROM_MAINTEXTURE) +vec4 clearCoatMapRoughnessData=texture2D(clearCoatRoughnessSampler,vClearCoatRoughnessUV+uvOffset)*vClearCoatInfos.w; +#endif +#if defined(CLEARCOAT_TINT) && defined(CLEARCOAT_TINT_TEXTURE) +vec4 clearCoatTintMapData=toLinearSpace(texture2D(clearCoatTintSampler,vClearCoatTintUV+uvOffset)); +#endif +#ifdef CLEARCOAT_BUMP +vec4 clearCoatBumpMapData=texture2D(clearCoatBumpSampler,vClearCoatBumpUV+uvOffset); +#endif +clearcoatBlock( +vPositionW, +geometricNormalW, +viewDirectionW, +vClearCoatParams, +#if defined(CLEARCOAT_TEXTURE_ROUGHNESS) && !defined(CLEARCOAT_TEXTURE_ROUGHNESS_IDENTICAL) && !defined(CLEARCOAT_USE_ROUGHNESS_FROM_MAINTEXTURE) +clearCoatMapRoughnessData, +#endif +specularEnvironmentR0, +#ifdef CLEARCOAT_TEXTURE +clearCoatMapData, +#endif +#ifdef CLEARCOAT_TINT +vClearCoatTintParams, +clearCoatColorAtDistance, +vClearCoatRefractionParams, +#ifdef CLEARCOAT_TINT_TEXTURE +clearCoatTintMapData, +#endif +#endif +#ifdef CLEARCOAT_BUMP +vClearCoatBumpInfos, +clearCoatBumpMapData, +vClearCoatBumpUV, +#if defined(TANGENT) && defined(NORMAL) +vTBN, +#else +vClearCoatTangentSpaceParams, +#endif +#ifdef OBJECTSPACE_NORMALMAP +normalMatrix, +#endif +#endif +#if defined(FORCENORMALFORWARD) && defined(NORMAL) +faceNormal, +#endif +#ifdef REFLECTION +vReflectionMicrosurfaceInfos, +vReflectionInfos, +vReflectionColor, +vLightingIntensity, +reflectionSampler, +#ifndef LODBASEDMICROSFURACE +reflectionSamplerLow, +reflectionSamplerHigh, +#endif +#ifdef REALTIME_FILTERING +vReflectionFilteringInfo, +#endif +#endif +#if defined(ENVIRONMENTBRDF) && !defined(REFLECTIONMAP_SKYBOX) +#ifdef RADIANCEOCCLUSION +ambientMonochrome, +#endif +#endif +clearcoatOut +); +#else +clearcoatOut.specularEnvironmentR0=specularEnvironmentR0; +#endif + +#include + +subSurfaceOutParams subSurfaceOut; +#ifdef SUBSURFACE +#ifdef SS_THICKNESSANDMASK_TEXTURE +vec4 thicknessMap=texture2D(thicknessSampler,vThicknessUV+uvOffset); +#endif +subSurfaceBlock( +vSubSurfaceIntensity, +vThicknessParam, +vTintColor, +normalW, +specularEnvironmentReflectance, +#ifdef SS_THICKNESSANDMASK_TEXTURE +thicknessMap, +#endif +#ifdef REFLECTION +#ifdef SS_TRANSLUCENCY +reflectionMatrix, +#ifdef USESPHERICALFROMREFLECTIONMAP +#if !defined(NORMAL) || !defined(USESPHERICALINVERTEX) +reflectionOut.irradianceVector, +#endif +#if defined(REALTIME_FILTERING) +reflectionSampler, +vReflectionFilteringInfo, +#endif +#endif +#ifdef USEIRRADIANCEMAP +irradianceSampler, +#endif +#endif +#endif +#ifdef SS_REFRACTION +vPositionW, +viewDirectionW, +view, +surfaceAlbedo, +vRefractionInfos, +refractionMatrix, +vRefractionMicrosurfaceInfos, +vLightingIntensity, +#ifdef SS_LINKREFRACTIONTOTRANSPARENCY +alpha, +#endif +#ifdef SS_LODINREFRACTIONALPHA +NdotVUnclamped, +#endif +#ifdef SS_LINEARSPECULARREFRACTION +roughness, +#else +alphaG, +#endif +refractionSampler, +#ifndef LODBASEDMICROSFURACE +refractionSamplerLow, +refractionSamplerHigh, +#endif +#ifdef ANISOTROPIC +anisotropicOut, +#endif +#ifdef REALTIME_FILTERING +vRefractionFilteringInfo, +#endif +#endif +#ifdef SS_TRANSLUCENCY +vDiffusionDistance, +#endif +subSurfaceOut +); +#ifdef SS_REFRACTION +surfaceAlbedo=subSurfaceOut.surfaceAlbedo; +#ifdef SS_LINKREFRACTIONTOTRANSPARENCY +alpha=subSurfaceOut.alpha; +#endif +#endif +#else +subSurfaceOut.specularEnvironmentReflectance=specularEnvironmentReflectance; +#endif + +#include +#include[0..maxSimultaneousLights] + +#include +#endif +#include +#include +#include +#include(color,finalColor) +#include +#define CUSTOM_FRAGMENT_BEFORE_FRAGCOLOR +#ifdef PREPASS +#ifdef PREPASS_POSITION +gl_FragData[PREPASS_POSITION_INDEX]=vec4(vPositionW,1.0); +#endif +#ifdef PREPASS_VELOCITY +vec2 a=(vCurrentPosition.xy/vCurrentPosition.w)*0.5+0.5; +vec2 b=(vPreviousPosition.xy/vPreviousPosition.w)*0.5+0.5; +vec2 velocity=abs(a-b); +velocity=vec2(pow(velocity.x,1.0/3.0),pow(velocity.y,1.0/3.0))*sign(a-b)*0.5+0.5; +gl_FragData[PREPASS_VELOCITY_INDEX]=vec4(velocity,0.0,1.0); +#endif +#ifdef PREPASS_IRRADIANCE +vec3 irradiance=finalDiffuse; +#ifndef UNLIT +#ifdef REFLECTION +irradiance+=finalIrradiance; +#endif +#endif +vec3 sqAlbedo=sqrt(surfaceAlbedo); +#ifdef SS_SCATTERING +gl_FragData[0]=vec4(finalColor.rgb-irradiance,finalColor.a); +irradiance/=sqAlbedo; +#else +gl_FragData[0]=finalColor; +float scatteringDiffusionProfile=255.; +#endif +gl_FragData[PREPASS_IRRADIANCE_INDEX]=vec4(irradiance,scatteringDiffusionProfile/255.); +#else +gl_FragData[0]=vec4(finalColor.rgb,finalColor.a); +#endif +#ifdef PREPASS_DEPTHNORMAL +gl_FragData[PREPASS_DEPTHNORMAL_INDEX]=vec4(vViewPos.z,(view*vec4(normalW,0.0)).rgb); +#endif +#ifdef PREPASS_ALBEDO +gl_FragData[PREPASS_ALBEDO_INDEX]=vec4(sqAlbedo,1.0); +#endif +#ifdef PREPASS_REFLECTIVITY +#if defined(REFLECTIVITY) +gl_FragData[PREPASS_REFLECTIVITY_INDEX]=vec4(baseReflectivity.rgb,1.0); +#else +gl_FragData[PREPASS_REFLECTIVITY_INDEX]=vec4(0.0,0.0,0.0,1.0); +#endif +#endif +#endif +#if !defined(PREPASS) || defined(WEBGL2) +gl_FragColor=finalColor; +#endif +#include +} +`;ze.a.ShadersStore.pbrPixelShader=c_;var l_=`uniform mat4 view; +uniform mat4 viewProjection; +#ifdef ALBEDO +uniform mat4 albedoMatrix; +uniform vec2 vAlbedoInfos; +#endif +#ifdef AMBIENT +uniform mat4 ambientMatrix; +uniform vec4 vAmbientInfos; +#endif +#ifdef OPACITY +uniform mat4 opacityMatrix; +uniform vec2 vOpacityInfos; +#endif +#ifdef EMISSIVE +uniform vec2 vEmissiveInfos; +uniform mat4 emissiveMatrix; +#endif +#ifdef LIGHTMAP +uniform vec2 vLightmapInfos; +uniform mat4 lightmapMatrix; +#endif +#ifdef REFLECTIVITY +uniform vec3 vReflectivityInfos; +uniform mat4 reflectivityMatrix; +#endif +#ifdef METALLIC_REFLECTANCE +uniform vec2 vMetallicReflectanceInfos; +uniform mat4 metallicReflectanceMatrix; +#endif +#ifdef MICROSURFACEMAP +uniform vec2 vMicroSurfaceSamplerInfos; +uniform mat4 microSurfaceSamplerMatrix; +#endif +#ifdef BUMP +uniform vec3 vBumpInfos; +uniform mat4 bumpMatrix; +#endif +#ifdef POINTSIZE +uniform float pointSize; +#endif + +#ifdef REFLECTION +uniform vec2 vReflectionInfos; +uniform mat4 reflectionMatrix; +#endif + +#ifdef CLEARCOAT +#if defined(CLEARCOAT_TEXTURE) || defined(CLEARCOAT_TEXTURE_ROUGHNESS) +uniform vec4 vClearCoatInfos; +#endif +#ifdef CLEARCOAT_TEXTURE +uniform mat4 clearCoatMatrix; +#endif +#ifdef CLEARCOAT_TEXTURE_ROUGHNESS +uniform mat4 clearCoatRoughnessMatrix; +#endif +#ifdef CLEARCOAT_BUMP +uniform vec2 vClearCoatBumpInfos; +uniform mat4 clearCoatBumpMatrix; +#endif +#ifdef CLEARCOAT_TINT_TEXTURE +uniform vec2 vClearCoatTintInfos; +uniform mat4 clearCoatTintMatrix; +#endif +#endif + +#ifdef ANISOTROPIC +#ifdef ANISOTROPIC_TEXTURE +uniform vec2 vAnisotropyInfos; +uniform mat4 anisotropyMatrix; +#endif +#endif + +#ifdef SHEEN +#if defined(SHEEN_TEXTURE) || defined(SHEEN_TEXTURE_ROUGHNESS) +uniform vec4 vSheenInfos; +#endif +#ifdef SHEEN_TEXTURE +uniform mat4 sheenMatrix; +#endif +#ifdef SHEEN_TEXTURE_ROUGHNESS +uniform mat4 sheenRoughnessMatrix; +#endif +#endif + +#ifdef SUBSURFACE +#ifdef SS_REFRACTION +uniform vec4 vRefractionInfos; +uniform mat4 refractionMatrix; +#endif +#ifdef SS_THICKNESSANDMASK_TEXTURE +uniform vec2 vThicknessInfos; +uniform mat4 thicknessMatrix; +#endif +#endif +`;ze.a.IncludesShadersStore.pbrVertexDeclaration=l_,f(163),f(164),f(93),f(94),f(100),f(165),f(156),f(158);var u_=`precision highp float; +#include<__decl__pbrVertex> +#define CUSTOM_VERTEX_BEGIN + +attribute vec3 position; +#ifdef NORMAL +attribute vec3 normal; +#endif +#ifdef TANGENT +attribute vec4 tangent; +#endif +#ifdef UV1 +attribute vec2 uv; +#endif +#ifdef UV2 +attribute vec2 uv2; +#endif +#ifdef MAINUV1 +varying vec2 vMainUV1; +#endif +#ifdef MAINUV2 +varying vec2 vMainUV2; +#endif +#ifdef VERTEXCOLOR +attribute vec4 color; +#endif +#include +#include + +#include +#include +#if defined(ALBEDO) && ALBEDODIRECTUV == 0 +varying vec2 vAlbedoUV; +#endif +#if defined(DETAIL) && DETAILDIRECTUV == 0 +varying vec2 vDetailUV; +#endif +#if defined(AMBIENT) && AMBIENTDIRECTUV == 0 +varying vec2 vAmbientUV; +#endif +#if defined(OPACITY) && OPACITYDIRECTUV == 0 +varying vec2 vOpacityUV; +#endif +#if defined(EMISSIVE) && EMISSIVEDIRECTUV == 0 +varying vec2 vEmissiveUV; +#endif +#if defined(LIGHTMAP) && LIGHTMAPDIRECTUV == 0 +varying vec2 vLightmapUV; +#endif +#if defined(REFLECTIVITY) && REFLECTIVITYDIRECTUV == 0 +varying vec2 vReflectivityUV; +#endif +#if defined(MICROSURFACEMAP) && MICROSURFACEMAPDIRECTUV == 0 +varying vec2 vMicroSurfaceSamplerUV; +#endif +#if defined(METALLIC_REFLECTANCE) && METALLIC_REFLECTANCEDIRECTUV == 0 +varying vec2 vMetallicReflectanceUV; +#endif +#if defined(BUMP) && BUMPDIRECTUV == 0 +varying vec2 vBumpUV; +#endif +#ifdef CLEARCOAT +#if defined(CLEARCOAT_TEXTURE) && CLEARCOAT_TEXTUREDIRECTUV == 0 +varying vec2 vClearCoatUV; +#endif +#if defined(CLEARCOAT_TEXTURE_ROUGHNESS) && CLEARCOAT_TEXTURE_ROUGHNESSDIRECTUV == 0 +varying vec2 vClearCoatRoughnessUV; +#endif +#if defined(CLEARCOAT_BUMP) && CLEARCOAT_BUMPDIRECTUV == 0 +varying vec2 vClearCoatBumpUV; +#endif +#if defined(CLEARCOAT_TINT_TEXTURE) && CLEARCOAT_TINT_TEXTUREDIRECTUV == 0 +varying vec2 vClearCoatTintUV; +#endif +#endif +#ifdef SHEEN +#if defined(SHEEN_TEXTURE) && SHEEN_TEXTUREDIRECTUV == 0 +varying vec2 vSheenUV; +#endif +#if defined(SHEEN_TEXTURE_ROUGHNESS) && SHEEN_TEXTURE_ROUGHNESSDIRECTUV == 0 +varying vec2 vSheenRoughnessUV; +#endif +#endif +#ifdef ANISOTROPIC +#if defined(ANISOTROPIC_TEXTURE) && ANISOTROPIC_TEXTUREDIRECTUV == 0 +varying vec2 vAnisotropyUV; +#endif +#endif +#ifdef SUBSURFACE +#if defined(SS_THICKNESSANDMASK_TEXTURE) && SS_THICKNESSANDMASK_TEXTUREDIRECTUV == 0 +varying vec2 vThicknessUV; +#endif +#endif + +varying vec3 vPositionW; +#if DEBUGMODE>0 +varying vec4 vClipSpacePosition; +#endif +#ifdef NORMAL +varying vec3 vNormalW; +#if defined(USESPHERICALFROMREFLECTIONMAP) && defined(USESPHERICALINVERTEX) +varying vec3 vEnvironmentIrradiance; +#include +#endif +#endif +#ifdef VERTEXCOLOR +varying vec4 vColor; +#endif +#include +#include +#include +#include<__decl__lightFragment>[0..maxSimultaneousLights] +#include +#include[0..maxSimultaneousMorphTargets] +#ifdef REFLECTIONMAP_SKYBOX +varying vec3 vPositionUVW; +#endif +#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED) +varying vec3 vDirectionW; +#endif +#include +#define CUSTOM_VERTEX_DEFINITIONS +void main(void) { +#define CUSTOM_VERTEX_MAIN_BEGIN +vec3 positionUpdated=position; +#ifdef NORMAL +vec3 normalUpdated=normal; +#endif +#ifdef TANGENT +vec4 tangentUpdated=tangent; +#endif +#ifdef UV1 +vec2 uvUpdated=uv; +#endif +#include[0..maxSimultaneousMorphTargets] +#ifdef REFLECTIONMAP_SKYBOX +vPositionUVW=positionUpdated; +#endif +#define CUSTOM_VERTEX_UPDATE_POSITION +#define CUSTOM_VERTEX_UPDATE_NORMAL +#include +#if defined(PREPASS) && defined(PREPASS_VELOCITY) && !defined(BONES_VELOCITY_ENABLED) + +vCurrentPosition=viewProjection*finalWorld*vec4(positionUpdated,1.0); +vPreviousPosition=previousViewProjection*previousWorld*vec4(positionUpdated,1.0); +#endif +#include +vec4 worldPos=finalWorld*vec4(positionUpdated,1.0); +vPositionW=vec3(worldPos); +#include +#ifdef NORMAL +mat3 normalWorld=mat3(finalWorld); +#if defined(INSTANCES) && defined(THIN_INSTANCES) +vNormalW=normalUpdated/vec3(dot(normalWorld[0],normalWorld[0]),dot(normalWorld[1],normalWorld[1]),dot(normalWorld[2],normalWorld[2])); +vNormalW=normalize(normalWorld*vNormalW); +#else +#ifdef NONUNIFORMSCALING +normalWorld=transposeMat3(inverseMat3(normalWorld)); +#endif +vNormalW=normalize(normalWorld*normalUpdated); +#endif +#if defined(USESPHERICALFROMREFLECTIONMAP) && defined(USESPHERICALINVERTEX) +vec3 reflectionVector=vec3(reflectionMatrix*vec4(vNormalW,0)).xyz; +#ifdef REFLECTIONMAP_OPPOSITEZ +reflectionVector.z*=-1.0; +#endif +vEnvironmentIrradiance=computeEnvironmentIrradiance(reflectionVector); +#endif +#endif +#define CUSTOM_VERTEX_UPDATE_WORLDPOS +#ifdef MULTIVIEW +if (gl_ViewID_OVR == 0u) { +gl_Position=viewProjection*worldPos; +} else { +gl_Position=viewProjectionR*worldPos; +} +#else +gl_Position=viewProjection*worldPos; +#endif +#if DEBUGMODE>0 +vClipSpacePosition=gl_Position; +#endif +#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED) +vDirectionW=normalize(vec3(finalWorld*vec4(positionUpdated,0.0))); +#endif + +#ifndef UV1 +vec2 uvUpdated=vec2(0.,0.); +#endif +#ifndef UV2 +vec2 uv2=vec2(0.,0.); +#endif +#ifdef MAINUV1 +vMainUV1=uvUpdated; +#endif +#ifdef MAINUV2 +vMainUV2=uv2; +#endif +#if defined(ALBEDO) && ALBEDODIRECTUV == 0 +if (vAlbedoInfos.x == 0.) +{ +vAlbedoUV=vec2(albedoMatrix*vec4(uvUpdated,1.0,0.0)); +} +else +{ +vAlbedoUV=vec2(albedoMatrix*vec4(uv2,1.0,0.0)); +} +#endif +#if defined(DETAIL) && DETAILDIRECTUV == 0 +if (vDetailInfos.x == 0.) +{ +vDetailUV=vec2(detailMatrix*vec4(uvUpdated,1.0,0.0)); +} +else +{ +vDetailUV=vec2(detailMatrix*vec4(uv2,1.0,0.0)); +} +#endif +#if defined(AMBIENT) && AMBIENTDIRECTUV == 0 +if (vAmbientInfos.x == 0.) +{ +vAmbientUV=vec2(ambientMatrix*vec4(uvUpdated,1.0,0.0)); +} +else +{ +vAmbientUV=vec2(ambientMatrix*vec4(uv2,1.0,0.0)); +} +#endif +#if defined(OPACITY) && OPACITYDIRECTUV == 0 +if (vOpacityInfos.x == 0.) +{ +vOpacityUV=vec2(opacityMatrix*vec4(uvUpdated,1.0,0.0)); +} +else +{ +vOpacityUV=vec2(opacityMatrix*vec4(uv2,1.0,0.0)); +} +#endif +#if defined(EMISSIVE) && EMISSIVEDIRECTUV == 0 +if (vEmissiveInfos.x == 0.) +{ +vEmissiveUV=vec2(emissiveMatrix*vec4(uvUpdated,1.0,0.0)); +} +else +{ +vEmissiveUV=vec2(emissiveMatrix*vec4(uv2,1.0,0.0)); +} +#endif +#if defined(LIGHTMAP) && LIGHTMAPDIRECTUV == 0 +if (vLightmapInfos.x == 0.) +{ +vLightmapUV=vec2(lightmapMatrix*vec4(uvUpdated,1.0,0.0)); +} +else +{ +vLightmapUV=vec2(lightmapMatrix*vec4(uv2,1.0,0.0)); +} +#endif +#if defined(REFLECTIVITY) && REFLECTIVITYDIRECTUV == 0 +if (vReflectivityInfos.x == 0.) +{ +vReflectivityUV=vec2(reflectivityMatrix*vec4(uvUpdated,1.0,0.0)); +} +else +{ +vReflectivityUV=vec2(reflectivityMatrix*vec4(uv2,1.0,0.0)); +} +#endif +#if defined(MICROSURFACEMAP) && MICROSURFACEMAPDIRECTUV == 0 +if (vMicroSurfaceSamplerInfos.x == 0.) +{ +vMicroSurfaceSamplerUV=vec2(microSurfaceSamplerMatrix*vec4(uvUpdated,1.0,0.0)); +} +else +{ +vMicroSurfaceSamplerUV=vec2(microSurfaceSamplerMatrix*vec4(uv2,1.0,0.0)); +} +#endif +#if defined(METALLIC_REFLECTANCE) && METALLIC_REFLECTANCEDIRECTUV == 0 +if (vMetallicReflectanceInfos.x == 0.) +{ +vMetallicReflectanceUV=vec2(metallicReflectanceMatrix*vec4(uvUpdated,1.0,0.0)); +} +else +{ +vMetallicReflectanceUV=vec2(metallicReflectanceMatrix*vec4(uv2,1.0,0.0)); +} +#endif +#if defined(BUMP) && BUMPDIRECTUV == 0 +if (vBumpInfos.x == 0.) +{ +vBumpUV=vec2(bumpMatrix*vec4(uvUpdated,1.0,0.0)); +} +else +{ +vBumpUV=vec2(bumpMatrix*vec4(uv2,1.0,0.0)); +} +#endif +#ifdef CLEARCOAT +#if defined(CLEARCOAT_TEXTURE) && CLEARCOAT_TEXTUREDIRECTUV == 0 +if (vClearCoatInfos.x == 0.) +{ +vClearCoatUV=vec2(clearCoatMatrix*vec4(uvUpdated,1.0,0.0)); +} +else +{ +vClearCoatUV=vec2(clearCoatMatrix*vec4(uv2,1.0,0.0)); +} +#endif +#if defined(CLEARCOAT_TEXTURE_ROUGHNESS) && CLEARCOAT_TEXTURE_ROUGHNESSDIRECTUV == 0 +if (vClearCoatInfos.z == 0.) +{ +vClearCoatRoughnessUV=vec2(clearCoatRoughnessMatrix*vec4(uvUpdated,1.0,0.0)); +} +else +{ +vClearCoatRoughnessUV=vec2(clearCoatRoughnessMatrix*vec4(uv2,1.0,0.0)); +} +#endif +#if defined(CLEARCOAT_BUMP) && CLEARCOAT_BUMPDIRECTUV == 0 +if (vClearCoatBumpInfos.x == 0.) +{ +vClearCoatBumpUV=vec2(clearCoatBumpMatrix*vec4(uvUpdated,1.0,0.0)); +} +else +{ +vClearCoatBumpUV=vec2(clearCoatBumpMatrix*vec4(uv2,1.0,0.0)); +} +#endif +#if defined(CLEARCOAT_TINT_TEXTURE) && CLEARCOAT_TINT_TEXTUREDIRECTUV == 0 +if (vClearCoatTintInfos.x == 0.) +{ +vClearCoatTintUV=vec2(clearCoatTintMatrix*vec4(uvUpdated,1.0,0.0)); +} +else +{ +vClearCoatTintUV=vec2(clearCoatTintMatrix*vec4(uv2,1.0,0.0)); +} +#endif +#endif +#ifdef SHEEN +#if defined(SHEEN_TEXTURE) && SHEEN_TEXTUREDIRECTUV == 0 +if (vSheenInfos.x == 0.) +{ +vSheenUV=vec2(sheenMatrix*vec4(uvUpdated,1.0,0.0)); +} +else +{ +vSheenUV=vec2(sheenMatrix*vec4(uv2,1.0,0.0)); +} +#endif +#if defined(SHEEN_TEXTURE_ROUGHNESS) && SHEEN_TEXTURE_ROUGHNESSDIRECTUV == 0 +if (vSheenInfos.z == 0.) +{ +vSheenRoughnessUV=vec2(sheenRoughnessMatrix*vec4(uvUpdated,1.0,0.0)); +} +else +{ +vSheenRoughnessUV=vec2(sheenRoughnessMatrix*vec4(uv2,1.0,0.0)); +} +#endif +#endif +#ifdef ANISOTROPIC +#if defined(ANISOTROPIC_TEXTURE) && ANISOTROPIC_TEXTUREDIRECTUV == 0 +if (vAnisotropyInfos.x == 0.) +{ +vAnisotropyUV=vec2(anisotropyMatrix*vec4(uvUpdated,1.0,0.0)); +} +else +{ +vAnisotropyUV=vec2(anisotropyMatrix*vec4(uv2,1.0,0.0)); +} +#endif +#endif +#ifdef SUBSURFACE +#if defined(SS_THICKNESSANDMASK_TEXTURE) && SS_THICKNESSANDMASK_TEXTUREDIRECTUV == 0 +if (vThicknessInfos.x == 0.) +{ +vThicknessUV=vec2(thicknessMatrix*vec4(uvUpdated,1.0,0.0)); +} +else +{ +vThicknessUV=vec2(thicknessMatrix*vec4(uv2,1.0,0.0)); +} +#endif +#endif + +#include + +#include + +#include + +#include[0..maxSimultaneousLights] + +#ifdef VERTEXCOLOR +vColor=color; +#endif + +#ifdef POINTSIZE +gl_PointSize=pointSize; +#endif + +#include +#define CUSTOM_VERTEX_MAIN_END +}`;ze.a.ShadersStore.pbrVertexShader=u_;var na=f(92),xr={effect:null,subMesh:null},ws=function(r){function t(){var e=r.call(this)||this;return e.PBR=!0,e.NUM_SAMPLES="0",e.REALTIME_FILTERING=!1,e.MAINUV1=!1,e.MAINUV2=!1,e.UV1=!1,e.UV2=!1,e.ALBEDO=!1,e.GAMMAALBEDO=!1,e.ALBEDODIRECTUV=0,e.VERTEXCOLOR=!1,e.DETAIL=!1,e.DETAILDIRECTUV=0,e.DETAIL_NORMALBLENDMETHOD=0,e.AMBIENT=!1,e.AMBIENTDIRECTUV=0,e.AMBIENTINGRAYSCALE=!1,e.OPACITY=!1,e.VERTEXALPHA=!1,e.OPACITYDIRECTUV=0,e.OPACITYRGB=!1,e.ALPHATEST=!1,e.DEPTHPREPASS=!1,e.ALPHABLEND=!1,e.ALPHAFROMALBEDO=!1,e.ALPHATESTVALUE="0.5",e.SPECULAROVERALPHA=!1,e.RADIANCEOVERALPHA=!1,e.ALPHAFRESNEL=!1,e.LINEARALPHAFRESNEL=!1,e.PREMULTIPLYALPHA=!1,e.EMISSIVE=!1,e.EMISSIVEDIRECTUV=0,e.REFLECTIVITY=!1,e.REFLECTIVITYDIRECTUV=0,e.SPECULARTERM=!1,e.MICROSURFACEFROMREFLECTIVITYMAP=!1,e.MICROSURFACEAUTOMATIC=!1,e.LODBASEDMICROSFURACE=!1,e.MICROSURFACEMAP=!1,e.MICROSURFACEMAPDIRECTUV=0,e.METALLICWORKFLOW=!1,e.ROUGHNESSSTOREINMETALMAPALPHA=!1,e.ROUGHNESSSTOREINMETALMAPGREEN=!1,e.METALLNESSSTOREINMETALMAPBLUE=!1,e.AOSTOREINMETALMAPRED=!1,e.METALLIC_REFLECTANCE=!1,e.METALLIC_REFLECTANCEDIRECTUV=0,e.ENVIRONMENTBRDF=!1,e.ENVIRONMENTBRDF_RGBD=!1,e.NORMAL=!1,e.TANGENT=!1,e.BUMP=!1,e.BUMPDIRECTUV=0,e.OBJECTSPACE_NORMALMAP=!1,e.PARALLAX=!1,e.PARALLAXOCCLUSION=!1,e.NORMALXYSCALE=!0,e.LIGHTMAP=!1,e.LIGHTMAPDIRECTUV=0,e.USELIGHTMAPASSHADOWMAP=!1,e.GAMMALIGHTMAP=!1,e.RGBDLIGHTMAP=!1,e.REFLECTION=!1,e.REFLECTIONMAP_3D=!1,e.REFLECTIONMAP_SPHERICAL=!1,e.REFLECTIONMAP_PLANAR=!1,e.REFLECTIONMAP_CUBIC=!1,e.USE_LOCAL_REFLECTIONMAP_CUBIC=!1,e.REFLECTIONMAP_PROJECTION=!1,e.REFLECTIONMAP_SKYBOX=!1,e.REFLECTIONMAP_EXPLICIT=!1,e.REFLECTIONMAP_EQUIRECTANGULAR=!1,e.REFLECTIONMAP_EQUIRECTANGULAR_FIXED=!1,e.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED=!1,e.INVERTCUBICMAP=!1,e.USESPHERICALFROMREFLECTIONMAP=!1,e.USEIRRADIANCEMAP=!1,e.SPHERICAL_HARMONICS=!1,e.USESPHERICALINVERTEX=!1,e.REFLECTIONMAP_OPPOSITEZ=!1,e.LODINREFLECTIONALPHA=!1,e.GAMMAREFLECTION=!1,e.RGBDREFLECTION=!1,e.LINEARSPECULARREFLECTION=!1,e.RADIANCEOCCLUSION=!1,e.HORIZONOCCLUSION=!1,e.INSTANCES=!1,e.THIN_INSTANCES=!1,e.PREPASS=!1,e.PREPASS_IRRADIANCE=!1,e.PREPASS_IRRADIANCE_INDEX=-1,e.PREPASS_ALBEDO=!1,e.PREPASS_ALBEDO_INDEX=-1,e.PREPASS_DEPTHNORMAL=!1,e.PREPASS_DEPTHNORMAL_INDEX=-1,e.PREPASS_POSITION=!1,e.PREPASS_POSITION_INDEX=-1,e.PREPASS_VELOCITY=!1,e.PREPASS_VELOCITY_INDEX=-1,e.PREPASS_REFLECTIVITY=!1,e.PREPASS_REFLECTIVITY_INDEX=-1,e.SCENE_MRT_COUNT=0,e.NUM_BONE_INFLUENCERS=0,e.BonesPerMesh=0,e.BONETEXTURE=!1,e.BONES_VELOCITY_ENABLED=!1,e.NONUNIFORMSCALING=!1,e.MORPHTARGETS=!1,e.MORPHTARGETS_NORMAL=!1,e.MORPHTARGETS_TANGENT=!1,e.MORPHTARGETS_UV=!1,e.NUM_MORPH_INFLUENCERS=0,e.IMAGEPROCESSING=!1,e.VIGNETTE=!1,e.VIGNETTEBLENDMODEMULTIPLY=!1,e.VIGNETTEBLENDMODEOPAQUE=!1,e.TONEMAPPING=!1,e.TONEMAPPING_ACES=!1,e.CONTRAST=!1,e.COLORCURVES=!1,e.COLORGRADING=!1,e.COLORGRADING3D=!1,e.SAMPLER3DGREENDEPTH=!1,e.SAMPLER3DBGRMAP=!1,e.IMAGEPROCESSINGPOSTPROCESS=!1,e.EXPOSURE=!1,e.MULTIVIEW=!1,e.USEPHYSICALLIGHTFALLOFF=!1,e.USEGLTFLIGHTFALLOFF=!1,e.TWOSIDEDLIGHTING=!1,e.SHADOWFLOAT=!1,e.CLIPPLANE=!1,e.CLIPPLANE2=!1,e.CLIPPLANE3=!1,e.CLIPPLANE4=!1,e.CLIPPLANE5=!1,e.CLIPPLANE6=!1,e.POINTSIZE=!1,e.FOG=!1,e.LOGARITHMICDEPTH=!1,e.FORCENORMALFORWARD=!1,e.SPECULARAA=!1,e.CLEARCOAT=!1,e.CLEARCOAT_DEFAULTIOR=!1,e.CLEARCOAT_TEXTURE=!1,e.CLEARCOAT_TEXTURE_ROUGHNESS=!1,e.CLEARCOAT_TEXTUREDIRECTUV=0,e.CLEARCOAT_TEXTURE_ROUGHNESSDIRECTUV=0,e.CLEARCOAT_USE_ROUGHNESS_FROM_MAINTEXTURE=!1,e.CLEARCOAT_TEXTURE_ROUGHNESS_IDENTICAL=!1,e.CLEARCOAT_BUMP=!1,e.CLEARCOAT_BUMPDIRECTUV=0,e.CLEARCOAT_REMAP_F0=!0,e.CLEARCOAT_TINT=!1,e.CLEARCOAT_TINT_TEXTURE=!1,e.CLEARCOAT_TINT_TEXTUREDIRECTUV=0,e.ANISOTROPIC=!1,e.ANISOTROPIC_TEXTURE=!1,e.ANISOTROPIC_TEXTUREDIRECTUV=0,e.BRDF_V_HEIGHT_CORRELATED=!1,e.MS_BRDF_ENERGY_CONSERVATION=!1,e.SPECULAR_GLOSSINESS_ENERGY_CONSERVATION=!1,e.SHEEN=!1,e.SHEEN_TEXTURE=!1,e.SHEEN_TEXTURE_ROUGHNESS=!1,e.SHEEN_TEXTUREDIRECTUV=0,e.SHEEN_TEXTURE_ROUGHNESSDIRECTUV=0,e.SHEEN_LINKWITHALBEDO=!1,e.SHEEN_ROUGHNESS=!1,e.SHEEN_ALBEDOSCALING=!1,e.SHEEN_USE_ROUGHNESS_FROM_MAINTEXTURE=!1,e.SHEEN_TEXTURE_ROUGHNESS_IDENTICAL=!1,e.SUBSURFACE=!1,e.SS_REFRACTION=!1,e.SS_TRANSLUCENCY=!1,e.SS_SCATTERING=!1,e.SS_THICKNESSANDMASK_TEXTURE=!1,e.SS_THICKNESSANDMASK_TEXTUREDIRECTUV=0,e.SS_REFRACTIONMAP_3D=!1,e.SS_REFRACTIONMAP_OPPOSITEZ=!1,e.SS_LODINREFRACTIONALPHA=!1,e.SS_GAMMAREFRACTION=!1,e.SS_RGBDREFRACTION=!1,e.SS_LINEARSPECULARREFRACTION=!1,e.SS_LINKREFRACTIONTOTRANSPARENCY=!1,e.SS_ALBEDOFORREFRACTIONTINT=!1,e.SS_MASK_FROM_THICKNESS_TEXTURE=!1,e.SS_MASK_FROM_THICKNESS_TEXTURE_GLTF=!1,e.UNLIT=!1,e.DEBUGMODE=0,e.rebuild(),e}return Object(c.d)(t,r),t.prototype.reset=function(){r.prototype.reset.call(this),this.ALPHATESTVALUE="0.5",this.PBR=!0},t}($o.a),pn=function(r){function t(e,n){var i=r.call(this,e,n)||this;return i._directIntensity=1,i._emissiveIntensity=1,i._environmentIntensity=1,i._specularIntensity=1,i._lightingInfos=new u.f(i._directIntensity,i._emissiveIntensity,i._environmentIntensity,i._specularIntensity),i._disableBumpMap=!1,i._albedoTexture=null,i._ambientTexture=null,i._ambientTextureStrength=1,i._ambientTextureImpactOnAnalyticalLights=t.DEFAULT_AO_ON_ANALYTICAL_LIGHTS,i._opacityTexture=null,i._reflectionTexture=null,i._emissiveTexture=null,i._reflectivityTexture=null,i._metallicTexture=null,i._metallic=null,i._roughness=null,i._metallicF0Factor=1,i._metallicReflectanceColor=M.a.White(),i._metallicReflectanceTexture=null,i._microSurfaceTexture=null,i._bumpTexture=null,i._lightmapTexture=null,i._ambientColor=new M.a(0,0,0),i._albedoColor=new M.a(1,1,1),i._reflectivityColor=new M.a(1,1,1),i._reflectionColor=new M.a(1,1,1),i._emissiveColor=new M.a(0,0,0),i._microSurface=.9,i._useLightmapAsShadowmap=!1,i._useHorizonOcclusion=!0,i._useRadianceOcclusion=!0,i._useAlphaFromAlbedoTexture=!1,i._useSpecularOverAlpha=!0,i._useMicroSurfaceFromReflectivityMapAlpha=!1,i._useRoughnessFromMetallicTextureAlpha=!0,i._useRoughnessFromMetallicTextureGreen=!1,i._useMetallnessFromMetallicTextureBlue=!1,i._useAmbientOcclusionFromMetallicTextureRed=!1,i._useAmbientInGrayScale=!1,i._useAutoMicroSurfaceFromReflectivityMap=!1,i._lightFalloff=t.LIGHTFALLOFF_PHYSICAL,i._useRadianceOverAlpha=!0,i._useObjectSpaceNormalMap=!1,i._useParallax=!1,i._useParallaxOcclusion=!1,i._parallaxScaleBias=.05,i._disableLighting=!1,i._maxSimultaneousLights=4,i._invertNormalMapX=!1,i._invertNormalMapY=!1,i._twoSidedLighting=!1,i._alphaCutOff=.4,i._forceAlphaTest=!1,i._useAlphaFresnel=!1,i._useLinearAlphaFresnel=!1,i._environmentBRDFTexture=null,i._forceIrradianceInFragment=!1,i._realTimeFiltering=!1,i._realTimeFilteringQuality=h.a.TEXTURE_FILTERING_QUALITY_LOW,i._forceNormalForward=!1,i._enableSpecularAntiAliasing=!1,i._imageProcessingObserver=null,i._renderTargets=new di.a(16),i._globalAmbientColor=new M.a(0,0,0),i._useLogarithmicDepth=!1,i._unlit=!1,i._debugMode=0,i.debugMode=0,i.debugLimit=-1,i.debugFactor=1,i.clearCoat=new Ar(i._markAllSubMeshesAsTexturesDirty.bind(i)),i.anisotropy=new Pr(i._markAllSubMeshesAsTexturesDirty.bind(i)),i.brdf=new Cp(i._markAllSubMeshesAsMiscDirty.bind(i)),i.sheen=new ao(i._markAllSubMeshesAsTexturesDirty.bind(i)),i.detailMap=new na.a(i._markAllSubMeshesAsTexturesDirty.bind(i)),i._rebuildInParallel=!1,i._attachImageProcessingConfiguration(null),i.getRenderTargetTextures=function(){return i._renderTargets.reset(),ut.a.ReflectionTextureEnabled&&i._reflectionTexture&&i._reflectionTexture.isRenderTarget&&i._renderTargets.push(i._reflectionTexture),i.subSurface.fillRenderTargetTextures(i._renderTargets),i._renderTargets},i._environmentBRDFTexture=ta.GetEnvironmentBRDFTexture(n),i.subSurface=new so(i._markAllSubMeshesAsTexturesDirty.bind(i),i._markScenePrePassDirty.bind(i),n),i.prePassConfiguration=new Ns.a,i}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"realTimeFiltering",{get:function(){return this._realTimeFiltering},set:function(e){this._realTimeFiltering=e,this.markAsDirty(h.a.MATERIAL_TextureDirtyFlag)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"realTimeFilteringQuality",{get:function(){return this._realTimeFilteringQuality},set:function(e){this._realTimeFilteringQuality=e,this.markAsDirty(h.a.MATERIAL_TextureDirtyFlag)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canRenderToMRT",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype._attachImageProcessingConfiguration=function(e){var n=this;e!==this._imageProcessingConfiguration&&(this._imageProcessingConfiguration&&this._imageProcessingObserver&&this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver),this._imageProcessingConfiguration=e||this.getScene().imageProcessingConfiguration,this._imageProcessingConfiguration&&(this._imageProcessingObserver=this._imageProcessingConfiguration.onUpdateParameters.add(function(){n._markAllSubMeshesAsImageProcessingDirty()})))},Object.defineProperty(t.prototype,"hasRenderTargetTextures",{get:function(){return!!(ut.a.ReflectionTextureEnabled&&this._reflectionTexture&&this._reflectionTexture.isRenderTarget)||this.subSurface.hasRenderTargetTextures()},enumerable:!1,configurable:!0}),t.prototype.getClassName=function(){return"PBRBaseMaterial"},Object.defineProperty(t.prototype,"useLogarithmicDepth",{get:function(){return this._useLogarithmicDepth},set:function(e){this._useLogarithmicDepth=e&&this.getScene().getEngine().getCaps().fragmentDepthSupported},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_disableAlphaBlending",{get:function(){return this.subSurface.disableAlphaBlending||this._transparencyMode===t.PBRMATERIAL_OPAQUE||this._transparencyMode===t.PBRMATERIAL_ALPHATEST},enumerable:!1,configurable:!0}),t.prototype.needAlphaBlending=function(){return!this._disableAlphaBlending&&(this.alpha<1||this._opacityTexture!=null||this._shouldUseAlphaFromAlbedoTexture())},t.prototype.needAlphaTesting=function(){return!!this._forceAlphaTest||!this.subSurface.disableAlphaBlending&&this._hasAlphaChannel()&&(this._transparencyMode==null||this._transparencyMode===t.PBRMATERIAL_ALPHATEST)},t.prototype._shouldUseAlphaFromAlbedoTexture=function(){return this._albedoTexture!=null&&this._albedoTexture.hasAlpha&&this._useAlphaFromAlbedoTexture&&this._transparencyMode!==t.PBRMATERIAL_OPAQUE},t.prototype._hasAlphaChannel=function(){return this._albedoTexture!=null&&this._albedoTexture.hasAlpha||this._opacityTexture!=null},t.prototype.getAlphaTestTexture=function(){return this._albedoTexture},t.prototype.isReadyForSubMesh=function(e,n,i){if(n.effect&&this.isFrozen&&n.effect._wasPreviouslyReady)return!0;n._materialDefines||(n._materialDefines=new ws);var o=n._materialDefines;if(this._isReadyForSubMesh(n))return!0;var a=this.getScene(),s=a.getEngine();if(o._areTexturesDirty&&a.texturesEnabled){if(this._albedoTexture&&ut.a.DiffuseTextureEnabled&&!this._albedoTexture.isReadyOrNotBlocking()||this._ambientTexture&&ut.a.AmbientTextureEnabled&&!this._ambientTexture.isReadyOrNotBlocking()||this._opacityTexture&&ut.a.OpacityTextureEnabled&&!this._opacityTexture.isReadyOrNotBlocking())return!1;var d=this._getReflectionTexture();if(d&&ut.a.ReflectionTextureEnabled&&(!d.isReadyOrNotBlocking()||d.irradianceTexture&&!d.irradianceTexture.isReadyOrNotBlocking())||this._lightmapTexture&&ut.a.LightmapTextureEnabled&&!this._lightmapTexture.isReadyOrNotBlocking()||this._emissiveTexture&&ut.a.EmissiveTextureEnabled&&!this._emissiveTexture.isReadyOrNotBlocking())return!1;if(ut.a.SpecularTextureEnabled){if(this._metallicTexture){if(!this._metallicTexture.isReadyOrNotBlocking())return!1}else if(this._reflectivityTexture&&!this._reflectivityTexture.isReadyOrNotBlocking())return!1;if(this._metallicReflectanceTexture&&!this._metallicReflectanceTexture.isReadyOrNotBlocking()||this._microSurfaceTexture&&!this._microSurfaceTexture.isReadyOrNotBlocking())return!1}if(s.getCaps().standardDerivatives&&this._bumpTexture&&ut.a.BumpTextureEnabled&&!this._disableBumpMap&&!this._bumpTexture.isReady()||this._environmentBRDFTexture&&ut.a.ReflectionTextureEnabled&&!this._environmentBRDFTexture.isReady())return!1}if(!(this.subSurface.isReadyForSubMesh(o,a)&&this.clearCoat.isReadyForSubMesh(o,a,s,this._disableBumpMap)&&this.sheen.isReadyForSubMesh(o,a)&&this.anisotropy.isReadyForSubMesh(o,a)&&this.detailMap.isReadyForSubMesh(o,a))||o._areImageProcessingDirty&&this._imageProcessingConfiguration&&!this._imageProcessingConfiguration.isReady())return!1;s.getCaps().standardDerivatives||e.isVerticesDataPresent(Oe.b.NormalKind)||(e.createNormals(!0),l.a.Warn("PBRMaterial: Normals have been created for the mesh: "+e.name));var p=n.effect,b=o._areLightsDisposed,x=this._prepareEffect(e,o,this.onCompiled,this.onError,i,null,n.getRenderingMesh().hasThinInstances);if(x)if(this._onEffectCreatedObservable&&(xr.effect=x,xr.subMesh=n,this._onEffectCreatedObservable.notifyObservers(xr)),this.allowShaderHotSwapping&&p&&!x.isReady()){if(x=p,this._rebuildInParallel=!0,o.markAsUnprocessed(),b)return o._areLightsDisposed=!0,!1}else this._rebuildInParallel=!1,a.resetCachedMaterial(),n.setEffect(x,o),this.buildUniformLayout();return!(!n.effect||!n.effect.isReady())&&(o._renderId=a.getRenderId(),n.effect._wasPreviouslyReady=!0,!0)},t.prototype.isMetallicWorkflow=function(){return!(this._metallic==null&&this._roughness==null&&!this._metallicTexture)},t.prototype._prepareEffect=function(e,n,i,o,a,s,d){if(i===void 0&&(i=null),o===void 0&&(o=null),a===void 0&&(a=null),s===void 0&&(s=null),this._prepareDefines(e,n,a,s,d),!n.isDirty)return null;n.markAsProcessed();var p=this.getScene().getEngine(),b=new Sr.a,x=0;n.USESPHERICALINVERTEX&&b.addFallback(x++,"USESPHERICALINVERTEX"),n.FOG&&b.addFallback(x,"FOG"),n.SPECULARAA&&b.addFallback(x,"SPECULARAA"),n.POINTSIZE&&b.addFallback(x,"POINTSIZE"),n.LOGARITHMICDEPTH&&b.addFallback(x,"LOGARITHMICDEPTH"),n.PARALLAX&&b.addFallback(x,"PARALLAX"),n.PARALLAXOCCLUSION&&b.addFallback(x++,"PARALLAXOCCLUSION"),x=Pr.AddFallbacks(n,b,x),x=Pr.AddFallbacks(n,b,x),x=so.AddFallbacks(n,b,x),x=ao.AddFallbacks(n,b,x),n.ENVIRONMENTBRDF&&b.addFallback(x++,"ENVIRONMENTBRDF"),n.TANGENT&&b.addFallback(x++,"TANGENT"),n.BUMP&&b.addFallback(x++,"BUMP"),x=et.a.HandleFallbacksForShadows(n,b,this._maxSimultaneousLights,x++),n.SPECULARTERM&&b.addFallback(x++,"SPECULARTERM"),n.USESPHERICALFROMREFLECTIONMAP&&b.addFallback(x++,"USESPHERICALFROMREFLECTIONMAP"),n.USEIRRADIANCEMAP&&b.addFallback(x++,"USEIRRADIANCEMAP"),n.LIGHTMAP&&b.addFallback(x++,"LIGHTMAP"),n.NORMAL&&b.addFallback(x++,"NORMAL"),n.AMBIENT&&b.addFallback(x++,"AMBIENT"),n.EMISSIVE&&b.addFallback(x++,"EMISSIVE"),n.VERTEXCOLOR&&b.addFallback(x++,"VERTEXCOLOR"),n.MORPHTARGETS&&b.addFallback(x++,"MORPHTARGETS"),n.MULTIVIEW&&b.addFallback(0,"MULTIVIEW");var O=[Oe.b.PositionKind];n.NORMAL&&O.push(Oe.b.NormalKind),n.TANGENT&&O.push(Oe.b.TangentKind),n.UV1&&O.push(Oe.b.UVKind),n.UV2&&O.push(Oe.b.UV2Kind),n.VERTEXCOLOR&&O.push(Oe.b.ColorKind),et.a.PrepareAttributesForBones(O,e,n,b),et.a.PrepareAttributesForInstances(O,n),et.a.PrepareAttributesForMorphTargets(O,e,n);var B="pbr",F=["world","view","viewProjection","vEyePosition","vLightsType","vAmbientColor","vAlbedoColor","vReflectivityColor","vMetallicReflectanceFactors","vEmissiveColor","visibility","vReflectionColor","vFogInfos","vFogColor","pointSize","vAlbedoInfos","vAmbientInfos","vOpacityInfos","vReflectionInfos","vReflectionPosition","vReflectionSize","vEmissiveInfos","vReflectivityInfos","vReflectionFilteringInfo","vMetallicReflectanceInfos","vMicroSurfaceSamplerInfos","vBumpInfos","vLightmapInfos","mBones","vClipPlane","vClipPlane2","vClipPlane3","vClipPlane4","vClipPlane5","vClipPlane6","albedoMatrix","ambientMatrix","opacityMatrix","reflectionMatrix","emissiveMatrix","reflectivityMatrix","normalMatrix","microSurfaceSamplerMatrix","bumpMatrix","lightmapMatrix","metallicReflectanceMatrix","vLightingIntensity","logarithmicDepthConstant","vSphericalX","vSphericalY","vSphericalZ","vSphericalXX_ZZ","vSphericalYY_ZZ","vSphericalZZ","vSphericalXY","vSphericalYZ","vSphericalZX","vSphericalL00","vSphericalL1_1","vSphericalL10","vSphericalL11","vSphericalL2_2","vSphericalL2_1","vSphericalL20","vSphericalL21","vSphericalL22","vReflectionMicrosurfaceInfos","vTangentSpaceParams","boneTextureWidth","vDebugMode"],z=["albedoSampler","reflectivitySampler","ambientSampler","emissiveSampler","bumpSampler","lightmapSampler","opacitySampler","reflectionSampler","reflectionSamplerLow","reflectionSamplerHigh","irradianceSampler","microSurfaceSampler","environmentBrdfSampler","boneSampler","metallicReflectanceSampler"],J=["Material","Scene"];na.a.AddUniforms(F),na.a.AddSamplers(z),so.AddUniforms(F),so.AddSamplers(z),Ar.AddUniforms(F),Ar.AddSamplers(z),Pr.AddUniforms(F),Pr.AddSamplers(z),ao.AddUniforms(F),ao.AddSamplers(z),Ns.a.AddUniforms(F),Ns.a.AddSamplers(F),vn.a&&(vn.a.PrepareUniforms(F,n),vn.a.PrepareSamplers(z,n)),et.a.PrepareUniformsAndSamplersList({uniformsNames:F,uniformBuffersNames:J,samplers:z,defines:n,maxSimultaneousLights:this._maxSimultaneousLights});var ie={};this.customShaderNameResolve&&(B=this.customShaderNameResolve(B,F,J,z,n,O,ie));var se=n.toString();return p.createEffect(B,{attributes:O,uniformsNames:F,uniformBuffersNames:J,samplers:z,defines:se,fallbacks:b,onCompiled:i,onError:o,indexParameters:{maxSimultaneousLights:this._maxSimultaneousLights,maxSimultaneousMorphTargets:n.NUM_MORPH_INFLUENCERS},processFinalCode:ie.processFinalCode,multiTarget:n.PREPASS},p)},t.prototype._prepareDefines=function(e,n,i,o,a){i===void 0&&(i=null),o===void 0&&(o=null),a===void 0&&(a=!1);var s=this.getScene(),d=s.getEngine();if(et.a.PrepareDefinesForLights(s,e,n,!0,this._maxSimultaneousLights,this._disableLighting),n._needNormals=!0,et.a.PrepareDefinesForMultiview(s,n),et.a.PrepareDefinesForPrePass(s,n,this.canRenderToMRT),n.METALLICWORKFLOW=this.isMetallicWorkflow(),n._areTexturesDirty){if(n._needUVs=!1,s.texturesEnabled){s.getEngine().getCaps().textureLOD&&(n.LODBASEDMICROSFURACE=!0),this._albedoTexture&&ut.a.DiffuseTextureEnabled?(et.a.PrepareDefinesForMergedUV(this._albedoTexture,n,"ALBEDO"),n.GAMMAALBEDO=this._albedoTexture.gammaSpace):n.ALBEDO=!1,this._ambientTexture&&ut.a.AmbientTextureEnabled?(et.a.PrepareDefinesForMergedUV(this._ambientTexture,n,"AMBIENT"),n.AMBIENTINGRAYSCALE=this._useAmbientInGrayScale):n.AMBIENT=!1,this._opacityTexture&&ut.a.OpacityTextureEnabled?(et.a.PrepareDefinesForMergedUV(this._opacityTexture,n,"OPACITY"),n.OPACITYRGB=this._opacityTexture.getAlphaFromRGB):n.OPACITY=!1;var p=this._getReflectionTexture();if(p&&ut.a.ReflectionTextureEnabled){switch(n.REFLECTION=!0,n.GAMMAREFLECTION=p.gammaSpace,n.RGBDREFLECTION=p.isRGBD,n.REFLECTIONMAP_OPPOSITEZ=this.getScene().useRightHandedSystem?!p.invertZ:p.invertZ,n.LODINREFLECTIONALPHA=p.lodLevelInAlpha,n.LINEARSPECULARREFLECTION=p.linearSpecularLOD,this.realTimeFiltering&&this.realTimeFilteringQuality>0?(n.NUM_SAMPLES=""+this.realTimeFilteringQuality,d.webGLVersion>1&&(n.NUM_SAMPLES=n.NUM_SAMPLES+"u"),n.REALTIME_FILTERING=!0):n.REALTIME_FILTERING=!1,p.coordinatesMode===we.a.INVCUBIC_MODE&&(n.INVERTCUBICMAP=!0),n.REFLECTIONMAP_3D=p.isCube,n.REFLECTIONMAP_CUBIC=!1,n.REFLECTIONMAP_EXPLICIT=!1,n.REFLECTIONMAP_PLANAR=!1,n.REFLECTIONMAP_PROJECTION=!1,n.REFLECTIONMAP_SKYBOX=!1,n.REFLECTIONMAP_SPHERICAL=!1,n.REFLECTIONMAP_EQUIRECTANGULAR=!1,n.REFLECTIONMAP_EQUIRECTANGULAR_FIXED=!1,n.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED=!1,p.coordinatesMode){case we.a.EXPLICIT_MODE:n.REFLECTIONMAP_EXPLICIT=!0;break;case we.a.PLANAR_MODE:n.REFLECTIONMAP_PLANAR=!0;break;case we.a.PROJECTION_MODE:n.REFLECTIONMAP_PROJECTION=!0;break;case we.a.SKYBOX_MODE:n.REFLECTIONMAP_SKYBOX=!0;break;case we.a.SPHERICAL_MODE:n.REFLECTIONMAP_SPHERICAL=!0;break;case we.a.EQUIRECTANGULAR_MODE:n.REFLECTIONMAP_EQUIRECTANGULAR=!0;break;case we.a.FIXED_EQUIRECTANGULAR_MODE:n.REFLECTIONMAP_EQUIRECTANGULAR_FIXED=!0;break;case we.a.FIXED_EQUIRECTANGULAR_MIRRORED_MODE:n.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED=!0;break;case we.a.CUBIC_MODE:case we.a.INVCUBIC_MODE:default:n.REFLECTIONMAP_CUBIC=!0,n.USE_LOCAL_REFLECTIONMAP_CUBIC=!!p.boundingBoxSize}p.coordinatesMode!==we.a.SKYBOX_MODE&&(p.irradianceTexture?(n.USEIRRADIANCEMAP=!0,n.USESPHERICALFROMREFLECTIONMAP=!1):p.isCube&&(n.USESPHERICALFROMREFLECTIONMAP=!0,n.USEIRRADIANCEMAP=!1,this._forceIrradianceInFragment||this.realTimeFiltering||s.getEngine().getCaps().maxVaryingVectors<=8?n.USESPHERICALINVERTEX=!1:n.USESPHERICALINVERTEX=!0))}else n.REFLECTION=!1,n.REFLECTIONMAP_3D=!1,n.REFLECTIONMAP_SPHERICAL=!1,n.REFLECTIONMAP_PLANAR=!1,n.REFLECTIONMAP_CUBIC=!1,n.USE_LOCAL_REFLECTIONMAP_CUBIC=!1,n.REFLECTIONMAP_PROJECTION=!1,n.REFLECTIONMAP_SKYBOX=!1,n.REFLECTIONMAP_EXPLICIT=!1,n.REFLECTIONMAP_EQUIRECTANGULAR=!1,n.REFLECTIONMAP_EQUIRECTANGULAR_FIXED=!1,n.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED=!1,n.INVERTCUBICMAP=!1,n.USESPHERICALFROMREFLECTIONMAP=!1,n.USEIRRADIANCEMAP=!1,n.USESPHERICALINVERTEX=!1,n.REFLECTIONMAP_OPPOSITEZ=!1,n.LODINREFLECTIONALPHA=!1,n.GAMMAREFLECTION=!1,n.RGBDREFLECTION=!1,n.LINEARSPECULARREFLECTION=!1;this._lightmapTexture&&ut.a.LightmapTextureEnabled?(et.a.PrepareDefinesForMergedUV(this._lightmapTexture,n,"LIGHTMAP"),n.USELIGHTMAPASSHADOWMAP=this._useLightmapAsShadowmap,n.GAMMALIGHTMAP=this._lightmapTexture.gammaSpace,n.RGBDLIGHTMAP=this._lightmapTexture.isRGBD):n.LIGHTMAP=!1,this._emissiveTexture&&ut.a.EmissiveTextureEnabled?et.a.PrepareDefinesForMergedUV(this._emissiveTexture,n,"EMISSIVE"):n.EMISSIVE=!1,ut.a.SpecularTextureEnabled?(this._metallicTexture?(et.a.PrepareDefinesForMergedUV(this._metallicTexture,n,"REFLECTIVITY"),n.ROUGHNESSSTOREINMETALMAPALPHA=this._useRoughnessFromMetallicTextureAlpha,n.ROUGHNESSSTOREINMETALMAPGREEN=!this._useRoughnessFromMetallicTextureAlpha&&this._useRoughnessFromMetallicTextureGreen,n.METALLNESSSTOREINMETALMAPBLUE=this._useMetallnessFromMetallicTextureBlue,n.AOSTOREINMETALMAPRED=this._useAmbientOcclusionFromMetallicTextureRed):this._reflectivityTexture?(et.a.PrepareDefinesForMergedUV(this._reflectivityTexture,n,"REFLECTIVITY"),n.MICROSURFACEFROMREFLECTIVITYMAP=this._useMicroSurfaceFromReflectivityMapAlpha,n.MICROSURFACEAUTOMATIC=this._useAutoMicroSurfaceFromReflectivityMap):n.REFLECTIVITY=!1,this._metallicReflectanceTexture?et.a.PrepareDefinesForMergedUV(this._metallicReflectanceTexture,n,"METALLIC_REFLECTANCE"):n.METALLIC_REFLECTANCE=!1,this._microSurfaceTexture?et.a.PrepareDefinesForMergedUV(this._microSurfaceTexture,n,"MICROSURFACEMAP"):n.MICROSURFACEMAP=!1):(n.REFLECTIVITY=!1,n.MICROSURFACEMAP=!1),s.getEngine().getCaps().standardDerivatives&&this._bumpTexture&&ut.a.BumpTextureEnabled&&!this._disableBumpMap?(et.a.PrepareDefinesForMergedUV(this._bumpTexture,n,"BUMP"),this._useParallax&&this._albedoTexture&&ut.a.DiffuseTextureEnabled?(n.PARALLAX=!0,n.PARALLAXOCCLUSION=!!this._useParallaxOcclusion):n.PARALLAX=!1,n.OBJECTSPACE_NORMALMAP=this._useObjectSpaceNormalMap):n.BUMP=!1,this._environmentBRDFTexture&&ut.a.ReflectionTextureEnabled?(n.ENVIRONMENTBRDF=!0,n.ENVIRONMENTBRDF_RGBD=this._environmentBRDFTexture.isRGBD):(n.ENVIRONMENTBRDF=!1,n.ENVIRONMENTBRDF_RGBD=!1),this._shouldUseAlphaFromAlbedoTexture()?n.ALPHAFROMALBEDO=!0:n.ALPHAFROMALBEDO=!1}n.SPECULAROVERALPHA=this._useSpecularOverAlpha,this._lightFalloff===t.LIGHTFALLOFF_STANDARD?(n.USEPHYSICALLIGHTFALLOFF=!1,n.USEGLTFLIGHTFALLOFF=!1):this._lightFalloff===t.LIGHTFALLOFF_GLTF?(n.USEPHYSICALLIGHTFALLOFF=!1,n.USEGLTFLIGHTFALLOFF=!0):(n.USEPHYSICALLIGHTFALLOFF=!0,n.USEGLTFLIGHTFALLOFF=!1),n.RADIANCEOVERALPHA=this._useRadianceOverAlpha,!this.backFaceCulling&&this._twoSidedLighting?n.TWOSIDEDLIGHTING=!0:n.TWOSIDEDLIGHTING=!1,n.SPECULARAA=s.getEngine().getCaps().standardDerivatives&&this._enableSpecularAntiAliasing}(n._areTexturesDirty||n._areMiscDirty)&&(n.ALPHATESTVALUE=this._alphaCutOff+(this._alphaCutOff%1==0?".":""),n.PREMULTIPLYALPHA=this.alphaMode===h.a.ALPHA_PREMULTIPLIED||this.alphaMode===h.a.ALPHA_PREMULTIPLIED_PORTERDUFF,n.ALPHABLEND=this.needAlphaBlendingForMesh(e),n.ALPHAFRESNEL=this._useAlphaFresnel||this._useLinearAlphaFresnel,n.LINEARALPHAFRESNEL=this._useLinearAlphaFresnel),n._areImageProcessingDirty&&this._imageProcessingConfiguration&&this._imageProcessingConfiguration.prepareDefines(n),n.FORCENORMALFORWARD=this._forceNormalForward,n.RADIANCEOCCLUSION=this._useRadianceOcclusion,n.HORIZONOCCLUSION=this._useHorizonOcclusion,n._areMiscDirty&&(et.a.PrepareDefinesForMisc(e,s,this._useLogarithmicDepth,this.pointsCloud,this.fogEnabled,this._shouldTurnAlphaTestOn(e)||this._forceAlphaTest,n),n.UNLIT=this._unlit||(this.pointsCloud||this.wireframe)&&!e.isVerticesDataPresent(Oe.b.NormalKind),n.DEBUGMODE=this._debugMode),this.detailMap.prepareDefines(n,s),this.subSurface.prepareDefines(n,s),this.clearCoat.prepareDefines(n,s),this.anisotropy.prepareDefines(n,e,s),this.brdf.prepareDefines(n),this.sheen.prepareDefines(n,s),et.a.PrepareDefinesForFrameBoundValues(s,d,n,!!i,o,a),et.a.PrepareDefinesForAttributes(e,n,!0,!0,!0,this._transparencyMode!==t.PBRMATERIAL_OPAQUE)},t.prototype.forceCompilation=function(e,n,i){var o=this,a=Object(c.a)({clipPlane:!1,useInstances:!1},i),s=new ws,d=this._prepareEffect(e,s,void 0,void 0,a.useInstances,a.clipPlane,e.hasThinInstances);this._onEffectCreatedObservable&&(xr.effect=d,xr.subMesh=null,this._onEffectCreatedObservable.notifyObservers(xr)),d.isReady()?n&&n(this):d.onCompileObservable.add(function(){n&&n(o)})},t.prototype.buildUniformLayout=function(){var e=this._uniformBuffer;e.addUniform("vAlbedoInfos",2),e.addUniform("vAmbientInfos",4),e.addUniform("vOpacityInfos",2),e.addUniform("vEmissiveInfos",2),e.addUniform("vLightmapInfos",2),e.addUniform("vReflectivityInfos",3),e.addUniform("vMicroSurfaceSamplerInfos",2),e.addUniform("vReflectionInfos",2),e.addUniform("vReflectionFilteringInfo",2),e.addUniform("vReflectionPosition",3),e.addUniform("vReflectionSize",3),e.addUniform("vBumpInfos",3),e.addUniform("albedoMatrix",16),e.addUniform("ambientMatrix",16),e.addUniform("opacityMatrix",16),e.addUniform("emissiveMatrix",16),e.addUniform("lightmapMatrix",16),e.addUniform("reflectivityMatrix",16),e.addUniform("microSurfaceSamplerMatrix",16),e.addUniform("bumpMatrix",16),e.addUniform("vTangentSpaceParams",2),e.addUniform("reflectionMatrix",16),e.addUniform("vReflectionColor",3),e.addUniform("vAlbedoColor",4),e.addUniform("vLightingIntensity",4),e.addUniform("vReflectionMicrosurfaceInfos",3),e.addUniform("pointSize",1),e.addUniform("vReflectivityColor",4),e.addUniform("vEmissiveColor",3),e.addUniform("visibility",1),e.addUniform("vMetallicReflectanceFactors",4),e.addUniform("vMetallicReflectanceInfos",2),e.addUniform("metallicReflectanceMatrix",16),Ar.PrepareUniformBuffer(e),Pr.PrepareUniformBuffer(e),ao.PrepareUniformBuffer(e),so.PrepareUniformBuffer(e),na.a.PrepareUniformBuffer(e),e.create()},t.prototype.unbind=function(){if(this._activeEffect){var e=!1;this._reflectionTexture&&this._reflectionTexture.isRenderTarget&&(this._activeEffect.setTexture("reflection2DSampler",null),e=!0),this.subSurface.unbind(this._activeEffect)&&(e=!0),e&&this._markAllSubMeshesAsTexturesDirty()}r.prototype.unbind.call(this)},t.prototype.bindForSubMesh=function(e,n,i){var o=this.getScene(),a=i._materialDefines;if(a){var s=i.effect;if(s){this._activeEffect=s,a.INSTANCES&&!a.THIN_INSTANCES||this.bindOnlyWorldMatrix(e),this.prePassConfiguration.bindForSubMesh(this._activeEffect,o,n,e,this.isFrozen),a.OBJECTSPACE_NORMALMAP&&(e.toNormalMatrix(this._normalMatrix),this.bindOnlyNormalMatrix(this._normalMatrix));var d=this._mustRebind(o,s,n.visibility);et.a.BindBonesParameters(n,this._activeEffect,this.prePassConfiguration);var p=null,b=this._uniformBuffer;if(d){var x=o.getEngine();if(b.bindToEffect(s,"Material"),this.bindViewProjection(s),p=this._getReflectionTexture(),!b.useUbo||!this.isFrozen||!b.isSync){if(o.texturesEnabled){if(this._albedoTexture&&ut.a.DiffuseTextureEnabled&&(b.updateFloat2("vAlbedoInfos",this._albedoTexture.coordinatesIndex,this._albedoTexture.level),et.a.BindTextureMatrix(this._albedoTexture,b,"albedo")),this._ambientTexture&&ut.a.AmbientTextureEnabled&&(b.updateFloat4("vAmbientInfos",this._ambientTexture.coordinatesIndex,this._ambientTexture.level,this._ambientTextureStrength,this._ambientTextureImpactOnAnalyticalLights),et.a.BindTextureMatrix(this._ambientTexture,b,"ambient")),this._opacityTexture&&ut.a.OpacityTextureEnabled&&(b.updateFloat2("vOpacityInfos",this._opacityTexture.coordinatesIndex,this._opacityTexture.level),et.a.BindTextureMatrix(this._opacityTexture,b,"opacity")),p&&ut.a.ReflectionTextureEnabled){if(b.updateMatrix("reflectionMatrix",p.getReflectionTextureMatrix()),b.updateFloat2("vReflectionInfos",p.level,0),p.boundingBoxSize){var O=p;b.updateVector3("vReflectionPosition",O.boundingBoxPosition),b.updateVector3("vReflectionSize",O.boundingBoxSize)}if(this.realTimeFiltering){var B=p.getSize().width;b.updateFloat2("vReflectionFilteringInfo",B,$.a.Log2(B))}if(!a.USEIRRADIANCEMAP){var F=p.sphericalPolynomial;if(a.USESPHERICALFROMREFLECTIONMAP&&F)if(a.SPHERICAL_HARMONICS){var z=F.preScaledHarmonics;this._activeEffect.setVector3("vSphericalL00",z.l00),this._activeEffect.setVector3("vSphericalL1_1",z.l1_1),this._activeEffect.setVector3("vSphericalL10",z.l10),this._activeEffect.setVector3("vSphericalL11",z.l11),this._activeEffect.setVector3("vSphericalL2_2",z.l2_2),this._activeEffect.setVector3("vSphericalL2_1",z.l2_1),this._activeEffect.setVector3("vSphericalL20",z.l20),this._activeEffect.setVector3("vSphericalL21",z.l21),this._activeEffect.setVector3("vSphericalL22",z.l22)}else this._activeEffect.setFloat3("vSphericalX",F.x.x,F.x.y,F.x.z),this._activeEffect.setFloat3("vSphericalY",F.y.x,F.y.y,F.y.z),this._activeEffect.setFloat3("vSphericalZ",F.z.x,F.z.y,F.z.z),this._activeEffect.setFloat3("vSphericalXX_ZZ",F.xx.x-F.zz.x,F.xx.y-F.zz.y,F.xx.z-F.zz.z),this._activeEffect.setFloat3("vSphericalYY_ZZ",F.yy.x-F.zz.x,F.yy.y-F.zz.y,F.yy.z-F.zz.z),this._activeEffect.setFloat3("vSphericalZZ",F.zz.x,F.zz.y,F.zz.z),this._activeEffect.setFloat3("vSphericalXY",F.xy.x,F.xy.y,F.xy.z),this._activeEffect.setFloat3("vSphericalYZ",F.yz.x,F.yz.y,F.yz.z),this._activeEffect.setFloat3("vSphericalZX",F.zx.x,F.zx.y,F.zx.z)}b.updateFloat3("vReflectionMicrosurfaceInfos",p.getSize().width,p.lodGenerationScale,p.lodGenerationOffset)}this._emissiveTexture&&ut.a.EmissiveTextureEnabled&&(b.updateFloat2("vEmissiveInfos",this._emissiveTexture.coordinatesIndex,this._emissiveTexture.level),et.a.BindTextureMatrix(this._emissiveTexture,b,"emissive")),this._lightmapTexture&&ut.a.LightmapTextureEnabled&&(b.updateFloat2("vLightmapInfos",this._lightmapTexture.coordinatesIndex,this._lightmapTexture.level),et.a.BindTextureMatrix(this._lightmapTexture,b,"lightmap")),ut.a.SpecularTextureEnabled&&(this._metallicTexture?(b.updateFloat3("vReflectivityInfos",this._metallicTexture.coordinatesIndex,this._metallicTexture.level,this._ambientTextureStrength),et.a.BindTextureMatrix(this._metallicTexture,b,"reflectivity")):this._reflectivityTexture&&(b.updateFloat3("vReflectivityInfos",this._reflectivityTexture.coordinatesIndex,this._reflectivityTexture.level,1),et.a.BindTextureMatrix(this._reflectivityTexture,b,"reflectivity")),this._metallicReflectanceTexture&&(b.updateFloat2("vMetallicReflectanceInfos",this._metallicReflectanceTexture.coordinatesIndex,this._metallicReflectanceTexture.level),et.a.BindTextureMatrix(this._metallicReflectanceTexture,b,"metallicReflectance")),this._microSurfaceTexture&&(b.updateFloat2("vMicroSurfaceSamplerInfos",this._microSurfaceTexture.coordinatesIndex,this._microSurfaceTexture.level),et.a.BindTextureMatrix(this._microSurfaceTexture,b,"microSurfaceSampler"))),this._bumpTexture&&x.getCaps().standardDerivatives&&ut.a.BumpTextureEnabled&&!this._disableBumpMap&&(b.updateFloat3("vBumpInfos",this._bumpTexture.coordinatesIndex,this._bumpTexture.level,this._parallaxScaleBias),et.a.BindTextureMatrix(this._bumpTexture,b,"bump"),o._mirroredCameraPosition?b.updateFloat2("vTangentSpaceParams",this._invertNormalMapX?1:-1,this._invertNormalMapY?1:-1):b.updateFloat2("vTangentSpaceParams",this._invertNormalMapX?-1:1,this._invertNormalMapY?-1:1))}if(this.pointsCloud&&b.updateFloat("pointSize",this.pointSize),a.METALLICWORKFLOW){M.c.Color3[0].r=this._metallic===void 0||this._metallic===null?1:this._metallic,M.c.Color3[0].g=this._roughness===void 0||this._roughness===null?1:this._roughness,b.updateColor4("vReflectivityColor",M.c.Color3[0],1);var J=this.subSurface.indexOfRefraction,ie=Math.pow((J-1)/(J+1),2);this._metallicReflectanceColor.scaleToRef(ie*this._metallicF0Factor,M.c.Color3[0]);var se=this._metallicF0Factor;b.updateColor4("vMetallicReflectanceFactors",M.c.Color3[0],se)}else b.updateColor4("vReflectivityColor",this._reflectivityColor,this._microSurface);b.updateColor3("vEmissiveColor",ut.a.EmissiveTextureEnabled?this._emissiveColor:M.a.BlackReadOnly),b.updateColor3("vReflectionColor",this._reflectionColor),!a.SS_REFRACTION&&this.subSurface.linkRefractionWithTransparency?b.updateColor4("vAlbedoColor",this._albedoColor,1):b.updateColor4("vAlbedoColor",this._albedoColor,this.alpha),this._lightingInfos.x=this._directIntensity,this._lightingInfos.y=this._emissiveIntensity,this._lightingInfos.z=this._environmentIntensity*o.environmentIntensity,this._lightingInfos.w=this._specularIntensity,b.updateVector4("vLightingIntensity",this._lightingInfos)}b.updateFloat("visibility",n.visibility),o.texturesEnabled&&(this._albedoTexture&&ut.a.DiffuseTextureEnabled&&b.setTexture("albedoSampler",this._albedoTexture),this._ambientTexture&&ut.a.AmbientTextureEnabled&&b.setTexture("ambientSampler",this._ambientTexture),this._opacityTexture&&ut.a.OpacityTextureEnabled&&b.setTexture("opacitySampler",this._opacityTexture),p&&ut.a.ReflectionTextureEnabled&&(a.LODBASEDMICROSFURACE?b.setTexture("reflectionSampler",p):(b.setTexture("reflectionSampler",p._lodTextureMid||p),b.setTexture("reflectionSamplerLow",p._lodTextureLow||p),b.setTexture("reflectionSamplerHigh",p._lodTextureHigh||p)),a.USEIRRADIANCEMAP&&b.setTexture("irradianceSampler",p.irradianceTexture)),a.ENVIRONMENTBRDF&&b.setTexture("environmentBrdfSampler",this._environmentBRDFTexture),this._emissiveTexture&&ut.a.EmissiveTextureEnabled&&b.setTexture("emissiveSampler",this._emissiveTexture),this._lightmapTexture&&ut.a.LightmapTextureEnabled&&b.setTexture("lightmapSampler",this._lightmapTexture),ut.a.SpecularTextureEnabled&&(this._metallicTexture?b.setTexture("reflectivitySampler",this._metallicTexture):this._reflectivityTexture&&b.setTexture("reflectivitySampler",this._reflectivityTexture),this._metallicReflectanceTexture&&b.setTexture("metallicReflectanceSampler",this._metallicReflectanceTexture),this._microSurfaceTexture&&b.setTexture("microSurfaceSampler",this._microSurfaceTexture)),this._bumpTexture&&x.getCaps().standardDerivatives&&ut.a.BumpTextureEnabled&&!this._disableBumpMap&&b.setTexture("bumpSampler",this._bumpTexture)),this.detailMap.bindForSubMesh(b,o,this.isFrozen),this.subSurface.bindForSubMesh(b,o,x,this.isFrozen,a.LODBASEDMICROSFURACE,this.realTimeFiltering),this.clearCoat.bindForSubMesh(b,o,x,this._disableBumpMap,this.isFrozen,this._invertNormalMapX,this._invertNormalMapY,i),this.anisotropy.bindForSubMesh(b,o,this.isFrozen),this.sheen.bindForSubMesh(b,o,this.isFrozen,i),et.a.BindClipPlane(this._activeEffect,o),o.ambientColor.multiplyToRef(this._ambientColor,this._globalAmbientColor);var ce=o._forcedViewPosition?o._forcedViewPosition:o._mirroredCameraPosition?o._mirroredCameraPosition:o.activeCamera.globalPosition,ue=o.useRightHandedSystem===(o._mirroredCameraPosition!=null);s.setFloat4("vEyePosition",ce.x,ce.y,ce.z,ue?-1:1),s.setColor3("vAmbientColor",this._globalAmbientColor),s.setFloat2("vDebugMode",this.debugLimit,this.debugFactor)}!d&&this.isFrozen||(o.lightsEnabled&&!this._disableLighting&&et.a.BindLights(o,n,this._activeEffect,a,this._maxSimultaneousLights,this._rebuildInParallel),(o.fogEnabled&&n.applyFog&&o.fogMode!==_e.a.FOGMODE_NONE||p)&&this.bindView(s),et.a.BindFogParameters(o,n,this._activeEffect,!0),a.NUM_MORPH_INFLUENCERS&&et.a.BindMorphTargetParameters(n,this._activeEffect),this._imageProcessingConfiguration.bind(this._activeEffect),et.a.BindLogDepth(a,this._activeEffect,o)),b.update(),this._afterBind(n,this._activeEffect)}}},t.prototype.getAnimatables=function(){var e=[];return this._albedoTexture&&this._albedoTexture.animations&&this._albedoTexture.animations.length>0&&e.push(this._albedoTexture),this._ambientTexture&&this._ambientTexture.animations&&this._ambientTexture.animations.length>0&&e.push(this._ambientTexture),this._opacityTexture&&this._opacityTexture.animations&&this._opacityTexture.animations.length>0&&e.push(this._opacityTexture),this._reflectionTexture&&this._reflectionTexture.animations&&this._reflectionTexture.animations.length>0&&e.push(this._reflectionTexture),this._emissiveTexture&&this._emissiveTexture.animations&&this._emissiveTexture.animations.length>0&&e.push(this._emissiveTexture),this._metallicTexture&&this._metallicTexture.animations&&this._metallicTexture.animations.length>0?e.push(this._metallicTexture):this._reflectivityTexture&&this._reflectivityTexture.animations&&this._reflectivityTexture.animations.length>0&&e.push(this._reflectivityTexture),this._bumpTexture&&this._bumpTexture.animations&&this._bumpTexture.animations.length>0&&e.push(this._bumpTexture),this._lightmapTexture&&this._lightmapTexture.animations&&this._lightmapTexture.animations.length>0&&e.push(this._lightmapTexture),this.detailMap.getAnimatables(e),this.subSurface.getAnimatables(e),this.clearCoat.getAnimatables(e),this.sheen.getAnimatables(e),this.anisotropy.getAnimatables(e),e},t.prototype._getReflectionTexture=function(){return this._reflectionTexture?this._reflectionTexture:this.getScene().environmentTexture},t.prototype.getActiveTextures=function(){var e=r.prototype.getActiveTextures.call(this);return this._albedoTexture&&e.push(this._albedoTexture),this._ambientTexture&&e.push(this._ambientTexture),this._opacityTexture&&e.push(this._opacityTexture),this._reflectionTexture&&e.push(this._reflectionTexture),this._emissiveTexture&&e.push(this._emissiveTexture),this._reflectivityTexture&&e.push(this._reflectivityTexture),this._metallicTexture&&e.push(this._metallicTexture),this._metallicReflectanceTexture&&e.push(this._metallicReflectanceTexture),this._microSurfaceTexture&&e.push(this._microSurfaceTexture),this._bumpTexture&&e.push(this._bumpTexture),this._lightmapTexture&&e.push(this._lightmapTexture),this.detailMap.getActiveTextures(e),this.subSurface.getActiveTextures(e),this.clearCoat.getActiveTextures(e),this.sheen.getActiveTextures(e),this.anisotropy.getActiveTextures(e),e},t.prototype.hasTexture=function(e){return!!r.prototype.hasTexture.call(this,e)||this._albedoTexture===e||this._ambientTexture===e||this._opacityTexture===e||this._reflectionTexture===e||this._reflectivityTexture===e||this._metallicTexture===e||this._metallicReflectanceTexture===e||this._microSurfaceTexture===e||this._bumpTexture===e||this._lightmapTexture===e||this.detailMap.hasTexture(e)||this.subSurface.hasTexture(e)||this.clearCoat.hasTexture(e)||this.sheen.hasTexture(e)||this.anisotropy.hasTexture(e)},t.prototype.setPrePassRenderer=function(e){if(this.subSurface.isScatteringEnabled){var n=this.getScene().enableSubSurfaceForPrePass();return n&&(n.enabled=!0),!0}return!1},t.prototype.dispose=function(e,n){var i,o,a,s,d,p,b,x,O,B,F;n&&(this._environmentBRDFTexture&&this.getScene().environmentBRDFTexture!==this._environmentBRDFTexture&&this._environmentBRDFTexture.dispose(),(i=this._albedoTexture)===null||i===void 0||i.dispose(),(o=this._ambientTexture)===null||o===void 0||o.dispose(),(a=this._opacityTexture)===null||a===void 0||a.dispose(),(s=this._reflectionTexture)===null||s===void 0||s.dispose(),(d=this._emissiveTexture)===null||d===void 0||d.dispose(),(p=this._metallicTexture)===null||p===void 0||p.dispose(),(b=this._reflectivityTexture)===null||b===void 0||b.dispose(),(x=this._bumpTexture)===null||x===void 0||x.dispose(),(O=this._lightmapTexture)===null||O===void 0||O.dispose(),(B=this._metallicReflectanceTexture)===null||B===void 0||B.dispose(),(F=this._microSurfaceTexture)===null||F===void 0||F.dispose()),this.detailMap.dispose(n),this.subSurface.dispose(n),this.clearCoat.dispose(n),this.sheen.dispose(n),this.anisotropy.dispose(n),this._renderTargets.dispose(),this._imageProcessingConfiguration&&this._imageProcessingObserver&&this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver),r.prototype.dispose.call(this,e,n)},t.PBRMATERIAL_OPAQUE=Ht.a.MATERIAL_OPAQUE,t.PBRMATERIAL_ALPHATEST=Ht.a.MATERIAL_ALPHATEST,t.PBRMATERIAL_ALPHABLEND=Ht.a.MATERIAL_ALPHABLEND,t.PBRMATERIAL_ALPHATESTANDBLEND=Ht.a.MATERIAL_ALPHATESTANDBLEND,t.DEFAULT_AO_ON_ANALYTICAL_LIGHTS=0,t.LIGHTFALLOFF_PHYSICAL=0,t.LIGHTFALLOFF_GLTF=1,t.LIGHTFALLOFF_STANDARD=2,Object(c.c)([Object(L.i)()],t.prototype,"_imageProcessingConfiguration",void 0),Object(c.c)([Object(L.b)("_markAllSubMeshesAsMiscDirty")],t.prototype,"debugMode",void 0),Object(c.c)([Object(L.c)()],t.prototype,"useLogarithmicDepth",null),t}(ea.a),co=function(r){function t(e,n){var i=r.call(this,e,n)||this;return i.directIntensity=1,i.emissiveIntensity=1,i.environmentIntensity=1,i.specularIntensity=1,i.disableBumpMap=!1,i.ambientTextureStrength=1,i.ambientTextureImpactOnAnalyticalLights=t.DEFAULT_AO_ON_ANALYTICAL_LIGHTS,i.metallicF0Factor=1,i.metallicReflectanceColor=M.a.White(),i.ambientColor=new M.a(0,0,0),i.albedoColor=new M.a(1,1,1),i.reflectivityColor=new M.a(1,1,1),i.reflectionColor=new M.a(1,1,1),i.emissiveColor=new M.a(0,0,0),i.microSurface=1,i.useLightmapAsShadowmap=!1,i.useAlphaFromAlbedoTexture=!1,i.forceAlphaTest=!1,i.alphaCutOff=.4,i.useSpecularOverAlpha=!0,i.useMicroSurfaceFromReflectivityMapAlpha=!1,i.useRoughnessFromMetallicTextureAlpha=!0,i.useRoughnessFromMetallicTextureGreen=!1,i.useMetallnessFromMetallicTextureBlue=!1,i.useAmbientOcclusionFromMetallicTextureRed=!1,i.useAmbientInGrayScale=!1,i.useAutoMicroSurfaceFromReflectivityMap=!1,i.useRadianceOverAlpha=!0,i.useObjectSpaceNormalMap=!1,i.useParallax=!1,i.useParallaxOcclusion=!1,i.parallaxScaleBias=.05,i.disableLighting=!1,i.forceIrradianceInFragment=!1,i.maxSimultaneousLights=4,i.invertNormalMapX=!1,i.invertNormalMapY=!1,i.twoSidedLighting=!1,i.useAlphaFresnel=!1,i.useLinearAlphaFresnel=!1,i.environmentBRDFTexture=null,i.forceNormalForward=!1,i.enableSpecularAntiAliasing=!1,i.useHorizonOcclusion=!0,i.useRadianceOcclusion=!0,i.unlit=!1,i._environmentBRDFTexture=ta.GetEnvironmentBRDFTexture(n),i}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"refractionTexture",{get:function(){return this.subSurface.refractionTexture},set:function(e){this.subSurface.refractionTexture=e,e?this.subSurface.isRefractionEnabled=!0:this.subSurface.linkRefractionWithTransparency||(this.subSurface.isRefractionEnabled=!1)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"indexOfRefraction",{get:function(){return this.subSurface.indexOfRefraction},set:function(e){this.subSurface.indexOfRefraction=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"invertRefractionY",{get:function(){return this.subSurface.invertRefractionY},set:function(e){this.subSurface.invertRefractionY=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"linkRefractionWithTransparency",{get:function(){return this.subSurface.linkRefractionWithTransparency},set:function(e){this.subSurface.linkRefractionWithTransparency=e,e&&(this.subSurface.isRefractionEnabled=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"usePhysicalLightFalloff",{get:function(){return this._lightFalloff===pn.LIGHTFALLOFF_PHYSICAL},set:function(e){e!==this.usePhysicalLightFalloff&&(this._markAllSubMeshesAsTexturesDirty(),this._lightFalloff=e?pn.LIGHTFALLOFF_PHYSICAL:pn.LIGHTFALLOFF_STANDARD)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"useGLTFLightFalloff",{get:function(){return this._lightFalloff===pn.LIGHTFALLOFF_GLTF},set:function(e){e!==this.useGLTFLightFalloff&&(this._markAllSubMeshesAsTexturesDirty(),this._lightFalloff=e?pn.LIGHTFALLOFF_GLTF:pn.LIGHTFALLOFF_STANDARD)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"imageProcessingConfiguration",{get:function(){return this._imageProcessingConfiguration},set:function(e){this._attachImageProcessingConfiguration(e),this._markAllSubMeshesAsTexturesDirty()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cameraColorCurvesEnabled",{get:function(){return this.imageProcessingConfiguration.colorCurvesEnabled},set:function(e){this.imageProcessingConfiguration.colorCurvesEnabled=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cameraColorGradingEnabled",{get:function(){return this.imageProcessingConfiguration.colorGradingEnabled},set:function(e){this.imageProcessingConfiguration.colorGradingEnabled=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cameraToneMappingEnabled",{get:function(){return this._imageProcessingConfiguration.toneMappingEnabled},set:function(e){this._imageProcessingConfiguration.toneMappingEnabled=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cameraExposure",{get:function(){return this._imageProcessingConfiguration.exposure},set:function(e){this._imageProcessingConfiguration.exposure=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cameraContrast",{get:function(){return this._imageProcessingConfiguration.contrast},set:function(e){this._imageProcessingConfiguration.contrast=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cameraColorGradingTexture",{get:function(){return this._imageProcessingConfiguration.colorGradingTexture},set:function(e){this._imageProcessingConfiguration.colorGradingTexture=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cameraColorCurves",{get:function(){return this._imageProcessingConfiguration.colorCurves},set:function(e){this._imageProcessingConfiguration.colorCurves=e},enumerable:!1,configurable:!0}),t.prototype.getClassName=function(){return"PBRMaterial"},t.prototype.clone=function(e){var n=this,i=L.a.Clone(function(){return new t(e,n.getScene())},this);return i.id=e,i.name=e,this.clearCoat.copyTo(i.clearCoat),this.anisotropy.copyTo(i.anisotropy),this.brdf.copyTo(i.brdf),this.sheen.copyTo(i.sheen),this.subSurface.copyTo(i.subSurface),i},t.prototype.serialize=function(){var e=L.a.Serialize(this);return e.customType="BABYLON.PBRMaterial",e.clearCoat=this.clearCoat.serialize(),e.anisotropy=this.anisotropy.serialize(),e.brdf=this.brdf.serialize(),e.sheen=this.sheen.serialize(),e.subSurface=this.subSurface.serialize(),e},t.Parse=function(e,n,i){var o=L.a.Parse(function(){return new t(e.name,n)},e,n,i);return e.clearCoat&&o.clearCoat.parse(e.clearCoat,n,i),e.anisotropy&&o.anisotropy.parse(e.anisotropy,n,i),e.brdf&&o.brdf.parse(e.brdf,n,i),e.sheen&&o.sheen.parse(e.sheen,n,i),e.subSurface&&o.subSurface.parse(e.subSurface,n,i),o},t.PBRMATERIAL_OPAQUE=pn.PBRMATERIAL_OPAQUE,t.PBRMATERIAL_ALPHATEST=pn.PBRMATERIAL_ALPHATEST,t.PBRMATERIAL_ALPHABLEND=pn.PBRMATERIAL_ALPHABLEND,t.PBRMATERIAL_ALPHATESTANDBLEND=pn.PBRMATERIAL_ALPHATESTANDBLEND,t.DEFAULT_AO_ON_ANALYTICAL_LIGHTS=pn.DEFAULT_AO_ON_ANALYTICAL_LIGHTS,Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"directIntensity",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"emissiveIntensity",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"environmentIntensity",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"specularIntensity",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"disableBumpMap",void 0),Object(c.c)([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"albedoTexture",void 0),Object(c.c)([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"ambientTexture",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"ambientTextureStrength",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"ambientTextureImpactOnAnalyticalLights",void 0),Object(c.c)([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesAndMiscDirty")],t.prototype,"opacityTexture",void 0),Object(c.c)([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"reflectionTexture",void 0),Object(c.c)([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"emissiveTexture",void 0),Object(c.c)([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"reflectivityTexture",void 0),Object(c.c)([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"metallicTexture",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"metallic",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"roughness",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"metallicF0Factor",void 0),Object(c.c)([Object(L.e)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"metallicReflectanceColor",void 0),Object(c.c)([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"metallicReflectanceTexture",void 0),Object(c.c)([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"microSurfaceTexture",void 0),Object(c.c)([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"bumpTexture",void 0),Object(c.c)([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty",null)],t.prototype,"lightmapTexture",void 0),Object(c.c)([Object(L.e)("ambient"),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"ambientColor",void 0),Object(c.c)([Object(L.e)("albedo"),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"albedoColor",void 0),Object(c.c)([Object(L.e)("reflectivity"),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"reflectivityColor",void 0),Object(c.c)([Object(L.e)("reflection"),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"reflectionColor",void 0),Object(c.c)([Object(L.e)("emissive"),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"emissiveColor",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"microSurface",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useLightmapAsShadowmap",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesAndMiscDirty")],t.prototype,"useAlphaFromAlbedoTexture",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesAndMiscDirty")],t.prototype,"forceAlphaTest",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesAndMiscDirty")],t.prototype,"alphaCutOff",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useSpecularOverAlpha",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useMicroSurfaceFromReflectivityMapAlpha",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useRoughnessFromMetallicTextureAlpha",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useRoughnessFromMetallicTextureGreen",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useMetallnessFromMetallicTextureBlue",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useAmbientOcclusionFromMetallicTextureRed",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useAmbientInGrayScale",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useAutoMicroSurfaceFromReflectivityMap",void 0),Object(c.c)([Object(L.c)()],t.prototype,"usePhysicalLightFalloff",null),Object(c.c)([Object(L.c)()],t.prototype,"useGLTFLightFalloff",null),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useRadianceOverAlpha",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useObjectSpaceNormalMap",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useParallax",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useParallaxOcclusion",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"parallaxScaleBias",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsLightsDirty")],t.prototype,"disableLighting",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"forceIrradianceInFragment",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsLightsDirty")],t.prototype,"maxSimultaneousLights",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"invertNormalMapX",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"invertNormalMapY",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"twoSidedLighting",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useAlphaFresnel",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useLinearAlphaFresnel",void 0),Object(c.c)([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"environmentBRDFTexture",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"forceNormalForward",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"enableSpecularAntiAliasing",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useHorizonOcclusion",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useRadianceOcclusion",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsMiscDirty")],t.prototype,"unlit",void 0),t}(pn);C.a.RegisteredTypes["BABYLON.PBRMaterial"]=co;function ia(r){return r.charCodeAt(0)+(r.charCodeAt(1)<<8)+(r.charCodeAt(2)<<16)+(r.charCodeAt(3)<<24)}var gu=ia("DXT1"),vu=ia("DXT3"),bu=ia("DXT5"),Fs=ia("DX10"),ki=function(){function r(){}return r.GetDDSInfo=function(t){var e=new Int32Array(t.buffer,t.byteOffset,31),n=new Int32Array(t.buffer,t.byteOffset,35),i=1;131072&e[2]&&(i=Math.max(1,e[7]));var o=e[21],a=o===Fs?n[32]:0,s=h.a.TEXTURETYPE_UNSIGNED_INT;switch(o){case 113:s=h.a.TEXTURETYPE_HALF_FLOAT;break;case 116:s=h.a.TEXTURETYPE_FLOAT;break;case Fs:if(a===10){s=h.a.TEXTURETYPE_HALF_FLOAT;break}if(a===2){s=h.a.TEXTURETYPE_FLOAT;break}}return{width:e[4],height:e[3],mipmapCount:i,isFourCC:(4&e[20])==4,isRGB:(64&e[20])==64,isLuminance:(131072&e[20])==131072,isCube:(512&e[28])==512,isCompressed:o===gu||o===vu||o===bu,dxgiFormat:a,textureType:s}},r._ToHalfFloat=function(t){r._FloatView||(r._FloatView=new Float32Array(1),r._Int32View=new Int32Array(r._FloatView.buffer)),r._FloatView[0]=t;var e=r._Int32View[0],n=e>>16&32768,i=e>>12&2047,o=e>>23&255;return o<103?n:o>142?(n|=31744,n|=(o==255?0:1)&&8388607&e):o<113?n|=((i|=2048)>>114-o)+(i>>113-o&1):(n|=o-112<<10|i>>1,n+=1&i)},r._FromHalfFloat=function(t){var e=(32768&t)>>15,n=(31744&t)>>10,i=1023&t;return n===0?(e?-1:1)*Math.pow(2,-14)*(i/Math.pow(2,10)):n==31?i?NaN:1/0*(e?-1:1):(e?-1:1)*Math.pow(2,n-15)*(1+i/Math.pow(2,10))},r._GetHalfFloatAsFloatRGBAArrayBuffer=function(t,e,n,i,o,a){for(var s=new Float32Array(i),d=new Uint16Array(o,n),p=0,b=0;b>8)},r._GetRGBArrayBuffer=function(t,e,n,i,o,a,s,d){for(var p=new Uint8Array(i),b=new Uint8Array(o,n),x=0,O=0;O>8&255,Te>>16&255,Te>>24&255)))}var Ee=r._ExtractLongWordOrder(se[23]),Se=r._ExtractLongWordOrder(se[24]),Le=r._ExtractLongWordOrder(se[25]),xe=r._ExtractLongWordOrder(se[26]);Re&&(ue=t._getRGBABufferInternalSizedFormat(i.textureType)),z=1,131072&se[2]&&o!==!1&&(z=Math.max(1,se[7]));for(var Ne=d||0;Ne0?i.sphericalPolynomial=Ho.ConvertCubeMapToSphericalPolynomial({size:se[4],right:p[0],left:p[1],up:p[2],down:p[3],front:p[4],back:p[5],format:h.a.TEXTUREFORMAT_RGBA,type:h.a.TEXTURETYPE_FLOAT,gammaSpace:!1}):i.sphericalPolynomial=void 0}else l.a.Error("Compressed textures are not supported on this platform.");else l.a.Error("Unsupported format, must contain a FourCC, RGB or LUMINANCE code");else l.a.Error("Invalid magic number in DDS header")},r.StoreLODInAlphaChannel=!1,r}();Bt.a.prototype.createPrefilteredCubeTexture=function(r,t,e,n,i,o,a,s,d){var p=this;return i===void 0&&(i=null),o===void 0&&(o=null),s===void 0&&(s=null),d===void 0&&(d=!0),this.createCubeTexture(r,t,null,!1,function(b){if(b){var x=b.texture;if(d?b.info.sphericalPolynomial&&(x._sphericalPolynomial=b.info.sphericalPolynomial):x._sphericalPolynomial=new no,x._source=Ct.b.CubePrefiltered,p.getCaps().textureLOD)i&&i(x);else{var O=p._gl,B=b.width;if(B){for(var F=[],z=0;z<3;z++){var J=1-z/2,ie=n,se=$.a.Log2(B)*e+n,ce=ie+(se-ie)*J,ue=Math.round(Math.min(Math.max(ce,0),se)),fe=new Ct.a(p,Ct.b.Temp);if(fe.type=x.type,fe.format=x.format,fe.width=Math.pow(2,Math.max($.a.Log2(B)-ue,0)),fe.height=fe.width,fe.isCube=!0,p._bindTextureDirectly(O.TEXTURE_CUBE_MAP,fe,!0),fe.samplingMode=h.a.TEXTURE_LINEAR_LINEAR,O.texParameteri(O.TEXTURE_CUBE_MAP,O.TEXTURE_MAG_FILTER,O.LINEAR),O.texParameteri(O.TEXTURE_CUBE_MAP,O.TEXTURE_MIN_FILTER,O.LINEAR),O.texParameteri(O.TEXTURE_CUBE_MAP,O.TEXTURE_WRAP_S,O.CLAMP_TO_EDGE),O.texParameteri(O.TEXTURE_CUBE_MAP,O.TEXTURE_WRAP_T,O.CLAMP_TO_EDGE),b.isDDS){var ve=b.info,Te=b.data;p._unpackFlipY(ve.isCompressed),ki.UploadDDSLevels(p,fe,Te,ve,!0,6,ue)}else l.a.Warn("DDS is the only prefiltered cube map supported so far.");p._bindTextureDirectly(O.TEXTURE_CUBE_MAP,null);var Re=new Wn.a(t);Re.isCube=!0,Re._texture=fe,fe.isReady=!0,F.push(Re)}x._lodTextureHigh=F[2],x._lodTextureMid=F[1],x._lodTextureLow=F[0],i&&i(x)}}}else i&&i(null)},o,a,s,d,e,n)};var yu=function(){function r(){this.supportCascades=!0}return r.prototype.canLoad=function(t){return Qn.a.EndsWith(t,".dds")},r.prototype.loadCubeData=function(t,e,n,i,o){var a,s=e.getEngine(),d=!1;if(Array.isArray(t))for(var p=0;p1)&&e.generateMipMaps,s._unpackFlipY(a.isCompressed),ki.UploadDDSLevels(s,e,b,a,d,6,-1,p),a.isFourCC||a.mipmapCount!==1||s.generateMipMapsForCubemap(e)}else{var x=t;a=ki.GetDDSInfo(x),e.width=a.width,e.height=a.height,n&&(a.sphericalPolynomial=new no),d=(a.isRGB||a.isLuminance||a.mipmapCount>1)&&e.generateMipMaps,s._unpackFlipY(a.isCompressed),ki.UploadDDSLevels(s,e,x,a,d,6),a.isFourCC||a.mipmapCount!==1||s.generateMipMapsForCubemap(e,!1)}s._setCubeMapTextureParams(e,d),e.isReady=!0,e.onLoadedObservable.notifyObservers(e),e.onLoadedObservable.clear(),i&&i({isDDS:!0,width:e.width,info:a,data:t,texture:e})},r.prototype.loadData=function(t,e,n){var i=ki.GetDDSInfo(t),o=(i.isRGB||i.isLuminance||i.mipmapCount>1)&&e.generateMipMaps&&i.width>>i.mipmapCount-1==1;n(i.width,i.height,o,i.isFourCC,function(){ki.UploadDDSLevels(e.getEngine(),e,t,i,o,1)})},r}();Ue.a._TextureLoaders.push(new yu);var Tu=function(){function r(){this.supportCascades=!1}return r.prototype.canLoad=function(t){return Qn.a.EndsWith(t,".env")},r.prototype.loadCubeData=function(t,e,n,i,o){if(!Array.isArray(t)){var a=Ei.GetEnvInfo(t);a?(e.width=a.width,e.height=a.width,Ei.UploadEnvSpherical(e,a),Ei.UploadEnvLevelsAsync(e,t,a).then(function(){e.isReady=!0,e.onLoadedObservable.notifyObservers(e),e.onLoadedObservable.clear(),i&&i()})):o&&o("Can not parse the environment file",null)}},r.prototype.loadData=function(t,e,n){throw".env not supported in 2d."},r}();Ue.a._TextureLoaders.push(new Tu);var ra=function(){function r(t,e,n,i){if(this.data=t,this.isInvalid=!1,!r.IsValid(t))return this.isInvalid=!0,void l.a.Error("texture missing KTX identifier");var o=Uint32Array.BYTES_PER_ELEMENT,a=new DataView(this.data.buffer,this.data.byteOffset+12,13*o),s=a.getUint32(0,!0)===67305985;this.glType=a.getUint32(1*o,s),this.glTypeSize=a.getUint32(2*o,s),this.glFormat=a.getUint32(3*o,s),this.glInternalFormat=a.getUint32(4*o,s),this.glBaseInternalFormat=a.getUint32(5*o,s),this.pixelWidth=a.getUint32(6*o,s),this.pixelHeight=a.getUint32(7*o,s),this.pixelDepth=a.getUint32(8*o,s),this.numberOfArrayElements=a.getUint32(9*o,s),this.numberOfFaces=a.getUint32(10*o,s),this.numberOfMipmapLevels=a.getUint32(11*o,s),this.bytesOfKeyValueData=a.getUint32(12*o,s),this.glType===0?(this.numberOfMipmapLevels=Math.max(1,this.numberOfMipmapLevels),this.pixelHeight!==0&&this.pixelDepth===0?this.numberOfArrayElements===0?this.numberOfFaces===e?this.loadType=r.COMPRESSED_2D:l.a.Error("number of faces expected"+e+", but found "+this.numberOfFaces):l.a.Error("texture arrays not currently supported"):l.a.Error("only 2D textures currently supported")):l.a.Error("only compressed formats currently supported")}return r.prototype.uploadLevels=function(t,e){switch(this.loadType){case r.COMPRESSED_2D:this._upload2DCompressedLevels(t,e);break}},r.prototype._upload2DCompressedLevels=function(t,e){for(var n=r.HEADER_LEN+this.bytesOfKeyValueData,i=this.pixelWidth,o=this.pixelHeight,a=e?this.numberOfMipmapLevels:1,s=0;s=12){var e=new Uint8Array(t.buffer,t.byteOffset,12);if(e[0]===171&&e[1]===75&&e[2]===84&&e[3]===88&&e[4]===32&&e[5]===49&&e[6]===49&&e[7]===187&&e[8]===13&&e[9]===10&&e[10]===26&&e[11]===10)return!0}return!1},r.HEADER_LEN=64,r.COMPRESSED_2D=0,r.COMPRESSED_3D=1,r.TEX_2D=2,r.TEX_3D=3,r}(),Bs=function(){function r(t){this._pendingActions=new Array,this._workerInfos=t.map(function(e){return{worker:e,active:!1}})}return r.prototype.dispose=function(){for(var t=0,e=this._workerInfos;t1,e.isReady=!0,this._engine._bindTextureDirectly(this._engine._gl.TEXTURE_2D,null)},r.IsValid=function(t){if(t.byteLength>=12){var e=new Uint8Array(t.buffer,t.byteOffset,12);if(e[0]===171&&e[1]===75&&e[2]===84&&e[3]===88&&e[4]===32&&e[5]===50&&e[6]===48&&e[7]===187&&e[8]===13&&e[9]===10&&e[10]===26&&e[11]===10)return!0}return!1},r.URLConfig={jsDecoderModule:"https://preview.babylonjs.com/babylon.ktx2Decoder.js",wasmUASTCToASTC:null,wasmUASTCToBC7:null,wasmUASTCToRGBA_UNORM:null,wasmUASTCToRGBA_SRGB:null,jsMSCTranscoder:null,wasmMSCTranscoder:null},r.DefaultNumWorkers=r.GetDefaultNumWorkers(),r}();function h_(){var r;onmessage=function(t){switch(t.data.action){case"init":var e=t.data.urls;importScripts(e.jsDecoderModule),e.wasmUASTCToASTC!==null&&(KTX2DECODER.LiteTranscoder_UASTC_ASTC.WasmModuleURL=e.wasmUASTCToASTC),e.wasmUASTCToBC7!==null&&(KTX2DECODER.LiteTranscoder_UASTC_BC7.WasmModuleURL=e.wasmUASTCToBC7),e.wasmUASTCToRGBA_UNORM!==null&&(KTX2DECODER.LiteTranscoder_UASTC_RGBA_UNORM.WasmModuleURL=e.wasmUASTCToRGBA_UNORM),e.wasmUASTCToRGBA_SRGB!==null&&(KTX2DECODER.LiteTranscoder_UASTC_RGBA_SRGB.WasmModuleURL=e.wasmUASTCToRGBA_SRGB),e.jsMSCTranscoder!==null&&(KTX2DECODER.MSCTranscoder.JSModuleURL=e.jsMSCTranscoder),e.wasmMSCTranscoder!==null&&(KTX2DECODER.MSCTranscoder.WasmModuleURL=e.wasmMSCTranscoder),r=new KTX2DECODER.KTX2Decoder,postMessage({action:"init"});break;case"decode":r.decode(t.data.data,t.data.caps,t.data.options).then(function(n){for(var i=[],o=0;o1&&e.generateMipMaps;a._unpackFlipY(!0),s.uploadLevels(e,e.generateMipMaps),e.width=s.pixelWidth,e.height=s.pixelHeight,a._setCubeMapTextureParams(e,d),e.isReady=!0,e.onLoadedObservable.notifyObservers(e),e.onLoadedObservable.clear(),i&&i()}},r.prototype.loadData=function(t,e,n,i){if(ra.IsValid(t)){e._invertVScale=!e.invertY;var o=new ra(t,1);n(o.pixelWidth,o.pixelHeight,e.generateMipMaps,!0,function(){o.uploadLevels(e,e.generateMipMaps)},o.isInvalid)}else Us.IsValid(t)?new Us(e.getEngine()).uploadAsync(t,e,i).then(function(){n(e.width,e.height,e.generateMipMaps,!0,function(){},!1)},function(a){l.a.Warn("Failed to load KTX2 texture data: "+a.message),n(0,0,!1,!1,function(){},!0)}):(l.a.Error("texture missing KTX identifier"),n(0,0,!1,!1,function(){},!0))},r}();Ue.a._TextureLoaders.unshift(new Eu);var Su=function(r){function t(e,n,i){var o=r.call(this,e,u.e.Zero(),n)||this;return o._xrSessionManager=i,o._firstFrame=!1,o._referenceQuaternion=u.b.Identity(),o._referencedPosition=new u.e,o._xrInvPositionCache=new u.e,o._xrInvQuaternionCache=u.b.Identity(),o._trackingState=er.NOT_TRACKING,o.onBeforeCameraTeleport=new R.c,o.onAfterCameraTeleport=new R.c,o.onTrackingStateChanged=new R.c,o.compensateOnFirstFrame=!0,o._rotate180=new u.b(0,1,0,0),o.minZ=.1,o.rotationQuaternion=new u.b,o.cameraRigMode=gt.a.RIG_MODE_CUSTOM,o.updateUpVectorFromRotation=!0,o._updateNumberOfRigCameras(1),o.freezeProjectionMatrix(),o._xrSessionManager.onXRSessionInit.add(function(){o._referencedPosition.copyFromFloats(0,0,0),o._referenceQuaternion.copyFromFloats(0,0,0,1),o._firstFrame=o.compensateOnFirstFrame}),o._xrSessionManager.onXRFrameObservable.add(function(a){o._firstFrame&&o._updateFromXRSession(),o._updateReferenceSpace(),o._updateFromXRSession()},void 0,!0),o}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"trackingState",{get:function(){return this._trackingState},enumerable:!1,configurable:!0}),t.prototype._setTrackingState=function(e){this._trackingState!==e&&(this._trackingState=e,this.onTrackingStateChanged.notifyObservers(e))},Object.defineProperty(t.prototype,"realWorldHeight",{get:function(){var e=this._xrSessionManager.currentFrame&&this._xrSessionManager.currentFrame.getViewerPose(this._xrSessionManager.baseReferenceSpace);return e&&e.transform?e.transform.position.y:0},enumerable:!1,configurable:!0}),t.prototype._updateForDualEyeDebugging=function(){this._updateNumberOfRigCameras(2),this.rigCameras[0].viewport=new Kn.a(0,0,.5,1),this.rigCameras[0].outputRenderTarget=null,this.rigCameras[1].viewport=new Kn.a(.5,0,.5,1),this.rigCameras[1].outputRenderTarget=null},t.prototype.setTransformationFromNonVRCamera=function(e,n){e===void 0&&(e=this.getScene().activeCamera),n===void 0&&(n=!0),e&&e!==this&&(e.computeWorldMatrix().decompose(void 0,this.rotationQuaternion,this.position),this.position.y=0,u.b.FromEulerAnglesToRef(0,this.rotationQuaternion.toEulerAngles().y,0,this.rotationQuaternion),this._firstFrame=!0,n&&this._xrSessionManager.resetReferenceSpace())},t.prototype.getClassName=function(){return"WebXRCamera"},t.prototype._updateFromXRSession=function(){var e=this,n=this._xrSessionManager.currentFrame&&this._xrSessionManager.currentFrame.getViewerPose(this._xrSessionManager.referenceSpace);if(n){var i=n.emulatedPosition?er.TRACKING_LOST:er.TRACKING;if(this._setTrackingState(i),n.transform){var o=n.transform.position;this._referencedPosition.set(o.x,o.y,o.z);var a=n.transform.orientation;this._referenceQuaternion.set(a.x,a.y,a.z,a.w),this._scene.useRightHandedSystem||(this._referencedPosition.z*=-1,this._referenceQuaternion.z*=-1,this._referenceQuaternion.w*=-1),this._firstFrame?(this._firstFrame=!1,this.position.y+=this._referencedPosition.y,this._referenceQuaternion.copyFromFloats(0,0,0,1)):(this.rotationQuaternion.copyFrom(this._referenceQuaternion),this.position.copyFrom(this._referencedPosition))}this.rigCameras.length!==n.views.length&&this._updateNumberOfRigCameras(n.views.length),n.views.forEach(function(s,d){var p=e.rigCameras[d];p.isLeftCamera||p.isRightCamera||(s.eye==="right"?p._isRightCamera=!0:s.eye==="left"&&(p._isLeftCamera=!0));var b=s.transform.position,x=s.transform.orientation;if(p.position.set(b.x,b.y,b.z),p.rotationQuaternion.set(x.x,x.y,x.z,x.w),e._scene.useRightHandedSystem?p.rotationQuaternion.multiplyInPlace(e._rotate180):(p.position.z*=-1,p.rotationQuaternion.z*=-1,p.rotationQuaternion.w*=-1),u.a.FromFloat32ArrayToRefScaled(s.projectionMatrix,0,1,p._projectionMatrix),e._scene.useRightHandedSystem||p._projectionMatrix.toggleProjectionMatrixHandInPlace(),d===0&&e._projectionMatrix.copyFrom(p._projectionMatrix),e._xrSessionManager.session.renderState.baseLayer){var O=e._xrSessionManager.session.renderState.baseLayer.getViewport(s),B=e._xrSessionManager.session.renderState.baseLayer.framebufferWidth,F=e._xrSessionManager.session.renderState.baseLayer.framebufferHeight;p.viewport.width=O.width/B,p.viewport.height=O.height/F,p.viewport.x=O.x/B,p.viewport.y=O.y/F}p.outputRenderTarget=e._xrSessionManager.getRenderTargetTextureForEye(s.eye)})}else this._setTrackingState(er.NOT_TRACKING)},t.prototype._updateNumberOfRigCameras=function(e){for(e===void 0&&(e=1);this.rigCameras.lengthe;){var i=this.rigCameras.pop();i&&i.dispose()}},t.prototype._updateReferenceSpace=function(){this.position.equals(this._referencedPosition)&&this.rotationQuaternion.equals(this._referenceQuaternion)||(this.position.subtractToRef(this._referencedPosition,this._referencedPosition),this._referenceQuaternion.conjugateInPlace(),this._referenceQuaternion.multiplyToRef(this.rotationQuaternion,this._referenceQuaternion),this._updateReferenceSpaceOffset(this._referencedPosition,this._referenceQuaternion.normalize()))},t.prototype._updateReferenceSpaceOffset=function(e,n,i){if(i===void 0&&(i=!1),this._xrSessionManager.referenceSpace&&this._xrSessionManager.currentFrame){this._xrInvPositionCache.copyFrom(e),n?this._xrInvQuaternionCache.copyFrom(n):this._xrInvQuaternionCache.copyFromFloats(0,0,0,1),this._scene.useRightHandedSystem||(this._xrInvPositionCache.z*=-1,this._xrInvQuaternionCache.z*=-1,this._xrInvQuaternionCache.w*=-1),this._xrInvPositionCache.negateInPlace(),this._xrInvQuaternionCache.conjugateInPlace(),this._xrInvPositionCache.rotateByQuaternionToRef(this._xrInvQuaternionCache,this._xrInvPositionCache),i&&(this._xrInvPositionCache.y=0);var o=new XRRigidTransform({x:this._xrInvPositionCache.x,y:this._xrInvPositionCache.y,z:this._xrInvPositionCache.z},{x:this._xrInvQuaternionCache.x,y:this._xrInvQuaternionCache.y,z:this._xrInvQuaternionCache.z,w:this._xrInvQuaternionCache.w}),a=this._xrSessionManager.referenceSpace.getOffsetReferenceSpace(o),s=this._xrSessionManager.currentFrame&&this._xrSessionManager.currentFrame.getViewerPose(a);if(s){var d=new u.e(s.transform.position.x,s.transform.position.y,s.transform.position.z);this._scene.useRightHandedSystem||(d.z*=-1),this.position.subtractToRef(d,d),this._scene.useRightHandedSystem||(d.z*=-1),d.negateInPlace();var p=new XRRigidTransform({x:d.x,y:d.y,z:d.z});this._xrSessionManager.referenceSpace=a.getOffsetReferenceSpace(p)}}},t}(Yn),ai=function(){function r(){}return r.ANCHOR_SYSTEM="xr-anchor-system",r.BACKGROUND_REMOVER="xr-background-remover",r.HIT_TEST="xr-hit-test",r.PHYSICS_CONTROLLERS="xr-physics-controller",r.PLANE_DETECTION="xr-plane-detection",r.POINTER_SELECTION="xr-controller-pointer-selection",r.TELEPORTATION="xr-controller-teleportation",r.FEATURE_POINTS="xr-feature-points",r.HAND_TRACKING="xr-hand-tracking",r}(),qn=function(){function r(t){var e=this;this._xrSessionManager=t,this._features={},this._xrSessionManager.onXRSessionInit.add(function(){e.getEnabledFeatures().forEach(function(n){var i=e._features[n];!i.enabled||i.featureImplementation.attached||i.featureImplementation.disableAutoAttach||e.attachFeature(n)})}),this._xrSessionManager.onXRSessionEnded.add(function(){e.getEnabledFeatures().forEach(function(n){var i=e._features[n];i.enabled&&i.featureImplementation.attached&&e.detachFeature(n)})})}return r.AddWebXRFeature=function(t,e,n,i){n===void 0&&(n=1),i===void 0&&(i=!1),this._AvailableFeatures[t]=this._AvailableFeatures[t]||{latest:n},n>this._AvailableFeatures[t].latest&&(this._AvailableFeatures[t].latest=n),i&&(this._AvailableFeatures[t].stable=n),this._AvailableFeatures[t][n]=e},r.ConstructFeature=function(t,e,n,i){e===void 0&&(e=1);var o=this._AvailableFeatures[t][e];if(!o)throw new Error("feature not found");return o(n,i)},r.GetAvailableFeatures=function(){return Object.keys(this._AvailableFeatures)},r.GetAvailableVersions=function(t){return Object.keys(this._AvailableFeatures[t])},r.GetLatestVersionOfFeature=function(t){return this._AvailableFeatures[t]&&this._AvailableFeatures[t].latest||-1},r.GetStableVersionOfFeature=function(t){return this._AvailableFeatures[t]&&this._AvailableFeatures[t].stable||-1},r.prototype.attachFeature=function(t){var e=this._features[t];e&&e.enabled&&!e.featureImplementation.attached&&e.featureImplementation.attach()},r.prototype.detachFeature=function(t){var e=this._features[t];e&&e.featureImplementation.attached&&e.featureImplementation.detach()},r.prototype.disableFeature=function(t){var e=typeof t=="string"?t:t.Name,n=this._features[e];return!(!n||!n.enabled)&&(n.enabled=!1,this.detachFeature(e),n.featureImplementation.dispose(),!0)},r.prototype.dispose=function(){var t=this;this.getEnabledFeatures().forEach(function(e){t.disableFeature(e),t._features[e].featureImplementation.dispose()})},r.prototype.enableFeature=function(t,e,n,i,o){var a=this;e===void 0&&(e="latest"),n===void 0&&(n={}),i===void 0&&(i=!0),o===void 0&&(o=!0);var s=typeof t=="string"?t:t.Name,d=0;if(typeof e=="string"){if(!e)throw new Error("Error in provided version - "+s+" ("+e+")");if((d=e==="stable"?r.GetStableVersionOfFeature(s):e==="latest"?r.GetLatestVersionOfFeature(s):+e)===-1||isNaN(d))throw new Error("feature not found - "+s+" ("+e+")")}else d=e;var p=this._features[s],b=r.ConstructFeature(s,d,this._xrSessionManager,n);if(!b)throw new Error("feature not found - "+s);p&&this.disableFeature(s);var x=b();if(x.dependsOn&&!x.dependsOn.every(function(O){return!!a._features[O]}))throw new Error("Dependant features missing. Make sure the following features are enabled - "+x.dependsOn.join(", "));if(x.isCompatible())return this._features[s]={featureImplementation:x,enabled:!0,version:d,required:o},i?this._xrSessionManager.session&&!this._features[s].featureImplementation.attached&&this.attachFeature(s):this._features[s].featureImplementation.disableAutoAttach=!0,this._features[s].featureImplementation;if(o)throw new Error("required feature not compatible");return Xe.b.Warn("Feature "+s+" not compatible with the current environment/browser and was not enabled."),x},r.prototype.getEnabledFeature=function(t){return this._features[t]&&this._features[t].featureImplementation},r.prototype.getEnabledFeatures=function(){return Object.keys(this._features)},r.prototype.extendXRSessionInitObject=function(t){var e=this;return this.getEnabledFeatures().forEach(function(n){var i=e._features[n],o=i.featureImplementation.xrNativeFeatureName;o&&(i.required?(t.requiredFeatures=t.requiredFeatures||[],t.requiredFeatures.indexOf(o)===-1&&t.requiredFeatures.push(o)):(t.optionalFeatures=t.optionalFeatures||[],t.optionalFeatures.indexOf(o)===-1&&t.optionalFeatures.push(o)))}),t},r._AvailableFeatures={},r}(),Au=function(){function r(t){var e=this;this.scene=t,this._nonVRCamera=null,this._originalSceneAutoClear=!0,this._supported=!1,this.onInitialXRPoseSetObservable=new R.c,this.onStateChangedObservable=new R.c,this.state=fn.NOT_IN_XR,this.sessionManager=new _s(t),this.camera=new Su("",t,this.sessionManager),this.featuresManager=new qn(this.sessionManager),t.onDisposeObservable.add(function(){e.exitXRAsync()})}return r.CreateAsync=function(t){var e=new r(t);return e.sessionManager.initializeAsync().then(function(){return e._supported=!0,e}).catch(function(n){throw e._setState(fn.NOT_IN_XR),e.dispose(),n})},r.prototype.dispose=function(){this.camera.dispose(),this.onStateChangedObservable.clear(),this.onInitialXRPoseSetObservable.clear(),this.sessionManager.dispose(),this._nonVRCamera&&(this.scene.activeCamera=this._nonVRCamera)},r.prototype.enterXRAsync=function(t,e,n,i){var o=this;if(n===void 0&&(n=this.sessionManager.getWebXRRenderTarget()),i===void 0&&(i={}),!this._supported)throw"WebXR not supported in this browser or environment";return this._setState(fn.ENTERING_XR),e!=="viewer"&&e!=="local"&&(i.optionalFeatures=i.optionalFeatures||[],i.optionalFeatures.push(e)),this.featuresManager.extendXRSessionInitObject(i),t==="immersive-ar"&&e!=="unbounded"&&l.a.Warn("We recommend using 'unbounded' reference space type when using 'immersive-ar' session mode"),this.sessionManager.initializeSessionAsync(t,i).then(function(){return o.sessionManager.setReferenceSpaceTypeAsync(e)}).then(function(){return n.initializeXRLayerAsync(o.sessionManager.session)}).then(function(){return o.sessionManager.updateRenderStateAsync({depthFar:o.camera.maxZ,depthNear:o.camera.minZ,baseLayer:n.xrLayer})}).then(function(){return o.sessionManager.runXRRenderLoop(),o._originalSceneAutoClear=o.scene.autoClear,o._nonVRCamera=o.scene.activeCamera,o.scene.activeCamera=o.camera,t!=="immersive-ar"?o._nonXRToXRCamera():(o.scene.autoClear=!1,o.camera.compensateOnFirstFrame=!1),o.sessionManager.onXRSessionEnded.addOnce(function(){o.camera.rigCameras.forEach(function(a){a.outputRenderTarget=null}),o.scene.autoClear=o._originalSceneAutoClear,o.scene.activeCamera=o._nonVRCamera,t!=="immersive-ar"&&o.camera.compensateOnFirstFrame&&(o._nonVRCamera.setPosition?o._nonVRCamera.setPosition(o.camera.position):o._nonVRCamera.position.copyFrom(o.camera.position)),o._setState(fn.NOT_IN_XR)}),o.sessionManager.onXRFrameObservable.addOnce(function(){o._setState(fn.IN_XR)}),o.sessionManager}).catch(function(a){throw console.log(a),console.log(a.message),o._setState(fn.NOT_IN_XR),a})},r.prototype.exitXRAsync=function(){return this.state!==fn.IN_XR?Promise.resolve():(this._setState(fn.EXITING_XR),this.sessionManager.exitXRAsync())},r.prototype._nonXRToXRCamera=function(){this.camera.setTransformationFromNonVRCamera(this._nonVRCamera),this.onInitialXRPoseSetObservable.notifyObservers(this.camera)},r.prototype._setState=function(t){this.state!==t&&(this.state=t,this.onStateChangedObservable.notifyObservers(this.state))},r}(),Cr=function(){function r(t,e,n,i){n===void 0&&(n=-1),i===void 0&&(i=[]),this.id=t,this.type=e,this._buttonIndex=n,this._axesIndices=i,this._axes={x:0,y:0},this._changes={},this._currentValue=0,this._hasChanges=!1,this._pressed=!1,this._touched=!1,this.onAxisValueChangedObservable=new R.c,this.onButtonStateChangedObservable=new R.c}return Object.defineProperty(r.prototype,"axes",{get:function(){return this._axes},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"changes",{get:function(){return this._changes},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"hasChanges",{get:function(){return this._hasChanges},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"pressed",{get:function(){return this._pressed},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"touched",{get:function(){return this._touched},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"value",{get:function(){return this._currentValue},enumerable:!1,configurable:!0}),r.prototype.dispose=function(){this.onAxisValueChangedObservable.clear(),this.onButtonStateChangedObservable.clear()},r.prototype.isAxes=function(){return this._axesIndices.length!==0},r.prototype.isButton=function(){return this._buttonIndex!==-1},r.prototype.update=function(t){var e=!1,n=!1;if(this._hasChanges=!1,this._changes={},this.isButton()){var i=t.buttons[this._buttonIndex];if(!i)return;this._currentValue!==i.value&&(this.changes.value={current:i.value,previous:this._currentValue},e=!0,this._currentValue=i.value),this._touched!==i.touched&&(this.changes.touched={current:i.touched,previous:this._touched},e=!0,this._touched=i.touched),this._pressed!==i.pressed&&(this.changes.pressed={current:i.pressed,previous:this._pressed},e=!0,this._pressed=i.pressed)}this.isAxes()&&(this._axes.x!==t.axes[this._axesIndices[0]]&&(this.changes.axes={current:{x:t.axes[this._axesIndices[0]],y:this._axes.y},previous:{x:this._axes.x,y:this._axes.y}},this._axes.x=t.axes[this._axesIndices[0]],n=!0),this._axes.y!==t.axes[this._axesIndices[1]]&&(this.changes.axes?this.changes.axes.current.y=t.axes[this._axesIndices[1]]:this.changes.axes={current:{x:this._axes.x,y:t.axes[this._axesIndices[1]]},previous:{x:this._axes.x,y:this._axes.y}},this._axes.y=t.axes[this._axesIndices[1]],n=!0)),e&&(this._hasChanges=!0,this.onButtonStateChangedObservable.notifyObservers(this)),n&&(this._hasChanges=!0,this.onAxisValueChangedObservable.notifyObservers(this._axes))},r.BUTTON_TYPE="button",r.SQUEEZE_TYPE="squeeze",r.THUMBSTICK_TYPE="thumbstick",r.TOUCHPAD_TYPE="touchpad",r.TRIGGER_TYPE="trigger",r}(),Rr=function(){function r(t,e,n,i,o){var a=this;this.scene=t,this.layout=e,this.gamepadObject=n,this.handedness=i,this._initComponent=function(s){if(s){var d=a.layout.components[s],p=d.type,b=d.gamepadIndices.button,x=[];d.gamepadIndices.xAxis!==void 0&&d.gamepadIndices.yAxis!==void 0&&x.push(d.gamepadIndices.xAxis,d.gamepadIndices.yAxis),a.components[s]=new Cr(s,p,b,x)}},this._modelReady=!1,this.components={},this.disableAnimation=!1,this.onModelLoadedObservable=new R.c,e.components&&Object.keys(e.components).forEach(this._initComponent)}return r.prototype.dispose=function(){var t=this;this.getComponentIds().forEach(function(e){return t.getComponent(e).dispose()}),this.rootMesh&&this.rootMesh.dispose()},r.prototype.getAllComponentsOfType=function(t){var e=this;return this.getComponentIds().map(function(n){return e.components[n]}).filter(function(n){return n.type===t})},r.prototype.getComponent=function(t){return this.components[t]},r.prototype.getComponentIds=function(){return Object.keys(this.components)},r.prototype.getComponentOfType=function(t){return this.getAllComponentsOfType(t)[0]||null},r.prototype.getMainComponent=function(){return this.getComponent(this.layout.selectComponentId)},r.prototype.loadModel=function(){return Object(c.b)(this,void 0,void 0,function(){var t,e,n=this;return Object(c.e)(this,function(i){return t=!this._getModelLoadingConstraints(),e=this._getGenericFilenameAndPath(),t?l.a.Warn("Falling back to generic models"):e=this._getFilenameAndPath(),[2,new Promise(function(o,a){Ut.ImportMesh("",e.path,e.filename,n.scene,function(s){t?n._getGenericParentMesh(s):n._setRootMesh(s),n._processLoadedModel(s),n._modelReady=!0,n.onModelLoadedObservable.notifyObservers(n),o(!0)},null,function(s,d){l.a.Log(d),l.a.Warn("Failed to retrieve controller model of type "+n.profileId+" from the remote server: "+e.path+e.filename),a(d)})})]})})},r.prototype.updateFromXRFrame=function(t){var e=this;this.getComponentIds().forEach(function(n){return e.getComponent(n).update(e.gamepadObject)}),this.updateModel(t)},Object.defineProperty(r.prototype,"handness",{get:function(){return this.handedness},enumerable:!1,configurable:!0}),r.prototype.pulse=function(t,e,n){return n===void 0&&(n=0),this.gamepadObject.hapticActuators&&this.gamepadObject.hapticActuators[n]?this.gamepadObject.hapticActuators[n].pulse(t,e):Promise.resolve(!1)},r.prototype._getChildByName=function(t,e){return t.getChildren(function(n){return n.name===e},!1)[0]},r.prototype._getImmediateChildByName=function(t,e){return t.getChildren(function(n){return n.name==e},!0)[0]},r.prototype._lerpTransform=function(t,e,n){if(t.minMesh&&t.maxMesh&&t.valueMesh&&t.minMesh.rotationQuaternion&&t.maxMesh.rotationQuaternion&&t.valueMesh.rotationQuaternion){var i=n?.5*e+.5:e;u.b.SlerpToRef(t.minMesh.rotationQuaternion,t.maxMesh.rotationQuaternion,i,t.valueMesh.rotationQuaternion),u.e.LerpToRef(t.minMesh.position,t.maxMesh.position,i,t.valueMesh.position)}},r.prototype.updateModel=function(t){this._modelReady&&this._updateModel(t)},r.prototype._getGenericFilenameAndPath=function(){return{filename:"generic.babylon",path:"https://controllers.babylonjs.com/generic/"}},r.prototype._getGenericParentMesh=function(t){var e=this;this.rootMesh=new De.a(this.profileId+" "+this.handedness,this.scene),t.forEach(function(n){n.parent||(n.isPickable=!1,n.setParent(e.rootMesh))}),this.rootMesh.rotationQuaternion=u.b.FromEulerAngles(0,Math.PI,0)},r}(),Vs=function(r){function t(e,n,i){var o=r.call(this,e,d_[i],n,i)||this;return o.profileId=t.ProfileId,o}return Object(c.d)(t,r),t.prototype._getFilenameAndPath=function(){return{filename:"generic.babylon",path:"https://controllers.babylonjs.com/generic/"}},t.prototype._getModelLoadingConstraints=function(){return!0},t.prototype._processLoadedModel=function(e){},t.prototype._setRootMesh=function(e){var n=this;this.rootMesh=new De.a(this.profileId+" "+this.handedness,this.scene),e.forEach(function(i){i.isPickable=!1,i.parent||i.setParent(n.rootMesh)}),this.rootMesh.rotationQuaternion=u.b.FromEulerAngles(0,Math.PI,0)},t.prototype._updateModel=function(){},t.ProfileId="generic-trigger",t}(Rr),d_={left:{selectComponentId:"xr-standard-trigger",components:{"xr-standard-trigger":{type:"trigger",gamepadIndices:{button:0},rootNodeName:"xr_standard_trigger",visualResponses:{}}},gamepadMapping:"xr-standard",rootNodeName:"generic-trigger-left",assetPath:"left.glb"},right:{selectComponentId:"xr-standard-trigger",components:{"xr-standard-trigger":{type:"trigger",gamepadIndices:{button:0},rootNodeName:"xr_standard_trigger",visualResponses:{}}},gamepadMapping:"xr-standard",rootNodeName:"generic-trigger-right",assetPath:"right.glb"},none:{selectComponentId:"xr-standard-trigger",components:{"xr-standard-trigger":{type:"trigger",gamepadIndices:{button:0},rootNodeName:"xr_standard_trigger",visualResponses:{}}},gamepadMapping:"xr-standard",rootNodeName:"generic-trigger-none",assetPath:"none.glb"}},Pu=function(r){function t(e,n,i,o){var a=r.call(this,e,i.layouts[n.handedness||"none"],n.gamepad,n.handedness)||this;return a._repositoryUrl=o,a._buttonMeshMapping={},a._touchDots={},a.profileId=i.profileId,a}return Object(c.d)(t,r),t.prototype.dispose=function(){var e=this;r.prototype.dispose.call(this),Object.keys(this._touchDots).forEach(function(n){e._touchDots[n].dispose()})},t.prototype._getFilenameAndPath=function(){return{filename:this.layout.assetPath,path:this._repositoryUrl+"/profiles/"+this.profileId+"/"}},t.prototype._getModelLoadingConstraints=function(){var e=Ut.IsPluginForExtensionAvailable(".glb");return e||l.a.Warn("glTF / glb loaded was not registered, using generic controller instead"),e},t.prototype._processLoadedModel=function(e){var n=this;this.getComponentIds().forEach(function(i){var o=n.layout.components[i];n._buttonMeshMapping[i]={mainMesh:n._getChildByName(n.rootMesh,o.rootNodeName),states:{}},Object.keys(o.visualResponses).forEach(function(a){var s=o.visualResponses[a];if(s.valueNodeProperty==="transform")n._buttonMeshMapping[i].states[a]={valueMesh:n._getChildByName(n.rootMesh,s.valueNodeName),minMesh:n._getChildByName(n.rootMesh,s.minNodeName),maxMesh:n._getChildByName(n.rootMesh,s.maxNodeName)};else{var d=o.type===Cr.TOUCHPAD_TYPE&&o.touchPointNodeName?o.touchPointNodeName:s.valueNodeName;if(n._buttonMeshMapping[i].states[a]={valueMesh:n._getChildByName(n.rootMesh,d)},o.type===Cr.TOUCHPAD_TYPE&&!n._touchDots[a]){var p=Un.a.CreateSphere(a+"dot",{diameter:.0015,segments:8},n.scene);p.material=new Ft.a(a+"mat",n.scene),p.material.diffuseColor=M.a.Red(),p.parent=n._buttonMeshMapping[i].states[a].valueMesh||null,p.isVisible=!1,n._touchDots[a]=p}}})})},t.prototype._setRootMesh=function(e){var n;this.rootMesh=new De.a(this.profileId+"-"+this.handedness,this.scene),this.rootMesh.isPickable=!1;for(var i=0;io/10&&(d.isVisible=!0),(p+=n._scene.getEngine().getDeltaTime())>=o)n._scene.simulatePointerDown(i.pick,{pointerId:i.id}),b=!0,n._options.disablePointerUpOnTouchOut&&n._scene.simulatePointerUp(i.pick,{pointerId:i.id}),d.isVisible=!1;else{var x=1-p/o;d.scaling.set(x,x,x)}else b=!1,p=0;n._scene.simulatePointerMove(i.pick,{pointerId:i.id}),s=i.pick}}),this._options.renderingGroupId!==void 0&&(d.renderingGroupId=this._options.renderingGroupId),e&&e.onDisposeObservable.addOnce(function(){i.pick&&!n._options.disablePointerUpOnTouchOut&&b&&n._scene.simulatePointerUp(i.pick,{pointerId:i.id}),d.dispose()})},t.prototype._attachScreenRayMode=function(e){var n=this,i=this._controllers[e.uniqueId],o=!1;i.onFrameObserver=this._xrSessionManager.onXRFrameObservable.add(function(){!i.pick||n._options.disablePointerUpOnTouchOut&&o||(o?n._scene.simulatePointerMove(i.pick,{pointerId:i.id}):(n._scene.simulatePointerDown(i.pick,{pointerId:i.id}),o=!0,n._options.disablePointerUpOnTouchOut&&n._scene.simulatePointerUp(i.pick,{pointerId:i.id})))}),e.onDisposeObservable.addOnce(function(){i.pick&&o&&!n._options.disablePointerUpOnTouchOut&&n._scene.simulatePointerUp(i.pick,{pointerId:i.id})})},t.prototype._attachTrackedPointerRayMode=function(e){var n=this,i=this._controllers[e.uniqueId];if(this._options.forceGazeMode)return this._attachGazeMode(e);if(i.onFrameObserver=this._xrSessionManager.onXRFrameObservable.add(function(){i.laserPointer.material.disableLighting=n.disablePointerLighting,i.selectionMesh.material.disableLighting=n.disableSelectionMeshLighting,i.pick&&n._scene.simulatePointerMove(i.pick,{pointerId:i.id})}),e.inputSource.gamepad){var o=function(d){n._options.overrideButtonId&&(i.selectionComponent=d.getComponent(n._options.overrideButtonId)),i.selectionComponent||(i.selectionComponent=d.getMainComponent()),i.onButtonChangedObserver=i.selectionComponent.onButtonStateChangedObservable.add(function(p){if(p.changes.pressed){var b=p.changes.pressed.current;i.pick?(n._options.enablePointerSelectionOnAllControllers||e.uniqueId===n._attachedController)&&(b?(n._scene.simulatePointerDown(i.pick,{pointerId:i.id}),i.selectionMesh.material.emissiveColor=n.selectionMeshPickedColor,i.laserPointer.material.emissiveColor=n.laserPointerPickedColor):(n._scene.simulatePointerUp(i.pick,{pointerId:i.id}),i.selectionMesh.material.emissiveColor=n.selectionMeshDefaultColor,i.laserPointer.material.emissiveColor=n.laserPointerDefaultColor)):!b||n._options.enablePointerSelectionOnAllControllers||n._options.disableSwitchOnClick||(n._attachedController=e.uniqueId)}})};e.motionController?o(e.motionController):e.onMotionControllerInitObservable.add(o)}else{var a=function(d){i.xrController&&d.inputSource===i.xrController.inputSource&&i.pick&&(n._scene.simulatePointerDown(i.pick,{pointerId:i.id}),i.selectionMesh.material.emissiveColor=n.selectionMeshPickedColor,i.laserPointer.material.emissiveColor=n.laserPointerPickedColor)},s=function(d){i.xrController&&d.inputSource===i.xrController.inputSource&&i.pick&&(n._scene.simulatePointerUp(i.pick,{pointerId:i.id}),i.selectionMesh.material.emissiveColor=n.selectionMeshDefaultColor,i.laserPointer.material.emissiveColor=n.laserPointerDefaultColor)};i.eventListeners={selectend:s,selectstart:a},this._xrSessionManager.session.addEventListener("selectstart",a),this._xrSessionManager.session.addEventListener("selectend",s)}},t.prototype._convertNormalToDirectionOfRay=function(e,n){return e&&Math.acos(u.e.Dot(e,n.direction))o},t.prototype._updatePointerDistance=function(e,n){n===void 0&&(n=100),e.scaling.y=n,this._scene.useRightHandedSystem&&(n*=-1),e.position.z=n/2+.05},Object.defineProperty(t.prototype,"lasterPointerDefaultColor",{get:function(){return this.laserPointerDefaultColor},enumerable:!1,configurable:!0}),t._idCounter=200,t.Name=ai.POINTER_SELECTION,t.Version=1,t}(si);qn.AddWebXRFeature(lo.Name,function(r,t){return function(){return new lo(r,t)}},lo.Version,!0);var Gi,Ru=function(){function r(t,e,n){this.element=t,this.sessionMode=e,this.referenceSpaceType=n}return r.prototype.update=function(t){},r}(),p_=function(){},Ou=function(){function r(t,e){var n=this;if(this.scene=t,this.options=e,this._activeButton=null,this._buttons=[],this.activeButtonChangedObservable=new R.c,this.overlay=document.createElement("div"),this.overlay.classList.add("xr-button-overlay"),this.overlay.style.cssText="z-index:11;position: absolute; right: 20px;bottom: 50px;",typeof window<"u"&&window.location&&window.location.protocol==="http:"&&Xe.b.Warn("WebXR can only be served over HTTPS"),e.customButtons)this._buttons=e.customButtons;else{var i=e.sessionMode||"immersive-vr",o=e.referenceSpaceType||"local-floor",a=".babylonVRicon { color: #868686; border-color: #868686; border-style: solid; margin-left: 10px; height: 50px; width: 80px; background-color: rgba(51,51,51,0.7); background-image: url("+(typeof SVGSVGElement>"u"?"https://cdn.babylonjs.com/Assets/vrButton.png":"data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%222048%22%20height%3D%221152%22%20viewBox%3D%220%200%202048%201152%22%20version%3D%221.1%22%3E%3Cpath%20transform%3D%22rotate%28180%201024%2C576.0000000000001%29%22%20d%3D%22m1109%2C896q17%2C0%2030%2C-12t13%2C-30t-12.5%2C-30.5t-30.5%2C-12.5l-170%2C0q-18%2C0%20-30.5%2C12.5t-12.5%2C30.5t13%2C30t30%2C12l170%2C0zm-85%2C256q59%2C0%20132.5%2C-1.5t154.5%2C-5.5t164.5%2C-11.5t163%2C-20t150%2C-30t124.5%2C-41.5q23%2C-11%2042%2C-24t38%2C-30q27%2C-25%2041%2C-61.5t14%2C-72.5l0%2C-257q0%2C-123%20-47%2C-232t-128%2C-190t-190%2C-128t-232%2C-47l-81%2C0q-37%2C0%20-68.5%2C14t-60.5%2C34.5t-55.5%2C45t-53%2C45t-53%2C34.5t-55.5%2C14t-55.5%2C-14t-53%2C-34.5t-53%2C-45t-55.5%2C-45t-60.5%2C-34.5t-68.5%2C-14l-81%2C0q-123%2C0%20-232%2C47t-190%2C128t-128%2C190t-47%2C232l0%2C257q0%2C68%2038%2C115t97%2C73q54%2C24%20124.5%2C41.5t150%2C30t163%2C20t164.5%2C11.5t154.5%2C5.5t132.5%2C1.5zm939%2C-298q0%2C39%20-24.5%2C67t-58.5%2C42q-54%2C23%20-122%2C39.5t-143.5%2C28t-155.5%2C19t-157%2C11t-148.5%2C5t-129.5%2C1.5q-59%2C0%20-130%2C-1.5t-148%2C-5t-157%2C-11t-155.5%2C-19t-143.5%2C-28t-122%2C-39.5q-34%2C-14%20-58.5%2C-42t-24.5%2C-67l0%2C-257q0%2C-106%2040.5%2C-199t110%2C-162.5t162.5%2C-109.5t199%2C-40l81%2C0q27%2C0%2052%2C14t50%2C34.5t51%2C44.5t55.5%2C44.5t63.5%2C34.5t74%2C14t74%2C-14t63.5%2C-34.5t55.5%2C-44.5t51%2C-44.5t50%2C-34.5t52%2C-14l14%2C0q37%2C0%2070%2C0.5t64.5%2C4.5t63.5%2C12t68%2C23q71%2C30%20128.5%2C78.5t98.5%2C110t63.5%2C133.5t22.5%2C149l0%2C257z%22%20fill%3D%22white%22%20/%3E%3C/svg%3E%0A")+"); background-size: 80%; background-repeat:no-repeat; background-position: center; border: none; outline: none; transition: transform 0.125s ease-out } .babylonVRicon:hover { transform: scale(1.05) } .babylonVRicon:active {background-color: rgba(51,51,51,1) } .babylonVRicon:focus {background-color: rgba(51,51,51,1) }";a+='.babylonVRicon.vrdisplaypresenting { background-image: none;} .vrdisplaypresenting::after { content: "EXIT"} .xr-error::after { content: "ERROR"}';var s=document.createElement("style");s.appendChild(document.createTextNode(a)),document.getElementsByTagName("head")[0].appendChild(s);var d=document.createElement("button");d.className="babylonVRicon",d.title=i+" - "+o,this._buttons.push(new Ru(d,i,o)),this._buttons[this._buttons.length-1].update=function(b){this.element.style.display=b===null||b===this?"":"none",d.className="babylonVRicon"+(b===this?" vrdisplaypresenting":"")},this._updateButtons(null)}var p=t.getEngine().getInputElement();p&&p.parentNode&&(p.parentNode.appendChild(this.overlay),t.onDisposeObservable.addOnce(function(){n.dispose()}))}return r.CreateAsync=function(t,e,n){var i=this,o=new r(t,n),a=o._buttons.map(function(s){return e.sessionManager.isSessionSupportedAsync(s.sessionMode)});return e.onStateChangedObservable.add(function(s){s==fn.NOT_IN_XR&&o._updateButtons(null)}),Promise.all(a).then(function(s){return s.forEach(function(d,p){d?(o.overlay.appendChild(o._buttons[p].element),o._buttons[p].element.onclick=function(){return Object(c.b)(i,void 0,void 0,function(){var b,x,O;return Object(c.e)(this,function(B){switch(B.label){case 0:return e.state!=fn.IN_XR?[3,2]:[4,e.exitXRAsync()];case 1:return B.sent(),o._updateButtons(null),[3,6];case 2:if(e.state!=fn.NOT_IN_XR)return[3,6];if(!n.renderTarget)return[3,6];B.label=3;case 3:return B.trys.push([3,5,,6]),[4,e.enterXRAsync(o._buttons[p].sessionMode,o._buttons[p].referenceSpaceType,n.renderTarget,{optionalFeatures:n.optionalFeatures,requiredFeatures:n.requiredFeatures})];case 4:return B.sent(),o._updateButtons(o._buttons[p]),[3,6];case 5:return b=B.sent(),o._updateButtons(null),x=o._buttons[p].element,O=x.title,x.title="Error entering XR session : "+O,x.classList.add("xr-error"),n.onError&&n.onError(b),[3,6];case 6:return[2]}})})}):Xe.b.Warn('Session mode "'+o._buttons[p].sessionMode+'" not supported in browser')}),o})},r.prototype.dispose=function(){var t=this.scene.getEngine().getInputElement();t&&t.parentNode&&t.parentNode.contains(this.overlay)&&t.parentNode.removeChild(this.overlay),this.activeButtonChangedObservable.clear()},r.prototype._updateButtons=function(t){var e=this;this._activeButton=t,this._buttons.forEach(function(n){n.update(e._activeButton)}),this.activeButtonChangedObservable.notifyObservers(this._activeButton)},r}();function ks(r){var t,e=0,n=Date.now();r.observableParameters=(t=r.observableParameters)!==null&&t!==void 0?t:{};var i=r.contextObservable.add(function(o){var a=Date.now(),s={startTime:n,currentTime:a,deltaTime:e=a-n,completeRate:e/r.timeout,payload:o};r.onTick&&r.onTick(s),r.breakCondition&&r.breakCondition()&&(r.contextObservable.remove(i),r.onAborted&&r.onAborted(s)),e>=r.timeout&&(r.contextObservable.remove(i),r.onEnded&&r.onEnded(s))},r.observableParameters.mask,r.observableParameters.insertFirst,r.observableParameters.scope);return i}(function(r){r[r.INIT=0]="INIT",r[r.STARTED=1]="STARTED",r[r.ENDED=2]="ENDED"})(Gi||(Gi={}));var __=function(){function r(t){var e,n,i=this;this.onEachCountObservable=new R.c,this.onTimerAbortedObservable=new R.c,this.onTimerEndedObservable=new R.c,this.onStateChangedObservable=new R.c,this._observer=null,this._breakOnNextTick=!1,this._tick=function(o){var a=Date.now();i._timer=a-i._startTime;var s={startTime:i._startTime,currentTime:a,deltaTime:i._timer,completeRate:i._timer/i._timeToEnd,payload:o},d=i._breakOnNextTick||i._breakCondition(s);d||i._timer>=i._timeToEnd?i._stop(s,d):i.onEachCountObservable.notifyObservers(s)},this._setState(Gi.INIT),this._contextObservable=t.contextObservable,this._observableParameters=(e=t.observableParameters)!==null&&e!==void 0?e:{},this._breakCondition=(n=t.breakCondition)!==null&&n!==void 0?n:function(){return!1},t.onEnded&&this.onTimerEndedObservable.add(t.onEnded),t.onTick&&this.onEachCountObservable.add(t.onTick),t.onAborted&&this.onTimerAbortedObservable.add(t.onAborted)}return Object.defineProperty(r.prototype,"breakCondition",{set:function(t){this._breakCondition=t},enumerable:!1,configurable:!0}),r.prototype.clearObservables=function(){this.onEachCountObservable.clear(),this.onTimerAbortedObservable.clear(),this.onTimerEndedObservable.clear(),this.onStateChangedObservable.clear()},r.prototype.start=function(t){if(t===void 0&&(t=this._timeToEnd),this._state===Gi.STARTED)throw new Error("Timer already started. Please stop it before starting again");this._timeToEnd=t,this._startTime=Date.now(),this._timer=0,this._observer=this._contextObservable.add(this._tick,this._observableParameters.mask,this._observableParameters.insertFirst,this._observableParameters.scope),this._setState(Gi.STARTED)},r.prototype.stop=function(){this._state===Gi.STARTED&&(this._breakOnNextTick=!0)},r.prototype.dispose=function(){this._observer&&this._contextObservable.remove(this._observer),this.clearObservables()},r.prototype._setState=function(t){this._state=t,this.onStateChangedObservable.notifyObservers(this._state)},r.prototype._stop=function(t,e){e===void 0&&(e=!1),this._contextObservable.remove(this._observer),this._setState(Gi.ENDED),e?this.onTimerAbortedObservable.notifyObservers(t):this.onTimerEndedObservable.notifyObservers(t)},r}(),uo=function(r){function t(e,n){var i=r.call(this,e)||this;return i._options=n,i._controllers={},i._snappedToPoint=!1,i._tmpRay=new dn.a(new u.e,new u.e),i._tmpVector=new u.e,i._tmpQuaternion=new u.b,i.backwardsMovementEnabled=!0,i.backwardsTeleportationDistance=.7,i.parabolicCheckRadius=5,i.parabolicRayEnabled=!0,i.straightRayEnabled=!0,i.rotationAngle=Math.PI/8,i._rotationEnabled=!0,i._attachController=function(o){if(!(i._controllers[o.uniqueId]||i._options.forceHandedness&&o.inputSource.handedness!==i._options.forceHandedness)){i._controllers[o.uniqueId]={xrController:o,teleportationState:{forward:!1,backwards:!1,rotating:!1,currentRotation:0,baseRotation:0}};var a=i._controllers[o.uniqueId];if(a.xrController.inputSource.targetRayMode==="tracked-pointer"&&a.xrController.inputSource.gamepad){var s=function(){if(o.motionController){var d=o.motionController.getComponentOfType(Cr.THUMBSTICK_TYPE)||o.motionController.getComponentOfType(Cr.TOUCHPAD_TYPE);if(!d||i._options.useMainComponentOnly){var p=o.motionController.getMainComponent();if(!p)return;a.teleportationComponent=p,a.onButtonChangedObserver=p.onButtonStateChangedObservable.add(function(){p.changes.pressed&&(p.changes.pressed.current?(a.teleportationState.forward=!0,i._currentTeleportationControllerId=a.xrController.uniqueId,a.teleportationState.baseRotation=i._options.xrInput.xrCamera.rotationQuaternion.toEulerAngles().y,a.teleportationState.currentRotation=0,ks({timeout:i._options.timeToTeleport||3e3,contextObservable:i._xrSessionManager.onXRFrameObservable,breakCondition:function(){return!p.pressed},onEnded:function(){i._currentTeleportationControllerId===a.xrController.uniqueId&&a.teleportationState.forward&&i._teleportForward(o.uniqueId)}})):(a.teleportationState.forward=!1,i._currentTeleportationControllerId=""))})}else a.teleportationComponent=d,a.onAxisChangedObserver=d.onAxisValueChangedObservable.add(function(b){if(b.y<=.7&&a.teleportationState.backwards&&(a.teleportationState.backwards=!1),b.y>.7&&!a.teleportationState.forward&&i.backwardsMovementEnabled&&!i.snapPointsOnly&&!a.teleportationState.backwards){a.teleportationState.backwards=!0,i._tmpQuaternion.copyFrom(i._options.xrInput.xrCamera.rotationQuaternion),i._tmpQuaternion.toEulerAnglesToRef(i._tmpVector),i._tmpVector.x=0,i._tmpVector.z=0,u.b.FromEulerVectorToRef(i._tmpVector,i._tmpQuaternion),i._tmpVector.set(0,0,i.backwardsTeleportationDistance*(i._xrSessionManager.scene.useRightHandedSystem?1:-1)),i._tmpVector.rotateByQuaternionToRef(i._tmpQuaternion,i._tmpVector),i._tmpVector.addInPlace(i._options.xrInput.xrCamera.position),i._tmpRay.origin.copyFrom(i._tmpVector),i._tmpRay.length=i._options.xrInput.xrCamera.realWorldHeight+.1,i._tmpRay.direction.set(0,-1,0);var x=i._xrSessionManager.scene.pickWithRay(i._tmpRay,function(B){return i._floorMeshes.indexOf(B)!==-1});x&&x.pickedPoint&&(i._options.xrInput.xrCamera.position.x=x.pickedPoint.x,i._options.xrInput.xrCamera.position.z=x.pickedPoint.z)}if(b.y<-.7&&!i._currentTeleportationControllerId&&!a.teleportationState.rotating&&(a.teleportationState.forward=!0,i._currentTeleportationControllerId=a.xrController.uniqueId,a.teleportationState.baseRotation=i._options.xrInput.xrCamera.rotationQuaternion.toEulerAngles().y),b.x){if(a.teleportationState.forward)i._currentTeleportationControllerId===a.xrController.uniqueId&&(i.rotationEnabled?setTimeout(function(){a.teleportationState.currentRotation=Math.atan2(b.x,b.y*(i._xrSessionManager.scene.useRightHandedSystem?1:-1))}):a.teleportationState.currentRotation=0);else if(!a.teleportationState.rotating&&Math.abs(b.x)>.7){a.teleportationState.rotating=!0;var O=i.rotationAngle*(b.x>0?1:-1)*(i._xrSessionManager.scene.useRightHandedSystem?-1:1);i._options.xrInput.xrCamera.rotationQuaternion.multiplyInPlace(u.b.FromEulerAngles(0,O,0))}}else a.teleportationState.rotating=!1;b.x===0&&b.y===0&&a.teleportationState.forward&&i._teleportForward(o.uniqueId)})}};o.motionController?s():o.onMotionControllerInitObservable.addOnce(function(){s()})}else i._xrSessionManager.scene.onPointerObservable.add(function(d){d.type===Tt.a.POINTERDOWN?(a.teleportationState.forward=!0,i._currentTeleportationControllerId=a.xrController.uniqueId,a.teleportationState.baseRotation=i._options.xrInput.xrCamera.rotationQuaternion.toEulerAngles().y,a.teleportationState.currentRotation=0,ks({timeout:i._options.timeToTeleport||3e3,contextObservable:i._xrSessionManager.onXRFrameObservable,onEnded:function(){i._currentTeleportationControllerId===a.xrController.uniqueId&&a.teleportationState.forward&&i._teleportForward(o.uniqueId)}})):d.type===Tt.a.POINTERUP&&(a.teleportationState.forward=!1,i._currentTeleportationControllerId="")})}},i._options.teleportationTargetMesh||i._createDefaultTargetMesh(),i._floorMeshes=i._options.floorMeshes||[],i._snapToPositions=i._options.snapPositions||[],i._setTargetMeshVisibility(!1),i}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"rotationEnabled",{get:function(){return this._rotationEnabled},set:function(e){if(this._rotationEnabled=e,this._options.teleportationTargetMesh){var n=this._options.teleportationTargetMesh.getChildMeshes(!1,function(i){return i.name==="rotationCone"});n[0]&&n[0].setEnabled(e)}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"teleportationTargetMesh",{get:function(){return this._options.teleportationTargetMesh||null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"snapPointsOnly",{get:function(){return!!this._options.snapPointsOnly},set:function(e){this._options.snapPointsOnly=e},enumerable:!1,configurable:!0}),t.prototype.addFloorMesh=function(e){this._floorMeshes.push(e)},t.prototype.addSnapPoint=function(e){this._snapToPositions.push(e)},t.prototype.attach=function(){var e=this;return!!r.prototype.attach.call(this)&&(this._currentTeleportationControllerId="",this._options.xrInput.controllers.forEach(this._attachController),this._addNewAttachObserver(this._options.xrInput.onControllerAddedObservable,this._attachController),this._addNewAttachObserver(this._options.xrInput.onControllerRemovedObservable,function(n){e._detachController(n.uniqueId)}),!0)},t.prototype.detach=function(){var e=this;return!!r.prototype.detach.call(this)&&(Object.keys(this._controllers).forEach(function(n){e._detachController(n)}),this._setTargetMeshVisibility(!1),this._currentTeleportationControllerId="",this._controllers={},!0)},t.prototype.dispose=function(){r.prototype.dispose.call(this),this._options.teleportationTargetMesh&&this._options.teleportationTargetMesh.dispose(!1,!0)},t.prototype.removeFloorMesh=function(e){var n=this._floorMeshes.indexOf(e);n!==-1&&this._floorMeshes.splice(n,1)},t.prototype.removeFloorMeshByName=function(e){var n=this._xrSessionManager.scene.getMeshByName(e);n&&this.removeFloorMesh(n)},t.prototype.removeSnapPoint=function(e){var n=this._snapToPositions.indexOf(e);if(n===-1){for(var i=0;i=p.video.HAVE_CURRENT_DATA;return!d.poster||d.autoPlay&&b?b&&p._createInternalTexture():(p._texture=p._getEngine().createTexture(d.poster,!1,!p.invertY,i),p._displayingPosterTexture=!0),p}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"onUserActionRequestedObservable",{get:function(){return this._onUserActionRequestedObservable||(this._onUserActionRequestedObservable=new R.c),this._onUserActionRequestedObservable},enumerable:!1,configurable:!0}),t.prototype._getName=function(e){return e instanceof HTMLVideoElement?e.currentSrc:typeof e=="object"?e.toString():e},t.prototype._getVideo=function(e){if(e instanceof HTMLVideoElement)return Xe.b.SetCorsBehavior(e.currentSrc,e),e;var n=document.createElement("video");return typeof e=="string"?(Xe.b.SetCorsBehavior(e,n),n.src=e):(Xe.b.SetCorsBehavior(e[0],n),e.forEach(function(i){var o=document.createElement("source");o.src=i,n.appendChild(o)})),n},t.prototype._rebuild=function(){this.update()},t.prototype.update=function(){this.autoUpdateTexture&&this.updateTexture(!0)},t.prototype.updateTexture=function(e){e&&(this.video.paused&&this._stillImageCaptured||(this._stillImageCaptured=!0,this._updateInternalTexture()))},t.prototype.updateURL=function(e){this.video.src=e,this._currentSrc=e},t.prototype.clone=function(){return new t(this.name,this._currentSrc,this.getScene(),this._generateMipMaps,this.invertY,this.samplingMode,this._settings)},t.prototype.dispose=function(){r.prototype.dispose.call(this),this._currentSrc=null,this._onUserActionRequestedObservable&&(this._onUserActionRequestedObservable.clear(),this._onUserActionRequestedObservable=null),this.video.removeEventListener(this._createInternalTextureOnEvent,this._createInternalTexture),this.video.removeEventListener("paused",this._updateInternalTexture),this.video.removeEventListener("seeked",this._updateInternalTexture),this.video.removeEventListener("emptied",this.reset),this.video.pause()},t.CreateFromStreamAsync=function(e,n){var i=document.createElement("video");return e.getEngine()._badOS&&(document.body.appendChild(i),i.style.transform="scale(0.0001, 0.0001)",i.style.opacity="0",i.style.position="fixed",i.style.bottom="0px",i.style.right="0px"),i.setAttribute("autoplay",""),i.setAttribute("muted","true"),i.setAttribute("playsinline",""),i.muted=!0,i.mozSrcObject!==void 0?i.mozSrcObject=n:typeof i.srcObject=="object"?i.srcObject=n:(window.URL=window.URL||window.webkitURL||window.mozURL||window.msURL,i.src=window.URL&&window.URL.createObjectURL(n)),new Promise(function(o){var a=function(){o(new t("video",i,e,!0,!0)),i.removeEventListener("playing",a)};i.addEventListener("playing",a),i.play()})},t.CreateFromWebCamAsync=function(e,n,i){var o,a=this;return i===void 0&&(i=!1),n&&n.deviceId&&(o={exact:n.deviceId}),navigator.mediaDevices?navigator.mediaDevices.getUserMedia({video:n,audio:i}).then(function(s){return a.CreateFromStreamAsync(e,s)}):(navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia,navigator.getUserMedia&&navigator.getUserMedia({video:{deviceId:o,width:{min:n&&n.minWidth||256,max:n&&n.maxWidth||640},height:{min:n&&n.minHeight||256,max:n&&n.maxHeight||480}},audio:i},function(s){return a.CreateFromStreamAsync(e,s)},function(s){l.a.Error(s.name)}),Promise.reject("No support for userMedia on this device"))},t.CreateFromWebCam=function(e,n,i,o){o===void 0&&(o=!1),this.CreateFromWebCamAsync(e,i,o).then(function(a){n&&n(a)}).catch(function(a){l.a.Error(a.name)})},t}(we.a),v_=function(r){function t(){return r!==null&&r.apply(this,arguments)||this}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"videoTexture",{get:function(){return this._texture},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"videoMode",{get:function(){return this.textureMode},set:function(e){this.textureMode=e},enumerable:!1,configurable:!0}),t.prototype._initTexture=function(e,n,i){var o=this,a={loop:i.loop,autoPlay:i.autoPlay,autoUpdateTexture:!0,poster:i.poster},s=new Iu((this.name||"videoDome")+"_texture",e,n,i.generateMipMaps,this._useDirectMapping,we.a.TRILINEAR_SAMPLINGMODE,a);return i.clickToPlay&&(n.onPointerUp=function(){o._texture.video.play()}),s},t.MODE_MONOSCOPIC=Vi.MODE_MONOSCOPIC,t.MODE_TOPBOTTOM=Vi.MODE_TOPBOTTOM,t.MODE_SIDEBYSIDE=Vi.MODE_SIDEBYSIDE,t}(Vi),Xn=f(55),b_=function(){function r(t){this.engine=t,this._captureGPUFrameTime=!1,this._gpuFrameTime=new Xn.a,this._captureShaderCompilationTime=!1,this._shaderCompilationTime=new Xn.a,this._onBeginFrameObserver=null,this._onEndFrameObserver=null,this._onBeforeShaderCompilationObserver=null,this._onAfterShaderCompilationObserver=null}return Object.defineProperty(r.prototype,"gpuFrameTimeCounter",{get:function(){return this._gpuFrameTime},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"captureGPUFrameTime",{get:function(){return this._captureGPUFrameTime},set:function(t){var e=this;t!==this._captureGPUFrameTime&&(this._captureGPUFrameTime=t,t?(this._onBeginFrameObserver=this.engine.onBeginFrameObservable.add(function(){e._gpuFrameTimeToken||(e._gpuFrameTimeToken=e.engine.startTimeQuery())}),this._onEndFrameObserver=this.engine.onEndFrameObservable.add(function(){if(e._gpuFrameTimeToken){var n=e.engine.endTimeQuery(e._gpuFrameTimeToken);n>-1&&(e._gpuFrameTimeToken=null,e._gpuFrameTime.fetchNewFrame(),e._gpuFrameTime.addCount(n,!0))}})):(this.engine.onBeginFrameObservable.remove(this._onBeginFrameObserver),this._onBeginFrameObserver=null,this.engine.onEndFrameObservable.remove(this._onEndFrameObserver),this._onEndFrameObserver=null))},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"shaderCompilationTimeCounter",{get:function(){return this._shaderCompilationTime},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"captureShaderCompilationTime",{get:function(){return this._captureShaderCompilationTime},set:function(t){var e=this;t!==this._captureShaderCompilationTime&&(this._captureShaderCompilationTime=t,t?(this._onBeforeShaderCompilationObserver=this.engine.onBeforeShaderCompilationObservable.add(function(){e._shaderCompilationTime.fetchNewFrame(),e._shaderCompilationTime.beginMonitoring()}),this._onAfterShaderCompilationObserver=this.engine.onAfterShaderCompilationObservable.add(function(){e._shaderCompilationTime.endMonitoring()})):(this.engine.onBeforeShaderCompilationObservable.remove(this._onBeforeShaderCompilationObserver),this._onBeforeShaderCompilationObserver=null,this.engine.onAfterShaderCompilationObservable.remove(this._onAfterShaderCompilationObserver),this._onAfterShaderCompilationObserver=null))},enumerable:!1,configurable:!0}),r.prototype.dispose=function(){this.engine.onBeginFrameObservable.remove(this._onBeginFrameObserver),this._onBeginFrameObserver=null,this.engine.onEndFrameObservable.remove(this._onEndFrameObserver),this._onEndFrameObserver=null,this.engine.onBeforeShaderCompilationObservable.remove(this._onBeforeShaderCompilationObserver),this._onBeforeShaderCompilationObserver=null,this.engine.onAfterShaderCompilationObservable.remove(this._onAfterShaderCompilationObserver),this._onAfterShaderCompilationObserver=null,this.engine=null},r}(),y_=function(){function r(t){var e=this;this.scene=t,this._captureActiveMeshesEvaluationTime=!1,this._activeMeshesEvaluationTime=new Xn.a,this._captureRenderTargetsRenderTime=!1,this._renderTargetsRenderTime=new Xn.a,this._captureFrameTime=!1,this._frameTime=new Xn.a,this._captureRenderTime=!1,this._renderTime=new Xn.a,this._captureInterFrameTime=!1,this._interFrameTime=new Xn.a,this._captureParticlesRenderTime=!1,this._particlesRenderTime=new Xn.a,this._captureSpritesRenderTime=!1,this._spritesRenderTime=new Xn.a,this._capturePhysicsTime=!1,this._physicsTime=new Xn.a,this._captureAnimationsTime=!1,this._animationsTime=new Xn.a,this._captureCameraRenderTime=!1,this._cameraRenderTime=new Xn.a,this._onBeforeActiveMeshesEvaluationObserver=null,this._onAfterActiveMeshesEvaluationObserver=null,this._onBeforeRenderTargetsRenderObserver=null,this._onAfterRenderTargetsRenderObserver=null,this._onAfterRenderObserver=null,this._onBeforeDrawPhaseObserver=null,this._onAfterDrawPhaseObserver=null,this._onBeforeAnimationsObserver=null,this._onBeforeParticlesRenderingObserver=null,this._onAfterParticlesRenderingObserver=null,this._onBeforeSpritesRenderingObserver=null,this._onAfterSpritesRenderingObserver=null,this._onBeforePhysicsObserver=null,this._onAfterPhysicsObserver=null,this._onAfterAnimationsObserver=null,this._onBeforeCameraRenderObserver=null,this._onAfterCameraRenderObserver=null,this._onBeforeAnimationsObserver=t.onBeforeAnimationsObservable.add(function(){e._captureActiveMeshesEvaluationTime&&e._activeMeshesEvaluationTime.fetchNewFrame(),e._captureRenderTargetsRenderTime&&e._renderTargetsRenderTime.fetchNewFrame(),e._captureFrameTime&&(Xe.b.StartPerformanceCounter("Scene rendering"),e._frameTime.beginMonitoring()),e._captureInterFrameTime&&e._interFrameTime.endMonitoring(),e._captureParticlesRenderTime&&e._particlesRenderTime.fetchNewFrame(),e._captureSpritesRenderTime&&e._spritesRenderTime.fetchNewFrame(),e._captureAnimationsTime&&e._animationsTime.beginMonitoring(),e.scene.getEngine()._drawCalls.fetchNewFrame()}),this._onAfterRenderObserver=t.onAfterRenderObservable.add(function(){e._captureFrameTime&&(Xe.b.EndPerformanceCounter("Scene rendering"),e._frameTime.endMonitoring()),e._captureRenderTime&&e._renderTime.endMonitoring(!1),e._captureInterFrameTime&&e._interFrameTime.beginMonitoring()})}return Object.defineProperty(r.prototype,"activeMeshesEvaluationTimeCounter",{get:function(){return this._activeMeshesEvaluationTime},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"captureActiveMeshesEvaluationTime",{get:function(){return this._captureActiveMeshesEvaluationTime},set:function(t){var e=this;t!==this._captureActiveMeshesEvaluationTime&&(this._captureActiveMeshesEvaluationTime=t,t?(this._onBeforeActiveMeshesEvaluationObserver=this.scene.onBeforeActiveMeshesEvaluationObservable.add(function(){Xe.b.StartPerformanceCounter("Active meshes evaluation"),e._activeMeshesEvaluationTime.beginMonitoring()}),this._onAfterActiveMeshesEvaluationObserver=this.scene.onAfterActiveMeshesEvaluationObservable.add(function(){Xe.b.EndPerformanceCounter("Active meshes evaluation"),e._activeMeshesEvaluationTime.endMonitoring()})):(this.scene.onBeforeActiveMeshesEvaluationObservable.remove(this._onBeforeActiveMeshesEvaluationObserver),this._onBeforeActiveMeshesEvaluationObserver=null,this.scene.onAfterActiveMeshesEvaluationObservable.remove(this._onAfterActiveMeshesEvaluationObserver),this._onAfterActiveMeshesEvaluationObserver=null))},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"renderTargetsRenderTimeCounter",{get:function(){return this._renderTargetsRenderTime},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"captureRenderTargetsRenderTime",{get:function(){return this._captureRenderTargetsRenderTime},set:function(t){var e=this;t!==this._captureRenderTargetsRenderTime&&(this._captureRenderTargetsRenderTime=t,t?(this._onBeforeRenderTargetsRenderObserver=this.scene.onBeforeRenderTargetsRenderObservable.add(function(){Xe.b.StartPerformanceCounter("Render targets rendering"),e._renderTargetsRenderTime.beginMonitoring()}),this._onAfterRenderTargetsRenderObserver=this.scene.onAfterRenderTargetsRenderObservable.add(function(){Xe.b.EndPerformanceCounter("Render targets rendering"),e._renderTargetsRenderTime.endMonitoring(!1)})):(this.scene.onBeforeRenderTargetsRenderObservable.remove(this._onBeforeRenderTargetsRenderObserver),this._onBeforeRenderTargetsRenderObserver=null,this.scene.onAfterRenderTargetsRenderObservable.remove(this._onAfterRenderTargetsRenderObserver),this._onAfterRenderTargetsRenderObserver=null))},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"particlesRenderTimeCounter",{get:function(){return this._particlesRenderTime},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"captureParticlesRenderTime",{get:function(){return this._captureParticlesRenderTime},set:function(t){var e=this;t!==this._captureParticlesRenderTime&&(this._captureParticlesRenderTime=t,t?(this._onBeforeParticlesRenderingObserver=this.scene.onBeforeParticlesRenderingObservable.add(function(){Xe.b.StartPerformanceCounter("Particles"),e._particlesRenderTime.beginMonitoring()}),this._onAfterParticlesRenderingObserver=this.scene.onAfterParticlesRenderingObservable.add(function(){Xe.b.EndPerformanceCounter("Particles"),e._particlesRenderTime.endMonitoring(!1)})):(this.scene.onBeforeParticlesRenderingObservable.remove(this._onBeforeParticlesRenderingObserver),this._onBeforeParticlesRenderingObserver=null,this.scene.onAfterParticlesRenderingObservable.remove(this._onAfterParticlesRenderingObserver),this._onAfterParticlesRenderingObserver=null))},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"spritesRenderTimeCounter",{get:function(){return this._spritesRenderTime},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"captureSpritesRenderTime",{get:function(){return this._captureSpritesRenderTime},set:function(t){var e=this;t!==this._captureSpritesRenderTime&&(this._captureSpritesRenderTime=t,this.scene.spriteManagers&&(t?(this._onBeforeSpritesRenderingObserver=this.scene.onBeforeSpritesRenderingObservable.add(function(){Xe.b.StartPerformanceCounter("Sprites"),e._spritesRenderTime.beginMonitoring()}),this._onAfterSpritesRenderingObserver=this.scene.onAfterSpritesRenderingObservable.add(function(){Xe.b.EndPerformanceCounter("Sprites"),e._spritesRenderTime.endMonitoring(!1)})):(this.scene.onBeforeSpritesRenderingObservable.remove(this._onBeforeSpritesRenderingObserver),this._onBeforeSpritesRenderingObserver=null,this.scene.onAfterSpritesRenderingObservable.remove(this._onAfterSpritesRenderingObserver),this._onAfterSpritesRenderingObserver=null)))},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"physicsTimeCounter",{get:function(){return this._physicsTime},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"capturePhysicsTime",{get:function(){return this._capturePhysicsTime},set:function(t){var e=this;t!==this._capturePhysicsTime&&this.scene.onBeforePhysicsObservable&&(this._capturePhysicsTime=t,t?(this._onBeforePhysicsObserver=this.scene.onBeforePhysicsObservable.add(function(){Xe.b.StartPerformanceCounter("Physics"),e._physicsTime.beginMonitoring()}),this._onAfterPhysicsObserver=this.scene.onAfterPhysicsObservable.add(function(){Xe.b.EndPerformanceCounter("Physics"),e._physicsTime.endMonitoring()})):(this.scene.onBeforePhysicsObservable.remove(this._onBeforePhysicsObserver),this._onBeforePhysicsObserver=null,this.scene.onAfterPhysicsObservable.remove(this._onAfterPhysicsObserver),this._onAfterPhysicsObserver=null))},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"animationsTimeCounter",{get:function(){return this._animationsTime},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"captureAnimationsTime",{get:function(){return this._captureAnimationsTime},set:function(t){var e=this;t!==this._captureAnimationsTime&&(this._captureAnimationsTime=t,t?this._onAfterAnimationsObserver=this.scene.onAfterAnimationsObservable.add(function(){e._animationsTime.endMonitoring()}):(this.scene.onAfterAnimationsObservable.remove(this._onAfterAnimationsObserver),this._onAfterAnimationsObserver=null))},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"frameTimeCounter",{get:function(){return this._frameTime},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"captureFrameTime",{get:function(){return this._captureFrameTime},set:function(t){this._captureFrameTime=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"interFrameTimeCounter",{get:function(){return this._interFrameTime},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"captureInterFrameTime",{get:function(){return this._captureInterFrameTime},set:function(t){this._captureInterFrameTime=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"renderTimeCounter",{get:function(){return this._renderTime},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"captureRenderTime",{get:function(){return this._captureRenderTime},set:function(t){var e=this;t!==this._captureRenderTime&&(this._captureRenderTime=t,t?(this._onBeforeDrawPhaseObserver=this.scene.onBeforeDrawPhaseObservable.add(function(){e._renderTime.beginMonitoring(),Xe.b.StartPerformanceCounter("Main render")}),this._onAfterDrawPhaseObserver=this.scene.onAfterDrawPhaseObservable.add(function(){e._renderTime.endMonitoring(!1),Xe.b.EndPerformanceCounter("Main render")})):(this.scene.onBeforeDrawPhaseObservable.remove(this._onBeforeDrawPhaseObserver),this._onBeforeDrawPhaseObserver=null,this.scene.onAfterDrawPhaseObservable.remove(this._onAfterDrawPhaseObserver),this._onAfterDrawPhaseObserver=null))},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"cameraRenderTimeCounter",{get:function(){return this._cameraRenderTime},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"captureCameraRenderTime",{get:function(){return this._captureCameraRenderTime},set:function(t){var e=this;t!==this._captureCameraRenderTime&&(this._captureCameraRenderTime=t,t?(this._onBeforeCameraRenderObserver=this.scene.onBeforeCameraRenderObservable.add(function(n){e._cameraRenderTime.beginMonitoring(),Xe.b.StartPerformanceCounter("Rendering camera "+n.name)}),this._onAfterCameraRenderObserver=this.scene.onAfterCameraRenderObservable.add(function(n){e._cameraRenderTime.endMonitoring(!1),Xe.b.EndPerformanceCounter("Rendering camera "+n.name)})):(this.scene.onBeforeCameraRenderObservable.remove(this._onBeforeCameraRenderObserver),this._onBeforeCameraRenderObserver=null,this.scene.onAfterCameraRenderObservable.remove(this._onAfterCameraRenderObserver),this._onAfterCameraRenderObserver=null))},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"drawCallsCounter",{get:function(){return this.scene.getEngine()._drawCalls},enumerable:!1,configurable:!0}),r.prototype.dispose=function(){this.scene.onAfterRenderObservable.remove(this._onAfterRenderObserver),this._onAfterRenderObserver=null,this.scene.onBeforeActiveMeshesEvaluationObservable.remove(this._onBeforeActiveMeshesEvaluationObserver),this._onBeforeActiveMeshesEvaluationObserver=null,this.scene.onAfterActiveMeshesEvaluationObservable.remove(this._onAfterActiveMeshesEvaluationObserver),this._onAfterActiveMeshesEvaluationObserver=null,this.scene.onBeforeRenderTargetsRenderObservable.remove(this._onBeforeRenderTargetsRenderObserver),this._onBeforeRenderTargetsRenderObserver=null,this.scene.onAfterRenderTargetsRenderObservable.remove(this._onAfterRenderTargetsRenderObserver),this._onAfterRenderTargetsRenderObserver=null,this.scene.onBeforeAnimationsObservable.remove(this._onBeforeAnimationsObserver),this._onBeforeAnimationsObserver=null,this.scene.onBeforeParticlesRenderingObservable.remove(this._onBeforeParticlesRenderingObserver),this._onBeforeParticlesRenderingObserver=null,this.scene.onAfterParticlesRenderingObservable.remove(this._onAfterParticlesRenderingObserver),this._onAfterParticlesRenderingObserver=null,this._onBeforeSpritesRenderingObserver&&(this.scene.onBeforeSpritesRenderingObservable.remove(this._onBeforeSpritesRenderingObserver),this._onBeforeSpritesRenderingObserver=null),this._onAfterSpritesRenderingObserver&&(this.scene.onAfterSpritesRenderingObservable.remove(this._onAfterSpritesRenderingObserver),this._onAfterSpritesRenderingObserver=null),this.scene.onBeforeDrawPhaseObservable.remove(this._onBeforeDrawPhaseObserver),this._onBeforeDrawPhaseObserver=null,this.scene.onAfterDrawPhaseObservable.remove(this._onAfterDrawPhaseObserver),this._onAfterDrawPhaseObserver=null,this._onBeforePhysicsObserver&&(this.scene.onBeforePhysicsObservable.remove(this._onBeforePhysicsObserver),this._onBeforePhysicsObserver=null),this._onAfterPhysicsObserver&&(this.scene.onAfterPhysicsObservable.remove(this._onAfterPhysicsObserver),this._onAfterPhysicsObserver=null),this.scene.onAfterAnimationsObservable.remove(this._onAfterAnimationsObserver),this._onAfterAnimationsObserver=null,this.scene.onBeforeCameraRenderObservable.remove(this._onBeforeCameraRenderObserver),this._onBeforeCameraRenderObserver=null,this.scene.onAfterCameraRenderObservable.remove(this._onAfterCameraRenderObserver),this._onAfterCameraRenderObserver=null,this.scene=null},r}(),T_=`#ifdef DIFFUSE +varying vec2 vUVDiffuse; +uniform sampler2D diffuseSampler; +#endif +#ifdef OPACITY +varying vec2 vUVOpacity; +uniform sampler2D opacitySampler; +uniform float opacityIntensity; +#endif +#ifdef EMISSIVE +varying vec2 vUVEmissive; +uniform sampler2D emissiveSampler; +#endif +#ifdef VERTEXALPHA +varying vec4 vColor; +#endif +uniform vec4 glowColor; +void main(void) +{ +vec4 finalColor=glowColor; + +#ifdef DIFFUSE +vec4 albedoTexture=texture2D(diffuseSampler,vUVDiffuse); +#ifdef GLOW + +finalColor.a*=albedoTexture.a; +#endif +#ifdef HIGHLIGHT + +finalColor.a=albedoTexture.a; +#endif +#endif +#ifdef OPACITY +vec4 opacityMap=texture2D(opacitySampler,vUVOpacity); +#ifdef OPACITYRGB +finalColor.a*=getLuminance(opacityMap.rgb); +#else +finalColor.a*=opacityMap.a; +#endif +finalColor.a*=opacityIntensity; +#endif +#ifdef VERTEXALPHA +finalColor.a*=vColor.a; +#endif +#ifdef ALPHATEST +if (finalColor.a +#include +#include[0..maxSimultaneousMorphTargets] + +#include +uniform mat4 viewProjection; +varying vec4 vPosition; +#ifdef UV1 +attribute vec2 uv; +#endif +#ifdef UV2 +attribute vec2 uv2; +#endif +#ifdef DIFFUSE +varying vec2 vUVDiffuse; +uniform mat4 diffuseMatrix; +#endif +#ifdef OPACITY +varying vec2 vUVOpacity; +uniform mat4 opacityMatrix; +#endif +#ifdef EMISSIVE +varying vec2 vUVEmissive; +uniform mat4 emissiveMatrix; +#endif +#ifdef VERTEXALPHA +attribute vec4 color; +varying vec4 vColor; +#endif +void main(void) +{ +vec3 positionUpdated=position; +#ifdef UV1 +vec2 uvUpdated=uv; +#endif +#include[0..maxSimultaneousMorphTargets] +#include +#include +#ifdef CUBEMAP +vPosition=finalWorld*vec4(positionUpdated,1.0); +gl_Position=viewProjection*finalWorld*vec4(position,1.0); +#else +vPosition=viewProjection*finalWorld*vec4(positionUpdated,1.0); +gl_Position=vPosition; +#endif +#ifdef DIFFUSE +#ifdef DIFFUSEUV1 +vUVDiffuse=vec2(diffuseMatrix*vec4(uvUpdated,1.0,0.0)); +#endif +#ifdef DIFFUSEUV2 +vUVDiffuse=vec2(diffuseMatrix*vec4(uv2,1.0,0.0)); +#endif +#endif +#ifdef OPACITY +#ifdef OPACITYUV1 +vUVOpacity=vec2(opacityMatrix*vec4(uvUpdated,1.0,0.0)); +#endif +#ifdef OPACITYUV2 +vUVOpacity=vec2(opacityMatrix*vec4(uv2,1.0,0.0)); +#endif +#endif +#ifdef EMISSIVE +#ifdef EMISSIVEUV1 +vUVEmissive=vec2(emissiveMatrix*vec4(uvUpdated,1.0,0.0)); +#endif +#ifdef EMISSIVEUV2 +vUVEmissive=vec2(emissiveMatrix*vec4(uv2,1.0,0.0)); +#endif +#endif +#ifdef VERTEXALPHA +vColor=color; +#endif +}`;ze.a.ShadersStore.glowMapGenerationVertexShader=E_;var ho=function(){function r(t,e){this._vertexBuffers={},this._maxSize=0,this._mainTextureDesiredSize={width:0,height:0},this._shouldRender=!0,this._postProcesses=[],this._textures=[],this._emissiveTextureAndColor={texture:null,color:new M.b},this.neutralColor=new M.b,this.isEnabled=!0,this.disableBoundingBoxesFromEffectLayer=!1,this.onDisposeObservable=new R.c,this.onBeforeRenderMainTextureObservable=new R.c,this.onBeforeComposeObservable=new R.c,this.onBeforeRenderMeshToEffect=new R.c,this.onAfterRenderMeshToEffect=new R.c,this.onAfterComposeObservable=new R.c,this.onSizeChangedObservable=new R.c,this.name=t,this._scene=e||te.a.LastCreatedScene,r._SceneComponentInitialization(this._scene),this._engine=this._scene.getEngine(),this._maxSize=this._engine.getCaps().maxTextureSize,this._scene.effectLayers.push(this),this._generateIndexBuffer(),this._generateVertexBuffer()}return Object.defineProperty(r.prototype,"camera",{get:function(){return this._effectLayerOptions.camera},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"renderingGroupId",{get:function(){return this._effectLayerOptions.renderingGroupId},set:function(t){this._effectLayerOptions.renderingGroupId=t},enumerable:!1,configurable:!0}),r.prototype._init=function(t){this._effectLayerOptions=Object(c.a)({mainTextureRatio:.5,alphaBlendingMode:h.a.ALPHA_COMBINE,camera:null,renderingGroupId:-1},t),this._setMainTextureSize(),this._createMainTexture(),this._createTextureAndPostProcesses(),this._mergeEffect=this._createMergeEffect()},r.prototype._generateIndexBuffer=function(){var t=[];t.push(0),t.push(1),t.push(2),t.push(0),t.push(2),t.push(3),this._indexBuffer=this._engine.createIndexBuffer(t)},r.prototype._generateVertexBuffer=function(){var t=[];t.push(1,1),t.push(-1,1),t.push(-1,-1),t.push(1,-1);var e=new Oe.b(this._engine,t,Oe.b.PositionKind,!1,!1,2);this._vertexBuffers[Oe.b.PositionKind]=e},r.prototype._setMainTextureSize=function(){this._effectLayerOptions.mainTextureFixedSize?(this._mainTextureDesiredSize.width=this._effectLayerOptions.mainTextureFixedSize,this._mainTextureDesiredSize.height=this._effectLayerOptions.mainTextureFixedSize):(this._mainTextureDesiredSize.width=this._engine.getRenderWidth()*this._effectLayerOptions.mainTextureRatio,this._mainTextureDesiredSize.height=this._engine.getRenderHeight()*this._effectLayerOptions.mainTextureRatio,this._mainTextureDesiredSize.width=this._engine.needPOTTextures?Ue.a.GetExponentOfTwo(this._mainTextureDesiredSize.width,this._maxSize):this._mainTextureDesiredSize.width,this._mainTextureDesiredSize.height=this._engine.needPOTTextures?Ue.a.GetExponentOfTwo(this._mainTextureDesiredSize.height,this._maxSize):this._mainTextureDesiredSize.height),this._mainTextureDesiredSize.width=Math.floor(this._mainTextureDesiredSize.width),this._mainTextureDesiredSize.height=Math.floor(this._mainTextureDesiredSize.height)},r.prototype._createMainTexture=function(){var t=this;this._mainTexture=new sn("HighlightLayerMainRTT",{width:this._mainTextureDesiredSize.width,height:this._mainTextureDesiredSize.height},this._scene,!1,!0,h.a.TEXTURETYPE_UNSIGNED_INT),this._mainTexture.activeCamera=this._effectLayerOptions.camera,this._mainTexture.wrapU=we.a.CLAMP_ADDRESSMODE,this._mainTexture.wrapV=we.a.CLAMP_ADDRESSMODE,this._mainTexture.anisotropicFilteringLevel=1,this._mainTexture.updateSamplingMode(we.a.BILINEAR_SAMPLINGMODE),this._mainTexture.renderParticles=!1,this._mainTexture.renderList=null,this._mainTexture.ignoreCameraViewport=!0,this._mainTexture.customRenderFunction=function(n,i,o,a){var s;t.onBeforeRenderMainTextureObservable.notifyObservers(t);var d=t._scene.getEngine();if(a.length){for(d.setColorWrite(!1),s=0;s4&&(a.push(Oe.b.MatricesIndicesExtraKind),a.push(Oe.b.MatricesWeightsExtraKind)),o.push("#define NUM_BONE_INFLUENCERS "+s.numBoneInfluencers);var z=s.skeleton;z&&z.isUsingTextureForMatrices?o.push("#define BONETEXTURE"):o.push("#define BonesPerMesh "+(z?z.bones.length+1:0)),s.numBoneInfluencers>0&&F.addCPUSkinningFallback(0,s)}else o.push("#define NUM_BONE_INFLUENCERS 0");var J=s.morphTargetManager,ie=0;J&&J.numInfluencers>0&&(o.push("#define MORPHTARGETS"),ie=J.numInfluencers,o.push("#define NUM_MORPH_INFLUENCERS "+ie),et.a.PrepareAttributesForMorphTargetsInfluencers(a,s,ie)),e&&(o.push("#define INSTANCES"),et.a.PushAttributesForInstances(a),t.getRenderingMesh().hasThinInstances&&o.push("#define THIN_INSTANCES")),this._addCustomEffectDefines(o);var se=o.join(` +`);return this._cachedDefines!==se&&(this._cachedDefines=se,this._effectLayerMapGenerationEffect=this._scene.getEngine().createEffect("glowMapGeneration",a,["world","mBones","viewProjection","glowColor","morphTargetInfluences","boneTextureWidth","diffuseMatrix","emissiveMatrix","opacityMatrix","opacityIntensity"],["diffuseSampler","emissiveSampler","opacitySampler","boneSampler"],se,F,void 0,void 0,{maxSimultaneousMorphTargets:ie})),this._effectLayerMapGenerationEffect.isReady()},r.prototype.render=function(){var t=this._mergeEffect;if(t.isReady()){for(var e=0;e-1&&this._scene.effectLayers.splice(e,1),this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear(),this.onBeforeRenderMainTextureObservable.clear(),this.onBeforeComposeObservable.clear(),this.onBeforeRenderMeshToEffect.clear(),this.onAfterRenderMeshToEffect.clear(),this.onAfterComposeObservable.clear(),this.onSizeChangedObservable.clear()},r.prototype.getClassName=function(){return"EffectLayer"},r.Parse=function(t,e,n){return Xe.b.Instantiate(t.customType).Parse(t,e,n)},r._SceneComponentInitialization=function(t){throw An.a.WarnImport("EffectLayerSceneComponent")},Object(c.c)([Object(L.c)()],r.prototype,"name",void 0),Object(c.c)([Object(L.f)()],r.prototype,"neutralColor",void 0),Object(c.c)([Object(L.c)()],r.prototype,"isEnabled",void 0),Object(c.c)([Object(L.d)()],r.prototype,"camera",null),Object(c.c)([Object(L.c)()],r.prototype,"renderingGroupId",null),Object(c.c)([Object(L.c)()],r.prototype,"disableBoundingBoxesFromEffectLayer",void 0),r}();U.a.AddParser(at.a.NAME_EFFECTLAYER,function(r,t,e,n){if(r.effectLayers){e.effectLayers||(e.effectLayers=new Array);for(var i=0;i0){this._previousStencilState=this._engine.getStencilBuffer();for(var i=0,o=n;i-1)){this._renderEffects=!0,this._needStencil=this._needStencil||a.needStencil();var s=a._mainTexture;s._shouldRender()&&(this.scene.incrementRenderId(),s.render(!1,!1),e=!0)}}this.scene.incrementRenderId()}return e},r.prototype._setStencil=function(){this._needStencil&&this._engine.setStencilBuffer(!0)},r.prototype._setStencilBack=function(){this._needStencil&&this._engine.setStencilBuffer(this._previousStencilState)},r.prototype._draw=function(t){if(this._renderEffects){this._engine.setDepthBuffer(!1);for(var e=this.scene.effectLayers,n=0;n-1},t.prototype.referenceMeshToUseItsOwnMaterial=function(e){this._meshesUsingTheirOwnMaterials.push(e.uniqueId)},t.prototype.unReferenceMeshFromUsingItsOwnMaterial=function(e){for(var n=this._meshesUsingTheirOwnMaterials.indexOf(e.uniqueId);n>=0;)this._meshesUsingTheirOwnMaterials.splice(n,1),n=this._meshesUsingTheirOwnMaterials.indexOf(e.uniqueId)},t.prototype._disposeMesh=function(e){this.removeIncludedOnlyMesh(e),this.removeExcludedMesh(e)},t.prototype.getClassName=function(){return"GlowLayer"},t.prototype.serialize=function(){var e,n=L.a.Serialize(this);if(n.customType="BABYLON.GlowLayer",n.includedMeshes=[],this._includedOnlyMeshes.length)for(e=0;e0&&t.isBackground===e&&t.renderTargetTextures.indexOf(i)>-1&&(t.layerMask&n)!=0},r.prototype._drawRenderTargetBackground=function(t){var e=this;this._draw(function(n){return e._drawRenderTargetPredicate(n,!0,e.scene.activeCamera.layerMask,t)})},r.prototype._drawRenderTargetForeground=function(t){var e=this;this._draw(function(n){return e._drawRenderTargetPredicate(n,!1,e.scene.activeCamera.layerMask,t)})},r.prototype.addFromContainer=function(t){var e=this;t.layers&&t.layers.forEach(function(n){e.scene.layers.push(n)})},r.prototype.removeFromContainer=function(t,e){var n=this;e===void 0&&(e=!1),t.layers&&t.layers.forEach(function(i){var o=n.scene.layers.indexOf(i);o!==-1&&n.scene.layers.splice(o,1),e&&i.dispose()})},r}(),x_=` +varying vec2 vUV; +uniform sampler2D textureSampler; + +uniform vec4 color; + +#include +void main(void) { +vec4 baseColor=texture2D(textureSampler,vUV); +#ifdef LINEAR +baseColor.rgb=toGammaSpace(baseColor.rgb); +#endif +#ifdef ALPHATEST +if (baseColor.a<0.4) +discard; +#endif +gl_FragColor=baseColor*color; +}`;ze.a.ShadersStore.layerPixelShader=x_;var C_=` +attribute vec2 position; + +uniform vec2 scale; +uniform vec2 offset; +uniform mat4 textureMatrix; + +varying vec2 vUV; +const vec2 madd=vec2(0.5,0.5); +void main(void) { +vec2 shiftedPosition=position*scale+offset; +vUV=vec2(textureMatrix*vec4(shiftedPosition*madd+madd,1.0,0.0)); +gl_Position=vec4(shiftedPosition,0.0,1.0); +}`;ze.a.ShadersStore.layerVertexShader=C_;var R_=function(){function r(t,e,n,i,o){this.name=t,this.scale=new u.d(1,1),this.offset=new u.d(0,0),this.alphaBlendingMode=h.a.ALPHA_COMBINE,this.layerMask=268435455,this.renderTargetTextures=[],this.renderOnlyInRenderTargetTextures=!1,this._vertexBuffers={},this.onDisposeObservable=new R.c,this.onBeforeRenderObservable=new R.c,this.onAfterRenderObservable=new R.c,this.texture=e?new we.a(e,n,!0):null,this.isBackground=i===void 0||i,this.color=o===void 0?new M.b(1,1,1,1):o,this._scene=n||te.a.LastCreatedScene;var a=this._scene._getComponent(at.a.NAME_LAYER);a||(a=new Nu(this._scene),this._scene._addComponent(a)),this._scene.layers.push(this);var s=this._scene.getEngine(),d=[];d.push(1,1),d.push(-1,1),d.push(-1,-1),d.push(1,-1);var p=new Oe.b(s,d,Oe.b.PositionKind,!1,!1,2);this._vertexBuffers[Oe.b.PositionKind]=p,this._createIndexBuffer()}return Object.defineProperty(r.prototype,"onDispose",{set:function(t){this._onDisposeObserver&&this.onDisposeObservable.remove(this._onDisposeObserver),this._onDisposeObserver=this.onDisposeObservable.add(t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onBeforeRender",{set:function(t){this._onBeforeRenderObserver&&this.onBeforeRenderObservable.remove(this._onBeforeRenderObserver),this._onBeforeRenderObserver=this.onBeforeRenderObservable.add(t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onAfterRender",{set:function(t){this._onAfterRenderObserver&&this.onAfterRenderObservable.remove(this._onAfterRenderObserver),this._onAfterRenderObserver=this.onAfterRenderObservable.add(t)},enumerable:!1,configurable:!0}),r.prototype._createIndexBuffer=function(){var t=this._scene.getEngine(),e=[];e.push(0),e.push(1),e.push(2),e.push(0),e.push(2),e.push(3),this._indexBuffer=t.createIndexBuffer(e)},r.prototype._rebuild=function(){var t=this._vertexBuffers[Oe.b.PositionKind];t&&t._rebuild(),this._createIndexBuffer()},r.prototype.render=function(){var t=this._scene.getEngine(),e="";this.alphaTest&&(e="#define ALPHATEST"),this.texture&&!this.texture.gammaSpace&&(e+=`\r +#define LINEAR`),this._previousDefines!==e&&(this._previousDefines=e,this._effect=t.createEffect("layer",[Oe.b.PositionKind],["textureMatrix","color","scale","offset"],["textureSampler"],e));var n=this._effect;n&&n.isReady()&&this.texture&&this.texture.isReady()&&(t=this._scene.getEngine(),this.onBeforeRenderObservable.notifyObservers(this),t.enableEffect(n),t.setState(!1),n.setTexture("textureSampler",this.texture),n.setMatrix("textureMatrix",this.texture.getTextureMatrix()),n.setFloat4("color",this.color.r,this.color.g,this.color.b,this.color.a),n.setVector2("offset",this.offset),n.setVector2("scale",this.scale),t.bindBuffers(this._vertexBuffers,this._indexBuffer,n),this.alphaTest?t.drawElementsType(Ht.a.TriangleFillMode,0,6):(t.setAlphaMode(this.alphaBlendingMode),t.drawElementsType(Ht.a.TriangleFillMode,0,6),t.setAlphaMode(h.a.ALPHA_DISABLE)),this.onAfterRenderObservable.notifyObservers(this))},r.prototype.dispose=function(){var t=this._vertexBuffers[Oe.b.PositionKind];t&&(t.dispose(),this._vertexBuffers[Oe.b.PositionKind]=null),this._indexBuffer&&(this._scene.getEngine()._releaseBuffer(this._indexBuffer),this._indexBuffer=null),this.texture&&(this.texture.dispose(),this.texture=null),this.renderTargetTextures=[];var e=this._scene.layers.indexOf(this);this._scene.layers.splice(e,1),this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear(),this.onAfterRenderObservable.clear(),this.onBeforeRenderObservable.clear()},r}(),wu=function(){function r(t,e,n,i,o){this.size=t,this.position=e,this.alphaMode=h.a.ALPHA_ONEONE,this.color=n||new M.a(1,1,1),this.texture=i?new we.a(i,o.getScene(),!0):null,this._system=o,o.lensFlares.push(this)}return r.AddFlare=function(t,e,n,i,o){return new r(t,e,n,i,o)},r.prototype.dispose=function(){this.texture&&this.texture.dispose();var t=this._system.lensFlares.indexOf(this);this._system.lensFlares.splice(t,1)},r}(),O_=` +varying vec2 vUV; +uniform sampler2D textureSampler; + +uniform vec4 color; +void main(void) { +vec4 baseColor=texture2D(textureSampler,vUV); +gl_FragColor=baseColor*color; +}`;ze.a.ShadersStore.lensFlarePixelShader=O_;var M_=` +attribute vec2 position; + +uniform mat4 viewportMatrix; + +varying vec2 vUV; +const vec2 madd=vec2(0.5,0.5); +void main(void) { +vUV=position*madd+madd; +gl_Position=viewportMatrix*vec4(position,0.0,1.0); +}`;ze.a.ShadersStore.lensFlareVertexShader=M_;var zs=function(){function r(t,e,n){this.name=t,this.lensFlares=new Array,this.borderLimit=300,this.viewportBorder=0,this.layerMask=268435455,this._vertexBuffers={},this._isEnabled=!0,this._scene=n||te.a.LastCreatedScene,r._SceneComponentInitialization(this._scene),this._emitter=e,this.id=t,n.lensFlareSystems.push(this),this.meshesSelectionPredicate=function(s){return n.activeCamera&&s.material&&s.isVisible&&s.isEnabled()&&s.isBlocker&&(s.layerMask&n.activeCamera.layerMask)!=0};var i=n.getEngine(),o=[];o.push(1,1),o.push(-1,1),o.push(-1,-1),o.push(1,-1),this._vertexBuffers[Oe.b.PositionKind]=new Oe.b(i,o,Oe.b.PositionKind,!1,!1,2);var a=[];a.push(0),a.push(1),a.push(2),a.push(0),a.push(2),a.push(3),this._indexBuffer=i.createIndexBuffer(a),this._effect=i.createEffect("lensFlare",[Oe.b.PositionKind],["color","viewportMatrix"],["textureSampler"],"")}return Object.defineProperty(r.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(t){this._isEnabled=t},enumerable:!1,configurable:!0}),r.prototype.getScene=function(){return this._scene},r.prototype.getEmitter=function(){return this._emitter},r.prototype.setEmitter=function(t){this._emitter=t},r.prototype.getEmitterPosition=function(){return this._emitter.getAbsolutePosition?this._emitter.getAbsolutePosition():this._emitter.position},r.prototype.computeEffectivePosition=function(t){var e=this.getEmitterPosition();return e=u.e.Project(e,u.a.Identity(),this._scene.getTransformMatrix(),t),this._positionX=e.x,this._positionY=e.y,e=u.e.TransformCoordinates(this.getEmitterPosition(),this._scene.getViewMatrix()),this.viewportBorder>0&&(t.x-=this.viewportBorder,t.y-=this.viewportBorder,t.width+=2*this.viewportBorder,t.height+=2*this.viewportBorder,e.x+=this.viewportBorder,e.y+=this.viewportBorder,this._positionX+=this.viewportBorder,this._positionY+=this.viewportBorder),e.z>0&&(this._positionX>t.x&&this._positionXt.y&&(this._positionY,t.y,t.height),!0)},r.prototype._isVisible=function(){if(!this._isEnabled||!this._scene.activeCamera)return!1;var t=this.getEmitterPosition().subtract(this._scene.activeCamera.globalPosition),e=t.length();t.normalize();var n=new dn.a(this._scene.activeCamera.globalPosition,t),i=this._scene.pickWithRay(n,this.meshesSelectionPredicate,!0);return!i||!i.hit||i.distance>e},r.prototype.render=function(){if(!this._effect.isReady()||!this._scene.activeCamera)return!1;var t,e,n=this._scene.getEngine(),i=this._scene.activeCamera.viewport.toGlobal(n.getRenderWidth(!0),n.getRenderHeight(!0));if(!this.computeEffectivePosition(i)||!this._isVisible())return!1;var o=(t=this._positionXi.x+i.width-this.borderLimit?this._positionX-i.x-i.width+this.borderLimit:0)>(e=this._positionYi.y+i.height-this.borderLimit?this._positionY-i.y-i.height+this.borderLimit:0)?t:e;(o-=this.viewportBorder)>this.borderLimit&&(o=this.borderLimit);var a=1-$.a.Clamp(o/this.borderLimit,0,1);if(a<0)return!1;a>1&&(a=1),this.viewportBorder>0&&(i.x+=this.viewportBorder,i.y+=this.viewportBorder,i.width-=2*this.viewportBorder,i.height-=2*this.viewportBorder,this._positionX-=this.viewportBorder,this._positionY-=this.viewportBorder);var s=i.x+i.width/2,d=i.y+i.height/2,p=s-this._positionX,b=d-this._positionY;n.enableEffect(this._effect),n.setState(!1),n.setDepthBuffer(!1),n.bindBuffers(this._vertexBuffers,this._indexBuffer,this._effect);for(var x=0;x0);for(var n=0,i=e;n0)}},r}();zs._SceneComponentInitialization=function(r){var t=r._getComponent(at.a.NAME_LENSFLARESYSTEM);t||(t=new Fu(r),r._addComponent(t))};var I_=` + + + + +float bayerDither2(vec2 _P) { +return mod(2.0*_P.y+_P.x+1.0,4.0); +} + + +float bayerDither4(vec2 _P) { +vec2 P1=mod(_P,2.0); +vec2 P2=floor(0.5*mod(_P,4.0)); +return 4.0*bayerDither2(P1)+bayerDither2(P2); +} + +float bayerDither8(vec2 _P) { +vec2 P1=mod(_P,2.0); +vec2 P2=floor(0.5*mod(_P,4.0)); +vec2 P4=floor(0.25*mod(_P,8.0)); +return 4.0*(4.0*bayerDither2(P1)+bayerDither2(P2))+bayerDither2(P4); +} +`;ze.a.IncludesShadersStore.bayerDitherFunctions=I_;var D_=`#if SM_FLOAT == 0 +#include +#endif +#if SM_SOFTTRANSPARENTSHADOW == 1 +#include +uniform float softTransparentShadowSM; +#endif +varying float vDepthMetricSM; +#if SM_USEDISTANCE == 1 +uniform vec3 lightDataSM; +varying vec3 vPositionWSM; +#endif +uniform vec3 biasAndScaleSM; +uniform vec2 depthValuesSM; +#if defined(SM_DEPTHCLAMP) && SM_DEPTHCLAMP == 1 +varying float zSM; +#endif +`;ze.a.IncludesShadersStore.shadowMapFragmentDeclaration=D_;var L_=` float depthSM=vDepthMetricSM; +#if defined(SM_DEPTHCLAMP) && SM_DEPTHCLAMP == 1 +#if SM_USEDISTANCE == 1 +depthSM=clamp(((length(vPositionWSM-lightDataSM)+depthValuesSM.x)/(depthValuesSM.y))+biasAndScaleSM.x,0.0,1.0); +#else +depthSM=clamp(((zSM+depthValuesSM.x)/(depthValuesSM.y))+biasAndScaleSM.x,0.0,1.0); +#endif +gl_FragDepth=depthSM; +#elif SM_USEDISTANCE == 1 +depthSM=(length(vPositionWSM-lightDataSM)+depthValuesSM.x)/(depthValuesSM.y)+biasAndScaleSM.x; +#endif +#if SM_ESM == 1 +depthSM=clamp(exp(-min(87.,biasAndScaleSM.z*depthSM)),0.,1.); +#endif +#if SM_FLOAT == 1 +gl_FragColor=vec4(depthSM,1.0,1.0,1.0); +#else +gl_FragColor=pack(depthSM); +#endif +return;`;ze.a.IncludesShadersStore.shadowMapFragment=L_;var N_=`#include +#ifdef ALPHATEST +varying vec2 vUV; +uniform sampler2D diffuseSampler; +#endif +#include +void main(void) +{ +#include +#ifdef ALPHATEST +float alphaFromAlphaTexture=texture2D(diffuseSampler,vUV).a; +if (alphaFromAlphaTexture<0.4) +discard; +#endif +#if SM_SOFTTRANSPARENTSHADOW == 1 +#ifdef ALPHATEST +if ((bayerDither8(floor(mod(gl_FragCoord.xy,8.0))))/64.0>=softTransparentShadowSM*alphaFromAlphaTexture) discard; +#else +if ((bayerDither8(floor(mod(gl_FragCoord.xy,8.0))))/64.0>=softTransparentShadowSM) discard; +#endif +#endif +#include +}`;ze.a.ShadersStore.shadowMapPixelShader=N_;var w_=`#if SM_NORMALBIAS == 1 +uniform vec3 lightDataSM; +#endif +uniform vec3 biasAndScaleSM; +uniform vec2 depthValuesSM; +varying float vDepthMetricSM; +#if SM_USEDISTANCE == 1 +varying vec3 vPositionWSM; +#endif +#if defined(SM_DEPTHCLAMP) && SM_DEPTHCLAMP == 1 +varying float zSM; +#endif +`;ze.a.IncludesShadersStore.shadowMapVertexDeclaration=w_;var F_=` +#if SM_NORMALBIAS == 1 +#if SM_DIRECTIONINLIGHTDATA == 1 +vec3 worldLightDirSM=normalize(-lightDataSM.xyz); +#else +vec3 directionToLightSM=lightDataSM.xyz-worldPos.xyz; +vec3 worldLightDirSM=normalize(directionToLightSM); +#endif +float ndlSM=dot(vNormalW,worldLightDirSM); +float sinNLSM=sqrt(1.0-ndlSM*ndlSM); +float normalBiasSM=biasAndScaleSM.y*sinNLSM; +worldPos.xyz-=vNormalW*normalBiasSM; +#endif +`;ze.a.IncludesShadersStore.shadowMapVertexNormalBias=F_;var B_=`#if SM_USEDISTANCE == 1 +vPositionWSM=worldPos.xyz; +#endif +#if SM_DEPTHTEXTURE == 1 + +gl_Position.z+=biasAndScaleSM.x*gl_Position.w; +#endif +#if defined(SM_DEPTHCLAMP) && SM_DEPTHCLAMP == 1 +zSM=gl_Position.z; +gl_Position.z=0.0; +#elif SM_USEDISTANCE == 0 + +vDepthMetricSM=((gl_Position.z+depthValuesSM.x)/(depthValuesSM.y))+biasAndScaleSM.x; +#endif +`;ze.a.IncludesShadersStore.shadowMapVertexMetric=B_;var U_=` +attribute vec3 position; +#ifdef NORMAL +attribute vec3 normal; +#endif +#include +#include +#include[0..maxSimultaneousMorphTargets] + +#include +#include +uniform mat4 viewProjection; +#ifdef ALPHATEST +varying vec2 vUV; +uniform mat4 diffuseMatrix; +#ifdef UV1 +attribute vec2 uv; +#endif +#ifdef UV2 +attribute vec2 uv2; +#endif +#endif +#include +#include +void main(void) +{ +vec3 positionUpdated=position; +#ifdef UV1 +vec2 uvUpdated=uv; +#endif +#ifdef NORMAL +vec3 normalUpdated=normal; +#endif +#include[0..maxSimultaneousMorphTargets] +#include +#include +vec4 worldPos=finalWorld*vec4(positionUpdated,1.0); +#ifdef NORMAL +mat3 normWorldSM=mat3(finalWorld); +#if defined(INSTANCES) && defined(THIN_INSTANCES) +vec3 vNormalW=normalUpdated/vec3(dot(normWorldSM[0],normWorldSM[0]),dot(normWorldSM[1],normWorldSM[1]),dot(normWorldSM[2],normWorldSM[2])); +vNormalW=normalize(normWorldSM*vNormalW); +#else +#ifdef NONUNIFORMSCALING +normWorldSM=transposeMat3(inverseMat3(normWorldSM)); +#endif +vec3 vNormalW=normalize(normWorldSM*normalUpdated); +#endif +#endif +#include + +gl_Position=viewProjection*worldPos; +#include +#ifdef ALPHATEST +#ifdef UV1 +vUV=vec2(diffuseMatrix*vec4(uvUpdated,1.0,0.0)); +#endif +#ifdef UV2 +vUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0)); +#endif +#endif +#include +}`;ze.a.ShadersStore.shadowMapVertexShader=U_;var V_=` +varying vec2 vUV; +uniform sampler2D textureSampler; + +uniform vec2 screenSize; +void main(void) +{ +vec4 colorDepth=vec4(0.0); +for (int x=-OFFSET; x<=OFFSET; x++) +for (int y=-OFFSET; y<=OFFSET; y++) +colorDepth+=texture2D(textureSampler,vUV+vec2(x,y)/screenSize); +gl_FragColor=(colorDepth/float((OFFSET*2+1)*(OFFSET*2+1))); +}`;ze.a.ShadersStore.depthBoxBlurPixelShader=V_;var k_=`#if SM_SOFTTRANSPARENTSHADOW == 1 +if ((bayerDither8(floor(mod(gl_FragCoord.xy,8.0))))/64.0>=softTransparentShadowSM*alpha) discard; +#endif +`;ze.a.IncludesShadersStore.shadowMapFragmentSoftTransparentShadow=k_;var Bu=new u.a,Uu=new u.a,kn=function(){function r(t,e,n){this.onBeforeShadowMapRenderObservable=new R.c,this.onAfterShadowMapRenderObservable=new R.c,this.onBeforeShadowMapRenderMeshObservable=new R.c,this.onAfterShadowMapRenderMeshObservable=new R.c,this._bias=5e-5,this._normalBias=0,this._blurBoxOffset=1,this._blurScale=2,this._blurKernel=1,this._useKernelBlur=!1,this._filter=r.FILTER_NONE,this._filteringQuality=r.QUALITY_HIGH,this._contactHardeningLightSizeUVRatio=.1,this._darkness=0,this._transparencyShadow=!1,this.enableSoftTransparentShadow=!1,this.frustumEdgeFalloff=0,this.forceBackFacesOnly=!1,this._lightDirection=u.e.Zero(),this._viewMatrix=u.a.Zero(),this._projectionMatrix=u.a.Zero(),this._transformMatrix=u.a.Zero(),this._cachedPosition=new u.e(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),this._cachedDirection=new u.e(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),this._currentFaceIndex=0,this._currentFaceIndexCache=0,this._defaultTextureMatrix=u.a.Identity(),this._mapSize=t,this._light=e,this._scene=e.getScene(),e._shadowGenerator=this,this.id=e.id,r._SceneComponentInitialization(this._scene);var i=this._scene.getEngine().getCaps();n?i.textureFloatRender&&i.textureFloatLinearFiltering?this._textureType=h.a.TEXTURETYPE_FLOAT:i.textureHalfFloatRender&&i.textureHalfFloatLinearFiltering?this._textureType=h.a.TEXTURETYPE_HALF_FLOAT:this._textureType=h.a.TEXTURETYPE_UNSIGNED_INT:i.textureHalfFloatRender&&i.textureHalfFloatLinearFiltering?this._textureType=h.a.TEXTURETYPE_HALF_FLOAT:i.textureFloatRender&&i.textureFloatLinearFiltering?this._textureType=h.a.TEXTURETYPE_FLOAT:this._textureType=h.a.TEXTURETYPE_UNSIGNED_INT,this._initializeGenerator(),this._applyFilterValues()}return Object.defineProperty(r.prototype,"bias",{get:function(){return this._bias},set:function(t){this._bias=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"normalBias",{get:function(){return this._normalBias},set:function(t){this._normalBias=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"blurBoxOffset",{get:function(){return this._blurBoxOffset},set:function(t){this._blurBoxOffset!==t&&(this._blurBoxOffset=t,this._disposeBlurPostProcesses())},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"blurScale",{get:function(){return this._blurScale},set:function(t){this._blurScale!==t&&(this._blurScale=t,this._disposeBlurPostProcesses())},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"blurKernel",{get:function(){return this._blurKernel},set:function(t){this._blurKernel!==t&&(this._blurKernel=t,this._disposeBlurPostProcesses())},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"useKernelBlur",{get:function(){return this._useKernelBlur},set:function(t){this._useKernelBlur!==t&&(this._useKernelBlur=t,this._disposeBlurPostProcesses())},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"depthScale",{get:function(){return this._depthScale!==void 0?this._depthScale:this._light.getDepthScale()},set:function(t){this._depthScale=t},enumerable:!1,configurable:!0}),r.prototype._validateFilter=function(t){return t},Object.defineProperty(r.prototype,"filter",{get:function(){return this._filter},set:function(t){if(t=this._validateFilter(t),this._light.needCube()){if(t===r.FILTER_BLUREXPONENTIALSHADOWMAP)return void(this.useExponentialShadowMap=!0);if(t===r.FILTER_BLURCLOSEEXPONENTIALSHADOWMAP)return void(this.useCloseExponentialShadowMap=!0);if(t===r.FILTER_PCF||t===r.FILTER_PCSS)return void(this.usePoissonSampling=!0)}t!==r.FILTER_PCF&&t!==r.FILTER_PCSS||this._scene.getEngine().webGLVersion!==1?this._filter!==t&&(this._filter=t,this._disposeBlurPostProcesses(),this._applyFilterValues(),this._light._markMeshesAsLightDirty()):this.usePoissonSampling=!0},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"usePoissonSampling",{get:function(){return this.filter===r.FILTER_POISSONSAMPLING},set:function(t){var e=this._validateFilter(r.FILTER_POISSONSAMPLING);(t||this.filter===r.FILTER_POISSONSAMPLING)&&(this.filter=t?e:r.FILTER_NONE)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"useExponentialShadowMap",{get:function(){return this.filter===r.FILTER_EXPONENTIALSHADOWMAP},set:function(t){var e=this._validateFilter(r.FILTER_EXPONENTIALSHADOWMAP);(t||this.filter===r.FILTER_EXPONENTIALSHADOWMAP)&&(this.filter=t?e:r.FILTER_NONE)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"useBlurExponentialShadowMap",{get:function(){return this.filter===r.FILTER_BLUREXPONENTIALSHADOWMAP},set:function(t){var e=this._validateFilter(r.FILTER_BLUREXPONENTIALSHADOWMAP);(t||this.filter===r.FILTER_BLUREXPONENTIALSHADOWMAP)&&(this.filter=t?e:r.FILTER_NONE)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"useCloseExponentialShadowMap",{get:function(){return this.filter===r.FILTER_CLOSEEXPONENTIALSHADOWMAP},set:function(t){var e=this._validateFilter(r.FILTER_CLOSEEXPONENTIALSHADOWMAP);(t||this.filter===r.FILTER_CLOSEEXPONENTIALSHADOWMAP)&&(this.filter=t?e:r.FILTER_NONE)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"useBlurCloseExponentialShadowMap",{get:function(){return this.filter===r.FILTER_BLURCLOSEEXPONENTIALSHADOWMAP},set:function(t){var e=this._validateFilter(r.FILTER_BLURCLOSEEXPONENTIALSHADOWMAP);(t||this.filter===r.FILTER_BLURCLOSEEXPONENTIALSHADOWMAP)&&(this.filter=t?e:r.FILTER_NONE)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"usePercentageCloserFiltering",{get:function(){return this.filter===r.FILTER_PCF},set:function(t){var e=this._validateFilter(r.FILTER_PCF);(t||this.filter===r.FILTER_PCF)&&(this.filter=t?e:r.FILTER_NONE)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"filteringQuality",{get:function(){return this._filteringQuality},set:function(t){this._filteringQuality!==t&&(this._filteringQuality=t,this._disposeBlurPostProcesses(),this._applyFilterValues(),this._light._markMeshesAsLightDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"useContactHardeningShadow",{get:function(){return this.filter===r.FILTER_PCSS},set:function(t){var e=this._validateFilter(r.FILTER_PCSS);(t||this.filter===r.FILTER_PCSS)&&(this.filter=t?e:r.FILTER_NONE)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"contactHardeningLightSizeUVRatio",{get:function(){return this._contactHardeningLightSizeUVRatio},set:function(t){this._contactHardeningLightSizeUVRatio=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"darkness",{get:function(){return this._darkness},set:function(t){this.setDarkness(t)},enumerable:!1,configurable:!0}),r.prototype.getDarkness=function(){return this._darkness},r.prototype.setDarkness=function(t){return this._darkness=t>=1?1:t<=0?0:t,this},Object.defineProperty(r.prototype,"transparencyShadow",{get:function(){return this._transparencyShadow},set:function(t){this.setTransparencyShadow(t)},enumerable:!1,configurable:!0}),r.prototype.setTransparencyShadow=function(t){return this._transparencyShadow=t,this},r.prototype.getShadowMap=function(){return this._shadowMap},r.prototype.getShadowMapForRendering=function(){return this._shadowMap2?this._shadowMap2:this._shadowMap},r.prototype.getClassName=function(){return r.CLASSNAME},r.prototype.addShadowCaster=function(t,e){var n;return e===void 0&&(e=!0),this._shadowMap?(this._shadowMap.renderList||(this._shadowMap.renderList=[]),this._shadowMap.renderList.push(t),e&&(n=this._shadowMap.renderList).push.apply(n,t.getChildMeshes()),this):this},r.prototype.removeShadowCaster=function(t,e){if(e===void 0&&(e=!0),!this._shadowMap||!this._shadowMap.renderList)return this;var n=this._shadowMap.renderList.indexOf(t);if(n!==-1&&this._shadowMap.renderList.splice(n,1),e)for(var i=0,o=t.getChildren();i1?(this._shadowMap=new sn(this._light.name+"_shadowMap",this._mapSize,this._scene,!1,!0,this._textureType,this._light.needCube(),void 0,!1,!1),this._shadowMap.createDepthStencilTexture(h.a.LESS,!0)):this._shadowMap=new sn(this._light.name+"_shadowMap",this._mapSize,this._scene,!1,!0,this._textureType,this._light.needCube())},r.prototype._initializeShadowMap=function(){var t=this;if(this._createTargetRenderTexture(),this._shadowMap!==null){this._shadowMap.wrapU=we.a.CLAMP_ADDRESSMODE,this._shadowMap.wrapV=we.a.CLAMP_ADDRESSMODE,this._shadowMap.anisotropicFilteringLevel=1,this._shadowMap.updateSamplingMode(we.a.BILINEAR_SAMPLINGMODE),this._shadowMap.renderParticles=!1,this._shadowMap.ignoreCameraViewport=!0,this._storedUniqueId&&(this._shadowMap.uniqueId=this._storedUniqueId),this._shadowMap.customRenderFunction=this._renderForShadowMap.bind(this),this._shadowMap.customIsReadyFunction=function(a,s){return!0};var e=this._scene.getEngine();this._shadowMap.onBeforeRenderObservable.add(function(a){if(t._currentFaceIndex=a,t._filter===r.FILTER_PCF&&e.setColorWrite(!1),t._scene.getSceneUniformBuffer().useUbo){var s=t._scene.getSceneUniformBuffer();s.updateMatrix("viewProjection",t.getTransformMatrix()),s.updateMatrix("view",t._viewMatrix),s.update()}}),this._shadowMap.onAfterUnbindObservable.add(function(){if(t._scene.getSceneUniformBuffer().useUbo){var a=t._scene.getSceneUniformBuffer();a.updateMatrix("viewProjection",t._scene.getTransformMatrix()),a.updateMatrix("view",t._scene.getViewMatrix()),a.update()}if(t._filter===r.FILTER_PCF&&e.setColorWrite(!0),t.useBlurExponentialShadowMap||t.useBlurCloseExponentialShadowMap){var s=t.getShadowMapForRendering();if(s){var d=s.getInternalTexture();t._scene.postProcessManager.directRender(t._blurPostProcesses,d,!0),e.unBindFramebuffer(d,!0)}}});var n=new M.b(0,0,0,0),i=new M.b(1,1,1,1);this._shadowMap.onClearObservable.add(function(a){t._filter===r.FILTER_PCF?a.clear(i,!1,!0,!1):t.useExponentialShadowMap||t.useBlurExponentialShadowMap?a.clear(n,!0,!0,!1):a.clear(i,!0,!0,!1)}),this._shadowMap.onResizeObservable.add(function(a){t._storedUniqueId=t._shadowMap.uniqueId,t._mapSize=a.getRenderSize(),t._light._markMeshesAsLightDirty(),t.recreateShadowMap()});for(var o=$r.b.MIN_RENDERINGGROUPS;o<$r.b.MAX_RENDERINGGROUPS;o++)this._shadowMap.setRenderingAutoClearDepthStencil(o,!1)}},r.prototype._initializeBlurRTTAndPostProcesses=function(){var t=this,e=this._scene.getEngine(),n=this._mapSize/this.blurScale;this.useKernelBlur&&this.blurScale===1||(this._shadowMap2=new sn(this._light.name+"_shadowMap2",n,this._scene,!1,!0,this._textureType),this._shadowMap2.wrapU=we.a.CLAMP_ADDRESSMODE,this._shadowMap2.wrapV=we.a.CLAMP_ADDRESSMODE,this._shadowMap2.updateSamplingMode(we.a.BILINEAR_SAMPLINGMODE)),this.useKernelBlur?(this._kernelBlurXPostprocess=new _n(this._light.name+"KernelBlurX",new u.d(1,0),this.blurKernel,1,null,we.a.BILINEAR_SAMPLINGMODE,e,!1,this._textureType),this._kernelBlurXPostprocess.width=n,this._kernelBlurXPostprocess.height=n,this._kernelBlurXPostprocess.onApplyObservable.add(function(i){i.setTexture("textureSampler",t._shadowMap)}),this._kernelBlurYPostprocess=new _n(this._light.name+"KernelBlurY",new u.d(0,1),this.blurKernel,1,null,we.a.BILINEAR_SAMPLINGMODE,e,!1,this._textureType),this._kernelBlurXPostprocess.autoClear=!1,this._kernelBlurYPostprocess.autoClear=!1,this._textureType===h.a.TEXTURETYPE_UNSIGNED_INT&&(this._kernelBlurXPostprocess.packedFloat=!0,this._kernelBlurYPostprocess.packedFloat=!0),this._blurPostProcesses=[this._kernelBlurXPostprocess,this._kernelBlurYPostprocess]):(this._boxBlurPostprocess=new _t(this._light.name+"DepthBoxBlur","depthBoxBlur",["screenSize","boxOffset"],[],1,null,we.a.BILINEAR_SAMPLINGMODE,e,!1,"#define OFFSET "+this._blurBoxOffset,this._textureType),this._boxBlurPostprocess.onApplyObservable.add(function(i){i.setFloat2("screenSize",n,n),i.setTexture("textureSampler",t._shadowMap)}),this._boxBlurPostprocess.autoClear=!1,this._blurPostProcesses=[this._boxBlurPostprocess])},r.prototype._renderForShadowMap=function(t,e,n,i){var o,a=this._scene.getEngine(),s=a.getColorWrite();if(i.length){for(a.setColorWrite(!1),o=0;o=s.length)return void(t&&t(n));setTimeout(O,16)}};O()}else t&&t(this)}else t&&t(this)}else t&&t(this)},r.prototype.forceCompilationAsync=function(t){var e=this;return new Promise(function(n){e.forceCompilation(function(){n()},t)})},r.prototype._isReadyCustomDefines=function(t,e,n){},r.prototype._prepareShadowDefines=function(t,e,n,i){n.push("#define SM_FLOAT "+(this._textureType!==h.a.TEXTURETYPE_UNSIGNED_INT?"1":"0")),n.push("#define SM_ESM "+(this.useExponentialShadowMap||this.useBlurExponentialShadowMap?"1":"0")),n.push("#define SM_DEPTHTEXTURE "+(this.usePercentageCloserFiltering||this.useContactHardeningShadow?"1":"0"));var o=t.getMesh();return n.push("#define SM_NORMALBIAS "+(this.normalBias&&o.isVerticesDataPresent(Oe.b.NormalKind)?"1":"0")),n.push("#define SM_DIRECTIONINLIGHTDATA "+(this.getLight().getTypeID()===Pi.a.LIGHTTYPEID_DIRECTIONALLIGHT?"1":"0")),n.push("#define SM_USEDISTANCE "+(this._light.needCube()?"1":"0")),n.push("#define SM_SOFTTRANSPARENTSHADOW "+(this.enableSoftTransparentShadow&&i?"1":"0")),this._isReadyCustomDefines(n,t,e),n},r.prototype.isReady=function(t,e,n){var i=t.getMaterial(),o=i?.shadowDepthWrapper,a=[];if(this._prepareShadowDefines(t,e,a,n),o){if(!o.isReadyForSubMesh(t,a,this,e))return!1}else{var s=[Oe.b.PositionKind],d=t.getMesh();if(this.normalBias&&d.isVerticesDataPresent(Oe.b.NormalKind)&&(s.push(Oe.b.NormalKind),a.push("#define NORMAL"),d.nonUniformScaling&&a.push("#define NONUNIFORMSCALING")),i&&i.needAlphaTesting()){var p=i.getAlphaTestTexture();if(p){if(!p.isReady())return!1;a.push("#define ALPHATEST"),d.isVerticesDataPresent(Oe.b.UVKind)&&(s.push(Oe.b.UVKind),a.push("#define UV1")),d.isVerticesDataPresent(Oe.b.UV2Kind)&&p.coordinatesIndex===1&&(s.push(Oe.b.UV2Kind),a.push("#define UV2"))}}var b=new Sr.a;if(d.useBones&&d.computeBonesUsingShaders&&d.skeleton){s.push(Oe.b.MatricesIndicesKind),s.push(Oe.b.MatricesWeightsKind),d.numBoneInfluencers>4&&(s.push(Oe.b.MatricesIndicesExtraKind),s.push(Oe.b.MatricesWeightsExtraKind));var x=d.skeleton;a.push("#define NUM_BONE_INFLUENCERS "+d.numBoneInfluencers),d.numBoneInfluencers>0&&b.addCPUSkinningFallback(0,d),x.isUsingTextureForMatrices?a.push("#define BONETEXTURE"):a.push("#define BonesPerMesh "+(x.bones.length+1))}else a.push("#define NUM_BONE_INFLUENCERS 0");var O=d.morphTargetManager,B=0;O&&O.numInfluencers>0&&(a.push("#define MORPHTARGETS"),B=O.numInfluencers,a.push("#define NUM_MORPH_INFLUENCERS "+B),et.a.PrepareAttributesForMorphTargetsInfluencers(s,d,B));var F=this._scene;if(F.clipPlane&&a.push("#define CLIPPLANE"),F.clipPlane2&&a.push("#define CLIPPLANE2"),F.clipPlane3&&a.push("#define CLIPPLANE3"),F.clipPlane4&&a.push("#define CLIPPLANE4"),F.clipPlane5&&a.push("#define CLIPPLANE5"),F.clipPlane6&&a.push("#define CLIPPLANE6"),e&&(a.push("#define INSTANCES"),et.a.PushAttributesForInstances(s),t.getRenderingMesh().hasThinInstances&&a.push("#define THIN_INSTANCES")),this.customShaderOptions&&this.customShaderOptions.defines)for(var z=0,J=this.customShaderOptions.defines;z +#endif +void main(void) +{ +#ifdef ALPHATEST +if (texture2D(diffuseSampler,vUV).a<0.4) +discard; +#endif +#ifdef NONLINEARDEPTH +#ifdef PACKED +gl_FragColor=pack(gl_FragCoord.z); +#else +gl_FragColor=vec4(gl_FragCoord.z,0.0,0.0,0.0); +#endif +#else +#ifdef PACKED +gl_FragColor=pack(vDepthMetric); +#else +gl_FragColor=vec4(vDepthMetric,0.0,0.0,1.0); +#endif +#endif +}`;ze.a.ShadersStore.depthPixelShader=G_;var z_=` +attribute vec3 position; +#include +#include +#include[0..maxSimultaneousMorphTargets] + +#include +uniform mat4 viewProjection; +uniform vec2 depthValues; +#if defined(ALPHATEST) || defined(NEED_UV) +varying vec2 vUV; +uniform mat4 diffuseMatrix; +#ifdef UV1 +attribute vec2 uv; +#endif +#ifdef UV2 +attribute vec2 uv2; +#endif +#endif +varying float vDepthMetric; +void main(void) +{ +vec3 positionUpdated=position; +#ifdef UV1 +vec2 uvUpdated=uv; +#endif +#include[0..maxSimultaneousMorphTargets] +#include +#include +gl_Position=viewProjection*finalWorld*vec4(positionUpdated,1.0); +vDepthMetric=((gl_Position.z+depthValues.x)/(depthValues.y)); +#if defined(ALPHATEST) || defined(BASIC_RENDER) +#ifdef UV1 +vUV=vec2(diffuseMatrix*vec4(uvUpdated,1.0,0.0)); +#endif +#ifdef UV2 +vUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0)); +#endif +#endif +} +`;ze.a.ShadersStore.depthVertexShader=z_;var aa=function(){function r(t,e,n,i){var o=this;e===void 0&&(e=h.a.TEXTURETYPE_FLOAT),n===void 0&&(n=null),i===void 0&&(i=!1),this.enabled=!0,this.useOnlyInActiveCamera=!1,this._scene=t,this._storeNonLinearDepth=i,this.isPacked=e===h.a.TEXTURETYPE_UNSIGNED_BYTE,this.isPacked?this._clearColor=new M.b(1,1,1,1):this._clearColor=new M.b(1,0,0,1),r._SceneComponentInitialization(this._scene),this._camera=n;var a=t.getEngine(),s=this.isPacked||a.webGLVersion===1?h.a.TEXTUREFORMAT_RGBA:h.a.TEXTUREFORMAT_R;this._depthMap=new sn("depthMap",{width:a.getRenderWidth(),height:a.getRenderHeight()},this._scene,!1,!0,e,!1,void 0,void 0,void 0,void 0,s),this._depthMap.wrapU=we.a.CLAMP_ADDRESSMODE,this._depthMap.wrapV=we.a.CLAMP_ADDRESSMODE,this._depthMap.refreshRate=1,this._depthMap.renderParticles=!1,this._depthMap.renderList=null,this._depthMap.activeCamera=this._camera,this._depthMap.ignoreCameraViewport=!0,this._depthMap.useCameraPostProcesses=!1,this._depthMap.onClearObservable.add(function(p){p.clear(o._clearColor,!0,!0,!0)});var d=function(p){var b=p.getRenderingMesh(),x=p.getEffectiveMesh(),O=o._scene,B=O.getEngine(),F=p.getMaterial();if(x._internalAbstractMeshDataInfo._isActiveIntermediate=!1,F&&p.verticesCount!==0&&p._renderId!==O.getRenderId()){B.setState(F.backFaceCulling,0,!1,O.useRightHandedSystem);var z=b._getInstancesRenderList(p._id,!!p.getReplacementMesh());if(!z.mustReturn){var J=B.getCaps().instancedArrays&&(z.visibleInstances[p._id]!==null&&z.visibleInstances[p._id]!==void 0||b.hasThinInstances),ie=o._camera||O.activeCamera;if(o.isReady(p,J)&&ie){if(p._renderId=O.getRenderId(),B.enableEffect(o._effect),b._bind(p,o._effect,F.fillMode),o._effect.setMatrix("viewProjection",O.getTransformMatrix()),o._effect.setFloat2("depthValues",ie.minZ,ie.minZ+ie.maxZ),F&&F.needAlphaTesting()){var se=F.getAlphaTestTexture();se&&(o._effect.setTexture("diffuseSampler",se),o._effect.setMatrix("diffuseMatrix",se.getTextureMatrix()))}b.useBones&&b.computeBonesUsingShaders&&b.skeleton&&o._effect.setMatrices("mBones",b.skeleton.getTransformMatrices(b)),et.a.BindMorphTargetParameters(b,o._effect),b._processRendering(x,p,o._effect,F.fillMode,z,J,function(ce,ue){return o._effect.setMatrix("world",ue)})}}}};this._depthMap.customRenderFunction=function(p,b,x,O){var B;if(O.length){for(a.setColorWrite(!1),B=0;B4&&(o.push(Oe.b.MatricesIndicesExtraKind),o.push(Oe.b.MatricesWeightsExtraKind)),i.push("#define NUM_BONE_INFLUENCERS "+a.numBoneInfluencers),i.push("#define BonesPerMesh "+(a.skeleton?a.skeleton.bones.length+1:0))):i.push("#define NUM_BONE_INFLUENCERS 0");var s=a.morphTargetManager,d=0;s&&s.numInfluencers>0&&(d=s.numInfluencers,i.push("#define MORPHTARGETS"),i.push("#define NUM_MORPH_INFLUENCERS "+d),et.a.PrepareAttributesForMorphTargetsInfluencers(o,a,d)),e&&(i.push("#define INSTANCES"),et.a.PushAttributesForInstances(o),t.getRenderingMesh().hasThinInstances&&i.push("#define THIN_INSTANCES")),this._storeNonLinearDepth&&i.push("#define NONLINEARDEPTH"),this.isPacked&&i.push("#define PACKED");var p=i.join(` +`);return this._cachedDefines!==p&&(this._cachedDefines=p,this._effect=this._scene.getEngine().createEffect("depth",o,["world","mBones","viewProjection","diffuseMatrix","depthValues","morphTargetInfluences"],["diffuseSampler"],p,void 0,void 0,void 0,{maxSimultaneousMorphTargets:d})),this._effect.isReady()},r.prototype.getDepthMap=function(){return this._depthMap},r.prototype.dispose=function(){this._depthMap.dispose()},r._SceneComponentInitialization=function(t){throw An.a.WarnImport("DepthRendererSceneComponent")},r}(),j_=`attribute vec2 vUV; +uniform sampler2D textureSampler; +#if defined(INITIAL) +uniform sampler2D sourceTexture; +uniform vec2 texSize; +void main(void) +{ +ivec2 coord=ivec2(vUV*(texSize-1.0)); +float f1=texelFetch(sourceTexture,coord,0).r; +float f2=texelFetch(sourceTexture,coord+ivec2(1,0),0).r; +float f3=texelFetch(sourceTexture,coord+ivec2(1,1),0).r; +float f4=texelFetch(sourceTexture,coord+ivec2(0,1),0).r; +float minz=min(min(min(f1,f2),f3),f4); +#ifdef DEPTH_REDUX +float maxz=max(max(max(sign(1.0-f1)*f1,sign(1.0-f2)*f2),sign(1.0-f3)*f3),sign(1.0-f4)*f4); +#else +float maxz=max(max(max(f1,f2),f3),f4); +#endif +glFragColor=vec4(minz,maxz,0.,0.); +} +#elif defined(MAIN) +uniform vec2 texSize; +void main(void) +{ +ivec2 coord=ivec2(vUV*(texSize-1.0)); +vec2 f1=texelFetch(textureSampler,coord,0).rg; +vec2 f2=texelFetch(textureSampler,coord+ivec2(1,0),0).rg; +vec2 f3=texelFetch(textureSampler,coord+ivec2(1,1),0).rg; +vec2 f4=texelFetch(textureSampler,coord+ivec2(0,1),0).rg; +float minz=min(min(min(f1.x,f2.x),f3.x),f4.x); +float maxz=max(max(max(f1.y,f2.y),f3.y),f4.y); +glFragColor=vec4(minz,maxz,0.,0.); +} +#elif defined(ONEBEFORELAST) +uniform ivec2 texSize; +void main(void) +{ +ivec2 coord=ivec2(vUV*vec2(texSize-1)); +vec2 f1=texelFetch(textureSampler,coord % texSize,0).rg; +vec2 f2=texelFetch(textureSampler,(coord+ivec2(1,0)) % texSize,0).rg; +vec2 f3=texelFetch(textureSampler,(coord+ivec2(1,1)) % texSize,0).rg; +vec2 f4=texelFetch(textureSampler,(coord+ivec2(0,1)) % texSize,0).rg; +float minz=min(f1.x,f2.x); +float maxz=max(f1.y,f2.y); +glFragColor=vec4(minz,maxz,0.,0.); +} +#elif defined(LAST) +void main(void) +{ +discard; +glFragColor=vec4(0.); +} +#endif +`;ze.a.ShadersStore.minmaxReduxPixelShader=j_;var Vu=function(){function r(t){this.onAfterReductionPerformed=new R.c,this._forceFullscreenViewport=!0,this._activated=!1,this._camera=t,this._postProcessManager=new hs.a(t.getScene())}return Object.defineProperty(r.prototype,"sourceTexture",{get:function(){return this._sourceTexture},enumerable:!1,configurable:!0}),r.prototype.setSourceTexture=function(t,e,n,i){var o=this;if(n===void 0&&(n=h.a.TEXTURETYPE_HALF_FLOAT),i===void 0&&(i=!0),t!==this._sourceTexture){this.dispose(!1),this._sourceTexture=t,this._reductionSteps=[],this._forceFullscreenViewport=i;var a=this._camera.getScene(),s=new _t("Initial reduction phase","minmaxRedux",["texSize"],["sourceTexture"],1,null,h.a.TEXTURE_NEAREST_NEAREST,a.getEngine(),!1,"#define INITIAL"+(e?` +#define DEPTH_REDUX`:""),n,void 0,void 0,void 0,h.a.TEXTUREFORMAT_RG);s.autoClear=!1,s.forceFullscreenViewport=i;var d=this._sourceTexture.getRenderWidth(),p=this._sourceTexture.getRenderHeight();s.onApply=function(O,B){return function(F){F.setTexture("sourceTexture",o._sourceTexture),F.setFloatArray2("texSize",new Float32Array([O,B]))}}(d,p),this._reductionSteps.push(s);for(var b=1;d>1||p>1;){d=Math.max(Math.round(d/2),1),p=Math.max(Math.round(p/2),1);var x=new _t("Reduction phase "+b,"minmaxRedux",["texSize"],null,{width:d,height:p},null,h.a.TEXTURE_NEAREST_NEAREST,a.getEngine(),!1,"#define "+(d==1&&p==1?"LAST":d==1||p==1?"ONEBEFORELAST":"MAIN"),n,void 0,void 0,void 0,h.a.TEXTUREFORMAT_RG);x.autoClear=!1,x.forceFullscreenViewport=i,x.onApply=function(O,B){return function(F){O==1||B==1?F.setIntArray2("texSize",new Int32Array([O,B])):F.setFloatArray2("texSize",new Float32Array([O,B]))}}(d,p),this._reductionSteps.push(x),b++,d==1&&p==1&&x.onAfterRenderObservable.add(function(O,B,F){var z=new Float32Array(4*O*B),J={min:0,max:0};return function(){a.getEngine()._readTexturePixels(F.inputTexture,O,B,-1,0,z),J.min=z[0],J.max=z[1],o.onAfterReductionPerformed.notifyObservers(J)}}(d,p,x))}}},Object.defineProperty(r.prototype,"refreshRate",{get:function(){return this._sourceTexture?this._sourceTexture.refreshRate:-1},set:function(t){this._sourceTexture&&(this._sourceTexture.refreshRate=t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"activated",{get:function(){return this._activated},enumerable:!1,configurable:!0}),r.prototype.activate=function(){var t=this;!this._onAfterUnbindObserver&&this._sourceTexture&&(this._onAfterUnbindObserver=this._sourceTexture.onAfterUnbindObservable.add(function(){t._reductionSteps[0].activate(t._camera),t._postProcessManager.directRender(t._reductionSteps,t._reductionSteps[0].inputTexture,t._forceFullscreenViewport),t._camera.getScene().getEngine().unBindFramebuffer(t._reductionSteps[0].inputTexture,!1)}),this._activated=!0)},r.prototype.deactivate=function(){this._onAfterUnbindObserver&&this._sourceTexture&&(this._sourceTexture.onAfterUnbindObservable.remove(this._onAfterUnbindObserver),this._onAfterUnbindObserver=null,this._activated=!1)},r.prototype.dispose=function(t){if(t===void 0&&(t=!0),t&&this.onAfterReductionPerformed.clear(),this.deactivate(),this._reductionSteps){for(var e=0;en&&(e=0,n=1),e<0&&(e=0),n>1&&(n=1),this._minDistance=e,this._maxDistance=n,this._breaksAreDirty=!0)},Object.defineProperty(t.prototype,"minDistance",{get:function(){return this._minDistance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxDistance",{get:function(){return this._maxDistance},enumerable:!1,configurable:!0}),t.prototype.getClassName=function(){return t.CLASSNAME},t.prototype.getCascadeMinExtents=function(e){return e>=0&&e=0&&ethis._scene.activeCamera.maxZ||(this._shadowMaxZ=e,this._light._markMeshesAsLightDirty(),this._breaksAreDirty=!0):this._shadowMaxZ=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"debug",{get:function(){return this._debug},set:function(e){this._debug=e,this._light._markMeshesAsLightDirty()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"depthClamp",{get:function(){return this._depthClamp},set:function(e){this._depthClamp=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cascadeBlendPercentage",{get:function(){return this._cascadeBlendPercentage},set:function(e){this._cascadeBlendPercentage=e,this._light._markMeshesAsLightDirty()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lambda",{get:function(){return this._lambda},set:function(e){var n=Math.min(Math.max(e,0),1);this._lambda!=n&&(this._lambda=n,this._breaksAreDirty=!0)},enumerable:!1,configurable:!0}),t.prototype.getCascadeViewMatrix=function(e){return e>=0&&e=0&&e=0&&e=s&&(a=0,s=1),a==n._minDistance&&s==n._maxDistance||n.setMinMaxDistance(a,s)}),this._depthReducer.setDepthRenderer(this._depthRenderer)),this._depthReducer.activate()}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"autoCalcDepthBoundsRefreshRate",{get:function(){var e,n,i;return(i=(n=(e=this._depthReducer)===null||e===void 0?void 0:e.depthRenderer)===null||n===void 0?void 0:n.getDepthMap().refreshRate)!==null&&i!==void 0?i:-1},set:function(e){var n;!((n=this._depthReducer)===null||n===void 0)&&n.depthRenderer&&(this._depthReducer.depthRenderer.getDepthMap().refreshRate=e)},enumerable:!1,configurable:!0}),t.prototype.splitFrustum=function(){this._breaksAreDirty=!0},t.prototype._splitFrustum=function(){var e=this._scene.activeCamera;if(e){for(var n=e.minZ,i=e.maxZ,o=i-n,a=this._minDistance,s=n+a*o,d=n+(this._shadowMaxZ=n?Math.min((this._shadowMaxZ-n)/(i-n),this._maxDistance):this._maxDistance)*o,p=d-s,b=d/s,x=0;xMath.PI;)o-=2*Math.PI;var s=o/Math.PI,d=a/Math.PI;s=.5*s+.5;var p=Math.round(s*n);p<0?p=0:p>=n&&(p=n-1);var b=Math.round(d*i);b<0?b=0:b>=i&&(b=i-1);var x=i-b-1;return{r:e[x*n*3+3*p+0],g:e[x*n*3+3*p+1],b:e[x*n*3+3*p+2]}},r.FACE_LEFT=[new u.e(-1,-1,-1),new u.e(1,-1,-1),new u.e(-1,1,-1),new u.e(1,1,-1)],r.FACE_RIGHT=[new u.e(1,-1,1),new u.e(-1,-1,1),new u.e(1,1,1),new u.e(-1,1,1)],r.FACE_FRONT=[new u.e(1,-1,-1),new u.e(1,-1,1),new u.e(1,1,-1),new u.e(1,1,1)],r.FACE_BACK=[new u.e(-1,-1,1),new u.e(-1,-1,-1),new u.e(-1,1,1),new u.e(-1,1,-1)],r.FACE_DOWN=[new u.e(1,1,-1),new u.e(1,1,1),new u.e(-1,1,-1),new u.e(-1,1,1)],r.FACE_UP=[new u.e(-1,-1,-1),new u.e(-1,-1,1),new u.e(1,-1,-1),new u.e(1,-1,1)],r}(),Wu=function(){function r(){}return r.Ldexp=function(t,e){return e>1023?t*Math.pow(2,1023)*Math.pow(2,e-1023):e<-1074?t*Math.pow(2,-1074)*Math.pow(2,e+1074):t*Math.pow(2,e)},r.Rgbe2float=function(t,e,n,i,o,a){o>0?(o=this.Ldexp(1,o-136),t[a+0]=e*o,t[a+1]=n*o,t[a+2]=i*o):(t[a+0]=0,t[a+1]=0,t[a+2]=0)},r.readStringLine=function(t,e){for(var n="",i="",o=e;o32767)throw"HDR Bad header format, unsupported size";return{height:e,width:n,dataPosition:s+=i.length+1}},r.GetCubeMapTextureData=function(t,e){var n=new Uint8Array(t),i=this.RGBE_ReadHeader(n),o=this.RGBE_ReadPixels(n,i);return Xs.ConvertPanoramaToCubemap(o,i.width,i.height,e)},r.RGBE_ReadPixels=function(t,e){return this.RGBE_ReadPixels_RLE(t,e)},r.RGBE_ReadPixels_RLE=function(t,e){for(var n,i,o,a,s,d=e.height,p=e.width,b=e.dataPosition,x=0,O=0,B=0,F=new ArrayBuffer(4*p),z=new Uint8Array(F),J=new ArrayBuffer(e.width*e.height*4*3),ie=new Float32Array(J);d>0;){if(n=t[b++],i=t[b++],o=t[b++],a=t[b++],n!=2||i!=2||128&o||e.width<8||e.width>32767)return this.RGBE_ReadPixels_NOT_RLE(t,e);if((o<<8|a)!=p)throw"HDR Bad header format, wrong scan line width";for(x=0,B=0;B<4;B++)for(O=(B+1)*p;x128){if((s=n-128)==0||s>O-x)throw"HDR Bad Format, bad scanline data (run)";for(;s-- >0;)z[x++]=i}else{if((s=n)==0||s>O-x)throw"HDR Bad Format, bad scanline data (non-run)";if(z[x++]=i,--s>0)for(var se=0;se0;){for(s=0;s +#include +#include +#include +uniform float alphaG; +uniform samplerCube inputTexture; +uniform vec2 vFilteringInfo; +uniform float hdrScale; +varying vec3 direction; +void main() { +vec3 color=radiance(alphaG,inputTexture,direction,vFilteringInfo); +gl_FragColor=vec4(color*hdrScale,1.0); +}`;ze.a.ShadersStore.hdrFilteringPixelShader=X_;var Ku=function(){function r(t,e){e===void 0&&(e={}),this._lodGenerationOffset=0,this._lodGenerationScale=.8,this.quality=h.a.TEXTURE_FILTERING_QUALITY_OFFLINE,this.hdrScale=1,this._engine=t,this.hdrScale=e.hdrScale||this.hdrScale,this.quality=e.hdrScale||this.quality}return r.prototype._createRenderTarget=function(t){var e=h.a.TEXTURETYPE_UNSIGNED_BYTE;this._engine.getCaps().textureHalfFloatRender?e=h.a.TEXTURETYPE_HALF_FLOAT:this._engine.getCaps().textureFloatRender&&(e=h.a.TEXTURETYPE_FLOAT);var n=this._engine.createRenderTargetCubeTexture(t,{format:h.a.TEXTUREFORMAT_RGBA,type:e,generateMipMaps:!1,generateDepthBuffer:!1,generateStencilBuffer:!1,samplingMode:h.a.TEXTURE_NEAREST_SAMPLINGMODE});return this._engine.updateTextureWrappingMode(n,h.a.TEXTURE_CLAMP_ADDRESSMODE,h.a.TEXTURE_CLAMP_ADDRESSMODE,h.a.TEXTURE_CLAMP_ADDRESSMODE),this._engine.updateTextureSamplingMode(h.a.TEXTURE_TRILINEAR_SAMPLINGMODE,n,!0),n},r.prototype._prefilterInternal=function(t){var e=t.getSize().width,n=Math.round($.a.Log2(e))+1,i=this._effectWrapper.effect,o=this._createRenderTarget(e);this._effectRenderer.setViewport();var a=t.getInternalTexture();a&&this._engine.updateTextureSamplingMode(h.a.TEXTURE_TRILINEAR_SAMPLINGMODE,a,!0),this._effectRenderer.applyEffectWrapper(this._effectWrapper);var s=[[new u.e(0,0,-1),new u.e(0,-1,0),new u.e(1,0,0)],[new u.e(0,0,1),new u.e(0,-1,0),new u.e(-1,0,0)],[new u.e(1,0,0),new u.e(0,0,1),new u.e(0,1,0)],[new u.e(1,0,0),new u.e(0,0,-1),new u.e(0,-1,0)],[new u.e(1,0,0),new u.e(0,-1,0),new u.e(0,0,1)],[new u.e(-1,0,0),new u.e(0,-1,0),new u.e(0,0,-1)]];i.setFloat("hdrScale",this.hdrScale),i.setFloat2("vFilteringInfo",t.getSize().width,n),i.setTexture("inputTexture",t);for(var d=0;d<6;d++){i.setVector3("up",s[d][0]),i.setVector3("right",s[d][1]),i.setVector3("front",s[d][2]);for(var p=0;p=2&&this._prefilterOnLoad){var i=this._onLoad,o=new Ku(n);this._onLoad=function(){o.prefilter(e,i)}}this._texture=n.createRawCubeTextureFromUrl(this.url,this.getScene(),this._size,h.a.TEXTUREFORMAT_RGB,n.getCaps().textureFloat?h.a.TEXTURETYPE_FLOAT:h.a.TEXTURETYPE_UNSIGNED_INT,this._noMipmap,function(a){e.lodGenerationOffset=0,e.lodGenerationScale=.8;var s=Wu.GetCubeMapTextureData(a,e._size);if(e._generateHarmonics){var d=Ho.ConvertCubeMapToSphericalPolynomial(s);e.sphericalPolynomial=d}for(var p=[],b=null,x=0;x<6;x++){if(!n.getCaps().textureFloat){var O=new ArrayBuffer(e._size*e._size*3);b=new Uint8Array(O)}var B=s[t._facesMapping[x]];if(e.gammaSpace||b){for(var F=0;F255){var ce=255/se;z*=ce,J*=ce,ie*=ce}b[3*F+0]=z,b[3*F+1]=J,b[3*F+2]=ie}}b?p.push(b):p.push(B)}return p},null,this._onLoad,this._onError)},t.prototype.clone=function(){var e=new t(this.url,this.getScene()||this._getEngine(),this._size,this._noMipmap,this._generateHarmonics,this.gammaSpace);return e.level=this.level,e.wrapU=this.wrapU,e.wrapV=this.wrapV,e.coordinatesIndex=this.coordinatesIndex,e.coordinatesMode=this.coordinatesMode,e},t.prototype.delayLoad=function(){this.delayLoadState===h.a.DELAYLOADSTATE_NOTLOADED&&(this.delayLoadState=h.a.DELAYLOADSTATE_LOADED,this._texture=this._getFromCache(this.url,this._noMipmap),this._texture||this.loadTexture())},t.prototype.getReflectionTextureMatrix=function(){return this._textureMatrix},t.prototype.setReflectionTextureMatrix=function(e){var n,i=this;this._textureMatrix=e,e.updateFlag!==this._textureMatrix.updateFlag&&e.isIdentity()!==this._textureMatrix.isIdentity()&&((n=this.getScene())===null||n===void 0||n.markAllMaterialsAsDirty(h.a.MATERIAL_TextureDirtyFlag,function(o){return o.getActiveTextures().indexOf(i)!==-1}))},t.Parse=function(e,n,i){var o=null;return e.name&&!e.isRenderTarget&&((o=new t(i+e.name,n,e.size,e.noMipmap,e.generateHarmonics,e.useInGammaSpace)).name=e.name,o.hasAlpha=e.hasAlpha,o.level=e.level,o.coordinatesMode=e.coordinatesMode,o.isBlocking=e.isBlocking),o&&(e.boundingBoxPosition&&(o.boundingBoxPosition=u.e.FromArray(e.boundingBoxPosition)),e.boundingBoxSize&&(o.boundingBoxSize=u.e.FromArray(e.boundingBoxSize)),e.rotationY&&(o.rotationY=e.rotationY)),o},t.prototype.serialize=function(){if(!this.name)return null;var e={};return e.name=this.name,e.hasAlpha=this.hasAlpha,e.isCube=!0,e.level=this.level,e.size=this._size,e.coordinatesMode=this.coordinatesMode,e.useInGammaSpace=this.gammaSpace,e.generateHarmonics=this._generateHarmonics,e.customType="BABYLON.HDRCubeTexture",e.noMipmap=this._noMipmap,e.isBlocking=this._isBlocking,e.rotationY=this._rotationY,e},t._facesMapping=["right","left","up","down","front","back"],t}(Wn.a);C.a.RegisteredTypes["BABYLON.HDRCubeTexture"]=sa;var Qu=function(){function r(t,e,n){e===void 0&&(e=0),n===void 0&&(n=null),this.name=t,this.animations=new Array,this._positions=null,this._normals=null,this._tangents=null,this._uvs=null,this._uniqueId=0,this.onInfluenceChanged=new R.c,this._onDataLayoutChanged=new R.c,this._animationPropertiesOverride=null,this._scene=n||te.a.LastCreatedScene,this.influence=e,this._scene&&(this._uniqueId=this._scene.getUniqueId())}return Object.defineProperty(r.prototype,"influence",{get:function(){return this._influence},set:function(t){if(this._influence!==t){var e=this._influence;this._influence=t,this.onInfluenceChanged.hasObservers()&&this.onInfluenceChanged.notifyObservers(e===0||t===0)}},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"animationPropertiesOverride",{get:function(){return!this._animationPropertiesOverride&&this._scene?this._scene.animationPropertiesOverride:this._animationPropertiesOverride},set:function(t){this._animationPropertiesOverride=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"uniqueId",{get:function(){return this._uniqueId},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"hasPositions",{get:function(){return!!this._positions},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"hasNormals",{get:function(){return!!this._normals},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"hasTangents",{get:function(){return!!this._tangents},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"hasUVs",{get:function(){return!!this._uvs},enumerable:!1,configurable:!0}),r.prototype.setPositions=function(t){var e=this.hasPositions;this._positions=t,e!==this.hasPositions&&this._onDataLayoutChanged.notifyObservers(void 0)},r.prototype.getPositions=function(){return this._positions},r.prototype.setNormals=function(t){var e=this.hasNormals;this._normals=t,e!==this.hasNormals&&this._onDataLayoutChanged.notifyObservers(void 0)},r.prototype.getNormals=function(){return this._normals},r.prototype.setTangents=function(t){var e=this.hasTangents;this._tangents=t,e!==this.hasTangents&&this._onDataLayoutChanged.notifyObservers(void 0)},r.prototype.getTangents=function(){return this._tangents},r.prototype.setUVs=function(t){var e=this.hasUVs;this._uvs=t,e!==this.hasUVs&&this._onDataLayoutChanged.notifyObservers(void 0)},r.prototype.getUVs=function(){return this._uvs},r.prototype.clone=function(){var t=this,e=L.a.Clone(function(){return new r(t.name,t.influence,t._scene)},this);return e._positions=this._positions,e._normals=this._normals,e._tangents=this._tangents,e._uvs=this._uvs,e},r.prototype.serialize=function(){var t={};return t.name=this.name,t.influence=this.influence,t.positions=Array.prototype.slice.call(this.getPositions()),this.id!=null&&(t.id=this.id),this.hasNormals&&(t.normals=Array.prototype.slice.call(this.getNormals())),this.hasTangents&&(t.tangents=Array.prototype.slice.call(this.getTangents())),this.hasUVs&&(t.uvs=Array.prototype.slice.call(this.getUVs())),L.a.AppendSerializedAnimations(this,t),t},r.prototype.getClassName=function(){return"MorphTarget"},r.Parse=function(t){var e=new r(t.name,t.influence);if(e.setPositions(t.positions),t.id!=null&&(e.id=t.id),t.normals&&e.setNormals(t.normals),t.tangents&&e.setTangents(t.tangents),t.uvs&&e.setUVs(t.uvs),t.animations)for(var n=0;n=0&&(this._targets.splice(e,1),t.onInfluenceChanged.remove(this._targetInfluenceChangedObservers.splice(e,1)[0]),t._onDataLayoutChanged.remove(this._targetDataLayoutChangedObservers.splice(e,1)[0]),this._syncActiveTargets(!0))},r.prototype.clone=function(){for(var t=new r(this._scene),e=0,n=this._targets;e-1&&this._impostors.splice(e,1).length&&this.getPhysicsPlugin().removePhysicsBody(t)},r.prototype.addJoint=function(t,e,n){var i={mainImpostor:t,connectedImpostor:e,joint:n};n.physicsPlugin=this._physicsPlugin,this._joints.push(i),this._physicsPlugin.generateJoint(i)},r.prototype.removeJoint=function(t,e,n){var i=this._joints.filter(function(o){return o.connectedImpostor===e&&o.joint===n&&o.mainImpostor===t});i.length&&this._physicsPlugin.removeJoint(i[0])},r.prototype._step=function(t){var e=this;this._impostors.forEach(function(n){n.isBodyInitRequired()&&e._physicsPlugin.generatePhysicsBody(n)}),t>.1?t=.1:t<=0&&(t=1/60),this._physicsPlugin.executeStep(t,this._impostors)},r.prototype.getPhysicsPlugin=function(){return this._physicsPlugin},r.prototype.getImpostors=function(){return this._impostors},r.prototype.getImpostorForPhysicsObject=function(t){for(var e=0;e0&&(this._physicsBodysToRemoveAfterStep.forEach(function(e){t.world.remove(e)}),this._physicsBodysToRemoveAfterStep=[])},r.prototype.applyImpulse=function(t,e,n){var i=new this.BJSCANNON.Vec3(n.x,n.y,n.z),o=new this.BJSCANNON.Vec3(e.x,e.y,e.z);t.physicsBody.applyImpulse(o,i)},r.prototype.applyForce=function(t,e,n){var i=new this.BJSCANNON.Vec3(n.x,n.y,n.z),o=new this.BJSCANNON.Vec3(e.x,e.y,e.z);t.physicsBody.applyForce(o,i)},r.prototype.generatePhysicsBody=function(t){if(this._removeMarkedPhysicsBodiesFromWorld(),t.parent)t.physicsBody&&(this.removePhysicsBody(t),t.forceUpdate());else{if(t.isBodyInitRequired()){var e=this._createShape(t),n=t.physicsBody;n&&this.removePhysicsBody(t);var i=this._addMaterial("mat-"+t.uniqueId,t.getParam("friction"),t.getParam("restitution")),o={mass:t.getParam("mass"),material:i},a=t.getParam("nativeOptions");for(var s in a)a.hasOwnProperty(s)&&(o[s]=a[s]);t.physicsBody=new this.BJSCANNON.Body(o),t.physicsBody.addEventListener("collide",t.onCollide),this.world.addEventListener("preStep",t.beforeStep),this.world.addEventListener("postStep",t.afterStep),t.physicsBody.addShape(e),this.world.add(t.physicsBody),n&&["force","torque","velocity","angularVelocity"].forEach(function(d){var p=n[d];t.physicsBody[d].set(p.x,p.y,p.z)}),this._processChildMeshes(t)}this._updatePhysicsBodyTransformation(t)}},r.prototype._processChildMeshes=function(t){var e=this,n=t.object.getChildMeshes?t.object.getChildMeshes(!0):[],i=t.object.rotationQuaternion;if(n.length){var o=function(a){if(i&&a.rotationQuaternion){var s=a.getPhysicsImpostor();if(s&&s.parent!==t){var d=a.getAbsolutePosition().subtract(a.parent.getAbsolutePosition()),p=a.rotationQuaternion;s.physicsBody&&(e.removePhysicsBody(s),s.physicsBody=null),s.parent=t,s.resetUpdateFlags(),t.physicsBody.addShape(e._createShape(s),new e.BJSCANNON.Vec3(d.x,d.y,d.z),new e.BJSCANNON.Quaternion(p.x,p.y,p.z,p.w)),t.physicsBody.mass+=s.getParam("mass")}i.multiplyInPlace(a.rotationQuaternion),a.getChildMeshes(!0).filter(function(b){return!!b.physicsImpostor}).forEach(o)}};n.filter(function(a){return!!a.physicsImpostor}).forEach(o)}},r.prototype.removePhysicsBody=function(t){t.physicsBody.removeEventListener("collide",t.onCollide),this.world.removeEventListener("preStep",t.beforeStep),this.world.removeEventListener("postStep",t.afterStep),this._physicsBodysToRemoveAfterStep.indexOf(t.physicsBody)===-1&&this._physicsBodysToRemoveAfterStep.push(t.physicsBody)},r.prototype.generateJoint=function(t){var e=t.mainImpostor.physicsBody,n=t.connectedImpostor.physicsBody;if(e&&n){var i,o=t.joint.jointData,a={pivotA:o.mainPivot?new this.BJSCANNON.Vec3().set(o.mainPivot.x,o.mainPivot.y,o.mainPivot.z):null,pivotB:o.connectedPivot?new this.BJSCANNON.Vec3().set(o.connectedPivot.x,o.connectedPivot.y,o.connectedPivot.z):null,axisA:o.mainAxis?new this.BJSCANNON.Vec3().set(o.mainAxis.x,o.mainAxis.y,o.mainAxis.z):null,axisB:o.connectedAxis?new this.BJSCANNON.Vec3().set(o.connectedAxis.x,o.connectedAxis.y,o.connectedAxis.z):null,maxForce:o.nativeParams.maxForce,collideConnected:!!o.collision};switch(t.joint.type){case en.e.HingeJoint:case en.e.Hinge2Joint:i=new this.BJSCANNON.HingeConstraint(e,n,a);break;case en.e.DistanceJoint:i=new this.BJSCANNON.DistanceConstraint(e,n,o.maxDistance||2);break;case en.e.SpringJoint:var s=o;i=new this.BJSCANNON.Spring(e,n,{restLength:s.length,stiffness:s.stiffness,damping:s.damping,localAnchorA:a.pivotA,localAnchorB:a.pivotB});break;case en.e.LockJoint:i=new this.BJSCANNON.LockConstraint(e,n,a);break;case en.e.PointToPointJoint:case en.e.BallAndSocketJoint:default:i=new this.BJSCANNON.PointToPointConstraint(e,a.pivotA,n,a.pivotB,a.maxForce)}i.collideConnected=!!o.collision,t.joint.physicsJoint=i,t.joint.type!==en.e.SpringJoint?this.world.addConstraint(i):(t.joint.jointData.forceApplicationCallback=t.joint.jointData.forceApplicationCallback||function(){i.applyForce()},t.mainImpostor.registerAfterPhysicsStep(t.joint.jointData.forceApplicationCallback))}},r.prototype.removeJoint=function(t){t.joint.type!==en.e.SpringJoint?this.world.removeConstraint(t.joint.physicsJoint):t.mainImpostor.unregisterAfterPhysicsStep(t.joint.jointData.forceApplicationCallback)},r.prototype._addMaterial=function(t,e,n){var i,o;for(i=0;i1e3*n));d++);this.time+=i;for(var p=this.time%n/n,b=t,x=this.bodies,O=0;O!==x.length;O++){var B=x[O];B.type!==e.Body.STATIC&&B.sleepState!==e.Body.SLEEPING?(B.position.vsub(B.previousPosition,b),b.scale(p,b),B.position.vadd(b,B.interpolatedPosition)):(B.interpolatedPosition.set(B.position.x,B.position.y,B.position.z),B.interpolatedQuaternion.set(B.quaternion.x,B.quaternion.y,B.quaternion.z,B.quaternion.w))}}}},r.prototype.raycast=function(t,e){return this._cannonRaycastResult.reset(),this.world.raycastClosest(t,e,{},this._cannonRaycastResult),this._raycastResult.reset(t,e),this._cannonRaycastResult.hasHit&&(this._raycastResult.setHitData({x:this._cannonRaycastResult.hitNormalWorld.x,y:this._cannonRaycastResult.hitNormalWorld.y,z:this._cannonRaycastResult.hitNormalWorld.z},{x:this._cannonRaycastResult.hitPointWorld.x,y:this._cannonRaycastResult.hitPointWorld.y,z:this._cannonRaycastResult.hitPointWorld.z}),this._raycastResult.setHitDistance(this._cannonRaycastResult.distance)),this._raycastResult},r}();Ir.DefaultPluginFactory=function(){return new Ks};var qu=function(){function r(t,e,n){t===void 0&&(t=!0),n===void 0&&(n=OIMO),this._useDeltaForWorldStep=t,this.name="OimoJSPlugin",this._fixedTimeStep=1/60,this._tmpImpostorsArray=[],this._tmpPositionVector=u.e.Zero(),this.BJSOIMO=n,this.world=new this.BJSOIMO.World({iterations:e}),this.world.clear(),this._raycastResult=new Ys}return r.prototype.setGravity=function(t){this.world.gravity.set(t.x,t.y,t.z)},r.prototype.setTimeStep=function(t){this.world.timeStep=t},r.prototype.getTimeStep=function(){return this.world.timeStep},r.prototype.executeStep=function(t,e){var n=this;e.forEach(function(s){s.beforeStep()}),this.world.timeStep=this._useDeltaForWorldStep?t:this._fixedTimeStep,this.world.step(),e.forEach(function(s){s.afterStep(),n._tmpImpostorsArray[s.uniqueId]=s});for(var i=this.world.contacts;i!==null;)if(!i.touching||i.body1.sleeping||i.body2.sleeping){var o=this._tmpImpostorsArray[+i.body1.name],a=this._tmpImpostorsArray[+i.body2.name];o&&a&&(o.onCollide({body:a.physicsBody,point:null}),a.onCollide({body:o.physicsBody,point:null})),i=i.next}else i=i.next},r.prototype.applyImpulse=function(t,e,n){var i=t.physicsBody.mass;t.physicsBody.applyImpulse(n.scale(this.world.invScale),e.scale(this.world.invScale*i))},r.prototype.applyForce=function(t,e,n){l.a.Warn("Oimo doesn't support applying force. Using impule instead."),this.applyImpulse(t,e,n)},r.prototype.generatePhysicsBody=function(t){var e=this;if(t.parent)t.physicsBody&&(this.removePhysicsBody(t),t.forceUpdate());else{if(t.isBodyInitRequired()){var n={name:t.uniqueId,config:[t.getParam("mass")||.001,t.getParam("friction"),t.getParam("restitution")],size:[],type:[],pos:[],posShape:[],rot:[],rotShape:[],move:t.getParam("mass")!==0,density:t.getParam("mass"),friction:t.getParam("friction"),restitution:t.getParam("restitution"),world:this.world},i=[t];(s=t.object).getChildMeshes&&s.getChildMeshes().forEach(function(d){d.physicsImpostor&&i.push(d.physicsImpostor)});var o=function(d){return Math.max(d,Ir.Epsilon)},a=new u.b;i.forEach(function(d){if(d.object.rotationQuaternion){var p=d.object.rotationQuaternion;a.copyFrom(p),d.object.rotationQuaternion.set(0,0,0,1),d.object.computeWorldMatrix(!0);var b=a.toEulerAngles(),x=d.getObjectExtendSize();if(d===t){var O=t.getObjectCenter();t.object.getAbsolutePivotPoint().subtractToRef(O,e._tmpPositionVector),e._tmpPositionVector.divideInPlace(t.object.scaling),n.pos.push(O.x),n.pos.push(O.y),n.pos.push(O.z),n.posShape.push(0,0,0),n.rotShape.push(0,0,0)}else{var B=d.object.position.clone();n.posShape.push(B.x),n.posShape.push(B.y),n.posShape.push(B.z),n.rotShape.push(57.29577951308232*b.x,57.29577951308232*b.y,57.29577951308232*b.z)}switch(d.object.rotationQuaternion.copyFrom(a),d.type){case xt.a.ParticleImpostor:l.a.Warn("No Particle support in OIMO.js. using SphereImpostor instead");case xt.a.SphereImpostor:var F=x.x,z=x.y,J=x.z,ie=Math.max(o(F),o(z),o(J))/2;n.type.push("sphere"),n.size.push(ie),n.size.push(ie),n.size.push(ie);break;case xt.a.CylinderImpostor:var se=o(x.x)/2,ce=o(x.y);n.type.push("cylinder"),n.size.push(se),n.size.push(ce),n.size.push(ce);break;case xt.a.PlaneImpostor:case xt.a.BoxImpostor:default:se=o(x.x),ce=o(x.y);var ue=o(x.z);n.type.push("box"),n.size.push(se),n.size.push(ce),n.size.push(ue)}d.object.rotationQuaternion=p}}),t.physicsBody=this.world.add(n),t.physicsBody.resetQuaternion(a),t.physicsBody.updatePosition(0)}else this._tmpPositionVector.copyFromFloats(0,0,0);var s;t.setDeltaPosition(this._tmpPositionVector)}},r.prototype.removePhysicsBody=function(t){this.world.removeRigidBody(t.physicsBody)},r.prototype.generateJoint=function(t){var e=t.mainImpostor.physicsBody,n=t.connectedImpostor.physicsBody;if(e&&n){var i,o=t.joint.jointData,a=o.nativeParams||{},s={body1:e,body2:n,axe1:a.axe1||(o.mainAxis?o.mainAxis.asArray():null),axe2:a.axe2||(o.connectedAxis?o.connectedAxis.asArray():null),pos1:a.pos1||(o.mainPivot?o.mainPivot.asArray():null),pos2:a.pos2||(o.connectedPivot?o.connectedPivot.asArray():null),min:a.min,max:a.max,collision:a.collision||o.collision,spring:a.spring,world:this.world};switch(t.joint.type){case en.e.BallAndSocketJoint:i="jointBall";break;case en.e.SpringJoint:l.a.Warn("OIMO.js doesn't support Spring Constraint. Simulating using DistanceJoint instead");var d=o;s.min=d.length||s.min,s.max=Math.max(s.min,s.max);case en.e.DistanceJoint:i="jointDistance",s.max=o.maxDistance;break;case en.e.PrismaticJoint:i="jointPrisme";break;case en.e.SliderJoint:i="jointSlide";break;case en.e.WheelJoint:i="jointWheel";break;case en.e.HingeJoint:default:i="jointHinge"}s.type=i,t.joint.physicsJoint=this.world.add(s)}},r.prototype.removeJoint=function(t){try{this.world.removeJoint(t.joint.physicsJoint)}catch(e){l.a.Warn(e)}},r.prototype.isSupported=function(){return this.BJSOIMO!==void 0},r.prototype.setTransformationFromPhysicsBody=function(t){if(!t.physicsBody.sleeping){if(t.physicsBody.shapes.next){for(var e=t.physicsBody.shapes;e.next;)e=e.next;t.object.position.set(e.position.x,e.position.y,e.position.z)}else{var n=t.physicsBody.getPosition();t.object.position.set(n.x,n.y,n.z)}if(t.object.rotationQuaternion){var i=t.physicsBody.getQuaternion();t.object.rotationQuaternion.set(i.x,i.y,i.z,i.w)}}},r.prototype.setPhysicsBodyTransformation=function(t,e,n){var i=t.physicsBody;t.physicsBody.shapes.next||(i.position.set(e.x,e.y,e.z),i.orientation.set(n.x,n.y,n.z,n.w),i.syncShapes(),i.awake())},r.prototype.setLinearVelocity=function(t,e){t.physicsBody.linearVelocity.set(e.x,e.y,e.z)},r.prototype.setAngularVelocity=function(t,e){t.physicsBody.angularVelocity.set(e.x,e.y,e.z)},r.prototype.getLinearVelocity=function(t){var e=t.physicsBody.linearVelocity;return e?new u.e(e.x,e.y,e.z):null},r.prototype.getAngularVelocity=function(t){var e=t.physicsBody.angularVelocity;return e?new u.e(e.x,e.y,e.z):null},r.prototype.setBodyMass=function(t,e){var n=e===0;t.physicsBody.shapes.density=n?1:e,t.physicsBody.setupMass(n?2:1)},r.prototype.getBodyMass=function(t){return t.physicsBody.shapes.density},r.prototype.getBodyFriction=function(t){return t.physicsBody.shapes.friction},r.prototype.setBodyFriction=function(t,e){t.physicsBody.shapes.friction=e},r.prototype.getBodyRestitution=function(t){return t.physicsBody.shapes.restitution},r.prototype.setBodyRestitution=function(t,e){t.physicsBody.shapes.restitution=e},r.prototype.sleepBody=function(t){t.physicsBody.sleep()},r.prototype.wakeUpBody=function(t){t.physicsBody.awake()},r.prototype.updateDistanceJoint=function(t,e,n){t.physicsJoint.limitMotor.upperLimit=e,n!==void 0&&(t.physicsJoint.limitMotor.lowerLimit=n)},r.prototype.setMotor=function(t,e,n,i){n!==void 0?l.a.Warn("OimoJS plugin currently has unexpected behavior when using setMotor with force parameter"):n=1e6,e*=-1;var o=i?t.physicsJoint.rotationalLimitMotor2:t.physicsJoint.rotationalLimitMotor1||t.physicsJoint.rotationalLimitMotor||t.physicsJoint.limitMotor;o&&o.setMotor(e,n)},r.prototype.setLimit=function(t,e,n,i){var o=i?t.physicsJoint.rotationalLimitMotor2:t.physicsJoint.rotationalLimitMotor1||t.physicsJoint.rotationalLimitMotor||t.physicsJoint.limitMotor;o&&o.setLimit(e,n===void 0?-e:n)},r.prototype.syncMeshWithImpostor=function(t,e){var n=e.physicsBody;t.position.x=n.position.x,t.position.y=n.position.y,t.position.z=n.position.z,t.rotationQuaternion&&(t.rotationQuaternion.x=n.orientation.x,t.rotationQuaternion.y=n.orientation.y,t.rotationQuaternion.z=n.orientation.z,t.rotationQuaternion.w=n.orientation.s)},r.prototype.getRadius=function(t){return t.physicsBody.shapes.radius},r.prototype.getBoxSizeToRef=function(t,e){var n=t.physicsBody.shapes;e.x=2*n.halfWidth,e.y=2*n.halfHeight,e.z=2*n.halfDepth},r.prototype.dispose=function(){this.world.clear()},r.prototype.raycast=function(t,e){return l.a.Warn("raycast is not currently supported by the Oimo physics plugin"),this._raycastResult.reset(t,e),this._raycastResult},r}(),la=f(97),Zu=function(){function r(t,e,n){var i=this;t===void 0&&(t=!0),e===void 0&&(e=Ammo),n===void 0&&(n=null),this._useDeltaForWorldStep=t,this.bjsAMMO={},this.name="AmmoJSPlugin",this._timeStep=1/60,this._fixedTimeStep=1/60,this._maxSteps=5,this._tmpQuaternion=new u.b,this._tmpContactCallbackResult=!1,this._tmpContactPoint=new u.e,this._tmpMatrix=new u.a,typeof e=="function"?e(this.bjsAMMO):this.bjsAMMO=e,this.isSupported()?(this._collisionConfiguration=new this.bjsAMMO.btSoftBodyRigidBodyCollisionConfiguration,this._dispatcher=new this.bjsAMMO.btCollisionDispatcher(this._collisionConfiguration),this._overlappingPairCache=n||new this.bjsAMMO.btDbvtBroadphase,this._solver=new this.bjsAMMO.btSequentialImpulseConstraintSolver,this._softBodySolver=new this.bjsAMMO.btDefaultSoftBodySolver,this.world=new this.bjsAMMO.btSoftRigidDynamicsWorld(this._dispatcher,this._overlappingPairCache,this._solver,this._collisionConfiguration,this._softBodySolver),this._tmpAmmoConcreteContactResultCallback=new this.bjsAMMO.ConcreteContactResultCallback,this._tmpAmmoConcreteContactResultCallback.addSingleResult=function(o,a,s,d){var p=(o=i.bjsAMMO.wrapPointer(o,Ammo.btManifoldPoint)).getPositionWorldOnA();i._tmpContactPoint.x=p.x(),i._tmpContactPoint.y=p.y(),i._tmpContactPoint.z=p.z(),i._tmpContactCallbackResult=!0},this._raycastResult=new Ys,this._tmpAmmoTransform=new this.bjsAMMO.btTransform,this._tmpAmmoTransform.setIdentity(),this._tmpAmmoQuaternion=new this.bjsAMMO.btQuaternion(0,0,0,1),this._tmpAmmoVectorA=new this.bjsAMMO.btVector3(0,0,0),this._tmpAmmoVectorB=new this.bjsAMMO.btVector3(0,0,0),this._tmpAmmoVectorC=new this.bjsAMMO.btVector3(0,0,0),this._tmpAmmoVectorD=new this.bjsAMMO.btVector3(0,0,0)):l.a.Error("AmmoJS is not available. Please make sure you included the js file.")}return r.prototype.setGravity=function(t){this._tmpAmmoVectorA.setValue(t.x,t.y,t.z),this.world.setGravity(this._tmpAmmoVectorA),this.world.getWorldInfo().set_m_gravity(this._tmpAmmoVectorA)},r.prototype.setTimeStep=function(t){this._timeStep=t},r.prototype.setFixedTimeStep=function(t){this._fixedTimeStep=t},r.prototype.setMaxSteps=function(t){this._maxSteps=t},r.prototype.getTimeStep=function(){return this._timeStep},r.prototype._isImpostorInContact=function(t){return this._tmpContactCallbackResult=!1,this.world.contactTest(t.physicsBody,this._tmpAmmoConcreteContactResultCallback),this._tmpContactCallbackResult},r.prototype._isImpostorPairInContact=function(t,e){return this._tmpContactCallbackResult=!1,this.world.contactPairTest(t.physicsBody,e.physicsBody,this._tmpAmmoConcreteContactResultCallback),this._tmpContactCallbackResult},r.prototype._stepSimulation=function(t,e,n){if(t===void 0&&(t=1/60),e===void 0&&(e=10),n===void 0&&(n=1/60),e==0)this.world.stepSimulation(t,0);else for(;e>0&&t>0;)t-n0&&this._isImpostorInContact(d))for(var p=0,b=d._onPhysicsCollideCallbacks;p3?3:d;var p=new this.bjsAMMO.btSoftBodyHelpers().CreateRope(this.world.getWorldInfo(),this._tmpAmmoVectorA,this._tmpAmmoVectorB,n-1,d);return p.get_m_cfg().set_collisions(17),p},r.prototype._createCustom=function(t){var e=null;return this.onCreateCustomShape&&(e=this.onCreateCustomShape(t)),e==null&&(e=new this.bjsAMMO.btCompoundShape),e},r.prototype._addHullVerts=function(t,e,n){var i=this,o=0;if(n&&n.getIndices&&n.getWorldMatrix&&n.getChildMeshes){var a=n.getIndices();a||(a=[]);var s=n.getVerticesData(Oe.b.PositionKind);s||(s=[]),n.computeWorldMatrix(!1);for(var d=a.length/3,p=0;p0){if(t.type!=xt.a.NoImpostor){var p=this._createShape(t,!0);p&&(this._tmpAmmoTransform.getOrigin().setValue(0,0,0),this._tmpAmmoQuaternion.setValue(0,0,0,1),this._tmpAmmoTransform.setRotation(this._tmpAmmoQuaternion),i.addChildShape(this._tmpAmmoTransform,p))}return i}this.bjsAMMO.destroy(i),i=null}switch(t.type){case xt.a.SphereImpostor:if($.a.WithinEpsilon(a.x,a.y,1e-4)&&$.a.WithinEpsilon(a.x,a.z,1e-4))i=new this.bjsAMMO.btSphereShape(a.x/2);else{var b=[new this.bjsAMMO.btVector3(0,0,0)];(i=new this.bjsAMMO.btMultiSphereShape(b,[1],1)).setLocalScaling(new this.bjsAMMO.btVector3(a.x/2,a.y/2,a.z/2))}break;case xt.a.CapsuleImpostor:i=new this.bjsAMMO.btCapsuleShape(a.x/2,a.y/2);break;case xt.a.CylinderImpostor:this._tmpAmmoVectorA.setValue(a.x/2,a.y/2,a.z/2),i=new this.bjsAMMO.btCylinderShape(this._tmpAmmoVectorA);break;case xt.a.PlaneImpostor:case xt.a.BoxImpostor:this._tmpAmmoVectorA.setValue(a.x/2,a.y/2,a.z/2),i=new this.bjsAMMO.btBoxShape(this._tmpAmmoVectorA);break;case xt.a.MeshImpostor:if(t.getParam("mass")==0){var x=new this.bjsAMMO.btTriangleMesh;t._pluginData.toDispose.push(x);var O=this._addMeshVerts(x,o,o);i=O==0?new this.bjsAMMO.btCompoundShape:new this.bjsAMMO.btBvhTriangleMeshShape(x);break}case xt.a.ConvexHullImpostor:var B=new this.bjsAMMO.btConvexHullShape;(O=this._addHullVerts(B,o,o))==0?(t._pluginData.toDispose.push(B),i=new this.bjsAMMO.btCompoundShape):i=B;break;case xt.a.NoImpostor:i=new this.bjsAMMO.btSphereShape(a.x/2);break;case xt.a.CustomImpostor:i=this._createCustom(t);break;case xt.a.SoftbodyImpostor:i=this._createSoftbody(t);break;case xt.a.ClothImpostor:i=this._createCloth(t);break;case xt.a.RopeImpostor:i=this._createRope(t);break;default:l.a.Warn("The impostor type is not currently supported by the ammo plugin.")}return i},r.prototype.setTransformationFromPhysicsBody=function(t){t.physicsBody.getMotionState().getWorldTransform(this._tmpAmmoTransform),t.object.position.set(this._tmpAmmoTransform.getOrigin().x(),this._tmpAmmoTransform.getOrigin().y(),this._tmpAmmoTransform.getOrigin().z()),t.object.rotationQuaternion?t.object.rotationQuaternion.set(this._tmpAmmoTransform.getRotation().x(),this._tmpAmmoTransform.getRotation().y(),this._tmpAmmoTransform.getRotation().z(),this._tmpAmmoTransform.getRotation().w()):t.object.rotation&&(this._tmpQuaternion.set(this._tmpAmmoTransform.getRotation().x(),this._tmpAmmoTransform.getRotation().y(),this._tmpAmmoTransform.getRotation().z(),this._tmpAmmoTransform.getRotation().w()),this._tmpQuaternion.toEulerAnglesToRef(t.object.rotation))},r.prototype.setPhysicsBodyTransformation=function(t,e,n){var i=t.physicsBody.getWorldTransform();if(Math.abs(i.getOrigin().x()-e.x)>Gt.a||Math.abs(i.getOrigin().y()-e.y)>Gt.a||Math.abs(i.getOrigin().z()-e.z)>Gt.a||Math.abs(i.getRotation().x()-n.x)>Gt.a||Math.abs(i.getRotation().y()-n.y)>Gt.a||Math.abs(i.getRotation().z()-n.z)>Gt.a||Math.abs(i.getRotation().w()-n.w)>Gt.a)if(this._tmpAmmoVectorA.setValue(e.x,e.y,e.z),i.setOrigin(this._tmpAmmoVectorA),this._tmpAmmoQuaternion.setValue(n.x,n.y,n.z,n.w),i.setRotation(this._tmpAmmoQuaternion),t.physicsBody.setWorldTransform(i),t.mass==0){var o=t.physicsBody.getMotionState();o&&o.setWorldTransform(i)}else t.physicsBody.activate()},r.prototype.isSupported=function(){return this.bjsAMMO!==void 0},r.prototype.setLinearVelocity=function(t,e){this._tmpAmmoVectorA.setValue(e.x,e.y,e.z),t.soft?t.physicsBody.linearVelocity(this._tmpAmmoVectorA):t.physicsBody.setLinearVelocity(this._tmpAmmoVectorA)},r.prototype.setAngularVelocity=function(t,e){this._tmpAmmoVectorA.setValue(e.x,e.y,e.z),t.soft?t.physicsBody.angularVelocity(this._tmpAmmoVectorA):t.physicsBody.setAngularVelocity(this._tmpAmmoVectorA)},r.prototype.getLinearVelocity=function(t){if(t.soft)var e=t.physicsBody.linearVelocity();else e=t.physicsBody.getLinearVelocity();if(!e)return null;var n=new u.e(e.x(),e.y(),e.z());return this.bjsAMMO.destroy(e),n},r.prototype.getAngularVelocity=function(t){if(t.soft)var e=t.physicsBody.angularVelocity();else e=t.physicsBody.getAngularVelocity();if(!e)return null;var n=new u.e(e.x(),e.y(),e.z());return this.bjsAMMO.destroy(e),n},r.prototype.setBodyMass=function(t,e){t.soft?t.physicsBody.setTotalMass(e,!1):t.physicsBody.setMassProps(e),t._pluginData.mass=e},r.prototype.getBodyMass=function(t){return t._pluginData.mass||0},r.prototype.getBodyFriction=function(t){return t._pluginData.friction||0},r.prototype.setBodyFriction=function(t,e){t.soft?t.physicsBody.get_m_cfg().set_kDF(e):t.physicsBody.setFriction(e),t._pluginData.friction=e},r.prototype.getBodyRestitution=function(t){return t._pluginData.restitution||0},r.prototype.setBodyRestitution=function(t,e){t.physicsBody.setRestitution(e),t._pluginData.restitution=e},r.prototype.getBodyPressure=function(t){return t.soft?t._pluginData.pressure||0:(l.a.Warn("Pressure is not a property of a rigid body"),0)},r.prototype.setBodyPressure=function(t,e){t.soft?t.type===xt.a.SoftbodyImpostor?(t.physicsBody.get_m_cfg().set_kPR(e),t._pluginData.pressure=e):(t.physicsBody.get_m_cfg().set_kPR(0),t._pluginData.pressure=0):l.a.Warn("Pressure can only be applied to a softbody")},r.prototype.getBodyStiffness=function(t){return t.soft?t._pluginData.stiffness||0:(l.a.Warn("Stiffness is not a property of a rigid body"),0)},r.prototype.setBodyStiffness=function(t,e){t.soft?(e=(e=e<0?0:e)>1?1:e,t.physicsBody.get_m_materials().at(0).set_m_kLST(e),t._pluginData.stiffness=e):l.a.Warn("Stiffness cannot be applied to a rigid body")},r.prototype.getBodyVelocityIterations=function(t){return t.soft?t._pluginData.velocityIterations||0:(l.a.Warn("Velocity iterations is not a property of a rigid body"),0)},r.prototype.setBodyVelocityIterations=function(t,e){t.soft?(e=e<0?0:e,t.physicsBody.get_m_cfg().set_viterations(e),t._pluginData.velocityIterations=e):l.a.Warn("Velocity iterations cannot be applied to a rigid body")},r.prototype.getBodyPositionIterations=function(t){return t.soft?t._pluginData.positionIterations||0:(l.a.Warn("Position iterations is not a property of a rigid body"),0)},r.prototype.setBodyPositionIterations=function(t,e){t.soft?(e=e<0?0:e,t.physicsBody.get_m_cfg().set_piterations(e),t._pluginData.positionIterations=e):l.a.Warn("Position iterations cannot be applied to a rigid body")},r.prototype.appendAnchor=function(t,e,n,i,o,a){o===void 0&&(o=1),a===void 0&&(a=!1);var s=t.segments,d=Math.round((s-1)*n)+s*(s-1-Math.round((s-1)*i));t.physicsBody.appendAnchor(d,e.physicsBody,a,o)},r.prototype.appendHook=function(t,e,n,i,o){i===void 0&&(i=1),o===void 0&&(o=!1);var a=Math.round(t.segments*n);t.physicsBody.appendAnchor(a,e.physicsBody,o,i)},r.prototype.sleepBody=function(t){l.a.Warn("sleepBody is not currently supported by the Ammo physics plugin")},r.prototype.wakeUpBody=function(t){t.physicsBody.activate()},r.prototype.updateDistanceJoint=function(t,e,n){l.a.Warn("updateDistanceJoint is not currently supported by the Ammo physics plugin")},r.prototype.setMotor=function(t,e,n,i){t.physicsJoint.enableAngularMotor(!0,e,n)},r.prototype.setLimit=function(t,e,n){l.a.Warn("setLimit is not currently supported by the Ammo physics plugin")},r.prototype.syncMeshWithImpostor=function(t,e){e.physicsBody.getMotionState().getWorldTransform(this._tmpAmmoTransform),t.position.x=this._tmpAmmoTransform.getOrigin().x(),t.position.y=this._tmpAmmoTransform.getOrigin().y(),t.position.z=this._tmpAmmoTransform.getOrigin().z(),t.rotationQuaternion&&(t.rotationQuaternion.x=this._tmpAmmoTransform.getRotation().x(),t.rotationQuaternion.y=this._tmpAmmoTransform.getRotation().y(),t.rotationQuaternion.z=this._tmpAmmoTransform.getRotation().z(),t.rotationQuaternion.w=this._tmpAmmoTransform.getRotation().w())},r.prototype.getRadius=function(t){return t.getObjectExtendSize().x/2},r.prototype.getBoxSizeToRef=function(t,e){var n=t.getObjectExtendSize();e.x=n.x,e.y=n.y,e.z=n.z},r.prototype.dispose=function(){this.bjsAMMO.destroy(this.world),this.bjsAMMO.destroy(this._solver),this.bjsAMMO.destroy(this._overlappingPairCache),this.bjsAMMO.destroy(this._dispatcher),this.bjsAMMO.destroy(this._collisionConfiguration),this.bjsAMMO.destroy(this._tmpAmmoVectorA),this.bjsAMMO.destroy(this._tmpAmmoVectorB),this.bjsAMMO.destroy(this._tmpAmmoVectorC),this.bjsAMMO.destroy(this._tmpAmmoTransform),this.bjsAMMO.destroy(this._tmpAmmoQuaternion),this.bjsAMMO.destroy(this._tmpAmmoConcreteContactResultCallback),this.world=null},r.prototype.raycast=function(t,e){this._tmpAmmoVectorRCA=new this.bjsAMMO.btVector3(t.x,t.y,t.z),this._tmpAmmoVectorRCB=new this.bjsAMMO.btVector3(e.x,e.y,e.z);var n=new this.bjsAMMO.ClosestRayResultCallback(this._tmpAmmoVectorRCA,this._tmpAmmoVectorRCB);return this.world.rayTest(this._tmpAmmoVectorRCA,this._tmpAmmoVectorRCB,n),this._raycastResult.reset(t,e),n.hasHit()&&(this._raycastResult.setHitData({x:n.get_m_hitNormalWorld().x(),y:n.get_m_hitNormalWorld().y(),z:n.get_m_hitNormalWorld().z()},{x:n.get_m_hitPointWorld().x(),y:n.get_m_hitPointWorld().y(),z:n.get_m_hitPointWorld().z()}),this._raycastResult.calculateHitDistance()),this.bjsAMMO.destroy(n),this.bjsAMMO.destroy(this._tmpAmmoVectorRCA),this.bjsAMMO.destroy(this._tmpAmmoVectorRCB),this._raycastResult},r.DISABLE_COLLISION_FLAG=4,r.KINEMATIC_FLAG=2,r.DISABLE_DEACTIVATION_FLAG=4,r}();U.a.prototype.removeReflectionProbe=function(r){if(!this.reflectionProbes)return-1;var t=this.reflectionProbes.indexOf(r);return t!==-1&&this.reflectionProbes.splice(t,1),t},U.a.prototype.addReflectionProbe=function(r){this.reflectionProbes||(this.reflectionProbes=[]),this.reflectionProbes.push(r)};var Ju=function(){function r(t,e,n,i,o){var a=this;i===void 0&&(i=!0),o===void 0&&(o=!1),this.name=t,this._viewMatrix=u.a.Identity(),this._target=u.e.Zero(),this._add=u.e.Zero(),this._invertYAxis=!1,this.position=u.e.Zero(),this._scene=n,this._scene.reflectionProbes||(this._scene.reflectionProbes=new Array),this._scene.reflectionProbes.push(this);var s=h.a.TEXTURETYPE_UNSIGNED_BYTE;if(o){var d=this._scene.getEngine().getCaps();d.textureHalfFloatRender?s=h.a.TEXTURETYPE_HALF_FLOAT:d.textureFloatRender&&(s=h.a.TEXTURETYPE_FLOAT)}this._renderTargetTexture=new sn(t,e,n,i,!0,s,!0),this._renderTargetTexture.onBeforeRenderObservable.add(function(p){switch(p){case 0:a._add.copyFromFloats(1,0,0);break;case 1:a._add.copyFromFloats(-1,0,0);break;case 2:a._add.copyFromFloats(0,a._invertYAxis?1:-1,0);break;case 3:a._add.copyFromFloats(0,a._invertYAxis?-1:1,0);break;case 4:a._add.copyFromFloats(0,0,1);break;case 5:a._add.copyFromFloats(0,0,-1)}a._attachedMesh&&a.position.copyFrom(a._attachedMesh.getAbsolutePosition()),a.position.addToRef(a._add,a._target),u.a.LookAtLHToRef(a.position,a._target,u.e.Up(),a._viewMatrix),n.activeCamera&&(a._projectionMatrix=u.a.PerspectiveFovLH(Math.PI/2,1,n.activeCamera.minZ,n.activeCamera.maxZ),n.setTransformMatrix(a._viewMatrix,a._projectionMatrix)),n._forcedViewPosition=a.position}),this._renderTargetTexture.onAfterUnbindObservable.add(function(){n._forcedViewPosition=null,n.updateTransformMatrix(!0)})}return Object.defineProperty(r.prototype,"samples",{get:function(){return this._renderTargetTexture.samples},set:function(t){this._renderTargetTexture.samples=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"refreshRate",{get:function(){return this._renderTargetTexture.refreshRate},set:function(t){this._renderTargetTexture.refreshRate=t},enumerable:!1,configurable:!0}),r.prototype.getScene=function(){return this._scene},Object.defineProperty(r.prototype,"cubeTexture",{get:function(){return this._renderTargetTexture},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"renderList",{get:function(){return this._renderTargetTexture.renderList},enumerable:!1,configurable:!0}),r.prototype.attachToMesh=function(t){this._attachedMesh=t},r.prototype.setRenderingAutoClearDepthStencil=function(t,e){this._renderTargetTexture.setRenderingAutoClearDepthStencil(t,e)},r.prototype.dispose=function(){var t=this._scene.reflectionProbes.indexOf(this);t!==-1&&this._scene.reflectionProbes.splice(t,1),this._renderTargetTexture&&(this._renderTargetTexture.dispose(),this._renderTargetTexture=null)},r.prototype.toString=function(t){var e="Name: "+this.name;return t&&(e+=", position: "+this.position.toString(),this._attachedMesh&&(e+=", attached mesh: "+this._attachedMesh.name)),e},r.prototype.getClassName=function(){return"ReflectionProbe"},r.prototype.serialize=function(){var t=L.a.Serialize(this,this._renderTargetTexture.serialize());return t.isReflectionProbe=!0,t},r.Parse=function(t,e,n){var i=null;if(e.reflectionProbes)for(var o=0;o0){var n=t._waitingData.lods.ids,i=e.isEnabled(!1);if(t._waitingData.lods.distances){var o=t._waitingData.lods.distances;if(o.length>=n.length){var a=o.length>n.length?o[o.length-1]:0;e.setEnabled(!1);for(var s=0;s0&&e.addLODLevel(a,null),i===!0&&e.setEnabled(!0)}else Xe.b.Warn("Invalid level of detail distances for "+t.name)}}t._waitingData.lods=null}},th=function(r,t,e,n,i){i===void 0&&(i=!1);var o=new xn(r),a="importScene has failed JSON parse";try{var s=JSON.parse(t);a="";var d,p,b=Ut.loggingLevel===Ut.DETAILED_LOGGING;if(s.environmentTexture!==void 0&&s.environmentTexture!==null){var x=s.isPBR===void 0||s.isPBR;if(s.environmentTextureType&&s.environmentTextureType==="BABYLON.HDRCubeTexture"){var O=s.environmentTextureSize?s.environmentTextureSize:128,B=new sa((s.environmentTexture.match(/https?:\/\//g)?"":e)+s.environmentTexture,r,O,!0,!x);s.environmentTextureRotationY&&(B.rotationY=s.environmentTextureRotationY),r.environmentTexture=B}else if(Qn.a.EndsWith(s.environmentTexture,".env")){var F=new oi((s.environmentTexture.match(/https?:\/\//g)?"":e)+s.environmentTexture,r);s.environmentTextureRotationY&&(F.rotationY=s.environmentTextureRotationY),r.environmentTexture=F}else{var z=oi.CreateFromPrefilteredData((s.environmentTexture.match(/https?:\/\//g)?"":e)+s.environmentTexture,r);s.environmentTextureRotationY&&(z.rotationY=s.environmentTextureRotationY),r.environmentTexture=z}if(s.createDefaultSkybox===!0){var J=r.activeCamera!==void 0&&r.activeCamera!==null?(r.activeCamera.maxZ-r.activeCamera.minZ)/2:1e3,ie=s.skyboxBlurLevel||0;r.createDefaultSkybox(r.environmentTexture,x,J,ie)}o.environmentTexture=r.environmentTexture}if(s.environmentIntensity!==void 0&&s.environmentIntensity!==null&&(r.environmentIntensity=s.environmentIntensity),s.lights!==void 0&&s.lights!==null)for(d=0,p=s.lights.length;d0){for(var $t=0;$t0){for(var Gn=0;Gn-1&&p.skeletons!==void 0&&p.skeletons!==null&&!(z.indexOf(ie.skeletonId)>-1))for(var Le=0,xe=p.skeletons.length;Le1,this.wrapU=h.a.TEXTURE_CLAMP_ADDRESSMODE,this.wrapV=h.a.TEXTURE_CLAMP_ADDRESSMODE,this.wrapR=h.a.TEXTURE_CLAMP_ADDRESSMODE,this.anisotropicFilteringLevel=1;var o=function(s){if(typeof s=="string"){for(var d,p=null,b=null,x=s.split(` +`),O=0,B=0,F=0,z=0,J=0,ie=0;ie0&&(ie+1)%4==0)p[ie]=255;else{var Te=b[ie];p[ie]=Te/J*255}e.is3D?(e.updateSize(O,O,O),i.updateRawTexture3D(e,p,h.a.TEXTUREFORMAT_RGBA,!1)):(e.updateSize(O*O,O),i.updateRawTexture(e,p,h.a.TEXTUREFORMAT_RGBA,!1)),e.isReady=!0,n._triggerOnLoad()}},a=this.getScene();return a?a._loadFile(this.url,o):i._loadFile(this.url,o),this._texture},t.prototype.loadTexture=function(){this.url&&this.url.toLocaleLowerCase().indexOf(".3dl")==this.url.length-4&&this.load3dlTexture()},t.prototype.clone=function(){var e=new t(this.url,this.getScene()||this._getEngine());return e.level=this.level,e},t.prototype.delayLoad=function(){this.delayLoadState===h.a.DELAYLOADSTATE_NOTLOADED&&(this.delayLoadState=h.a.DELAYLOADSTATE_LOADED,this._texture=this._getFromCache(this.url,!0),this._texture||this.loadTexture())},t.Parse=function(e,n){var i=null;return e.name&&!e.isRenderTarget&&((i=new t(e.name,n)).name=e.name,i.level=e.level),i},t.prototype.serialize=function(){if(!this.name)return null;var e={};return e.name=this.name,e.level=this.level,e.customType="BABYLON.ColorGradingTexture",e},t._noneEmptyLineRegex=/\S+/,t}(Wn.a);C.a.RegisteredTypes["BABYLON.ColorGradingTexture"]=ah;var sh=function(r){function t(e,n,i,o,a,s,d){o===void 0&&(o=!1),a===void 0&&(a=!0),s===void 0&&(s=null),d===void 0&&(d=null);var p=r.call(this,n)||this;if(p._onLoad=null,p._onError=null,!e)throw new Error("Image url is not set");return p._coordinatesMode=we.a.CUBIC_MODE,p.name=e,p.url=e,p._size=i,p._noMipmap=o,p.gammaSpace=a,p._onLoad=s,p._onError=d,p.hasAlpha=!1,p.isCube=!0,p._texture=p._getFromCache(e,p._noMipmap),p._texture?s&&(p._texture.isReady?Xe.b.SetImmediate(function(){return s()}):p._texture.onLoadedObservable.add(s)):n.useDelayedTextureLoading?p.delayLoadState=h.a.DELAYLOADSTATE_NOTLOADED:p.loadImage(p.loadTexture.bind(p),p._onError),p}return Object(c.d)(t,r),t.prototype.loadImage=function(e,n){var i=this,o=document.createElement("canvas"),a=new Image;a.addEventListener("load",function(){i._width=a.width,i._height=a.height,o.width=i._width,o.height=i._height;var s=o.getContext("2d");s.drawImage(a,0,0);var d=s.getImageData(0,0,a.width,a.height);i._buffer=d.data.buffer,o.remove(),e()}),a.addEventListener("error",function(s){n&&n(i.getClassName()+" could not be loaded",s)}),a.src=this.url},t.prototype.loadTexture=function(){var e=this,n=this.getScene();n&&(this._texture=n.getEngine().createRawCubeTextureFromUrl(this.url,n,this._size,h.a.TEXTUREFORMAT_RGB,n.getEngine().getCaps().textureFloat?h.a.TEXTURETYPE_FLOAT:h.a.TEXTURETYPE_UNSIGNED_INTEGER,this._noMipmap,function(){for(var i=e.getFloat32ArrayFromArrayBuffer(e._buffer),o=Xs.ConvertPanoramaToCubemap(i,e._width,e._height,e._size),a=[],s=0;s<6;s++){var d=o[t._FacesMapping[s]];a.push(d)}return a},null,this._onLoad,this._onError))},t.prototype.getFloat32ArrayFromArrayBuffer=function(e){for(var n=new DataView(e),i=new Float32Array(3*e.byteLength/4),o=0,a=0;ae.length)l.a.Error("Unable to load TGA file - Not enough data");else{n+=i.id_length;var o,a=!1,s=!1,d=!1;switch(i.image_type){case r._TYPE_RLE_INDEXED:a=!0;case r._TYPE_INDEXED:s=!0;break;case r._TYPE_RLE_RGB:a=!0;case r._TYPE_RGB:break;case r._TYPE_RLE_GREY:a=!0;case r._TYPE_GREY:d=!0}var p,b,x,O,B,F,z,J=i.pixel_size>>3,ie=i.width*i.height*J;if(s&&(p=e.subarray(n,n+=i.colormap_length*(i.colormap_size>>3))),a){var se,ce,ue;o=new Uint8Array(ie);for(var fe=0,ve=new Uint8Array(J);n>r._ORIGIN_SHIFT){default:case r._ORIGIN_UL:b=0,O=1,z=i.width,x=0,B=1,F=i.height;break;case r._ORIGIN_BL:b=0,O=1,z=i.width,x=i.height-1,B=-1,F=-1;break;case r._ORIGIN_UR:b=i.width-1,O=-1,z=-1,x=0,B=1,F=i.height;break;case r._ORIGIN_BR:b=i.width-1,O=-1,z=-1,x=i.height-1,B=-1,F=-1}var Te=r["_getImageData"+(d?"Grey":"")+i.pixel_size+"bits"](i,p,o,x,B,F,b,O,z);t.getEngine()._uploadDataToTextureDirectly(t,Te)}}},r._getImageData8bits=function(t,e,n,i,o,a,s,d,p){var b,x,O,B=n,F=e,z=t.width,J=t.height,ie=0,se=new Uint8Array(z*J*4);for(O=i;O!==a;O+=o)for(x=s;x!==p;x+=d,ie++)b=B[ie],se[4*(x+z*O)+3]=255,se[4*(x+z*O)+2]=F[3*b+0],se[4*(x+z*O)+1]=F[3*b+1],se[4*(x+z*O)+0]=F[3*b+2];return se},r._getImageData16bits=function(t,e,n,i,o,a,s,d,p){var b,x,O,B=n,F=t.width,z=t.height,J=0,ie=new Uint8Array(F*z*4);for(O=i;O!==a;O+=o)for(x=s;x!==p;x+=d,J+=2){var se=255*((31744&(b=B[J+0]+(B[J+1]<<8)))>>10)/31|0,ce=255*((992&b)>>5)/31|0,ue=255*(31&b)/31|0;ie[4*(x+F*O)+0]=se,ie[4*(x+F*O)+1]=ce,ie[4*(x+F*O)+2]=ue,ie[4*(x+F*O)+3]=32768&b?0:255}return ie},r._getImageData24bits=function(t,e,n,i,o,a,s,d,p){var b,x,O=n,B=t.width,F=t.height,z=0,J=new Uint8Array(B*F*4);for(x=i;x!==a;x+=o)for(b=s;b!==p;b+=d,z+=3)J[4*(b+B*x)+3]=255,J[4*(b+B*x)+2]=O[z+0],J[4*(b+B*x)+1]=O[z+1],J[4*(b+B*x)+0]=O[z+2];return J},r._getImageData32bits=function(t,e,n,i,o,a,s,d,p){var b,x,O=n,B=t.width,F=t.height,z=0,J=new Uint8Array(B*F*4);for(x=i;x!==a;x+=o)for(b=s;b!==p;b+=d,z+=4)J[4*(b+B*x)+2]=O[z+0],J[4*(b+B*x)+1]=O[z+1],J[4*(b+B*x)+0]=O[z+2],J[4*(b+B*x)+3]=O[z+3];return J},r._getImageDataGrey8bits=function(t,e,n,i,o,a,s,d,p){var b,x,O,B=n,F=t.width,z=t.height,J=0,ie=new Uint8Array(F*z*4);for(O=i;O!==a;O+=o)for(x=s;x!==p;x+=d,J++)b=B[J],ie[4*(x+F*O)+0]=b,ie[4*(x+F*O)+1]=b,ie[4*(x+F*O)+2]=b,ie[4*(x+F*O)+3]=255;return ie},r._getImageDataGrey16bits=function(t,e,n,i,o,a,s,d,p){var b,x,O=n,B=t.width,F=t.height,z=0,J=new Uint8Array(B*F*4);for(x=i;x!==a;x+=o)for(b=s;b!==p;b+=d,z+=2)J[4*(b+B*x)+0]=O[z+0],J[4*(b+B*x)+1]=O[z+0],J[4*(b+B*x)+2]=O[z+0],J[4*(b+B*x)+3]=O[z+1];return J},r._TYPE_INDEXED=1,r._TYPE_RGB=2,r._TYPE_GREY=3,r._TYPE_RLE_INDEXED=9,r._TYPE_RLE_RGB=10,r._TYPE_RLE_GREY=11,r._ORIGIN_MASK=48,r._ORIGIN_SHIFT=4,r._ORIGIN_BL=0,r._ORIGIN_BR=1,r._ORIGIN_UL=2,r._ORIGIN_UR=3,r}(),ch=function(){function r(){this.supportCascades=!1}return r.prototype.canLoad=function(t){return Qn.a.EndsWith(t,".tga")},r.prototype.loadCubeData=function(t,e,n,i,o){throw".env not supported in Cube."},r.prototype.loadData=function(t,e,n){var i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength),o=da.GetTGAHeader(i);n(o.width,o.height,e.generateMipMaps,!1,function(){da.UploadContent(e,i)})},r}();Ue.a._TextureLoaders.push(new ch);var fo,Z_=function(){};(function(r){r[r.cTFETC1=0]="cTFETC1",r[r.cTFBC1=1]="cTFBC1",r[r.cTFBC4=2]="cTFBC4",r[r.cTFPVRTC1_4_OPAQUE_ONLY=3]="cTFPVRTC1_4_OPAQUE_ONLY",r[r.cTFBC7_M6_OPAQUE_ONLY=4]="cTFBC7_M6_OPAQUE_ONLY",r[r.cTFETC2=5]="cTFETC2",r[r.cTFBC3=6]="cTFBC3",r[r.cTFBC5=7]="cTFBC5"})(fo||(fo={}));var po=function(){function r(){}return r.GetInternalFormatFromBasisFormat=function(t){if(t===fo.cTFETC1)return 36196;if(t===fo.cTFBC1)return 33776;if(t===fo.cTFBC3)return 33779;throw"The chosen Basis transcoder format is not currently supported"},r._CreateWorkerAsync=function(){var t=this;return this._WorkerPromise||(this._WorkerPromise=new Promise(function(e){t._Worker?e(t._Worker):Xe.b.LoadFileAsync(r.WasmModuleURL).then(function(n){var i=URL.createObjectURL(new Blob(["("+J_+")()"],{type:"application/javascript"}));t._Worker=new Worker(i);var o=function(a){a.data.action==="init"&&(t._Worker.removeEventListener("message",o),e(t._Worker))};t._Worker.addEventListener("message",o),t._Worker.postMessage({action:"init",url:r.JSModuleURL,wasmBinary:n})})})),this._WorkerPromise},r.TranscodeAsync=function(t,e){var n=this,i=t instanceof ArrayBuffer?new Uint8Array(t):t;return new Promise(function(o,a){n._CreateWorkerAsync().then(function(){var s=n._actionId++,d=function(b){b.data.action==="transcode"&&b.data.id===s&&(n._Worker.removeEventListener("message",d),b.data.success?o(b.data):a("Transcode is not supported on this device"))};n._Worker.addEventListener("message",d);var p=new Uint8Array(i.byteLength);p.set(new Uint8Array(i.buffer,i.byteOffset,i.byteLength)),n._Worker.postMessage({action:"transcode",id:s,imageData:p,config:e,ignoreSupportedFormats:n._IgnoreSupportedFormats},[p.buffer])})})},r.LoadTextureFromTranscodeResult=function(t,e){for(var n,i=t.getEngine(),o=function(){if(n=e.fileInfo.images[a].levels[0],t._invertVScale=t.invertY,e.format===-1)if(t.type=h.a.TEXTURETYPE_UNSIGNED_SHORT_5_6_5,t.format=h.a.TEXTUREFORMAT_RGB,i.webGLVersion<2&&($.a.Log2(n.width)%1!=0||$.a.Log2(n.height)%1!=0)){var s=new Ct.a(i,Ct.b.Temp);t._invertVScale=t.invertY,s.type=h.a.TEXTURETYPE_UNSIGNED_SHORT_5_6_5,s.format=h.a.TEXTUREFORMAT_RGB,s.width=n.width+3&-4,s.height=n.height+3&-4,i._bindTextureDirectly(i._gl.TEXTURE_2D,s,!0),i._uploadDataToTextureDirectly(s,n.transcodedPixels,a,0,h.a.TEXTUREFORMAT_RGB,!0),i._rescaleTexture(s,t,i.scenes[0],i._getInternalFormat(h.a.TEXTUREFORMAT_RGB),function(){i._releaseTexture(s),i._bindTextureDirectly(i._gl.TEXTURE_2D,t,!0)})}else t._invertVScale=!t.invertY,t.width=n.width+3&-4,t.height=n.height+3&-4,i._uploadDataToTextureDirectly(t,n.transcodedPixels,a,0,h.a.TEXTUREFORMAT_RGB,!0);else t.width=n.width,t.height=n.height,e.fileInfo.images[a].levels.forEach(function(d,p){i._uploadCompressedDataToTextureDirectly(t,r.GetInternalFormatFromBasisFormat(e.format),d.width,d.height,d.transcodedPixels,a,p)}),i.webGLVersion<2&&($.a.Log2(t.width)%1!=0||$.a.Log2(t.height)%1!=0)&&(Xe.b.Warn("Loaded .basis texture width and height are not a power of two. Texture wrapping will be set to Texture.CLAMP_ADDRESSMODE as other modes are not supported with non power of two dimensions in webGL 1."),t._cachedWrapU=we.a.CLAMP_ADDRESSMODE,t._cachedWrapV=we.a.CLAMP_ADDRESSMODE)},a=0;a>2&3],se[Ee++]=ie[Ae>>4&3],se[Ee++]=ie[Ae>>6&3]}}return se}(O,0,a.getImageWidth(s,d)+3&-4,a.getImageHeight(s,d)+3&-4)),O):null}onmessage=function(a){if(a.data.action==="init")i||(Module={wasmBinary:a.data.wasmBinary},importScripts(a.data.url),i=new Promise(function(fe){Module.onRuntimeInitialized=function(){Module.initializeBasis(),fe()}})),i.then(function(){postMessage({action:"init"})});else if(a.data.action==="transcode"){var s=a.data.config,d=a.data.imageData,p=new Module.BasisFile(d),b=function(fe){for(var ve=fe.getHasAlpha(),Te=fe.getNumImages(),Re=[],Ae=0;Ae1&&e.generateMipMaps;po.LoadTextureFromTranscodeResult(e,d),e.getEngine()._setCubeMapTextureParams(e,p),e.isReady=!0,e.onLoadedObservable.notifyObservers(e),e.onLoadedObservable.clear(),i&&i()}).catch(function(d){Xe.b.Warn("Failed to transcode Basis file, transcoding may not be supported on this device"),e.isReady=!0})}},r.prototype.loadData=function(t,e,n){var i=e.getEngine().getCaps(),o={supportedCompressionFormats:{etc1:!!i.etc1,s3tc:!!i.s3tc,pvrtc:!!i.pvrtc,etc2:!!i.etc2}};po.TranscodeAsync(t,o).then(function(a){var s=a.fileInfo.images[0].levels[0],d=a.fileInfo.images[0].levels.length>1&&e.generateMipMaps;n(s.width,s.height,d,a.format!==-1,function(){po.LoadTextureFromTranscodeResult(e,a)})}).catch(function(a){Xe.b.Warn("Failed to transcode Basis file, transcoding may not be supported on this device"),n(0,0,!1,!1,function(){})})},r}();Ue.a._TextureLoaders.push(new lh);var qs=function(r){function t(e,n,i,o,a){var s=this,d=!(!a||!a.generateMipMaps)&&a.generateMipMaps,p=!(!a||!a.generateDepthTexture)&&a.generateDepthTexture,b=!a||a.doNotChangeAspectRatio===void 0||a.doNotChangeAspectRatio;if((s=r.call(this,e,n,o,d,b)||this).isSupported){var x=[],O=[];s._initTypes(i,x,O,a);var B=!a||a.generateDepthBuffer===void 0||a.generateDepthBuffer,F=!(!a||a.generateStencilBuffer===void 0)&&a.generateStencilBuffer;return s._size=n,s._multiRenderTargetOptions={samplingModes:O,generateMipMaps:d,generateDepthBuffer:B,generateStencilBuffer:F,generateDepthTexture:p,types:x,textureCount:i},s._count=i,s._createInternalTextures(),s._createTextures(),s}s.dispose()}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"isSupported",{get:function(){return this._getEngine().webGLVersion>1||this._getEngine().getCaps().drawBuffersExtension},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textures",{get:function(){return this._textures},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"count",{get:function(){return this._count},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"depthTexture",{get:function(){return this._textures[this._textures.length-1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"wrapU",{set:function(e){if(this._textures)for(var n=0;n=0;e--)this._internalTextures[e]!==void 0&&(this._internalTextures[e].dispose(),this._internalTextures.splice(e,1))},t}(sn),Zs=function(r,t,e){this.id=r,this.scale=t,this.offset=e},$_=function(){function r(t,e,n,i){var o,a,s,d,p,b,x,O,B,F,z,J,ie;return this.name=t,this.meshes=e,this.scene=i,this.options=n,this.options.map=(o=this.options.map)!==null&&o!==void 0?o:["ambientTexture","bumpTexture","diffuseTexture","emissiveTexture","lightmapTexture","opacityTexture","reflectionTexture","refractionTexture","specularTexture"],this.options.uvsIn=(a=this.options.uvsIn)!==null&&a!==void 0?a:Oe.b.UVKind,this.options.uvsOut=(s=this.options.uvsOut)!==null&&s!==void 0?s:Oe.b.UVKind,this.options.layout=(d=this.options.layout)!==null&&d!==void 0?d:r.LAYOUT_STRIP,this.options.layout===r.LAYOUT_COLNUM&&(this.options.colnum=(p=this.options.colnum)!==null&&p!==void 0?p:8),this.options.updateInputMeshes=(b=this.options.updateInputMeshes)===null||b===void 0||b,this.options.disposeSources=(x=this.options.disposeSources)===null||x===void 0||x,this._expecting=0,this.options.fillBlanks=(O=this.options.fillBlanks)===null||O===void 0||O,this.options.fillBlanks===!0&&(this.options.customFillColor=(B=this.options.customFillColor)!==null&&B!==void 0?B:"black"),this.options.frameSize=(F=this.options.frameSize)!==null&&F!==void 0?F:256,this.options.paddingRatio=(z=this.options.paddingRatio)!==null&&z!==void 0?z:.0115,this._paddingValue=Math.ceil(this.options.frameSize*this.options.paddingRatio),this._paddingValue%2!=0&&this._paddingValue++,this.options.paddingMode=(J=this.options.paddingMode)!==null&&J!==void 0?J:r.SUBUV_WRAP,this.options.paddingMode===r.SUBUV_COLOR&&(this.options.paddingColor=(ie=this.options.paddingColor)!==null&&ie!==void 0?ie:new M.b(0,0,0,1)),this.sets={},this.frames=[],this}return r.prototype._createFrames=function(t){for(var e=this,n=this._calculateSize(),i=new u.d(1,1).divide(n),o=0,a=this._expecting,s=this.meshes.length,d=Object.keys(this.sets),p=0;p0);for(var t=0;t0)}},r}(),em=` +attribute vec2 position; + +varying vec2 vPosition; +varying vec2 vUV; +const vec2 madd=vec2(0.5,0.5); +void main(void) { +vPosition=position; +vUV=position*madd+madd; +gl_Position=vec4(position,0.0,1.0); +}`;ze.a.ShadersStore.proceduralVertexShader=em;var _o=function(r){function t(e,n,i,o,a,s,d,p){a===void 0&&(a=null),s===void 0&&(s=!0),d===void 0&&(d=!1),p===void 0&&(p=h.a.TEXTURETYPE_UNSIGNED_INT);var b=r.call(this,null,o,!s)||this;b.isEnabled=!0,b.autoClear=!0,b.onGeneratedObservable=new R.c,b.onBeforeGenerationObservable=new R.c,b.nodeMaterialSource=null,b._textures={},b._currentRefreshId=-1,b._frameId=-1,b._refreshRate=1,b._vertexBuffers={},b._uniforms=new Array,b._samplers=new Array,b._floats={},b._ints={},b._floatsArrays={},b._colors3={},b._colors4={},b._vectors2={},b._vectors3={},b._matrices={},b._fallbackTextureUsed=!1,b._cachedDefines="",b._contentUpdateId=-1;var x=(o=b.getScene()||te.a.LastCreatedScene)._getComponent(at.a.NAME_PROCEDURALTEXTURE);x||(x=new uh(o),o._addComponent(x)),o.proceduralTextures.push(b),b._fullEngine=o.getEngine(),b.name=e,b.isRenderTarget=!0,b._size=n,b._generateMipMaps=s,b.setFragment(i),b._fallbackTexture=a,d?(b._texture=b._fullEngine.createRenderTargetCubeTexture(n,{generateMipMaps:s,generateDepthBuffer:!1,generateStencilBuffer:!1,type:p}),b.setFloat("face",0)):b._texture=b._fullEngine.createRenderTargetTexture(n,{generateMipMaps:s,generateDepthBuffer:!1,generateStencilBuffer:!1,type:p});var O=[];return O.push(1,1),O.push(-1,1),O.push(-1,-1),O.push(1,-1),b._vertexBuffers[Oe.b.PositionKind]=new Oe.b(b._fullEngine,O,Oe.b.PositionKind,!1,!1,2),b._createIndexBuffer(),b}return Object(c.d)(t,r),t.prototype.getEffect=function(){return this._effect},t.prototype.getContent=function(){return this._contentData&&this._frameId===this._contentUpdateId||(this._contentData=this.readPixels(0,0,this._contentData),this._contentUpdateId=this._frameId),this._contentData},t.prototype._createIndexBuffer=function(){var e=this._fullEngine,n=[];n.push(0),n.push(1),n.push(2),n.push(0),n.push(2),n.push(3),this._indexBuffer=e.createIndexBuffer(n)},t.prototype._rebuild=function(){var e=this._vertexBuffers[Oe.b.PositionKind];e&&e._rebuild(),this._createIndexBuffer(),this.refreshRate===sn.REFRESHRATE_RENDER_ONCE&&(this.refreshRate=sn.REFRESHRATE_RENDER_ONCE)},t.prototype.reset=function(){this._effect!==void 0&&this._effect.dispose()},t.prototype._getDefines=function(){return""},t.prototype.isReady=function(){var e,n=this,i=this._fullEngine;if(this.nodeMaterialSource)return this._effect.isReady();if(!this._fragment)return!1;if(this._fallbackTextureUsed)return!0;var o=this._getDefines();return!(!this._effect||o!==this._cachedDefines||!this._effect.isReady())||(e=this._fragment.fragmentElement!==void 0?{vertex:"procedural",fragmentElement:this._fragment.fragmentElement}:{vertex:"procedural",fragment:this._fragment},this._cachedDefines=o,this._effect=i.createEffect(e,[Oe.b.PositionKind],this._uniforms,this._samplers,o,void 0,void 0,function(){n.releaseInternalTexture(),n._fallbackTexture&&(n._texture=n._fallbackTexture._texture,n._texture&&n._texture.incrementReferences()),n._fallbackTextureUsed=!0}),this._effect.isReady())},t.prototype.resetRefreshCounter=function(){this._currentRefreshId=-1},t.prototype.setFragment=function(e){this._fragment=e},Object.defineProperty(t.prototype,"refreshRate",{get:function(){return this._refreshRate},set:function(e){this._refreshRate=e,this.resetRefreshCounter()},enumerable:!1,configurable:!0}),t.prototype._shouldRender=function(){return this.isEnabled&&this.isReady()&&this._texture?!this._fallbackTextureUsed&&(this._currentRefreshId===-1||this.refreshRate===this._currentRefreshId?(this._currentRefreshId=1,this._frameId++,!0):(this._currentRefreshId++,!1)):(this._texture&&(this._texture.isReady=!1),!1)},t.prototype.getRenderSize=function(){return this._size},t.prototype.resize=function(e,n){this._fallbackTextureUsed||(this.releaseInternalTexture(),this._texture=this._fullEngine.createRenderTargetTexture(e,n),this._size=e,this._generateMipMaps=n)},t.prototype._checkUniform=function(e){this._uniforms.indexOf(e)===-1&&this._uniforms.push(e)},t.prototype.setTexture=function(e,n){return this._samplers.indexOf(e)===-1&&this._samplers.push(e),this._textures[e]=n,this},t.prototype.setFloat=function(e,n){return this._checkUniform(e),this._floats[e]=n,this},t.prototype.setInt=function(e,n){return this._checkUniform(e),this._ints[e]=n,this},t.prototype.setFloats=function(e,n){return this._checkUniform(e),this._floatsArrays[e]=n,this},t.prototype.setColor3=function(e,n){return this._checkUniform(e),this._colors3[e]=n,this},t.prototype.setColor4=function(e,n){return this._checkUniform(e),this._colors4[e]=n,this},t.prototype.setVector2=function(e,n){return this._checkUniform(e),this._vectors2[e]=n,this},t.prototype.setVector3=function(e,n){return this._checkUniform(e),this._vectors3[e]=n,this},t.prototype.setMatrix=function(e,n){return this._checkUniform(e),this._matrices[e]=n,this},t.prototype.render=function(e){var n=this.getScene();if(n){var i=this._fullEngine;if(i.enableEffect(this._effect),this.onBeforeGenerationObservable.notifyObservers(this),i.setState(!1),!this.nodeMaterialSource){for(var o in this._textures)this._effect.setTexture(o,this._textures[o]);for(o in this._ints)this._effect.setInt(o,this._ints[o]);for(o in this._floats)this._effect.setFloat(o,this._floats[o]);for(o in this._floatsArrays)this._effect.setArray(o,this._floatsArrays[o]);for(o in this._colors3)this._effect.setColor3(o,this._colors3[o]);for(o in this._colors4){var a=this._colors4[o];this._effect.setFloat4(o,a.r,a.g,a.b,a.a)}for(o in this._vectors2)this._effect.setVector2(o,this._vectors2[o]);for(o in this._vectors3)this._effect.setVector3(o,this._vectors3[o]);for(o in this._matrices)this._effect.setMatrix(o,this._matrices[o])}if(this._texture){if(this.isCube)for(var s=0;s<6;s++)i.bindFramebuffer(this._texture,s,void 0,void 0,!0),i.bindBuffers(this._vertexBuffers,this._indexBuffer,this._effect),this._effect.setFloat("face",s),this.autoClear&&i.clear(n.clearColor,!0,!1,!1),i.drawElementsType(Ht.a.TriangleFillMode,0,6),s===5&&i.generateMipMapsForCubemap(this._texture);else i.bindFramebuffer(this._texture,0,void 0,void 0,!0),i.bindBuffers(this._vertexBuffers,this._indexBuffer,this._effect),this.autoClear&&i.clear(n.clearColor,!0,!1,!1),i.drawElementsType(Ht.a.TriangleFillMode,0,6);i.unBindFramebuffer(this._texture,this.isCube),this.onGenerated&&this.onGenerated(),this.onGeneratedObservable.notifyObservers(this)}}},t.prototype.clone=function(){var e=this.getSize(),n=new t(this.name,e.width,this._fragment,this.getScene(),this._fallbackTexture,this._generateMipMaps);return n.hasAlpha=this.hasAlpha,n.level=this.level,n.coordinatesMode=this.coordinatesMode,n},t.prototype.dispose=function(){var e=this.getScene();if(e){var n=e.proceduralTextures.indexOf(this);n>=0&&e.proceduralTextures.splice(n,1);var i=this._vertexBuffers[Oe.b.PositionKind];i&&(i.dispose(),this._vertexBuffers[Oe.b.PositionKind]=null),this._indexBuffer&&this._fullEngine._releaseBuffer(this._indexBuffer)&&(this._indexBuffer=null),this.onGeneratedObservable.clear(),this.onBeforeGenerationObservable.clear(),r.prototype.dispose.call(this)}},Object(c.c)([Object(L.c)()],t.prototype,"isEnabled",void 0),Object(c.c)([Object(L.c)()],t.prototype,"autoClear",void 0),Object(c.c)([Object(L.c)()],t.prototype,"_generateMipMaps",void 0),Object(c.c)([Object(L.c)()],t.prototype,"_size",void 0),Object(c.c)([Object(L.c)()],t.prototype,"refreshRate",null),t}(we.a);C.a.RegisteredTypes["BABYLON.ProceduralTexture"]=_o;var tm=function(r){function t(e,n,i,o,a,s){var d=r.call(this,e,i,null,o,a,s)||this;return d._animate=!0,d._time=0,d._texturePath=n,d._loadJson(n),d.refreshRate=1,d}return Object(c.d)(t,r),t.prototype._loadJson=function(e){var n=this,i=function(){try{n.setFragment(n._texturePath)}catch{l.a.Error("No json or ShaderStore or DOM element found for CustomProceduralTexture")}},o=e+"/config.json",a=new re.a;a.open("GET",o),a.addEventListener("load",function(){if(a.status===200||a.responseText&&a.responseText.length>0)try{n._config=JSON.parse(a.response),n.updateShaderUniforms(),n.updateTextures(),n.setFragment(n._texturePath+"/custom"),n._animate=n._config.animate,n.refreshRate=n._config.refreshrate}catch{i()}else i()},!1),a.addEventListener("error",function(){i()},!1);try{a.send()}catch{l.a.Error("CustomProceduralTexture: Error on XHR send request.")}},t.prototype.isReady=function(){if(!r.prototype.isReady.call(this))return!1;for(var e in this._textures)if(!this._textures[e].isReady())return!1;return!0},t.prototype.render=function(e){var n=this.getScene();this._animate&&n&&(this._time+=.03*n.getAnimationRatio(),this.updateShaderUniforms()),r.prototype.render.call(this,e)},t.prototype.updateTextures=function(){for(var e=0;e0},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isConnectedInVertexShader",{get:function(){if(this.target===Ce.Vertex)return!0;if(!this.hasEndpoints)return!1;for(var t=0,e=this._endpoints;t=0)&&(e.isExposedOnFrame=!0,e.exposedPortPosition=this.exposedPortPosition),e},r.prototype.dispose=function(){this.onConnectionObservable.clear()},r}(),sm=f(152),pt=function(){function r(t,e,n,i){e===void 0&&(e=Ce.Vertex),n===void 0&&(n=!1),i===void 0&&(i=!1),this._isFinalMerger=!1,this._isInput=!1,this._name="",this._isUnique=!1,this.inputsAreExclusive=!1,this._codeVariableName="",this._inputs=new Array,this._outputs=new Array,this.comments="",this.visibleInInspector=!1,this._target=e,this._isFinalMerger=n,this._isInput=i,this._name=t,this.uniqueId=sm.a.UniqueId}return Object.defineProperty(r.prototype,"name",{get:function(){return this._name},set:function(t){this.validateBlockName(t)&&(this._name=t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isUnique",{get:function(){return this._isUnique},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isFinalMerger",{get:function(){return this._isFinalMerger},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isInput",{get:function(){return this._isInput},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"buildId",{get:function(){return this._buildId},set:function(t){this._buildId=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"target",{get:function(){return this._target},set:function(t){(this._target&t)==0&&(this._target=t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"inputs",{get:function(){return this._inputs},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"outputs",{get:function(){return this._outputs},enumerable:!1,configurable:!0}),r.prototype.getInputByName=function(t){var e=this._inputs.filter(function(n){return n.name===t});return e.length?e[0]:null},r.prototype.getOutputByName=function(t){var e=this._outputs.filter(function(n){return n.name===t});return e.length?e[0]:null},r.prototype.initialize=function(t){},r.prototype.bind=function(t,e,n,i){},r.prototype._declareOutput=function(t,e){return e._getGLType(t.type)+" "+t.associatedVariableName},r.prototype._writeVariable=function(t){return t.connectedPoint?""+t.associatedVariableName:"0."},r.prototype._writeFloat=function(t){var e=t.toString();return e.indexOf(".")===-1&&(e+=".0"),""+e},r.prototype.getClassName=function(){return"NodeMaterialBlock"},r.prototype.registerInput=function(t,e,n,i,o){return n===void 0&&(n=!1),(o=o??new fa(t,this,Tn.Input)).type=e,o.isOptional=n,i&&(o.target=i),this._inputs.push(o),this},r.prototype.registerOutput=function(t,e,n,i){return(i=i??new fa(t,this,Tn.Output)).type=e,n&&(i.target=n),this._outputs.push(i),this},r.prototype.getFirstAvailableInput=function(t){t===void 0&&(t=null);for(var e=0,n=this._inputs;e=this._outputs.length?null:this._outputs[e+1]},r.prototype.connectTo=function(t,e){if(this._outputs.length!==0){for(var n=e&&e.output?this.getOutputByName(e.output):this.getFirstAvailableOutput(t),i=!0;i;){var o=e&&e.input?t.getInputByName(e.input):t.getFirstAvailableInput(n);if(n&&o&&n.canConnectTo(o))n.connectTo(o),i=!1;else{if(!n)throw"Unable to find a compatible match";n=this.getSiblingOutput(n)}}return this}},r.prototype._buildBlock=function(t){},r.prototype.updateUniformsAndSamples=function(t,e,n,i){},r.prototype.provideFallbacks=function(t,e){},r.prototype.initializeDefines=function(t,e,n,i){},r.prototype.prepareDefines=function(t,e,n,i,o){},r.prototype.autoConfigure=function(t){},r.prototype.replaceRepeatableContent=function(t,e,n,i){},r.prototype.isReady=function(t,e,n,i){return!0},r.prototype._linkConnectionTypes=function(t,e,n){n===void 0&&(n=!1),n?this._inputs[e]._acceptedConnectionPointType=this._inputs[t]:this._inputs[t]._linkedConnectionSource=this._inputs[e],this._inputs[e]._linkedConnectionSource=this._inputs[t]},r.prototype._processBuild=function(t,e,n,i){t.build(e,i);var o=e._vertexState!=null,a=t._buildTarget===Ce.Vertex&&t.target!==Ce.VertexAndFragment;if(o&&((t.target&t._buildTarget)==0||(t.target&n.target)==0||this.target!==Ce.VertexAndFragment&&a)&&(!t.isInput&&e.target!==t._buildTarget||t.isInput&&t.isAttribute&&!t._noContextSwitch)){var s=n.connectedPoint;e._vertexState._emitVaryingFromString("v_"+s.associatedVariableName,e._getGLType(s.type))&&(e._vertexState.compilationString+="v_"+s.associatedVariableName+" = "+s.associatedVariableName+`;\r +`),n.associatedVariableName="v_"+s.associatedVariableName,n._enforceAssociatedVariableName=!0}},r.prototype.validateBlockName=function(t){for(var e=0,n=["position","normal","tangent","particle_positionw","uv","uv2","position2d","particle_uv","matricesIndices","matricesWeights","world0","world1","world2","world3","particle_color","particle_texturemask"];e[0.."+n.repeatKey+`]\r +`;var i=ze.a.IncludesShadersStore[t]+`\r +`;if(this.sharedData.emitComments&&(i=e+`\r +`+i),!n)return i;if(n.replaceStrings)for(var o=0;o[0.."+n.repeatKey+`]\r +`:this.functions[o]="#include<"+t+`>\r +`,void(this.sharedData.emitComments&&(this.functions[o]=e+`\r +`+this.functions[o]));if(this.functions[o]=ze.a.IncludesShadersStore[t],this.sharedData.emitComments&&(this.functions[o]=e+`\r +`+this.functions[o]),n.removeIfDef&&(this.functions[o]=this.functions[o].replace(/^\s*?#ifdef.+$/gm,""),this.functions[o]=this.functions[o].replace(/^\s*?#endif.*$/gm,""),this.functions[o]=this.functions[o].replace(/^\s*?#else.*$/gm,""),this.functions[o]=this.functions[o].replace(/^\s*?#elif.*$/gm,"")),n.removeAttributes&&(this.functions[o]=this.functions[o].replace(/^\s*?attribute.+$/gm,"")),n.removeUniforms&&(this.functions[o]=this.functions[o].replace(/^\s*?uniform.+$/gm,"")),n.removeVaryings&&(this.functions[o]=this.functions[o].replace(/^\s*?varying.+$/gm,"")),n.replaceStrings)for(var a=0;a0||this._emitRateGradients&&this._emitRateGradients.length>0||this._lifeTimeGradients&&this._lifeTimeGradients.length>0},r.prototype.getDragGradients=function(){return this._dragGradients},r.prototype.getLimitVelocityGradients=function(){return this._limitVelocityGradients},r.prototype.getColorGradients=function(){return this._colorGradients},r.prototype.getSizeGradients=function(){return this._sizeGradients},r.prototype.getColorRemapGradients=function(){return this._colorRemapGradients},r.prototype.getAlphaRemapGradients=function(){return this._alphaRemapGradients},r.prototype.getLifeTimeGradients=function(){return this._lifeTimeGradients},r.prototype.getAngularSpeedGradients=function(){return this._angularSpeedGradients},r.prototype.getVelocityGradients=function(){return this._velocityGradients},r.prototype.getStartSizeGradients=function(){return this._startSizeGradients},r.prototype.getEmitRateGradients=function(){return this._emitRateGradients},Object.defineProperty(r.prototype,"direction1",{get:function(){return this.particleEmitterType.direction1?this.particleEmitterType.direction1:u.e.Zero()},set:function(t){this.particleEmitterType.direction1&&(this.particleEmitterType.direction1=t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"direction2",{get:function(){return this.particleEmitterType.direction2?this.particleEmitterType.direction2:u.e.Zero()},set:function(t){this.particleEmitterType.direction2&&(this.particleEmitterType.direction2=t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"minEmitBox",{get:function(){return this.particleEmitterType.minEmitBox?this.particleEmitterType.minEmitBox:u.e.Zero()},set:function(t){this.particleEmitterType.minEmitBox&&(this.particleEmitterType.minEmitBox=t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"maxEmitBox",{get:function(){return this.particleEmitterType.maxEmitBox?this.particleEmitterType.maxEmitBox:u.e.Zero()},set:function(t){this.particleEmitterType.maxEmitBox&&(this.particleEmitterType.maxEmitBox=t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isBillboardBased",{get:function(){return this._isBillboardBased},set:function(t){this._isBillboardBased!==t&&(this._isBillboardBased=t,this._reset())},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"imageProcessingConfiguration",{get:function(){return this._imageProcessingConfiguration},set:function(t){this._attachImageProcessingConfiguration(t)},enumerable:!1,configurable:!0}),r.prototype._attachImageProcessingConfiguration=function(t){t!==this._imageProcessingConfiguration&&(!t&&this._scene?this._imageProcessingConfiguration=this._scene.imageProcessingConfiguration:this._imageProcessingConfiguration=t)},r.prototype._reset=function(){},r.prototype._removeGradientAndTexture=function(t,e,n){if(!e)return this;for(var i=0,o=0,a=e;o-1))return this._optimizers.push(e),this},t.prototype.unregisterOptimizer=function(e){var n=this._optimizers.indexOf(e);if(n!==-1)return this._optimizers.splice(n,1),this},t.prototype.addOutputNode=function(e){if(e.target===null)throw"This node is not meant to be an output node. You may want to explicitly set its target value.";return(e.target&Ce.Vertex)!=0&&this._addVertexOutputNode(e),(e.target&Ce.Fragment)!=0&&this._addFragmentOutputNode(e),this},t.prototype.removeOutputNode=function(e){return e.target===null||((e.target&Ce.Vertex)!=0&&this._removeVertexOutputNode(e),(e.target&Ce.Fragment)!=0&&this._removeFragmentOutputNode(e)),this},t.prototype._addVertexOutputNode=function(e){if(this._vertexOutputNodes.indexOf(e)===-1)return e.target=Ce.Vertex,this._vertexOutputNodes.push(e),this},t.prototype._removeVertexOutputNode=function(e){var n=this._vertexOutputNodes.indexOf(e);if(n!==-1)return this._vertexOutputNodes.splice(n,1),this},t.prototype._addFragmentOutputNode=function(e){if(this._fragmentOutputNodes.indexOf(e)===-1)return e.target=Ce.Fragment,this._fragmentOutputNodes.push(e),this},t.prototype._removeFragmentOutputNode=function(e){var n=this._fragmentOutputNodes.indexOf(e);if(n!==-1)return this._fragmentOutputNodes.splice(n,1),this},t.prototype.needAlphaBlending=function(){return!this.ignoreAlpha&&(this.alpha<1||this._sharedData&&this._sharedData.hints.needAlphaBlending)},t.prototype.needAlphaTesting=function(){return this._sharedData&&this._sharedData.hints.needAlphaTesting},t.prototype._initializeBlock=function(e,n,i){if(e.initialize(n),e.autoConfigure(this),e._preparationId=this._buildId,this.attachedBlocks.indexOf(e)===-1){if(e.isUnique){for(var o=e.getClassName(),a=0,s=this.attachedBlocks;a-1&&this.attachedBlocks.splice(n,1),e.isFinalMerger&&this.removeOutputNode(e)},t.prototype.build=function(e){e===void 0&&(e=!1),this._buildWasSuccessful=!1;var n=this.getScene().getEngine(),i=this._mode===Mn.Particle;if(this._vertexOutputNodes.length===0&&!i)throw"You must define at least one vertexOutputNode";if(this._fragmentOutputNodes.length===0)throw"You must define at least one fragmentOutputNode";this._vertexCompilationState=new dh,this._vertexCompilationState.supportUniformBuffers=n.supportsUniformBuffers,this._vertexCompilationState.target=Ce.Vertex,this._fragmentCompilationState=new dh,this._fragmentCompilationState.supportUniformBuffers=n.supportsUniformBuffers,this._fragmentCompilationState.target=Ce.Fragment,this._sharedData=new cm,this._vertexCompilationState.sharedData=this._sharedData,this._fragmentCompilationState.sharedData=this._sharedData,this._sharedData.buildId=this._buildId,this._sharedData.emitComments=this._options.emitComments,this._sharedData.verbose=e,this._sharedData.scene=this.getScene(),this._sharedData.allowEmptyVertexProgram=i;for(var o=[],a=[],s=0,d=this._vertexOutputNodes;s0\r +`,e.compilationString+=this._declareOutput(o,e)+" = "+a.associatedVariableName+" * "+i+`;\r +`,e.compilationString+=`#else\r +`,e.compilationString+=this._declareOutput(o,e)+" = "+a.associatedVariableName+`;\r +`,e.compilationString+=`#endif\r +`,this},t}(pt);C.a.RegisteredTypes["BABYLON.BonesBlock"]=mh;var gh=function(r){function t(e){var n=r.call(this,e,Ce.Vertex)||this;return n.registerInput("world0",le.Vector4),n.registerInput("world1",le.Vector4),n.registerInput("world2",le.Vector4),n.registerInput("world3",le.Vector4),n.registerInput("world",le.Matrix,!0),n.registerOutput("output",le.Matrix),n.registerOutput("instanceID",le.Float),n}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"InstancesBlock"},Object.defineProperty(t.prototype,"world0",{get:function(){return this._inputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"world1",{get:function(){return this._inputs[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"world2",{get:function(){return this._inputs[2]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"world3",{get:function(){return this._inputs[3]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"world",{get:function(){return this._inputs[4]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"output",{get:function(){return this._outputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"instanceID",{get:function(){return this._outputs[1]},enumerable:!1,configurable:!0}),t.prototype.autoConfigure=function(e){if(!this.world0.connectedPoint){var n=e.getInputBlockByPredicate(function(d){return d.isAttribute&&d.name==="world0"});n||(n=new At("world0")).setAsAttribute("world0"),n.output.connectTo(this.world0)}if(!this.world1.connectedPoint){var i=e.getInputBlockByPredicate(function(d){return d.isAttribute&&d.name==="world1"});i||(i=new At("world1")).setAsAttribute("world1"),i.output.connectTo(this.world1)}if(!this.world2.connectedPoint){var o=e.getInputBlockByPredicate(function(d){return d.isAttribute&&d.name==="world2"});o||(o=new At("world2")).setAsAttribute("world2"),o.output.connectTo(this.world2)}if(!this.world3.connectedPoint){var a=e.getInputBlockByPredicate(function(d){return d.isAttribute&&d.name==="world3"});a||(a=new At("world3")).setAsAttribute("world3"),a.output.connectTo(this.world3)}if(!this.world.connectedPoint){var s=e.getInputBlockByPredicate(function(d){return d.isAttribute&&d.name==="world"});s||(s=new At("world")).setAsSystemValue(bt.World),s.output.connectTo(this.world)}this.world.define="!INSTANCES || THIN_INSTANCES"},t.prototype.prepareDefines=function(e,n,i,o,a){o===void 0&&(o=!1);var s=!1;i.INSTANCES!==o&&(i.setValue("INSTANCES",o),s=!0),a&&i.THIN_INSTANCES!==!!a?.getRenderingMesh().hasThinInstances&&(i.setValue("THIN_INSTANCES",!!a?.getRenderingMesh().hasThinInstances),s=!0),s&&i.markAsUnprocessed()},t.prototype._buildBlock=function(e){r.prototype._buildBlock.call(this,e),e.sharedData.blocksWithDefines.push(this);var n=this._outputs[0],i=this._outputs[1],o=this.world0,a=this.world1,s=this.world2,d=this.world3;return e.compilationString+=`#ifdef INSTANCES\r +`,e.compilationString+=this._declareOutput(n,e)+" = mat4("+o.associatedVariableName+", "+a.associatedVariableName+", "+s.associatedVariableName+", "+d.associatedVariableName+`);\r +`,e.compilationString+=`#ifdef THIN_INSTANCES\r +`,e.compilationString+=n.associatedVariableName+" = "+this.world.associatedVariableName+" * "+n.associatedVariableName+`;\r +`,e.compilationString+=`#endif\r +`,e.compilationString+=this._declareOutput(i,e)+` = float(gl_InstanceID);\r +`,e.compilationString+=`#else\r +`,e.compilationString+=this._declareOutput(n,e)+" = "+this.world.associatedVariableName+`;\r +`,e.compilationString+=this._declareOutput(i,e)+` = 0.0;\r +`,e.compilationString+=`#endif\r +`,this},t}(pt);C.a.RegisteredTypes["BABYLON.InstancesBlock"]=gh;var vh=function(r){function t(e){var n=r.call(this,e,Ce.Vertex)||this;return n.registerInput("position",le.Vector3),n.registerInput("normal",le.Vector3),n.registerInput("tangent",le.Vector3),n.registerInput("uv",le.Vector2),n.registerOutput("positionOutput",le.Vector3),n.registerOutput("normalOutput",le.Vector3),n.registerOutput("tangentOutput",le.Vector3),n.registerOutput("uvOutput",le.Vector2),n}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"MorphTargetsBlock"},Object.defineProperty(t.prototype,"position",{get:function(){return this._inputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"normal",{get:function(){return this._inputs[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tangent",{get:function(){return this._inputs[2]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"uv",{get:function(){return this._inputs[3]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"positionOutput",{get:function(){return this._outputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"normalOutput",{get:function(){return this._outputs[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tangentOutput",{get:function(){return this._outputs[2]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"uvOutput",{get:function(){return this._outputs[3]},enumerable:!1,configurable:!0}),t.prototype.initialize=function(e){e._excludeVariableName("morphTargetInfluences")},t.prototype.autoConfigure=function(e){if(!this.position.isConnected){var n=e.getInputBlockByPredicate(function(s){return s.isAttribute&&s.name==="position"});n||(n=new At("position")).setAsAttribute(),n.output.connectTo(this.position)}if(!this.normal.isConnected){var i=e.getInputBlockByPredicate(function(s){return s.isAttribute&&s.name==="normal"});i||(i=new At("normal")).setAsAttribute("normal"),i.output.connectTo(this.normal)}if(!this.tangent.isConnected){var o=e.getInputBlockByPredicate(function(s){return s.isAttribute&&s.name==="tangent"});o||(o=new At("tangent")).setAsAttribute("tangent"),o.output.connectTo(this.tangent)}if(!this.uv.isConnected){var a=e.getInputBlockByPredicate(function(s){return s.isAttribute&&s.name==="uv"});a||(a=new At("uv")).setAsAttribute("uv"),a.output.connectTo(this.uv)}},t.prototype.prepareDefines=function(e,n,i){i._areAttributesDirty&&et.a.PrepareDefinesForMorphTargets(e,i)},t.prototype.bind=function(e,n,i){i&&i.morphTargetManager&&i.morphTargetManager.numInfluencers>0&&et.a.BindMorphTargetParameters(i,e)},t.prototype.replaceRepeatableContent=function(e,n,i,o){for(var a=this.position,s=this.normal,d=this.tangent,p=this.uv,b=this.positionOutput,x=this.normalOutput,O=this.tangentOutput,B=this.uvOutput,F=e,z=o.NUM_MORPH_INFLUENCERS,J=i.morphTargetManager,ie=J&&J.supportsNormals&&o.NORMAL,se=J&&J.supportsTangents&&o.TANGENT,ce=J&&J.supportsUVs&&o.UV1,ue="",fe=0;fe0)for(fe=0;fe=0;et.a.PrepareUniformsAndSamplersForLight(a,e.uniforms,e.samplers,i["PROJECTEDLIGHTTEXTURE"+a],o,s)}},t.prototype.bind=function(e,n,i){if(i){var o=i.getScene();this.light?et.a.BindLight(this.light,this._lightId,o,e,!0):et.a.BindLights(o,i,e,!0,n.maxSimultaneousLights)}},t.prototype._injectVertexCode=function(e){var n=this.worldPosition,i="//"+this.name;this.light?(this._lightId=(e.counters.lightCounter!==void 0?e.counters.lightCounter:-1)+1,e.counters.lightCounter=this._lightId,e._emitFunctionFromInclude(e.supportUniformBuffers?"lightUboDeclaration":"lightFragmentDeclaration",i,{replaceStrings:[{search:/{X}/g,replace:this._lightId.toString()}]},this._lightId.toString())):(e._emitFunctionFromInclude(e.supportUniformBuffers?"lightUboDeclaration":"lightFragmentDeclaration",i,{repeatKey:"maxSimultaneousLights"}),this._lightId=0,e.sharedData.dynamicUniformBlocks.push(this));var o="v_"+n.associatedVariableName;e._emitVaryingFromString(o,"vec4")&&(e.compilationString+=o+" = "+n.associatedVariableName+`;\r +`),this.light?e.compilationString+=e._emitCodeFromInclude("shadowsVertex",i,{replaceStrings:[{search:/{X}/g,replace:this._lightId.toString()},{search:/worldPos/g,replace:n.associatedVariableName}]}):(e.compilationString+="vec4 worldPos = "+n.associatedVariableName+`;\r +`,this.view.isConnected&&(e.compilationString+="mat4 view = "+this.view.associatedVariableName+`;\r +`),e.compilationString+=e._emitCodeFromInclude("shadowsVertex",i,{repeatKey:"maxSimultaneousLights"}))},t.prototype._buildBlock=function(e){if(r.prototype._buildBlock.call(this,e),e.target===Ce.Fragment){e.sharedData.bindableBlocks.push(this),e.sharedData.blocksWithDefines.push(this);var n="//"+this.name,i=this.worldPosition;e._emitFunctionFromInclude("helperFunctions",n),e._emitFunctionFromInclude("lightsFragmentFunctions",n,{replaceStrings:[{search:/vPositionW/g,replace:"v_"+i.associatedVariableName+".xyz"}]}),e._emitFunctionFromInclude("shadowsFragmentFunctions",n,{replaceStrings:[{search:/vPositionW/g,replace:"v_"+i.associatedVariableName+".xyz"}]}),this.light?e._emitFunctionFromInclude(e.supportUniformBuffers?"lightUboDeclaration":"lightFragmentDeclaration",n,{replaceStrings:[{search:/{X}/g,replace:this._lightId.toString()}]},this._lightId.toString()):e._emitFunctionFromInclude(e.supportUniformBuffers?"lightUboDeclaration":"lightFragmentDeclaration",n,{repeatKey:"maxSimultaneousLights"}),this._lightId===0&&(e._registerTempVariable("viewDirectionW")&&(e.compilationString+="vec3 viewDirectionW = normalize("+this.cameraPosition.associatedVariableName+" - v_"+i.associatedVariableName+`.xyz);\r +`),e.compilationString+=`lightingInfo info;\r +`,e.compilationString+=`float shadow = 1.;\r +`,e.compilationString+="float glossiness = "+(this.glossiness.isConnected?this.glossiness.associatedVariableName:"1.0")+" * "+(this.glossPower.isConnected?this.glossPower.associatedVariableName:"1024.0")+`;\r +`,e.compilationString+=`vec3 diffuseBase = vec3(0., 0., 0.);\r +`,e.compilationString+=`vec3 specularBase = vec3(0., 0., 0.);\r +`,e.compilationString+="vec3 normalW = "+this.worldNormal.associatedVariableName+`.xyz;\r +`),this.light?e.compilationString+=e._emitCodeFromInclude("lightFragment",n,{replaceStrings:[{search:/{X}/g,replace:this._lightId.toString()}]}):e.compilationString+=e._emitCodeFromInclude("lightFragment",n,{repeatKey:"maxSimultaneousLights"});var o=this.diffuseOutput,a=this.specularOutput;return e.compilationString+=this._declareOutput(o,e)+" = diffuseBase"+(this.diffuseColor.isConnected?" * "+this.diffuseColor.associatedVariableName:"")+`;\r +`,a.hasEndpoints&&(e.compilationString+=this._declareOutput(a,e)+" = specularBase"+(this.specularColor.isConnected?" * "+this.specularColor.associatedVariableName:"")+`;\r +`),this.shadow.hasEndpoints&&(e.compilationString+=this._declareOutput(this.shadow,e)+` = shadow;\r +`),this}this._injectVertexCode(e)},t.prototype.serialize=function(){var e=r.prototype.serialize.call(this);return this.light&&(e.lightId=this.light.id),e},t.prototype._deserialize=function(e,n,i){r.prototype._deserialize.call(this,e,n,i),e.lightId&&(this.light=n.getLightByID(e.lightId))},t}(pt);C.a.RegisteredTypes["BABYLON.LightBlock"]=Rh;var Oh=function(r){function t(e,n){n===void 0&&(n=!1);var i=r.call(this,e,n?Ce.Fragment:Ce.VertexAndFragment)||this;return i.convertToGammaSpace=!1,i.convertToLinearSpace=!1,i._fragmentOnly=n,i.registerInput("uv",le.Vector2,!1,Ce.VertexAndFragment),i.registerOutput("rgba",le.Color4,Ce.Neutral),i.registerOutput("rgb",le.Color3,Ce.Neutral),i.registerOutput("r",le.Float,Ce.Neutral),i.registerOutput("g",le.Float,Ce.Neutral),i.registerOutput("b",le.Float,Ce.Neutral),i.registerOutput("a",le.Float,Ce.Neutral),i._inputs[0].acceptedConnectionPointTypes.push(le.Vector3),i._inputs[0].acceptedConnectionPointTypes.push(le.Vector4),i._inputs[0]._prioritizeVertex=!n,i}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"TextureBlock"},Object.defineProperty(t.prototype,"uv",{get:function(){return this._inputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rgba",{get:function(){return this._outputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rgb",{get:function(){return this._outputs[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"r",{get:function(){return this._outputs[2]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"g",{get:function(){return this._outputs[3]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"b",{get:function(){return this._outputs[4]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"a",{get:function(){return this._outputs[5]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"target",{get:function(){if(this._fragmentOnly)return Ce.Fragment;if(!this.uv.isConnected||this.uv.sourceBlock.isInput)return Ce.VertexAndFragment;for(var e=this.uv.connectedPoint;e;){if(e.target===Ce.Fragment)return Ce.Fragment;if(e.target===Ce.Vertex)return Ce.VertexAndFragment;if(e.target===Ce.Neutral||e.target===Ce.VertexAndFragment){var n=e.ownerBlock;e=null;for(var i=0,o=n.inputs;i1?i.setValue("NUM_SAMPLES",this.realTimeFilteringQuality+"u",!0):i.setValue("NUM_SAMPLES",""+this.realTimeFilteringQuality,!0),i.setValue("BRDF_V_HEIGHT_CORRELATED",!0),i.setValue("MS_BRDF_ENERGY_CONSERVATION",this.useEnergyConservation,!0),i.setValue("RADIANCEOCCLUSION",this.useRadianceOcclusion,!0),i.setValue("HORIZONOCCLUSION",this.useHorizonOcclusion,!0),i.setValue("UNLIT",this.unlit,!0),i.setValue("FORCENORMALFORWARD",this.forceNormalForward,!0),this._environmentBRDFTexture&&ut.a.ReflectionTextureEnabled?(i.setValue("ENVIRONMENTBRDF",!0),i.setValue("ENVIRONMENTBRDF_RGBD",this._environmentBRDFTexture.isRGBD,!0)):(i.setValue("ENVIRONMENTBRDF",!1),i.setValue("ENVIRONMENTBRDF_RGBD",!1)),i._areLightsDirty){var a=e.getScene();if(this.light){var s={needNormals:!1,needRebuild:!1,lightmapMode:!1,shadowEnabled:!1,specularEnabled:!1};et.a.PrepareDefinesForLight(a,e,this.light,this._lightId,i,!0,s),s.needRebuild&&i.rebuild()}else et.a.PrepareDefinesForLights(a,e,i,!0,n.maxSimultaneousLights),i._needNormals=!0,et.a.PrepareDefinesForMultiview(a,i)}},t.prototype.updateUniformsAndSamples=function(e,n,i,o){for(var a=0;a=0;et.a.PrepareUniformsAndSamplersForLight(a,e.uniforms,e.samplers,i["PROJECTEDLIGHTTEXTURE"+a],o,s)}},t.prototype.bind=function(e,n,i){var o,a;if(i){var s=i.getScene();this.light?et.a.BindLight(this.light,this._lightId,s,e,!0):et.a.BindLights(s,i,e,!0,n.maxSimultaneousLights),e.setTexture(this._environmentBrdfSamplerName,this._environmentBRDFTexture),e.setFloat2("vDebugMode",this.debugLimit,this.debugFactor);var d=this._scene.ambientColor;d&&e.setColor3("ambientFromScene",d);var p=s.useRightHandedSystem===(s._mirroredCameraPosition!=null);e.setFloat(this._invertNormalName,p?-1:1),e.setFloat4("vLightingIntensity",this.directIntensity,1,this.environmentIntensity*this._scene.environmentIntensity,this.specularIntensity);var b=(a=(o=this.indexOfRefraction.connectInputBlock)===null||o===void 0?void 0:o.value)!==null&&a!==void 0?a:1.5,x=Math.pow((b-1)/(b+1),2);this._metallicReflectanceColor.scaleToRef(x*this._metallicF0Factor,M.c.Color3[0]);var O=this._metallicF0Factor;e.setColor4(this._vMetallicReflectanceFactorsName,M.c.Color3[0],O)}},t.prototype._injectVertexCode=function(e){var n,i,o=this.worldPosition,a="//"+this.name;this.light?(this._lightId=(e.counters.lightCounter!==void 0?e.counters.lightCounter:-1)+1,e.counters.lightCounter=this._lightId,e._emitFunctionFromInclude(e.supportUniformBuffers?"lightUboDeclaration":"lightFragmentDeclaration",a,{replaceStrings:[{search:/{X}/g,replace:this._lightId.toString()}]},this._lightId.toString())):(e._emitFunctionFromInclude(e.supportUniformBuffers?"lightUboDeclaration":"lightFragmentDeclaration",a,{repeatKey:"maxSimultaneousLights"}),this._lightId=0,e.sharedData.dynamicUniformBlocks.push(this));var s="v_"+o.associatedVariableName;e._emitVaryingFromString(s,"vec4")&&(e.compilationString+=s+" = "+o.associatedVariableName+`;\r +`);var d=this.reflection.isConnected?(n=this.reflection.connectedPoint)===null||n===void 0?void 0:n.ownerBlock:null;d&&(d.viewConnectionPoint=this.view),e.compilationString+=(i=d?.handleVertexSide(e))!==null&&i!==void 0?i:"",e._emitUniformFromString("vDebugMode","vec2","defined(IGNORE) || DEBUGMODE > 0"),e._emitUniformFromString("ambientFromScene","vec3"),e._emitVaryingFromString("vClipSpacePosition","vec4","defined(IGNORE) || DEBUGMODE > 0")&&(e._injectAtEnd+=`#if DEBUGMODE > 0\r +`,e._injectAtEnd+=`vClipSpacePosition = gl_Position;\r +`,e._injectAtEnd+=`#endif\r +`),this.light?e.compilationString+=e._emitCodeFromInclude("shadowsVertex",a,{replaceStrings:[{search:/{X}/g,replace:this._lightId.toString()},{search:/worldPos/g,replace:o.associatedVariableName}]}):(e.compilationString+="vec4 worldPos = "+o.associatedVariableName+`;\r +`,this.view.isConnected&&(e.compilationString+="mat4 view = "+this.view.associatedVariableName+`;\r +`),e.compilationString+=e._emitCodeFromInclude("shadowsVertex",a,{repeatKey:"maxSimultaneousLights"}))},t.prototype._getAlbedoOpacityCode=function(){var e=`albedoOpacityOutParams albedoOpacityOut;\r +`;return e+=`albedoOpacityBlock( + vec4(`+(this.baseColor.isConnected?this.baseColor.associatedVariableName:"vec3(1.)")+`, 1.), + #ifdef ALBEDO + vec4(1.), + vec2(1., 1.), + #endif + #ifdef OPACITY + vec4(`+(this.opacity.isConnected?this.opacity.associatedVariableName:"1.")+`), + vec2(1., 1.), + #endif + albedoOpacityOut + ); + + vec3 surfaceAlbedo = albedoOpacityOut.surfaceAlbedo; + float alpha = albedoOpacityOut.alpha;\r +`},t.prototype._getAmbientOcclusionCode=function(){var e=`ambientOcclusionOutParams aoOut;\r +`;return e+=`ambientOcclusionBlock( + #ifdef AMBIENT + vec3(`+(this.ambientOcc.isConnected?this.ambientOcc.associatedVariableName:"1.")+`), + vec4(0., 1.0, 1.0, 0.), + #endif + aoOut + );\r +`},t.prototype._getReflectivityCode=function(e){var n=`reflectivityOutParams reflectivityOut;\r +`;return this._vMetallicReflectanceFactorsName=e._getFreeVariableName("vMetallicReflectanceFactors"),e._emitUniformFromString(this._vMetallicReflectanceFactorsName,"vec4"),n+=`vec3 baseColor = surfaceAlbedo; + + reflectivityBlock( + vec4(`+this.metallic.associatedVariableName+", "+this.roughness.associatedVariableName+`, 0., 0.), + #ifdef METALLICWORKFLOW + surfaceAlbedo, + `+this._vMetallicReflectanceFactorsName+`, + #endif + #ifdef REFLECTIVITY + vec3(0., 0., 1.), + vec4(1.), + #endif + #if defined(METALLICWORKFLOW) && defined(REFLECTIVITY) && defined(AOSTOREINMETALMAPRED) + aoOut.ambientOcclusionColor, + #endif + #ifdef MICROSURFACEMAP + microSurfaceTexel, <== not handled! + #endif + reflectivityOut + ); + + float microSurface = reflectivityOut.microSurface; + float roughness = reflectivityOut.roughness; + + #ifdef METALLICWORKFLOW + surfaceAlbedo = reflectivityOut.surfaceAlbedo; + #endif + #if defined(METALLICWORKFLOW) && defined(REFLECTIVITY) && defined(AOSTOREINMETALMAPRED) + aoOut.ambientOcclusionColor = reflectivityOut.ambientOcclusionColor; + #endif\r +`},t.prototype._buildBlock=function(e){var n,i,o,a,s,d,p,b,x,O,B,F,z,J,ie,se,ce,ue,fe,ve,Te,Re,Ae,Ee,Se,Le,xe,Ne,Me,Fe,Ye,tt,it,lt,Ke,ot,rt,qe,ht;r.prototype._buildBlock.call(this,e),this._scene=e.sharedData.scene,this._environmentBRDFTexture||(this._environmentBRDFTexture=ta.GetEnvironmentBRDFTexture(this._scene));var Ve=this.reflection.isConnected?(n=this.reflection.connectedPoint)===null||n===void 0?void 0:n.ownerBlock:null;if(Ve&&(Ve.worldPositionConnectionPoint=this.worldPosition,Ve.cameraPositionConnectionPoint=this.cameraPosition,Ve.worldNormalConnectionPoint=this.worldNormal),e.target!==Ce.Fragment)return this._injectVertexCode(e),this;e.sharedData.bindableBlocks.push(this),e.sharedData.blocksWithDefines.push(this);var Je="//"+this.name,yt="v_"+this.worldPosition.associatedVariableName,Wt=this.perturbedNormal;this._environmentBrdfSamplerName=e._getFreeVariableName("environmentBrdfSampler"),e._emit2DSampler(this._environmentBrdfSamplerName),e.sharedData.hints.needAlphaBlending=e.sharedData.hints.needAlphaBlending||this.useAlphaBlending,e.sharedData.hints.needAlphaTesting=e.sharedData.hints.needAlphaTesting||this.useAlphaTest,e._emitExtension("lod","#extension GL_EXT_shader_texture_lod : enable","defined(LODBASEDMICROSFURACE)"),e._emitExtension("derivatives","#extension GL_OES_standard_derivatives : enable"),this.light?e._emitFunctionFromInclude(e.supportUniformBuffers?"lightUboDeclaration":"lightFragmentDeclaration",Je,{replaceStrings:[{search:/{X}/g,replace:this._lightId.toString()}]},this._lightId.toString()):e._emitFunctionFromInclude(e.supportUniformBuffers?"lightUboDeclaration":"lightFragmentDeclaration",Je,{repeatKey:"maxSimultaneousLights"}),e._emitFunctionFromInclude("helperFunctions",Je),e._emitFunctionFromInclude("importanceSampling",Je),e._emitFunctionFromInclude("pbrHelperFunctions",Je),e._emitFunctionFromInclude("imageProcessingFunctions",Je),e._emitFunctionFromInclude("shadowsFragmentFunctions",Je,{replaceStrings:[{search:/vPositionW/g,replace:yt+".xyz"}]}),e._emitFunctionFromInclude("pbrDirectLightingSetupFunctions",Je,{replaceStrings:[{search:/vPositionW/g,replace:yt+".xyz"}]}),e._emitFunctionFromInclude("pbrDirectLightingFalloffFunctions",Je),e._emitFunctionFromInclude("pbrBRDFFunctions",Je,{replaceStrings:[{search:/REFLECTIONMAP_SKYBOX/g,replace:(i=Ve?._defineSkyboxName)!==null&&i!==void 0?i:"REFLECTIONMAP_SKYBOX"}]}),e._emitFunctionFromInclude("hdrFilteringFunctions",Je),e._emitFunctionFromInclude("pbrDirectLightingFunctions",Je,{replaceStrings:[{search:/vPositionW/g,replace:yt+".xyz"}]}),e._emitFunctionFromInclude("pbrIBLFunctions",Je),e._emitFunctionFromInclude("pbrBlockAlbedoOpacity",Je),e._emitFunctionFromInclude("pbrBlockReflectivity",Je),e._emitFunctionFromInclude("pbrBlockAmbientOcclusion",Je),e._emitFunctionFromInclude("pbrBlockAlphaFresnel",Je),e._emitFunctionFromInclude("pbrBlockAnisotropic",Je),e._emitUniformFromString("vLightingIntensity","vec4"),this._vNormalWName=e._getFreeVariableName("vNormalW"),e.compilationString+="vec4 "+this._vNormalWName+" = normalize("+this.worldNormal.associatedVariableName+`);\r +`,e._registerTempVariable("viewDirectionW")&&(e.compilationString+="vec3 viewDirectionW = normalize("+this.cameraPosition.associatedVariableName+" - "+yt+`.xyz);\r +`),e.compilationString+="vec3 geometricNormalW = "+this._vNormalWName+`.xyz;\r +`,e.compilationString+="vec3 normalW = "+(Wt.isConnected?"normalize("+Wt.associatedVariableName+".xyz)":"geometricNormalW")+`;\r +`,this._invertNormalName=e._getFreeVariableName("invertNormal"),e._emitUniformFromString(this._invertNormalName,"float"),e.compilationString+=e._emitCodeFromInclude("pbrBlockNormalFinal",Je,{replaceStrings:[{search:/vPositionW/g,replace:yt+".xyz"},{search:/vEyePosition.w/g,replace:this._invertNormalName}]}),e.compilationString+=this._getAlbedoOpacityCode(),e.compilationString+=e._emitCodeFromInclude("depthPrePass",Je),e.compilationString+=this._getAmbientOcclusionCode(),e.compilationString+=e._emitCodeFromInclude("pbrBlockLightmapInit",Je),e.compilationString+=`#ifdef UNLIT + vec3 diffuseBase = vec3(1., 1., 1.); + #else\r +`,e.compilationString+=this._getReflectivityCode(e),e.compilationString+=e._emitCodeFromInclude("pbrBlockGeometryInfo",Je,{replaceStrings:[{search:/REFLECTIONMAP_SKYBOX/g,replace:(o=Ve?._defineSkyboxName)!==null&&o!==void 0?o:"REFLECTIONMAP_SKYBOX"},{search:/REFLECTIONMAP_3D/g,replace:(a=Ve?._define3DName)!==null&&a!==void 0?a:"REFLECTIONMAP_3D"}]});var Nt=this.anisotropy.isConnected?(s=this.anisotropy.connectedPoint)===null||s===void 0?void 0:s.ownerBlock:null;Nt&&(Nt.worldPositionConnectionPoint=this.worldPosition,Nt.worldNormalConnectionPoint=this.worldNormal,e.compilationString+=Nt.getCode(e,!this.perturbedNormal.isConnected)),Ve&&Ve.hasTexture&&(e.compilationString+=Ve.getCode(e,Nt?"anisotropicOut.anisotropicNormal":"normalW")),e._emitFunctionFromInclude("pbrBlockReflection",Je,{replaceStrings:[{search:/computeReflectionCoords/g,replace:"computeReflectionCoordsPBR"},{search:/REFLECTIONMAP_3D/g,replace:(d=Ve?._define3DName)!==null&&d!==void 0?d:"REFLECTIONMAP_3D"},{search:/REFLECTIONMAP_OPPOSITEZ/g,replace:(p=Ve?._defineOppositeZ)!==null&&p!==void 0?p:"REFLECTIONMAP_OPPOSITEZ"},{search:/REFLECTIONMAP_PROJECTION/g,replace:(b=Ve?._defineProjectionName)!==null&&b!==void 0?b:"REFLECTIONMAP_PROJECTION"},{search:/REFLECTIONMAP_SKYBOX/g,replace:(x=Ve?._defineSkyboxName)!==null&&x!==void 0?x:"REFLECTIONMAP_SKYBOX"},{search:/LODINREFLECTIONALPHA/g,replace:(O=Ve?._defineLODReflectionAlpha)!==null&&O!==void 0?O:"LODINREFLECTIONALPHA"},{search:/LINEARSPECULARREFLECTION/g,replace:(B=Ve?._defineLinearSpecularReflection)!==null&&B!==void 0?B:"LINEARSPECULARREFLECTION"},{search:/vReflectionFilteringInfo/g,replace:(F=Ve?._vReflectionFilteringInfoName)!==null&&F!==void 0?F:"vReflectionFilteringInfo"}]}),e.compilationString+=e._emitCodeFromInclude("pbrBlockReflectance0",Je,{replaceStrings:[{search:/metallicReflectanceFactors/g,replace:this._vMetallicReflectanceFactorsName}]});var Qt=this.sheen.isConnected?(z=this.sheen.connectedPoint)===null||z===void 0?void 0:z.ownerBlock:null;Qt&&(e.compilationString+=Qt.getCode(Ve)),e._emitFunctionFromInclude("pbrBlockSheen",Je,{replaceStrings:[{search:/REFLECTIONMAP_3D/g,replace:(J=Ve?._define3DName)!==null&&J!==void 0?J:"REFLECTIONMAP_3D"},{search:/REFLECTIONMAP_SKYBOX/g,replace:(ie=Ve?._defineSkyboxName)!==null&&ie!==void 0?ie:"REFLECTIONMAP_SKYBOX"},{search:/LODINREFLECTIONALPHA/g,replace:(se=Ve?._defineLODReflectionAlpha)!==null&&se!==void 0?se:"LODINREFLECTIONALPHA"},{search:/LINEARSPECULARREFLECTION/g,replace:(ce=Ve?._defineLinearSpecularReflection)!==null&&ce!==void 0?ce:"LINEARSPECULARREFLECTION"}]});var vt=this.clearcoat.isConnected?(ue=this.clearcoat.connectedPoint)===null||ue===void 0?void 0:ue.ownerBlock:null,Jt=!this.perturbedNormal.isConnected&&!this.anisotropy.isConnected,Xt=this.perturbedNormal.isConnected&&((fe=this.perturbedNormal.connectedPoint)===null||fe===void 0?void 0:fe.ownerBlock).worldTangent.isConnected,zt=this.anisotropy.isConnected&&((ve=this.anisotropy.connectedPoint)===null||ve===void 0?void 0:ve.ownerBlock).worldTangent.isConnected,Yt=Xt||!this.perturbedNormal.isConnected&&zt;e.compilationString+=ya.GetCode(e,vt,Ve,yt,Jt,Yt,this.worldNormal.associatedVariableName),Jt&&(Yt=(Te=vt?.worldTangent.isConnected)!==null&&Te!==void 0&&Te),e._emitFunctionFromInclude("pbrBlockClearcoat",Je,{replaceStrings:[{search:/computeReflectionCoords/g,replace:"computeReflectionCoordsPBR"},{search:/REFLECTIONMAP_3D/g,replace:(Re=Ve?._define3DName)!==null&&Re!==void 0?Re:"REFLECTIONMAP_3D"},{search:/REFLECTIONMAP_OPPOSITEZ/g,replace:(Ae=Ve?._defineOppositeZ)!==null&&Ae!==void 0?Ae:"REFLECTIONMAP_OPPOSITEZ"},{search:/REFLECTIONMAP_PROJECTION/g,replace:(Ee=Ve?._defineProjectionName)!==null&&Ee!==void 0?Ee:"REFLECTIONMAP_PROJECTION"},{search:/REFLECTIONMAP_SKYBOX/g,replace:(Se=Ve?._defineSkyboxName)!==null&&Se!==void 0?Se:"REFLECTIONMAP_SKYBOX"},{search:/LODINREFLECTIONALPHA/g,replace:(Le=Ve?._defineLODReflectionAlpha)!==null&&Le!==void 0?Le:"LODINREFLECTIONALPHA"},{search:/LINEARSPECULARREFLECTION/g,replace:(xe=Ve?._defineLinearSpecularReflection)!==null&&xe!==void 0?xe:"LINEARSPECULARREFLECTION"},{search:/defined\(TANGENT\)/g,replace:Yt?"defined(TANGENT)":"defined(IGNORE)"}]}),e.compilationString+=e._emitCodeFromInclude("pbrBlockReflectance",Je,{replaceStrings:[{search:/REFLECTIONMAP_SKYBOX/g,replace:(Ne=Ve?._defineSkyboxName)!==null&&Ne!==void 0?Ne:"REFLECTIONMAP_SKYBOX"},{search:/REFLECTIONMAP_3D/g,replace:(Me=Ve?._define3DName)!==null&&Me!==void 0?Me:"REFLECTIONMAP_3D"}]});var Et=this.subsurface.isConnected?(Fe=this.subsurface.connectedPoint)===null||Fe===void 0?void 0:Fe.ownerBlock:null,Mt=this.subsurface.isConnected?(tt=((Ye=this.subsurface.connectedPoint)===null||Ye===void 0?void 0:Ye.ownerBlock).refraction.connectedPoint)===null||tt===void 0?void 0:tt.ownerBlock:null;Mt&&(Mt.viewConnectionPoint=this.view,Mt.indexOfRefractionConnectionPoint=this.indexOfRefraction),e.compilationString+=Ta.GetCode(e,Et,Ve,yt),e._emitFunctionFromInclude("pbrBlockSubSurface",Je,{replaceStrings:[{search:/REFLECTIONMAP_3D/g,replace:(it=Ve?._define3DName)!==null&&it!==void 0?it:"REFLECTIONMAP_3D"},{search:/REFLECTIONMAP_OPPOSITEZ/g,replace:(lt=Ve?._defineOppositeZ)!==null&<!==void 0?lt:"REFLECTIONMAP_OPPOSITEZ"},{search:/REFLECTIONMAP_PROJECTION/g,replace:(Ke=Ve?._defineProjectionName)!==null&&Ke!==void 0?Ke:"REFLECTIONMAP_PROJECTION"},{search:/SS_REFRACTIONMAP_3D/g,replace:(ot=Mt?._define3DName)!==null&&ot!==void 0?ot:"SS_REFRACTIONMAP_3D"},{search:/SS_LODINREFRACTIONALPHA/g,replace:(rt=Mt?._defineLODRefractionAlpha)!==null&&rt!==void 0?rt:"SS_LODINREFRACTIONALPHA"},{search:/SS_LINEARSPECULARREFRACTION/g,replace:(qe=Mt?._defineLinearSpecularRefraction)!==null&&qe!==void 0?qe:"SS_LINEARSPECULARREFRACTION"},{search:/SS_REFRACTIONMAP_OPPOSITEZ/g,replace:(ht=Mt?._defineOppositeZ)!==null&&ht!==void 0?ht:"SS_REFRACTIONMAP_OPPOSITEZ"}]}),e.compilationString+=e._emitCodeFromInclude("pbrBlockDirectLighting",Je),this.light?e.compilationString+=e._emitCodeFromInclude("lightFragment",Je,{replaceStrings:[{search:/{X}/g,replace:this._lightId.toString()}]}):e.compilationString+=e._emitCodeFromInclude("lightFragment",Je,{repeatKey:"maxSimultaneousLights"}),e.compilationString+=e._emitCodeFromInclude("pbrBlockFinalLitComponents",Je),e.compilationString+=`#endif\r +`;var $t=this.ambientColor.isConnected?this.ambientColor.associatedVariableName:"vec3(0., 0., 0.)",Dn=pn.DEFAULT_AO_ON_ANALYTICAL_LIGHTS.toString();Dn.indexOf(".")===-1&&(Dn+="."),e.compilationString+=e._emitCodeFromInclude("pbrBlockFinalUnlitComponents",Je,{replaceStrings:[{search:/vec3 finalEmissive[\s\S]*?finalEmissive\*=vLightingIntensity\.y;/g,replace:""},{search:/vAmbientColor/g,replace:$t+" * ambientFromScene"},{search:/vAmbientInfos\.w/g,replace:Dn}]}),e.compilationString+=e._emitCodeFromInclude("pbrBlockFinalColorComposition",Je,{replaceStrings:[{search:/finalEmissive/g,replace:"vec3(0.)"}]}),e.compilationString+=e._emitCodeFromInclude("pbrBlockImageProcessing",Je,{replaceStrings:[{search:/visibility/g,replace:"1."}]}),e.compilationString+=e._emitCodeFromInclude("pbrDebug",Je,{replaceStrings:[{search:/vNormalW/g,replace:this._vNormalWName},{search:/vPositionW/g,replace:yt},{search:/albedoTexture\.rgb;/g,replace:`vec3(1.);\r +gl_FragColor.rgb = toGammaSpace(gl_FragColor.rgb);\r +`}]});for(var Gn=0,$n=this._outputs;Gn<$n.length;Gn++){var Ln=$n[Gn];if(Ln.hasEndpoints){var qt=um[Ln.name];if(qt){var ui=qt[0],xi=qt[1];xi&&(e.compilationString+="#if "+xi+`\r +`),e.compilationString+=this._declareOutput(Ln,e)+" = "+ui+`;\r +`,xi&&(e.compilationString+=`#else\r +`,e.compilationString+=this._declareOutput(Ln,e)+` = vec3(0.);\r +`,e.compilationString+=`#endif\r +`)}else console.error("There's no remapping for the "+Ln.name+" end point! No code generated")}}return this},t.prototype._dumpPropertiesCode=function(){var e="";return e+=this._codeVariableName+".lightFalloff = "+this.lightFalloff+`;\r +`,e+=this._codeVariableName+".useAlphaTest = "+this.useAlphaTest+`;\r +`,e+=this._codeVariableName+".alphaTestCutoff = "+this.alphaTestCutoff+`;\r +`,e+=this._codeVariableName+".useAlphaBlending = "+this.useAlphaBlending+`;\r +`,e+=this._codeVariableName+".useRadianceOverAlpha = "+this.useRadianceOverAlpha+`;\r +`,e+=this._codeVariableName+".useSpecularOverAlpha = "+this.useSpecularOverAlpha+`;\r +`,e+=this._codeVariableName+".enableSpecularAntiAliasing = "+this.enableSpecularAntiAliasing+`;\r +`,e+=this._codeVariableName+".realTimeFiltering = "+this.realTimeFiltering+`;\r +`,e+=this._codeVariableName+".realTimeFilteringQuality = "+this.realTimeFilteringQuality+`;\r +`,e+=this._codeVariableName+".useEnergyConservation = "+this.useEnergyConservation+`;\r +`,e+=this._codeVariableName+".useRadianceOcclusion = "+this.useRadianceOcclusion+`;\r +`,e+=this._codeVariableName+".useHorizonOcclusion = "+this.useHorizonOcclusion+`;\r +`,e+=this._codeVariableName+".unlit = "+this.unlit+`;\r +`,e+=this._codeVariableName+".forceNormalForward = "+this.forceNormalForward+`;\r +`,e+=this._codeVariableName+".debugMode = "+this.debugMode+`;\r +`,e+=this._codeVariableName+".debugLimit = "+this.debugLimit+`;\r +`,e+=this._codeVariableName+".debugFactor = "+this.debugFactor+`;\r +`},t.prototype.serialize=function(){var e=r.prototype.serialize.call(this);return this.light&&(e.lightId=this.light.id),e.lightFalloff=this.lightFalloff,e.useAlphaTest=this.useAlphaTest,e.alphaTestCutoff=this.alphaTestCutoff,e.useAlphaBlending=this.useAlphaBlending,e.useRadianceOverAlpha=this.useRadianceOverAlpha,e.useSpecularOverAlpha=this.useSpecularOverAlpha,e.enableSpecularAntiAliasing=this.enableSpecularAntiAliasing,e.realTimeFiltering=this.realTimeFiltering,e.realTimeFilteringQuality=this.realTimeFilteringQuality,e.useEnergyConservation=this.useEnergyConservation,e.useRadianceOcclusion=this.useRadianceOcclusion,e.useHorizonOcclusion=this.useHorizonOcclusion,e.unlit=this.unlit,e.forceNormalForward=this.forceNormalForward,e.debugMode=this.debugMode,e.debugLimit=this.debugLimit,e.debugFactor=this.debugFactor,e},t.prototype._deserialize=function(e,n,i){var o,a;r.prototype._deserialize.call(this,e,n,i),e.lightId&&(this.light=n.getLightByID(e.lightId)),this.lightFalloff=(o=e.lightFalloff)!==null&&o!==void 0?o:0,this.useAlphaTest=e.useAlphaTest,this.alphaTestCutoff=e.alphaTestCutoff,this.useAlphaBlending=e.useAlphaBlending,this.useRadianceOverAlpha=e.useRadianceOverAlpha,this.useSpecularOverAlpha=e.useSpecularOverAlpha,this.enableSpecularAntiAliasing=e.enableSpecularAntiAliasing,this.realTimeFiltering=!!e.realTimeFiltering,this.realTimeFilteringQuality=(a=e.realTimeFilteringQuality)!==null&&a!==void 0?a:h.a.TEXTURE_FILTERING_QUALITY_LOW,this.useEnergyConservation=e.useEnergyConservation,this.useRadianceOcclusion=e.useRadianceOcclusion,this.useHorizonOcclusion=e.useHorizonOcclusion,this.unlit=e.unlit,this.forceNormalForward=!!e.forceNormalForward,this.debugMode=e.debugMode,this.debugLimit=e.debugLimit,this.debugFactor=e.debugFactor},Object(c.c)([Vt("Direct lights",Lt.Float,"INTENSITY",{min:0,max:1,notifiers:{update:!0}})],t.prototype,"directIntensity",void 0),Object(c.c)([Vt("Environment lights",Lt.Float,"INTENSITY",{min:0,max:1,notifiers:{update:!0}})],t.prototype,"environmentIntensity",void 0),Object(c.c)([Vt("Specular highlights",Lt.Float,"INTENSITY",{min:0,max:1,notifiers:{update:!0}})],t.prototype,"specularIntensity",void 0),Object(c.c)([Vt("Light falloff",Lt.List,"LIGHTING & COLORS",{notifiers:{update:!0},options:[{label:"Physical",value:pn.LIGHTFALLOFF_PHYSICAL},{label:"GLTF",value:pn.LIGHTFALLOFF_GLTF},{label:"Standard",value:pn.LIGHTFALLOFF_STANDARD}]})],t.prototype,"lightFalloff",void 0),Object(c.c)([Vt("Alpha Testing",Lt.Boolean,"OPACITY")],t.prototype,"useAlphaTest",void 0),Object(c.c)([Vt("Alpha CutOff",Lt.Float,"OPACITY",{min:0,max:1,notifiers:{update:!0}})],t.prototype,"alphaTestCutoff",void 0),Object(c.c)([Vt("Alpha blending",Lt.Boolean,"OPACITY")],t.prototype,"useAlphaBlending",void 0),Object(c.c)([Vt("Radiance over alpha",Lt.Boolean,"RENDERING",{notifiers:{update:!0}})],t.prototype,"useRadianceOverAlpha",void 0),Object(c.c)([Vt("Specular over alpha",Lt.Boolean,"RENDERING",{notifiers:{update:!0}})],t.prototype,"useSpecularOverAlpha",void 0),Object(c.c)([Vt("Specular anti-aliasing",Lt.Boolean,"RENDERING",{notifiers:{update:!0}})],t.prototype,"enableSpecularAntiAliasing",void 0),Object(c.c)([Vt("Realtime filtering",Lt.Boolean,"RENDERING",{notifiers:{update:!0}})],t.prototype,"realTimeFiltering",void 0),Object(c.c)([Vt("Realtime filtering quality",Lt.List,"RENDERING",{notifiers:{update:!0},options:[{label:"Low",value:h.a.TEXTURE_FILTERING_QUALITY_LOW},{label:"Medium",value:h.a.TEXTURE_FILTERING_QUALITY_MEDIUM},{label:"High",value:h.a.TEXTURE_FILTERING_QUALITY_HIGH}]})],t.prototype,"realTimeFilteringQuality",void 0),Object(c.c)([Vt("Energy Conservation",Lt.Boolean,"ADVANCED",{notifiers:{update:!0}})],t.prototype,"useEnergyConservation",void 0),Object(c.c)([Vt("Radiance occlusion",Lt.Boolean,"ADVANCED",{notifiers:{update:!0}})],t.prototype,"useRadianceOcclusion",void 0),Object(c.c)([Vt("Horizon occlusion",Lt.Boolean,"ADVANCED",{notifiers:{update:!0}})],t.prototype,"useHorizonOcclusion",void 0),Object(c.c)([Vt("Unlit",Lt.Boolean,"ADVANCED",{notifiers:{update:!0}})],t.prototype,"unlit",void 0),Object(c.c)([Vt("Force normal forward",Lt.Boolean,"ADVANCED",{notifiers:{update:!0}})],t.prototype,"forceNormalForward",void 0),Object(c.c)([Vt("Debug mode",Lt.List,"DEBUG",{notifiers:{update:!0},options:[{label:"None",value:0},{label:"Normalized position",value:1},{label:"Normals",value:2},{label:"Tangents",value:3},{label:"Bitangents",value:4},{label:"Bump Normals",value:5},{label:"ClearCoat Normals",value:8},{label:"ClearCoat Tangents",value:9},{label:"ClearCoat Bitangents",value:10},{label:"Anisotropic Normals",value:11},{label:"Anisotropic Tangents",value:12},{label:"Anisotropic Bitangents",value:13},{label:"Env Refraction",value:40},{label:"Env Reflection",value:41},{label:"Env Clear Coat",value:42},{label:"Direct Diffuse",value:50},{label:"Direct Specular",value:51},{label:"Direct Clear Coat",value:52},{label:"Direct Sheen",value:53},{label:"Env Irradiance",value:54},{label:"Surface Albedo",value:60},{label:"Reflectance 0",value:61},{label:"Metallic",value:62},{label:"Metallic F0",value:71},{label:"Roughness",value:63},{label:"AlphaG",value:64},{label:"NdotV",value:65},{label:"ClearCoat Color",value:66},{label:"ClearCoat Roughness",value:67},{label:"ClearCoat NdotV",value:68},{label:"Transmittance",value:69},{label:"Refraction Transmittance",value:70},{label:"SEO",value:80},{label:"EHO",value:81},{label:"Energy Factor",value:82},{label:"Specular Reflectance",value:83},{label:"Clear Coat Reflectance",value:84},{label:"Sheen Reflectance",value:85},{label:"Luminance Over Alpha",value:86},{label:"Alpha",value:87}]})],t.prototype,"debugMode",void 0),Object(c.c)([Vt("Split position",Lt.Float,"DEBUG",{min:-1,max:1,notifiers:{update:!0}})],t.prototype,"debugLimit",void 0),Object(c.c)([Vt("Output factor",Lt.Float,"DEBUG",{min:0,max:5,notifiers:{update:!0}})],t.prototype,"debugFactor",void 0),t}(pt);C.a.RegisteredTypes["BABYLON.PBRMetallicRoughnessBlock"]=dd;var fd=function(r){function t(e){var n=r.call(this,e,Ce.Neutral)||this;return n.registerInput("left",le.AutoDetect),n.registerInput("right",le.AutoDetect),n.registerOutput("output",le.BasedOnInput),n._outputs[0]._typeConnectionSource=n._inputs[0],n._linkConnectionTypes(0,1),n}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"ModBlock"},Object.defineProperty(t.prototype,"left",{get:function(){return this._inputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this._inputs[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"output",{get:function(){return this._outputs[0]},enumerable:!1,configurable:!0}),t.prototype._buildBlock=function(e){r.prototype._buildBlock.call(this,e);var n=this._outputs[0];return e.compilationString+=this._declareOutput(n,e)+" = mod("+this.left.associatedVariableName+", "+this.right.associatedVariableName+`);\r +`,this},t}(pt);C.a.RegisteredTypes["BABYLON.ModBlock"]=fd;var hm=function(){function r(){}return r.prototype.optimize=function(t,e){},r}(),dm=f(120),fm=function(){function r(){this.mm=new Map}return r.prototype.get=function(t,e){var n=this.mm.get(t);if(n!==void 0)return n.get(e)},r.prototype.set=function(t,e,n){var i=this.mm.get(t);i===void 0&&this.mm.set(t,i=new Map),i.set(e,n)},r}(),pm=function(){function r(t,e,n){var i=this;this._baseMaterial=t,this._scene=e,this._options=n,this._subMeshToEffect=new Map,this._subMeshToDepthEffect=new fm,this._meshes=new Map;var o=t.getClassName()==="NodeMaterial"?"u_":"";if(o){this._matriceNames={world:o+"World",view:o+"View",projection:o+"Projection",viewProjection:o+"ViewProjection",worldView:o+"WorldxView",worldViewProjection:o+"WorldxViewxProjection"};for(var a=t.getInputBlocks(),s=0;s("+this._options.remappedVariables.join(",")+")":ze.a.IncludesShadersStore.shadowMapVertexNormalBias,x=this._options&&this._options.remappedVariables?"#include("+this._options.remappedVariables.join(",")+")":ze.a.IncludesShadersStore.shadowMapVertexMetric,O=this._options&&this._options.remappedVariables?"#include("+this._options.remappedVariables.join(",")+")":ze.a.IncludesShadersStore.shadowMapFragmentSoftTransparentShadow,B=ze.a.IncludesShadersStore.shadowMapFragment;d=(d=(d=(d=d.replace(/void\s+?main/g,ze.a.IncludesShadersStore.shadowMapVertexDeclaration+`\r +void main`)).replace(/#define SHADOWDEPTH_NORMALBIAS|#define CUSTOM_VERTEX_UPDATE_WORLDPOS/g,b)).indexOf("#define SHADOWDEPTH_METRIC")!==-1?d.replace(/#define SHADOWDEPTH_METRIC/g,x):d.replace(/}\s*$/g,x+`\r +}`)).replace(/#define SHADER_NAME.*?\n|out vec4 glFragColor;\n/g,"");var F=p.indexOf("#define SHADOWDEPTH_SOFTTRANSPARENTSHADOW")>=0||p.indexOf("#define CUSTOM_FRAGMENT_BEFORE_FOG")>=0,z=p.indexOf("#define SHADOWDEPTH_FRAGMENT")!==-1,J="";F?p=p.replace(/#define SHADOWDEPTH_SOFTTRANSPARENTSHADOW|#define CUSTOM_FRAGMENT_BEFORE_FOG/g,O):J=O+`\r +`,p=p.replace(/void\s+?main/g,ze.a.IncludesShadersStore.shadowMapFragmentDeclaration+`\r +void main`),z?p=p.replace(/#define SHADOWDEPTH_FRAGMENT/g,B):J+=B+`\r +`,J&&(p=p.replace(/}\s*$/g,J+"}")),p=p.replace(/#define SHADER_NAME.*?\n|out vec4 glFragColor;\n/g,"");var ie=o.getUniformNames().slice();return ie.push("biasAndScaleSM","depthValuesSM","lightDataSM","softTransparentShadowSM"),a.depthEffect=this._scene.getEngine().createEffect({vertexSource:d,fragmentSource:p,vertexToken:a.token,fragmentToken:a.token},{attributes:o.getAttributesNames(),uniformsNames:ie,uniformBuffersNames:o.getUniformBuffersNames(),samplers:o.getSamplers(),defines:s+` +`+o.defines.replace("#define SHADOWS","").replace(/#define SHADOW\d/g,""),indexParameters:o.getIndexParameters()},this._scene.getEngine()),a.depthEffect},r}(),pd=f(101);function bc(r,t,e,n,i){var o=new r.DecoderBuffer;o.Init(t,t.byteLength);var a,s,d=new r.Decoder;try{var p=d.GetEncodedGeometryType(o);switch(p){case r.TRIANGULAR_MESH:a=new r.Mesh,s=d.DecodeBufferToMesh(o,a);break;case r.POINT_CLOUD:a=new r.PointCloud,s=d.DecodeBufferToPointCloud(o,a);break;default:throw new Error("Invalid geometry type "+p)}if(!s.ok()||!a.ptr)throw new Error(s.error_msg());if(p===r.TRIANGULAR_MESH){var b=3*a.num_faces(),x=4*b,O=r._malloc(x);try{d.GetTrianglesUInt32Array(a,x,O);var B=new Uint32Array(b);B.set(new Uint32Array(r.HEAPF32.buffer,O,b)),n(B)}finally{r._free(O)}}var F=function(se,ce){var ue=ce.num_components(),fe=a.num_points(),ve=fe*ue,Te=ve*Float32Array.BYTES_PER_ELEMENT,Re=r._malloc(Te);try{d.GetAttributeDataArrayForAllPoints(a,ce,r.DT_FLOAT32,Te,Re);var Ae=new Float32Array(r.HEAPF32.buffer,Re,ve);if(se==="color"&&ue===3){for(var Ee=new Float32Array(4*fe),Se=0,Le=0;Ser.EPSILON?1:0;d|=b,p.push(b)}switch(d){case 0:(u.e.Dot(this.normal,t.plane.normal)>0?e:n).push(t);break;case 1:i.push(t);break;case 2:o.push(t);break;case 3:var x,O=[],B=[];for(a=0;a=3&&(x=new yc(O,t.shared)).plane&&i.push(x),B.length>=3&&(x=new yc(B,t.shared)).plane&&o.push(x)}},r.EPSILON=1e-5,r}(),yc=function(){function r(t,e){this.vertices=t,this.shared=e,this.plane=vm.FromPoints(t[0].pos,t[1].pos,t[2].pos)}return r.prototype.clone=function(){return new r(this.vertices.map(function(t){return t.clone()}),this.shared)},r.prototype.flip=function(){this.vertices.reverse().map(function(t){t.flip()}),this.plane.flip()},r}(),Jn=function(){function r(t){this.plane=null,this.front=null,this.back=null,this.polygons=new Array,t&&this.build(t)}return r.prototype.clone=function(){var t=new r;return t.plane=this.plane&&this.plane.clone(),t.front=this.front&&this.front.clone(),t.back=this.back&&this.back.clone(),t.polygons=this.polygons.map(function(e){return e.clone()}),t},r.prototype.invert=function(){for(var t=0;t1)?1:r.arc||1,d=r.sideOrientation===0?0:r.sideOrientation||dt.a.DEFAULTSIDE;t.push(0,0,0),i.push(.5,.5);for(var p=2*Math.PI*s,b=s===1?p/a:p/(a-1),x=0,O=0;Oe.x&&(e.x=n.x),n.ye.y&&(e.y=n.y)}),{min:t,max:e,width:e.x-t.x,height:e.y-t.y}},r}(),Sm=function(){function r(){}return r.Rectangle=function(t,e,n,i){return[new u.d(t,e),new u.d(n,e),new u.d(n,i),new u.d(t,i)]},r.Circle=function(t,e,n,i){e===void 0&&(e=0),n===void 0&&(n=0),i===void 0&&(i=32);for(var o=new Array,a=0,s=2*Math.PI/i,d=0;d0){var x=o.length/3;this._points.elements.forEach(function(J){i.push(0,-1,0),o.push(J.x,-t,J.y),a.push(1-(J.x-s.min.x)/s.width,1-(J.y-s.min.y)/s.height)});var O=d.length;for(b=0;ba.elements.length-1?a.elements[0]:a.elements[x+1],t.push(B.x,0,B.y),t.push(B.x,-s,B.y),t.push(O.x,0,O.y),t.push(O.x,-s,O.y);var F=new u.e(B.x,0,B.y),z=new u.e(O.x,0,O.y).subtract(F),J=new u.e(0,1,0),ie=u.e.Cross(z,J);ie=ie.normalize(),n.push(b/o.width,0),n.push(b/o.width,1),b+=z.length(),n.push(b/o.width,0),n.push(b/o.width,1),d?(e.push(ie.x,ie.y,ie.z),e.push(ie.x,ie.y,ie.z),e.push(ie.x,ie.y,ie.z),e.push(ie.x,ie.y,ie.z),i.push(p),i.push(p+2),i.push(p+1),i.push(p+1),i.push(p+2),i.push(p+3)):(e.push(-ie.x,-ie.y,-ie.z),e.push(-ie.x,-ie.y,-ie.z),e.push(-ie.x,-ie.y,-ie.z),e.push(-ie.x,-ie.y,-ie.z),i.push(p),i.push(p+1),i.push(p+2),i.push(p+1),i.push(p+3),i.push(p+2)),p+=4}},r}();dt.a.CreatePolygon=function(r,t,e,n,i,o,a){for(var s=e||new Array(3),d=n,p=[],b=a||!1,x=0;x<3;x++)s[x]===void 0&&(s[x]=new u.f(0,0,1,1)),d&&d[x]===void 0&&(d[x]=new M.b(1,1,1,1));var O=r.getVerticesData(Oe.b.PositionKind),B=r.getVerticesData(Oe.b.NormalKind),F=r.getVerticesData(Oe.b.UVKind),z=r.getIndices(),J=O.length/9,ie=0,se=0,ce=0,ue=0,fe=[0];if(b)for(var ve=J;ve1?1:e.arc:1,a=e.closed===void 0||e.closed,s=e.shape,d=e.radius||1,p=e.tessellation||64,b=e.clip||0,x=e.updatable,O=De.a._GetDefaultSideOrientation(e.sideOrientation),B=e.cap||De.a.NO_CAP,F=2*Math.PI,z=new Array,J=e.invertUV||!1,ie=0,se=0,ce=F/p*o,ue=new Array;for(ie=0;ie<=p-b;ie++){for(ue=[],B!=De.a.CAP_START&&B!=De.a.CAP_ALL||(ue.push(new u.e(0,s[0].y,0)),ue.push(new u.e(Math.cos(ie*ce)*s[0].x*d,s[0].y,Math.sin(ie*ce)*s[0].x*d))),se=0;se0||x>0){switch(J=-O,ie=-B,se=O,ce=B,i){case De.a.CENTER:J-=d/=2,se+=d;break;case De.a.LEFT:se+=d,F=-d/2;break;case De.a.RIGHT:J-=d,F=d/2}switch(o){case De.a.CENTER:ie-=x/=2,ce+=x;break;case De.a.BOTTOM:ce+=x,z=-x/2;break;case De.a.TOP:ie-=x,z=x/2}}var ue=[],fe=[],ve=[];ve[0]=[0,0,1,0,1,1,0,1],ve[1]=[0,0,1,0,1,1,0,1],t!==De.a.ROTATE_TILE&&t!==De.a.ROTATE_ROW||(ve[1]=[1,1,0,1,0,0,1,0]),t!==De.a.FLIP_TILE&&t!==De.a.FLIP_ROW||(ve[1]=[1,0,0,0,0,1,1,1]),t!==De.a.FLIP_N_ROTATE_TILE&&t!==De.a.FLIP_N_ROTATE_ROW||(ve[1]=[0,1,1,1,1,0,0,0]);for(var Te=[],Re=[],Ae=[],Ee=0,Se=0;Se0||x>0){var xe,Ne,Me,Fe,Ye=x>0&&(o===De.a.CENTER||o===De.a.TOP),tt=x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==1)&&(Ke=[xe,1-Ne,Me,1-Ne,Me,1-Fe,xe,1-Fe]),Te=Te.concat(Ke),Re.push(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),fe.push(0,0,-1,0,0,-1,0,0,-1,0,0,-1)),Ye){var ot=[];for(xe=0,Ne=1-x/n,Me=1,Fe=1,ot[0]=[xe,Ne,Me,Ne,Me,Fe,xe,Fe],ot[1]=[xe,Ne,Me,Ne,Me,Fe,xe,Fe],t!==De.a.ROTATE_TILE&&t!==De.a.ROTATE_ROW||(ot[1]=[1-xe,1-Ne,1-Me,1-Ne,1-Me,1-Fe,1-xe,1-Fe]),t!==De.a.FLIP_TILE&&t!==De.a.FLIP_ROW||(ot[1]=[1-xe,Ne,1-Me,Ne,1-Me,Fe,1-xe,Fe]),t!==De.a.FLIP_N_ROTATE_TILE&&t!==De.a.FLIP_N_ROTATE_ROW||(ot[1]=[xe,1-Ne,Me,1-Ne,Me,1-Fe,xe,1-Fe]),Le=0;Le1)?1:e.arc||1;var B,F,z=function(ce,ue,fe,ve,Te,Re,Ae,Ee){for(var Se,Le,xe,Ne,Me=ue.getTangents(),Fe=ue.getNormals(),Ye=ue.getDistances(),tt=2*Math.PI/Te*Ee,it=Re||function(){return ve},lt=u.c.Matrix[0],Ke=Ae===De.a.NO_CAP||Ae===De.a.CAP_END?0:2,ot=0;ot3?0:p,e.arc);var se=Eo.a.CreateRibbon(t,{pathArray:F,closePath:!0,closeArray:!1,updatable:x,sideOrientation:O,invertUV:b,frontUVs:e.frontUVs,backUVs:e.backUVs},n);return se._creationDataStorage.pathArray=F,se._creationDataStorage.path3D=B,se._creationDataStorage.tessellation=s,se._creationDataStorage.cap=p,se._creationDataStorage.arc=e.arc,se._creationDataStorage.radius=a,se},r}();dt.a.CreateIcoSphere=function(r){var t,e=r.sideOrientation||dt.a.DEFAULTSIDE,n=r.radius||1,i=r.flat===void 0||r.flat,o=r.subdivisions||4,a=r.radiusX||n,s=r.radiusY||n,d=r.radiusZ||n,p=(1+Math.sqrt(5))/2,b=[-1,p,-0,1,p,0,-1,-p,0,1,-p,0,0,-1,-p,0,1,-p,0,-1,p,0,1,p,p,0,1,p,0,-1,-p,0,1,-p,0,-1],x=[0,11,5,0,5,1,0,1,7,0,7,10,12,22,23,1,5,20,5,11,4,23,22,13,22,18,6,7,1,8,14,21,4,14,4,2,16,13,6,15,6,19,3,8,9,4,21,5,13,17,23,6,13,22,19,6,18,9,8,1],O=[0,1,2,3,4,5,6,7,8,9,10,11,0,2,3,3,3,4,7,8,9,9,10,11],B=[5,1,3,1,6,4,0,0,5,3,4,2,2,2,4,0,2,0,1,1,6,0,6,2,0,4,3,3,4,4,3,1,4,2,4,4,0,2,1,1,2,2,3,3,1,3,2,4],F=[0,0,0,0,1,0,0,1,1,0,0,0,1,1,0,0,1,1,1,0],z=new Array,J=new Array,ie=new Array,se=new Array,ce=0,ue=new Array(3),fe=new Array(3);for(t=0;t<3;t++)ue[t]=u.e.Zero(),fe[t]=u.d.Zero();for(var ve=0;ve<20;ve++){for(t=0;t<3;t++){var Te=x[3*ve+t];ue[t].copyFromFloats(b[3*O[Te]],b[3*O[Te]+1],b[3*O[Te]+2]),ue[t].normalize().scaleInPlace(n),fe[t].copyFromFloats(B[2*Te]*(138/1024)+60/1024+F[ve]*(-40/1024),B[2*Te+1]*(239/1024)+26/1024+F[ve]*(20/1024))}for(var Re=function(Le,xe,Ne,Me){var Fe,Ye=u.e.Lerp(ue[0],ue[2],xe/o),tt=u.e.Lerp(ue[1],ue[2],xe/o),it=o===xe?ue[2]:u.e.Lerp(Ye,tt,Le/(o-xe));if(it.normalize(),i){var lt=u.e.Lerp(ue[0],ue[2],Me/o),Ke=u.e.Lerp(ue[1],ue[2],Me/o);Fe=u.e.Lerp(lt,Ke,Ne/(o-Me))}else Fe=new u.e(it.x,it.y,it.z);Fe.x/=a,Fe.y/=s,Fe.z/=d,Fe.normalize();var ot=u.d.Lerp(fe[0],fe[2],xe/o),rt=u.d.Lerp(fe[1],fe[2],xe/o),qe=o===xe?fe[2]:u.d.Lerp(ot,rt,Le/(o-xe));J.push(it.x*a,it.y*s,it.z*d),ie.push(Fe.x,Fe.y,Fe.z),se.push(qe.x,qe.y),z.push(ce),ce++},Ae=0;Ae0)?1:0)+((lt=u.e.Dot(xe[tt+1].position,Ne)-Me>0)?1:0)+((Ke=u.e.Dot(xe[tt+2].position,Ne)-Me>0)?1:0)){case 0:Ye.push(xe[tt]),Ye.push(xe[tt+1]),Ye.push(xe[tt+2]);break;case 1:if(it&&(ot=xe[tt+1],rt=xe[tt+2],qe=Fe(xe[tt],ot),ht=Fe(xe[tt],rt)),lt){ot=xe[tt],rt=xe[tt+2],qe=Fe(xe[tt+1],ot),ht=Fe(xe[tt+1],rt),Ye.push(qe),Ye.push(rt.clone()),Ye.push(ot.clone()),Ye.push(rt.clone()),Ye.push(qe.clone()),Ye.push(ht);break}Ke&&(ot=xe[tt],rt=xe[tt+1],qe=Fe(xe[tt+2],ot),ht=Fe(xe[tt+2],rt)),ot&&rt&&qe&&ht&&(Ye.push(ot.clone()),Ye.push(rt.clone()),Ye.push(qe),Ye.push(ht),Ye.push(qe.clone()),Ye.push(rt.clone()));break;case 2:it||(rt=Fe(ot=xe[tt].clone(),xe[tt+1]),qe=Fe(ot,xe[tt+2]),Ye.push(ot),Ye.push(rt),Ye.push(qe)),lt||(rt=Fe(ot=xe[tt+1].clone(),xe[tt+2]),qe=Fe(ot,xe[tt]),Ye.push(ot),Ye.push(rt),Ye.push(qe)),Ke||(rt=Fe(ot=xe[tt+2].clone(),xe[tt]),qe=Fe(ot,xe[tt+1]),Ye.push(ot),Ye.push(rt),Ye.push(qe))}}return Ye},Re=0;ReO||z.deleted||z.isDirty)){for(var J=0;J<3;++J)if(z.error[J]>0,function(b){if(o){var x=b+s.verticesStart,O=u.e.FromArray(o,3*x),B=function(F){if(n){for(var z=0;z0&&this._reconstructedMesh.setVerticesData(Oe.b.NormalKind,s),d.length>0&&this._reconstructedMesh.setVerticesData(Oe.b.UVKind,d),p.length>0&&this._reconstructedMesh.setVerticesData(Oe.b.ColorKind,p);var ue=this._mesh.subMeshes[t];t>0&&(this._reconstructedMesh.subMeshes=[],ie.forEach(function(fe){yo.a.AddToMesh(fe.materialIndex,fe.verticesStart,fe.verticesCount,fe.indexStart,fe.indexCount,fe.getMesh())}),yo.a.AddToMesh(ue.materialIndex,J,B,z,3*o.length,this._reconstructedMesh))},r.prototype.initDecimatedMesh=function(){this._reconstructedMesh=new De.a(this._mesh.name+"Decimated",this._mesh.getScene()),this._reconstructedMesh.material=this._mesh.material,this._reconstructedMesh.parent=this._mesh.parent,this._reconstructedMesh.isVisible=!1,this._reconstructedMesh.renderingGroupId=this._mesh.renderingGroupId},r.prototype.isFlipped=function(t,e,n,i,o){for(var a=0;a.999)return!0;var B=u.e.Cross(x,O).normalize();if(i[a]=!1,u.e.Dot(B,s.normal)<.2)return!0}else i[a]=!0,o.push(s)}}return!1},r.prototype.updateTriangles=function(t,e,n,i){for(var o=i,a=0;a=this._thinInstanceDataStorage.instancesCount)return!1;var n=this._thinInstanceDataStorage.matrixData;return t.copyToArray(n,16*r),this._thinInstanceDataStorage.worldMatrices&&(this._thinInstanceDataStorage.worldMatrices[r]=t),e&&(this.thinInstanceBufferUpdated("matrix"),this.doNotSyncBoundingInfo||this.thinInstanceRefreshBoundingInfo(!1)),!0},De.a.prototype.thinInstanceSetAttributeAt=function(r,t,e,n){return n===void 0&&(n=!0),!(!this._userThinInstanceBuffersStorage||!this._userThinInstanceBuffersStorage.data[r]||t>=this._thinInstanceDataStorage.instancesCount)&&(this._thinInstanceUpdateBufferSize(r,0),this._userThinInstanceBuffersStorage.data[r].set(e,t*this._userThinInstanceBuffersStorage.strides[r]),n&&this.thinInstanceBufferUpdated(r),!0)},Object.defineProperty(De.a.prototype,"thinInstanceCount",{get:function(){return this._thinInstanceDataStorage.instancesCount},set:function(r){var t,e;r<=((e=(t=this._thinInstanceDataStorage.matrixData)===null||t===void 0?void 0:t.length)!==null&&e!==void 0?e:0)/16&&(this._thinInstanceDataStorage.instancesCount=r)},enumerable:!0,configurable:!0}),De.a.prototype.thinInstanceSetBuffer=function(r,t,e,n){var i,o;if(e===void 0&&(e=0),n===void 0&&(n=!1),e=e||16,r==="matrix")if((i=this._thinInstanceDataStorage.matrixBuffer)===null||i===void 0||i.dispose(),this._thinInstanceDataStorage.matrixBuffer=null,this._thinInstanceDataStorage.matrixBufferSize=t?t.length:32*e,this._thinInstanceDataStorage.matrixData=t,this._thinInstanceDataStorage.worldMatrices=null,t!==null){this._thinInstanceDataStorage.instancesCount=t.length/e;var a=new Oe.a(this.getEngine(),t,!n,e,!1,!0);this._thinInstanceDataStorage.matrixBuffer=a,this.setVerticesBuffer(a.createVertexBuffer("world0",0,4)),this.setVerticesBuffer(a.createVertexBuffer("world1",4,4)),this.setVerticesBuffer(a.createVertexBuffer("world2",8,4)),this.setVerticesBuffer(a.createVertexBuffer("world3",12,4)),this.doNotSyncBoundingInfo||this.thinInstanceRefreshBoundingInfo(!1)}else this._thinInstanceDataStorage.instancesCount=0,this.doNotSyncBoundingInfo||this.refreshBoundingInfo(!0);else t===null?!((o=this._userThinInstanceBuffersStorage)===null||o===void 0)&&o.data[r]&&(this.removeVerticesData(r),delete this._userThinInstanceBuffersStorage.data[r],delete this._userThinInstanceBuffersStorage.strides[r],delete this._userThinInstanceBuffersStorage.sizes[r],delete this._userThinInstanceBuffersStorage.vertexBuffers[r]):(this._thinInstanceInitializeUserStorage(),this._userThinInstanceBuffersStorage.data[r]=t,this._userThinInstanceBuffersStorage.strides[r]=e,this._userThinInstanceBuffersStorage.sizes[r]=t.length,this._userThinInstanceBuffersStorage.vertexBuffers[r]=new Oe.b(this.getEngine(),t,r,!n,!1,e,!0),this.setVerticesBuffer(this._userThinInstanceBuffersStorage.vertexBuffers[r]))},De.a.prototype.thinInstanceBufferUpdated=function(r){var t;r==="matrix"?this._thinInstanceDataStorage.matrixBuffer&&this._thinInstanceDataStorage.matrixBuffer.updateDirectly(this._thinInstanceDataStorage.matrixData,0,this._thinInstanceDataStorage.instancesCount):!((t=this._userThinInstanceBuffersStorage)===null||t===void 0)&&t.vertexBuffers[r]&&this._userThinInstanceBuffersStorage.vertexBuffers[r].updateDirectly(this._userThinInstanceBuffersStorage.data[r],0)},De.a.prototype.thinInstancePartialBufferUpdate=function(r,t,e){var n;r==="matrix"?this._thinInstanceDataStorage.matrixBuffer&&this._thinInstanceDataStorage.matrixBuffer.updateDirectly(t,e):!((n=this._userThinInstanceBuffersStorage)===null||n===void 0)&&n.vertexBuffers[r]&&this._userThinInstanceBuffersStorage.vertexBuffers[r].updateDirectly(t,e)},De.a.prototype.thinInstanceGetWorldMatrices=function(){if(!this._thinInstanceDataStorage.matrixData||!this._thinInstanceDataStorage.matrixBuffer)return[];var r=this._thinInstanceDataStorage.matrixData;if(!this._thinInstanceDataStorage.worldMatrices){this._thinInstanceDataStorage.worldMatrices=new Array;for(var t=0;t-1&&(this.agents.splice(e,1),this.transforms.splice(e,1))},r.prototype.getAgents=function(){return this.agents},r.prototype.update=function(t){var e=this.bjsRECASTPlugin.getTimeStep(),n=this.bjsRECASTPlugin.getMaximumSubStepCount();if(e<=Gt.a)this.recastCrowd.update(t);else{var i=t/e;n&&i>n&&(i=n),i<1&&(i=1);for(var o=0;o=400&&o?o(p):e()},!1),p.addEventListener("error",function(){l.a.Error("error on XHR request."),e()},!1),p.send()}else l.a.Error("Error: IndexedDB not supported by your browser or Babylon.js database is not open."),e()},r._ValidateXHRData=function(t,e){e===void 0&&(e=7);try{if(1&e){if(t.responseText&&t.responseText.length>0)return!0;if(e===1)return!1}if(2&e){var n=da.GetTGAHeader(t.response);if(n.width&&n.height&&n.width>0&&n.height>0)return!0;if(e===2)return!1}if(4&e){var i=new Uint8Array(t.response,0,3);return i[0]===68&&i[1]===68&&i[2]===83}}catch{}return!1},r.IsUASupportingBlobStorage=!0,r.IDBStorageEnabled=!1,r._ParseURL=function(t){document.createElement("a").href=t;var e=t.substring(0,t.lastIndexOf("#")),n=t.substring(e.lastIndexOf("/")+1,t.length);return t.substring(0,t.indexOf(n,0))},r._ReturnFullUrlLocation=function(t){return t.indexOf("http:/")===-1&&t.indexOf("https:/")===-1&&typeof window<"u"?r._ParseURL(window.location.href)+t:t},r}(),Rc=function(){function r(t,e,n){this.gradient=t,this.color1=e,this.color2=n}return r.prototype.getColorToRef=function(t){this.color2?M.b.LerpToRef(this.color1,this.color2,Math.random(),t):t.copyFrom(this.color1)},r}(),xd=function(r,t){this.gradient=r,this.color=t},Oc=function(){function r(t,e,n){this.gradient=t,this.factor1=e,this.factor2=n}return r.prototype.getFactor=function(){return this.factor2===void 0||this.factor2===this.factor1?this.factor1:this.factor1+(this.factor2-this.factor1)*Math.random()},r}(),In=function(){function r(){}return r.GetCurrentGradient=function(t,e,n){if(e[0].gradient>t)n(e[0],e[0],1);else{for(var i=0;i=o.gradient&&t<=a.gradient)return void n(o,a,(t-o.gradient)/(a.gradient-o.gradient))}var s=e.length-1;n(e[s],e[s],1)}},r}(),Cd=function(){function r(t){this.particleSystem=t,this.position=u.e.Zero(),this.direction=u.e.Zero(),this.color=new M.b(0,0,0,0),this.colorStep=new M.b(0,0,0,0),this.lifeTime=1,this.age=0,this.size=0,this.scale=new u.d(1,1),this.angle=0,this.angularSpeed=0,this.cellIndex=0,this._attachedSubEmitters=null,this._currentColor1=new M.b(0,0,0,0),this._currentColor2=new M.b(0,0,0,0),this._currentSize1=0,this._currentSize2=0,this._currentAngularSpeed1=0,this._currentAngularSpeed2=0,this._currentVelocity1=0,this._currentVelocity2=0,this._currentLimitVelocity1=0,this._currentLimitVelocity2=0,this._currentDrag1=0,this._currentDrag2=0,this.id=r._Count++,this.particleSystem.isAnimationSheetEnabled&&this.updateCellInfoFromSystem()}return r.prototype.updateCellInfoFromSystem=function(){this.cellIndex=this.particleSystem.startSpriteCellID},r.prototype.updateCellIndex=function(){var t=this.age,e=this.particleSystem.spriteCellChangeSpeed;this.particleSystem.spriteRandomStartCell&&(this._randomCellOffset===void 0&&(this._randomCellOffset=Math.random()*this.lifeTime),e===0?(e=1,t=this._randomCellOffset):t+=this._randomCellOffset);var n=this._initialEndSpriteCellID-this._initialStartSpriteCellID,i=$.a.Clamp(t*e%this.lifeTime/this.lifeTime);this.cellIndex=this._initialStartSpriteCellID+i*n|0},r.prototype._inheritParticleInfoToSubEmitter=function(t){if(t.particleSystem.emitter.position){var e=t.particleSystem.emitter;if(e.position.copyFrom(this.position),t.inheritDirection){var n=u.c.Vector3[0];this.direction.normalizeToRef(n),e.setDirection(n,0,Math.PI/2)}}else t.particleSystem.emitter.copyFrom(this.position);this.direction.scaleToRef(t.inheritedVelocityAmount/2,u.c.Vector3[0]),t.particleSystem._inheritedVelocityOffset.copyFrom(u.c.Vector3[0])},r.prototype._inheritParticleInfoToSubEmitters=function(){var t=this;this._attachedSubEmitters&&this._attachedSubEmitters.length>0&&this._attachedSubEmitters.forEach(function(e){t._inheritParticleInfoToSubEmitter(e)})},r.prototype._reset=function(){this.age=0,this.id=r._Count++,this._currentColorGradient=null,this._currentSizeGradient=null,this._currentAngularSpeedGradient=null,this._currentVelocityGradient=null,this._currentLimitVelocityGradient=null,this._currentDragGradient=null,this.cellIndex=this.particleSystem.startSpriteCellID,this._randomCellOffset=void 0},r.prototype.copyTo=function(t){t.position.copyFrom(this.position),this._initialDirection?t._initialDirection?t._initialDirection.copyFrom(this._initialDirection):t._initialDirection=this._initialDirection.clone():t._initialDirection=null,t.direction.copyFrom(this.direction),this._localPosition&&(t._localPosition?t._localPosition.copyFrom(this._localPosition):t._localPosition=this._localPosition.clone()),t.color.copyFrom(this.color),t.colorStep.copyFrom(this.colorStep),t.lifeTime=this.lifeTime,t.age=this.age,t._randomCellOffset=this._randomCellOffset,t.size=this.size,t.scale.copyFrom(this.scale),t.angle=this.angle,t.angularSpeed=this.angularSpeed,t.particleSystem=this.particleSystem,t.cellIndex=this.cellIndex,t.id=this.id,t._attachedSubEmitters=this._attachedSubEmitters,this._currentColorGradient&&(t._currentColorGradient=this._currentColorGradient,t._currentColor1.copyFrom(this._currentColor1),t._currentColor2.copyFrom(this._currentColor2)),this._currentSizeGradient&&(t._currentSizeGradient=this._currentSizeGradient,t._currentSize1=this._currentSize1,t._currentSize2=this._currentSize2),this._currentAngularSpeedGradient&&(t._currentAngularSpeedGradient=this._currentAngularSpeedGradient,t._currentAngularSpeed1=this._currentAngularSpeed1,t._currentAngularSpeed2=this._currentAngularSpeed2),this._currentVelocityGradient&&(t._currentVelocityGradient=this._currentVelocityGradient,t._currentVelocity1=this._currentVelocity1,t._currentVelocity2=this._currentVelocity2),this._currentLimitVelocityGradient&&(t._currentLimitVelocityGradient=this._currentLimitVelocityGradient,t._currentLimitVelocity1=this._currentLimitVelocity1,t._currentLimitVelocity2=this._currentLimitVelocity2),this._currentDragGradient&&(t._currentDragGradient=this._currentDragGradient,t._currentDrag1=this._currentDrag1,t._currentDrag2=this._currentDrag2),this.particleSystem.isAnimationSheetEnabled&&(t._initialStartSpriteCellID=this._initialStartSpriteCellID,t._initialEndSpriteCellID=this._initialEndSpriteCellID),this.particleSystem.useRampGradients&&(t.remapData&&this.remapData?t.remapData.copyFrom(this.remapData):t.remapData=new u.f(0,0,0,0)),this._randomNoiseCoordinates1&&(t._randomNoiseCoordinates1?(t._randomNoiseCoordinates1.copyFrom(this._randomNoiseCoordinates1),t._randomNoiseCoordinates2.copyFrom(this._randomNoiseCoordinates2)):(t._randomNoiseCoordinates1=this._randomNoiseCoordinates1.clone(),t._randomNoiseCoordinates2=this._randomNoiseCoordinates2.clone()))},r._Count=0,r}();(function(r){r[r.ATTACHED=0]="ATTACHED",r[r.END=1]="END"})(Fr||(Fr={}));var Po=function(){function r(t){if(this.particleSystem=t,this.type=Fr.END,this.inheritDirection=!1,this.inheritedVelocityAmount=0,!t.emitter||!t.emitter.dispose){var e=C.a.GetClass("BABYLON.AbstractMesh");t.emitter=new e("SubemitterSystemEmitter",t.getScene())}t.onDisposeObservable.add(function(){t.emitter&&t.emitter.dispose&&t.emitter.dispose()})}return r.prototype.clone=function(){var t=this.particleSystem.emitter;t?t instanceof u.e?t=t.clone():t.getClassName().indexOf("Mesh")!==-1&&((t=new(C.a.GetClass("BABYLON.Mesh"))("",t.getScene())).isVisible=!1):t=new u.e;var e=new r(this.particleSystem.clone("",t));return e.particleSystem.name+="Clone",e.type=this.type,e.inheritDirection=this.inheritDirection,e.inheritedVelocityAmount=this.inheritedVelocityAmount,e.particleSystem._disposeEmitterOnDispose=!0,e.particleSystem.disposeOnStop=!0,e},r.prototype.serialize=function(){var t={};return t.type=this.type,t.inheritDirection=this.inheritDirection,t.inheritedVelocityAmount=this.inheritedVelocityAmount,t.particleSystem=this.particleSystem.serialize(),t},r._ParseParticleSystem=function(t,e,n){throw An.a.WarnImport("ParseParticle")},r.Parse=function(t,e,n){var i=t.particleSystem,o=new r(r._ParseParticleSystem(i,e,n));return o.type=t.type,o.inheritDirection=t.inheritDirection,o.inheritedVelocityAmount=t.inheritedVelocityAmount,o.particleSystem._isSubEmitter=!0,o},r.prototype.dispose=function(){this.particleSystem.dispose()},r}(),Dm=` +varying vec2 vUV; +varying vec4 vColor; +uniform vec4 textureMask; +uniform sampler2D diffuseSampler; +#include +#include +#include +#include +#ifdef RAMPGRADIENT +varying vec4 remapRanges; +uniform sampler2D rampSampler; +#endif +void main(void) { +#include +vec4 textureColor=texture2D(diffuseSampler,vUV); +vec4 baseColor=(textureColor*textureMask+(vec4(1.,1.,1.,1.)-textureMask))*vColor; +#ifdef RAMPGRADIENT +float alpha=baseColor.a; +float remappedColorIndex=clamp((alpha-remapRanges.x)/remapRanges.y,0.0,1.0); +vec4 rampColor=texture2D(rampSampler,vec2(1.0-remappedColorIndex,0.)); +baseColor.rgb*=rampColor.rgb; + +float finalAlpha=baseColor.a; +baseColor.a=clamp((alpha*rampColor.a-remapRanges.z)/remapRanges.w,0.0,1.0); +#endif +#ifdef BLENDMULTIPLYMODE +float sourceAlpha=vColor.a*textureColor.a; +baseColor.rgb=baseColor.rgb*sourceAlpha+vec3(1.0)*(1.0-sourceAlpha); +#endif + + +#ifdef IMAGEPROCESSINGPOSTPROCESS +baseColor.rgb=toLinearSpace(baseColor.rgb); +#else +#ifdef IMAGEPROCESSING +baseColor.rgb=toLinearSpace(baseColor.rgb); +baseColor=applyImageProcessing(baseColor); +#endif +#endif +gl_FragColor=baseColor; +}`;ze.a.ShadersStore.particlesPixelShader=Dm;var Lm=` +attribute vec3 position; +attribute vec4 color; +attribute float angle; +attribute vec2 size; +#ifdef ANIMATESHEET +attribute float cellIndex; +#endif +#ifndef BILLBOARD +attribute vec3 direction; +#endif +#ifdef BILLBOARDSTRETCHED +attribute vec3 direction; +#endif +#ifdef RAMPGRADIENT +attribute vec4 remapData; +#endif +attribute vec2 offset; + +uniform mat4 view; +uniform mat4 projection; +uniform vec2 translationPivot; +#ifdef ANIMATESHEET +uniform vec3 particlesInfos; +#endif + +varying vec2 vUV; +varying vec4 vColor; +varying vec3 vPositionW; +#ifdef RAMPGRADIENT +varying vec4 remapRanges; +#endif +#if defined(BILLBOARD) && !defined(BILLBOARDY) && !defined(BILLBOARDSTRETCHED) +uniform mat4 invView; +#endif +#include +#ifdef BILLBOARD +uniform vec3 eyePosition; +#endif +vec3 rotate(vec3 yaxis,vec3 rotatedCorner) { +vec3 xaxis=normalize(cross(vec3(0.,1.0,0.),yaxis)); +vec3 zaxis=normalize(cross(yaxis,xaxis)); +vec3 row0=vec3(xaxis.x,xaxis.y,xaxis.z); +vec3 row1=vec3(yaxis.x,yaxis.y,yaxis.z); +vec3 row2=vec3(zaxis.x,zaxis.y,zaxis.z); +mat3 rotMatrix=mat3(row0,row1,row2); +vec3 alignedCorner=rotMatrix*rotatedCorner; +return position+alignedCorner; +} +#ifdef BILLBOARDSTRETCHED +vec3 rotateAlign(vec3 toCamera,vec3 rotatedCorner) { +vec3 normalizedToCamera=normalize(toCamera); +vec3 normalizedCrossDirToCamera=normalize(cross(normalize(direction),normalizedToCamera)); +vec3 crossProduct=normalize(cross(normalizedToCamera,normalizedCrossDirToCamera)); +vec3 row0=vec3(normalizedCrossDirToCamera.x,normalizedCrossDirToCamera.y,normalizedCrossDirToCamera.z); +vec3 row1=vec3(crossProduct.x,crossProduct.y,crossProduct.z); +vec3 row2=vec3(normalizedToCamera.x,normalizedToCamera.y,normalizedToCamera.z); +mat3 rotMatrix=mat3(row0,row1,row2); +vec3 alignedCorner=rotMatrix*rotatedCorner; +return position+alignedCorner; +} +#endif +void main(void) { +vec2 cornerPos; +cornerPos=(vec2(offset.x-0.5,offset.y-0.5)-translationPivot)*size+translationPivot; +#ifdef BILLBOARD + +vec3 rotatedCorner; +#ifdef BILLBOARDY +rotatedCorner.x=cornerPos.x*cos(angle)-cornerPos.y*sin(angle); +rotatedCorner.z=cornerPos.x*sin(angle)+cornerPos.y*cos(angle); +rotatedCorner.y=0.; +vec3 yaxis=position-eyePosition; +yaxis.y=0.; +vPositionW=rotate(normalize(yaxis),rotatedCorner); +vec3 viewPos=(view*vec4(vPositionW,1.0)).xyz; +#elif defined(BILLBOARDSTRETCHED) +rotatedCorner.x=cornerPos.x*cos(angle)-cornerPos.y*sin(angle); +rotatedCorner.y=cornerPos.x*sin(angle)+cornerPos.y*cos(angle); +rotatedCorner.z=0.; +vec3 toCamera=position-eyePosition; +vPositionW=rotateAlign(toCamera,rotatedCorner); +vec3 viewPos=(view*vec4(vPositionW,1.0)).xyz; +#else +rotatedCorner.x=cornerPos.x*cos(angle)-cornerPos.y*sin(angle); +rotatedCorner.y=cornerPos.x*sin(angle)+cornerPos.y*cos(angle); +rotatedCorner.z=0.; +vec3 viewPos=(view*vec4(position,1.0)).xyz+rotatedCorner; +vPositionW=(invView*vec4(viewPos,1)).xyz; +#endif +#ifdef RAMPGRADIENT +remapRanges=remapData; +#endif + +gl_Position=projection*vec4(viewPos,1.0); +#else + +vec3 rotatedCorner; +rotatedCorner.x=cornerPos.x*cos(angle)-cornerPos.y*sin(angle); +rotatedCorner.z=cornerPos.x*sin(angle)+cornerPos.y*cos(angle); +rotatedCorner.y=0.; +vec3 yaxis=normalize(direction); +vPositionW=rotate(yaxis,rotatedCorner); +gl_Position=projection*view*vec4(vPositionW,1.0); +#endif +vColor=color; +#ifdef ANIMATESHEET +float rowOffset=floor(cellIndex*particlesInfos.z); +float columnOffset=cellIndex-rowOffset/particlesInfos.z; +vec2 uvScale=particlesInfos.xy; +vec2 uvOffset=vec2(offset.x ,1.0-offset.y); +vUV=(uvOffset+vec2(columnOffset,rowOffset))*uvScale; +#else +vUV=offset; +#endif + +#if defined(CLIPPLANE) || defined(CLIPPLANE2) || defined(CLIPPLANE3) || defined(CLIPPLANE4) || defined(CLIPPLANE5) || defined(CLIPPLANE6) +vec4 worldPos=vec4(vPositionW,1.0); +#endif +#include +}`;ze.a.ShadersStore.particlesVertexShader=Lm;var ln=function(r){function t(e,n,i,o,a,s){o===void 0&&(o=null),a===void 0&&(a=!1),s===void 0&&(s=.01);var d=r.call(this,e)||this;return d._inheritedVelocityOffset=new u.e,d.onDisposeObservable=new R.c,d.onStoppedObservable=new R.c,d._particles=new Array,d._stockParticles=new Array,d._newPartsExcess=0,d._vertexBuffers={},d._scaledColorStep=new M.b(0,0,0,0),d._colorDiff=new M.b(0,0,0,0),d._scaledDirection=u.e.Zero(),d._scaledGravity=u.e.Zero(),d._currentRenderId=-1,d._useInstancing=!1,d._started=!1,d._stopped=!1,d._actualFrame=0,d._currentEmitRate1=0,d._currentEmitRate2=0,d._currentStartSize1=0,d._currentStartSize2=0,d._rawTextureWidth=256,d._useRampGradients=!1,d._disposeEmitterOnDispose=!1,d.isLocal=!1,d._onBeforeDrawParticlesObservable=null,d.recycleParticle=function(p){var b=d._particles.pop();b!==p&&b.copyTo(p),d._stockParticles.push(b)},d._createParticle=function(){var p;if(d._stockParticles.length!==0?(p=d._stockParticles.pop())._reset():p=new Cd(d),d._subEmitters&&d._subEmitters.length>0){var b=d._subEmitters[Math.floor(Math.random()*d._subEmitters.length)];p._attachedSubEmitters=[],b.forEach(function(x){if(x.type===Fr.ATTACHED){var O=x.clone();p._attachedSubEmitters.push(O),O.particleSystem.start()}})}return p},d._emitFromParticle=function(p){if(d._subEmitters&&d._subEmitters.length!==0){var b=Math.floor(Math.random()*d._subEmitters.length);d._subEmitters[b].forEach(function(x){if(x.type===Fr.END){var O=x.clone();p._inheritParticleInfoToSubEmitter(O),O.particleSystem._rootParticleSystem=d,d.activeSubSystems.push(O.particleSystem),O.particleSystem.start()}})}},d._capacity=n,d._epsilon=s,d._isAnimationSheetEnabled=a,i&&i.getClassName()!=="Scene"?(d._engine=i,d.defaultProjectionMatrix=u.a.PerspectiveFovLH(.8,1,.1,100)):(d._scene=i||te.a.LastCreatedScene,d._engine=d._scene.getEngine(),d.uniqueId=d._scene.getUniqueId(),d._scene.particleSystems.push(d)),d._engine.getCaps().vertexArrayObject&&(d._vertexArrayObject=null),d._attachImageProcessingConfiguration(null),d._customEffect={0:o},d._useInstancing=d._engine.getCaps().instancedArrays,d._createIndexBuffer(),d._createVertexBuffers(),d.particleEmitterType=new Nr,d.updateFunction=function(p){var b=null,x=null;d.noiseTexture&&(b=d.noiseTexture.getSize(),x=d.noiseTexture.getContent());for(var O,B=function(){O=p[F];var z=d._scaledUpdateSpeed,J=O.age;if(O.age+=z,O.age>O.lifeTime){var ie=O.age-J;z=(O.lifeTime-J)*z/ie,O.age=O.lifeTime}var se=O.age/O.lifeTime;d._colorGradients&&d._colorGradients.length>0?In.GetCurrentGradient(se,d._colorGradients,function(Ae,Ee,Se){Ae!==O._currentColorGradient&&(O._currentColor1.copyFrom(O._currentColor2),Ee.getColorToRef(O._currentColor2),O._currentColorGradient=Ae),M.b.LerpToRef(O._currentColor1,O._currentColor2,Se,O.color)}):(O.colorStep.scaleToRef(z,d._scaledColorStep),O.color.addInPlace(d._scaledColorStep),O.color.a<0&&(O.color.a=0)),d._angularSpeedGradients&&d._angularSpeedGradients.length>0&&In.GetCurrentGradient(se,d._angularSpeedGradients,function(Ae,Ee,Se){Ae!==O._currentAngularSpeedGradient&&(O._currentAngularSpeed1=O._currentAngularSpeed2,O._currentAngularSpeed2=Ee.getFactor(),O._currentAngularSpeedGradient=Ae),O.angularSpeed=$.a.Lerp(O._currentAngularSpeed1,O._currentAngularSpeed2,Se)}),O.angle+=O.angularSpeed*z;var ce=z;if(d._velocityGradients&&d._velocityGradients.length>0&&In.GetCurrentGradient(se,d._velocityGradients,function(Ae,Ee,Se){Ae!==O._currentVelocityGradient&&(O._currentVelocity1=O._currentVelocity2,O._currentVelocity2=Ee.getFactor(),O._currentVelocityGradient=Ae),ce*=$.a.Lerp(O._currentVelocity1,O._currentVelocity2,Se)}),O.direction.scaleToRef(ce,d._scaledDirection),d._limitVelocityGradients&&d._limitVelocityGradients.length>0&&In.GetCurrentGradient(se,d._limitVelocityGradients,function(Ae,Ee,Se){Ae!==O._currentLimitVelocityGradient&&(O._currentLimitVelocity1=O._currentLimitVelocity2,O._currentLimitVelocity2=Ee.getFactor(),O._currentLimitVelocityGradient=Ae);var Le=$.a.Lerp(O._currentLimitVelocity1,O._currentLimitVelocity2,Se);O.direction.length()>Le&&O.direction.scaleInPlace(d.limitVelocityDamping)}),d._dragGradients&&d._dragGradients.length>0&&In.GetCurrentGradient(se,d._dragGradients,function(Ae,Ee,Se){Ae!==O._currentDragGradient&&(O._currentDrag1=O._currentDrag2,O._currentDrag2=Ee.getFactor(),O._currentDragGradient=Ae);var Le=$.a.Lerp(O._currentDrag1,O._currentDrag2,Se);d._scaledDirection.scaleInPlace(1-Le)}),d.isLocal&&O._localPosition?(O._localPosition.addInPlace(d._scaledDirection),u.e.TransformCoordinatesToRef(O._localPosition,d._emitterWorldMatrix,O.position)):O.position.addInPlace(d._scaledDirection),x&&b&&O._randomNoiseCoordinates1){var ue=d._fetchR(O._randomNoiseCoordinates1.x,O._randomNoiseCoordinates1.y,b.width,b.height,x),fe=d._fetchR(O._randomNoiseCoordinates1.z,O._randomNoiseCoordinates2.x,b.width,b.height,x),ve=d._fetchR(O._randomNoiseCoordinates2.y,O._randomNoiseCoordinates2.z,b.width,b.height,x),Te=u.c.Vector3[0],Re=u.c.Vector3[1];Te.copyFromFloats((2*ue-1)*d.noiseStrength.x,(2*fe-1)*d.noiseStrength.y,(2*ve-1)*d.noiseStrength.z),Te.scaleToRef(z,Re),O.direction.addInPlace(Re)}if(d.gravity.scaleToRef(z,d._scaledGravity),O.direction.addInPlace(d._scaledGravity),d._sizeGradients&&d._sizeGradients.length>0&&In.GetCurrentGradient(se,d._sizeGradients,function(Ae,Ee,Se){Ae!==O._currentSizeGradient&&(O._currentSize1=O._currentSize2,O._currentSize2=Ee.getFactor(),O._currentSizeGradient=Ae),O.size=$.a.Lerp(O._currentSize1,O._currentSize2,Se)}),d._useRampGradients&&(d._colorRemapGradients&&d._colorRemapGradients.length>0&&In.GetCurrentGradient(se,d._colorRemapGradients,function(Ae,Ee,Se){var Le=$.a.Lerp(Ae.factor1,Ee.factor1,Se),xe=$.a.Lerp(Ae.factor2,Ee.factor2,Se);O.remapData.x=Le,O.remapData.y=xe-Le}),d._alphaRemapGradients&&d._alphaRemapGradients.length>0&&In.GetCurrentGradient(se,d._alphaRemapGradients,function(Ae,Ee,Se){var Le=$.a.Lerp(Ae.factor1,Ee.factor1,Se),xe=$.a.Lerp(Ae.factor2,Ee.factor2,Se);O.remapData.z=Le,O.remapData.w=xe-Le})),d._isAnimationSheetEnabled&&O.updateCellIndex(),O._inheritParticleInfoToSubEmitters(),O.age>=O.lifeTime)return d._emitFromParticle(O),O._attachedSubEmitters&&(O._attachedSubEmitters.forEach(function(Ae){Ae.particleSystem.disposeOnStop=!0,Ae.particleSystem.stop()}),O._attachedSubEmitters=null),d.recycleParticle(O),F--,"continue"},F=0;Fd.gradient?1:0})},t.prototype._removeFactorGradient=function(e,n){if(e)for(var i=0,o=0,a=e;on.gradient?1:0}),this._rampGradientsTexture&&(this._rampGradientsTexture.dispose(),this._rampGradientsTexture=null),this._createRampGradientTexture())},t.prototype.addRampGradient=function(e,n){this._rampGradients||(this._rampGradients=[]);var i=new xd(e,n);return this._rampGradients.push(i),this._syncRampGradientTexture(),this},t.prototype.removeRampGradient=function(e){return this._removeGradientAndTexture(e,this._rampGradients,this._rampGradientsTexture),this._rampGradientsTexture=null,this._rampGradients&&this._rampGradients.length>0&&this._createRampGradientTexture(),this},t.prototype.addColorGradient=function(e,n,i){this._colorGradients||(this._colorGradients=[]);var o=new Rc(e,n,i);return this._colorGradients.push(o),this._colorGradients.sort(function(a,s){return a.gradients.gradient?1:0}),this},t.prototype.removeColorGradient=function(e){if(!this._colorGradients)return this;for(var n=0,i=0,o=this._colorGradients;i0&&(this._currentEmitRateGradient=this._emitRateGradients[0],this._currentEmitRate1=this._currentEmitRateGradient.getFactor(),this._currentEmitRate2=this._currentEmitRate1),this._emitRateGradients.length>1&&(this._currentEmitRate2=this._emitRateGradients[1].getFactor())),this._startSizeGradients&&(this._startSizeGradients.length>0&&(this._currentStartSizeGradient=this._startSizeGradients[0],this._currentStartSize1=this._currentStartSizeGradient.getFactor(),this._currentStartSize2=this._currentStartSize1),this._startSizeGradients.length>1&&(this._currentStartSize2=this._startSizeGradients[1].getFactor())),this.preWarmCycles){((n=this.emitter)===null||n===void 0?void 0:n.getClassName().indexOf("Mesh"))!==-1&&this.emitter.computeWorldMatrix(!0);var o=this.noiseTexture;if(o&&o.onGeneratedObservable)o.onGeneratedObservable.addOnce(function(){setTimeout(function(){for(var s=0;s0&&this._scene&&this._scene.beginAnimation(this,this.beginAnimationFrom,this.beginAnimationTo,this.beginAnimationLoop)}},t.prototype.stop=function(e){e===void 0&&(e=!0),this._stopped||(this.onStoppedObservable.notifyObservers(this),this._stopped=!0,e&&this._stopSubEmitters())},t.prototype.reset=function(){this._stockParticles=[],this._particles=[]},t.prototype._appendParticleVertex=function(e,n,i,o){var a=e*this._vertexBufferSize;if(this._vertexData[a++]=n.position.x+this.worldOffset.x,this._vertexData[a++]=n.position.y+this.worldOffset.y,this._vertexData[a++]=n.position.z+this.worldOffset.z,this._vertexData[a++]=n.color.r,this._vertexData[a++]=n.color.g,this._vertexData[a++]=n.color.b,this._vertexData[a++]=n.color.a,this._vertexData[a++]=n.angle,this._vertexData[a++]=n.scale.x*n.size,this._vertexData[a++]=n.scale.y*n.size,this._isAnimationSheetEnabled&&(this._vertexData[a++]=n.cellIndex),this._isBillboardBased)this.billboardMode===t.BILLBOARDMODE_STRETCHED&&(this._vertexData[a++]=n.direction.x,this._vertexData[a++]=n.direction.y,this._vertexData[a++]=n.direction.z);else if(n._initialDirection){var s=n._initialDirection;this.isLocal&&(u.e.TransformNormalToRef(s,this._emitterWorldMatrix,u.c.Vector3[0]),s=u.c.Vector3[0]),s.x===0&&s.z===0&&(s.x=.001),this._vertexData[a++]=s.x,this._vertexData[a++]=s.y,this._vertexData[a++]=s.z}else{var d=n.direction;this.isLocal&&(u.e.TransformNormalToRef(d,this._emitterWorldMatrix,u.c.Vector3[0]),d=u.c.Vector3[0]),d.x===0&&d.z===0&&(d.x=.001),this._vertexData[a++]=d.x,this._vertexData[a++]=d.y,this._vertexData[a++]=d.z}this._useRampGradients&&n.remapData&&(this._vertexData[a++]=n.remapData.x,this._vertexData[a++]=n.remapData.y,this._vertexData[a++]=n.remapData.z,this._vertexData[a++]=n.remapData.w),this._useInstancing||(this._isAnimationSheetEnabled&&(i===0?i=this._epsilon:i===1&&(i=1-this._epsilon),o===0?o=this._epsilon:o===1&&(o=1-this._epsilon)),this._vertexData[a++]=i,this._vertexData[a++]=o)},t.prototype._stopSubEmitters=function(){this.activeSubSystems&&(this.activeSubSystems.forEach(function(e){e.stop(!0)}),this.activeSubSystems=new Array)},t.prototype._removeFromRoot=function(){if(this._rootParticleSystem){var e=this._rootParticleSystem.activeSubSystems.indexOf(this);e!==-1&&this._rootParticleSystem.activeSubSystems.splice(e,1),this._rootParticleSystem=null}},t.prototype._update=function(e){var n,i=this;if(this._alive=this._particles.length>0,this.emitter.position){var o=this.emitter;this._emitterWorldMatrix=o.getWorldMatrix()}else{var a=this.emitter;this._emitterWorldMatrix=u.a.Translation(a.x,a.y,a.z)}this.updateFunction(this._particles);for(var s,d=function(){if(p._particles.length===p._capacity)return"break";if(n=p._createParticle(),p._particles.push(n),p.targetStopDuration&&p._lifeTimeGradients&&p._lifeTimeGradients.length>0){var x=$.a.Clamp(p._actualFrame/p.targetStopDuration);In.GetCurrentGradient(x,p._lifeTimeGradients,function(F,z){var J=F,ie=z,se=J.getFactor(),ce=ie.getFactor(),ue=(x-J.gradient)/(ie.gradient-J.gradient);n.lifeTime=$.a.Lerp(se,ce,ue)})}else n.lifeTime=$.a.RandomRange(p.minLifeTime,p.maxLifeTime);var O=$.a.RandomRange(p.minEmitPower,p.maxEmitPower);if(p.startPositionFunction?p.startPositionFunction(p._emitterWorldMatrix,n.position,n,p.isLocal):p.particleEmitterType.startPositionFunction(p._emitterWorldMatrix,n.position,n,p.isLocal),p.isLocal&&(n._localPosition?n._localPosition.copyFrom(n.position):n._localPosition=n.position.clone(),u.e.TransformCoordinatesToRef(n._localPosition,p._emitterWorldMatrix,n.position)),p.startDirectionFunction?p.startDirectionFunction(p._emitterWorldMatrix,n.direction,n,p.isLocal):p.particleEmitterType.startDirectionFunction(p._emitterWorldMatrix,n.direction,n,p.isLocal),O===0?n._initialDirection?n._initialDirection.copyFrom(n.direction):n._initialDirection=n.direction.clone():n._initialDirection=null,n.direction.scaleInPlace(O),p._sizeGradients&&p._sizeGradients.length!==0?(n._currentSizeGradient=p._sizeGradients[0],n._currentSize1=n._currentSizeGradient.getFactor(),n.size=n._currentSize1,p._sizeGradients.length>1?n._currentSize2=p._sizeGradients[1].getFactor():n._currentSize2=n._currentSize1):n.size=$.a.RandomRange(p.minSize,p.maxSize),n.scale.copyFromFloats($.a.RandomRange(p.minScaleX,p.maxScaleX),$.a.RandomRange(p.minScaleY,p.maxScaleY)),p._startSizeGradients&&p._startSizeGradients[0]&&p.targetStopDuration){var B=p._actualFrame/p.targetStopDuration;In.GetCurrentGradient(B,p._startSizeGradients,function(F,z,J){F!==i._currentStartSizeGradient&&(i._currentStartSize1=i._currentStartSize2,i._currentStartSize2=z.getFactor(),i._currentStartSizeGradient=F);var ie=$.a.Lerp(i._currentStartSize1,i._currentStartSize2,J);n.scale.scaleInPlace(ie)})}p._angularSpeedGradients&&p._angularSpeedGradients.length!==0?(n._currentAngularSpeedGradient=p._angularSpeedGradients[0],n.angularSpeed=n._currentAngularSpeedGradient.getFactor(),n._currentAngularSpeed1=n.angularSpeed,p._angularSpeedGradients.length>1?n._currentAngularSpeed2=p._angularSpeedGradients[1].getFactor():n._currentAngularSpeed2=n._currentAngularSpeed1):n.angularSpeed=$.a.RandomRange(p.minAngularSpeed,p.maxAngularSpeed),n.angle=$.a.RandomRange(p.minInitialRotation,p.maxInitialRotation),p._velocityGradients&&p._velocityGradients.length>0&&(n._currentVelocityGradient=p._velocityGradients[0],n._currentVelocity1=n._currentVelocityGradient.getFactor(),p._velocityGradients.length>1?n._currentVelocity2=p._velocityGradients[1].getFactor():n._currentVelocity2=n._currentVelocity1),p._limitVelocityGradients&&p._limitVelocityGradients.length>0&&(n._currentLimitVelocityGradient=p._limitVelocityGradients[0],n._currentLimitVelocity1=n._currentLimitVelocityGradient.getFactor(),p._limitVelocityGradients.length>1?n._currentLimitVelocity2=p._limitVelocityGradients[1].getFactor():n._currentLimitVelocity2=n._currentLimitVelocity1),p._dragGradients&&p._dragGradients.length>0&&(n._currentDragGradient=p._dragGradients[0],n._currentDrag1=n._currentDragGradient.getFactor(),p._dragGradients.length>1?n._currentDrag2=p._dragGradients[1].getFactor():n._currentDrag2=n._currentDrag1),p._colorGradients&&p._colorGradients.length!==0?(n._currentColorGradient=p._colorGradients[0],n._currentColorGradient.getColorToRef(n.color),n._currentColor1.copyFrom(n.color),p._colorGradients.length>1?p._colorGradients[1].getColorToRef(n._currentColor2):n._currentColor2.copyFrom(n.color)):(s=$.a.RandomRange(0,1),M.b.LerpToRef(p.color1,p.color2,s,n.color),p.colorDead.subtractToRef(n.color,p._colorDiff),p._colorDiff.scaleToRef(1/n.lifeTime,n.colorStep)),p._isAnimationSheetEnabled&&(n._initialStartSpriteCellID=p.startSpriteCellID,n._initialEndSpriteCellID=p.endSpriteCellID),n.direction.addInPlace(p._inheritedVelocityOffset),p._useRampGradients&&(n.remapData=new u.f(0,1,0,1)),p.noiseTexture&&(n._randomNoiseCoordinates1?(n._randomNoiseCoordinates1.copyFromFloats(Math.random(),Math.random(),Math.random()),n._randomNoiseCoordinates2.copyFromFloats(Math.random(),Math.random(),Math.random())):(n._randomNoiseCoordinates1=new u.e(Math.random(),Math.random(),Math.random()),n._randomNoiseCoordinates2=new u.e(Math.random(),Math.random(),Math.random()))),n._inheritParticleInfoToSubEmitters()},p=this,b=0;b-1)o=this.manualEmitCount,this._newPartsExcess=0,this.manualEmitCount=0;else{var a=this.emitRate;if(this._emitRateGradients&&this._emitRateGradients.length>0&&this.targetStopDuration){var s=this._actualFrame/this.targetStopDuration;In.GetCurrentGradient(s,this._emitRateGradients,function(x,O,B){x!==i._currentEmitRateGradient&&(i._currentEmitRate1=i._currentEmitRate2,i._currentEmitRate2=O.getFactor(),i._currentEmitRateGradient=x),a=$.a.Lerp(i._currentEmitRate1,i._currentEmitRate2,B)})}o=a*this._scaledUpdateSpeed>>0,this._newPartsExcess+=a*this._scaledUpdateSpeed-o}if(this._newPartsExcess>1&&(o+=this._newPartsExcess>>0,this._newPartsExcess-=this._newPartsExcess>>0),this._alive=!1,this._stopped?o=0:(this._actualFrame+=this._scaledUpdateSpeed,this.targetStopDuration&&this._actualFrame>=this.targetStopDuration&&this.stop()),this._update(o),this._stopped&&(this._alive||(this._started=!1,this.onAnimationEnd&&this.onAnimationEnd(),this.disposeOnStop&&this._scene&&this._scene._toBeDisposed.push(this))),!e){for(var d=0,p=0;p=0&&(s.invertToRef(u.c.Matrix[0]),o.setMatrix("invView",u.c.Matrix[0])),this._vertexArrayObject!==void 0?(this._vertexArrayObject||(this._vertexArrayObject=this._engine.recordVertexArrayObject(this._vertexBuffers,this._indexBuffer,o)),this._engine.bindVertexArrayObject(this._vertexArrayObject,this._indexBuffer)):a.bindBuffers(this._vertexBuffers,this._indexBuffer,o),this._imageProcessingConfiguration&&!this._imageProcessingConfiguration.applyByPostProcess&&this._imageProcessingConfiguration.bind(o),e){case t.BLENDMODE_ADD:a.setAlphaMode(h.a.ALPHA_ADD);break;case t.BLENDMODE_ONEONE:a.setAlphaMode(h.a.ALPHA_ONEONE);break;case t.BLENDMODE_STANDARD:a.setAlphaMode(h.a.ALPHA_COMBINE);break;case t.BLENDMODE_MULTIPLY:a.setAlphaMode(h.a.ALPHA_MULTIPLY)}return this._onBeforeDrawParticlesObservable&&this._onBeforeDrawParticlesObservable.notifyObservers(o),this._useInstancing?a.drawArraysType(h.a.MATERIAL_TriangleFanDrawMode,0,4,this._particles.length):a.drawElementsType(h.a.MATERIAL_TriangleFillMode,0,6*this._particles.length),this._particles.length},t.prototype.render=function(){if(!this.isReady()||!this._particles.length)return 0;var e=this._engine;e.setState&&(e.setState(!1),this.forceDepthWrite&&e.setDepthWrite(!0));var n=0;return n=this.blendMode===t.BLENDMODE_MULTIPLYADD?this._render(t.BLENDMODE_MULTIPLY)+this._render(t.BLENDMODE_ADD):this._render(this.blendMode),this._engine.unbindInstanceAttributes(),this._engine.setAlphaMode(h.a.ALPHA_DISABLE),n},t.prototype.dispose=function(e){if(e===void 0&&(e=!0),this._vertexBuffer&&(this._vertexBuffer.dispose(),this._vertexBuffer=null),this._spriteBuffer&&(this._spriteBuffer.dispose(),this._spriteBuffer=null),this._indexBuffer&&(this._engine._releaseBuffer(this._indexBuffer),this._indexBuffer=null),this._vertexArrayObject&&(this._engine.releaseVertexArrayObject(this._vertexArrayObject),this._vertexArrayObject=null),e&&this.particleTexture&&(this.particleTexture.dispose(),this.particleTexture=null),e&&this.noiseTexture&&(this.noiseTexture.dispose(),this.noiseTexture=null),this._rampGradientsTexture&&(this._rampGradientsTexture.dispose(),this._rampGradientsTexture=null),this._removeFromRoot(),this._subEmitters&&this._subEmitters.length){for(var n=0;n-1&&this._scene.particleSystems.splice(n,1),this._scene._activeParticleSystems.dispose()),this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear(),this.onStoppedObservable.clear(),this.reset()},t.prototype.clone=function(e,n){var i=Object(c.a)({},this._customEffect),o=null,a=this._engine;if(a.createEffectForParticles&&this.customShader!=null){var s=(o=this.customShader).shaderOptions.defines.length>0?o.shaderOptions.defines.join(` +`):"";i[0]=a.createEffectForParticles(o.shaderPath.fragmentElement,o.shaderOptions.uniforms,o.shaderOptions.samplers,s)}var d=this.serialize(),p=t.Parse(d,this._scene||this._engine,"");return p.name=e,p.customShader=o,p._customEffect=i,n===void 0&&(n=this.emitter),this.noiseTexture&&(p.noiseTexture=this.noiseTexture.clone()),p.emitter=n,this.preventAutoStart||p.start(),p},t.prototype.serialize=function(e){e===void 0&&(e=!1);var n={};if(t._Serialize(n,this,e),n.textureMask=this.textureMask.asArray(),n.customShader=this.customShader,n.preventAutoStart=this.preventAutoStart,this.subEmitters){n.subEmitters=[],this._subEmitters||this._prepareSubEmitterInternalArray();for(var i=0,o=this._subEmitters;i0?p.shaderOptions.defines.join(` +`):"";d=a.createEffectForParticles(p.shaderPath.fragmentElement,p.shaderOptions.uniforms,p.shaderOptions.samplers,b)}var x=new t(s,e.capacity,n,d,e.isAnimationSheetEnabled);if(x.customShader=p,e.id&&(x.id=e.id),e.subEmitters){x.subEmitters=[];for(var O=0,B=e.subEmitters;O=life && stopFactor != 0.) { +vec3 newPosition; +vec3 newDirection; + +vec4 randoms=getRandomVec4(seed.x); + +outLife=lifeTime.x+(lifeTime.y-lifeTime.x)*randoms.r; +outAge=newAge-life; + +outSeed=seed; + +#ifdef SIZEGRADIENTS +outSize.x=texture(sizeGradientSampler,vec2(0,0)).r; +#else +outSize.x=sizeRange.x+(sizeRange.y-sizeRange.x)*randoms.g; +#endif +outSize.y=scaleRange.x+(scaleRange.y-scaleRange.x)*randoms.b; +outSize.z=scaleRange.z+(scaleRange.w-scaleRange.z)*randoms.a; +#ifndef COLORGRADIENTS + +outColor=color1+(color2-color1)*randoms.b; +#endif + +#ifndef ANGULARSPEEDGRADIENTS +outAngle.y=angleRange.x+(angleRange.y-angleRange.x)*randoms.a; +outAngle.x=angleRange.z+(angleRange.w-angleRange.z)*randoms.r; +#else +outAngle=angleRange.z+(angleRange.w-angleRange.z)*randoms.r; +#endif + +#ifdef POINTEMITTER +vec3 randoms2=getRandomVec3(seed.y); +vec3 randoms3=getRandomVec3(seed.z); +newPosition=vec3(0,0,0); +newDirection=direction1+(direction2-direction1)*randoms3; +#elif defined(BOXEMITTER) +vec3 randoms2=getRandomVec3(seed.y); +vec3 randoms3=getRandomVec3(seed.z); +newPosition=minEmitBox+(maxEmitBox-minEmitBox)*randoms2; +newDirection=direction1+(direction2-direction1)*randoms3; +#elif defined(HEMISPHERICEMITTER) +vec3 randoms2=getRandomVec3(seed.y); +vec3 randoms3=getRandomVec3(seed.z); + +float phi=2.0*PI*randoms2.x; +float theta=acos(2.0*randoms2.y-1.0); +float randX=cos(phi)*sin(theta); +float randY=cos(theta); +float randZ=sin(phi)*sin(theta); +newPosition=(radius-(radius*radiusRange*randoms2.z))*vec3(randX,abs(randY),randZ); +newDirection=newPosition+directionRandomizer*randoms3; +#elif defined(SPHEREEMITTER) +vec3 randoms2=getRandomVec3(seed.y); +vec3 randoms3=getRandomVec3(seed.z); + +float phi=2.0*PI*randoms2.x; +float theta=acos(2.0*randoms2.y-1.0); +float randX=cos(phi)*sin(theta); +float randY=cos(theta); +float randZ=sin(phi)*sin(theta); +newPosition=(radius-(radius*radiusRange*randoms2.z))*vec3(randX,randY,randZ); +#ifdef DIRECTEDSPHEREEMITTER +newDirection=direction1+(direction2-direction1)*randoms3; +#else + +newDirection=newPosition+directionRandomizer*randoms3; +#endif +#elif defined(CYLINDEREMITTER) +vec3 randoms2=getRandomVec3(seed.y); +vec3 randoms3=getRandomVec3(seed.z); + +float yPos=(randoms2.x-0.5)*height; +float angle=randoms2.y*PI*2.; +float inverseRadiusRangeSquared=((1.-radiusRange)*(1.-radiusRange)); +float positionRadius=radius*sqrt(inverseRadiusRangeSquared+(randoms2.z*(1.-inverseRadiusRangeSquared))); +float xPos=positionRadius*cos(angle); +float zPos=positionRadius*sin(angle); +newPosition=vec3(xPos,yPos,zPos); +#ifdef DIRECTEDCYLINDEREMITTER +newDirection=direction1+(direction2-direction1)*randoms3; +#else + +angle=angle+((randoms3.x-0.5)*PI); +newDirection=vec3(cos(angle),randoms3.y-0.5,sin(angle)); +newDirection=normalize(newDirection); +#endif +#elif defined(CONEEMITTER) +vec3 randoms2=getRandomVec3(seed.y); +float s=2.0*PI*randoms2.x; +#ifdef CONEEMITTERSPAWNPOINT +float h=0.0001; +#else +float h=randoms2.y*height.y; + +h=1.-h*h; +#endif +float lRadius=radius.x-radius.x*randoms2.z*radius.y; +lRadius=lRadius*h; +float randX=lRadius*sin(s); +float randZ=lRadius*cos(s); +float randY=h*height.x; +newPosition=vec3(randX,randY,randZ); + +if (abs(cos(coneAngle)) == 1.0) { +newDirection=vec3(0.,1.0,0.); +} else { +vec3 randoms3=getRandomVec3(seed.z); +newDirection=normalize(newPosition+directionRandomizer*randoms3); +} +#elif defined(CUSTOMEMITTER) +newPosition=initialPosition; +outInitialPosition=initialPosition; +#else + +newPosition=vec3(0.,0.,0.); + +newDirection=2.0*(getRandomVec3(seed.w)-vec3(0.5,0.5,0.5)); +#endif +float power=emitPower.x+(emitPower.y-emitPower.x)*randoms.a; +#ifdef LOCAL +outPosition=newPosition; +#else +outPosition=(emitterWM*vec4(newPosition,1.)).xyz; +#endif +#ifdef CUSTOMEMITTER +outDirection=direction; +#ifndef BILLBOARD +outInitialDirection=direction; +#endif +#else +#ifdef LOCAL +vec3 initial=newDirection; +#else +vec3 initial=(emitterWM*vec4(newDirection,0.)).xyz; +#endif +outDirection=initial*power; +#ifndef BILLBOARD +outInitialDirection=initial; +#endif +#endif +#ifdef ANIMATESHEET +outCellIndex=cellInfos.x; +#ifdef ANIMATESHEETRANDOMSTART +outCellStartOffset=randoms.a*outLife; +#endif +#endif +#ifdef NOISE +outNoiseCoordinates1=noiseCoordinates1; +outNoiseCoordinates2=noiseCoordinates2; +#endif +} else { +float directionScale=timeDelta; +outAge=newAge; +float ageGradient=newAge/life; +#ifdef VELOCITYGRADIENTS +directionScale*=texture(velocityGradientSampler,vec2(ageGradient,0)).r; +#endif +#ifdef DRAGGRADIENTS +directionScale*=1.0-texture(dragGradientSampler,vec2(ageGradient,0)).r; +#endif +#if defined(CUSTOMEMITTER) +outPosition=position+(direction-position)*ageGradient; +outInitialPosition=initialPosition; +#else +outPosition=position+direction*directionScale; +#endif +outLife=life; +outSeed=seed; +#ifndef COLORGRADIENTS +outColor=color; +#endif +#ifdef SIZEGRADIENTS +outSize.x=texture(sizeGradientSampler,vec2(ageGradient,0)).r; +outSize.yz=size.yz; +#else +outSize=size; +#endif +#ifndef BILLBOARD +outInitialDirection=initialDirection; +#endif +#ifdef CUSTOMEMITTER +outDirection=direction; +#else +vec3 updatedDirection=direction+gravity*timeDelta; +#ifdef LIMITVELOCITYGRADIENTS +float limitVelocity=texture(limitVelocityGradientSampler,vec2(ageGradient,0)).r; +float currentVelocity=length(updatedDirection); +if (currentVelocity>limitVelocity) { +updatedDirection=updatedDirection*limitVelocityDamping; +} +#endif +outDirection=updatedDirection; +#ifdef NOISE +float fetchedR=texture(noiseSampler,vec2(noiseCoordinates1.x,noiseCoordinates1.y)*vec2(0.5)+vec2(0.5)).r; +float fetchedG=texture(noiseSampler,vec2(noiseCoordinates1.z,noiseCoordinates2.x)*vec2(0.5)+vec2(0.5)).r; +float fetchedB=texture(noiseSampler,vec2(noiseCoordinates2.y,noiseCoordinates2.z)*vec2(0.5)+vec2(0.5)).r; +vec3 force=vec3(2.*fetchedR-1.,2.*fetchedG-1.,2.*fetchedB-1.)*noiseStrength; +outDirection=outDirection+force*timeDelta; +outNoiseCoordinates1=noiseCoordinates1; +outNoiseCoordinates2=noiseCoordinates2; +#endif +#endif +#ifdef ANGULARSPEEDGRADIENTS +float angularSpeed=texture(angularSpeedGradientSampler,vec2(ageGradient,0)).r; +outAngle=angle+angularSpeed*timeDelta; +#else +outAngle=vec2(angle.x+angle.y*timeDelta,angle.y); +#endif +#ifdef ANIMATESHEET +float offsetAge=outAge; +float dist=cellInfos.y-cellInfos.x; +#ifdef ANIMATESHEETRANDOMSTART +outCellStartOffset=cellStartOffset; +offsetAge+=cellStartOffset; +#else +float cellStartOffset=0.; +#endif +float ratio=clamp(mod(cellStartOffset+cellInfos.z*offsetAge,life)/life,0.,1.0); +outCellIndex=float(int(cellInfos.x+ratio*dist)); +#endif +} +}`;ze.a.ShadersStore.gpuUpdateParticlesVertexShader=Nm;var wm=`#ifdef CLIPPLANE +in float fClipDistance; +#endif +#ifdef CLIPPLANE2 +in float fClipDistance2; +#endif +#ifdef CLIPPLANE3 +in float fClipDistance3; +#endif +#ifdef CLIPPLANE4 +in float fClipDistance4; +#endif +#ifdef CLIPPLANE5 +in float fClipDistance5; +#endif +#ifdef CLIPPLANE6 +in float fClipDistance6; +#endif`;ze.a.IncludesShadersStore.clipPlaneFragmentDeclaration2=wm;var Fm=`#version 300 es +uniform sampler2D diffuseSampler; +in vec2 vUV; +in vec4 vColor; +out vec4 outFragColor; +#include +#include +#include +#include +void main() { +#include +vec4 textureColor=texture(diffuseSampler,vUV); +outFragColor=textureColor*vColor; +#ifdef BLENDMULTIPLYMODE +float alpha=vColor.a*textureColor.a; +outFragColor.rgb=outFragColor.rgb*alpha+vec3(1.0)*(1.0-alpha); +#endif + + +#ifdef IMAGEPROCESSINGPOSTPROCESS +outFragColor.rgb=toLinearSpace(outFragColor.rgb); +#else +#ifdef IMAGEPROCESSING +outFragColor.rgb=toLinearSpace(outFragColor.rgb); +outFragColor=applyImageProcessing(outFragColor); +#endif +#endif +} +`;ze.a.ShadersStore.gpuRenderParticlesPixelShader=Fm;var Bm=`#ifdef CLIPPLANE +uniform vec4 vClipPlane; +out float fClipDistance; +#endif +#ifdef CLIPPLANE2 +uniform vec4 vClipPlane2; +out float fClipDistance2; +#endif +#ifdef CLIPPLANE3 +uniform vec4 vClipPlane3; +out float fClipDistance3; +#endif +#ifdef CLIPPLANE4 +uniform vec4 vClipPlane4; +out float fClipDistance4; +#endif +#ifdef CLIPPLANE5 +uniform vec4 vClipPlane5; +out float fClipDistance5; +#endif +#ifdef CLIPPLANE6 +uniform vec4 vClipPlane6; +out float fClipDistance6; +#endif`;ze.a.IncludesShadersStore.clipPlaneVertexDeclaration2=Bm;var Um=`#version 300 es +uniform mat4 view; +uniform mat4 projection; +uniform vec2 translationPivot; +uniform vec3 worldOffset; +#ifdef LOCAL +uniform mat4 emitterWM; +#endif + +in vec3 position; +in float age; +in float life; +in vec3 size; +#ifndef BILLBOARD +in vec3 initialDirection; +#endif +#ifdef BILLBOARDSTRETCHED +in vec3 direction; +#endif +in float angle; +#ifdef ANIMATESHEET +in float cellIndex; +#endif +in vec2 offset; +in vec2 uv; +out vec2 vUV; +out vec4 vColor; +out vec3 vPositionW; +#if defined(BILLBOARD) && !defined(BILLBOARDY) && !defined(BILLBOARDSTRETCHED) +uniform mat4 invView; +#endif +#include +#ifdef COLORGRADIENTS +uniform sampler2D colorGradientSampler; +#else +uniform vec4 colorDead; +in vec4 color; +#endif +#ifdef ANIMATESHEET +uniform vec3 sheetInfos; +#endif +#ifdef BILLBOARD +uniform vec3 eyePosition; +#endif +vec3 rotate(vec3 yaxis,vec3 rotatedCorner) { +vec3 xaxis=normalize(cross(vec3(0.,1.0,0.),yaxis)); +vec3 zaxis=normalize(cross(yaxis,xaxis)); +vec3 row0=vec3(xaxis.x,xaxis.y,xaxis.z); +vec3 row1=vec3(yaxis.x,yaxis.y,yaxis.z); +vec3 row2=vec3(zaxis.x,zaxis.y,zaxis.z); +mat3 rotMatrix=mat3(row0,row1,row2); +vec3 alignedCorner=rotMatrix*rotatedCorner; +#ifdef LOCAL +return ((emitterWM*vec4(position,1.0)).xyz+worldOffset)+alignedCorner; +#else +return (position+worldOffset)+alignedCorner; +#endif +} +#ifdef BILLBOARDSTRETCHED +vec3 rotateAlign(vec3 toCamera,vec3 rotatedCorner) { +vec3 normalizedToCamera=normalize(toCamera); +vec3 normalizedCrossDirToCamera=normalize(cross(normalize(direction),normalizedToCamera)); +vec3 crossProduct=normalize(cross(normalizedToCamera,normalizedCrossDirToCamera)); +vec3 row0=vec3(normalizedCrossDirToCamera.x,normalizedCrossDirToCamera.y,normalizedCrossDirToCamera.z); +vec3 row1=vec3(crossProduct.x,crossProduct.y,crossProduct.z); +vec3 row2=vec3(normalizedToCamera.x,normalizedToCamera.y,normalizedToCamera.z); +mat3 rotMatrix=mat3(row0,row1,row2); +vec3 alignedCorner=rotMatrix*rotatedCorner; +#ifdef LOCAL +return ((emitterWM*vec4(position,1.0)).xyz+worldOffset)+alignedCorner; +#else +return (position+worldOffset)+alignedCorner; +#endif +} +#endif +void main() { +#ifdef ANIMATESHEET +float rowOffset=floor(cellIndex/sheetInfos.z); +float columnOffset=cellIndex-rowOffset*sheetInfos.z; +vec2 uvScale=sheetInfos.xy; +vec2 uvOffset=vec2(uv.x ,1.0-uv.y); +vUV=(uvOffset+vec2(columnOffset,rowOffset))*uvScale; +#else +vUV=uv; +#endif +float ratio=age/life; +#ifdef COLORGRADIENTS +vColor=texture(colorGradientSampler,vec2(ratio,0)); +#else +vColor=color*vec4(1.0-ratio)+colorDead*vec4(ratio); +#endif +vec2 cornerPos=(offset-translationPivot)*size.yz*size.x+translationPivot; +#ifdef BILLBOARD +vec4 rotatedCorner; +rotatedCorner.w=0.; +#ifdef BILLBOARDY +rotatedCorner.x=cornerPos.x*cos(angle)-cornerPos.y*sin(angle); +rotatedCorner.z=cornerPos.x*sin(angle)+cornerPos.y*cos(angle); +rotatedCorner.y=0.; +vec3 yaxis=(position+worldOffset)-eyePosition; +yaxis.y=0.; +vPositionW=rotate(normalize(yaxis),rotatedCorner.xyz); +vec4 viewPosition=(view*vec4(vPositionW,1.0)); +#elif defined(BILLBOARDSTRETCHED) +rotatedCorner.x=cornerPos.x*cos(angle)-cornerPos.y*sin(angle); +rotatedCorner.y=cornerPos.x*sin(angle)+cornerPos.y*cos(angle); +rotatedCorner.z=0.; +vec3 toCamera=(position+worldOffset)-eyePosition; +vPositionW=rotateAlign(toCamera,rotatedCorner.xyz); +vec4 viewPosition=(view*vec4(vPositionW,1.0)); +#else + +rotatedCorner.x=cornerPos.x*cos(angle)-cornerPos.y*sin(angle); +rotatedCorner.y=cornerPos.x*sin(angle)+cornerPos.y*cos(angle); +rotatedCorner.z=0.; + +#ifdef LOCAL +vec4 viewPosition=view*vec4(((emitterWM*vec4(position,1.0)).xyz+worldOffset),1.0)+rotatedCorner; +#else +vec4 viewPosition=view*vec4((position+worldOffset),1.0)+rotatedCorner; +#endif +vPositionW=(invView*viewPosition).xyz; +#endif +#else + +vec3 rotatedCorner; +rotatedCorner.x=cornerPos.x*cos(angle)-cornerPos.y*sin(angle); +rotatedCorner.y=0.; +rotatedCorner.z=cornerPos.x*sin(angle)+cornerPos.y*cos(angle); +vec3 yaxis=normalize(initialDirection); +vPositionW=rotate(yaxis,rotatedCorner); + +vec4 viewPosition=view*vec4(vPositionW,1.0); +#endif +gl_Position=projection*viewPosition; + +#if defined(CLIPPLANE) || defined(CLIPPLANE2) || defined(CLIPPLANE3) || defined(CLIPPLANE4) || defined(CLIPPLANE5) || defined(CLIPPLANE6) +vec4 worldPos=vec4(vPositionW,1.0); +#endif +#include +}`;ze.a.ShadersStore.gpuRenderParticlesVertexShader=Um;var or=function(r){function t(e,n,i,o,a){o===void 0&&(o=!1),a===void 0&&(a=null);var s=r.call(this,e)||this;s.layerMask=268435455,s._accumulatedCount=0,s._targetIndex=0,s._currentRenderId=-1,s._started=!1,s._stopped=!1,s._timeDelta=0,s._actualFrame=0,s._rawTextureWidth=256,s.onDisposeObservable=new R.c,s.onStoppedObservable=new R.c,s.forceDepthWrite=!1,s._preWarmDone=!1,s.isLocal=!1,s._onBeforeDrawParticlesObservable=null,i&&i.getClassName()!=="Scene"?(s._engine=i,s.defaultProjectionMatrix=u.a.PerspectiveFovLH(.8,1,.1,100)):(s._scene=i||te.a.LastCreatedScene,s._engine=s._scene.getEngine(),s.uniqueId=s._scene.getUniqueId(),s._scene.particleSystems.push(s)),s._customEffect={0:a},s._attachImageProcessingConfiguration(null),n.randomTextureSize||delete n.randomTextureSize;var d=Object(c.a)({capacity:5e4,randomTextureSize:s._engine.getCaps().maxTextureSize},n),p=n;isFinite(p)&&(d.capacity=p),s._capacity=d.capacity,s._activeCount=d.capacity,s._currentActiveCount=0,s._isAnimationSheetEnabled=o,s._updateEffectOptions={attributes:["position","initialPosition","age","life","seed","size","color","direction","initialDirection","angle","cellIndex","cellStartOffset","noiseCoordinates1","noiseCoordinates2"],uniformsNames:["currentCount","timeDelta","emitterWM","lifeTime","color1","color2","sizeRange","scaleRange","gravity","emitPower","direction1","direction2","minEmitBox","maxEmitBox","radius","directionRandomizer","height","coneAngle","stopFactor","angleRange","radiusRange","cellInfos","noiseStrength","limitVelocityDamping"],uniformBuffersNames:[],samplers:["randomSampler","randomSampler2","sizeGradientSampler","angularSpeedGradientSampler","velocityGradientSampler","limitVelocityGradientSampler","noiseSampler","dragGradientSampler"],defines:"",fallbacks:null,onCompiled:null,onError:null,indexParameters:null,maxSimultaneousLights:0,transformFeedbackVaryings:[]},s.particleEmitterType=new Nr;for(var b=Math.min(s._engine.getCaps().maxTextureSize,d.randomTextureSize),x=[],O=0;O1},enumerable:!1,configurable:!0}),t.prototype.getCapacity=function(){return this._capacity},Object.defineProperty(t.prototype,"activeParticleCount",{get:function(){return this._activeCount},set:function(e){this._activeCount=Math.min(e,this._capacity)},enumerable:!1,configurable:!0}),t.prototype.isReady=function(){return this._updateEffect?!!(this.emitter&&this._updateEffect.isReady()&&(!this._imageProcessingConfiguration||this._imageProcessingConfiguration.isReady())&&this._getEffect().isReady()&&this.particleTexture&&this.particleTexture.isReady()):(this._recreateUpdateEffect(),this._recreateRenderEffect(),!1)},t.prototype.isStarted=function(){return this._started},t.prototype.isStopped=function(){return this._stopped},t.prototype.isStopping=function(){return!1},t.prototype.getActiveCount=function(){return this._currentActiveCount},t.prototype.start=function(e){var n=this;if(e===void 0&&(e=this.startDelay),!this.targetStopDuration&&this._hasTargetStopDurationDependantGradient())throw"Particle system started with a targetStopDuration dependant gradient (eg. startSizeGradients) but no targetStopDuration set";e?setTimeout(function(){n.start(0)},e):(this._started=!0,this._stopped=!1,this._preWarmDone=!1,this.beginAnimationOnStart&&this.animations&&this.animations.length>0&&this._scene&&this._scene.beginAnimation(this,this.beginAnimationFrom,this.beginAnimationTo,this.beginAnimationLoop))},t.prototype.stop=function(){this._stopped||(this._stopped=!0)},t.prototype.reset=function(){this._releaseBuffers(),this._releaseVAOs(),this._currentActiveCount=0,this._targetIndex=0},t.prototype.getClassName=function(){return"GPUParticleSystem"},t.prototype.getCustomEffect=function(e){var n;return e===void 0&&(e=0),(n=this._customEffect[e])!==null&&n!==void 0?n:this._customEffect[0]},t.prototype.setCustomEffect=function(e,n){n===void 0&&(n=0),this._customEffect[n]=e},Object.defineProperty(t.prototype,"onBeforeDrawParticlesObservable",{get:function(){return this._onBeforeDrawParticlesObservable||(this._onBeforeDrawParticlesObservable=new R.c),this._onBeforeDrawParticlesObservable},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vertexShaderName",{get:function(){return"gpuRenderParticles"},enumerable:!1,configurable:!0}),t.prototype._removeGradientAndTexture=function(e,n,i){return r.prototype._removeGradientAndTexture.call(this,e,n,i),this._releaseBuffers(),this},t.prototype.addColorGradient=function(e,n,i){this._colorGradients||(this._colorGradients=[]);var o=new Rc(e,n);return this._colorGradients.push(o),this._refreshColorGradient(!0),this._releaseBuffers(),this},t.prototype._refreshColorGradient=function(e){e===void 0&&(e=!1),this._colorGradients&&(e&&this._colorGradients.sort(function(n,i){return n.gradienti.gradient?1:0}),this._colorGradientsTexture&&(this._colorGradientsTexture.dispose(),this._colorGradientsTexture=null))},t.prototype.forceRefreshGradients=function(){this._refreshColorGradient(),this._refreshFactorGradient(this._sizeGradients,"_sizeGradientsTexture"),this._refreshFactorGradient(this._angularSpeedGradients,"_angularSpeedGradientsTexture"),this._refreshFactorGradient(this._velocityGradients,"_velocityGradientsTexture"),this._refreshFactorGradient(this._limitVelocityGradients,"_limitVelocityGradientsTexture"),this._refreshFactorGradient(this._dragGradients,"_dragGradientsTexture"),this.reset()},t.prototype.removeColorGradient=function(e){return this._removeGradientAndTexture(e,this._colorGradients,this._colorGradientsTexture),this._colorGradientsTexture=null,this},t.prototype._addFactorGradient=function(e,n,i){var o=new Oc(n,i);e.push(o),this._releaseBuffers()},t.prototype.addSizeGradient=function(e,n){return this._sizeGradients||(this._sizeGradients=[]),this._addFactorGradient(this._sizeGradients,e,n),this._refreshFactorGradient(this._sizeGradients,"_sizeGradientsTexture",!0),this._releaseBuffers(),this},t.prototype.removeSizeGradient=function(e){return this._removeGradientAndTexture(e,this._sizeGradients,this._sizeGradientsTexture),this._sizeGradientsTexture=null,this},t.prototype._refreshFactorGradient=function(e,n,i){i===void 0&&(i=!1),e&&(i&&e.sort(function(o,a){return o.gradienta.gradient?1:0}),this[n]&&(this[n].dispose(),this[n]=null))},t.prototype.addAngularSpeedGradient=function(e,n){return this._angularSpeedGradients||(this._angularSpeedGradients=[]),this._addFactorGradient(this._angularSpeedGradients,e,n),this._refreshFactorGradient(this._angularSpeedGradients,"_angularSpeedGradientsTexture",!0),this._releaseBuffers(),this},t.prototype.removeAngularSpeedGradient=function(e){return this._removeGradientAndTexture(e,this._angularSpeedGradients,this._angularSpeedGradientsTexture),this._angularSpeedGradientsTexture=null,this},t.prototype.addVelocityGradient=function(e,n){return this._velocityGradients||(this._velocityGradients=[]),this._addFactorGradient(this._velocityGradients,e,n),this._refreshFactorGradient(this._velocityGradients,"_velocityGradientsTexture",!0),this._releaseBuffers(),this},t.prototype.removeVelocityGradient=function(e){return this._removeGradientAndTexture(e,this._velocityGradients,this._velocityGradientsTexture),this._velocityGradientsTexture=null,this},t.prototype.addLimitVelocityGradient=function(e,n){return this._limitVelocityGradients||(this._limitVelocityGradients=[]),this._addFactorGradient(this._limitVelocityGradients,e,n),this._refreshFactorGradient(this._limitVelocityGradients,"_limitVelocityGradientsTexture",!0),this._releaseBuffers(),this},t.prototype.removeLimitVelocityGradient=function(e){return this._removeGradientAndTexture(e,this._limitVelocityGradients,this._limitVelocityGradientsTexture),this._limitVelocityGradientsTexture=null,this},t.prototype.addDragGradient=function(e,n){return this._dragGradients||(this._dragGradients=[]),this._addFactorGradient(this._dragGradients,e,n),this._refreshFactorGradient(this._dragGradients,"_dragGradientsTexture",!0),this._releaseBuffers(),this},t.prototype.removeDragGradient=function(e){return this._removeGradientAndTexture(e,this._dragGradients,this._dragGradientsTexture),this._dragGradientsTexture=null,this},t.prototype.addEmitRateGradient=function(e,n,i){return this},t.prototype.removeEmitRateGradient=function(e){return this},t.prototype.addStartSizeGradient=function(e,n,i){return this},t.prototype.removeStartSizeGradient=function(e){return this},t.prototype.addColorRemapGradient=function(e,n,i){return this},t.prototype.removeColorRemapGradient=function(){return this},t.prototype.addAlphaRemapGradient=function(e,n,i){return this},t.prototype.removeAlphaRemapGradient=function(){return this},t.prototype.addRampGradient=function(e,n){return this},t.prototype.removeRampGradient=function(){return this},t.prototype.getRampGradients=function(){return null},Object.defineProperty(t.prototype,"useRampGradients",{get:function(){return!1},set:function(e){},enumerable:!1,configurable:!0}),t.prototype.addLifeTimeGradient=function(e,n,i){return this},t.prototype.removeLifeTimeGradient=function(e){return this},t.prototype._reset=function(){this._releaseBuffers()},t.prototype._createUpdateVAO=function(e){var n={};n.position=e.createVertexBuffer("position",0,3);var i=3;this.particleEmitterType instanceof wr&&(n.initialPosition=e.createVertexBuffer("initialPosition",i,3),i+=3),n.age=e.createVertexBuffer("age",i,1),i+=1,n.life=e.createVertexBuffer("life",i,1),i+=1,n.seed=e.createVertexBuffer("seed",i,4),i+=4,n.size=e.createVertexBuffer("size",i,3),i+=3,this._colorGradientsTexture||(n.color=e.createVertexBuffer("color",i,4),i+=4),n.direction=e.createVertexBuffer("direction",i,3),i+=3,this._isBillboardBased||(n.initialDirection=e.createVertexBuffer("initialDirection",i,3),i+=3),this._angularSpeedGradientsTexture?(n.angle=e.createVertexBuffer("angle",i,1),i+=1):(n.angle=e.createVertexBuffer("angle",i,2),i+=2),this._isAnimationSheetEnabled&&(n.cellIndex=e.createVertexBuffer("cellIndex",i,1),i+=1,this.spriteRandomStartCell&&(n.cellStartOffset=e.createVertexBuffer("cellStartOffset",i,1),i+=1)),this.noiseTexture&&(n.noiseCoordinates1=e.createVertexBuffer("noiseCoordinates1",i,3),i+=3,n.noiseCoordinates2=e.createVertexBuffer("noiseCoordinates2",i,3),i+=3);var o=this._engine.recordVertexArrayObject(n,null,this._updateEffect);return this._engine.bindArrayBuffer(null),o},t.prototype._createRenderVAO=function(e,n){var i={};i.position=e.createVertexBuffer("position",0,3,this._attributesStrideSize,!0);var o=3;this.particleEmitterType instanceof wr&&(o+=3),i.age=e.createVertexBuffer("age",o,1,this._attributesStrideSize,!0),o+=1,i.life=e.createVertexBuffer("life",o,1,this._attributesStrideSize,!0),o+=5,i.size=e.createVertexBuffer("size",o,3,this._attributesStrideSize,!0),o+=3,this._colorGradientsTexture||(i.color=e.createVertexBuffer("color",o,4,this._attributesStrideSize,!0),o+=4),this.billboardMode===ln.BILLBOARDMODE_STRETCHED&&(i.direction=e.createVertexBuffer("direction",o,3,this._attributesStrideSize,!0)),o+=3,this._isBillboardBased||(i.initialDirection=e.createVertexBuffer("initialDirection",o,3,this._attributesStrideSize,!0),o+=3),i.angle=e.createVertexBuffer("angle",o,1,this._attributesStrideSize,!0),this._angularSpeedGradientsTexture?o++:o+=2,this._isAnimationSheetEnabled&&(i.cellIndex=e.createVertexBuffer("cellIndex",o,1,this._attributesStrideSize,!0),o+=1,this.spriteRandomStartCell&&(i.cellStartOffset=e.createVertexBuffer("cellStartOffset",o,1,this._attributesStrideSize,!0),o+=1)),this.noiseTexture&&(i.noiseCoordinates1=e.createVertexBuffer("noiseCoordinates1",o,3,this._attributesStrideSize,!0),o+=3,i.noiseCoordinates2=e.createVertexBuffer("noiseCoordinates2",o,3,this._attributesStrideSize,!0),o+=3),i.offset=n.createVertexBuffer("offset",0,2),i.uv=n.createVertexBuffer("uv",2,2);var a=this._engine.recordVertexArrayObject(i,null,this._getEffect());return this._engine.bindArrayBuffer(null),a},t.prototype._initialize=function(e){if(e===void 0&&(e=!1),!this._buffer0||e){var n=this._engine,i=new Array;this._attributesStrideSize=21,this._targetIndex=0,this.particleEmitterType instanceof wr&&(this._attributesStrideSize+=3),this.isBillboardBased||(this._attributesStrideSize+=3),this._colorGradientsTexture&&(this._attributesStrideSize-=4),this._angularSpeedGradientsTexture&&(this._attributesStrideSize-=1),this._isAnimationSheetEnabled&&(this._attributesStrideSize+=1,this.spriteRandomStartCell&&(this._attributesStrideSize+=1)),this.noiseTexture&&(this._attributesStrideSize+=6);for(var o=this.particleEmitterType instanceof wr,a=u.c.Vector3[0],s=0;s=this.targetStopDuration&&this.stop()},t.prototype._createFactorGradientTexture=function(e,n){var i=this[n];if(e&&e.length&&!i){for(var o=new Float32Array(this._rawTextureWidth),a=0;a1){var a=0|this._accumulatedCount;this._accumulatedCount-=a,this._currentActiveCount=Math.min(this._activeCount,this._currentActiveCount+a)}if(!this._currentActiveCount)return 0;this._engine.enableEffect(this._updateEffect);var s,d=this._engine;if(!d.setState)throw new Error("GPU particles cannot work with a full Engine. ThinEngine is not supported");if(this._updateEffect.setFloat("currentCount",this._currentActiveCount),this._updateEffect.setFloat("timeDelta",this._timeDelta),this._updateEffect.setFloat("stopFactor",this._stopped?0:1),this._updateEffect.setTexture("randomSampler",this._randomTexture),this._updateEffect.setTexture("randomSampler2",this._randomTexture2),this._updateEffect.setFloat2("lifeTime",this.minLifeTime,this.maxLifeTime),this._updateEffect.setFloat2("emitPower",this.minEmitPower,this.maxEmitPower),this._colorGradientsTexture||(this._updateEffect.setDirectColor4("color1",this.color1),this._updateEffect.setDirectColor4("color2",this.color2)),this._updateEffect.setFloat2("sizeRange",this.minSize,this.maxSize),this._updateEffect.setFloat4("scaleRange",this.minScaleX,this.maxScaleX,this.minScaleY,this.maxScaleY),this._updateEffect.setFloat4("angleRange",this.minAngularSpeed,this.maxAngularSpeed,this.minInitialRotation,this.maxInitialRotation),this._updateEffect.setVector3("gravity",this.gravity),this._sizeGradientsTexture&&this._updateEffect.setTexture("sizeGradientSampler",this._sizeGradientsTexture),this._angularSpeedGradientsTexture&&this._updateEffect.setTexture("angularSpeedGradientSampler",this._angularSpeedGradientsTexture),this._velocityGradientsTexture&&this._updateEffect.setTexture("velocityGradientSampler",this._velocityGradientsTexture),this._limitVelocityGradientsTexture&&(this._updateEffect.setTexture("limitVelocityGradientSampler",this._limitVelocityGradientsTexture),this._updateEffect.setFloat("limitVelocityDamping",this.limitVelocityDamping)),this._dragGradientsTexture&&this._updateEffect.setTexture("dragGradientSampler",this._dragGradientsTexture),this.particleEmitterType&&this.particleEmitterType.applyToShader(this._updateEffect),this._isAnimationSheetEnabled&&this._updateEffect.setFloat3("cellInfos",this.startSpriteCellID,this.endSpriteCellID,this.spriteCellChangeSpeed),this.noiseTexture&&(this._updateEffect.setTexture("noiseSampler",this.noiseTexture),this._updateEffect.setVector3("noiseStrength",this.noiseStrength)),this.emitter.position)s=this.emitter.getWorldMatrix();else{var p=this.emitter;s=u.a.Translation(p.x,p.y,p.z)}if(this.isLocal||this._updateEffect.setMatrix("emitterWM",s),this._engine.bindVertexArrayObject(this._updateVAO[this._targetIndex],null),d.bindTransformFeedbackBuffer(this._targetBuffer.getBuffer()),d.setRasterizerState(!1),d.beginTransformFeedback(!0),d.drawArraysType(h.a.MATERIAL_PointListDrawMode,0,this._currentActiveCount),d.endTransformFeedback(),d.setRasterizerState(!0),d.bindTransformFeedbackBuffer(null),!e){var b=this._getEffect();this._engine.enableEffect(b);var x=((n=this._scene)===null||n===void 0?void 0:n.getViewMatrix())||u.a.IdentityReadOnly;if(b.setMatrix("view",x),b.setMatrix("projection",(i=this.defaultProjectionMatrix)!==null&&i!==void 0?i:this._scene.getProjectionMatrix()),b.setTexture("diffuseSampler",this.particleTexture),b.setVector2("translationPivot",this.translationPivot),b.setVector3("worldOffset",this.worldOffset),this.isLocal&&b.setMatrix("emitterWM",s),this._colorGradientsTexture?b.setTexture("colorGradientSampler",this._colorGradientsTexture):b.setDirectColor4("colorDead",this.colorDead),this._isAnimationSheetEnabled&&this.particleTexture){var O=this.particleTexture.getBaseSize();b.setFloat3("sheetInfos",this.spriteCellWidth/O.width,this.spriteCellHeight/O.height,O.width/this.spriteCellWidth)}if(this._isBillboardBased&&this._scene){var B=this._scene.activeCamera;b.setVector3("eyePosition",B.globalPosition)}var F=b.defines;if(this._scene&&(this._scene.clipPlane||this._scene.clipPlane2||this._scene.clipPlane3||this._scene.clipPlane4||this._scene.clipPlane5||this._scene.clipPlane6)&&et.a.BindClipPlane(b,this._scene),F.indexOf("#define BILLBOARDMODE_ALL")>=0){var z=x.clone();z.invert(),b.setMatrix("invView",z)}switch(this._imageProcessingConfiguration&&!this._imageProcessingConfiguration.applyByPostProcess&&this._imageProcessingConfiguration.bind(b),this.blendMode){case ln.BLENDMODE_ADD:this._engine.setAlphaMode(h.a.ALPHA_ADD);break;case ln.BLENDMODE_ONEONE:this._engine.setAlphaMode(h.a.ALPHA_ONEONE);break;case ln.BLENDMODE_STANDARD:this._engine.setAlphaMode(h.a.ALPHA_COMBINE);break;case ln.BLENDMODE_MULTIPLY:this._engine.setAlphaMode(h.a.ALPHA_MULTIPLY)}this.forceDepthWrite&&d.setDepthWrite(!0),this._engine.bindVertexArrayObject(this._renderVAO[this._targetIndex],null),this._onBeforeDrawParticlesObservable&&this._onBeforeDrawParticlesObservable.notifyObservers(b),this._engine.drawArraysType(h.a.MATERIAL_TriangleFanDrawMode,0,4,this._currentActiveCount),this._engine.setAlphaMode(h.a.ALPHA_DISABLE)}this._targetIndex++,this._targetIndex===2&&(this._targetIndex=0);var J=this._sourceBuffer;return this._sourceBuffer=this._targetBuffer,this._targetBuffer=J,this._currentActiveCount},t.prototype.rebuild=function(){this._initialize(!0)},t.prototype._releaseBuffers=function(){this._buffer0&&(this._buffer0.dispose(),this._buffer0=null),this._buffer1&&(this._buffer1.dispose(),this._buffer1=null),this._spriteBuffer&&(this._spriteBuffer.dispose(),this._spriteBuffer=null)},t.prototype._releaseVAOs=function(){if(this._updateVAO){for(var e=0;e-1&&this._scene.particleSystems.splice(n,1)}this._releaseBuffers(),this._releaseVAOs(),this._colorGradientsTexture&&(this._colorGradientsTexture.dispose(),this._colorGradientsTexture=null),this._sizeGradientsTexture&&(this._sizeGradientsTexture.dispose(),this._sizeGradientsTexture=null),this._angularSpeedGradientsTexture&&(this._angularSpeedGradientsTexture.dispose(),this._angularSpeedGradientsTexture=null),this._velocityGradientsTexture&&(this._velocityGradientsTexture.dispose(),this._velocityGradientsTexture=null),this._limitVelocityGradientsTexture&&(this._limitVelocityGradientsTexture.dispose(),this._limitVelocityGradientsTexture=null),this._dragGradientsTexture&&(this._dragGradientsTexture.dispose(),this._dragGradientsTexture=null),this._randomTexture&&(this._randomTexture.dispose(),this._randomTexture=null),this._randomTexture2&&(this._randomTexture2.dispose(),this._randomTexture2=null),e&&this.particleTexture&&(this.particleTexture.dispose(),this.particleTexture=null),e&&this.noiseTexture&&(this.noiseTexture.dispose(),this.noiseTexture=null),this.onStoppedObservable.clear(),this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear()},t.prototype.clone=function(e,n){var i=this.serialize(),o=t.Parse(i,this._scene||this._engine,""),a=Object(c.a)({},this._customEffect);return o.name=e,o._customEffect=a,n===void 0&&(n=this.emitter),o.emitter=n,o.noiseTexture=this.noiseTexture,o},t.prototype.serialize=function(e){e===void 0&&(e=!1);var n={};return ln._Serialize(n,this,e),n.activeParticleCount=this.activeParticleCount,n.randomTextureSize=this._randomTextureSize,n},t.Parse=function(e,n,i,o){o===void 0&&(o=!1);var a=new t(e.name,{capacity:e.capacity,randomTextureSize:e.randomTextureSize},n);return e.activeParticleCount&&(a.activeParticleCount=e.activeParticleCount),ln._Parse(e,a,n,i),e.preventAutoStart&&(a.preventAutoStart=e.preventAutoStart),o||a.preventAutoStart||a.start(),a},t}(vo),Sa=function(){function r(){this.systems=new Array}return Object.defineProperty(r.prototype,"emitterNode",{get:function(){return this._emitterNode},enumerable:!1,configurable:!0}),r.prototype.setEmitterAsSphere=function(t,e,n){this._emitterNode&&this._emitterNode.dispose(),this._emitterCreationOptions={kind:"Sphere",options:t,renderingGroupId:e};var i=Un.a.CreateSphere("emitterSphere",{diameter:t.diameter,segments:t.segments},n);i.renderingGroupId=e;var o=new Ft.a("emitterSphereMaterial",n);o.emissiveColor=t.color,i.material=o;for(var a=0,s=this.systems;a0&&n.set(this._uvs32,Oe.b.UVKind),this._colors32.length>0&&n.set(this._colors32,Oe.b.ColorKind),n.applyToMesh(this.mesh,this._updatable),this.mesh.isPickable=this._pickable,this._pickable){for(var i=0,o=0;oB?B:i,n=Math.round(B/i),o=0):n=n>B?B:n;for(var F=[],z=[],J=[],ie=[],se=[],ce=u.e.Zero(),ue=n;OB-(n=ue+Math.floor((1+o)*Math.random()))&&(n=B-O),F.length=0,z.length=0,J.length=0,ie.length=0,se.length=0;for(var fe=0,ve=3*O;ve<3*(O+n);ve++){J.push(fe);var Te=s[ve],Re=3*Te;if(F.push(a[Re],a[Re+1],a[Re+2]),z.push(b[Re],b[Re+1],b[Re+2]),d){var Ae=2*Te;ie.push(d[Ae],d[Ae+1])}if(p){var Ee=4*Te;se.push(p[Ee],p[Ee+1],p[Ee+2],p[Ee+3])}fe++}var Se,Le=this.nbParticles,xe=this._posToShape(F),Ne=this._uvsToShapeUV(ie),Me=Xe.b.Slice(J),Fe=Xe.b.Slice(se),Ye=Xe.b.Slice(z);for(ce.copyFromFloats(0,0,0),Se=0;Se65535&&(this._needs32Bits=!0)}if(this._depthSort||this._multimaterialEnabled){var ot=fe.materialIndex!==null?fe.materialIndex:0;this.depthSortedParticles.push(new Rd(B,e,o.length,ot))}return fe},r.prototype._posToShape=function(t){for(var e=[],n=0;n=this.nbParticles||!this._updatable)return[];var i=this.particles,o=this.nbParticles;if(e=this.nbParticles?this.nbParticles-1:e,this._computeBoundingBox&&(t!=0||e!=this.nbParticles-1)){var tt=this.mesh._boundingInfo;tt&&(se.copyFrom(tt.minimum),ce.copyFrom(tt.maximum))}var it=(Le=this.particles[t]._pos)/3|0;Ne=4*it,Fe=2*it;for(var lt=t;lt<=e;lt++){var Ke=this.particles[lt];this.updateParticle(Ke);var ot=Ke._model._shape,rt=Ke._model._shapeUV,qe=Ke._rotationMatrix,ht=Ke.position,Ve=Ke.rotation,Je=Ke.scaling,yt=Ke._globalPosition;if(this._depthSort&&this._depthSortParticles){var Wt=this.depthSortedParticles[lt];Wt.idx=Ke.idx,Wt.ind=Ke._ind,Wt.indicesLength=Ke._model._indicesLength,Wt.sqDistance=u.e.DistanceSquared(Ke.position,ue)}if(!Ke.alive||Ke._stillInvisible&&!Ke.isVisible)Le+=3*(Ye=ot.length),Ne+=4*Ye,Fe+=2*Ye;else{if(Ke.isVisible){Ke._stillInvisible=!1;var Nt=F[12];if(Ke.pivot.multiplyToRef(Je,Nt),this.billboard&&(Ve.x=0,Ve.y=0),(this._computeParticleRotation||this.billboard)&&Ke.getRotationMatrix(i),Ke.parentId!==null){var Qt=this.getParticleById(Ke.parentId);if(Qt){var vt=Qt._rotationMatrix,Jt=Qt._globalPosition,Xt=ht.x*vt[1]+ht.y*vt[4]+ht.z*vt[7],zt=ht.x*vt[0]+ht.y*vt[3]+ht.z*vt[6],Yt=ht.x*vt[2]+ht.y*vt[5]+ht.z*vt[8];if(yt.x=Jt.x+zt,yt.y=Jt.y+Xt,yt.z=Jt.z+Yt,this._computeParticleRotation||this.billboard){var Et=i.m;qe[0]=Et[0]*vt[0]+Et[1]*vt[3]+Et[2]*vt[6],qe[1]=Et[0]*vt[1]+Et[1]*vt[4]+Et[2]*vt[7],qe[2]=Et[0]*vt[2]+Et[1]*vt[5]+Et[2]*vt[8],qe[3]=Et[4]*vt[0]+Et[5]*vt[3]+Et[6]*vt[6],qe[4]=Et[4]*vt[1]+Et[5]*vt[4]+Et[6]*vt[7],qe[5]=Et[4]*vt[2]+Et[5]*vt[5]+Et[6]*vt[8],qe[6]=Et[8]*vt[0]+Et[9]*vt[3]+Et[10]*vt[6],qe[7]=Et[8]*vt[1]+Et[9]*vt[4]+Et[10]*vt[7],qe[8]=Et[8]*vt[2]+Et[9]*vt[5]+Et[10]*vt[8]}}else Ke.parentId=null}else yt.x=ht.x,yt.y=ht.y,yt.z=ht.z,(this._computeParticleRotation||this.billboard)&&(Et=i.m,qe[0]=Et[0],qe[1]=Et[1],qe[2]=Et[2],qe[3]=Et[4],qe[4]=Et[5],qe[5]=Et[6],qe[6]=Et[8],qe[7]=Et[9],qe[8]=Et[10]);var Mt=F[11];for(Ke.translateFromPivot?Mt.setAll(0):Mt.copyFrom(Nt),Ye=0;Ye0)for(var e=0;e0&&t.set(this._uvs32,Oe.b.UVKind);var e=0;this._colors32.length>0&&(e=1,t.set(this._colors32,Oe.b.ColorKind));var n=new De.a(this.name,this._scene);t.applyToMesh(n,this._updatable),this.mesh=n,this._positions=null,this._uvs=null,this._colors=null,this._updatable||(this.particles.length=0);var i=new Ft.a("point cloud material",this._scene);return i.emissiveColor=new M.a(e,e,e),i.disableLighting=!0,i.pointsCloud=!0,i.pointSize=this._size,n.material=i,new Promise(function(o){return o(n)})},r.prototype._addParticle=function(t,e,n,i){var o=new Md(t,e,n,i,this);return this.particles.push(o),o},r.prototype._randomUnitVector=function(t){t.position=new u.e(Math.random(),Math.random(),Math.random()),t.color=new M.b(1,1,1,1)},r.prototype._getColorIndicesForCoord=function(t,e,n,i){var o=t._groupImageData,a=n*(4*i)+4*e,s=[a,a+1,a+2,a+3],d=s[1],p=s[2],b=s[3],x=o[s[0]],O=o[d],B=o[p],F=o[b];return new M.b(x/255,O/255,B/255,F)},r.prototype._setPointsColorOrUV=function(t,e,n,i,o,a,s){n&&t.updateFacetData();var d=2*t.getBoundingInfo().boundingSphere.radius,p=t.getVerticesData(Oe.b.PositionKind),b=t.getIndices(),x=t.getVerticesData(Oe.b.UVKind),O=t.getVerticesData(Oe.b.ColorKind),B=u.e.Zero();t.computeWorldMatrix();var F=t.getWorldMatrix();if(!F.isIdentity())for(var z=0;z1&&(Ki=1),(Qi=Kr.b+Xr)<0&&(Qi=0),Qi>1&&(Qi=1),M.a.HSVtoRGBToRef(Yr,Ki,Qi,ur),jt.set(ur.r,ur.g,ur.b,1)):jt=qt.set(Math.random(),Math.random(),Math.random(),1),Nn.color=new M.b(jt.x,jt.y,jt.z,jt.w),this._colors.push(jt.x,jt.y,jt.z,jt.w))}},r.prototype._colorFromTexture=function(t,e,n){var i=this;if(t.material===null)return l.a.Warn(t.name+"has no material."),e._groupImageData=null,void this._setPointsColorOrUV(t,e,n,!0,!1);var o=t.material.getActiveTextures();if(o.length===0)return l.a.Warn(t.name+"has no useable texture."),e._groupImageData=null,void this._setPointsColorOrUV(t,e,n,!0,!1);var a=t.clone();a.setEnabled(!1),this._promises.push(new Promise(function(s){Wn.a.WhenAllReady(o,function(){var d=e._textureNb;return d<0&&(d=0),d>o.length-1&&(d=o.length-1),e._groupImageData=o[d].readPixels(),e._groupImgWidth=o[d].getSize().width,e._groupImgHeight=o[d].getSize().height,i._setPointsColorOrUV(a,e,n,!0,!0),a.dispose(),s()})}))},r.prototype._calculateDensity=function(t,e,n){for(var i,o,a,s,d,p,b,x,O,B,F,z,J,ie,se,ce,ue,fe=new Array,ve=u.e.Zero(),Te=u.e.Zero(),Re=u.e.Zero(),Ae=u.e.Zero(),Ee=u.e.Zero(),Se=u.e.Zero(),Le=new Array,xe=0,Ne=n.length/3,Me=0;Me0&&(fe=fe.map(function(lt){return lt+tt})),Me=0;Me3)&&(a=En.Random);var s=t.getVerticesData(Oe.b.PositionKind),d=t.getIndices();this._groups.push(this._groupCounter);var p=new Aa(this._groupCounter,null);switch(p._groupDensity=this._calculateDensity(e,s,d),a===En.Color?p._textureNb=i||0:i=i||new M.b(1,1,1,1),a){case En.Color:this._colorFromTexture(t,p,!1);break;case En.UV:this._setPointsColorOrUV(t,p,!1,!1,!1);break;case En.Random:this._setPointsColorOrUV(t,p,!1);break;case En.Stated:this._setPointsColorOrUV(t,p,!1,void 0,void 0,i,o)}return this.nbParticles+=e,this._groupCounter++,this._groupCounter-1},r.prototype.addVolumePoints=function(t,e,n,i,o){var a=n||En.Random;(isNaN(a)||a<0||a>3)&&(a=En.Random);var s=t.getVerticesData(Oe.b.PositionKind),d=t.getIndices();this._groups.push(this._groupCounter);var p=new Aa(this._groupCounter,null);switch(p._groupDensity=this._calculateDensity(e,s,d),a===En.Color?p._textureNb=i||0:i=i||new M.b(1,1,1,1),a){case En.Color:this._colorFromTexture(t,p,!0);break;case En.UV:this._setPointsColorOrUV(t,p,!0,!1,!1);break;case En.Random:this._setPointsColorOrUV(t,p,!0);break;case En.Stated:this._setPointsColorOrUV(t,p,!0,void 0,void 0,i,o)}return this.nbParticles+=e,this._groupCounter++,this._groupCounter-1},r.prototype.setParticles=function(t,e,n){if(t===void 0&&(t=0),e===void 0&&(e=this.nbParticles-1),n===void 0&&(n=!0),!this._updatable||!this._isReady)return this;this.beforeUpdateParticles(t,e,n);var i=u.c.Matrix[0],o=this.mesh,a=this._colors32,s=this._positions32,d=this._uvs32,p=u.c.Vector3,b=p[5].copyFromFloats(1,0,0),x=p[6].copyFromFloats(0,1,0),O=p[7].copyFromFloats(0,0,1),B=p[8].setAll(Number.MAX_VALUE),F=p[9].setAll(-Number.MAX_VALUE);u.a.IdentityToRef(i);var z=0;if(this.mesh.isFacetDataEnabled&&(this._computeBoundingBox=!0),e=e>=this.nbParticles?this.nbParticles-1:e,this._computeBoundingBox&&(t!=0||e!=this.nbParticles-1)){var J=this.mesh._boundingInfo;J&&(B.copyFrom(J.minimum),F.copyFrom(J.maximum))}z=0;for(var ie=0,se=0,ce=0,ue=t;ue<=e;ue++){var fe=this.particles[ue];ie=3*(z=fe.idx),se=4*z,ce=2*z,this.updateParticle(fe);var ve=fe._rotationMatrix,Te=fe.position,Re=fe._globalPosition;if(this._computeParticleRotation&&fe.getRotationMatrix(i),fe.parentId!==null){var Ae=this.particles[fe.parentId],Ee=Ae._rotationMatrix,Se=Ae._globalPosition,Le=Te.x*Ee[1]+Te.y*Ee[4]+Te.z*Ee[7],xe=Te.x*Ee[0]+Te.y*Ee[3]+Te.z*Ee[6],Ne=Te.x*Ee[2]+Te.y*Ee[5]+Te.z*Ee[8];if(Re.x=Se.x+xe,Re.y=Se.y+Le,Re.z=Se.z+Ne,this._computeParticleRotation){var Me=i.m;ve[0]=Me[0]*Ee[0]+Me[1]*Ee[3]+Me[2]*Ee[6],ve[1]=Me[0]*Ee[1]+Me[1]*Ee[4]+Me[2]*Ee[7],ve[2]=Me[0]*Ee[2]+Me[1]*Ee[5]+Me[2]*Ee[8],ve[3]=Me[4]*Ee[0]+Me[5]*Ee[3]+Me[6]*Ee[6],ve[4]=Me[4]*Ee[1]+Me[5]*Ee[4]+Me[6]*Ee[7],ve[5]=Me[4]*Ee[2]+Me[5]*Ee[5]+Me[6]*Ee[8],ve[6]=Me[8]*Ee[0]+Me[9]*Ee[3]+Me[10]*Ee[6],ve[7]=Me[8]*Ee[1]+Me[9]*Ee[4]+Me[10]*Ee[7],ve[8]=Me[8]*Ee[2]+Me[9]*Ee[5]+Me[10]*Ee[8]}}else Re.x=0,Re.y=0,Re.z=0,this._computeParticleRotation&&(Me=i.m,ve[0]=Me[0],ve[1]=Me[1],ve[2]=Me[2],ve[3]=Me[4],ve[4]=Me[5],ve[5]=Me[6],ve[6]=Me[8],ve[7]=Me[9],ve[8]=Me[10]);var Fe=p[11];fe.translateFromPivot?Fe.setAll(0):Fe.copyFrom(fe.pivot);var Ye=p[0];Ye.copyFrom(fe.position);var tt=Ye.x-fe.pivot.x,it=Ye.y-fe.pivot.y,lt=Ye.z-fe.pivot.z,Ke=tt*ve[0]+it*ve[3]+lt*ve[6],ot=tt*ve[1]+it*ve[4]+lt*ve[7],rt=tt*ve[2]+it*ve[5]+lt*ve[8];Ke+=Fe.x,ot+=Fe.y,rt+=Fe.z;var qe=s[ie]=Re.x+b.x*Ke+x.x*ot+O.x*rt,ht=s[ie+1]=Re.y+b.y*Ke+x.y*ot+O.y*rt,Ve=s[ie+2]=Re.z+b.z*Ke+x.z*ot+O.z*rt;if(this._computeBoundingBox&&(B.minimizeInPlaceFromFloats(qe,ht,Ve),F.maximizeInPlaceFromFloats(qe,ht,Ve)),this._computeParticleColor&&fe.color){var Je=fe.color,yt=this._colors32;yt[se]=Je.r,yt[se+1]=Je.g,yt[se+2]=Je.b,yt[se+3]=Je.a}if(this._computeParticleTexture&&fe.uv){var Wt=fe.uv,Nt=this._uvs32;Nt[ce]=Wt.x,Nt[ce+1]=Wt.y}}return n&&(this._computeParticleColor&&o.updateVerticesData(Oe.b.ColorKind,a,!1,!1),this._computeParticleTexture&&o.updateVerticesData(Oe.b.UVKind,d,!1,!1),o.updateVerticesData(Oe.b.PositionKind,s,!1,!1)),this._computeBoundingBox&&(o._boundingInfo?o._boundingInfo.reConstruct(B,F,o._worldMatrix):o._boundingInfo=new Ui.a(B,F,o._worldMatrix)),this.afterUpdateParticles(t,e,n),this},r.prototype.dispose=function(){this.mesh.dispose(),this.vars=null,this._positions=null,this._indices=null,this._normals=null,this._uvs=null,this._colors=null,this._indices32=null,this._positions32=null,this._uvs32=null,this._colors32=null},r.prototype.refreshVisibleSize=function(){return this._isVisibilityBoxLocked||this.mesh.refreshBoundingInfo(),this},r.prototype.setVisibilityBox=function(t){var e=t/2;this.mesh._boundingInfo=new Ui.a(new u.e(-e,-e,-e),new u.e(e,e,e))},Object.defineProperty(r.prototype,"isAlwaysVisible",{get:function(){return this._alwaysVisible},set:function(t){this._alwaysVisible=t,this.mesh.alwaysSelectAsActiveMesh=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"computeParticleRotation",{set:function(t){this._computeParticleRotation=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"computeParticleColor",{get:function(){return this._computeParticleColor},set:function(t){this._computeParticleColor=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"computeParticleTexture",{get:function(){return this._computeParticleTexture},set:function(t){this._computeParticleTexture=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"computeBoundingBox",{get:function(){return this._computeBoundingBox},set:function(t){this._computeBoundingBox=t},enumerable:!1,configurable:!0}),r.prototype.initParticles=function(){},r.prototype.recycleParticle=function(t){return t},r.prototype.updateParticle=function(t){return t},r.prototype.beforeUpdateParticles=function(t,e,n){},r.prototype.afterUpdateParticles=function(t,e,n){},r}();_e.a.prototype.getPhysicsEngine=function(){return this._physicsEngine},_e.a.prototype.enablePhysics=function(r,t){if(r===void 0&&(r=null),this._physicsEngine)return!0;var e=this._getComponent(at.a.NAME_PHYSICSENGINE);e||(e=new Id(this),this._addComponent(e));try{return this._physicsEngine=new Ir(r,t),this._physicsTimeAccumulator=0,!0}catch(n){return l.a.Error(n.message),!1}},_e.a.prototype.disablePhysicsEngine=function(){this._physicsEngine&&(this._physicsEngine.dispose(),this._physicsEngine=null)},_e.a.prototype.isPhysicsEnabled=function(){return this._physicsEngine!==void 0},_e.a.prototype.deleteCompoundImpostor=function(r){var t=r.parts[0].mesh;t.physicsImpostor&&(t.physicsImpostor.dispose(),t.physicsImpostor=null)},_e.a.prototype._advancePhysicsEngineStep=function(r){if(this._physicsEngine){var t=this._physicsEngine.getSubTimeStep();if(t>0)for(this._physicsTimeAccumulator+=r;this._physicsTimeAccumulator>t;)this.onBeforePhysicsObservable.notifyObservers(this),this._physicsEngine._step(t/1e3),this.onAfterPhysicsObservable.notifyObservers(this),this._physicsTimeAccumulator-=t;else this.onBeforePhysicsObservable.notifyObservers(this),this._physicsEngine._step(r/1e3),this.onAfterPhysicsObservable.notifyObservers(this)}},Object.defineProperty(Dt.a.prototype,"physicsImpostor",{get:function(){return this._physicsImpostor},set:function(r){var t=this;this._physicsImpostor!==r&&(this._disposePhysicsObserver&&this.onDisposeObservable.remove(this._disposePhysicsObserver),this._physicsImpostor=r,r&&(this._disposePhysicsObserver=this.onDisposeObservable.add(function(){t.physicsImpostor&&(t.physicsImpostor.dispose(),t.physicsImpostor=null)})))},enumerable:!0,configurable:!0}),Dt.a.prototype.getPhysicsImpostor=function(){return this.physicsImpostor},Dt.a.prototype.applyImpulse=function(r,t){return this.physicsImpostor?(this.physicsImpostor.applyImpulse(r,t),this):this},Dt.a.prototype.setPhysicsLinkWith=function(r,t,e,n){return this.physicsImpostor&&r.physicsImpostor?(this.physicsImpostor.createJoint(r.physicsImpostor,en.e.HingeJoint,{mainPivot:t,connectedPivot:e,nativeParams:n}),this):this};var xo,Br,Id=function(){function r(t){var e=this;this.name=at.a.NAME_PHYSICSENGINE,this.scene=t,this.scene.onBeforePhysicsObservable=new R.c,this.scene.onAfterPhysicsObservable=new R.c,this.scene.getDeterministicFrameTime=function(){return e.scene._physicsEngine?1e3*e.scene._physicsEngine.getTimeStep():1e3/60}}return r.prototype.register=function(){},r.prototype.rebuild=function(){},r.prototype.dispose=function(){this.scene.onBeforePhysicsObservable.clear(),this.scene.onAfterPhysicsObservable.clear(),this.scene._physicsEngine&&this.scene.disablePhysicsEngine()},r}(),zm=function(){function r(t){this._scene=t,this._physicsEngine=this._scene.getPhysicsEngine(),this._physicsEngine||l.a.Warn("Physics engine not enabled. Please enable the physics before you can use the methods.")}return r.prototype.applyRadialExplosionImpulse=function(t,e,n,i){if(!this._physicsEngine)return l.a.Warn("Physics engine not enabled. Please enable the physics before you call this method."),null;var o=this._physicsEngine.getImpostors();if(o.length===0)return null;typeof e=="number"&&((e=new Ur).radius=e,e.strength=n||e.strength,e.falloff=i||e.falloff);var a=new Dd(this._scene,e),s=Array();return o.forEach(function(d){var p=a.getImpostorHitData(d,t);p&&(d.applyImpulse(p.force,p.contactPoint),s.push({impostor:d,hitData:p}))}),a.triggerAffectedImpostorsCallback(s),a.dispose(!1),a},r.prototype.applyRadialExplosionForce=function(t,e,n,i){if(!this._physicsEngine)return l.a.Warn("Physics engine not enabled. Please enable the physics before you call the PhysicsHelper."),null;var o=this._physicsEngine.getImpostors();if(o.length===0)return null;typeof e=="number"&&((e=new Ur).radius=e,e.strength=n||e.strength,e.falloff=i||e.falloff);var a=new Dd(this._scene,e),s=Array();return o.forEach(function(d){var p=a.getImpostorHitData(d,t);p&&(d.applyForce(p.force,p.contactPoint),s.push({impostor:d,hitData:p}))}),a.triggerAffectedImpostorsCallback(s),a.dispose(!1),a},r.prototype.gravitationalField=function(t,e,n,i){if(!this._physicsEngine)return l.a.Warn("Physics engine not enabled. Please enable the physics before you call the PhysicsHelper."),null;if(this._physicsEngine.getImpostors().length===0)return null;typeof e=="number"&&((e=new Ur).radius=e,e.strength=n||e.strength,e.falloff=i||e.falloff);var o=new jm(this,this._scene,t,e);return o.dispose(!1),o},r.prototype.updraft=function(t,e,n,i,o){if(!this._physicsEngine)return l.a.Warn("Physics engine not enabled. Please enable the physics before you call the PhysicsHelper."),null;if(this._physicsEngine.getImpostors().length===0)return null;typeof e=="number"&&((e=new Dc).radius=e,e.strength=n||e.strength,e.height=i||e.height,e.updraftMode=o||e.updraftMode);var a=new Hm(this._scene,t,e);return a.dispose(!1),a},r.prototype.vortex=function(t,e,n,i){if(!this._physicsEngine)return l.a.Warn("Physics engine not enabled. Please enable the physics before you call the PhysicsHelper."),null;if(this._physicsEngine.getImpostors().length===0)return null;typeof e=="number"&&((e=new Lc).radius=e,e.strength=n||e.strength,e.height=i||e.height);var o=new Wm(this._scene,t,e);return o.dispose(!1),o},r}(),Dd=function(){function r(t,e){this._scene=t,this._options=e,this._dataFetched=!1,this._options=Object(c.a)(Object(c.a)({},new Ur),this._options)}return r.prototype.getData=function(){return this._dataFetched=!0,{sphere:this._sphere}},r.prototype.getImpostorHitData=function(t,e){if(t.mass===0||!this._intersectsWithSphere(t,e,this._options.radius)||t.object.getClassName()!=="Mesh"&&t.object.getClassName()!=="InstancedMesh")return null;var n=t.getObjectCenter().subtract(e),i=new dn.a(e,n,this._options.radius).intersectsMesh(t.object).pickedPoint;if(!i)return null;var o=u.e.Distance(e,i);if(o>this._options.radius)return null;var a=this._options.falloff===xo.Constant?this._options.strength:this._options.strength*(1-o/this._options.radius);return{force:n.multiplyByFloats(a,a,a),contactPoint:i,distanceFromOrigin:o}},r.prototype.triggerAffectedImpostorsCallback=function(t){this._options.affectedImpostorsCallback&&this._options.affectedImpostorsCallback(t)},r.prototype.dispose=function(t){var e=this;t===void 0&&(t=!0),t?this._sphere.dispose():setTimeout(function(){e._dataFetched||e._sphere.dispose()},0)},r.prototype._prepareSphere=function(){this._sphere||(this._sphere=Un.a.CreateSphere("radialExplosionEventSphere",this._options.sphere,this._scene),this._sphere.isVisible=!1)},r.prototype._intersectsWithSphere=function(t,e,n){var i=t.object;return this._prepareSphere(),this._sphere.position=e,this._sphere.scaling=new u.e(2*n,2*n,2*n),this._sphere._updateBoundingInfo(),this._sphere.computeWorldMatrix(!0),this._sphere.intersectsMesh(i,!0)},r}(),jm=function(){function r(t,e,n,i){this._physicsHelper=t,this._scene=e,this._origin=n,this._options=i,this._dataFetched=!1,this._options=Object(c.a)(Object(c.a)({},new Ur),this._options),this._tickCallback=this._tick.bind(this),this._options.strength=-1*this._options.strength}return r.prototype.getData=function(){return this._dataFetched=!0,{sphere:this._sphere}},r.prototype.enable=function(){this._tickCallback.call(this),this._scene.registerBeforeRender(this._tickCallback)},r.prototype.disable=function(){this._scene.unregisterBeforeRender(this._tickCallback)},r.prototype.dispose=function(t){var e=this;t===void 0&&(t=!0),t?this._sphere.dispose():setTimeout(function(){e._dataFetched||e._sphere.dispose()},0)},r.prototype._tick=function(){if(this._sphere)this._physicsHelper.applyRadialExplosionForce(this._origin,this._options);else{var t=this._physicsHelper.applyRadialExplosionForce(this._origin,this._options);t&&(this._sphere=t.getData().sphere.clone("radialExplosionEventSphereClone"))}},r}(),Hm=function(){function r(t,e,n){this._scene=t,this._origin=e,this._options=n,this._originTop=u.e.Zero(),this._originDirection=u.e.Zero(),this._cylinderPosition=u.e.Zero(),this._dataFetched=!1,this._physicsEngine=this._scene.getPhysicsEngine(),this._options=Object(c.a)(Object(c.a)({},new Dc),this._options),this._origin.addToRef(new u.e(0,this._options.height/2,0),this._cylinderPosition),this._origin.addToRef(new u.e(0,this._options.height,0),this._originTop),this._options.updraftMode===Br.Perpendicular&&(this._originDirection=this._origin.subtract(this._originTop).normalize()),this._tickCallback=this._tick.bind(this),this._prepareCylinder()}return r.prototype.getData=function(){return this._dataFetched=!0,{cylinder:this._cylinder}},r.prototype.enable=function(){this._tickCallback.call(this),this._scene.registerBeforeRender(this._tickCallback)},r.prototype.disable=function(){this._scene.unregisterBeforeRender(this._tickCallback)},r.prototype.dispose=function(t){var e=this;t===void 0&&(t=!0),this._cylinder&&(t?this._cylinder.dispose():setTimeout(function(){e._dataFetched||e._cylinder.dispose()},0))},r.prototype.getImpostorHitData=function(t){if(t.mass===0||!this._intersectsWithCylinder(t))return null;var e=t.getObjectCenter();if(this._options.updraftMode===Br.Perpendicular)var n=this._originDirection;else n=e.subtract(this._originTop);var i=u.e.Distance(this._origin,e),o=-1*this._options.strength;return{force:n.multiplyByFloats(o,o,o),contactPoint:e,distanceFromOrigin:i}},r.prototype._tick=function(){var t=this;this._physicsEngine.getImpostors().forEach(function(e){var n=t.getImpostorHitData(e);n&&e.applyForce(n.force,n.contactPoint)})},r.prototype._prepareCylinder=function(){this._cylinder||(this._cylinder=fi.a.CreateCylinder("updraftEventCylinder",{height:this._options.height,diameter:2*this._options.radius},this._scene),this._cylinder.isVisible=!1)},r.prototype._intersectsWithCylinder=function(t){var e=t.object;return this._cylinder.position=this._cylinderPosition,this._cylinder.intersectsMesh(e,!0)},r}(),Wm=function(){function r(t,e,n){this._scene=t,this._origin=e,this._options=n,this._originTop=u.e.Zero(),this._cylinderPosition=u.e.Zero(),this._dataFetched=!1,this._physicsEngine=this._scene.getPhysicsEngine(),this._options=Object(c.a)(Object(c.a)({},new Lc),this._options),this._origin.addToRef(new u.e(0,this._options.height/2,0),this._cylinderPosition),this._origin.addToRef(new u.e(0,this._options.height,0),this._originTop),this._tickCallback=this._tick.bind(this),this._prepareCylinder()}return r.prototype.getData=function(){return this._dataFetched=!0,{cylinder:this._cylinder}},r.prototype.enable=function(){this._tickCallback.call(this),this._scene.registerBeforeRender(this._tickCallback)},r.prototype.disable=function(){this._scene.unregisterBeforeRender(this._tickCallback)},r.prototype.dispose=function(t){var e=this;t===void 0&&(t=!0),t?this._cylinder.dispose():setTimeout(function(){e._dataFetched||e._cylinder.dispose()},0)},r.prototype.getImpostorHitData=function(t){if(t.mass===0||!this._intersectsWithCylinder(t)||t.object.getClassName()!=="Mesh"&&t.object.getClassName()!=="InstancedMesh")return null;var e=t.getObjectCenter(),n=new u.e(this._origin.x,e.y,this._origin.z),i=e.subtract(n),o=new dn.a(n,i,this._options.radius).intersectsMesh(t.object),a=o.pickedPoint;if(!a)return null;var s=o.distance/this._options.radius,d=a.normalize();if(s>this._options.centripetalForceThreshold&&(d=d.negate()),s>this._options.centripetalForceThreshold)var p=d.x*this._options.centripetalForceMultiplier,b=d.y*this._options.updraftForceMultiplier,x=d.z*this._options.centripetalForceMultiplier;else{var O=u.e.Cross(n,e).normalize();p=(O.x+d.x)*this._options.centrifugalForceMultiplier,b=this._originTop.y*this._options.updraftForceMultiplier,x=(O.z+d.z)*this._options.centrifugalForceMultiplier}var B=new u.e(p,b,x);return{force:B=B.multiplyByFloats(this._options.strength,this._options.strength,this._options.strength),contactPoint:e,distanceFromOrigin:s}},r.prototype._tick=function(){var t=this;this._physicsEngine.getImpostors().forEach(function(e){var n=t.getImpostorHitData(e);n&&e.applyForce(n.force,n.contactPoint)})},r.prototype._prepareCylinder=function(){this._cylinder||(this._cylinder=fi.a.CreateCylinder("vortexEventCylinder",{height:this._options.height,diameter:2*this._options.radius},this._scene),this._cylinder.isVisible=!1)},r.prototype._intersectsWithCylinder=function(t){var e=t.object;return this._cylinder.position=this._cylinderPosition,this._cylinder.intersectsMesh(e,!0)},r}(),Ur=function(){this.radius=5,this.strength=10,this.falloff=xo.Constant,this.sphere={segments:32,diameter:1}},Dc=function(){this.radius=5,this.strength=10,this.height=10,this.updraftMode=Br.Center},Lc=function(){this.radius=5,this.strength=10,this.height=10,this.centripetalForceThreshold=.7,this.centripetalForceMultiplier=5,this.centrifugalForceMultiplier=.5,this.updraftForceMultiplier=.02};(function(r){r[r.Constant=0]="Constant",r[r.Linear=1]="Linear"})(xo||(xo={})),function(r){r[r.Center=0]="Center",r[r.Perpendicular=1]="Perpendicular"}(Br||(Br={}));var Xm=` +varying vec2 vUV; +uniform sampler2D textureSampler; +uniform float degree; +void main(void) +{ +vec3 color=texture2D(textureSampler,vUV).rgb; +float luminance=dot(color,vec3(0.3,0.59,0.11)); +vec3 blackAndWhite=vec3(luminance,luminance,luminance); +gl_FragColor=vec4(color-((color-blackAndWhite)*degree),1.0); +}`;ze.a.ShadersStore.blackAndWhitePixelShader=Xm;var Ld=function(r){function t(e,n,i,o,a,s){var d=r.call(this,e,"blackAndWhite",["degree"],null,n,i,o,a,s)||this;return d.degree=1,d.onApplyObservable.add(function(p){p.setFloat("degree",d.degree)}),d}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"BlackAndWhitePostProcess"},t._Parse=function(e,n,i,o){return L.a.Parse(function(){return new t(e.name,e.options,n,e.renderTargetSamplingMode,i.getEngine(),e.reusable)},e,i,o)},Object(c.c)([Object(L.c)()],t.prototype,"degree",void 0),t}(_t);C.a.RegisteredTypes["BABYLON.BlackAndWhitePostProcess"]=Ld;var Rt=function(){function r(t,e,n,i){this._name=e,this._singleInstance=i||!0,this._getPostProcesses=n,this._cameras={},this._indicesForCamera={},this._postProcesses={}}return Object.defineProperty(r.prototype,"isSupported",{get:function(){for(var t in this._postProcesses)if(this._postProcesses.hasOwnProperty(t)){for(var e=this._postProcesses[t],n=0;n + +varying vec2 vUV; +uniform sampler2D textureSampler; +uniform float threshold; +uniform float exposure; +void main(void) +{ +gl_FragColor=texture2D(textureSampler,vUV); +float luma=getLuminance(gl_FragColor.rgb*exposure); +gl_FragColor.rgb=step(threshold,luma)*gl_FragColor.rgb; +}`;ze.a.ShadersStore.extractHighlightsPixelShader=Ym;var Nc=function(r){function t(e,n,i,o,a,s,d,p){d===void 0&&(d=h.a.TEXTURETYPE_UNSIGNED_INT),p===void 0&&(p=!1);var b=r.call(this,e,"extractHighlights",["threshold","exposure"],null,n,i,o,a,s,null,d,void 0,null,p)||this;return b.threshold=.9,b._exposure=1,b._inputPostProcess=null,b.onApplyObservable.add(function(x){b._inputPostProcess&&x.setTextureFromPostProcess("textureSampler",b._inputPostProcess),x.setFloat("threshold",Math.pow(b.threshold,Gt.b)),x.setFloat("exposure",b._exposure)}),b}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"ExtractHighlightsPostProcess"},Object(c.c)([Object(L.c)()],t.prototype,"threshold",void 0),t}(_t);C.a.RegisteredTypes["BABYLON.ExtractHighlightsPostProcess"]=Nc;var Km=`uniform sampler2D textureSampler; +uniform sampler2D bloomBlur; +varying vec2 vUV; +uniform float bloomWeight; +void main(void) +{ +gl_FragColor=texture2D(textureSampler,vUV); +vec3 blurred=texture2D(bloomBlur,vUV).rgb; +gl_FragColor.rgb=gl_FragColor.rgb+(blurred.rgb*bloomWeight); +} +`;ze.a.ShadersStore.bloomMergePixelShader=Km;var wc=function(r){function t(e,n,i,o,a,s,d,p,b,x,O){x===void 0&&(x=h.a.TEXTURETYPE_UNSIGNED_INT),O===void 0&&(O=!1);var B=r.call(this,e,"bloomMerge",["bloomWeight"],["circleOfConfusionSampler","blurStep0","blurStep1","blurStep2","bloomBlur"],a,s,d,p,b,null,x,void 0,null,!0)||this;return B.weight=1,B.weight=o,B.onApplyObservable.add(function(F){F.setTextureFromPostProcess("textureSampler",n),F.setTextureFromPostProcessOutput("bloomBlur",i),F.setFloat("bloomWeight",B.weight)}),O||B.updateEffect(),B}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"BloomMergePostProcess"},Object(c.c)([Object(L.c)()],t.prototype,"weight",void 0),t}(_t);C.a.RegisteredTypes["BABYLON.BloomMergePostProcess"]=wc;var Fc=function(r){function t(e,n,i,o,a,s){a===void 0&&(a=0),s===void 0&&(s=!1);var d=r.call(this,e.getEngine(),"bloom",function(){return d._effects},!0)||this;return d.bloomScale=n,d._effects=[],d._downscale=new Nc("highlights",1,null,we.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,a,s),d._blurX=new _n("horizontal blur",new u.d(1,0),10,n,null,we.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,a,void 0,s),d._blurX.alwaysForcePOT=!0,d._blurX.autoClear=!1,d._blurY=new _n("vertical blur",new u.d(0,1),10,n,null,we.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,a,void 0,s),d._blurY.alwaysForcePOT=!0,d._blurY.autoClear=!1,d.kernel=o,d._effects=[d._downscale,d._blurX,d._blurY],d._merge=new wc("bloomMerge",d._downscale,d._blurY,i,n,null,we.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,a,s),d._merge.autoClear=!1,d._effects.push(d._merge),d}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"threshold",{get:function(){return this._downscale.threshold},set:function(e){this._downscale.threshold=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"weight",{get:function(){return this._merge.weight},set:function(e){this._merge.weight=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"kernel",{get:function(){return this._blurX.kernel/this.bloomScale},set:function(e){this._blurX.kernel=e*this.bloomScale,this._blurY.kernel=e*this.bloomScale},enumerable:!1,configurable:!0}),t.prototype.disposeEffects=function(e){for(var n=0;n0 +uniform sampler2D blurStep1; +#endif +#if BLUR_LEVEL>1 +uniform sampler2D blurStep2; +#endif +void main(void) +{ +float coc=texture2D(circleOfConfusionSampler,vUV).r; +#if BLUR_LEVEL == 0 +vec4 original=texture2D(textureSampler,vUV); +vec4 blurred0=texture2D(blurStep0,vUV); +gl_FragColor=mix(original,blurred0,coc); +#endif +#if BLUR_LEVEL == 1 +if(coc<0.5){ +vec4 original=texture2D(textureSampler,vUV); +vec4 blurred1=texture2D(blurStep1,vUV); +gl_FragColor=mix(original,blurred1,coc/0.5); +}else{ +vec4 blurred0=texture2D(blurStep0,vUV); +vec4 blurred1=texture2D(blurStep1,vUV); +gl_FragColor=mix(blurred1,blurred0,(coc-0.5)/0.5); +} +#endif +#if BLUR_LEVEL == 2 +if(coc<0.33){ +vec4 original=texture2D(textureSampler,vUV); +vec4 blurred2=texture2D(blurStep2,vUV); +gl_FragColor=mix(original,blurred2,coc/0.33); +}else if(coc<0.66){ +vec4 blurred1=texture2D(blurStep1,vUV); +vec4 blurred2=texture2D(blurStep2,vUV); +gl_FragColor=mix(blurred2,blurred1,(coc-0.33)/0.33); +}else{ +vec4 blurred0=texture2D(blurStep0,vUV); +vec4 blurred1=texture2D(blurStep1,vUV); +gl_FragColor=mix(blurred1,blurred0,(coc-0.66)/0.34); +} +#endif +} +`;ze.a.ShadersStore.depthOfFieldMergePixelShader=$m;var ar,eg=function(){},Fd=function(r){function t(e,n,i,o,a,s,d,p,b,x,O){x===void 0&&(x=h.a.TEXTURETYPE_UNSIGNED_INT),O===void 0&&(O=!1);var B=r.call(this,e,"depthOfFieldMerge",[],["circleOfConfusionSampler","blurStep0","blurStep1","blurStep2"],a,s,d,p,b,null,x,void 0,null,!0)||this;return B.blurSteps=o,B.onApplyObservable.add(function(F){F.setTextureFromPostProcess("textureSampler",n),F.setTextureFromPostProcessOutput("circleOfConfusionSampler",i),o.forEach(function(z,J){F.setTextureFromPostProcessOutput("blurStep"+(o.length-J-1),z)})}),O||B.updateEffect(),B}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"DepthOfFieldMergePostProcess"},t.prototype.updateEffect=function(e,n,i,o,a,s){e===void 0&&(e=null),n===void 0&&(n=null),i===void 0&&(i=null),e||(e="",e+="#define BLUR_LEVEL "+(this.blurSteps.length-1)+` +`),r.prototype.updateEffect.call(this,e,n,i,o,a,s)},t}(_t);(function(r){r[r.Low=0]="Low",r[r.Medium=1]="Medium",r[r.High=2]="High"})(ar||(ar={}));var Vc=function(r){function t(e,n,i,o,a){i===void 0&&(i=ar.Low),o===void 0&&(o=0),a===void 0&&(a=!1);var s=r.call(this,e.getEngine(),"depth of field",function(){return s._effects},!0)||this;s._effects=[],s._circleOfConfusion=new Uc("circleOfConfusion",n,1,null,we.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,o,a),s._depthOfFieldBlurY=[],s._depthOfFieldBlurX=[];var d=1,p=15;switch(i){case ar.High:d=3,p=51;break;case ar.Medium:d=2,p=31;break;default:p=15,d=1}for(var b=p/Math.pow(2,d-1),x=1,O=0;O=edgeVert; +float subpixA=subpixNSWE*2.0+subpixNWSWNESE; +if (!horzSpan) +{ +lumaN=lumaW; +} +if (!horzSpan) +{ +lumaS=lumaE; +} +if (horzSpan) +{ +lengthSign=texelSize.y; +} +float subpixB=(subpixA*(1.0/12.0))-lumaM; +float gradientN=lumaN-lumaM; +float gradientS=lumaS-lumaM; +float lumaNN=lumaN+lumaM; +float lumaSS=lumaS+lumaM; +bool pairN=abs(gradientN)>=abs(gradientS); +float gradient=max(abs(gradientN),abs(gradientS)); +if (pairN) +{ +lengthSign=-lengthSign; +} +float subpixC=clamp(abs(subpixB)*subpixRcpRange,0.0,1.0); +vec2 posB; +posB.x=posM.x; +posB.y=posM.y; +vec2 offNP; +offNP.x=(!horzSpan) ? 0.0 : texelSize.x; +offNP.y=(horzSpan) ? 0.0 : texelSize.y; +if (!horzSpan) +{ +posB.x+=lengthSign*0.5; +} +if (horzSpan) +{ +posB.y+=lengthSign*0.5; +} +vec2 posN; +posN.x=posB.x-offNP.x*1.5; +posN.y=posB.y-offNP.y*1.5; +vec2 posP; +posP.x=posB.x+offNP.x*1.5; +posP.y=posB.y+offNP.y*1.5; +float subpixD=((-2.0)*subpixC)+3.0; +float lumaEndN=FxaaLuma(texture2D(textureSampler,posN,0.0)); +float subpixE=subpixC*subpixC; +float lumaEndP=FxaaLuma(texture2D(textureSampler,posP,0.0)); +if (!pairN) +{ +lumaNN=lumaSS; +} +float gradientScaled=gradient*1.0/4.0; +float lumaMM=lumaM-lumaNN*0.5; +float subpixF=subpixD*subpixE; +bool lumaMLTZero=lumaMM<0.0; +lumaEndN-=lumaNN*0.5; +lumaEndP-=lumaNN*0.5; +bool doneN=abs(lumaEndN)>=gradientScaled; +bool doneP=abs(lumaEndP)>=gradientScaled; +if (!doneN) +{ +posN.x-=offNP.x*3.0; +} +if (!doneN) +{ +posN.y-=offNP.y*3.0; +} +bool doneNP=(!doneN) || (!doneP); +if (!doneP) +{ +posP.x+=offNP.x*3.0; +} +if (!doneP) +{ +posP.y+=offNP.y*3.0; +} +if (doneNP) +{ +if (!doneN) lumaEndN=FxaaLuma(texture2D(textureSampler,posN.xy,0.0)); +if (!doneP) lumaEndP=FxaaLuma(texture2D(textureSampler,posP.xy,0.0)); +if (!doneN) lumaEndN=lumaEndN-lumaNN*0.5; +if (!doneP) lumaEndP=lumaEndP-lumaNN*0.5; +doneN=abs(lumaEndN)>=gradientScaled; +doneP=abs(lumaEndP)>=gradientScaled; +if (!doneN) posN.x-=offNP.x*12.0; +if (!doneN) posN.y-=offNP.y*12.0; +doneNP=(!doneN) || (!doneP); +if (!doneP) posP.x+=offNP.x*12.0; +if (!doneP) posP.y+=offNP.y*12.0; +} +float dstN=posM.x-posN.x; +float dstP=posP.x-posM.x; +if (!horzSpan) +{ +dstN=posM.y-posN.y; +} +if (!horzSpan) +{ +dstP=posP.y-posM.y; +} +bool goodSpanN=(lumaEndN<0.0) != lumaMLTZero; +float spanLength=(dstP+dstN); +bool goodSpanP=(lumaEndP<0.0) != lumaMLTZero; +float spanLengthRcp=1.0/spanLength; +bool directionN=dstN-1?`#define MALI 1 +`:null},t._Parse=function(e,n,i,o){return L.a.Parse(function(){return new t(e.name,e.options,n,e.renderTargetSamplingMode,i.getEngine(),e.reusable)},e,i,o)},t}(_t);C.a.RegisteredTypes["BABYLON.FxaaPostProcess"]=Co;var og=`#include + +uniform sampler2D textureSampler; + +uniform float intensity; +uniform float animatedSeed; + +varying vec2 vUV; +void main(void) +{ +gl_FragColor=texture2D(textureSampler,vUV); +vec2 seed=vUV*(animatedSeed); +float grain=dither(seed,intensity); + +float lum=getLuminance(gl_FragColor.rgb); +float grainAmount=(cos(-PI+(lum*PI*2.))+1.)/2.; +gl_FragColor.rgb+=grain*grainAmount; +gl_FragColor.rgb=max(gl_FragColor.rgb,0.0); +}`;ze.a.ShadersStore.grainPixelShader=og;var kc=function(r){function t(e,n,i,o,a,s,d,p){d===void 0&&(d=h.a.TEXTURETYPE_UNSIGNED_INT),p===void 0&&(p=!1);var b=r.call(this,e,"grain",["intensity","animatedSeed"],[],n,i,o,a,s,null,d,void 0,null,p)||this;return b.intensity=30,b.animated=!1,b.onApplyObservable.add(function(x){x.setFloat("intensity",b.intensity),x.setFloat("animatedSeed",b.animated?Math.random()+1:1)}),b}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"GrainPostProcess"},t._Parse=function(e,n,i,o){return L.a.Parse(function(){return new t(e.name,e.options,n,e.renderTargetSamplingMode,i.getEngine(),e.reusable)},e,i,o)},Object(c.c)([Object(L.c)()],t.prototype,"intensity",void 0),Object(c.c)([Object(L.c)()],t.prototype,"animated",void 0),t}(_t);C.a.RegisteredTypes["BABYLON.GrainPostProcess"]=kc;var ag=` +varying vec2 vUV; +uniform sampler2D textureSampler; +const vec3 RGBLuminanceCoefficients=vec3(0.2126,0.7152,0.0722); +void main(void) +{ +vec4 tex=texture2D(textureSampler,vUV); +vec3 c=tex.rgb; +float luma=dot(c.rgb,RGBLuminanceCoefficients); + + +gl_FragColor=vec4(pow(c,vec3(25.0-luma*15.0)),tex.a); +}`;ze.a.ShadersStore.highlightsPixelShader=ag;var sg=function(r){function t(e,n,i,o,a,s,d){return d===void 0&&(d=h.a.TEXTURETYPE_UNSIGNED_INT),r.call(this,e,"highlights",null,null,n,i,o,a,s,null,d)||this}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"HighlightsPostProcess"},t}(_t);ze.a.IncludesShadersStore.mrtFragmentDeclaration=`#if __VERSION__>=200 +layout(location=0) out vec4 glFragData[{X}]; +#endif +`;var cg=`#extension GL_EXT_draw_buffers : require +#if defined(BUMP) || !defined(NORMAL) +#extension GL_OES_standard_derivatives : enable +#endif +precision highp float; +precision highp int; +#ifdef BUMP +varying mat4 vWorldView; +varying vec3 vNormalW; +#else +varying vec3 vNormalV; +#endif +varying vec4 vViewPos; +#if defined(POSITION) || defined(BUMP) +varying vec3 vPositionW; +#endif +#ifdef VELOCITY +varying vec4 vCurrentPosition; +varying vec4 vPreviousPosition; +#endif +#ifdef NEED_UV +varying vec2 vUV; +#endif +#ifdef BUMP +uniform vec3 vBumpInfos; +uniform vec2 vTangentSpaceParams; +#endif +#ifdef REFLECTIVITY +varying vec2 vReflectivityUV; +uniform sampler2D reflectivitySampler; +#endif +#ifdef ALPHATEST +uniform sampler2D diffuseSampler; +#endif +#include[RENDER_TARGET_COUNT] +#include +#include +void main() { +#ifdef ALPHATEST +if (texture2D(diffuseSampler,vUV).a<0.4) +discard; +#endif +vec3 normalOutput; +#ifdef BUMP +vec3 normalW=normalize(vNormalW); +#include +normalOutput=normalize(vec3(vWorldView*vec4(normalW,0.0))); +#else +normalOutput=normalize(vNormalV); +#endif +#ifdef PREPASS +#ifdef PREPASS_DEPTHNORMAL +gl_FragData[DEPTHNORMAL_INDEX]=vec4(vViewPos.z/vViewPos.w,normalOutput); +#endif +#else +gl_FragData[0]=vec4(vViewPos.z/vViewPos.w,0.0,0.0,1.0); +gl_FragData[1]=vec4(normalOutput,1.0); +#endif +#ifdef POSITION +gl_FragData[POSITION_INDEX]=vec4(vPositionW,1.0); +#endif +#ifdef VELOCITY +vec2 a=(vCurrentPosition.xy/vCurrentPosition.w)*0.5+0.5; +vec2 b=(vPreviousPosition.xy/vPreviousPosition.w)*0.5+0.5; +vec2 velocity=abs(a-b); +velocity=vec2(pow(velocity.x,1.0/3.0),pow(velocity.y,1.0/3.0))*sign(a-b)*0.5+0.5; +gl_FragData[VELOCITY_INDEX]=vec4(velocity,0.0,1.0); +#endif +#ifdef REFLECTIVITY +#ifdef HAS_SPECULAR + +vec4 reflectivity=texture2D(reflectivitySampler,vReflectivityUV); +#elif HAS_REFLECTIVITY + +vec4 reflectivity=vec4(texture2D(reflectivitySampler,vReflectivityUV).rgb,1.0); +#else +vec4 reflectivity=vec4(0.0,0.0,0.0,1.0); +#endif +gl_FragData[REFLECTIVITY_INDEX]=reflectivity; +#endif +}`;ze.a.ShadersStore.geometryPixelShader=cg;var lg=`precision highp float; +precision highp int; +#include +#include +#include[0..maxSimultaneousMorphTargets] +#include +attribute vec3 position; +attribute vec3 normal; +#ifdef NEED_UV +varying vec2 vUV; +#ifdef ALPHATEST +uniform mat4 diffuseMatrix; +#endif +#ifdef BUMP +uniform mat4 bumpMatrix; +varying vec2 vBumpUV; +#endif +#ifdef REFLECTIVITY +uniform mat4 reflectivityMatrix; +varying vec2 vReflectivityUV; +#endif +#ifdef UV1 +attribute vec2 uv; +#endif +#ifdef UV2 +attribute vec2 uv2; +#endif +#endif + +uniform mat4 viewProjection; +uniform mat4 view; +#ifdef BUMP +varying mat4 vWorldView; +#endif +#ifdef BUMP +varying vec3 vNormalW; +#else +varying vec3 vNormalV; +#endif +varying vec4 vViewPos; +#if defined(POSITION) || defined(BUMP) +varying vec3 vPositionW; +#endif +#ifdef VELOCITY +uniform mat4 previousWorld; +uniform mat4 previousViewProjection; +#ifdef BONES_VELOCITY_ENABLED +#if NUM_BONE_INFLUENCERS>0 +uniform mat4 mPreviousBones[BonesPerMesh]; +#endif +#endif +varying vec4 vCurrentPosition; +varying vec4 vPreviousPosition; +#endif +void main(void) +{ +vec3 positionUpdated=position; +vec3 normalUpdated=normal; +#ifdef UV1 +vec2 uvUpdated=uv; +#endif +#include[0..maxSimultaneousMorphTargets] +#include +#if defined(VELOCITY) && !defined(BONES_VELOCITY_ENABLED) + +vCurrentPosition=viewProjection*finalWorld*vec4(positionUpdated,1.0); +vPreviousPosition=previousViewProjection*previousWorld*vec4(positionUpdated,1.0); +#endif +#include +vec4 pos=vec4(finalWorld*vec4(positionUpdated,1.0)); +#ifdef BUMP +vWorldView=view*finalWorld; +vNormalW=normalUpdated; +#else +vNormalV=normalize(vec3((view*finalWorld)*vec4(normalUpdated,0.0))); +#endif +vViewPos=view*pos; +#if defined(VELOCITY) && defined(BONES_VELOCITY_ENABLED) +vCurrentPosition=viewProjection*finalWorld*vec4(positionUpdated,1.0); +#if NUM_BONE_INFLUENCERS>0 +mat4 previousInfluence; +previousInfluence=mPreviousBones[int(matricesIndices[0])]*matricesWeights[0]; +#if NUM_BONE_INFLUENCERS>1 +previousInfluence+=mPreviousBones[int(matricesIndices[1])]*matricesWeights[1]; +#endif +#if NUM_BONE_INFLUENCERS>2 +previousInfluence+=mPreviousBones[int(matricesIndices[2])]*matricesWeights[2]; +#endif +#if NUM_BONE_INFLUENCERS>3 +previousInfluence+=mPreviousBones[int(matricesIndices[3])]*matricesWeights[3]; +#endif +#if NUM_BONE_INFLUENCERS>4 +previousInfluence+=mPreviousBones[int(matricesIndicesExtra[0])]*matricesWeightsExtra[0]; +#endif +#if NUM_BONE_INFLUENCERS>5 +previousInfluence+=mPreviousBones[int(matricesIndicesExtra[1])]*matricesWeightsExtra[1]; +#endif +#if NUM_BONE_INFLUENCERS>6 +previousInfluence+=mPreviousBones[int(matricesIndicesExtra[2])]*matricesWeightsExtra[2]; +#endif +#if NUM_BONE_INFLUENCERS>7 +previousInfluence+=mPreviousBones[int(matricesIndicesExtra[3])]*matricesWeightsExtra[3]; +#endif +vPreviousPosition=previousViewProjection*previousWorld*previousInfluence*vec4(positionUpdated,1.0); +#else +vPreviousPosition=previousViewProjection*previousWorld*vec4(positionUpdated,1.0); +#endif +#endif +#if defined(POSITION) || defined(BUMP) +vPositionW=pos.xyz/pos.w; +#endif +gl_Position=viewProjection*finalWorld*vec4(positionUpdated,1.0); +#ifdef NEED_UV +#ifdef UV1 +#ifdef ALPHATEST +vUV=vec2(diffuseMatrix*vec4(uvUpdated,1.0,0.0)); +#else +vUV=uv; +#endif +#ifdef BUMP +vBumpUV=vec2(bumpMatrix*vec4(uvUpdated,1.0,0.0)); +#endif +#ifdef REFLECTIVITY +vReflectivityUV=vec2(reflectivityMatrix*vec4(uvUpdated,1.0,0.0)); +#endif +#endif +#ifdef UV2 +#ifdef ALPHATEST +vUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0)); +#else +vUV=uv2; +#endif +#ifdef BUMP +vBumpUV=vec2(bumpMatrix*vec4(uv2,1.0,0.0)); +#endif +#ifdef REFLECTIVITY +vReflectivityUV=vec2(reflectivityMatrix*vec4(uv2,1.0,0.0)); +#endif +#endif +#endif +#include +} +`;ze.a.ShadersStore.geometryVertexShader=lg;var li=function(){function r(t,e){e===void 0&&(e=1),this._previousTransformationMatrices={},this._previousBonesTransformationMatrices={},this.excludedSkinnedMeshesFromVelocity=[],this.renderTransparentMeshes=!0,this._resizeObserver=null,this._enablePosition=!1,this._enableVelocity=!1,this._enableReflectivity=!1,this._positionIndex=-1,this._velocityIndex=-1,this._reflectivityIndex=-1,this._depthNormalIndex=-1,this._linkedWithPrePass=!1,this._scene=t,this._ratio=e,r._SceneComponentInitialization(this._scene),this._createRenderTargets()}return r.prototype._linkPrePassRenderer=function(t){this._linkedWithPrePass=!0,this._prePassRenderer=t,this._multiRenderTarget&&(this._multiRenderTarget.onClearObservable.clear(),this._multiRenderTarget.onClearObservable.add(function(e){}))},r.prototype._unlinkPrePassRenderer=function(){this._linkedWithPrePass=!1,this._createRenderTargets()},r.prototype._resetLayout=function(){this._enablePosition=!1,this._enableReflectivity=!1,this._enableVelocity=!1,this._attachments=[]},r.prototype._forceTextureType=function(t,e){t===r.POSITION_TEXTURE_TYPE?(this._positionIndex=e,this._enablePosition=!0):t===r.VELOCITY_TEXTURE_TYPE?(this._velocityIndex=e,this._enableVelocity=!0):t===r.REFLECTIVITY_TEXTURE_TYPE?(this._reflectivityIndex=e,this._enableReflectivity=!0):t===r.DEPTHNORMAL_TEXTURE_TYPE&&(this._depthNormalIndex=e)},r.prototype._setAttachments=function(t){this._attachments=t},r.prototype._linkInternalTexture=function(t){this._multiRenderTarget._texture=t},Object.defineProperty(r.prototype,"renderList",{get:function(){return this._multiRenderTarget.renderList},set:function(t){this._multiRenderTarget.renderList=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isSupported",{get:function(){return this._multiRenderTarget.isSupported},enumerable:!1,configurable:!0}),r.prototype.getTextureIndex=function(t){switch(t){case r.POSITION_TEXTURE_TYPE:return this._positionIndex;case r.VELOCITY_TEXTURE_TYPE:return this._velocityIndex;case r.REFLECTIVITY_TEXTURE_TYPE:return this._reflectivityIndex;default:return-1}},Object.defineProperty(r.prototype,"enablePosition",{get:function(){return this._enablePosition},set:function(t){this._enablePosition=t,this._linkedWithPrePass||(this.dispose(),this._createRenderTargets())},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"enableVelocity",{get:function(){return this._enableVelocity},set:function(t){this._enableVelocity=t,t||(this._previousTransformationMatrices={}),this._linkedWithPrePass||(this.dispose(),this._createRenderTargets())},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"enableReflectivity",{get:function(){return this._enableReflectivity},set:function(t){this._enableReflectivity=t,this._linkedWithPrePass||(this.dispose(),this._createRenderTargets())},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"scene",{get:function(){return this._scene},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"ratio",{get:function(){return this._ratio},enumerable:!1,configurable:!0}),r.prototype.isReady=function(t,e){var n=t.getMaterial();if(n&&n.disableDepthWrite)return!1;var i=[],o=[Oe.b.PositionKind,Oe.b.NormalKind],a=t.getMesh();if(n){var s=!1;n.needAlphaTesting()&&(i.push("#define ALPHATEST"),s=!0),n.bumpTexture&&Ft.a.BumpTextureEnabled&&(i.push("#define BUMP"),i.push("#define BUMPDIRECTUV 0"),s=!0),this._enableReflectivity&&(n instanceof Ft.a&&n.specularTexture?(i.push("#define HAS_SPECULAR"),s=!0):n instanceof co&&n.reflectivityTexture&&(i.push("#define HAS_REFLECTIVITY"),s=!0)),s&&(i.push("#define NEED_UV"),a.isVerticesDataPresent(Oe.b.UVKind)&&(o.push(Oe.b.UVKind),i.push("#define UV1")),a.isVerticesDataPresent(Oe.b.UV2Kind)&&(o.push(Oe.b.UV2Kind),i.push("#define UV2")))}this._linkedWithPrePass&&(i.push("#define PREPASS"),this._depthNormalIndex!==-1&&(i.push("#define DEPTHNORMAL_INDEX "+this._depthNormalIndex),i.push("#define PREPASS_DEPTHNORMAL"))),this._enablePosition&&(i.push("#define POSITION"),i.push("#define POSITION_INDEX "+this._positionIndex)),this._enableVelocity&&(i.push("#define VELOCITY"),i.push("#define VELOCITY_INDEX "+this._velocityIndex),this.excludedSkinnedMeshesFromVelocity.indexOf(a)===-1&&i.push("#define BONES_VELOCITY_ENABLED")),this._enableReflectivity&&(i.push("#define REFLECTIVITY"),i.push("#define REFLECTIVITY_INDEX "+this._reflectivityIndex)),a.useBones&&a.computeBonesUsingShaders?(o.push(Oe.b.MatricesIndicesKind),o.push(Oe.b.MatricesWeightsKind),a.numBoneInfluencers>4&&(o.push(Oe.b.MatricesIndicesExtraKind),o.push(Oe.b.MatricesWeightsExtraKind)),i.push("#define NUM_BONE_INFLUENCERS "+a.numBoneInfluencers),i.push("#define BonesPerMesh "+(a.skeleton?a.skeleton.bones.length+1:0))):i.push("#define NUM_BONE_INFLUENCERS 0");var d=a.morphTargetManager,p=0;d&&d.numInfluencers>0&&(p=d.numInfluencers,i.push("#define MORPHTARGETS"),i.push("#define NUM_MORPH_INFLUENCERS "+p),et.a.PrepareAttributesForMorphTargetsInfluencers(o,a,p)),e&&(i.push("#define INSTANCES"),et.a.PushAttributesForInstances(o),t.getRenderingMesh().hasThinInstances&&i.push("#define THIN_INSTANCES")),this._linkedWithPrePass?i.push("#define RENDER_TARGET_COUNT "+this._attachments.length):i.push("#define RENDER_TARGET_COUNT "+this._multiRenderTarget.textures.length);var b=i.join(` +`);return this._cachedDefines!==b&&(this._cachedDefines=b,this._effect=this._scene.getEngine().createEffect("geometry",o,["world","mBones","viewProjection","diffuseMatrix","view","previousWorld","previousViewProjection","mPreviousBones","morphTargetInfluences","bumpMatrix","reflectivityMatrix","vTangentSpaceParams","vBumpInfos"],["diffuseSampler","bumpSampler","reflectivitySampler"],b,void 0,void 0,void 0,{buffersCount:this._multiRenderTarget.textures.length-1,maxSimultaneousMorphTargets:p})),this._effect.isReady()},r.prototype.getGBuffer=function(){return this._multiRenderTarget},Object.defineProperty(r.prototype,"samples",{get:function(){return this._multiRenderTarget.samples},set:function(t){this._multiRenderTarget.samples=t},enumerable:!1,configurable:!0}),r.prototype.dispose=function(){this._resizeObserver&&(this._scene.getEngine().onResizeObservable.remove(this._resizeObserver),this._resizeObserver=null),this.getGBuffer().dispose()},r.prototype._assignRenderTargetIndices=function(){var t=2;return this._enablePosition&&(this._positionIndex=t,t++),this._enableVelocity&&(this._velocityIndex=t,t++),this._enableReflectivity&&(this._reflectivityIndex=t,t++),t},r.prototype._createRenderTargets=function(){var t=this,e=this._scene.getEngine(),n=this._assignRenderTargetIndices();if(this._multiRenderTarget=new qs("gBuffer",{width:e.getRenderWidth()*this._ratio,height:e.getRenderHeight()*this._ratio},n,this._scene,{generateMipMaps:!1,generateDepthTexture:!0,defaultType:h.a.TEXTURETYPE_FLOAT}),this.isSupported){this._multiRenderTarget.wrapU=we.a.CLAMP_ADDRESSMODE,this._multiRenderTarget.wrapV=we.a.CLAMP_ADDRESSMODE,this._multiRenderTarget.refreshRate=1,this._multiRenderTarget.renderParticles=!1,this._multiRenderTarget.renderList=null,this._multiRenderTarget.onClearObservable.add(function(o){o.clear(new M.b(0,0,0,1),!0,!0,!0)}),this._resizeObserver=e.onResizeObservable.add(function(){t._multiRenderTarget&&t._multiRenderTarget.resize({width:e.getRenderWidth()*t._ratio,height:e.getRenderHeight()*t._ratio})});var i=function(o){var a=o.getRenderingMesh(),s=o.getEffectiveMesh(),d=t._scene,p=d.getEngine(),b=o.getMaterial();if(b){if(s._internalAbstractMeshDataInfo._isActiveIntermediate=!1,t._enableVelocity&&!t._previousTransformationMatrices[s.uniqueId]&&(t._previousTransformationMatrices[s.uniqueId]={world:u.a.Identity(),viewProjection:d.getTransformMatrix()},a.skeleton)){var x=a.skeleton.getTransformMatrices(a);t._previousBonesTransformationMatrices[a.uniqueId]=t._copyBonesTransformationMatrices(x,new Float32Array(x.length))}var O=a._getInstancesRenderList(o._id,!!o.getReplacementMesh());if(!O.mustReturn){var B=p.getCaps().instancedArrays&&(O.visibleInstances[o._id]!==null||a.hasThinInstances),F=s.getWorldMatrix();if(t.isReady(o,B)){if(p.enableEffect(t._effect),a._bind(o,t._effect,b.fillMode),t._effect.setMatrix("viewProjection",d.getTransformMatrix()),t._effect.setMatrix("view",d.getViewMatrix()),b){var z,J=s._instanceDataStorage;if(J.isFrozen||!b.backFaceCulling&&b.overrideMaterialSideOrientation===null)z=J.sideOrientation;else{var ie=s._getWorldMatrixDeterminant();(z=b.overrideMaterialSideOrientation)==null&&(z=b.sideOrientation),ie<0&&(z=z===Ht.a.ClockWiseSideOrientation?Ht.a.CounterClockWiseSideOrientation:Ht.a.ClockWiseSideOrientation)}if(b._preBind(t._effect,z),b.needAlphaTesting()){var se=b.getAlphaTestTexture();se&&(t._effect.setTexture("diffuseSampler",se),t._effect.setMatrix("diffuseMatrix",se.getTextureMatrix()))}b.bumpTexture&&d.getEngine().getCaps().standardDerivatives&&Ft.a.BumpTextureEnabled&&(t._effect.setFloat3("vBumpInfos",b.bumpTexture.coordinatesIndex,1/b.bumpTexture.level,b.parallaxScaleBias),t._effect.setMatrix("bumpMatrix",b.bumpTexture.getTextureMatrix()),t._effect.setTexture("bumpSampler",b.bumpTexture),t._effect.setFloat2("vTangentSpaceParams",b.invertNormalMapX?-1:1,b.invertNormalMapY?-1:1)),t._enableReflectivity&&(b instanceof Ft.a&&b.specularTexture?(t._effect.setMatrix("reflectivityMatrix",b.specularTexture.getTextureMatrix()),t._effect.setTexture("reflectivitySampler",b.specularTexture)):b instanceof co&&b.reflectivityTexture&&(t._effect.setMatrix("reflectivityMatrix",b.reflectivityTexture.getTextureMatrix()),t._effect.setTexture("reflectivitySampler",b.reflectivityTexture)))}a.useBones&&a.computeBonesUsingShaders&&a.skeleton&&(t._effect.setMatrices("mBones",a.skeleton.getTransformMatrices(a)),t._enableVelocity&&t._effect.setMatrices("mPreviousBones",t._previousBonesTransformationMatrices[a.uniqueId])),et.a.BindMorphTargetParameters(a,t._effect),t._enableVelocity&&(t._effect.setMatrix("previousWorld",t._previousTransformationMatrices[s.uniqueId].world),t._effect.setMatrix("previousViewProjection",t._previousTransformationMatrices[s.uniqueId].viewProjection)),a._processRendering(s,o,t._effect,b.fillMode,O,B,function(ce,ue){return t._effect.setMatrix("world",ue)})}t._enableVelocity&&(t._previousTransformationMatrices[s.uniqueId].world=F.clone(),t._previousTransformationMatrices[s.uniqueId].viewProjection=t._scene.getTransformMatrix().clone(),a.skeleton&&t._copyBonesTransformationMatrices(a.skeleton.getTransformMatrices(a),t._previousBonesTransformationMatrices[s.uniqueId]))}}};this._multiRenderTarget.customRenderFunction=function(o,a,s,d){var p;if(t._linkedWithPrePass){if(!t._prePassRenderer.enabled)return;t._scene.getEngine().bindAttachments(t._attachments)}if(d.length){for(e.setColorWrite(!1),p=0;p=samplesCount) +break; +vec2 offset=vUV+velocity*(hlim+float(i)); +result+=texture2D(textureSampler,offset); +} +gl_FragColor=result/float(samplesCount); +gl_FragColor.a=1.0; +#else +vec2 texelSize=1.0/screenSize; +float depth=texture2D(depthSampler,vUV).r; +vec4 cpos=vec4(vUV*2.0-1.0,depth,1.0); +cpos=cpos*inverseViewProjection; +vec4 ppos=cpos*prevViewProjection; +ppos.xyz/=ppos.w; +ppos.xy=ppos.xy*0.5+0.5; +vec2 velocity=(ppos.xy-vUV)*motionScale*motionStrength; +float speed=length(velocity/texelSize); +int nSamples=int(clamp(speed,1.0,SAMPLES)); +vec4 result=texture2D(textureSampler,vUV); +for (int i=1; i=nSamples) +break; +vec2 offset1=vUV+velocity*(float(i)/float(nSamples-1)-0.5); +result+=texture2D(textureSampler,offset1); +} +gl_FragColor=result/float(nSamples); +#endif +#else +gl_FragColor=texture2D(textureSampler,vUV); +#endif +} +`;ze.a.ShadersStore.motionBlurPixelShader=hg;var Gc=function(r){function t(e,n,i,o,a,s,d,p,b,x){p===void 0&&(p=h.a.TEXTURETYPE_UNSIGNED_INT),b===void 0&&(b=!1),x===void 0&&(x=!0);var O=r.call(this,e,"motionBlur",["motionStrength","motionScale","screenSize","inverseViewProjection","prevViewProjection"],["velocitySampler"],i,o,a,s,d,`#define GEOMETRY_SUPPORTED +#define SAMPLES 64.0 +#define OBJECT_BASED`,p,void 0,null,b)||this;return O.motionStrength=1,O._motionBlurSamples=32,O._isObjectBased=!0,O._forceGeometryBuffer=!1,O._geometryBufferRenderer=null,O._prePassRenderer=null,O._invViewProjection=null,O._previousViewProjection=null,O._forceGeometryBuffer=x,O._forceGeometryBuffer?(O._geometryBufferRenderer=n.enableGeometryBufferRenderer(),O._geometryBufferRenderer&&(O._geometryBufferRenderer.enableVelocity=!0)):(O._prePassRenderer=n.enablePrePassRenderer(),O._prePassRenderer&&(O._prePassRenderer.markAsDirty(),O._prePassEffectConfiguration=new ug)),O._applyMode(),O}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"motionBlurSamples",{get:function(){return this._motionBlurSamples},set:function(e){this._motionBlurSamples=e,this._updateEffect()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isObjectBased",{get:function(){return this._isObjectBased},set:function(e){this._isObjectBased!==e&&(this._isObjectBased=e,this._applyMode())},enumerable:!1,configurable:!0}),t.prototype.getClassName=function(){return"MotionBlurPostProcess"},t.prototype.excludeSkinnedMesh=function(e){if(e.skeleton){var n=void 0;if(this._geometryBufferRenderer)n=this._geometryBufferRenderer.excludedSkinnedMeshesFromVelocity;else{if(!this._prePassRenderer)return;n=this._prePassRenderer.excludedSkinnedMesh}n.push(e)}},t.prototype.removeExcludedSkinnedMesh=function(e){if(e.skeleton){var n=void 0;if(this._geometryBufferRenderer)n=this._geometryBufferRenderer.excludedSkinnedMeshesFromVelocity;else{if(!this._prePassRenderer)return;n=this._prePassRenderer.excludedSkinnedMesh}var i=n.indexOf(e);i!==-1&&n.splice(i,1)}},t.prototype.dispose=function(e){this._geometryBufferRenderer&&(this._geometryBufferRenderer._previousTransformationMatrices={},this._geometryBufferRenderer._previousBonesTransformationMatrices={},this._geometryBufferRenderer.excludedSkinnedMeshesFromVelocity=[]),r.prototype.dispose.call(this,e)},t.prototype._applyMode=function(){var e=this;if(!this._geometryBufferRenderer&&!this._prePassRenderer)return l.a.Warn("Multiple Render Target support needed to compute object based motion blur"),this.updateEffect();this._updateEffect(),this._invViewProjection=null,this._previousViewProjection=null,this.isObjectBased?(this._prePassRenderer&&this._prePassEffectConfiguration&&(this._prePassEffectConfiguration.texturesRequired[0]=h.a.PREPASS_VELOCITY_TEXTURE_TYPE),this.onApply=function(n){return e._onApplyObjectBased(n)}):(this._invViewProjection=u.a.Identity(),this._previousViewProjection=u.a.Identity(),this._prePassRenderer&&this._prePassEffectConfiguration&&(this._prePassEffectConfiguration.texturesRequired[0]=h.a.PREPASS_DEPTHNORMAL_TEXTURE_TYPE),this.onApply=function(n){return e._onApplyScreenBased(n)})},t.prototype._onApplyObjectBased=function(e){if(e.setVector2("screenSize",new u.d(this.width,this.height)),e.setFloat("motionScale",this._scene.getAnimationRatio()),e.setFloat("motionStrength",this.motionStrength),this._geometryBufferRenderer){var n=this._geometryBufferRenderer.getTextureIndex(li.VELOCITY_TEXTURE_TYPE);e.setTexture("velocitySampler",this._geometryBufferRenderer.getGBuffer().textures[n])}else this._prePassRenderer&&(n=this._prePassRenderer.getIndex(h.a.PREPASS_VELOCITY_TEXTURE_TYPE),e.setTexture("velocitySampler",this._prePassRenderer.prePassRT.textures[n]))},t.prototype._onApplyScreenBased=function(e){var n=this._scene.getProjectionMatrix().multiply(this._scene.getViewMatrix());if(n.invertToRef(this._invViewProjection),e.setMatrix("inverseViewProjection",this._invViewProjection),e.setMatrix("prevViewProjection",this._previousViewProjection),this._previousViewProjection=n,e.setVector2("screenSize",new u.d(this.width,this.height)),e.setFloat("motionScale",this._scene.getAnimationRatio()),e.setFloat("motionStrength",this.motionStrength),this._geometryBufferRenderer){var i=this._geometryBufferRenderer.getTextureIndex(li.DEPTHNORMAL_TEXTURE_TYPE);e.setTexture("depthSampler",this._geometryBufferRenderer.getGBuffer().textures[i])}else this._prePassRenderer&&(i=this._prePassRenderer.getIndex(h.a.PREPASS_DEPTHNORMAL_TEXTURE_TYPE),e.setTexture("depthSampler",this._prePassRenderer.prePassRT.textures[i]))},t.prototype._updateEffect=function(){if(this._geometryBufferRenderer||this._prePassRenderer){var e=["#define GEOMETRY_SUPPORTED","#define SAMPLES "+this._motionBlurSamples.toFixed(1),this._isObjectBased?"#define OBJECT_BASED":"#define SCREEN_BASED"];this.updateEffect(e.join(` +`))}},t._Parse=function(e,n,i,o){return L.a.Parse(function(){return new t(e.name,i,e.options,n,e.renderTargetSamplingMode,i.getEngine(),e.reusable,e.textureType,!1)},e,i,o)},Object(c.c)([Object(L.c)()],t.prototype,"motionStrength",void 0),Object(c.c)([Object(L.c)()],t.prototype,"motionBlurSamples",null),Object(c.c)([Object(L.c)()],t.prototype,"isObjectBased",null),t}(_t);C.a.RegisteredTypes["BABYLON.MotionBlurPostProcess"]=Gc;var dg=` +varying vec2 vUV; +uniform sampler2D textureSampler; +uniform sampler2D refractionSampler; + +uniform vec3 baseColor; +uniform float depth; +uniform float colorLevel; +void main() { +float ref=1.0-texture2D(refractionSampler,vUV).r; +vec2 uv=vUV-vec2(0.5); +vec2 offset=uv*depth*ref; +vec3 sourceColor=texture2D(textureSampler,vUV-offset).rgb; +gl_FragColor=vec4(sourceColor+sourceColor*ref*colorLevel,1.0); +}`;ze.a.ShadersStore.refractionPixelShader=dg;var kd=function(r){function t(e,n,i,o,a,s,d,p,b,x){var O=r.call(this,e,"refraction",["baseColor","depth","colorLevel"],["refractionSampler"],s,d,p,b,x)||this;return O._ownRefractionTexture=!0,O.color=i,O.depth=o,O.colorLevel=a,O.refractionTextureUrl=n,O.onActivateObservable.add(function(B){O._refTexture=O._refTexture||new we.a(n,B.getScene())}),O.onApplyObservable.add(function(B){B.setColor3("baseColor",O.color),B.setFloat("depth",O.depth),B.setFloat("colorLevel",O.colorLevel),B.setTexture("refractionSampler",O._refTexture)}),O}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"refractionTexture",{get:function(){return this._refTexture},set:function(e){this._refTexture&&this._ownRefractionTexture&&this._refTexture.dispose(),this._refTexture=e,this._ownRefractionTexture=!1},enumerable:!1,configurable:!0}),t.prototype.getClassName=function(){return"RefractionPostProcess"},t.prototype.dispose=function(e){this._refTexture&&this._ownRefractionTexture&&(this._refTexture.dispose(),this._refTexture=null),r.prototype.dispose.call(this,e)},t._Parse=function(e,n,i,o){return L.a.Parse(function(){return new t(e.name,e.refractionTextureUrl,e.color,e.depth,e.colorLevel,e.options,n,e.renderTargetSamplingMode,i.getEngine(),e.reusable)},e,i,o)},Object(c.c)([Object(L.c)()],t.prototype,"color",void 0),Object(c.c)([Object(L.c)()],t.prototype,"depth",void 0),Object(c.c)([Object(L.c)()],t.prototype,"colorLevel",void 0),Object(c.c)([Object(L.c)()],t.prototype,"refractionTextureUrl",void 0),t}(_t);C.a.RegisteredTypes["BABYLON.RefractionPostProcess"]=kd;var fg=` +varying vec2 vUV; +uniform sampler2D textureSampler; +uniform vec2 screenSize; +uniform vec2 sharpnessAmounts; +void main(void) +{ +vec2 onePixel=vec2(1.0,1.0)/screenSize; +vec4 color=texture2D(textureSampler,vUV); +vec4 edgeDetection=texture2D(textureSampler,vUV+onePixel*vec2(0,-1)) + +texture2D(textureSampler,vUV+onePixel*vec2(-1,0)) + +texture2D(textureSampler,vUV+onePixel*vec2(1,0)) + +texture2D(textureSampler,vUV+onePixel*vec2(0,1)) - +color*4.0; +gl_FragColor=max(vec4(color.rgb*sharpnessAmounts.y,color.a)-(sharpnessAmounts.x*vec4(edgeDetection.rgb,0)),0.); +}`;ze.a.ShadersStore.sharpenPixelShader=fg;var zc=function(r){function t(e,n,i,o,a,s,d,p){d===void 0&&(d=h.a.TEXTURETYPE_UNSIGNED_INT),p===void 0&&(p=!1);var b=r.call(this,e,"sharpen",["sharpnessAmounts","screenSize"],null,n,i,o,a,s,null,d,void 0,null,p)||this;return b.colorAmount=1,b.edgeAmount=.3,b.onApply=function(x){x.setFloat2("screenSize",b.width,b.height),x.setFloat2("sharpnessAmounts",b.edgeAmount,b.colorAmount)},b}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"SharpenPostProcess"},t._Parse=function(e,n,i,o){return L.a.Parse(function(){return new t(e.name,e.options,n,e.renderTargetSamplingMode,i.getEngine(),e.textureType,e.reusable)},e,i,o)},Object(c.c)([Object(L.c)()],t.prototype,"colorAmount",void 0),Object(c.c)([Object(L.c)()],t.prototype,"edgeAmount",void 0),t}(_t);C.a.RegisteredTypes["BABYLON.SharpenPostProcess"]=zc;var Vr=function(){function r(t,e){this.engine=t,this._name=e,this._renderEffects={},this._renderEffectsForIsolatedPass=new Array,this._cameras=[]}return Object.defineProperty(r.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"cameras",{get:function(){return this._cameras},enumerable:!1,configurable:!0}),r.prototype.getClassName=function(){return"PostProcessRenderPipeline"},Object.defineProperty(r.prototype,"isSupported",{get:function(){for(var t in this._renderEffects)if(this._renderEffects.hasOwnProperty(t)&&!this._renderEffects[t].isSupported)return!1;return!0},enumerable:!1,configurable:!0}),r.prototype.addEffect=function(t){this._renderEffects[t._name]=t},r.prototype._rebuild=function(){},r.prototype._enableEffect=function(t,e){var n=this._renderEffects[t];n&&n._enable(Xe.b.MakeArray(e||this._cameras))},r.prototype._disableEffect=function(t,e){var n=this._renderEffects[t];n&&n._disable(Xe.b.MakeArray(e||this._cameras))},r.prototype._attachCameras=function(t,e){var n=Xe.b.MakeArray(t||this._cameras);if(n){var i,o=[];for(i=0;i0){var n=this._renderEffects[e[0]].getPostProcesses();n&&(n[0].samples=t)}return!0},r.prototype.setPrePassRenderer=function(t){return!1},r.prototype.dispose=function(){},Object(c.c)([Object(L.c)()],r.prototype,"_name",void 0),r}(),Gd=function(){function r(){this._renderPipelines={}}return Object.defineProperty(r.prototype,"supportedPipelines",{get:function(){var t=[];for(var e in this._renderPipelines)if(this._renderPipelines.hasOwnProperty(e)){var n=this._renderPipelines[e];n.isSupported&&t.push(n)}return t},enumerable:!1,configurable:!0}),r.prototype.addPipeline=function(t){this._renderPipelines[t._name]=t},r.prototype.attachCamerasToRenderPipeline=function(t,e,n){n===void 0&&(n=!1);var i=this._renderPipelines[t];i&&i._attachCameras(e,n)},r.prototype.detachCamerasFromRenderPipeline=function(t,e){var n=this._renderPipelines[t];n&&n._detachCameras(e)},r.prototype.enableEffectInPipeline=function(t,e,n){var i=this._renderPipelines[t];i&&i._enableEffect(e,n)},r.prototype.disableEffectInPipeline=function(t,e,n){var i=this._renderPipelines[t];i&&i._disableEffect(e,n)},r.prototype.update=function(){for(var t in this._renderPipelines)if(this._renderPipelines.hasOwnProperty(t)){var e=this._renderPipelines[t];e.isSupported?e._update():(e.dispose(),delete this._renderPipelines[t])}},r.prototype._rebuild=function(){for(var t in this._renderPipelines)this._renderPipelines.hasOwnProperty(t)&&this._renderPipelines[t]._rebuild()},r.prototype.dispose=function(){for(var t in this._renderPipelines)this._renderPipelines.hasOwnProperty(t)&&this._renderPipelines[t].dispose()},r}();Object.defineProperty(_e.a.prototype,"postProcessRenderPipelineManager",{get:function(){if(!this._postProcessRenderPipelineManager){var r=this._getComponent(at.a.NAME_POSTPROCESSRENDERPIPELINEMANAGER);r||(r=new zd(this),this._addComponent(r)),this._postProcessRenderPipelineManager=new Gd}return this._postProcessRenderPipelineManager},enumerable:!0,configurable:!0});var zd=function(){function r(t){this.name=at.a.NAME_POSTPROCESSRENDERPIPELINEMANAGER,this.scene=t}return r.prototype.register=function(){this.scene._gatherRenderTargetsStage.registerStep(at.a.STEP_GATHERRENDERTARGETS_POSTPROCESSRENDERPIPELINEMANAGER,this,this._gatherRenderTargets)},r.prototype.rebuild=function(){this.scene._postProcessRenderPipelineManager&&this.scene._postProcessRenderPipelineManager._rebuild()},r.prototype.dispose=function(){this.scene._postProcessRenderPipelineManager&&this.scene._postProcessRenderPipelineManager.dispose()},r.prototype._gatherRenderTargets=function(){this.scene._postProcessRenderPipelineManager&&this.scene._postProcessRenderPipelineManager.update()},r}(),jd=function(r){function t(e,n,i,o,a){e===void 0&&(e=""),n===void 0&&(n=!0),i===void 0&&(i=te.a.LastCreatedScene),a===void 0&&(a=!0);var s=r.call(this,i.getEngine(),e)||this;s._camerasToBeAttached=[],s.SharpenPostProcessId="SharpenPostProcessEffect",s.ImageProcessingPostProcessId="ImageProcessingPostProcessEffect",s.FxaaPostProcessId="FxaaPostProcessEffect",s.ChromaticAberrationPostProcessId="ChromaticAberrationPostProcessEffect",s.GrainPostProcessId="GrainPostProcessEffect",s._glowLayer=null,s.animations=[],s._imageProcessingConfigurationObserver=null,s._sharpenEnabled=!1,s._bloomEnabled=!1,s._depthOfFieldEnabled=!1,s._depthOfFieldBlurLevel=ar.Low,s._fxaaEnabled=!1,s._imageProcessingEnabled=!0,s._bloomScale=.5,s._chromaticAberrationEnabled=!1,s._grainEnabled=!1,s._buildAllowed=!0,s.onBuildObservable=new R.c,s._resizeObserver=null,s._hardwareScaleLevel=1,s._bloomKernel=64,s._bloomWeight=.15,s._bloomThreshold=.9,s._samples=1,s._hasCleared=!1,s._prevPostProcess=null,s._prevPrevPostProcess=null,s._depthOfFieldSceneObserver=null,s._cameras=o||i.cameras,s._cameras=s._cameras.slice(),s._camerasToBeAttached=s._cameras.slice(),s._buildAllowed=a,s._scene=i;var d=s._scene.getEngine().getCaps();s._hdr=n&&(d.textureHalfFloatRender||d.textureFloatRender),s._hdr?d.textureHalfFloatRender?s._defaultPipelineTextureType=h.a.TEXTURETYPE_HALF_FLOAT:d.textureFloatRender&&(s._defaultPipelineTextureType=h.a.TEXTURETYPE_FLOAT):s._defaultPipelineTextureType=h.a.TEXTURETYPE_UNSIGNED_INT,i.postProcessRenderPipelineManager.addPipeline(s);var p=s._scene.getEngine();return s.sharpen=new zc("sharpen",1,null,we.a.BILINEAR_SAMPLINGMODE,p,!1,s._defaultPipelineTextureType,!0),s._sharpenEffect=new Rt(p,s.SharpenPostProcessId,function(){return s.sharpen},!0),s.depthOfField=new Vc(s._scene,null,s._depthOfFieldBlurLevel,s._defaultPipelineTextureType,!0),s.bloom=new Fc(s._scene,s._bloomScale,s._bloomWeight,s.bloomKernel,s._defaultPipelineTextureType,!0),s.chromaticAberration=new Bc("ChromaticAberration",p.getRenderWidth(),p.getRenderHeight(),1,null,we.a.BILINEAR_SAMPLINGMODE,p,!1,s._defaultPipelineTextureType,!0),s._chromaticAberrationEffect=new Rt(p,s.ChromaticAberrationPostProcessId,function(){return s.chromaticAberration},!0),s.grain=new kc("Grain",1,null,we.a.BILINEAR_SAMPLINGMODE,p,!1,s._defaultPipelineTextureType,!0),s._grainEffect=new Rt(p,s.GrainPostProcessId,function(){return s.grain},!0),s._resizeObserver=p.onResizeObservable.add(function(){s._hardwareScaleLevel=p.getHardwareScalingLevel(),s.bloomKernel=s.bloomKernel}),s._imageProcessingConfigurationObserver=s._scene.imageProcessingConfiguration.onUpdateParameters.add(function(){s.bloom._downscale._exposure=s._scene.imageProcessingConfiguration.exposure,s.imageProcessingEnabled!==s._scene.imageProcessingConfiguration.isEnabled&&(s._imageProcessingEnabled=s._scene.imageProcessingConfiguration.isEnabled,s._buildPipeline())}),s._buildPipeline(),s}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"scene",{get:function(){return this._scene},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sharpenEnabled",{get:function(){return this._sharpenEnabled},set:function(e){this._sharpenEnabled!==e&&(this._sharpenEnabled=e,this._buildPipeline())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bloomKernel",{get:function(){return this._bloomKernel},set:function(e){this._bloomKernel=e,this.bloom.kernel=e/this._hardwareScaleLevel},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bloomWeight",{get:function(){return this._bloomWeight},set:function(e){this._bloomWeight!==e&&(this.bloom.weight=e,this._bloomWeight=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bloomThreshold",{get:function(){return this._bloomThreshold},set:function(e){this._bloomThreshold!==e&&(this.bloom.threshold=e,this._bloomThreshold=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bloomScale",{get:function(){return this._bloomScale},set:function(e){this._bloomScale!==e&&(this._bloomScale=e,this._rebuildBloom(),this._buildPipeline())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bloomEnabled",{get:function(){return this._bloomEnabled},set:function(e){this._bloomEnabled!==e&&(this._bloomEnabled=e,this._buildPipeline())},enumerable:!1,configurable:!0}),t.prototype._rebuildBloom=function(){var e=this.bloom;this.bloom=new Fc(this._scene,this.bloomScale,this._bloomWeight,this.bloomKernel,this._defaultPipelineTextureType,!1),this.bloom.threshold=e.threshold;for(var n=0;n1){for(var i=0,o=this._cameras;i-1&&(e.depthOfField.depthTexture=d.enableDepthRenderer(d.activeCamera).getDepthMap())})}else{this._scene.onAfterRenderTargetsRenderObservable.remove(this._depthOfFieldSceneObserver);var s=this._scene.enableDepthRenderer(this._cameras[0]);this.depthOfField.depthTexture=s.getDepthMap()}this.depthOfField._isReady()||this.depthOfField._updateEffects(),this.addEffect(this.depthOfField),this._setAutoClearAndTextureSharing(this.depthOfField._effects[0],!0)}else this._scene.onAfterRenderTargetsRenderObservable.remove(this._depthOfFieldSceneObserver);this.bloomEnabled&&(this.bloom._isReady()||this.bloom._updateEffects(),this.addEffect(this.bloom),this._setAutoClearAndTextureSharing(this.bloom._effects[0],!0)),this._imageProcessingEnabled&&(this.imageProcessing=new zo("imageProcessing",1,null,we.a.BILINEAR_SAMPLINGMODE,n,!1,this._defaultPipelineTextureType),this._hdr?(this.addEffect(new Rt(n,this.ImageProcessingPostProcessId,function(){return e.imageProcessing},!0)),this._setAutoClearAndTextureSharing(this.imageProcessing)):this._scene.imageProcessingConfiguration.applyByPostProcess=!1,this.cameras&&this.cameras.length!==0||(this._scene.imageProcessingConfiguration.applyByPostProcess=!1),this.imageProcessing.getEffect()||this.imageProcessing._updateParameters()),this.sharpenEnabled&&(this.sharpen.isReady()||this.sharpen.updateEffect(),this.addEffect(this._sharpenEffect),this._setAutoClearAndTextureSharing(this.sharpen)),this.grainEnabled&&(this.grain.isReady()||this.grain.updateEffect(),this.addEffect(this._grainEffect),this._setAutoClearAndTextureSharing(this.grain)),this.chromaticAberrationEnabled&&(this.chromaticAberration.isReady()||this.chromaticAberration.updateEffect(),this.addEffect(this._chromaticAberrationEffect),this._setAutoClearAndTextureSharing(this.chromaticAberration)),this.fxaaEnabled&&(this.fxaa=new Co("fxaa",1,null,we.a.BILINEAR_SAMPLINGMODE,n,!1,this._defaultPipelineTextureType),this.addEffect(new Rt(n,this.FxaaPostProcessId,function(){return e.fxaa},!0)),this._setAutoClearAndTextureSharing(this.fxaa,!0)),this._cameras!==null&&this._scene.postProcessRenderPipelineManager.attachCamerasToRenderPipeline(this._name,this._cameras),this._scene.activeCameras&&this._scene.activeCameras.length>1&&(this._scene.autoClear=!0),!this._enableMSAAOnFirstPostProcess(this.samples)&&this.samples>1&&l.a.Warn("MSAA failed to enable, MSAA is only supported in browsers that support webGL >= 2.0"),this.onBuildObservable.notifyObservers(this)}},t.prototype._disposePostProcesses=function(e){e===void 0&&(e=!1);for(var n=0;n1.0) { lum_threshold=0.94+0.01*threshold; } +else { lum_threshold=0.5+0.44*threshold; } +luminance=clamp((luminance-lum_threshold)*(1.0/(1.0-lum_threshold)),0.0,1.0); +highlight*=luminance*gain; +highlight.a=1.0; +return highlight; +} +void main(void) +{ +vec4 original=texture2D(textureSampler,vUV); + +if (gain == -1.0) { +gl_FragColor=vec4(0.0,0.0,0.0,1.0); +return; +} +float w=2.0/screen_width; +float h=2.0/screen_height; +float weight=1.0; + +vec4 blurred=vec4(0.0,0.0,0.0,0.0); +#ifdef PENTAGON +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.84*w,0.43*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(0.48*w,-1.29*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(0.61*w,1.51*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.55*w,-0.74*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.71*w,-0.52*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.94*w,1.59*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.40*w,-1.87*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.62*w,1.16*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.09*w,0.25*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.46*w,-1.71*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(0.08*w,2.42*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.85*w,-1.89*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.89*w,0.16*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.29*w,1.88*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(0.40*w,-2.81*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.54*w,2.26*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.60*w,-0.61*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.31*w,-1.30*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.83*w,2.53*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.12*w,-2.48*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.60*w,1.11*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.82*w,0.99*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.50*w,-2.81*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(0.85*w,3.33*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.94*w,-1.92*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(3.27*w,-0.53*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.95*w,2.48*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.23*w,-3.04*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.17*w,2.05*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.97*w,-0.04*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.25*w,-2.00*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.31*w,3.08*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.94*w,-2.59*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(3.37*w,0.64*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-3.13*w,1.93*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.03*w,-3.65*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.60*w,3.17*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-3.14*w,-1.19*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(3.00*w,-1.19*h))); +#else +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.85*w,0.36*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(0.52*w,-1.14*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(0.46*w,1.42*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.46*w,-0.83*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.79*w,-0.42*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.11*w,1.62*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.29*w,-2.07*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.69*w,1.39*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.28*w,0.12*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.65*w,-1.69*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.08*w,2.44*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.63*w,-1.90*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.55*w,0.31*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.13*w,1.52*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(0.56*w,-2.61*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.38*w,2.34*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.64*w,-0.81*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.53*w,-1.21*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.06*w,2.63*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.00*w,-2.69*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.59*w,1.32*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.82*w,0.78*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.57*w,-2.50*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(0.54*w,2.93*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.39*w,-1.81*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(3.01*w,-0.28*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.04*w,2.25*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.02*w,-3.05*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.09*w,2.25*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-3.07*w,-0.25*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.44*w,-1.90*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.52*w,3.05*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.68*w,-2.61*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(3.01*w,0.79*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.76*w,1.46*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.05*w,-2.94*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.21*w,2.88*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.84*w,-1.30*h))); +blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.98*w,-0.96*h))); +#endif +blurred/=39.0; +gl_FragColor=blurred; + +}`;ze.a.ShadersStore.lensHighlightsPixelShader=pg;var _g=` + + + + +uniform sampler2D textureSampler; +uniform sampler2D highlightsSampler; +uniform sampler2D depthSampler; +uniform sampler2D grainSampler; + +uniform float grain_amount; +uniform bool blur_noise; +uniform float screen_width; +uniform float screen_height; +uniform float distortion; +uniform bool dof_enabled; + +uniform float screen_distance; +uniform float aperture; +uniform float darken; +uniform float edge_blur; +uniform bool highlights; + +uniform float near; +uniform float far; + +varying vec2 vUV; + +#define PI 3.14159265 +#define TWOPI 6.28318530 +#define inverse_focal_length 0.1 + +vec2 centered_screen_pos; +vec2 distorted_coords; +float radius2; +float radius; + +vec2 rand(vec2 co) +{ +float noise1=(fract(sin(dot(co,vec2(12.9898,78.233)))*43758.5453)); +float noise2=(fract(sin(dot(co,vec2(12.9898,78.233)*2.0))*43758.5453)); +return clamp(vec2(noise1,noise2),0.0,1.0); +} + +vec2 getDistortedCoords(vec2 coords) { +if (distortion == 0.0) { return coords; } +vec2 direction=1.0*normalize(centered_screen_pos); +vec2 dist_coords=vec2(0.5,0.5); +dist_coords.x=0.5+direction.x*radius2*1.0; +dist_coords.y=0.5+direction.y*radius2*1.0; +float dist_amount=clamp(distortion*0.23,0.0,1.0); +dist_coords=mix(coords,dist_coords,dist_amount); +return dist_coords; +} + +float sampleScreen(inout vec4 color,const in vec2 offset,const in float weight) { + +vec2 coords=distorted_coords; +float angle=rand(coords*100.0).x*TWOPI; +coords+=vec2(offset.x*cos(angle)-offset.y*sin(angle),offset.x*sin(angle)+offset.y*cos(angle)); +color+=texture2D(textureSampler,coords)*weight; +return weight; +} + +float getBlurLevel(float size) { +return min(3.0,ceil(size/1.0)); +} + +vec4 getBlurColor(float size) { +vec4 col=texture2D(textureSampler,distorted_coords); +if (size == 0.0) { return col; } + + +float blur_level=getBlurLevel(size); +float w=(size/screen_width); +float h=(size/screen_height); +float total_weight=1.0; +vec2 sample_coords; +total_weight+=sampleScreen(col,vec2(-0.50*w,0.24*h),0.93); +total_weight+=sampleScreen(col,vec2(0.30*w,-0.75*h),0.90); +total_weight+=sampleScreen(col,vec2(0.36*w,0.96*h),0.87); +total_weight+=sampleScreen(col,vec2(-1.08*w,-0.55*h),0.85); +total_weight+=sampleScreen(col,vec2(1.33*w,-0.37*h),0.83); +total_weight+=sampleScreen(col,vec2(-0.82*w,1.31*h),0.80); +total_weight+=sampleScreen(col,vec2(-0.31*w,-1.67*h),0.78); +total_weight+=sampleScreen(col,vec2(1.47*w,1.11*h),0.76); +total_weight+=sampleScreen(col,vec2(-1.97*w,0.19*h),0.74); +total_weight+=sampleScreen(col,vec2(1.42*w,-1.57*h),0.72); +if (blur_level>1.0) { +total_weight+=sampleScreen(col,vec2(0.01*w,2.25*h),0.70); +total_weight+=sampleScreen(col,vec2(-1.62*w,-1.74*h),0.67); +total_weight+=sampleScreen(col,vec2(2.49*w,0.20*h),0.65); +total_weight+=sampleScreen(col,vec2(-2.07*w,1.61*h),0.63); +total_weight+=sampleScreen(col,vec2(0.46*w,-2.70*h),0.61); +total_weight+=sampleScreen(col,vec2(1.55*w,2.40*h),0.59); +total_weight+=sampleScreen(col,vec2(-2.88*w,-0.75*h),0.56); +total_weight+=sampleScreen(col,vec2(2.73*w,-1.44*h),0.54); +total_weight+=sampleScreen(col,vec2(-1.08*w,3.02*h),0.52); +total_weight+=sampleScreen(col,vec2(-1.28*w,-3.05*h),0.49); +} +if (blur_level>2.0) { +total_weight+=sampleScreen(col,vec2(3.11*w,1.43*h),0.46); +total_weight+=sampleScreen(col,vec2(-3.36*w,1.08*h),0.44); +total_weight+=sampleScreen(col,vec2(1.80*w,-3.16*h),0.41); +total_weight+=sampleScreen(col,vec2(0.83*w,3.65*h),0.38); +total_weight+=sampleScreen(col,vec2(-3.16*w,-2.19*h),0.34); +total_weight+=sampleScreen(col,vec2(3.92*w,-0.53*h),0.31); +total_weight+=sampleScreen(col,vec2(-2.59*w,3.12*h),0.26); +total_weight+=sampleScreen(col,vec2(-0.20*w,-4.15*h),0.22); +total_weight+=sampleScreen(col,vec2(3.02*w,3.00*h),0.15); +} +col/=total_weight; + +if (darken>0.0) { +col.rgb*=clamp(0.3,1.0,1.05-size*0.5*darken); +} + + + + +return col; +} +void main(void) +{ + +centered_screen_pos=vec2(vUV.x-0.5,vUV.y-0.5); +radius2=centered_screen_pos.x*centered_screen_pos.x+centered_screen_pos.y*centered_screen_pos.y; +radius=sqrt(radius2); +distorted_coords=getDistortedCoords(vUV); +vec2 texels_coords=vec2(vUV.x*screen_width,vUV.y*screen_height); +float depth=texture2D(depthSampler,distorted_coords).r; +float distance=near+(far-near)*depth; +vec4 color=texture2D(textureSampler,vUV); + + +float coc=abs(aperture*(screen_distance*(inverse_focal_length-1.0/distance)-1.0)); + +if (dof_enabled == false || coc<0.07) { coc=0.0; } + +float edge_blur_amount=0.0; +if (edge_blur>0.0) { +edge_blur_amount=clamp((radius*2.0-1.0+0.15*edge_blur)*1.5,0.0,1.0)*1.3; +} + +float blur_amount=max(edge_blur_amount,coc); + +if (blur_amount == 0.0) { +gl_FragColor=texture2D(textureSampler,distorted_coords); +} +else { + +gl_FragColor=getBlurColor(blur_amount*1.7); + +if (highlights) { +gl_FragColor.rgb+=clamp(coc,0.0,1.0)*texture2D(highlightsSampler,distorted_coords).rgb; +} +if (blur_noise) { + +vec2 noise=rand(distorted_coords)*0.01*blur_amount; +vec2 blurred_coord=vec2(distorted_coords.x+noise.x,distorted_coords.y+noise.y); +gl_FragColor=0.04*texture2D(textureSampler,blurred_coord)+0.96*gl_FragColor; +} +} + +if (grain_amount>0.0) { +vec4 grain_color=texture2D(grainSampler,texels_coords*0.003); +gl_FragColor.rgb+=(-0.5+grain_color.rgb)*0.30*grain_amount; +} +} +`;ze.a.ShadersStore.depthOfFieldPixelShader=_g;var mg=function(r){function t(e,n,i,o,a){o===void 0&&(o=1);var s=r.call(this,i.getEngine(),e)||this;return s.LensChromaticAberrationEffect="LensChromaticAberrationEffect",s.HighlightsEnhancingEffect="HighlightsEnhancingEffect",s.LensDepthOfFieldEffect="LensDepthOfFieldEffect",s._pentagonBokehIsEnabled=!1,s._scene=i,s._depthTexture=i.enableDepthRenderer().getDepthMap(),n.grain_texture?s._grainTexture=n.grain_texture:s._createGrainTexture(),s._edgeBlur=n.edge_blur?n.edge_blur:0,s._grainAmount=n.grain_amount?n.grain_amount:0,s._chromaticAberration=n.chromatic_aberration?n.chromatic_aberration:0,s._distortion=n.distortion?n.distortion:0,s._highlightsGain=n.dof_gain!==void 0?n.dof_gain:-1,s._highlightsThreshold=n.dof_threshold?n.dof_threshold:1,s._dofDistance=n.dof_focus_distance!==void 0?n.dof_focus_distance:-1,s._dofAperture=n.dof_aperture?n.dof_aperture:1,s._dofDarken=n.dof_darken?n.dof_darken:0,s._dofPentagon=n.dof_pentagon===void 0||n.dof_pentagon,s._blurNoise=n.blur_noise===void 0||n.blur_noise,s._createChromaticAberrationPostProcess(o),s._createHighlightsPostProcess(o),s._createDepthOfFieldPostProcess(o/4),s.addEffect(new Rt(i.getEngine(),s.LensChromaticAberrationEffect,function(){return s._chromaticAberrationPostProcess},!0)),s.addEffect(new Rt(i.getEngine(),s.HighlightsEnhancingEffect,function(){return s._highlightsPostProcess},!0)),s.addEffect(new Rt(i.getEngine(),s.LensDepthOfFieldEffect,function(){return s._depthOfFieldPostProcess},!0)),s._highlightsGain===-1&&s._disableEffect(s.HighlightsEnhancingEffect,null),i.postProcessRenderPipelineManager.addPipeline(s),a&&i.postProcessRenderPipelineManager.attachCamerasToRenderPipeline(e,a),s}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"LensRenderingPipeline"},Object.defineProperty(t.prototype,"scene",{get:function(){return this._scene},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"edgeBlur",{get:function(){return this._edgeBlur},set:function(e){this.setEdgeBlur(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"grainAmount",{get:function(){return this._grainAmount},set:function(e){this.setGrainAmount(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"chromaticAberration",{get:function(){return this._chromaticAberration},set:function(e){this.setChromaticAberration(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dofAperture",{get:function(){return this._dofAperture},set:function(e){this.setAperture(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"edgeDistortion",{get:function(){return this._distortion},set:function(e){this.setEdgeDistortion(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dofDistortion",{get:function(){return this._dofDistance},set:function(e){this.setFocusDistance(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"darkenOutOfFocus",{get:function(){return this._dofDarken},set:function(e){this.setDarkenOutOfFocus(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"blurNoise",{get:function(){return this._blurNoise},set:function(e){this._blurNoise=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pentagonBokeh",{get:function(){return this._pentagonBokehIsEnabled},set:function(e){e?this.enablePentagonBokeh():this.disablePentagonBokeh()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"highlightsGain",{get:function(){return this._highlightsGain},set:function(e){this.setHighlightsGain(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"highlightsThreshold",{get:function(){return this._highlightsThreshold},set:function(e){this.setHighlightsThreshold(e)},enumerable:!1,configurable:!0}),t.prototype.setEdgeBlur=function(e){this._edgeBlur=e},t.prototype.disableEdgeBlur=function(){this._edgeBlur=0},t.prototype.setGrainAmount=function(e){this._grainAmount=e},t.prototype.disableGrain=function(){this._grainAmount=0},t.prototype.setChromaticAberration=function(e){this._chromaticAberration=e},t.prototype.disableChromaticAberration=function(){this._chromaticAberration=0},t.prototype.setEdgeDistortion=function(e){this._distortion=e},t.prototype.disableEdgeDistortion=function(){this._distortion=0},t.prototype.setFocusDistance=function(e){this._dofDistance=e},t.prototype.disableDepthOfField=function(){this._dofDistance=-1},t.prototype.setAperture=function(e){this._dofAperture=e},t.prototype.setDarkenOutOfFocus=function(e){this._dofDarken=e},t.prototype.enablePentagonBokeh=function(){this._highlightsPostProcess.updateEffect(`#define PENTAGON +`),this._pentagonBokehIsEnabled=!0},t.prototype.disablePentagonBokeh=function(){this._pentagonBokehIsEnabled=!1,this._highlightsPostProcess.updateEffect()},t.prototype.enableNoiseBlur=function(){this._blurNoise=!0},t.prototype.disableNoiseBlur=function(){this._blurNoise=!1},t.prototype.setHighlightsGain=function(e){this._highlightsGain=e},t.prototype.setHighlightsThreshold=function(e){this._highlightsGain===-1&&(this._highlightsGain=1),this._highlightsThreshold=e},t.prototype.disableHighlights=function(){this._highlightsGain=-1},t.prototype.dispose=function(e){e===void 0&&(e=!1),this._scene.postProcessRenderPipelineManager.detachCamerasFromRenderPipeline(this._name,this._scene.cameras),this._chromaticAberrationPostProcess=null,this._highlightsPostProcess=null,this._depthOfFieldPostProcess=null,this._grainTexture.dispose(),e&&this._scene.disableDepthRenderer()},t.prototype._createChromaticAberrationPostProcess=function(e){var n=this;this._chromaticAberrationPostProcess=new _t("LensChromaticAberration","chromaticAberration",["chromatic_aberration","screen_width","screen_height","direction","radialIntensity","centerPosition"],[],e,null,we.a.TRILINEAR_SAMPLINGMODE,this._scene.getEngine(),!1),this._chromaticAberrationPostProcess.onApply=function(i){i.setFloat("chromatic_aberration",n._chromaticAberration),i.setFloat("screen_width",n._scene.getEngine().getRenderWidth()),i.setFloat("screen_height",n._scene.getEngine().getRenderHeight()),i.setFloat("radialIntensity",1),i.setFloat2("direction",17,17),i.setFloat2("centerPosition",.5,.5)}},t.prototype._createHighlightsPostProcess=function(e){var n=this;this._highlightsPostProcess=new _t("LensHighlights","lensHighlights",["gain","threshold","screen_width","screen_height"],[],e,null,we.a.TRILINEAR_SAMPLINGMODE,this._scene.getEngine(),!1,this._dofPentagon?`#define PENTAGON +`:""),this._highlightsPostProcess.onApply=function(i){i.setFloat("gain",n._highlightsGain),i.setFloat("threshold",n._highlightsThreshold),i.setTextureFromPostProcess("textureSampler",n._chromaticAberrationPostProcess),i.setFloat("screen_width",n._scene.getEngine().getRenderWidth()),i.setFloat("screen_height",n._scene.getEngine().getRenderHeight())}},t.prototype._createDepthOfFieldPostProcess=function(e){var n=this;this._depthOfFieldPostProcess=new _t("LensDepthOfField","depthOfField",["grain_amount","blur_noise","screen_width","screen_height","distortion","dof_enabled","screen_distance","aperture","darken","edge_blur","highlights","near","far"],["depthSampler","grainSampler","highlightsSampler"],e,null,we.a.TRILINEAR_SAMPLINGMODE,this._scene.getEngine(),!1),this._depthOfFieldPostProcess.onApply=function(i){i.setTexture("depthSampler",n._depthTexture),i.setTexture("grainSampler",n._grainTexture),i.setTextureFromPostProcess("textureSampler",n._highlightsPostProcess),i.setTextureFromPostProcess("highlightsSampler",n._depthOfFieldPostProcess),i.setFloat("grain_amount",n._grainAmount),i.setBool("blur_noise",n._blurNoise),i.setFloat("screen_width",n._scene.getEngine().getRenderWidth()),i.setFloat("screen_height",n._scene.getEngine().getRenderHeight()),i.setFloat("distortion",n._distortion),i.setBool("dof_enabled",n._dofDistance!==-1),i.setFloat("screen_distance",1/(.1-1/n._dofDistance)),i.setFloat("aperture",n._dofAperture),i.setFloat("darken",n._dofDarken),i.setFloat("edge_blur",n._edgeBlur),i.setBool("highlights",n._highlightsGain!==-1),n._scene.activeCamera&&(i.setFloat("near",n._scene.activeCamera.minZ),i.setFloat("far",n._scene.activeCamera.maxZ))}},t.prototype._createGrainTexture=function(){this._grainTexture=new bi.a("LensNoiseTexture",512,this._scene,!1,we.a.BILINEAR_SAMPLINGMODE),this._grainTexture.wrapU=we.a.WRAP_ADDRESSMODE,this._grainTexture.wrapV=we.a.WRAP_ADDRESSMODE;for(var e,n,i,o=this._grainTexture.getContext(),a=0;a<512;a++)for(var s=0;s<512;s++)e=Math.floor(255*(n=.42,i=.58,Math.random()*(i-n)+n)),o.fillStyle="rgb("+e+", "+e+", "+e+")",o.fillRect(a,s,1,1);this._grainTexture.update(!1)},t}(Vr),gg=function(){this.enabled=!1,this.name="ssao2",this.texturesRequired=[h.a.PREPASS_DEPTHNORMAL_TEXTURE_TYPE]},vg=` +precision highp float; +uniform sampler2D textureSampler; +uniform float near; +uniform float far; +uniform float radius; +float scales[16]=float[16]( +0.1, +0.11406250000000001, +0.131640625, +0.15625, +0.187890625, +0.2265625, +0.272265625, +0.325, +0.384765625, +0.4515625, +0.525390625, +0.60625, +0.694140625, +0.7890625, +0.891015625, +1.0 +); +varying vec2 vUV; +float perspectiveDepthToViewZ( const in float invClipZ,const in float near,const in float far ) { +return ( near*far )/( ( far-near )*invClipZ-far ); +} +float viewZToPerspectiveDepth( const in float viewZ,const in float near,const in float far ) { +return ( near*far/viewZ+far)/( far-near ); +} +float viewZToOrthographicDepth( const in float viewZ,const in float near,const in float far ) { +return ( viewZ+near )/( near-far ); +} +#ifdef SSAO +uniform sampler2D randomSampler; +#ifndef GEOMETRYBUFFER +uniform sampler2D depthNormalSampler; +#else +uniform sampler2D depthSampler; +uniform sampler2D normalSampler; +#endif +uniform float randTextureTiles; +uniform float samplesFactor; +uniform vec3 sampleSphere[SAMPLES]; +uniform float totalStrength; +uniform float base; +uniform float xViewport; +uniform float yViewport; +uniform float maxZ; +uniform float minZAspect; +uniform vec2 texelSize; +uniform mat4 projection; +void main() +{ +vec3 random=texture2D(randomSampler,vUV*randTextureTiles).rgb; +#ifndef GEOMETRYBUFFER +float depth=texture2D(depthNormalSampler,vUV).r; +#else +float depth=texture2D(depthSampler,vUV).r; +#endif +float depthSign=depth/abs(depth); +depth=depth*depthSign; +#ifndef GEOMETRYBUFFER +vec3 normal=texture2D(depthNormalSampler,vUV).gba; +#else +vec3 normal=texture2D(normalSampler,vUV).rgb; +#endif +float occlusion=0.0; +float correctedRadius=min(radius,minZAspect*depth/near); +vec3 vViewRay=vec3((vUV.x*2.0-1.0)*xViewport,(vUV.y*2.0-1.0)*yViewport,depthSign); +vec3 origin=vViewRay*depth; +vec3 rvec=random*2.0-1.0; +rvec.z=0.0; + +float dotProduct=dot(rvec,normal); +rvec=1.0-abs(dotProduct)>1e-2 ? rvec : vec3(-rvec.y,0.0,rvec.x); +vec3 tangent=normalize(rvec-normal*dot(rvec,normal)); +vec3 bitangent=cross(normal,tangent); +mat3 tbn=mat3(tangent,bitangent,normal); +float difference; +for (int i=0; i1.0 || offset.y>1.0) { +continue; +} + +#ifndef GEOMETRYBUFFER +float sampleDepth=abs(texture2D(depthNormalSampler,offset.xy).r); +#else +float sampleDepth=abs(texture2D(depthSampler,offset.xy).r); +#endif + +difference=depthSign*samplePosition.z-sampleDepth; +float rangeCheck=1.0-smoothstep(correctedRadius*0.5,correctedRadius,difference); +occlusion+=(difference>=0.0 ? 1.0 : 0.0)*rangeCheck; +} +occlusion=occlusion*(1.0-smoothstep(maxZ*0.75,maxZ,depth)); +float ao=1.0-totalStrength*occlusion*samplesFactor; +float result=clamp(ao+base,0.0,1.0); +gl_FragColor=vec4(vec3(result),1.0); +} +#endif +#ifdef BILATERAL_BLUR +uniform sampler2D depthNormalSampler; +uniform float outSize; +uniform float samplerOffsets[SAMPLES]; +vec4 blur9(sampler2D image,vec2 uv,float resolution,vec2 direction) { +vec4 color=vec4(0.0); +vec2 off1=vec2(1.3846153846)*direction; +vec2 off2=vec2(3.2307692308)*direction; +color+=texture2D(image,uv)*0.2270270270; +color+=texture2D(image,uv+(off1/resolution))*0.3162162162; +color+=texture2D(image,uv-(off1/resolution))*0.3162162162; +color+=texture2D(image,uv+(off2/resolution))*0.0702702703; +color+=texture2D(image,uv-(off2/resolution))*0.0702702703; +return color; +} +vec4 blur13(sampler2D image,vec2 uv,float resolution,vec2 direction) { +vec4 color=vec4(0.0); +vec2 off1=vec2(1.411764705882353)*direction; +vec2 off2=vec2(3.2941176470588234)*direction; +vec2 off3=vec2(5.176470588235294)*direction; +color+=texture2D(image,uv)*0.1964825501511404; +color+=texture2D(image,uv+(off1/resolution))*0.2969069646728344; +color+=texture2D(image,uv-(off1/resolution))*0.2969069646728344; +color+=texture2D(image,uv+(off2/resolution))*0.09447039785044732; +color+=texture2D(image,uv-(off2/resolution))*0.09447039785044732; +color+=texture2D(image,uv+(off3/resolution))*0.010381362401148057; +color+=texture2D(image,uv-(off3/resolution))*0.010381362401148057; +return color; +} +vec4 blur13Bilateral(sampler2D image,vec2 uv,float resolution,vec2 direction) { +vec4 color=vec4(0.0); +vec2 off1=vec2(1.411764705882353)*direction; +vec2 off2=vec2(3.2941176470588234)*direction; +vec2 off3=vec2(5.176470588235294)*direction; +float compareDepth=abs(texture2D(depthNormalSampler,uv).r); +float sampleDepth; +float weight; +float weightSum=30.0; +color+=texture2D(image,uv)*30.0; +sampleDepth=abs(texture2D(depthNormalSampler,uv+(off1/resolution)).r); +weight=clamp(1.0/( 0.003+abs(compareDepth-sampleDepth)),0.0,30.0); +weightSum+=weight; +color+=texture2D(image,uv+(off1/resolution))*weight; +sampleDepth=abs(texture2D(depthNormalSampler,uv-(off1/resolution)).r); +weight=clamp(1.0/( 0.003+abs(compareDepth-sampleDepth)),0.0,30.0); +weightSum+=weight; +color+=texture2D(image,uv-(off1/resolution))*weight; +sampleDepth=abs(texture2D(depthNormalSampler,uv+(off2/resolution)).r); +weight=clamp(1.0/( 0.003+abs(compareDepth-sampleDepth)),0.0,30.0); +weightSum+=weight; +color+=texture2D(image,uv+(off2/resolution))*weight; +sampleDepth=abs(texture2D(depthNormalSampler,uv-(off2/resolution)).r); +weight=clamp(1.0/( 0.003+abs(compareDepth-sampleDepth)),0.0,30.0); +weightSum+=weight; +color+=texture2D(image,uv-(off2/resolution))*weight; +sampleDepth=abs(texture2D(depthNormalSampler,uv+(off3/resolution)).r); +weight=clamp(1.0/( 0.003+abs(compareDepth-sampleDepth)),0.0,30.0); +weightSum+=weight; +color+=texture2D(image,uv+(off3/resolution))*weight; +sampleDepth=abs(texture2D(depthNormalSampler,uv-(off3/resolution)).r); +weight=clamp(1.0/( 0.003+abs(compareDepth-sampleDepth)),0.0,30.0); +weightSum+=weight; +color+=texture2D(image,uv-(off3/resolution))*weight; +return color/weightSum; +} +void main() +{ +#if EXPENSIVE +float compareDepth=abs(texture2D(depthNormalSampler,vUV).r); +float texelsize=1.0/outSize; +float result=0.0; +float weightSum=0.0; +for (int i=0; i=2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scene",{get:function(){return this._scene},enumerable:!1,configurable:!0}),t.prototype.getClassName=function(){return"SSAO2RenderingPipeline"},t.prototype.dispose=function(e){e===void 0&&(e=!1);for(var n=0;n0?i._ssaoCombinePostProcess.width:i._originalColorPostProcess.width),s.setFloat("near",i._scene.activeCamera.minZ),s.setFloat("far",i._scene.activeCamera.maxZ),s.setFloat("radius",i.radius),i._forceGeometryBuffer?s.setTexture("depthNormalSampler",i._scene.enableGeometryBufferRenderer().getGBuffer().textures[0]):s.setTexture("depthNormalSampler",i._prePassRenderer.prePassRT.textures[i._prePassRenderer.getIndex(h.a.PREPASS_DEPTHNORMAL_TEXTURE_TYPE)]),s.setArray("samplerOffsets",i._samplerOffsets))},this._blurVPostProcess=new _t("BlurV","ssao2",["outSize","samplerOffsets","near","far","radius"],["depthNormalSampler"],n,null,we.a.TRILINEAR_SAMPLINGMODE,this._scene.getEngine(),!1,`#define BILATERAL_BLUR +#define BILATERAL_BLUR_V +#define SAMPLES 16 +#define EXPENSIVE `+(o?"1":"0")+` +`),this._blurVPostProcess.onApply=function(s){i._scene.activeCamera&&(s.setFloat("outSize",i._ssaoCombinePostProcess.height>0?i._ssaoCombinePostProcess.height:i._originalColorPostProcess.height),s.setFloat("near",i._scene.activeCamera.minZ),s.setFloat("far",i._scene.activeCamera.maxZ),s.setFloat("radius",i.radius),i._forceGeometryBuffer?s.setTexture("depthNormalSampler",i._scene.enableGeometryBufferRenderer().getGBuffer().textures[0]):s.setTexture("depthNormalSampler",i._prePassRenderer.prePassRT.textures[i._prePassRenderer.getIndex(h.a.PREPASS_DEPTHNORMAL_TEXTURE_TYPE)]),s.setArray("samplerOffsets",i._samplerOffsets))},this._blurHPostProcess.samples=this.textureSamples,this._blurVPostProcess.samples=this.textureSamples},t.prototype._rebuild=function(){r.prototype._rebuild.call(this)},t.prototype._radicalInverse_VdC=function(e){return this._bits[0]=e,this._bits[0]=(this._bits[0]<<16|this._bits[0]>>16)>>>0,this._bits[0]=(1431655765&this._bits[0])<<1|(2863311530&this._bits[0])>>>1>>>0,this._bits[0]=(858993459&this._bits[0])<<2|(3435973836&this._bits[0])>>>2>>>0,this._bits[0]=(252645135&this._bits[0])<<4|(4042322160&this._bits[0])>>>4>>>0,this._bits[0]=(16711935&this._bits[0])<<8|(4278255360&this._bits[0])>>>8>>>0,23283064365386963e-26*this._bits[0]},t.prototype._hammersley=function(e,n){return[e/n,this._radicalInverse_VdC(e)]},t.prototype._hemisphereSample_uniform=function(e,n){var i=2*n*Math.PI,o=1-(.85*e+.15),a=Math.sqrt(1-o*o);return new u.e(Math.cos(i)*a,Math.sin(i)*a,o)},t.prototype._generateHemisphere=function(){for(var e,n=this.samples,i=[],o=0;o0.0) +hitCoord-=dir; +else +hitCoord+=dir; +info.color+=texture2D(textureSampler,projectedCoord.xy).rgb; +} +projectedCoord=projection*vec4(hitCoord,1.0); +projectedCoord.xy/=projectedCoord.w; +projectedCoord.xy=0.5*projectedCoord.xy+vec2(0.5); + +info.coords=vec4(projectedCoord.xy,sampledDepth,1.0); +info.color+=texture2D(textureSampler,projectedCoord.xy).rgb; +info.color/=float(SMOOTH_STEPS+1); +return info; +} + +ReflectionInfo getReflectionInfo(vec3 dir,vec3 hitCoord) +{ +ReflectionInfo info; +vec4 projectedCoord; +float sampledDepth; +dir*=step; +for(int i=0; i>0)),e.push("#define SMOOTH_STEPS "+(this._smoothSteps>>0)),this.updateEffect(e.join(` +`))},t._Parse=function(e,n,i,o){return L.a.Parse(function(){return new t(e.name,i,e.options,n,e.renderTargetSamplingMode,i.getEngine(),e.textureType,e.reusable)},e,i,o)},Object(c.c)([Object(L.c)()],t.prototype,"threshold",void 0),Object(c.c)([Object(L.c)()],t.prototype,"strength",void 0),Object(c.c)([Object(L.c)()],t.prototype,"reflectionSpecularFalloffExponent",void 0),Object(c.c)([Object(L.c)()],t.prototype,"step",void 0),Object(c.c)([Object(L.c)()],t.prototype,"roughnessFactor",void 0),Object(c.c)([Object(L.c)()],t.prototype,"enableSmoothReflections",null),Object(c.c)([Object(L.c)()],t.prototype,"reflectionSamples",null),Object(c.c)([Object(L.c)()],t.prototype,"smoothSteps",null),t}(_t);C.a.RegisteredTypes["BABYLON.ScreenSpaceReflectionPostProcess"]=jc;var Ag=`uniform sampler2D textureSampler; +varying vec2 vUV; +#if defined(PASS_POST_PROCESS) +void main(void) +{ +vec4 color=texture2D(textureSampler,vUV); +gl_FragColor=color; +} +#endif +#if defined(DOWN_SAMPLE_X4) +uniform vec2 dsOffsets[16]; +void main(void) +{ +vec4 average=vec4(0.0,0.0,0.0,0.0); +average=texture2D(textureSampler,vUV+dsOffsets[0]); +average+=texture2D(textureSampler,vUV+dsOffsets[1]); +average+=texture2D(textureSampler,vUV+dsOffsets[2]); +average+=texture2D(textureSampler,vUV+dsOffsets[3]); +average+=texture2D(textureSampler,vUV+dsOffsets[4]); +average+=texture2D(textureSampler,vUV+dsOffsets[5]); +average+=texture2D(textureSampler,vUV+dsOffsets[6]); +average+=texture2D(textureSampler,vUV+dsOffsets[7]); +average+=texture2D(textureSampler,vUV+dsOffsets[8]); +average+=texture2D(textureSampler,vUV+dsOffsets[9]); +average+=texture2D(textureSampler,vUV+dsOffsets[10]); +average+=texture2D(textureSampler,vUV+dsOffsets[11]); +average+=texture2D(textureSampler,vUV+dsOffsets[12]); +average+=texture2D(textureSampler,vUV+dsOffsets[13]); +average+=texture2D(textureSampler,vUV+dsOffsets[14]); +average+=texture2D(textureSampler,vUV+dsOffsets[15]); +average/=16.0; +gl_FragColor=average; +} +#endif +#if defined(BRIGHT_PASS) +uniform vec2 dsOffsets[4]; +uniform float brightThreshold; +void main(void) +{ +vec4 average=vec4(0.0,0.0,0.0,0.0); +average=texture2D(textureSampler,vUV+vec2(dsOffsets[0].x,dsOffsets[0].y)); +average+=texture2D(textureSampler,vUV+vec2(dsOffsets[1].x,dsOffsets[1].y)); +average+=texture2D(textureSampler,vUV+vec2(dsOffsets[2].x,dsOffsets[2].y)); +average+=texture2D(textureSampler,vUV+vec2(dsOffsets[3].x,dsOffsets[3].y)); +average*=0.25; +float luminance=length(average.rgb); +if (luminanceshadowPixelDepth) +accumFog+=sunColor*computeScattering(dot(rayDirection,sunDirection)); +currentPosition+=stepL; +} +accumFog/=NB_STEPS; +vec3 color=accumFog*scatteringPower; +gl_FragColor=vec4(color*exp(color) ,1.0); +} +#endif +#if defined(VLSMERGE) +uniform sampler2D originalSampler; +void main(void) +{ +gl_FragColor=texture2D(originalSampler,vUV)+texture2D(textureSampler,vUV); +} +#endif +#if defined(LUMINANCE) +uniform vec2 lumOffsets[4]; +void main() +{ +float average=0.0; +vec4 color=vec4(0.0); +float maximum=-1e20; +vec3 weight=vec3(0.299,0.587,0.114); +for (int i=0; i<4; i++) +{ +color=texture2D(textureSampler,vUV+ lumOffsets[i]); + +float GreyValue=dot(color.rgb,vec3(0.33,0.33,0.33)); + +#ifdef WEIGHTED_AVERAGE +float GreyValue=dot(color.rgb,weight); +#endif +#ifdef BRIGHTNESS +float GreyValue=max(color.r,max(color.g,color.b)); +#endif +#ifdef HSL_COMPONENT +float GreyValue=0.5*(max(color.r,max(color.g,color.b))+min(color.r,min(color.g,color.b))); +#endif +#ifdef MAGNITUDE +float GreyValue=length(color.rgb); +#endif +maximum=max(maximum,GreyValue); +average+=(0.25*log(1e-5+GreyValue)); +} +average=exp(average); +gl_FragColor=vec4(average,maximum,0.0,1.0); +} +#endif +#if defined(LUMINANCE_DOWN_SAMPLE) +uniform vec2 dsOffsets[9]; +uniform float halfDestPixelSize; +#ifdef FINAL_DOWN_SAMPLER +#include +#endif +void main() +{ +vec4 color=vec4(0.0); +float average=0.0; +for (int i=0; i<9; i++) +{ +color=texture2D(textureSampler,vUV+vec2(halfDestPixelSize,halfDestPixelSize)+dsOffsets[i]); +average+=color.r; +} +average/=9.0; +#ifdef FINAL_DOWN_SAMPLER +gl_FragColor=pack(average); +#else +gl_FragColor=vec4(average,average,0.0,1.0); +#endif +} +#endif +#if defined(HDR) +uniform sampler2D textureAdderSampler; +uniform float averageLuminance; +void main() +{ +vec4 color=texture2D(textureAdderSampler,vUV); +#ifndef AUTO_EXPOSURE +vec4 adjustedColor=color/averageLuminance; +color=adjustedColor; +color.a=1.0; +#endif +gl_FragColor=color; +} +#endif +#if defined(LENS_FLARE) +#define GHOSTS 3 +uniform sampler2D lensColorSampler; +uniform float strength; +uniform float ghostDispersal; +uniform float haloWidth; +uniform vec2 resolution; +uniform float distortionStrength; +float hash(vec2 p) +{ +float h=dot(p,vec2(127.1,311.7)); +return -1.0+2.0*fract(sin(h)*43758.5453123); +} +float noise(in vec2 p) +{ +vec2 i=floor(p); +vec2 f=fract(p); +vec2 u=f*f*(3.0-2.0*f); +return mix(mix(hash(i+vec2(0.0,0.0)), +hash(i+vec2(1.0,0.0)),u.x), +mix(hash(i+vec2(0.0,1.0)), +hash(i+vec2(1.0,1.0)),u.x),u.y); +} +float fbm(vec2 p) +{ +float f=0.0; +f+=0.5000*noise(p); p*=2.02; +f+=0.2500*noise(p); p*=2.03; +f+=0.1250*noise(p); p*=2.01; +f+=0.0625*noise(p); p*=2.04; +f/=0.9375; +return f; +} +vec3 pattern(vec2 uv) +{ +vec2 p=-1.0+2.0*uv; +float p2=dot(p,p); +float f=fbm(vec2(15.0*p2))/2.0; +float r=0.2+0.6*sin(12.5*length(uv-vec2(0.5))); +float g=0.2+0.6*sin(20.5*length(uv-vec2(0.5))); +float b=0.2+0.6*sin(17.2*length(uv-vec2(0.5))); +return (1.0-f)*vec3(r,g,b); +} +float luminance(vec3 color) +{ +return dot(color.rgb,vec3(0.2126,0.7152,0.0722)); +} +vec4 textureDistorted(sampler2D tex,vec2 texcoord,vec2 direction,vec3 distortion) +{ +return vec4( +texture2D(tex,texcoord+direction*distortion.r).r, +texture2D(tex,texcoord+direction*distortion.g).g, +texture2D(tex,texcoord+direction*distortion.b).b, +1.0 +); +} +void main(void) +{ +vec2 uv=-vUV+vec2(1.0); +vec2 ghostDir=(vec2(0.5)-uv)*ghostDispersal; +vec2 texelSize=1.0/resolution; +vec3 distortion=vec3(-texelSize.x*distortionStrength,0.0,texelSize.x*distortionStrength); +vec4 result=vec4(0.0); +float ghostIndice=1.0; +for (int i=0; i=nSamples) +break; +vec2 offset1=vUV+velocity*(float(i)/float(nSamples-1)-0.5); +result+=texture2D(textureSampler,offset1); +} +gl_FragColor=result/float(nSamples); +} +#endif +`;ze.a.ShadersStore.standardPixelShader=Ag;var Wd=function(r){function t(e,n,i,o,a){o===void 0&&(o=null);var s=r.call(this,n.getEngine(),e)||this;return s.downSampleX4PostProcess=null,s.brightPassPostProcess=null,s.blurHPostProcesses=[],s.blurVPostProcesses=[],s.textureAdderPostProcess=null,s.volumetricLightPostProcess=null,s.volumetricLightSmoothXPostProcess=null,s.volumetricLightSmoothYPostProcess=null,s.volumetricLightMergePostProces=null,s.volumetricLightFinalPostProcess=null,s.luminancePostProcess=null,s.luminanceDownSamplePostProcesses=[],s.hdrPostProcess=null,s.textureAdderFinalPostProcess=null,s.lensFlareFinalPostProcess=null,s.hdrFinalPostProcess=null,s.lensFlarePostProcess=null,s.lensFlareComposePostProcess=null,s.motionBlurPostProcess=null,s.depthOfFieldPostProcess=null,s.fxaaPostProcess=null,s.screenSpaceReflectionPostProcess=null,s.brightThreshold=1,s.blurWidth=512,s.horizontalBlur=!1,s.lensTexture=null,s.volumetricLightCoefficient=.2,s.volumetricLightPower=4,s.volumetricLightBlurScale=64,s.sourceLight=null,s.hdrMinimumLuminance=1,s.hdrDecreaseRate=.5,s.hdrIncreaseRate=.5,s.lensColorTexture=null,s.lensFlareStrength=20,s.lensFlareGhostDispersal=1.4,s.lensFlareHaloWidth=.7,s.lensFlareDistortionStrength=16,s.lensFlareBlurWidth=512,s.lensStarTexture=null,s.lensFlareDirtTexture=null,s.depthOfFieldDistance=10,s.depthOfFieldBlurWidth=64,s.animations=[],s._currentDepthOfFieldSource=null,s._fixedExposure=1,s._currentExposure=1,s._hdrAutoExposure=!1,s._hdrCurrentLuminance=1,s._motionStrength=1,s._isObjectBasedMotionBlur=!1,s._camerasToBeAttached=[],s._bloomEnabled=!1,s._depthOfFieldEnabled=!1,s._vlsEnabled=!1,s._lensFlareEnabled=!1,s._hdrEnabled=!1,s._motionBlurEnabled=!1,s._fxaaEnabled=!1,s._screenSpaceReflectionsEnabled=!1,s._motionBlurSamples=64,s._volumetricLightStepsCount=50,s._samples=1,s._cameras=a||n.cameras,s._cameras=s._cameras.slice(),s._camerasToBeAttached=s._cameras.slice(),s._scene=n,s._basePostProcess=o,s._ratio=i,s._floatTextureType=n.getEngine().getCaps().textureFloatRender?h.a.TEXTURETYPE_FLOAT:h.a.TEXTURETYPE_HALF_FLOAT,n.postProcessRenderPipelineManager.addPipeline(s),s._buildPipeline(),s}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"exposure",{get:function(){return this._fixedExposure},set:function(e){this._fixedExposure=e,this._currentExposure=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hdrAutoExposure",{get:function(){return this._hdrAutoExposure},set:function(e){if(this._hdrAutoExposure=e,this.hdrPostProcess){var n=["#define HDR"];e&&n.push("#define AUTO_EXPOSURE"),this.hdrPostProcess.updateEffect(n.join(` +`))}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"motionStrength",{get:function(){return this._motionStrength},set:function(e){this._motionStrength=e,this._isObjectBasedMotionBlur&&this.motionBlurPostProcess&&(this.motionBlurPostProcess.motionStrength=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"objectBasedMotionBlur",{get:function(){return this._isObjectBasedMotionBlur},set:function(e){var n=this._isObjectBasedMotionBlur!==e;this._isObjectBasedMotionBlur=e,n&&this._buildPipeline()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"BloomEnabled",{get:function(){return this._bloomEnabled},set:function(e){this._bloomEnabled!==e&&(this._bloomEnabled=e,this._buildPipeline())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"DepthOfFieldEnabled",{get:function(){return this._depthOfFieldEnabled},set:function(e){this._depthOfFieldEnabled!==e&&(this._depthOfFieldEnabled=e,this._buildPipeline())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"LensFlareEnabled",{get:function(){return this._lensFlareEnabled},set:function(e){this._lensFlareEnabled!==e&&(this._lensFlareEnabled=e,this._buildPipeline())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"HDREnabled",{get:function(){return this._hdrEnabled},set:function(e){this._hdrEnabled!==e&&(this._hdrEnabled=e,this._buildPipeline())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"VLSEnabled",{get:function(){return this._vlsEnabled},set:function(e){if(this._vlsEnabled!==e){if(e&&!this._scene.enableGeometryBufferRenderer())return void l.a.Warn("Geometry renderer is not supported, cannot create volumetric lights in Standard Rendering Pipeline");this._vlsEnabled=e,this._buildPipeline()}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"MotionBlurEnabled",{get:function(){return this._motionBlurEnabled},set:function(e){this._motionBlurEnabled!==e&&(this._motionBlurEnabled=e,this._buildPipeline())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fxaaEnabled",{get:function(){return this._fxaaEnabled},set:function(e){this._fxaaEnabled!==e&&(this._fxaaEnabled=e,this._buildPipeline())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"screenSpaceReflectionsEnabled",{get:function(){return this._screenSpaceReflectionsEnabled},set:function(e){this._screenSpaceReflectionsEnabled!==e&&(this._screenSpaceReflectionsEnabled=e,this._buildPipeline())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"volumetricLightStepsCount",{get:function(){return this._volumetricLightStepsCount},set:function(e){this.volumetricLightPostProcess&&this.volumetricLightPostProcess.updateEffect(`#define VLS +#define NB_STEPS `+e.toFixed(1)),this._volumetricLightStepsCount=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"motionBlurSamples",{get:function(){return this._motionBlurSamples},set:function(e){this.motionBlurPostProcess&&(this._isObjectBasedMotionBlur?this.motionBlurPostProcess.motionBlurSamples=e:this.motionBlurPostProcess.updateEffect(`#define MOTION_BLUR +#define MAX_MOTION_SAMPLES `+e.toFixed(1))),this._motionBlurSamples=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"samples",{get:function(){return this._samples},set:function(e){this._samples!==e&&(this._samples=e,this._buildPipeline())},enumerable:!1,configurable:!0}),t.prototype._buildPipeline=function(){var e=this,n=this._ratio,i=this._scene;this._disposePostProcesses(),this._cameras!==null&&(this._scene.postProcessRenderPipelineManager.detachCamerasFromRenderPipeline(this._name,this._cameras),this._cameras=this._camerasToBeAttached.slice()),this._reset(),this._screenSpaceReflectionsEnabled&&(this.screenSpaceReflectionPostProcess=new jc("HDRPass",i,n,null,we.a.BILINEAR_SAMPLINGMODE,i.getEngine(),!1,this._floatTextureType),this.screenSpaceReflectionPostProcess.onApplyObservable.add(function(){e._currentDepthOfFieldSource=e.screenSpaceReflectionPostProcess}),this.addEffect(new Rt(i.getEngine(),"HDRScreenSpaceReflections",function(){return e.screenSpaceReflectionPostProcess},!0))),this._basePostProcess?this.originalPostProcess=this._basePostProcess:this.originalPostProcess=new _t("HDRPass","standard",[],[],n,null,we.a.BILINEAR_SAMPLINGMODE,i.getEngine(),!1,"#define PASS_POST_PROCESS",this._floatTextureType),this.originalPostProcess.autoClear=!this.screenSpaceReflectionPostProcess,this.originalPostProcess.onApplyObservable.add(function(){e._currentDepthOfFieldSource=e.originalPostProcess}),this.addEffect(new Rt(i.getEngine(),"HDRPassPostProcess",function(){return e.originalPostProcess},!0)),this._bloomEnabled&&(this._createDownSampleX4PostProcess(i,n/4),this._createBrightPassPostProcess(i,n/4),this._createBlurPostProcesses(i,n/4,1),this._createTextureAdderPostProcess(i,n),this.textureAdderFinalPostProcess=new _t("HDRDepthOfFieldSource","standard",[],[],n,null,we.a.BILINEAR_SAMPLINGMODE,i.getEngine(),!1,"#define PASS_POST_PROCESS",h.a.TEXTURETYPE_UNSIGNED_INT),this.addEffect(new Rt(i.getEngine(),"HDRBaseDepthOfFieldSource",function(){return e.textureAdderFinalPostProcess},!0))),this._vlsEnabled&&(this._createVolumetricLightPostProcess(i,n),this.volumetricLightFinalPostProcess=new _t("HDRVLSFinal","standard",[],[],n,null,we.a.BILINEAR_SAMPLINGMODE,i.getEngine(),!1,"#define PASS_POST_PROCESS",h.a.TEXTURETYPE_UNSIGNED_INT),this.addEffect(new Rt(i.getEngine(),"HDRVLSFinal",function(){return e.volumetricLightFinalPostProcess},!0))),this._lensFlareEnabled&&(this._createLensFlarePostProcess(i,n),this.lensFlareFinalPostProcess=new _t("HDRPostLensFlareDepthOfFieldSource","standard",[],[],n,null,we.a.BILINEAR_SAMPLINGMODE,i.getEngine(),!1,"#define PASS_POST_PROCESS",h.a.TEXTURETYPE_UNSIGNED_INT),this.addEffect(new Rt(i.getEngine(),"HDRPostLensFlareDepthOfFieldSource",function(){return e.lensFlareFinalPostProcess},!0))),this._hdrEnabled&&(this._createLuminancePostProcesses(i,this._floatTextureType),this._createHdrPostProcess(i,n),this.hdrFinalPostProcess=new _t("HDRPostHDReDepthOfFieldSource","standard",[],[],n,null,we.a.BILINEAR_SAMPLINGMODE,i.getEngine(),!1,"#define PASS_POST_PROCESS",h.a.TEXTURETYPE_UNSIGNED_INT),this.addEffect(new Rt(i.getEngine(),"HDRPostHDReDepthOfFieldSource",function(){return e.hdrFinalPostProcess},!0))),this._depthOfFieldEnabled&&(this._createBlurPostProcesses(i,n/2,3,"depthOfFieldBlurWidth"),this._createDepthOfFieldPostProcess(i,n)),this._motionBlurEnabled&&this._createMotionBlurPostProcess(i,n),this._fxaaEnabled&&(this.fxaaPostProcess=new Co("fxaa",1,null,we.a.BILINEAR_SAMPLINGMODE,i.getEngine(),!1,h.a.TEXTURETYPE_UNSIGNED_INT),this.addEffect(new Rt(i.getEngine(),"HDRFxaa",function(){return e.fxaaPostProcess},!0))),this._cameras!==null&&this._scene.postProcessRenderPipelineManager.attachCamerasToRenderPipeline(this._name,this._cameras),!this._enableMSAAOnFirstPostProcess(this._samples)&&this._samples>1&&l.a.Warn("MSAA failed to enable, MSAA is only supported in browsers that support webGL >= 2.0")},t.prototype._createDownSampleX4PostProcess=function(e,n){var i=this,o=new Array(32);this.downSampleX4PostProcess=new _t("HDRDownSampleX4","standard",["dsOffsets"],[],n,null,we.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,"#define DOWN_SAMPLE_X4",this._floatTextureType),this.downSampleX4PostProcess.onApply=function(a){for(var s=0,d=i.downSampleX4PostProcess.width,p=i.downSampleX4PostProcess.height,b=-2;b<2;b++)for(var x=-2;x<2;x++)o[s]=(b+.5)*(1/d),o[s+1]=(x+.5)*(1/p),s+=2;a.setArray2("dsOffsets",o)},this.addEffect(new Rt(e.getEngine(),"HDRDownSampleX4",function(){return i.downSampleX4PostProcess},!0))},t.prototype._createBrightPassPostProcess=function(e,n){var i=this,o=new Array(8);this.brightPassPostProcess=new _t("HDRBrightPass","standard",["dsOffsets","brightThreshold"],[],n,null,we.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,"#define BRIGHT_PASS",this._floatTextureType),this.brightPassPostProcess.onApply=function(a){var s=1/i.brightPassPostProcess.width,d=1/i.brightPassPostProcess.height;o[0]=-.5*s,o[1]=.5*d,o[2]=.5*s,o[3]=.5*d,o[4]=-.5*s,o[5]=-.5*d,o[6]=.5*s,o[7]=-.5*d,a.setArray2("dsOffsets",o),a.setFloat("brightThreshold",i.brightThreshold)},this.addEffect(new Rt(e.getEngine(),"HDRBrightPass",function(){return i.brightPassPostProcess},!0))},t.prototype._createBlurPostProcesses=function(e,n,i,o){var a=this;o===void 0&&(o="blurWidth");var s=e.getEngine(),d=new _n("HDRBlurH_"+i,new u.d(1,0),this[o],n,null,we.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,this._floatTextureType),p=new _n("HDRBlurV_"+i,new u.d(0,1),this[o],n,null,we.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,this._floatTextureType);d.onActivateObservable.add(function(){var b=d.width/s.getRenderWidth();d.kernel=a[o]*b}),p.onActivateObservable.add(function(){var b=p.height/s.getRenderHeight();p.kernel=a.horizontalBlur?64*b:a[o]*b}),this.addEffect(new Rt(e.getEngine(),"HDRBlurH"+i,function(){return d},!0)),this.addEffect(new Rt(e.getEngine(),"HDRBlurV"+i,function(){return p},!0)),this.blurHPostProcesses.push(d),this.blurVPostProcesses.push(p)},t.prototype._createTextureAdderPostProcess=function(e,n){var i=this;this.textureAdderPostProcess=new _t("HDRTextureAdder","standard",["exposure"],["otherSampler","lensSampler"],n,null,we.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,"#define TEXTURE_ADDER",this._floatTextureType),this.textureAdderPostProcess.onApply=function(o){o.setTextureFromPostProcess("otherSampler",i._vlsEnabled?i._currentDepthOfFieldSource:i.originalPostProcess),o.setTexture("lensSampler",i.lensTexture),o.setFloat("exposure",i._currentExposure),i._currentDepthOfFieldSource=i.textureAdderFinalPostProcess},this.addEffect(new Rt(e.getEngine(),"HDRTextureAdder",function(){return i.textureAdderPostProcess},!0))},t.prototype._createVolumetricLightPostProcess=function(e,n){var i=this,o=e.enableGeometryBufferRenderer();o.enablePosition=!0;var a=o.getGBuffer();this.volumetricLightPostProcess=new _t("HDRVLS","standard",["shadowViewProjection","cameraPosition","sunDirection","sunColor","scatteringCoefficient","scatteringPower","depthValues"],["shadowMapSampler","positionSampler"],n/8,null,we.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,`#define VLS +#define NB_STEPS `+this._volumetricLightStepsCount.toFixed(1));var s=u.d.Zero();this.volumetricLightPostProcess.onApply=function(d){if(i.sourceLight&&i.sourceLight.getShadowGenerator()&&i._scene.activeCamera){var p=i.sourceLight.getShadowGenerator();d.setTexture("shadowMapSampler",p.getShadowMap()),d.setTexture("positionSampler",a.textures[2]),d.setColor3("sunColor",i.sourceLight.diffuse),d.setVector3("sunDirection",i.sourceLight.getShadowDirection()),d.setVector3("cameraPosition",i._scene.activeCamera.globalPosition),d.setMatrix("shadowViewProjection",p.getTransformMatrix()),d.setFloat("scatteringCoefficient",i.volumetricLightCoefficient),d.setFloat("scatteringPower",i.volumetricLightPower),s.x=i.sourceLight.getDepthMinZ(i._scene.activeCamera),s.y=i.sourceLight.getDepthMaxZ(i._scene.activeCamera),d.setVector2("depthValues",s)}},this.addEffect(new Rt(e.getEngine(),"HDRVLS",function(){return i.volumetricLightPostProcess},!0)),this._createBlurPostProcesses(e,n/4,0,"volumetricLightBlurScale"),this.volumetricLightMergePostProces=new _t("HDRVLSMerge","standard",[],["originalSampler"],n,null,we.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,"#define VLSMERGE"),this.volumetricLightMergePostProces.onApply=function(d){d.setTextureFromPostProcess("originalSampler",i._bloomEnabled?i.textureAdderFinalPostProcess:i.originalPostProcess),i._currentDepthOfFieldSource=i.volumetricLightFinalPostProcess},this.addEffect(new Rt(e.getEngine(),"HDRVLSMerge",function(){return i.volumetricLightMergePostProces},!0))},t.prototype._createLuminancePostProcesses=function(e,n){var i=this,o=Math.pow(3,t.LuminanceSteps);this.luminancePostProcess=new _t("HDRLuminance","standard",["lumOffsets"],[],{width:o,height:o},null,we.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,"#define LUMINANCE",n);var a=[];this.luminancePostProcess.onApply=function(x){var O=1/i.luminancePostProcess.width,B=1/i.luminancePostProcess.height;a[0]=-.5*O,a[1]=.5*B,a[2]=.5*O,a[3]=.5*B,a[4]=-.5*O,a[5]=-.5*B,a[6]=.5*O,a[7]=-.5*B,x.setArray2("lumOffsets",a)},this.addEffect(new Rt(e.getEngine(),"HDRLuminance",function(){return i.luminancePostProcess},!0));for(var s=t.LuminanceSteps-1;s>=0;s--){o=Math.pow(3,s);var d=`#define LUMINANCE_DOWN_SAMPLE +`;s===0&&(d+="#define FINAL_DOWN_SAMPLER");var p=new _t("HDRLuminanceDownSample"+s,"standard",["dsOffsets","halfDestPixelSize"],[],{width:o,height:o},null,we.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,d,n);this.luminanceDownSamplePostProcesses.push(p)}var b=this.luminancePostProcess;this.luminanceDownSamplePostProcesses.forEach(function(x,O){var B=new Array(18);x.onApply=function(F){if(b){for(var z=0,J=-1;J<2;J++)for(var ie=-1;ie<2;ie++)B[z]=J/b.width,B[z+1]=ie/b.height,z+=2;F.setArray2("dsOffsets",B),F.setFloat("halfDestPixelSize",.5/b.width),b=O===i.luminanceDownSamplePostProcesses.length-1?i.luminancePostProcess:x}},O===i.luminanceDownSamplePostProcesses.length-1&&(x.onAfterRender=function(){var F=e.getEngine().readPixels(0,0,1,1),z=new u.f(1/16581375,1/65025,1/255,1);i._hdrCurrentLuminance=(F[0]*z.x+F[1]*z.y+F[2]*z.z+F[3]*z.w)/100}),i.addEffect(new Rt(e.getEngine(),"HDRLuminanceDownSample"+O,function(){return x},!0))})},t.prototype._createHdrPostProcess=function(e,n){var i=this,o=["#define HDR"];this._hdrAutoExposure&&o.push("#define AUTO_EXPOSURE"),this.hdrPostProcess=new _t("HDR","standard",["averageLuminance"],["textureAdderSampler"],n,null,we.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,o.join(` +`),h.a.TEXTURETYPE_UNSIGNED_INT);var a=1,s=0,d=0;this.hdrPostProcess.onApply=function(p){if(p.setTextureFromPostProcess("textureAdderSampler",i._currentDepthOfFieldSource),s+=e.getEngine().getDeltaTime(),a<0)a=i._hdrCurrentLuminance;else{var b=(d-s)/1e3;i._hdrCurrentLuminancea-i.hdrIncreaseRate*b?a-=i.hdrIncreaseRate*b:a=i._hdrCurrentLuminance}i.hdrAutoExposure?i._currentExposure=i._fixedExposure/a:(a=$.a.Clamp(a,i.hdrMinimumLuminance,1e20),p.setFloat("averageLuminance",a)),d=s,i._currentDepthOfFieldSource=i.hdrFinalPostProcess},this.addEffect(new Rt(e.getEngine(),"HDR",function(){return i.hdrPostProcess},!0))},t.prototype._createLensFlarePostProcess=function(e,n){var i=this;this.lensFlarePostProcess=new _t("HDRLensFlare","standard",["strength","ghostDispersal","haloWidth","resolution","distortionStrength"],["lensColorSampler"],n/2,null,we.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,"#define LENS_FLARE",h.a.TEXTURETYPE_UNSIGNED_INT),this.addEffect(new Rt(e.getEngine(),"HDRLensFlare",function(){return i.lensFlarePostProcess},!0)),this._createBlurPostProcesses(e,n/4,2,"lensFlareBlurWidth"),this.lensFlareComposePostProcess=new _t("HDRLensFlareCompose","standard",["lensStarMatrix"],["otherSampler","lensDirtSampler","lensStarSampler"],n,null,we.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,"#define LENS_FLARE_COMPOSE",h.a.TEXTURETYPE_UNSIGNED_INT),this.addEffect(new Rt(e.getEngine(),"HDRLensFlareCompose",function(){return i.lensFlareComposePostProcess},!0));var o=new u.d(0,0);this.lensFlarePostProcess.onApply=function(d){d.setTextureFromPostProcess("textureSampler",i._bloomEnabled?i.blurHPostProcesses[0]:i.originalPostProcess),d.setTexture("lensColorSampler",i.lensColorTexture),d.setFloat("strength",i.lensFlareStrength),d.setFloat("ghostDispersal",i.lensFlareGhostDispersal),d.setFloat("haloWidth",i.lensFlareHaloWidth),o.x=i.lensFlarePostProcess.width,o.y=i.lensFlarePostProcess.height,d.setVector2("resolution",o),d.setFloat("distortionStrength",i.lensFlareDistortionStrength)};var a=u.a.FromValues(2,0,-1,0,0,2,-1,0,0,0,1,0,0,0,0,1),s=u.a.FromValues(.5,0,.5,0,0,.5,.5,0,0,0,1,0,0,0,0,1);this.lensFlareComposePostProcess.onApply=function(d){if(i._scene.activeCamera){d.setTextureFromPostProcess("otherSampler",i.lensFlarePostProcess),d.setTexture("lensDirtSampler",i.lensFlareDirtTexture),d.setTexture("lensStarSampler",i.lensStarTexture);var p=i._scene.activeCamera.getViewMatrix().getRow(0),b=i._scene.activeCamera.getViewMatrix().getRow(2),x=u.e.Dot(p.toVector3(),new u.e(1,0,0))+u.e.Dot(b.toVector3(),new u.e(0,0,1));x*=4;var O=u.a.FromValues(.5*Math.cos(x),-Math.sin(x),0,0,Math.sin(x),.5*Math.cos(x),0,0,0,0,1,0,0,0,0,1),B=s.multiply(O).multiply(a);d.setMatrix("lensStarMatrix",B),i._currentDepthOfFieldSource=i.lensFlareFinalPostProcess}}},t.prototype._createDepthOfFieldPostProcess=function(e,n){var i=this;this.depthOfFieldPostProcess=new _t("HDRDepthOfField","standard",["distance"],["otherSampler","depthSampler"],n,null,we.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,"#define DEPTH_OF_FIELD",h.a.TEXTURETYPE_UNSIGNED_INT),this.depthOfFieldPostProcess.onApply=function(o){o.setTextureFromPostProcess("otherSampler",i._currentDepthOfFieldSource),o.setTexture("depthSampler",i._getDepthTexture()),o.setFloat("distance",i.depthOfFieldDistance)},this.addEffect(new Rt(e.getEngine(),"HDRDepthOfField",function(){return i.depthOfFieldPostProcess},!0))},t.prototype._createMotionBlurPostProcess=function(e,n){var i=this;if(this._isObjectBasedMotionBlur){var o=new Gc("HDRMotionBlur",e,n,null,we.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,h.a.TEXTURETYPE_UNSIGNED_INT);o.motionStrength=this.motionStrength,o.motionBlurSamples=this.motionBlurSamples,this.motionBlurPostProcess=o}else{this.motionBlurPostProcess=new _t("HDRMotionBlur","standard",["inverseViewProjection","prevViewProjection","screenSize","motionScale","motionStrength"],["depthSampler"],n,null,we.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,`#define MOTION_BLUR +#define MAX_MOTION_SAMPLES `+this.motionBlurSamples.toFixed(1),h.a.TEXTURETYPE_UNSIGNED_INT);var a=0,s=u.a.Identity(),d=u.a.Identity(),p=u.a.Identity(),b=u.d.Zero();this.motionBlurPostProcess.onApply=function(x){(p=e.getProjectionMatrix().multiply(e.getViewMatrix())).invertToRef(d),x.setMatrix("inverseViewProjection",d),x.setMatrix("prevViewProjection",s),s=p,b.x=i.motionBlurPostProcess.width,b.y=i.motionBlurPostProcess.height,x.setVector2("screenSize",b),a=e.getEngine().getFps()/60,x.setFloat("motionScale",a),x.setFloat("motionStrength",i.motionStrength),x.setTexture("depthSampler",i._getDepthTexture())}}this.addEffect(new Rt(e.getEngine(),"HDRMotionBlur",function(){return i.motionBlurPostProcess},!0))},t.prototype._getDepthTexture=function(){return this._scene.getEngine().getCaps().drawBuffersExtension?this._scene.enableGeometryBufferRenderer().getGBuffer().textures[0]:this._scene.enableDepthRenderer().getDepthMap()},t.prototype._disposePostProcesses=function(){for(var e=0;e0.5; +useCamA=!useCamB; +texCoord1=vec2(useCamB ? (vUV.x-0.5)*2.0 : vUV.x*2.0,vUV.y); +texCoord2=vec2(texCoord1.x+stepSize.x,vUV.y); +#else +#ifdef IS_STEREOSCOPIC_INTERLACED +float rowNum=floor(vUV.y/stepSize.y); +useCamA=mod(rowNum,2.0) == 1.0; +useCamB=mod(rowNum,2.0) == 0.0; +texCoord1=vec2(vUV.x,vUV.y); +texCoord2=vec2(vUV.x,vUV.y); +#else +useCamB=vUV.y>0.5; +useCamA=!useCamB; +texCoord1=vec2(vUV.x,useCamB ? (vUV.y-0.5)*2.0 : vUV.y*2.0); +texCoord2=vec2(vUV.x,texCoord1.y+stepSize.y); +#endif +#endif + +if (useCamB){ +frag1=texture2D(textureSampler,texCoord1).rgb; +frag2=texture2D(textureSampler,texCoord2).rgb; +}else if (useCamA){ +frag1=texture2D(camASampler ,texCoord1).rgb; +frag2=texture2D(camASampler ,texCoord2).rgb; +}else { +discard; +} +gl_FragColor=vec4((frag1+frag2)/TWO,1.0); +} +`;ze.a.ShadersStore.stereoscopicInterlacePixelShader=Pg;var xg=function(r){function t(e,n,i,o,a,s,d){var p=r.call(this,e,"stereoscopicInterlace",["stepSize"],["camASampler"],1,n[1],a,s,d,o?"#define IS_STEREOSCOPIC_INTERLACED 1":i?"#define IS_STEREOSCOPIC_HORIZ 1":void 0)||this;return p._passedProcess=n[0]._rigPostProcess,p._stepSize=new u.d(1/p.width,1/p.height),p.onSizeChangedObservable.add(function(){p._stepSize=new u.d(1/p.width,1/p.height)}),p.onApplyObservable.add(function(b){b.setTextureFromPostProcess("camASampler",p._passedProcess),b.setFloat2("stepSize",p._stepSize.x,p._stepSize.y)}),p}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"StereoscopicInterlacePostProcessI"},t}(_t),Cg=function(r){function t(e,n,i,o,a,s){var d=r.call(this,e,"stereoscopicInterlace",["stepSize"],["camASampler"],1,n[1],o,a,s,i?"#define IS_STEREOSCOPIC_HORIZ 1":void 0)||this;return d._passedProcess=n[0]._rigPostProcess,d._stepSize=new u.d(1/d.width,1/d.height),d.onSizeChangedObservable.add(function(){d._stepSize=new u.d(1/d.width,1/d.height)}),d.onApplyObservable.add(function(p){p.setTextureFromPostProcess("camASampler",d._passedProcess),p.setFloat2("stepSize",d._stepSize.x,d._stepSize.y)}),d}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"StereoscopicInterlacePostProcess"},t}(_t),Rg=` +varying vec2 vUV; +uniform sampler2D textureSampler; + +uniform float _ExposureAdjustment; +#if defined(HABLE_TONEMAPPING) +const float A=0.15; +const float B=0.50; +const float C=0.10; +const float D=0.20; +const float E=0.02; +const float F=0.30; +const float W=11.2; +#endif +float Luminance(vec3 c) +{ +return dot(c,vec3(0.22,0.707,0.071)); +} +void main(void) +{ +vec3 colour=texture2D(textureSampler,vUV).rgb; +#if defined(REINHARD_TONEMAPPING) +float lum=Luminance(colour.rgb); +float lumTm=lum*_ExposureAdjustment; +float scale=lumTm/(1.0+lumTm); +colour*=scale/lum; +#elif defined(HABLE_TONEMAPPING) +colour*=_ExposureAdjustment; +const float ExposureBias=2.0; +vec3 x=ExposureBias*colour; +vec3 curr=((x*(A*x+C*B)+D*E)/(x*(A*x+B)+D*F))-E/F; +x=vec3(W,W,W); +vec3 whiteScale=1.0/(((x*(A*x+C*B)+D*E)/(x*(A*x+B)+D*F))-E/F); +colour=curr*whiteScale; +#elif defined(OPTIMIZED_HEJIDAWSON_TONEMAPPING) +colour*=_ExposureAdjustment; +vec3 X=max(vec3(0.0,0.0,0.0),colour-0.004); +vec3 retColor=(X*(6.2*X+0.5))/(X*(6.2*X+1.7)+0.06); +colour=retColor*retColor; +#elif defined(PHOTOGRAPHIC_TONEMAPPING) +colour=vec3(1.0,1.0,1.0)-exp2(-_ExposureAdjustment*colour); +#endif +gl_FragColor=vec4(colour.rgb,1.0); +}`;ze.a.ShadersStore.tonemapPixelShader=Rg;var sr;(function(r){r[r.Hable=0]="Hable",r[r.Reinhard=1]="Reinhard",r[r.HejiDawson=2]="HejiDawson",r[r.Photographic=3]="Photographic"})(sr||(sr={}));var Og=function(r){function t(e,n,i,o,a,s,d){a===void 0&&(a=h.a.TEXTURE_BILINEAR_SAMPLINGMODE),d===void 0&&(d=h.a.TEXTURETYPE_UNSIGNED_INT);var p=r.call(this,e,"tonemap",["_ExposureAdjustment"],null,1,o,a,s,!0,null,d)||this;p._operator=n,p.exposureAdjustment=i;var b="#define ";return p._operator===sr.Hable?b+="HABLE_TONEMAPPING":p._operator===sr.Reinhard?b+="REINHARD_TONEMAPPING":p._operator===sr.HejiDawson?b+="OPTIMIZED_HEJIDAWSON_TONEMAPPING":p._operator===sr.Photographic&&(b+="PHOTOGRAPHIC_TONEMAPPING"),p.updateEffect(b),p.onApply=function(x){x.setFloat("_ExposureAdjustment",p.exposureAdjustment)},p}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"TonemapPostProcess"},t}(_t),Mg=`uniform sampler2D textureSampler; +uniform sampler2D lightScatteringSampler; +uniform float decay; +uniform float exposure; +uniform float weight; +uniform float density; +uniform vec2 meshPositionOnScreen; +varying vec2 vUV; +void main(void) { +vec2 tc=vUV; +vec2 deltaTexCoord=(tc-meshPositionOnScreen.xy); +deltaTexCoord*=1.0/float(NUM_SAMPLES)*density; +float illuminationDecay=1.0; +vec4 color=texture2D(lightScatteringSampler,tc)*0.4; +for(int i=0; i +#include +#include[0..maxSimultaneousMorphTargets] + +#include +uniform mat4 viewProjection; +uniform vec2 depthValues; +#if defined(ALPHATEST) || defined(NEED_UV) +varying vec2 vUV; +uniform mat4 diffuseMatrix; +#ifdef UV1 +attribute vec2 uv; +#endif +#ifdef UV2 +attribute vec2 uv2; +#endif +#endif +void main(void) +{ +vec3 positionUpdated=position; +#if (defined(ALPHATEST) || defined(NEED_UV)) && defined(UV1) +vec2 uvUpdated=uv; +#endif +#include[0..maxSimultaneousMorphTargets] +#include +#include +gl_Position=viewProjection*finalWorld*vec4(positionUpdated,1.0); +#if defined(ALPHATEST) || defined(BASIC_RENDER) +#ifdef UV1 +vUV=vec2(diffuseMatrix*vec4(uvUpdated,1.0,0.0)); +#endif +#ifdef UV2 +vUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0)); +#endif +#endif +} +`;ze.a.ShadersStore.volumetricLightScatteringPassVertexShader=Ig;var Dg=`#if defined(ALPHATEST) || defined(NEED_UV) +varying vec2 vUV; +#endif +#if defined(ALPHATEST) +uniform sampler2D diffuseSampler; +#endif +void main(void) +{ +#if defined(ALPHATEST) +vec4 diffuseColor=texture2D(diffuseSampler,vUV); +if (diffuseColor.a<0.4) +discard; +#endif +gl_FragColor=vec4(0.0,0.0,0.0,1.0); +} +`;ze.a.ShadersStore.volumetricLightScatteringPassPixelShader=Dg;var Xd=function(r){function t(e,n,i,o,a,s,d,p,b){a===void 0&&(a=100),s===void 0&&(s=we.a.BILINEAR_SAMPLINGMODE);var x=r.call(this,e,"volumetricLightScattering",["decay","exposure","weight","meshPositionOnScreen","density"],["lightScatteringSampler"],n.postProcessRatio||n,i,s,d,p,"#define NUM_SAMPLES "+a)||this;return x._screenCoordinates=u.d.Zero(),x.customMeshPosition=u.e.Zero(),x.useCustomMeshPosition=!1,x.invert=!0,x.excludedMeshes=new Array,x.exposure=.3,x.decay=.96815,x.weight=.58767,x.density=.926,d=(b=i===null?b:i.getScene()).getEngine(),x._viewPort=new Kn.a(0,0,1,1).toGlobal(d.getRenderWidth(),d.getRenderHeight()),x.mesh=o!==null?o:t.CreateDefaultMesh("VolumetricLightScatteringMesh",b),x._createPass(b,n.passRatio||n),x.onActivate=function(O){x.isSupported||x.dispose(O),x.onActivate=null},x.onApplyObservable.add(function(O){x._updateMeshScreenCoordinates(b),O.setTexture("lightScatteringSampler",x._volumetricLightScatteringRTT),O.setFloat("exposure",x.exposure),O.setFloat("decay",x.decay),O.setFloat("weight",x.weight),O.setFloat("density",x.density),O.setVector2("meshPositionOnScreen",x._screenCoordinates)}),x}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"useDiffuseColor",{get:function(){return l.a.Warn("VolumetricLightScatteringPostProcess.useDiffuseColor is no longer used, use the mesh material directly instead"),!1},set:function(e){l.a.Warn("VolumetricLightScatteringPostProcess.useDiffuseColor is no longer used, use the mesh material directly instead")},enumerable:!1,configurable:!0}),t.prototype.getClassName=function(){return"VolumetricLightScatteringPostProcess"},t.prototype._isReady=function(e,n){var i=e.getMesh();if(i===this.mesh&&i.material)return i.material.isReady(i);var o=[],a=[Oe.b.PositionKind],s=e.getMaterial();s&&(s.needAlphaTesting()&&o.push("#define ALPHATEST"),i.isVerticesDataPresent(Oe.b.UVKind)&&(a.push(Oe.b.UVKind),o.push("#define UV1")),i.isVerticesDataPresent(Oe.b.UV2Kind)&&(a.push(Oe.b.UV2Kind),o.push("#define UV2"))),i.useBones&&i.computeBonesUsingShaders?(a.push(Oe.b.MatricesIndicesKind),a.push(Oe.b.MatricesWeightsKind),o.push("#define NUM_BONE_INFLUENCERS "+i.numBoneInfluencers),o.push("#define BonesPerMesh "+(i.skeleton?i.skeleton.bones.length+1:0))):o.push("#define NUM_BONE_INFLUENCERS 0"),n&&(o.push("#define INSTANCES"),et.a.PushAttributesForInstances(a),e.getRenderingMesh().hasThinInstances&&o.push("#define THIN_INSTANCES"));var d=o.join(` +`);return this._cachedDefines!==d&&(this._cachedDefines=d,this._volumetricLightScatteringPass=i.getScene().getEngine().createEffect("volumetricLightScatteringPass",a,["world","mBones","viewProjection","diffuseMatrix"],["diffuseSampler"],d,void 0,void 0,void 0,{maxSimultaneousMorphTargets:i.numBoneInfluencers})),this._volumetricLightScatteringPass.isReady()},t.prototype.setCustomMeshPosition=function(e){this.customMeshPosition=e},t.prototype.getCustomMeshPosition=function(){return this.customMeshPosition},t.prototype.dispose=function(e){var n=e.getScene().customRenderTargets.indexOf(this._volumetricLightScatteringRTT);n!==-1&&e.getScene().customRenderTargets.splice(n,1),this._volumetricLightScatteringRTT.dispose(),r.prototype.dispose.call(this,e)},t.prototype.getPass=function(){return this._volumetricLightScatteringRTT},t.prototype._meshExcluded=function(e){return this.excludedMeshes.length>0&&this.excludedMeshes.indexOf(e)!==-1},t.prototype._createPass=function(e,n){var i=this,o=e.getEngine();this._volumetricLightScatteringRTT=new sn("volumetricLightScatteringMap",{width:o.getRenderWidth()*n,height:o.getRenderHeight()*n},e,!1,!0,h.a.TEXTURETYPE_UNSIGNED_INT),this._volumetricLightScatteringRTT.wrapU=we.a.CLAMP_ADDRESSMODE,this._volumetricLightScatteringRTT.wrapV=we.a.CLAMP_ADDRESSMODE,this._volumetricLightScatteringRTT.renderList=null,this._volumetricLightScatteringRTT.renderParticles=!1,this._volumetricLightScatteringRTT.ignoreCameraViewport=!0;var a=this.getCamera();a?a.customRenderTargets.push(this._volumetricLightScatteringRTT):e.customRenderTargets.push(this._volumetricLightScatteringRTT);var s,d=function(b){var x=b.getRenderingMesh(),O=b.getEffectiveMesh();if(!i._meshExcluded(x)){O._internalAbstractMeshDataInfo._isActiveIntermediate=!1;var B=b.getMaterial();if(B){var F=x.getScene(),z=F.getEngine();z.setState(B.backFaceCulling);var J=x._getInstancesRenderList(b._id,!!b.getReplacementMesh());if(!J.mustReturn){var ie=z.getCaps().instancedArrays&&(J.visibleInstances[b._id]!==null||x.hasThinInstances);if(i._isReady(b,ie)){var se=i._volumetricLightScatteringPass;if(x===i.mesh&&(se=b.effect?b.effect:B.getEffect()),z.enableEffect(se),x._bind(b,se,B.fillMode),x===i.mesh)B.bind(O.getWorldMatrix(),x);else{if(i._volumetricLightScatteringPass.setMatrix("viewProjection",F.getTransformMatrix()),B&&B.needAlphaTesting()){var ce=B.getAlphaTestTexture();i._volumetricLightScatteringPass.setTexture("diffuseSampler",ce),ce&&i._volumetricLightScatteringPass.setMatrix("diffuseMatrix",ce.getTextureMatrix())}x.useBones&&x.computeBonesUsingShaders&&x.skeleton&&i._volumetricLightScatteringPass.setMatrices("mBones",x.skeleton.getTransformMatrices(x))}x._processRendering(O,b,i._volumetricLightScatteringPass,Ht.a.TriangleFillMode,J,ie,function(ue,fe){return se.setMatrix("world",fe)})}}}}},p=new M.b(0,0,0,1);this._volumetricLightScatteringRTT.onBeforeRenderObservable.add(function(){s=e.clearColor,e.clearColor=p}),this._volumetricLightScatteringRTT.onAfterRenderObservable.add(function(){e.clearColor=s}),this._volumetricLightScatteringRTT.customRenderFunction=function(b,x,O,B){var F,z=e.getEngine();if(B.length){for(z.setColorWrite(!1),F=0;Fue._alphaIndex?1:ce._alphaIndexue._distanceToCamera?-1:0}),z.setAlphaMode(h.a.ALPHA_COMBINE),F=0;F1||e.getCaps().drawBuffersExtension)},enumerable:!1,configurable:!0}),t._Parse=function(e,n,i,o){return L.a.Parse(function(){return new t(e.name,i,e.options,n,e.renderTargetSamplingMode,i.getEngine(),e.textureType,e.reusable)},e,i,o)},Object(c.c)([Object(L.c)()],t.prototype,"ridge",void 0),Object(c.c)([Object(L.c)()],t.prototype,"valley",void 0),t}(_t);C.a.RegisteredTypes["BABYLON.ScreenSpaceCurvaturePostProcess"]=Yd,f(166),f(167),Object.defineProperty(_e.a.prototype,"forceShowBoundingBoxes",{get:function(){return this._forceShowBoundingBoxes||!1},set:function(r){this._forceShowBoundingBoxes=r,r&&this.getBoundingBoxRenderer()},enumerable:!0,configurable:!0}),_e.a.prototype.getBoundingBoxRenderer=function(){return this._boundingBoxRenderer||(this._boundingBoxRenderer=new Kd(this)),this._boundingBoxRenderer},Object.defineProperty(Dt.a.prototype,"showBoundingBox",{get:function(){return this._showBoundingBox||!1},set:function(r){this._showBoundingBox=r,r&&this.getScene().getBoundingBoxRenderer()},enumerable:!0,configurable:!0});var Kd=function(){function r(t){this.name=at.a.NAME_BOUNDINGBOXRENDERER,this.frontColor=new M.a(1,1,1),this.backColor=new M.a(.1,.1,.1),this.showBackLines=!0,this.onBeforeBoxRenderingObservable=new R.c,this.onAfterBoxRenderingObservable=new R.c,this.onResourcesReadyObservable=new R.c,this.enabled=!0,this.renderList=new di.a(32),this._vertexBuffers={},this._fillIndexBuffer=null,this._fillIndexData=null,this.scene=t,t._addComponent(this)}return r.prototype.register=function(){this.scene._beforeEvaluateActiveMeshStage.registerStep(at.a.STEP_BEFOREEVALUATEACTIVEMESH_BOUNDINGBOXRENDERER,this,this.reset),this.scene._preActiveMeshStage.registerStep(at.a.STEP_PREACTIVEMESH_BOUNDINGBOXRENDERER,this,this._preActiveMesh),this.scene._evaluateSubMeshStage.registerStep(at.a.STEP_EVALUATESUBMESH_BOUNDINGBOXRENDERER,this,this._evaluateSubMesh),this.scene._afterRenderingGroupDrawStage.registerStep(at.a.STEP_AFTERRENDERINGGROUPDRAW_BOUNDINGBOXRENDERER,this,this.render)},r.prototype._evaluateSubMesh=function(t,e){if(t.showSubMeshesBoundingBox){var n=e.getBoundingInfo();n!=null&&(n.boundingBox._tag=t.renderingGroupId,this.renderList.push(n.boundingBox))}},r.prototype._preActiveMesh=function(t){if(t.showBoundingBox||this.scene.forceShowBoundingBoxes){var e=t.getBoundingInfo();e.boundingBox._tag=t.renderingGroupId,this.renderList.push(e.boundingBox)}},r.prototype._prepareResources=function(){if(!this._colorShader){this._colorShader=new ha.a("colorShader",this.scene,"color",{attributes:[Oe.b.PositionKind],uniforms:["world","viewProjection","color"]}),this._colorShader.reservedDataStore={hidden:!0};var t=this.scene.getEngine(),e=dt.a.CreateBox({size:1});this._vertexBuffers[Oe.b.PositionKind]=new Oe.b(t,e.positions,Oe.b.PositionKind,!1),this._createIndexBuffer(),this._fillIndexData=e.indices,this.onResourcesReadyObservable.notifyObservers(this)}},r.prototype._createIndexBuffer=function(){var t=this.scene.getEngine();this._indexBuffer=t.createIndexBuffer([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,7,1,6,2,5,3,4])},r.prototype.rebuild=function(){var t=this._vertexBuffers[Oe.b.PositionKind];t&&t._rebuild(),this._createIndexBuffer()},r.prototype.reset=function(){this.renderList.reset()},r.prototype.render=function(t){if(this.renderList.length!==0&&this.enabled&&(this._prepareResources(),this._colorShader.isReady())){var e=this.scene.getEngine();e.setDepthWrite(!1),this._colorShader._preBind();for(var n=0;n + +attribute vec3 position; +attribute vec4 normal; + +uniform mat4 viewProjection; +uniform float width; +uniform float aspectRatio; +void main(void) { +#include +mat4 worldViewProjection=viewProjection*finalWorld; +vec4 viewPosition=worldViewProjection*vec4(position,1.0); +vec4 viewPositionNext=worldViewProjection*vec4(normal.xyz,1.0); +vec2 currentScreen=viewPosition.xy/viewPosition.w; +vec2 nextScreen=viewPositionNext.xy/viewPositionNext.w; +currentScreen.x*=aspectRatio; +nextScreen.x*=aspectRatio; +vec2 dir=normalize(nextScreen-currentScreen); +vec2 normalDir=vec2(-dir.y,dir.x); +normalDir*=width/2.0; +normalDir.x/=aspectRatio; +vec4 offset=vec4(normalDir*normal.w,0.0,0.0); +gl_Position=viewPosition+offset; +}`;ze.a.ShadersStore.lineVertexShader=Ng,Dt.a.prototype.disableEdgesRendering=function(){return this._edgesRenderer&&(this._edgesRenderer.dispose(),this._edgesRenderer=null),this},Dt.a.prototype.enableEdgesRendering=function(r,t,e){return r===void 0&&(r=.95),t===void 0&&(t=!1),this.disableEdgesRendering(),this._edgesRenderer=new Hc(this,r,t,!0,e),this},Object.defineProperty(Dt.a.prototype,"edgesRenderer",{get:function(){return this._edgesRenderer},enumerable:!0,configurable:!0}),To.b.prototype.enableEdgesRendering=function(r,t){return r===void 0&&(r=.95),t===void 0&&(t=!1),this.disableEdgesRendering(),this._edgesRenderer=new qd(this,r,t),this},To.a.prototype.enableEdgesRendering=function(r,t){return r===void 0&&(r=.95),t===void 0&&(t=!1),To.b.prototype.enableEdgesRendering.apply(this,arguments),this};var wg=function(){this.edges=new Array,this.edgesConnectedCount=0},Hc=function(){function r(t,e,n,i,o){var a,s=this;e===void 0&&(e=.95),n===void 0&&(n=!1),i===void 0&&(i=!0),this.edgesWidthScalerForOrthographic=1e3,this.edgesWidthScalerForPerspective=50,this._linesPositions=new Array,this._linesNormals=new Array,this._linesIndices=new Array,this._buffers={},this._buffersForInstances={},this._checkVerticesInsteadOfIndices=!1,this.isEnabled=!0,this.customInstances=new di.a(32),this._source=t,this._checkVerticesInsteadOfIndices=n,this._options=o??null,this._epsilon=e,this._prepareRessources(),i&&((a=o?.useAlternateEdgeFinder)===null||a===void 0||a?this._generateEdgesLinesAlternate():this._generateEdgesLines()),this._meshRebuildObserver=this._source.onRebuildObservable.add(function(){s._rebuild()}),this._meshDisposeObserver=this._source.onDisposeObservable.add(function(){s.dispose()})}return Object.defineProperty(r.prototype,"linesPositions",{get:function(){return this._linesPositions},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"linesNormals",{get:function(){return this._linesNormals},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"linesIndices",{get:function(){return this._linesIndices},enumerable:!1,configurable:!0}),r.GetShader=function(t){if(!t._edgeRenderLineShader){var e=new ha.a("lineShader",t,"line",{attributes:["position","normal"],uniforms:["world","viewProjection","color","width","aspectRatio"]});e.disableDepthWrite=!0,e.backFaceCulling=!1,t._edgeRenderLineShader=e}return t._edgeRenderLineShader},r.prototype._prepareRessources=function(){this._lineShader||(this._lineShader=r.GetShader(this._source.getScene()))},r.prototype._rebuild=function(){var t=this._buffers[Oe.b.PositionKind];t&&t._rebuild(),(t=this._buffers[Oe.b.NormalKind])&&t._rebuild();var e=this._source.getScene().getEngine();this._ib=e.createIndexBuffer(this._linesIndices)},r.prototype.dispose=function(){this._source.onRebuildObservable.remove(this._meshRebuildObserver),this._source.onDisposeObservable.remove(this._meshDisposeObserver);var t=this._buffers[Oe.b.PositionKind];t&&(t.dispose(),this._buffers[Oe.b.PositionKind]=null),(t=this._buffers[Oe.b.NormalKind])&&(t.dispose(),this._buffers[Oe.b.NormalKind]=null),this._ib&&this._source.getScene().getEngine()._releaseBuffer(this._ib),this._lineShader.dispose()},r.prototype._processEdgeForAdjacencies=function(t,e,n,i,o){return t===n&&e===i||t===i&&e===n?0:t===i&&e===o||t===o&&e===i?1:t===o&&e===n||t===n&&e===o?2:-1},r.prototype._processEdgeForAdjacenciesWithVertices=function(t,e,n,i,o){var a=1e-10;return t.equalsWithEpsilon(n,a)&&e.equalsWithEpsilon(i,a)||t.equalsWithEpsilon(i,a)&&e.equalsWithEpsilon(n,a)?0:t.equalsWithEpsilon(i,a)&&e.equalsWithEpsilon(o,a)||t.equalsWithEpsilon(o,a)&&e.equalsWithEpsilon(i,a)?1:t.equalsWithEpsilon(o,a)&&e.equalsWithEpsilon(n,a)||t.equalsWithEpsilon(n,a)&&e.equalsWithEpsilon(o,a)?2:-1},r.prototype._checkEdge=function(t,e,n,i,o){var a;e===void 0?a=!0:a=u.e.Dot(n[t],n[e])=0&&Ee.push(Se);for(var Le=0;Le=t[0].length&&t[1].length>=t[2].length?a=1:t[2].length>=t[0].length&&t[2].length>=t[1].length&&(a=2);for(var s=0;s<3;++s)s===a?t[s].sort(function(Ae,Ee){return Ae[1]Ee[1]?1:0}):t[s].sort(function(Ae,Ee){return Ae[1]>Ee[1]?-1:Ae[1]=a+1;--x)o(t[x%3],p,x!==a+2?i[n[e+(x+1)%3]]:-1);var O=p.length;n.push(i[n[e+a]],d[0],p[0]),n.push(i[n[e+(a+1)%3]],p[O-1],d[b-1]);for(var B=b<=O,F=B?b:O,z=B?O:b,J=B?b-1:O-1,ie=B?0:1,se=b+O-2,ce=0,ue=0,fe=B?d:p,ve=B?p:d,Te=0;se-- >0;){ie?n.push(fe[ce],ve[ue]):n.push(ve[ue],fe[ce]);var Re=void 0;(Te+=F)>=z&&ceYe){var Et=Fe;Fe=Ye,Ye=Et}($t=zt[Mt=Fe+"_"+Ye])?$t.done||(u.e.Dot(Yt,$t.normal)0||this._source.hasThinInstances)},r.prototype.render=function(){var t=this._source.getScene();if(this.isReady()&&t.activeCamera){var e=t.getEngine();this._lineShader._preBind(),this._source.edgesColor.a!==1?e.setAlphaMode(h.a.ALPHA_COMBINE):e.setAlphaMode(h.a.ALPHA_DISABLE);var n=this._source.hasInstances&&this.customInstances.length>0,i=n||this._source.hasThinInstances,o=0;if(i)if(this._buffersForInstances.world0=this._source.getVertexBuffer("world0"),this._buffersForInstances.world1=this._source.getVertexBuffer("world1"),this._buffersForInstances.world2=this._source.getVertexBuffer("world2"),this._buffersForInstances.world3=this._source.getVertexBuffer("world3"),n){var a=this._source._instanceDataStorage;if(o=this.customInstances.length,!a.isFrozen){for(var s=0,d=0;d0&&(e.push(!0),n.push(!1));this._multiRenderAttachments=this._engine.buildTextureLayout(t),this._clearAttachments=this._engine.buildTextureLayout(e),this._defaultAttachments=this._engine.buildTextureLayout(n)},r.prototype._createCompositionEffect=function(){this.prePassRT=new qs("sceneprePassRT",{width:this._engine.getRenderWidth(),height:this._engine.getRenderHeight()},this.mrtCount,this._scene,{generateMipMaps:!1,generateDepthTexture:!0,defaultType:h.a.TEXTURETYPE_UNSIGNED_INT,types:this._mrtFormats}),this.prePassRT.samples=1,this._initializeAttachments(),this._useGeometryBufferFallback&&!this._geometryBuffer&&(this.useGeometryBufferFallback=!0),this.imageProcessingPostProcess=new zo("sceneCompositionPass",1,null,void 0,this._engine),this.imageProcessingPostProcess.autoClear=!1},Object.defineProperty(r.prototype,"isSupported",{get:function(){return this._engine.webGLVersion>1||this._scene.getEngine().getCaps().drawBuffersExtension},enumerable:!1,configurable:!0}),r.prototype.bindAttachmentsForEffect=function(t,e){if(this.enabled){if(t._multiTarget)this._engine.bindAttachments(this._multiRenderAttachments);else if(this._engine.bindAttachments(this._defaultAttachments),this._geometryBuffer){var n=e.getMaterial();n&&this.excludedMaterials.indexOf(n)===-1&&this._geometryBuffer.renderList.push(e.getRenderingMesh())}}},r.prototype.restoreAttachments=function(){this.enabled&&this._defaultAttachments&&this._engine.bindAttachments(this._defaultAttachments)},r.prototype._beforeCameraDraw=function(){this._isDirty&&this._update(),this._geometryBuffer&&(this._geometryBuffer.renderList.length=0),this._bindFrameBuffer()},r.prototype._afterCameraDraw=function(){if(this._enabled){var t=this._scene.activeCamera&&this._scene.activeCamera._getFirstPostProcess();t&&this._postProcesses.length&&this._scene.postProcessManager._prepareFrame(),this._scene.postProcessManager.directRender(this._postProcesses,t?t.inputTexture:null)}},r.prototype._checkRTSize=function(){var t=this._engine.getRenderWidth(!0),e=this._engine.getRenderHeight(!0),n=this.prePassRT.getRenderWidth(),i=this.prePassRT.getRenderHeight();n===t&&i===e||(this.prePassRT.resize({width:t,height:e}),this._updateGeometryBufferLayout(),this._bindPostProcessChain())},r.prototype._bindFrameBuffer=function(){if(this._enabled){this._checkRTSize();var t=this.prePassRT.getInternalTexture();t&&this._engine.bindFramebuffer(t)}},r.prototype.clear=function(){this._enabled&&(this._bindFrameBuffer(),this._engine.clear(this._scene.clearColor,this._scene.autoClear||this._scene.forceWireframe||this._scene.forcePointsCloud,this._scene.autoClearDepthAndStencil,this._scene.autoClearDepthAndStencil),this._engine.bindAttachments(this._clearAttachments),this._engine.clear(this._clearColor,!0,!1,!1),this._engine.bindAttachments(this._defaultAttachments))},r.prototype._setState=function(t){this._enabled=t,this._scene.prePass=t,this.imageProcessingPostProcess&&(this.imageProcessingPostProcess.imageProcessingConfiguration.applyByPostProcess=t)},r.prototype._updateGeometryBufferLayout=function(){if(this._geometryBuffer){this._geometryBuffer._resetLayout();for(var t=[],e=0;e +#include +#include +#include +varying vec2 vUV; +uniform vec2 texelSize; +uniform sampler2D textureSampler; +uniform sampler2D irradianceSampler; +uniform sampler2D depthSampler; +uniform sampler2D albedoSampler; +uniform vec2 viewportSize; +uniform float metersPerUnit; +const float LOG2_E=1.4426950408889634; +const float SSS_PIXELS_PER_SAMPLE=4.; +const int _SssSampleBudget=40; +#define rcp(x) 1./x +#define Sq(x) x*x +#define SSS_BILATERAL_FILTER true + + +vec3 EvalBurleyDiffusionProfile(float r,vec3 S) +{ +vec3 exp_13=exp2(((LOG2_E*(-1.0/3.0))*r)*S); +vec3 expSum=exp_13*(1.+exp_13*exp_13); +return (S*rcp(8.*PI))*expSum; +} + + + + + + +vec2 SampleBurleyDiffusionProfile(float u,float rcpS) +{ +u=1.-u; +float g=1.+(4.*u)*(2.*u+sqrt(1.+(4.*u)*u)); +float n=exp2(log2(g)*(-1.0/3.0)); +float p=(g*n)*n; +float c=1.+p+n; +float d=(3./LOG2_E*2.)+(3./LOG2_E)*log2(u); +float x=(3./LOG2_E)*log2(c)-d; + + + + + + +float rcpExp=((c*c)*c)*rcp((4.*u)*((c*c)+(4.*u)*(4.*u))); +float r=x*rcpS; +float rcpPdf=(8.*PI*rcpS)*rcpExp; +return vec2(r,rcpPdf); +} + + +vec3 ComputeBilateralWeight(float xy2,float z,float mmPerUnit,vec3 S,float rcpPdf) +{ +#ifndef SSS_BILATERAL_FILTER +z=0.; +#endif + + + +float r=sqrt(xy2+(z*mmPerUnit)*(z*mmPerUnit)); +float area=rcpPdf; +#if SSS_CLAMP_ARTIFACT +return clamp(EvalBurleyDiffusionProfile(r,S)*area,0.0,1.0); +#else +return EvalBurleyDiffusionProfile(r,S)*area; +#endif +} +void EvaluateSample(int i,int n,vec3 S,float d,vec3 centerPosVS,float mmPerUnit,float pixelsPerMm, +float phase,inout vec3 totalIrradiance,inout vec3 totalWeight) +{ + +float scale=rcp(float(n)); +float offset=rcp(float(n))*0.5; + +float sinPhase,cosPhase; +sinPhase=sin(phase); +cosPhase=cos(phase); +vec2 bdp=SampleBurleyDiffusionProfile(float(i)*scale+offset,d); +float r=bdp.x; +float rcpPdf=bdp.y; +float phi=SampleDiskGolden(i,n).y; +float sinPhi,cosPhi; +sinPhi=sin(phi); +cosPhi=cos(phi); +float sinPsi=cosPhase*sinPhi+sinPhase*cosPhi; +float cosPsi=cosPhase*cosPhi-sinPhase*sinPhi; +vec2 vec=r*vec2(cosPsi,sinPsi); + +vec2 position; +float xy2; +position=vUV+round((pixelsPerMm*r)*vec2(cosPsi,sinPsi))*texelSize; +xy2=r*r; +vec4 textureSample=texture2D(irradianceSampler,position); +float viewZ=texture2D(depthSampler,position).r; +vec3 irradiance=textureSample.rgb; +if (testLightingForSSS(textureSample.a)) +{ + +float relZ=viewZ-centerPosVS.z; +vec3 weight=ComputeBilateralWeight(xy2,relZ,mmPerUnit,S,rcpPdf); +totalIrradiance+=weight*irradiance; +totalWeight+=weight; +} +else +{ + + + + + + +} +} +void main(void) +{ +vec4 irradianceAndDiffusionProfile=texture2D(irradianceSampler,vUV); +vec3 centerIrradiance=irradianceAndDiffusionProfile.rgb; +int diffusionProfileIndex=int(round(irradianceAndDiffusionProfile.a*255.)); +float centerDepth=0.; +vec4 inputColor=texture2D(textureSampler,vUV); +bool passedStencilTest=testLightingForSSS(irradianceAndDiffusionProfile.a); +if (passedStencilTest) +{ +centerDepth=texture2D(depthSampler,vUV).r; +} +if (!passedStencilTest) { +gl_FragColor=inputColor; +return; +} +float distScale=1.; +vec3 S=diffusionS[diffusionProfileIndex]; +float d=diffusionD[diffusionProfileIndex]; +float filterRadius=filterRadii[diffusionProfileIndex]; + +vec2 centerPosNDC=vUV; +vec2 cornerPosNDC=vUV+0.5*texelSize; +vec3 centerPosVS=vec3(centerPosNDC*viewportSize,1.0)*centerDepth; +vec3 cornerPosVS=vec3(cornerPosNDC*viewportSize,1.0)*centerDepth; + +float mmPerUnit=1000.*(metersPerUnit*rcp(distScale)); +float unitsPerMm=rcp(mmPerUnit); + + +float unitsPerPixel=2.*abs(cornerPosVS.x-centerPosVS.x); +float pixelsPerMm=rcp(unitsPerPixel)*unitsPerMm; + +float filterArea=PI*Sq(filterRadius*pixelsPerMm); +int sampleCount=int(filterArea*rcp(SSS_PIXELS_PER_SAMPLE)); +int sampleBudget=_SssSampleBudget; +int texturingMode=0; +vec3 albedo=texture2D(albedoSampler,vUV).rgb; +if (distScale == 0. || sampleCount<1) +{ +#ifdef DEBUG_SSS_SAMPLES +vec3 green=vec3(0.,1.,0.); +gl_FragColor=vec4(green,1.0); +return; +#endif +gl_FragColor=vec4(inputColor.rgb+albedo*centerIrradiance,1.0); +return; +} +#ifdef DEBUG_SSS_SAMPLES +vec3 red=vec3(1.,0.,0.); +vec3 blue=vec3(0.,0.,1.); +gl_FragColor=vec4(mix(blue,red,clamp(float(sampleCount)/float(sampleBudget),0.0,1.0)),1.0); +return; +#endif + +float phase=0.; +int n=min(sampleCount,sampleBudget); + +vec3 centerWeight=vec3(0.); +vec3 totalIrradiance=vec3(0.); +vec3 totalWeight=vec3(0.); +for (int i=0; i=5)return l.a.Error("You already reached the maximum number of diffusion profiles."),0;for(var e=0;e +void main(void) { +#ifdef ALPHATEST +if (texture2D(diffuseSampler,vUV).a<0.4) +discard; +#endif +#include +gl_FragColor=color; +}`;ze.a.ShadersStore.outlinePixelShader=kg;var Gg=` +attribute vec3 position; +attribute vec3 normal; +#include +#include +#include[0..maxSimultaneousMorphTargets] + +uniform float offset; +#include +uniform mat4 viewProjection; +#ifdef ALPHATEST +varying vec2 vUV; +uniform mat4 diffuseMatrix; +#ifdef UV1 +attribute vec2 uv; +#endif +#ifdef UV2 +attribute vec2 uv2; +#endif +#endif +#include +void main(void) +{ +vec3 positionUpdated=position; +vec3 normalUpdated=normal; +#ifdef UV1 +vec2 uvUpdated=uv; +#endif +#include[0..maxSimultaneousMorphTargets] +vec3 offsetPosition=positionUpdated+(normalUpdated*offset); +#include +#include +gl_Position=viewProjection*finalWorld*vec4(offsetPosition,1.0); +#ifdef ALPHATEST +#ifdef UV1 +vUV=vec2(diffuseMatrix*vec4(uvUpdated,1.0,0.0)); +#endif +#ifdef UV2 +vUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0)); +#endif +#endif +#include +} +`;ze.a.ShadersStore.outlineVertexShader=Gg,_e.a.prototype.getOutlineRenderer=function(){return this._outlineRenderer||(this._outlineRenderer=new ef(this)),this._outlineRenderer},Object.defineProperty(De.a.prototype,"renderOutline",{get:function(){return this._renderOutline},set:function(r){r&&this.getScene().getOutlineRenderer(),this._renderOutline=r},enumerable:!0,configurable:!0}),Object.defineProperty(De.a.prototype,"renderOverlay",{get:function(){return this._renderOverlay},set:function(r){r&&this.getScene().getOutlineRenderer(),this._renderOverlay=r},enumerable:!0,configurable:!0});var ef=function(){function r(t){this.name=at.a.NAME_OUTLINERENDERER,this.zOffset=1,this.scene=t,this._engine=t.getEngine(),this.scene._addComponent(this)}return r.prototype.register=function(){this.scene._beforeRenderingMeshStage.registerStep(at.a.STEP_BEFORERENDERINGMESH_OUTLINE,this,this._beforeRenderingMesh),this.scene._afterRenderingMeshStage.registerStep(at.a.STEP_AFTERRENDERINGMESH_OUTLINE,this,this._afterRenderingMesh)},r.prototype.rebuild=function(){},r.prototype.dispose=function(){},r.prototype.render=function(t,e,n){var i=this;n===void 0&&(n=!1);var o=this.scene,a=o.getEngine(),s=a.getCaps().instancedArrays&&(e.visibleInstances[t._id]!==null&&e.visibleInstances[t._id]!==void 0||t.getRenderingMesh().hasThinInstances);if(this.isReady(t,s)){var d=t.getMesh(),p=d._internalAbstractMeshDataInfo._actAsRegularMesh?d:null,b=t.getRenderingMesh(),x=p||b,O=t.getMaterial();if(O&&o.activeCamera){if(a.enableEffect(this._effect),O.useLogarithmicDepth&&this._effect.setFloat("logarithmicDepthConstant",2/(Math.log(o.activeCamera.maxZ+1)/Math.LN2)),this._effect.setFloat("offset",n?0:b.outlineWidth),this._effect.setColor4("color",n?b.overlayColor:b.outlineColor,n?b.overlayAlpha:O.alpha),this._effect.setMatrix("viewProjection",o.getTransformMatrix()),this._effect.setMatrix("world",x.getWorldMatrix()),b.useBones&&b.computeBonesUsingShaders&&b.skeleton&&this._effect.setMatrices("mBones",b.skeleton.getTransformMatrices(b)),et.a.BindMorphTargetParameters(b,this._effect),b._bind(t,this._effect,O.fillMode),O&&O.needAlphaTesting()){var B=O.getAlphaTestTexture();B&&(this._effect.setTexture("diffuseSampler",B),this._effect.setMatrix("diffuseMatrix",B.getTextureMatrix()))}a.setZOffset(-this.zOffset),b._processRendering(x,t,this._effect,O.fillMode,e,s,function(F,z){i._effect.setMatrix("world",z)}),a.setZOffset(0)}}},r.prototype.isReady=function(t,e){var n=[],i=[Oe.b.PositionKind,Oe.b.NormalKind],o=t.getMesh(),a=t.getMaterial();a&&(a.needAlphaTesting()&&(n.push("#define ALPHATEST"),o.isVerticesDataPresent(Oe.b.UVKind)&&(i.push(Oe.b.UVKind),n.push("#define UV1")),o.isVerticesDataPresent(Oe.b.UV2Kind)&&(i.push(Oe.b.UV2Kind),n.push("#define UV2"))),a.useLogarithmicDepth&&n.push("#define LOGARITHMICDEPTH")),o.useBones&&o.computeBonesUsingShaders?(i.push(Oe.b.MatricesIndicesKind),i.push(Oe.b.MatricesWeightsKind),o.numBoneInfluencers>4&&(i.push(Oe.b.MatricesIndicesExtraKind),i.push(Oe.b.MatricesWeightsExtraKind)),n.push("#define NUM_BONE_INFLUENCERS "+o.numBoneInfluencers),n.push("#define BonesPerMesh "+(o.skeleton?o.skeleton.bones.length+1:0))):n.push("#define NUM_BONE_INFLUENCERS 0");var s=o.morphTargetManager,d=0;s&&s.numInfluencers>0&&(d=s.numInfluencers,n.push("#define MORPHTARGETS"),n.push("#define NUM_MORPH_INFLUENCERS "+d),et.a.PrepareAttributesForMorphTargetsInfluencers(i,o,d)),e&&(n.push("#define INSTANCES"),et.a.PushAttributesForInstances(i),t.getRenderingMesh().hasThinInstances&&n.push("#define THIN_INSTANCES"));var p=n.join(` +`);return this._cachedDefines!==p&&(this._cachedDefines=p,this._effect=this.scene.getEngine().createEffect("outline",i,["world","mBones","viewProjection","diffuseMatrix","offset","color","logarithmicDepthConstant","morphTargetInfluences"],["diffuseSampler"],p,void 0,void 0,void 0,{maxSimultaneousMorphTargets:d})),this._effect.isReady()},r.prototype._beforeRenderingMesh=function(t,e,n){if(this._savedDepthWrite=this._engine.getDepthWrite(),t.renderOutline){var i=e.getMaterial();i&&i.needAlphaBlendingForMesh(t)&&(this._engine.cacheStencilState(),this._engine.setDepthWrite(!1),this._engine.setColorWrite(!1),this._engine.setStencilBuffer(!0),this._engine.setStencilOperationPass(h.a.REPLACE),this._engine.setStencilFunction(h.a.ALWAYS),this._engine.setStencilMask(r._StencilReference),this._engine.setStencilFunctionReference(r._StencilReference),this.render(e,n,!0),this._engine.setColorWrite(!0),this._engine.setStencilFunction(h.a.NOTEQUAL)),this._engine.setDepthWrite(!1),this.render(e,n),this._engine.setDepthWrite(this._savedDepthWrite),i&&i.needAlphaBlendingForMesh(t)&&this._engine.restoreStencilState()}},r.prototype._afterRenderingMesh=function(t,e,n){if(t.renderOverlay){var i=this._engine.getAlphaMode(),o=this._engine.alphaState.alphaBlend;this._engine.setAlphaMode(h.a.ALPHA_COMBINE),this.render(e,n,!0),this._engine.setAlphaMode(i),this._engine.setDepthWrite(this._savedDepthWrite),this._engine.alphaState.alphaBlend=o}t.renderOutline&&this._savedDepthWrite&&(this._engine.setDepthWrite(!0),this._engine.setColorWrite(!1),this.render(e,n),this._engine.setColorWrite(!0))},r._StencilReference=4,r}(),zg=f(148),tf=function(r){function t(e,n){var i=r.call(this)||this;return i.name=e,i.animations=new Array,i.isPickable=!1,i.useAlphaForPicking=!1,i.onDisposeObservable=new R.c,i._onAnimationEnd=null,i._endAnimation=function(){i._onAnimationEnd&&i._onAnimationEnd(),i.disposeWhenFinishedAnimating&&i.dispose()},i.color=new M.b(1,1,1,1),i.position=u.e.Zero(),i._manager=n,i._manager.sprites.push(i),i.uniqueId=i._manager.scene.getUniqueId(),i}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"size",{get:function(){return this.width},set:function(e){this.width=e,this.height=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"manager",{get:function(){return this._manager},enumerable:!1,configurable:!0}),t.prototype.getClassName=function(){return"Sprite"},Object.defineProperty(t.prototype,"fromIndex",{get:function(){return this._fromIndex},set:function(e){this.playAnimation(e,this._toIndex,this._loopAnimation,this._delay,this._onAnimationEnd)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toIndex",{get:function(){return this._toIndex},set:function(e){this.playAnimation(this._fromIndex,e,this._loopAnimation,this._delay,this._onAnimationEnd)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"loopAnimation",{get:function(){return this._loopAnimation},set:function(e){this.playAnimation(this._fromIndex,this._toIndex,e,this._delay,this._onAnimationEnd)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"delay",{get:function(){return Math.max(this._delay,1)},set:function(e){this.playAnimation(this._fromIndex,this._toIndex,this._loopAnimation,e,this._onAnimationEnd)},enumerable:!1,configurable:!0}),t.prototype.playAnimation=function(e,n,i,o,a){a===void 0&&(a=null),this._onAnimationEnd=a,r.prototype.playAnimation.call(this,e,n,i,o,this._endAnimation)},t.prototype.dispose=function(){for(var e=0;ethis._delay&&(this._time=this._time%this._delay,this.cellIndex+=this._direction,(this._direction>0&&this.cellIndex>this._toIndex||this._direction<0&&this.cellIndex0?this._fromIndex:this._toIndex:(this.cellIndex=this._toIndex,this._animationStarted=!1,this._onBaseAnimationEnd&&this._onBaseAnimationEnd()))))},r}());_e.a.prototype._internalPickSprites=function(r,t,e,n){if(!tr.a)return null;var i=null;if(!n){if(!this.activeCamera)return null;n=this.activeCamera}if(this.spriteManagers.length>0)for(var o=0;o=i.distance))&&(i=s,e))break}}return i||new tr.a},_e.a.prototype._internalMultiPickSprites=function(r,t,e){if(!tr.a)return null;var n=new Array;if(!e){if(!this.activeCamera)return null;e=this.activeCamera}if(this.spriteManagers.length>0)for(var i=0;i0&&(n=o.pickSprite(t,e,this._spritePredicate,!1,o.cameraToUseForPointers||void 0))&&n.hit&&n.pickedSprite&&n.pickedSprite.actionManager){switch(o._pickedDownSprite=n.pickedSprite,i.button){case 0:n.pickedSprite.actionManager.processTrigger(h.a.ACTION_OnLeftPickTrigger,m.a.CreateNewFromSprite(n.pickedSprite,o,i));break;case 1:n.pickedSprite.actionManager.processTrigger(h.a.ACTION_OnCenterPickTrigger,m.a.CreateNewFromSprite(n.pickedSprite,o,i));break;case 2:n.pickedSprite.actionManager.processTrigger(h.a.ACTION_OnRightPickTrigger,m.a.CreateNewFromSprite(n.pickedSprite,o,i))}n.pickedSprite.actionManager&&n.pickedSprite.actionManager.processTrigger(h.a.ACTION_OnPickDownTrigger,m.a.CreateNewFromSprite(n.pickedSprite,o,i))}return n},r.prototype._pointerUp=function(t,e,n,i){var o=this.scene;if(o.spriteManagers.length>0){var a=o.pickSprite(t,e,this._spritePredicate,!1,o.cameraToUseForPointers||void 0);a&&(a.hit&&a.pickedSprite&&a.pickedSprite.actionManager&&(a.pickedSprite.actionManager.processTrigger(h.a.ACTION_OnPickUpTrigger,m.a.CreateNewFromSprite(a.pickedSprite,o,i)),a.pickedSprite.actionManager&&(this.scene._inputManager._isPointerSwiping()||a.pickedSprite.actionManager.processTrigger(h.a.ACTION_OnPickTrigger,m.a.CreateNewFromSprite(a.pickedSprite,o,i)))),o._pickedDownSprite&&o._pickedDownSprite.actionManager&&o._pickedDownSprite!==a.pickedSprite&&o._pickedDownSprite.actionManager.processTrigger(h.a.ACTION_OnPickOutTrigger,m.a.CreateNewFromSprite(o._pickedDownSprite,o,i)))}return n},r}();ze.a.IncludesShadersStore.imageProcessingCompatibility=`#ifdef IMAGEPROCESSINGPOSTPROCESS +gl_FragColor.rgb=pow(gl_FragColor.rgb,vec3(2.2)); +#endif`;var jg=`uniform bool alphaTest; +varying vec4 vColor; + +varying vec2 vUV; +uniform sampler2D diffuseSampler; + +#include +void main(void) { +vec4 color=texture2D(diffuseSampler,vUV); +if (alphaTest) +{ +if (color.a<0.95) +discard; +} +color*=vColor; +#include +gl_FragColor=color; +#include +}`;ze.a.ShadersStore.spritesPixelShader=jg;var Hg=` +attribute vec4 position; +attribute vec2 options; +attribute vec2 offsets; +attribute vec2 inverts; +attribute vec4 cellInfo; +attribute vec4 color; + +uniform mat4 view; +uniform mat4 projection; + +varying vec2 vUV; +varying vec4 vColor; +#include +void main(void) { +vec3 viewPos=(view*vec4(position.xyz,1.0)).xyz; +vec2 cornerPos; +float angle=position.w; +vec2 size=vec2(options.x,options.y); +vec2 offset=offsets.xy; +cornerPos=vec2(offset.x-0.5,offset.y-0.5)*size; + +vec3 rotatedCorner; +rotatedCorner.x=cornerPos.x*cos(angle)-cornerPos.y*sin(angle); +rotatedCorner.y=cornerPos.x*sin(angle)+cornerPos.y*cos(angle); +rotatedCorner.z=0.; + +viewPos+=rotatedCorner; +gl_Position=projection*vec4(viewPos,1.0); + +vColor=color; + +vec2 uvOffset=vec2(abs(offset.x-inverts.x),abs(1.0-offset.y-inverts.y)); +vec2 uvPlace=cellInfo.xy; +vec2 uvSize=cellInfo.zw; +vUV.x=uvPlace.x+uvSize.x*uvOffset.x; +vUV.y=uvPlace.y+uvSize.y*uvOffset.y; + +#ifdef FOG +vFogDistance=viewPos; +#endif +}`;ze.a.ShadersStore.spritesVertexShader=Hg;var Wg=function(){function r(t,e,n,i){if(n===void 0&&(n=.01),i===void 0&&(i=null),this.blendMode=h.a.ALPHA_COMBINE,this.autoResetAlpha=!0,this.disableDepthWrite=!1,this.fogEnabled=!0,this._useVAO=!1,this._useInstancing=!1,this._vertexBuffers={},this._capacity=e,this._epsilon=n,this._engine=t,this._useInstancing=t.getCaps().instancedArrays,this._useVAO=t.getCaps().vertexArrayObject&&!t.disableVertexArrayObjects,this._scene=i,!this._useInstancing){for(var o=[],a=0,s=0;s>0;e._xOffset=(e.cellIndex-b*p)*this.cellWidth/o.width,e._yOffset=b*this.cellHeight/o.height,e._xSize=this.cellWidth,e._ySize=this.cellHeight}this._vertexData[d]=e.position.x,this._vertexData[d+1]=e.position.y,this._vertexData[d+2]=e.position.z,this._vertexData[d+3]=e.angle,this._vertexData[d+4]=e.width,this._vertexData[d+5]=e.height,this._useInstancing?d-=2:(this._vertexData[d+6]=n,this._vertexData[d+7]=i),this._vertexData[d+8]=a?e.invertU?0:1:e.invertU?1:0,this._vertexData[d+9]=e.invertV?1:0,this._vertexData[d+10]=e._xOffset,this._vertexData[d+11]=e._yOffset,this._vertexData[d+12]=e._xSize/o.width,this._vertexData[d+13]=e._ySize/o.height,this._vertexData[d+14]=e.color.r,this._vertexData[d+15]=e.color.g,this._vertexData[d+16]=e.color.b,this._vertexData[d+17]=e.color.a},r.prototype.dispose=function(){this._buffer&&(this._buffer.dispose(),this._buffer=null),this._spriteBuffer&&(this._spriteBuffer.dispose(),this._spriteBuffer=null),this._indexBuffer&&(this._engine._releaseBuffer(this._indexBuffer),this._indexBuffer=null),this._vertexArrayObject&&(this._engine.releaseVertexArrayObject(this._vertexArrayObject),this._vertexArrayObject=null),this.texture&&(this.texture.dispose(),this.texture=null)},r}(),rf=function(){function r(t,e,n,i,o,a,s,d,p){var b=this;a===void 0&&(a=.01),s===void 0&&(s=we.a.TRILINEAR_SAMPLINGMODE),d===void 0&&(d=!1),p===void 0&&(p=null),this.name=t,this.sprites=new Array,this.renderingGroupId=0,this.layerMask=268435455,this.isPickable=!1,this.onDisposeObservable=new R.c,this.disableDepthWrite=!1,this._packedAndReady=!1,this._customUpdate=function(O,B){O.cellRef||(O.cellIndex=0);var F=O.cellIndex;typeof F=="number"&&isFinite(F)&&Math.floor(F)===F&&(O.cellRef=b._spriteMap[O.cellIndex]),O._xOffset=b._cellData[O.cellRef].frame.x/B.width,O._yOffset=b._cellData[O.cellRef].frame.y/B.height,O._xSize=b._cellData[O.cellRef].frame.w,O._ySize=b._cellData[O.cellRef].frame.h},o||(o=Ue.a.LastCreatedScene),o._getComponent(at.a.NAME_SPRITE)||o._addComponent(new nf(o)),this._fromPacked=d,this._scene=o;var x=this._scene.getEngine();if(this._spriteRenderer=new Wg(x,n,a,o),i.width&&i.height)this.cellWidth=i.width,this.cellHeight=i.height;else{if(i===void 0)return void(this._spriteRenderer=null);this.cellWidth=i,this.cellHeight=i}this._scene.spriteManagers.push(this),this.uniqueId=this.scene.getUniqueId(),e&&(this.texture=new we.a(e,o,!0,!1,s)),this._fromPacked&&this._makePacked(e,p)}return Object.defineProperty(r.prototype,"onDispose",{set:function(t){this._onDisposeObserver&&this.onDisposeObservable.remove(this._onDisposeObserver),this._onDisposeObserver=this.onDisposeObservable.add(t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"children",{get:function(){return this.sprites},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"scene",{get:function(){return this._scene},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"capacity",{get:function(){return this._spriteRenderer.capacity},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"texture",{get:function(){return this._spriteRenderer.texture},set:function(t){t.wrapU=we.a.CLAMP_ADDRESSMODE,t.wrapV=we.a.CLAMP_ADDRESSMODE,this._spriteRenderer.texture=t,this._textureContent=null},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"cellWidth",{get:function(){return this._spriteRenderer.cellWidth},set:function(t){this._spriteRenderer.cellWidth=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"cellHeight",{get:function(){return this._spriteRenderer.cellHeight},set:function(t){this._spriteRenderer.cellHeight=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"fogEnabled",{get:function(){return this._spriteRenderer.fogEnabled},set:function(t){this._spriteRenderer.fogEnabled=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"blendMode",{get:function(){return this._spriteRenderer.blendMode},set:function(t){this._spriteRenderer.blendMode=t},enumerable:!1,configurable:!0}),r.prototype.getClassName=function(){return"SpriteManager"},r.prototype._makePacked=function(t,e){var n=this;if(e!==null)try{var i=void 0;if((i=typeof e=="string"?JSON.parse(e):e).frames.length){for(var o={},a=0;a0);var x=t.substring(0,b-1)+".json",O=new XMLHttpRequest;O.open("GET",x,!0),O.onerror=function(){l.a.Error("JSON ERROR: Unable to load JSON file."),n._fromPacked=!1,n._packedAndReady=!1},O.onload=function(){try{var B=JSON.parse(O.response),F=Reflect.ownKeys(B.frames);n._spriteMap=F,n._packedAndReady=!0,n._cellData=B.frames}catch{throw n._fromPacked=!1,n._packedAndReady=!1,new Error("Invalid JSON format. Please check documentation for format specifications.")}},O.send()}},r.prototype._checkTextureAlpha=function(t,e,n,i,o){if(!t.useAlphaForPicking||!this.texture)return!0;var a=this.texture.getSize();this._textureContent||(this._textureContent=new Uint8Array(a.width*a.height*4),this.texture.readPixels(0,0,this._textureContent));var s=u.c.Vector3[0];s.copyFrom(e.direction),s.normalize(),s.scaleInPlace(n),s.addInPlace(e.origin);var d=(s.x-i.x)/(o.x-i.x)-.5,p=1-(s.y-i.y)/(o.y-i.y)-.5,b=t.angle,x=d*Math.cos(b)-p*Math.sin(b)+.5,O=d*Math.sin(b)+p*Math.cos(b)+.5,B=t._xOffset*a.width+x*t._xSize|0,F=t._yOffset*a.height+O*t._ySize|0;return this._textureContent[4*(B+F*a.width)+3]>.5},r.prototype.intersects=function(t,e,n,i){for(var o=Math.min(this.capacity,this.sprites.length),a=u.e.Zero(),s=u.e.Zero(),d=Number.MAX_VALUE,p=null,b=u.c.Vector3[0],x=u.c.Vector3[1],O=e.getViewMatrix(),B=0;Bz){if(!this._checkTextureAlpha(F,t,z,a,s))continue;if(d=z,p=F,i)break}}}}if(p){var J=new tr.a;O.invertToRef(u.c.Matrix[0]),J.hit=!0,J.pickedSprite=p,J.distance=d;var ie=u.c.Vector3[2];return ie.copyFrom(t.direction),ie.normalize(),ie.scaleInPlace(d),t.origin.addToRef(ie,b),J.pickedPoint=u.e.TransformCoordinates(b,u.c.Matrix[0]),J}return null},r.prototype.multiIntersects=function(t,e,n){for(var i,o=Math.min(this.capacity,this.sprites.length),a=u.e.Zero(),s=u.e.Zero(),d=[],p=u.c.Vector3[0].copyFromFloats(0,0,0),b=u.c.Vector3[1].copyFromFloats(0,0,0),x=e.getViewMatrix(),O=0;O0.) { +mt=mod(time*animationData.z,1.0); +for(float f=0.; fmt){ +frameID=animationData.x; +break; +} +animationData=texture2D(animationMap,vec2((frameID+0.5)/spriteCount,aFrameSteps*f),0.); +} +} + +mat4 frameData=getFrameData(frameID+0.5); +vec2 frameSize=(frameData[0].wz)/spriteMapSize; +vec2 offset=frameData[0].xy*sheetUnits; +vec2 ratio=frameData[2].xy/frameData[0].wz; + +if (frameData[2].z == 1.){ +tileUV.xy=tileUV.yx; +} +if (i == 0){ +color=texture2D(spriteSheet,tileUV*frameSize+offset); +} else { +vec4 nc=texture2D(spriteSheet,tileUV*frameSize+offset); +float alpha=min(color.a+nc.a,1.0); +vec3 mixed=mix(color.xyz,nc.xyz,nc.a); +color=vec4(mixed,alpha); +} +} +color.xyz*=colorMul; +gl_FragColor=color; +}`;ze.a.ShadersStore.spriteMapPixelShader=Xg;var Yg=`precision highp float; + +attribute vec3 position; +attribute vec3 normal; +attribute vec2 uv; + +varying vec3 vPosition; +varying vec2 vUV; +varying vec2 tUV; +varying vec2 stageUnits; +varying vec2 levelUnits; +varying vec2 tileID; + +uniform float time; +uniform mat4 worldViewProjection; +uniform vec2 outputSize; +uniform vec2 stageSize; +uniform vec2 spriteMapSize; +uniform float stageScale; +void main() { +vec4 p=vec4( position,1. ); +vPosition=p.xyz; +vUV=uv; +tUV=uv*stageSize; +gl_Position=worldViewProjection*p; +}`;ze.a.ShadersStore.spriteMapVertexShader=Yg;var _i,Kg=function(){function r(t,e,n,i,o){var a=this;this.name=t,this.sprites=[],this.atlasJSON=e,this.sprites=this.atlasJSON.frames,this.spriteSheet=n,this.options=i,i.stageSize=i.stageSize||new u.d(1,1),i.outputSize=i.outputSize||i.stageSize,i.outputPosition=i.outputPosition||u.e.Zero(),i.outputRotation=i.outputRotation||u.e.Zero(),i.layerCount=i.layerCount||1,i.maxAnimationFrames=i.maxAnimationFrames||0,i.baseTile=i.baseTile||0,i.flipU=i.flipU||!1,i.colorMultiply=i.colorMultiply||new u.e(1,1,1),this._scene=o,this._frameMap=this._createFrameBuffer(),this._tileMaps=new Array;for(var s=0;s0&&(t+=` +\r`),t+=this._tileMaps[e]._texture._bufferView.toString();var n=document.createElement("a");n.href="data:octet/stream;charset=utf-8,"+encodeURI(t),n.target="_blank",n.download=this.name+".tilemaps",n.click(),n.remove()},r.prototype.loadTileMaps=function(t){var e=this,n=new XMLHttpRequest;n.open("GET",t);var i=this.options.layerCount||0;n.onload=function(){for(var o=n.response.split(` +\r`),a=0;a-1&&this._tasks.splice(e,1)},r.prototype._decreaseWaitingTasksCount=function(t){this._waitingTasksCount--;try{this.onProgress&&this.onProgress(this._waitingTasksCount,this._totalTasksCount,t),this.onProgressObservable.notifyObservers(new of(this._waitingTasksCount,this._totalTasksCount,t))}catch(a){l.a.Error("Error running progress callbacks."),console.log(a)}if(this._waitingTasksCount===0){try{var e=this._tasks.slice();this.onFinish&&this.onFinish(e);for(var n=0,i=e;n-1&&this._tasks.splice(o,1)}this.onTasksDoneObservable.notifyObservers(this._tasks)}catch(a){l.a.Error("Error running tasks-done callbacks."),console.log(a)}this._isLoading=!1,this.autoHideLoadingUI&&this._scene.getEngine().hideLoadingUI()}},r.prototype._runTask=function(t){var e=this,n=function(i,o){t._setErrorObject(i,o),e.onTaskError&&e.onTaskError(t),e.onTaskErrorObservable.notifyObservers(t),e._decreaseWaitingTasksCount(t)};t.run(this._scene,function(){try{e.onTaskSuccess&&e.onTaskSuccess(t),e.onTaskSuccessObservable.notifyObservers(t),e._decreaseWaitingTasksCount(t)}catch(i){n("Error executing task success callbacks",i)}},n)},r.prototype.reset=function(){return this._isLoading=!1,this._tasks=new Array,this},r.prototype.load=function(){if(this._isLoading)return this;if(this._isLoading=!0,this._waitingTasksCount=this._tasks.length,this._totalTasksCount=this._tasks.length,this._waitingTasksCount===0)return this._isLoading=!1,this.onFinish&&this.onFinish(this._tasks),this.onTasksDoneObservable.notifyObservers(this._tasks),this;this.useDefaultLoadingScreen&&this._scene.getEngine().displayLoadingUI();for(var t=0;t=0&&this._meshes.splice(n,1),this._centerPosition=this._centerMesh.getAbsolutePosition().clone();for(var i=0;i0&&this._textureLoadingCallback(t)}this._currentScene.render()}},r.prototype.drag=function(t){t.stopPropagation(),t.preventDefault()},r.prototype.drop=function(t){t.stopPropagation(),t.preventDefault(),this.loadFiles(t)},r.prototype._traverseFolder=function(t,e,n,i){var o=this,a=t.createReader(),s=t.fullPath.replace(/^\//,"").replace(/(.+?)\/?$/,"$1/");a.readEntries(function(d){n.count+=d.length;for(var p=0,b=d;p0)){for(var n=new Array,i=[],o=t.dataTransfer?t.dataTransfer.items:null,a=0;a0&&l.a.ClearLogCache(),this._engine.stopRenderLoop()),Ut.ShowLoadingScreen=!1,this._engine.displayLoadingUI(),Ut.LoadAsync("file:",this._sceneFileToLoad,this._engine,function(e){t._progressCallback&&t._progressCallback(e)}).then(function(e){t._currentScene&&t._currentScene.dispose(),t._currentScene=e,t._sceneLoadedCallback&&t._sceneLoadedCallback(t._sceneFileToLoad,t._currentScene),t._currentScene.executeWhenReady(function(){t._engine.hideLoadingUI(),t._engine.runRenderLoop(function(){t.renderFunction()})})}).catch(function(e){t._engine.hideLoadingUI(),t._errorCallback&&t._errorCallback(t._sceneFileToLoad,t._currentScene,e.message)})):l.a.Error("Please provide a valid .babylon file.")},r}(),_f=f(146),rv=f(145),gi=function(){function r(t){t===void 0&&(t=0),this.priority=t}return r.prototype.getDescription=function(){return""},r.prototype.apply=function(t,e){return!0},r}(),xa=function(r){function t(e,n,i){e===void 0&&(e=0),n===void 0&&(n=1024),i===void 0&&(i=.5);var o=r.call(this,e)||this;return o.priority=e,o.maximumSize=n,o.step=i,o}return Object(c.d)(t,r),t.prototype.getDescription=function(){return"Reducing render target texture size to "+this.maximumSize},t.prototype.apply=function(e,n){for(var i=!0,o=0;othis.maximumSize&&(a.scale(this.step),i=!1)}}return i},t}(gi),Yc=function(r){function t(e,n,i){e===void 0&&(e=0),n===void 0&&(n=2),i===void 0&&(i=.25);var o=r.call(this,e)||this;return o.priority=e,o.maximumScale=n,o.step=i,o._currentScale=-1,o._directionOffset=1,o}return Object(c.d)(t,r),t.prototype.getDescription=function(){return"Setting hardware scaling level to "+this._currentScale},t.prototype.apply=function(e,n){return this._currentScale===-1&&(this._currentScale=e.getEngine().getHardwareScalingLevel(),this._currentScale>this.maximumScale&&(this._directionOffset=-1)),this._currentScale+=this._directionOffset*this.step,e.getEngine().setHardwareScalingLevel(this._currentScale),this._directionOffset===1?this._currentScale>=this.maximumScale:this._currentScale<=this.maximumScale},t}(gi),Ca=function(r){function t(){return r!==null&&r.apply(this,arguments)||this}return Object(c.d)(t,r),t.prototype.getDescription=function(){return"Turning shadows on/off"},t.prototype.apply=function(e,n){return e.shadowsEnabled=n.isInImprovementMode,!0},t}(gi),Ra=function(r){function t(){return r!==null&&r.apply(this,arguments)||this}return Object(c.d)(t,r),t.prototype.getDescription=function(){return"Turning post-processes on/off"},t.prototype.apply=function(e,n){return e.postProcessesEnabled=n.isInImprovementMode,!0},t}(gi),Oa=function(r){function t(){return r!==null&&r.apply(this,arguments)||this}return Object(c.d)(t,r),t.prototype.getDescription=function(){return"Turning lens flares on/off"},t.prototype.apply=function(e,n){return e.lensFlaresEnabled=n.isInImprovementMode,!0},t}(gi),mf=function(r){function t(){return r!==null&&r.apply(this,arguments)||this}return Object(c.d)(t,r),t.prototype.getDescription=function(){return this.onGetDescription?this.onGetDescription():"Running user defined callback"},t.prototype.apply=function(e,n){return!this.onApply||this.onApply(e,n)},t}(gi),Ma=function(r){function t(){return r!==null&&r.apply(this,arguments)||this}return Object(c.d)(t,r),t.prototype.getDescription=function(){return"Turning particles on/off"},t.prototype.apply=function(e,n){return e.particlesEnabled=n.isInImprovementMode,!0},t}(gi),Kc=function(r){function t(){return r!==null&&r.apply(this,arguments)||this}return Object(c.d)(t,r),t.prototype.getDescription=function(){return"Turning render targets off"},t.prototype.apply=function(e,n){return e.renderTargetsEnabled=n.isInImprovementMode,!0},t}(gi),Ia=function(r){function t(){var e=r!==null&&r.apply(this,arguments)||this;return e._canBeMerged=function(n){if(!(n instanceof De.a))return!1;var i=n;return!i.isDisposed()&&!(!i.isVisible||!i.isEnabled())&&!(i.instances.length>0)&&!i.skeleton&&!i.hasLODLevels},e}return Object(c.d)(t,r),Object.defineProperty(t,"UpdateSelectionTree",{get:function(){return t._UpdateSelectionTree},set:function(e){t._UpdateSelectionTree=e},enumerable:!1,configurable:!0}),t.prototype.getDescription=function(){return"Merging similar meshes together"},t.prototype.apply=function(e,n,i){for(var o=e.meshes.slice(0),a=o.length,s=0;s=this._targetFrameRate)return this._isRunning=!1,void this.onSuccessObservable.notifyObservers(this);for(var i=!0,o=!0,a=0;a0){o.animationGroups=[];for(var x=0;x0)for(o.reflectionProbes=[],e=0;e0&&setTimeout(function(){n.stopRecording()},1e3*e),this._fileName=t,this._recordedChunks=[],this._resolve=null,this._reject=null,this._canvas.isRecording=!0,this._mediaRecorder.start(this._options.recordChunckSize),new Promise(function(i,o){n._resolve=i,n._reject=o})},r.prototype.dispose=function(){this._canvas=null,this._mediaRecorder=null,this._recordedChunks=[],this._fileName=null,this._resolve=null,this._reject=null},r.prototype._handleDataAvailable=function(t){t.data.size>0&&this._recordedChunks.push(t.data)},r.prototype._handleError=function(t){if(this.stopRecording(),!this._reject)throw new t.error;this._reject(t.error)},r.prototype._handleStop=function(){this.stopRecording();var t=new Blob(this._recordedChunks);this._resolve&&this._resolve(t),window.URL.createObjectURL(t),this._fileName&&Xe.b.Download(t,this._fileName)},r._defaultOptions={mimeType:"video/webm",fps:25,recordChunckSize:3e3},r}(),Ro=function(){function r(){}return r.CreateScreenshot=function(t,e,n,i,o){o===void 0&&(o="image/png");var a=r._getScreenshotSize(t,e,n),s=a.height,d=a.width;if(s&&d){Xe.b._ScreenshotCanvas||(Xe.b._ScreenshotCanvas=document.createElement("canvas")),Xe.b._ScreenshotCanvas.width=d,Xe.b._ScreenshotCanvas.height=s;var p=Xe.b._ScreenshotCanvas.getContext("2d"),b=t.getRenderWidth()/t.getRenderHeight(),x=d,O=x/b;O>s&&(x=(O=s)*b);var B=Math.max(0,d-x)/2,F=Math.max(0,s-O)/2,z=t.getRenderingCanvas();p&&z&&p.drawImage(z,B,F,x,O),Xe.b.EncodeScreenshotCanvasData(i,o)}else l.a.Error("Invalid 'size' parameter !")},r.CreateScreenshotAsync=function(t,e,n,i){return i===void 0&&(i="image/png"),new Promise(function(o,a){r.CreateScreenshot(t,e,n,function(s){s!==void 0?o(s):a(new Error("Data is undefined"))},i)})},r.CreateScreenshotUsingRenderTarget=function(t,e,n,i,o,a,s,d,p,b){o===void 0&&(o="image/png"),a===void 0&&(a=1),s===void 0&&(s=!1),p===void 0&&(p=!1),b===void 0&&(b=!1);var x=r._getScreenshotSize(t,e,n),O=x.height,B=x.width,F={width:B,height:O};if(O&&B){var z=t.getRenderingCanvas();if(z){var J={width:z.width,height:z.height};t.setSize(B,O);var ie=e.getScene(),se=null,ce=ie.activeCameras;(ie.activeCamera!==e||ie.activeCameras&&ie.activeCameras.length)&&(se=ie.activeCamera,ie.activeCamera=e),ie.render();var ue=new sn("screenShot",F,ie,!1,!1,h.a.TEXTURETYPE_UNSIGNED_INT,!1,we.a.NEAREST_SAMPLINGMODE,void 0,b);ue.renderList=null,ue.samples=a,ue.renderSprites=p,ue.onAfterRenderObservable.add(function(){Xe.b.DumpFramebuffer(B,O,t,i,o,d)});var fe=function(){ie.incrementRenderId(),ie.resetCachedMaterial(),ue.render(!0),ue.dispose(),se&&(ie.activeCamera=se),ie.activeCameras=ce,t.setSize(J.width,J.height),e.getProjectionMatrix(!0)};if(s){var ve=new Co("antialiasing",1,ie.activeCamera);ue.addPostProcess(ve),ve.getEffect().isReady()?fe():ve.getEffect().onCompiled=function(){fe()}}else fe()}else l.a.Error("No rendering canvas found !")}else l.a.Error("Invalid 'size' parameter !")},r.CreateScreenshotUsingRenderTargetAsync=function(t,e,n,i,o,a,s,d){return i===void 0&&(i="image/png"),o===void 0&&(o=1),a===void 0&&(a=!1),d===void 0&&(d=!1),new Promise(function(p,b){r.CreateScreenshotUsingRenderTarget(t,e,n,function(x){x!==void 0?p(x):b(new Error("Data is undefined"))},i,o,a,s,d)})},r._getScreenshotSize=function(t,e,n){var i=0,o=0;if(typeof n=="object"){var a=n.precision?Math.abs(n.precision):1;n.width&&n.height?(i=n.height*a,o=n.width*a):n.width&&!n.height?(o=n.width*a,i=Math.round(o/t.getAspectRatio(e))):n.height&&!n.width?(i=n.height*a,o=Math.round(i*t.getAspectRatio(e))):(o=Math.round(t.getRenderWidth()*a),i=Math.round(o/t.getAspectRatio(e)))}else isNaN(n)||(i=n,o=n);return o&&(o=Math.floor(o)),i&&(i=Math.floor(i)),{height:0|i,width:0|o}},r}();Xe.b.CreateScreenshot=Ro.CreateScreenshot,Xe.b.CreateScreenshotAsync=Ro.CreateScreenshotAsync,Xe.b.CreateScreenshotUsingRenderTarget=Ro.CreateScreenshotUsingRenderTarget,Xe.b.CreateScreenshotUsingRenderTargetAsync=Ro.CreateScreenshotUsingRenderTargetAsync,function(r){r[r.Checkbox=0]="Checkbox",r[r.Slider=1]="Slider",r[r.Vector3=2]="Vector3",r[r.Quaternion=3]="Quaternion",r[r.Color3=4]="Color3",r[r.String=5]="String"}(Xc||(Xc={}));var kr,lv=f(140),uv=function(){function r(t){this.byteOffset=0,this.buffer=t}return r.prototype.loadAsync=function(t){var e=this;return this.buffer.readAsync(this.byteOffset,t).then(function(n){e._dataView=new DataView(n.buffer,n.byteOffset,n.byteLength),e._dataByteOffset=0})},r.prototype.readUint32=function(){var t=this._dataView.getUint32(this._dataByteOffset,!0);return this._dataByteOffset+=4,this.byteOffset+=4,t},r.prototype.readUint8Array=function(t){var e=new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+this._dataByteOffset,t);return this._dataByteOffset+=t,this.byteOffset+=t,e},r.prototype.readString=function(t){return Qn.a.Decode(this.readUint8Array(t))},r.prototype.skipBytes=function(t){this._dataByteOffset+=t,this.byteOffset+=t},r}(),hv=function(){function r(){}return r._GetStorage=function(){try{return localStorage.setItem("test",""),localStorage.removeItem("test"),localStorage}catch{var t={};return{getItem:function(n){var i=t[n];return i===void 0?null:i},setItem:function(n,i){t[n]=i}}}},r.ReadString=function(t,e){var n=this._Storage.getItem(t);return n!==null?n:e},r.WriteString=function(t,e){this._Storage.setItem(t,e)},r.ReadBoolean=function(t,e){var n=this._Storage.getItem(t);return n!==null?n==="true":e},r.WriteBoolean=function(t,e){this._Storage.setItem(t,e?"true":"false")},r.ReadNumber=function(t,e){var n=this._Storage.getItem(t);return n!==null?parseFloat(n):e},r.WriteNumber=function(t,e){this._Storage.setItem(t,e.toString())},r._Storage=r._GetStorage(),r}(),dv=function(){function r(){this._trackedScene=null}return r.prototype.track=function(t){this._trackedScene=t,this._savedJSON=Zc.Serialize(t)},r.prototype.getDelta=function(){if(!this._trackedScene)return null;var t=Zc.Serialize(this._trackedScene),e={};for(var n in t)this._compareCollections(n,this._savedJSON[n],t[n],e);return e},r.prototype._compareArray=function(t,e,n,i){if(e.length===0&&n.length===0)return!0;if(e.length&&!isNaN(e[0])||n.length&&!isNaN(n[0])){if(e.length!==n.length)return!1;if(e.length===0)return!0;for(var o=0;on.MAX_SEQUENCE_LENGTH)throw new Error("Sequences longer than "+n.MAX_SEQUENCE_LENGTH+" not supported.");this._alphabet=o,this._characters=i.map(function(s){return a._alphabet.getCharacterIdx(s)})}return n.prototype.serialize=function(){return JSON.stringify(this._characters)},n.Deserialize=function(i,o){var a=new n([],o);return a._characters=JSON.parse(i),a},n.prototype.distance=function(i){return n._distance(this,i)},n._distance=function(i,o){var a=i._alphabet;if(a!==o._alphabet)throw new Error("Cannot Levenshtein compare Sequences built from different alphabets.");var s=i._characters,d=o._characters,p=s.length,b=d.length,x=n._costMatrix;x[0][0]=0;for(var O=0;O.98)&&(u.e.CrossToRef(r._forwardDir,r._inverseFromVec,r._upDir),r._upDir.normalize(),u.a.LookAtLHToRef(t,e,r._upDir,r._lookMatrix),n.subtractToRef(e,r._fromToVec),r._fromToVec.normalize(),u.e.TransformNormalToRef(r._fromToVec,r._lookMatrix,i),!0)},r._tokenizeSegment=function(t,e){r._bestMatch=0,r._score=u.e.Dot(t,e[0]),r._bestScore=r._score;for(var n=1;nr._bestScore&&(r._bestMatch=n,r._bestScore=r._score);return r._bestMatch},r._forwardDir=new u.e,r._inverseFromVec=new u.e,r._upDir=new u.e,r._fromToVec=new u.e,r._lookMatrix=new u.a,r}(),vf=function(){function r(t){this.chars=new Array(t)}return r.Generate=function(t,e,n,i,o){t===void 0&&(t=64),e===void 0&&(e=256),n===void 0&&(n=.1),i===void 0&&(i=.001),o===void 0&&(o=[]);for(var a,s,d=new r(t),p=0;p1e-6&&O.scaleAndAddToRef(1/(O.lengthSquared()*s),x)}),x.scaleInPlace(a),d.chars[z].addInPlace(x),d.chars[z].normalize()};for(p=o.length;p4;o=Math.floor(o/2))i.push(t.resampleAtTargetResolution(o).tokenize(e.chars));return i},r.prototype.distance=function(t){for(var e=0,n=0;n0&&(this._averageDistance=Math.max(this._averageDistance/this._descriptors.length,r.MIN_AVERAGE_DISTANCE))},r.MIN_AVERAGE_DISTANCE=1,r}(),pv=function(){function r(){this._maximumAllowableMatchCost=4,this._nameToDescribedTrajectory=new Map}return r.prototype.serialize=function(){var t={};return t.maximumAllowableMatchCost=this._maximumAllowableMatchCost,t.vector3Alphabet=this._vector3Alphabet.serialize(),t.levenshteinAlphabet=this._levenshteinAlphabet.serialize(),t.nameToDescribedTrajectory=[],this._nameToDescribedTrajectory.forEach(function(e,n){t.nameToDescribedTrajectory.push(n),t.nameToDescribedTrajectory.push(e.serialize())}),JSON.stringify(t)},r.Deserialize=function(t){var e=JSON.parse(t),n=new r;n._maximumAllowableMatchCost=e.maximumAllowableMatchCost,n._vector3Alphabet=vf.Deserialize(e.vector3Alphabet),n._levenshteinAlphabet=kr.Alphabet.Deserialize(e.levenshteinAlphabet);for(var i=0;i0&&this.onFeaturePointsAddedObservable.notifyObservers(a),o.length>0&&this.onFeaturePointsUpdatedObservable.notifyObservers(o)}}},t.prototype._init=function(){this._xrSessionManager.session.trySetFeaturePointCloudEnabled&&this._xrSessionManager.session.trySetFeaturePointCloudEnabled(!0)&&(this._enabled=!0)},t.Name=ai.FEATURE_POINTS,t.Version=1,t}(si);qn.AddWebXRFeature(Va.Name,function(r){return function(){return new Va(r)}},Va.Version);var yf=function(){function r(t,e,n,i,o){this.xrController=t,this.trackedMeshes=e,this._handMesh=n,this._rigMapping=i,this._defaultHandMesh=!1,this._transformNodeMapping=[],this.handPartsDefinition=this.generateHandPartsDefinition(t.inputSource.hand),this._scene=e[0].getScene(),this._handMesh&&this._rigMapping?this._defaultHandMesh=!1:o||this._generateDefaultHandMesh(),this.xrController.motionController&&(this.xrController.motionController.rootMesh?this.xrController.motionController.rootMesh.setEnabled(!1):this.xrController.motionController.onModelLoadedObservable.add(function(a){a.rootMesh&&a.rootMesh.setEnabled(!1)})),this.xrController.onMotionControllerInitObservable.add(function(a){a.onModelLoadedObservable.add(function(s){s.rootMesh&&s.rootMesh.setEnabled(!1)}),a.rootMesh&&a.rootMesh.setEnabled(!1)})}return r.prototype.generateHandPartsDefinition=function(t){var e;return(e={}).wrist=[t.WRIST],e.thumb=[t.THUMB_METACARPAL,t.THUMB_PHALANX_PROXIMAL,t.THUMB_PHALANX_DISTAL,t.THUMB_PHALANX_TIP],e.index=[t.INDEX_METACARPAL,t.INDEX_PHALANX_PROXIMAL,t.INDEX_PHALANX_INTERMEDIATE,t.INDEX_PHALANX_DISTAL,t.INDEX_PHALANX_TIP],e.middle=[t.MIDDLE_METACARPAL,t.MIDDLE_PHALANX_PROXIMAL,t.MIDDLE_PHALANX_INTERMEDIATE,t.MIDDLE_PHALANX_DISTAL,t.MIDDLE_PHALANX_TIP],e.ring=[t.RING_METACARPAL,t.RING_PHALANX_PROXIMAL,t.RING_PHALANX_INTERMEDIATE,t.RING_PHALANX_DISTAL,t.RING_PHALANX_TIP],e.little=[t.LITTLE_METACARPAL,t.LITTLE_PHALANX_PROXIMAL,t.LITTLE_PHALANX_INTERMEDIATE,t.LITTLE_PHALANX_DISTAL,t.LITTLE_PHALANX_TIP],e},r.prototype.updateFromXRFrame=function(t,e,n){var i=this;n===void 0&&(n=2);var o=this.xrController.inputSource.hand;o&&this.trackedMeshes.forEach(function(a,s){var d=o[s];if(d){var p=t.getJointPose(d,e);if(!p||!p.transform)return;var b=p.transform.position,x=p.transform.orientation;a.position.set(b.x,b.y,b.z),a.rotationQuaternion.set(x.x,x.y,x.z,x.w);var O=(p.radius||.008)*n;a.scaling.set(O,O,O),i._handMesh&&i._rigMapping&&i._rigMapping[s]&&(i._transformNodeMapping[s]=i._transformNodeMapping[s]||i._scene.getTransformNodeByName(i._rigMapping[s]),i._transformNodeMapping[s]&&(i._transformNodeMapping[s].position.copyFrom(a.position),i._transformNodeMapping[s].rotationQuaternion.copyFrom(a.rotationQuaternion),a.isVisible=!1)),a.getScene().useRightHandedSystem||(a.position.z*=-1,a.rotationQuaternion.z*=-1,a.rotationQuaternion.w*=-1)}})},r.prototype.getHandPartMeshes=function(t){var e=this;return this.handPartsDefinition[t].map(function(n){return e.trackedMeshes[n]})},r.prototype.dispose=function(){this.trackedMeshes.forEach(function(t){return t.dispose()}),this._defaultHandMesh&&this._handMesh&&this._handMesh.dispose()},r.prototype._generateDefaultHandMesh=function(){return Object(c.b)(this,void 0,void 0,function(){var t,e,n,i,o,a,s,d;return Object(c.e)(this,function(p){switch(p.label){case 0:return p.trys.push([0,3,,4]),t=this.xrController.inputSource.handedness==="right"?"right":"left",e=(t==="right"?"r":"l")+"_hand_"+(this._scene.useRightHandedSystem?"r":"l")+"hs.glb",[4,Ut.ImportMeshAsync("","https://assets.babylonjs.com/meshes/HandMeshes/",e,this._scene)];case 1:return n=p.sent(),i={base:M.a.FromInts(116,63,203),fresnel:M.a.FromInts(149,102,229),fingerColor:M.a.FromInts(177,130,255),tipFresnel:M.a.FromInts(220,200,255)},[4,(o=new va("leftHandShader",this._scene,{emitComments:!1})).loadAsync("https://patrickryanms.github.io/BabylonJStextures/Demos/xrHandMesh/handsShader.json")];case 2:if(p.sent(),o.build(!1),o.needDepthPrePass=!0,o.transparencyMode=Ht.a.MATERIAL_ALPHABLEND,o.alphaMode=Ue.a.ALPHA_COMBINE,(a={base:o.getBlockByName("baseColor"),fresnel:o.getBlockByName("fresnelColor"),fingerColor:o.getBlockByName("fingerColor"),tipFresnel:o.getBlockByName("tipFresnelColor")}).base.value=i.base,a.fresnel.value=i.fresnel,a.fingerColor.value=i.fingerColor,a.tipFresnel.value=i.tipFresnel,n.meshes[1].material=o,this._defaultHandMesh=!0,this._handMesh=n.meshes[0],this._rigMapping=["wrist_","thumb_metacarpal_","thumb_proxPhalanx_","thumb_distPhalanx_","thumb_tip_","index_metacarpal_","index_proxPhalanx_","index_intPhalanx_","index_distPhalanx_","index_tip_","middle_metacarpal_","middle_proxPhalanx_","middle_intPhalanx_","middle_distPhalanx_","middle_tip_","ring_metacarpal_","ring_proxPhalanx_","ring_intPhalanx_","ring_distPhalanx_","ring_tip_","little_metacarpal_","little_proxPhalanx_","little_intPhalanx_","little_distPhalanx_","little_tip_"].map(function(b){return b+(t==="right"?"R":"L")}),!(s=this._scene.getTransformNodeByName(this._rigMapping[0])))throw new Error("could not find the wrist node");return s.parent&&s.parent.rotate(ye.a.Y,Math.PI),[3,4];case 3:return d=p.sent(),Xe.b.Error("error loading hand mesh"),console.log(d),[3,4];case 4:return[2]}})})},r}(),ka=function(r){function t(e,n){var i=r.call(this,e)||this;return i.options=n,i.onHandAddedObservable=new R.c,i.onHandRemovedObservable=new R.c,i._hands={},i._attachHand=function(o){var a,s,d,p,b,x,O,B,F,z;if(o.inputSource.hand&&!i._hands[o.uniqueId]){var J=o.inputSource.hand,ie=[],se=((a=i.options.jointMeshes)===null||a===void 0?void 0:a.sourceMesh)||Un.a.CreateSphere("jointParent",{diameter:1});se.isVisible=!!(!((s=i.options.jointMeshes)===null||s===void 0)&&s.keepOriginalVisible);for(var ce=0;ce1){for(N();w!==-1&&v._OperatorPriority[V()]>=v._OperatorPriority[de];)D.push(X());I(de),j++}else ne+=te;j++}for(N();w!==-1;)V()==="("?X():D.push(X());return D},v._OperatorPriority={")":0,"(":1,"||":2,"&&":3},v._Stack=["","","","","","","","","","","","","","","","","","","",""],v}(),m=function(v){function E(D,w){w===void 0&&(w=!1);var N=v.call(this)||this;return N.define=D,N.not=w,N}return Object(u.d)(E,v),E.prototype.isTrue=function(D){var w=D[this.define]!==void 0;return this.not&&(w=!w),w},E}(P),c=function(v){function E(){return v!==null&&v.apply(this,arguments)||this}return Object(u.d)(E,v),E.prototype.isTrue=function(D){return this.leftOperand.isTrue(D)||this.rightOperand.isTrue(D)},E}(P),T=function(v){function E(){return v!==null&&v.apply(this,arguments)||this}return Object(u.d)(E,v),E.prototype.isTrue=function(D){return this.leftOperand.isTrue(D)&&this.rightOperand.isTrue(D)},E}(P),A=function(v){function E(D,w,N){var I=v.call(this)||this;return I.define=D,I.operand=w,I.testValue=N,I}return Object(u.d)(E,v),E.prototype.isTrue=function(D){var w=D[this.define];w===void 0&&(w=this.define);var N=!1,I=parseInt(w),V=parseInt(this.testValue);switch(this.operand){case">":N=I>V;break;case"<":N=I=":N=I>=V;break;case"==":N=I===V}return N},E}(P),S=f(21),g=/defined\s*?\((.+?)\)/g,l=/defined\s*?\[(.+?)\]/g,h=function(){function v(){}return v.Process=function(E,D,w,N){var I=this;this._ProcessIncludes(E,D,function(V){var X=I._ProcessShaderConversion(V,D,N);w(X)})},v._ProcessPrecision=function(E,D){var w=D.shouldUseHighPrecisionShader;return E.indexOf("precision highp float")===-1?E=w?`precision highp float; +`+E:`precision mediump float; +`+E:w||(E=E.replace("precision highp float","precision mediump float")),E},v._ExtractOperation=function(E){var D=/defined\((.+)\)/.exec(E);if(D&&D.length)return new m(D[1].trim(),E[0]==="!");for(var w="",N=0,I=0,V=["==",">=","<=","<",">"];I-1));I++);if(N===-1)return new m(E);var X=E.substring(0,N).trim(),j=E.substring(N+w.length).trim();return new A(X,w,j)},v._BuildSubExpression=function(E){E=E.replace(g,"defined[$1]");for(var D=[],w=0,N=P.infixToPostfix(E);w=2){var V=D[D.length-1],X=D[D.length-2];D.length-=2;var j=I=="&&"?new T:new c;typeof V=="string"&&(V=V.replace(l,"defined($1)")),typeof X=="string"&&(X=X.replace(l,"defined($1)")),j.leftOperand=typeof X=="string"?this._ExtractOperation(X):X,j.rightOperand=typeof V=="string"?this._ExtractOperation(V):V,D.push(j)}}var ne=D[D.length-1];return typeof ne=="string"&&(ne=ne.replace(l,"defined($1)")),typeof ne=="string"?this._ExtractOperation(ne):ne},v._BuildExpression=function(E,D){var w=new C,N=E.substring(0,D),I=E.substring(D);return I=I.substring(0,(I.indexOf("//")+1||I.length+1)-1).trim(),w.testExpression=N==="#ifdef"?new m(I):N==="#ifndef"?new m(I,!0):this._BuildSubExpression(I),w},v._MoveCursorWithinIf=function(E,D,w){for(var N=E.currentLine;this._MoveCursor(E,w);){var I=(N=E.currentLine).substring(0,5).toLowerCase();if(I==="#else"){var V=new _;return D.children.push(V),void this._MoveCursor(E,V)}if(I==="#elif"){var X=this._BuildExpression(N,5);D.children.push(X),w=X}}},v._MoveCursor=function(E,D){for(;E.canRead;){E.lineIndex++;var w=E.currentLine,N=/(#ifdef)|(#else)|(#elif)|(#endif)|(#ifndef)|(#if)/.exec(w);if(N&&N.length)switch(N[0]){case"#ifdef":var I=new M;D.children.push(I);var V=this._BuildExpression(w,6);I.children.push(V),this._MoveCursorWithinIf(E,I,V);break;case"#else":case"#elif":return!0;case"#endif":return!1;case"#ifndef":I=new M,D.children.push(I),V=this._BuildExpression(w,7),I.children.push(V),this._MoveCursorWithinIf(E,I,V);break;case"#if":I=new M,V=this._BuildExpression(w,3),D.children.push(I),I.children.push(V),this._MoveCursorWithinIf(E,I,V)}else{var X=new _;if(X.line=w,D.children.push(X),w[0]==="#"&&w[1]==="d"){var j=w.replace(";","").split(" ");X.additionalDefineKey=j[1],j.length===3&&(X.additionalDefineValue=j[2])}}}return!1},v._EvaluatePreProcessors=function(E,D,w){var N=new _,I=new R;return I.lineIndex=-1,I.lines=E.split(` +`),this._MoveCursor(I,N),N.process(D,w)},v._PreparePreProcessors=function(E){for(var D={},w=0,N=E.defines;w1?I[1]:""}return D.GL_ES="true",D.__VERSION__=E.version,D[E.platformName]="true",D},v._ProcessShaderConversion=function(E,D,w){var N=this._ProcessPrecision(E,D);if(!D.processor)return N;if(N.indexOf("#version 3")!==-1)return N.replace("#version 300 es","");var I=D.defines,V=this._PreparePreProcessors(D);return D.processor.preProcessor&&(N=D.processor.preProcessor(N,I,D.isFragment)),N=this._EvaluatePreProcessors(N,V,D),D.processor.postProcessor&&(N=D.processor.postProcessor(N,I,D.isFragment,w)),N},v._ProcessIncludes=function(E,D,w){for(var N=this,I=/#include<(.+)>(\((.*)\))*(\[(.*)\])*/g,V=I.exec(E),X=new String(E),j=!1;V!=null;){var ne=V[1];if(ne.indexOf("__decl__")!==-1&&(ne=ne.replace(/__decl__/,""),D.supportsUniformBuffers&&(ne=(ne=ne.replace(/Vertex/,"Ubo")).replace(/Fragment/,"Ubo")),ne+="Declaration"),!D.includesShadersStore[ne]){var te=D.shadersRepository+"ShadersInclude/"+ne+".fx";return void v._FileToolsLoadFile(te,function(Y){D.includesShadersStore[ne]=Y,N._ProcessIncludes(X,D,w)})}var de=D.includesShadersStore[ne];if(V[2])for(var pe=V[3].split(","),ae=0;ae=0,V=I.exec(E)}j?this._ProcessIncludes(X.toString(),D,w):w(X)},v._FileToolsLoadFile=function(E,D,w,N,I,V){throw S.a.WarnImport("FileTools")},v}()},function(Ie,y,f){f(26).a.prototype._readTexturePixels=function(U,_,R,u,M,C){u===void 0&&(u=-1),M===void 0&&(M=0),C===void 0&&(C=null);var P=this._gl;if(!P)throw new Error("Engine does not have gl rendering context.");if(!this._dummyFramebuffer){var m=P.createFramebuffer();if(!m)throw new Error("Unable to create dummy framebuffer");this._dummyFramebuffer=m}P.bindFramebuffer(P.FRAMEBUFFER,this._dummyFramebuffer),u>-1?P.framebufferTexture2D(P.FRAMEBUFFER,P.COLOR_ATTACHMENT0,P.TEXTURE_CUBE_MAP_POSITIVE_X+u,U._webGLTexture,M):P.framebufferTexture2D(P.FRAMEBUFFER,P.COLOR_ATTACHMENT0,P.TEXTURE_2D,U._webGLTexture,M);var c=U.type!==void 0?this._getWebGLTextureType(U.type):P.UNSIGNED_BYTE;switch(c){case P.UNSIGNED_BYTE:C||(C=new Uint8Array(4*_*R)),c=P.UNSIGNED_BYTE;break;default:C||(C=new Float32Array(4*_*R)),c=P.FLOAT}return P.readPixels(0,0,_,R,P.RGBA,c,C),P.bindFramebuffer(P.FRAMEBUFFER,this._currentFramebuffer),C}},function(Ie,y,f){var U="shadowsFragmentFunctions",_=`#ifdef SHADOWS +#ifndef SHADOWFLOAT + +float unpack(vec4 color) +{ +const vec4 bit_shift=vec4(1.0/(255.0*255.0*255.0),1.0/(255.0*255.0),1.0/255.0,1.0); +return dot(color,bit_shift); +} +#endif +float computeFallOff(float value,vec2 clipSpace,float frustumEdgeFalloff) +{ +float mask=smoothstep(1.0-frustumEdgeFalloff,1.00000012,clamp(dot(clipSpace,clipSpace),0.,1.)); +return mix(value,1.0,mask); +} +#define inline +float computeShadowCube(vec3 lightPosition,samplerCube shadowSampler,float darkness,vec2 depthValues) +{ +vec3 directionToLight=vPositionW-lightPosition; +float depth=length(directionToLight); +depth=(depth+depthValues.x)/(depthValues.y); +depth=clamp(depth,0.,1.0); +directionToLight=normalize(directionToLight); +directionToLight.y=-directionToLight.y; +#ifndef SHADOWFLOAT +float shadow=unpack(textureCube(shadowSampler,directionToLight)); +#else +float shadow=textureCube(shadowSampler,directionToLight).x; +#endif +return depth>shadow ? darkness : 1.0; +} +#define inline +float computeShadowWithPoissonSamplingCube(vec3 lightPosition,samplerCube shadowSampler,float mapSize,float darkness,vec2 depthValues) +{ +vec3 directionToLight=vPositionW-lightPosition; +float depth=length(directionToLight); +depth=(depth+depthValues.x)/(depthValues.y); +depth=clamp(depth,0.,1.0); +directionToLight=normalize(directionToLight); +directionToLight.y=-directionToLight.y; +float visibility=1.; +vec3 poissonDisk[4]; +poissonDisk[0]=vec3(-1.0,1.0,-1.0); +poissonDisk[1]=vec3(1.0,-1.0,-1.0); +poissonDisk[2]=vec3(-1.0,-1.0,-1.0); +poissonDisk[3]=vec3(1.0,-1.0,1.0); + +#ifndef SHADOWFLOAT +if (unpack(textureCube(shadowSampler,directionToLight+poissonDisk[0]*mapSize))shadow ? computeFallOff(darkness,clipSpace.xy,frustumEdgeFalloff) : 1.; +} +#endif +#define inline +float computeShadow(vec4 vPositionFromLight,float depthMetric,sampler2D shadowSampler,float darkness,float frustumEdgeFalloff) +{ +vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w; +vec2 uv=0.5*clipSpace.xy+vec2(0.5); +if (uv.x<0. || uv.x>1.0 || uv.y<0. || uv.y>1.0) +{ +return 1.0; +} +else +{ +float shadowPixelDepth=clamp(depthMetric,0.,1.0); +#ifndef SHADOWFLOAT +float shadow=unpack(texture2D(shadowSampler,uv)); +#else +float shadow=texture2D(shadowSampler,uv).x; +#endif +return shadowPixelDepth>shadow ? computeFallOff(darkness,clipSpace.xy,frustumEdgeFalloff) : 1.; +} +} +#define inline +float computeShadowWithPoissonSampling(vec4 vPositionFromLight,float depthMetric,sampler2D shadowSampler,float mapSize,float darkness,float frustumEdgeFalloff) +{ +vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w; +vec2 uv=0.5*clipSpace.xy+vec2(0.5); +if (uv.x<0. || uv.x>1.0 || uv.y<0. || uv.y>1.0) +{ +return 1.0; +} +else +{ +float shadowPixelDepth=clamp(depthMetric,0.,1.0); +float visibility=1.; +vec2 poissonDisk[4]; +poissonDisk[0]=vec2(-0.94201624,-0.39906216); +poissonDisk[1]=vec2(0.94558609,-0.76890725); +poissonDisk[2]=vec2(-0.094184101,-0.92938870); +poissonDisk[3]=vec2(0.34495938,0.29387760); + +#ifndef SHADOWFLOAT +if (unpack(texture2D(shadowSampler,uv+poissonDisk[0]*mapSize))1.0 || uv.y<0. || uv.y>1.0) +{ +return 1.0; +} +else +{ +float shadowPixelDepth=clamp(depthMetric,0.,1.0); +#ifndef SHADOWFLOAT +float shadowMapSample=unpack(texture2D(shadowSampler,uv)); +#else +float shadowMapSample=texture2D(shadowSampler,uv).x; +#endif +float esm=1.0-clamp(exp(min(87.,depthScale*shadowPixelDepth))*shadowMapSample,0.,1.-darkness); +return computeFallOff(esm,clipSpace.xy,frustumEdgeFalloff); +} +} +#define inline +float computeShadowWithCloseESM(vec4 vPositionFromLight,float depthMetric,sampler2D shadowSampler,float darkness,float depthScale,float frustumEdgeFalloff) +{ +vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w; +vec2 uv=0.5*clipSpace.xy+vec2(0.5); +if (uv.x<0. || uv.x>1.0 || uv.y<0. || uv.y>1.0) +{ +return 1.0; +} +else +{ +float shadowPixelDepth=clamp(depthMetric,0.,1.0); +#ifndef SHADOWFLOAT +float shadowMapSample=unpack(texture2D(shadowSampler,uv)); +#else +float shadowMapSample=texture2D(shadowSampler,uv).x; +#endif +float esm=clamp(exp(min(87.,-depthScale*(shadowPixelDepth-shadowMapSample))),darkness,1.); +return computeFallOff(esm,clipSpace.xy,frustumEdgeFalloff); +} +} +#ifdef WEBGL2 +#define GREATEST_LESS_THAN_ONE 0.99999994 + +#define inline +float computeShadowWithCSMPCF1(float layer,vec4 vPositionFromLight,float depthMetric,highp sampler2DArrayShadow shadowSampler,float darkness,float frustumEdgeFalloff) +{ +vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w; +vec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5)); +uvDepth.z=clamp(uvDepth.z,0.,GREATEST_LESS_THAN_ONE); +vec4 uvDepthLayer=vec4(uvDepth.x,uvDepth.y,layer,uvDepth.z); +float shadow=texture(shadowSampler,uvDepthLayer); +shadow=mix(darkness,1.,shadow); +return computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff); +} + + + +#define inline +float computeShadowWithCSMPCF3(float layer,vec4 vPositionFromLight,float depthMetric,highp sampler2DArrayShadow shadowSampler,vec2 shadowMapSizeAndInverse,float darkness,float frustumEdgeFalloff) +{ +vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w; +vec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5)); +uvDepth.z=clamp(uvDepth.z,0.,GREATEST_LESS_THAN_ONE); +vec2 uv=uvDepth.xy*shadowMapSizeAndInverse.x; +uv+=0.5; +vec2 st=fract(uv); +vec2 base_uv=floor(uv)-0.5; +base_uv*=shadowMapSizeAndInverse.y; + + + + +vec2 uvw0=3.-2.*st; +vec2 uvw1=1.+2.*st; +vec2 u=vec2((2.-st.x)/uvw0.x-1.,st.x/uvw1.x+1.)*shadowMapSizeAndInverse.y; +vec2 v=vec2((2.-st.y)/uvw0.y-1.,st.y/uvw1.y+1.)*shadowMapSizeAndInverse.y; +float shadow=0.; +shadow+=uvw0.x*uvw0.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[0],v[0]),layer,uvDepth.z)); +shadow+=uvw1.x*uvw0.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[1],v[0]),layer,uvDepth.z)); +shadow+=uvw0.x*uvw1.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[0],v[1]),layer,uvDepth.z)); +shadow+=uvw1.x*uvw1.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[1],v[1]),layer,uvDepth.z)); +shadow=shadow/16.; +shadow=mix(darkness,1.,shadow); +return computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff); +} + + + +#define inline +float computeShadowWithCSMPCF5(float layer,vec4 vPositionFromLight,float depthMetric,highp sampler2DArrayShadow shadowSampler,vec2 shadowMapSizeAndInverse,float darkness,float frustumEdgeFalloff) +{ +vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w; +vec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5)); +uvDepth.z=clamp(uvDepth.z,0.,GREATEST_LESS_THAN_ONE); +vec2 uv=uvDepth.xy*shadowMapSizeAndInverse.x; +uv+=0.5; +vec2 st=fract(uv); +vec2 base_uv=floor(uv)-0.5; +base_uv*=shadowMapSizeAndInverse.y; + + +vec2 uvw0=4.-3.*st; +vec2 uvw1=vec2(7.); +vec2 uvw2=1.+3.*st; +vec3 u=vec3((3.-2.*st.x)/uvw0.x-2.,(3.+st.x)/uvw1.x,st.x/uvw2.x+2.)*shadowMapSizeAndInverse.y; +vec3 v=vec3((3.-2.*st.y)/uvw0.y-2.,(3.+st.y)/uvw1.y,st.y/uvw2.y+2.)*shadowMapSizeAndInverse.y; +float shadow=0.; +shadow+=uvw0.x*uvw0.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[0],v[0]),layer,uvDepth.z)); +shadow+=uvw1.x*uvw0.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[1],v[0]),layer,uvDepth.z)); +shadow+=uvw2.x*uvw0.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[2],v[0]),layer,uvDepth.z)); +shadow+=uvw0.x*uvw1.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[0],v[1]),layer,uvDepth.z)); +shadow+=uvw1.x*uvw1.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[1],v[1]),layer,uvDepth.z)); +shadow+=uvw2.x*uvw1.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[2],v[1]),layer,uvDepth.z)); +shadow+=uvw0.x*uvw2.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[0],v[2]),layer,uvDepth.z)); +shadow+=uvw1.x*uvw2.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[1],v[2]),layer,uvDepth.z)); +shadow+=uvw2.x*uvw2.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[2],v[2]),layer,uvDepth.z)); +shadow=shadow/144.; +shadow=mix(darkness,1.,shadow); +return computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff); +} + +#define inline +float computeShadowWithPCF1(vec4 vPositionFromLight,float depthMetric,highp sampler2DShadow shadowSampler,float darkness,float frustumEdgeFalloff) +{ +if (depthMetric>1.0 || depthMetric<0.0) { +return 1.0; +} +else +{ +vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w; +vec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5)); +float shadow=texture2D(shadowSampler,uvDepth); +shadow=mix(darkness,1.,shadow); +return computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff); +} +} + + + +#define inline +float computeShadowWithPCF3(vec4 vPositionFromLight,float depthMetric,highp sampler2DShadow shadowSampler,vec2 shadowMapSizeAndInverse,float darkness,float frustumEdgeFalloff) +{ +if (depthMetric>1.0 || depthMetric<0.0) { +return 1.0; +} +else +{ +vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w; +vec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5)); +vec2 uv=uvDepth.xy*shadowMapSizeAndInverse.x; +uv+=0.5; +vec2 st=fract(uv); +vec2 base_uv=floor(uv)-0.5; +base_uv*=shadowMapSizeAndInverse.y; + + + + +vec2 uvw0=3.-2.*st; +vec2 uvw1=1.+2.*st; +vec2 u=vec2((2.-st.x)/uvw0.x-1.,st.x/uvw1.x+1.)*shadowMapSizeAndInverse.y; +vec2 v=vec2((2.-st.y)/uvw0.y-1.,st.y/uvw1.y+1.)*shadowMapSizeAndInverse.y; +float shadow=0.; +shadow+=uvw0.x*uvw0.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[0],v[0]),uvDepth.z)); +shadow+=uvw1.x*uvw0.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[1],v[0]),uvDepth.z)); +shadow+=uvw0.x*uvw1.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[0],v[1]),uvDepth.z)); +shadow+=uvw1.x*uvw1.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[1],v[1]),uvDepth.z)); +shadow=shadow/16.; +shadow=mix(darkness,1.,shadow); +return computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff); +} +} + + + +#define inline +float computeShadowWithPCF5(vec4 vPositionFromLight,float depthMetric,highp sampler2DShadow shadowSampler,vec2 shadowMapSizeAndInverse,float darkness,float frustumEdgeFalloff) +{ +if (depthMetric>1.0 || depthMetric<0.0) { +return 1.0; +} +else +{ +vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w; +vec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5)); +vec2 uv=uvDepth.xy*shadowMapSizeAndInverse.x; +uv+=0.5; +vec2 st=fract(uv); +vec2 base_uv=floor(uv)-0.5; +base_uv*=shadowMapSizeAndInverse.y; + + +vec2 uvw0=4.-3.*st; +vec2 uvw1=vec2(7.); +vec2 uvw2=1.+3.*st; +vec3 u=vec3((3.-2.*st.x)/uvw0.x-2.,(3.+st.x)/uvw1.x,st.x/uvw2.x+2.)*shadowMapSizeAndInverse.y; +vec3 v=vec3((3.-2.*st.y)/uvw0.y-2.,(3.+st.y)/uvw1.y,st.y/uvw2.y+2.)*shadowMapSizeAndInverse.y; +float shadow=0.; +shadow+=uvw0.x*uvw0.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[0],v[0]),uvDepth.z)); +shadow+=uvw1.x*uvw0.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[1],v[0]),uvDepth.z)); +shadow+=uvw2.x*uvw0.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[2],v[0]),uvDepth.z)); +shadow+=uvw0.x*uvw1.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[0],v[1]),uvDepth.z)); +shadow+=uvw1.x*uvw1.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[1],v[1]),uvDepth.z)); +shadow+=uvw2.x*uvw1.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[2],v[1]),uvDepth.z)); +shadow+=uvw0.x*uvw2.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[0],v[2]),uvDepth.z)); +shadow+=uvw1.x*uvw2.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[1],v[2]),uvDepth.z)); +shadow+=uvw2.x*uvw2.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[2],v[2]),uvDepth.z)); +shadow=shadow/144.; +shadow=mix(darkness,1.,shadow); +return computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff); +} +} +const vec3 PoissonSamplers32[64]=vec3[64]( +vec3(0.06407013,0.05409927,0.), +vec3(0.7366577,0.5789394,0.), +vec3(-0.6270542,-0.5320278,0.), +vec3(-0.4096107,0.8411095,0.), +vec3(0.6849564,-0.4990818,0.), +vec3(-0.874181,-0.04579735,0.), +vec3(0.9989998,0.0009880066,0.), +vec3(-0.004920578,-0.9151649,0.), +vec3(0.1805763,0.9747483,0.), +vec3(-0.2138451,0.2635818,0.), +vec3(0.109845,0.3884785,0.), +vec3(0.06876755,-0.3581074,0.), +vec3(0.374073,-0.7661266,0.), +vec3(0.3079132,-0.1216763,0.), +vec3(-0.3794335,-0.8271583,0.), +vec3(-0.203878,-0.07715034,0.), +vec3(0.5912697,0.1469799,0.), +vec3(-0.88069,0.3031784,0.), +vec3(0.5040108,0.8283722,0.), +vec3(-0.5844124,0.5494877,0.), +vec3(0.6017799,-0.1726654,0.), +vec3(-0.5554981,0.1559997,0.), +vec3(-0.3016369,-0.3900928,0.), +vec3(-0.5550632,-0.1723762,0.), +vec3(0.925029,0.2995041,0.), +vec3(-0.2473137,0.5538505,0.), +vec3(0.9183037,-0.2862392,0.), +vec3(0.2469421,0.6718712,0.), +vec3(0.3916397,-0.4328209,0.), +vec3(-0.03576927,-0.6220032,0.), +vec3(-0.04661255,0.7995201,0.), +vec3(0.4402924,0.3640312,0.), +vec3(0.,0.,0.), +vec3(0.,0.,0.), +vec3(0.,0.,0.), +vec3(0.,0.,0.), +vec3(0.,0.,0.), +vec3(0.,0.,0.), +vec3(0.,0.,0.), +vec3(0.,0.,0.), +vec3(0.,0.,0.), +vec3(0.,0.,0.), +vec3(0.,0.,0.), +vec3(0.,0.,0.), +vec3(0.,0.,0.), +vec3(0.,0.,0.), +vec3(0.,0.,0.), +vec3(0.,0.,0.), +vec3(0.,0.,0.), +vec3(0.,0.,0.), +vec3(0.,0.,0.), +vec3(0.,0.,0.), +vec3(0.,0.,0.), +vec3(0.,0.,0.), +vec3(0.,0.,0.), +vec3(0.,0.,0.), +vec3(0.,0.,0.), +vec3(0.,0.,0.), +vec3(0.,0.,0.), +vec3(0.,0.,0.), +vec3(0.,0.,0.), +vec3(0.,0.,0.), +vec3(0.,0.,0.), +vec3(0.,0.,0.) +); +const vec3 PoissonSamplers64[64]=vec3[64]( +vec3(-0.613392,0.617481,0.), +vec3(0.170019,-0.040254,0.), +vec3(-0.299417,0.791925,0.), +vec3(0.645680,0.493210,0.), +vec3(-0.651784,0.717887,0.), +vec3(0.421003,0.027070,0.), +vec3(-0.817194,-0.271096,0.), +vec3(-0.705374,-0.668203,0.), +vec3(0.977050,-0.108615,0.), +vec3(0.063326,0.142369,0.), +vec3(0.203528,0.214331,0.), +vec3(-0.667531,0.326090,0.), +vec3(-0.098422,-0.295755,0.), +vec3(-0.885922,0.215369,0.), +vec3(0.566637,0.605213,0.), +vec3(0.039766,-0.396100,0.), +vec3(0.751946,0.453352,0.), +vec3(0.078707,-0.715323,0.), +vec3(-0.075838,-0.529344,0.), +vec3(0.724479,-0.580798,0.), +vec3(0.222999,-0.215125,0.), +vec3(-0.467574,-0.405438,0.), +vec3(-0.248268,-0.814753,0.), +vec3(0.354411,-0.887570,0.), +vec3(0.175817,0.382366,0.), +vec3(0.487472,-0.063082,0.), +vec3(-0.084078,0.898312,0.), +vec3(0.488876,-0.783441,0.), +vec3(0.470016,0.217933,0.), +vec3(-0.696890,-0.549791,0.), +vec3(-0.149693,0.605762,0.), +vec3(0.034211,0.979980,0.), +vec3(0.503098,-0.308878,0.), +vec3(-0.016205,-0.872921,0.), +vec3(0.385784,-0.393902,0.), +vec3(-0.146886,-0.859249,0.), +vec3(0.643361,0.164098,0.), +vec3(0.634388,-0.049471,0.), +vec3(-0.688894,0.007843,0.), +vec3(0.464034,-0.188818,0.), +vec3(-0.440840,0.137486,0.), +vec3(0.364483,0.511704,0.), +vec3(0.034028,0.325968,0.), +vec3(0.099094,-0.308023,0.), +vec3(0.693960,-0.366253,0.), +vec3(0.678884,-0.204688,0.), +vec3(0.001801,0.780328,0.), +vec3(0.145177,-0.898984,0.), +vec3(0.062655,-0.611866,0.), +vec3(0.315226,-0.604297,0.), +vec3(-0.780145,0.486251,0.), +vec3(-0.371868,0.882138,0.), +vec3(0.200476,0.494430,0.), +vec3(-0.494552,-0.711051,0.), +vec3(0.612476,0.705252,0.), +vec3(-0.578845,-0.768792,0.), +vec3(-0.772454,-0.090976,0.), +vec3(0.504440,0.372295,0.), +vec3(0.155736,0.065157,0.), +vec3(0.391522,0.849605,0.), +vec3(-0.620106,-0.328104,0.), +vec3(0.789239,-0.419965,0.), +vec3(-0.545396,0.538133,0.), +vec3(-0.178564,-0.596057,0.) +); + + + + + +#define inline +float computeShadowWithCSMPCSS(float layer,vec4 vPositionFromLight,float depthMetric,highp sampler2DArray depthSampler,highp sampler2DArrayShadow shadowSampler,float shadowMapSizeInverse,float lightSizeUV,float darkness,float frustumEdgeFalloff,int searchTapCount,int pcfTapCount,vec3[64] poissonSamplers,vec2 lightSizeUVCorrection,float depthCorrection,float penumbraDarkness) +{ +vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w; +vec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5)); +uvDepth.z=clamp(uvDepth.z,0.,GREATEST_LESS_THAN_ONE); +vec4 uvDepthLayer=vec4(uvDepth.x,uvDepth.y,layer,uvDepth.z); +float blockerDepth=0.0; +float sumBlockerDepth=0.0; +float numBlocker=0.0; +for (int i=0; i1.0 || depthMetric<0.0) { +return 1.0; +} +else +{ +vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w; +vec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5)); +float blockerDepth=0.0; +float sumBlockerDepth=0.0; +float numBlocker=0.0; +for (int i=0; icurrRayHeight) +{ +float delta1=currSampledHeight-currRayHeight; +float delta2=(currRayHeight+stepSize)-lastSampledHeight; +float ratio=delta1/(delta1+delta2); +vCurrOffset=(ratio)* vLastOffset+(1.0-ratio)*vCurrOffset; + +break; +} +else +{ +currRayHeight-=stepSize; +vLastOffset=vCurrOffset; +vCurrOffset+=stepSize*vMaxOffset; +lastSampledHeight=currSampledHeight; +} +} +return vCurrOffset; +} +vec2 parallaxOffset(vec3 viewDir,float heightScale) +{ + +float height=texture2D(bumpSampler,vBumpUV).w; +vec2 texCoordOffset=heightScale*viewDir.xy*height; +return -texCoordOffset; +} +#endif`;f(5).a.IncludesShadersStore[U]=_},function(Ie,y,f){var U=`vec2 uvOffset=vec2(0.0,0.0); +#if defined(BUMP) || defined(PARALLAX) || defined(DETAIL) +#ifdef NORMALXYSCALE +float normalScale=1.0; +#elif defined(BUMP) +float normalScale=vBumpInfos.y; +#else +float normalScale=1.0; +#endif +#if defined(TANGENT) && defined(NORMAL) +mat3 TBN=vTBN; +#elif defined(BUMP) +mat3 TBN=cotangent_frame(normalW*normalScale,vPositionW,vBumpUV); +#else +mat3 TBN=cotangent_frame(normalW*normalScale,vPositionW,vDetailUV,vec2(1.,1.)); +#endif +#elif defined(ANISOTROPIC) +#if defined(TANGENT) && defined(NORMAL) +mat3 TBN=vTBN; +#else +mat3 TBN=cotangent_frame(normalW,vPositionW,vMainUV1,vec2(1.,1.)); +#endif +#endif +#ifdef PARALLAX +mat3 invTBN=transposeMat3(TBN); +#ifdef PARALLAXOCCLUSION +uvOffset=parallaxOcclusion(invTBN*-viewDirectionW,invTBN*normalW,vBumpUV,vBumpInfos.z); +#else +uvOffset=parallaxOffset(invTBN*viewDirectionW,vBumpInfos.z); +#endif +#endif +#ifdef DETAIL +vec4 detailColor=texture2D(detailSampler,vDetailUV+uvOffset); +vec2 detailNormalRG=detailColor.wy*2.0-1.0; +float detailNormalB=sqrt(1.-saturate(dot(detailNormalRG,detailNormalRG))); +vec3 detailNormal=vec3(detailNormalRG,detailNormalB); +#endif +#ifdef BUMP +#ifdef OBJECTSPACE_NORMALMAP +normalW=normalize(texture2D(bumpSampler,vBumpUV).xyz*2.0-1.0); +normalW=normalize(mat3(normalMatrix)*normalW); +#elif !defined(DETAIL) +normalW=perturbNormal(TBN,vBumpUV+uvOffset); +#else +vec3 bumpNormal=texture2D(bumpSampler,vBumpUV+uvOffset).xyz*2.0-1.0; + +#if DETAIL_NORMALBLENDMETHOD == 0 +detailNormal.xy*=vDetailInfos.z; +vec3 blendedNormal=normalize(vec3(bumpNormal.xy+detailNormal.xy,bumpNormal.z*detailNormal.z)); +#elif DETAIL_NORMALBLENDMETHOD == 1 +detailNormal.xy*=vDetailInfos.z; +bumpNormal+=vec3(0.0,0.0,1.0); +detailNormal*=vec3(-1.0,-1.0,1.0); +vec3 blendedNormal=bumpNormal*dot(bumpNormal,detailNormal)/bumpNormal.z-detailNormal; +#endif +normalW=perturbNormalBase(TBN,blendedNormal,vBumpInfos.y); +#endif +#elif defined(DETAIL) +detailNormal.xy*=vDetailInfos.z; +normalW=perturbNormalBase(TBN,detailNormal,vDetailInfos.z); +#endif`;f(5).a.IncludesShadersStore.bumpFragment=U},function(Ie,y,f){var U="lightFragment",_=`#ifdef LIGHT{X} +#if defined(SHADOWONLY) || defined(LIGHTMAP) && defined(LIGHTMAPEXCLUDED{X}) && defined(LIGHTMAPNOSPECULAR{X}) + +#else +#ifdef PBR + +#ifdef SPOTLIGHT{X} +preInfo=computePointAndSpotPreLightingInfo(light{X}.vLightData,viewDirectionW,normalW); +#elif defined(POINTLIGHT{X}) +preInfo=computePointAndSpotPreLightingInfo(light{X}.vLightData,viewDirectionW,normalW); +#elif defined(HEMILIGHT{X}) +preInfo=computeHemisphericPreLightingInfo(light{X}.vLightData,viewDirectionW,normalW); +#elif defined(DIRLIGHT{X}) +preInfo=computeDirectionalPreLightingInfo(light{X}.vLightData,viewDirectionW,normalW); +#endif +preInfo.NdotV=NdotV; + +#ifdef SPOTLIGHT{X} +#ifdef LIGHT_FALLOFF_GLTF{X} +preInfo.attenuation=computeDistanceLightFalloff_GLTF(preInfo.lightDistanceSquared,light{X}.vLightFalloff.y); +preInfo.attenuation*=computeDirectionalLightFalloff_GLTF(light{X}.vLightDirection.xyz,preInfo.L,light{X}.vLightFalloff.z,light{X}.vLightFalloff.w); +#elif defined(LIGHT_FALLOFF_PHYSICAL{X}) +preInfo.attenuation=computeDistanceLightFalloff_Physical(preInfo.lightDistanceSquared); +preInfo.attenuation*=computeDirectionalLightFalloff_Physical(light{X}.vLightDirection.xyz,preInfo.L,light{X}.vLightDirection.w); +#elif defined(LIGHT_FALLOFF_STANDARD{X}) +preInfo.attenuation=computeDistanceLightFalloff_Standard(preInfo.lightOffset,light{X}.vLightFalloff.x); +preInfo.attenuation*=computeDirectionalLightFalloff_Standard(light{X}.vLightDirection.xyz,preInfo.L,light{X}.vLightDirection.w,light{X}.vLightData.w); +#else +preInfo.attenuation=computeDistanceLightFalloff(preInfo.lightOffset,preInfo.lightDistanceSquared,light{X}.vLightFalloff.x,light{X}.vLightFalloff.y); +preInfo.attenuation*=computeDirectionalLightFalloff(light{X}.vLightDirection.xyz,preInfo.L,light{X}.vLightDirection.w,light{X}.vLightData.w,light{X}.vLightFalloff.z,light{X}.vLightFalloff.w); +#endif +#elif defined(POINTLIGHT{X}) +#ifdef LIGHT_FALLOFF_GLTF{X} +preInfo.attenuation=computeDistanceLightFalloff_GLTF(preInfo.lightDistanceSquared,light{X}.vLightFalloff.y); +#elif defined(LIGHT_FALLOFF_PHYSICAL{X}) +preInfo.attenuation=computeDistanceLightFalloff_Physical(preInfo.lightDistanceSquared); +#elif defined(LIGHT_FALLOFF_STANDARD{X}) +preInfo.attenuation=computeDistanceLightFalloff_Standard(preInfo.lightOffset,light{X}.vLightFalloff.x); +#else +preInfo.attenuation=computeDistanceLightFalloff(preInfo.lightOffset,preInfo.lightDistanceSquared,light{X}.vLightFalloff.x,light{X}.vLightFalloff.y); +#endif +#else +preInfo.attenuation=1.0; +#endif + + +#ifdef HEMILIGHT{X} +preInfo.roughness=roughness; +#else +preInfo.roughness=adjustRoughnessFromLightProperties(roughness,light{X}.vLightSpecular.a,preInfo.lightDistance); +#endif + +#ifdef HEMILIGHT{X} +info.diffuse=computeHemisphericDiffuseLighting(preInfo,light{X}.vLightDiffuse.rgb,light{X}.vLightGround); +#elif defined(SS_TRANSLUCENCY) +info.diffuse=computeDiffuseAndTransmittedLighting(preInfo,light{X}.vLightDiffuse.rgb,subSurfaceOut.transmittance); +#else +info.diffuse=computeDiffuseLighting(preInfo,light{X}.vLightDiffuse.rgb); +#endif + +#ifdef SPECULARTERM +#ifdef ANISOTROPIC +info.specular=computeAnisotropicSpecularLighting(preInfo,viewDirectionW,normalW,anisotropicOut.anisotropicTangent,anisotropicOut.anisotropicBitangent,anisotropicOut.anisotropy,clearcoatOut.specularEnvironmentR0,specularEnvironmentR90,AARoughnessFactors.x,light{X}.vLightDiffuse.rgb); +#else +info.specular=computeSpecularLighting(preInfo,normalW,clearcoatOut.specularEnvironmentR0,specularEnvironmentR90,AARoughnessFactors.x,light{X}.vLightDiffuse.rgb); +#endif +#endif + +#ifdef SHEEN +#ifdef SHEEN_LINKWITHALBEDO + +preInfo.roughness=sheenOut.sheenIntensity; +#else +#ifdef HEMILIGHT{X} +preInfo.roughness=sheenOut.sheenRoughness; +#else +preInfo.roughness=adjustRoughnessFromLightProperties(sheenOut.sheenRoughness,light{X}.vLightSpecular.a,preInfo.lightDistance); +#endif +#endif +info.sheen=computeSheenLighting(preInfo,normalW,sheenOut.sheenColor,specularEnvironmentR90,AARoughnessFactors.x,light{X}.vLightDiffuse.rgb); +#endif + +#ifdef CLEARCOAT + +#ifdef HEMILIGHT{X} +preInfo.roughness=clearcoatOut.clearCoatRoughness; +#else +preInfo.roughness=adjustRoughnessFromLightProperties(clearcoatOut.clearCoatRoughness,light{X}.vLightSpecular.a,preInfo.lightDistance); +#endif +info.clearCoat=computeClearCoatLighting(preInfo,clearcoatOut.clearCoatNormalW,clearcoatOut.clearCoatAARoughnessFactors.x,clearcoatOut.clearCoatIntensity,light{X}.vLightDiffuse.rgb); +#ifdef CLEARCOAT_TINT + +absorption=computeClearCoatLightingAbsorption(clearcoatOut.clearCoatNdotVRefract,preInfo.L,clearcoatOut.clearCoatNormalW,clearcoatOut.clearCoatColor,clearcoatOut.clearCoatThickness,clearcoatOut.clearCoatIntensity); +info.diffuse*=absorption; +#ifdef SPECULARTERM +info.specular*=absorption; +#endif +#endif + +info.diffuse*=info.clearCoat.w; +#ifdef SPECULARTERM +info.specular*=info.clearCoat.w; +#endif +#ifdef SHEEN +info.sheen*=info.clearCoat.w; +#endif +#endif +#else +#ifdef SPOTLIGHT{X} +info=computeSpotLighting(viewDirectionW,normalW,light{X}.vLightData,light{X}.vLightDirection,light{X}.vLightDiffuse.rgb,light{X}.vLightSpecular.rgb,light{X}.vLightDiffuse.a,glossiness); +#elif defined(HEMILIGHT{X}) +info=computeHemisphericLighting(viewDirectionW,normalW,light{X}.vLightData,light{X}.vLightDiffuse.rgb,light{X}.vLightSpecular.rgb,light{X}.vLightGround,glossiness); +#elif defined(POINTLIGHT{X}) || defined(DIRLIGHT{X}) +info=computeLighting(viewDirectionW,normalW,light{X}.vLightData,light{X}.vLightDiffuse.rgb,light{X}.vLightSpecular.rgb,light{X}.vLightDiffuse.a,glossiness); +#endif +#endif +#ifdef PROJECTEDLIGHTTEXTURE{X} +info.diffuse*=computeProjectionTextureDiffuseLighting(projectionLightSampler{X},textureProjectionMatrix{X}); +#endif +#endif +#ifdef SHADOW{X} +#ifdef SHADOWCSM{X} +for (int i=0; i=0.) { +index{X}=i; +break; +} +} +#ifdef SHADOWCSMUSESHADOWMAXZ{X} +if (index{X}>=0) +#endif +{ +#if defined(SHADOWPCF{X}) +#if defined(SHADOWLOWQUALITY{X}) +shadow=computeShadowWithCSMPCF1(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowSampler{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.w); +#elif defined(SHADOWMEDIUMQUALITY{X}) +shadow=computeShadowWithCSMPCF3(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowSampler{X},light{X}.shadowsInfo.yz,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w); +#else +shadow=computeShadowWithCSMPCF5(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowSampler{X},light{X}.shadowsInfo.yz,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w); +#endif +#elif defined(SHADOWPCSS{X}) +#if defined(SHADOWLOWQUALITY{X}) +shadow=computeShadowWithCSMPCSS16(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],depthSampler{X},shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w,lightSizeUVCorrection{X}[index{X}],depthCorrection{X}[index{X}],penumbraDarkness{X}); +#elif defined(SHADOWMEDIUMQUALITY{X}) +shadow=computeShadowWithCSMPCSS32(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],depthSampler{X},shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w,lightSizeUVCorrection{X}[index{X}],depthCorrection{X}[index{X}],penumbraDarkness{X}); +#else +shadow=computeShadowWithCSMPCSS64(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],depthSampler{X},shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w,lightSizeUVCorrection{X}[index{X}],depthCorrection{X}[index{X}],penumbraDarkness{X}); +#endif +#else +shadow=computeShadowCSM(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowSampler{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.w); +#endif +#ifdef SHADOWCSMDEBUG{X} +shadowDebug{X}=vec3(shadow)*vCascadeColorsMultiplier{X}[index{X}]; +#endif +#ifndef SHADOWCSMNOBLEND{X} +float frustumLength=frustumLengths{X}[index{X}]; +float diffRatio=clamp(diff{X}/frustumLength,0.,1.)*cascadeBlendFactor{X}; +if (index{X}<(SHADOWCSMNUM_CASCADES{X}-1) && diffRatio<1.) +{ +index{X}+=1; +float nextShadow=0.; +#if defined(SHADOWPCF{X}) +#if defined(SHADOWLOWQUALITY{X}) +nextShadow=computeShadowWithCSMPCF1(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowSampler{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.w); +#elif defined(SHADOWMEDIUMQUALITY{X}) +nextShadow=computeShadowWithCSMPCF3(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowSampler{X},light{X}.shadowsInfo.yz,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w); +#else +nextShadow=computeShadowWithCSMPCF5(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowSampler{X},light{X}.shadowsInfo.yz,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w); +#endif +#elif defined(SHADOWPCSS{X}) +#if defined(SHADOWLOWQUALITY{X}) +nextShadow=computeShadowWithCSMPCSS16(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],depthSampler{X},shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w,lightSizeUVCorrection{X}[index{X}],depthCorrection{X}[index{X}],penumbraDarkness{X}); +#elif defined(SHADOWMEDIUMQUALITY{X}) +nextShadow=computeShadowWithCSMPCSS32(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],depthSampler{X},shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w,lightSizeUVCorrection{X}[index{X}],depthCorrection{X}[index{X}],penumbraDarkness{X}); +#else +nextShadow=computeShadowWithCSMPCSS64(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],depthSampler{X},shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w,lightSizeUVCorrection{X}[index{X}],depthCorrection{X}[index{X}],penumbraDarkness{X}); +#endif +#else +nextShadow=computeShadowCSM(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowSampler{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.w); +#endif +shadow=mix(nextShadow,shadow,diffRatio); +#ifdef SHADOWCSMDEBUG{X} +shadowDebug{X}=mix(vec3(nextShadow)*vCascadeColorsMultiplier{X}[index{X}],shadowDebug{X},diffRatio); +#endif +} +#endif +} +#elif defined(SHADOWCLOSEESM{X}) +#if defined(SHADOWCUBE{X}) +shadow=computeShadowWithCloseESMCube(light{X}.vLightData.xyz,shadowSampler{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.z,light{X}.depthValues); +#else +shadow=computeShadowWithCloseESM(vPositionFromLight{X},vDepthMetric{X},shadowSampler{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.z,light{X}.shadowsInfo.w); +#endif +#elif defined(SHADOWESM{X}) +#if defined(SHADOWCUBE{X}) +shadow=computeShadowWithESMCube(light{X}.vLightData.xyz,shadowSampler{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.z,light{X}.depthValues); +#else +shadow=computeShadowWithESM(vPositionFromLight{X},vDepthMetric{X},shadowSampler{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.z,light{X}.shadowsInfo.w); +#endif +#elif defined(SHADOWPOISSON{X}) +#if defined(SHADOWCUBE{X}) +shadow=computeShadowWithPoissonSamplingCube(light{X}.vLightData.xyz,shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.x,light{X}.depthValues); +#else +shadow=computeShadowWithPoissonSampling(vPositionFromLight{X},vDepthMetric{X},shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w); +#endif +#elif defined(SHADOWPCF{X}) +#if defined(SHADOWLOWQUALITY{X}) +shadow=computeShadowWithPCF1(vPositionFromLight{X},vDepthMetric{X},shadowSampler{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.w); +#elif defined(SHADOWMEDIUMQUALITY{X}) +shadow=computeShadowWithPCF3(vPositionFromLight{X},vDepthMetric{X},shadowSampler{X},light{X}.shadowsInfo.yz,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w); +#else +shadow=computeShadowWithPCF5(vPositionFromLight{X},vDepthMetric{X},shadowSampler{X},light{X}.shadowsInfo.yz,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w); +#endif +#elif defined(SHADOWPCSS{X}) +#if defined(SHADOWLOWQUALITY{X}) +shadow=computeShadowWithPCSS16(vPositionFromLight{X},vDepthMetric{X},depthSampler{X},shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w); +#elif defined(SHADOWMEDIUMQUALITY{X}) +shadow=computeShadowWithPCSS32(vPositionFromLight{X},vDepthMetric{X},depthSampler{X},shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w); +#else +shadow=computeShadowWithPCSS64(vPositionFromLight{X},vDepthMetric{X},depthSampler{X},shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w); +#endif +#else +#if defined(SHADOWCUBE{X}) +shadow=computeShadowCube(light{X}.vLightData.xyz,shadowSampler{X},light{X}.shadowsInfo.x,light{X}.depthValues); +#else +shadow=computeShadow(vPositionFromLight{X},vDepthMetric{X},shadowSampler{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.w); +#endif +#endif +#ifdef SHADOWONLY +#ifndef SHADOWINUSE +#define SHADOWINUSE +#endif +globalShadow+=shadow; +shadowLightCount+=1.0; +#endif +#else +shadow=1.; +#endif +#ifndef SHADOWONLY +#ifdef CUSTOMUSERLIGHTING +diffuseBase+=computeCustomDiffuseLighting(info,diffuseBase,shadow); +#ifdef SPECULARTERM +specularBase+=computeCustomSpecularLighting(info,specularBase,shadow); +#endif +#elif defined(LIGHTMAP) && defined(LIGHTMAPEXCLUDED{X}) +diffuseBase+=lightmapColor.rgb*shadow; +#ifdef SPECULARTERM +#ifndef LIGHTMAPNOSPECULAR{X} +specularBase+=info.specular*shadow*lightmapColor.rgb; +#endif +#endif +#ifdef CLEARCOAT +#ifndef LIGHTMAPNOSPECULAR{X} +clearCoatBase+=info.clearCoat.rgb*shadow*lightmapColor.rgb; +#endif +#endif +#ifdef SHEEN +#ifndef LIGHTMAPNOSPECULAR{X} +sheenBase+=info.sheen.rgb*shadow; +#endif +#endif +#else +#ifdef SHADOWCSMDEBUG{X} +diffuseBase+=info.diffuse*shadowDebug{X}; +#else +diffuseBase+=info.diffuse*shadow; +#endif +#ifdef SPECULARTERM +specularBase+=info.specular*shadow; +#endif +#ifdef CLEARCOAT +clearCoatBase+=info.clearCoat.rgb*shadow; +#endif +#ifdef SHEEN +sheenBase+=info.sheen.rgb*shadow; +#endif +#endif +#endif +#endif`;f(5).a.IncludesShadersStore[U]=_},function(Ie,y,f){var U=`#ifdef FOG +float fog=CalcFogFactor(); +color.rgb=fog*color.rgb+(1.0-fog)*vFogColor; +#endif`;f(5).a.IncludesShadersStore.fogFragment=U},function(Ie,y,f){var U="fogVertexDeclaration",_=`#ifdef FOG +varying vec3 vFogDistance; +#endif`;f(5).a.IncludesShadersStore[U]=_},function(Ie,y,f){var U="shadowsVertex",_=`#ifdef SHADOWS +#if defined(SHADOWCSM{X}) +vPositionFromCamera{X}=view*worldPos; +for (int i=0; i1)for(var T=0;T=R||M.indexOf("file:")!==-1?-1:Math.pow(2,P)*u}},_}()},function(Ie,y,f){f.d(y,"a",function(){return U});var U=function(){function _(){this._isDepthTestDirty=!1,this._isDepthMaskDirty=!1,this._isDepthFuncDirty=!1,this._isCullFaceDirty=!1,this._isCullDirty=!1,this._isZOffsetDirty=!1,this._isFrontFaceDirty=!1,this.reset()}return Object.defineProperty(_.prototype,"isDirty",{get:function(){return this._isDepthFuncDirty||this._isDepthTestDirty||this._isDepthMaskDirty||this._isCullFaceDirty||this._isCullDirty||this._isZOffsetDirty||this._isFrontFaceDirty},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"zOffset",{get:function(){return this._zOffset},set:function(R){this._zOffset!==R&&(this._zOffset=R,this._isZOffsetDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"cullFace",{get:function(){return this._cullFace},set:function(R){this._cullFace!==R&&(this._cullFace=R,this._isCullFaceDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"cull",{get:function(){return this._cull},set:function(R){this._cull!==R&&(this._cull=R,this._isCullDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"depthFunc",{get:function(){return this._depthFunc},set:function(R){this._depthFunc!==R&&(this._depthFunc=R,this._isDepthFuncDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"depthMask",{get:function(){return this._depthMask},set:function(R){this._depthMask!==R&&(this._depthMask=R,this._isDepthMaskDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"depthTest",{get:function(){return this._depthTest},set:function(R){this._depthTest!==R&&(this._depthTest=R,this._isDepthTestDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"frontFace",{get:function(){return this._frontFace},set:function(R){this._frontFace!==R&&(this._frontFace=R,this._isFrontFaceDirty=!0)},enumerable:!1,configurable:!0}),_.prototype.reset=function(){this._depthMask=!0,this._depthTest=!0,this._depthFunc=null,this._cullFace=null,this._cull=null,this._zOffset=0,this._frontFace=null,this._isDepthTestDirty=!0,this._isDepthMaskDirty=!0,this._isDepthFuncDirty=!1,this._isCullFaceDirty=!1,this._isCullDirty=!1,this._isZOffsetDirty=!1,this._isFrontFaceDirty=!1},_.prototype.apply=function(R){this.isDirty&&(this._isCullDirty&&(this.cull?R.enable(R.CULL_FACE):R.disable(R.CULL_FACE),this._isCullDirty=!1),this._isCullFaceDirty&&(R.cullFace(this.cullFace),this._isCullFaceDirty=!1),this._isDepthMaskDirty&&(R.depthMask(this.depthMask),this._isDepthMaskDirty=!1),this._isDepthTestDirty&&(this.depthTest?R.enable(R.DEPTH_TEST):R.disable(R.DEPTH_TEST),this._isDepthTestDirty=!1),this._isDepthFuncDirty&&(R.depthFunc(this.depthFunc),this._isDepthFuncDirty=!1),this._isZOffsetDirty&&(this.zOffset?(R.enable(R.POLYGON_OFFSET_FILL),R.polygonOffset(this.zOffset,0)):R.disable(R.POLYGON_OFFSET_FILL),this._isZOffsetDirty=!1),this._isFrontFaceDirty&&(R.frontFace(this.frontFace),this._isFrontFaceDirty=!1))},_}()},function(Ie,y,f){f.d(y,"a",function(){return _});var U=f(2),_=function(){function R(){this._isStencilTestDirty=!1,this._isStencilMaskDirty=!1,this._isStencilFuncDirty=!1,this._isStencilOpDirty=!1,this.reset()}return Object.defineProperty(R.prototype,"isDirty",{get:function(){return this._isStencilTestDirty||this._isStencilMaskDirty||this._isStencilFuncDirty||this._isStencilOpDirty},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"stencilFunc",{get:function(){return this._stencilFunc},set:function(u){this._stencilFunc!==u&&(this._stencilFunc=u,this._isStencilFuncDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"stencilFuncRef",{get:function(){return this._stencilFuncRef},set:function(u){this._stencilFuncRef!==u&&(this._stencilFuncRef=u,this._isStencilFuncDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"stencilFuncMask",{get:function(){return this._stencilFuncMask},set:function(u){this._stencilFuncMask!==u&&(this._stencilFuncMask=u,this._isStencilFuncDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"stencilOpStencilFail",{get:function(){return this._stencilOpStencilFail},set:function(u){this._stencilOpStencilFail!==u&&(this._stencilOpStencilFail=u,this._isStencilOpDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"stencilOpDepthFail",{get:function(){return this._stencilOpDepthFail},set:function(u){this._stencilOpDepthFail!==u&&(this._stencilOpDepthFail=u,this._isStencilOpDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"stencilOpStencilDepthPass",{get:function(){return this._stencilOpStencilDepthPass},set:function(u){this._stencilOpStencilDepthPass!==u&&(this._stencilOpStencilDepthPass=u,this._isStencilOpDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"stencilMask",{get:function(){return this._stencilMask},set:function(u){this._stencilMask!==u&&(this._stencilMask=u,this._isStencilMaskDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"stencilTest",{get:function(){return this._stencilTest},set:function(u){this._stencilTest!==u&&(this._stencilTest=u,this._isStencilTestDirty=!0)},enumerable:!1,configurable:!0}),R.prototype.reset=function(){this._stencilTest=!1,this._stencilMask=255,this._stencilFunc=R.ALWAYS,this._stencilFuncRef=1,this._stencilFuncMask=255,this._stencilOpStencilFail=R.KEEP,this._stencilOpDepthFail=R.KEEP,this._stencilOpStencilDepthPass=R.REPLACE,this._isStencilTestDirty=!0,this._isStencilMaskDirty=!0,this._isStencilFuncDirty=!0,this._isStencilOpDirty=!0},R.prototype.apply=function(u){this.isDirty&&(this._isStencilTestDirty&&(this.stencilTest?u.enable(u.STENCIL_TEST):u.disable(u.STENCIL_TEST),this._isStencilTestDirty=!1),this._isStencilMaskDirty&&(u.stencilMask(this.stencilMask),this._isStencilMaskDirty=!1),this._isStencilFuncDirty&&(u.stencilFunc(this.stencilFunc,this.stencilFuncRef,this.stencilFuncMask),this._isStencilFuncDirty=!1),this._isStencilOpDirty&&(u.stencilOp(this.stencilOpStencilFail,this.stencilOpDepthFail,this.stencilOpStencilDepthPass),this._isStencilOpDirty=!1))},R.ALWAYS=U.a.ALWAYS,R.KEEP=U.a.KEEP,R.REPLACE=U.a.REPLACE,R}()},function(Ie,y,f){f.d(y,"a",function(){return U});var U=function(){function _(){this._isAlphaBlendDirty=!1,this._isBlendFunctionParametersDirty=!1,this._isBlendEquationParametersDirty=!1,this._isBlendConstantsDirty=!1,this._alphaBlend=!1,this._blendFunctionParameters=new Array(4),this._blendEquationParameters=new Array(2),this._blendConstants=new Array(4),this.reset()}return Object.defineProperty(_.prototype,"isDirty",{get:function(){return this._isAlphaBlendDirty||this._isBlendFunctionParametersDirty},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"alphaBlend",{get:function(){return this._alphaBlend},set:function(R){this._alphaBlend!==R&&(this._alphaBlend=R,this._isAlphaBlendDirty=!0)},enumerable:!1,configurable:!0}),_.prototype.setAlphaBlendConstants=function(R,u,M,C){this._blendConstants[0]===R&&this._blendConstants[1]===u&&this._blendConstants[2]===M&&this._blendConstants[3]===C||(this._blendConstants[0]=R,this._blendConstants[1]=u,this._blendConstants[2]=M,this._blendConstants[3]=C,this._isBlendConstantsDirty=!0)},_.prototype.setAlphaBlendFunctionParameters=function(R,u,M,C){this._blendFunctionParameters[0]===R&&this._blendFunctionParameters[1]===u&&this._blendFunctionParameters[2]===M&&this._blendFunctionParameters[3]===C||(this._blendFunctionParameters[0]=R,this._blendFunctionParameters[1]=u,this._blendFunctionParameters[2]=M,this._blendFunctionParameters[3]=C,this._isBlendFunctionParametersDirty=!0)},_.prototype.setAlphaEquationParameters=function(R,u){this._blendEquationParameters[0]===R&&this._blendEquationParameters[1]===u||(this._blendEquationParameters[0]=R,this._blendEquationParameters[1]=u,this._isBlendEquationParametersDirty=!0)},_.prototype.reset=function(){this._alphaBlend=!1,this._blendFunctionParameters[0]=null,this._blendFunctionParameters[1]=null,this._blendFunctionParameters[2]=null,this._blendFunctionParameters[3]=null,this._blendEquationParameters[0]=null,this._blendEquationParameters[1]=null,this._blendConstants[0]=null,this._blendConstants[1]=null,this._blendConstants[2]=null,this._blendConstants[3]=null,this._isAlphaBlendDirty=!0,this._isBlendFunctionParametersDirty=!1,this._isBlendEquationParametersDirty=!1,this._isBlendConstantsDirty=!1},_.prototype.apply=function(R){this.isDirty&&(this._isAlphaBlendDirty&&(this._alphaBlend?R.enable(R.BLEND):R.disable(R.BLEND),this._isAlphaBlendDirty=!1),this._isBlendFunctionParametersDirty&&(R.blendFuncSeparate(this._blendFunctionParameters[0],this._blendFunctionParameters[1],this._blendFunctionParameters[2],this._blendFunctionParameters[3]),this._isBlendFunctionParametersDirty=!1),this._isBlendEquationParametersDirty&&(R.blendEquationSeparate(this._blendEquationParameters[0],this._blendEquationParameters[1]),this._isBlendEquationParametersDirty=!1),this._isBlendConstantsDirty&&(R.blendColor(this._blendConstants[0],this._blendConstants[1],this._blendConstants[2],this._blendConstants[3]),this._isBlendConstantsDirty=!1))},_}()},function(Ie,y,f){f.d(y,"a",function(){return U});var U=function(){function _(){this.vertexCompilationError=null,this.fragmentCompilationError=null,this.programLinkError=null,this.programValidationError=null}return Object.defineProperty(_.prototype,"isAsync",{get:function(){return this.isParallelCompiled},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"isReady",{get:function(){return!!this.program&&(!this.isParallelCompiled||this.engine._isRenderingStateCompiled(this))},enumerable:!1,configurable:!0}),_.prototype._handlesSpectorRebuildCallback=function(R){R&&this.program&&R(this.program)},_.prototype._getVertexShaderCode=function(){return this.vertexShader?this.engine._getShaderSource(this.vertexShader):null},_.prototype._getFragmentShaderCode=function(){return this.fragmentShader?this.engine._getShaderSource(this.fragmentShader):null},_}()},function(Ie,y,f){var U;f.d(y,"a",function(){return u}),function(M){M[M.Pending=0]="Pending",M[M.Fulfilled=1]="Fulfilled",M[M.Rejected=2]="Rejected"}(U||(U={}));var _=function(){this.count=0,this.target=0,this.results=[]},R=function(){function M(C){var P=this;if(this._state=U.Pending,this._children=new Array,this._rejectWasConsumed=!1,C)try{C(function(m){P._resolve(m)},function(m){P._reject(m)})}catch(m){this._reject(m)}}return Object.defineProperty(M.prototype,"_result",{get:function(){return this._resultValue},set:function(C){this._resultValue=C,this._parent&&this._parent._result===void 0&&(this._parent._result=C)},enumerable:!1,configurable:!0}),M.prototype.catch=function(C){return this.then(void 0,C)},M.prototype.then=function(C,P){var m=this,c=new M;return c._onFulfilled=C,c._onRejected=P,this._children.push(c),c._parent=this,this._state!==U.Pending&&setTimeout(function(){if(m._state===U.Fulfilled||m._rejectWasConsumed){var T=c._resolve(m._result);if(T!=null)if(T._state!==void 0){var A=T;c._children.push(A),A._parent=c,c=A}else c._result=T}else c._reject(m._reason)}),c},M.prototype._moveChildren=function(C){var P,m=this;if((P=this._children).push.apply(P,C.splice(0,C.length)),this._children.forEach(function(g){g._parent=m}),this._state===U.Fulfilled)for(var c=0,T=this._children;c"u")&&(window.Promise=R)},M}()},function(Ie,y,f){f.d(y,"a",function(){return _}),f.d(y,"b",function(){return R});var U=f(57),_=function(){function u(M){M===void 0&&(M=30),this._enabled=!0,this._rollingFrameTime=new R(M)}return u.prototype.sampleFrame=function(M){if(M===void 0&&(M=U.a.Now),this._enabled){if(this._lastFrameTimeMs!=null){var C=M-this._lastFrameTimeMs;this._rollingFrameTime.add(C)}this._lastFrameTimeMs=M}},Object.defineProperty(u.prototype,"averageFrameTime",{get:function(){return this._rollingFrameTime.average},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"averageFrameTimeVariance",{get:function(){return this._rollingFrameTime.variance},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"instantaneousFrameTime",{get:function(){return this._rollingFrameTime.history(0)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"averageFPS",{get:function(){return 1e3/this._rollingFrameTime.average},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"instantaneousFPS",{get:function(){var M=this._rollingFrameTime.history(0);return M===0?0:1e3/M},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"isSaturated",{get:function(){return this._rollingFrameTime.isSaturated()},enumerable:!1,configurable:!0}),u.prototype.enable=function(){this._enabled=!0},u.prototype.disable=function(){this._enabled=!1,this._lastFrameTimeMs=null},Object.defineProperty(u.prototype,"isEnabled",{get:function(){return this._enabled},enumerable:!1,configurable:!0}),u.prototype.reset=function(){this._lastFrameTimeMs=null,this._rollingFrameTime.reset()},u}(),R=function(){function u(M){this._samples=new Array(M),this.reset()}return u.prototype.add=function(M){var C;if(this.isSaturated()){var P=this._samples[this._pos];C=P-this.average,this.average-=C/(this._sampleCount-1),this._m2-=C*(P-this.average)}else this._sampleCount++;C=M-this.average,this.average+=C/this._sampleCount,this._m2+=C*(M-this.average),this.variance=this._m2/(this._sampleCount-1),this._samples[this._pos]=M,this._pos++,this._pos%=this._samples.length},u.prototype.history=function(M){if(M>=this._sampleCount||M>=this._samples.length)return 0;var C=this._wrapPosition(this._pos-1);return this._samples[this._wrapPosition(C-M)]},u.prototype.isSaturated=function(){return this._sampleCount>=this._samples.length},u.prototype.reset=function(){this.average=0,this.variance=0,this._sampleCount=0,this._pos=0,this._m2=0},u.prototype._wrapPosition=function(M){var C=this._samples.length;return(M%C+C)%C},u}()},function(Ie,y,f){f.d(y,"a",function(){return _});var U=f(0),_=function(){this._checkCollisions=!1,this._collisionMask=-1,this._collisionGroup=-1,this._surroundingMeshes=null,this._collider=null,this._oldPositionForCollisions=new U.e(0,0,0),this._diffPositionForCollisions=new U.e(0,0,0),this._collisionResponse=!0}},function(Ie,y,f){f.d(y,"a",function(){return u});var U=f(33),_=f(0),R=f(2),u=function(){function M(C,P,m,c,T){m===void 0&&(m=null),c===void 0&&(c=null),T===void 0&&(T=null),this.index=C,this._opaqueSubMeshes=new U.a(256),this._transparentSubMeshes=new U.a(256),this._alphaTestSubMeshes=new U.a(256),this._depthOnlySubMeshes=new U.a(256),this._particleSystems=new U.a(256),this._spriteManagers=new U.a(256),this._edgesRenderers=new U.b(16),this._scene=P,this.opaqueSortCompareFn=m,this.alphaTestSortCompareFn=c,this.transparentSortCompareFn=T}return Object.defineProperty(M.prototype,"opaqueSortCompareFn",{set:function(C){this._opaqueSortCompareFn=C,this._renderOpaque=C?this.renderOpaqueSorted:M.renderUnsorted},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"alphaTestSortCompareFn",{set:function(C){this._alphaTestSortCompareFn=C,this._renderAlphaTest=C?this.renderAlphaTestSorted:M.renderUnsorted},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"transparentSortCompareFn",{set:function(C){this._transparentSortCompareFn=C||M.defaultTransparentSortCompare,this._renderTransparent=this.renderTransparentSorted},enumerable:!1,configurable:!0}),M.prototype.render=function(C,P,m,c){if(C)C(this._opaqueSubMeshes,this._alphaTestSubMeshes,this._transparentSubMeshes,this._depthOnlySubMeshes);else{var T=this._scene.getEngine();this._depthOnlySubMeshes.length!==0&&(T.setColorWrite(!1),this._renderAlphaTest(this._depthOnlySubMeshes),T.setColorWrite(!0)),this._opaqueSubMeshes.length!==0&&this._renderOpaque(this._opaqueSubMeshes),this._alphaTestSubMeshes.length!==0&&this._renderAlphaTest(this._alphaTestSubMeshes);var A=T.getStencilBuffer();if(T.setStencilBuffer(!1),P&&this._renderSprites(),m&&this._renderParticles(c),this.onBeforeTransparentRendering&&this.onBeforeTransparentRendering(),this._transparentSubMeshes.length!==0&&(T.setStencilBuffer(A),this._renderTransparent(this._transparentSubMeshes),T.setAlphaMode(R.a.ALPHA_DISABLE)),T.setStencilBuffer(!1),this._edgesRenderers.length){for(var S=0;SP._alphaIndex?1:C._alphaIndexP._distanceToCamera?-1:0},M.frontToBackSortCompare=function(C,P){return C._distanceToCameraP._distanceToCamera?1:0},M.prototype.prepare=function(){this._opaqueSubMeshes.reset(),this._transparentSubMeshes.reset(),this._alphaTestSubMeshes.reset(),this._depthOnlySubMeshes.reset(),this._particleSystems.reset(),this._spriteManagers.reset(),this._edgesRenderers.reset()},M.prototype.dispose=function(){this._opaqueSubMeshes.dispose(),this._transparentSubMeshes.dispose(),this._alphaTestSubMeshes.dispose(),this._depthOnlySubMeshes.dispose(),this._particleSystems.dispose(),this._spriteManagers.dispose(),this._edgesRenderers.dispose()},M.prototype.dispatch=function(C,P,m){P===void 0&&(P=C.getMesh()),m===void 0&&(m=C.getMaterial()),m!=null&&(m.needAlphaBlendingForMesh(P)?this._transparentSubMeshes.push(C):m.needAlphaTesting()?(m.needDepthPrePass&&this._depthOnlySubMeshes.push(C),this._alphaTestSubMeshes.push(C)):(m.needDepthPrePass&&this._depthOnlySubMeshes.push(C),this._opaqueSubMeshes.push(C)),P._renderingGroup=this,P._edgesRenderer&&P._edgesRenderer.isEnabled&&this._edgesRenderers.pushNoDuplicate(P._edgesRenderer))},M.prototype.dispatchSprites=function(C){this._spriteManagers.push(C)},M.prototype.dispatchParticles=function(C){this._particleSystems.push(C)},M.prototype._renderParticles=function(C){if(this._particleSystems.length!==0){var P=this._scene.activeCamera;this._scene.onBeforeParticlesRenderingObservable.notifyObservers(this._scene);for(var m=0;m=0;){var g=P[A];g<0?g=0:g>1&&(g=1),S[A]=255*g}P=S}var l=document.createElement("canvas");l.width=c,l.height=T;var h=l.getContext("2d");if(!h)return null;var v=h.createImageData(c,T);if(v.data.set(P),h.putImageData(v,0,0),C.invertY){var E=document.createElement("canvas");E.width=c,E.height=T;var D=E.getContext("2d");return D?(D.translate(0,T),D.scale(1,-1),D.drawImage(l,0,0),E.toDataURL("image/png")):null}return l.toDataURL("image/png")},_}()},function(Ie,y,f){f.d(y,"a",function(){return A});var U=f(1),_=f(0),R=f(8),u=f(31),M=f(7),C=f(41),P=f(46),m=f(4),c=f(43),T=f(12);M.a._instancedMeshFactory=function(S,g){var l=new A(S,g);if(g.instancedBuffers)for(var h in l.instancedBuffers={},g.instancedBuffers)l.instancedBuffers[h]=g.instancedBuffers[h];return l};var A=function(S){function g(l,h){var v=S.call(this,l,h.getScene())||this;v._indexInSourceMeshInstanceArray=-1,h.addInstance(v),v._sourceMesh=h,v._unIndexed=h._unIndexed,v.position.copyFrom(h.position),v.rotation.copyFrom(h.rotation),v.scaling.copyFrom(h.scaling),h.rotationQuaternion&&(v.rotationQuaternion=h.rotationQuaternion.clone()),v.animations=T.b.Slice(h.animations);for(var E=0,D=h.getAnimationRanges();E0!=this._getWorldMatrixDeterminant()>0)return this._internalAbstractMeshDataInfo._actAsRegularMesh=!0,!0;if(this._internalAbstractMeshDataInfo._actAsRegularMesh=!1,this._currentLOD._registerInstanceForRenderId(this,l),h){if(!this._currentLOD._internalAbstractMeshDataInfo._isActiveIntermediate)return this._currentLOD._internalAbstractMeshDataInfo._onlyForInstancesIntermediate=!0,!0}else if(!this._currentLOD._internalAbstractMeshDataInfo._isActive)return this._currentLOD._internalAbstractMeshDataInfo._onlyForInstances=!0,!0}return!1},g.prototype._postActivate=function(){this._sourceMesh.edgesShareWithInstances&&this._sourceMesh._edgesRenderer&&this._sourceMesh._edgesRenderer.isEnabled&&this._sourceMesh._renderingGroup?(this._sourceMesh._renderingGroup._edgesRenderers.pushNoDuplicate(this._sourceMesh._edgesRenderer),this._sourceMesh._edgesRenderer.customInstances.push(this.getWorldMatrix())):this._edgesRenderer&&this._edgesRenderer.isEnabled&&this._sourceMesh._renderingGroup&&this._sourceMesh._renderingGroup._edgesRenderers.push(this._edgesRenderer)},g.prototype.getWorldMatrix=function(){if(this._currentLOD&&this._currentLOD.billboardMode!==P.a.BILLBOARDMODE_NONE&&this._currentLOD._masterMesh!==this){var l=this._currentLOD._masterMesh;return this._currentLOD._masterMesh=this,_.c.Vector3[7].copyFrom(this._currentLOD.position),this._currentLOD.position.set(0,0,0),_.c.Matrix[0].copyFrom(this._currentLOD.computeWorldMatrix(!0)),this._currentLOD.position.copyFrom(_.c.Vector3[7]),this._currentLOD._masterMesh=l,_.c.Matrix[0]}return S.prototype.getWorldMatrix.call(this)},Object.defineProperty(g.prototype,"isAnInstance",{get:function(){return!0},enumerable:!1,configurable:!0}),g.prototype.getLOD=function(l){if(!l)return this;var h=this.getBoundingInfo();return this._currentLOD=this.sourceMesh.getLOD(l,h.boundingSphere),this._currentLOD===this.sourceMesh?this.sourceMesh:this._currentLOD},g.prototype._preActivateForIntermediateRendering=function(l){return this.sourceMesh._preActivateForIntermediateRendering(l)},g.prototype._syncSubMeshes=function(){if(this.releaseSubMeshes(),this._sourceMesh.subMeshes)for(var l=0;l=lightDirection.w) +{ +cosAngle=max(0.,pow(cosAngle,lightData.w)); +attenuation*=cosAngle; + +float ndl=max(0.,dot(vNormal,lightVectorW)); +#ifdef NDOTL +result.ndl=ndl; +#endif +result.diffuse=ndl*diffuseColor*attenuation; +#ifdef SPECULARTERM + +vec3 angleW=normalize(viewDirectionW+lightVectorW); +float specComp=max(0.,dot(vNormal,angleW)); +specComp=pow(specComp,max(1.,glossiness)); +result.specular=specComp*specularColor*attenuation; +#endif +return result; +} +result.diffuse=vec3(0.); +#ifdef SPECULARTERM +result.specular=vec3(0.); +#endif +#ifdef NDOTL +result.ndl=0.; +#endif +return result; +} +lightingInfo computeHemisphericLighting(vec3 viewDirectionW,vec3 vNormal,vec4 lightData,vec3 diffuseColor,vec3 specularColor,vec3 groundColor,float glossiness) { +lightingInfo result; + +float ndl=dot(vNormal,lightData.xyz)*0.5+0.5; +#ifdef NDOTL +result.ndl=ndl; +#endif +result.diffuse=mix(groundColor,diffuseColor,ndl); +#ifdef SPECULARTERM + +vec3 angleW=normalize(viewDirectionW+lightData.xyz); +float specComp=max(0.,dot(vNormal,angleW)); +specComp=pow(specComp,max(1.,glossiness)); +result.specular=specComp*specularColor; +#endif +return result; +} +#define inline +vec3 computeProjectionTextureDiffuseLighting(sampler2D projectionLightSampler,mat4 textureProjectionMatrix){ +vec4 strq=textureProjectionMatrix*vec4(vPositionW,1.0); +strq/=strq.w; +vec3 textureColor=texture2D(projectionLightSampler,strq.xy).rgb; +return textureColor; +}`;f(5).a.IncludesShadersStore[U]=_},function(Ie,y,f){var U="logDepthFragment",_=`#ifdef LOGARITHMICDEPTH +gl_FragDepthEXT=log2(vFragmentDepth)*logarithmicDepthConstant*0.5; +#endif`;f(5).a.IncludesShadersStore[U]=_},function(Ie,y,f){var U=`#if defined(BUMP) || defined(PARALLAX) || defined(CLEARCOAT_BUMP) || defined(ANISOTROPIC) +#if defined(TANGENT) && defined(NORMAL) +vec3 tbnNormal=normalize(normalUpdated); +vec3 tbnTangent=normalize(tangentUpdated.xyz); +vec3 tbnBitangent=cross(tbnNormal,tbnTangent)*tangentUpdated.w; +vTBN=mat3(finalWorld)*mat3(tbnTangent,tbnBitangent,tbnNormal); +#endif +#endif`;f(5).a.IncludesShadersStore.bumpVertex=U},function(Ie,y,f){var U=`#ifdef FOG +vFogDistance=(view*worldPos).xyz; +#endif`;f(5).a.IncludesShadersStore.fogVertex=U},function(Ie,y,f){var U="logDepthVertex",_=`#ifdef LOGARITHMICDEPTH +vFragmentDepth=1.0+gl_Position.w; +gl_Position.z=log2(max(0.000001,vFragmentDepth))*logarithmicDepthConstant; +#endif`;f(5).a.IncludesShadersStore[U]=_},function(Ie,y){var f;f=function(){return this}();try{f=f||new Function("return this")()}catch{typeof window=="object"&&(f=window)}Ie.exports=f},function(Ie,y,f){var U="prePassDeclaration",_=`#ifdef PREPASS +#extension GL_EXT_draw_buffers : require +#ifdef WEBGL2 +layout(location=0) out highp vec4 glFragData[{X}]; +highp vec4 gl_FragColor; +#endif +#ifdef PREPASS_DEPTHNORMAL +varying highp vec3 vViewPos; +#endif +#ifdef PREPASS_VELOCITY +varying highp vec4 vCurrentPosition; +varying highp vec4 vPreviousPosition; +#endif +#endif +`;f(5).a.IncludesShadersStore[U]=_},function(Ie,y,f){var U="fresnelFunction",_=`#ifdef FRESNEL +float computeFresnelTerm(vec3 viewDirection,vec3 worldNormal,float bias,float power) +{ +float fresnelTerm=pow(bias+abs(dot(viewDirection,worldNormal)),power); +return clamp(fresnelTerm,0.,1.); +} +#endif`;f(5).a.IncludesShadersStore[U]=_},function(Ie,y,f){var U=`#ifdef DEPTHPREPASS +gl_FragColor=vec4(0.,0.,0.,1.0); +return; +#endif`;f(5).a.IncludesShadersStore.depthPrePass=U},function(Ie,y,f){var U="prePassVertexDeclaration",_=`#ifdef PREPASS +#ifdef PREPASS_DEPTHNORMAL +varying vec3 vViewPos; +#endif +#ifdef PREPASS_VELOCITY +uniform mat4 previousWorld; +uniform mat4 previousViewProjection; +varying vec4 vCurrentPosition; +varying vec4 vPreviousPosition; +#endif +#endif`;f(5).a.IncludesShadersStore[U]=_},function(Ie,y,f){var U="bumpVertexDeclaration",_=`#if defined(BUMP) || defined(PARALLAX) || defined(CLEARCOAT_BUMP) || defined(ANISOTROPIC) +#if defined(TANGENT) && defined(NORMAL) +varying mat3 vTBN; +#endif +#endif +`;f(5).a.IncludesShadersStore[U]=_},function(Ie,y,f){var U="prePassVertex",_=`#ifdef PREPASS_DEPTHNORMAL +vViewPos=(view*worldPos).rgb; +#endif +#if defined(PREPASS_VELOCITY) && defined(BONES_VELOCITY_ENABLED) +vCurrentPosition=viewProjection*worldPos; +#if NUM_BONE_INFLUENCERS>0 +mat4 previousInfluence; +previousInfluence=mPreviousBones[int(matricesIndices[0])]*matricesWeights[0]; +#if NUM_BONE_INFLUENCERS>1 +previousInfluence+=mPreviousBones[int(matricesIndices[1])]*matricesWeights[1]; +#endif +#if NUM_BONE_INFLUENCERS>2 +previousInfluence+=mPreviousBones[int(matricesIndices[2])]*matricesWeights[2]; +#endif +#if NUM_BONE_INFLUENCERS>3 +previousInfluence+=mPreviousBones[int(matricesIndices[3])]*matricesWeights[3]; +#endif +#if NUM_BONE_INFLUENCERS>4 +previousInfluence+=mPreviousBones[int(matricesIndicesExtra[0])]*matricesWeightsExtra[0]; +#endif +#if NUM_BONE_INFLUENCERS>5 +previousInfluence+=mPreviousBones[int(matricesIndicesExtra[1])]*matricesWeightsExtra[1]; +#endif +#if NUM_BONE_INFLUENCERS>6 +previousInfluence+=mPreviousBones[int(matricesIndicesExtra[2])]*matricesWeightsExtra[2]; +#endif +#if NUM_BONE_INFLUENCERS>7 +previousInfluence+=mPreviousBones[int(matricesIndicesExtra[3])]*matricesWeightsExtra[3]; +#endif +vPreviousPosition=previousViewProjection*previousWorld*previousInfluence*vec4(positionUpdated,1.0); +#else +vPreviousPosition=previousViewProjection*previousWorld*vec4(positionUpdated,1.0); +#endif +#endif`;f(5).a.IncludesShadersStore[U]=_},function(Ie,y,f){var U=f(5),_=(f(115),f(110),"colorPixelShader"),R=`#ifdef VERTEXCOLOR +varying vec4 vColor; +#else +uniform vec4 color; +#endif +#include +void main(void) { +#include +#ifdef VERTEXCOLOR +gl_FragColor=vColor; +#else +gl_FragColor=color; +#endif +}`;U.a.ShadersStore[_]=R},function(Ie,y,f){var U=f(5),_=(f(78),f(117),f(79),f(80),f(81),f(111),"colorVertexShader"),R=` +attribute vec3 position; +#ifdef VERTEXCOLOR +attribute vec4 color; +#endif +#include +#include + +#include +uniform mat4 viewProjection; +#ifdef MULTIVIEW +uniform mat4 viewProjectionR; +#endif + +#ifdef VERTEXCOLOR +varying vec4 vColor; +#endif +void main(void) { +#include +#include +vec4 worldPos=finalWorld*vec4(position,1.0); +#ifdef MULTIVIEW +if (gl_ViewID_OVR == 0u) { +gl_Position=viewProjection*worldPos; +} else { +gl_Position=viewProjectionR*worldPos; +} +#else +gl_Position=viewProjection*worldPos; +#endif +#include +#ifdef VERTEXCOLOR + +vColor=color; +#endif +}`;U.a.ShadersStore[_]=R},function(Ie,y,f){(function(U){f.d(y,"b",function(){return T}),f.d(y,"a",function(){return A});var _=f(1),R=f(8),u=f(13),M=f(102),C=f(27),P=f(2),m=f(89),c=f(74),T=function(){this.renderWidth=512,this.renderHeight=256,this.textureSize=512,this.deterministicLockstep=!1,this.lockstepMaxSteps=4},A=function(S){function g(l){l===void 0&&(l=new T);var h=S.call(this,null)||this;u.a.Instances.push(h),l.deterministicLockstep===void 0&&(l.deterministicLockstep=!1),l.lockstepMaxSteps===void 0&&(l.lockstepMaxSteps=4),h._options=l,c.a.SetMatrixPrecision(!!l.useHighPrecisionMatrix),h._caps={maxTexturesImageUnits:16,maxVertexTextureImageUnits:16,maxCombinedTexturesImageUnits:32,maxTextureSize:512,maxCubemapTextureSize:512,maxRenderTextureSize:512,maxVertexAttribs:16,maxVaryingVectors:16,maxFragmentUniformVectors:16,maxVertexUniformVectors:16,standardDerivatives:!1,astc:null,pvrtc:null,etc1:null,etc2:null,bptc:null,maxAnisotropy:0,uintIndices:!1,fragmentDepthSupported:!1,highPrecisionShaderSupported:!0,colorBufferFloat:!1,textureFloat:!1,textureFloatLinearFiltering:!1,textureFloatRender:!1,textureHalfFloat:!1,textureHalfFloatLinearFiltering:!1,textureHalfFloatRender:!1,textureLOD:!1,drawBuffersExtension:!1,depthTextureExtension:!1,vertexArrayObject:!1,instancedArrays:!1,canUseTimestampForTimerQuery:!1,maxMSAASamples:1,blendMinMax:!1},R.a.Log("Babylon.js v"+u.a.Version+" - Null engine");var v=typeof self<"u"?self:U!==void 0?U:window;return typeof URL>"u"&&(v.URL={createObjectURL:function(){},revokeObjectURL:function(){}}),typeof Blob>"u"&&(v.Blob=function(){}),h}return Object(_.d)(g,S),g.prototype.isDeterministicLockStep=function(){return this._options.deterministicLockstep},g.prototype.getLockstepMaxSteps=function(){return this._options.lockstepMaxSteps},g.prototype.getHardwareScalingLevel=function(){return 1},g.prototype.createVertexBuffer=function(l){var h=new m.a;return h.references=1,h},g.prototype.createIndexBuffer=function(l){var h=new m.a;return h.references=1,h},g.prototype.clear=function(l,h,v,E){},g.prototype.getRenderWidth=function(l){return l===void 0&&(l=!1),!l&&this._currentRenderTarget?this._currentRenderTarget.width:this._options.renderWidth},g.prototype.getRenderHeight=function(l){return l===void 0&&(l=!1),!l&&this._currentRenderTarget?this._currentRenderTarget.height:this._options.renderHeight},g.prototype.setViewport=function(l,h,v){this._cachedViewport=l},g.prototype.createShaderProgram=function(l,h,v,E,D){return{__SPECTOR_rebuildProgram:null}},g.prototype.getUniforms=function(l,h){return[]},g.prototype.getAttributes=function(l,h){return[]},g.prototype.bindSamplers=function(l){this._currentEffect=null},g.prototype.enableEffect=function(l){this._currentEffect=l,l.onBind&&l.onBind(l),l._onBindObservable&&l._onBindObservable.notifyObservers(l)},g.prototype.setState=function(l,h,v,E){},g.prototype.setIntArray=function(l,h){return!0},g.prototype.setIntArray2=function(l,h){return!0},g.prototype.setIntArray3=function(l,h){return!0},g.prototype.setIntArray4=function(l,h){return!0},g.prototype.setFloatArray=function(l,h){return!0},g.prototype.setFloatArray2=function(l,h){return!0},g.prototype.setFloatArray3=function(l,h){return!0},g.prototype.setFloatArray4=function(l,h){return!0},g.prototype.setArray=function(l,h){return!0},g.prototype.setArray2=function(l,h){return!0},g.prototype.setArray3=function(l,h){return!0},g.prototype.setArray4=function(l,h){return!0},g.prototype.setMatrices=function(l,h){return!0},g.prototype.setMatrix3x3=function(l,h){return!0},g.prototype.setMatrix2x2=function(l,h){return!0},g.prototype.setFloat=function(l,h){return!0},g.prototype.setFloat2=function(l,h,v){return!0},g.prototype.setFloat3=function(l,h,v,E){return!0},g.prototype.setBool=function(l,h){return!0},g.prototype.setFloat4=function(l,h,v,E,D){return!0},g.prototype.setAlphaMode=function(l,h){h===void 0&&(h=!1),this._alphaMode!==l&&(this.alphaState.alphaBlend=l!==P.a.ALPHA_DISABLE,h||this.setDepthWrite(l===P.a.ALPHA_DISABLE),this._alphaMode=l)},g.prototype.bindBuffers=function(l,h,v){},g.prototype.wipeCaches=function(l){this.preventCacheWipeBetweenFrames||(this.resetTextureCache(),this._currentEffect=null,l&&(this._currentProgram=null,this.stencilState.reset(),this.depthCullingState.reset(),this.alphaState.reset()),this._cachedVertexBuffers=null,this._cachedIndexBuffer=null,this._cachedEffectForVertexBuffers=null)},g.prototype.draw=function(l,h,v,E){},g.prototype.drawElementsType=function(l,h,v,E){},g.prototype.drawArraysType=function(l,h,v,E){},g.prototype._createTexture=function(){return{}},g.prototype._releaseTexture=function(l){},g.prototype.createTexture=function(l,h,v,E,D,w,N,I,V,X,j,ne){D===void 0&&(D=P.a.TEXTURE_TRILINEAR_SAMPLINGMODE),w===void 0&&(w=null),X===void 0&&(X=null);var te=new C.a(this,C.b.Url),de=String(l);return te.url=de,te.generateMipMaps=!h,te.samplingMode=D,te.invertY=v,te.baseWidth=this._options.textureSize,te.baseHeight=this._options.textureSize,te.width=this._options.textureSize,te.height=this._options.textureSize,X&&(te.format=X),te.isReady=!0,w&&w(),this._internalTexturesCache.push(te),te},g.prototype.createRenderTargetTexture=function(l,h){var v=new M.a;h!==void 0&&typeof h=="object"?(v.generateMipMaps=h.generateMipMaps,v.generateDepthBuffer=h.generateDepthBuffer===void 0||h.generateDepthBuffer,v.generateStencilBuffer=v.generateDepthBuffer&&h.generateStencilBuffer,v.type=h.type===void 0?P.a.TEXTURETYPE_UNSIGNED_INT:h.type,v.samplingMode=h.samplingMode===void 0?P.a.TEXTURE_TRILINEAR_SAMPLINGMODE:h.samplingMode):(v.generateMipMaps=h,v.generateDepthBuffer=!0,v.generateStencilBuffer=!1,v.type=P.a.TEXTURETYPE_UNSIGNED_INT,v.samplingMode=P.a.TEXTURE_TRILINEAR_SAMPLINGMODE);var E=new C.a(this,C.b.RenderTarget),D=l.width||l,w=l.height||l;return E._depthStencilBuffer={},E._framebuffer={},E.baseWidth=D,E.baseHeight=w,E.width=D,E.height=w,E.isReady=!0,E.samples=1,E.generateMipMaps=!!v.generateMipMaps,E.samplingMode=v.samplingMode,E.type=v.type,E._generateDepthBuffer=v.generateDepthBuffer,E._generateStencilBuffer=!!v.generateStencilBuffer,this._internalTexturesCache.push(E),E},g.prototype.updateTextureSamplingMode=function(l,h){h.samplingMode=l},g.prototype.bindFramebuffer=function(l,h,v,E,D){this._currentRenderTarget&&this.unBindFramebuffer(this._currentRenderTarget),this._currentRenderTarget=l,this._currentFramebuffer=l._MSAAFramebuffer?l._MSAAFramebuffer:l._framebuffer,this._cachedViewport&&!D&&this.setViewport(this._cachedViewport,v,E)},g.prototype.unBindFramebuffer=function(l,h,v){this._currentRenderTarget=null,v&&(l._MSAAFramebuffer&&(this._currentFramebuffer=l._framebuffer),v()),this._currentFramebuffer=null},g.prototype.createDynamicVertexBuffer=function(l){var h=new m.a;return h.references=1,h.capacity=1,h},g.prototype.updateDynamicTexture=function(l,h,v,E,D){},g.prototype.areAllEffectsReady=function(){return!0},g.prototype.getError=function(){return 0},g.prototype._getUnpackAlignement=function(){return 1},g.prototype._unpackFlipY=function(l){},g.prototype.updateDynamicIndexBuffer=function(l,h,v){},g.prototype.updateDynamicVertexBuffer=function(l,h,v,E){},g.prototype._bindTextureDirectly=function(l,h){return this._boundTexturesCache[this._activeChannel]!==h&&(this._boundTexturesCache[this._activeChannel]=h,!0)},g.prototype._bindTexture=function(l,h){l<0||this._bindTextureDirectly(0,h)},g.prototype._deleteBuffer=function(l){},g.prototype.releaseEffects=function(){},g.prototype.displayLoadingUI=function(){},g.prototype.hideLoadingUI=function(){},g.prototype._uploadCompressedDataToTextureDirectly=function(l,h,v,E,D,w,N){},g.prototype._uploadDataToTextureDirectly=function(l,h,v,E){},g.prototype._uploadArrayBufferViewToTexture=function(l,h,v,E){},g.prototype._uploadImageToTexture=function(l,h,v,E){},g}(u.a)}).call(this,f(159))},function(Ie,y,f){f.r(y),function(U){f.d(y,"Debug",function(){return m});var _=f(127),R=f(99);f.d(y,"AbstractScene",function(){return _.AbstractScene}),f.d(y,"AbstractActionManager",function(){return _.AbstractActionManager}),f.d(y,"Action",function(){return _.Action}),f.d(y,"ActionEvent",function(){return _.ActionEvent}),f.d(y,"ActionManager",function(){return _.ActionManager}),f.d(y,"Condition",function(){return _.Condition}),f.d(y,"ValueCondition",function(){return _.ValueCondition}),f.d(y,"PredicateCondition",function(){return _.PredicateCondition}),f.d(y,"StateCondition",function(){return _.StateCondition}),f.d(y,"SwitchBooleanAction",function(){return _.SwitchBooleanAction}),f.d(y,"SetStateAction",function(){return _.SetStateAction}),f.d(y,"SetValueAction",function(){return _.SetValueAction}),f.d(y,"IncrementValueAction",function(){return _.IncrementValueAction}),f.d(y,"PlayAnimationAction",function(){return _.PlayAnimationAction}),f.d(y,"StopAnimationAction",function(){return _.StopAnimationAction}),f.d(y,"DoNothingAction",function(){return _.DoNothingAction}),f.d(y,"CombineAction",function(){return _.CombineAction}),f.d(y,"ExecuteCodeAction",function(){return _.ExecuteCodeAction}),f.d(y,"SetParentAction",function(){return _.SetParentAction}),f.d(y,"PlaySoundAction",function(){return _.PlaySoundAction}),f.d(y,"StopSoundAction",function(){return _.StopSoundAction}),f.d(y,"InterpolateValueAction",function(){return _.InterpolateValueAction}),f.d(y,"Animatable",function(){return _.Animatable}),f.d(y,"_IAnimationState",function(){return _._IAnimationState}),f.d(y,"Animation",function(){return _.Animation}),f.d(y,"TargetedAnimation",function(){return _.TargetedAnimation}),f.d(y,"AnimationGroup",function(){return _.AnimationGroup}),f.d(y,"AnimationPropertiesOverride",function(){return _.AnimationPropertiesOverride}),f.d(y,"EasingFunction",function(){return _.EasingFunction}),f.d(y,"CircleEase",function(){return _.CircleEase}),f.d(y,"BackEase",function(){return _.BackEase}),f.d(y,"BounceEase",function(){return _.BounceEase}),f.d(y,"CubicEase",function(){return _.CubicEase}),f.d(y,"ElasticEase",function(){return _.ElasticEase}),f.d(y,"ExponentialEase",function(){return _.ExponentialEase}),f.d(y,"PowerEase",function(){return _.PowerEase}),f.d(y,"QuadraticEase",function(){return _.QuadraticEase}),f.d(y,"QuarticEase",function(){return _.QuarticEase}),f.d(y,"QuinticEase",function(){return _.QuinticEase}),f.d(y,"SineEase",function(){return _.SineEase}),f.d(y,"BezierCurveEase",function(){return _.BezierCurveEase}),f.d(y,"RuntimeAnimation",function(){return _.RuntimeAnimation}),f.d(y,"AnimationEvent",function(){return _.AnimationEvent}),f.d(y,"AnimationKeyInterpolation",function(){return _.AnimationKeyInterpolation}),f.d(y,"AnimationRange",function(){return _.AnimationRange}),f.d(y,"KeepAssets",function(){return _.KeepAssets}),f.d(y,"InstantiatedEntries",function(){return _.InstantiatedEntries}),f.d(y,"AssetContainer",function(){return _.AssetContainer}),f.d(y,"Analyser",function(){return _.Analyser}),f.d(y,"AudioEngine",function(){return _.AudioEngine}),f.d(y,"AudioSceneComponent",function(){return _.AudioSceneComponent}),f.d(y,"Sound",function(){return _.Sound}),f.d(y,"SoundTrack",function(){return _.SoundTrack}),f.d(y,"WeightedSound",function(){return _.WeightedSound}),f.d(y,"AutoRotationBehavior",function(){return _.AutoRotationBehavior}),f.d(y,"BouncingBehavior",function(){return _.BouncingBehavior}),f.d(y,"FramingBehavior",function(){return _.FramingBehavior}),f.d(y,"AttachToBoxBehavior",function(){return _.AttachToBoxBehavior}),f.d(y,"FadeInOutBehavior",function(){return _.FadeInOutBehavior}),f.d(y,"MultiPointerScaleBehavior",function(){return _.MultiPointerScaleBehavior}),f.d(y,"PointerDragBehavior",function(){return _.PointerDragBehavior}),f.d(y,"SixDofDragBehavior",function(){return _.SixDofDragBehavior}),f.d(y,"Bone",function(){return _.Bone}),f.d(y,"BoneIKController",function(){return _.BoneIKController}),f.d(y,"BoneLookController",function(){return _.BoneLookController}),f.d(y,"Skeleton",function(){return _.Skeleton}),f.d(y,"ArcRotateCameraGamepadInput",function(){return _.ArcRotateCameraGamepadInput}),f.d(y,"ArcRotateCameraKeyboardMoveInput",function(){return _.ArcRotateCameraKeyboardMoveInput}),f.d(y,"ArcRotateCameraMouseWheelInput",function(){return _.ArcRotateCameraMouseWheelInput}),f.d(y,"ArcRotateCameraPointersInput",function(){return _.ArcRotateCameraPointersInput}),f.d(y,"ArcRotateCameraVRDeviceOrientationInput",function(){return _.ArcRotateCameraVRDeviceOrientationInput}),f.d(y,"FlyCameraKeyboardInput",function(){return _.FlyCameraKeyboardInput}),f.d(y,"FlyCameraMouseInput",function(){return _.FlyCameraMouseInput}),f.d(y,"FollowCameraKeyboardMoveInput",function(){return _.FollowCameraKeyboardMoveInput}),f.d(y,"FollowCameraMouseWheelInput",function(){return _.FollowCameraMouseWheelInput}),f.d(y,"FollowCameraPointersInput",function(){return _.FollowCameraPointersInput}),f.d(y,"FreeCameraDeviceOrientationInput",function(){return _.FreeCameraDeviceOrientationInput}),f.d(y,"FreeCameraGamepadInput",function(){return _.FreeCameraGamepadInput}),f.d(y,"FreeCameraKeyboardMoveInput",function(){return _.FreeCameraKeyboardMoveInput}),f.d(y,"FreeCameraMouseInput",function(){return _.FreeCameraMouseInput}),f.d(y,"FreeCameraMouseWheelInput",function(){return _.FreeCameraMouseWheelInput}),f.d(y,"FreeCameraTouchInput",function(){return _.FreeCameraTouchInput}),f.d(y,"FreeCameraVirtualJoystickInput",function(){return _.FreeCameraVirtualJoystickInput}),f.d(y,"CameraInputTypes",function(){return _.CameraInputTypes}),f.d(y,"CameraInputsManager",function(){return _.CameraInputsManager}),f.d(y,"Camera",function(){return _.Camera}),f.d(y,"TargetCamera",function(){return _.TargetCamera}),f.d(y,"FreeCamera",function(){return _.FreeCamera}),f.d(y,"FreeCameraInputsManager",function(){return _.FreeCameraInputsManager}),f.d(y,"TouchCamera",function(){return _.TouchCamera}),f.d(y,"ArcRotateCamera",function(){return _.ArcRotateCamera}),f.d(y,"ArcRotateCameraInputsManager",function(){return _.ArcRotateCameraInputsManager}),f.d(y,"DeviceOrientationCamera",function(){return _.DeviceOrientationCamera}),f.d(y,"FlyCamera",function(){return _.FlyCamera}),f.d(y,"FlyCameraInputsManager",function(){return _.FlyCameraInputsManager}),f.d(y,"FollowCamera",function(){return _.FollowCamera}),f.d(y,"ArcFollowCamera",function(){return _.ArcFollowCamera}),f.d(y,"FollowCameraInputsManager",function(){return _.FollowCameraInputsManager}),f.d(y,"GamepadCamera",function(){return _.GamepadCamera}),f.d(y,"AnaglyphArcRotateCamera",function(){return _.AnaglyphArcRotateCamera}),f.d(y,"AnaglyphFreeCamera",function(){return _.AnaglyphFreeCamera}),f.d(y,"AnaglyphGamepadCamera",function(){return _.AnaglyphGamepadCamera}),f.d(y,"AnaglyphUniversalCamera",function(){return _.AnaglyphUniversalCamera}),f.d(y,"StereoscopicArcRotateCamera",function(){return _.StereoscopicArcRotateCamera}),f.d(y,"StereoscopicFreeCamera",function(){return _.StereoscopicFreeCamera}),f.d(y,"StereoscopicGamepadCamera",function(){return _.StereoscopicGamepadCamera}),f.d(y,"StereoscopicUniversalCamera",function(){return _.StereoscopicUniversalCamera}),f.d(y,"UniversalCamera",function(){return _.UniversalCamera}),f.d(y,"VirtualJoysticksCamera",function(){return _.VirtualJoysticksCamera}),f.d(y,"VRCameraMetrics",function(){return _.VRCameraMetrics}),f.d(y,"VRDeviceOrientationArcRotateCamera",function(){return _.VRDeviceOrientationArcRotateCamera}),f.d(y,"VRDeviceOrientationFreeCamera",function(){return _.VRDeviceOrientationFreeCamera}),f.d(y,"VRDeviceOrientationGamepadCamera",function(){return _.VRDeviceOrientationGamepadCamera}),f.d(y,"OnAfterEnteringVRObservableEvent",function(){return _.OnAfterEnteringVRObservableEvent}),f.d(y,"VRExperienceHelper",function(){return _.VRExperienceHelper}),f.d(y,"WebVRFreeCamera",function(){return _.WebVRFreeCamera}),f.d(y,"Collider",function(){return _.Collider}),f.d(y,"DefaultCollisionCoordinator",function(){return _.DefaultCollisionCoordinator}),f.d(y,"PickingInfo",function(){return _.PickingInfo}),f.d(y,"IntersectionInfo",function(){return _.IntersectionInfo}),f.d(y,"_MeshCollisionData",function(){return _._MeshCollisionData}),f.d(y,"BoundingBox",function(){return _.BoundingBox}),f.d(y,"BoundingInfo",function(){return _.BoundingInfo}),f.d(y,"BoundingSphere",function(){return _.BoundingSphere}),f.d(y,"Octree",function(){return _.Octree}),f.d(y,"OctreeBlock",function(){return _.OctreeBlock}),f.d(y,"OctreeSceneComponent",function(){return _.OctreeSceneComponent}),f.d(y,"Ray",function(){return _.Ray}),f.d(y,"AxesViewer",function(){return _.AxesViewer}),f.d(y,"BoneAxesViewer",function(){return _.BoneAxesViewer}),f.d(y,"DebugLayerTab",function(){return _.DebugLayerTab}),f.d(y,"DebugLayer",function(){return _.DebugLayer}),f.d(y,"PhysicsViewer",function(){return _.PhysicsViewer}),f.d(y,"RayHelper",function(){return _.RayHelper}),f.d(y,"SkeletonViewer",function(){return _.SkeletonViewer}),f.d(y,"DeviceInputSystem",function(){return _.DeviceInputSystem}),f.d(y,"DeviceType",function(){return _.DeviceType}),f.d(y,"PointerInput",function(){return _.PointerInput}),f.d(y,"DualShockInput",function(){return _.DualShockInput}),f.d(y,"XboxInput",function(){return _.XboxInput}),f.d(y,"SwitchInput",function(){return _.SwitchInput}),f.d(y,"DeviceSource",function(){return _.DeviceSource}),f.d(y,"DeviceSourceManager",function(){return _.DeviceSourceManager}),f.d(y,"Constants",function(){return _.Constants}),f.d(y,"ThinEngine",function(){return _.ThinEngine}),f.d(y,"Engine",function(){return _.Engine}),f.d(y,"EngineStore",function(){return _.EngineStore}),f.d(y,"NullEngineOptions",function(){return _.NullEngineOptions}),f.d(y,"NullEngine",function(){return _.NullEngine}),f.d(y,"_OcclusionDataStorage",function(){return _._OcclusionDataStorage}),f.d(y,"_forceTransformFeedbackToBundle",function(){return _._forceTransformFeedbackToBundle}),f.d(y,"EngineView",function(){return _.EngineView}),f.d(y,"WebGLPipelineContext",function(){return _.WebGLPipelineContext}),f.d(y,"WebGL2ShaderProcessor",function(){return _.WebGL2ShaderProcessor}),f.d(y,"NativeEngine",function(){return _.NativeEngine}),f.d(y,"ShaderCodeInliner",function(){return _.ShaderCodeInliner}),f.d(y,"PerformanceConfigurator",function(){return _.PerformanceConfigurator}),f.d(y,"KeyboardEventTypes",function(){return _.KeyboardEventTypes}),f.d(y,"KeyboardInfo",function(){return _.KeyboardInfo}),f.d(y,"KeyboardInfoPre",function(){return _.KeyboardInfoPre}),f.d(y,"PointerEventTypes",function(){return _.PointerEventTypes}),f.d(y,"PointerInfoBase",function(){return _.PointerInfoBase}),f.d(y,"PointerInfoPre",function(){return _.PointerInfoPre}),f.d(y,"PointerInfo",function(){return _.PointerInfo}),f.d(y,"ClipboardEventTypes",function(){return _.ClipboardEventTypes}),f.d(y,"ClipboardInfo",function(){return _.ClipboardInfo}),f.d(y,"DaydreamController",function(){return _.DaydreamController}),f.d(y,"GearVRController",function(){return _.GearVRController}),f.d(y,"GenericController",function(){return _.GenericController}),f.d(y,"OculusTouchController",function(){return _.OculusTouchController}),f.d(y,"PoseEnabledControllerType",function(){return _.PoseEnabledControllerType}),f.d(y,"PoseEnabledControllerHelper",function(){return _.PoseEnabledControllerHelper}),f.d(y,"PoseEnabledController",function(){return _.PoseEnabledController}),f.d(y,"ViveController",function(){return _.ViveController}),f.d(y,"WebVRController",function(){return _.WebVRController}),f.d(y,"WindowsMotionController",function(){return _.WindowsMotionController}),f.d(y,"XRWindowsMotionController",function(){return _.XRWindowsMotionController}),f.d(y,"StickValues",function(){return _.StickValues}),f.d(y,"Gamepad",function(){return _.Gamepad}),f.d(y,"GenericPad",function(){return _.GenericPad}),f.d(y,"GamepadManager",function(){return _.GamepadManager}),f.d(y,"GamepadSystemSceneComponent",function(){return _.GamepadSystemSceneComponent}),f.d(y,"Xbox360Button",function(){return _.Xbox360Button}),f.d(y,"Xbox360Dpad",function(){return _.Xbox360Dpad}),f.d(y,"Xbox360Pad",function(){return _.Xbox360Pad}),f.d(y,"DualShockButton",function(){return _.DualShockButton}),f.d(y,"DualShockDpad",function(){return _.DualShockDpad}),f.d(y,"DualShockPad",function(){return _.DualShockPad}),f.d(y,"AxisDragGizmo",function(){return _.AxisDragGizmo}),f.d(y,"AxisScaleGizmo",function(){return _.AxisScaleGizmo}),f.d(y,"BoundingBoxGizmo",function(){return _.BoundingBoxGizmo}),f.d(y,"Gizmo",function(){return _.Gizmo}),f.d(y,"GizmoManager",function(){return _.GizmoManager}),f.d(y,"PlaneRotationGizmo",function(){return _.PlaneRotationGizmo}),f.d(y,"PositionGizmo",function(){return _.PositionGizmo}),f.d(y,"RotationGizmo",function(){return _.RotationGizmo}),f.d(y,"ScaleGizmo",function(){return _.ScaleGizmo}),f.d(y,"LightGizmo",function(){return _.LightGizmo}),f.d(y,"CameraGizmo",function(){return _.CameraGizmo}),f.d(y,"PlaneDragGizmo",function(){return _.PlaneDragGizmo}),f.d(y,"EnvironmentHelper",function(){return _.EnvironmentHelper}),f.d(y,"PhotoDome",function(){return _.PhotoDome}),f.d(y,"_forceSceneHelpersToBundle",function(){return _._forceSceneHelpersToBundle}),f.d(y,"VideoDome",function(){return _.VideoDome}),f.d(y,"EngineInstrumentation",function(){return _.EngineInstrumentation}),f.d(y,"SceneInstrumentation",function(){return _.SceneInstrumentation}),f.d(y,"_TimeToken",function(){return _._TimeToken}),f.d(y,"EffectLayer",function(){return _.EffectLayer}),f.d(y,"EffectLayerSceneComponent",function(){return _.EffectLayerSceneComponent}),f.d(y,"GlowLayer",function(){return _.GlowLayer}),f.d(y,"HighlightLayer",function(){return _.HighlightLayer}),f.d(y,"Layer",function(){return _.Layer}),f.d(y,"LayerSceneComponent",function(){return _.LayerSceneComponent}),f.d(y,"LensFlare",function(){return _.LensFlare}),f.d(y,"LensFlareSystem",function(){return _.LensFlareSystem}),f.d(y,"LensFlareSystemSceneComponent",function(){return _.LensFlareSystemSceneComponent}),f.d(y,"Light",function(){return _.Light}),f.d(y,"ShadowLight",function(){return _.ShadowLight}),f.d(y,"ShadowGenerator",function(){return _.ShadowGenerator}),f.d(y,"CascadedShadowGenerator",function(){return _.CascadedShadowGenerator}),f.d(y,"ShadowGeneratorSceneComponent",function(){return _.ShadowGeneratorSceneComponent}),f.d(y,"DirectionalLight",function(){return _.DirectionalLight}),f.d(y,"HemisphericLight",function(){return _.HemisphericLight}),f.d(y,"PointLight",function(){return _.PointLight}),f.d(y,"SpotLight",function(){return _.SpotLight}),f.d(y,"DefaultLoadingScreen",function(){return _.DefaultLoadingScreen}),f.d(y,"_BabylonLoaderRegistered",function(){return _._BabylonLoaderRegistered}),f.d(y,"BabylonFileLoaderConfiguration",function(){return _.BabylonFileLoaderConfiguration}),f.d(y,"SceneLoaderAnimationGroupLoadingMode",function(){return _.SceneLoaderAnimationGroupLoadingMode}),f.d(y,"SceneLoader",function(){return _.SceneLoader}),f.d(y,"SceneLoaderFlags",function(){return _.SceneLoaderFlags}),f.d(y,"BackgroundMaterial",function(){return _.BackgroundMaterial}),f.d(y,"ColorCurves",function(){return _.ColorCurves}),f.d(y,"EffectFallbacks",function(){return _.EffectFallbacks}),f.d(y,"Effect",function(){return _.Effect}),f.d(y,"FresnelParameters",function(){return _.FresnelParameters}),f.d(y,"ImageProcessingConfigurationDefines",function(){return _.ImageProcessingConfigurationDefines}),f.d(y,"ImageProcessingConfiguration",function(){return _.ImageProcessingConfiguration}),f.d(y,"Material",function(){return _.Material}),f.d(y,"MaterialDefines",function(){return _.MaterialDefines}),f.d(y,"ThinMaterialHelper",function(){return _.ThinMaterialHelper}),f.d(y,"MaterialHelper",function(){return _.MaterialHelper}),f.d(y,"MultiMaterial",function(){return _.MultiMaterial}),f.d(y,"PBRMaterialDefines",function(){return _.PBRMaterialDefines}),f.d(y,"PBRBaseMaterial",function(){return _.PBRBaseMaterial}),f.d(y,"PBRBaseSimpleMaterial",function(){return _.PBRBaseSimpleMaterial}),f.d(y,"PBRMaterial",function(){return _.PBRMaterial}),f.d(y,"PBRMetallicRoughnessMaterial",function(){return _.PBRMetallicRoughnessMaterial}),f.d(y,"PBRSpecularGlossinessMaterial",function(){return _.PBRSpecularGlossinessMaterial}),f.d(y,"PushMaterial",function(){return _.PushMaterial}),f.d(y,"ShaderMaterial",function(){return _.ShaderMaterial}),f.d(y,"StandardMaterialDefines",function(){return _.StandardMaterialDefines}),f.d(y,"StandardMaterial",function(){return _.StandardMaterial}),f.d(y,"BaseTexture",function(){return _.BaseTexture}),f.d(y,"ColorGradingTexture",function(){return _.ColorGradingTexture}),f.d(y,"CubeTexture",function(){return _.CubeTexture}),f.d(y,"DynamicTexture",function(){return _.DynamicTexture}),f.d(y,"EquiRectangularCubeTexture",function(){return _.EquiRectangularCubeTexture}),f.d(y,"HDRFiltering",function(){return _.HDRFiltering}),f.d(y,"HDRCubeTexture",function(){return _.HDRCubeTexture}),f.d(y,"HtmlElementTexture",function(){return _.HtmlElementTexture}),f.d(y,"InternalTextureSource",function(){return _.InternalTextureSource}),f.d(y,"InternalTexture",function(){return _.InternalTexture}),f.d(y,"_DDSTextureLoader",function(){return _._DDSTextureLoader}),f.d(y,"_ENVTextureLoader",function(){return _._ENVTextureLoader}),f.d(y,"_KTXTextureLoader",function(){return _._KTXTextureLoader}),f.d(y,"_TGATextureLoader",function(){return _._TGATextureLoader}),f.d(y,"_BasisTextureLoader",function(){return _._BasisTextureLoader}),f.d(y,"MirrorTexture",function(){return _.MirrorTexture}),f.d(y,"MultiRenderTarget",function(){return _.MultiRenderTarget}),f.d(y,"TexturePacker",function(){return _.TexturePacker}),f.d(y,"TexturePackerFrame",function(){return _.TexturePackerFrame}),f.d(y,"CustomProceduralTexture",function(){return _.CustomProceduralTexture}),f.d(y,"NoiseProceduralTexture",function(){return _.NoiseProceduralTexture}),f.d(y,"ProceduralTexture",function(){return _.ProceduralTexture}),f.d(y,"ProceduralTextureSceneComponent",function(){return _.ProceduralTextureSceneComponent}),f.d(y,"RawCubeTexture",function(){return _.RawCubeTexture}),f.d(y,"RawTexture",function(){return _.RawTexture}),f.d(y,"RawTexture2DArray",function(){return _.RawTexture2DArray}),f.d(y,"RawTexture3D",function(){return _.RawTexture3D}),f.d(y,"RefractionTexture",function(){return _.RefractionTexture}),f.d(y,"RenderTargetTexture",function(){return _.RenderTargetTexture}),f.d(y,"Texture",function(){return _.Texture}),f.d(y,"VideoTexture",function(){return _.VideoTexture}),f.d(y,"UniformBuffer",function(){return _.UniformBuffer}),f.d(y,"MaterialFlags",function(){return _.MaterialFlags}),f.d(y,"NodeMaterialBlockTargets",function(){return _.NodeMaterialBlockTargets}),f.d(y,"NodeMaterialBlockConnectionPointTypes",function(){return _.NodeMaterialBlockConnectionPointTypes}),f.d(y,"NodeMaterialBlockConnectionPointMode",function(){return _.NodeMaterialBlockConnectionPointMode}),f.d(y,"NodeMaterialSystemValues",function(){return _.NodeMaterialSystemValues}),f.d(y,"NodeMaterialModes",function(){return _.NodeMaterialModes}),f.d(y,"NodeMaterialConnectionPointCompatibilityStates",function(){return _.NodeMaterialConnectionPointCompatibilityStates}),f.d(y,"NodeMaterialConnectionPointDirection",function(){return _.NodeMaterialConnectionPointDirection}),f.d(y,"NodeMaterialConnectionPoint",function(){return _.NodeMaterialConnectionPoint}),f.d(y,"NodeMaterialBlock",function(){return _.NodeMaterialBlock}),f.d(y,"NodeMaterialDefines",function(){return _.NodeMaterialDefines}),f.d(y,"NodeMaterial",function(){return _.NodeMaterial}),f.d(y,"VertexOutputBlock",function(){return _.VertexOutputBlock}),f.d(y,"BonesBlock",function(){return _.BonesBlock}),f.d(y,"InstancesBlock",function(){return _.InstancesBlock}),f.d(y,"MorphTargetsBlock",function(){return _.MorphTargetsBlock}),f.d(y,"LightInformationBlock",function(){return _.LightInformationBlock}),f.d(y,"FragmentOutputBlock",function(){return _.FragmentOutputBlock}),f.d(y,"ImageProcessingBlock",function(){return _.ImageProcessingBlock}),f.d(y,"PerturbNormalBlock",function(){return _.PerturbNormalBlock}),f.d(y,"DiscardBlock",function(){return _.DiscardBlock}),f.d(y,"FrontFacingBlock",function(){return _.FrontFacingBlock}),f.d(y,"DerivativeBlock",function(){return _.DerivativeBlock}),f.d(y,"FragCoordBlock",function(){return _.FragCoordBlock}),f.d(y,"ScreenSizeBlock",function(){return _.ScreenSizeBlock}),f.d(y,"FogBlock",function(){return _.FogBlock}),f.d(y,"LightBlock",function(){return _.LightBlock}),f.d(y,"TextureBlock",function(){return _.TextureBlock}),f.d(y,"ReflectionTextureBlock",function(){return _.ReflectionTextureBlock}),f.d(y,"CurrentScreenBlock",function(){return _.CurrentScreenBlock}),f.d(y,"InputBlock",function(){return _.InputBlock}),f.d(y,"AnimatedInputBlockTypes",function(){return _.AnimatedInputBlockTypes}),f.d(y,"MultiplyBlock",function(){return _.MultiplyBlock}),f.d(y,"AddBlock",function(){return _.AddBlock}),f.d(y,"ScaleBlock",function(){return _.ScaleBlock}),f.d(y,"ClampBlock",function(){return _.ClampBlock}),f.d(y,"CrossBlock",function(){return _.CrossBlock}),f.d(y,"DotBlock",function(){return _.DotBlock}),f.d(y,"TransformBlock",function(){return _.TransformBlock}),f.d(y,"RemapBlock",function(){return _.RemapBlock}),f.d(y,"NormalizeBlock",function(){return _.NormalizeBlock}),f.d(y,"TrigonometryBlockOperations",function(){return _.TrigonometryBlockOperations}),f.d(y,"TrigonometryBlock",function(){return _.TrigonometryBlock}),f.d(y,"ColorMergerBlock",function(){return _.ColorMergerBlock}),f.d(y,"VectorMergerBlock",function(){return _.VectorMergerBlock}),f.d(y,"ColorSplitterBlock",function(){return _.ColorSplitterBlock}),f.d(y,"VectorSplitterBlock",function(){return _.VectorSplitterBlock}),f.d(y,"LerpBlock",function(){return _.LerpBlock}),f.d(y,"DivideBlock",function(){return _.DivideBlock}),f.d(y,"SubtractBlock",function(){return _.SubtractBlock}),f.d(y,"StepBlock",function(){return _.StepBlock}),f.d(y,"OneMinusBlock",function(){return _.OneMinusBlock}),f.d(y,"ViewDirectionBlock",function(){return _.ViewDirectionBlock}),f.d(y,"FresnelBlock",function(){return _.FresnelBlock}),f.d(y,"MaxBlock",function(){return _.MaxBlock}),f.d(y,"MinBlock",function(){return _.MinBlock}),f.d(y,"DistanceBlock",function(){return _.DistanceBlock}),f.d(y,"LengthBlock",function(){return _.LengthBlock}),f.d(y,"NegateBlock",function(){return _.NegateBlock}),f.d(y,"PowBlock",function(){return _.PowBlock}),f.d(y,"RandomNumberBlock",function(){return _.RandomNumberBlock}),f.d(y,"ArcTan2Block",function(){return _.ArcTan2Block}),f.d(y,"SmoothStepBlock",function(){return _.SmoothStepBlock}),f.d(y,"ReciprocalBlock",function(){return _.ReciprocalBlock}),f.d(y,"ReplaceColorBlock",function(){return _.ReplaceColorBlock}),f.d(y,"PosterizeBlock",function(){return _.PosterizeBlock}),f.d(y,"WaveBlockKind",function(){return _.WaveBlockKind}),f.d(y,"WaveBlock",function(){return _.WaveBlock}),f.d(y,"GradientBlockColorStep",function(){return _.GradientBlockColorStep}),f.d(y,"GradientBlock",function(){return _.GradientBlock}),f.d(y,"NLerpBlock",function(){return _.NLerpBlock}),f.d(y,"WorleyNoise3DBlock",function(){return _.WorleyNoise3DBlock}),f.d(y,"SimplexPerlin3DBlock",function(){return _.SimplexPerlin3DBlock}),f.d(y,"NormalBlendBlock",function(){return _.NormalBlendBlock}),f.d(y,"Rotate2dBlock",function(){return _.Rotate2dBlock}),f.d(y,"ReflectBlock",function(){return _.ReflectBlock}),f.d(y,"RefractBlock",function(){return _.RefractBlock}),f.d(y,"DesaturateBlock",function(){return _.DesaturateBlock}),f.d(y,"PBRMetallicRoughnessBlock",function(){return _.PBRMetallicRoughnessBlock}),f.d(y,"SheenBlock",function(){return _.SheenBlock}),f.d(y,"AnisotropyBlock",function(){return _.AnisotropyBlock}),f.d(y,"ReflectionBlock",function(){return _.ReflectionBlock}),f.d(y,"ClearCoatBlock",function(){return _.ClearCoatBlock}),f.d(y,"RefractionBlock",function(){return _.RefractionBlock}),f.d(y,"SubSurfaceBlock",function(){return _.SubSurfaceBlock}),f.d(y,"ParticleTextureBlock",function(){return _.ParticleTextureBlock}),f.d(y,"ParticleRampGradientBlock",function(){return _.ParticleRampGradientBlock}),f.d(y,"ParticleBlendMultiplyBlock",function(){return _.ParticleBlendMultiplyBlock}),f.d(y,"ModBlock",function(){return _.ModBlock}),f.d(y,"NodeMaterialOptimizer",function(){return _.NodeMaterialOptimizer}),f.d(y,"PropertyTypeForEdition",function(){return _.PropertyTypeForEdition}),f.d(y,"editableInPropertyPage",function(){return _.editableInPropertyPage}),f.d(y,"EffectRenderer",function(){return _.EffectRenderer}),f.d(y,"EffectWrapper",function(){return _.EffectWrapper}),f.d(y,"ShadowDepthWrapper",function(){return _.ShadowDepthWrapper}),f.d(y,"Scalar",function(){return _.Scalar}),f.d(y,"extractMinAndMaxIndexed",function(){return _.extractMinAndMaxIndexed}),f.d(y,"extractMinAndMax",function(){return _.extractMinAndMax}),f.d(y,"Space",function(){return _.Space}),f.d(y,"Axis",function(){return _.Axis}),f.d(y,"Coordinate",function(){return _.Coordinate}),f.d(y,"Color3",function(){return _.Color3}),f.d(y,"Color4",function(){return _.Color4}),f.d(y,"TmpColors",function(){return _.TmpColors}),f.d(y,"ToGammaSpace",function(){return _.ToGammaSpace}),f.d(y,"ToLinearSpace",function(){return _.ToLinearSpace}),f.d(y,"Epsilon",function(){return _.Epsilon}),f.d(y,"Frustum",function(){return _.Frustum}),f.d(y,"Orientation",function(){return _.Orientation}),f.d(y,"BezierCurve",function(){return _.BezierCurve}),f.d(y,"Angle",function(){return _.Angle}),f.d(y,"Arc2",function(){return _.Arc2}),f.d(y,"Path2",function(){return _.Path2}),f.d(y,"Path3D",function(){return _.Path3D}),f.d(y,"Curve3",function(){return _.Curve3}),f.d(y,"Plane",function(){return _.Plane}),f.d(y,"Size",function(){return _.Size}),f.d(y,"Vector2",function(){return _.Vector2}),f.d(y,"Vector3",function(){return _.Vector3}),f.d(y,"Vector4",function(){return _.Vector4}),f.d(y,"Quaternion",function(){return _.Quaternion}),f.d(y,"Matrix",function(){return _.Matrix}),f.d(y,"TmpVectors",function(){return _.TmpVectors}),f.d(y,"PositionNormalVertex",function(){return _.PositionNormalVertex}),f.d(y,"PositionNormalTextureVertex",function(){return _.PositionNormalTextureVertex}),f.d(y,"Viewport",function(){return _.Viewport}),f.d(y,"SphericalHarmonics",function(){return _.SphericalHarmonics}),f.d(y,"SphericalPolynomial",function(){return _.SphericalPolynomial}),f.d(y,"AbstractMesh",function(){return _.AbstractMesh}),f.d(y,"Buffer",function(){return _.Buffer}),f.d(y,"VertexBuffer",function(){return _.VertexBuffer}),f.d(y,"DracoCompression",function(){return _.DracoCompression}),f.d(y,"CSG",function(){return _.CSG}),f.d(y,"Geometry",function(){return _.Geometry}),f.d(y,"GroundMesh",function(){return _.GroundMesh}),f.d(y,"TrailMesh",function(){return _.TrailMesh}),f.d(y,"InstancedMesh",function(){return _.InstancedMesh}),f.d(y,"LinesMesh",function(){return _.LinesMesh}),f.d(y,"InstancedLinesMesh",function(){return _.InstancedLinesMesh}),f.d(y,"_CreationDataStorage",function(){return _._CreationDataStorage}),f.d(y,"_InstancesBatch",function(){return _._InstancesBatch}),f.d(y,"Mesh",function(){return _.Mesh}),f.d(y,"VertexData",function(){return _.VertexData}),f.d(y,"MeshBuilder",function(){return _.MeshBuilder}),f.d(y,"SimplificationSettings",function(){return _.SimplificationSettings}),f.d(y,"SimplificationQueue",function(){return _.SimplificationQueue}),f.d(y,"SimplificationType",function(){return _.SimplificationType}),f.d(y,"QuadraticErrorSimplification",function(){return _.QuadraticErrorSimplification}),f.d(y,"SimplicationQueueSceneComponent",function(){return _.SimplicationQueueSceneComponent}),f.d(y,"Polygon",function(){return _.Polygon}),f.d(y,"PolygonMeshBuilder",function(){return _.PolygonMeshBuilder}),f.d(y,"SubMesh",function(){return _.SubMesh}),f.d(y,"MeshLODLevel",function(){return _.MeshLODLevel}),f.d(y,"TransformNode",function(){return _.TransformNode}),f.d(y,"BoxBuilder",function(){return _.BoxBuilder}),f.d(y,"TiledBoxBuilder",function(){return _.TiledBoxBuilder}),f.d(y,"DiscBuilder",function(){return _.DiscBuilder}),f.d(y,"RibbonBuilder",function(){return _.RibbonBuilder}),f.d(y,"SphereBuilder",function(){return _.SphereBuilder}),f.d(y,"HemisphereBuilder",function(){return _.HemisphereBuilder}),f.d(y,"CylinderBuilder",function(){return _.CylinderBuilder}),f.d(y,"TorusBuilder",function(){return _.TorusBuilder}),f.d(y,"TorusKnotBuilder",function(){return _.TorusKnotBuilder}),f.d(y,"LinesBuilder",function(){return _.LinesBuilder}),f.d(y,"PolygonBuilder",function(){return _.PolygonBuilder}),f.d(y,"ShapeBuilder",function(){return _.ShapeBuilder}),f.d(y,"LatheBuilder",function(){return _.LatheBuilder}),f.d(y,"PlaneBuilder",function(){return _.PlaneBuilder}),f.d(y,"TiledPlaneBuilder",function(){return _.TiledPlaneBuilder}),f.d(y,"GroundBuilder",function(){return _.GroundBuilder}),f.d(y,"TubeBuilder",function(){return _.TubeBuilder}),f.d(y,"PolyhedronBuilder",function(){return _.PolyhedronBuilder}),f.d(y,"IcoSphereBuilder",function(){return _.IcoSphereBuilder}),f.d(y,"DecalBuilder",function(){return _.DecalBuilder}),f.d(y,"CapsuleBuilder",function(){return _.CapsuleBuilder}),f.d(y,"DataBuffer",function(){return _.DataBuffer}),f.d(y,"WebGLDataBuffer",function(){return _.WebGLDataBuffer}),f.d(y,"MorphTarget",function(){return _.MorphTarget}),f.d(y,"MorphTargetManager",function(){return _.MorphTargetManager}),f.d(y,"RecastJSPlugin",function(){return _.RecastJSPlugin}),f.d(y,"RecastJSCrowd",function(){return _.RecastJSCrowd}),f.d(y,"Node",function(){return _.Node}),f.d(y,"Database",function(){return _.Database}),f.d(y,"BaseParticleSystem",function(){return _.BaseParticleSystem}),f.d(y,"BoxParticleEmitter",function(){return _.BoxParticleEmitter}),f.d(y,"ConeParticleEmitter",function(){return _.ConeParticleEmitter}),f.d(y,"CylinderParticleEmitter",function(){return _.CylinderParticleEmitter}),f.d(y,"CylinderDirectedParticleEmitter",function(){return _.CylinderDirectedParticleEmitter}),f.d(y,"HemisphericParticleEmitter",function(){return _.HemisphericParticleEmitter}),f.d(y,"PointParticleEmitter",function(){return _.PointParticleEmitter}),f.d(y,"SphereParticleEmitter",function(){return _.SphereParticleEmitter}),f.d(y,"SphereDirectedParticleEmitter",function(){return _.SphereDirectedParticleEmitter}),f.d(y,"CustomParticleEmitter",function(){return _.CustomParticleEmitter}),f.d(y,"MeshParticleEmitter",function(){return _.MeshParticleEmitter}),f.d(y,"GPUParticleSystem",function(){return _.GPUParticleSystem}),f.d(y,"Particle",function(){return _.Particle}),f.d(y,"ParticleHelper",function(){return _.ParticleHelper}),f.d(y,"ParticleSystem",function(){return _.ParticleSystem}),f.d(y,"ParticleSystemSet",function(){return _.ParticleSystemSet}),f.d(y,"SolidParticle",function(){return _.SolidParticle}),f.d(y,"ModelShape",function(){return _.ModelShape}),f.d(y,"DepthSortedParticle",function(){return _.DepthSortedParticle}),f.d(y,"SolidParticleVertex",function(){return _.SolidParticleVertex}),f.d(y,"SolidParticleSystem",function(){return _.SolidParticleSystem}),f.d(y,"CloudPoint",function(){return _.CloudPoint}),f.d(y,"PointsGroup",function(){return _.PointsGroup}),f.d(y,"PointColor",function(){return _.PointColor}),f.d(y,"PointsCloudSystem",function(){return _.PointsCloudSystem}),f.d(y,"SubEmitterType",function(){return _.SubEmitterType}),f.d(y,"SubEmitter",function(){return _.SubEmitter}),f.d(y,"PhysicsEngine",function(){return _.PhysicsEngine}),f.d(y,"PhysicsEngineSceneComponent",function(){return _.PhysicsEngineSceneComponent}),f.d(y,"PhysicsHelper",function(){return _.PhysicsHelper}),f.d(y,"PhysicsRadialExplosionEventOptions",function(){return _.PhysicsRadialExplosionEventOptions}),f.d(y,"PhysicsUpdraftEventOptions",function(){return _.PhysicsUpdraftEventOptions}),f.d(y,"PhysicsVortexEventOptions",function(){return _.PhysicsVortexEventOptions}),f.d(y,"PhysicsRadialImpulseFalloff",function(){return _.PhysicsRadialImpulseFalloff}),f.d(y,"PhysicsUpdraftMode",function(){return _.PhysicsUpdraftMode}),f.d(y,"PhysicsImpostor",function(){return _.PhysicsImpostor}),f.d(y,"PhysicsJoint",function(){return _.PhysicsJoint}),f.d(y,"DistanceJoint",function(){return _.DistanceJoint}),f.d(y,"MotorEnabledJoint",function(){return _.MotorEnabledJoint}),f.d(y,"HingeJoint",function(){return _.HingeJoint}),f.d(y,"Hinge2Joint",function(){return _.Hinge2Joint}),f.d(y,"CannonJSPlugin",function(){return _.CannonJSPlugin}),f.d(y,"AmmoJSPlugin",function(){return _.AmmoJSPlugin}),f.d(y,"OimoJSPlugin",function(){return _.OimoJSPlugin}),f.d(y,"AnaglyphPostProcess",function(){return _.AnaglyphPostProcess}),f.d(y,"BlackAndWhitePostProcess",function(){return _.BlackAndWhitePostProcess}),f.d(y,"BloomEffect",function(){return _.BloomEffect}),f.d(y,"BloomMergePostProcess",function(){return _.BloomMergePostProcess}),f.d(y,"BlurPostProcess",function(){return _.BlurPostProcess}),f.d(y,"ChromaticAberrationPostProcess",function(){return _.ChromaticAberrationPostProcess}),f.d(y,"CircleOfConfusionPostProcess",function(){return _.CircleOfConfusionPostProcess}),f.d(y,"ColorCorrectionPostProcess",function(){return _.ColorCorrectionPostProcess}),f.d(y,"ConvolutionPostProcess",function(){return _.ConvolutionPostProcess}),f.d(y,"DepthOfFieldBlurPostProcess",function(){return _.DepthOfFieldBlurPostProcess}),f.d(y,"DepthOfFieldEffectBlurLevel",function(){return _.DepthOfFieldEffectBlurLevel}),f.d(y,"DepthOfFieldEffect",function(){return _.DepthOfFieldEffect}),f.d(y,"DepthOfFieldMergePostProcessOptions",function(){return _.DepthOfFieldMergePostProcessOptions}),f.d(y,"DepthOfFieldMergePostProcess",function(){return _.DepthOfFieldMergePostProcess}),f.d(y,"DisplayPassPostProcess",function(){return _.DisplayPassPostProcess}),f.d(y,"ExtractHighlightsPostProcess",function(){return _.ExtractHighlightsPostProcess}),f.d(y,"FilterPostProcess",function(){return _.FilterPostProcess}),f.d(y,"FxaaPostProcess",function(){return _.FxaaPostProcess}),f.d(y,"GrainPostProcess",function(){return _.GrainPostProcess}),f.d(y,"HighlightsPostProcess",function(){return _.HighlightsPostProcess}),f.d(y,"ImageProcessingPostProcess",function(){return _.ImageProcessingPostProcess}),f.d(y,"MotionBlurPostProcess",function(){return _.MotionBlurPostProcess}),f.d(y,"PassPostProcess",function(){return _.PassPostProcess}),f.d(y,"PassCubePostProcess",function(){return _.PassCubePostProcess}),f.d(y,"PostProcess",function(){return _.PostProcess}),f.d(y,"PostProcessManager",function(){return _.PostProcessManager}),f.d(y,"RefractionPostProcess",function(){return _.RefractionPostProcess}),f.d(y,"DefaultRenderingPipeline",function(){return _.DefaultRenderingPipeline}),f.d(y,"LensRenderingPipeline",function(){return _.LensRenderingPipeline}),f.d(y,"SSAO2RenderingPipeline",function(){return _.SSAO2RenderingPipeline}),f.d(y,"SSAORenderingPipeline",function(){return _.SSAORenderingPipeline}),f.d(y,"StandardRenderingPipeline",function(){return _.StandardRenderingPipeline}),f.d(y,"PostProcessRenderEffect",function(){return _.PostProcessRenderEffect}),f.d(y,"PostProcessRenderPipeline",function(){return _.PostProcessRenderPipeline}),f.d(y,"PostProcessRenderPipelineManager",function(){return _.PostProcessRenderPipelineManager}),f.d(y,"PostProcessRenderPipelineManagerSceneComponent",function(){return _.PostProcessRenderPipelineManagerSceneComponent}),f.d(y,"SharpenPostProcess",function(){return _.SharpenPostProcess}),f.d(y,"StereoscopicInterlacePostProcessI",function(){return _.StereoscopicInterlacePostProcessI}),f.d(y,"StereoscopicInterlacePostProcess",function(){return _.StereoscopicInterlacePostProcess}),f.d(y,"TonemappingOperator",function(){return _.TonemappingOperator}),f.d(y,"TonemapPostProcess",function(){return _.TonemapPostProcess}),f.d(y,"VolumetricLightScatteringPostProcess",function(){return _.VolumetricLightScatteringPostProcess}),f.d(y,"VRDistortionCorrectionPostProcess",function(){return _.VRDistortionCorrectionPostProcess}),f.d(y,"VRMultiviewToSingleviewPostProcess",function(){return _.VRMultiviewToSingleviewPostProcess}),f.d(y,"ScreenSpaceReflectionPostProcess",function(){return _.ScreenSpaceReflectionPostProcess}),f.d(y,"ScreenSpaceCurvaturePostProcess",function(){return _.ScreenSpaceCurvaturePostProcess}),f.d(y,"ReflectionProbe",function(){return _.ReflectionProbe}),f.d(y,"BoundingBoxRenderer",function(){return _.BoundingBoxRenderer}),f.d(y,"DepthRenderer",function(){return _.DepthRenderer}),f.d(y,"DepthRendererSceneComponent",function(){return _.DepthRendererSceneComponent}),f.d(y,"EdgesRenderer",function(){return _.EdgesRenderer}),f.d(y,"LineEdgesRenderer",function(){return _.LineEdgesRenderer}),f.d(y,"GeometryBufferRenderer",function(){return _.GeometryBufferRenderer}),f.d(y,"GeometryBufferRendererSceneComponent",function(){return _.GeometryBufferRendererSceneComponent}),f.d(y,"PrePassRenderer",function(){return _.PrePassRenderer}),f.d(y,"PrePassRendererSceneComponent",function(){return _.PrePassRendererSceneComponent}),f.d(y,"SubSurfaceSceneComponent",function(){return _.SubSurfaceSceneComponent}),f.d(y,"OutlineRenderer",function(){return _.OutlineRenderer}),f.d(y,"RenderingGroup",function(){return _.RenderingGroup}),f.d(y,"RenderingGroupInfo",function(){return _.RenderingGroupInfo}),f.d(y,"RenderingManager",function(){return _.RenderingManager}),f.d(y,"UtilityLayerRenderer",function(){return _.UtilityLayerRenderer}),f.d(y,"Scene",function(){return _.Scene}),f.d(y,"SceneComponentConstants",function(){return _.SceneComponentConstants}),f.d(y,"Stage",function(){return _.Stage}),f.d(y,"Sprite",function(){return _.Sprite}),f.d(y,"SpriteManager",function(){return _.SpriteManager}),f.d(y,"SpriteMap",function(){return _.SpriteMap}),f.d(y,"SpritePackedManager",function(){return _.SpritePackedManager}),f.d(y,"SpriteSceneComponent",function(){return _.SpriteSceneComponent}),f.d(y,"AlphaState",function(){return _.AlphaState}),f.d(y,"DepthCullingState",function(){return _.DepthCullingState}),f.d(y,"StencilState",function(){return _.StencilState}),f.d(y,"AndOrNotEvaluator",function(){return _.AndOrNotEvaluator}),f.d(y,"AssetTaskState",function(){return _.AssetTaskState}),f.d(y,"AbstractAssetTask",function(){return _.AbstractAssetTask}),f.d(y,"AssetsProgressEvent",function(){return _.AssetsProgressEvent}),f.d(y,"ContainerAssetTask",function(){return _.ContainerAssetTask}),f.d(y,"MeshAssetTask",function(){return _.MeshAssetTask}),f.d(y,"TextFileAssetTask",function(){return _.TextFileAssetTask}),f.d(y,"BinaryFileAssetTask",function(){return _.BinaryFileAssetTask}),f.d(y,"ImageAssetTask",function(){return _.ImageAssetTask}),f.d(y,"TextureAssetTask",function(){return _.TextureAssetTask}),f.d(y,"CubeTextureAssetTask",function(){return _.CubeTextureAssetTask}),f.d(y,"HDRCubeTextureAssetTask",function(){return _.HDRCubeTextureAssetTask}),f.d(y,"EquiRectangularCubeTextureAssetTask",function(){return _.EquiRectangularCubeTextureAssetTask}),f.d(y,"AssetsManager",function(){return _.AssetsManager}),f.d(y,"BasisTranscodeConfiguration",function(){return _.BasisTranscodeConfiguration}),f.d(y,"BasisTools",function(){return _.BasisTools}),f.d(y,"DDSTools",function(){return _.DDSTools}),f.d(y,"expandToProperty",function(){return _.expandToProperty}),f.d(y,"serialize",function(){return _.serialize}),f.d(y,"serializeAsTexture",function(){return _.serializeAsTexture}),f.d(y,"serializeAsColor3",function(){return _.serializeAsColor3}),f.d(y,"serializeAsFresnelParameters",function(){return _.serializeAsFresnelParameters}),f.d(y,"serializeAsVector2",function(){return _.serializeAsVector2}),f.d(y,"serializeAsVector3",function(){return _.serializeAsVector3}),f.d(y,"serializeAsMeshReference",function(){return _.serializeAsMeshReference}),f.d(y,"serializeAsColorCurves",function(){return _.serializeAsColorCurves}),f.d(y,"serializeAsColor4",function(){return _.serializeAsColor4}),f.d(y,"serializeAsImageProcessingConfiguration",function(){return _.serializeAsImageProcessingConfiguration}),f.d(y,"serializeAsQuaternion",function(){return _.serializeAsQuaternion}),f.d(y,"serializeAsMatrix",function(){return _.serializeAsMatrix}),f.d(y,"serializeAsCameraReference",function(){return _.serializeAsCameraReference}),f.d(y,"SerializationHelper",function(){return _.SerializationHelper}),f.d(y,"Deferred",function(){return _.Deferred}),f.d(y,"EnvironmentTextureTools",function(){return _.EnvironmentTextureTools}),f.d(y,"MeshExploder",function(){return _.MeshExploder}),f.d(y,"FilesInput",function(){return _.FilesInput}),f.d(y,"CubeMapToSphericalPolynomialTools",function(){return _.CubeMapToSphericalPolynomialTools}),f.d(y,"HDRTools",function(){return _.HDRTools}),f.d(y,"PanoramaToCubeMapTools",function(){return _.PanoramaToCubeMapTools}),f.d(y,"KhronosTextureContainer",function(){return _.KhronosTextureContainer}),f.d(y,"EventState",function(){return _.EventState}),f.d(y,"Observer",function(){return _.Observer}),f.d(y,"MultiObserver",function(){return _.MultiObserver}),f.d(y,"Observable",function(){return _.Observable}),f.d(y,"PerformanceMonitor",function(){return _.PerformanceMonitor}),f.d(y,"RollingAverage",function(){return _.RollingAverage}),f.d(y,"PromisePolyfill",function(){return _.PromisePolyfill}),f.d(y,"SceneOptimization",function(){return _.SceneOptimization}),f.d(y,"TextureOptimization",function(){return _.TextureOptimization}),f.d(y,"HardwareScalingOptimization",function(){return _.HardwareScalingOptimization}),f.d(y,"ShadowsOptimization",function(){return _.ShadowsOptimization}),f.d(y,"PostProcessesOptimization",function(){return _.PostProcessesOptimization}),f.d(y,"LensFlaresOptimization",function(){return _.LensFlaresOptimization}),f.d(y,"CustomOptimization",function(){return _.CustomOptimization}),f.d(y,"ParticlesOptimization",function(){return _.ParticlesOptimization}),f.d(y,"RenderTargetsOptimization",function(){return _.RenderTargetsOptimization}),f.d(y,"MergeMeshesOptimization",function(){return _.MergeMeshesOptimization}),f.d(y,"SceneOptimizerOptions",function(){return _.SceneOptimizerOptions}),f.d(y,"SceneOptimizer",function(){return _.SceneOptimizer}),f.d(y,"SceneSerializer",function(){return _.SceneSerializer}),f.d(y,"SmartArray",function(){return _.SmartArray}),f.d(y,"SmartArrayNoDuplicate",function(){return _.SmartArrayNoDuplicate}),f.d(y,"StringDictionary",function(){return _.StringDictionary}),f.d(y,"Tags",function(){return _.Tags}),f.d(y,"TextureTools",function(){return _.TextureTools}),f.d(y,"TGATools",function(){return _.TGATools}),f.d(y,"Tools",function(){return _.Tools}),f.d(y,"className",function(){return _.className}),f.d(y,"AsyncLoop",function(){return _.AsyncLoop}),f.d(y,"VideoRecorder",function(){return _.VideoRecorder}),f.d(y,"JoystickAxis",function(){return _.JoystickAxis}),f.d(y,"VirtualJoystick",function(){return _.VirtualJoystick}),f.d(y,"WorkerPool",function(){return _.WorkerPool}),f.d(y,"Logger",function(){return _.Logger}),f.d(y,"_TypeStore",function(){return _._TypeStore}),f.d(y,"FilesInputStore",function(){return _.FilesInputStore}),f.d(y,"DeepCopier",function(){return _.DeepCopier}),f.d(y,"PivotTools",function(){return _.PivotTools}),f.d(y,"PrecisionDate",function(){return _.PrecisionDate}),f.d(y,"ScreenshotTools",function(){return _.ScreenshotTools}),f.d(y,"WebRequest",function(){return _.WebRequest}),f.d(y,"InspectableType",function(){return _.InspectableType}),f.d(y,"BRDFTextureTools",function(){return _.BRDFTextureTools}),f.d(y,"RGBDTextureTools",function(){return _.RGBDTextureTools}),f.d(y,"ColorGradient",function(){return _.ColorGradient}),f.d(y,"Color3Gradient",function(){return _.Color3Gradient}),f.d(y,"FactorGradient",function(){return _.FactorGradient}),f.d(y,"GradientHelper",function(){return _.GradientHelper}),f.d(y,"PerfCounter",function(){return _.PerfCounter}),f.d(y,"RetryStrategy",function(){return _.RetryStrategy}),f.d(y,"CanvasGenerator",function(){return _.CanvasGenerator}),f.d(y,"LoadFileError",function(){return _.LoadFileError}),f.d(y,"RequestFileError",function(){return _.RequestFileError}),f.d(y,"ReadFileError",function(){return _.ReadFileError}),f.d(y,"FileTools",function(){return _.FileTools}),f.d(y,"StringTools",function(){return _.StringTools}),f.d(y,"DataReader",function(){return _.DataReader}),f.d(y,"MinMaxReducer",function(){return _.MinMaxReducer}),f.d(y,"DepthReducer",function(){return _.DepthReducer}),f.d(y,"DataStorage",function(){return _.DataStorage}),f.d(y,"SceneRecorder",function(){return _.SceneRecorder}),f.d(y,"KhronosTextureContainer2",function(){return _.KhronosTextureContainer2}),f.d(y,"Trajectory",function(){return _.Trajectory}),f.d(y,"TrajectoryClassifier",function(){return _.TrajectoryClassifier}),f.d(y,"TimerState",function(){return _.TimerState}),f.d(y,"setAndStartTimer",function(){return _.setAndStartTimer}),f.d(y,"AdvancedTimer",function(){return _.AdvancedTimer}),f.d(y,"CopyTools",function(){return _.CopyTools}),f.d(y,"WebXRCamera",function(){return _.WebXRCamera}),f.d(y,"WebXREnterExitUIButton",function(){return _.WebXREnterExitUIButton}),f.d(y,"WebXREnterExitUIOptions",function(){return _.WebXREnterExitUIOptions}),f.d(y,"WebXREnterExitUI",function(){return _.WebXREnterExitUI}),f.d(y,"WebXRExperienceHelper",function(){return _.WebXRExperienceHelper}),f.d(y,"WebXRInput",function(){return _.WebXRInput}),f.d(y,"WebXRInputSource",function(){return _.WebXRInputSource}),f.d(y,"WebXRManagedOutputCanvasOptions",function(){return _.WebXRManagedOutputCanvasOptions}),f.d(y,"WebXRManagedOutputCanvas",function(){return _.WebXRManagedOutputCanvas}),f.d(y,"WebXRState",function(){return _.WebXRState}),f.d(y,"WebXRTrackingState",function(){return _.WebXRTrackingState}),f.d(y,"WebXRSessionManager",function(){return _.WebXRSessionManager}),f.d(y,"WebXRDefaultExperienceOptions",function(){return _.WebXRDefaultExperienceOptions}),f.d(y,"WebXRDefaultExperience",function(){return _.WebXRDefaultExperience}),f.d(y,"WebXRFeatureName",function(){return _.WebXRFeatureName}),f.d(y,"WebXRFeaturesManager",function(){return _.WebXRFeaturesManager}),f.d(y,"WebXRAbstractFeature",function(){return _.WebXRAbstractFeature}),f.d(y,"WebXRHitTestLegacy",function(){return _.WebXRHitTestLegacy}),f.d(y,"WebXRAnchorSystem",function(){return _.WebXRAnchorSystem}),f.d(y,"WebXRPlaneDetector",function(){return _.WebXRPlaneDetector}),f.d(y,"WebXRBackgroundRemover",function(){return _.WebXRBackgroundRemover}),f.d(y,"WebXRMotionControllerTeleportation",function(){return _.WebXRMotionControllerTeleportation}),f.d(y,"WebXRControllerPointerSelection",function(){return _.WebXRControllerPointerSelection}),f.d(y,"IWebXRControllerPhysicsOptions",function(){return _.IWebXRControllerPhysicsOptions}),f.d(y,"WebXRControllerPhysics",function(){return _.WebXRControllerPhysics}),f.d(y,"WebXRHitTest",function(){return _.WebXRHitTest}),f.d(y,"WebXRFeaturePointSystem",function(){return _.WebXRFeaturePointSystem}),f.d(y,"WebXRHand",function(){return _.WebXRHand}),f.d(y,"WebXRHandTracking",function(){return _.WebXRHandTracking}),f.d(y,"WebXRAbstractMotionController",function(){return _.WebXRAbstractMotionController}),f.d(y,"WebXRControllerComponent",function(){return _.WebXRControllerComponent}),f.d(y,"WebXRGenericTriggerMotionController",function(){return _.WebXRGenericTriggerMotionController}),f.d(y,"WebXRMicrosoftMixedRealityController",function(){return _.WebXRMicrosoftMixedRealityController}),f.d(y,"WebXRMotionControllerManager",function(){return _.WebXRMotionControllerManager}),f.d(y,"WebXROculusTouchMotionController",function(){return _.WebXROculusTouchMotionController}),f.d(y,"WebXRHTCViveMotionController",function(){return _.WebXRHTCViveMotionController}),f.d(y,"WebXRProfiledMotionController",function(){return _.WebXRProfiledMotionController});var u=U!==void 0?U:typeof window<"u"?window:void 0;if(u!==void 0){u.BABYLON=M,u.BABYLON=u.BABYLON||{};var M=u.BABYLON;M.Debug=M.Debug||{};var C=[];for(var P in R)M.Debug[P]=R[P],C.push(P);for(var P in _)M[P]=_[P]}var m={AxesViewer:R.AxesViewer,BoneAxesViewer:R.BoneAxesViewer,PhysicsViewer:R.PhysicsViewer,SkeletonViewer:R.SkeletonViewer}}.call(this,f(159))}])})})(zn);var pl={exports:{}};(function(ft,Ze){(function(Ie,y){ft.exports=y(zn.exports)})(typeof self<"u"?self:typeof Qr<"u"?Qr:Qr,function(Ie){return function(y){var f={};function U(_){if(f[_])return f[_].exports;var R=f[_]={i:_,l:!1,exports:{}};return y[_].call(R.exports,R,R.exports,U),R.l=!0,R.exports}return U.m=y,U.c=f,U.d=function(_,R,u){U.o(_,R)||Object.defineProperty(_,R,{enumerable:!0,get:u})},U.r=function(_){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(_,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(_,"__esModule",{value:!0})},U.t=function(_,R){if(1&R&&(_=U(_)),8&R||4&R&&typeof _=="object"&&_&&_.__esModule)return _;var u=Object.create(null);if(U.r(u),Object.defineProperty(u,"default",{enumerable:!0,value:_}),2&R&&typeof _!="string")for(var M in _)U.d(u,M,function(C){return _[C]}.bind(null,M));return u},U.n=function(_){var R=_&&_.__esModule?function(){return _.default}:function(){return _};return U.d(R,"a",R),R},U.o=function(_,R){return Object.prototype.hasOwnProperty.call(_,R)},U.p="",U(U.s=20)}([function(y,f){y.exports=Ie},function(y,f,U){U.d(f,"a",function(){return u}),U.d(f,"b",function(){return M});var _=U(0),R=U(2),u=function(){function C(){}return C.Get=function(P,m,c){if(!m||c==null||!m[c])throw new Error(P+": Failed to find index ("+c+")");return m[c]},C.Assign=function(P){if(P)for(var m=0;m "+R.GLTFLoaderState[R.GLTFLoaderState.READY],A=R.GLTFLoaderState[R.GLTFLoaderState.LOADING]+" => "+R.GLTFLoaderState[R.GLTFLoaderState.COMPLETE];c._parent._startPerformanceCounter(T),c._parent._startPerformanceCounter(A),c._setState(R.GLTFLoaderState.LOADING),c._extensionsOnLoading();var S=new Array,g=c._babylonScene.blockMaterialDirtyMechanism;if(c._babylonScene.blockMaterialDirtyMechanism=!0,P)S.push(c.loadSceneAsync("/nodes",{nodes:P,index:-1}));else if(c._gltf.scene!=null||c._gltf.scenes&&c._gltf.scenes[0]){var l=u.Get("/scene",c._gltf.scenes,c._gltf.scene||0);S.push(c.loadSceneAsync("/scenes/"+l.index,l))}if(c.parent.loadAllMaterials&&c._gltf.materials)for(var h=0;hP.bin.byteLength)&&_.Logger.Warn("Binary buffer length ("+c.byteLength+") from JSON does not match chunk length ("+P.bin.byteLength+")"),this._bin=P.bin}else _.Logger.Warn("Unexpected BIN chunk")}},C.prototype._setupData=function(){if(u.Assign(this._gltf.accessors),u.Assign(this._gltf.animations),u.Assign(this._gltf.buffers),u.Assign(this._gltf.bufferViews),u.Assign(this._gltf.cameras),u.Assign(this._gltf.images),u.Assign(this._gltf.materials),u.Assign(this._gltf.meshes),u.Assign(this._gltf.nodes),u.Assign(this._gltf.samplers),u.Assign(this._gltf.scenes),u.Assign(this._gltf.skins),u.Assign(this._gltf.textures),this._gltf.nodes){for(var P={},m=0,c=this._gltf.nodes;m=2)throw new Error(P+"/texCoord: Invalid value ("+m.texCoord+")");var S=u.Get(P+"/index",this._gltf.textures,m.index);S._textureInfo=m;var g=this._loadTextureAsync("/textures/"+m.index,S,function(l){l.coordinatesIndex=m.texCoord||0,C.AddPointerMetadata(l,P),T._parent.onTextureLoadedObservable.notifyObservers(l),c(l)});return this.logClose(),g},C.prototype._loadTextureAsync=function(P,m,c){c===void 0&&(c=function(){});var T=this._extensionsLoadTextureAsync(P,m,c);if(T)return T;this.logOpen(P+" "+(m.name||""));var A=m.sampler==null?C.DefaultSampler:u.Get(P+"/sampler",this._gltf.samplers,m.sampler),S=u.Get(P+"/source",this._gltf.images,m.source),g=this._createTextureAsync(P,A,S,c);return this.logClose(),g},C.prototype._createTextureAsync=function(P,m,c,T,A){var S=this;T===void 0&&(T=function(){});var g=this._loadSampler("/samplers/"+m.index,m),l=new Array,h=new _.Deferred;this._babylonScene._blockEntityCollection=this._forAssetContainer;var v=new _.Texture(null,this._babylonScene,g.noMipMaps,!1,g.samplingMode,function(){S._disposed||h.resolve()},function(E,D){S._disposed||h.reject(new Error(P+": "+(D&&D.message?D.message:E||"Failed to load texture")))},void 0,void 0,void 0,c.mimeType,A);return this._babylonScene._blockEntityCollection=!1,l.push(h.promise),l.push(this.loadImageAsync("/images/"+c.index,c).then(function(E){var D=c.uri||S._fileName+"#image"+c.index,w="data:"+S._uniqueRootUrl+D;v.updateURL(w,E)})),v.wrapU=g.wrapU,v.wrapV=g.wrapV,T(v),Promise.all(l).then(function(){return v})},C.prototype._loadSampler=function(P,m){return m._data||(m._data={noMipMaps:m.minFilter===9728||m.minFilter===9729,samplingMode:C._GetTextureSamplingMode(P,m),wrapU:C._GetTextureWrapMode(P+"/wrapS",m.wrapS),wrapV:C._GetTextureWrapMode(P+"/wrapT",m.wrapT)}),m._data},C.prototype.loadImageAsync=function(P,m){if(!m._data){if(this.logOpen(P+" "+(m.name||"")),m.uri)m._data=this.loadUriAsync(P+"/uri",m,m.uri);else{var c=u.Get(P+"/bufferView",this._gltf.bufferViews,m.bufferView);m._data=this.loadBufferViewAsync("/bufferViews/"+c.index,c)}this.logClose()}return m._data},C.prototype.loadUriAsync=function(P,m,c){var T=this,A=this._extensionsLoadUriAsync(P,m,c);if(A)return A;if(!C._ValidateUri(c))throw new Error(P+": '"+c+"' is invalid");if(_.Tools.IsBase64(c)){var S=new Uint8Array(_.Tools.DecodeBase64(c));return this.log("Decoded "+c.substr(0,64)+"... ("+S.length+" bytes)"),Promise.resolve(S)}return this.log("Loading "+c),this._parent.preprocessUrlAsync(this._rootUrl+c).then(function(g){return new Promise(function(l,h){T._parent._loadFile(g,T._babylonScene,function(v){T._disposed||(T.log("Loaded "+c+" ("+v.byteLength+" bytes)"),l(new Uint8Array(v)))},!0,function(v){h(new _.LoadFileError(P+": Failed to load '"+c+"'"+(v?": "+v.status+" "+v.statusText:""),v))})})})},C.AddPointerMetadata=function(P,m){var c=P.metadata=P.metadata||{},T=c.gltf=c.gltf||{};(T.pointers=T.pointers||[]).push(m)},C._GetTextureWrapMode=function(P,m){switch(m=m??10497){case 33071:return _.Texture.CLAMP_ADDRESSMODE;case 33648:return _.Texture.MIRROR_ADDRESSMODE;case 10497:return _.Texture.WRAP_ADDRESSMODE;default:return _.Logger.Warn(P+": Invalid value ("+m+")"),_.Texture.WRAP_ADDRESSMODE}},C._GetTextureSamplingMode=function(P,m){var c=m.magFilter==null?9729:m.magFilter,T=m.minFilter==null?9987:m.minFilter;if(c===9729)switch(T){case 9728:return _.Texture.LINEAR_NEAREST;case 9729:return _.Texture.LINEAR_LINEAR;case 9984:return _.Texture.LINEAR_NEAREST_MIPNEAREST;case 9985:return _.Texture.LINEAR_LINEAR_MIPNEAREST;case 9986:return _.Texture.LINEAR_NEAREST_MIPLINEAR;case 9987:return _.Texture.LINEAR_LINEAR_MIPLINEAR;default:return _.Logger.Warn(P+"/minFilter: Invalid value ("+T+")"),_.Texture.LINEAR_LINEAR_MIPLINEAR}else switch(c!==9728&&_.Logger.Warn(P+"/magFilter: Invalid value ("+c+")"),T){case 9728:return _.Texture.NEAREST_NEAREST;case 9729:return _.Texture.NEAREST_LINEAR;case 9984:return _.Texture.NEAREST_NEAREST_MIPNEAREST;case 9985:return _.Texture.NEAREST_LINEAR_MIPNEAREST;case 9986:return _.Texture.NEAREST_NEAREST_MIPLINEAR;case 9987:return _.Texture.NEAREST_LINEAR_MIPLINEAR;default:return _.Logger.Warn(P+"/minFilter: Invalid value ("+T+")"),_.Texture.NEAREST_NEAREST_MIPNEAREST}},C._GetTypedArrayConstructor=function(P,m){switch(m){case 5120:return Int8Array;case 5121:return Uint8Array;case 5122:return Int16Array;case 5123:return Uint16Array;case 5125:return Uint32Array;case 5126:return Float32Array;default:throw new Error(P+": Invalid component type "+m)}},C._GetTypedArray=function(P,m,c,T,A){var S=c.buffer;T=c.byteOffset+(T||0);var g=C._GetTypedArrayConstructor(P+"/componentType",m);try{return new g(S,T,A)}catch(l){throw new Error(P+": "+l)}},C._GetNumComponents=function(P,m){switch(m){case"SCALAR":return 1;case"VEC2":return 2;case"VEC3":return 3;case"VEC4":case"MAT2":return 4;case"MAT3":return 9;case"MAT4":return 16}throw new Error(P+": Invalid type ("+m+")")},C._ValidateUri=function(P){return _.Tools.IsBase64(P)||P.indexOf("..")===-1},C._GetDrawMode=function(P,m){switch(m==null&&(m=4),m){case 0:return _.Material.PointListDrawMode;case 1:return _.Material.LineListDrawMode;case 2:return _.Material.LineLoopDrawMode;case 3:return _.Material.LineStripDrawMode;case 4:return _.Material.TriangleFillMode;case 5:return _.Material.TriangleStripDrawMode;case 6:return _.Material.TriangleFanDrawMode}throw new Error(P+": Invalid mesh primitive mode ("+m+")")},C.prototype._compileMaterialsAsync=function(){var P=this;this._parent._startPerformanceCounter("Compile materials");var m=new Array;if(this._gltf.materials)for(var c=0,T=this._gltf.materials;c-1&&h.materials.splice(N,1),(N=v.indexOf(w))>-1&&v.splice(N,1)})});var E=[];l.onTextureLoadedObservable.add(function(w){E.push(w),w.onDisposeObservable.addOnce(function(){var N=h.textures.indexOf(w);N>-1&&h.textures.splice(N,1),(N=E.indexOf(w))>-1&&E.splice(N,1)})});var D=[];return l.onCameraLoadedObservable.add(function(w){D.push(w)}),l._loader.importMeshAsync(null,c,!0,T,A,S,g).then(function(w){return Array.prototype.push.apply(h.geometries,w.geometries),Array.prototype.push.apply(h.meshes,w.meshes),Array.prototype.push.apply(h.particleSystems,w.particleSystems),Array.prototype.push.apply(h.skeletons,w.skeletons),Array.prototype.push.apply(h.animationGroups,w.animationGroups),Array.prototype.push.apply(h.materials,v),Array.prototype.push.apply(h.textures,E),Array.prototype.push.apply(h.lights,w.lights),Array.prototype.push.apply(h.transformNodes,w.transformNodes),Array.prototype.push.apply(h.cameras,D),h})})},m.prototype.canDirectLoad=function(c){return c.indexOf("asset")!==-1&&c.indexOf("version")!==-1||M.StringTools.StartsWith(c,"data:base64,"+m.magicBase64Encoded)||M.StringTools.StartsWith(c,"data:application/octet-stream;base64,"+m.magicBase64Encoded)||M.StringTools.StartsWith(c,"data:model/gltf-binary;base64,"+m.magicBase64Encoded)},m.prototype.directLoad=function(c,T){if(M.StringTools.StartsWith(T,"base64,"+m.magicBase64Encoded)||M.StringTools.StartsWith(T,"application/octet-stream;base64,"+m.magicBase64Encoded)||M.StringTools.StartsWith(T,"model/gltf-binary;base64,"+m.magicBase64Encoded)){var A=M.Tools.DecodeBase64(T);return this._validate(c,A),this._unpackBinaryAsync(new M.DataReader({readAsync:function(S,g){return Promise.resolve(new Uint8Array(A,S,g))},byteLength:A.byteLength}))}return this._validate(c,T),Promise.resolve({json:this._parseJson(T)})},m.prototype.createPlugin=function(){return new m},Object.defineProperty(m.prototype,"loaderState",{get:function(){return this._loader?this._loader.state:null},enumerable:!1,configurable:!0}),m.prototype.whenCompleteAsync=function(){var c=this;return new Promise(function(T,A){c.onCompleteObservable.addOnce(function(){T()}),c.onErrorObservable.addOnce(function(S){A(S)})})},m.prototype._loadFile=function(c,T,A,S,g){var l=this,h=T._loadFile(c,A,function(v){l._onProgress(v,h)},void 0,S,g);return h.onCompleteObservable.add(function(v){l._requests.splice(l._requests.indexOf(v),1)}),this._requests.push(h),h},m.prototype._requestFile=function(c,T,A,S,g,l){var h=this,v=T._requestFile(c,A,function(E){h._onProgress(E,v)},void 0,S,g,l);return v.onCompleteObservable.add(function(E){h._requests.splice(h._requests.indexOf(E),1)}),this._requests.push(v),v},m.prototype._onProgress=function(c,T){if(this._progressCallback){T._lengthComputable=c.lengthComputable,T._loaded=c.loaded,T._total=c.total;for(var A=!0,S=0,g=0,l=0,h=this._requests;l0)throw new Error("Incompatible minimum version: "+T.minVersion)}var g={1:m._CreateGLTF1Loader,2:m._CreateGLTF2Loader}[A.major];if(!g)throw new Error("Unsupported version: "+T.version);return g(this)},m.prototype._parseJson=function(c){this._startPerformanceCounter("Parse JSON"),this._log("JSON length: "+c.length);var T=JSON.parse(c);return this._endPerformanceCounter("Parse JSON"),T},m.prototype._unpackBinaryAsync=function(c){var T=this;return this._startPerformanceCounter("Unpack Binary"),c.loadAsync(20).then(function(){var A=c.readUint32();if(A!==1179937895)throw new Error("Unexpected magic: "+A);var S=c.readUint32();T.loggingEnabled&&T._log("Binary version: "+S);var g,l=c.readUint32();if(c.buffer.byteLength!==0&&l!==c.buffer.byteLength)throw new Error("Length in header does not match actual data length: "+l+" != "+c.buffer.byteLength);switch(S){case 1:g=T._unpackBinaryV1Async(c,l);break;case 2:g=T._unpackBinaryV2Async(c,l);break;default:throw new Error("Unsupported version: "+S)}return T._endPerformanceCounter("Unpack Binary"),g})},m.prototype._unpackBinaryV1Async=function(c,T){var A=c.readUint32(),S=c.readUint32();if(S!==0)throw new Error("Unexpected content format: "+S);var g=T-c.byteOffset,l={json:this._parseJson(c.readString(A)),bin:null};if(g!==0){var h=c.byteOffset;l.bin={readAsync:function(v,E){return c.buffer.readAsync(h+v,E)},byteLength:g}}return Promise.resolve(l)},m.prototype._unpackBinaryV2Async=function(c,T){var A=this,S=1313821514,g=5130562,l=c.readUint32();if(c.readUint32()!==S)throw new Error("First chunk format is not JSON");return c.byteOffset+l===T?c.loadAsync(l).then(function(){return{json:A._parseJson(c.readString(l)),bin:null}}):c.loadAsync(l+8).then(function(){var h={json:A._parseJson(c.readString(l)),bin:null},v=function(){var E=c.readUint32();switch(c.readUint32()){case S:throw new Error("Unexpected JSON chunk");case g:var D=c.byteOffset;h.bin={readAsync:function(w,N){return c.buffer.readAsync(D+w,N)},byteLength:E},c.skipBytes(E);break;default:c.skipBytes(E)}return c.byteOffset!==T?c.loadAsync(8).then(v):Promise.resolve(h)};return v()})},m._parseVersion=function(c){if(c==="1.0"||c==="1.0.1")return{major:1,minor:0};var T=(c+"").match(/^(\d+)\.(\d+)/);return T?{major:parseInt(T[1]),minor:parseInt(T[2])}:null},m._compareVersion=function(c,T){return c.major>T.major?1:c.majorT.minor?1:c.minor=0&&re.renderTargetTextures.splice(G,1)}if(this._opaqueRenderTarget&&(K=this._scene.customRenderTargets.indexOf(this._opaqueRenderTarget),this._opaqueRenderTarget.dispose()),this._opaqueRenderTarget=new _.RenderTargetTexture("opaqueSceneTexture",this._options.renderSize,this._scene,!0),this._opaqueRenderTarget.renderList=this._opaqueMeshesCache,this._opaqueRenderTarget.gammaSpace=!0,this._opaqueRenderTarget.lodGenerationScale=1,this._opaqueRenderTarget.lodGenerationOffset=-4,K>=0?this._scene.customRenderTargets.splice(K,0,this._opaqueRenderTarget):(K=this._scene.customRenderTargets.length,this._scene.customRenderTargets.push(this._opaqueRenderTarget)),this._scene.layers&&this._opaqueRenderTarget)for(var Q=0,oe=this._scene.layers;Q=0;Q--)if(G.push(R.a.Get(ee+"/ids/"+L[Q],$,L[Q])),G.length===this.maxLODsToLoad)return G;return G.push(K),G},ae.prototype._disposeTransformNode=function(ee){var K=this,$=new Array,L=ee.material;L&&$.push(L);for(var G=0,Q=ee.getChildMeshes();G0){var $=ee.metadata=ee.metadata||{};($.gltf=$.gltf||{}).extras=K.extras}},ae.prototype.dispose=function(){this._loader=null},ae.prototype.loadNodeAsync=function(ee,K,$){var L=this;return this._loader.loadNodeAsync(ee,K,function(G){L._assignExtras(G,K),$(G)})},ae.prototype.loadCameraAsync=function(ee,K,$){var L=this;return this._loader.loadCameraAsync(ee,K,function(G){L._assignExtras(G,K),$(G)})},ae.prototype.createMaterial=function(ee,K,$){var L=this._loader.createMaterial(ee,K,$);return this._assignExtras(L,K),L},ae}();R.b.RegisterExtension("ExtrasAsMetadata",function(ae){return new pe(ae)})},function(y,f,U){U.r(f),U.d(f,"GLTFBinaryExtension",function(){return H}),U.d(f,"GLTFLoaderBase",function(){return re}),U.d(f,"GLTFLoader",function(){return Y}),U.d(f,"GLTFLoaderExtension",function(){return k}),U.d(f,"EComponentType",function(){return _}),U.d(f,"EShaderType",function(){return R}),U.d(f,"EParameterType",function(){return u}),U.d(f,"ETextureWrapMode",function(){return M}),U.d(f,"ETextureFilterType",function(){return C}),U.d(f,"ETextureFormat",function(){return P}),U.d(f,"ECullingType",function(){return m}),U.d(f,"EBlendingFunction",function(){return c}),U.d(f,"GLTFUtils",function(){return g}),U.d(f,"GLTFMaterialsCommonExtension",function(){return Z});var _,R,u,M,C,P,m,c,T=U(4);(function(W){W[W.BYTE=5120]="BYTE",W[W.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",W[W.SHORT=5122]="SHORT",W[W.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",W[W.FLOAT=5126]="FLOAT"})(_||(_={})),function(W){W[W.FRAGMENT=35632]="FRAGMENT",W[W.VERTEX=35633]="VERTEX"}(R||(R={})),function(W){W[W.BYTE=5120]="BYTE",W[W.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",W[W.SHORT=5122]="SHORT",W[W.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",W[W.INT=5124]="INT",W[W.UNSIGNED_INT=5125]="UNSIGNED_INT",W[W.FLOAT=5126]="FLOAT",W[W.FLOAT_VEC2=35664]="FLOAT_VEC2",W[W.FLOAT_VEC3=35665]="FLOAT_VEC3",W[W.FLOAT_VEC4=35666]="FLOAT_VEC4",W[W.INT_VEC2=35667]="INT_VEC2",W[W.INT_VEC3=35668]="INT_VEC3",W[W.INT_VEC4=35669]="INT_VEC4",W[W.BOOL=35670]="BOOL",W[W.BOOL_VEC2=35671]="BOOL_VEC2",W[W.BOOL_VEC3=35672]="BOOL_VEC3",W[W.BOOL_VEC4=35673]="BOOL_VEC4",W[W.FLOAT_MAT2=35674]="FLOAT_MAT2",W[W.FLOAT_MAT3=35675]="FLOAT_MAT3",W[W.FLOAT_MAT4=35676]="FLOAT_MAT4",W[W.SAMPLER_2D=35678]="SAMPLER_2D"}(u||(u={})),function(W){W[W.CLAMP_TO_EDGE=33071]="CLAMP_TO_EDGE",W[W.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",W[W.REPEAT=10497]="REPEAT"}(M||(M={})),function(W){W[W.NEAREST=9728]="NEAREST",W[W.LINEAR=9728]="LINEAR",W[W.NEAREST_MIPMAP_NEAREST=9984]="NEAREST_MIPMAP_NEAREST",W[W.LINEAR_MIPMAP_NEAREST=9985]="LINEAR_MIPMAP_NEAREST",W[W.NEAREST_MIPMAP_LINEAR=9986]="NEAREST_MIPMAP_LINEAR",W[W.LINEAR_MIPMAP_LINEAR=9987]="LINEAR_MIPMAP_LINEAR"}(C||(C={})),function(W){W[W.ALPHA=6406]="ALPHA",W[W.RGB=6407]="RGB",W[W.RGBA=6408]="RGBA",W[W.LUMINANCE=6409]="LUMINANCE",W[W.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA"}(P||(P={})),function(W){W[W.FRONT=1028]="FRONT",W[W.BACK=1029]="BACK",W[W.FRONT_AND_BACK=1032]="FRONT_AND_BACK"}(m||(m={})),function(W){W[W.ZERO=0]="ZERO",W[W.ONE=1]="ONE",W[W.SRC_COLOR=768]="SRC_COLOR",W[W.ONE_MINUS_SRC_COLOR=769]="ONE_MINUS_SRC_COLOR",W[W.DST_COLOR=774]="DST_COLOR",W[W.ONE_MINUS_DST_COLOR=775]="ONE_MINUS_DST_COLOR",W[W.SRC_ALPHA=770]="SRC_ALPHA",W[W.ONE_MINUS_SRC_ALPHA=771]="ONE_MINUS_SRC_ALPHA",W[W.DST_ALPHA=772]="DST_ALPHA",W[W.ONE_MINUS_DST_ALPHA=773]="ONE_MINUS_DST_ALPHA",W[W.CONSTANT_COLOR=32769]="CONSTANT_COLOR",W[W.ONE_MINUS_CONSTANT_COLOR=32770]="ONE_MINUS_CONSTANT_COLOR",W[W.CONSTANT_ALPHA=32771]="CONSTANT_ALPHA",W[W.ONE_MINUS_CONSTANT_ALPHA=32772]="ONE_MINUS_CONSTANT_ALPHA",W[W.SRC_ALPHA_SATURATE=776]="SRC_ALPHA_SATURATE"}(c||(c={}));var A,S=U(0),g=function(){function W(){}return W.SetMatrix=function(q,he,ge,me,_e){var be=null;if(ge.semantic==="MODEL"?be=he.getWorldMatrix():ge.semantic==="PROJECTION"?be=q.getProjectionMatrix():ge.semantic==="VIEW"?be=q.getViewMatrix():ge.semantic==="MODELVIEWINVERSETRANSPOSE"?be=S.Matrix.Transpose(he.getWorldMatrix().multiply(q.getViewMatrix()).invert()):ge.semantic==="MODELVIEW"?be=he.getWorldMatrix().multiply(q.getViewMatrix()):ge.semantic==="MODELVIEWPROJECTION"?be=he.getWorldMatrix().multiply(q.getTransformMatrix()):ge.semantic==="MODELINVERSE"?be=he.getWorldMatrix().invert():ge.semantic==="VIEWINVERSE"?be=q.getViewMatrix().invert():ge.semantic==="PROJECTIONINVERSE"?be=q.getProjectionMatrix().invert():ge.semantic==="MODELVIEWINVERSE"?be=he.getWorldMatrix().multiply(q.getViewMatrix()).invert():ge.semantic==="MODELVIEWPROJECTIONINVERSE"?be=he.getWorldMatrix().multiply(q.getTransformMatrix()).invert():ge.semantic==="MODELINVERSETRANSPOSE"&&(be=S.Matrix.Transpose(he.getWorldMatrix().invert())),be)switch(ge.type){case u.FLOAT_MAT2:_e.setMatrix2x2(me,S.Matrix.GetAsMatrix2x2(be));break;case u.FLOAT_MAT3:_e.setMatrix3x3(me,S.Matrix.GetAsMatrix3x3(be));break;case u.FLOAT_MAT4:_e.setMatrix(me,be)}},W.SetUniform=function(q,he,ge,me){switch(me){case u.FLOAT:return q.setFloat(he,ge),!0;case u.FLOAT_VEC2:return q.setVector2(he,S.Vector2.FromArray(ge)),!0;case u.FLOAT_VEC3:return q.setVector3(he,S.Vector3.FromArray(ge)),!0;case u.FLOAT_VEC4:return q.setVector4(he,S.Vector4.FromArray(ge)),!0;default:return!1}},W.GetWrapMode=function(q){switch(q){case M.CLAMP_TO_EDGE:return S.Texture.CLAMP_ADDRESSMODE;case M.MIRRORED_REPEAT:return S.Texture.MIRROR_ADDRESSMODE;case M.REPEAT:default:return S.Texture.WRAP_ADDRESSMODE}},W.GetByteStrideFromType=function(q){switch(q.type){case"VEC2":return 2;case"VEC3":return 3;case"VEC4":case"MAT2":return 4;case"MAT3":return 9;case"MAT4":return 16;default:return 1}},W.GetTextureFilterMode=function(q){switch(q){case C.LINEAR:case C.LINEAR_MIPMAP_NEAREST:case C.LINEAR_MIPMAP_LINEAR:return S.Texture.TRILINEAR_SAMPLINGMODE;case C.NEAREST:case C.NEAREST_MIPMAP_NEAREST:return S.Texture.NEAREST_SAMPLINGMODE;default:return S.Texture.BILINEAR_SAMPLINGMODE}},W.GetBufferFromBufferView=function(q,he,ge,me,_e){ge=he.byteOffset+ge;var be=q.loadedBufferViews[he.buffer];if(ge+me>be.byteLength)throw new Error("Buffer access is out of range");var Pe=be.buffer;switch(ge+=be.byteOffset,_e){case _.BYTE:return new Int8Array(Pe,ge,me);case _.UNSIGNED_BYTE:return new Uint8Array(Pe,ge,me);case _.SHORT:return new Int16Array(Pe,ge,me);case _.UNSIGNED_SHORT:return new Uint16Array(Pe,ge,me);default:return new Float32Array(Pe,ge,me)}},W.GetBufferFromAccessor=function(q,he){var ge=q.bufferViews[he.bufferView],me=he.count*W.GetByteStrideFromType(he);return W.GetBufferFromBufferView(q,ge,he.byteOffset,me,he.componentType)},W.DecodeBufferToText=function(q){for(var he="",ge=q.byteLength,me=0;me=this._maxPos},W}(),v=["MODEL","VIEW","PROJECTION","MODELVIEW","MODELVIEWPROJECTION","JOINTMATRIX"],E=["world","view","projection","worldView","worldViewProjection","mBones"],D=["translation","rotation","scale"],w=["position","rotationQuaternion","scaling"],N=function(W,q,he){for(var ge in W){var me=W[ge];he[q][ge]=me}},I=function(W){if(W)for(var q=0;q0&&(We=ne(_e,me))&&be.indexOf(We)===-1&&be.push(We),new S.Bone(ye.jointName||"",ge,We,$e).id=me}}else S.Tools.Warn("Joint named "+q.jointNames[Pe]+" does not exist")}var ct=ge.bones;for(ge.bones=[],Pe=0;Pe1?(_e=new S.MultiMaterial("multimat"+ge,W.scene)).subMaterials=be:_e=new S.StandardMaterial("multimat"+ge,W.scene),be.length===1&&(_e=be[0]),me.material||(me.material=_e),new S.Geometry(ge,W.scene,Pe,!1,me),me.computeWorldMatrix(!0),W.scene._blockEntityCollection=!1,me.subMeshes=[];var Zt=0;for(je=0;je0&&W.importMeshesNames.indexOf(q.name||"")===-1)return null;if(q.skin){if(q.meshes){var _e=W.skins[q.skin];(be=ae(W,q,q.meshes,he,q.babylonNode)).skeleton=W.scene.getLastSkeletonByID(q.skin),be.skeleton===null&&(be.skeleton=pe(W,_e,0,_e.babylonSkeleton,q.skin),_e.babylonSkeleton||(_e.babylonSkeleton=be.skeleton)),me=be}}else if(q.meshes){var be;me=be=ae(W,q,q.mesh?[q.mesh]:q.meshes,he,q.babylonNode)}else if(!q.light||q.babylonNode||W.importOnlyMeshes){if(q.camera&&!q.babylonNode&&!W.importOnlyMeshes){var Pe=W.cameras[q.camera];if(Pe){if(W.scene._blockEntityCollection=W.forAssetContainer,Pe.type==="orthographic"){var ye=new S.FreeCamera(q.camera,S.Vector3.Zero(),W.scene,!1);ye.name=q.name||"",ye.mode=S.Camera.ORTHOGRAPHIC_CAMERA,ye.attachControl(),me=ye}else if(Pe.type==="perspective"){var Be=Pe[Pe.type],ke=new S.FreeCamera(q.camera,S.Vector3.Zero(),W.scene,!1);ke.name=q.name||"",ke.attachControl(),Be.aspectRatio||(Be.aspectRatio=W.scene.getEngine().getRenderWidth()/W.scene.getEngine().getRenderHeight()),Be.znear&&Be.zfar&&(ke.maxZ=Be.zfar,ke.minZ=Be.znear),me=ke}W.scene._blockEntityCollection=!1}}}else{var We=W.lights[q.light];if(We){if(We.type==="ambient"){var je=We[We.type],He=new S.HemisphericLight(q.light,S.Vector3.Zero(),W.scene);He.name=q.name||"",je.color&&(He.diffuse=S.Color3.FromArray(je.color)),me=He}else if(We.type==="directional"){var Qe=We[We.type],Ge=new S.DirectionalLight(q.light,S.Vector3.Zero(),W.scene);Ge.name=q.name||"",Qe.color&&(Ge.diffuse=S.Color3.FromArray(Qe.color)),me=Ge}else if(We.type==="point"){var nt=We[We.type],$e=new S.PointLight(q.light,S.Vector3.Zero(),W.scene);$e.name=q.name||"",nt.color&&($e.diffuse=S.Color3.FromArray(nt.color)),me=$e}else if(We.type==="spot"){var ct=We[We.type],st=new S.SpotLight(q.light,S.Vector3.Zero(),S.Vector3.Zero(),0,0,W.scene);st.name=q.name||"",ct.color&&(st.diffuse=S.Color3.FromArray(ct.color)),ct.fallOfAngle&&(st.angle=ct.fallOfAngle),ct.fallOffExponent&&(st.exponent=ct.fallOffExponent),me=st}}}if(!q.jointName){if(q.babylonNode)return q.babylonNode;if(me===null){W.scene._blockEntityCollection=W.forAssetContainer;var mt=new S.Mesh(q.name||"",W.scene);W.scene._blockEntityCollection=!1,q.babylonNode=mt,me=mt}}if(me!==null){if(q.matrix&&me instanceof S.Mesh)(function(Pt,Ot,on){if(Ot.matrix){var Zt=new S.Vector3(0,0,0),tn=new S.Quaternion,De=new S.Vector3(0,0,0);S.Matrix.FromArray(Ot.matrix).decompose(De,tn,Zt),ee(Pt,Zt,tn,De)}else Ot.translation&&Ot.rotation&&Ot.scale&&ee(Pt,S.Vector3.FromArray(Ot.translation),S.Quaternion.FromArray(Ot.rotation),S.Vector3.FromArray(Ot.scale));Pt.computeWorldMatrix(!0)})(me,q);else{var St=q.translation||[0,0,0],wt=q.rotation||[0,0,0,1],It=q.scale||[1,1,1];ee(me,S.Vector3.FromArray(St),S.Quaternion.FromArray(wt),S.Vector3.FromArray(It))}me.updateCache(!0),q.babylonNode=me}return me},$=function(W,q,he,ge){ge===void 0&&(ge=!1);var me=W.nodes[q],_e=null;if(ge=!(W.importOnlyMeshes&&!ge&&W.importMeshesNames)||W.importMeshesNames.indexOf(me.name||"")!==-1||W.importMeshesNames.length===0,!me.jointName&&ge&&(_e=K(W,me,q))!==null&&(_e.id=q,_e.parent=he),me.children)for(var be=0;be=0?h.substring(0,v):h;E=E.toLowerCase();var D=v>=0?h.substring(v+1).trim():"";E==="newmtl"?(g&&this.materials.push(g),C._blockEntityCollection=c,g=new _.StandardMaterial(D,C),C._blockEntityCollection=!1):E==="kd"&&g?(T=D.split(S,3).map(parseFloat),g.diffuseColor=_.Color3.FromArray(T)):E==="ka"&&g?(T=D.split(S,3).map(parseFloat),g.ambientColor=_.Color3.FromArray(T)):E==="ks"&&g?(T=D.split(S,3).map(parseFloat),g.specularColor=_.Color3.FromArray(T)):E==="ke"&&g?(T=D.split(S,3).map(parseFloat),g.emissiveColor=_.Color3.FromArray(T)):E==="ns"&&g?g.specularPower=parseFloat(D):E==="d"&&g?g.alpha=parseFloat(D):E==="map_ka"&&g?g.ambientTexture=M._getTexture(m,D,C):E==="map_kd"&&g?g.diffuseTexture=M._getTexture(m,D,C):E==="map_ks"&&g?g.specularTexture=M._getTexture(m,D,C):E==="map_ns"||(E==="map_bump"&&g?g.bumpTexture=M._getTexture(m,D,C):E==="map_d"&&g&&(g.opacityTexture=M._getTexture(m,D,C)))}}g&&this.materials.push(g)}},M._getTexture=function(C,P,m){if(!P)return null;var c=C;if(C==="file:"){var T=P.lastIndexOf("\\");T===-1&&(T=P.lastIndexOf("/")),c+=T>-1?P.substr(T+1):P}else c+=P;return new _.Texture(c,m,!1,M.INVERT_TEXTURE_Y)},M.INVERT_TEXTURE_Y=!0,M}(),u=function(){function M(C){this.name="obj",this.extensions=".obj",this.obj=/^o/,this.group=/^g/,this.mtllib=/^mtllib /,this.usemtl=/^usemtl /,this.smooth=/^s /,this.vertexPattern=/v(\s+[\d|\.|\+|\-|e|E]+){3,7}/,this.normalPattern=/vn(\s+[\d|\.|\+|\-|e|E]+)( +[\d|\.|\+|\-|e|E]+)( +[\d|\.|\+|\-|e|E]+)/,this.uvPattern=/vt(\s+[\d|\.|\+|\-|e|E]+)( +[\d|\.|\+|\-|e|E]+)/,this.facePattern1=/f\s+(([\d]{1,}[\s]?){3,})+/,this.facePattern2=/f\s+((([\d]{1,}\/[\d]{1,}[\s]?){3,})+)/,this.facePattern3=/f\s+((([\d]{1,}\/[\d]{1,}\/[\d]{1,}[\s]?){3,})+)/,this.facePattern4=/f\s+((([\d]{1,}\/\/[\d]{1,}[\s]?){3,})+)/,this.facePattern5=/f\s+(((-[\d]{1,}\/-[\d]{1,}\/-[\d]{1,}[\s]?){3,})+)/,this._forAssetContainer=!1,this._meshLoadOptions=C||M.currentMeshLoadOptions}return Object.defineProperty(M,"INVERT_TEXTURE_Y",{get:function(){return R.INVERT_TEXTURE_Y},set:function(C){R.INVERT_TEXTURE_Y=C},enumerable:!1,configurable:!0}),Object.defineProperty(M,"currentMeshLoadOptions",{get:function(){return{ComputeNormals:M.COMPUTE_NORMALS,ImportVertexColors:M.IMPORT_VERTEX_COLORS,InvertY:M.INVERT_Y,InvertTextureY:M.INVERT_TEXTURE_Y,UVScaling:M.UV_SCALING,MaterialLoadingFailsSilently:M.MATERIAL_LOADING_FAILS_SILENTLY,OptimizeWithUV:M.OPTIMIZE_WITH_UV,SkipMaterials:M.SKIP_MATERIALS}},enumerable:!1,configurable:!0}),M.prototype._loadMTL=function(C,P,m,c){var T=_.Tools.BaseUrl+P+C;_.Tools.LoadFile(T,m,void 0,void 0,!1,function(A,S){c(T,S)})},M.prototype.createPlugin=function(){return new M(M.currentMeshLoadOptions)},M.prototype.canDirectLoad=function(C){return!1},M.prototype.importMeshAsync=function(C,P,m,c,T,A){return this._parseSolid(C,P,m,c).then(function(S){return{meshes:S,particleSystems:[],skeletons:[],animationGroups:[],transformNodes:[],geometries:[],lights:[]}})},M.prototype.loadAsync=function(C,P,m,c,T){return this.importMeshAsync(null,C,P,m,c).then(function(){})},M.prototype.loadAssetContainerAsync=function(C,P,m,c,T){var A=this;return this._forAssetContainer=!0,this.importMeshAsync(null,C,P,m).then(function(S){var g=new _.AssetContainer(C);return S.meshes.forEach(function(l){return g.meshes.push(l)}),S.meshes.forEach(function(l){var h=l.material;h&&g.materials.indexOf(h)==-1&&(g.materials.push(h),h.getActiveTextures().forEach(function(v){g.textures.indexOf(v)==-1&&g.textures.push(v)}))}),A._forAssetContainer=!1,g}).catch(function(S){throw A._forAssetContainer=!1,S})},M.prototype._parseSolid=function(C,P,m,c){for(var T,A=this,S=[],g=[],l=[],h=[],v=[],E=[],D=[],w=[],N=[],I=[],V=[],X=0,j=!1,ne=[],te=[],de=[],pe=[],ae=[],ee="",K="",$=new R,L=1,G=!0,Q=new _.Color4(.5,.5,.5,1),oe=function(Ge,nt,$e,ct,st,mt,St){var wt;(wt=A._meshLoadOptions.OptimizeWithUV?function(It,Pt){It[Pt[0]]||(It[Pt[0]]={normals:[],idx:[],uv:[]});var Ot=It[Pt[0]].normals.indexOf(Pt[1]);return Ot!=1&&Pt[2]===It[Pt[0]].uv[Ot]?It[Pt[0]].idx[Ot]:-1}(V,[Ge,$e,nt]):function(It,Pt){It[Pt[0]]||(It[Pt[0]]={normals:[],idx:[]});var Ot=It[Pt[0]].normals.indexOf(Pt[1]);return Ot===-1?-1:It[Pt[0]].idx[Ot]}(V,[Ge,$e]))===-1?(E.push(D.length),D.push(ct),w.push(st),I.push(mt),St!==void 0&&N.push(St),V[Ge].normals.push($e),V[Ge].idx.push(X++),A._meshLoadOptions.OptimizeWithUV&&V[Ge].uv.push(nt)):E.push(wt)},re=function(){for(var Ge=0;Ge0&&(T=v[v.length-1],re(),E.reverse(),T.indices=E.slice(),T.positions=ne.slice(),T.normals=de.slice(),T.uvs=pe.slice(),A._meshLoadOptions.ImportVertexColors===!0&&(T.colors=te.slice()),E=[],ne=[],te=[],de=[],pe=[])},ge=m.split(` +`),me=0;me=7?h.push(new _.Color4(parseFloat(_e[4]),parseFloat(_e[5]),parseFloat(_e[6]),_e.length===7||_e[7]===void 0?1:parseFloat(_e[7]))):h.push(Q));else if((_e=this.normalPattern.exec(be))!==null)g.push(new _.Vector3(parseFloat(_e[1]),parseFloat(_e[2]),parseFloat(_e[3])));else if((_e=this.uvPattern.exec(be))!==null)l.push(new _.Vector2(parseFloat(_e[1])*M.UV_SCALING.x,parseFloat(_e[2])*M.UV_SCALING.y));else if((_e=this.facePattern3.exec(be))!==null)Z(_e[1].trim().split(" "),1);else if((_e=this.facePattern4.exec(be))!==null)W(_e[1].trim().split(" "),1);else if((_e=this.facePattern5.exec(be))!==null)q(_e[1].trim().split(" "),1);else if((_e=this.facePattern2.exec(be))!==null)H(_e[1].trim().split(" "),1);else if((_e=this.facePattern1.exec(be))!==null)k(_e[1].trim().split(" "),1);else if(this.group.test(be)||this.obj.test(be)){var Pe={name:be.substring(2).trim(),indices:void 0,positions:void 0,normals:void 0,uvs:void 0,colors:void 0,materialName:""};he(),v.push(Pe),j=!0,G=!0,L=1}else this.usemtl.test(be)?(ee=be.substring(7).trim(),(!G||!j)&&(he(),Pe={name:"mesh_mm"+L.toString(),indices:void 0,positions:void 0,normals:void 0,uvs:void 0,colors:void 0,materialName:ee},L++,v.push(Pe),j=!0),j&&G&&(v[v.length-1].materialName=ee,G=!1)):this.mtllib.test(be)?K=be.substring(7).trim():this.smooth.test(be)||console.log("Unhandled expression at line : "+be)}j&&(T=v[v.length-1],E.reverse(),re(),T.indices=E,T.positions=ne,T.normals=de,T.uvs=pe,this._meshLoadOptions.ImportVertexColors===!0&&(T.colors=te)),j||(E.reverse(),re(),v.push({name:_.Geometry.RandomId(),indices:E,positions:ne,colors:te,normals:de,uvs:pe,materialName:ee}));for(var ye=[],Be=new Array,ke=0;ke-1;)St.push(st),mt=st+1;if(st===-1&&St.length===0)$.materials[ct].dispose();else for(var wt=0;wt127)return!0;return!1},u.prototype._parseBinary=function(M,C){for(var P=new DataView(C),m=P.getUint32(80,!0),c=0,T=new Float32Array(3*m*3),A=new Float32Array(3*m*3),S=new Uint32Array(3*m),g=0,l=0;l-1||(P.GLTF2[c]=M[c])}}).call(this,U(5))},function(y,f,U){U.r(f),function(_){var R=U(10);U.d(f,"MTLFileLoader",function(){return R.MTLFileLoader}),U.d(f,"OBJFileLoader",function(){return R.OBJFileLoader});var u=_!==void 0?_:typeof window<"u"?window:void 0;if(u!==void 0)for(var M in R)u.BABYLON[M]=R[M]}.call(this,U(5))},function(y,f,U){U.r(f),function(_){var R=U(11);U.d(f,"STLFileLoader",function(){return R.STLFileLoader});var u=_!==void 0?_:typeof window<"u"?window:void 0;if(u!==void 0)for(var M in R)u.BABYLON[M]=R[M]}.call(this,U(5))},,,,function(y,f,U){U.r(f),U.d(f,"GLTFLoaderCoordinateSystemMode",function(){return _.c}),U.d(f,"GLTFLoaderAnimationStartMode",function(){return _.b}),U.d(f,"GLTFLoaderState",function(){return _.d}),U.d(f,"GLTFFileLoader",function(){return _.a}),U.d(f,"GLTFValidation",function(){return _.e}),U.d(f,"GLTF1",function(){return R.a}),U.d(f,"GLTF2",function(){return u.a}),U.d(f,"MTLFileLoader",function(){return M.MTLFileLoader}),U.d(f,"OBJFileLoader",function(){return M.OBJFileLoader}),U.d(f,"STLFileLoader",function(){return C.STLFileLoader}),U(2),U(3),U(8),U(9),U(10),U(11);var _=U(12),R=U(13),u=U(14),M=U(15),C=U(16)}])})})(pl);function kv(ft){let Ze,Ie,y,f;return y=new fl({}),{c(){Ze=hr("div"),Ie=hr("div"),Mi(y.$$.fragment),Lo(Ie,"class","h-10 dark:text-white opacity-50"),Lo(Ze,"class","h-full min-h-[16rem] flex justify-center items-center")},m(U,_){bn(U,Ze,_),ol(Ze,Ie),Ii(y,Ie,null),f=!0},p:Do,i(U){f||(Fn(y.$$.fragment,U),f=!0)},o(U){wn(y.$$.fragment,U),f=!1},d(U){U&&yn(Ze),Di(y)}}}function Gv(ft){let Ze;return{c(){Ze=hr("canvas"),Lo(Ze,"class","w-full h-full object-contain")},m(Ie,y){bn(Ie,Ze,y),ft[5](Ze)},p:Do,i:Do,o:Do,d(Ie){Ie&&yn(Ze),ft[5](null)}}}function zv(ft){let Ze,Ie,y,f,U,_;Ze=new Of({props:{show_label:ft[2],Icon:fl,label:ft[1]||"3D Model"}});const R=[Gv,kv],u=[];function M(C,P){return C[0]?0:1}return y=M(ft),f=u[y]=R[y](ft),{c(){Mi(Ze.$$.fragment),Ie=qr(),f.c(),U=ll()},m(C,P){Ii(Ze,C,P),bn(C,Ie,P),u[y].m(C,P),bn(C,U,P),_=!0},p(C,[P]){const m={};P&4&&(m.show_label=C[2]),P&2&&(m.label=C[1]||"3D Model"),Ze.$set(m);let c=y;y=M(C),y===c?u[y].p(C,P):(ul(),wn(u[c],1,1,()=>{u[c]=null}),hl(),f=u[y],f?f.p(C,P):(f=u[y]=R[y](C),f.c()),Fn(f,1),f.m(U.parentNode,U))},i(C){_||(Fn(Ze.$$.fragment,C),Fn(f),_=!0)},o(C){wn(Ze.$$.fragment,C),wn(f),_=!1},d(C){Di(Ze,C),C&&yn(Ie),u[y].d(C),C&&yn(U)}}}function jv(ft,Ze,Ie){let{value:y}=Ze,{clearColor:f}=Ze,{label:U=""}=Ze,{show_label:_}=Ze;pl.exports.OBJFileLoader.IMPORT_VERTEX_COLORS=!0;let R,u,M;Cf(()=>{M=new zn.exports.Engine(R,!0),window.addEventListener("resize",()=>{M?.resize()})}),Rf(()=>{u&&(u.dispose(),M?.stopRenderLoop(),M?.dispose(),M=null,M=new zn.exports.Engine(R,!0),window.addEventListener("resize",()=>{M?.resize()})),C()});function C(){if(u=new zn.exports.Scene(M),u.createDefaultCameraOrLight(),u.clearColor=f?u.clearColor=new zn.exports.Color4(f[0],f[1],f[2],f[3]):new zn.exports.Color4(.2,.2,.2,1),M?.runRenderLoop(()=>{u.render()}),!y)return;let m;if(y.is_file)m=y.data;else{let c=y.data,T=zn.exports.Tools.DecodeBase64(c),A=new Blob([T]);m=URL.createObjectURL(A)}zn.exports.SceneLoader.Append("",m,u,()=>{u.createDefaultCamera(!0,!0,!0)},void 0,void 0,"."+y.name.split(".")[1])}function P(m){dl[m?"unshift":"push"](()=>{R=m,Ie(3,R)})}return ft.$$set=m=>{"value"in m&&Ie(0,y=m.value),"clearColor"in m&&Ie(4,f=m.clearColor),"label"in m&&Ie(1,U=m.label),"show_label"in m&&Ie(2,_=m.show_label)},[y,U,_,R,f,P]}class Hv extends al{constructor(Ze){super(),sl(this,Ze,jv,zv,cl,{value:0,clearColor:4,label:1,show_label:2})}}function Wv(ft){let Ze,Ie,y,f,U;return Ie=new Vv({props:{absolute:!0}}),Ie.$on("clear",ft[9]),{c(){Ze=hr("div"),Mi(Ie.$$.fragment),y=qr(),f=hr("canvas"),Lo(f,"class","w-full h-full object-contain"),Lo(Ze,"class","input-model w-full h-60 flex justify-center items-center bg-gray-200 dark:bg-gray-600 relative")},m(_,R){bn(_,Ze,R),Ii(Ie,Ze,null),ol(Ze,y),ol(Ze,f),ft[11](f),U=!0},p:Do,i(_){U||(Fn(Ie.$$.fragment,_),U=!0)},o(_){wn(Ie.$$.fragment,_),U=!1},d(_){_&&yn(Ze),Di(Ie),ft[11](null)}}}function Xv(ft){let Ze,Ie,y;function f(_){ft[10](_)}let U={filetype:".obj, .gltf, .glb",$$slots:{default:[Yv]},$$scope:{ctx:ft}};return ft[6]!==void 0&&(U.dragging=ft[6]),Ze=new Uv({props:U}),dl.push(()=>Rv(Ze,"dragging",f)),Ze.$on("load",ft[8]),{c(){Mi(Ze.$$.fragment)},m(_,R){Ii(Ze,_,R),y=!0},p(_,R){const u={};R&131086&&(u.$$scope={dirty:R,ctx:_}),!Ie&&R&64&&(Ie=!0,u.dragging=_[6],Ov(()=>Ie=!1)),Ze.$set(u)},i(_){y||(Fn(Ze.$$.fragment,_),y=!0)},o(_){wn(Ze.$$.fragment,_),y=!1},d(_){Di(Ze,_)}}}function Yv(ft){let Ze,Ie,y,f,U,_,R,u,M;return{c(){Ze=Io(ft[1]),Ie=qr(),y=hr("br"),f=Io("- "),U=Io(ft[2]),_=Io(" -"),R=hr("br"),u=qr(),M=Io(ft[3])},m(C,P){bn(C,Ze,P),bn(C,Ie,P),bn(C,y,P),bn(C,f,P),bn(C,U,P),bn(C,_,P),bn(C,R,P),bn(C,u,P),bn(C,M,P)},p(C,P){P&2&&rl(Ze,C[1]),P&4&&rl(U,C[2]),P&8&&rl(M,C[3])},d(C){C&&yn(Ze),C&&yn(Ie),C&&yn(y),C&&yn(f),C&&yn(U),C&&yn(_),C&&yn(R),C&&yn(u),C&&yn(M)}}}function Kv(ft){let Ze,Ie,y,f,U,_;Ze=new Of({props:{show_label:ft[5],Icon:fl,label:ft[4]||"3D Model"}});const R=[Xv,Wv],u=[];function M(C,P){return C[0]===null?0:1}return y=M(ft),f=u[y]=R[y](ft),{c(){Mi(Ze.$$.fragment),Ie=qr(),f.c(),U=ll()},m(C,P){Ii(Ze,C,P),bn(C,Ie,P),u[y].m(C,P),bn(C,U,P),_=!0},p(C,[P]){const m={};P&32&&(m.show_label=C[5]),P&16&&(m.label=C[4]||"3D Model"),Ze.$set(m);let c=y;y=M(C),y===c?u[y].p(C,P):(ul(),wn(u[c],1,1,()=>{u[c]=null}),hl(),f=u[y],f?f.p(C,P):(f=u[y]=R[y](C),f.c()),Fn(f,1),f.m(U.parentNode,U))},i(C){_||(Fn(Ze.$$.fragment,C),Fn(f),_=!0)},o(C){wn(Ze.$$.fragment,C),wn(f),_=!1},d(C){Di(Ze,C),C&&yn(Ie),u[y].d(C),C&&yn(U)}}}function Qv(ft,Ze,Ie){let{value:y}=Ze,{drop_text:f="Drop a file"}=Ze,{or_text:U="or"}=Ze,{upload_text:_="click to upload"}=Ze,{label:R=""}=Ze,{show_label:u}=Ze;Cf(()=>{y!=null&&S()}),Rf(()=>{y!=null&&y.is_file&&S()});async function M({detail:h}){Ie(0,y=h),await Pf(),P("change",y),S()}async function C(){T&&A&&(T.dispose(),A.dispose()),Ie(0,y=null),await Pf(),P("clear")}const P=Cv();let m=!1;pl.exports.OBJFileLoader.IMPORT_VERTEX_COLORS=!0;let c,T,A;function S(){if(T&&!T.isDisposed&&A&&(T.dispose(),A.dispose()),A=new zn.exports.Engine(c,!0),T=new zn.exports.Scene(A),T.createDefaultCameraOrLight(),T.clearColor=new zn.exports.Color4(.2,.2,.2,1),A.runRenderLoop(()=>{T.render()}),window.addEventListener("resize",()=>{A.resize()}),!y)return;let h;if(y.is_file)h=y.data;else{let v=y.data,E=zn.exports.Tools.DecodeBase64(v),D=new Blob([E]);h=URL.createObjectURL(D)}zn.exports.SceneLoader.Append(h,"",T,()=>{T.createDefaultCamera(!0,!0,!0)},void 0,void 0,"."+y.name.split(".")[1])}function g(h){m=h,Ie(6,m)}function l(h){dl[h?"unshift":"push"](()=>{c=h,Ie(7,c)})}return ft.$$set=h=>{"value"in h&&Ie(0,y=h.value),"drop_text"in h&&Ie(1,f=h.drop_text),"or_text"in h&&Ie(2,U=h.or_text),"upload_text"in h&&Ie(3,_=h.upload_text),"label"in h&&Ie(4,R=h.label),"show_label"in h&&Ie(5,u=h.show_label)},ft.$$.update=()=>{ft.$$.dirty&64&&P("drag",m)},[y,f,U,_,R,u,m,c,M,C,g,l]}class qv extends al{constructor(Ze){super(),sl(this,Ze,Qv,Kv,cl,{value:0,drop_text:1,or_text:2,upload_text:3,label:4,show_label:5})}}function Zv(ft){let Ze,Ie;return Ze=new Hv({props:{value:ft[8],clearColor:ft[4],label:ft[6],show_label:ft[7]}}),{c(){Mi(Ze.$$.fragment)},m(y,f){Ii(Ze,y,f),Ie=!0},p(y,f){const U={};f&256&&(U.value=y[8]),f&16&&(U.clearColor=y[4]),f&64&&(U.label=y[6]),f&128&&(U.show_label=y[7]),Ze.$set(U)},i(y){Ie||(Fn(Ze.$$.fragment,y),Ie=!0)},o(y){wn(Ze.$$.fragment,y),Ie=!1},d(y){Di(Ze,y)}}}function Jv(ft){let Ze,Ie;return Ze=new qv({props:{label:ft[6],show_label:ft[7],value:ft[8],drop_text:ft[10]("interface.drop_file"),or_text:ft[10]("or"),upload_text:ft[10]("interface.click_to_upload")}}),Ze.$on("change",ft[13]),Ze.$on("drag",ft[14]),Ze.$on("change",ft[15]),Ze.$on("clear",ft[16]),{c(){Mi(Ze.$$.fragment)},m(y,f){Ii(Ze,y,f),Ie=!0},p(y,f){const U={};f&64&&(U.label=y[6]),f&128&&(U.show_label=y[7]),f&256&&(U.value=y[8]),f&1024&&(U.drop_text=y[10]("interface.drop_file")),f&1024&&(U.or_text=y[10]("or")),f&1024&&(U.upload_text=y[10]("interface.click_to_upload")),Ze.$set(U)},i(y){Ie||(Fn(Ze.$$.fragment,y),Ie=!0)},o(y){wn(Ze.$$.fragment,y),Ie=!1},d(y){Di(Ze,y)}}}function $v(ft){let Ze,Ie,y,f,U,_;const R=[ft[5]];let u={};for(let m=0;m{C[A]=null}),hl()),~y?(f=C[y],f?f.p(m,c):(f=C[y]=M[y](m),f.c()),Fn(f,1),f.m(U.parentNode,U)):f=null)},i(m){_||(Fn(Ze.$$.fragment,m),Fn(f),_=!0)},o(m){wn(Ze.$$.fragment,m),wn(f),_=!1},d(m){Di(Ze,m),m&&yn(Ie),~y&&C[y].d(m),m&&yn(U)}}}function eb(ft){let Ze,Ie;return Ze=new Mv({props:{visible:ft[2],variant:ft[0]===null?"dashed":"solid",color:ft[9]?"green":"grey",padding:!1,elem_id:ft[1],$$slots:{default:[$v]},$$scope:{ctx:ft}}}),{c(){Mi(Ze.$$.fragment)},m(y,f){Ii(Ze,y,f),Ie=!0},p(y,[f]){const U={};f&4&&(U.visible=y[2]),f&1&&(U.variant=y[0]===null?"dashed":"solid"),f&512&&(U.color=y[9]?"green":"grey"),f&2&&(U.elem_id=y[1]),f&133113&&(U.$$scope={dirty:f,ctx:y}),Ze.$set(U)},i(y){Ie||(Fn(Ze.$$.fragment,y),Ie=!0)},o(y){wn(Ze.$$.fragment,y),Ie=!1},d(y){Di(Ze,y)}}}function tb(ft,Ze,Ie){let y;Iv(ft,Dv,v=>Ie(10,y=v));let{elem_id:f=""}=Ze,{visible:U=!0}=Ze,{value:_=null}=Ze,{mode:R}=Ze,{root:u}=Ze,{root_url:M}=Ze,{clearColor:C}=Ze,{loading_status:P}=Ze,{label:m}=Ze,{show_label:c}=Ze,T,A=!1;const S=({detail:v})=>Ie(0,_=v),g=({detail:v})=>Ie(9,A=v);function l(v){xf.call(this,ft,v)}function h(v){xf.call(this,ft,v)}return ft.$$set=v=>{"elem_id"in v&&Ie(1,f=v.elem_id),"visible"in v&&Ie(2,U=v.visible),"value"in v&&Ie(0,_=v.value),"mode"in v&&Ie(3,R=v.mode),"root"in v&&Ie(11,u=v.root),"root_url"in v&&Ie(12,M=v.root_url),"clearColor"in v&&Ie(4,C=v.clearColor),"loading_status"in v&&Ie(5,P=v.loading_status),"label"in v&&Ie(6,m=v.label),"show_label"in v&&Ie(7,c=v.show_label)},ft.$$.update=()=>{ft.$$.dirty&6145&&Ie(8,T=Bv(_,M??u))},[_,f,U,R,C,P,m,c,T,A,y,u,M,S,g,l,h]}class nb extends al{constructor(Ze){super(),sl(this,Ze,tb,eb,cl,{elem_id:1,visible:2,value:0,mode:3,root:11,root_url:12,clearColor:4,loading_status:5,label:6,show_label:7})}}var ub=nb;const hb=["static","dynamic"],db=ft=>({type:"{ name: string; data: string }",description:"file name and base64 data of Model3D object"});export{ub as Component,_b as ExampleComponent,db as document,hb as modes}; +//# sourceMappingURL=index.a8c8aa0f.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/index.aa361089.js b/gradio-modified/gradio/templates/frontend/assets/index.aa361089.js new file mode 100644 index 0000000000000000000000000000000000000000..568d92c50ecf5e9df48f05e69a7ed801a9f87362 --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/index.aa361089.js @@ -0,0 +1,2 @@ +import{S as g,i as h,s as C,e as D,c as k,b as _,Y as b,f as E,m as T,j as m,k as c,n as F,o as p,F as I,a2 as K,Q as M,ad as Q,aa as Y,p as S,u as q,q as w,r as j,K as z}from"./index.396f4a72.js";import{a as G}from"./Tabs.6b500f1a.js";import{C as H}from"./Column.06c172ac.js";function J(a){let n;const s=a[5].default,t=S(s,a,a[6],null);return{c(){t&&t.c()},m(e,l){t&&t.m(e,l),n=!0},p(e,l){t&&t.p&&(!n||l&64)&&q(t,s,e,e[6],n?j(s,e[6],l,null):w(e[6]),null)},i(e){n||(m(t,e),n=!0)},o(e){c(t,e),n=!1},d(e){t&&t.d(e)}}}function L(a){let n,s,t;return s=new H({props:{$$slots:{default:[J]},$$scope:{ctx:a}}}),{c(){n=D("div"),k(s.$$.fragment),_(n,"id",a[0]),_(n,"class","tabitem p-2 border-2 border-t-0 border-gray-200 relative flex"),b(n,"display",a[2]===a[1]?"block":"none",!1)},m(e,l){E(e,n,l),T(s,n,null),t=!0},p(e,[l]){const f={};l&64&&(f.$$scope={dirty:l,ctx:e}),s.$set(f),(!t||l&1)&&_(n,"id",e[0]),l&6&&b(n,"display",e[2]===e[1]?"block":"none",!1)},i(e){t||(m(s.$$.fragment,e),t=!0)},o(e){c(s.$$.fragment,e),t=!1},d(e){e&&F(n),p(s)}}}function N(a,n,s){let t,{$$slots:e={},$$scope:l}=n,{elem_id:f=""}=n,{name:r}=n,{id:u={}}=n;const i=I(),{register_tab:A,unregister_tab:B,selected_tab:d}=K(G);return M(a,d,o=>s(2,t=o)),A({name:r,id:u}),Q(()=>()=>B({name:r,id:u})),a.$$set=o=>{"elem_id"in o&&s(0,f=o.elem_id),"name"in o&&s(4,r=o.name),"id"in o&&s(1,u=o.id),"$$scope"in o&&s(6,l=o.$$scope)},a.$$.update=()=>{a.$$.dirty&6&&t===u&&Y().then(()=>i("select"))},[f,u,t,d,r,e,l]}class O extends g{constructor(n){super(),h(this,n,N,L,C,{elem_id:0,name:4,id:1})}}function P(a){let n;const s=a[3].default,t=S(s,a,a[5],null);return{c(){t&&t.c()},m(e,l){t&&t.m(e,l),n=!0},p(e,l){t&&t.p&&(!n||l&32)&&q(t,s,e,e[5],n?j(s,e[5],l,null):w(e[5]),null)},i(e){n||(m(t,e),n=!0)},o(e){c(t,e),n=!1},d(e){t&&t.d(e)}}}function R(a){let n,s;return n=new O({props:{elem_id:a[0],name:a[1],id:a[2],$$slots:{default:[P]},$$scope:{ctx:a}}}),n.$on("select",a[4]),{c(){k(n.$$.fragment)},m(t,e){T(n,t,e),s=!0},p(t,[e]){const l={};e&1&&(l.elem_id=t[0]),e&2&&(l.name=t[1]),e&4&&(l.id=t[2]),e&32&&(l.$$scope={dirty:e,ctx:t}),n.$set(l)},i(t){s||(m(n.$$.fragment,t),s=!0)},o(t){c(n.$$.fragment,t),s=!1},d(t){p(n,t)}}}function U(a,n,s){let{$$slots:t={},$$scope:e}=n,{elem_id:l=""}=n,{label:f}=n,{id:r}=n;function u(i){z.call(this,a,i)}return a.$$set=i=>{"elem_id"in i&&s(0,l=i.elem_id),"label"in i&&s(1,f=i.label),"id"in i&&s(2,r=i.id),"$$scope"in i&&s(5,e=i.$$scope)},[l,f,r,t,u,e]}class V extends g{constructor(n){super(),h(this,n,U,R,C,{elem_id:0,label:1,id:2})}}var v=V;const y=["static"];export{v as Component,y as modes}; +//# sourceMappingURL=index.aa361089.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/index.ab6d951d.js b/gradio-modified/gradio/templates/frontend/assets/index.ab6d951d.js new file mode 100644 index 0000000000000000000000000000000000000000..9917dd55d23d0e675818307f199a0079ba119130 --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/index.ab6d951d.js @@ -0,0 +1,2 @@ +import{S as A,i as B,s as j,p as Q,e as v,a as T,b as d,d as E,f as k,l as R,u as X,q as Z,r as G,j as q,k as C,n as w,A as H,F as D,Z as J,I as M,c as N,m as V,o as W,Q as Y,X as p,t as x,h as $,aa as ee,K as te}from"./index.396f4a72.js";function le(l){let e,i,n,u,c,_,r,f,b,m;const y=l[13].default,o=Q(y,l,l[12],null);return{c(){e=v("input"),c=T(),_=v("button"),o&&o.c(),d(e,"class","hidden-upload hidden"),d(e,"accept",l[5]),d(e,"type","file"),e.multiple=i=l[3]==="multiple"||void 0,d(e,"webkitdirectory",n=l[3]==="directory"||void 0),d(e,"mozdirectory",u=l[3]==="directory"||void 0),d(_,"class",r="gr-button gr-button-"+l[2]+" "+l[6]),d(_,"id",l[0]),E(_,"!hidden",!l[1])},m(s,t){k(s,e,t),l[14](e),k(s,c,t),k(s,_,t),o&&o.m(_,null),f=!0,b||(m=[R(e,"change",l[8]),R(_,"click",l[7])],b=!0)},p(s,[t]){(!f||t&32)&&d(e,"accept",s[5]),(!f||t&8&&i!==(i=s[3]==="multiple"||void 0))&&(e.multiple=i),(!f||t&8&&n!==(n=s[3]==="directory"||void 0))&&d(e,"webkitdirectory",n),(!f||t&8&&u!==(u=s[3]==="directory"||void 0))&&d(e,"mozdirectory",u),o&&o.p&&(!f||t&4096)&&X(o,y,s,s[12],f?G(y,s[12],t,null):Z(s[12]),null),(!f||t&68&&r!==(r="gr-button gr-button-"+s[2]+" "+s[6]))&&d(_,"class",r),(!f||t&1)&&d(_,"id",s[0]),t&70&&E(_,"!hidden",!s[1])},i(s){f||(q(o,s),f=!0)},o(s){C(o,s),f=!1},d(s){s&&w(e),l[14](null),s&&w(c),s&&w(_),o&&o.d(s),b=!1,H(m)}}}function ie(l,e,i){let n,{$$slots:u={},$$scope:c}=e,{style:_={}}=e,{elem_id:r=""}=e,{visible:f=!0}=e,{size:b="lg"}=e,{file_count:m}=e,{file_types:y=["file"]}=e,{include_file_metadata:o=!0}=e,s;const t=D();let F="";try{y.forEach(a=>i(5,F+=a+"/*, "))}catch(a){if(a instanceof TypeError)t("error","Please set file_types to a list.");else throw a}const S=()=>{s.click()},I=a=>{let h=Array.from(a);if(!(!a.length||!window.FileReader)){m==="single"&&(h=[a[0]]);var g=[];h.forEach((z,O)=>{let U=new FileReader;U.readAsDataURL(z),U.onloadend=function(){g[O]=o?{name:z.name,size:z.size,data:this.result}:this.result,g.filter(P=>P!==void 0).length===a.length&&t("load",m=="single"?g[0]:g)}})}},K=a=>{const h=a.target;!h.files||I(h.files)};function L(a){M[a?"unshift":"push"](()=>{s=a,i(4,s)})}return l.$$set=a=>{"style"in a&&i(9,_=a.style),"elem_id"in a&&i(0,r=a.elem_id),"visible"in a&&i(1,f=a.visible),"size"in a&&i(2,b=a.size),"file_count"in a&&i(3,m=a.file_count),"file_types"in a&&i(10,y=a.file_types),"include_file_metadata"in a&&i(11,o=a.include_file_metadata),"$$scope"in a&&i(12,c=a.$$scope)},l.$$.update=()=>{l.$$.dirty&512&&i(6,{classes:n}=J(_,["full_width"]),n)},[r,f,b,m,s,F,n,S,K,_,y,o,c,u,L]}class ne extends A{constructor(e){super(),B(this,e,ie,le,j,{style:9,elem_id:0,visible:1,size:2,file_count:3,file_types:10,include_file_metadata:11})}}function se(l){let e=l[6](l[3])+"",i;return{c(){i=x(e)},m(n,u){k(n,i,u)},p(n,u){u&72&&e!==(e=n[6](n[3])+"")&&$(i,e)},d(n){n&&w(i)}}}function ae(l){let e,i;return e=new ne({props:{elem_id:l[1],style:l[0],visible:l[2],file_count:l[4],file_types:l[5],$$slots:{default:[se]},$$scope:{ctx:l}}}),e.$on("click",l[9]),e.$on("load",l[7]),{c(){N(e.$$.fragment)},m(n,u){V(e,n,u),i=!0},p(n,[u]){const c={};u&2&&(c.elem_id=n[1]),u&1&&(c.style=n[0]),u&4&&(c.visible=n[2]),u&16&&(c.file_count=n[4]),u&32&&(c.file_types=n[5]),u&2120&&(c.$$scope={dirty:u,ctx:n}),e.$set(c)},i(n){i||(q(e.$$.fragment,n),i=!0)},o(n){C(e.$$.fragment,n),i=!1},d(n){W(e,n)}}}function ue(l,e,i){let n;Y(l,p,t=>i(6,n=t));let{style:u={}}=e,{elem_id:c=""}=e,{visible:_=!0}=e,{label:r}=e,{value:f}=e,{file_count:b}=e,{file_types:m=["file"]}=e;async function y({detail:t}){i(8,f=t),await ee(),o("change",f),o("upload",t)}const o=D();function s(t){te.call(this,l,t)}return l.$$set=t=>{"style"in t&&i(0,u=t.style),"elem_id"in t&&i(1,c=t.elem_id),"visible"in t&&i(2,_=t.visible),"label"in t&&i(3,r=t.label),"value"in t&&i(8,f=t.value),"file_count"in t&&i(4,b=t.file_count),"file_types"in t&&i(5,m=t.file_types)},[u,c,_,r,b,m,n,y,f,s]}class fe extends A{constructor(e){super(),B(this,e,ue,ae,j,{style:0,elem_id:1,visible:2,label:3,value:8,file_count:4,file_types:5})}}var oe=fe;const ce=["static"];export{oe as Component,ce as modes}; +//# sourceMappingURL=index.ab6d951d.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/index.b43d8183.js b/gradio-modified/gradio/templates/frontend/assets/index.b43d8183.js new file mode 100644 index 0000000000000000000000000000000000000000..4fb8a721b8135fcfe849a9cd9b544874c8fdf442 --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/index.b43d8183.js @@ -0,0 +1,2 @@ +import{C as p}from"./Column.06c172ac.js";import"./index.396f4a72.js";const t=["static"];export{p as Component,t as modes}; +//# sourceMappingURL=index.b43d8183.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/index.b8aa28af.js b/gradio-modified/gradio/templates/frontend/assets/index.b8aa28af.js new file mode 100644 index 0000000000000000000000000000000000000000..45ab3edec51b1e0a4265d0c84a49033fd23ed3dd --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/index.b8aa28af.js @@ -0,0 +1,2 @@ +import{S as $,i as x,s as V,w as Q,b as d,f as y,g as j,x as F,n as C,e as L,M as O,F as he,ad as dt,I as E,ae as Ve,ak as Ze,Y as He,l as W,W as At,A as bt,a as U,ai as kt,j as w,D as K,k as I,E as Z,C as It,aa as je,J as yt,al as $e,K as ce,c as T,m as B,o as S,a8 as Re,am as Ct,d as q,B as ue,L as Y,O as H,t as be,h as Qe,P as vt,Q as Mt,X as zt,R as Tt,T as Bt,U as St,V as jt}from"./index.396f4a72.js";import{B as pt}from"./BlockLabel.37da86a3.js";import{I as De}from"./Image.4a41f1aa.js";import{C as Rt,i as Dt,U as Et,W as Lt}from"./Webcam.8816836e.js";import{I as Ee,C as Ut,M as Le}from"./ModifyUpload.2cfe71e4.js";import{U as Ft}from"./Upload.5d0148e8.js";import{E as On}from"./Image.95fa511c.js";function Nt(t){let e,n,i;return{c(){e=Q("svg"),n=Q("path"),i=Q("path"),d(n,"d","M28.828 3.172a4.094 4.094 0 0 0-5.656 0L4.05 22.292A6.954 6.954 0 0 0 2 27.242V30h2.756a6.952 6.952 0 0 0 4.95-2.05L28.828 8.829a3.999 3.999 0 0 0 0-5.657zM10.91 18.26l2.829 2.829l-2.122 2.121l-2.828-2.828zm-2.619 8.276A4.966 4.966 0 0 1 4.756 28H4v-.759a4.967 4.967 0 0 1 1.464-3.535l1.91-1.91l2.829 2.828zM27.415 7.414l-12.261 12.26l-2.829-2.828l12.262-12.26a2.047 2.047 0 0 1 2.828 0a2 2 0 0 1 0 2.828z"),d(n,"fill","currentColor"),d(i,"d","M6.5 15a3.5 3.5 0 0 1-2.475-5.974l3.5-3.5a1.502 1.502 0 0 0 0-2.121a1.537 1.537 0 0 0-2.121 0L3.415 5.394L2 3.98l1.99-1.988a3.585 3.585 0 0 1 4.95 0a3.504 3.504 0 0 1 0 4.949L5.439 10.44a1.502 1.502 0 0 0 0 2.121a1.537 1.537 0 0 0 2.122 0l4.024-4.024L13 9.95l-4.025 4.024A3.475 3.475 0 0 1 6.5 15z"),d(i,"fill","currentColor"),d(e,"width","100%"),d(e,"height","100%"),d(e,"viewBox","0 0 32 32")},m(l,s){y(l,e,s),j(e,n),j(e,i)},p:F,i:F,o:F,d(l){l&&C(e)}}}class qt extends ${constructor(e){super(),x(this,e,null,Nt,V,{})}}function Ot(t){let e,n,i,l,s,r,o;return{c(){e=Q("svg"),n=Q("circle"),i=Q("circle"),l=Q("circle"),s=Q("circle"),r=Q("circle"),o=Q("path"),d(n,"cx","10"),d(n,"cy","12"),d(n,"r","2"),d(n,"fill","currentColor"),d(i,"cx","16"),d(i,"cy","9"),d(i,"r","2"),d(i,"fill","currentColor"),d(l,"cx","22"),d(l,"cy","12"),d(l,"r","2"),d(l,"fill","currentColor"),d(s,"cx","23"),d(s,"cy","18"),d(s,"r","2"),d(s,"fill","currentColor"),d(r,"cx","19"),d(r,"cy","23"),d(r,"r","2"),d(r,"fill","currentColor"),d(o,"fill","currentColor"),d(o,"d","M16.54 2A14 14 0 0 0 2 16a4.82 4.82 0 0 0 6.09 4.65l1.12-.31a3 3 0 0 1 3.79 2.9V27a3 3 0 0 0 3 3a14 14 0 0 0 14-14.54A14.05 14.05 0 0 0 16.54 2Zm8.11 22.31A11.93 11.93 0 0 1 16 28a1 1 0 0 1-1-1v-3.76a5 5 0 0 0-5-5a5.07 5.07 0 0 0-1.33.18l-1.12.31A2.82 2.82 0 0 1 4 16A12 12 0 0 1 16.47 4A12.18 12.18 0 0 1 28 15.53a11.89 11.89 0 0 1-3.35 8.79Z"),d(e,"width","100%"),d(e,"height","100%"),d(e,"viewBox","0 0 32 32")},m(u,g){y(u,e,g),j(e,n),j(e,i),j(e,l),j(e,s),j(e,r),j(e,o)},p:F,i:F,o:F,d(u){u&&C(e)}}}class Wt extends ${constructor(e){super(),x(this,e,null,Ot,V,{})}}function Pt(t){let e,n;return{c(){e=Q("svg"),n=Q("path"),d(n,"d","M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"),d(e,"xmlns","http://www.w3.org/2000/svg"),d(e,"width","100%"),d(e,"height","100%"),d(e,"viewBox","0 0 24 24"),d(e,"fill","none"),d(e,"stroke","currentColor"),d(e,"stroke-width","1.5"),d(e,"stroke-linecap","round"),d(e,"stroke-linejoin","round"),d(e,"class","feather feather-edit-2")},m(i,l){y(i,e,l),j(e,n)},p:F,i:F,o:F,d(i){i&&C(e)}}}class xe extends ${constructor(e){super(),x(this,e,null,Pt,V,{})}}function Jt(t){let e,n;return{c(){e=L("img"),O(e.src,n=t[0])||d(e,"src",n),d(e,"alt","")},m(i,l){y(i,e,l),t[2](e)},p(i,[l]){l&1&&!O(e.src,n=i[0])&&d(e,"src",n)},i:F,o:F,d(i){i&&C(e),t[2](null)}}}function Yt(t,e,n){let{image:i}=e,l;const s=he();dt(()=>{const o=new Rt(l,{autoCropArea:1,cropend(){const u=o.getCroppedCanvas().toDataURL();s("crop",u)}});return s("crop",i),()=>{o.destroy()}});function r(o){E[o?"unshift":"push"](()=>{l=o,n(1,l)})}return t.$$set=o=>{"image"in o&&n(0,i=o.image)},[i,l,r]}class wt extends ${constructor(e){super(),x(this,e,Yt,Jt,V,{image:0})}}class et{constructor(e,n){this.x=e,this.y=n}}class tt extends et{update(e){this.x=e.x,this.y=e.y}moveByAngle(e,n){const i=e+Math.PI/2;this.x=this.x+Math.sin(i)*n,this.y=this.y-Math.cos(i)*n}equalsTo(e){return this.x===e.x&&this.y===e.y}getDifferenceTo(e){return new et(this.x-e.x,this.y-e.y)}getDistanceTo(e){const n=this.getDifferenceTo(e);return Math.sqrt(Math.pow(n.x,2)+Math.pow(n.y,2))}getAngleTo(e){const n=this.getDifferenceTo(e);return Math.atan2(n.y,n.x)}toObject(){return{x:this.x,y:this.y}}}const Ht=30;class Qt{constructor({radius:e=Ht,enabled:n=!0,initialPoint:i={x:0,y:0}}={}){this.radius=e,this._isEnabled=n,this.pointer=new tt(i.x,i.y),this.brush=new tt(i.x,i.y),this.angle=0,this.distance=0,this._hasMoved=!1}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}isEnabled(){return this._isEnabled}setRadius(e){this.radius=e}getRadius(){return this.radius}getBrushCoordinates(){return this.brush.toObject()}getPointerCoordinates(){return this.pointer.toObject()}getBrush(){return this.brush}getPointer(){return this.pointer}getAngle(){return this.angle}getDistance(){return this.distance}brushHasMoved(){return this._hasMoved}update(e,{both:n=!1}={}){return this._hasMoved=!1,this.pointer.equalsTo(e)&&!n?!1:(this.pointer.update(e),n?(this._hasMoved=!0,this.brush.update(e),!0):(this._isEnabled?(this.distance=this.pointer.getDistanceTo(this.brush),this.angle=this.pointer.getAngleTo(this.brush),this.distance>this.radius&&(this.brush.moveByAngle(this.angle,this.distance-this.radius),this._hasMoved=!0)):(this.distance=0,this.angle=0,this.brush.update(e),this._hasMoved=!0),!0))}}function nt(t,e,n){const i=t.slice();return i[56]=e[n].name,i[57]=e[n].zIndex,i[58]=e,i[59]=n,i}function it(t){let e,n,i;return{c(){e=L("div"),e.textContent="Start drawing",d(e,"class","absolute inset-0 flex items-center justify-center z-40 pointer-events-none touch-none text-gray-400 md:text-xl")},m(l,s){y(l,e,s),i=!0},i(l){i||(Ve(()=>{n||(n=Ze(e,$e,{duration:50},!0)),n.run(1)}),i=!0)},o(l){n||(n=Ze(e,$e,{duration:50},!1)),n.run(0),i=!1},d(l){l&&C(e),l&&n&&n.end()}}}function lt(t){let e,n,i=t[56],l,s;const r=()=>t[27](e,i),o=()=>t[27](null,i);return{c(){e=L("canvas"),d(e,"key",n=t[56]),d(e,"class","inset-0 m-auto hover:cursor-none"),He(e,"display","block"),He(e,"position","absolute"),He(e,"z-index",t[57])},m(u,g){y(u,e,g),r(),l||(s=[W(e,"mousedown",t[56]==="interface"?t[6]:void 0),W(e,"mousemove",t[56]==="interface"?t[7]:void 0),W(e,"mouseup",t[56]==="interface"?t[8]:void 0),W(e,"mouseout",t[56]==="interface"?t[8]:void 0),W(e,"blur",t[56]==="interface"?t[8]:void 0),W(e,"touchstart",t[56]==="interface"?t[6]:void 0),W(e,"touchmove",t[56]==="interface"?t[7]:void 0),W(e,"touchend",t[56]==="interface"?t[8]:void 0),W(e,"touchcancel",t[56]==="interface"?t[8]:void 0),W(e,"click",At(t[26]))],l=!0)},p(u,g){t=u,i!==t[56]&&(o(),i=t[56],r())},d(u){u&&C(e),o(),l=!1,bt(s)}}}function Vt(t){let e,n,i,l,s=t[4]===0&&it(),r=t[5],o=[];for(let u=0;ut[29].call(e))},m(u,g){y(u,e,g),s&&s.m(e,null),j(e,n);for(let _=0;_{s=null}),Z()),g[0]&481){r=u[5];let _;for(_=0;_{Object.keys(z).forEach(c=>{n(23,b[c]=z[c].getContext("2d"),b)}),await je(),r&&(r.addEventListener("load",c=>{_==="webcam"?(b.temp.save(),b.temp.translate(m,0),b.temp.scale(-1,1),b.temp.drawImage(r,0,0),b.temp.restore()):b.temp.drawImage(r,0,0),b.drawing.drawImage(z.temp,0,0,m,a),se()}),setTimeout(()=>{_==="webcam"?(b.temp.save(),b.temp.translate(m,0),b.temp.scale(-1,1),b.temp.drawImage(r,0,0),b.temp.restore()):b.temp.drawImage(r,0,0),b.drawing.drawImage(z.temp,0,0,m,a),me({lines:J.slice()}),se()},100)),n(25,k=new Qt({radius:g*.05,enabled:!0,initialPoint:{x:m/2,y:a/2}})),ae=new Dt((c,v,...M)=>{Ie(c,v)}),ae.observe(X),ge(),n(21,p=!0),requestAnimationFrame(()=>{re(),requestAnimationFrame(()=>{_e()})})});function re(){const c=m/2,v=a/2;k.update({x:c,y:v},{both:!0}),k.update({x:c,y:v},{both:!1}),te=!0,ne=!0}yt(()=>{n(21,p=!1),ae.unobserve(X)});function Ue(){const c=J.slice(0,-1);Be(),r&&(_==="webcam"?(b.temp.save(),b.temp.translate(m,0),b.temp.scale(-1,1),b.temp.drawImage(r,0,0),b.temp.restore()):b.temp.drawImage(r,0,0),(!J||!J.length)&&b.drawing.drawImage(z.temp,0,0,m,a)),me({lines:c}),n(4,le=c.length),J.length&&n(24,J=c),se()}let me=({lines:c})=>{c.forEach(v=>{const{points:M,brush_color:h,brush_radius:R}=v;ve({points:M,brush_color:h,brush_radius:R}),o==="mask"&&Me({points:M,brush_color:h,brush_radius:R}),P=M}),Te({brush_color:u,brush_radius:g}),o==="mask"&&ze()},Fe=c=>{c.preventDefault(),N=!0;const{x:v,y:M}=ye(c);c.touches&&c.touches.length>0&&k.update({x:v,y:M},{both:!0}),Ce(v,M),n(4,le+=1)},ke=c=>{c.preventDefault();const{x:v,y:M}=ye(c);Ce(v,M)},Ne=c=>{c.preventDefault(),ke(c),ie=!1,N=!1,Te(),o==="mask"&&ze()},pe=0,we=0,Ae=0,Ie=async()=>{if(m===pe&&a===we&&Ae===f)return;const c={width:m,height:a},v={height:f,width:f*(c.width/c.height)};await Promise.all([fe(z.interface,c,v),fe(z.drawing,c,v),fe(z.temp,c,v),fe(z.temp_fake,c,v),fe(z.mask,c,v,!1)]),n(9,g=4*(c.width/v.width)),ge({once:!0}),setTimeout(()=>{we=a,pe=m,Ae=f},100),_e()},fe=async(c,v,M,h=!0)=>{if(!p)return;await je();const R=window.devicePixelRatio||1;c.width=v.width*(h?R:1),c.height=v.height*(h?R:1);const G=c.getContext("2d");h&&G.scale(R,R),c.style.width=`${M.width}px`,c.style.height=`${M.height}px`},ye=c=>{const v=z.interface.getBoundingClientRect();let M=c.clientX,h=c.clientY;return c.changedTouches&&c.changedTouches.length>0&&(M=c.changedTouches[0].clientX,h=c.changedTouches[0].clientY),{x:(M-v.left)/v.width*m,y:(h-v.top)/v.height*a}},Ce=(c,v)=>{k.update({x:c,y:v});const M=!k.isEnabled();(N&&!ie||M&&N)&&(ie=!0,P.push(k.brush.toObject())),ie&&(P.push(k.brush.toObject()),ve({points:P,brush_color:u,brush_radius:g}),o==="mask"&&Me({points:P,brush_color:u,brush_radius:g})),te=!0},ve=({points:c,brush_color:v,brush_radius:M})=>{if(!c||c.length<2||(n(23,b.temp.lineJoin="round",b),n(23,b.temp.lineCap="round",b),n(23,b.temp.strokeStyle=v,b),n(23,b.temp.lineWidth=M,b),!c||c.length<2))return;let h=c[0],R=c[1];b.temp.moveTo(R.x,R.y),b.temp.beginPath();for(var G=1,Ye=c.length;G{if(!c||c.length<2)return;n(23,b.temp_fake.lineJoin="round",b),n(23,b.temp_fake.lineCap="round",b),n(23,b.temp_fake.strokeStyle=v,b),n(23,b.temp_fake.lineWidth=M,b);let h=c[0],R=c[1];b.temp_fake.moveTo(R.x,R.y),b.temp_fake.beginPath();for(var G=1,Ye=c.length;G{P.length<1||(P.length=0,b.mask.drawImage(z.temp_fake,0,0,m,a),se())},Te=()=>{P.length<1||(J.push({points:P.slice(),brush_color:u,brush_radius:g}),o!=="mask"&&(P.length=0),b.drawing.drawImage(z.temp,0,0,m,a),se())},se=()=>{const c=Se();l("change",c)};function _e(){return n(24,J=[]),Be(),n(4,le=0),!0}function Be(){ne=!0,b.temp.clearRect(0,0,m,a),n(23,b.temp.fillStyle=o==="mask"?"transparent":"#FFFFFF",b),b.temp.fillRect(0,0,m,a),o==="mask"&&(b.temp_fake.clearRect(0,0,z.temp_fake.width,z.temp_fake.height),b.mask.clearRect(0,0,m,a),n(23,b.mask.fillStyle="transparent",b),b.mask.fillRect(0,0,m,a))}let ge=({once:c=!1}={})=>{if(te||ne){const v=k.getPointerCoordinates(),M=k.getBrushCoordinates();qe(b.interface,v,M),te=!1,ne=!1}c||window.requestAnimationFrame(()=>{ge()})},qe=(c,v,M)=>{c.clearRect(0,0,m,a),c.beginPath(),c.fillStyle=u,c.arc(M.x,M.y,g/2,0,Math.PI*2,!0),c.fill(),c.beginPath(),c.fillStyle=Xt,c.arc(M.x,M.y,i,0,Math.PI*2,!0),c.fill()};function Se(){return o==="mask"?z.mask.toDataURL("image/png"):z.drawing.toDataURL("image/png")}function Oe(c){ce.call(this,t,c)}function We(c,v){E[c?"unshift":"push"](()=>{z[v]=c,n(0,z)})}function Pe(c){E[c?"unshift":"push"](()=>{X=c,n(3,X)})}function Je(){A=this.offsetWidth,D=this.offsetHeight,n(1,A),n(2,D)}return t.$$set=c=>{"value"in c&&n(10,s=c.value),"value_img"in c&&n(11,r=c.value_img),"mode"in c&&n(12,o=c.mode),"brush_color"in c&&n(13,u=c.brush_color),"brush_radius"in c&&n(9,g=c.brush_radius),"source"in c&&n(14,_=c.source),"width"in c&&n(15,m=c.width),"height"in c&&n(16,a=c.height),"container_height"in c&&n(17,f=c.container_height)},t.$$.update=()=>{t.$$.dirty[0]&2098176&&p&&!s&&_e(),t.$$.dirty[0]&31574017&&p&&r!==ee&&(n(22,ee=r),_e(),setTimeout(()=>{_==="webcam"?(b.temp.save(),b.temp.translate(m,0),b.temp.scale(-1,1),b.temp.drawImage(r,0,0),b.temp.restore()):b.temp.drawImage(r,0,0),b.drawing.drawImage(z.temp,0,0,m,a),me({lines:J.slice()}),se()},50)),t.$$.dirty[0]&33554944&&k&&(re(),k.setRadius(g*.05)),t.$$.dirty[0]&98304&&(m||a)&&Ie(),t.$$.dirty[0]&512&&(i=g*.075)},[z,A,D,X,le,oe,Fe,ke,Ne,g,s,r,o,u,_,m,a,f,Ue,_e,Se,p,ee,b,J,k,Oe,We,Pe,Je]}class Xe extends ${constructor(e){super(),x(this,e,Gt,Vt,V,{value:10,value_img:11,mode:12,brush_color:13,brush_radius:9,source:14,width:15,height:16,container_height:17,undo:18,clear:19,get_image_data:20},null,[-1,-1])}get undo(){return this.$$.ctx[18]}get clear(){return this.$$.ctx[19]}get get_image_data(){return this.$$.ctx[20]}}function Kt(t){let e,n,i,l,s;return n=new Ee({props:{Icon:Et,label:"Undo"}}),n.$on("click",t[1]),l=new Ee({props:{Icon:Ut,label:"Clear"}}),l.$on("click",t[2]),{c(){e=L("div"),T(n.$$.fragment),i=U(),T(l.$$.fragment),d(e,"class","z-50 top-2 right-2 justify-end flex gap-1 absolute")},m(r,o){y(r,e,o),B(n,e,null),j(e,i),B(l,e,null),s=!0},p:F,i(r){s||(w(n.$$.fragment,r),w(l.$$.fragment,r),s=!0)},o(r){I(n.$$.fragment,r),I(l.$$.fragment,r),s=!1},d(r){r&&C(e),S(n),S(l)}}}function Zt(t){const e=he();return[e,()=>e("undo"),l=>{e("clear"),l.stopPropagation()}]}class Ge extends ${constructor(e){super(),x(this,e,Zt,Kt,V,{})}}function st(t){let e,n,i,l,s;return{c(){e=L("input"),d(e,"aria-label","Brush radius"),d(e,"class","absolute top-[2px] right-6"),d(e,"type","range"),d(e,"min",n=.5*(t[2]/t[5])),d(e,"max",i=75*(t[2]/t[5]))},m(r,o){y(r,e,o),Re(e,t[0]),l||(s=[W(e,"change",t[10]),W(e,"input",t[10])],l=!0)},p(r,o){o&36&&n!==(n=.5*(r[2]/r[5]))&&d(e,"min",n),o&36&&i!==(i=75*(r[2]/r[5]))&&d(e,"max",i),o&1&&Re(e,r[0])},d(r){r&&C(e),l=!1,bt(s)}}}function $t(t){let e,n,i,l;n=new Ee({props:{Icon:Wt,label:"Select brush color"}}),n.$on("click",t[11]);let s=t[4]&&ut(t);return{c(){e=L("span"),T(n.$$.fragment),i=U(),s&&s.c(),d(e,"class","absolute top-6 right-0")},m(r,o){y(r,e,o),B(n,e,null),j(e,i),s&&s.m(e,null),l=!0},p(r,o){r[4]?s?s.p(r,o):(s=ut(r),s.c(),s.m(e,null)):s&&(s.d(1),s=null)},i(r){l||(w(n.$$.fragment,r),l=!0)},o(r){I(n.$$.fragment,r),l=!1},d(r){r&&C(e),S(n),s&&s.d()}}}function ut(t){let e,n,i;return{c(){e=L("input"),d(e,"aria-label","Brush color"),d(e,"class","absolute top-[-3px] right-6"),d(e,"type","color")},m(l,s){y(l,e,s),Re(e,t[1]),n||(i=W(e,"input",t[12]),n=!0)},p(l,s){s&2&&Re(e,l[1])},d(l){l&&C(e),n=!1,i()}}}function xt(t){let e,n,i,l,s,r;i=new Ee({props:{Icon:qt,label:"Use brush"}}),i.$on("click",t[9]);let o=t[3]&&st(t),u=$t(t);return{c(){e=L("div"),n=L("span"),T(i.$$.fragment),l=U(),o&&o.c(),s=U(),u&&u.c(),d(n,"class","absolute top-0 right-0"),d(e,"class","z-50 top-10 right-2 justify-end flex gap-1 absolute")},m(g,_){y(g,e,_),j(e,n),B(i,n,null),j(n,l),o&&o.m(n,null),j(e,s),u&&u.m(e,null),r=!0},p(g,[_]){g[3]?o?o.p(g,_):(o=st(g),o.c(),o.m(n,null)):o&&(o.d(1),o=null),u.p(g,_)},i(g){r||(w(i.$$.fragment,g),w(u),r=!0)},o(g){I(i.$$.fragment,g),I(u),r=!1},d(g){g&&C(e),S(i),o&&o.d(),u&&u.d()}}}function en(t,e,n){let i;he();let l=!1,s=!1,{brush_radius:r=20}=e,{brush_color:o="#000"}=e,{container_height:u}=e,{img_width:g}=e,{img_height:_}=e,{mode:m="other"}=e;const a=()=>n(3,l=!l);function f(){r=Ct(this.value),n(0,r)}const p=()=>n(4,s=!s);function A(){o=this.value,n(1,o)}return t.$$set=D=>{"brush_radius"in D&&n(0,r=D.brush_radius),"brush_color"in D&&n(1,o=D.brush_color),"container_height"in D&&n(6,u=D.container_height),"img_width"in D&&n(2,g=D.img_width),"img_height"in D&&n(7,_=D.img_height),"mode"in D&&n(8,m=D.mode)},t.$$.update=()=>{t.$$.dirty&196&&n(5,i=u*(g/_))},[r,o,g,l,s,i,u,_,m,a,f,p,A]}class Ke extends ${constructor(e){super(),x(this,e,en,xt,V,{brush_radius:0,brush_color:1,container_height:6,img_width:2,img_height:7,mode:8})}}function tn(t){let e,n;return{c(){e=L("img"),d(e,"class","w-full h-full object-contain"),O(e.src,n=t[0].image||t[0])||d(e,"src",n),d(e,"alt",""),q(e,"scale-x-[-1]",t[4]==="webcam"&&t[10])},m(i,l){y(i,e,l)},p(i,l){l[0]&1&&!O(e.src,n=i[0].image||i[0])&&d(e,"src",n),l[0]&1040&&q(e,"scale-x-[-1]",i[4]==="webcam"&&i[10])},i:F,o:F,d(i){i&&C(e)}}}function nn(t){let e=t[21],n,i,l,s=ot(t),r=t[15]>0&&at(t);return{c(){s.c(),n=U(),r&&r.c(),i=ue()},m(o,u){s.m(o,u),y(o,n,u),r&&r.m(o,u),y(o,i,u),l=!0},p(o,u){u[0]&2097152&&V(e,e=o[21])?(s.d(1),s=ot(o),s.c(),s.m(n.parentNode,n)):s.p(o,u),o[15]>0?r?(r.p(o,u),u[0]&32768&&w(r,1)):(r=at(o),r.c(),w(r,1),r.m(i.parentNode,i)):r&&(K(),I(r,1,1,()=>{r=null}),Z())},i(o){l||(w(r),l=!0)},o(o){I(r),l=!1},d(o){s.d(o),o&&C(n),r&&r.d(o),o&&C(i)}}}function ln(t){let e,n,i,l,s;return e=new Le({props:{editable:!0}}),e.$on("edit",t[48]),e.$on("clear",t[24]),{c(){T(e.$$.fragment),n=U(),i=L("img"),d(i,"class","w-full h-full object-contain"),O(i.src,l=t[0])||d(i,"src",l),d(i,"alt",""),q(i,"scale-x-[-1]",t[4]==="webcam"&&t[10])},m(r,o){B(e,r,o),y(r,n,o),y(r,i,o),s=!0},p(r,o){(!s||o[0]&1&&!O(i.src,l=r[0]))&&d(i,"src",l),o[0]&1040&&q(i,"scale-x-[-1]",r[4]==="webcam"&&r[10])},i(r){s||(w(e.$$.fragment,r),s=!0)},o(r){I(e.$$.fragment,r),s=!1},d(r){S(e,r),r&&C(n),r&&C(i)}}}function rn(t){let e,n,i,l;return e=new wt({props:{image:t[0]}}),e.$on("crop",t[25]),i=new Le({}),i.$on("clear",t[47]),{c(){T(e.$$.fragment),n=U(),T(i.$$.fragment)},m(s,r){B(e,s,r),y(s,n,r),B(i,s,r),l=!0},p(s,r){const o={};r[0]&1&&(o.image=s[0]),e.$set(o)},i(s){l||(w(e.$$.fragment,s),w(i.$$.fragment,s),l=!0)},o(s){I(e.$$.fragment,s),I(i.$$.fragment,s),l=!1},d(s){S(e,s),s&&C(n),S(i,s)}}}function sn(t){let e,n,i=t[4]==="webcam"&&!t[21]&&_t(t);return{c(){i&&i.c(),e=ue()},m(l,s){i&&i.m(l,s),y(l,e,s),n=!0},p(l,s){l[4]==="webcam"&&!l[21]?i?(i.p(l,s),s[0]&2097168&&w(i,1)):(i=_t(l),i.c(),w(i,1),i.m(e.parentNode,e)):i&&(K(),I(i,1,1,()=>{i=null}),Z())},i(l){n||(w(i),n=!0)},o(l){I(i),n=!1},d(l){i&&i.d(l),l&&C(e)}}}function un(t){let e,n,i,l,s,r,o;e=new Ge({}),e.$on("undo",t[38]),e.$on("clear",t[39]);let u=t[1]==="color-sketch"&&ct(t);function g(a){t[42](a)}function _(a){t[43](a)}let m={value:t[0],mode:t[12],width:t[15]||t[20],height:t[14]||t[19],container_height:t[16]||t[19]};return t[17]!==void 0&&(m.brush_radius=t[17]),t[22]!==void 0&&(m.brush_color=t[22]),l=new Xe({props:m}),E.push(()=>H(l,"brush_radius",g)),E.push(()=>H(l,"brush_color",_)),t[44](l),l.$on("change",t[25]),{c(){T(e.$$.fragment),n=U(),u&&u.c(),i=U(),T(l.$$.fragment)},m(a,f){B(e,a,f),y(a,n,f),u&&u.m(a,f),y(a,i,f),B(l,a,f),o=!0},p(a,f){a[1]==="color-sketch"?u?(u.p(a,f),f[0]&2&&w(u,1)):(u=ct(a),u.c(),w(u,1),u.m(i.parentNode,i)):u&&(K(),I(u,1,1,()=>{u=null}),Z());const p={};f[0]&1&&(p.value=a[0]),f[0]&4096&&(p.mode=a[12]),f[0]&1081344&&(p.width=a[15]||a[20]),f[0]&540672&&(p.height=a[14]||a[19]),f[0]&589824&&(p.container_height=a[16]||a[19]),!s&&f[0]&131072&&(s=!0,p.brush_radius=a[17],Y(()=>s=!1)),!r&&f[0]&4194304&&(r=!0,p.brush_color=a[22],Y(()=>r=!1)),l.$set(p)},i(a){o||(w(e.$$.fragment,a),w(u),w(l.$$.fragment,a),o=!0)},o(a){I(e.$$.fragment,a),I(u),I(l.$$.fragment,a),o=!1},d(a){S(e,a),a&&C(n),u&&u.d(a),a&&C(i),t[44](null),S(l,a)}}}function on(t){let e,n,i;function l(r){t[37](r)}let s={filetype:"image/x-png,image/gif,image/jpeg",include_file_metadata:!1,disable_click:!!t[0],$$slots:{default:[mn]},$$scope:{ctx:t}};return t[11]!==void 0&&(s.dragging=t[11]),e=new Ft({props:s}),E.push(()=>H(e,"dragging",l)),e.$on("load",t[23]),{c(){T(e.$$.fragment)},m(r,o){B(e,r,o),i=!0},p(r,o){const u={};o[0]&1&&(u.disable_click=!!r[0]),o[0]&8386035|o[1]&134217728&&(u.$$scope={dirty:o,ctx:r}),!n&&o[0]&2048&&(n=!0,u.dragging=r[11],Y(()=>n=!1)),e.$set(u)},i(r){i||(w(e.$$.fragment,r),i=!0)},o(r){I(e.$$.fragment,r),i=!1},d(r){S(e,r)}}}function ot(t){let e,n,i,l;return{c(){e=L("img"),d(e,"class","absolute w-full h-full object-contain"),O(e.src,n=t[21]||t[0]?.image||t[0])||d(e,"src",n),d(e,"alt",""),q(e,"scale-x-[-1]",t[4]==="webcam"&&t[10])},m(s,r){y(s,e,r),t[49](e),i||(l=W(e,"load",t[26]),i=!0)},p(s,r){r[0]&2097153&&!O(e.src,n=s[21]||s[0]?.image||s[0])&&d(e,"src",n),r[0]&1040&&q(e,"scale-x-[-1]",s[4]==="webcam"&&s[10])},d(s){s&&C(e),t[49](null),i=!1,l()}}}function at(t){let e,n,i,l,s,r,o,u;function g(f){t[51](f)}function _(f){t[52](f)}let m={value:t[0],mode:t[12],width:t[15]||t[20],height:t[14]||t[19],container_height:t[16]||t[19],value_img:t[18],source:t[4]};t[17]!==void 0&&(m.brush_radius=t[17]),t[22]!==void 0&&(m.brush_color=t[22]),e=new Xe({props:m}),t[50](e),E.push(()=>H(e,"brush_radius",g)),E.push(()=>H(e,"brush_color",_)),e.$on("change",t[25]),s=new Ge({}),s.$on("undo",t[53]),s.$on("clear",t[27]);let a=(t[1]==="color-sketch"||t[1]==="sketch")&&ft(t);return{c(){T(e.$$.fragment),l=U(),T(s.$$.fragment),r=U(),a&&a.c(),o=ue()},m(f,p){B(e,f,p),y(f,l,p),B(s,f,p),y(f,r,p),a&&a.m(f,p),y(f,o,p),u=!0},p(f,p){const A={};p[0]&1&&(A.value=f[0]),p[0]&4096&&(A.mode=f[12]),p[0]&1081344&&(A.width=f[15]||f[20]),p[0]&540672&&(A.height=f[14]||f[19]),p[0]&589824&&(A.container_height=f[16]||f[19]),p[0]&262144&&(A.value_img=f[18]),p[0]&16&&(A.source=f[4]),!n&&p[0]&131072&&(n=!0,A.brush_radius=f[17],Y(()=>n=!1)),!i&&p[0]&4194304&&(i=!0,A.brush_color=f[22],Y(()=>i=!1)),e.$set(A),f[1]==="color-sketch"||f[1]==="sketch"?a?(a.p(f,p),p[0]&2&&w(a,1)):(a=ft(f),a.c(),w(a,1),a.m(o.parentNode,o)):a&&(K(),I(a,1,1,()=>{a=null}),Z())},i(f){u||(w(e.$$.fragment,f),w(s.$$.fragment,f),w(a),u=!0)},o(f){I(e.$$.fragment,f),I(s.$$.fragment,f),I(a),u=!1},d(f){t[50](null),S(e,f),f&&C(l),S(s,f),f&&C(r),a&&a.d(f),f&&C(o)}}}function ft(t){let e,n,i,l;function s(u){t[54](u)}function r(u){t[55](u)}let o={container_height:t[16]||t[19],img_width:t[15]||t[20],img_height:t[14]||t[19],mode:t[12]};return t[17]!==void 0&&(o.brush_radius=t[17]),t[22]!==void 0&&(o.brush_color=t[22]),e=new Ke({props:o}),E.push(()=>H(e,"brush_radius",s)),E.push(()=>H(e,"brush_color",r)),{c(){T(e.$$.fragment)},m(u,g){B(e,u,g),l=!0},p(u,g){const _={};g[0]&589824&&(_.container_height=u[16]||u[19]),g[0]&1081344&&(_.img_width=u[15]||u[20]),g[0]&540672&&(_.img_height=u[14]||u[19]),g[0]&4096&&(_.mode=u[12]),!n&&g[0]&131072&&(n=!0,_.brush_radius=u[17],Y(()=>n=!1)),!i&&g[0]&4194304&&(i=!0,_.brush_color=u[22],Y(()=>i=!1)),e.$set(_)},i(u){l||(w(e.$$.fragment,u),l=!0)},o(u){I(e.$$.fragment,u),l=!1},d(u){S(e,u)}}}function _t(t){let e,n;return e=new Lt({props:{streaming:t[8],pending:t[9],mirror_webcam:t[10]}}),e.$on("capture",t[45]),e.$on("stream",t[25]),e.$on("error",t[46]),{c(){T(e.$$.fragment)},m(i,l){B(e,i,l),n=!0},p(i,l){const s={};l[0]&256&&(s.streaming=i[8]),l[0]&512&&(s.pending=i[9]),l[0]&1024&&(s.mirror_webcam=i[10]),e.$set(s)},i(i){n||(w(e.$$.fragment,i),n=!0)},o(i){I(e.$$.fragment,i),n=!1},d(i){S(e,i)}}}function ct(t){let e,n,i,l;function s(u){t[40](u)}function r(u){t[41](u)}let o={container_height:t[16]||t[19],img_width:t[15]||t[20],img_height:t[14]||t[19]};return t[17]!==void 0&&(o.brush_radius=t[17]),t[22]!==void 0&&(o.brush_color=t[22]),e=new Ke({props:o}),E.push(()=>H(e,"brush_radius",s)),E.push(()=>H(e,"brush_color",r)),{c(){T(e.$$.fragment)},m(u,g){B(e,u,g),l=!0},p(u,g){const _={};g[0]&589824&&(_.container_height=u[16]||u[19]),g[0]&1081344&&(_.img_width=u[15]||u[20]),g[0]&540672&&(_.img_height=u[14]||u[19]),!n&&g[0]&131072&&(n=!0,_.brush_radius=u[17],Y(()=>n=!1)),!i&&g[0]&4194304&&(i=!0,_.brush_color=u[22],Y(()=>i=!1)),e.$set(_)},i(u){l||(w(e.$$.fragment,u),l=!0)},o(u){I(e.$$.fragment,u),l=!1},d(u){S(e,u)}}}function an(t){let e,n;return{c(){e=L("img"),d(e,"class","w-full h-full object-contain"),O(e.src,n=t[0].image||t[0])||d(e,"src",n),d(e,"alt",""),q(e,"scale-x-[-1]",t[4]==="webcam"&&t[10])},m(i,l){y(i,e,l)},p(i,l){l[0]&1&&!O(e.src,n=i[0].image||i[0])&&d(e,"src",n),l[0]&1040&&q(e,"scale-x-[-1]",i[4]==="webcam"&&i[10])},i:F,o:F,d(i){i&&C(e)}}}function fn(t){let e=t[21],n,i,l,s=ht(t),r=t[15]>0&&mt(t);return{c(){s.c(),n=U(),r&&r.c(),i=ue()},m(o,u){s.m(o,u),y(o,n,u),r&&r.m(o,u),y(o,i,u),l=!0},p(o,u){u[0]&2097152&&V(e,e=o[21])?(s.d(1),s=ht(o),s.c(),s.m(n.parentNode,n)):s.p(o,u),o[15]>0?r?(r.p(o,u),u[0]&32768&&w(r,1)):(r=mt(o),r.c(),w(r,1),r.m(i.parentNode,i)):r&&(K(),I(r,1,1,()=>{r=null}),Z())},i(o){l||(w(r),l=!0)},o(o){I(r),l=!1},d(o){s.d(o),o&&C(n),r&&r.d(o),o&&C(i)}}}function _n(t){let e,n,i,l,s;return e=new Le({props:{editable:!0}}),e.$on("edit",t[29]),e.$on("clear",t[24]),{c(){T(e.$$.fragment),n=U(),i=L("img"),d(i,"class","w-full h-full object-contain"),O(i.src,l=t[0])||d(i,"src",l),d(i,"alt",""),q(i,"scale-x-[-1]",t[4]==="webcam"&&t[10])},m(r,o){B(e,r,o),y(r,n,o),y(r,i,o),s=!0},p(r,o){(!s||o[0]&1&&!O(i.src,l=r[0]))&&d(i,"src",l),o[0]&1040&&q(i,"scale-x-[-1]",r[4]==="webcam"&&r[10])},i(r){s||(w(e.$$.fragment,r),s=!0)},o(r){I(e.$$.fragment,r),s=!1},d(r){S(e,r),r&&C(n),r&&C(i)}}}function cn(t){let e,n,i,l;return e=new wt({props:{image:t[0]}}),e.$on("crop",t[25]),i=new Le({}),i.$on("clear",t[28]),{c(){T(e.$$.fragment),n=U(),T(i.$$.fragment)},m(s,r){B(e,s,r),y(s,n,r),B(i,s,r),l=!0},p(s,r){const o={};r[0]&1&&(o.image=s[0]),e.$set(o)},i(s){l||(w(e.$$.fragment,s),w(i.$$.fragment,s),l=!0)},o(s){I(e.$$.fragment,s),I(i.$$.fragment,s),l=!1},d(s){S(e,s),s&&C(n),S(i,s)}}}function hn(t){let e,n,i,l,s,r,o,u,g;return{c(){e=L("div"),n=be(t[5]),i=U(),l=L("span"),s=be("- "),r=be(t[6]),o=be(" -"),u=U(),g=be(t[7]),d(l,"class","text-gray-300"),d(e,"class","flex flex-col")},m(_,m){y(_,e,m),j(e,n),j(e,i),j(e,l),j(l,s),j(l,r),j(l,o),j(e,u),j(e,g)},p(_,m){m[0]&32&&Qe(n,_[5]),m[0]&64&&Qe(r,_[6]),m[0]&128&&Qe(g,_[7])},i:F,o:F,d(_){_&&C(e)}}}function ht(t){let e,n,i,l;return{c(){e=L("img"),d(e,"class","absolute w-full h-full object-contain"),O(e.src,n=t[21]||t[0]?.image||t[0])||d(e,"src",n),d(e,"alt",""),q(e,"scale-x-[-1]",t[4]==="webcam"&&t[10])},m(s,r){y(s,e,r),t[30](e),i||(l=W(e,"load",t[26]),i=!0)},p(s,r){r[0]&2097153&&!O(e.src,n=s[21]||s[0]?.image||s[0])&&d(e,"src",n),r[0]&1040&&q(e,"scale-x-[-1]",s[4]==="webcam"&&s[10])},d(s){s&&C(e),t[30](null),i=!1,l()}}}function mt(t){let e,n,i,l,s,r,o,u;function g(f){t[32](f)}function _(f){t[33](f)}let m={value:t[0],mode:t[12],width:t[15]||t[20],height:t[14]||t[19],container_height:t[16]||t[19],value_img:t[18],source:t[4]};t[17]!==void 0&&(m.brush_radius=t[17]),t[22]!==void 0&&(m.brush_color=t[22]),e=new Xe({props:m}),t[31](e),E.push(()=>H(e,"brush_radius",g)),E.push(()=>H(e,"brush_color",_)),e.$on("change",t[25]),s=new Ge({}),s.$on("undo",t[34]),s.$on("clear",t[27]);let a=(t[1]==="color-sketch"||t[1]==="sketch")&>(t);return{c(){T(e.$$.fragment),l=U(),T(s.$$.fragment),r=U(),a&&a.c(),o=ue()},m(f,p){B(e,f,p),y(f,l,p),B(s,f,p),y(f,r,p),a&&a.m(f,p),y(f,o,p),u=!0},p(f,p){const A={};p[0]&1&&(A.value=f[0]),p[0]&4096&&(A.mode=f[12]),p[0]&1081344&&(A.width=f[15]||f[20]),p[0]&540672&&(A.height=f[14]||f[19]),p[0]&589824&&(A.container_height=f[16]||f[19]),p[0]&262144&&(A.value_img=f[18]),p[0]&16&&(A.source=f[4]),!n&&p[0]&131072&&(n=!0,A.brush_radius=f[17],Y(()=>n=!1)),!i&&p[0]&4194304&&(i=!0,A.brush_color=f[22],Y(()=>i=!1)),e.$set(A),f[1]==="color-sketch"||f[1]==="sketch"?a?(a.p(f,p),p[0]&2&&w(a,1)):(a=gt(f),a.c(),w(a,1),a.m(o.parentNode,o)):a&&(K(),I(a,1,1,()=>{a=null}),Z())},i(f){u||(w(e.$$.fragment,f),w(s.$$.fragment,f),w(a),u=!0)},o(f){I(e.$$.fragment,f),I(s.$$.fragment,f),I(a),u=!1},d(f){t[31](null),S(e,f),f&&C(l),S(s,f),f&&C(r),a&&a.d(f),f&&C(o)}}}function gt(t){let e,n,i,l;function s(u){t[35](u)}function r(u){t[36](u)}let o={container_height:t[16]||t[19],img_width:t[15]||t[20],img_height:t[14]||t[19],mode:t[12]};return t[17]!==void 0&&(o.brush_radius=t[17]),t[22]!==void 0&&(o.brush_color=t[22]),e=new Ke({props:o}),E.push(()=>H(e,"brush_radius",s)),E.push(()=>H(e,"brush_color",r)),{c(){T(e.$$.fragment)},m(u,g){B(e,u,g),l=!0},p(u,g){const _={};g[0]&589824&&(_.container_height=u[16]||u[19]),g[0]&1081344&&(_.img_width=u[15]||u[20]),g[0]&540672&&(_.img_height=u[14]||u[19]),g[0]&4096&&(_.mode=u[12]),!n&&g[0]&131072&&(n=!0,_.brush_radius=u[17],Y(()=>n=!1)),!i&&g[0]&4194304&&(i=!0,_.brush_color=u[22],Y(()=>i=!1)),e.$set(_)},i(u){l||(w(e.$$.fragment,u),l=!0)},o(u){I(e.$$.fragment,u),l=!1},d(u){S(e,u)}}}function mn(t){let e,n,i,l;const s=[hn,cn,_n,fn,an],r=[];function o(u,g){return u[0]===null&&!u[21]||u[8]?0:u[1]==="select"?1:u[1]==="editor"?2:(u[1]==="sketch"||u[1]==="color-sketch")&&(u[0]!==null||u[21])?3:4}return e=o(t),n=r[e]=s[e](t),{c(){n.c(),i=ue()},m(u,g){r[e].m(u,g),y(u,i,g),l=!0},p(u,g){let _=e;e=o(u),e===_?r[e].p(u,g):(K(),I(r[_],1,1,()=>{r[_]=null}),Z(),n=r[e],n?n.p(u,g):(n=r[e]=s[e](u),n.c()),w(n,1),n.m(i.parentNode,i))},i(u){l||(w(n),l=!0)},o(u){I(n),l=!1},d(u){r[e].d(u),u&&C(i)}}}function gn(t){let e,n,i,l,s,r,o;e=new pt({props:{show_label:t[3],Icon:t[4]==="canvas"?xe:De,label:t[2]||(t[4]==="canvas"?"Sketch":"Image")}});const u=[on,un,sn,rn,ln,nn,tn],g=[];function _(m,a){return m[4]==="upload"?0:m[4]==="canvas"?1:m[0]===null&&!m[21]||m[8]?2:m[1]==="select"?3:m[1]==="editor"?4:(m[1]==="sketch"||m[1]==="color-sketch")&&(m[0]!==null||m[21])?5:6}return l=_(t),s=g[l]=u[l](t),{c(){T(e.$$.fragment),n=U(),i=L("div"),s.c(),d(i,"data-testid","image"),Ve(()=>t[56].call(i)),q(i,"bg-gray-200",t[0]),q(i,"h-60",t[4]!=="webcam"||t[1]==="sketch"||t[1]==="color-sketch")},m(m,a){B(e,m,a),y(m,n,a),y(m,i,a),g[l].m(i,null),r=kt(i,t[56].bind(i)),o=!0},p(m,a){const f={};a[0]&8&&(f.show_label=m[3]),a[0]&16&&(f.Icon=m[4]==="canvas"?xe:De),a[0]&20&&(f.label=m[2]||(m[4]==="canvas"?"Sketch":"Image")),e.$set(f);let p=l;l=_(m),l===p?g[l].p(m,a):(K(),I(g[p],1,1,()=>{g[p]=null}),Z(),s=g[l],s?s.p(m,a):(s=g[l]=u[l](m),s.c()),w(s,1),s.m(i,null)),a[0]&1&&q(i,"bg-gray-200",m[0]),a[0]&18&&q(i,"h-60",m[4]!=="webcam"||m[1]==="sketch"||m[1]==="color-sketch")},i(m){o||(w(e.$$.fragment,m),w(s),o=!0)},o(m){I(e.$$.fragment,m),I(s),o=!1},d(m){S(e,m),m&&C(n),m&&C(i),g[l].d(),r()}}}function dn(t,e,n){let i,{value:l}=e,{label:s=void 0}=e,{show_label:r}=e,{source:o="upload"}=e,{tool:u="editor"}=e,{drop_text:g="Drop an image file"}=e,{or_text:_="or"}=e,{upload_text:m="click to upload"}=e,{streaming:a=!1}=e,{pending:f=!1}=e,{mirror_webcam:p}=e,A;l&&(o==="upload"||o==="webcam")&&u==="sketch"&&(l={image:l,mask:null});function D({detail:h}){u==="color-sketch"?n(21,re=h):n(0,l=(o==="upload"||o==="webcam")&&u==="sketch"?{image:h,mask:null}:h),z("upload",h)}function ee({detail:h}){n(0,l=null),n(21,re=void 0),z("clear")}async function oe({detail:h},R){k==="mask"?o==="webcam"&&R?n(0,l={image:h,mask:null}):n(0,l={image:typeof l=="string"?l:l?.image||null,mask:h}):(o==="upload"||o==="webcam")&&u==="sketch"?n(0,l={image:h,mask:null}):n(0,l=h),await je(),z(a?"stream":"edit")}const z=he();let b=!1;function P(h){const R=h.composedPath()[0];n(15,ne=R.naturalWidth),n(14,te=R.naturalHeight),n(16,ie=R.getBoundingClientRect().height)}async function J(){A.clear(),await je(),n(0,l=null),n(21,re=void 0)}let te=0,ne=0,ie=0,N=20,k,X,ae,le,re;const Ue=h=>(ee(h),n(1,u="editor")),me=()=>n(1,u="select");function Fe(h){E[h?"unshift":"push"](()=>{X=h,n(18,X)})}function ke(h){E[h?"unshift":"push"](()=>{A=h,n(13,A)})}function Ne(h){N=h,n(17,N)}function pe(h){i=h,n(22,i),n(12,k),n(4,o),n(1,u)}const we=()=>A.undo();function Ae(h){N=h,n(17,N)}function Ie(h){i=h,n(22,i),n(12,k),n(4,o),n(1,u)}function fe(h){b=h,n(11,b)}const ye=()=>A.undo(),Ce=()=>A.clear();function ve(h){N=h,n(17,N)}function Me(h){i=h,n(22,i),n(12,k),n(4,o),n(1,u)}function ze(h){N=h,n(17,N)}function Te(h){i=h,n(22,i),n(12,k),n(4,o),n(1,u)}function se(h){E[h?"unshift":"push"](()=>{A=h,n(13,A)})}const _e=h=>u==="color-sketch"?D(h):oe(h,!0);function Be(h){ce.call(this,t,h)}const ge=h=>(ee(h),n(1,u="editor")),qe=()=>n(1,u="select");function Se(h){E[h?"unshift":"push"](()=>{X=h,n(18,X)})}function Oe(h){E[h?"unshift":"push"](()=>{A=h,n(13,A)})}function We(h){N=h,n(17,N)}function Pe(h){i=h,n(22,i),n(12,k),n(4,o),n(1,u)}const Je=()=>A.undo();function c(h){N=h,n(17,N)}function v(h){i=h,n(22,i),n(12,k),n(4,o),n(1,u)}function M(){ae=this.offsetHeight,le=this.offsetWidth,n(19,ae),n(20,le)}return t.$$set=h=>{"value"in h&&n(0,l=h.value),"label"in h&&n(2,s=h.label),"show_label"in h&&n(3,r=h.show_label),"source"in h&&n(4,o=h.source),"tool"in h&&n(1,u=h.tool),"drop_text"in h&&n(5,g=h.drop_text),"or_text"in h&&n(6,_=h.or_text),"upload_text"in h&&n(7,m=h.upload_text),"streaming"in h&&n(8,a=h.streaming),"pending"in h&&n(9,f=h.pending),"mirror_webcam"in h&&n(10,p=h.mirror_webcam)},t.$$.update=()=>{t.$$.dirty[0]&1&&z("change",l),t.$$.dirty[0]&2048&&z("drag",b),t.$$.dirty[0]&18&&(o==="canvas"&&u==="sketch"?n(12,k="bw-sketch"):u==="color-sketch"?n(12,k="color-sketch"):(o==="upload"||o==="webcam")&&u==="sketch"?n(12,k="mask"):n(12,k="editor")),t.$$.dirty[0]&4096&&n(22,i=k=="mask"?"#000000":"#000"),t.$$.dirty[0]&1&&(l===null||l.image===null&&l.mask===null)&&n(21,re=void 0)},[l,u,s,r,o,g,_,m,a,f,p,b,k,A,te,ne,ie,N,X,ae,le,re,i,D,ee,oe,P,J,Ue,me,Fe,ke,Ne,pe,we,Ae,Ie,fe,ye,Ce,ve,Me,ze,Te,se,_e,Be,ge,qe,Se,Oe,We,Pe,Je,c,v,M]}class bn extends ${constructor(e){super(),x(this,e,dn,gn,V,{value:0,label:2,show_label:3,source:4,tool:1,drop_text:5,or_text:6,upload_text:7,streaming:8,pending:9,mirror_webcam:10},null,[-1,-1])}}function kn(t){let e,n;return{c(){e=L("img"),d(e,"class","w-full h-full object-contain"),O(e.src,n=t[0])||d(e,"src",n),d(e,"alt","")},m(i,l){y(i,e,l)},p(i,l){l&1&&!O(e.src,n=i[0])&&d(e,"src",n)},i:F,o:F,d(i){i&&C(e)}}}function pn(t){let e,n,i,l;return i=new De({}),{c(){e=L("div"),n=L("div"),T(i.$$.fragment),d(n,"class","h-5 dark:text-white opacity-50"),d(e,"class","h-full min-h-[15rem] flex justify-center items-center")},m(s,r){y(s,e,r),j(e,n),B(i,n,null),l=!0},p:F,i(s){l||(w(i.$$.fragment,s),l=!0)},o(s){I(i.$$.fragment,s),l=!1},d(s){s&&C(e),S(i)}}}function wn(t){let e,n,i,l,s,r;e=new pt({props:{show_label:t[2],Icon:De,label:t[1]||"Image"}});const o=[pn,kn],u=[];function g(_,m){return _[0]===null?0:1}return i=g(t),l=u[i]=o[i](t),{c(){T(e.$$.fragment),n=U(),l.c(),s=ue()},m(_,m){B(e,_,m),y(_,n,m),u[i].m(_,m),y(_,s,m),r=!0},p(_,[m]){const a={};m&4&&(a.show_label=_[2]),m&2&&(a.label=_[1]||"Image"),e.$set(a);let f=i;i=g(_),i===f?u[i].p(_,m):(K(),I(u[f],1,1,()=>{u[f]=null}),Z(),l=u[i],l?l.p(_,m):(l=u[i]=o[i](_),l.c()),w(l,1),l.m(s.parentNode,s))},i(_){r||(w(e.$$.fragment,_),w(l),r=!0)},o(_){I(e.$$.fragment,_),I(l),r=!1},d(_){S(e,_),_&&C(n),u[i].d(_),_&&C(s)}}}function An(t,e,n){let{value:i}=e,{label:l=void 0}=e,{show_label:s}=e;const r=he();return t.$$set=o=>{"value"in o&&n(0,i=o.value),"label"in o&&n(1,l=o.label),"show_label"in o&&n(2,s=o.show_label)},t.$$.update=()=>{t.$$.dirty&1&&i&&r("change",i)},[i,l,s]}class In extends ${constructor(e){super(),x(this,e,An,wn,V,{value:0,label:1,show_label:2})}}function yn(t){let e,n,i;function l(r){t[15](r)}let s={source:t[4],tool:t[5],label:t[6],show_label:t[7],pending:t[9],streaming:t[8],drop_text:t[14]("interface.drop_image"),or_text:t[14]("or"),upload_text:t[14]("interface.click_to_upload"),mirror_webcam:t[11]};return t[0]!==void 0&&(s.value=t[0]),e=new bn({props:s}),E.push(()=>H(e,"value",l)),e.$on("edit",t[16]),e.$on("clear",t[17]),e.$on("change",t[18]),e.$on("stream",t[19]),e.$on("drag",t[20]),e.$on("upload",t[21]),e.$on("error",t[22]),{c(){T(e.$$.fragment)},m(r,o){B(e,r,o),i=!0},p(r,o){const u={};o&16&&(u.source=r[4]),o&32&&(u.tool=r[5]),o&64&&(u.label=r[6]),o&128&&(u.show_label=r[7]),o&512&&(u.pending=r[9]),o&256&&(u.streaming=r[8]),o&16384&&(u.drop_text=r[14]("interface.drop_image")),o&16384&&(u.or_text=r[14]("or")),o&16384&&(u.upload_text=r[14]("interface.click_to_upload")),o&2048&&(u.mirror_webcam=r[11]),!n&&o&1&&(n=!0,u.value=r[0],Y(()=>n=!1)),e.$set(u)},i(r){i||(w(e.$$.fragment,r),i=!0)},o(r){I(e.$$.fragment,r),i=!1},d(r){S(e,r)}}}function Cn(t){let e,n;return e=new In({props:{value:t[0],label:t[6],show_label:t[7]}}),{c(){T(e.$$.fragment)},m(i,l){B(e,i,l),n=!0},p(i,l){const s={};l&1&&(s.value=i[0]),l&64&&(s.label=i[6]),l&128&&(s.show_label=i[7]),e.$set(s)},i(i){n||(w(e.$$.fragment,i),n=!0)},o(i){I(e.$$.fragment,i),n=!1},d(i){S(e,i)}}}function vn(t){let e,n,i,l,s,r;const o=[t[1]];let u={};for(let a=0;a{_[A]=null}),Z(),l=_[i],l?l.p(a,f):(l=_[i]=g[i](a),l.c()),w(l,1),l.m(s.parentNode,s))},i(a){r||(w(e.$$.fragment,a),w(l),r=!0)},o(a){I(e.$$.fragment,a),I(l),r=!1},d(a){S(e,a),a&&C(n),_[i].d(a),a&&C(s)}}}function Mn(t){let e,n;return e=new vt({props:{visible:t[3],variant:t[12]==="dynamic"&&t[0]===null&&t[4]==="upload"?"dashed":"solid",color:t[13]?"green":"grey",padding:!1,elem_id:t[2],style:{height:t[10].height,width:t[10].width},$$slots:{default:[vn]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(i,l){B(e,i,l),n=!0},p(i,[l]){const s={};l&8&&(s.visible=i[3]),l&4113&&(s.variant=i[12]==="dynamic"&&i[0]===null&&i[4]==="upload"?"dashed":"solid"),l&8192&&(s.color=i[13]?"green":"grey"),l&4&&(s.elem_id=i[2]),l&1024&&(s.style={height:i[10].height,width:i[10].width}),l&16808947&&(s.$$scope={dirty:l,ctx:i}),e.$set(s)},i(i){n||(w(e.$$.fragment,i),n=!0)},o(i){I(e.$$.fragment,i),n=!1},d(i){S(e,i)}}}function zn(t,e,n){let i;Mt(t,zt,k=>n(14,i=k));let{elem_id:l=""}=e,{visible:s=!0}=e,{value:r=null}=e,{source:o="upload"}=e,{tool:u="editor"}=e,{label:g}=e,{show_label:_}=e,{streaming:m}=e,{pending:a}=e,{style:f={}}=e,{mirror_webcam:p}=e,{loading_status:A}=e,{mode:D}=e;const ee=he();let oe;function z(k){r=k,n(0,r)}function b(k){ce.call(this,t,k)}function P(k){ce.call(this,t,k)}function J(k){ce.call(this,t,k)}function te(k){ce.call(this,t,k)}const ne=({detail:k})=>n(13,oe=k);function ie(k){ce.call(this,t,k)}const N=({detail:k})=>{n(1,A=A||{}),n(1,A.status="error",A),n(1,A.message=k,A)};return t.$$set=k=>{"elem_id"in k&&n(2,l=k.elem_id),"visible"in k&&n(3,s=k.visible),"value"in k&&n(0,r=k.value),"source"in k&&n(4,o=k.source),"tool"in k&&n(5,u=k.tool),"label"in k&&n(6,g=k.label),"show_label"in k&&n(7,_=k.show_label),"streaming"in k&&n(8,m=k.streaming),"pending"in k&&n(9,a=k.pending),"style"in k&&n(10,f=k.style),"mirror_webcam"in k&&n(11,p=k.mirror_webcam),"loading_status"in k&&n(1,A=k.loading_status),"mode"in k&&n(12,D=k.mode)},t.$$.update=()=>{t.$$.dirty&1&&n(0,r=r||null),t.$$.dirty&1&&ee("change")},[r,A,l,s,o,u,g,_,m,a,f,p,D,oe,i,z,b,P,J,te,ne,ie,N]}class Tn extends ${constructor(e){super(),x(this,e,zn,Mn,V,{elem_id:2,visible:3,value:0,source:4,tool:5,label:6,show_label:7,streaming:8,pending:9,style:10,mirror_webcam:11,loading_status:1,mode:12})}}var Ln=Tn;const Un=["static","dynamic"],Fn=t=>({type:"string",description:"image data as base64 string",example_data:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg=="});export{Ln as Component,On as ExampleComponent,Fn as document,Un as modes}; +//# sourceMappingURL=index.b8aa28af.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/index.cc0a8c0e.css b/gradio-modified/gradio/templates/frontend/assets/index.cc0a8c0e.css new file mode 100644 index 0000000000000000000000000000000000000000..4f5e8710acbc5b023980a39bd634f60f75d36b86 --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/index.cc0a8c0e.css @@ -0,0 +1 @@ +*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:Source Sans Pro,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:IBM Plex Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[type=text],[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select{appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow: 0 0 #0000}[type=text]:focus,[type=email]:focus,[type=url]:focus,[type=password]:focus,[type=number]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=month]:focus,[type=search]:focus,[type=tel]:focus,[type=time]:focus,[type=week]:focus,[multiple]:focus,textarea:focus,select:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#2563eb}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-top:0;padding-bottom:0}select{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;color-adjust:exact}[multiple]{background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;padding-right:.75rem;color-adjust:unset}[type=checkbox],[type=radio]{appearance:none;padding:0;color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#2563eb;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow: 0 0 #0000}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 2px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}[type=checkbox]:checked,[type=radio]:checked{border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}[type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}[type=checkbox]:checked:hover,[type=checkbox]:checked:focus,[type=radio]:checked:hover,[type=radio]:checked:focus{border-color:transparent;background-color:currentColor}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}[type=checkbox]:indeterminate:hover,[type=checkbox]:indeterminate:focus{border-color:transparent;background-color:currentColor}[type=file]{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}[type=file]:focus{outline:1px auto -webkit-focus-ring-color}.bg-gray-950{background-color:#0b0f19}.dark{background-color:#0b0f19;--tw-bg-opacity: 1;background-color:rgb(11 15 25 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.dark .text-gray-500,.dark .text-gray-600,.dark .\!text-gray-500{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.dark .text-gray-700,.dark .text-gray-800,.dark .text-gray-900,.dark .\!text-gray-700,.dark .\!text-gray-800{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.dark .border,.dark .border-gray-100,.dark .border-gray-200,.dark .border-gray-300,.dark .\!border,.dark .\!border-gray-300{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.dark .bg-white{background-color:#0b0f19;--tw-bg-opacity: 1;background-color:rgb(11 15 25 / var(--tw-bg-opacity))}.dark .bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.dark .bg-gray-200,.dark .\!bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.unequal-height{align-items:flex-start}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}.\!container{width:100%!important}@media (min-width: 640px){.container{max-width:640px}.\!container{max-width:640px!important}}@media (min-width: 768px){.container{max-width:768px}.\!container{max-width:768px!important}}@media (min-width: 1024px){.container{max-width:1024px}.\!container{max-width:1024px!important}}@media (min-width: 1280px){.container{max-width:1280px}.\!container{max-width:1280px!important}}@media (min-width: 1536px){.container{max-width:1536px}.\!container{max-width:1536px!important}}.gr-form>.gr-block{border-radius:0;border-width:0px;--tw-shadow: 0 0 #0000 !important;--tw-shadow-colored: 0 0 #0000 !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.row>*,.row>.gr-form>*{min-width:min(160px,100%)}.\!row>*,.\!row>.gr-form>*{min-width:min(160px,100%)!important}.row>*,.row>.gr-form>*{flex:1 1 0%}.\!row>*,.\!row>.gr-form>*{flex:1 1 0%}.col>*,.col>.gr-form>*{width:100%}.gr-compact>*,.gr-compact .gr-box{border-radius:0!important;border-width:0px!important}.scroll-hide{-ms-overflow-style:none;scrollbar-width:none}.scroll-hide::-webkit-scrollbar{display:none}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.\!visible{visibility:visible!important}.invisible{visibility:hidden}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.\!absolute{position:absolute!important}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.inset-2{inset:.5rem}.inset-x-0{left:0;right:0}.right-6{right:1.5rem}.top-5{top:1.25rem}.top-0{top:0}.bottom-\[50px\]{bottom:50px}.bottom-0{bottom:0}.left-0{left:0}.right-0{right:0}.top-7{top:1.75rem}.left-4{left:1rem}.right-4{right:1rem}.top-2{top:.5rem}.right-2{right:.5rem}.top-10{top:2.5rem}.top-\[2px\]{top:2px}.top-6{top:1.5rem}.top-\[-3px\]{top:-3px}.bottom-2{bottom:.5rem}.isolate{isolation:isolate}.z-50{z-index:50}.z-10{z-index:10}.z-\[5\]{z-index:5}.z-20{z-index:20}.z-\[100\]{z-index:100}.z-40{z-index:40}.m-12{margin:3rem}.m-2{margin:.5rem}.\!m-0{margin:0!important}.m-auto{margin:auto}.m-1{margin:.25rem}.m-1\.5{margin:.375rem}.m-0{margin:0}.my-0\.5{margin-top:.125rem;margin-bottom:.125rem}.my-0{margin-top:0;margin-bottom:0}.mx-auto{margin-left:auto;margin-right:auto}.mx-1{margin-left:.25rem;margin-right:.25rem}.my-4{margin-top:1rem;margin-bottom:1rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-3{margin-left:.75rem;margin-right:.75rem}.\!mt-0{margin-top:0!important}.\!mb-0{margin-bottom:0!important}.\!ml-0{margin-left:0!important}.\!mr-0{margin-right:0!important}.mr-1{margin-right:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-1{margin-bottom:.25rem}.mr-2{margin-right:.5rem}.mb-6{margin-bottom:1.5rem}.ml-2{margin-left:.5rem}.mt-6{margin-top:1.5rem}.mb-3{margin-bottom:.75rem}.mt-4{margin-top:1rem}.ml-auto{margin-left:auto}.mt-8{margin-top:2rem}.mr-1\.5{margin-right:.375rem}.mb-4{margin-bottom:1rem}.mb-2{margin-bottom:.5rem}.mt-7{margin-top:1.75rem}.mt-3{margin-top:.75rem}.mb-7{margin-bottom:1.75rem}.mr-\[-4px\]{margin-right:-4px}.mt-\[0\.05rem\]{margin-top:.05rem}.mr-0\.5{margin-right:.125rem}.mr-0{margin-right:0}.mt-10{margin-top:2.5rem}.-mb-\[2px\]{margin-bottom:-2px}.mt-1{margin-top:.25rem}.box-border{box-sizing:border-box}.block{display:block}.\!block{display:block!important}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.\!hidden{display:none!important}.aspect-square{aspect-ratio:1 / 1}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-screen{height:100vh}.h-full{height:100%}.h-5{height:1.25rem}.h-\[60px\]{height:60px}.\!h-9{height:2.25rem!important}.h-7{height:1.75rem}.h-4{height:1rem}.h-96{height:24rem}.h-60{height:15rem}.h-0{height:0px}.h-\[12px\]{height:12px}.h-\[60\%\]{height:60%}.h-14{height:3.5rem}.h-6{height:1.5rem}.h-\[40vh\]{height:40vh}.h-10{height:2.5rem}.h-2\/4{height:50%}.h-20{height:5rem}.h-2{height:.5rem}.h-\[50\%\]{height:50%}.h-3{height:.75rem}.max-h-\[55vh\]{max-height:55vh}.max-h-96{max-height:24rem}.max-h-60{max-height:15rem}.max-h-\[30rem\]{max-height:30rem}.max-h-\[15rem\]{max-height:15rem}.min-h-\[350px\]{min-height:350px}.min-h-screen{min-height:100vh}.min-h-\[15rem\]{min-height:15rem}.min-h-\[6rem\]{min-height:6rem}.min-h-\[8rem\]{min-height:8rem}.min-h-\[200px\]{min-height:200px}.min-h-\[16rem\]{min-height:16rem}.min-h-\[2\.3rem\]{min-height:2.3rem}.min-h-\[10rem\]{min-height:10rem}.w-3\.5{width:.875rem}.w-3{width:.75rem}.w-1\.5{width:.375rem}.w-1{width:.25rem}.w-40{width:10rem}.w-full{width:100%}.w-2\.5{width:.625rem}.w-2{width:.5rem}.w-screen{width:100vw}.\!w-9{width:2.25rem!important}.w-2\/3{width:66.666667%}.w-\[12px\]{width:12px}.w-5{width:1.25rem}.w-\[60\%\]{width:60%}.w-6{width:1.5rem}.w-3\/12{width:25%}.w-5\/12{width:41.666667%}.w-10{width:2.5rem}.w-2\/4{width:50%}.w-0{width:0px}.w-20{width:5rem}.w-4{width:1rem}.max-w-full{max-width:100%}.max-w-none{max-width:none}.flex-1{flex:1 1 0%}.\!flex-none{flex:none!important}.flex-none{flex:none}.shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.flex-grow,.grow{flex-grow:1}.grow-0{flex-grow:0}.\!grow-0{flex-grow:0!important}.table-auto{table-layout:auto}.border-collapse{border-collapse:collapse}.origin-left{transform-origin:left}.translate-x-px{--tw-translate-x: 1px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-90{--tw-scale-x: .9;--tw-scale-y: .9;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-x-\[-1\]{--tw-scale-x: -1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-scale-y-\[1\]{--tw-scale-y: -1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\!transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}@keyframes ping{75%,to{transform:scale(2);opacity:0}}.animate-ping{animation:ping 1s cubic-bezier(0,0,.2,1) infinite}.cursor-pointer{cursor:pointer}.\!cursor-not-allowed{cursor:not-allowed!important}.cursor-default{cursor:default}.cursor-crosshair{cursor:crosshair}.cursor-move{cursor:move}.cursor-col-resize{cursor:col-resize}.cursor-row-resize{cursor:row-resize}.cursor-ns-resize{cursor:ns-resize}.cursor-ew-resize{cursor:ew-resize}.cursor-sw-resize{cursor:sw-resize}.cursor-s-resize{cursor:s-resize}.cursor-se-resize{cursor:se-resize}.cursor-w-resize{cursor:w-resize}.cursor-e-resize{cursor:e-resize}.cursor-nw-resize{cursor:nw-resize}.cursor-n-resize{cursor:n-resize}.cursor-ne-resize{cursor:ne-resize}.cursor-grab{cursor:grab}.touch-none{touch-action:none}.select-none{user-select:none}.resize{resize:both}.appearance-none{appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.grid-cols-9{grid-template-columns:repeat(9,minmax(0,1fr))}.grid-cols-10{grid-template-columns:repeat(10,minmax(0,1fr))}.grid-cols-11{grid-template-columns:repeat(11,minmax(0,1fr))}.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.items-stretch{align-items:stretch}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-6{gap:1.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-2{gap:.5rem}.gap-px{gap:1px}.gap-1\.5{gap:.375rem}.gap-1{gap:.25rem}.gap-0{gap:0px}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 0;border-right-width:calc(1px * var(--tw-divide-x-reverse));border-left-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}.place-self-start{place-self:start}.self-center{align-self:center}.justify-self-center{justify-self:center}.overflow-hidden{overflow:hidden}.overflow-clip{overflow:clip}.\!overflow-visible{overflow:visible!important}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-scroll{overflow-x:scroll}.overflow-y-scroll{overflow-y:scroll}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-xl{border-radius:.75rem}.rounded-sm{border-radius:.125rem}.rounded-\[22px\]{border-radius:22px}.rounded-none{border-radius:0}.\!rounded-none{border-radius:0!important}.\!rounded-lg{border-radius:.5rem!important}.rounded-md{border-radius:.375rem}.rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.\!rounded-br-none{border-bottom-right-radius:0!important}.\!rounded-br-lg{border-bottom-right-radius:.5rem!important}.\!rounded-bl-none{border-bottom-left-radius:0!important}.\!rounded-bl-lg{border-bottom-left-radius:.5rem!important}.\!rounded-tr-none{border-top-right-radius:0!important}.\!rounded-tr-lg{border-top-right-radius:.5rem!important}.\!rounded-tl-none{border-top-left-radius:0!important}.\!rounded-tl-lg{border-top-left-radius:.5rem!important}.rounded-tl-lg{border-top-left-radius:.5rem}.rounded-br-lg{border-bottom-right-radius:.5rem}.rounded-br-none{border-bottom-right-radius:0}.rounded-bl-none{border-bottom-left-radius:0}.rounded-bl-lg{border-bottom-left-radius:.5rem}.rounded-tr-lg{border-top-right-radius:.5rem}.border{border-width:1px}.border-2{border-width:2px}.\!border-0{border-width:0px!important}.border-0{border-width:0px}.\!border{border-width:1px!important}.\!border-t-0{border-top-width:0px!important}.\!border-b-0{border-bottom-width:0px!important}.\!border-l-0{border-left-width:0px!important}.\!border-r-0{border-right-width:0px!important}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t-0{border-top-width:0px}.border-b-2{border-bottom-width:2px}.border-b-0{border-bottom-width:0px}.border-solid{border-style:solid}.border-dashed{border-style:dashed}.border-none{border-style:none}.\!border-none{border-style:none!important}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity))}.border-orange-200{--tw-border-opacity: 1;border-color:rgb(255 216 180 / var(--tw-border-opacity))}.border-gray-400{--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-black{--tw-border-opacity: 1;border-color:rgb(0 0 0 / var(--tw-border-opacity))}.border-orange-500{--tw-border-opacity: 1;border-color:rgb(255 124 0 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-green-400{--tw-border-opacity: 1;border-color:rgb(74 222 128 / var(--tw-border-opacity))}.border-gray-200\/60{border-color:#e5e7eb99}.border-transparent{border-color:transparent}.border-red-200{--tw-border-opacity: 1;border-color:rgb(254 202 202 / var(--tw-border-opacity))}.\!border-red-300{--tw-border-opacity: 1 !important;border-color:rgb(252 165 165 / var(--tw-border-opacity))!important}.\!border-yellow-300{--tw-border-opacity: 1 !important;border-color:rgb(253 224 71 / var(--tw-border-opacity))!important}.\!border-green-300{--tw-border-opacity: 1 !important;border-color:rgb(134 239 172 / var(--tw-border-opacity))!important}.\!border-blue-300{--tw-border-opacity: 1 !important;border-color:rgb(147 197 253 / var(--tw-border-opacity))!important}.\!border-purple-300{--tw-border-opacity: 1 !important;border-color:rgb(216 180 254 / var(--tw-border-opacity))!important}.\!border-gray-300{--tw-border-opacity: 1 !important;border-color:rgb(209 213 219 / var(--tw-border-opacity))!important}.\!border-pink-300{--tw-border-opacity: 1 !important;border-color:rgb(249 168 212 / var(--tw-border-opacity))!important}.border-b-slate-300{--tw-border-opacity: 1;border-bottom-color:rgb(203 213 225 / var(--tw-border-opacity))}.border-r-slate-300{--tw-border-opacity: 1;border-right-color:rgb(203 213 225 / var(--tw-border-opacity))}.\!bg-red-200{--tw-bg-opacity: 1 !important;background-color:rgb(254 202 202 / var(--tw-bg-opacity))!important}.\!bg-green-200{--tw-bg-opacity: 1 !important;background-color:rgb(187 247 208 / var(--tw-bg-opacity))!important}.\!bg-blue-200{--tw-bg-opacity: 1 !important;background-color:rgb(191 219 254 / var(--tw-bg-opacity))!important}.\!bg-yellow-200{--tw-bg-opacity: 1 !important;background-color:rgb(254 240 138 / var(--tw-bg-opacity))!important}.\!bg-purple-200{--tw-bg-opacity: 1 !important;background-color:rgb(233 213 255 / var(--tw-bg-opacity))!important}.\!bg-teal-200{--tw-bg-opacity: 1 !important;background-color:rgb(153 246 228 / var(--tw-bg-opacity))!important}.\!bg-orange-200{--tw-bg-opacity: 1 !important;background-color:rgb(255 216 180 / var(--tw-bg-opacity))!important}.\!bg-cyan-200{--tw-bg-opacity: 1 !important;background-color:rgb(165 243 252 / var(--tw-bg-opacity))!important}.\!bg-lime-200{--tw-bg-opacity: 1 !important;background-color:rgb(217 249 157 / var(--tw-bg-opacity))!important}.\!bg-pink-200{--tw-bg-opacity: 1 !important;background-color:rgb(251 207 232 / var(--tw-bg-opacity))!important}.\!bg-gray-200{--tw-bg-opacity: 1 !important;background-color:rgb(229 231 235 / var(--tw-bg-opacity))!important}.bg-orange-100{--tw-bg-opacity: 1;background-color:rgb(255 229 204 / var(--tw-bg-opacity))}.bg-gray-300{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.bg-gray-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-200\/80{background-color:#e5e7ebcc}.bg-black\/50{background-color:#00000080}.bg-gray-950{--tw-bg-opacity: 1;background-color:rgb(11 15 25 / var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-white\/90{background-color:#ffffffe6}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-slate-100{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity))}.bg-red-500\/10{background-color:#ef44441a}.bg-red-500\/5{background-color:#ef44440d}.\!bg-red-500\/10{background-color:#ef44441a!important}.bg-red-400{--tw-bg-opacity: 1;background-color:rgb(248 113 113 / var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.bg-black\/90{background-color:#000000e6}.bg-transparent{background-color:transparent}.bg-orange-50{--tw-bg-opacity: 1;background-color:rgb(255 242 229 / var(--tw-bg-opacity))}.\!bg-transparent{background-color:transparent!important}.\!bg-red-100{--tw-bg-opacity: 1 !important;background-color:rgb(254 226 226 / var(--tw-bg-opacity))!important}.\!bg-yellow-100{--tw-bg-opacity: 1 !important;background-color:rgb(254 249 195 / var(--tw-bg-opacity))!important}.\!bg-green-100{--tw-bg-opacity: 1 !important;background-color:rgb(220 252 231 / var(--tw-bg-opacity))!important}.\!bg-blue-100{--tw-bg-opacity: 1 !important;background-color:rgb(219 234 254 / var(--tw-bg-opacity))!important}.\!bg-purple-100{--tw-bg-opacity: 1 !important;background-color:rgb(243 232 255 / var(--tw-bg-opacity))!important}.\!bg-gray-100{--tw-bg-opacity: 1 !important;background-color:rgb(243 244 246 / var(--tw-bg-opacity))!important}.\!bg-pink-100{--tw-bg-opacity: 1 !important;background-color:rgb(252 231 243 / var(--tw-bg-opacity))!important}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.bg-slate-800{--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity))}.bg-amber-500{--tw-bg-opacity: 1;background-color:rgb(245 158 11 / var(--tw-bg-opacity))}.bg-amber-600{--tw-bg-opacity: 1;background-color:rgb(217 119 6 / var(--tw-bg-opacity))}.bg-blue-400{--tw-bg-opacity: 1;background-color:rgb(96 165 250 / var(--tw-bg-opacity))}.bg-opacity-20{--tw-bg-opacity: .2}.bg-opacity-80{--tw-bg-opacity: .8}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.bg-gradient-to-t{background-image:linear-gradient(to top,var(--tw-gradient-stops))}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.from-orange-200\/20{--tw-gradient-from: rgb(255 216 180 / .2);--tw-gradient-to: rgb(255 216 180 / 0);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-red-500\/5{--tw-gradient-from: rgb(239 68 68 / .05);--tw-gradient-to: rgb(239 68 68 / 0);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-red-500\/10{--tw-gradient-from: rgb(239 68 68 / .1);--tw-gradient-to: rgb(239 68 68 / 0);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-orange-400{--tw-gradient-from: #FF9633;--tw-gradient-to: rgb(255 150 51 / 0);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-gray-50{--tw-gradient-from: #f9fafb;--tw-gradient-to: rgb(249 250 251 / 0);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-orange-200\/70{--tw-gradient-from: rgb(255 216 180 / .7);--tw-gradient-to: rgb(255 216 180 / 0);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-gray-100\/70{--tw-gradient-from: rgb(243 244 246 / .7);--tw-gradient-to: rgb(243 244 246 / 0);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-red-200\/70{--tw-gradient-from: rgb(254 202 202 / .7);--tw-gradient-to: rgb(254 202 202 / 0);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.\!from-red-100{--tw-gradient-from: #fee2e2 !important;--tw-gradient-to: rgb(254 226 226 / 0) !important;--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important}.\!from-yellow-100{--tw-gradient-from: #fef9c3 !important;--tw-gradient-to: rgb(254 249 195 / 0) !important;--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important}.\!from-green-100{--tw-gradient-from: #dcfce7 !important;--tw-gradient-to: rgb(220 252 231 / 0) !important;--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important}.\!from-blue-100{--tw-gradient-from: #dbeafe !important;--tw-gradient-to: rgb(219 234 254 / 0) !important;--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important}.\!from-purple-100{--tw-gradient-from: #f3e8ff !important;--tw-gradient-to: rgb(243 232 255 / 0) !important;--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important}.\!from-gray-100{--tw-gradient-from: #f3f4f6 !important;--tw-gradient-to: rgb(243 244 246 / 0) !important;--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important}.\!from-pink-100{--tw-gradient-from: #fce7f3 !important;--tw-gradient-to: rgb(252 231 243 / 0) !important;--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important}.from-\[rgba\(255\,255\,255\,0\)\]{--tw-gradient-from: rgba(255,255,255,0);--tw-gradient-to: rgb(255 255 255 / 0);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-amber-400{--tw-gradient-from: #fbbf24;--tw-gradient-to: rgb(251 191 36 / 0);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.via-transparent{--tw-gradient-to: rgb(0 0 0 / 0);--tw-gradient-stops: var(--tw-gradient-from), transparent, var(--tw-gradient-to)}.to-transparent{--tw-gradient-to: transparent}.to-red-200\/10{--tw-gradient-to: rgb(254 202 202 / .1)}.to-orange-200{--tw-gradient-to: #FFD8B4}.to-white{--tw-gradient-to: #fff}.to-orange-300\/80{--tw-gradient-to: rgb(255 176 102 / .8)}.to-gray-200\/80{--tw-gradient-to: rgb(229 231 235 / .8)}.to-red-300\/80{--tw-gradient-to: rgb(252 165 165 / .8)}.\!to-red-200{--tw-gradient-to: #fecaca !important}.\!to-yellow-200{--tw-gradient-to: #fef08a !important}.\!to-green-200{--tw-gradient-to: #bbf7d0 !important}.\!to-blue-200{--tw-gradient-to: #bfdbfe !important}.\!to-purple-200{--tw-gradient-to: #e9d5ff !important}.\!to-gray-200{--tw-gradient-to: #e5e7eb !important}.\!to-pink-200{--tw-gradient-to: #fbcfe8 !important}.to-gray-50{--tw-gradient-to: #f9fafb}.to-amber-500{--tw-gradient-to: #f59e0b}.fill-current{fill:currentColor}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.object-fill{object-fit:fill}.p-6{padding:1.5rem}.p-4{padding:1rem}.\!p-8{padding:2rem!important}.p-3{padding:.75rem}.p-2{padding:.5rem}.p-1{padding:.25rem}.p-0{padding:0}.p-2\.5{padding:.625rem}.\!p-0{padding:0!important}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-4{padding-top:1rem;padding-bottom:1rem}.px-1{padding-left:.25rem;padding-right:.25rem}.\!py-0{padding-top:0!important;padding-bottom:0!important}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-0{padding-top:0;padding-bottom:0}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.px-4{padding-left:1rem;padding-right:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.px-2{padding-left:.5rem;padding-right:.5rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.px-\[0\.325rem\]{padding-left:.325rem;padding-right:.325rem}.py-\[0\.05rem\]{padding-top:.05rem;padding-bottom:.05rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.px-\[0\.4rem\]{padding-left:.4rem;padding-right:.4rem}.pb-6{padding-bottom:1.5rem}.pt-6{padding-top:1.5rem}.pl-4{padding-left:1rem}.pr-1{padding-right:.25rem}.pt-2{padding-top:.5rem}.pb-\[0\.225rem\]{padding-bottom:.225rem}.pt-\[0\.15rem\]{padding-top:.15rem}.pb-1\.5{padding-bottom:.375rem}.pb-1{padding-bottom:.25rem}.pb-2{padding-bottom:.5rem}.pt-1\.5{padding-top:.375rem}.pt-1{padding-top:.25rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-justify{text-align:justify}.align-middle{vertical-align:middle}.font-mono{font-family:IBM Plex Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:Source Sans Pro,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.text-sm{font-size:.875rem;line-height:1.25rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-2xl{font-size:1.5rem;line-height:2rem}.text-xs{font-size:.75rem;line-height:1rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-base{font-size:1rem;line-height:1.5rem}.text-\[0\.855rem\]{font-size:.855rem}.text-\[10px\]{font-size:10px}.text-4xl{font-size:2.25rem;line-height:2.5rem}.font-semibold{font-weight:600}.font-bold{font-weight:700}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.ordinal{--tw-ordinal: ordinal;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-none{line-height:1}.leading-7{line-height:1.75rem}.leading-tight{line-height:1.25}.leading-snug{line-height:1.375}.\!text-red-500{--tw-text-opacity: 1 !important;color:rgb(239 68 68 / var(--tw-text-opacity))!important}.\!text-green-500{--tw-text-opacity: 1 !important;color:rgb(34 197 94 / var(--tw-text-opacity))!important}.\!text-blue-500{--tw-text-opacity: 1 !important;color:rgb(59 130 246 / var(--tw-text-opacity))!important}.\!text-yellow-500{--tw-text-opacity: 1 !important;color:rgb(234 179 8 / var(--tw-text-opacity))!important}.\!text-purple-500{--tw-text-opacity: 1 !important;color:rgb(168 85 247 / var(--tw-text-opacity))!important}.\!text-teal-500{--tw-text-opacity: 1 !important;color:rgb(20 184 166 / var(--tw-text-opacity))!important}.\!text-orange-500{--tw-text-opacity: 1 !important;color:rgb(255 124 0 / var(--tw-text-opacity))!important}.\!text-cyan-500{--tw-text-opacity: 1 !important;color:rgb(6 182 212 / var(--tw-text-opacity))!important}.\!text-lime-500{--tw-text-opacity: 1 !important;color:rgb(132 204 22 / var(--tw-text-opacity))!important}.\!text-pink-500{--tw-text-opacity: 1 !important;color:rgb(236 72 153 / var(--tw-text-opacity))!important}.\!text-gray-500{--tw-text-opacity: 1 !important;color:rgb(107 114 128 / var(--tw-text-opacity))!important}.\!text-gray-700{--tw-text-opacity: 1 !important;color:rgb(55 65 81 / var(--tw-text-opacity))!important}.text-orange-500{--tw-text-opacity: 1;color:rgb(255 124 0 / var(--tw-text-opacity))}.text-orange-600{--tw-text-opacity: 1;color:rgb(238 116 0 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-indigo-600{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.\!text-gray-800{--tw-text-opacity: 1 !important;color:rgb(31 41 55 / var(--tw-text-opacity))!important}.underline{text-decoration-line:underline}.opacity-50{opacity:.5}.opacity-20{opacity:.2}.opacity-0{opacity:0}.opacity-80{opacity:.8}.opacity-75{opacity:.75}.opacity-40{opacity:.4}.opacity-90{opacity:.9}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-inner{--tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / .05);--tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.\!shadow-none{--tw-shadow: 0 0 #0000 !important;--tw-shadow-colored: 0 0 #0000 !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-red-500\/10{--tw-shadow-color: rgb(239 68 68 / .1);--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.\!ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important;--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)!important}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-inset{--tw-ring-inset: inset}.ring-gray-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity))}.\!ring-orange-500{--tw-ring-opacity: 1 !important;--tw-ring-color: rgb(255 124 0 / var(--tw-ring-opacity)) !important}.ring-gray-200{--tw-ring-opacity: 1;--tw-ring-color: rgb(229 231 235 / var(--tw-ring-opacity))}.ring-orange-500{--tw-ring-opacity: 1;--tw-ring-color: rgb(255 124 0 / var(--tw-ring-opacity))}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-lg{--tw-drop-shadow: drop-shadow(0 10px 8px rgb(0 0 0 / .04)) drop-shadow(0 4px 3px rgb(0 0 0 / .1));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.sepia{--tw-sepia: sepia(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.\!filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur{--tw-backdrop-blur: blur(8px);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-75{transition-duration:75ms}.duration-500{transition-duration:.5s}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.gradio-container{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:Source Sans Pro,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.cropper-container{direction:ltr;font-size:0;line-height:0;position:relative;-ms-touch-action:none;touch-action:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.cropper-container img{display:block;height:100%;image-orientation:0deg;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;width:100%}.cropper-wrap-box,.cropper-canvas,.cropper-drag-box,.cropper-crop-box,.cropper-modal{inset:0;position:absolute}.cropper-wrap-box,.cropper-canvas{overflow:hidden}.cropper-drag-box{background-color:#fff;opacity:0}.cropper-modal{background-color:#000;opacity:.5}.cropper-view-box{display:block;height:100%;outline:1px solid #39f;outline-color:#3399ffbf;overflow:hidden;width:100%}.cropper-dashed{border:0 dashed #eee;display:block;opacity:.5;position:absolute}.cropper-dashed.dashed-h{border-bottom-width:1px;border-top-width:1px;height:calc(100% / 3);left:0;top:calc(100% / 3);width:100%}.cropper-dashed.dashed-v{border-left-width:1px;border-right-width:1px;height:100%;left:calc(100% / 3);top:0;width:calc(100% / 3)}.cropper-center{display:block;height:0;left:50%;opacity:.75;position:absolute;top:50%;width:0}.cropper-center:before,.cropper-center:after{background-color:#eee;content:" ";display:block;position:absolute}.cropper-center:before{height:1px;left:-3px;top:0;width:7px}.cropper-center:after{height:7px;left:0;top:-3px;width:1px}.cropper-face,.cropper-line,.cropper-point{display:block;height:100%;opacity:.1;position:absolute;width:100%}.cropper-face{background-color:#fff;left:0;top:0}.cropper-line{background-color:#39f}.cropper-line.line-e{cursor:ew-resize;right:-3px;top:0;width:5px}.cropper-line.line-n{cursor:ns-resize;height:5px;left:0;top:-3px}.cropper-line.line-w{cursor:ew-resize;left:-3px;top:0;width:5px}.cropper-line.line-s{bottom:-3px;cursor:ns-resize;height:5px;left:0}.cropper-point{background-color:#39f;height:5px;opacity:.75;width:5px}.cropper-point.point-e{cursor:ew-resize;margin-top:-3px;right:-3px;top:50%}.cropper-point.point-n{cursor:ns-resize;left:50%;margin-left:-3px;top:-3px}.cropper-point.point-w{cursor:ew-resize;left:-3px;margin-top:-3px;top:50%}.cropper-point.point-s{bottom:-3px;cursor:s-resize;left:50%;margin-left:-3px}.cropper-point.point-ne{cursor:nesw-resize;right:-3px;top:-3px}.cropper-point.point-nw{cursor:nwse-resize;left:-3px;top:-3px}.cropper-point.point-sw{bottom:-3px;cursor:nesw-resize;left:-3px}.cropper-point.point-se{bottom:-3px;cursor:nwse-resize;height:20px;opacity:1;right:-3px;width:20px}@media (min-width: 768px){.cropper-point.point-se{height:15px;width:15px}}@media (min-width: 992px){.cropper-point.point-se{height:10px;width:10px}}@media (min-width: 1200px){.cropper-point.point-se{height:5px;opacity:.75;width:5px}}.cropper-point.point-se:before{background-color:#39f;bottom:-50%;content:" ";display:block;height:200%;opacity:0;position:absolute;right:-50%;width:200%}.cropper-invisible{opacity:0}.cropper-bg{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC)}.cropper-hide{display:block;height:0;position:absolute;width:0}.cropper-hidden{display:none!important}.cropper-move{cursor:move}.cropper-crop{cursor:crosshair}.cropper-disabled .cropper-drag-box,.cropper-disabled .cropper-face,.cropper-disabled .cropper-line,.cropper-disabled .cropper-point{cursor:not-allowed}.placeholder\:text-gray-400::placeholder{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.first\:rounded-t:first-child{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.last\:mb-0:last-child{margin-bottom:0}.last\:rounded-b:last-child{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.last\:border-none:last-child{border-style:none}.dark .odd\:bg-gray-50:nth-child(odd){--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.odd\:bg-gray-50:nth-child(odd){--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.checked\:shadow-inner:checked{--tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / .05);--tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus-within\:bg-orange-50:focus-within{--tw-bg-opacity: 1;background-color:rgb(255 242 229 / var(--tw-bg-opacity))}.focus-within\:ring-1:focus-within{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.dark .hover\:text-gray-500:hover{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.dark .hover\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.dark .hover\:border-gray-300:hover{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.dark .hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.hover\:cursor-none:hover{cursor:none}.hover\:divide-orange-100:hover>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(255 229 204 / var(--tw-divide-opacity))}.hover\:border-gray-300:hover{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.hover\:border-orange-400:hover{--tw-border-opacity: 1;border-color:rgb(255 150 51 / var(--tw-border-opacity))}.hover\:bg-orange-50:hover{--tw-bg-opacity: 1;background-color:rgb(255 242 229 / var(--tw-bg-opacity))}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.hover\:from-gray-100:hover{--tw-gradient-from: #f3f4f6;--tw-gradient-to: rgb(243 244 246 / 0);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:to-orange-200\/90:hover{--tw-gradient-to: rgb(255 216 180 / .9)}.hover\:to-gray-100\/90:hover{--tw-gradient-to: rgb(243 244 246 / .9)}.hover\:to-red-200\/90:hover{--tw-gradient-to: rgb(254 202 202 / .9)}.hover\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.hover\:text-orange-600:hover{--tw-text-opacity: 1;color:rgb(238 116 0 / var(--tw-text-opacity))}.hover\:text-gray-500:hover{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.hover\:text-orange-500:hover{--tw-text-opacity: 1;color:rgb(255 124 0 / var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-20:hover{opacity:.2}.hover\:shadow-sm:hover{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-xl:hover{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow:hover{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-md:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:ring:hover{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.hover\:ring-1:hover{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.hover\:\!ring-orange-500:hover{--tw-ring-opacity: 1 !important;--tw-ring-color: rgb(255 124 0 / var(--tw-ring-opacity)) !important}.hover\:ring-orange-300:hover{--tw-ring-opacity: 1;--tw-ring-color: rgb(255 176 102 / var(--tw-ring-opacity))}.hover\:brightness-110:hover{--tw-brightness: brightness(1.1);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.focus\:border-blue-300:focus{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity))}.focus\:bg-gradient-to-b:focus{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.focus\:from-blue-100:focus{--tw-gradient-from: #dbeafe;--tw-gradient-to: rgb(219 234 254 / 0);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.focus\:to-blue-50:focus{--tw-gradient-to: #eff6ff}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity))}.focus\:ring-blue-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(191 219 254 / var(--tw-ring-opacity))}.focus\:ring-opacity-50:focus{--tw-ring-opacity: .5}.focus\:ring-offset-0:focus{--tw-ring-offset-width: 0px}.dark .focus\:odd\:bg-white:nth-child(odd):focus{background-color:#0b0f19;--tw-bg-opacity: 1;background-color:rgb(11 15 25 / var(--tw-bg-opacity))}.focus\:odd\:bg-white:nth-child(odd):focus{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.active\:shadow-inner:active{--tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / .05);--tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:\!cursor-not-allowed:disabled{cursor:not-allowed!important}.disabled\:text-gray-400:disabled{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.group:last-child .group-last\:first\:rounded-bl-lg:first-child{border-bottom-left-radius:.5rem}.group:last-child .group-last\:last\:rounded-br-lg:last-child{border-bottom-right-radius:.5rem}.group:hover .group-hover\:border-orange-400{--tw-border-opacity: 1;border-color:rgb(255 150 51 / var(--tw-border-opacity))}.group:hover .group-hover\:from-orange-500{--tw-gradient-from: #FF7C00;--tw-gradient-to: rgb(255 124 0 / 0);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:text-orange-500{--tw-text-opacity: 1;color:rgb(255 124 0 / var(--tw-text-opacity))}.group:hover .group-hover\:opacity-50{opacity:.5}.dark .dark\:bg-gray-950{background-color:#0b0f19}.dark .dark\:divide-gray-800>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(31 41 55 / var(--tw-divide-opacity))}.dark .dark\:divide-gray-700>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(55 65 81 / var(--tw-divide-opacity))}.dark .dark\:border-gray-900{--tw-border-opacity: 1;border-color:rgb(17 24 39 / var(--tw-border-opacity))}.dark .dark\:border-orange-600{--tw-border-opacity: 1;border-color:rgb(238 116 0 / var(--tw-border-opacity))}.dark .dark\:border-gray-700{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.dark .dark\:border-gray-800{--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity))}.dark .dark\:border-gray-600{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.dark .dark\:\!border-red-900{--tw-border-opacity: 1 !important;border-color:rgb(127 29 29 / var(--tw-border-opacity))!important}.dark .dark\:\!border-yellow-900{--tw-border-opacity: 1 !important;border-color:rgb(113 63 18 / var(--tw-border-opacity))!important}.dark .dark\:\!border-green-900{--tw-border-opacity: 1 !important;border-color:rgb(20 83 45 / var(--tw-border-opacity))!important}.dark .dark\:\!border-blue-900{--tw-border-opacity: 1 !important;border-color:rgb(30 58 138 / var(--tw-border-opacity))!important}.dark .dark\:\!border-purple-900{--tw-border-opacity: 1 !important;border-color:rgb(88 28 135 / var(--tw-border-opacity))!important}.dark .dark\:\!border-gray-900{--tw-border-opacity: 1 !important;border-color:rgb(17 24 39 / var(--tw-border-opacity))!important}.dark .dark\:\!border-pink-900{--tw-border-opacity: 1 !important;border-color:rgb(131 24 67 / var(--tw-border-opacity))!important}.dark .dark\:border-slate-300{--tw-border-opacity: 1;border-color:rgb(203 213 225 / var(--tw-border-opacity))}.dark .dark\:border-b-slate-700{--tw-border-opacity: 1;border-bottom-color:rgb(51 65 85 / var(--tw-border-opacity))}.dark .dark\:border-r-slate-700{--tw-border-opacity: 1;border-right-color:rgb(51 65 85 / var(--tw-border-opacity))}.dark .dark\:\!bg-red-700{--tw-bg-opacity: 1 !important;background-color:rgb(185 28 28 / var(--tw-bg-opacity))!important}.dark .dark\:\!bg-green-700{--tw-bg-opacity: 1 !important;background-color:rgb(21 128 61 / var(--tw-bg-opacity))!important}.dark .dark\:\!bg-blue-700{--tw-bg-opacity: 1 !important;background-color:rgb(29 78 216 / var(--tw-bg-opacity))!important}.dark .dark\:\!bg-yellow-700{--tw-bg-opacity: 1 !important;background-color:rgb(161 98 7 / var(--tw-bg-opacity))!important}.dark .dark\:\!bg-purple-700{--tw-bg-opacity: 1 !important;background-color:rgb(126 34 206 / var(--tw-bg-opacity))!important}.dark .dark\:\!bg-teal-700{--tw-bg-opacity: 1 !important;background-color:rgb(15 118 110 / var(--tw-bg-opacity))!important}.dark .dark\:\!bg-orange-700{--tw-bg-opacity: 1 !important;background-color:rgb(206 100 0 / var(--tw-bg-opacity))!important}.dark .dark\:\!bg-cyan-700{--tw-bg-opacity: 1 !important;background-color:rgb(14 116 144 / var(--tw-bg-opacity))!important}.dark .dark\:\!bg-lime-700{--tw-bg-opacity: 1 !important;background-color:rgb(77 124 15 / var(--tw-bg-opacity))!important}.dark .dark\:\!bg-pink-700{--tw-bg-opacity: 1 !important;background-color:rgb(190 24 93 / var(--tw-bg-opacity))!important}.dark .dark\:\!bg-gray-700{--tw-bg-opacity: 1 !important;background-color:rgb(55 65 81 / var(--tw-bg-opacity))!important}.dark .dark\:bg-orange-400{--tw-bg-opacity: 1;background-color:rgb(255 150 51 / var(--tw-bg-opacity))}.dark .dark\:bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.dark .dark\:bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.dark .dark\:bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.dark .dark\:bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.dark .dark\:bg-gray-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.dark .dark\:bg-gray-950{--tw-bg-opacity: 1;background-color:rgb(11 15 25 / var(--tw-bg-opacity))}.dark .dark\:bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.dark .dark\:bg-transparent{background-color:transparent}.dark .dark\:bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity))}.dark .dark\:bg-opacity-80{--tw-bg-opacity: .8}.dark .dark\:from-orange-200\/5{--tw-gradient-from: rgb(255 216 180 / .05);--tw-gradient-to: rgb(255 216 180 / 0);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark .dark\:from-orange-400{--tw-gradient-from: #FF9633;--tw-gradient-to: rgb(255 150 51 / 0);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark .dark\:from-gray-900{--tw-gradient-from: #111827;--tw-gradient-to: rgb(17 24 39 / 0);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark .dark\:from-orange-700{--tw-gradient-from: #CE6400;--tw-gradient-to: rgb(206 100 0 / 0);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark .dark\:from-gray-600{--tw-gradient-from: #4b5563;--tw-gradient-to: rgb(75 85 99 / 0);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark .dark\:from-red-700{--tw-gradient-from: #b91c1c;--tw-gradient-to: rgb(185 28 28 / 0);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark .dark\:\!from-red-700{--tw-gradient-from: #b91c1c !important;--tw-gradient-to: rgb(185 28 28 / 0) !important;--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important}.dark .dark\:\!from-yellow-700{--tw-gradient-from: #a16207 !important;--tw-gradient-to: rgb(161 98 7 / 0) !important;--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important}.dark .dark\:\!from-green-700{--tw-gradient-from: #15803d !important;--tw-gradient-to: rgb(21 128 61 / 0) !important;--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important}.dark .dark\:\!from-blue-700{--tw-gradient-from: #1d4ed8 !important;--tw-gradient-to: rgb(29 78 216 / 0) !important;--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important}.dark .dark\:\!from-purple-700{--tw-gradient-from: #7e22ce !important;--tw-gradient-to: rgb(126 34 206 / 0) !important;--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important}.dark .dark\:\!from-gray-700{--tw-gradient-from: #374151 !important;--tw-gradient-to: rgb(55 65 81 / 0) !important;--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important}.dark .dark\:\!from-pink-700{--tw-gradient-from: #be185d !important;--tw-gradient-to: rgb(190 24 93 / 0) !important;--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important}.dark .dark\:from-\[rgba\(0\,0\,0\,0\)\]{--tw-gradient-from: rgba(0,0,0,0);--tw-gradient-to: rgb(0 0 0 / 0);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark .dark\:from-red-500{--tw-gradient-from: #ef4444;--tw-gradient-to: rgb(239 68 68 / 0);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark .dark\:to-orange-600{--tw-gradient-to: #EE7400}.dark .dark\:to-gray-800{--tw-gradient-to: #1f2937}.dark .dark\:to-orange-700{--tw-gradient-to: #CE6400}.dark .dark\:to-gray-700{--tw-gradient-to: #374151}.dark .dark\:to-red-700{--tw-gradient-to: #b91c1c}.dark .dark\:\!to-red-800{--tw-gradient-to: #991b1b !important}.dark .dark\:\!to-yellow-800{--tw-gradient-to: #854d0e !important}.dark .dark\:\!to-green-800{--tw-gradient-to: #166534 !important}.dark .dark\:\!to-blue-800{--tw-gradient-to: #1e40af !important}.dark .dark\:\!to-purple-800{--tw-gradient-to: #6b21a8 !important}.dark .dark\:\!to-gray-800{--tw-gradient-to: #1f2937 !important}.dark .dark\:\!to-pink-800{--tw-gradient-to: #9d174d !important}.dark .dark\:to-gray-950{--tw-gradient-to: #0b0f19}.dark .dark\:to-red-600{--tw-gradient-to: #dc2626}.dark .dark\:fill-slate-200{fill:#e2e8f0}.dark .dark\:\!text-red-300{--tw-text-opacity: 1 !important;color:rgb(252 165 165 / var(--tw-text-opacity))!important}.dark .dark\:\!text-green-300{--tw-text-opacity: 1 !important;color:rgb(134 239 172 / var(--tw-text-opacity))!important}.dark .dark\:\!text-blue-300{--tw-text-opacity: 1 !important;color:rgb(147 197 253 / var(--tw-text-opacity))!important}.dark .dark\:\!text-yellow-300{--tw-text-opacity: 1 !important;color:rgb(253 224 71 / var(--tw-text-opacity))!important}.dark .dark\:\!text-purple-300{--tw-text-opacity: 1 !important;color:rgb(216 180 254 / var(--tw-text-opacity))!important}.dark .dark\:\!text-teal-300{--tw-text-opacity: 1 !important;color:rgb(94 234 212 / var(--tw-text-opacity))!important}.dark .dark\:\!text-orange-300{--tw-text-opacity: 1 !important;color:rgb(255 176 102 / var(--tw-text-opacity))!important}.dark .dark\:\!text-cyan-300{--tw-text-opacity: 1 !important;color:rgb(103 232 249 / var(--tw-text-opacity))!important}.dark .dark\:\!text-lime-300{--tw-text-opacity: 1 !important;color:rgb(190 242 100 / var(--tw-text-opacity))!important}.dark .dark\:\!text-pink-300{--tw-text-opacity: 1 !important;color:rgb(249 168 212 / var(--tw-text-opacity))!important}.dark .dark\:\!text-gray-300{--tw-text-opacity: 1 !important;color:rgb(209 213 219 / var(--tw-text-opacity))!important}.dark .dark\:\!text-gray-50{--tw-text-opacity: 1 !important;color:rgb(249 250 251 / var(--tw-text-opacity))!important}.dark .dark\:text-orange-900{--tw-text-opacity: 1;color:rgb(92 45 0 / var(--tw-text-opacity))}.dark .dark\:text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark .dark\:text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.dark .dark\:text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.dark .dark\:text-gray-100{--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity))}.dark .dark\:text-slate-200{--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity))}.dark .dark\:text-indigo-300{--tw-text-opacity: 1;color:rgb(165 180 252 / var(--tw-text-opacity))}.dark .dark\:text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity))}.dark .dark\:text-slate-300{--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity))}.dark .dark\:text-red-100{--tw-text-opacity: 1;color:rgb(254 226 226 / var(--tw-text-opacity))}.dark .dark\:text-yellow-100{--tw-text-opacity: 1;color:rgb(254 249 195 / var(--tw-text-opacity))}.dark .dark\:text-green-100{--tw-text-opacity: 1;color:rgb(220 252 231 / var(--tw-text-opacity))}.dark .dark\:text-blue-100{--tw-text-opacity: 1;color:rgb(219 234 254 / var(--tw-text-opacity))}.dark .dark\:text-purple-100{--tw-text-opacity: 1;color:rgb(243 232 255 / var(--tw-text-opacity))}.dark .dark\:text-gray-50{--tw-text-opacity: 1;color:rgb(249 250 251 / var(--tw-text-opacity))}.dark .dark\:ring-gray-500{--tw-ring-opacity: 1;--tw-ring-color: rgb(107 114 128 / var(--tw-ring-opacity))}.dark .dark\:ring-gray-600{--tw-ring-opacity: 1;--tw-ring-color: rgb(75 85 99 / var(--tw-ring-opacity))}.dark .dark\:invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.dark .dark .dark\:placeholder\:text-gray-500::placeholder{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.dark .dark\:placeholder\:text-gray-500::placeholder{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.dark .dark\:odd\:bg-gray-900:nth-child(odd){--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.dark .dark\:focus-within\:bg-gray-800:focus-within{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.dark .dark\:hover\:border-gray-600:hover{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.dark .dark\:hover\:border-orange-700:hover{--tw-border-opacity: 1;border-color:rgb(206 100 0 / var(--tw-border-opacity))}.dark .dark\:hover\:bg-gray-700:hover{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.dark .dark\:hover\:bg-gray-800:hover{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.dark .dark\:hover\:to-orange-500:hover{--tw-gradient-to: #FF7C00}.dark .dark\:hover\:to-gray-600:hover{--tw-gradient-to: #4b5563}.dark .dark\:hover\:to-red-500:hover{--tw-gradient-to: #ef4444}.dark .dark\:hover\:text-gray-200:hover{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.dark .dark\:focus\:border-gray-600:focus{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.dark .dark\:focus\:from-blue-900:focus{--tw-gradient-from: #1e3a8a;--tw-gradient-to: rgb(30 58 138 / 0);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark .dark\:focus\:to-gray-900:focus{--tw-gradient-to: #111827}.dark .dark\:focus\:ring-0:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.dark .dark\:focus\:ring-gray-700:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(55 65 81 / var(--tw-ring-opacity))}@media (min-width: 640px){.sm\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.sm\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.sm\:grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.sm\:grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.sm\:grid-cols-9{grid-template-columns:repeat(9,minmax(0,1fr))}.sm\:grid-cols-10{grid-template-columns:repeat(10,minmax(0,1fr))}.sm\:grid-cols-11{grid-template-columns:repeat(11,minmax(0,1fr))}.sm\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}}@media (min-width: 768px){.md\:top-6{top:1.5rem}.md\:left-auto{left:auto}.md\:right-8{right:2rem}.md\:bottom-4{bottom:1rem}.md\:mr-2{margin-right:.5rem}.md\:min-h-\[15rem\]{min-height:15rem}.md\:w-4{width:1rem}.md\:w-3{width:.75rem}.md\:w-\[950px\]{width:950px}.md\:w-1\/2{width:50%}.md\:w-96{width:24rem}.md\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.md\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.md\:grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.md\:grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.md\:grid-cols-9{grid-template-columns:repeat(9,minmax(0,1fr))}.md\:grid-cols-10{grid-template-columns:repeat(10,minmax(0,1fr))}.md\:grid-cols-11{grid-template-columns:repeat(11,minmax(0,1fr))}.md\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.md\:rounded-l-xl{border-top-left-radius:.75rem;border-bottom-left-radius:.75rem}.md\:bg-gradient-to-bl{background-image:linear-gradient(to bottom left,var(--tw-gradient-stops))}.md\:text-lg{font-size:1.125rem;line-height:1.75rem}.md\:text-base{font-size:1rem;line-height:1.5rem}.md\:text-xl{font-size:1.25rem;line-height:1.75rem}}@media (min-width: 1024px){.lg\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.lg\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.lg\:grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.lg\:grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.lg\:grid-cols-9{grid-template-columns:repeat(9,minmax(0,1fr))}.lg\:grid-cols-10{grid-template-columns:repeat(10,minmax(0,1fr))}.lg\:grid-cols-11{grid-template-columns:repeat(11,minmax(0,1fr))}.lg\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}}@media (min-width: 1280px){.xl\:bottom-8{bottom:2rem}.xl\:max-h-\[18rem\]{max-height:18rem}.xl\:min-h-\[450px\]{min-height:450px}.xl\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.xl\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.xl\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.xl\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.xl\:grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.xl\:grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.xl\:grid-cols-9{grid-template-columns:repeat(9,minmax(0,1fr))}.xl\:grid-cols-10{grid-template-columns:repeat(10,minmax(0,1fr))}.xl\:grid-cols-11{grid-template-columns:repeat(11,minmax(0,1fr))}.xl\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}}@media (min-width: 1536px){.\32xl\:max-h-\[20rem\]{max-height:20rem}.\32xl\:w-\[1150px\]{width:1150px}.\32xl\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.\32xl\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.\32xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.\32xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.\32xl\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.\32xl\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.\32xl\:grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.\32xl\:grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.\32xl\:grid-cols-9{grid-template-columns:repeat(9,minmax(0,1fr))}.\32xl\:grid-cols-10{grid-template-columns:repeat(10,minmax(0,1fr))}.\32xl\:grid-cols-11{grid-template-columns:repeat(11,minmax(0,1fr))}.\32xl\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}}.dark .gr-box{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity));background-color:#0b0f19;--tw-bg-opacity: 1;background-color:rgb(11 15 25 / var(--tw-bg-opacity))}.gr-box{position:relative;border-radius:.5rem;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity));font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity));--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.dark .gr-box{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.dark .gr-box-unrounded{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity));background-color:#0b0f19;--tw-bg-opacity: 1;background-color:rgb(11 15 25 / var(--tw-bg-opacity))}.gr-box-unrounded{position:relative;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity));font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity));--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.dark .gr-box-unrounded{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.dark .gr-input{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.gr-input{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.gr-input::placeholder{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.gr-input:checked{--tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / .05);--tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.gr-input:focus{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity));--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-color: rgb(191 219 254 / var(--tw-ring-opacity));--tw-ring-opacity: .5}.dark .gr-input{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity));--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.dark .dark .gr-input::placeholder{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.dark .gr-input::placeholder{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.dark .gr-input:focus{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity));--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.dark .gr-label{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.gr-label{margin-bottom:.5rem;display:block;font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.gr-padded{padding:.625rem .75rem}.gr-panel{border-radius:.5rem;--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity));padding:.5rem}.dark .gr-panel{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.dark .gr-box-sm,.dark .gr-box-sm-gray-100,.dark .gr-box-sm-gray-200,.dark .gr-box-sm-gray-300{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.gr-box-sm>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.gr-box-sm{border-width:1px;padding:.375rem .75rem}.dark .gr-compact,.dark .gr-compact-gray-100,.dark .gr-compact-gray-200,.dark .gr-compact-gray-300{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.gr-compact{align-items:stretch;gap:0px;overflow:clip;border-radius:.5rem!important;border-width:1px;--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.dark .gr-compact{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.gr-text-input{padding:.625rem;--tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / .05);--tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.gr-text-input:disabled{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.dark .gr-check-radio{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.gr-check-radio{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity));--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity));--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.gr-check-radio:focus{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity));--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-color: rgb(191 219 254 / var(--tw-ring-opacity));--tw-ring-opacity: .5;--tw-ring-offset-width: 0px}.gr-check-radio:disabled{cursor:not-allowed!important;--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.dark .gr-check-radio{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.dark .gr-check-radio:checked{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.dark .gr-check-radio:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(55 65 81 / var(--tw-ring-opacity))}.gr-checkbox{border-radius:.25rem}.gr-input-label{background-image:linear-gradient(to top,var(--tw-gradient-stops));--tw-gradient-from: #f9fafb;--tw-gradient-to: rgb(249 250 251 / 0);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #fff;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.gr-input-label:hover{--tw-gradient-from: #f3f4f6;--tw-gradient-to: rgb(243 244 246 / 0);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark .gr-input-label{--tw-gradient-from: #111827;--tw-gradient-to: rgb(17 24 39 / 0);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #1f2937}.gr-radio{border-radius:9999px}.dark .gr-button,.dark .gr-button-gray-100,.dark .gr-button-gray-200,.dark .gr-button-gray-300{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.dark .gr-button{background-color:#0b0f19;--tw-bg-opacity: 1;background-color:rgb(11 15 25 / var(--tw-bg-opacity))}.gr-button{display:inline-flex;align-items:center;justify-content:center;border-radius:.25rem;border-width:1px;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity));background-image:linear-gradient(to bottom right,var(--tw-gradient-stops));padding:.125rem .5rem;text-align:center;font-size:.875rem;line-height:1.25rem;--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.gr-button:hover{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.gr-button:active{--tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / .05);--tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.dark .gr-button{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.gr-button-primary{--tw-border-opacity: 1;border-color:rgb(255 216 180 / var(--tw-border-opacity));--tw-gradient-from: rgb(255 216 180 / .7);--tw-gradient-to: rgb(255 216 180 / 0);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: rgb(255 176 102 / .8);--tw-text-opacity: 1;color:rgb(238 116 0 / var(--tw-text-opacity))}.gr-button-primary:hover{--tw-gradient-to: rgb(255 216 180 / .9)}.dark .gr-button-primary{--tw-border-opacity: 1;border-color:rgb(238 116 0 / var(--tw-border-opacity));--tw-gradient-from: #CE6400;--tw-gradient-to: rgb(206 100 0 / 0);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #CE6400;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark .gr-button-primary:hover{--tw-gradient-to: #FF7C00}.dark .gr-button-secondary{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.dark .gr-button-secondary{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.gr-button-secondary{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity));--tw-gradient-from: rgb(243 244 246 / .7);--tw-gradient-to: rgb(243 244 246 / 0);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: rgb(229 231 235 / .8);--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.gr-button-secondary:hover{--tw-gradient-to: rgb(243 244 246 / .9)}.dark .gr-button-secondary{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity));--tw-gradient-from: #4b5563;--tw-gradient-to: rgb(75 85 99 / 0);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #374151;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark .gr-button-secondary:hover{--tw-gradient-to: #4b5563}.gr-button-stop{--tw-border-opacity: 1;border-color:rgb(254 202 202 / var(--tw-border-opacity));--tw-gradient-from: rgb(254 202 202 / .7);--tw-gradient-to: rgb(254 202 202 / 0);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: rgb(252 165 165 / .8);--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.gr-button-stop:hover{--tw-gradient-to: rgb(254 202 202 / .9)}.dark .gr-button-stop{--tw-border-opacity: 1;border-color:rgb(220 38 38 / var(--tw-border-opacity));--tw-gradient-from: #b91c1c;--tw-gradient-to: rgb(185 28 28 / 0);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #b91c1c;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark .gr-button-stop:hover{--tw-gradient-to: #ef4444}.gr-button-sm{border-radius:.375rem;padding:.25rem .75rem;font-size:.875rem;line-height:1.25rem}.gr-button-lg{border-radius:.5rem;padding:.5rem 1rem;font-size:1rem;line-height:1.5rem;font-weight:600}.gr-samples-table{width:100%}.gr-samples-table img.gr-sample-image,.gr-samples-table video.gr-sample-video{height:5rem;width:5rem;object-fit:cover}.gr-samples-gallery{display:flex;flex-wrap:wrap;gap:.5rem}.gr-samples-gallery img.gr-sample-image,.gr-samples-gallery video.gr-sample-video{max-height:5rem;object-fit:cover}.dark .gr-samples-gallery .gr-sample-textbox,.dark .gr-samples-gallery .gr-sample-textbox-gray-100,.dark .gr-samples-gallery .gr-sample-textbox-gray-200,.dark .gr-samples-gallery .gr-sample-textbox-gray-300,.dark .gr-samples-gallery .gr-sample-markdown,.dark .gr-samples-gallery .gr-sample-markdown-gray-100,.dark .gr-samples-gallery .gr-sample-markdown-gray-200,.dark .gr-samples-gallery .gr-sample-markdown-gray-300,.dark .gr-samples-gallery .gr-sample-html,.dark .gr-samples-gallery .gr-sample-html-gray-100,.dark .gr-samples-gallery .gr-sample-html-gray-200,.dark .gr-samples-gallery .gr-sample-html-gray-300,.dark .gr-samples-gallery .gr-sample-slider,.dark .gr-samples-gallery .gr-sample-slider-gray-100,.dark .gr-samples-gallery .gr-sample-slider-gray-200,.dark .gr-samples-gallery .gr-sample-slider-gray-300,.dark .gr-samples-gallery .gr-sample-checkbox,.dark .gr-samples-gallery .gr-sample-checkbox-gray-100,.dark .gr-samples-gallery .gr-sample-checkbox-gray-200,.dark .gr-samples-gallery .gr-sample-checkbox-gray-300,.dark .gr-samples-gallery .gr-sample-checkboxgroup,.dark .gr-samples-gallery .gr-sample-checkboxgroup-gray-100,.dark .gr-samples-gallery .gr-sample-checkboxgroup-gray-200,.dark .gr-samples-gallery .gr-sample-checkboxgroup-gray-300,.dark .gr-samples-gallery .gr-sample-file,.dark .gr-samples-gallery .gr-sample-file-gray-100,.dark .gr-samples-gallery .gr-sample-file-gray-200,.dark .gr-samples-gallery .gr-sample-file-gray-300,.dark .gr-samples-gallery .gr-sample-number,.dark .gr-samples-gallery .gr-sample-number-gray-100,.dark .gr-samples-gallery .gr-sample-number-gray-200,.dark .gr-samples-gallery .gr-sample-number-gray-300,.dark .gr-samples-gallery .gr-sample-audio,.dark .gr-samples-gallery .gr-sample-audio-gray-100,.dark .gr-samples-gallery .gr-sample-audio-gray-200,.dark .gr-samples-gallery .gr-sample-audio-gray-300,.dark .gr-samples-gallery .gr-sample-3d,.dark .gr-samples-gallery .gr-sample-3d-gray-100,.dark .gr-samples-gallery .gr-sample-3d-gray-200,.dark .gr-samples-gallery .gr-sample-3d-gray-300{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.dark .gr-samples-gallery .gr-sample-textbox,.dark .gr-samples-gallery .gr-sample-markdown,.dark .gr-samples-gallery .gr-sample-html,.dark .gr-samples-gallery .gr-sample-slider,.dark .gr-samples-gallery .gr-sample-checkbox,.dark .gr-samples-gallery .gr-sample-checkboxgroup,.dark .gr-samples-gallery .gr-sample-file,.dark .gr-samples-gallery .gr-sample-number,.dark .gr-samples-gallery .gr-sample-audio,.dark .gr-samples-gallery .gr-sample-3d{background-color:#0b0f19;--tw-bg-opacity: 1;background-color:rgb(11 15 25 / var(--tw-bg-opacity))}.gr-samples-gallery .gr-sample-textbox,.gr-samples-gallery .gr-sample-markdown,.gr-samples-gallery .gr-sample-html,.gr-samples-gallery .gr-sample-slider,.gr-samples-gallery .gr-sample-checkbox,.gr-samples-gallery .gr-sample-checkboxgroup,.gr-samples-gallery .gr-sample-file,.gr-samples-gallery .gr-sample-number,.gr-samples-gallery .gr-sample-audio,.gr-samples-gallery .gr-sample-3d{display:flex;cursor:pointer;align-items:center;border-radius:.5rem;border-width:1px;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity));padding:.375rem .5rem;text-align:left;font-size:.875rem;line-height:1.25rem}.dark .gr-samples-gallery .gr-sample-textbox:hover,.dark .gr-samples-gallery .gr-sample-markdown:hover,.dark .gr-samples-gallery .gr-sample-html:hover,.dark .gr-samples-gallery .gr-sample-slider:hover,.dark .gr-samples-gallery .gr-sample-checkbox:hover,.dark .gr-samples-gallery .gr-sample-checkboxgroup:hover,.dark .gr-samples-gallery .gr-sample-file:hover,.dark .gr-samples-gallery .gr-sample-number:hover,.dark .gr-samples-gallery .gr-sample-audio:hover,.dark .gr-samples-gallery .gr-sample-3d:hover{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.gr-samples-gallery .gr-sample-textbox:hover,.gr-samples-gallery .gr-sample-markdown:hover,.gr-samples-gallery .gr-sample-html:hover,.gr-samples-gallery .gr-sample-slider:hover,.gr-samples-gallery .gr-sample-checkbox:hover,.gr-samples-gallery .gr-sample-checkboxgroup:hover,.gr-samples-gallery .gr-sample-file:hover,.gr-samples-gallery .gr-sample-number:hover,.gr-samples-gallery .gr-sample-audio:hover,.gr-samples-gallery .gr-sample-3d:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.dark .gr-samples-gallery .gr-sample-textbox,.dark .gr-samples-gallery .gr-sample-markdown,.dark .gr-samples-gallery .gr-sample-html,.dark .gr-samples-gallery .gr-sample-slider,.dark .gr-samples-gallery .gr-sample-checkbox,.dark .gr-samples-gallery .gr-sample-checkboxgroup,.dark .gr-samples-gallery .gr-sample-file,.dark .gr-samples-gallery .gr-sample-number,.dark .gr-samples-gallery .gr-sample-audio,.dark .gr-samples-gallery .gr-sample-3d{background-color:transparent}.dark .gr-samples-gallery .gr-sample-textbox:hover,.dark .gr-samples-gallery .gr-sample-markdown:hover,.dark .gr-samples-gallery .gr-sample-html:hover,.dark .gr-samples-gallery .gr-sample-slider:hover,.dark .gr-samples-gallery .gr-sample-checkbox:hover,.dark .gr-samples-gallery .gr-sample-checkboxgroup:hover,.dark .gr-samples-gallery .gr-sample-file:hover,.dark .gr-samples-gallery .gr-sample-number:hover,.dark .gr-samples-gallery .gr-sample-audio:hover,.dark .gr-samples-gallery .gr-sample-3d:hover{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.dark .gr-samples-gallery .gr-sample-dataframe,.dark .gr-samples-gallery .gr-sample-dataframe-gray-100,.dark .gr-samples-gallery .gr-sample-dataframe-gray-200,.dark .gr-samples-gallery .gr-sample-dataframe-gray-300{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.dark .gr-samples-gallery .gr-sample-dataframe{background-color:#0b0f19;--tw-bg-opacity: 1;background-color:rgb(11 15 25 / var(--tw-bg-opacity))}.gr-samples-gallery .gr-sample-dataframe{border-collapse:collapse;cursor:pointer;align-items:center;overflow:hidden;border-radius:.5rem;border-width:1px;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity));padding:.375rem .5rem;text-align:left;font-size:.875rem;line-height:1.25rem}.dark .gr-samples-gallery .gr-sample-dataframe:hover{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.gr-samples-gallery .gr-sample-dataframe:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.dark .gr-samples-gallery .gr-sample-dataframe{background-color:transparent}.dark .gr-samples-gallery .gr-sample-dataframe:hover{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}img.gr-sample-image,video.gr-sample-video{max-width:none;flex:none;border-radius:.5rem;border-width:2px;--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}img.gr-sample-image:hover,video.gr-sample-video:hover{--tw-border-opacity: 1;border-color:rgb(255 150 51 / var(--tw-border-opacity))}.group:hover img.gr-sample-image,.group:hover video.gr-sample-video{--tw-border-opacity: 1;border-color:rgb(255 150 51 / var(--tw-border-opacity))}.dark img.gr-sample-image,.dark video.gr-sample-video{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.dark img.gr-sample-image:hover,.dark video.gr-sample-video:hover{--tw-border-opacity: 1;border-color:rgb(206 100 0 / var(--tw-border-opacity))}.dark .group:hover img.gr-sample-image,.dark .group:hover video.gr-sample-video{--tw-border-opacity: 1;border-color:rgb(206 100 0 / var(--tw-border-opacity))}.wrap.svelte-y7zzi6{pointer-events:none;position:absolute;z-index:50;display:flex;max-height:100vh;flex-direction:column;align-items:center;justify-content:center;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.dark .cover-bg.svelte-y7zzi6{--tw-bg-opacity:1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.cover-bg.svelte-y7zzi6{--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}@keyframes svelte-y7zzi6-pulse{50%{opacity:.5}}.generating.svelte-y7zzi6{animation:svelte-y7zzi6-pulse 2s cubic-bezier(.4,0,.6,1) infinite;border-width:2px;--tw-border-opacity:1;border-color:rgb(255 124 0 / var(--tw-border-opacity))}.eta-bar.svelte-y7zzi6{position:absolute;inset:0;z-index:10;transform-origin:left;--tw-bg-opacity:1;background-color:rgb(241 245 249 / var(--tw-bg-opacity));opacity:.8}.progress-bar.svelte-y7zzi6{inset:0;height:100%;width:100%;transform-origin:left;border-radius:.25rem;--tw-bg-opacity:1;background-color:rgb(255 124 0 / var(--tw-bg-opacity))}.meta-text.svelte-y7zzi6{position:absolute;top:0;right:0;z-index:20;padding:.25rem .5rem;font-family:IBM Plex Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.75rem;line-height:1rem}.meta-text-center.svelte-y7zzi6{position:absolute;inset:0;z-index:20;display:flex;--tw-translate-y:1.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));align-items:center;justify-content:center;text-align:center;font-family:IBM Plex Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.75rem;line-height:1rem}.timer.svelte-y7zzi6{--tw-translate-y:-4rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.dark .error.svelte-y7zzi6{background-color:#ef44441a;--tw-text-opacity:1;color:rgb(220 38 38 / var(--tw-text-opacity))}.error.svelte-y7zzi6{border-radius:9999px;background-color:#ef44440d;padding-left:1rem;padding-right:1rem;font-family:Source Sans Pro,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-size:1.125rem;line-height:1.75rem;font-weight:600;--tw-text-opacity:1;color:rgb(248 113 113 / var(--tw-text-opacity))} diff --git a/gradio-modified/gradio/templates/frontend/assets/index.e55449fe.js b/gradio-modified/gradio/templates/frontend/assets/index.e55449fe.js new file mode 100644 index 0000000000000000000000000000000000000000..b8ecbe478cad03dbdf01736f8d9b9d5551323ce7 --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/index.e55449fe.js @@ -0,0 +1,2 @@ +import{S as p,i as b,s as h,c,m,j as _,k as f,o as d,R as k,T as v,p as C,a as $,f as S,U as j,V as q,u as w,q as T,r as K,n as R,K as U}from"./index.396f4a72.js";import{C as V}from"./CarouselItem.svelte_svelte_type_style_lang.cc0aed40.js";function z(l){let s,o,t;const i=[l[2]];let r={};for(let e=0;e{"elem_id"in a&&o(0,r=a.elem_id),"visible"in a&&o(1,u=a.visible),"loading_status"in a&&o(2,n=a.loading_status),"$$scope"in a&&o(5,i=a.$$scope)},[r,u,n,t,e,i]}class D extends p{constructor(s){super(),b(this,s,B,A,h,{elem_id:0,visible:1,loading_status:2})}}var G=D;const H=["static"];export{G as Component,H as modes}; +//# sourceMappingURL=index.e55449fe.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/index.ee96260f.js b/gradio-modified/gradio/templates/frontend/assets/index.ee96260f.js new file mode 100644 index 0000000000000000000000000000000000000000..c50508300e0165562342e9148d716c1d489a6b1e --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/index.ee96260f.js @@ -0,0 +1,2 @@ +import{S as O,i as D,s as E,a7 as K,e as w,a as j,t as F,b as h,d as q,f as m,g as k,l as L,h as I,n as g,c as v,m as y,ab as M,aq as P,j as R,k as S,o as T,F as U,Z as V,P as Z,R as z,T as A,I as G,O as H,U as J,V as N,L as Q,K as W}from"./index.396f4a72.js";function B(n,e,t){const l=n.slice();return l[11]=e[t],l[13]=t,l}function X(n){let e;return{c(){e=F(n[3])},m(t,l){m(t,e,l)},p(t,l){l&8&&I(e,t[3])},d(t){t&&g(e)}}}function C(n,e){let t,l,o,_,c,f,r=e[11]+"",i,a,u,b;return{key:n,first:null,c(){t=w("label"),l=w("input"),c=j(),f=w("span"),i=F(r),l.disabled=e[2],h(l,"type","radio"),h(l,"name",o="radio-"+e[5]),h(l,"class","gr-check-radio gr-radio"),l.__value=_=e[11],l.value=l.__value,e[9][0].push(l),h(f,"class","ml-2"),h(t,"class",a="gr-input-label flex items-center text-gray-700 text-sm space-x-2 border py-1.5 px-3 rounded-lg cursor-pointer bg-white shadow-sm checked:shadow-inner "+e[6]),q(t,"!cursor-not-allowed",e[2]),this.first=t},m(d,s){m(d,t,s),k(t,l),l.checked=l.__value===e[0],k(t,c),k(t,f),k(f,i),u||(b=L(l,"change",e[8]),u=!0)},p(d,s){e=d,s&4&&(l.disabled=e[2]),s&32&&o!==(o="radio-"+e[5])&&h(l,"name",o),s&2&&_!==(_=e[11])&&(l.__value=_,l.value=l.__value),s&1&&(l.checked=l.__value===e[0]),s&2&&r!==(r=e[11]+"")&&I(i,r),s&64&&a!==(a="gr-input-label flex items-center text-gray-700 text-sm space-x-2 border py-1.5 px-3 rounded-lg cursor-pointer bg-white shadow-sm checked:shadow-inner "+e[6])&&h(t,"class",a),s&68&&q(t,"!cursor-not-allowed",e[2])},d(d){d&&g(t),e[9][0].splice(e[9][0].indexOf(l),1),u=!1,b()}}}function Y(n){let e,t,l,o=[],_=new Map,c;e=new K({props:{show_label:n[4],$$slots:{default:[X]},$$scope:{ctx:n}}});let f=n[1];const r=i=>i[13];for(let i=0;i{"value"in s&&t(0,o=s.value),"style"in s&&t(7,_=s.style),"choices"in s&&t(1,c=s.choices),"disabled"in s&&t(2,f=s.disabled),"label"in s&&t(3,r=s.label),"show_label"in s&&t(4,i=s.show_label),"elem_id"in s&&t(5,a=s.elem_id)},n.$$.update=()=>{n.$$.dirty&1&&u("change",o),n.$$.dirty&128&&t(6,{item_container:l}=V(_,["item_container"]),l)},[o,c,f,r,i,a,l,_,d,b]}class x extends O{constructor(e){super(),D(this,e,p,Y,E,{value:0,style:7,choices:1,disabled:2,label:3,show_label:4,elem_id:5})}}function $(n){let e,t,l,o,_;const c=[n[8]];let f={};for(let a=0;aH(l,"value",r)),l.$on("change",n[10]),{c(){v(e.$$.fragment),t=j(),v(l.$$.fragment)},m(a,u){y(e,a,u),m(a,t,u),y(l,a,u),_=!0},p(a,u){const b=u&256?J(c,[N(a[8])]):{};e.$set(b);const d={};u&2&&(d.label=a[1]),u&4&&(d.elem_id=a[2]),u&64&&(d.show_label=a[6]),u&16&&(d.choices=a[4]),u&128&&(d.style=a[7]),u&32&&(d.disabled=a[5]==="static"),!o&&u&1&&(o=!0,d.value=a[0],Q(()=>o=!1)),l.$set(d)},i(a){_||(R(e.$$.fragment,a),R(l.$$.fragment,a),_=!0)},o(a){S(e.$$.fragment,a),S(l.$$.fragment,a),_=!1},d(a){T(e,a),a&&g(t),T(l,a)}}}function ee(n){let e,t;return e=new Z({props:{visible:n[3],type:"fieldset",elem_id:n[2],disable:typeof n[7].container=="boolean"&&!n[7].container,$$slots:{default:[$]},$$scope:{ctx:n}}}),{c(){v(e.$$.fragment)},m(l,o){y(e,l,o),t=!0},p(l,[o]){const _={};o&8&&(_.visible=l[3]),o&4&&(_.elem_id=l[2]),o&128&&(_.disable=typeof l[7].container=="boolean"&&!l[7].container),o&2551&&(_.$$scope={dirty:o,ctx:l}),e.$set(_)},i(l){t||(R(e.$$.fragment,l),t=!0)},o(l){S(e.$$.fragment,l),t=!1},d(l){T(e,l)}}}function le(n,e,t){let{label:l="Radio"}=e,{elem_id:o=""}=e,{visible:_=!0}=e,{value:c=""}=e,{choices:f=[]}=e,{mode:r}=e,{show_label:i}=e,{style:a={}}=e,{loading_status:u}=e;function b(s){c=s,t(0,c)}function d(s){W.call(this,n,s)}return n.$$set=s=>{"label"in s&&t(1,l=s.label),"elem_id"in s&&t(2,o=s.elem_id),"visible"in s&&t(3,_=s.visible),"value"in s&&t(0,c=s.value),"choices"in s&&t(4,f=s.choices),"mode"in s&&t(5,r=s.mode),"show_label"in s&&t(6,i=s.show_label),"style"in s&&t(7,a=s.style),"loading_status"in s&&t(8,u=s.loading_status)},[c,l,o,_,f,r,i,a,u,b,d]}class ae extends O{constructor(e){super(),D(this,e,le,ee,E,{label:1,elem_id:2,visible:3,value:0,choices:4,mode:5,show_label:6,style:7,loading_status:8})}}var se=ae;const ne=["static","dynamic"],ie=n=>({type:"string",description:"selected choice",example_data:n.choices.length>1?n.choices[0]:""});export{se as Component,ie as document,ne as modes}; +//# sourceMappingURL=index.ee96260f.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/index.eff0bbf7.js b/gradio-modified/gradio/templates/frontend/assets/index.eff0bbf7.js new file mode 100644 index 0000000000000000000000000000000000000000..fcc148a3990cab153a88ab1fdf736440d4e9ef90 --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/index.eff0bbf7.js @@ -0,0 +1,2 @@ +import{S as m,i as b,s as g,I as p,O as h,c as v,m as T,L as k,j as u,k as f,o as q,F as C,p as S,u as j,q as w,r as D,K as E}from"./index.396f4a72.js";import{T as F}from"./Tabs.6b500f1a.js";import"./Column.06c172ac.js";function I(s){let e;const i=s[3].default,t=S(i,s,s[6],null);return{c(){t&&t.c()},m(n,_){t&&t.m(n,_),e=!0},p(n,_){t&&t.p&&(!e||_&64)&&j(t,i,n,n[6],e?D(i,n[6],_,null):w(n[6]),null)},i(n){e||(u(t,n),e=!0)},o(n){f(t,n),e=!1},d(n){t&&t.d(n)}}}function K(s){let e,i,t;function n(a){s[4](a)}let _={visible:s[1],elem_id:s[2],$$slots:{default:[I]},$$scope:{ctx:s}};return s[0]!==void 0&&(_.selected=s[0]),e=new F({props:_}),p.push(()=>h(e,"selected",n)),e.$on("change",s[5]),{c(){v(e.$$.fragment)},m(a,c){T(e,a,c),t=!0},p(a,[c]){const o={};c&2&&(o.visible=a[1]),c&4&&(o.elem_id=a[2]),c&64&&(o.$$scope={dirty:c,ctx:a}),!i&&c&1&&(i=!0,o.selected=a[0],k(()=>i=!1)),e.$set(o)},i(a){t||(u(e.$$.fragment,a),t=!0)},o(a){f(e.$$.fragment,a),t=!1},d(a){q(e,a)}}}function L(s,e,i){let{$$slots:t={},$$scope:n}=e;const _=C();let{visible:a=!0}=e,{elem_id:c=""}=e,{selected:o}=e;function r(l){o=l,i(0,o)}function d(l){E.call(this,s,l)}return s.$$set=l=>{"visible"in l&&i(1,a=l.visible),"elem_id"in l&&i(2,c=l.elem_id),"selected"in l&&i(0,o=l.selected),"$$scope"in l&&i(6,n=l.$$scope)},s.$$.update=()=>{s.$$.dirty&1&&_("prop_change",{selected:o})},[o,a,c,t,r,d,n]}class O extends m{constructor(e){super(),b(this,e,L,K,g,{visible:1,elem_id:2,selected:0})}}var G=O;const H=["static"];export{G as Component,H as modes}; +//# sourceMappingURL=index.eff0bbf7.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/index.ff52f1c2.js b/gradio-modified/gradio/templates/frontend/assets/index.ff52f1c2.js new file mode 100644 index 0000000000000000000000000000000000000000..a94d133c9626959cd05cebb58f2406d4d72632de --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/index.ff52f1c2.js @@ -0,0 +1,7 @@ +import{S as C,i as A,s as E,e as b,t as S,b as _,f as g,g as p,h as z,x as w,n as v,B as V,ad as ye,I as Me,M as K,l as P,y as Q,A as ve,a as N,C as F,d as L,Y as U,w as X,j as H,k as T,F as je,D as q,o as G,E as O,c as Z,m as J}from"./index.396f4a72.js";import{E as He}from"./Image.95fa511c.js";import{c as Ce}from"./csv.27f5436c.js";import{d as Ae}from"./dsv.7fe76a93.js";import{E as Ee}from"./Model3D.b44fd6f2.js";var Se=Ae(" "),Te=Se.parseRows;function ze(r){let e,t;return{c(){e=b("div"),t=S(r[0]),_(e,"class","gr-sample-number")},m(l,n){g(l,e,n),p(e,t)},p(l,[n]){n&1&&z(t,l[0])},i:w,o:w,d(l){l&&v(e)}}}function De(r,e,t){let{value:l}=e;return r.$$set=n=>{"value"in n&&t(0,l=n.value)},[l]}class Le extends C{constructor(e){super(),A(this,e,De,ze,E,{value:0})}}function Ne(r){let e,t;return{c(){e=b("div"),t=S(r[0]),_(e,"class","gr-sample-dropdown")},m(l,n){g(l,e,n),p(e,t)},p(l,[n]){n&1&&z(t,l[0])},i:w,o:w,d(l){l&&v(e)}}}function Be(r,e,t){let{value:l}=e;return r.$$set=n=>{"value"in n&&t(0,l=n.value)},[l]}class Ie extends C{constructor(e){super(),A(this,e,Be,Ne,E,{value:0})}}function Re(r){let e,t=r[0].toLocaleString()+"",l;return{c(){e=b("div"),l=S(t),_(e,"class","gr-sample-checkbox")},m(n,s){g(n,e,s),p(e,l)},p(n,[s]){s&1&&t!==(t=n[0].toLocaleString()+"")&&z(l,t)},i:w,o:w,d(n){n&&v(e)}}}function Pe(r,e,t){let{value:l}=e;return r.$$set=n=>{"value"in n&&t(0,l=n.value)},[l]}class Fe extends C{constructor(e){super(),A(this,e,Pe,Re,E,{value:0})}}function Ve(r){let e,t=r[0].join(", ")+"",l;return{c(){e=b("div"),l=S(t),_(e,"class","gr-sample-checkboxgroup")},m(n,s){g(n,e,s),p(e,l)},p(n,[s]){s&1&&t!==(t=n[0].join(", ")+"")&&z(l,t)},i:w,o:w,d(n){n&&v(e)}}}function qe(r,e,t){let{value:l}=e;return r.$$set=n=>{"value"in n&&t(0,l=n.value)},[l]}class Oe extends C{constructor(e){super(),A(this,e,qe,Ve,E,{value:0})}}function We(r){let e,t;return{c(){e=b("div"),t=S(r[0]),_(e,"class","gr-sample-slider")},m(l,n){g(l,e,n),p(e,t)},p(l,[n]){n&1&&z(t,l[0])},i:w,o:w,d(l){l&&v(e)}}}function Ye(r,e,t){let{value:l}=e;return r.$$set=n=>{"value"in n&&t(0,l=n.value)},[l]}class Ge extends C{constructor(e){super(),A(this,e,Ye,We,E,{value:0})}}function Ze(r){let e,t;return{c(){e=b("div"),t=S(r[0]),_(e,"class","gr-sample-radio")},m(l,n){g(l,e,n),p(e,t)},p(l,[n]){n&1&&z(t,l[0])},i:w,o:w,d(l){l&&v(e)}}}function Je(r,e,t){let{value:l}=e;return r.$$set=n=>{"value"in n&&t(0,l=n.value)},[l]}class Ke extends C{constructor(e){super(),A(this,e,Je,Ze,E,{value:0})}}function Qe(r){let e,t;return{c(){e=b("div"),t=S(r[0]),_(e,"class","gr-sample-textbox")},m(l,n){g(l,e,n),p(e,t)},p(l,[n]){n&1&&z(t,l[0])},i:w,o:w,d(l){l&&v(e)}}}function Ue(r,e,t){let{value:l}=e;return r.$$set=n=>{"value"in n&&t(0,l=n.value)},[l]}class Xe extends C{constructor(e){super(),A(this,e,Ue,Qe,E,{value:0})}}function xe(r){let e,t;return{c(){e=b("div"),t=S(r[0]),_(e,"class","gr-sample-audio")},m(l,n){g(l,e,n),p(e,t)},p(l,[n]){n&1&&z(t,l[0])},i:w,o:w,d(l){l&&v(e)}}}function $e(r,e,t){let{value:l}=e;return r.$$set=n=>{"value"in n&&t(0,l=n.value)},[l]}class et extends C{constructor(e){super(),A(this,e,$e,xe,E,{value:0})}}function tt(r){let e,t,l,n;return{c(){e=b("video"),e.muted=!0,e.playsInline=!0,_(e,"class","gr-sample-video"),K(e.src,t=r[1]+r[0])||_(e,"src",t)},m(s,i){g(s,e,i),r[3](e),l||(n=[P(e,"mouseover",function(){Q(r[2].play)&&r[2].play.apply(this,arguments)}),P(e,"mouseout",function(){Q(r[2].pause)&&r[2].pause.apply(this,arguments)})],l=!0)},p(s,i){r=s,i&3&&!K(e.src,t=r[1]+r[0])&&_(e,"src",t)},d(s){s&&v(e),r[3](null),l=!1,ve(n)}}}function lt(r){let e;function t(s,i){return tt}let n=t()(r);return{c(){n.c(),e=V()},m(s,i){n.m(s,i),g(s,e,i)},p(s,[i]){n.p(s,i)},i:w,o:w,d(s){n.d(s),s&&v(e)}}}function nt(r,e,t){let{value:l}=e,{samples_dir:n}=e,s;ye(()=>{t(2,s.muted=!0,s),t(2,s.playsInline=!0,s),t(2,s.controls=!1,s),s.setAttribute("muted",""),s.play(),s.pause()});function i(o){Me[o?"unshift":"push"](()=>{s=o,t(2,s)})}return r.$$set=o=>{"value"in o&&t(0,l=o.value),"samples_dir"in o&&t(1,n=o.samples_dir)},[l,n,s,i]}class rt extends C{constructor(e){super(),A(this,e,nt,lt,E,{value:0,samples_dir:1})}}function it(r){let e,t;return{c(){e=b("div"),t=S(r[0]),_(e,"class","truncate")},m(l,n){g(l,e,n),p(e,t)},p(l,n){n&1&&z(t,l[0])},d(l){l&&v(e)}}}function st(r){let e,t=r[0].join(", ")+"",l;return{c(){e=b("div"),l=S(t),_(e,"class","truncate")},m(n,s){g(n,e,s),p(e,l)},p(n,s){s&1&&t!==(t=n[0].join(", ")+"")&&z(l,t)},d(n){n&&v(e)}}}function ot(r){let e,t;function l(i,o){return o&1&&(e=null),e==null&&(e=!!Array.isArray(i[0])),e?st:it}let n=l(r,-1),s=n(r);return{c(){s.c(),t=V()},m(i,o){s.m(i,o),g(i,t,o)},p(i,[o]){n===(n=l(i,o))&&s?s.p(i,o):(s.d(1),s=n(i),s&&(s.c(),s.m(t.parentNode,t)))},i:w,o:w,d(i){s.d(i),i&&v(t)}}}function ct(r,e,t){let{value:l}=e;return r.$$set=n=>{"value"in n&&t(0,l=n.value)},[l]}class at extends C{constructor(e){super(),A(this,e,ct,ot,E,{value:0})}}function x(r,e,t){const l=r.slice();return l[7]=e[t],l[9]=t,l}function $(r,e,t){const l=r.slice();return l[10]=e[t],l[12]=t,l}function ee(r){let e,t,l,n,s,i=r[3].slice(0,3),o=[];for(let a=0;a3&&re(r);return{c(){e=b("div"),t=b("table");for(let a=0;a3?c?c.p(a,f):(c=re(a),c.c(),c.m(t,null)):c&&(c.d(1),c=null)},d(a){a&&v(e),F(o,a),c&&c.d(),n=!1,ve(s)}}}function te(r){let e,t=r[10]+"",l,n;return{c(){e=b("td"),l=S(t),_(e,"class",n="p-2 "+(r[9]<3?"border-b border-b-slate-300 dark:border-b-slate-700":"")+" "+(r[12]<3?"border-r border-r-slate-300 dark:border-r-slate-700 ":""))},m(s,i){g(s,e,i),p(e,l)},p(s,i){i&8&&t!==(t=s[10]+"")&&z(l,t)},d(s){s&&v(e)}}}function le(r){let e;return{c(){e=b("td"),e.textContent="\u2026",_(e,"class","p-2 border-r border-b border-r-slate-300 dark:border-r-slate-700 border-b-slate-300 dark:border-b-slate-700")},m(t,l){g(t,e,l)},d(t){t&&v(e)}}}function ne(r){let e,t,l=r[7].slice(0,3),n=[];for(let i=0;i3&&le();return{c(){e=b("tr");for(let i=0;i3?s||(s=le(),s.c(),s.m(e,null)):s&&(s.d(1),s=null)},d(i){i&&v(e),F(n,i),s&&s.d()}}}function re(r){let e;return{c(){e=b("div"),_(e,"class","absolute w-full h-[50%] bottom-0 bg-gradient-to-b from-[rgba(255,255,255,0)] dark:from-[rgba(0,0,0,0)] to-white"),L(e,"dark:to-gray-950",!r[2]),L(e,"dark:to-gray-800",r[2]),L(e,"to-gray-50",r[2])},m(t,l){g(t,e,l)},p(t,l){l&4&&L(e,"dark:to-gray-950",!t[2]),l&4&&L(e,"dark:to-gray-800",t[2]),l&4&&L(e,"to-gray-50",t[2])},d(t){t&&v(e)}}}function ut(r){let e,t=r[1]&&ee(r);return{c(){t&&t.c(),e=V()},m(l,n){t&&t.m(l,n),g(l,e,n)},p(l,[n]){l[1]?t?t.p(l,n):(t=ee(l),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},i:w,o:w,d(l){t&&t.d(l),l&&v(e)}}}function ft(r,e,t){let{value:l}=e,{samples_dir:n}=e,s=!1,i=l,o=Array.isArray(i);const c=()=>t(2,s=!0),a=()=>t(2,s=!1);return r.$$set=f=>{"value"in f&&t(0,l=f.value),"samples_dir"in f&&t(4,n=f.samples_dir)},r.$$.update=()=>{r.$$.dirty&19&&!o&&typeof l=="string"&&/\.[a-zA-Z]+$/.test(l)&&fetch(n+l).then(f=>f.text()).then(f=>{try{if(l.endsWith("csv")){const u=f.split(` +`).slice(0,4).map(h=>h.split(",").slice(0,4).join(",")).join(` +`);t(3,i=Ce(u))}else if(l.endsWith("tsv")){const u=f.split(` +`).slice(0,4).map(h=>h.split(" ").slice(0,4).join(" ")).join(` +`);t(3,i=Te(u))}else throw new Error("Incorrect format, only CSV and TSV files are supported");t(1,o=!0)}catch(u){console.error(u)}})},[l,o,s,i,n,c,a]}class dt extends C{constructor(e){super(),A(this,e,ft,ut,E,{value:0,samples_dir:4})}}function _t(r){let e;return{c(){e=b("div"),_(e,"class","w-10 h-10 border dark:border-slate-300"),U(e,"background-color",r[0])},m(t,l){g(t,e,l)},p(t,[l]){l&1&&U(e,"background-color",t[0])},i:w,o:w,d(t){t&&v(e)}}}function mt(r,e,t){let{value:l}=e;return r.$$set=n=>{"value"in n&&t(0,l=n.value)},[l]}class ht extends C{constructor(e){super(),A(this,e,mt,_t,E,{value:0})}}function gt(r){let e,t;return{c(){e=b("div"),t=S(r[0]),_(e,"class","truncate")},m(l,n){g(l,e,n),p(e,t)},p(l,[n]){n&1&&z(t,l[0])},i:w,o:w,d(l){l&&v(e)}}}function vt(r,e,t){let{value:l}=e;return r.$$set=n=>{"value"in n&&t(0,l=n.value)},[l]}class bt extends C{constructor(e){super(),A(this,e,vt,gt,E,{value:0})}}function pt(r){let e;return{c(){e=b("div"),_(e,"class","gr-sample-markdown")},m(t,l){g(t,e,l),e.innerHTML=r[0]},p(t,[l]){l&1&&(e.innerHTML=t[0])},i:w,o:w,d(t){t&&v(e)}}}function kt(r,e,t){let{value:l}=e;return r.$$set=n=>{"value"in n&&t(0,l=n.value)},[l]}class wt extends C{constructor(e){super(),A(this,e,kt,pt,E,{value:0})}}function yt(r){let e;return{c(){e=b("div"),_(e,"class","gr-sample-html")},m(t,l){g(t,e,l),e.innerHTML=r[0]},p(t,[l]){l&1&&(e.innerHTML=t[0])},i:w,o:w,d(t){t&&v(e)}}}function Mt(r,e,t){let{value:l}=e;return r.$$set=n=>{"value"in n&&t(0,l=n.value)},[l]}class jt extends C{constructor(e){super(),A(this,e,Mt,yt,E,{value:0})}}const R={dropdown:Ie,checkbox:Fe,checkboxgroup:Oe,number:Le,slider:Ge,radio:Ke,image:He,textbox:Xe,audio:et,video:rt,file:at,dataframe:dt,model3d:Ee,colorpicker:ht,timeseries:bt,markdown:wt,html:jt};function ie(r,e,t){const l=r.slice();return l[22]=e[t],l}function se(r,e,t){const l=r.slice();return l[25]=e[t],l[27]=t,l}function oe(r,e,t){const l=r.slice();return l[0]=e[t].value,l[29]=e[t].component,l[31]=t,l}function ce(r,e,t){const l=r.slice();return l[32]=e[t],l}function ae(r,e,t){const l=r.slice();return l[25]=e[t],l[27]=t,l}function Ht(r){let e,t,l,n,s,i,o,c=r[3],a=[];for(let d=0;dT(u[d],1,1,()=>{u[d]=null});return{c(){e=b("div"),t=b("table"),l=b("thead"),n=b("tr");for(let d=0;dT(n[i],1,1,()=>{n[i]=null});return{c(){e=b("div");for(let i=0;i{G(a,1)}),O()}n?(t=new n(s(i)),Z(t.$$.fragment),H(t.$$.fragment,1),J(t,e,null)):t=null}else n&&t.$set(c)},i(i){l||(t&&H(t.$$.fragment,i),l=!0)},o(i){t&&T(t.$$.fragment,i),l=!1},d(i){i&&v(e),t&&G(t)}}}function de(r){let e,t,l=r[1][r[31]]!==void 0&&R[r[1][r[31]]]!==void 0&&fe(r);return{c(){l&&l.c(),e=V()},m(n,s){l&&l.m(n,s),g(n,e,s),t=!0},p(n,s){n[1][n[31]]!==void 0&&R[n[1][n[31]]]!==void 0?l?(l.p(n,s),s[0]&2&&H(l,1)):(l=fe(n),l.c(),H(l,1),l.m(e.parentNode,e)):l&&(q(),T(l,1,1,()=>{l=null}),O())},i(n){t||(H(l),t=!0)},o(n){T(l),t=!1},d(n){l&&l.d(n),n&&v(e)}}}function _e(r){let e,t,l,n,s,i=r[25],o=[];for(let f=0;fT(o[f],1,1,()=>{o[f]=null});function a(){return r[20](r[27])}return{c(){e=b("tr");for(let f=0;f{G(a,1)}),O()}n?(e=new n(s(i)),Z(e.$$.fragment),H(e.$$.fragment,1),J(e,t.parentNode,t)):e=null}else n&&e.$set(c)},i(i){l||(e&&H(e.$$.fragment,i),l=!0)},o(i){e&&T(e.$$.fragment,i),l=!1},d(i){i&&v(t),e&&G(e,i)}}}function he(r){let e,t=Object.keys(R).includes(r[1][0])&&R[r[1][0]],l,n,s,i,o=t&&me(r);function c(){return r[19](r[27])}return{c(){e=b("button"),o&&o.c(),l=N(),_(e,"class","group rounded-lg")},m(a,f){g(a,e,f),o&&o.m(e,null),p(e,l),n=!0,s||(i=P(e,"click",c),s=!0)},p(a,f){r=a,f[0]&2&&(t=Object.keys(R).includes(r[1][0])&&R[r[1][0]]),t?o?(o.p(r,f),f[0]&2&&H(o,1)):(o=me(r),o.c(),H(o,1),o.m(e,l)):o&&(q(),T(o,1,1,()=>{o=null}),O())},i(a){n||(H(o),n=!0)},o(a){T(o),n=!1},d(a){a&&v(e),o&&o.d(),s=!1,i()}}}function At(r){let e,t,l=r[9],n=[];for(let s=0;sd,W,Y,I=[];const be=k=>{t(0,f=k+j*d),y("click",f)},pe=k=>{t(0,f=k+j*d),y("click",f)},ke=k=>t(7,j=k);return r.$$set=k=>{"components"in k&&t(1,n=k.components),"label"in k&&t(2,s=k.label),"headers"in k&&t(3,i=k.headers),"samples"in k&&t(15,o=k.samples),"elem_id"in k&&t(4,c=k.elem_id),"visible"in k&&t(5,a=k.visible),"value"in k&&t(0,f=k.value),"root"in k&&t(16,u=k.root),"root_url"in k&&t(17,h=k.root_url),"samples_per_page"in k&&t(6,d=k.samples_per_page)},r.$$.update=()=>{r.$$.dirty[0]&295616&&(D?(t(9,I=[]),t(8,W=o.slice(j*d,(j+1)*d)),t(18,Y=Math.ceil(o.length/d)),[0,j,Y-1].forEach(k=>{for(let B=k-2;B<=k+2;B++)B>=0&&B0&&B-I[I.length-1]>1&&I.push(-1),I.push(B))})):t(8,W=o.slice())),r.$$.dirty[0]&258&&t(10,l=W.map(k=>k.map((B,we)=>({value:B,component:R[n[we]]}))))},[f,n,s,i,c,a,d,j,W,I,l,y,m,M,D,o,u,h,Y,be,pe,ke]}class Dt extends C{constructor(e){super(),A(this,e,zt,Tt,E,{components:1,label:2,headers:3,samples:15,elem_id:4,visible:5,value:0,root:16,root_url:17,samples_per_page:6},null,[-1,-1])}}var Pt=Dt;const Ft=["dynamic"],Vt=()=>({type:"number",description:"index of selected row",example_data:0});export{Pt as Component,Vt as document,Ft as modes}; +//# sourceMappingURL=index.ff52f1c2.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/linear.955f0731.js b/gradio-modified/gradio/templates/frontend/assets/linear.955f0731.js new file mode 100644 index 0000000000000000000000000000000000000000..e97ca50654834a232711dd38acc774bffaf560b0 --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/linear.955f0731.js @@ -0,0 +1,2 @@ +function W(n,t){return n==null||t==null?NaN:nt?1:n>=t?0:NaN}function En(n){let t=n,e=n,r=n;n.length!==2&&(t=(a,u)=>n(a)-u,e=W,r=(a,u)=>W(n(a),u));function i(a,u,s=0,c=a.length){if(s>>1;r(a[h],u)<0?s=h+1:c=h}while(s>>1;r(a[h],u)<=0?s=h+1:c=h}while(ss&&t(a[h-1],u)>-t(a[h],u)?h-1:h}return{left:i,center:o,right:f}}function Un(n){return n===null?NaN:+n}function*Qt(n,t){if(t===void 0)for(let e of n)e!=null&&(e=+e)>=e&&(yield e);else{let e=-1;for(let r of n)(r=t(r,++e,n))!=null&&(r=+r)>=r&&(yield r)}}const Pn=En(W),Yn=Pn.right,Ut=Pn.left;En(Un).center;var Jn=Yn,nn=Math.sqrt(50),tn=Math.sqrt(10),en=Math.sqrt(2);function Kn(n,t,e){var r,i=-1,f,o,a;if(t=+t,n=+n,e=+e,n===t&&e>0)return[n];if((r=t0){let u=Math.round(n/a),s=Math.round(t/a);for(u*at&&--s,o=new Array(f=s-u+1);++it&&--s,o=new Array(f=s-u+1);++i=0?(f>=nn?10:f>=tn?5:f>=en?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(f>=nn?10:f>=tn?5:f>=en?2:1)}function Wn(n,t,e){var r=Math.abs(t-n)/Math.max(0,e),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),f=r/i;return f>=nn?i*=10:f>=tn?i*=5:f>=en&&(i*=2),t=1e21?n.toLocaleString("en").replace(/,/g,""):n.toString(10)}function G(n,t){if((e=(n=t?n.toExponential(t-1):n.toExponential()).indexOf("e"))<0)return null;var e,r=n.slice(0,e);return[r.length>1?r[0]+r.slice(2):r,+n.slice(e+1)]}function L(n){return n=G(Math.abs(n)),n?n[1]:NaN}function tt(n,t){return function(e,r){for(var i=e.length,f=[],o=0,a=n[0],u=0;i>0&&a>0&&(u+a+1>r&&(a=Math.max(1,r-u)),f.push(e.substring(i-=a,i+a)),!((u+=a+1)>r));)a=n[o=(o+1)%n.length];return f.reverse().join(t)}}function et(n){return function(t){return t.replace(/[0-9]/g,function(e){return n[+e]})}}var rt=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Z(n){if(!(t=rt.exec(n)))throw new Error("invalid format: "+n);var t;return new sn({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Z.prototype=sn.prototype;function sn(n){this.fill=n.fill===void 0?" ":n.fill+"",this.align=n.align===void 0?">":n.align+"",this.sign=n.sign===void 0?"-":n.sign+"",this.symbol=n.symbol===void 0?"":n.symbol+"",this.zero=!!n.zero,this.width=n.width===void 0?void 0:+n.width,this.comma=!!n.comma,this.precision=n.precision===void 0?void 0:+n.precision,this.trim=!!n.trim,this.type=n.type===void 0?"":n.type+""}sn.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function it(n){n:for(var t=n.length,e=1,r=-1,i;e0&&(r=0);break}return r>0?n.slice(0,r)+n.slice(i+1):n}var qn;function at(n,t){var e=G(n,t);if(!e)return n+"";var r=e[0],i=e[1],f=i-(qn=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return f===o?r:f>o?r+new Array(f-o+1).join("0"):f>0?r.slice(0,f)+"."+r.slice(f):"0."+new Array(1-f).join("0")+G(n,Math.max(0,t+f-1))[0]}function xn(n,t){var e=G(n,t);if(!e)return n+"";var r=e[0],i=e[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}var mn={"%":(n,t)=>(n*100).toFixed(t),b:n=>Math.round(n).toString(2),c:n=>n+"",d:nt,e:(n,t)=>n.toExponential(t),f:(n,t)=>n.toFixed(t),g:(n,t)=>n.toPrecision(t),o:n=>Math.round(n).toString(8),p:(n,t)=>xn(n*100,t),r:xn,s:at,X:n=>Math.round(n).toString(16).toUpperCase(),x:n=>Math.round(n).toString(16)};function bn(n){return n}var pn=Array.prototype.map,yn=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function ft(n){var t=n.grouping===void 0||n.thousands===void 0?bn:tt(pn.call(n.grouping,Number),n.thousands+""),e=n.currency===void 0?"":n.currency[0]+"",r=n.currency===void 0?"":n.currency[1]+"",i=n.decimal===void 0?".":n.decimal+"",f=n.numerals===void 0?bn:et(pn.call(n.numerals,String)),o=n.percent===void 0?"%":n.percent+"",a=n.minus===void 0?"\u2212":n.minus+"",u=n.nan===void 0?"NaN":n.nan+"";function s(h){h=Z(h);var l=h.fill,p=h.align,g=h.sign,k=h.symbol,v=h.zero,N=h.width,R=h.comma,y=h.precision,H=h.trim,m=h.type;m==="n"?(R=!0,m="g"):mn[m]||(y===void 0&&(y=12),H=!0,m="g"),(v||l==="0"&&p==="=")&&(v=!0,l="0",p="=");var Vn=k==="$"?e:k==="#"&&/[boxX]/.test(m)?"0"+m.toLowerCase():"",Xn=k==="$"?r:/[%p]/.test(m)?o:"",ln=mn[m],Qn=/[defgprs%]/.test(m);y=y===void 0?6:/[gprs]/.test(m)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y));function dn(d){var A=Vn,b=Xn,E,gn,F;if(m==="c")b=ln(d)+b,d="";else{d=+d;var $=d<0||1/d<0;if(d=isNaN(d)?u:ln(Math.abs(d),y),H&&(d=it(d)),$&&+d==0&&g!=="+"&&($=!1),A=($?g==="("?g:a:g==="-"||g==="("?"":g)+A,b=(m==="s"?yn[8+qn/3]:"")+b+($&&g==="("?")":""),Qn){for(E=-1,gn=d.length;++EF||F>57){b=(F===46?i+d.slice(E+1):d.slice(E))+b,d=d.slice(0,E);break}}}R&&!v&&(d=t(d,1/0));var B=A.length+d.length+b.length,_=B>1)+A+d+b+_.slice(B);break;default:d=_+A+d+b;break}return f(d)}return dn.toString=function(){return h+""},dn}function c(h,l){var p=s((h=Z(h),h.type="f",h)),g=Math.max(-8,Math.min(8,Math.floor(L(l)/3)))*3,k=Math.pow(10,-g),v=yn[8+g/3];return function(N){return p(k*N)+v}}return{format:s,formatPrefix:c}}var D,Ln,Hn;ot({thousands:",",grouping:[3],currency:["$",""]});function ot(n){return D=ft(n),Ln=D.format,Hn=D.formatPrefix,D}function ut(n){return Math.max(0,-L(Math.abs(n)))}function st(n,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(L(t)/3)))*3-L(Math.abs(n)))}function ht(n,t){return n=Math.abs(n),t=Math.abs(t)-n,Math.max(0,L(t)-L(n))+1}const rn=Math.PI,an=2*rn,S=1e-6,ct=an-S;function fn(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function In(){return new fn}fn.prototype=In.prototype={constructor:fn,moveTo:function(n,t){this._+="M"+(this._x0=this._x1=+n)+","+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(n,t){this._+="L"+(this._x1=+n)+","+(this._y1=+t)},quadraticCurveTo:function(n,t,e,r){this._+="Q"+ +n+","+ +t+","+(this._x1=+e)+","+(this._y1=+r)},bezierCurveTo:function(n,t,e,r,i,f){this._+="C"+ +n+","+ +t+","+ +e+","+ +r+","+(this._x1=+i)+","+(this._y1=+f)},arcTo:function(n,t,e,r,i){n=+n,t=+t,e=+e,r=+r,i=+i;var f=this._x1,o=this._y1,a=e-n,u=r-t,s=f-n,c=o-t,h=s*s+c*c;if(i<0)throw new Error("negative radius: "+i);if(this._x1===null)this._+="M"+(this._x1=n)+","+(this._y1=t);else if(h>S)if(!(Math.abs(c*a-u*s)>S)||!i)this._+="L"+(this._x1=n)+","+(this._y1=t);else{var l=e-f,p=r-o,g=a*a+u*u,k=l*l+p*p,v=Math.sqrt(g),N=Math.sqrt(h),R=i*Math.tan((rn-Math.acos((g+h-k)/(2*v*N)))/2),y=R/N,H=R/v;Math.abs(y-1)>S&&(this._+="L"+(n+y*s)+","+(t+y*c)),this._+="A"+i+","+i+",0,0,"+ +(c*l>s*p)+","+(this._x1=n+H*a)+","+(this._y1=t+H*u)}},arc:function(n,t,e,r,i,f){n=+n,t=+t,e=+e,f=!!f;var o=e*Math.cos(r),a=e*Math.sin(r),u=n+o,s=t+a,c=1^f,h=f?r-i:i-r;if(e<0)throw new Error("negative radius: "+e);this._x1===null?this._+="M"+u+","+s:(Math.abs(this._x1-u)>S||Math.abs(this._y1-s)>S)&&(this._+="L"+u+","+s),e&&(h<0&&(h=h%an+an),h>ct?this._+="A"+e+","+e+",0,1,"+c+","+(n-o)+","+(t-a)+"A"+e+","+e+",0,1,"+c+","+(this._x1=u)+","+(this._y1=s):h>S&&(this._+="A"+e+","+e+",0,"+ +(h>=rn)+","+c+","+(this._x1=n+e*Math.cos(i))+","+(this._y1=t+e*Math.sin(i))))},rect:function(n,t,e,r){this._+="M"+(this._x0=this._x1=+n)+","+(this._y0=this._y1=+t)+"h"+ +e+"v"+ +r+"h"+-e+"Z"},toString:function(){return this._}};function P(n){return function(){return n}}function lt(n){return typeof n=="object"&&"length"in n?n:Array.from(n)}function Tn(n){this._context=n}Tn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(n,t){switch(n=+n,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(n,t):this._context.moveTo(n,t);break;case 1:this._point=2;default:this._context.lineTo(n,t);break}}};function dt(n){return new Tn(n)}function gt(n){return n[0]}function xt(n){return n[1]}function Yt(n,t){var e=P(!0),r=null,i=dt,f=null;n=typeof n=="function"?n:n===void 0?gt:P(n),t=typeof t=="function"?t:t===void 0?xt:P(t);function o(a){var u,s=(a=lt(a)).length,c,h=!1,l;for(r==null&&(f=i(l=In())),u=0;u<=s;++u)!(u>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):e===8?O(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):e===4?O(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=pt.exec(n))?new x(t[1],t[2],t[3],1):(t=yt.exec(n))?new x(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=wt.exec(n))?O(t[1],t[2],t[3],t[4]):(t=Mt.exec(n))?O(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=vt.exec(n))?An(t[1],t[2]/100,t[3]/100,1):(t=_t.exec(n))?An(t[1],t[2]/100,t[3]/100,t[4]):wn.hasOwnProperty(n)?_n(wn[n]):n==="transparent"?new x(NaN,NaN,NaN,0):null}function _n(n){return new x(n>>16&255,n>>8&255,n&255,1)}function O(n,t,e,r){return r<=0&&(n=t=e=NaN),new x(n,t,e,r)}function kt(n){return n instanceof C||(n=z(n)),n?(n=n.rgb(),new x(n.r,n.g,n.b,n.opacity)):new x}function X(n,t,e,r){return arguments.length===1?kt(n):new x(n,t,e,r??1)}function x(n,t,e,r){this.r=+n,this.g=+t,this.b=+e,this.opacity=+r}hn(x,X,zn(C,{brighter:function(n){return n=n==null?V:Math.pow(V,n),new x(this.r*n,this.g*n,this.b*n,this.opacity)},darker:function(n){return n=n==null?I:Math.pow(I,n),new x(this.r*n,this.g*n,this.b*n,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Nn,formatHex:Nn,formatRgb:kn,toString:kn}));function Nn(){return"#"+Y(this.r)+Y(this.g)+Y(this.b)}function kn(){var n=this.opacity;return n=isNaN(n)?1:Math.max(0,Math.min(1,n)),(n===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(n===1?")":", "+n+")")}function Y(n){return n=Math.max(0,Math.min(255,Math.round(n)||0)),(n<16?"0":"")+n.toString(16)}function An(n,t,e,r){return r<=0?n=t=e=NaN:e<=0||e>=1?n=t=NaN:t<=0&&(n=NaN),new w(n,t,e,r)}function Cn(n){if(n instanceof w)return new w(n.h,n.s,n.l,n.opacity);if(n instanceof C||(n=z(n)),!n)return new w;if(n instanceof w)return n;n=n.rgb();var t=n.r/255,e=n.g/255,r=n.b/255,i=Math.min(t,e,r),f=Math.max(t,e,r),o=NaN,a=f-i,u=(f+i)/2;return a?(t===f?o=(e-r)/a+(e0&&u<1?0:o,new w(o,a,u,n.opacity)}function At(n,t,e,r){return arguments.length===1?Cn(n):new w(n,t,e,r??1)}function w(n,t,e,r){this.h=+n,this.s=+t,this.l=+e,this.opacity=+r}hn(w,At,zn(C,{brighter:function(n){return n=n==null?V:Math.pow(V,n),new w(this.h,this.s,this.l*n,this.opacity)},darker:function(n){return n=n==null?I:Math.pow(I,n),new w(this.h,this.s,this.l*n,this.opacity)},rgb:function(){var n=this.h%360+(this.h<0)*360,t=isNaN(n)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*t,i=2*e-r;return new x(J(n>=240?n-240:n+120,i,r),J(n,i,r),J(n<120?n+240:n-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var n=this.opacity;return n=isNaN(n)?1:Math.max(0,Math.min(1,n)),(n===1?"hsl(":"hsla(")+(this.h||0)+", "+(this.s||0)*100+"%, "+(this.l||0)*100+"%"+(n===1?")":", "+n+")")}}));function J(n,t,e){return(n<60?t+(e-t)*n/60:n<180?e:n<240?t+(e-t)*(240-n)/60:t)*255}function Fn(n,t,e,r,i){var f=n*n,o=f*n;return((1-3*n+3*f-o)*t+(4-6*f+3*o)*e+(1+3*n+3*f-3*o)*r+o*i)/6}function St(n){var t=n.length-1;return function(e){var r=e<=0?e=0:e>=1?(e=1,t-1):Math.floor(e*t),i=n[r],f=n[r+1],o=r>0?n[r-1]:2*i-f,a=r()=>n;function $n(n,t){return function(e){return n+e*t}}function Et(n,t,e){return n=Math.pow(n,e),t=Math.pow(t,e)-n,e=1/e,function(r){return Math.pow(n+r*t,e)}}function Kt(n,t){var e=t-n;return e?$n(n,e>180||e<-180?e-360*Math.round(e/360):e):U(isNaN(n)?t:n)}function Pt(n){return(n=+n)==1?Bn:function(t,e){return e-t?Et(t,e,n):U(isNaN(t)?e:t)}}function Bn(n,t){var e=t-n;return e?$n(n,e):U(isNaN(n)?t:n)}var Sn=function n(t){var e=Pt(t);function r(i,f){var o=e((i=X(i)).r,(f=X(f)).r),a=e(i.g,f.g),u=e(i.b,f.b),s=Bn(i.opacity,f.opacity);return function(c){return i.r=o(c),i.g=a(c),i.b=u(c),i.opacity=s(c),i+""}}return r.gamma=n,r}(1);function Dn(n){return function(t){var e=t.length,r=new Array(e),i=new Array(e),f=new Array(e),o,a;for(o=0;oe&&(f=t.slice(e,f),a[o]?a[o]+=f:a[++o]=f),(r=r[0])===(i=i[0])?a[o]?a[o]+=i:a[++o]=i:(a[++o]=null,u.push({i:o,x:Q(r,i)})),e=K.lastIndex;return et&&(e=n,n=t,t=e),function(r){return Math.max(n,Math.min(t,r))}}function $t(n,t,e){var r=n[0],i=n[1],f=t[0],o=t[1];return i2?Bt:$t,u=s=null,h}function h(l){return l==null||isNaN(l=+l)?f:(u||(u=a(n.map(r),t,e)))(r(o(l)))}return h.invert=function(l){return o(i((s||(s=a(t,n.map(r),Q)))(l)))},h.domain=function(l){return arguments.length?(n=Array.from(l,Ct),c()):n.slice()},h.range=function(l){return arguments.length?(t=Array.from(l),c()):t.slice()},h.rangeRound=function(l){return t=Array.from(l),e=Tt,c()},h.clamp=function(l){return arguments.length?(o=l?!0:j,c()):o!==j},h.interpolate=function(l){return arguments.length?(e=l,c()):e},h.unknown=function(l){return arguments.length?(f=l,h):f},function(l,p){return r=l,i=p,c()}}function Gt(){return Ot()(j,j)}function Zt(n,t,e,r){var i=Wn(n,t,e),f;switch(r=Z(r??",f"),r.type){case"s":{var o=Math.max(Math.abs(n),Math.abs(t));return r.precision==null&&!isNaN(f=st(i,o))&&(r.precision=f),Hn(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(f=ht(i,Math.max(Math.abs(n),Math.abs(t))))&&(r.precision=f-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(f=ut(i))&&(r.precision=f-(r.type==="%")*2);break}}return Ln(r)}function Vt(n){var t=n.domain;return n.ticks=function(e){var r=t();return Kn(r[0],r[r.length-1],e??10)},n.tickFormat=function(e,r){var i=t();return Zt(i[0],i[i.length-1],e??10,r)},n.nice=function(e){e==null&&(e=10);var r=t(),i=0,f=r.length-1,o=r[i],a=r[f],u,s,c=10;for(a0;){if(s=jn(o,a,e),s===u)return r[i]=o,r[f]=a,t(r);if(s>0)o=Math.floor(o/s)*s,a=Math.ceil(a/s)*s;else if(s<0)o=Math.ceil(o*s)/s,a=Math.floor(a*s)/s;else break;u=s}return n},n}function Xt(){var n=Gt();return n.copy=function(){return Dt(n,Xt())},mt.apply(n,arguments),Vt(n)}export{Yn as $,At as A,Bn as B,C,cn as D,te as E,St as F,Rt as G,jt as H,On as I,qt as J,Tt as K,It as L,Sn as M,Wt as N,ne as O,Ct as P,Vt as Q,x as R,Ot as S,Dt as T,Kn as U,j as V,Jn as W,Gt as X,Jt as Y,Xt as Z,Yt as _,W as a,Zt as a0,X as a1,Ut as a2,Qt as b,En as c,ht as d,st as e,Z as f,Ln as g,Hn as h,ft as i,P as j,In as k,lt as l,dt as m,Un as n,mt as o,ut as p,hn as q,kt as r,zn as s,Wn as t,V as u,I as v,Kt as w,gt as x,xt as y,Q as z}; +//# sourceMappingURL=linear.955f0731.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/logo.edf88234.svg b/gradio-modified/gradio/templates/frontend/assets/logo.edf88234.svg new file mode 100644 index 0000000000000000000000000000000000000000..70cc7a15d3c093aadc70d5f7889994281c5b1833 --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/logo.edf88234.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/gradio-modified/gradio/templates/frontend/assets/module.2849491a.js b/gradio-modified/gradio/templates/frontend/assets/module.2849491a.js new file mode 100644 index 0000000000000000000000000000000000000000..6914877db9ae74b4cb8a73bd646bc24bf146dac0 --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/module.2849491a.js @@ -0,0 +1,9 @@ +import{c as Jn,a as Qn,g as er}from"./module.e2741a44.js";const Lt=new Set,tr=Jn({encode:({call:e})=>async(t,n)=>{const r=await e("encode",{encoderId:t,timeslice:n});return Lt.delete(t),r},instantiate:({call:e})=>async(t,n)=>{const r=Qn(Lt),o=await e("instantiate",{encoderId:r,mimeType:t,sampleRate:n});return{encoderId:r,port:o}},register:({call:e})=>t=>e("register",{port:t},[t])}),nr=e=>{const t=new Worker(e);return tr(t)},rr=`(()=>{var e={775:function(e,t,r){!function(e,t,r,n){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=o(t),s=o(r),i=o(n),c=function(e,t){return void 0===t?e:t.reduce((function(e,t){if("capitalize"===t){var r=e.charAt(0).toUpperCase(),n=e.slice(1);return"".concat(r).concat(n)}return"dashify"===t?s.default(e):"prependIndefiniteArticle"===t?"".concat(i.default(e)," ").concat(e):e}),e)},u=function(e){var t=e.name+e.modifiers.map((function(e){return"\\\\.".concat(e,"\\\\(\\\\)")})).join("");return new RegExp("\\\\$\\\\{".concat(t,"}"),"g")},l=function(e,t){for(var r=/\\\${([^.}]+)((\\.[^(]+\\(\\))*)}/g,n=[],o=r.exec(e);null!==o;){var s={modifiers:[],name:o[1]};if(void 0!==o[3])for(var i=/\\.[^(]+\\(\\)/g,l=i.exec(o[2]);null!==l;)s.modifiers.push(l[0].slice(1,-2)),l=i.exec(o[2]);n.push(s),o=r.exec(e)}var d=n.reduce((function(e,r){return e.map((function(e){return"string"==typeof e?e.split(u(r)).reduce((function(e,n,o){return 0===o?[n]:r.name in t?[].concat(a.default(e),[c(t[r.name],r.modifiers),n]):[].concat(a.default(e),[function(e){return c(e[r.name],r.modifiers)},n])}),[]):[e]})).reduce((function(e,t){return[].concat(a.default(e),a.default(t))}),[])}),[e]);return function(e){return d.reduce((function(t,r){return[].concat(a.default(t),"string"==typeof r?[r]:[r(e)])}),[]).join("")}},d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=void 0===e.code?void 0:l(e.code,t),n=void 0===e.message?void 0:l(e.message,t);function o(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0,a=void 0===o&&(t instanceof Error||void 0!==t.code&&"Exception"===t.code.slice(-9))?{cause:t,missingParameters:{}}:{cause:o,missingParameters:t},s=a.cause,i=a.missingParameters,c=void 0===n?new Error:new Error(n(i));return null!==s&&(c.cause=s),void 0!==r&&(c.code=r(i)),void 0!==e.status&&(c.status=e.status),c}return o};e.compile=d,Object.defineProperty(e,"__esModule",{value:!0})}(t,r(106),r(881),r(507))},881:e=>{"use strict";e.exports=(e,t)=>{if("string"!=typeof e)throw new TypeError("expected a string");return e.trim().replace(/([a-z])([A-Z])/g,"$1-$2").replace(/\\W/g,(e=>/[\xC0-\u017E]/.test(e)?e:"-")).replace(/^-+|-+$/g,"").replace(/-{2,}/g,(e=>t&&t.condense?"-":e)).toLowerCase()}},107:function(e,t){!function(e){"use strict";var t=function(e){return function(t){var r=e(t);return t.add(r),r}},r=function(e){return function(t,r){return e.set(t,r),r}},n=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,o=536870912,a=2*o,s=function(e,t){return function(r){var s=t.get(r),i=void 0===s?r.size:sn)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;r.has(i);)i=Math.floor(Math.random()*n);return e(r,i)}},i=new WeakMap,c=r(i),u=s(c,i),l=t(u);e.addUniqueNumber=l,e.generateUniqueNumber=u,Object.defineProperty(e,"__esModule",{value:!0})}(t)},507:e=>{var t=function(e){var t,r,n=/\\w+/.exec(e);if(!n)return"an";var o=(r=n[0]).toLowerCase(),a=["honest","hour","hono"];for(t in a)if(0==o.indexOf(a[t]))return"an";if(1==o.length)return"aedhilmnorsx".indexOf(o)>=0?"an":"a";if(r.match(/(?!FJO|[HLMNS]Y.|RY[EO]|SQU|(F[LR]?|[HL]|MN?|N|RH?|S[CHKLMNPTVW]?|X(YL)?)[AEIOU])[FHLMNRSX][A-Z]/))return"an";var s=[/^e[uw]/,/^onc?e\\b/,/^uni([^nmd]|mo)/,/^u[bcfhjkqrst][aeiou]/];for(t=0;t=0?"an":"a":"aeiou".indexOf(o[0])>=0||o.match(/^y(b[lor]|cl[ea]|fere|gg|p[ios]|rou|tt)/)?"an":"a"};void 0!==e.exports?e.exports=t:window.indefiniteArticle=t},768:e=>{e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{var n=r(768);e.exports=function(e){if(Array.isArray(e))return n(e)},e.exports.__esModule=!0,e.exports.default=e.exports},642:e=>{e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},344:e=>{e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},106:(e,t,r)=>{var n=r(907),o=r(642),a=r(906),s=r(344);e.exports=function(e){return n(e)||o(e)||a(e)||s()},e.exports.__esModule=!0,e.exports.default=e.exports},906:(e,t,r)=>{var n=r(768);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}};return e[n].call(a.exports,a,a.exports,r),a.exports}(()=>{"use strict";var e=r(775);const t=-32603,n=-32602,o=-32601,a=(0,e.compile)({message:'The requested method called "\${method}" is not supported.',status:o}),s=(0,e.compile)({message:'The handler of the method called "\${method}" returned no required result.',status:t}),i=(0,e.compile)({message:'The handler of the method called "\${method}" returned an unexpected result.',status:t}),c=(0,e.compile)({message:'The specified parameter called "portId" with the given value "\${portId}" does not identify a port connected to this worker.',status:n}),u=(e,t)=>async r=>{let{data:{id:n,method:o,params:c}}=r;const u=t[o];try{if(void 0===u)throw a({method:o});const t=void 0===c?u():u(c);if(void 0===t)throw s({method:o});const r=t instanceof Promise?await t:t;if(null===n){if(void 0!==r.result)throw i({method:o})}else{if(void 0===r.result)throw i({method:o});const{result:t,transferables:a=[]}=r;e.postMessage({id:n,result:t},a)}}catch(t){const{message:r,status:o=-32603}=t;e.postMessage({error:{code:o,message:r},id:n})}};var l=r(107);const d=new Map,f=(e,t,r)=>({...t,connect:r=>{let{port:n}=r;n.start();const o=e(n,t),a=(0,l.generateUniqueNumber)(d);return d.set(a,(()=>{o(),n.close(),d.delete(a)})),{result:a}},disconnect:e=>{let{portId:t}=e;const r=d.get(t);if(void 0===r)throw c({portId:t.toString()});return r(),{result:null}},isSupported:async()=>{if(await new Promise((e=>{const t=new ArrayBuffer(0),{port1:r,port2:n}=new MessageChannel;r.onmessage=t=>{let{data:r}=t;return e(null!==r)},n.postMessage(t,[t])}))){const e=r();return{result:e instanceof Promise?await e:e}}return{result:!1}}}),p=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>!0;const n=f(p,t,r),o=u(e,n);return e.addEventListener("message",o),()=>e.removeEventListener("message",o)},m=e=>{e.onmessage=null,e.close()},h=new WeakMap,g=new WeakMap,v=(e=>{const t=(r=e,{...r,connect:e=>{let{call:t}=e;return async()=>{const{port1:e,port2:r}=new MessageChannel,n=await t("connect",{port:e},[e]);return h.set(r,n),r}},disconnect:e=>{let{call:t}=e;return async e=>{const r=h.get(e);if(void 0===r)throw new Error("The given port is not connected.");await t("disconnect",{portId:r})}},isSupported:e=>{let{call:t}=e;return()=>t("isSupported")}});var r;return e=>{const r=(e=>{if(g.has(e))return g.get(e);const t=new Map;return g.set(e,t),t})(e);e.addEventListener("message",(e=>{let{data:t}=e;const{id:n}=t;if(null!==n&&r.has(n)){const{reject:e,resolve:o}=r.get(n);r.delete(n),void 0===t.error?o(t.result):e(new Error(t.error.message))}})),(e=>"function"==typeof e.start)(e)&&e.start();const n=function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return new Promise(((a,s)=>{const i=(0,l.generateUniqueNumber)(r);r.set(i,{reject:s,resolve:a}),null===n?e.postMessage({id:i,method:t},o):e.postMessage({id:i,method:t,params:n},o)}))},o=function(t,r){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];e.postMessage({id:null,method:t,params:r},n)};let a={};for(const[e,r]of Object.entries(t))a={...a,[e]:r({call:n,notify:o})};return{...a}}})({characterize:e=>{let{call:t}=e;return()=>t("characterize")},encode:e=>{let{call:t}=e;return(e,r)=>t("encode",{recordingId:e,timeslice:r})},record:e=>{let{call:t}=e;return async(e,r,n)=>{await t("record",{recordingId:e,sampleRate:r,typedArrays:n},n.map((e=>{let{buffer:t}=e;return t})))}}}),w=async(e,t)=>{const r=v(t),n=await r.characterize(),o=n.toString();if(e.has(o))throw new Error("There is already an encoder stored which handles exactly the same mime types.");return e.set(o,[n,r]),n},x=new Map,y=(e=>t=>{const r=e.get(t);if(void 0===r)throw new Error("There was no instance of an encoder stored with the given id.");return r})(x),M=((e,t)=>r=>{const n=t(r);return e.delete(r),n})(x,y),b=new Map,E=((e,t)=>r=>{const[n,o,a,s]=t(r);return a?new Promise((t=>{o.onmessage=a=>{let{data:i}=a;0===i.length?(e(o),t(n.encode(r,null))):n.record(r,s,i)}})):n.encode(r,null)})(m,M),A=(e=>t=>{for(const[r,n]of Array.from(e.values()))if(r.test(t))return n;throw new Error("There is no encoder registered which could handle the given mimeType.")})(b),_=((e,t,r)=>(n,o,a)=>{if(t.has(n))throw new Error('There is already an encoder registered with an id called "'.concat(n,'".'));const s=r(o),{port1:i,port2:c}=new MessageChannel,u=[s,i,!0,a];return t.set(n,u),i.onmessage=t=>{let{data:r}=t;0===r.length?(e(i),u[2]=!1):s.record(n,a,r)},c})(m,x,A),I=(e=>(t,r)=>{const[n]=e(t);return n.encode(t,r)})(y);p(self,{encode:async e=>{let{encoderId:t,timeslice:r}=e;const n=null===r?await E(t):await I(t,r);return{result:n,transferables:n}},instantiate:e=>{let{encoderId:t,mimeType:r,sampleRate:n}=e;const o=_(t,r,n);return{result:o,transferables:[o]}},register:async e=>{let{port:t}=e;return{result:await w(b,t)}}})})()})();`,or=new Blob([rr],{type:"application/javascript; charset=utf-8"}),tn=URL.createObjectURL(or),gt=nr(tn),Ue=gt.encode,nn=gt.instantiate,sr=gt.register;URL.revokeObjectURL(tn);const ar=e=>(t,n)=>{if(e===null)throw new Error("A native BlobEvent could not be created.");return new e(t,n)},ir=(e,t)=>(n,r,o)=>{const s=[];let a=r,c=0;for(;cclass{constructor(r=null){this._listeners=new WeakMap,this._nativeEventTarget=r===null?e():r}addEventListener(r,o,s){if(o!==null){let a=this._listeners.get(o);a===void 0&&(a=t(this,o),typeof o=="function"&&this._listeners.set(o,a)),this._nativeEventTarget.addEventListener(r,a,s)}}dispatchEvent(r){return this._nativeEventTarget.dispatchEvent(r)}removeEventListener(r,o,s){const a=o===null?void 0:this._listeners.get(o);this._nativeEventTarget.removeEventListener(r,a===void 0?null:a,s)}},ur=e=>()=>{if(e===null)throw new Error("A native EventTarget could not be created.");return e.document.createElement("p")},wt=(e="")=>{try{return new DOMException(e,"InvalidModificationError")}catch(t){return t.code=13,t.message=e,t.name="InvalidModificationError",t}},lr=()=>{try{return new DOMException("","InvalidStateError")}catch(e){return e.code=11,e.name="InvalidStateError",e}},dr=e=>e!==null&&e.BlobEvent!==void 0&&e.MediaStream!==void 0&&(e.MediaRecorder===void 0||e.MediaRecorder.isTypeSupported!==void 0)?new Promise(t=>{if(e.MediaRecorder===void 0)return t(!0);const n=e.document.createElement("canvas");if(n.getContext("2d"),typeof n.captureStream!="function")return t(!1);const r=n.captureStream(),o="audio/webm";try{const s=new e.MediaRecorder(r,{mimeType:o});s.addEventListener("dataavailable",({data:a})=>t(a.type===o)),s.start(),setTimeout(()=>s.stop(),10)}catch(s){t(s.name==="NotSupportedError")}}):Promise.resolve(!1),fr=(e,t,n,r,o,s,a)=>class extends s{constructor(i,u={}){const{mimeType:d}=u;if(a!==null&&(d===void 0||a.isTypeSupported!==void 0&&a.isTypeSupported(d))){const l=e(a,i,u);super(l),this._internalMediaRecorder=l}else if(d!==void 0&&o.some(l=>l.test(d)))super(),a!==null&&a.isTypeSupported!==void 0&&a.isTypeSupported("audio/webm;codecs=pcm")?this._internalMediaRecorder=r(this,a,i,d):this._internalMediaRecorder=n(this,i,d);else throw a!==null&&e(a,i,u),t();this._ondataavailable=null,this._onerror=null,this._onpause=null,this._onresume=null,this._onstart=null,this._onstop=null}get mimeType(){return this._internalMediaRecorder.mimeType}get ondataavailable(){return this._ondataavailable===null?this._ondataavailable:this._ondataavailable[0]}set ondataavailable(i){if(this._ondataavailable!==null&&this.removeEventListener("dataavailable",this._ondataavailable[1]),typeof i=="function"){const u=i.bind(this);this.addEventListener("dataavailable",u),this._ondataavailable=[i,u]}else this._ondataavailable=null}get onerror(){return this._onerror===null?this._onerror:this._onerror[0]}set onerror(i){if(this._onerror!==null&&this.removeEventListener("error",this._onerror[1]),typeof i=="function"){const u=i.bind(this);this.addEventListener("error",u),this._onerror=[i,u]}else this._onerror=null}get onpause(){return this._onpause===null?this._onpause:this._onpause[0]}set onpause(i){if(this._onpause!==null&&this.removeEventListener("pause",this._onpause[1]),typeof i=="function"){const u=i.bind(this);this.addEventListener("pause",u),this._onpause=[i,u]}else this._onpause=null}get onresume(){return this._onresume===null?this._onresume:this._onresume[0]}set onresume(i){if(this._onresume!==null&&this.removeEventListener("resume",this._onresume[1]),typeof i=="function"){const u=i.bind(this);this.addEventListener("resume",u),this._onresume=[i,u]}else this._onresume=null}get onstart(){return this._onstart===null?this._onstart:this._onstart[0]}set onstart(i){if(this._onstart!==null&&this.removeEventListener("start",this._onstart[1]),typeof i=="function"){const u=i.bind(this);this.addEventListener("start",u),this._onstart=[i,u]}else this._onstart=null}get onstop(){return this._onstop===null?this._onstop:this._onstop[0]}set onstop(i){if(this._onstop!==null&&this.removeEventListener("stop",this._onstop[1]),typeof i=="function"){const u=i.bind(this);this.addEventListener("stop",u),this._onstop=[i,u]}else this._onstop=null}get state(){return this._internalMediaRecorder.state}pause(){return this._internalMediaRecorder.pause()}resume(){return this._internalMediaRecorder.resume()}start(i){return this._internalMediaRecorder.start(i)}stop(){return this._internalMediaRecorder.stop()}static isTypeSupported(i){return a!==null&&a.isTypeSupported!==void 0&&a.isTypeSupported(i)||o.some(u=>u.test(i))}},hr=e=>e!==null&&e.BlobEvent!==void 0?e.BlobEvent:null,pr=(e,t)=>(n,r,o)=>{const s=[],a=new WeakMap,c=new WeakMap,i=new n(r,o),u=new WeakMap;let d=!0;return i.addEventListener=(l=>(p,m,w)=>{let f=m;return typeof m=="function"&&(p==="dataavailable"?(f=h=>{setTimeout(()=>{if(d&&i.state==="inactive")s.push(h.data);else{if(s.length>0){const g=h.data;Object.defineProperty(h,"data",{value:new Blob([...s,g],{type:g.type})}),s.length=0}m.call(i,h)}})},a.set(m,f)):p==="error"?(f=h=>{if(h.error===void 0)m.call(i,new ErrorEvent("error",{error:e()}));else if(h.error.name==="UnknownError"){const g=h.error.message;m.call(i,new ErrorEvent("error",{error:e(g)}))}else h instanceof ErrorEvent?m.call(i,h):m.call(i,new ErrorEvent("error",{error:h.error}))},c.set(m,f)):p==="stop"&&(f=h=>{d=!1,setTimeout(()=>m.call(i,h))},u.set(m,f))),l.call(i,p,f,w)})(i.addEventListener),i.dispatchEvent=(l=>p=>{let m;setTimeout(()=>{m=d,d=!1});const w=l.call(i,p);return setTimeout(()=>d=m),w})(i.dispatchEvent),i.removeEventListener=(l=>(p,m,w)=>{let f=m;if(typeof m=="function"){if(p==="dataavailable"){const h=a.get(m);h!==void 0&&(f=h)}else if(p==="error"){const h=c.get(m);h!==void 0&&(f=h)}else if(p==="stop"){const h=u.get(m);h!==void 0&&(f=h)}}return l.call(i,p,f,w)})(i.removeEventListener),i.start=(l=>p=>{if(o.mimeType!==void 0&&o.mimeType.startsWith("audio/")&&r.getVideoTracks().length>0)throw t();return d=p!==void 0,p===void 0?l.call(i):l.call(i,p)})(i.start),i},mr=e=>e===null||e.MediaRecorder===void 0?null:e.MediaRecorder,$e=()=>{try{return new DOMException("","NotSupportedError")}catch(e){return e.code=9,e.name="NotSupportedError",e}},gr=e=>(t,n,r,o=2)=>{const s=e(t,n);if(s===null)return s;const{length:a,value:c}=s;if(r==="master")return{content:null,length:a};if(n+a+c>t.byteLength)return null;if(r==="binary"){const i=(c/Float32Array.BYTES_PER_ELEMENT-1)/o,u=Array.from({length:o},()=>new Float32Array(i));for(let d=0;d(t,n)=>{const r=e(t,n);if(r===null)return r;const{length:o,value:s}=r;return s===35?{length:o,type:"binary"}:s===46||s===97||s===88713574||s===106212971||s===139690087||s===172351395||s===256095861?{length:o,type:"master"}:{length:o,type:"unknown"}},vr=e=>(t,n)=>{const r=e(t,n);if(r===null)return r;const o=n+Math.floor((r-1)/8);if(o+r>t.byteLength)return null;let a=t.getUint8(o)&(1<<8-r%8)-1;for(let c=1;c{},Pt=e=>{throw e};function yr(e){return e?e.next&&e.error&&e.complete?e:{complete:(e.complete??ke).bind(e),error:(e.error??Pt).bind(e),next:(e.next??ke).bind(e)}:{complete:ke,error:Pt,next:ke}}const Er=e=>(t,n,r)=>e(o=>{const s=a=>o.next(a);return t.addEventListener(n,s,r),()=>t.removeEventListener(n,s,r)}),Ar=(e,t)=>{const n=()=>{},r=o=>typeof o[0]=="function";return o=>{const s=(...a)=>{const c=o(r(a)?t({next:a[0]}):t(...a));return c!==void 0?c:n};return s[Symbol.observable]=()=>({subscribe:(...a)=>({unsubscribe:s(...a)})}),e(s)}},br=Ar(_r,yr),rn=Er(br);/*! + * dashify + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */var Cr=(e,t)=>{if(typeof e!="string")throw new TypeError("expected a string");return e.trim().replace(/([a-z])([A-Z])/g,"$1-$2").replace(/\W/g,n=>/[À-ž]/.test(n)?n:"-").replace(/^-+|-+$/g,"").replace(/-{2,}/g,n=>t&&t.condense?"-":n).toLowerCase()},on={exports:{}};(function(e){var t=function(n){var r,o,s=/\w+/.exec(n);if(s)o=s[0];else return"an";var a=o.toLowerCase(),c=["honest","hour","hono"];for(r in c)if(a.indexOf(c[r])==0)return"an";if(a.length==1)return"aedhilmnorsx".indexOf(a)>=0?"an":"a";if(o.match(/(?!FJO|[HLMNS]Y.|RY[EO]|SQU|(F[LR]?|[HL]|MN?|N|RH?|S[CHKLMNPTVW]?|X(YL)?)[AEIOU])[FHLMNRSX][A-Z]/))return"an";var i=[/^e[uw]/,/^onc?e\b/,/^uni([^nmd]|mo)/,/^u[bcfhjkqrst][aeiou]/];for(r=0;r=0?"an":"a":"aeiou".indexOf(a[0])>=0||a.match(/^y(b[lor]|cl[ea]|fere|gg|p[ios]|rou|tt)/)?"an":"a"};e.exports=t})(on);var Tr=on.exports;const Ut=(e,t)=>t===void 0?e:t.reduce((n,r)=>{if(r==="capitalize"){const o=n.charAt(0).toUpperCase(),s=n.slice(1);return`${o}${s}`}return r==="dashify"?Cr(n):r==="prependIndefiniteArticle"?`${Tr(n)} ${n}`:n},e),Mr=e=>{const t=e.name+e.modifiers.map(n=>`\\.${n}\\(\\)`).join("");return new RegExp(`\\$\\{${t}}`,"g")},Bt=(e,t)=>{const n=/\${([^.}]+)((\.[^(]+\(\))*)}/g,r=[];let o=n.exec(e);for(;o!==null;){const a={modifiers:[],name:o[1]};if(o[3]!==void 0){const c=/\.[^(]+\(\)/g;let i=c.exec(o[2]);for(;i!==null;)a.modifiers.push(i[0].slice(1,-2)),i=c.exec(o[2])}r.push(a),o=n.exec(e)}const s=r.reduce((a,c)=>a.map(i=>typeof i=="string"?i.split(Mr(c)).reduce((u,d,l)=>l===0?[d]:c.name in t?[...u,Ut(t[c.name],c.modifiers),d]:[...u,p=>Ut(p[c.name],c.modifiers),d],[]):[i]).reduce((i,u)=>[...i,...u],[]),[e]);return a=>s.reduce((c,i)=>typeof i=="string"?[...c,i]:[...c,i(a)],[]).join("")},Ge=(e,t={})=>{const n=e.code===void 0?void 0:Bt(e.code,t),r=e.message===void 0?void 0:Bt(e.message,t);function o(s={},a){const c=a===void 0&&(s instanceof Error||s.code!==void 0&&s.code.slice(-9)==="Exception"),{cause:i,missingParameters:u}=c?{cause:s,missingParameters:{}}:{cause:a,missingParameters:s},d=r===void 0?new Error:new Error(r(u));return i!==null&&(d.cause=i),n!==void 0&&(d.code=n(u)),e.status!==void 0&&(d.status=e.status),d}return o},qe={INTERNAL_ERROR:-32603,INVALID_PARAMS:-32602,METHOD_NOT_FOUND:-32601};Ge({message:'The requested method called "${method}" is not supported.',status:qe.METHOD_NOT_FOUND});Ge({message:'The handler of the method called "${method}" returned no required result.',status:qe.INTERNAL_ERROR});Ge({message:'The handler of the method called "${method}" returned an unexpected result.',status:qe.INTERNAL_ERROR});Ge({message:'The specified parameter called "portId" with the given value "${portId}" does not identify a port connected to this worker.',status:qe.INVALID_PARAMS});const Nr=(e,t,n)=>async r=>{const o=new e([n],{type:"application/javascript; charset=utf-8"}),s=t.createObjectURL(o);try{await r(s)}finally{t.revokeObjectURL(s)}},Sr=e=>({data:t})=>{const{id:n}=t;if(n!==null){const r=e.get(n);if(r!==void 0){const{reject:o,resolve:s}=r;e.delete(n),t.error===void 0?s(t.result):o(new Error(t.error.message))}}},Or=e=>(t,n)=>(r,o=[])=>new Promise((s,a)=>{const c=e(t);t.set(c,{reject:a,resolve:s}),n.postMessage({id:c,...r},o)}),Rr=(e,t,n,r)=>(o,s,a={})=>{const c=new o(s,"recorder-audio-worklet-processor",{...a,channelCountMode:"explicit",numberOfInputs:1,numberOfOutputs:0}),i=new Map,u=t(i,c.port),d=n(c.port,"message")(e(i));c.port.start();let l="inactive";return Object.defineProperties(c,{pause:{get(){return async()=>(r(["recording"],l),l="paused",u({method:"pause"}))}},port:{get(){throw new Error("The port of a RecorderAudioWorkletNode can't be accessed.")}},record:{get(){return async p=>(r(["inactive"],l),l="recording",u({method:"record",params:{encoderPort:p}},[p]))}},resume:{get(){return async()=>(r(["paused"],l),l="recording",u({method:"resume"}))}},stop:{get(){return async()=>{r(["paused","recording"],l),l="stopped";try{await u({method:"stop"})}finally{d()}}}}}),c},Ir=(e,t)=>{if(!e.includes(t))throw new Error(`Expected the state to be ${e.map(n=>`"${n}"`).join(" or ")} but it was "${t}".`)},kr='(()=>{"use strict";class e extends AudioWorkletProcessor{constructor(){super(),this._encoderPort=null,this._state="inactive",this.port.onmessage=e=>{let{data:t}=e;"pause"===t.method?"active"===this._state||"recording"===this._state?(this._state="paused",this._sendAcknowledgement(t.id)):this._sendUnexpectedStateError(t.id):"record"===t.method?"inactive"===this._state?(this._encoderPort=t.params.encoderPort,this._state="active",this._sendAcknowledgement(t.id)):this._sendUnexpectedStateError(t.id):"resume"===t.method?"paused"===this._state?(this._state="active",this._sendAcknowledgement(t.id)):this._sendUnexpectedStateError(t.id):"stop"===t.method?"active"!==this._state&&"paused"!==this._state&&"recording"!==this._state||null===this._encoderPort?this._sendUnexpectedStateError(t.id):(this._stop(this._encoderPort),this._sendAcknowledgement(t.id)):"number"==typeof t.id&&this.port.postMessage({error:{code:-32601,message:"The requested method is not supported."},id:t.id})}}process(e){let[t]=e;if("inactive"===this._state||"paused"===this._state)return!0;if("active"===this._state){if(void 0===t)throw new Error("No channelData was received for the first input.");if(0===t.length)return!0;this._state="recording"}if("recording"===this._state&&null!==this._encoderPort){if(void 0===t)throw new Error("No channelData was received for the first input.");if(0!==t.length)return this._encoderPort.postMessage(t,t.map((e=>{let{buffer:t}=e;return t}))),!0;this._stop(this._encoderPort)}return!1}_sendAcknowledgement(e){this.port.postMessage({id:e,result:null})}_sendUnexpectedStateError(e){this.port.postMessage({error:{code:-32603,message:"The internal state does not allow to process the given message."},id:e})}_stop(e){e.postMessage([]),e.close(),this._encoderPort=null,this._state="stopped"}}e.parameterDescriptors=[],registerProcessor("recorder-audio-worklet-processor",e)})();',Lr=Nr(Blob,URL,kr),xr=Rr(Sr,Or(er),rn,Ir),Dt=(e,t,n)=>({endTime:t,insertTime:n,type:"exponentialRampToValue",value:e}),Wt=(e,t,n)=>({endTime:t,insertTime:n,type:"linearRampToValue",value:e}),at=(e,t)=>({startTime:t,type:"setValue",value:e}),sn=(e,t,n)=>({duration:n,startTime:t,type:"setValueCurve",values:e}),an=(e,t,{startTime:n,target:r,timeConstant:o})=>r+(t-r)*Math.exp((n-e)/o),me=e=>e.type==="exponentialRampToValue",Be=e=>e.type==="linearRampToValue",re=e=>me(e)||Be(e),vt=e=>e.type==="setValue",ee=e=>e.type==="setValueCurve",De=(e,t,n,r)=>{const o=e[t];return o===void 0?r:re(o)||vt(o)?o.value:ee(o)?o.values[o.values.length-1]:an(n,De(e,t-1,o.startTime,r),o)},Vt=(e,t,n,r,o)=>n===void 0?[r.insertTime,o]:re(n)?[n.endTime,n.value]:vt(n)?[n.startTime,n.value]:ee(n)?[n.startTime+n.duration,n.values[n.values.length-1]]:[n.startTime,De(e,t-1,n.startTime,o)],it=e=>e.type==="cancelAndHold",ct=e=>e.type==="cancelScheduledValues",ne=e=>it(e)||ct(e)?e.cancelTime:me(e)||Be(e)?e.endTime:e.startTime,Ft=(e,t,n,{endTime:r,value:o})=>n===o?o:0n+(e-t)/(r-t)*(o-n),Pr=(e,t)=>{const n=Math.floor(t),r=Math.ceil(t);return n===r?e[n]:(1-(t-n))*e[n]+(1-(r-t))*e[r]},Ur=(e,{duration:t,startTime:n,values:r})=>{const o=(e-n)/t*(r.length-1);return Pr(r,o)},Le=e=>e.type==="setTarget";class Br{constructor(t){this._automationEvents=[],this._currenTime=0,this._defaultValue=t}[Symbol.iterator](){return this._automationEvents[Symbol.iterator]()}add(t){const n=ne(t);if(it(t)||ct(t)){const r=this._automationEvents.findIndex(s=>ct(t)&&ee(s)?s.startTime+s.duration>=n:ne(s)>=n),o=this._automationEvents[r];if(r!==-1&&(this._automationEvents=this._automationEvents.slice(0,r)),it(t)){const s=this._automationEvents[this._automationEvents.length-1];if(o!==void 0&&re(o)){if(Le(s))throw new Error("The internal list is malformed.");const a=ee(s)?s.startTime+s.duration:ne(s),c=ee(s)?s.values[s.values.length-1]:s.value,i=me(o)?Ft(n,a,c,o):jt(n,a,c,o),u=me(o)?Dt(i,n,this._currenTime):Wt(i,n,this._currenTime);this._automationEvents.push(u)}s!==void 0&&Le(s)&&this._automationEvents.push(at(this.getValue(n),n)),s!==void 0&&ee(s)&&s.startTime+s.duration>n&&(this._automationEvents[this._automationEvents.length-1]=sn(new Float32Array([6,7]),s.startTime,n-s.startTime))}}else{const r=this._automationEvents.findIndex(a=>ne(a)>n),o=r===-1?this._automationEvents[this._automationEvents.length-1]:this._automationEvents[r-1];if(o!==void 0&&ee(o)&&ne(o)+o.duration>n)return!1;const s=me(t)?Dt(t.value,t.endTime,this._currenTime):Be(t)?Wt(t.value,n,this._currenTime):t;if(r===-1)this._automationEvents.push(s);else{if(ee(t)&&n+t.duration>ne(this._automationEvents[r]))return!1;this._automationEvents.splice(r,0,s)}}return!0}flush(t){const n=this._automationEvents.findIndex(r=>ne(r)>t);if(n>1){const r=this._automationEvents.slice(n-1),o=r[0];Le(o)&&r.unshift(at(De(this._automationEvents,n-2,o.startTime,this._defaultValue),o.startTime)),this._automationEvents=r}}getValue(t){if(this._automationEvents.length===0)return this._defaultValue;const n=this._automationEvents.findIndex(a=>ne(a)>t),r=this._automationEvents[n],o=(n===-1?this._automationEvents.length:n)-1,s=this._automationEvents[o];if(s!==void 0&&Le(s)&&(r===void 0||!re(r)||r.insertTime>t))return an(t,De(this._automationEvents,o-1,s.startTime,this._defaultValue),s);if(s!==void 0&&vt(s)&&(r===void 0||!re(r)))return s.value;if(s!==void 0&&ee(s)&&(r===void 0||!re(r)||s.startTime+s.duration>t))return t({cancelTime:e,type:"cancelAndHold"}),Wr=e=>({cancelTime:e,type:"cancelScheduledValues"}),Vr=(e,t)=>({endTime:t,type:"exponentialRampToValue",value:e}),Fr=(e,t)=>({endTime:t,type:"linearRampToValue",value:e}),jr=(e,t,n)=>({startTime:t,target:e,timeConstant:n,type:"setTarget"}),$r=()=>new DOMException("","AbortError"),Gr=e=>(t,n,[r,o,s],a)=>{e(t[o],[n,r,s],c=>c[0]===n&&c[1]===r,a)},qr=e=>(t,n,r)=>{const o=[];for(let s=0;s(t,n)=>{e.set(t,{activeInputs:new Set,passiveInputs:new WeakMap,renderer:n})},ge=new WeakSet,cn=new WeakMap,un=new WeakMap,ln=new WeakMap,dn=new WeakMap,fn=new WeakMap,hn=new WeakMap,ut=new WeakMap,lt=new WeakMap,dt=new WeakMap,pn={construct(){return pn}},Hr=e=>{try{const t=new Proxy(e,pn);new t}catch{return!1}return!0},$t=/^import(?:(?:[\s]+[\w]+|(?:[\s]+[\w]+[\s]*,)?[\s]*\{[\s]*[\w]+(?:[\s]+as[\s]+[\w]+)?(?:[\s]*,[\s]*[\w]+(?:[\s]+as[\s]+[\w]+)?)*[\s]*}|(?:[\s]+[\w]+[\s]*,)?[\s]*\*[\s]+as[\s]+[\w]+)[\s]+from)?(?:[\s]*)("([^"\\]|\\.)+"|'([^'\\]|\\.)+')(?:[\s]*);?/,Gt=(e,t)=>{const n=[];let r=e.replace(/^[\s]+/,""),o=r.match($t);for(;o!==null;){const s=o[1].slice(1,-1),a=o[0].replace(/([\s]+)?;?$/,"").replace(s,new URL(s,t).toString());n.push(a),r=r.slice(o[0].length).replace(/^[\s]+/,""),o=r.match($t)}return[n.join(";"),r]},qt=e=>{if(e!==void 0&&!Array.isArray(e))throw new TypeError("The parameterDescriptors property of given value for processorCtor is not an array.")},zt=e=>{if(!Hr(e))throw new TypeError("The given value for processorCtor should be a constructor.");if(e.prototype===null||typeof e.prototype!="object")throw new TypeError("The given value for processorCtor should have a prototype.")},Yr=(e,t,n,r,o,s,a,c,i,u,d,l,p)=>{let m=0;return(w,f,h={credentials:"omit"})=>{const g=d.get(w);if(g!==void 0&&g.has(f))return Promise.resolve();const _=u.get(w);if(_!==void 0){const v=_.get(f);if(v!==void 0)return v}const A=s(w),T=A.audioWorklet===void 0?o(f).then(([v,E])=>{const[y,C]=Gt(v,E),N=`${y};((a,b)=>{(a[b]=a[b]||[]).push((AudioWorkletProcessor,global,registerProcessor,sampleRate,self,window)=>{${C} +})})(window,'_AWGS')`;return n(N)}).then(()=>{const v=p._AWGS.pop();if(v===void 0)throw new SyntaxError;r(A.currentTime,A.sampleRate,()=>v(class{},void 0,(E,y)=>{if(E.trim()==="")throw t();const C=lt.get(A);if(C!==void 0){if(C.has(E))throw t();zt(y),qt(y.parameterDescriptors),C.set(E,y)}else zt(y),qt(y.parameterDescriptors),lt.set(A,new Map([[E,y]]))},A.sampleRate,void 0,void 0))}):Promise.all([o(f),Promise.resolve(e(l,l))]).then(([[v,E],y])=>{const C=m+1;m=C;const[N,I]=Gt(v,E),B=`${N};((AudioWorkletProcessor,registerProcessor)=>{${I} +})(${y?"AudioWorkletProcessor":"class extends AudioWorkletProcessor {__b=new WeakSet();constructor(){super();(p=>p.postMessage=(q=>(m,t)=>q.call(p,m,t?t.filter(u=>!this.__b.has(u)):t))(p.postMessage))(this.port)}}"},(n,p)=>registerProcessor(n,class extends p{${y?"":"__c = (a) => a.forEach(e=>this.__b.add(e.buffer));"}process(i,o,p){${y?"":"i.forEach(this.__c);o.forEach(this.__c);this.__c(Object.values(p));"}return super.process(i.map(j=>j.some(k=>k.length===0)?[]:j),o,p)}}));registerProcessor('__sac${C}',class extends AudioWorkletProcessor{process(){return !1}})`,U=new Blob([B],{type:"application/javascript; charset=utf-8"}),R=URL.createObjectURL(U);return A.audioWorklet.addModule(R,h).then(()=>{if(c(A))return A;const P=a(A);return P.audioWorklet.addModule(R,h).then(()=>P)}).then(P=>{if(i===null)throw new SyntaxError;try{new i(P,`__sac${C}`)}catch{throw new SyntaxError}}).finally(()=>URL.revokeObjectURL(R))});return _===void 0?u.set(w,new Map([[f,T]])):_.set(f,T),T.then(()=>{const v=d.get(w);v===void 0?d.set(w,new Set([f])):v.add(f)}).finally(()=>{const v=u.get(w);v!==void 0&&v.delete(f)}),T}},K=(e,t)=>{const n=e.get(t);if(n===void 0)throw new Error("A value with the given key could not be found.");return n},ze=(e,t)=>{const n=Array.from(e).filter(t);if(n.length>1)throw Error("More than one element was found.");if(n.length===0)throw Error("No element was found.");const[r]=n;return e.delete(r),r},mn=(e,t,n,r)=>{const o=K(e,t),s=ze(o,a=>a[0]===n&&a[1]===r);return o.size===0&&e.delete(t),s},be=e=>K(hn,e),ye=e=>{if(ge.has(e))throw new Error("The AudioNode is already stored.");ge.add(e),be(e).forEach(t=>t(!0))},gn=e=>"port"in e,He=e=>{if(!ge.has(e))throw new Error("The AudioNode is not stored.");ge.delete(e),be(e).forEach(t=>t(!1))},ft=(e,t)=>{!gn(e)&&t.every(n=>n.size===0)&&He(e)},Xr=(e,t,n,r,o,s,a,c,i,u,d,l,p)=>{const m=new WeakMap;return(w,f,h,g,_)=>{const{activeInputs:A,passiveInputs:T}=s(f),{outputs:v}=s(w),E=c(w),y=C=>{const N=i(f),I=i(w);if(C){const M=mn(T,w,h,g);e(A,w,M,!1),!_&&!l(w)&&n(I,N,h,g),p(f)&&ye(f)}else{const M=r(A,w,h,g);t(T,g,M,!1),!_&&!l(w)&&o(I,N,h,g);const x=a(f);if(x===0)d(f)&&ft(f,A);else{const k=m.get(f);k!==void 0&&clearTimeout(k),m.set(f,setTimeout(()=>{d(f)&&ft(f,A)},x*1e3))}}};return u(v,[f,h,g],C=>C[0]===f&&C[1]===h&&C[2]===g,!0)?(E.add(y),d(w)?e(A,w,[h,g,y],!0):t(T,g,[w,h,y],!0),!0):!1}},Zr=e=>(t,n,[r,o,s],a)=>{const c=t.get(r);c===void 0?t.set(r,new Set([[o,n,s]])):e(c,[o,n,s],i=>i[0]===o&&i[1]===n,a)},Kr=e=>(t,n)=>{const r=e(t,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});n.connect(r).connect(t.destination);const o=()=>{n.removeEventListener("ended",o),n.disconnect(r),r.disconnect()};n.addEventListener("ended",o)},Jr=e=>(t,n)=>{e(t).add(n)},_t=(e,t)=>e.context===t,Ht=e=>{try{e.copyToChannel(new Float32Array(1),0,-1)}catch{return!1}return!0},ue=()=>new DOMException("","IndexSizeError"),Qr=e=>{e.getChannelData=(t=>n=>{try{return t.call(e,n)}catch(r){throw r.code===12?ue():r}})(e.getChannelData)},eo={numberOfChannels:1},to=(e,t,n,r,o,s,a,c)=>{let i=null;return class wn{constructor(d){if(o===null)throw new Error("Missing the native OfflineAudioContext constructor.");const{length:l,numberOfChannels:p,sampleRate:m}={...eo,...d};i===null&&(i=new o(1,1,44100));const w=r!==null&&t(s,s)?new r({length:l,numberOfChannels:p,sampleRate:m}):i.createBuffer(p,l,m);if(w.numberOfChannels===0)throw n();return typeof w.copyFromChannel!="function"?(a(w),Qr(w)):t(Ht,()=>Ht(w))||c(w),e.add(w),w}static[Symbol.hasInstance](d){return d!==null&&typeof d=="object"&&Object.getPrototypeOf(d)===wn.prototype||e.has(d)}}},Ce=-34028234663852886e22,Ye=-Ce,oe=e=>ge.has(e),no={buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1},ro=(e,t,n,r,o,s,a,c)=>class extends e{constructor(u,d){const l=s(u),p={...no,...d},m=o(l,p),w=a(l),f=w?t():null;super(u,!1,m,f),this._audioBufferSourceNodeRenderer=f,this._isBufferNullified=!1,this._isBufferSet=p.buffer!==null,this._nativeAudioBufferSourceNode=m,this._onended=null,this._playbackRate=n(this,w,m.playbackRate,Ye,Ce)}get buffer(){return this._isBufferNullified?null:this._nativeAudioBufferSourceNode.buffer}set buffer(u){if(this._nativeAudioBufferSourceNode.buffer=u,u!==null){if(this._isBufferSet)throw r();this._isBufferSet=!0}}get loop(){return this._nativeAudioBufferSourceNode.loop}set loop(u){this._nativeAudioBufferSourceNode.loop=u}get loopEnd(){return this._nativeAudioBufferSourceNode.loopEnd}set loopEnd(u){this._nativeAudioBufferSourceNode.loopEnd=u}get loopStart(){return this._nativeAudioBufferSourceNode.loopStart}set loopStart(u){this._nativeAudioBufferSourceNode.loopStart=u}get onended(){return this._onended}set onended(u){const d=typeof u=="function"?c(this,u):null;this._nativeAudioBufferSourceNode.onended=d;const l=this._nativeAudioBufferSourceNode.onended;this._onended=l!==null&&l===d?u:l}get playbackRate(){return this._playbackRate}start(u=0,d=0,l){if(this._nativeAudioBufferSourceNode.start(u,d,l),this._audioBufferSourceNodeRenderer!==null&&(this._audioBufferSourceNodeRenderer.start=l===void 0?[u,d]:[u,d,l]),this.context.state!=="closed"){ye(this);const p=()=>{this._nativeAudioBufferSourceNode.removeEventListener("ended",p),oe(this)&&He(this)};this._nativeAudioBufferSourceNode.addEventListener("ended",p)}}stop(u=0){this._nativeAudioBufferSourceNode.stop(u),this._audioBufferSourceNodeRenderer!==null&&(this._audioBufferSourceNodeRenderer.stop=u)}},oo=(e,t,n,r,o)=>()=>{const s=new WeakMap;let a=null,c=null;const i=async(u,d)=>{let l=n(u);const p=_t(l,d);if(!p){const m={buffer:l.buffer,channelCount:l.channelCount,channelCountMode:l.channelCountMode,channelInterpretation:l.channelInterpretation,loop:l.loop,loopEnd:l.loopEnd,loopStart:l.loopStart,playbackRate:l.playbackRate.value};l=t(d,m),a!==null&&l.start(...a),c!==null&&l.stop(c)}return s.set(d,l),p?await e(d,u.playbackRate,l.playbackRate):await r(d,u.playbackRate,l.playbackRate),await o(u,d,l),l};return{set start(u){a=u},set stop(u){c=u},render(u,d){const l=s.get(d);return l!==void 0?Promise.resolve(l):i(u,d)}}},so=e=>"playbackRate"in e,ao=e=>"frequency"in e&&"gain"in e,io=e=>"offset"in e,co=e=>!("frequency"in e)&&"gain"in e,uo=e=>"detune"in e&&"frequency"in e,lo=e=>"pan"in e,z=e=>K(cn,e),Te=e=>K(ln,e),ht=(e,t)=>{const{activeInputs:n}=z(e);n.forEach(o=>o.forEach(([s])=>{t.includes(e)||ht(s,[...t,e])}));const r=so(e)?[e.playbackRate]:gn(e)?Array.from(e.parameters.values()):ao(e)?[e.Q,e.detune,e.frequency,e.gain]:io(e)?[e.offset]:co(e)?[e.gain]:uo(e)?[e.detune,e.frequency]:lo(e)?[e.pan]:[];for(const o of r){const s=Te(o);s!==void 0&&s.activeInputs.forEach(([a])=>ht(a,t))}oe(e)&&He(e)},fo=e=>{ht(e.destination,[])},ho=e=>e===void 0||typeof e=="number"||typeof e=="string"&&(e==="balanced"||e==="interactive"||e==="playback"),po=(e,t,n,r,o,s,a,c)=>class extends e{constructor(u,d){const l=s(u),p=a(l),m=o(l,d,p),w=p?t(c):null;super(u,!1,m,w),this._isNodeOfNativeOfflineAudioContext=p,this._nativeAudioDestinationNode=m}get channelCount(){return this._nativeAudioDestinationNode.channelCount}set channelCount(u){if(this._isNodeOfNativeOfflineAudioContext)throw r();if(u>this._nativeAudioDestinationNode.maxChannelCount)throw n();this._nativeAudioDestinationNode.channelCount=u}get channelCountMode(){return this._nativeAudioDestinationNode.channelCountMode}set channelCountMode(u){if(this._isNodeOfNativeOfflineAudioContext)throw r();this._nativeAudioDestinationNode.channelCountMode=u}get maxChannelCount(){return this._nativeAudioDestinationNode.maxChannelCount}},mo=e=>{const t=new WeakMap,n=async(r,o)=>{const s=o.destination;return t.set(o,s),await e(r,o,s),s};return{render(r,o){const s=t.get(o);return s!==void 0?Promise.resolve(s):n(r,o)}}},go=(e,t,n,r,o,s,a,c)=>(i,u)=>{const d=u.listener,l=()=>{const v=new Float32Array(1),E=t(u,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:9}),y=a(u);let C=!1,N=[0,0,-1,0,1,0],I=[0,0,0];const M=()=>{if(C)return;C=!0;const U=r(u,256,9,0);U.onaudioprocess=({inputBuffer:R})=>{const P=[s(R,v,0),s(R,v,1),s(R,v,2),s(R,v,3),s(R,v,4),s(R,v,5)];P.some((S,L)=>S!==N[L])&&(d.setOrientation(...P),N=P);const D=[s(R,v,6),s(R,v,7),s(R,v,8)];D.some((S,L)=>S!==I[L])&&(d.setPosition(...D),I=D)},E.connect(U)},x=U=>R=>{R!==N[U]&&(N[U]=R,d.setOrientation(...N))},k=U=>R=>{R!==I[U]&&(I[U]=R,d.setPosition(...I))},B=(U,R,P)=>{const D=n(u,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:R});D.connect(E,0,U),D.start(),Object.defineProperty(D.offset,"defaultValue",{get(){return R}});const S=e({context:i},y,D.offset,Ye,Ce);return c(S,"value",L=>()=>L.call(S),L=>W=>{try{L.call(S,W)}catch(G){if(G.code!==9)throw G}M(),y&&P(W)}),S.cancelAndHoldAtTime=(L=>y?()=>{throw o()}:(...W)=>{const G=L.apply(S,W);return M(),G})(S.cancelAndHoldAtTime),S.cancelScheduledValues=(L=>y?()=>{throw o()}:(...W)=>{const G=L.apply(S,W);return M(),G})(S.cancelScheduledValues),S.exponentialRampToValueAtTime=(L=>y?()=>{throw o()}:(...W)=>{const G=L.apply(S,W);return M(),G})(S.exponentialRampToValueAtTime),S.linearRampToValueAtTime=(L=>y?()=>{throw o()}:(...W)=>{const G=L.apply(S,W);return M(),G})(S.linearRampToValueAtTime),S.setTargetAtTime=(L=>y?()=>{throw o()}:(...W)=>{const G=L.apply(S,W);return M(),G})(S.setTargetAtTime),S.setValueAtTime=(L=>y?()=>{throw o()}:(...W)=>{const G=L.apply(S,W);return M(),G})(S.setValueAtTime),S.setValueCurveAtTime=(L=>y?()=>{throw o()}:(...W)=>{const G=L.apply(S,W);return M(),G})(S.setValueCurveAtTime),S};return{forwardX:B(0,0,x(0)),forwardY:B(1,0,x(1)),forwardZ:B(2,-1,x(2)),positionX:B(6,0,k(0)),positionY:B(7,0,k(1)),positionZ:B(8,0,k(2)),upX:B(3,0,x(3)),upY:B(4,1,x(4)),upZ:B(5,0,x(5))}},{forwardX:p,forwardY:m,forwardZ:w,positionX:f,positionY:h,positionZ:g,upX:_,upY:A,upZ:T}=d.forwardX===void 0?l():d;return{get forwardX(){return p},get forwardY(){return m},get forwardZ(){return w},get positionX(){return f},get positionY(){return h},get positionZ(){return g},get upX(){return _},get upY(){return A},get upZ(){return T}}},We=e=>"context"in e,Me=e=>We(e[0]),le=(e,t,n,r)=>{for(const o of e)if(n(o)){if(r)return!1;throw Error("The set contains at least one similar element.")}return e.add(t),!0},Yt=(e,t,[n,r],o)=>{le(e,[t,n,r],s=>s[0]===t&&s[1]===n,o)},Xt=(e,[t,n,r],o)=>{const s=e.get(t);s===void 0?e.set(t,new Set([[n,r]])):le(s,[n,r],a=>a[0]===n,o)},vn=e=>"inputs"in e,pt=(e,t,n,r)=>{if(vn(t)){const o=t.inputs[r];return e.connect(o,n,0),[o,n,0]}return e.connect(t,n,r),[t,n,r]},_n=(e,t,n)=>{for(const r of e)if(r[0]===t&&r[1]===n)return e.delete(r),r;return null},wo=(e,t,n)=>ze(e,r=>r[0]===t&&r[1]===n),yn=(e,t)=>{if(!be(e).delete(t))throw new Error("Missing the expected event listener.")},En=(e,t,n)=>{const r=K(e,t),o=ze(r,s=>s[0]===n);return r.size===0&&e.delete(t),o},mt=(e,t,n,r)=>{vn(t)?e.disconnect(t.inputs[r],n,0):e.disconnect(t,n,r)},X=e=>K(un,e),Ee=e=>K(dn,e),ce=e=>ut.has(e),Pe=e=>!ge.has(e),Zt=(e,t)=>new Promise(n=>{if(t!==null)n(!0);else{const r=e.createScriptProcessor(256,1,1),o=e.createGain(),s=e.createBuffer(1,2,44100),a=s.getChannelData(0);a[0]=1,a[1]=1;const c=e.createBufferSource();c.buffer=s,c.loop=!0,c.connect(r).connect(e.destination),c.connect(o),c.disconnect(o),r.onaudioprocess=i=>{const u=i.inputBuffer.getChannelData(0);Array.prototype.some.call(u,d=>d===1)?n(!0):n(!1),c.stop(),r.onaudioprocess=null,c.disconnect(r),r.disconnect(e.destination)},c.start()}}),ot=(e,t)=>{const n=new Map;for(const r of e)for(const o of r){const s=n.get(o);n.set(o,s===void 0?1:s+1)}n.forEach((r,o)=>t(o,r))},Ve=e=>"context"in e,vo=e=>{const t=new Map;e.connect=(n=>(r,o=0,s=0)=>{const a=Ve(r)?n(r,o,s):n(r,o),c=t.get(r);return c===void 0?t.set(r,[{input:s,output:o}]):c.every(i=>i.input!==s||i.output!==o)&&c.push({input:s,output:o}),a})(e.connect.bind(e)),e.disconnect=(n=>(r,o,s)=>{if(n.apply(e),r===void 0)t.clear();else if(typeof r=="number")for(const[a,c]of t){const i=c.filter(u=>u.output!==r);i.length===0?t.delete(a):t.set(a,i)}else if(t.has(r))if(o===void 0)t.delete(r);else{const a=t.get(r);if(a!==void 0){const c=a.filter(i=>i.output!==o&&(i.input!==s||s===void 0));c.length===0?t.delete(r):t.set(r,c)}}for(const[a,c]of t)c.forEach(i=>{Ve(a)?e.connect(a,i.output,i.input):e.connect(a,i.output)})})(e.disconnect)},_o=(e,t,n,r)=>{const{activeInputs:o,passiveInputs:s}=Te(t),{outputs:a}=z(e),c=be(e),i=u=>{const d=X(e),l=Ee(t);if(u){const p=En(s,e,n);Yt(o,e,p,!1),!r&&!ce(e)&&d.connect(l,n)}else{const p=wo(o,e,n);Xt(s,p,!1),!r&&!ce(e)&&d.disconnect(l,n)}};return le(a,[t,n],u=>u[0]===t&&u[1]===n,!0)?(c.add(i),oe(e)?Yt(o,e,[n,i],!0):Xt(s,[e,n,i],!0),!0):!1},yo=(e,t,n,r)=>{const{activeInputs:o,passiveInputs:s}=z(t),a=_n(o[r],e,n);return a===null?[mn(s,e,n,r)[2],!1]:[a[2],!0]},Eo=(e,t,n)=>{const{activeInputs:r,passiveInputs:o}=Te(t),s=_n(r,e,n);return s===null?[En(o,e,n)[1],!1]:[s[2],!0]},yt=(e,t,n,r,o)=>{const[s,a]=yo(e,n,r,o);if(s!==null&&(yn(e,s),a&&!t&&!ce(e)&&mt(X(e),X(n),r,o)),oe(n)){const{activeInputs:c}=z(n);ft(n,c)}},Et=(e,t,n,r)=>{const[o,s]=Eo(e,n,r);o!==null&&(yn(e,o),s&&!t&&!ce(e)&&X(e).disconnect(Ee(n),r))},Ao=(e,t)=>{const n=z(e),r=[];for(const o of n.outputs)Me(o)?yt(e,t,...o):Et(e,t,...o),r.push(o[0]);return n.outputs.clear(),r},bo=(e,t,n)=>{const r=z(e),o=[];for(const s of r.outputs)s[1]===n&&(Me(s)?yt(e,t,...s):Et(e,t,...s),o.push(s[0]),r.outputs.delete(s));return o},Co=(e,t,n,r,o)=>{const s=z(e);return Array.from(s.outputs).filter(a=>a[0]===n&&(r===void 0||a[1]===r)&&(o===void 0||a[2]===o)).map(a=>(Me(a)?yt(e,t,...a):Et(e,t,...a),s.outputs.delete(a),a[0]))},To=(e,t,n,r,o,s,a,c,i,u,d,l,p,m,w,f)=>class extends u{constructor(g,_,A,T){super(A),this._context=g,this._nativeAudioNode=A;const v=d(g);l(v)&&n(Zt,()=>Zt(v,f))!==!0&&vo(A),un.set(this,A),hn.set(this,new Set),g.state!=="closed"&&_&&ye(this),e(this,T,A)}get channelCount(){return this._nativeAudioNode.channelCount}set channelCount(g){this._nativeAudioNode.channelCount=g}get channelCountMode(){return this._nativeAudioNode.channelCountMode}set channelCountMode(g){this._nativeAudioNode.channelCountMode=g}get channelInterpretation(){return this._nativeAudioNode.channelInterpretation}set channelInterpretation(g){this._nativeAudioNode.channelInterpretation=g}get context(){return this._context}get numberOfInputs(){return this._nativeAudioNode.numberOfInputs}get numberOfOutputs(){return this._nativeAudioNode.numberOfOutputs}connect(g,_=0,A=0){if(_<0||_>=this._nativeAudioNode.numberOfOutputs)throw o();const T=d(this._context),v=w(T);if(p(g)||m(g))throw s();if(We(g)){const C=X(g);try{const I=pt(this._nativeAudioNode,C,_,A),M=Pe(this);(v||M)&&this._nativeAudioNode.disconnect(...I),this.context.state!=="closed"&&!M&&Pe(g)&&ye(g)}catch(I){throw I.code===12?s():I}if(t(this,g,_,A,v)){const I=i([this],g);ot(I,r(v))}return g}const E=Ee(g);if(E.name==="playbackRate"&&E.maxValue===1024)throw a();try{this._nativeAudioNode.connect(E,_),(v||Pe(this))&&this._nativeAudioNode.disconnect(E,_)}catch(C){throw C.code===12?s():C}if(_o(this,g,_,v)){const C=i([this],g);ot(C,r(v))}}disconnect(g,_,A){let T;const v=d(this._context),E=w(v);if(g===void 0)T=Ao(this,E);else if(typeof g=="number"){if(g<0||g>=this.numberOfOutputs)throw o();T=bo(this,E,g)}else{if(_!==void 0&&(_<0||_>=this.numberOfOutputs)||We(g)&&A!==void 0&&(A<0||A>=g.numberOfInputs))throw o();if(T=Co(this,E,g,_,A),T.length===0)throw s()}for(const y of T){const C=i([this],y);ot(C,c)}}},Mo=(e,t,n,r,o,s,a,c,i,u,d,l,p)=>(m,w,f,h=null,g=null)=>{const _=new Br(f.defaultValue),A=w?r(_):null,T={get defaultValue(){return f.defaultValue},get maxValue(){return h===null?f.maxValue:h},get minValue(){return g===null?f.minValue:g},get value(){return f.value},set value(v){f.value=v,T.setValueAtTime(v,m.context.currentTime)},cancelAndHoldAtTime(v){if(typeof f.cancelAndHoldAtTime=="function")A===null&&_.flush(m.context.currentTime),_.add(o(v)),f.cancelAndHoldAtTime(v);else{const E=Array.from(_).pop();A===null&&_.flush(m.context.currentTime),_.add(o(v));const y=Array.from(_).pop();f.cancelScheduledValues(v),E!==y&&y!==void 0&&(y.type==="exponentialRampToValue"?f.exponentialRampToValueAtTime(y.value,y.endTime):y.type==="linearRampToValue"?f.linearRampToValueAtTime(y.value,y.endTime):y.type==="setValue"?f.setValueAtTime(y.value,y.startTime):y.type==="setValueCurve"&&f.setValueCurveAtTime(y.values,y.startTime,y.duration))}return T},cancelScheduledValues(v){return A===null&&_.flush(m.context.currentTime),_.add(s(v)),f.cancelScheduledValues(v),T},exponentialRampToValueAtTime(v,E){if(v===0)throw new RangeError;if(!Number.isFinite(E)||E<0)throw new RangeError;return A===null&&_.flush(m.context.currentTime),_.add(a(v,E)),f.exponentialRampToValueAtTime(v,E),T},linearRampToValueAtTime(v,E){return A===null&&_.flush(m.context.currentTime),_.add(c(v,E)),f.linearRampToValueAtTime(v,E),T},setTargetAtTime(v,E,y){return A===null&&_.flush(m.context.currentTime),_.add(i(v,E,y)),f.setTargetAtTime(v,E,y),T},setValueAtTime(v,E){return A===null&&_.flush(m.context.currentTime),_.add(u(v,E)),f.setValueAtTime(v,E),T},setValueCurveAtTime(v,E,y){const C=v instanceof Float32Array?v:new Float32Array(v);if(l!==null&&l.name==="webkitAudioContext"){const N=E+y,I=m.context.sampleRate,M=Math.ceil(E*I),x=Math.floor(N*I),k=x-M,B=new Float32Array(k);for(let R=0;R({replay(t){for(const n of e)if(n.type==="exponentialRampToValue"){const{endTime:r,value:o}=n;t.exponentialRampToValueAtTime(o,r)}else if(n.type==="linearRampToValue"){const{endTime:r,value:o}=n;t.linearRampToValueAtTime(o,r)}else if(n.type==="setTarget"){const{startTime:r,target:o,timeConstant:s}=n;t.setTargetAtTime(o,r,s)}else if(n.type==="setValue"){const{startTime:r,value:o}=n;t.setValueAtTime(o,r)}else if(n.type==="setValueCurve"){const{duration:r,startTime:o,values:s}=n;t.setValueCurveAtTime(s,o,r)}else throw new Error("Can't apply an unknown automation.")}});class An{constructor(t){this._map=new Map(t)}get size(){return this._map.size}entries(){return this._map.entries()}forEach(t,n=null){return this._map.forEach((r,o)=>t.call(n,r,o,this))}get(t){return this._map.get(t)}has(t){return this._map.has(t)}keys(){return this._map.keys()}values(){return this._map.values()}}const So={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:1,numberOfOutputs:1,parameterData:{},processorOptions:{}},Oo=(e,t,n,r,o,s,a,c,i,u,d,l,p,m)=>class extends t{constructor(f,h,g){var _;const A=c(f),T=i(A),v=d({...So,...g});p(v);const E=lt.get(A),y=E?.get(h),C=T||A.state!=="closed"?A:(_=a(A))!==null&&_!==void 0?_:A,N=o(C,T?null:f.baseLatency,u,h,y,v),I=T?r(h,v,y):null;super(f,!0,N,I);const M=[];N.parameters.forEach((k,B)=>{const U=n(this,T,k);M.push([B,U])}),this._nativeAudioWorkletNode=N,this._onprocessorerror=null,this._parameters=new An(M),T&&e(A,this);const{activeInputs:x}=s(this);l(N,x)}get onprocessorerror(){return this._onprocessorerror}set onprocessorerror(f){const h=typeof f=="function"?m(this,f):null;this._nativeAudioWorkletNode.onprocessorerror=h;const g=this._nativeAudioWorkletNode.onprocessorerror;this._onprocessorerror=g!==null&&g===h?f:g}get parameters(){return this._parameters===null?this._nativeAudioWorkletNode.parameters:this._parameters}get port(){return this._nativeAudioWorkletNode.port}};function Fe(e,t,n,r,o){if(typeof e.copyFromChannel=="function")t[n].byteLength===0&&(t[n]=new Float32Array(128)),e.copyFromChannel(t[n],r,o);else{const s=e.getChannelData(r);if(t[n].byteLength===0)t[n]=s.slice(o,o+128);else{const a=new Float32Array(s.buffer,o*Float32Array.BYTES_PER_ELEMENT,128);t[n].set(a)}}}const bn=(e,t,n,r,o)=>{typeof e.copyToChannel=="function"?t[n].byteLength!==0&&e.copyToChannel(t[n],r,o):t[n].byteLength!==0&&e.getChannelData(r).set(t[n],o)},je=(e,t)=>{const n=[];for(let r=0;r{const n=K(dt,e),r=X(t);return K(n,r)},Io=async(e,t,n,r,o,s,a)=>{const c=t===null?Math.ceil(e.context.length/128)*128:t.length,i=r.channelCount*r.numberOfInputs,u=o.reduce((h,g)=>h+g,0),d=u===0?null:n.createBuffer(u,c,n.sampleRate);if(s===void 0)throw new Error("Missing the processor constructor.");const l=z(e),p=await Ro(n,e),m=je(r.numberOfInputs,r.channelCount),w=je(r.numberOfOutputs,o),f=Array.from(e.parameters.keys()).reduce((h,g)=>({...h,[g]:new Float32Array(128)}),{});for(let h=0;h0&&t!==null)for(let g=0;g{Fe(t,f,g,i+_,h)});for(let g=0;gl.activeInputs[T].size===0?[]:A),_=a(h/n.sampleRate,n.sampleRate,()=>p.process(g,w,f));if(d!==null)for(let A=0,T=0;A(h,g,_)=>{const A=new WeakMap;let T=null;const v=async(E,y)=>{let C=d(E),N=null;const I=_t(C,y),M=Array.isArray(g.outputChannelCount)?g.outputChannelCount:Array.from(g.outputChannelCount);if(l===null){const x=M.reduce((R,P)=>R+P,0),k=o(y,{channelCount:Math.max(1,x),channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:Math.max(1,x)}),B=[];for(let R=0;R{const W=new p(S,Math.ceil(E.context.length/128)*128,y.sampleRate),G=[],fe=[];for(let j=0;j{const H=s(W,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:j.value});return await m(W,j,H.offset),H})),pe=r(W,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:Math.max(1,P+D)});for(let j=0;jw(E,W,j))),f(W)})(),y,g,M,_,u)}const x=await T,k=n(y,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),[B,U,R]=N;x!==null&&(k.buffer=x,k.start(0)),k.connect(B);for(let P=0,D=0;P(n,r)=>{const o=t.get(n);if(o!==void 0)return o;const s=e.get(n);if(s!==void 0)return s;try{const a=r();return a instanceof Promise?(e.set(n,a),a.catch(()=>!1).then(c=>(e.delete(n),t.set(n,c),c))):(t.set(n,a),a)}catch{return t.set(n,!1),!1}},xo=e=>(t,n,r)=>e(n,t,r),Po=e=>(t,n,r=0,o=0)=>{const s=t[r];if(s===void 0)throw e();return Ve(n)?s.connect(n,0,o):s.connect(n,0)},Uo={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",offset:1},Bo=(e,t,n,r,o,s,a)=>class extends e{constructor(i,u){const d=o(i),l={...Uo,...u},p=r(d,l),m=s(d),w=m?n():null;super(i,!1,p,w),this._constantSourceNodeRenderer=w,this._nativeConstantSourceNode=p,this._offset=t(this,m,p.offset,Ye,Ce),this._onended=null}get offset(){return this._offset}get onended(){return this._onended}set onended(i){const u=typeof i=="function"?a(this,i):null;this._nativeConstantSourceNode.onended=u;const d=this._nativeConstantSourceNode.onended;this._onended=d!==null&&d===u?i:d}start(i=0){if(this._nativeConstantSourceNode.start(i),this._constantSourceNodeRenderer!==null&&(this._constantSourceNodeRenderer.start=i),this.context.state!=="closed"){ye(this);const u=()=>{this._nativeConstantSourceNode.removeEventListener("ended",u),oe(this)&&He(this)};this._nativeConstantSourceNode.addEventListener("ended",u)}}stop(i=0){this._nativeConstantSourceNode.stop(i),this._constantSourceNodeRenderer!==null&&(this._constantSourceNodeRenderer.stop=i)}},Do=(e,t,n,r,o)=>()=>{const s=new WeakMap;let a=null,c=null;const i=async(u,d)=>{let l=n(u);const p=_t(l,d);if(!p){const m={channelCount:l.channelCount,channelCountMode:l.channelCountMode,channelInterpretation:l.channelInterpretation,offset:l.offset.value};l=t(d,m),a!==null&&l.start(a),c!==null&&l.stop(c)}return s.set(d,l),p?await e(d,u.offset,l.offset):await r(d,u.offset,l.offset),await o(u,d,l),l};return{set start(u){a=u},set stop(u){c=u},render(u,d){const l=s.get(d);return l!==void 0?Promise.resolve(l):i(u,d)}}},Wo=e=>t=>(e[0]=t,e[0]),Vo=(e,t,n,r,o,s,a,c)=>(i,u)=>{const d=t.get(i);if(d===void 0)throw new Error("Missing the expected cycle count.");const l=s(i.context),p=c(l);if(d===u){if(t.delete(i),!p&&a(i)){const m=r(i),{outputs:w}=n(i);for(const f of w)if(Me(f)){const h=r(f[0]);e(m,h,f[1],f[2])}else{const h=o(f[0]);m.connect(h,f[1])}}}else t.set(i,d-u)},Fo=e=>(t,n,r,o)=>e(t[o],s=>s[0]===n&&s[1]===r),jo=e=>(t,n)=>{e(t).delete(n)},$o=e=>"delayTime"in e,Go=(e,t,n)=>function r(o,s){const a=We(s)?s:n(e,s);if($o(a))return[];if(o[0]===a)return[o];if(o.includes(a))return[];const{outputs:c}=t(a);return Array.from(c).map(i=>r([...o,a],i[0])).reduce((i,u)=>i.concat(u),[])},xe=(e,t,n)=>{const r=t[n];if(r===void 0)throw e();return r},qo=e=>(t,n=void 0,r=void 0,o=0)=>n===void 0?t.forEach(s=>s.disconnect()):typeof n=="number"?xe(e,t,n).disconnect():Ve(n)?r===void 0?t.forEach(s=>s.disconnect(n)):o===void 0?xe(e,t,r).disconnect(n,0):xe(e,t,r).disconnect(n,0,o):r===void 0?t.forEach(s=>s.disconnect(n)):xe(e,t,r).disconnect(n,0),zo=e=>t=>new Promise((n,r)=>{if(e===null){r(new SyntaxError);return}const o=e.document.head;if(o===null)r(new SyntaxError);else{const s=e.document.createElement("script"),a=new Blob([t],{type:"application/javascript"}),c=URL.createObjectURL(a),i=e.onerror,u=()=>{e.onerror=i,URL.revokeObjectURL(c)};e.onerror=(d,l,p,m,w)=>{if(l===c||l===e.location.href&&p===1&&m===1)return u(),r(w),!1;if(i!==null)return i(d,l,p,m,w)},s.onerror=()=>{u(),r(new SyntaxError)},s.onload=()=>{u(),n()},s.src=c,s.type="module",o.appendChild(s)}}),Ho=e=>class{constructor(n){this._nativeEventTarget=n,this._listeners=new WeakMap}addEventListener(n,r,o){if(r!==null){let s=this._listeners.get(r);s===void 0&&(s=e(this,r),typeof r=="function"&&this._listeners.set(r,s)),this._nativeEventTarget.addEventListener(n,s,o)}}dispatchEvent(n){return this._nativeEventTarget.dispatchEvent(n)}removeEventListener(n,r,o){const s=r===null?void 0:this._listeners.get(r);this._nativeEventTarget.removeEventListener(n,s===void 0?null:s,o)}},Yo=e=>(t,n,r)=>{Object.defineProperties(e,{currentFrame:{configurable:!0,get(){return Math.round(t*n)}},currentTime:{configurable:!0,get(){return t}}});try{return r()}finally{e!==null&&(delete e.currentFrame,delete e.currentTime)}},Xo=e=>async t=>{try{const n=await fetch(t);if(n.ok)return[await n.text(),n.url]}catch{}throw e()},Zo=(e,t)=>n=>t(e,n),Ko=e=>t=>{const n=e(t);if(n.renderer===null)throw new Error("Missing the renderer of the given AudioNode in the audio graph.");return n.renderer},Jo=e=>t=>{var n;return(n=e.get(t))!==null&&n!==void 0?n:0},Qo=e=>t=>{const n=e(t);if(n.renderer===null)throw new Error("Missing the renderer of the given AudioParam in the audio graph.");return n.renderer},es=e=>t=>e.get(t),Z=()=>new DOMException("","InvalidStateError"),ts=e=>t=>{const n=e.get(t);if(n===void 0)throw Z();return n},ns=(e,t)=>n=>{let r=e.get(n);if(r!==void 0)return r;if(t===null)throw new Error("Missing the native OfflineAudioContext constructor.");return r=new t(1,1,44100),e.set(n,r),r},rs=e=>t=>{const n=e.get(t);if(n===void 0)throw new Error("The context has no set of AudioWorkletNodes.");return n},os=()=>new DOMException("","InvalidAccessError"),ss=(e,t,n,r,o,s)=>a=>(c,i)=>{const u=e.get(c);if(u===void 0){if(!a&&s(c)){const d=r(c),{outputs:l}=n(c);for(const p of l)if(Me(p)){const m=r(p[0]);t(d,m,p[1],p[2])}else{const m=o(p[0]);d.disconnect(m,p[1])}}e.set(c,i)}else e.set(c,u+i)},as=e=>t=>e!==null&&t instanceof e,is=e=>t=>e!==null&&typeof e.AudioNode=="function"&&t instanceof e.AudioNode,cs=e=>t=>e!==null&&typeof e.AudioParam=="function"&&t instanceof e.AudioParam,us=e=>t=>e!==null&&t instanceof e,ls=e=>e!==null&&e.isSecureContext,ds=(e,t,n,r)=>class extends e{constructor(s,a){const c=n(s),i=t(c,a);if(r(c))throw new TypeError;super(s,!0,i,null),this._nativeMediaStreamAudioSourceNode=i}get mediaStream(){return this._nativeMediaStreamAudioSourceNode.mediaStream}},fs=(e,t,n,r,o)=>class extends r{constructor(a={}){if(o===null)throw new Error("Missing the native AudioContext constructor.");let c;try{c=new o(a)}catch(d){throw d.code===12&&d.message==="sampleRate is not in range"?t():d}if(c===null)throw n();if(!ho(a.latencyHint))throw new TypeError(`The provided value '${a.latencyHint}' is not a valid enum value of type AudioContextLatencyCategory.`);if(a.sampleRate!==void 0&&c.sampleRate!==a.sampleRate)throw t();super(c,2);const{latencyHint:i}=a,{sampleRate:u}=c;if(this._baseLatency=typeof c.baseLatency=="number"?c.baseLatency:i==="balanced"?512/u:i==="interactive"||i===void 0?256/u:i==="playback"?1024/u:Math.max(2,Math.min(128,Math.round(i*u/128)))*128/u,this._nativeAudioContext=c,o.name==="webkitAudioContext"?(this._nativeGainNode=c.createGain(),this._nativeOscillatorNode=c.createOscillator(),this._nativeGainNode.gain.value=1e-37,this._nativeOscillatorNode.connect(this._nativeGainNode).connect(c.destination),this._nativeOscillatorNode.start()):(this._nativeGainNode=null,this._nativeOscillatorNode=null),this._state=null,c.state==="running"){this._state="suspended";const d=()=>{this._state==="suspended"&&(this._state=null),c.removeEventListener("statechange",d)};c.addEventListener("statechange",d)}}get baseLatency(){return this._baseLatency}get state(){return this._state!==null?this._state:this._nativeAudioContext.state}close(){return this.state==="closed"?this._nativeAudioContext.close().then(()=>{throw e()}):(this._state==="suspended"&&(this._state=null),this._nativeAudioContext.close().then(()=>{this._nativeGainNode!==null&&this._nativeOscillatorNode!==null&&(this._nativeOscillatorNode.stop(),this._nativeGainNode.disconnect(),this._nativeOscillatorNode.disconnect()),fo(this)}))}resume(){return this._state==="suspended"?new Promise((a,c)=>{const i=()=>{this._nativeAudioContext.removeEventListener("statechange",i),this._nativeAudioContext.state==="running"?a():this.resume().then(a,c)};this._nativeAudioContext.addEventListener("statechange",i)}):this._nativeAudioContext.resume().catch(a=>{throw a===void 0||a.code===15?e():a})}suspend(){return this._nativeAudioContext.suspend().catch(a=>{throw a===void 0?e():a})}},hs=(e,t,n,r,o,s)=>class extends n{constructor(c,i){super(c),this._nativeContext=c,fn.set(this,c),r(c)&&o.set(c,new Set),this._destination=new e(this,i),this._listener=t(this,c),this._onstatechange=null}get currentTime(){return this._nativeContext.currentTime}get destination(){return this._destination}get listener(){return this._listener}get onstatechange(){return this._onstatechange}set onstatechange(c){const i=typeof c=="function"?s(this,c):null;this._nativeContext.onstatechange=i;const u=this._nativeContext.onstatechange;this._onstatechange=u!==null&&u===i?c:u}get sampleRate(){return this._nativeContext.sampleRate}get state(){return this._nativeContext.state}},Kt=e=>{const t=new Uint32Array([1179011410,40,1163280727,544501094,16,131073,44100,176400,1048580,1635017060,4,0]);try{const n=e.decodeAudioData(t.buffer,()=>{});return n===void 0?!1:(n.catch(()=>{}),!0)}catch{}return!1},ps=(e,t)=>(n,r,o)=>{const s=new Set;return n.connect=(a=>(c,i=0,u=0)=>{const d=s.size===0;if(t(c))return a.call(n,c,i,u),e(s,[c,i,u],l=>l[0]===c&&l[1]===i&&l[2]===u,!0),d&&r(),c;a.call(n,c,i),e(s,[c,i],l=>l[0]===c&&l[1]===i,!0),d&&r()})(n.connect),n.disconnect=(a=>(c,i,u)=>{const d=s.size>0;if(c===void 0)a.apply(n),s.clear();else if(typeof c=="number"){a.call(n,c);for(const p of s)p[1]===c&&s.delete(p)}else{t(c)?a.call(n,c,i,u):a.call(n,c,i);for(const p of s)p[0]===c&&(i===void 0||p[1]===i)&&(u===void 0||p[2]===u)&&s.delete(p)}const l=s.size===0;d&&l&&o()})(n.disconnect),n},ie=(e,t,n)=>{const r=t[n];r!==void 0&&r!==e[n]&&(e[n]=r)},Ne=(e,t)=>{ie(e,t,"channelCount"),ie(e,t,"channelCountMode"),ie(e,t,"channelInterpretation")},ms=e=>e===null?null:e.hasOwnProperty("AudioBuffer")?e.AudioBuffer:null,At=(e,t,n)=>{const r=t[n];r!==void 0&&r!==e[n].value&&(e[n].value=r)},gs=e=>{e.start=(t=>{let n=!1;return(r=0,o=0,s)=>{if(n)throw Z();t.call(e,r,o,s),n=!0}})(e.start)},Cn=e=>{e.start=(t=>(n=0,r=0,o)=>{if(typeof o=="number"&&o<0||r<0||n<0)throw new RangeError("The parameters can't be negative.");t.call(e,n,r,o)})(e.start)},Tn=e=>{e.stop=(t=>(n=0)=>{if(n<0)throw new RangeError("The parameter can't be negative.");t.call(e,n)})(e.stop)},ws=(e,t,n,r,o,s,a,c,i,u,d)=>(l,p)=>{const m=l.createBufferSource();return Ne(m,p),At(m,p,"playbackRate"),ie(m,p,"buffer"),ie(m,p,"loop"),ie(m,p,"loopEnd"),ie(m,p,"loopStart"),t(n,()=>n(l))||gs(m),t(r,()=>r(l))||i(m),t(o,()=>o(l))||u(m,l),t(s,()=>s(l))||Cn(m),t(a,()=>a(l))||d(m,l),t(c,()=>c(l))||Tn(m),e(l,m),m},vs=e=>e===null?null:e.hasOwnProperty("AudioContext")?e.AudioContext:e.hasOwnProperty("webkitAudioContext")?e.webkitAudioContext:null,_s=(e,t)=>(n,r,o)=>{const s=n.destination;if(s.channelCount!==r)try{s.channelCount=r}catch{}o&&s.channelCountMode!=="explicit"&&(s.channelCountMode="explicit"),s.maxChannelCount===0&&Object.defineProperty(s,"maxChannelCount",{value:r});const a=e(n,{channelCount:r,channelCountMode:s.channelCountMode,channelInterpretation:s.channelInterpretation,gain:1});return t(a,"channelCount",c=>()=>c.call(a),c=>i=>{c.call(a,i);try{s.channelCount=i}catch(u){if(i>s.maxChannelCount)throw u}}),t(a,"channelCountMode",c=>()=>c.call(a),c=>i=>{c.call(a,i),s.channelCountMode=i}),t(a,"channelInterpretation",c=>()=>c.call(a),c=>i=>{c.call(a,i),s.channelInterpretation=i}),Object.defineProperty(a,"maxChannelCount",{get:()=>s.maxChannelCount}),a.connect(s),a},ys=e=>e===null?null:e.hasOwnProperty("AudioWorkletNode")?e.AudioWorkletNode:null,Es=e=>{const{port1:t}=new MessageChannel;try{t.postMessage(e)}finally{t.close()}},As=(e,t,n,r,o)=>(s,a,c,i,u,d)=>{if(c!==null)try{const l=new c(s,i,d),p=new Map;let m=null;if(Object.defineProperties(l,{channelCount:{get:()=>d.channelCount,set:()=>{throw e()}},channelCountMode:{get:()=>"explicit",set:()=>{throw e()}},onprocessorerror:{get:()=>m,set:w=>{typeof m=="function"&&l.removeEventListener("processorerror",m),m=typeof w=="function"?w:null,typeof m=="function"&&l.addEventListener("processorerror",m)}}}),l.addEventListener=(w=>(...f)=>{if(f[0]==="processorerror"){const h=typeof f[1]=="function"?f[1]:typeof f[1]=="object"&&f[1]!==null&&typeof f[1].handleEvent=="function"?f[1].handleEvent:null;if(h!==null){const g=p.get(f[1]);g!==void 0?f[1]=g:(f[1]=_=>{_.type==="error"?(Object.defineProperties(_,{type:{value:"processorerror"}}),h(_)):h(new ErrorEvent(f[0],{..._}))},p.set(h,f[1]))}}return w.call(l,"error",f[1],f[2]),w.call(l,...f)})(l.addEventListener),l.removeEventListener=(w=>(...f)=>{if(f[0]==="processorerror"){const h=p.get(f[1]);h!==void 0&&(p.delete(f[1]),f[1]=h)}return w.call(l,"error",f[1],f[2]),w.call(l,f[0],f[1],f[2])})(l.removeEventListener),d.numberOfOutputs!==0){const w=n(s,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});return l.connect(w).connect(s.destination),o(l,()=>w.disconnect(),()=>w.connect(s.destination))}return l}catch(l){throw l.code===11?r():l}if(u===void 0)throw r();return Es(d),t(s,a,u,d)},bs=(e,t)=>e===null?512:Math.max(512,Math.min(16384,Math.pow(2,Math.round(Math.log2(e*t))))),Cs=e=>new Promise((t,n)=>{const{port1:r,port2:o}=new MessageChannel;r.onmessage=({data:s})=>{r.close(),o.close(),t(s)},r.onmessageerror=({data:s})=>{r.close(),o.close(),n(s)},o.postMessage(e)}),Ts=async(e,t)=>{const n=await Cs(t);return new e(n)},Ms=(e,t,n,r)=>{let o=dt.get(e);o===void 0&&(o=new WeakMap,dt.set(e,o));const s=Ts(n,r);return o.set(t,s),s},Ns=(e,t,n,r,o,s,a,c,i,u,d,l,p)=>(m,w,f,h)=>{if(h.numberOfInputs===0&&h.numberOfOutputs===0)throw i();const g=Array.isArray(h.outputChannelCount)?h.outputChannelCount:Array.from(h.outputChannelCount);if(g.some(b=>b<1))throw i();if(g.length!==h.numberOfOutputs)throw t();if(h.channelCountMode!=="explicit")throw i();const _=h.channelCount*h.numberOfInputs,A=g.reduce((b,O)=>b+O,0),T=f.parameterDescriptors===void 0?0:f.parameterDescriptors.length;if(_+T>6||A>6)throw i();const v=new MessageChannel,E=[],y=[];for(let b=0;bb===void 0?0:b},maxValue:{get:()=>O===void 0?Ye:O},minValue:{get:()=>q===void 0?Ce:q}}),C.push(V)}const N=r(m,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:Math.max(1,_+T)}),I=bs(w,m.sampleRate),M=c(m,I,_+T,Math.max(1,A)),x=o(m,{channelCount:Math.max(1,A),channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:Math.max(1,A)}),k=[];for(let b=0;b{const q=C[O];return q.connect(N,0,_+O),q.start(0),[b,q.offset]}));N.connect(M);let U=h.channelInterpretation,R=null;const P=h.numberOfOutputs===0?[M]:k,D={get bufferSize(){return I},get channelCount(){return h.channelCount},set channelCount(b){throw n()},get channelCountMode(){return h.channelCountMode},set channelCountMode(b){throw n()},get channelInterpretation(){return U},set channelInterpretation(b){for(const O of E)O.channelInterpretation=b;U=b},get context(){return M.context},get inputs(){return E},get numberOfInputs(){return h.numberOfInputs},get numberOfOutputs(){return h.numberOfOutputs},get onprocessorerror(){return R},set onprocessorerror(b){typeof R=="function"&&D.removeEventListener("processorerror",R),R=typeof b=="function"?b:null,typeof R=="function"&&D.addEventListener("processorerror",R)},get parameters(){return B},get port(){return v.port2},addEventListener(...b){return M.addEventListener(b[0],b[1],b[2])},connect:e.bind(null,P),disconnect:u.bind(null,P),dispatchEvent(...b){return M.dispatchEvent(b[0])},removeEventListener(...b){return M.removeEventListener(b[0],b[1],b[2])}},S=new Map;v.port1.addEventListener=(b=>(...O)=>{if(O[0]==="message"){const q=typeof O[1]=="function"?O[1]:typeof O[1]=="object"&&O[1]!==null&&typeof O[1].handleEvent=="function"?O[1].handleEvent:null;if(q!==null){const F=S.get(O[1]);F!==void 0?O[1]=F:(O[1]=V=>{d(m.currentTime,m.sampleRate,()=>q(V))},S.set(q,O[1]))}}return b.call(v.port1,O[0],O[1],O[2])})(v.port1.addEventListener),v.port1.removeEventListener=(b=>(...O)=>{if(O[0]==="message"){const q=S.get(O[1]);q!==void 0&&(S.delete(O[1]),O[1]=q)}return b.call(v.port1,O[0],O[1],O[2])})(v.port1.removeEventListener);let L=null;Object.defineProperty(v.port1,"onmessage",{get:()=>L,set:b=>{typeof L=="function"&&v.port1.removeEventListener("message",L),L=typeof b=="function"?b:null,typeof L=="function"&&(v.port1.addEventListener("message",L),v.port1.start())}}),f.prototype.port=v.port1;let W=null;Ms(m,D,f,h).then(b=>W=b);const fe=je(h.numberOfInputs,h.channelCount),he=je(h.numberOfOutputs,g),pe=f.parameterDescriptors===void 0?[]:f.parameterDescriptors.reduce((b,{name:O})=>({...b,[O]:new Float32Array(128)}),{});let j=!0;const H=()=>{h.numberOfOutputs>0&&M.disconnect(x);for(let b=0,O=0;b{if(W!==null){const q=l(D);for(let F=0;F{Fe(b,pe,V,_+$,F)});for(let V=0;V{if(q[te].size>0)return Ie.set(te,I/128),Y;const rt=Ie.get(te);return rt===void 0?[]:(Y.every(Zn=>Zn.every(Kn=>Kn===0))&&(rt===1?Ie.delete(te):Ie.set(te,rt-1)),Y)});j=d(m.currentTime+F/m.sampleRate,m.sampleRate,()=>W.process(V,he,pe));for(let Y=0,te=0;YM.connect(nt).connect(m.destination),kt=()=>{M.disconnect(nt),nt.disconnect()},Yn=()=>{if(j){kt(),h.numberOfOutputs>0&&M.connect(x);for(let b=0,O=0;b{j&&(It(),H()),tt=!1};return It(),p(D,Yn,Xn)},Ss=(e,t)=>(n,r)=>{const o=n.createChannelMerger(r.numberOfInputs);return e!==null&&e.name==="webkitAudioContext"&&t(n,o),Ne(o,r),o},Os=e=>{const t=e.numberOfOutputs;Object.defineProperty(e,"channelCount",{get:()=>t,set:n=>{if(n!==t)throw Z()}}),Object.defineProperty(e,"channelCountMode",{get:()=>"explicit",set:n=>{if(n!=="explicit")throw Z()}}),Object.defineProperty(e,"channelInterpretation",{get:()=>"discrete",set:n=>{if(n!=="discrete")throw Z()}})},Mn=(e,t)=>{const n=e.createChannelSplitter(t.numberOfOutputs);return Ne(n,t),Os(n),n},Rs=(e,t,n,r,o)=>(s,a)=>{if(s.createConstantSource===void 0)return n(s,a);const c=s.createConstantSource();return Ne(c,a),At(c,a,"offset"),t(r,()=>r(s))||Cn(c),t(o,()=>o(s))||Tn(c),e(s,c),c},Nn=(e,t)=>(e.connect=t.connect.bind(t),e.disconnect=t.disconnect.bind(t),e),Is=(e,t,n,r)=>(o,{offset:s,...a})=>{const c=o.createBuffer(1,2,44100),i=t(o,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),u=n(o,{...a,gain:s}),d=c.getChannelData(0);d[0]=1,d[1]=1,i.buffer=c,i.loop=!0;const l={get bufferSize(){},get channelCount(){return u.channelCount},set channelCount(w){u.channelCount=w},get channelCountMode(){return u.channelCountMode},set channelCountMode(w){u.channelCountMode=w},get channelInterpretation(){return u.channelInterpretation},set channelInterpretation(w){u.channelInterpretation=w},get context(){return u.context},get inputs(){return[]},get numberOfInputs(){return i.numberOfInputs},get numberOfOutputs(){return u.numberOfOutputs},get offset(){return u.gain},get onended(){return i.onended},set onended(w){i.onended=w},addEventListener(...w){return i.addEventListener(w[0],w[1],w[2])},dispatchEvent(...w){return i.dispatchEvent(w[0])},removeEventListener(...w){return i.removeEventListener(w[0],w[1],w[2])},start(w=0){i.start.call(i,w)},stop(w=0){i.stop.call(i,w)}},p=()=>i.connect(u),m=()=>i.disconnect(u);return e(o,i),r(Nn(l,u),p,m)},se=(e,t)=>{const n=e.createGain();return Ne(n,t),At(n,t,"gain"),n},ks=(e,{mediaStream:t})=>{const n=t.getAudioTracks();n.sort((s,a)=>s.ida.id?1:0);const r=n.slice(0,1),o=e.createMediaStreamSource(new MediaStream(r));return Object.defineProperty(o,"mediaStream",{value:t}),o},Ls=e=>e===null?null:e.hasOwnProperty("OfflineAudioContext")?e.OfflineAudioContext:e.hasOwnProperty("webkitOfflineAudioContext")?e.webkitOfflineAudioContext:null,bt=(e,t,n,r)=>e.createScriptProcessor(t,n,r),de=()=>new DOMException("","NotSupportedError"),xs=(e,t)=>(n,r,o)=>(e(r).replay(o),t(r,n,o)),Ps=(e,t,n)=>async(r,o,s)=>{const a=e(r);await Promise.all(a.activeInputs.map((c,i)=>Array.from(c).map(async([u,d])=>{const p=await t(u).render(u,o),m=r.context.destination;!n(u)&&(r!==m||!n(r))&&p.connect(s,d,i)})).reduce((c,i)=>[...c,...i],[]))},Us=(e,t,n)=>async(r,o,s)=>{const a=t(r);await Promise.all(Array.from(a.activeInputs).map(async([c,i])=>{const d=await e(c).render(c,o);n(c)||d.connect(s,i)}))},Bs=(e,t,n,r)=>o=>e(Kt,()=>Kt(o))?Promise.resolve(e(r,r)).then(s=>{if(!s){const a=n(o,512,0,1);o.oncomplete=()=>{a.onaudioprocess=null,a.disconnect()},a.onaudioprocess=()=>o.currentTime,a.connect(o.destination)}return o.startRendering()}):new Promise(s=>{const a=t(o,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});o.oncomplete=c=>{a.disconnect(),s(c.renderedBuffer)},a.connect(o.destination),o.startRendering()}),Ds=e=>(t,n)=>{e.set(t,n)},Ws=e=>()=>{if(e===null)return!1;try{new e({length:1,sampleRate:44100})}catch{return!1}return!0},Vs=(e,t)=>async()=>{if(e===null)return!0;if(t===null)return!1;const n=new Blob(['class A extends AudioWorkletProcessor{process(i){this.port.postMessage(i,[i[0][0].buffer])}}registerProcessor("a",A)'],{type:"application/javascript; charset=utf-8"}),r=new t(1,128,44100),o=URL.createObjectURL(n);let s=!1,a=!1;try{await r.audioWorklet.addModule(o);const c=new e(r,"a",{numberOfOutputs:0}),i=r.createOscillator();c.port.onmessage=()=>s=!0,c.onprocessorerror=()=>a=!0,i.connect(c),i.start(0),await r.startRendering()}catch{}finally{URL.revokeObjectURL(o)}return s&&!a},Fs=(e,t)=>()=>{if(t===null)return Promise.resolve(!1);const n=new t(1,1,44100),r=e(n,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});return new Promise(o=>{n.oncomplete=()=>{r.disconnect(),o(n.currentTime!==0)},n.startRendering()})},js=()=>new DOMException("","UnknownError"),$s=()=>typeof window>"u"?null:window,Gs=(e,t)=>n=>{n.copyFromChannel=(r,o,s=0)=>{const a=e(s),c=e(o);if(c>=n.numberOfChannels)throw t();const i=n.length,u=n.getChannelData(c),d=r.length;for(let l=a<0?-a:0;l+a{const a=e(s),c=e(o);if(c>=n.numberOfChannels)throw t();const i=n.length,u=n.getChannelData(c),d=r.length;for(let l=a<0?-a:0;l+at=>{t.copyFromChannel=(n=>(r,o,s=0)=>{const a=e(s),c=e(o);if(a(r,o,s=0)=>{const a=e(s),c=e(o);if(a(t,n)=>{const r=n.createBuffer(1,1,44100);t.buffer===null&&(t.buffer=r),e(t,"buffer",o=>()=>{const s=o.call(t);return s===r?null:s},o=>s=>o.call(t,s===null?r:s))},Hs=(e,t)=>(n,r)=>{r.channelCount=1,r.channelCountMode="explicit",Object.defineProperty(r,"channelCount",{get:()=>1,set:()=>{throw e()}}),Object.defineProperty(r,"channelCountMode",{get:()=>"explicit",set:()=>{throw e()}});const o=n.createBufferSource();t(r,()=>{const c=r.numberOfInputs;for(let i=0;io.disconnect(r))},Ys=(e,t,n)=>e.copyFromChannel===void 0?e.getChannelData(n)[0]:(e.copyFromChannel(t,n),t[0]),Ct=(e,t,n,r)=>{let o=e;for(;!o.hasOwnProperty(t);)o=Object.getPrototypeOf(o);const{get:s,set:a}=Object.getOwnPropertyDescriptor(o,t);Object.defineProperty(e,t,{get:n(s),set:r(a)})},Xs=e=>({...e,outputChannelCount:e.outputChannelCount!==void 0?e.outputChannelCount:e.numberOfInputs===1&&e.numberOfOutputs===1?[e.channelCount]:Array.from({length:e.numberOfOutputs},()=>1)}),Sn=(e,t,n)=>{try{e.setValueAtTime(t,n)}catch(r){if(r.code!==9)throw r;Sn(e,t,n+1e-7)}},Zs=e=>{const t=e.createBufferSource();t.start();try{t.start()}catch{return!0}return!1},Ks=e=>{const t=e.createBufferSource(),n=e.createBuffer(1,1,44100);t.buffer=n;try{t.start(0,1)}catch{return!1}return!0},Js=e=>{const t=e.createBufferSource();t.start();try{t.stop()}catch{return!1}return!0},On=e=>{const t=e.createOscillator();try{t.start(-1)}catch(n){return n instanceof RangeError}return!1},Qs=e=>{const t=e.createBuffer(1,1,44100),n=e.createBufferSource();n.buffer=t,n.start(),n.stop();try{return n.stop(),!0}catch{return!1}},Rn=e=>{const t=e.createOscillator();try{t.stop(-1)}catch(n){return n instanceof RangeError}return!1},ea=e=>{const{port1:t,port2:n}=new MessageChannel;try{t.postMessage(e)}finally{t.close(),n.close()}},ta=e=>{e.start=(t=>(n=0,r=0,o)=>{const s=e.buffer,a=s===null?r:Math.min(s.duration,r);s!==null&&a>s.duration-.5/e.context.sampleRate?t.call(e,n,0,0):t.call(e,n,a,o)})(e.start)},na=(e,t)=>{const n=t.createGain();e.connect(n);const r=(o=>()=>{o.call(e,n),e.removeEventListener("ended",r)})(e.disconnect);e.addEventListener("ended",r),Nn(e,n),e.stop=(o=>{let s=!1;return(a=0)=>{if(s)try{o.call(e,a)}catch{n.gain.setValueAtTime(0,a)}else o.call(e,a),s=!0}})(e.stop)},Se=(e,t)=>n=>{const r={value:e};return Object.defineProperties(n,{currentTarget:r,target:r}),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,ve),J):void 0,Ta=ds(Oe,ks,ae,Q),Vn=rs(Bn),Ma=Jr(Vn),Fn=Po(ue),Na=jo(Vn),jn=qo(ue),$n=new WeakMap,Sa=Zo($n,K),Oa=Ns(Fn,ue,Z,St,Mn,Re,se,bt,de,jn,Ot,Sa,Qe),Ra=As(Z,Oa,se,de,Qe),Ia=ko(Mt,Fn,Ke,St,Mn,Re,se,Na,jn,Ot,X,Ae,ve,Nt,Xe,Ea),ka=es(Wn),La=Ds($n),en=Dn?Oo(Ma,Oe,Je,Ia,Ra,z,ka,ae,Q,Ae,Xs,La,ea,Se):void 0,xa=fs(Z,de,js,ba,Ze),Gn="Missing AudioWorklet support. Maybe this is not running in a secure context.",Pa=async(e,t,n,r,o)=>{const{encoderId:s,port:a}=await nn(o,t.sampleRate);if(en===void 0)throw new Error(Gn);const c=new ma(t,{buffer:e}),i=new Ta(t,{mediaStream:r}),u=xr(en,t,{channelCount:n});return{audioBufferSourceNode:c,encoderId:s,mediaStreamAudioSourceNode:i,port:a,recorderAudioWorkletNode:u}},Ua=(e,t,n,r)=>(o,s,a)=>{var c;const i=(c=s.getAudioTracks()[0])===null||c===void 0?void 0:c.getSettings().sampleRate,u=new xa({latencyHint:"playback",sampleRate:i}),d=Math.max(1024,Math.ceil(u.baseLatency*u.sampleRate)),l=new ha({length:d,sampleRate:u.sampleRate}),p=[],m=Lr(C=>{if(Qt===void 0)throw new Error(Gn);return Qt(u,C)});let w=null,f=null,h=null,g=null,_=!0;const A=C=>{o.dispatchEvent(e("dataavailable",{data:new Blob(C,{type:a})}))},T=async(C,N)=>{const I=await Ue(C,N);h===null?p.push(...I):(A(I),g=T(C,N))},v=()=>(_=!0,u.resume()),E=()=>{h!==null&&(w!==null&&(s.removeEventListener("addtrack",w),s.removeEventListener("removetrack",w)),f!==null&&clearTimeout(f),h.then(async({constantSourceNode:C,encoderId:N,mediaStreamAudioSourceNode:I,recorderAudioWorkletNode:M})=>{g!==null&&(g.catch(()=>{}),g=null),await M.stop(),I.disconnect(M),C.stop();const x=await Ue(N,null);h===null&&await y(),A([...p,...x]),p.length=0,o.dispatchEvent(new Event("stop"))}),h=null)},y=()=>(_=!1,u.suspend());return y(),{get mimeType(){return a},get state(){return h===null?"inactive":_?"recording":"paused"},pause(){if(h===null)throw n();_&&(y(),o.dispatchEvent(new Event("pause")))},resume(){if(h===null)throw n();_||(v(),o.dispatchEvent(new Event("resume")))},start(C){var N;if(h!==null)throw n();if(s.getVideoTracks().length>0)throw r();o.dispatchEvent(new Event("start"));const I=s.getAudioTracks(),M=I.length===0?2:(N=I[0].getSettings().channelCount)!==null&&N!==void 0?N:2;h=Promise.all([v(),m.then(()=>Pa(l,u,M,s,a))]).then(async([,{audioBufferSourceNode:k,encoderId:B,mediaStreamAudioSourceNode:U,port:R,recorderAudioWorkletNode:P}])=>{U.connect(P),await new Promise(S=>{k.onended=S,k.connect(P),k.start(u.currentTime+d/u.sampleRate)}),k.disconnect(P);const D=new ya(u,{offset:0});return D.onended=()=>D.disconnect(),D.connect(u.destination),D.start(),await P.record(R),C!==void 0&&(g=T(B,C)),{constantSourceNode:D,encoderId:B,mediaStreamAudioSourceNode:U,recorderAudioWorkletNode:P}});const x=s.getTracks();w=()=>{E(),o.dispatchEvent(new ErrorEvent("error",{error:t()}))},s.addEventListener("addtrack",w),s.addEventListener("removetrack",w),f=setInterval(()=>{const k=s.getTracks();(k.length!==x.length||k.some((B,U)=>B!==x[U]))&&w!==null&&w()},1e3)},stop:E}};class st{constructor(t,n=0,r){if(n<0||r!==void 0&&r<0)throw new RangeError;const o=t.reduce((d,l)=>d+l.byteLength,0);if(n>o||r!==void 0&&n+r>o)throw new RangeError;const s=[],a=r===void 0?o-n:r,c=[];let i=0,u=n;for(const d of t)if(c.length===0)if(d.byteLength>u){i=d.byteLength-u;const l=i>a?a:i;s.push(new DataView(d,u,l)),c.push(d)}else u-=d.byteLength;else if(ia?d.byteLength-i+a:d.byteLength;s.push(new DataView(d,0,l)),c.push(d)}this._buffers=c,this._byteLength=a,this._byteOffset=u,this._dataViews=s,this._internalBuffer=new DataView(new ArrayBuffer(8))}get buffers(){return this._buffers}get byteLength(){return this._byteLength}get byteOffset(){return this._byteOffset}getFloat32(t,n){return this._internalBuffer.setUint8(0,this.getUint8(t+0)),this._internalBuffer.setUint8(1,this.getUint8(t+1)),this._internalBuffer.setUint8(2,this.getUint8(t+2)),this._internalBuffer.setUint8(3,this.getUint8(t+3)),this._internalBuffer.getFloat32(0,n)}getFloat64(t,n){return this._internalBuffer.setUint8(0,this.getUint8(t+0)),this._internalBuffer.setUint8(1,this.getUint8(t+1)),this._internalBuffer.setUint8(2,this.getUint8(t+2)),this._internalBuffer.setUint8(3,this.getUint8(t+3)),this._internalBuffer.setUint8(4,this.getUint8(t+4)),this._internalBuffer.setUint8(5,this.getUint8(t+5)),this._internalBuffer.setUint8(6,this.getUint8(t+6)),this._internalBuffer.setUint8(7,this.getUint8(t+7)),this._internalBuffer.getFloat64(0,n)}getInt16(t,n){return this._internalBuffer.setUint8(0,this.getUint8(t+0)),this._internalBuffer.setUint8(1,this.getUint8(t+1)),this._internalBuffer.getInt16(0,n)}getInt32(t,n){return this._internalBuffer.setUint8(0,this.getUint8(t+0)),this._internalBuffer.setUint8(1,this.getUint8(t+1)),this._internalBuffer.setUint8(2,this.getUint8(t+2)),this._internalBuffer.setUint8(3,this.getUint8(t+3)),this._internalBuffer.getInt32(0,n)}getInt8(t){const[n,r]=this._findDataViewWithOffset(t);return n.getInt8(t-r)}getUint16(t,n){return this._internalBuffer.setUint8(0,this.getUint8(t+0)),this._internalBuffer.setUint8(1,this.getUint8(t+1)),this._internalBuffer.getUint16(0,n)}getUint32(t,n){return this._internalBuffer.setUint8(0,this.getUint8(t+0)),this._internalBuffer.setUint8(1,this.getUint8(t+1)),this._internalBuffer.setUint8(2,this.getUint8(t+2)),this._internalBuffer.setUint8(3,this.getUint8(t+3)),this._internalBuffer.getUint32(0,n)}getUint8(t){const[n,r]=this._findDataViewWithOffset(t);return n.getUint8(t-r)}setFloat32(t,n,r){this._internalBuffer.setFloat32(0,n,r),this.setUint8(t,this._internalBuffer.getUint8(0)),this.setUint8(t+1,this._internalBuffer.getUint8(1)),this.setUint8(t+2,this._internalBuffer.getUint8(2)),this.setUint8(t+3,this._internalBuffer.getUint8(3))}setFloat64(t,n,r){this._internalBuffer.setFloat64(0,n,r),this.setUint8(t,this._internalBuffer.getUint8(0)),this.setUint8(t+1,this._internalBuffer.getUint8(1)),this.setUint8(t+2,this._internalBuffer.getUint8(2)),this.setUint8(t+3,this._internalBuffer.getUint8(3)),this.setUint8(t+4,this._internalBuffer.getUint8(4)),this.setUint8(t+5,this._internalBuffer.getUint8(5)),this.setUint8(t+6,this._internalBuffer.getUint8(6)),this.setUint8(t+7,this._internalBuffer.getUint8(7))}setInt16(t,n,r){this._internalBuffer.setInt16(0,n,r),this.setUint8(t,this._internalBuffer.getUint8(0)),this.setUint8(t+1,this._internalBuffer.getUint8(1))}setInt32(t,n,r){this._internalBuffer.setInt32(0,n,r),this.setUint8(t,this._internalBuffer.getUint8(0)),this.setUint8(t+1,this._internalBuffer.getUint8(1)),this.setUint8(t+2,this._internalBuffer.getUint8(2)),this.setUint8(t+3,this._internalBuffer.getUint8(3))}setInt8(t,n){const[r,o]=this._findDataViewWithOffset(t);r.setInt8(t-o,n)}setUint16(t,n,r){this._internalBuffer.setUint16(0,n,r),this.setUint8(t,this._internalBuffer.getUint8(0)),this.setUint8(t+1,this._internalBuffer.getUint8(1))}setUint32(t,n,r){this._internalBuffer.setUint32(0,n,r),this.setUint8(t,this._internalBuffer.getUint8(0)),this.setUint8(t+1,this._internalBuffer.getUint8(1)),this.setUint8(t+2,this._internalBuffer.getUint8(2)),this.setUint8(t+3,this._internalBuffer.getUint8(3))}setUint8(t,n){const[r,o]=this._findDataViewWithOffset(t);r.setUint8(t-o,n)}_findDataViewWithOffset(t){let n=0;for(const r of this._dataViews){const o=n+r.byteLength;if(t>=n&&t(s,a,c,i)=>{const u=c.getAudioTracks(),d=[],l=u.length===0?void 0:u[0].getSettings().channelCount,p=new a(c,{mimeType:"audio/webm;codecs=pcm"}),m=u.length===0?void 0:u[0].getSettings().sampleRate;let w=null,f=()=>{};const h=A=>{s.dispatchEvent(e("dataavailable",{data:new Blob(A,{type:i})}))},g=async(A,T)=>{const v=await Ue(A,T);p.state==="inactive"?d.push(...v):(h(v),w=g(A,T))},_=()=>{p.state!=="inactive"&&(w!==null&&(w.catch(()=>{}),w=null),f(),f=()=>{},p.stop())};return p.addEventListener("error",()=>{_(),s.dispatchEvent(new ErrorEvent("error",{error:t()}))}),p.addEventListener("start",()=>s.dispatchEvent(new Event("start"))),{get mimeType(){return i},get state(){return p.state},pause(){return p.pause()},resume(){return p.resume()},start(A){if(c.getVideoTracks().length>0)throw n();if(p.state==="inactive"){if(m===void 0)throw new Error("The sampleRate is not defined.");let T=!1,v=!1,E=0,y=nn(i,m);f=()=>{v=!0};const C=rn(p,"dataavailable")(({data:N})=>{E+=1,y=y.then(async({dataView:I=null,elementType:M=null,encoderId:x,port:k})=>{const B=await N.arrayBuffer();E-=1;const U=I===null?new st([B]):new st([...I.buffers,B],I.byteOffset);if(!T&&p.state==="recording"&&!v){const L=o(U,0);if(L===null)return{dataView:U,elementType:M,encoderId:x,port:k};const{value:W}=L;if(W!==172351395)return{dataView:I,elementType:M,encoderId:x,port:k};T=!0}const{currentElementType:R,offset:P,contents:D}=r(U,M,l),S=Pk.postMessage(L,L.map(({buffer:W})=>W))),E===0&&(p.state==="inactive"||v)&&(Ue(x,null).then(L=>{h([...d,...L]),d.length=0,s.dispatchEvent(new Event("stop"))}),k.postMessage([]),k.close(),C()),{dataView:S,elementType:R,encoderId:x,port:k}})});A!==void 0&&y.then(({encoderId:N})=>w=g(N,A))}p.start(100)},stop:_}},Da=()=>typeof window>"u"?null:window,qn=(e,t)=>{if(t>=e.byteLength)return null;const n=e.getUint8(t);if(n>127)return 1;if(n>63)return 2;if(n>31)return 3;if(n>15)return 4;if(n>7)return 5;if(n>3)return 6;if(n>1)return 7;if(n>0)return 8;const r=qn(e,t+1);return r===null?null:r+8},Wa=(e,t)=>n=>{const r={value:e};return Object.defineProperties(n,{currentTarget:r,target:r}),typeof t=="function"?t.call(e,n):t.handleEvent.call(e,n)},zn=[],et=Da(),Va=hr(et),Hn=ar(Va),Fa=Ua(Hn,wt,lr,$e),Rt=vr(qn),ja=gr(Rt),$a=wr(Rt),Ga=ir(ja,$a),qa=Ba(Hn,wt,$e,Ga,Rt),za=ur(et),Ha=mr(et),Ya=pr(wt,$e),ci=fr(Ya,$e,Fa,qa,zn,cr(za,Wa),Ha),ui=()=>dr(et),li=async e=>{zn.push(await sr(e))};export{ci as MediaRecorder,ui as isSupported,li as register}; +//# sourceMappingURL=module.2849491a.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/module.d8037460.js b/gradio-modified/gradio/templates/frontend/assets/module.d8037460.js new file mode 100644 index 0000000000000000000000000000000000000000..8d5e84b3696a9ef1b576f84f8a09e2600aaa9d02 --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/module.d8037460.js @@ -0,0 +1,2 @@ +import{c as i}from"./module.e2741a44.js";const c=i({characterize:({call:e})=>()=>e("characterize"),encode:({call:e})=>(r,n)=>e("encode",{recordingId:r,timeslice:n}),record:({call:e})=>async(r,n,o)=>{await e("record",{recordingId:r,sampleRate:n,typedArrays:o},o.map(({buffer:a})=>a))}}),u=e=>{const r=new Worker(e);return c(r)},l=`(()=>{var e={775:function(e,t,r){!function(e,t,r,n){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=o(t),a=o(r),i=o(n),u=function(e,t){return void 0===t?e:t.reduce((function(e,t){if("capitalize"===t){var r=e.charAt(0).toUpperCase(),n=e.slice(1);return"".concat(r).concat(n)}return"dashify"===t?a.default(e):"prependIndefiniteArticle"===t?"".concat(i.default(e)," ").concat(e):e}),e)},c=function(e){var t=e.name+e.modifiers.map((function(e){return"\\\\.".concat(e,"\\\\(\\\\)")})).join("");return new RegExp("\\\\$\\\\{".concat(t,"}"),"g")},l=function(e,t){for(var r=/\\\${([^.}]+)((\\.[^(]+\\(\\))*)}/g,n=[],o=r.exec(e);null!==o;){var a={modifiers:[],name:o[1]};if(void 0!==o[3])for(var i=/\\.[^(]+\\(\\)/g,l=i.exec(o[2]);null!==l;)a.modifiers.push(l[0].slice(1,-2)),l=i.exec(o[2]);n.push(a),o=r.exec(e)}var d=n.reduce((function(e,r){return e.map((function(e){return"string"==typeof e?e.split(c(r)).reduce((function(e,n,o){return 0===o?[n]:r.name in t?[].concat(s.default(e),[u(t[r.name],r.modifiers),n]):[].concat(s.default(e),[function(e){return u(e[r.name],r.modifiers)},n])}),[]):[e]})).reduce((function(e,t){return[].concat(s.default(e),s.default(t))}),[])}),[e]);return function(e){return d.reduce((function(t,r){return[].concat(s.default(t),"string"==typeof r?[r]:[r(e)])}),[]).join("")}},d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=void 0===e.code?void 0:l(e.code,t),n=void 0===e.message?void 0:l(e.message,t);function o(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0,s=void 0===o&&(t instanceof Error||void 0!==t.code&&"Exception"===t.code.slice(-9))?{cause:t,missingParameters:{}}:{cause:o,missingParameters:t},a=s.cause,i=s.missingParameters,u=void 0===n?new Error:new Error(n(i));return null!==a&&(u.cause=a),void 0!==r&&(u.code=r(i)),void 0!==e.status&&(u.status=e.status),u}return o};e.compile=d,Object.defineProperty(e,"__esModule",{value:!0})}(t,r(106),r(881),r(507))},881:e=>{"use strict";e.exports=(e,t)=>{if("string"!=typeof e)throw new TypeError("expected a string");return e.trim().replace(/([a-z])([A-Z])/g,"$1-$2").replace(/\\W/g,(e=>/[\xC0-\u017E]/.test(e)?e:"-")).replace(/^-+|-+$/g,"").replace(/-{2,}/g,(e=>t&&t.condense?"-":e)).toLowerCase()}},107:function(e,t){!function(e){"use strict";var t=function(e){return function(t){var r=e(t);return t.add(r),r}},r=function(e){return function(t,r){return e.set(t,r),r}},n=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,o=536870912,s=2*o,a=function(e,t){return function(r){var a=t.get(r),i=void 0===a?r.size:an)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;r.has(i);)i=Math.floor(Math.random()*n);return e(r,i)}},i=new WeakMap,u=r(i),c=a(u,i),l=t(c);e.addUniqueNumber=l,e.generateUniqueNumber=c,Object.defineProperty(e,"__esModule",{value:!0})}(t)},507:e=>{var t=function(e){var t,r,n=/\\w+/.exec(e);if(!n)return"an";var o=(r=n[0]).toLowerCase(),s=["honest","hour","hono"];for(t in s)if(0==o.indexOf(s[t]))return"an";if(1==o.length)return"aedhilmnorsx".indexOf(o)>=0?"an":"a";if(r.match(/(?!FJO|[HLMNS]Y.|RY[EO]|SQU|(F[LR]?|[HL]|MN?|N|RH?|S[CHKLMNPTVW]?|X(YL)?)[AEIOU])[FHLMNRSX][A-Z]/))return"an";var a=[/^e[uw]/,/^onc?e\\b/,/^uni([^nmd]|mo)/,/^u[bcfhjkqrst][aeiou]/];for(t=0;t=0?"an":"a":"aeiou".indexOf(o[0])>=0||o.match(/^y(b[lor]|cl[ea]|fere|gg|p[ios]|rou|tt)/)?"an":"a"};void 0!==e.exports?e.exports=t:window.indefiniteArticle=t},768:e=>{e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{var n=r(768);e.exports=function(e){if(Array.isArray(e))return n(e)},e.exports.__esModule=!0,e.exports.default=e.exports},642:e=>{e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},344:e=>{e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},106:(e,t,r)=>{var n=r(907),o=r(642),s=r(906),a=r(344);e.exports=function(e){return n(e)||o(e)||s(e)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},906:(e,t,r)=>{var n=r(768);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var s=t[n]={exports:{}};return e[n].call(s.exports,s,s.exports,r),s.exports}(()=>{"use strict";var e=r(775);const t=-32603,n=-32602,o=-32601,s=(0,e.compile)({message:'The requested method called "\${method}" is not supported.',status:o}),a=(0,e.compile)({message:'The handler of the method called "\${method}" returned no required result.',status:t}),i=(0,e.compile)({message:'The handler of the method called "\${method}" returned an unexpected result.',status:t}),u=(0,e.compile)({message:'The specified parameter called "portId" with the given value "\${portId}" does not identify a port connected to this worker.',status:n}),c=(e,t)=>async r=>{let{data:{id:n,method:o,params:u}}=r;const c=t[o];try{if(void 0===c)throw s({method:o});const t=void 0===u?c():c(u);if(void 0===t)throw a({method:o});const r=t instanceof Promise?await t:t;if(null===n){if(void 0!==r.result)throw i({method:o})}else{if(void 0===r.result)throw i({method:o});const{result:t,transferables:s=[]}=r;e.postMessage({id:n,result:t},s)}}catch(t){const{message:r,status:o=-32603}=t;e.postMessage({error:{code:o,message:r},id:n})}};var l=r(107);const d=new Map,f=(e,t,r)=>({...t,connect:r=>{let{port:n}=r;n.start();const o=e(n,t),s=(0,l.generateUniqueNumber)(d);return d.set(s,(()=>{o(),n.close(),d.delete(s)})),{result:s}},disconnect:e=>{let{portId:t}=e;const r=d.get(t);if(void 0===r)throw u({portId:t.toString()});return r(),{result:null}},isSupported:async()=>{if(await new Promise((e=>{const t=new ArrayBuffer(0),{port1:r,port2:n}=new MessageChannel;r.onmessage=t=>{let{data:r}=t;return e(null!==r)},n.postMessage(t,[t])}))){const e=r();return{result:e instanceof Promise?await e:e}}return{result:!1}}}),p=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>!0;const n=f(p,t,r),o=c(e,n);return e.addEventListener("message",o),()=>e.removeEventListener("message",o)},m=e=>e.reduce(((e,t)=>e+t.length),0),h=(e,t)=>{const r=[];let n=0;e:for(;nt){const o=n-t;r.forEach(((t,r)=>{const n=t.pop(),s=n.length-o;t.push(n.subarray(0,s)),e[r].unshift(n.subarray(s))}))}return r},v=new Map,g=(e=>(t,r,n)=>{const o=e.get(t);if(void 0===o){const o={channelDataArrays:n.map((e=>[e])),isComplete:!0,sampleRate:r};return e.set(t,o),o}return o.channelDataArrays.forEach(((e,t)=>e.push(n[t]))),o})(v),x=((e,t)=>(r,n,o,s)=>{const a=o>>3,i="subsequent"===n?0:44,u=r.length,c=e(r[0]),l=new ArrayBuffer(c*u*a+i),d=new DataView(l);return"subsequent"!==n&&t(d,o,u,"complete"===n?c:Number.POSITIVE_INFINITY,s),r.forEach(((e,t)=>{let r=i+t*a;e.forEach((e=>{const t=e.length;for(let n=0;n{const s=t>>3,a=Math.min(n*r*s,4294967251);e.setUint32(0,1380533830),e.setUint32(4,a+36,!0),e.setUint32(8,1463899717),e.setUint32(12,1718449184),e.setUint32(16,16,!0),e.setUint16(20,1,!0),e.setUint16(22,r,!0),e.setUint32(24,o,!0),e.setUint32(28,o*r*s,!0),e.setUint16(32,r*s,!0),e.setUint16(34,t,!0),e.setUint32(36,1684108385),e.setUint32(40,a,!0)})),w=new Map;p(self,{characterize:()=>({result:/^audio\\/wav$/}),encode:e=>{let{recordingId:t,timeslice:r}=e;const n=w.get(t);void 0!==n&&(w.delete(t),n.reject(new Error("Another request was made to initiate an encoding.")));const o=v.get(t);if(null!==r){if(void 0===o||m(o.channelDataArrays[0])*(1e3/o.sampleRate){w.set(t,{reject:n,resolve:e,timeslice:r})}));const e=h(o.channelDataArrays,Math.ceil(r*(o.sampleRate/1e3))),n=x(e,o.isComplete?"initial":"subsequent",16,o.sampleRate);return o.isComplete=!1,{result:n,transferables:n}}if(void 0!==o){const e=x(o.channelDataArrays,o.isComplete?"complete":"subsequent",16,o.sampleRate);return v.delete(t),{result:e,transferables:e}}return{result:[],transferables:[]}},record:e=>{let{recordingId:t,sampleRate:r,typedArrays:n}=e;const o=g(t,r,n),s=w.get(t);if(void 0!==s&&m(o.channelDataArrays[0])*(1e3/r)>=s.timeslice){const e=h(o.channelDataArrays,Math.ceil(s.timeslice*(r/1e3))),n=x(e,o.isComplete?"initial":"subsequent",16,r);o.isComplete=!1,w.delete(t),s.resolve({result:n,transferables:n})}return{result:null}}})})()})();`,d=new Blob([l],{type:"application/javascript; charset=utf-8"}),s=URL.createObjectURL(d),t=u(s),p=t.characterize,m=t.connect,h=t.disconnect,v=t.encode,g=t.isSupported,x=t.record;URL.revokeObjectURL(s);export{p as characterize,m as connect,h as disconnect,v as encode,g as isSupported,x as record}; +//# sourceMappingURL=module.d8037460.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/module.e2741a44.js b/gradio-modified/gradio/templates/frontend/assets/module.e2741a44.js new file mode 100644 index 0000000000000000000000000000000000000000..4c49d8296bfb127d40bed73416f0010a49bcdb97 --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/module.e2741a44.js @@ -0,0 +1,2 @@ +const w=t=>n=>{const e=t(n);return n.add(e),e},N=t=>(n,e)=>(t.set(n,e),e),f=Number.MAX_SAFE_INTEGER===void 0?9007199254740991:Number.MAX_SAFE_INTEGER,g=536870912,_=g*2,O=(t,n)=>e=>{const r=n.get(e);let s=r===void 0?e.size:r<_?r+1:0;if(!e.has(s))return t(e,s);if(e.sizef)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;e.has(s);)s=Math.floor(Math.random()*f);return t(e,s)},M=new WeakMap,m=N(M),h=O(m,M),I=w(h),R=t=>typeof t.start=="function",p=new WeakMap,A=t=>({...t,connect:({call:n})=>async()=>{const{port1:e,port2:r}=new MessageChannel,s=await n("connect",{port:e},[e]);return p.set(r,s),r},disconnect:({call:n})=>async e=>{const r=p.get(e);if(r===void 0)throw new Error("The given port is not connected.");await n("disconnect",{portId:r})},isSupported:({call:n})=>()=>n("isSupported")}),E=new WeakMap,b=t=>{if(E.has(t))return E.get(t);const n=new Map;return E.set(t,n),n},W=t=>{const n=A(t);return e=>{const r=b(e);e.addEventListener("message",({data:o})=>{const{id:a}=o;if(a!==null&&r.has(a)){const{reject:u,resolve:c}=r.get(a);r.delete(a),o.error===void 0?c(o.result):u(new Error(o.error.message))}}),R(e)&&e.start();const s=(o,a=null,u=[])=>new Promise((c,l)=>{const d=h(r);r.set(d,{reject:l,resolve:c}),a===null?e.postMessage({id:d,method:o},u):e.postMessage({id:d,method:o,params:a},u)}),T=(o,a,u=[])=>{e.postMessage({id:null,method:o,params:a},u)};let i={};for(const[o,a]of Object.entries(n))i={...i,[o]:a({call:s,notify:T})};return{...i}}};export{I as a,W as c,h as g}; +//# sourceMappingURL=module.e2741a44.js.map diff --git a/gradio-modified/gradio/templates/frontend/assets/utils.27234e1d.js b/gradio-modified/gradio/templates/frontend/assets/utils.27234e1d.js new file mode 100644 index 0000000000000000000000000000000000000000..94055dff32d754a6e758de5e920daa2b1e53cccd --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/assets/utils.27234e1d.js @@ -0,0 +1,2 @@ +function t(n,r){if(n==null)return null;if(typeof n=="string")return{name:"file_data",data:n};if(n.is_file)n.data=r+"file="+n.name;else if(Array.isArray(n))for(const a of n)t(a,r);return n}export{t as n}; +//# sourceMappingURL=utils.27234e1d.js.map diff --git a/gradio-modified/gradio/templates/frontend/favicon.png b/gradio-modified/gradio/templates/frontend/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..7e6f5eb5a2f1f1c882d265cf479de25caa925645 Binary files /dev/null and b/gradio-modified/gradio/templates/frontend/favicon.png differ diff --git a/gradio-modified/gradio/templates/frontend/index.html b/gradio-modified/gradio/templates/frontend/index.html new file mode 100644 index 0000000000000000000000000000000000000000..4f1b37a1c3d3060fa5da187161e17b469b0d37ce --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/index.html @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + diff --git a/gradio-modified/gradio/templates/frontend/static/img/Bunny.obj b/gradio-modified/gradio/templates/frontend/static/img/Bunny.obj new file mode 100644 index 0000000000000000000000000000000000000000..9baeb363cce8feb5dd62ecaf8d64a14b6c50ce37 --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/static/img/Bunny.obj @@ -0,0 +1,7474 @@ +# OBJ file format with ext .obj +# vertex count = 2503 +# face count = 4968 +v -3.4101800e-003 1.3031957e-001 2.1754370e-002 +v -8.1719160e-002 1.5250145e-001 2.9656090e-002 +v -3.0543480e-002 1.2477885e-001 1.0983400e-003 +v -2.4901590e-002 1.1211138e-001 3.7560240e-002 +v -1.8405680e-002 1.7843055e-001 -2.4219580e-002 +v 1.9067940e-002 1.2144925e-001 3.1968440e-002 +v 6.0412000e-003 1.2494359e-001 3.2652890e-002 +v -1.3469030e-002 1.6299355e-001 -1.2000020e-002 +v -3.4393240e-002 1.7236688e-001 -9.8213000e-004 +v -8.4314160e-002 1.0957263e-001 3.7097300e-003 +v -4.2233540e-002 1.7211574e-001 -4.1799800e-003 +v -6.3308390e-002 1.5660615e-001 -1.3838790e-002 +v -7.6903950e-002 1.6708033e-001 -2.6931360e-002 +v -7.2253920e-002 1.1539550e-001 5.1670300e-002 +v 1.2981330e-002 1.1366375e-001 3.8302950e-002 +v -3.7857280e-002 1.7010102e-001 1.4236000e-003 +v 4.8689400e-003 3.7962370e-002 4.5867630e-002 +v -5.7180550e-002 4.0918830e-002 4.6301340e-002 +v -4.5209070e-002 3.8839100e-002 4.4503770e-002 +v -3.3761490e-002 1.2617876e-001 1.7132300e-003 +v -5.0242270e-002 1.5773747e-001 9.3944500e-003 +v -2.1216950e-002 1.5887938e-001 -4.6923700e-003 +v -5.6472950e-002 1.5778406e-001 8.1786500e-003 +v -5.2802060e-002 4.1319860e-002 4.6169800e-002 +v -4.9960340e-002 4.3101950e-002 4.4462650e-002 +v -2.9748750e-002 3.6539860e-002 5.2493310e-002 +v -3.5438900e-003 4.2659770e-002 4.7541530e-002 +v 4.9304900e-003 4.1982660e-002 4.5723390e-002 +v -3.9088180e-002 1.6872020e-001 -1.1924680e-002 +v -5.6901000e-002 4.5437000e-002 4.3236960e-002 +v -4.1244880e-002 4.3098890e-002 4.2129560e-002 +v -2.6471980e-002 4.5034530e-002 5.1219460e-002 +v -2.1866970e-002 4.4022930e-002 5.3243800e-002 +v -3.6996250e-002 1.6899301e-001 1.3256300e-003 +v -6.7216590e-002 1.6171340e-001 -1.3733710e-002 +v 4.9760060e-002 7.0235220e-002 2.3732020e-002 +v -4.9186640e-002 4.6411230e-002 4.1170040e-002 +v -4.4590380e-002 4.3797990e-002 4.2685460e-002 +v -4.3686470e-002 4.7154500e-002 4.0286310e-002 +v -2.2491950e-002 4.6513620e-002 5.1885310e-002 +v -6.5174200e-003 4.5036200e-002 4.7502780e-002 +v 3.7699000e-004 4.4935790e-002 4.6519930e-002 +v 3.4023920e-002 1.1353879e-001 2.4595280e-002 +v -2.6467900e-002 1.8104250e-001 -8.0811700e-003 +v -1.7533470e-002 4.7964250e-002 4.8829630e-002 +v -7.0012600e-003 4.6416520e-002 4.7485540e-002 +v 5.9862300e-003 4.6689140e-002 4.9073620e-002 +v 9.1007200e-003 4.8474490e-002 4.9353190e-002 +v -3.5453700e-002 1.1244769e-001 3.5055410e-002 +v -7.5983200e-002 1.3820800e-001 4.9216580e-002 +v 3.4838440e-002 4.3153410e-002 2.8954310e-002 +v -5.2655550e-002 4.8494220e-002 3.8731190e-002 +v -4.7378940e-002 4.8456670e-002 3.9126790e-002 +v -3.8933750e-002 4.6364270e-002 4.0364780e-002 +v -2.6468940e-002 4.7816430e-002 4.9322590e-002 +v -2.2365790e-002 4.8073650e-002 5.0126500e-002 +v -1.3373430e-002 4.7892410e-002 4.7883850e-002 +v -1.2193490e-002 4.9470300e-002 4.9484490e-002 +v -6.3364000e-004 4.7193060e-002 4.9136900e-002 +v 2.0656800e-003 5.0104680e-002 5.2290220e-002 +v -2.2749270e-002 4.9883880e-002 4.6605520e-002 +v -1.8002080e-002 4.9917850e-002 4.6947970e-002 +v -7.8036800e-003 5.0169310e-002 5.0988650e-002 +v -2.6843800e-003 5.1247420e-002 5.3186790e-002 +v -6.3875650e-002 1.6140094e-001 -2.0064210e-002 +v 3.2434000e-002 4.5333970e-002 3.0316760e-002 +v -8.8064570e-002 1.2496764e-001 5.7412000e-004 +v -4.1503710e-002 1.6748512e-001 3.2765900e-003 +v -6.4457010e-002 1.5342891e-001 -5.1180400e-003 +v -3.4303190e-002 5.0520150e-002 3.8286020e-002 +v -2.2949400e-002 5.1020650e-002 4.3926450e-002 +v -1.4354710e-002 5.4428200e-002 5.0710310e-002 +v 1.3773100e-003 5.2302710e-002 5.3149010e-002 +v 3.6285000e-003 5.3198640e-002 5.3422710e-002 +v 8.0723800e-003 5.1574140e-002 5.1773560e-002 +v -7.2665890e-002 1.3005582e-001 5.1668200e-002 +v 3.7992780e-002 4.9793200e-002 3.1902020e-002 +v 3.8497260e-002 4.8062400e-002 3.1737450e-002 +v 2.1503510e-002 1.2563988e-001 2.1252620e-002 +v -7.6481330e-002 1.4827412e-001 -8.9376200e-003 +v -8.7240410e-002 1.1967213e-001 -1.7813000e-004 +v -4.3719960e-002 1.6822738e-001 2.3425000e-003 +v -4.0652200e-002 1.2266506e-001 2.6290300e-002 +v -4.6686180e-002 5.4570720e-002 3.7587370e-002 +v -4.4071750e-002 5.1058250e-002 3.8977810e-002 +v -3.8144110e-002 5.0599600e-002 3.9302160e-002 +v -1.9875770e-002 5.1607710e-002 4.6142000e-002 +v -1.6911250e-002 5.1843550e-002 4.8459320e-002 +v -1.6249190e-002 5.4292110e-002 5.0306940e-002 +v -1.0446540e-002 5.3685970e-002 5.1958610e-002 +v -4.3090900e-003 5.4467500e-002 5.3908250e-002 +v 7.8152700e-003 5.5050680e-002 5.2750250e-002 +v 3.7955090e-002 1.0488710e-001 -3.2031800e-003 +v -7.9003790e-002 1.2850550e-001 5.3149340e-002 +v -7.9778990e-002 1.3448894e-001 5.0990290e-002 +v -5.9129700e-002 1.5039712e-001 3.4489540e-002 +v -6.5691790e-002 1.4961818e-001 3.8160980e-002 +v -3.1951660e-002 1.2518394e-001 1.9400580e-002 +v -6.9372590e-002 1.6061775e-001 -9.1905000e-003 +v -4.5225500e-002 1.2935459e-001 2.0377520e-002 +v -4.1879110e-002 5.6164390e-002 3.9796700e-002 +v -3.0614840e-002 5.4412650e-002 3.6694290e-002 +v -2.4787600e-002 5.2606220e-002 4.0839760e-002 +v -2.1588860e-002 5.6836920e-002 4.5467040e-002 +v -2.4264000e-004 5.4536020e-002 5.4641200e-002 +v -8.0900510e-002 1.2558713e-001 5.2155370e-002 +v -2.9996210e-002 1.7811137e-001 -5.2358200e-003 +v 3.5515390e-002 5.0449570e-002 3.1439830e-002 +v 4.3315550e-002 5.2145550e-002 3.2492110e-002 +v -6.3938540e-002 1.5262699e-001 3.4481070e-002 +v -4.4489440e-002 6.1077710e-002 3.9545320e-002 +v -3.8979900e-002 5.7996270e-002 4.0151390e-002 +v -7.9087730e-002 1.7044488e-001 -4.1373170e-002 +v -4.6247300e-003 5.7759650e-002 5.3990710e-002 +v -1.4985500e-003 5.5925480e-002 5.4630800e-002 +v 5.1981700e-003 5.7017990e-002 5.3423530e-002 +v 3.0920000e-005 1.2315746e-001 3.4749660e-002 +v 3.3568300e-002 1.1523716e-001 2.1798410e-002 +v 3.8686300e-002 5.6450590e-002 3.1188930e-002 +v -3.4385780e-002 5.4096000e-002 3.8060290e-002 +v -8.5308300e-003 6.0159420e-002 5.5308950e-002 +v -4.4024000e-004 5.8343410e-002 5.4483410e-002 +v -9.1078730e-002 1.1506037e-001 4.0141810e-002 +v 4.0775480e-002 5.4557490e-002 3.2014740e-002 +v 4.5636880e-002 5.7402620e-002 3.1992220e-002 +v 2.0358850e-002 1.2448747e-001 2.5906340e-002 +v -1.4169700e-002 1.2767892e-001 1.3080500e-003 +v -1.1987590e-002 5.7493210e-002 5.2752420e-002 +v 3.2514500e-003 5.9828640e-002 5.5464300e-002 +v -1.2395240e-002 1.2264726e-001 3.3588280e-002 +v 1.3813780e-002 1.2322188e-001 3.2502590e-002 +v -7.7004310e-002 1.5521281e-001 2.4534770e-002 +v -2.8001360e-002 6.1075420e-002 3.7471210e-002 +v -8.5480000e-004 6.0593520e-002 5.5824810e-002 +v -3.8050200e-002 1.1527068e-001 3.3178540e-002 +v -1.6231340e-002 1.2382942e-001 2.9576990e-002 +v -2.5373550e-002 1.5840012e-001 -1.4801300e-003 +v -6.7818590e-002 1.5454353e-001 3.0233720e-002 +v -4.3082600e-003 6.1418570e-002 5.5688490e-002 +v -3.1958900e-003 1.1912518e-001 3.8349580e-002 +v -6.4292400e-003 1.2201090e-001 3.5740890e-002 +v 4.2312960e-002 5.9099150e-002 3.0848420e-002 +v 4.8510010e-002 6.1780760e-002 3.0347250e-002 +v 5.0412290e-002 6.0312610e-002 3.0245060e-002 +v -3.9185590e-002 6.3074530e-002 4.1382890e-002 +v -3.4448660e-002 6.0780500e-002 3.9543990e-002 +v -1.4746030e-002 6.5583910e-002 5.3730860e-002 +v 2.6645200e-003 6.2700010e-002 5.6525210e-002 +v -1.3991610e-002 1.1962575e-001 3.6251540e-002 +v 1.9659170e-002 1.1236219e-001 3.7545270e-002 +v -3.2597160e-002 1.7498725e-001 -2.5953100e-003 +v -2.1513900e-003 9.9437380e-002 4.9849750e-002 +v -5.6001390e-002 6.1830670e-002 2.7931150e-002 +v -5.4707260e-002 6.3461570e-002 3.1670590e-002 +v -5.1307940e-002 6.0521660e-002 3.1434930e-002 +v -4.1979320e-002 6.9629980e-002 4.1824930e-002 +v -3.0272490e-002 6.2474660e-002 3.7982220e-002 +v -1.1387860e-002 6.4742460e-002 5.4918000e-002 +v 6.9544900e-003 6.4700130e-002 5.5599150e-002 +v 4.3015090e-002 9.7690960e-002 1.0258300e-003 +v 4.0635900e-002 6.1574860e-002 2.9841250e-002 +v 4.6183560e-002 6.1910110e-002 3.0223400e-002 +v 3.7552960e-002 1.0685291e-001 2.6303470e-002 +v -7.8640730e-002 1.6387238e-001 -2.8387790e-002 +v -6.1996240e-002 1.4761484e-001 -4.3256800e-003 +v -5.7499800e-003 6.5488980e-002 5.6173390e-002 +v 2.5369000e-004 6.5741170e-002 5.6569260e-002 +v -2.0542550e-002 1.1979518e-001 3.3003670e-002 +v 4.3155900e-003 1.2782561e-001 2.8646880e-002 +v -4.6549580e-002 6.7652130e-002 3.9635790e-002 +v -1.7420580e-002 6.9659490e-002 5.4089530e-002 +v -1.5242190e-002 7.0909900e-002 5.5004790e-002 +v -1.0282890e-002 6.8926360e-002 5.5289610e-002 +v -1.1289000e-004 6.9288200e-002 5.6579790e-002 +v -3.6309330e-002 1.1876943e-001 3.0674020e-002 +v -7.0325800e-002 6.3367770e-002 1.9809180e-002 +v 4.3023100e-002 6.3795810e-002 2.8039210e-002 +v 4.2831110e-002 8.5556040e-002 2.7873760e-002 +v 1.6981600e-002 1.2715003e-001 2.2931490e-002 +v -4.2121490e-002 1.2825104e-001 1.0751500e-003 +v 1.6329230e-002 1.2251895e-001 3.1375390e-002 +v -8.1264160e-002 1.5381172e-001 2.5897830e-002 +v -3.2257870e-002 8.8192600e-002 -2.5130960e-002 +v -1.3774950e-002 7.0887950e-002 5.4695630e-002 +v 5.2929600e-003 6.8006030e-002 5.5670490e-002 +v 7.6962500e-003 7.2375600e-002 5.6062150e-002 +v 3.4830600e-003 1.2002635e-001 3.6911950e-002 +v 6.6532500e-003 1.1673563e-001 3.8716340e-002 +v 4.6086570e-002 6.6473930e-002 2.6808990e-002 +v 5.2327290e-002 6.4327070e-002 2.8281890e-002 +v -6.1897630e-002 1.2297065e-001 -8.7725500e-003 +v -6.3934700e-003 1.0524472e-001 -2.2841900e-002 +v -3.5218330e-002 6.8559830e-002 4.1381470e-002 +v -3.2689880e-002 6.7729720e-002 4.0124390e-002 +v -2.9245440e-002 6.9551520e-002 3.9369010e-002 +v -5.0024500e-003 6.9655000e-002 5.6892510e-002 +v 1.6573960e-002 1.1890153e-001 3.5042300e-002 +v -8.9385100e-002 9.9024040e-002 1.7521830e-002 +v 4.5719230e-002 6.9489400e-002 2.3549340e-002 +v 5.4537210e-002 6.8796720e-002 2.4517690e-002 +v -4.4989450e-002 7.1577330e-002 4.1929250e-002 +v -4.2439400e-003 1.2914902e-001 2.5829230e-002 +v -7.3880090e-002 1.2091638e-001 5.3395800e-002 +v -7.4033870e-002 1.4406894e-001 4.4994970e-002 +v 5.0400010e-002 6.7292480e-002 2.6851470e-002 +v -5.4056890e-002 1.5671602e-001 -2.4865900e-003 +v 2.6148110e-002 1.2014725e-001 2.7308010e-002 +v -1.0736490e-002 1.2990285e-001 1.0993790e-002 +v -4.5078840e-002 8.7261130e-002 -2.1865520e-002 +v -3.8340900e-002 6.8843770e-002 4.1846470e-002 +v -2.9255580e-002 7.5169210e-002 4.1186430e-002 +v -4.7311210e-002 1.6296037e-001 6.0740300e-003 +v -1.1866030e-002 7.3183750e-002 5.6250050e-002 +v -6.3734600e-003 7.2184340e-002 5.7972980e-002 +v -2.9935300e-003 7.2186440e-002 5.8167190e-002 +v -2.5781060e-002 9.3778180e-002 -2.8388220e-002 +v -1.6692560e-002 1.1568553e-001 3.7853150e-002 +v -8.4123410e-002 1.0832050e-001 2.4730980e-002 +v -7.4294080e-002 1.6356850e-001 -1.5534220e-002 +v -9.4297150e-002 1.2617744e-001 1.9224650e-002 +v -3.5207090e-002 1.2505219e-001 2.1635690e-002 +v -4.9495940e-002 7.3436340e-002 4.1673570e-002 +v -3.3064160e-002 7.6654840e-002 4.1277900e-002 +v -7.3157300e-003 7.3919590e-002 5.7971690e-002 +v 2.1850000e-005 7.3496040e-002 5.7696650e-002 +v 4.1934400e-003 7.2915170e-002 5.6298730e-002 +v -7.7256080e-002 1.4565854e-001 4.3122930e-002 +v 4.1073260e-002 8.8724320e-002 -9.7879400e-003 +v 3.7418710e-002 1.0850822e-001 3.3973000e-004 +v -5.5111380e-002 7.4687840e-002 4.1939740e-002 +v -4.2740230e-002 7.6995340e-002 4.2804080e-002 +v -6.8531190e-002 1.5630045e-001 2.0997710e-002 +v -9.9440200e-003 7.6343100e-002 5.7388560e-002 +v -3.2479200e-003 7.5710690e-002 5.8714640e-002 +v 1.3414380e-002 9.3073740e-002 5.1467750e-002 +v -7.3504440e-002 9.3883340e-002 -1.4751720e-002 +v -7.4471830e-002 1.3507476e-001 5.0688900e-002 +v -2.5851310e-002 1.2182948e-001 2.6079670e-002 +v -3.4022940e-002 1.7597076e-001 -3.7271600e-003 +v -7.5405850e-002 1.6839072e-001 -2.6792980e-002 +v -3.6658410e-002 7.5087300e-002 4.2006940e-002 +v -1.7795480e-002 7.7486190e-002 5.6087240e-002 +v -1.1378660e-002 7.9877150e-002 5.7698880e-002 +v -1.0415000e-004 7.6881950e-002 5.8190740e-002 +v 2.7381400e-003 7.9105680e-002 5.6719190e-002 +v 5.5681200e-003 7.6397140e-002 5.6327220e-002 +v -6.1895860e-002 1.5424247e-001 -1.9018600e-002 +v -7.2646960e-002 1.4098943e-001 4.6976640e-002 +v 1.5799740e-002 1.2901416e-001 1.3236870e-002 +v -1.1703420e-002 9.7355720e-002 5.1592080e-002 +v -5.8922160e-002 7.7545490e-002 4.2961390e-002 +v -5.3121320e-002 7.7912430e-002 4.3334920e-002 +v -5.0745740e-002 7.6148400e-002 4.3137630e-002 +v -4.7401820e-002 7.5550340e-002 4.2630140e-002 +v -4.5055620e-002 7.8796280e-002 4.2341310e-002 +v -3.9517650e-002 7.8127780e-002 4.2918620e-002 +v -1.5245570e-002 8.2940770e-002 5.6934590e-002 +v -1.4557790e-002 7.6582160e-002 5.6493250e-002 +v -5.9406000e-003 7.9038240e-002 5.7969830e-002 +v 3.7176540e-002 1.1064404e-001 1.8811330e-002 +v 2.3929700e-003 1.3162713e-001 1.1955100e-002 +v -9.3644210e-002 1.1789378e-001 1.8662080e-002 +v -6.3939810e-002 7.8621830e-002 4.2083520e-002 +v -4.5376460e-002 8.2383550e-002 4.3282120e-002 +v -3.6505460e-002 8.1152260e-002 4.3162320e-002 +v -3.3244340e-002 8.2266590e-002 4.1852180e-002 +v -3.0800650e-002 8.0068420e-002 4.1798070e-002 +v -2.0578500e-003 8.0998290e-002 5.7553840e-002 +v 8.1848100e-003 8.0756170e-002 5.5374510e-002 +v -1.2953370e-002 1.1593580e-001 3.8920230e-002 +v -7.8081470e-002 1.2351940e-001 5.2136990e-002 +v -2.6580930e-002 1.5567694e-001 -4.1963400e-003 +v -8.2471600e-002 1.1624130e-001 -2.3236300e-003 +v -2.7538480e-002 7.9964780e-002 4.7697210e-002 +v 1.2556400e-003 8.3845570e-002 5.7446440e-002 +v 6.1508300e-003 8.3406240e-002 5.6463500e-002 +v -6.2433240e-002 8.4035270e-002 4.4203120e-002 +v -5.9867170e-002 8.0540510e-002 4.3277090e-002 +v -5.5238340e-002 8.1999450e-002 4.4984770e-002 +v -5.4000400e-002 8.0568410e-002 4.4601460e-002 +v -5.0027020e-002 8.1311330e-002 4.4264180e-002 +v -4.1996120e-002 8.1083670e-002 4.2456150e-002 +v -3.9357940e-002 8.3631380e-002 4.3502350e-002 +v -8.6161480e-002 1.0838594e-001 1.8244920e-002 +v -8.6723010e-002 9.9917250e-002 3.5537100e-003 +v -2.2413700e-002 8.3283520e-002 5.5590700e-002 +v -1.6993180e-002 8.2555820e-002 5.7523880e-002 +v -1.2406010e-002 8.5222570e-002 5.7267780e-002 +v -7.4442100e-003 1.1693417e-001 3.9283850e-002 +v -2.1452000e-003 1.1143287e-001 4.2436620e-002 +v -7.5718220e-002 1.2522734e-001 5.3087330e-002 +v -7.7056660e-002 1.3193469e-001 5.2462430e-002 +v -6.1121040e-002 1.5569660e-001 2.2517050e-002 +v -3.7538540e-002 1.2744127e-001 1.5320870e-002 +v -2.0516700e-003 1.0093469e-001 4.5625920e-002 +v -6.4992150e-002 8.4550900e-002 4.4120060e-002 +v -5.7861950e-002 8.3944360e-002 4.4186030e-002 +v -4.5681080e-002 8.4988010e-002 4.4159500e-002 +v -3.5022640e-002 8.2888160e-002 4.2912760e-002 +v -2.9982010e-002 8.5402300e-002 4.3745080e-002 +v -8.8892260e-002 9.9209100e-002 9.5703200e-003 +v -1.9135300e-002 8.3474800e-002 5.7217390e-002 +v -8.3489710e-002 1.0724729e-001 7.5790000e-004 +v -7.0112800e-002 1.1790350e-001 5.2714160e-002 +v -3.5526320e-002 1.7595563e-001 -4.8676200e-003 +v -7.0831390e-002 1.2254425e-001 5.3274880e-002 +v 4.5133810e-002 9.3630690e-002 6.2336800e-003 +v -5.3616700e-002 8.5346850e-002 4.5332470e-002 +v -4.9000840e-002 8.6221680e-002 4.5352040e-002 +v -3.6744880e-002 8.6083690e-002 4.3612890e-002 +v -1.0872600e-002 8.8826770e-002 5.6665490e-002 +v -3.8450200e-003 8.4787810e-002 5.7197980e-002 +v -4.9020070e-002 1.1771293e-001 3.1581430e-002 +v -4.2914400e-002 1.1835991e-001 3.0645040e-002 +v -5.7684530e-002 1.5561695e-001 1.2983110e-002 +v -2.5411730e-002 1.2472533e-001 1.2886000e-004 +v 1.9012230e-002 1.2736197e-001 1.7786580e-002 +v -5.9498600e-002 8.8845470e-002 4.5109290e-002 +v -5.6931050e-002 8.8101500e-002 4.4692930e-002 +v 3.5765600e-003 1.3138981e-001 7.2086000e-003 +v -1.6683350e-002 8.7266690e-002 5.6741190e-002 +v -8.4980800e-003 8.3990470e-002 5.7605220e-002 +v 3.5078200e-003 8.6339520e-002 5.7048320e-002 +v -2.8398700e-002 1.8070650e-001 -7.8469500e-003 +v -7.6565830e-002 1.1674037e-001 5.1489350e-002 +v 1.7869430e-002 9.0898610e-002 4.8712940e-002 +v -4.0342100e-002 1.1669551e-001 3.2460200e-002 +v 5.9105700e-003 1.3140929e-001 1.6823750e-002 +v -8.5777550e-002 9.1701370e-002 -4.6970000e-005 +v -5.0372230e-002 8.8844660e-002 4.5188000e-002 +v -4.4434130e-002 8.7654530e-002 4.3477620e-002 +v -4.2056390e-002 8.6711520e-002 4.2534630e-002 +v -3.3058460e-002 8.6185500e-002 4.2560350e-002 +v -2.9241910e-002 9.0453360e-002 4.4236610e-002 +v -6.8964100e-003 8.4432910e-002 5.7168580e-002 +v -6.6210600e-003 9.0415250e-002 5.6879750e-002 +v -1.2439100e-003 8.9093200e-002 5.6552120e-002 +v 9.4076000e-003 9.0328050e-002 5.4214140e-002 +v 4.0194810e-002 1.0231597e-001 -2.0048600e-003 +v -8.6227130e-002 1.1466841e-001 2.2102000e-003 +v -8.9495490e-002 9.5632430e-002 1.4234810e-002 +v -6.7132160e-002 1.5709447e-001 -6.2032000e-003 +v -5.2935640e-002 9.0913520e-002 4.4568870e-002 +v -3.6744910e-002 8.8886950e-002 4.3312050e-002 +v -1.3626110e-002 8.9787930e-002 5.6674380e-002 +v 2.3337130e-002 1.2353449e-001 2.4874140e-002 +v -3.7053790e-002 1.2715094e-001 3.5474000e-004 +v -7.3696690e-002 1.5613015e-001 1.4359790e-002 +v -6.5592380e-002 9.1042400e-002 4.4092080e-002 +v -5.8997380e-002 9.2030670e-002 4.5335270e-002 +v -3.3238910e-002 8.8573580e-002 4.3697040e-002 +v -3.1834990e-002 9.0722970e-002 4.4173460e-002 +v -2.0022170e-002 8.8032110e-002 5.5589350e-002 +v -1.1213830e-002 9.2366370e-002 5.6105260e-002 +v 3.9108440e-002 1.0829072e-001 1.3142330e-002 +v 2.8675700e-002 1.1959600e-001 2.4545910e-002 +v -6.8940210e-002 1.5652777e-001 -1.9716000e-003 +v -6.2615110e-002 9.1126880e-002 4.5090730e-002 +v 3.0444560e-002 1.1886441e-001 2.0821750e-002 +v -1.5241090e-002 9.1821720e-002 5.5817230e-002 +v -5.6221700e-003 9.3235010e-002 5.5893630e-002 +v 4.7989900e-003 9.1654840e-002 5.4715170e-002 +v -6.8282400e-002 9.2376840e-002 4.2388730e-002 +v -5.5623730e-002 9.2187420e-002 4.5054970e-002 +v -5.1901030e-002 9.5457620e-002 4.3937650e-002 +v -4.8809030e-002 9.1083890e-002 4.4456690e-002 +v -4.5411560e-002 9.1002130e-002 4.3252770e-002 +v -4.4514550e-002 9.4860420e-002 4.2972490e-002 +v -3.9430320e-002 8.9597620e-002 4.3177890e-002 +v -3.5642240e-002 9.2617410e-002 4.4238490e-002 +v -1.2246000e-004 9.3201160e-002 5.5398380e-002 +v 9.5104600e-003 9.5483870e-002 5.0910600e-002 +v 2.1441660e-002 9.1354960e-002 4.8043360e-002 +v -8.9830300e-003 1.6926449e-001 -2.2683480e-002 +v -7.3019050e-002 1.5602104e-001 2.2419340e-002 +v -6.4760430e-002 1.5311588e-001 -2.0371200e-003 +v -6.9368510e-002 9.5242790e-002 4.2129000e-002 +v -6.0117140e-002 9.5552910e-002 4.4183820e-002 +v -2.9241690e-002 9.4290440e-002 4.4821190e-002 +v -2.6561430e-002 9.3289510e-002 4.4975420e-002 +v -1.4394030e-002 9.4587640e-002 5.3993500e-002 +v -8.8691600e-003 9.5400260e-002 5.4445980e-002 +v -1.2188700e-003 9.6201750e-002 5.3815910e-002 +v 4.0479000e-003 9.5817360e-002 5.2936770e-002 +v -4.6019400e-003 1.2428544e-001 3.3471960e-002 +v -7.8436460e-002 1.3928013e-001 4.8329360e-002 +v 1.0774610e-002 1.3079162e-001 1.4341740e-002 +v -5.6623730e-002 9.6322170e-002 4.3667910e-002 +v -3.6298870e-002 9.5695620e-002 4.3580310e-002 +v -2.4379930e-002 9.5866450e-002 4.4434530e-002 +v 1.0915500e-002 1.2633629e-001 2.9857020e-002 +v -5.8622700e-003 9.7350210e-002 5.2743650e-002 +v 1.6973450e-002 9.7106620e-002 4.7440920e-002 +v -6.7231980e-002 9.9173950e-002 4.1593880e-002 +v -5.4994210e-002 9.9640820e-002 4.2955230e-002 +v -4.8617990e-002 9.6452700e-002 4.4183060e-002 +v -5.5369000e-002 1.5442476e-001 1.6160650e-002 +v -9.4243550e-002 1.2207432e-001 2.3568470e-002 +v 1.3242990e-002 9.6738240e-002 4.8750160e-002 +v 2.0639290e-002 9.6602480e-002 4.6971000e-002 +v 7.3429700e-003 1.2098188e-001 3.5973430e-002 +v -1.3493870e-002 1.2882438e-001 5.9690700e-003 +v -2.0110640e-002 1.2504545e-001 2.3588310e-002 +v -6.9438450e-002 1.6479930e-001 -1.7218700e-002 +v -6.4028050e-002 9.7838670e-002 4.2565330e-002 +v -5.1996350e-002 9.9707850e-002 4.2716590e-002 +v -4.3990880e-002 9.9425460e-002 4.2383430e-002 +v -3.9738250e-002 1.0215357e-001 4.0574410e-002 +v -3.5931490e-002 9.9809950e-002 4.2335800e-002 +v -3.0867600e-002 9.6914680e-002 4.4651400e-002 +v -2.8342070e-002 9.7782680e-002 4.3761280e-002 +v -2.5622580e-002 9.8713420e-002 4.4210890e-002 +v -8.5236620e-002 1.1077356e-001 2.4537670e-002 +v 7.1936000e-003 9.8859470e-002 4.8419510e-002 +v 9.6509200e-003 1.0108782e-001 4.7373080e-002 +v 1.3487100e-002 1.0076420e-001 4.7454290e-002 +v 7.7389800e-003 1.3147500e-001 1.1682970e-002 +v 8.0905000e-004 1.1633319e-001 4.0167560e-002 +v -7.2652570e-002 1.6567918e-001 -1.8212480e-002 +v -5.6009400e-003 1.3076674e-001 1.0516060e-002 +v -2.6303720e-002 1.2518875e-001 1.7392980e-002 +v -4.7590430e-002 1.0081180e-001 4.2349150e-002 +v -4.1460830e-002 9.8544800e-002 4.1778620e-002 +v -3.3582070e-002 1.0383908e-001 4.0737990e-002 +v -2.2870240e-002 1.0284737e-001 4.3544750e-002 +v -2.2361970e-002 9.8207610e-002 4.4765940e-002 +v -1.8870510e-002 9.8973200e-002 4.4489280e-002 +v -7.1433690e-002 7.7573520e-002 3.8060760e-002 +v -7.3001150e-002 1.1826712e-001 5.3034590e-002 +v -6.8466430e-002 1.3498146e-001 -8.3359800e-003 +v -7.4683810e-002 1.0786100e-001 -9.0477100e-003 +v -6.4958960e-002 1.5852021e-001 -1.2595320e-002 +v -7.8931700e-002 1.5093057e-001 3.5151900e-002 +v -7.4113550e-002 9.9442520e-002 3.8337710e-002 +v -7.0456930e-002 1.0098777e-001 3.9794060e-002 +v -5.9058760e-002 1.0041260e-001 4.2725130e-002 +v -4.9187330e-002 1.0452012e-001 4.0301390e-002 +v -2.9151180e-002 1.0197369e-001 4.2633060e-002 +v -1.1599720e-002 1.0107813e-001 4.4191660e-002 +v 5.1450400e-003 1.0163906e-001 4.5423010e-002 +v -5.1495700e-002 1.0496738e-001 4.0347210e-002 +v -2.0218210e-002 1.0214391e-001 4.3701160e-002 +v 4.2515900e-003 1.0523743e-001 4.2563550e-002 +v 1.6832800e-002 1.0337487e-001 4.5287270e-002 +v -2.5661080e-002 1.2562669e-001 4.5537500e-003 +v -7.2141950e-002 1.0536685e-001 3.7523210e-002 +v -6.4984570e-002 1.0371550e-001 4.0647810e-002 +v -6.0652480e-002 1.0467197e-001 4.0906390e-002 +v -5.5308980e-002 1.0365394e-001 4.1516690e-002 +v -4.4243240e-002 1.0431726e-001 4.1339990e-002 +v -1.5513340e-002 1.0436131e-001 4.2919420e-002 +v -7.6323200e-003 1.0304531e-001 4.3710640e-002 +v -7.8046900e-003 1.0516619e-001 4.3825460e-002 +v 9.7163200e-003 1.0523506e-001 4.3603830e-002 +v 3.0300390e-002 1.1553645e-001 2.8685010e-002 +v -4.7496910e-002 1.0635662e-001 4.0165640e-002 +v -3.8978950e-002 1.0683037e-001 3.8247660e-002 +v -2.5869310e-002 1.0426705e-001 4.2207540e-002 +v -1.8057930e-002 1.0503919e-001 4.2802830e-002 +v -1.5180030e-002 1.0807750e-001 4.2350430e-002 +v -3.8981500e-003 1.0566175e-001 4.4047190e-002 +v 2.6820000e-005 1.0446731e-001 4.3775910e-002 +v 1.1978350e-002 1.0403629e-001 4.5396310e-002 +v 1.5004970e-002 1.0726898e-001 4.1811990e-002 +v 2.6488060e-002 1.2230287e-001 2.0398110e-002 +v -3.6225630e-002 1.0634244e-001 3.8644860e-002 +v -2.1126780e-002 1.0932290e-001 4.0715320e-002 +v -1.2819810e-002 1.0457100e-001 4.3465690e-002 +v 5.2847900e-003 1.0943666e-001 4.1674980e-002 +v 8.9403700e-003 1.0710645e-001 4.1243400e-002 +v -5.1839670e-002 1.6062039e-001 7.1421300e-003 +v -5.4201370e-002 1.1451730e-001 3.4843990e-002 +v 1.3226250e-002 1.2958070e-001 1.9689610e-002 +v -6.9382410e-002 1.0865787e-001 3.7507800e-002 +v -6.7691040e-002 1.0734145e-001 3.8018440e-002 +v -6.3782400e-002 1.1037270e-001 3.7579790e-002 +v -5.0749390e-002 1.0928682e-001 3.8297580e-002 +v -9.3936200e-003 1.0742813e-001 4.3454570e-002 +v 1.1760100e-003 1.0932531e-001 4.2662800e-002 +v 9.8020300e-003 1.1003994e-001 3.9945400e-002 +v 2.0131290e-002 1.0732778e-001 4.0323840e-002 +v -2.7872800e-003 1.0577531e-001 -2.2459030e-002 +v -5.4996890e-002 1.0774199e-001 3.9424590e-002 +v -4.5966740e-002 1.0905146e-001 3.8754110e-002 +v -4.2324540e-002 1.0737278e-001 3.9456440e-002 +v -3.2161240e-002 1.0896504e-001 3.8102720e-002 +v -3.0770180e-002 1.1597313e-001 3.2858800e-002 +v -1.1608610e-002 1.0983707e-001 4.2475330e-002 +v -2.9428320e-002 9.3166620e-002 -2.4931860e-002 +v -8.0043570e-002 9.2080160e-002 -9.4198200e-003 +v -4.9797430e-002 1.1342104e-001 3.5117920e-002 +v -4.3723850e-002 1.6191369e-001 5.7713400e-003 +v -5.7981740e-002 1.0943152e-001 3.7997640e-002 +v -4.1491180e-002 1.1224766e-001 3.5873450e-002 +v -2.4929830e-002 1.1592775e-001 3.4094730e-002 +v -2.0881690e-002 1.1409528e-001 3.7872990e-002 +v -7.5519700e-003 1.1183813e-001 4.2039690e-002 +v 3.7667200e-003 1.1240547e-001 4.1494710e-002 +v -6.2829620e-002 1.5189480e-001 -9.2373400e-003 +v -5.9195950e-002 1.1320797e-001 3.6234680e-002 +v -5.1079080e-002 9.3892810e-002 -2.1761690e-002 +v -7.3945370e-002 8.4374880e-002 -1.5154490e-002 +v -7.2146240e-002 1.3486431e-001 -7.7592200e-003 +v -1.9408870e-002 1.7041104e-001 -2.0994830e-002 +v -5.5530450e-002 1.4905531e-001 -1.9602100e-003 +v 1.6688460e-002 3.6976600e-002 4.3000600e-002 +v -5.2277330e-002 1.1775075e-001 3.3769460e-002 +v -6.9201380e-002 9.3039200e-002 -1.6486120e-002 +v 2.6579210e-002 1.1702438e-001 3.0867940e-002 +v -2.3574310e-002 3.7036910e-002 5.4144750e-002 +v -7.3775100e-003 3.8988430e-002 4.8929450e-002 +v 1.3234660e-002 3.8453060e-002 4.4501470e-002 +v 1.9487350e-002 4.0809290e-002 4.2641060e-002 +v -6.3953930e-002 1.4694729e-001 3.8484200e-002 +v -4.9579470e-002 3.6096540e-002 4.5955360e-002 +v -4.3323650e-002 3.6286400e-002 4.4042360e-002 +v -2.9047200e-002 1.2556338e-001 7.7617700e-003 +v -1.7343100e-003 3.9476800e-002 4.7262900e-002 +v -3.1358130e-002 1.5362199e-001 -4.6738900e-003 +v 2.5822000e-003 1.0747582e-001 -2.0606030e-002 +v -5.6802300e-002 1.4514674e-001 3.1740300e-002 +v -5.6464330e-002 3.7683110e-002 4.6819640e-002 +v -5.0964750e-002 3.8312290e-002 4.6286140e-002 +v -5.0980410e-002 1.3486613e-001 2.7585000e-002 +v -2.5647410e-002 3.8860730e-002 5.4161390e-002 +v -2.2542110e-002 4.0615780e-002 5.3986030e-002 +v -1.7618010e-002 3.8911170e-002 5.2403440e-002 +v -1.9711750e-002 1.6829145e-001 -1.3020960e-002 +v 2.3780070e-002 9.5222940e-002 4.6347330e-002 +v 1.4744290e-002 4.2716950e-002 4.4510310e-002 +v 2.1691360e-002 4.0161530e-002 4.0846450e-002 +v -6.4067240e-002 9.0172190e-002 -1.8855520e-002 +v 2.0319150e-002 1.0041961e-001 4.5760520e-002 +v -3.6425000e-002 9.3630690e-002 -2.3534630e-002 +v -1.4981170e-002 4.2571420e-002 5.1404530e-002 +v -5.7335340e-002 1.2340101e-001 4.0231470e-002 +v -5.4172560e-002 1.2337919e-001 3.7576440e-002 +v 2.2625210e-002 4.3621680e-002 4.0904580e-002 +v 2.8810520e-002 4.3352290e-002 3.2157720e-002 +v -4.2764160e-002 1.5727487e-001 5.2016200e-003 +v 9.2231900e-003 4.4125090e-002 4.5057440e-002 +v 1.5048210e-002 4.5755840e-002 4.3793870e-002 +v -6.3757290e-002 1.0251144e-001 -1.7484400e-002 +v -3.4070430e-002 1.6148975e-001 -1.3786960e-002 +v -8.2191500e-002 7.5610200e-002 1.6542620e-002 +v -6.6299420e-002 1.2337119e-001 5.0615920e-002 +v -1.5510100e-002 4.5283110e-002 5.0653040e-002 +v 1.8928020e-002 4.4249610e-002 4.3009830e-002 +v 2.5821800e-002 4.6326610e-002 3.8277230e-002 +v 2.7268700e-002 4.4547790e-002 3.6152520e-002 +v -4.5301340e-002 1.5695057e-001 7.2036900e-003 +v 2.3855760e-002 1.0616625e-001 3.9378080e-002 +v 2.1632670e-002 4.8127270e-002 4.0694430e-002 +v 4.3785360e-002 4.8803700e-002 3.1343420e-002 +v 4.8074790e-002 4.8969960e-002 2.8165490e-002 +v 5.2663090e-002 4.7673620e-002 2.1201270e-002 +v -5.2722450e-002 4.4722850e-002 4.4143250e-002 +v -3.0071610e-002 1.7258324e-001 -6.3597700e-003 +v -3.4508050e-002 1.5447469e-001 1.6504600e-003 +v 1.0629710e-002 4.6711810e-002 4.6472020e-002 +v 1.6743440e-002 4.8439000e-002 4.3678630e-002 +v 2.8827050e-002 9.2133370e-002 4.3920090e-002 +v -5.9937100e-002 1.2726188e-001 4.0771270e-002 +v -3.6752090e-002 1.5802075e-001 4.1862000e-003 +v -3.7885390e-002 1.6199719e-001 2.4686000e-004 +v -2.2047790e-002 1.8348586e-001 -1.2094990e-002 +v -2.4364620e-002 1.8096836e-001 -9.8312000e-003 +v -4.4882280e-002 1.5052959e-001 7.6451700e-003 +v 2.6996760e-002 5.1317780e-002 3.8752040e-002 +v 4.7735750e-002 5.2751040e-002 3.0797290e-002 +v 5.1703790e-002 4.8857380e-002 2.4147970e-002 +v -6.7504360e-002 1.1424088e-001 4.8036050e-002 +v -1.6257520e-002 1.6031250e-001 -9.6926000e-003 +v -6.3926300e-002 1.6792441e-001 -4.0730420e-002 +v -4.1665290e-002 1.4996141e-001 4.5405000e-003 +v -3.5203230e-002 1.6493551e-001 -2.6810000e-003 +v 4.1318770e-002 9.9496740e-002 2.4275750e-002 +v 1.4055220e-002 5.2523910e-002 4.8593880e-002 +v 1.9421220e-002 5.1321300e-002 4.4798910e-002 +v 2.3677990e-002 5.1474390e-002 4.1053270e-002 +v 3.4258130e-002 5.1930810e-002 3.2757880e-002 +v 5.5957340e-002 5.3147410e-002 2.3197720e-002 +v -3.9937960e-002 1.4922850e-001 1.6017200e-003 +v -4.6988800e-002 1.2600802e-001 2.6985500e-002 +v -2.7708370e-002 9.0081290e-002 -3.1911460e-002 +v 1.9204630e-002 5.5166510e-002 4.7722150e-002 +v 2.1886000e-002 5.3927560e-002 4.5102460e-002 +v 3.1286270e-002 5.2863840e-002 3.6913620e-002 +v 4.6661160e-002 5.4719230e-002 3.1976810e-002 +v 5.1823730e-002 5.3276700e-002 2.7927010e-002 +v -2.9264880e-002 1.6140418e-001 -2.1039500e-003 +v -6.8700770e-002 1.4463537e-001 4.3041630e-002 +v -5.6070060e-002 1.5000706e-001 2.9867640e-002 +v 4.4717850e-002 9.4802660e-002 1.2024710e-002 +v -4.1804090e-002 1.5582081e-001 6.4548200e-003 +v -6.8369340e-002 1.2289287e-001 5.2437860e-002 +v -6.4114810e-002 9.5509880e-002 -1.8114610e-002 +v -1.8383130e-002 1.8543664e-001 -1.7136370e-002 +v 1.1745400e-002 5.6678340e-002 5.1914060e-002 +v -5.9375360e-002 1.1998238e-001 4.0548240e-002 +v 5.9092080e-002 5.7956980e-002 2.0270120e-002 +v 4.3547740e-002 9.7389400e-002 1.7314650e-002 +v -2.6291780e-002 1.5963381e-001 -5.1845000e-004 +v 1.4904780e-002 5.6350380e-002 4.9522780e-002 +v 2.4286200e-002 5.4958580e-002 4.3086850e-002 +v 2.8952610e-002 5.6125250e-002 4.0388970e-002 +v -4.9507770e-002 1.2949500e-001 3.0259270e-002 +v 4.0824790e-002 9.5170220e-002 2.8657920e-002 +v 1.7774800e-002 5.8243780e-002 4.8864720e-002 +v 3.3573840e-002 5.8515260e-002 3.8310990e-002 +v 3.6385040e-002 5.6996480e-002 3.3601460e-002 +v -6.4205010e-002 1.2243894e-001 4.8008340e-002 +v -6.5424500e-002 1.4011279e-001 4.1308960e-002 +v 5.0801340e-002 5.7308080e-002 3.0001390e-002 +v 5.6671750e-002 5.6970820e-002 2.4291920e-002 +v -4.9349930e-002 1.4913519e-001 1.1274060e-002 +v -6.9760570e-002 1.3442855e-001 4.8265220e-002 +v 1.9537060e-002 6.0003780e-002 4.8576140e-002 +v 2.7013910e-002 5.9952790e-002 4.3454420e-002 +v 5.7679430e-002 6.1392970e-002 2.4201790e-002 +v -5.6916540e-002 1.2623512e-001 3.9426610e-002 +v 2.3469280e-002 1.1656262e-001 3.3537270e-002 +v -5.8298640e-002 1.3885500e-001 3.2937460e-002 +v 6.4598400e-003 6.0297430e-002 5.4780030e-002 +v 1.0406020e-002 5.9162400e-002 5.2484370e-002 +v 2.3183950e-002 5.8654360e-002 4.5871060e-002 +v 3.3040360e-002 6.1773840e-002 3.9781440e-002 +v -6.4348220e-002 1.2628088e-001 4.6650200e-002 +v -5.7031440e-002 1.1562007e-001 3.6494880e-002 +v 5.4451560e-002 5.8342890e-002 2.7653010e-002 +v -3.0134400e-002 1.7011322e-001 -7.3591600e-003 +v -3.7077100e-002 1.5986369e-001 1.6096500e-003 +v -5.6032760e-002 1.3731083e-001 3.1970590e-002 +v -6.7676470e-002 1.4150325e-001 4.3868140e-002 +v 9.9911700e-003 6.2735270e-002 5.4009240e-002 +v 1.4521510e-002 6.1382890e-002 5.0500900e-002 +v 3.0051740e-002 6.2169610e-002 4.1545810e-002 +v 3.7519170e-002 6.1062710e-002 3.4366020e-002 +v 5.3944010e-002 6.1391550e-002 2.8268530e-002 +v 5.9119900e-002 6.3128810e-002 2.1561830e-002 +v -2.4366390e-002 1.7693266e-001 -1.1719630e-002 +v -1.3253420e-002 1.6627152e-001 -1.4120370e-002 +v 3.9218740e-002 1.0669250e-001 2.0450190e-002 +v -1.7968980e-002 1.8078031e-001 -1.8103430e-002 +v 2.1902390e-002 6.0875970e-002 4.7282360e-002 +v 3.5341750e-002 6.1630030e-002 3.7606020e-002 +v -6.2145620e-002 1.3599775e-001 3.6700970e-002 +v 5.6820620e-002 6.3691150e-002 2.5286090e-002 +v -3.2800040e-002 1.5948699e-001 2.1962800e-003 +v 1.1212140e-002 6.6584120e-002 5.3982180e-002 +v 1.2919590e-002 6.4203580e-002 5.2441150e-002 +v 2.0126950e-002 6.3851330e-002 4.7919660e-002 +v 3.5971760e-002 6.6669610e-002 3.7781400e-002 +v 3.9906940e-002 6.4361260e-002 3.1686660e-002 +v -6.6702350e-002 1.3210600e-001 4.5480940e-002 +v -4.1601430e-002 1.5978000e-001 3.5374700e-003 +v 3.3044580e-002 1.0766252e-001 3.1916150e-002 +v 2.4672100e-002 6.3694500e-002 4.5204640e-002 +v 2.6108660e-002 6.8007640e-002 4.3902690e-002 +v 3.3363940e-002 6.7054760e-002 3.9729480e-002 +v 4.2915790e-002 6.6707700e-002 2.6994720e-002 +v 5.4714960e-002 6.4697160e-002 2.6979680e-002 +v -1.6530940e-002 1.6325000e-001 -9.2475200e-003 +v -1.7891600e-002 1.6113800e-001 -6.7072700e-003 +v 4.1118120e-002 9.7491260e-002 -3.9756700e-003 +v 2.3386770e-002 7.0075990e-002 4.7012620e-002 +v 3.8102900e-002 6.5678440e-002 3.5132520e-002 +v 1.0145240e-002 1.2221678e-001 3.4718950e-002 +v 5.8392410e-002 6.6741240e-002 2.1979460e-002 +v 3.8302050e-002 8.4549140e-002 -1.4478830e-002 +v 3.4126440e-002 9.7053980e-002 3.7590390e-002 +v -3.1355740e-002 1.5809888e-001 1.9128800e-003 +v -5.8259510e-002 1.4099493e-001 3.2440640e-002 +v -6.6817230e-002 1.1951525e-001 5.1490220e-002 +v -6.8090040e-002 1.1647050e-001 5.1151230e-002 +v 1.6568300e-002 6.6269890e-002 5.1009890e-002 +v 2.9362870e-002 6.6509780e-002 4.2289380e-002 +v 3.7027180e-002 9.3949630e-002 -1.1674040e-002 +v 5.6412730e-002 6.7659930e-002 2.3969320e-002 +v -6.1295740e-002 1.4519988e-001 3.7137830e-002 +v 8.3873000e-003 1.1336223e-001 3.9792610e-002 +v 1.1807030e-002 7.0920980e-002 5.4240490e-002 +v 2.9741730e-002 7.0647100e-002 4.1653890e-002 +v 3.6294410e-002 7.1220700e-002 3.7114610e-002 +v 3.9899680e-002 7.0294820e-002 3.2720020e-002 +v -6.2763130e-002 1.3778012e-001 3.6678590e-002 +v -1.5815440e-002 1.7504938e-001 -1.8654160e-002 +v -9.2268990e-002 1.1475156e-001 1.7017380e-002 +v -9.4964000e-004 1.0141111e-001 4.4290070e-002 +v -6.3712920e-002 1.1274250e-001 3.8006760e-002 +v -6.1096020e-002 1.1701650e-001 3.9654020e-002 +v 2.0991870e-002 6.9335450e-002 4.9003540e-002 +v 2.5658530e-002 7.0550460e-002 4.4539930e-002 +v 3.2978560e-002 7.3500690e-002 4.0486510e-002 +v 4.2156130e-002 6.9717580e-002 2.8318230e-002 +v -5.5516860e-002 1.2956070e-001 3.6598450e-002 +v -4.0802290e-002 1.6436059e-001 3.7448800e-003 +v -6.2546500e-003 1.0121650e-001 4.4322030e-002 +v -1.0986820e-002 1.6621199e-001 -1.6047550e-002 +v -3.0351420e-002 1.6448158e-001 -5.3291400e-003 +v 2.6110920e-002 1.0088990e-001 4.1733260e-002 +v -6.5599940e-002 1.1329504e-001 4.2318710e-002 +v 2.8814660e-002 9.6712680e-002 4.2257700e-002 +v 1.5263280e-002 7.1571940e-002 5.2717390e-002 +v 2.8982400e-002 7.4088480e-002 4.3447240e-002 +v 4.4872540e-002 7.5516710e-002 2.3155250e-002 +v -7.8225230e-002 1.4962481e-001 -2.5019400e-003 +v -4.6094940e-002 1.5296850e-001 9.0029700e-003 +v -5.2369030e-002 1.4682913e-001 1.8934650e-002 +v -2.1592100e-002 1.5763440e-001 -6.8623600e-003 +v 1.7176770e-002 7.3066230e-002 5.1826600e-002 +v 2.2687500e-002 7.5149180e-002 4.9312500e-002 +v 3.5472040e-002 7.3076670e-002 3.8482270e-002 +v -8.9480840e-002 1.3839976e-001 2.5061450e-002 +v -5.3216730e-002 1.3221978e-001 3.2978380e-002 +v -3.7776780e-002 1.5551947e-001 4.3700800e-003 +v -9.0549380e-002 1.3511875e-001 2.1680550e-002 +v -6.3366580e-002 1.3037076e-001 4.1669940e-002 +v 1.4074270e-002 7.6651720e-002 5.4221350e-002 +v 1.8109790e-002 7.5806590e-002 5.2488260e-002 +v 4.2209940e-002 7.8861480e-002 2.9187200e-002 +v -5.2115930e-002 1.4179906e-001 2.0510310e-002 +v 2.9063090e-002 1.1149602e-001 3.3805790e-002 +v -5.4731460e-002 1.4267229e-001 2.8980480e-002 +v 2.5903640e-002 7.5536040e-002 4.6416650e-002 +v 3.1298760e-002 7.5907440e-002 4.2699060e-002 +v 3.8446170e-002 7.5649430e-002 3.5050640e-002 +v 4.6351670e-002 7.4079520e-002 1.8354320e-002 +v -4.7656560e-002 1.3077525e-001 2.5523570e-002 +v -1.1447430e-002 1.7131059e-001 -1.9602980e-002 +v -3.6647240e-002 1.6640131e-001 -2.8167000e-004 +v -4.6653530e-002 1.5917824e-001 7.8019000e-003 +v -4.5569890e-002 1.4663612e-001 5.6514200e-003 +v 4.1438880e-002 9.2365100e-002 -7.4587000e-003 +v -6.4287420e-002 1.3463625e-001 3.9945640e-002 +v -6.1128890e-002 1.3178328e-001 3.8915910e-002 +v -4.7843540e-002 1.2215063e-001 2.8833160e-002 +v -4.9536830e-002 1.2491344e-001 3.1778440e-002 +v -7.1135380e-002 1.3817656e-001 4.7853960e-002 +v 1.0113870e-002 7.6468110e-002 5.5256790e-002 +v 1.7897450e-002 7.9516550e-002 5.2759530e-002 +v 2.1740850e-002 8.0250650e-002 5.0425390e-002 +v 2.5271590e-002 7.8724920e-002 4.8026570e-002 +v 3.0885040e-002 7.8999480e-002 4.3388770e-002 +v -6.2441930e-002 1.4084781e-001 3.6965840e-002 +v -6.2165060e-002 1.5666850e-001 -1.7837760e-002 +v 2.0657260e-002 1.0416830e-001 4.3004680e-002 +v -6.3602800e-002 1.1571453e-001 4.2572290e-002 +v 1.4424020e-002 8.0085500e-002 5.3755600e-002 +v 2.8779340e-002 8.2553250e-002 4.4527350e-002 +v 4.4450130e-002 8.1846900e-002 2.4552920e-002 +v 4.5541990e-002 8.3338380e-002 1.9700850e-002 +v -4.9665810e-002 1.2063801e-001 3.2163270e-002 +v -2.9177290e-002 1.7619959e-001 -5.6241100e-003 +v -5.8203130e-002 1.3270975e-001 3.6918680e-002 +v 3.8997050e-002 9.7088220e-002 -7.7799300e-003 +v -5.4725800e-002 1.2071262e-001 3.7451450e-002 +v 1.3189120e-002 8.4211180e-002 5.3065830e-002 +v -1.9926300e-002 1.6489742e-001 -9.9900200e-003 +v 2.0153130e-002 1.1849719e-001 3.4271250e-002 +v -5.5859940e-002 1.1774313e-001 3.7253480e-002 +v 1.8045260e-002 8.3623160e-002 5.1285840e-002 +v -6.3757130e-002 1.5912175e-001 -5.0155730e-002 +v -1.8527620e-002 1.7653197e-001 -1.7043540e-002 +v 2.8734400e-002 1.0360053e-001 3.8035240e-002 +v 4.1414010e-002 1.0284216e-001 1.6578920e-002 +v 2.4411730e-002 9.8016880e-002 4.4687400e-002 +v 2.0925180e-002 8.6311430e-002 4.9433120e-002 +v 3.0445010e-002 8.4959560e-002 4.3011090e-002 +v 3.3030090e-002 8.3781640e-002 4.1636930e-002 +v 3.6975090e-002 7.9876480e-002 3.7198390e-002 +v -7.7721460e-002 1.1355888e-001 4.8155990e-002 +v 2.9250000e-002 1.0651935e-001 3.6590330e-002 +v -5.3078180e-002 1.3754688e-001 2.8266470e-002 +v -6.2990590e-002 1.1999459e-001 4.5235530e-002 +v -6.5398320e-002 1.1751956e-001 4.8735570e-002 +v 3.3373910e-002 1.1227890e-001 2.7788130e-002 +v 3.8413590e-002 8.7489930e-002 3.5185850e-002 +v -6.1945930e-002 1.6479234e-001 -5.6647670e-002 +v -2.2876480e-002 1.7392813e-001 -1.3431140e-002 +v 4.3766230e-002 8.8390020e-002 -3.5708800e-003 +v 3.9291530e-002 1.0125969e-001 2.7550520e-002 +v 1.0936230e-002 8.6027290e-002 5.4732670e-002 +v 2.4108720e-002 8.4492600e-002 4.8292310e-002 +v 3.6758390e-002 9.9195470e-002 3.2837670e-002 +v -5.1941640e-002 1.2565987e-001 3.4587860e-002 +v -3.1582110e-002 1.6641850e-001 -5.7320000e-003 +v 7.6405900e-003 8.6427230e-002 5.6117850e-002 +v 1.6771020e-002 8.8644690e-002 5.0522960e-002 +v 3.4404610e-002 8.6932850e-002 4.0574270e-002 +v 3.6143820e-002 8.4439200e-002 3.7936930e-002 +v 4.1258830e-002 1.0361081e-001 2.6760600e-003 +v 2.4766140e-002 1.1081111e-001 3.6728360e-002 +v -2.2601590e-002 1.6250449e-001 -6.0717000e-003 +v -1.2893670e-002 1.7879041e-001 -2.2624750e-002 +v -2.4939150e-002 1.7031135e-001 -1.1329700e-002 +v -4.8468630e-002 1.4559606e-001 8.3661500e-003 +v 1.2534490e-002 8.9593930e-002 5.3394630e-002 +v 2.5872860e-002 8.8482290e-002 4.6655260e-002 +v 3.2756470e-002 8.8969130e-002 4.2215450e-002 +v -2.3343620e-002 1.6103450e-001 -3.1862400e-003 +v -9.2594970e-002 1.1943826e-001 2.6802950e-002 +v -7.4314840e-002 1.3761738e-001 -6.6698800e-003 +v -9.2499230e-002 1.2131500e-001 2.9256200e-002 +v -7.7378260e-002 1.5764266e-001 -1.4133650e-002 +v -9.2907340e-002 1.2307021e-001 3.6523230e-002 +v 2.8423340e-002 8.8011080e-002 4.4234200e-002 +v 3.5251680e-002 9.0836820e-002 3.9183920e-002 +v 1.5760560e-002 9.3203560e-002 4.9939310e-002 +v 3.8785530e-002 9.4954300e-002 3.2520220e-002 +v -6.1511220e-002 1.2373565e-001 4.3062680e-002 +v -6.8145120e-002 1.2748676e-001 5.0148970e-002 +v -2.0616710e-002 1.8237588e-001 -1.4299100e-002 +v 1.5137190e-002 1.1571495e-001 3.7031980e-002 +v -5.0718270e-002 1.5276300e-001 1.1816680e-002 +v 3.0168690e-002 1.0048686e-001 3.9404710e-002 +v -8.7426500e-002 9.5469530e-002 4.0312400e-003 +v -6.0010390e-002 1.4284463e-001 3.5449690e-002 +v -5.8603310e-002 1.4637237e-001 3.3808800e-002 +v 3.2411650e-002 9.3736150e-002 4.0890240e-002 +v -7.5917780e-002 1.4997690e-001 -1.6842050e-002 +v 1.8596570e-002 3.5293940e-002 -8.6782200e-003 +v 1.7209800e-002 3.5259400e-002 -1.4685160e-002 +v 4.4326540e-002 9.0818120e-002 2.2097520e-002 +v 3.8335910e-002 3.8830830e-002 3.0938100e-003 +v 2.2192920e-002 3.6775320e-002 -2.0919300e-003 +v 1.9636020e-002 3.8234010e-002 -1.2507670e-002 +v 2.3682120e-002 3.9762540e-002 3.7148760e-002 +v 4.6693280e-002 4.2465320e-002 6.5649500e-003 +v 2.1621110e-002 3.7657240e-002 -4.7021600e-003 +v 1.6638610e-002 3.8196090e-002 -1.9884930e-002 +v -9.0253980e-002 1.1366307e-001 3.7720210e-002 +v -9.0593870e-002 1.1373094e-001 1.0276770e-002 +v -6.2541690e-002 1.7679461e-001 -5.7821820e-002 +v -1.1091940e-002 1.7992082e-001 -2.5996430e-002 +v -6.2263130e-002 1.5219935e-001 -2.2578880e-002 +v -4.2276760e-002 9.4982570e-002 -2.2562420e-002 +v 4.3293410e-002 4.1864140e-002 2.0634400e-003 +v 4.3779590e-002 4.4530720e-002 -1.2622500e-003 +v 2.1696990e-002 4.0427270e-002 -9.4629500e-003 +v -1.1183700e-002 1.6450000e-001 -1.6151690e-002 +v -6.2372570e-002 1.5313041e-001 -2.8997120e-002 +v -9.2489300e-003 1.7725850e-001 -2.8270200e-002 +v 4.1477400e-002 8.5509410e-002 -9.1575000e-003 +v -8.1268710e-002 1.0879438e-001 2.9440660e-002 +v 4.9575680e-002 4.3815900e-002 1.4582960e-002 +v 5.2987960e-002 4.7747690e-002 5.0420000e-003 +v 2.1977540e-002 4.2855330e-002 -1.4536230e-002 +v 1.8505700e-002 3.8294100e-002 -1.7136500e-002 +v -3.5100500e-002 1.5203437e-001 -1.3279000e-004 +v 4.8749130e-002 4.5265000e-002 2.3023500e-003 +v 3.1912900e-002 9.9870060e-002 -1.4620980e-002 +v -1.4222520e-002 1.6167426e-001 -1.3349060e-002 +v -4.8663640e-002 1.3638523e-001 6.8063900e-003 +v -9.5837200e-003 1.7426102e-001 -2.8390760e-002 +v 5.2801850e-002 4.6539940e-002 1.0427720e-002 +v 5.1433800e-002 4.8485200e-002 1.0401000e-003 +v 2.3911240e-002 9.8021670e-002 -2.0807290e-002 +v 2.4567060e-002 4.4130110e-002 -1.0820840e-002 +v 2.0356810e-002 4.3662400e-002 -2.0456280e-002 +v -2.1882420e-002 1.1087418e-001 -1.9695320e-002 +v -5.3831800e-002 1.4981693e-001 2.5066610e-002 +v 5.4114210e-002 4.7773090e-002 1.7484000e-002 +v 5.6730570e-002 5.0515740e-002 1.0627080e-002 +v 4.5941820e-002 4.8138820e-002 -3.8715700e-003 +v -8.3817760e-002 1.1109094e-001 2.8524490e-002 +v 2.9207770e-002 4.7450250e-002 -8.5081800e-003 +v 2.8454920e-002 4.8067390e-002 -1.2847240e-002 +v 2.6637260e-002 4.7607100e-002 -1.6427740e-002 +v 2.2040110e-002 4.4992500e-002 -1.7528500e-002 +v 1.9120080e-002 4.7167750e-002 -2.2114680e-002 +v -1.5782200e-002 1.0072957e-001 -2.3724130e-002 +v -6.2514170e-002 1.7213119e-001 -5.2788100e-002 +v -6.2345600e-002 1.4745498e-001 -7.6600200e-003 +v 4.5598180e-002 8.8151720e-002 1.3124070e-002 +v -4.9422610e-002 1.4283525e-001 8.9728300e-003 +v -8.2761860e-002 1.1162341e-001 4.4221460e-002 +v -5.2166220e-002 1.5013661e-001 1.7448750e-002 +v -6.3616740e-002 1.4801371e-001 -2.0170260e-002 +v -5.1492690e-002 1.3796388e-001 2.3662180e-002 +v -6.1517580e-002 1.7517449e-001 -6.0631700e-002 +v 5.6524870e-002 5.0125660e-002 1.5564490e-002 +v 5.5257900e-002 5.1416260e-002 3.2062600e-003 +v 5.0318130e-002 5.2786370e-002 -3.4166300e-003 +v -6.2681950e-002 1.6744086e-001 -4.5713890e-002 +v 5.6520150e-002 5.1179900e-002 1.9940560e-002 +v 5.6907980e-002 5.1578130e-002 7.2538300e-003 +v 5.2854160e-002 5.1898670e-002 -6.2070000e-004 +v -3.8921140e-002 3.3767390e-002 -2.9042560e-002 +v 2.9740700e-002 5.0324690e-002 -1.3990860e-002 +v -6.8796190e-002 3.5117720e-002 -5.2067400e-003 +v 5.8826020e-002 5.5503780e-002 1.8647920e-002 +v -2.6160570e-002 1.2309988e-001 -4.4735500e-003 +v -5.3341960e-002 1.4401200e-001 2.4261390e-002 +v 5.8177390e-002 5.2821320e-002 1.5182420e-002 +v 5.9798140e-002 5.6840180e-002 1.3342730e-002 +v 5.4549870e-002 5.6044630e-002 -6.6158000e-004 +v 2.6775460e-002 5.1423450e-002 -2.0234060e-002 +v -8.6960400e-003 1.7291588e-001 -2.6708770e-002 +v -7.7039560e-002 7.1967020e-002 2.6405070e-002 +v -6.3069890e-002 1.5897471e-001 -4.2951850e-002 +v 3.5706690e-002 5.6083040e-002 -8.9993300e-003 +v 3.2600380e-002 5.3707520e-002 -1.1006150e-002 +v 2.9739960e-002 5.2538430e-002 -1.6224950e-002 +v 5.9238530e-002 5.6362780e-002 9.4530800e-003 +v 5.7421750e-002 5.6012210e-002 4.0245600e-003 +v 2.9062990e-002 5.5210580e-002 -1.8042060e-002 +v -1.7224410e-002 9.5214090e-002 -3.2085300e-002 +v -8.5911380e-002 1.0968787e-001 7.6582400e-003 +v 6.0594930e-002 6.1677210e-002 1.5591560e-002 +v 5.9531640e-002 6.0504600e-002 5.8397000e-003 +v 5.7306470e-002 5.9944620e-002 1.8886400e-003 +v 3.8829380e-002 5.9839830e-002 -6.4252500e-003 +v 3.0662770e-002 5.7300390e-002 -1.6518370e-002 +v -2.7762070e-002 1.2068537e-001 -9.0152900e-003 +v -8.8194590e-002 1.0314633e-001 1.7509020e-002 +v 6.0778800e-002 6.1646560e-002 1.0463990e-002 +v 3.5915080e-002 5.9916380e-002 -1.1966510e-002 +v 2.4251860e-002 5.6457470e-002 -2.4254800e-002 +v -6.1954390e-002 1.6865320e-001 -5.2621160e-002 +v -9.0557930e-002 1.1275994e-001 1.6141030e-002 +v -8.8469220e-002 1.1124294e-001 1.2679160e-002 +v 5.9558010e-002 6.3099260e-002 5.9471000e-003 +v 3.0940440e-002 6.0518080e-002 -1.8132720e-002 +v -9.3575750e-002 1.2474629e-001 2.6213300e-002 +v -9.3189820e-002 1.2019919e-001 3.7913720e-002 +v -9.2296100e-003 1.7314463e-001 -2.4197660e-002 +v -8.1739460e-002 7.6861340e-002 2.3313610e-002 +v -3.6992750e-002 1.5063932e-001 -2.0372300e-003 +v 6.0093570e-002 6.5693450e-002 1.8533320e-002 +v 5.9837240e-002 6.6423180e-002 8.5139400e-003 +v 4.0706180e-002 6.4475310e-002 -5.5920300e-003 +v 3.4745940e-002 6.3261340e-002 -1.4646740e-002 +v -6.1879660e-002 1.6000450e-001 -2.5806250e-002 +v -7.6537810e-002 1.5344875e-001 -1.2898750e-002 +v 3.8111070e-002 6.4811810e-002 -1.1142000e-002 +v 3.1909340e-002 6.4657050e-002 -1.8473410e-002 +v -8.3159350e-002 1.4674277e-001 3.0757900e-003 +v -8.7055900e-002 1.0562761e-001 9.7651100e-003 +v -7.1448330e-002 1.8105301e-001 -5.5478550e-002 +v -8.5632110e-002 1.2461094e-001 -2.7335800e-003 +v 6.0728970e-002 6.5806600e-002 1.3974830e-002 +v 3.9909650e-002 6.8171740e-002 -9.5698200e-003 +v 3.4981790e-002 6.7740790e-002 -1.5683210e-002 +v -9.1822030e-002 1.2747346e-001 3.6458650e-002 +v -6.2425420e-002 1.6366637e-001 -4.9667290e-002 +v -7.1168950e-002 1.4740156e-001 -2.7590940e-002 +v -5.0364760e-002 1.3715763e-001 1.9526100e-003 +v -5.0492650e-002 1.4159899e-001 1.6291740e-002 +v 5.9886670e-002 6.8513050e-002 1.6171610e-002 +v -6.1406990e-002 1.7268822e-001 -5.8265750e-002 +v 2.4990740e-002 6.5897320e-002 -2.3568270e-002 +v -7.4852750e-002 1.4993112e-001 -2.7752940e-002 +v -6.2225690e-002 6.0265200e-002 2.0449290e-002 +v -6.2001940e-002 3.6435020e-002 4.3918940e-002 +v 5.8374570e-002 7.1186410e-002 1.3072740e-002 +v -3.6125040e-002 1.2286688e-001 -8.2927900e-003 +v 2.9216510e-002 6.7850250e-002 -2.0418570e-002 +v -4.1681700e-002 1.2575112e-001 -7.0193300e-003 +v -7.4226550e-002 1.6437012e-001 -3.8240340e-002 +v -9.7845700e-003 1.6928488e-001 -2.4756660e-002 +v -8.9577950e-002 1.2078310e-001 3.5229100e-003 +v -6.2311930e-002 1.6371109e-001 -4.0623990e-002 +v 4.3514770e-002 9.1519890e-002 -2.6468100e-003 +v -4.8434350e-002 1.3754973e-001 1.3244980e-002 +v -8.9313160e-002 1.3653006e-001 3.0458750e-002 +v -7.4230190e-002 1.5652681e-001 -2.5167090e-002 +v 3.7378600e-002 7.3093410e-002 -1.2635370e-002 +v 2.6321810e-002 7.0240650e-002 -2.3878680e-002 +v -4.8023620e-002 1.4426649e-001 4.2498600e-003 +v -9.2019580e-002 1.1611534e-001 3.5842730e-002 +v -7.1305510e-002 7.3899020e-002 3.5969780e-002 +v -6.2059290e-002 1.5697807e-001 -3.3784580e-002 +v -9.7015300e-003 1.6738863e-001 -1.9360250e-002 +v 4.3342140e-002 7.1676120e-002 -2.2304600e-003 +v 4.1772460e-002 6.9568020e-002 -6.1596000e-003 +v 3.3505410e-002 7.2809860e-002 -1.7034800e-002 +v 2.9665000e-002 7.1506830e-002 -2.1282340e-002 +v -2.9460160e-002 1.5550263e-001 -1.1914700e-003 +v -8.6396440e-002 1.0479356e-001 5.9820600e-003 +v -5.4910700e-002 1.4662313e-001 2.8438970e-002 +v 4.4203810e-002 8.5204260e-002 -2.1170500e-003 +v 4.3264350e-002 7.5810540e-002 -3.8843900e-003 +v 1.3096990e-002 9.1126480e-002 -2.9269770e-002 +v -6.7069210e-002 9.1144610e-002 -1.7425950e-002 +v -9.0821680e-002 1.2276896e-001 6.0998500e-003 +v 4.5620000e-002 7.4684430e-002 2.6073900e-003 +v -9.3039800e-002 1.2026416e-001 1.1216820e-002 +v 4.4635590e-002 9.2794290e-002 1.7832070e-002 +v -1.1243390e-002 1.6457514e-001 -1.8240780e-002 +v 4.5511190e-002 8.6953050e-002 3.8865500e-003 +v 4.6252720e-002 7.7373870e-002 6.9140800e-003 +v 4.0281640e-002 7.2637130e-002 -9.2881000e-003 +v 4.3218200e-002 9.9486740e-002 5.0153300e-003 +v -5.1108270e-002 1.4520219e-001 1.4279480e-002 +v 4.4692980e-002 9.2688550e-002 2.2466700e-003 +v 4.3422540e-002 9.1860370e-002 2.4538450e-002 +v 4.0751360e-002 1.0554729e-001 7.5074100e-003 +v -8.5613030e-002 9.6277110e-002 -6.6514000e-004 +v 4.0721470e-002 7.8475530e-002 -8.2130000e-003 +v 3.5538080e-002 7.6062960e-002 -1.4434750e-002 +v -9.2736510e-002 1.2073095e-001 3.2692730e-002 +v -6.2278520e-002 1.5166598e-001 -1.4672730e-002 +v 4.4960220e-002 8.0942630e-002 6.1119000e-004 +v 3.7814740e-002 7.9698150e-002 -1.3289630e-002 +v 3.3864490e-002 7.8656690e-002 -1.7632490e-002 +v -9.1044280e-002 1.4199862e-001 2.1729630e-002 +v -7.4004450e-002 1.7818523e-001 -5.3916320e-002 +v -6.1768650e-002 1.6067957e-001 -3.4046350e-002 +v -4.9747450e-002 1.4112519e-001 5.2937500e-003 +v 4.1065440e-002 9.0460700e-002 2.9888620e-002 +v -7.2916360e-002 6.5057400e-002 1.8794620e-002 +v -9.0949690e-002 1.3895375e-001 1.7371130e-002 +v 4.2879050e-002 1.0093777e-001 9.4753200e-003 +v -7.2455480e-002 1.7610676e-001 -5.3535420e-002 +v -7.5862940e-002 1.5071299e-001 -9.0209000e-003 +v -8.5269820e-002 1.0267793e-001 1.3935600e-003 +v -7.7025570e-002 1.1396763e-001 -4.6168100e-003 +v 4.6280880e-002 7.8702020e-002 1.4786330e-002 +v 4.2106910e-002 8.1533160e-002 -6.6690900e-003 +v 3.6523880e-002 8.1991750e-002 -1.6229590e-002 +v -3.7420220e-002 4.5428500e-002 -2.4226790e-002 +v -8.5148910e-002 1.3965520e-001 2.4808500e-003 +v -6.3313300e-002 1.6503258e-001 -3.2895120e-002 +v -6.1591410e-002 1.5681572e-001 -2.5945630e-002 +v 4.5918540e-002 8.7036220e-002 8.4236300e-003 +v 4.4631140e-002 8.4178380e-002 8.2665000e-004 +v -4.4842870e-002 1.4629393e-001 1.7114800e-003 +v -6.4124180e-002 1.7953625e-001 -5.8730420e-002 +v -6.7070300e-002 1.8072682e-001 -5.6618620e-002 +v -6.4793760e-002 1.7885275e-001 -5.5883250e-002 +v -6.4371030e-002 1.7296209e-001 -4.9225660e-002 +v -7.0381530e-002 1.8071180e-001 -5.3172590e-002 +v -7.5269270e-002 1.5232949e-001 3.4374060e-002 +v -1.6273090e-002 1.2844514e-001 1.6683610e-002 +v -6.2116150e-002 1.5600787e-001 1.8034420e-002 +v -5.6010790e-002 1.5381662e-001 2.5369280e-002 +v -3.7277920e-002 1.7289068e-001 -8.6627000e-004 +v -7.4158700e-002 1.7987275e-001 -5.0794750e-002 +v -7.9039960e-002 1.5537445e-001 1.5141810e-002 +v -7.2505530e-002 1.5459529e-001 2.9588830e-002 +v -6.7738180e-002 1.7728865e-001 -5.0375960e-002 +v -7.5346900e-003 1.0021302e-001 4.7488700e-002 +v -5.9575620e-002 1.5472401e-001 2.6373250e-002 +v -7.7382710e-002 1.5346600e-001 3.0894990e-002 +v -8.1496670e-002 1.5473104e-001 1.9697340e-002 +v -7.2223320e-002 1.5896734e-001 -5.4242300e-003 +v -1.3708500e-002 1.8491150e-001 -2.5549550e-002 +v -4.3465340e-002 1.2451145e-001 2.2518890e-002 +v -6.9103650e-002 1.5559479e-001 1.6370800e-003 +v -7.3748080e-002 1.5539253e-001 2.3491700e-003 +v -6.8192410e-002 1.7439828e-001 -4.5365870e-002 +v -6.0052850e-002 1.5280350e-001 3.2887630e-002 +v -2.3459490e-002 1.2615386e-001 1.6613770e-002 +v -7.2777220e-002 1.7854465e-001 -4.8208800e-002 +v -7.6595580e-002 1.7753227e-001 -4.7118080e-002 +v 1.3906410e-002 1.2790838e-001 2.5110240e-002 +v -8.6367510e-002 1.0906537e-001 1.1980640e-002 +v -3.1358850e-002 1.2140977e-001 2.5971090e-002 +v -4.9104590e-002 1.3666879e-001 1.9314030e-002 +v -4.2930640e-002 1.2928436e-001 9.2700700e-003 +v -6.5320350e-002 1.5390322e-001 9.1386000e-004 +v -3.7606490e-002 1.2422605e-001 2.4313530e-002 +v 9.5078400e-003 1.3041865e-001 2.0715020e-002 +v -1.7976800e-003 1.3117283e-001 1.6360660e-002 +v 3.6231700e-003 1.3076791e-001 2.1168600e-002 +v -9.2674700e-002 1.1701945e-001 1.1889520e-002 +v -6.5739720e-002 1.5565338e-001 2.6017600e-002 +v -8.6561940e-002 1.4249188e-001 8.4326800e-003 +v -7.0731530e-002 1.5569959e-001 6.9058200e-003 +v -8.0840700e-003 1.3030537e-001 1.6872280e-002 +v -4.4286250e-002 1.2606625e-001 2.0795220e-002 +v -7.0222260e-002 1.5143521e-001 3.6718910e-002 +v -1.5210690e-002 1.8463639e-001 -2.2057240e-002 +v -1.7270750e-002 1.8699602e-001 -1.9977570e-002 +v -8.3560950e-002 1.5255943e-001 7.6806700e-003 +v -8.8130280e-002 9.7540510e-002 5.6788000e-003 +v -8.8399240e-002 1.3899000e-001 1.0640660e-002 +v -6.7780550e-002 1.5614453e-001 1.4276320e-002 +v -6.5864600e-003 1.2641717e-001 3.0226390e-002 +v -8.8746180e-002 1.3625578e-001 7.1477800e-003 +v -7.7206730e-002 1.5639950e-001 -1.8972540e-002 +v -9.3176480e-002 1.1821016e-001 2.3362360e-002 +v -2.3506850e-002 1.2672006e-001 1.0996900e-002 +v -6.6546650e-002 1.7171115e-001 -4.2127770e-002 +v -6.9136000e-002 1.7247836e-001 -3.9013330e-002 +v 5.7180270e-002 7.1107690e-002 8.0307600e-003 +v -7.5390870e-002 1.7952824e-001 -5.2402050e-002 +v -3.1828840e-002 1.2639115e-001 1.0013410e-002 +v -8.9888800e-003 1.2952269e-001 2.2026810e-002 +v 3.4325880e-002 1.1193312e-001 -2.2406500e-003 +v -8.1414950e-002 9.7100250e-002 -6.8745800e-003 +v -2.3298830e-002 1.8324307e-001 -1.7923000e-002 +v -6.1641660e-002 1.5582039e-001 1.1099820e-002 +v -8.8826450e-002 9.0483320e-002 2.1204700e-002 +v 5.8373130e-002 6.8067590e-002 5.7247600e-003 +v -4.3045630e-002 1.2785122e-001 1.6842260e-002 +v 3.0835720e-002 1.1554234e-001 -3.1785500e-003 +v -8.8631270e-002 9.4881200e-002 7.9337600e-003 +v -9.1715140e-002 1.1709957e-001 3.0809400e-002 +v -7.2083780e-002 1.7499844e-001 -4.1930320e-002 +v -6.9540630e-002 1.5308527e-001 3.3865720e-002 +v 6.0078690e-002 6.8129260e-002 1.1454500e-002 +v -4.0081060e-002 1.2628381e-001 1.9607250e-002 +v 3.2819930e-002 1.1655625e-001 4.4458600e-003 +v -7.2823220e-002 1.4510601e-001 -1.5654680e-002 +v -8.5270210e-002 1.0551770e-001 2.3290940e-002 +v -7.6051320e-002 1.1103825e-001 -6.2722100e-003 +v -8.6537730e-002 1.5154801e-001 2.5875370e-002 +v 5.5888480e-002 7.2579250e-002 1.0669650e-002 +v -5.4642360e-002 1.5522963e-001 1.2612400e-002 +v 3.6729960e-002 1.1116756e-001 3.8670600e-003 +v 3.1501870e-002 1.1725172e-001 1.6855100e-003 +v -7.8751550e-002 9.5240290e-002 -1.0600670e-002 +v -8.9408160e-002 1.4352815e-001 3.0924750e-002 +v -2.0891130e-002 1.8595338e-001 -1.5037360e-002 +v -7.0863560e-002 1.6136525e-001 -9.7324600e-003 +v -7.0919760e-002 1.7136688e-001 -3.2763750e-002 +v -3.0771290e-002 1.2564075e-001 1.6594770e-002 +v -5.4454180e-002 1.5297699e-001 2.2505190e-002 +v -1.5539500e-003 1.2754717e-001 2.9232870e-002 +v 2.9130550e-002 1.2027445e-001 6.1117500e-003 +v 2.5725940e-002 1.2122705e-001 -3.6150000e-005 +v -8.9318970e-002 9.9546980e-002 1.3418110e-002 +v -7.5429500e-002 1.7095605e-001 -3.2879890e-002 +v -2.8596020e-002 1.1901156e-001 2.9888170e-002 +v 2.1069780e-002 1.2497756e-001 1.0998100e-003 +v -9.2240760e-002 1.1816838e-001 4.1201730e-002 +v 2.4094600e-003 1.0016785e-001 4.6938070e-002 +v -5.6627620e-002 1.5270606e-001 2.9629030e-002 +v -5.7264800e-002 1.5506250e-001 1.9322430e-002 +v -3.6452070e-002 1.2199869e-001 2.7670650e-002 +v -7.4108160e-002 1.7355729e-001 -3.7986840e-002 +v 5.1537130e-002 7.3496690e-002 1.2698700e-002 +v -6.6096040e-002 1.5532529e-001 7.1561800e-003 +v 3.6102000e-002 1.1266103e-001 1.0491780e-002 +v 1.6715210e-002 1.2689851e-001 2.2331000e-004 +v -8.0767920e-002 1.4301400e-001 -1.5312800e-003 +v -9.1757600e-002 1.4334588e-001 1.7790710e-002 +v -8.6824940e-002 1.5280775e-001 1.5521450e-002 +v -6.5808100e-002 1.6764344e-001 -3.0558670e-002 +v -7.8217340e-002 1.6873975e-001 -3.3564250e-002 +v -7.2567060e-002 1.4753230e-001 4.1714090e-002 +v 5.8439960e-002 7.0200810e-002 1.7779620e-002 +v 5.6847560e-002 7.2017160e-002 1.7139380e-002 +v 5.4919390e-002 7.3161610e-002 1.5223590e-002 +v 4.7446900e-002 7.3691410e-002 1.2430020e-002 +v 1.2319360e-002 1.2903768e-001 1.3336200e-003 +v -7.9790640e-002 1.0351662e-001 -6.6275400e-003 +v -7.6655210e-002 1.5509766e-001 7.9686300e-003 +v 2.1747320e-002 1.2118456e-001 3.0878810e-002 +v -7.5260490e-002 1.4938613e-001 3.9175980e-002 +v -2.5919610e-002 1.8272826e-001 -1.3541090e-002 +v -6.7983790e-002 1.6974781e-001 -3.1627490e-002 +v 1.6831110e-002 1.2487146e-001 2.8425580e-002 +v 5.4016490e-002 7.2883850e-002 1.8678010e-002 +v 5.0522750e-002 7.3397910e-002 1.6166890e-002 +v -5.9582440e-002 1.5623338e-001 7.9209900e-003 +v 2.5343500e-002 1.2374750e-001 9.9818800e-003 +v 1.9262750e-002 1.2689390e-001 5.5552100e-003 +v -9.0758520e-002 1.4223375e-001 2.6008130e-002 +v -4.6548490e-002 1.3320769e-001 1.6889630e-002 +v -2.4106950e-002 1.8380887e-001 -1.1544760e-002 +v 8.6784400e-003 1.2894574e-001 2.6156880e-002 +v 2.4919200e-003 1.2983563e-001 2.4847110e-002 +v 5.7345150e-002 6.9482720e-002 2.1153510e-002 +v -8.5329840e-002 1.5339912e-001 2.0378290e-002 +v 3.2877320e-002 1.1691463e-001 9.2957500e-003 +v 2.4246630e-002 1.2377758e-001 4.8764500e-003 +v -4.7765650e-002 1.3301969e-001 2.2874020e-002 +v -6.3541830e-002 1.6332115e-001 -2.5912990e-002 +v -6.6605200e-002 1.6477375e-001 -2.0670760e-002 +v -6.8504220e-002 1.6732018e-001 -2.3959570e-002 +v -7.2759160e-002 1.6965906e-001 -2.7013420e-002 +v 4.8206850e-002 7.2698580e-002 1.6994630e-002 +v -2.7383180e-002 1.2324257e-001 2.1658860e-002 +v -4.5077500e-002 1.3124443e-001 1.1145770e-002 +v 2.9253150e-002 1.2057701e-001 1.2299330e-002 +v 1.3677610e-002 1.2967262e-001 6.9327400e-003 +v 8.4210900e-003 1.3090986e-001 6.2754400e-003 +v 9.6836000e-004 1.3064303e-001 2.5865900e-003 +v 3.0802000e-003 9.8307360e-002 5.0535640e-002 +v -5.2420170e-002 1.5310101e-001 1.2927370e-002 +v -7.0359720e-002 1.6906988e-001 -2.6144260e-002 +v 5.4359390e-002 7.1467260e-002 2.1381250e-002 +v 4.5161440e-002 7.1030380e-002 2.2530690e-002 +v 1.9320440e-002 1.2738348e-001 1.1296310e-002 +v -9.3281210e-002 1.2691094e-001 1.3505010e-002 +v -8.7405060e-002 1.0593990e-001 1.3645920e-002 +v -2.2851640e-002 9.0635040e-002 5.2280460e-002 +v -6.2099370e-002 1.5406697e-001 3.0837360e-002 +v -4.5851560e-002 1.2072981e-001 2.7665040e-002 +v 5.0781670e-002 7.2155170e-002 2.0680180e-002 +v -8.9607270e-002 1.3971105e-001 2.9308560e-002 +v -5.3323050e-002 1.5273520e-001 1.6213860e-002 +v -1.5227080e-002 1.2784878e-001 2.1545200e-002 +v 3.3663540e-002 1.1574212e-001 1.7181290e-002 +v 2.4000260e-002 1.2468761e-001 1.5517930e-002 +v -8.4166840e-002 9.7756820e-002 -3.2761900e-003 +v -3.6223590e-002 1.2777519e-001 9.8501500e-003 +v -3.9189580e-002 1.2828193e-001 5.0346300e-003 +v -3.3674050e-002 1.7774449e-001 -8.1799500e-003 +v -7.4488620e-002 1.5649443e-001 -2.5954600e-003 +v -4.6755620e-002 1.3284294e-001 8.1212800e-003 +v -8.4970410e-002 1.5322309e-001 1.2654460e-002 +v -1.0866210e-002 1.2691699e-001 2.7575440e-002 +v -3.1074000e-003 1.3072898e-001 5.6428500e-003 +v -8.8760540e-002 9.7037440e-002 2.1079040e-002 +v -6.4811320e-002 3.4530640e-002 1.5508440e-002 +v -6.4300260e-002 3.5086450e-002 2.4272050e-002 +v -6.6727020e-002 3.5895770e-002 3.3849430e-002 +v 1.9838510e-002 9.6518890e-002 -2.2785880e-002 +v -3.8670510e-002 1.6070199e-001 -1.2357760e-002 +v -7.6890090e-002 1.3041906e-001 -6.9570100e-003 +v -7.2539730e-002 3.5399270e-002 7.0298800e-003 +v -6.9209050e-002 3.5454810e-002 1.2042140e-002 +v -6.4160810e-002 3.5900770e-002 1.7687570e-002 +v -6.6804150e-002 3.7377740e-002 3.3296290e-002 +v -6.2928350e-002 3.9061660e-002 4.2707680e-002 +v -7.1752230e-002 3.6789350e-002 8.6966700e-003 +v -6.5171380e-002 3.7289500e-002 2.5953770e-002 +v -6.6392030e-002 3.7712350e-002 2.9621950e-002 +v -6.4558720e-002 3.9639900e-002 3.9411530e-002 +v -6.0145790e-002 4.1202050e-002 4.4293830e-002 +v -6.0318430e-002 3.8442990e-002 4.5245950e-002 +v -3.6756310e-002 8.8663360e-002 -2.3868800e-002 +v -3.9494750e-002 3.7551570e-002 4.2870900e-002 +v -7.2016030e-002 3.7572700e-002 3.9789400e-003 +v -7.1693630e-002 3.9461000e-002 6.0145000e-003 +v -7.1165950e-002 3.9366310e-002 8.1142100e-003 +v -6.9000300e-002 3.8467710e-002 1.0768900e-002 +v -6.7253420e-002 3.8142160e-002 1.3533960e-002 +v -6.1125670e-002 3.7790050e-002 1.9710900e-002 +v -3.9179680e-002 4.2406740e-002 4.1476070e-002 +v -3.5145960e-002 3.8585920e-002 4.7732690e-002 +v -2.8950940e-002 3.9285940e-002 5.3309090e-002 +v -1.8223900e-002 9.7494570e-002 4.6847940e-002 +v -6.6916260e-002 1.2278907e-001 -8.9077400e-003 +v -6.3754640e-002 3.8250120e-002 1.6593500e-002 +v -6.4415760e-002 4.1283840e-002 2.8243480e-002 +v -8.5856340e-002 9.7025390e-002 2.7414960e-002 +v -3.7501130e-002 4.0221900e-002 4.4296550e-002 +v -3.4333970e-002 4.0923630e-002 4.8425810e-002 +v -3.1172890e-002 4.0294330e-002 5.1312460e-002 +v -6.9997320e-002 4.2073080e-002 6.6897800e-003 +v -8.0379330e-002 9.7800660e-002 3.3645750e-002 +v -2.6273160e-002 7.7631160e-002 4.8356180e-002 +v -3.7501450e-002 4.2736690e-002 4.2988400e-002 +v -2.6177500e-002 4.2498930e-002 5.3315220e-002 +v -6.9637250e-002 4.1881270e-002 3.1825800e-003 +v -6.7156510e-002 4.1972860e-002 1.0240940e-002 +v -8.7405510e-002 1.0205209e-001 2.2020360e-002 +v -2.3944380e-002 7.8800140e-002 5.3534730e-002 +v -6.0902360e-002 4.3429500e-002 4.2678530e-002 +v -3.1217880e-002 4.3847510e-002 4.9780920e-002 +v -7.5729440e-002 1.0354026e-001 3.6070970e-002 +v -6.2425320e-002 4.1885720e-002 1.4646770e-002 +v -6.1051660e-002 4.4392230e-002 1.2421940e-002 +v 2.5855060e-002 8.9610660e-002 -2.2701840e-002 +v -7.7644960e-002 8.2214940e-002 3.5797660e-002 +v -6.0381270e-002 4.5921420e-002 4.0088740e-002 +v -2.4982010e-002 8.1777650e-002 5.3421060e-002 +v -3.4453850e-002 4.4563960e-002 4.5422990e-002 +v -2.9842910e-002 4.6782280e-002 4.7746920e-002 +v -1.5119580e-002 9.9930020e-002 4.4500270e-002 +v -6.7306470e-002 4.4176830e-002 7.5958300e-003 +v -5.7852990e-002 4.6444500e-002 1.1062610e-002 +v -5.1815260e-002 1.6392582e-001 1.7488800e-003 +v -5.5174130e-002 4.8383880e-002 3.8517780e-002 +v -7.8849150e-002 1.1867375e-001 5.0622870e-002 +v -2.7229070e-002 8.7991480e-002 4.7909730e-002 +v -7.5536880e-002 1.5977062e-001 -1.0438650e-002 +v -3.6151280e-002 4.6505140e-002 4.0740900e-002 +v -2.5439220e-002 9.0677870e-002 4.8852330e-002 +v -8.0050370e-002 1.1670406e-001 4.8762460e-002 +v -5.2513640e-002 4.7577880e-002 1.4858440e-002 +v -3.2043560e-002 5.0461830e-002 3.9341520e-002 +v -3.1487770e-002 4.6930210e-002 4.5253210e-002 +v -2.0321500e-002 9.3999570e-002 5.1588540e-002 +v -7.2145040e-002 9.1556450e-002 4.1494780e-002 +v -5.3644200e-002 4.9358170e-002 1.2201850e-002 +v -8.2403890e-002 1.2186563e-001 4.9365030e-002 +v -4.9754420e-002 4.9738300e-002 3.7037110e-002 +v -3.2332060e-002 4.8672840e-002 4.2523960e-002 +v -2.3122950e-002 9.4515900e-002 4.7358870e-002 +v -8.6347140e-002 9.1722090e-002 2.6811080e-002 +v -5.7713110e-002 4.8717820e-002 7.2765100e-003 +v -8.6970360e-002 8.8912090e-002 2.4879860e-002 +v -9.2237750e-002 1.2488519e-001 4.0786530e-002 +v -1.5862800e-002 9.7021620e-002 5.0139360e-002 +v -2.7720040e-002 5.0502090e-002 4.3340720e-002 +v -8.5918770e-002 1.4263412e-001 3.9849810e-002 +v -7.5097360e-002 9.0073560e-002 3.9581000e-002 +v -8.9430840e-002 1.4730552e-001 2.7694960e-002 +v -5.3288350e-002 5.1925760e-002 1.1730350e-002 +v -5.0168720e-002 5.3462260e-002 1.6255440e-002 +v -8.5986050e-002 1.4670902e-001 3.4827030e-002 +v -6.9937250e-002 8.6076860e-002 4.2175690e-002 +v -5.0399320e-002 5.1831330e-002 3.4037400e-002 +v -8.3298980e-002 1.4960772e-001 3.3740890e-002 +v -2.9174820e-002 5.2264530e-002 3.7637320e-002 +v -8.8763730e-002 1.1944938e-001 4.6560090e-002 +v -7.7693460e-002 1.7367969e-001 -4.1478670e-002 +v -8.3418140e-002 9.4127440e-002 3.0898450e-002 +v -5.6067510e-002 5.3470630e-002 7.3718200e-003 +v -7.8935630e-002 1.4817228e-001 3.9463070e-002 +v -6.7902770e-002 8.7817230e-002 4.3526990e-002 +v -4.4111240e-002 9.2883990e-002 -2.2373210e-002 +v -8.6605100e-002 1.3226807e-001 4.6783020e-002 +v -9.2654280e-002 1.2084025e-001 4.1629650e-002 +v -5.0887310e-002 5.2727900e-002 1.4455790e-002 +v -4.9763410e-002 5.6241200e-002 3.3624250e-002 +v -8.9771330e-002 1.2904861e-001 4.3022990e-002 +v -2.8054240e-002 5.4551030e-002 3.6786850e-002 +v -2.5867080e-002 5.6689210e-002 3.9182240e-002 +v -8.3702200e-002 1.2226381e-001 -3.7301400e-003 +v -8.1455470e-002 1.3012213e-001 5.2117660e-002 +v -5.1458550e-002 5.5878150e-002 1.5900350e-002 +v -7.8597700e-002 1.7441574e-001 -4.6607580e-002 +v -5.2909820e-002 5.7043070e-002 2.0988410e-002 +v -5.2978500e-002 5.9553770e-002 2.6211920e-002 +v -5.2130640e-002 5.6302970e-002 2.6672460e-002 +v -4.7714500e-002 6.1944520e-002 3.6705820e-002 +v -8.3539790e-002 8.1169560e-002 2.7014070e-002 +v -1.8340000e-002 5.7489970e-002 4.9763020e-002 +v -8.0069810e-002 9.0586130e-002 3.4593070e-002 +v -8.3812250e-002 8.6337700e-002 2.9223270e-002 +v -5.5436650e-002 5.9420250e-002 2.3018970e-002 +v -8.2227680e-002 1.4513771e-001 4.0600080e-002 +v -2.4187580e-002 7.2269150e-002 4.7681090e-002 +v -2.5353150e-002 6.2567200e-002 4.0642170e-002 +v -9.1132110e-002 1.2282100e-001 4.4115160e-002 +v -4.6076290e-002 1.6819719e-001 7.3744000e-004 +v -8.7829280e-002 1.4351461e-001 3.5707670e-002 +v -8.6990640e-002 1.3812326e-001 4.2316550e-002 +v -1.5715900e-002 6.0822970e-002 5.2365440e-002 +v -8.3803580e-002 1.2561100e-001 5.0440490e-002 +v -6.2786680e-002 1.1274190e-001 -1.3605440e-002 +v -8.1033840e-002 8.4698180e-002 3.3106400e-002 +v -8.8563540e-002 1.1624535e-001 4.5392840e-002 +v -2.0268380e-002 6.2266810e-002 4.8212120e-002 +v -1.2619630e-002 6.1635030e-002 5.4424080e-002 +v -7.0491190e-002 8.1818160e-002 4.0609890e-002 +v -8.3882520e-002 1.3331465e-001 4.9113540e-002 +v -5.6560350e-002 4.8355540e-002 3.6607050e-002 +v 9.9444900e-003 1.0919723e-001 -1.9472810e-002 +v -5.5928250e-002 3.5917310e-002 4.6376100e-002 +v -7.6003260e-002 1.6361344e-001 -1.8021110e-002 +v -8.3798850e-002 1.0290691e-001 2.8038330e-002 +v -8.8252110e-002 1.2692730e-001 4.6141300e-002 +v -7.9126720e-002 1.0619883e-001 3.2050700e-002 +v -8.8206230e-002 9.4485700e-002 2.3744010e-002 +v -8.9110330e-002 1.3851394e-001 3.7658780e-002 +v -1.9321360e-002 9.2123890e-002 5.3820650e-002 +v -5.8265630e-002 9.0926390e-002 -2.0948690e-002 +v -2.7046310e-002 6.7014450e-002 3.9672140e-002 +v -2.1416300e-002 1.7977662e-001 -2.1732520e-002 +v -7.8240000e-003 1.0924112e-001 -2.2185670e-002 +v -2.3988340e-002 8.5995590e-002 5.3716430e-002 +v -6.0483580e-002 1.5567975e-001 4.3343800e-003 +v -8.6389150e-002 1.2168475e-001 4.8412440e-002 +v -7.4084360e-002 1.4987744e-001 -3.2610050e-002 +v -2.0580600e-002 7.9572500e-002 5.6013880e-002 +v -8.3837500e-002 1.3927865e-001 4.4893850e-002 +v -2.2933960e-002 3.5632910e-002 5.2865490e-002 +v -8.6153620e-002 1.2735612e-001 4.8563960e-002 +v -6.5728590e-002 1.0709818e-001 -1.4317670e-002 +v -2.1481090e-002 7.4194460e-002 5.2857680e-002 +v -7.6423900e-002 1.5736285e-001 -9.0354600e-003 +v -7.7216010e-002 8.5594880e-002 3.7420770e-002 +v -8.4150830e-002 1.2955013e-001 5.0483700e-002 +v -8.1221440e-002 8.1003250e-002 3.1255840e-002 +v -8.1704000e-002 1.0167226e-001 3.0939660e-002 +v -8.6252730e-002 1.0106846e-001 2.5413770e-002 +v -8.0944970e-002 1.3903572e-001 4.7359080e-002 +v -7.8908350e-002 9.4830900e-002 3.5435500e-002 +v -7.3440160e-002 9.5412600e-002 4.0210650e-002 +v -5.2675780e-002 8.8220740e-002 -2.1886300e-002 +v -7.6440670e-002 7.7511060e-002 3.3748300e-002 +v -2.1791140e-002 1.0658035e-001 -2.2327000e-002 +v -8.8360940e-002 1.4996706e-001 2.6044170e-002 +v -2.4078870e-002 6.7906700e-002 4.5178370e-002 +v -2.0018090e-002 6.7569300e-002 5.1565340e-002 +v -8.3577750e-002 1.2052625e-001 4.9177500e-002 +v -1.4655950e-002 1.7456543e-001 -2.5972690e-002 +v -2.7395940e-002 8.4108300e-002 4.8745680e-002 +v -4.1933580e-002 8.8463400e-002 -2.2126350e-002 +v -3.1693900e-002 1.0261265e-001 -2.2352310e-002 +v -2.7890200e-002 1.0440703e-001 -2.2830920e-002 +v -7.3790400e-002 1.2016662e-001 -7.8851200e-003 +v -4.6124160e-002 1.0506369e-001 -2.0457580e-002 +v -2.7412650e-002 7.3269450e-002 4.2641380e-002 +v -4.5532880e-002 3.4736480e-002 -2.1363200e-002 +v -4.4993030e-002 3.9017010e-002 -2.1097830e-002 +v -4.6462610e-002 3.6800270e-002 -1.7778710e-002 +v -8.8366460e-002 1.1361863e-001 5.8227800e-003 +v 5.1746240e-002 7.2897250e-002 9.0647400e-003 +v -7.0385250e-002 3.7450300e-002 -9.3190000e-004 +v -6.0923170e-002 3.8621820e-002 2.2468850e-002 +v -7.7696720e-002 1.7027889e-001 -4.3117910e-002 +v -4.3793210e-002 1.6955506e-001 -7.3026400e-003 +v -7.7587180e-002 1.7717875e-001 -5.0221090e-002 +v -4.0541880e-002 3.8886010e-002 -2.7364950e-002 +v -4.4215850e-002 3.6131460e-002 -2.4252210e-002 +v -6.6634880e-002 4.0430310e-002 -5.0180700e-003 +v -6.9242120e-002 4.1474050e-002 1.9289000e-004 +v -7.5640690e-002 1.5930400e-001 -2.6908460e-002 +v -6.3087030e-002 3.9614170e-002 2.5181560e-002 +v -7.2303020e-002 1.5186699e-001 -4.1544310e-002 +v -4.1051490e-002 4.1528620e-002 -2.4061000e-002 +v -4.6990580e-002 3.8892380e-002 -1.4016920e-002 +v -8.9559690e-002 1.2851666e-001 4.5457500e-003 +v -7.6987340e-002 1.5369375e-001 -2.2970800e-003 +v -7.0121670e-002 1.6882633e-001 -5.1173650e-002 +v -6.4792610e-002 4.1724530e-002 3.1616900e-002 +v -4.2148060e-002 1.2409627e-001 -9.5602500e-003 +v -4.8069700e-002 1.2493027e-001 -8.4076400e-003 +v -4.2150480e-002 4.3343970e-002 -2.1508710e-002 +v -6.7315160e-002 4.4034000e-002 1.5741800e-003 +v -7.3386640e-002 1.5463418e-001 -2.9943830e-002 +v -5.5352770e-002 4.2936210e-002 1.9135490e-002 +v -6.0067770e-002 4.1419500e-002 2.2953280e-002 +v -6.5488460e-002 4.0937780e-002 3.5315470e-002 +v -8.0066400e-002 1.5039650e-001 6.0518000e-004 +v -4.4031300e-002 4.1949070e-002 -1.7993960e-002 +v -4.5186510e-002 4.2453420e-002 -1.4193620e-002 +v -8.3109430e-002 1.0265445e-001 -3.2933400e-003 +v -6.5472800e-002 4.5627570e-002 4.5575400e-003 +v -7.5427730e-002 1.5201213e-001 -1.4393690e-002 +v -5.4473420e-002 4.5937510e-002 2.3612600e-002 +v -6.2464100e-002 4.3722000e-002 2.8493310e-002 +v -6.2832600e-002 4.5182750e-002 3.4622890e-002 +v -6.3538130e-002 4.3524020e-002 3.7974010e-002 +v -6.0255260e-002 4.4749620e-002 -4.1316200e-003 +v -6.3242050e-002 4.5549700e-002 4.8428000e-004 +v -6.2249430e-002 4.6540050e-002 7.1903500e-003 +v -9.1003650e-002 1.4885725e-001 2.1507030e-002 +v -5.7094130e-002 4.5996540e-002 2.6865280e-002 +v -5.7276490e-002 4.7299580e-002 2.9889950e-002 +v -3.9519900e-002 1.7385855e-001 -7.5752600e-003 +v -8.9641110e-002 1.3841920e-001 3.4141800e-002 +v -9.2601430e-002 1.3018652e-001 2.5183580e-002 +v -9.2280860e-002 1.2762053e-001 2.9751670e-002 +v -3.3957310e-002 4.1025060e-002 -2.9660250e-002 +v -9.0199540e-002 1.1657506e-001 5.6754900e-003 +v -5.8515890e-002 4.7731310e-002 2.1246000e-004 +v -7.1723560e-002 1.4617438e-001 -2.1567820e-002 +v -5.2389820e-002 4.5449130e-002 1.7686300e-002 +v -5.9414350e-002 4.7277990e-002 3.4172420e-002 +v -5.7520620e-002 1.5877600e-001 4.1621200e-003 +v -8.0959140e-002 1.0926674e-001 -2.0189900e-003 +v -5.1904000e-002 4.6100060e-002 1.9421290e-002 +v -5.1830050e-002 4.8568730e-002 2.1647030e-002 +v -7.7650400e-002 1.5658012e-001 -1.6599150e-002 +v -3.7416450e-002 4.7682130e-002 -1.7147280e-002 +v -7.8876110e-002 1.5347012e-001 3.9875800e-003 +v -5.7635420e-002 5.0425540e-002 4.6108400e-003 +v -5.2625440e-002 5.0434620e-002 2.9046740e-002 +v -5.2998720e-002 4.9169020e-002 3.3967600e-002 +v -7.3502600e-002 1.6871934e-001 -4.4791800e-002 +v -5.4420720e-002 4.7836520e-002 -5.9186900e-003 +v -5.2312740e-002 5.1085350e-002 2.4485690e-002 +v -7.9129930e-002 1.6736568e-001 -3.5506230e-002 +v 9.4115700e-003 1.2350285e-001 -9.8291000e-003 +v -3.2715700e-002 1.0896631e-001 -1.8941410e-002 +v -3.1133380e-002 4.9607260e-002 -1.9406940e-002 +v 4.5997330e-002 6.9814450e-002 3.0143300e-003 +v 3.3525460e-002 1.0966209e-001 -6.9894800e-003 +v -5.5047160e-002 5.2767560e-002 -3.9461300e-003 +v -5.6897890e-002 4.9655570e-002 -1.5319000e-003 +v -5.0290500e-002 4.9098930e-002 1.7164780e-002 +v -5.0595170e-002 4.9923270e-002 1.9174130e-002 +v -5.1887420e-002 5.3324670e-002 2.8705560e-002 +v -6.7684480e-002 1.6533627e-001 -5.5466400e-002 +v -3.0271440e-002 5.2106080e-002 -1.7676140e-002 +v -9.1087300e-003 1.1141669e-001 -2.0543230e-002 +v -5.7069360e-002 5.4424380e-002 2.3395500e-003 +v -3.2748380e-002 1.7759875e-001 -1.1627470e-002 +v -2.9009580e-002 5.1265290e-002 -2.2175780e-002 +v -3.1383130e-002 5.1791310e-002 -1.3886800e-002 +v -5.5673960e-002 5.6983850e-002 -3.3510400e-003 +v -5.0916050e-002 5.3813610e-002 1.9753140e-002 +v -8.8875380e-002 1.5169443e-001 2.0086580e-002 +v -7.7153050e-002 1.7378676e-001 -4.7867620e-002 +v -7.8577770e-002 1.6420639e-001 -3.1825860e-002 +v -2.7545910e-002 5.4021570e-002 -2.5147390e-002 +v -5.4463660e-002 5.5357450e-002 1.0326840e-002 +v -8.7041410e-002 1.3058932e-001 9.1161000e-004 +v -9.0009340e-002 1.3278082e-001 5.9220600e-003 +v -9.2232620e-002 1.3195400e-001 1.5430650e-002 +v -4.8639980e-002 1.6472475e-001 -5.0591500e-003 +v -5.4066480e-002 5.9959350e-002 -7.5992200e-003 +v -5.7434090e-002 5.7683500e-002 8.7259700e-003 +v -8.6794730e-002 1.3850688e-001 4.5575900e-003 +v -9.2989530e-002 1.3092307e-001 1.9919290e-002 +v -9.1282030e-002 1.3311897e-001 2.4688630e-002 +v 2.1815020e-002 1.1770533e-001 -1.0015300e-002 +v -2.9647120e-002 5.8104260e-002 -2.1311320e-002 +v -3.1289530e-002 5.5208570e-002 -1.4387840e-002 +v -5.9002160e-002 5.9234620e-002 2.6140800e-003 +v -9.0241700e-002 1.3575994e-001 1.4149160e-002 +v -6.1569420e-002 1.7084875e-001 -6.1679170e-002 +v -6.6070180e-002 1.6557822e-001 -5.8644080e-002 +v -2.4539930e-002 1.8005865e-001 -1.8726950e-002 +v -1.6131750e-002 1.8298848e-001 -2.6037190e-002 +v -3.0809390e-002 5.6998040e-002 -1.7835020e-002 +v 1.0464280e-002 9.6180450e-002 -2.5898970e-002 +v -5.7491630e-002 5.9530160e-002 -1.0786100e-003 +v -8.9146460e-002 1.3650500e-001 2.5952780e-002 +v 4.3714500e-003 1.0391901e-001 -2.1515100e-002 +v -9.0377040e-002 1.3252490e-001 3.1082650e-002 +v -9.0795450e-002 1.3855232e-001 2.0562560e-002 +v -9.4237710e-002 1.2615419e-001 2.2201450e-002 +v -9.0336910e-002 1.3119830e-001 3.8138790e-002 +v -4.5082610e-002 1.2218447e-001 -1.1569430e-002 +v 1.1348010e-002 9.8243750e-002 -2.3024250e-002 +v -3.9227920e-002 9.9184630e-002 -2.1912720e-002 +v -6.5509530e-002 1.5857325e-001 -5.5600270e-002 +v -7.7409510e-002 1.6260515e-001 -2.0754580e-002 +v -4.8580010e-002 1.6689211e-001 -2.5256100e-003 +v -7.6922910e-002 1.5351394e-001 -9.0785600e-003 +v -6.7750580e-002 1.5734825e-001 -5.3982110e-002 +v 5.2906410e-002 6.5230450e-002 -5.1112000e-004 +v -2.9054820e-002 6.1084120e-002 -2.4918230e-002 +v -3.1066920e-002 6.5058860e-002 -2.2751080e-002 +v 2.4249720e-002 1.0266151e-001 -1.8313830e-002 +v -5.5473660e-002 1.6050213e-001 1.3763500e-003 +v -6.6642850e-002 1.6040875e-001 -5.6842680e-002 +v -7.8200320e-002 1.6073213e-001 -2.3999690e-002 +v -1.8320680e-002 1.1968625e-001 -1.1110660e-002 +v 2.1712970e-002 1.0956342e-001 -1.5081090e-002 +v -6.8382640e-002 1.5980248e-001 -5.4208800e-002 +v -2.5445620e-002 6.0208550e-002 -3.0864700e-002 +v -2.6540330e-002 6.5084000e-002 -3.1664870e-002 +v -2.8425710e-002 6.2199610e-002 -2.7938500e-002 +v -3.2605750e-002 6.1264600e-002 -1.5453010e-002 +v -7.0872290e-002 1.1611638e-001 -7.9563700e-003 +v -6.9780530e-002 1.5938570e-001 -4.9418240e-002 +v -3.0324870e-002 6.7694720e-002 -2.7654950e-002 +v -3.2977370e-002 6.6365180e-002 -1.8385530e-002 +v 1.3533490e-002 1.0255388e-001 -2.1579310e-002 +v 4.4408530e-002 6.9758860e-002 9.4765000e-004 +v -2.1999000e-003 1.1215881e-001 -1.9658660e-002 +v -7.2028500e-002 6.7046610e-002 -7.2256000e-004 +v -7.8699630e-002 1.7313910e-001 -4.2720470e-002 +v -8.3211970e-002 1.5072131e-001 4.2128500e-003 +v -8.7439060e-002 1.3374875e-001 2.3974700e-003 +v 2.6348020e-002 8.4562230e-002 -2.3151710e-002 +v -7.4901490e-002 7.0419350e-002 -2.2854300e-003 +v -5.4576350e-002 9.1562950e-002 -2.2098700e-002 +v -7.3242520e-002 1.5231332e-001 -3.5703520e-002 +v -7.4550960e-002 1.7218738e-001 -4.7551010e-002 +v -2.8680680e-002 6.8283500e-002 -3.0610160e-002 +v 1.7372900e-002 1.0246037e-001 -2.1487700e-002 +v -8.1257430e-002 7.3025200e-002 7.1020400e-003 +v -7.4982300e-002 1.5407794e-001 -1.8974470e-002 +v -9.1556500e-002 1.3196262e-001 1.0638150e-002 +v -8.2448000e-004 9.5165120e-002 -3.2056320e-002 +v -7.7618830e-002 7.3999130e-002 -5.3263500e-003 +v -7.9858790e-002 7.2755040e-002 3.0420200e-003 +v -8.1627470e-002 7.3470610e-002 1.1161690e-002 +v -7.3679290e-002 1.4785987e-001 -2.0236290e-002 +v -9.1309820e-002 1.4848588e-001 1.6270070e-002 +v -9.0850140e-002 1.4625613e-001 1.4809050e-002 +v -6.8543890e-002 1.7513008e-001 -5.7187900e-002 +v -2.7253960e-002 1.0747453e-001 -2.1279680e-002 +v 2.1443580e-002 1.2273826e-001 -2.9316700e-003 +v -7.9061200e-002 7.3724300e-002 -8.4521000e-004 +v -8.2063500e-002 7.5993670e-002 1.7615500e-003 +v -8.3736580e-002 7.6771840e-002 8.9586000e-003 +v -9.0205720e-002 1.4947775e-001 1.3035090e-002 +v 8.4818000e-004 1.1670025e-001 -1.7337090e-002 +v -7.4577550e-002 1.5164041e-001 -2.8647990e-002 +v -2.9087460e-002 7.2924630e-002 -3.3354470e-002 +v -3.1184020e-002 7.3989530e-002 -3.0339870e-002 +v -3.2606620e-002 7.1955620e-002 -2.4866580e-002 +v -8.0575990e-002 7.6607800e-002 -2.9879400e-003 +v -8.9491020e-002 1.4392581e-001 1.2488490e-002 +v -7.7388410e-002 1.4656426e-001 -4.3543000e-003 +v -7.2896160e-002 1.5834962e-001 -3.4109420e-002 +v 7.1346500e-003 1.1468229e-001 -1.8345640e-002 +v -3.4502610e-002 7.6130020e-002 -2.2373150e-002 +v -8.3890740e-002 8.0789530e-002 2.2951400e-003 +v -8.3740480e-002 7.7240270e-002 4.6673300e-003 +v -8.6204620e-002 8.0930750e-002 1.0535420e-002 +v -8.6061500e-002 7.9931100e-002 1.4440780e-002 +v -8.1542760e-002 7.7950660e-002 2.6727280e-002 +v 2.6666170e-002 1.1268609e-001 -1.0509540e-002 +v -7.6041430e-002 1.5663068e-001 -2.1420480e-002 +v -9.0012110e-002 1.5083344e-001 1.5752740e-002 +v -7.1156510e-002 1.6335125e-001 -4.5360530e-002 +v -3.3210960e-002 7.6873190e-002 -2.7708380e-002 +v -7.3263090e-002 7.9983830e-002 -1.3749940e-002 +v -7.9285950e-002 8.0048830e-002 -7.0125500e-003 +v -8.6034510e-002 8.2645720e-002 1.9542680e-002 +v -8.4335410e-002 8.0729950e-002 2.2180460e-002 +v -7.1351460e-002 1.5727092e-001 -4.2183090e-002 +v -7.3548450e-002 1.6120822e-001 -3.5288420e-002 +v 1.6732620e-002 1.0991230e-001 -1.7020040e-002 +v -3.0978770e-002 7.7020860e-002 -3.2816490e-002 +v -6.2359240e-002 1.7544824e-001 -6.1485990e-002 +v -1.7587870e-002 1.1491318e-001 -1.7205040e-002 +v -8.2354050e-002 8.0876320e-002 -2.4038900e-003 +v -7.8578910e-002 1.4050129e-001 -4.6031000e-003 +v -2.8931080e-002 7.9247620e-002 -3.5049800e-002 +v -3.1225710e-002 8.0413100e-002 -3.2182320e-002 +v -3.3258680e-002 7.9621670e-002 -2.7146060e-002 +v -4.4697400e-002 1.1791537e-001 -1.4725860e-002 +v -7.9723740e-002 8.4226660e-002 -8.7608600e-003 +v -8.5042160e-002 8.3817830e-002 -7.7640000e-005 +v -8.6776400e-002 8.4344860e-002 1.2419030e-002 +v -8.6674670e-002 8.2665010e-002 1.5174340e-002 +v -8.5106250e-002 8.5176580e-002 2.5679440e-002 +v -7.6975760e-002 8.2935940e-002 -1.1450630e-002 +v -8.2776390e-002 8.3430890e-002 -4.3687000e-003 +v -8.6180440e-002 8.2572150e-002 6.3639000e-003 +v -9.1160820e-002 1.4144362e-001 1.5673910e-002 +v -7.4638800e-002 1.4398484e-001 -7.1504600e-003 +v -8.3448500e-002 1.3393299e-001 -1.6873200e-003 +v -7.5804700e-002 1.5134475e-001 -1.9881200e-002 +v -7.4924140e-002 1.5273013e-001 -1.9397440e-002 +v -5.2314440e-002 1.2159646e-001 -1.0798060e-002 +v -3.0734050e-002 8.5427560e-002 -3.0506670e-002 +v -3.2590560e-002 8.1942660e-002 -2.9100210e-002 +v -8.6454830e-002 8.6940490e-002 9.1667000e-004 +v -1.2501820e-002 1.0634409e-001 -2.2360190e-002 +v -8.8585880e-002 1.4605869e-001 9.8780000e-003 +v -8.5609750e-002 1.4712513e-001 6.5981100e-003 +v -8.7511210e-002 1.5061504e-001 1.0152460e-002 +v -6.0113540e-002 3.5550440e-002 4.4907580e-002 +v -8.8284200e-002 8.6869110e-002 8.1029200e-003 +v -8.8812560e-002 8.7765490e-002 1.4226540e-002 +v -8.8001070e-002 8.6626430e-002 1.5466680e-002 +v -8.6991110e-002 8.6444700e-002 2.2420950e-002 +v -7.4609990e-002 1.4727815e-001 -1.4172380e-002 +v -3.4707910e-002 8.4035880e-002 -2.4302260e-002 +v -8.4964900e-002 8.9962540e-002 -3.0068000e-003 +v -8.8091450e-002 8.7741580e-002 4.8489900e-003 +v -9.1490470e-002 1.4543178e-001 2.2277220e-002 +v -9.4380420e-002 1.2183919e-001 1.7904340e-002 +v -2.9164530e-002 8.5393440e-002 -3.3666780e-002 +v -3.0557790e-002 8.8625920e-002 -2.7550670e-002 +v -7.7770550e-002 8.7844840e-002 -1.1694810e-002 +v -8.0728260e-002 8.8204150e-002 -7.8003100e-003 +v -8.3272540e-002 8.9476690e-002 -5.6502900e-003 +v -8.9398710e-002 8.9539000e-002 1.1645550e-002 +v -8.9698390e-002 1.3971257e-001 1.3774760e-002 +v -7.7134890e-002 1.5151225e-001 -5.5823000e-003 +v -5.1121410e-002 1.6374125e-001 -2.6640500e-003 +v -8.6442960e-002 1.2767438e-001 -1.4864100e-003 +v -6.9605590e-002 1.5490763e-001 -5.0188670e-002 +v -8.7265180e-002 9.2110030e-002 4.2059000e-003 +v -8.9086250e-002 9.2377120e-002 1.0569860e-002 +v -8.9612340e-002 9.1599880e-002 1.7812280e-002 +v -8.2732460e-002 1.4196856e-001 1.2529100e-003 +v -7.2618370e-002 1.4368135e-001 -1.0987100e-002 +v -7.7677230e-002 1.6610992e-001 -3.6777320e-002 +v -1.5078060e-002 9.3863440e-002 -3.4317310e-002 +v -7.1057280e-002 1.5476885e-001 -4.5778530e-002 +v -9.2331920e-002 1.2523886e-001 9.1589500e-003 +v -7.6046700e-002 9.1037250e-002 -1.3643150e-002 +v -8.2942810e-002 9.3291700e-002 -6.1856300e-003 +v -1.0411170e-002 9.4592340e-002 -3.3784850e-002 +v -2.9331140e-002 1.1476230e-001 -1.5844640e-002 +v -3.7218250e-002 1.1594244e-001 -1.5173050e-002 +v -1.2429920e-002 1.0286006e-001 -2.3822480e-002 +v 6.6509600e-003 8.8144500e-002 -3.2945810e-002 +v -6.4119900e-003 9.2876210e-002 -3.4817640e-002 +v 1.5800150e-002 1.1996558e-001 -1.1415630e-002 +v 2.9102740e-002 1.0247506e-001 -1.5768380e-002 +v 4.2080690e-002 6.3480630e-002 -2.5405300e-003 +v 2.8723120e-002 9.7943220e-002 -1.7497350e-002 +v -1.9987640e-002 1.0278313e-001 -2.3392920e-002 +v 3.3748350e-002 8.3644140e-002 -1.8630450e-002 +v -1.8685680e-002 1.8689625e-001 -2.0248700e-002 +v 6.4154900e-003 1.1790181e-001 -1.6282740e-002 +v 5.6305210e-002 6.7769910e-002 2.6525000e-003 +v -5.3608300e-003 1.1289400e-001 -1.9613290e-002 +v 4.5769430e-002 6.4628800e-002 -1.2166100e-003 +v -1.0090870e-002 9.8229650e-002 -2.7731360e-002 +v -6.0458520e-002 1.1755645e-001 -1.1354580e-002 +v 1.2933940e-002 1.1887250e-001 -1.3979370e-002 +v 1.5235680e-002 9.4977900e-002 -2.4437140e-002 +v -3.0892950e-002 4.7409030e-002 -2.4954000e-002 +v -1.7766190e-002 1.8572344e-001 -2.3049280e-002 +v -1.3034890e-002 1.1002855e-001 -2.0161170e-002 +v -7.1206550e-002 3.8608570e-002 7.7218000e-004 +v 1.7904800e-002 1.0627709e-001 -1.7729250e-002 +v -3.3623490e-002 1.1840428e-001 -1.1927480e-002 +v -4.9906840e-002 1.1788332e-001 -1.4402480e-002 +v -6.6878100e-003 1.1747209e-001 -1.5359280e-002 +v -1.5451470e-002 1.8597600e-001 -2.4795870e-002 +v -3.0603900e-002 3.8038460e-002 -3.0123840e-002 +v -1.3220270e-002 1.8397188e-001 -2.7519460e-002 +v -4.7859450e-002 1.1162729e-001 -1.7482120e-002 +v -1.3098990e-002 9.0776040e-002 -3.6659270e-002 +v -6.3117340e-002 1.5425437e-001 2.9730400e-003 +v -5.5139750e-002 1.1051601e-001 -1.7672740e-002 +v -1.1096770e-002 1.8202324e-001 -2.8042450e-002 +v -2.6568900e-002 3.4695830e-002 -2.9113750e-002 +v -6.6396600e-003 1.0222209e-001 -2.3519320e-002 +v -5.6996400e-002 1.5741713e-001 6.0244000e-004 +v 1.9076550e-002 9.1870620e-002 -2.4890230e-002 +v 1.3473090e-002 1.2429893e-001 -6.8361400e-003 +v -2.1730490e-002 9.8410960e-002 -2.4306850e-002 +v -1.7142170e-002 9.8057460e-002 -2.4924330e-002 +v -5.8698110e-002 1.5137318e-001 -6.5801000e-004 +v 3.5641100e-003 1.2764883e-001 -4.4672400e-003 +v -8.5369800e-003 9.9921220e-002 -2.4351070e-002 +v -1.2171980e-002 1.8125102e-001 -2.9061170e-002 +v -6.1113980e-002 1.5305212e-001 9.9983000e-004 +v -2.9570620e-002 1.1713871e-001 -1.3675530e-002 +v 3.0530110e-002 1.1221207e-001 -8.1860600e-003 +v -3.1714100e-002 3.5111530e-002 -3.0658990e-002 +v -1.3691130e-002 1.7914707e-001 -2.8126410e-002 +v 1.1620840e-002 1.1548972e-001 -1.6385680e-002 +v -6.1993570e-002 1.5028063e-001 -1.6297100e-003 +v 3.6684020e-002 1.0099570e-001 -9.8485900e-003 +v 4.8512670e-002 7.1798180e-002 6.0005000e-003 +v -4.6583000e-004 1.1983662e-001 -1.3610580e-002 +v 1.6747170e-002 9.0113950e-002 -2.7127190e-002 +v 6.9832400e-003 9.7730080e-002 -2.4800310e-002 +v -4.3226830e-002 4.6263570e-002 -1.1771730e-002 +v -8.3562500e-003 1.1373600e-001 -1.8239810e-002 +v -1.2354410e-002 1.1556773e-001 -1.6486930e-002 +v 4.6834470e-002 7.4354100e-002 1.0139500e-002 +v 2.5319170e-002 1.0931725e-001 -1.3579660e-002 +v -4.2459500e-002 1.1392482e-001 -1.6188050e-002 +v 5.7744640e-002 6.4158440e-002 2.6277600e-003 +v -5.9710530e-002 3.6535780e-002 -9.4949000e-003 +v -3.2078400e-003 1.0962100e-001 -2.1523850e-002 +v 2.7020740e-002 6.1345700e-002 -2.2292060e-002 +v 7.1030200e-003 1.0191162e-001 -2.1230990e-002 +v -3.8225680e-002 1.2465525e-001 -7.3257400e-003 +v 2.5941540e-002 1.1576352e-001 -8.2193900e-003 +v -6.1297960e-002 3.3900220e-002 -9.3216600e-003 +v -5.9466670e-002 1.4743956e-001 -1.8885400e-003 +v 1.0506610e-002 1.0087700e-001 -2.2109510e-002 +v 3.3081340e-002 1.0273382e-001 -1.2787210e-002 +v 1.2517840e-002 1.0475378e-001 -1.9915960e-002 +v 2.3087990e-002 9.3998720e-002 -2.2210680e-002 +v 3.1555430e-002 9.2484730e-002 -1.8204280e-002 +v 6.2723100e-003 9.9910370e-002 -2.2296890e-002 +v -4.0917240e-002 4.6121780e-002 -1.7942580e-002 +v 3.5407360e-002 9.8188850e-002 -1.2008970e-002 +v 9.4135900e-003 1.2121902e-001 -1.2937780e-002 +v 5.3735190e-002 7.2027350e-002 6.8010000e-003 +v 2.5620340e-002 1.1880719e-001 -5.0330800e-003 +v -3.8150260e-002 4.2466610e-002 -2.6893990e-002 +v -2.8212410e-002 1.1116862e-001 -1.8001930e-002 +v -6.0253590e-002 1.4339100e-001 -3.7906300e-003 +v 1.9016880e-002 1.0401450e-001 -1.9333120e-002 +v 7.5446700e-003 9.1682150e-002 -3.1643140e-002 +v -7.0760800e-003 1.2240119e-001 -1.1364410e-002 +v -1.9047500e-002 9.6562130e-002 -2.7579900e-002 +v -1.6953390e-002 1.0669256e-001 -2.2002990e-002 +v -6.7307000e-004 1.0119875e-001 -2.2857770e-002 +v -9.0179300e-003 1.2528031e-001 -7.7912000e-003 +v -6.8136180e-002 1.8006113e-001 -5.8816050e-002 +v -2.3600190e-002 1.1513818e-001 -1.5577390e-002 +v -5.9831220e-002 4.2842260e-002 -6.6469100e-003 +v 5.3124070e-002 5.9012380e-002 -2.8853800e-003 +v -3.6931840e-002 3.7107370e-002 -2.9714170e-002 +v -5.6215140e-002 1.4139213e-001 -2.8027300e-003 +v 3.6695880e-002 1.0372844e-001 -7.9621500e-003 +v -3.5885070e-002 1.2040038e-001 -1.0640470e-002 +v -9.3569500e-003 8.5423730e-002 -3.8112540e-002 +v -6.0127340e-002 1.2041391e-001 -9.3791100e-003 +v -3.9842790e-002 1.2156113e-001 -1.1570310e-002 +v 2.8322200e-002 1.0847957e-001 -1.2623390e-002 +v -1.8733500e-003 1.1593910e-001 -1.7169430e-002 +v 3.8648150e-002 9.0153340e-002 -1.2549680e-002 +v -1.7359200e-003 9.2244170e-002 -3.4310460e-002 +v 5.0000820e-002 6.1612070e-002 -3.4649900e-003 +v 5.5858960e-002 6.2910170e-002 6.9037000e-004 +v 2.0461520e-002 1.1515372e-001 -1.3103780e-002 +v -1.5165840e-002 1.1798075e-001 -1.4465520e-002 +v -7.0859540e-002 7.1510150e-002 3.3895100e-002 +v 2.2674030e-002 8.6606050e-002 -2.4925490e-002 +v 3.5358840e-002 8.7438890e-002 -1.7109050e-002 +v 1.8400920e-002 1.2145507e-001 -7.6804200e-003 +v -2.5425900e-002 4.1421010e-002 -2.9204830e-002 +v -8.2085100e-003 9.6777440e-002 -3.0809780e-002 +v -5.6810660e-002 3.3873940e-002 -1.1166310e-002 +v -3.4588640e-002 4.4744960e-002 -2.7122900e-002 +v -4.0251680e-002 1.1827531e-001 -1.3674080e-002 +v 1.6387020e-002 1.1402346e-001 -1.5496900e-002 +v 4.2635280e-002 6.0797460e-002 -3.4583700e-003 +v -5.0687200e-002 3.5935870e-002 -1.2380790e-002 +v 7.3446800e-003 9.4509570e-002 -2.9683220e-002 +v -1.9706700e-002 9.2917340e-002 -3.4636880e-002 +v -1.2083040e-002 1.2219229e-001 -9.7120900e-003 +v 4.8805930e-002 6.8457810e-002 1.6952900e-003 +v -3.0869700e-003 9.8402500e-002 -2.7403170e-002 +v -5.3198790e-002 1.3672896e-001 -1.6580500e-003 +v -4.7290060e-002 1.3055355e-001 1.6909100e-003 +v 4.4651700e-003 1.2044039e-001 -1.3931400e-002 +v -2.3850100e-003 1.2290534e-001 -1.0382460e-002 +v -2.4833330e-002 9.5858030e-002 -2.5162110e-002 +v -4.2296900e-002 3.6291920e-002 -2.7253600e-002 +v -5.4388260e-002 1.3404922e-001 -3.9920400e-003 +v -5.0539380e-002 1.3336659e-001 -1.0872200e-003 +v 2.6040300e-003 9.6942660e-002 -2.8407060e-002 +v -7.8163100e-003 1.2821209e-001 -1.9430400e-003 +v 6.5111700e-003 1.3002517e-001 9.2881000e-004 +v 3.4742860e-002 9.2274140e-002 -1.5654590e-002 +v -6.7787700e-002 1.8088887e-001 -5.8191050e-002 +v -3.3715410e-002 1.1151566e-001 -1.8078440e-002 +v 4.4630400e-003 1.2427294e-001 -9.4291400e-003 +v -2.3370170e-002 9.3392760e-002 -3.2031820e-002 +v -4.8982070e-002 1.2980647e-001 -1.3229400e-003 +v -7.8164000e-004 1.2822918e-001 -3.2490000e-003 +v 2.4960400e-003 8.9857600e-002 -3.3628450e-002 +v 7.4553300e-003 1.1196790e-001 -1.9554260e-002 +v 2.8791140e-002 9.1157340e-002 -2.0370210e-002 +v -5.3590150e-002 1.2437450e-001 -7.3470400e-003 +v -4.7743630e-002 1.2064432e-001 -1.2812990e-002 +v -1.9616230e-002 1.2109197e-001 -9.5487700e-003 +v -6.5047370e-002 1.7999148e-001 -5.9758600e-002 +v -5.1704160e-002 3.7620360e-002 -1.1763450e-002 +v -5.2124270e-002 1.2929832e-001 -4.1187000e-003 +v -4.5334450e-002 1.2891494e-001 1.5819100e-003 +v -3.0471200e-003 1.2919453e-001 -1.0688000e-003 +v 7.2129600e-003 1.2721957e-001 -5.2073700e-003 +v 1.1669320e-002 1.2720154e-001 -3.1850900e-003 +v 5.3056400e-002 6.9708830e-002 3.1291400e-003 +v -6.3021150e-002 1.7810951e-001 -6.0393570e-002 +v 2.8204800e-002 6.4391270e-002 -2.0698040e-002 +v 3.4400180e-002 1.0503000e-001 -1.0224920e-002 +v 3.0975190e-002 1.0790250e-001 -1.1058430e-002 +v -4.8984390e-002 1.1480518e-001 -1.5966690e-002 +v -3.2821710e-002 1.2300500e-001 -5.9088300e-003 +v -5.0792860e-002 1.2716487e-001 -4.8183200e-003 +v -3.5301670e-002 1.2547815e-001 -3.1542800e-003 +v 5.6455250e-002 6.9951490e-002 4.9191700e-003 +v -1.6240450e-002 1.2512177e-001 -3.6499700e-003 +v -1.6970400e-002 1.1119793e-001 -1.9586410e-002 +v -5.4088120e-002 3.9781210e-002 -1.0544680e-002 +v -3.4190490e-002 4.7514010e-002 -2.2301500e-002 +v 1.3699090e-002 9.3914220e-002 -2.6427690e-002 +v 8.8000000e-004 9.9234930e-002 -2.4355670e-002 +v -4.6459460e-002 1.2723953e-001 -4.8843300e-003 +v -4.1735500e-002 1.2687599e-001 -4.1742000e-003 +v -2.1000480e-002 1.2313643e-001 -6.1190100e-003 +v -1.2130450e-002 1.2572568e-001 -5.2007900e-003 +v -4.3822400e-003 1.2640753e-001 -6.9495200e-003 +v 1.4085700e-003 3.4781990e-002 -2.3265200e-002 +v -1.4846200e-002 3.5070930e-002 -2.6071900e-002 +v -2.1399500e-002 3.4795120e-002 -2.7958820e-002 +v 1.2009220e-002 3.5961900e-002 -2.1735750e-002 +v 3.8249200e-003 3.6129220e-002 -2.3878090e-002 +v -5.1139560e-002 9.6617580e-002 -2.2095120e-002 +v -5.4813320e-002 9.8102480e-002 -2.1425370e-002 +v -2.7597040e-002 1.6979824e-001 -1.8170420e-002 +v 1.3359870e-002 3.9377410e-002 -2.2496330e-002 +v 4.3919300e-003 3.8674430e-002 -2.4170290e-002 +v -6.8478200e-003 3.6444540e-002 -2.5177120e-002 +v -1.3280260e-002 3.7699590e-002 -2.6391810e-002 +v -4.7672760e-002 3.6116650e-002 -1.3301210e-002 +v -4.5590120e-002 1.0853826e-001 -1.8796680e-002 +v -5.0095670e-002 1.0990925e-001 -1.8504510e-002 +v -6.5766640e-002 3.6469550e-002 -7.2073000e-003 +v -2.3455840e-002 1.6824727e-001 -1.8822880e-002 +v -4.5918000e-003 3.8404570e-002 -2.5412870e-002 +v -2.4954130e-002 3.7441060e-002 -2.9152720e-002 +v 2.9007770e-002 3.7358220e-002 -2.7474000e-004 +v -7.9468800e-003 4.1489920e-002 -2.5911270e-002 +v -1.6803800e-002 3.9753810e-002 -2.7565350e-002 +v -6.5156150e-002 1.4034537e-001 -7.6848600e-003 +v -4.7080100e-002 4.0700690e-002 -1.1869830e-002 +v -6.8470630e-002 3.7477700e-002 -4.9557400e-003 +v 3.7326850e-002 4.0209510e-002 -8.5850000e-004 +v 3.5349870e-002 4.1257050e-002 -2.8075100e-003 +v 5.1820700e-003 4.1536320e-002 -2.4065670e-002 +v 1.8660660e-002 1.0030784e-001 -2.2127290e-002 +v -6.0510780e-002 1.0748450e-001 -1.7042300e-002 +v -6.2374340e-002 4.0146090e-002 -7.4040200e-003 +v 2.5456950e-002 3.9483890e-002 -4.0251400e-003 +v -2.2828000e-004 4.3394940e-002 -2.5124420e-002 +v -8.1088400e-003 4.3439060e-002 -2.6140070e-002 +v -1.7362450e-002 4.3237420e-002 -2.7665190e-002 +v -2.6416670e-002 4.4674020e-002 -2.8209740e-002 +v 3.8064500e-003 1.0944331e-001 -2.0203790e-002 +v -5.8232370e-002 9.5690400e-002 -2.0616030e-002 +v -6.6122370e-002 4.2341260e-002 -2.7538800e-003 +v -6.0959920e-002 9.4173040e-002 -1.9015670e-002 +v 3.1352250e-002 4.2649280e-002 -4.6745000e-003 +v -3.3540900e-002 3.6342620e-002 4.9089960e-002 +v 1.7252780e-002 4.4335610e-002 -2.3067190e-002 +v 1.0637660e-002 4.4161560e-002 -2.4926170e-002 +v 4.3843100e-003 4.5806710e-002 -2.6788990e-002 +v -8.2506400e-003 4.5148720e-002 -2.8441070e-002 +v -1.5748410e-002 4.5043860e-002 -2.7877790e-002 +v 2.8990330e-002 4.4697850e-002 -6.1863000e-003 +v 8.1686400e-003 4.5053030e-002 -2.5178740e-002 +v -9.6291000e-004 4.5378230e-002 -2.7308280e-002 +v -1.7033400e-003 4.7819200e-002 -2.9928930e-002 +v -3.1535830e-002 4.4740410e-002 -2.8079410e-002 +v -3.3619650e-002 1.5691468e-001 -1.1024870e-002 +v -5.0751180e-002 4.3109620e-002 -1.0018680e-002 +v 3.6890890e-002 4.7353200e-002 -6.1057100e-003 +v 2.4975630e-002 4.2644580e-002 -7.0169900e-003 +v 2.4562420e-002 4.8369560e-002 -1.9672760e-002 +v 1.3964040e-002 4.5579170e-002 -2.4706510e-002 +v 1.3376130e-002 4.8630300e-002 -2.6551500e-002 +v 3.7308900e-003 4.8127990e-002 -2.9025970e-002 +v -8.7947000e-003 4.7056850e-002 -2.9881630e-002 +v -1.3753770e-002 5.1865060e-002 -3.2243480e-002 +v -2.1200840e-002 4.6657090e-002 -2.7951320e-002 +v 3.9693540e-002 4.5658580e-002 -4.5274100e-003 +v 3.3627400e-002 4.8717730e-002 -6.3904600e-003 +v -6.5352120e-002 9.9294570e-002 -1.6820150e-002 +v 1.2868100e-003 5.0383670e-002 -3.0357440e-002 +v -8.1797500e-003 4.9845800e-002 -3.1071390e-002 +v -1.7184350e-002 4.8210500e-002 -2.9741930e-002 +v -2.6049450e-002 4.7692500e-002 -2.6149500e-002 +v -8.4747010e-002 1.1078350e-001 3.9488380e-002 +v -5.1316870e-002 4.8270690e-002 -7.9310500e-003 +v -8.2506510e-002 1.2765487e-001 -4.6796400e-003 +v 3.8663690e-002 5.1696670e-002 -6.6910200e-003 +v -7.5643160e-002 9.9440450e-002 -1.1927610e-002 +v 2.0284470e-002 5.1349190e-002 -2.4895380e-002 +v 5.9436000e-003 5.0976660e-002 -2.9119360e-002 +v -2.5528290e-002 5.1472710e-002 -2.6884680e-002 +v -3.5562670e-002 4.9399890e-002 -1.2865040e-002 +v -4.2818980e-002 1.6220182e-001 -1.0337510e-002 +v -6.5593600e-002 1.7665711e-001 -6.0504730e-002 +v -3.4151080e-002 1.7442797e-001 -1.3312550e-002 +v 4.3673180e-002 5.0162230e-002 -5.9843500e-003 +v -5.0342410e-002 1.5546197e-001 -5.1927700e-003 +v 2.5464180e-002 5.4029700e-002 -2.1691010e-002 +v 1.0149790e-002 4.9258540e-002 -2.7750590e-002 +v -2.2043190e-002 5.3612020e-002 -3.0135610e-002 +v -3.2875520e-002 5.1677630e-002 -1.0888650e-002 +v -3.7613820e-002 4.9534770e-002 -1.1626140e-002 +v -4.0750630e-002 4.9285110e-002 -1.1286200e-002 +v -4.6385170e-002 4.7490850e-002 -1.0085980e-002 +v 4.4473170e-002 5.3293010e-002 -6.3327900e-003 +v 3.3205620e-002 5.1020650e-002 -7.2382500e-003 +v 1.5678350e-002 5.1169270e-002 -2.6397810e-002 +v 6.8341700e-003 5.5010170e-002 -3.0561130e-002 +v 2.1424700e-003 5.5502800e-002 -3.1334400e-002 +v 5.9285000e-004 5.2867950e-002 -3.0513830e-002 +v -3.6481400e-003 5.1869000e-002 -3.1457940e-002 +v -9.4245600e-003 5.5399220e-002 -3.3653980e-002 +v -1.9302150e-002 5.8224770e-002 -3.3919700e-002 +v -6.1084270e-002 1.3386190e-001 -7.2248900e-003 +v -4.3309760e-002 5.5656840e-002 -1.1402110e-002 +v -6.1080540e-002 1.6833773e-001 -5.9192060e-002 +v 4.7574690e-002 5.2943630e-002 -5.1300300e-003 +v -3.7403030e-002 1.1150775e-001 -1.8243310e-002 +v 1.9972490e-002 5.4409710e-002 -2.7108230e-002 +v 5.3974800e-003 5.8382570e-002 -3.0903760e-002 +v -1.0603590e-002 5.3602910e-002 -3.3403350e-002 +v -3.4998290e-002 5.2331560e-002 -1.0347380e-002 +v -4.6471230e-002 5.1304340e-002 -9.8299800e-003 +v -6.7945360e-002 1.1493603e-001 -9.5107300e-003 +v -7.1048210e-002 1.5161088e-001 -4.4679270e-002 +v -5.8903800e-003 3.4790620e-002 -2.4224470e-002 +v 1.6842140e-002 5.5555670e-002 -2.8284560e-002 +v 1.0711040e-002 5.4687610e-002 -2.9767520e-002 +v -1.1826800e-003 5.9492420e-002 -3.3360920e-002 +v -5.2325900e-003 5.5688960e-002 -3.2840220e-002 +v -5.1705830e-002 5.2470760e-002 -7.4047200e-003 +v -5.2626360e-002 6.0043760e-002 -8.9566900e-003 +v -7.2598590e-002 9.7762720e-002 -1.4434510e-002 +v 4.4331260e-002 5.5818010e-002 -6.0362700e-003 +v 3.8463400e-002 5.4934820e-002 -6.1822500e-003 +v 3.8838620e-002 5.7808260e-002 -5.2584800e-003 +v -9.2015400e-003 5.9510130e-002 -3.4437110e-002 +v -3.5262560e-002 5.5284900e-002 -1.0545060e-002 +v -3.8336450e-002 5.4503540e-002 -1.0905320e-002 +v -1.7727540e-002 3.6289540e-002 5.2222250e-002 +v 5.0006490e-002 5.8095800e-002 -4.6211800e-003 +v 4.6133970e-002 5.9278810e-002 -4.7769600e-003 +v 1.5110300e-002 5.9819840e-002 -2.8645750e-002 +v 1.0312380e-002 5.7586530e-002 -2.9995250e-002 +v -6.1353400e-003 6.0256790e-002 -3.4695830e-002 +v -1.2318220e-002 5.9396390e-002 -3.5268510e-002 +v -1.4466910e-002 6.3136020e-002 -3.6865870e-002 +v -4.6650260e-002 5.9840950e-002 -1.2135840e-002 +v -5.6572080e-002 1.2480275e-001 -7.1885700e-003 +v -7.9237500e-002 1.2055419e-001 -5.6744800e-003 +v -7.9334790e-002 1.2560650e-001 -6.1175900e-003 +v 2.2340000e-002 5.8492230e-002 -2.6014120e-002 +v 7.6270400e-003 6.2098330e-002 -3.1135840e-002 +v 3.3101700e-003 6.0456840e-002 -3.2481070e-002 +v -1.6811880e-002 6.1275230e-002 -3.5929330e-002 +v -3.2491910e-002 5.7196350e-002 -1.2104730e-002 +v -3.4108240e-002 6.1466560e-002 -1.3053130e-002 +v -3.3896980e-002 5.7025330e-002 -1.1047570e-002 +v -3.8623580e-002 5.8303290e-002 -1.1505750e-002 +v -4.5008400e-002 6.2723940e-002 -1.3390450e-002 +v -5.6896010e-002 1.3398739e-001 -5.6270700e-003 +v -4.4853890e-002 1.5746031e-001 -8.6731600e-003 +v -7.8609550e-002 6.9656870e-002 1.1810740e-002 +v -2.3730020e-002 1.0186156e-001 -2.3836400e-002 +v -2.8122930e-002 9.9322390e-002 -2.3580130e-002 +v -5.0076720e-002 1.4997652e-001 -3.6419700e-003 +v -3.3048420e-002 9.5958590e-002 -2.3426460e-002 +v 1.9520390e-002 6.2064770e-002 -2.7292470e-002 +v -3.8864710e-002 1.0333987e-001 -2.0641400e-002 +v -4.8952940e-002 5.6281090e-002 -1.0220880e-002 +v -5.3993040e-002 1.4498656e-001 -1.1093400e-003 +v -4.5530560e-002 9.8510850e-002 -2.1729510e-002 +v -5.0910960e-002 1.0074570e-001 -2.1619430e-002 +v 2.3245830e-002 6.2792530e-002 -2.5047990e-002 +v 9.7412800e-003 6.3181400e-002 -3.1141370e-002 +v -8.6614000e-004 6.4559630e-002 -3.4490930e-002 +v -8.5264000e-003 6.4001730e-002 -3.5850480e-002 +v -4.8451500e-002 6.4794120e-002 -1.3029910e-002 +v -5.2325160e-002 1.0614813e-001 -1.9271240e-002 +v -5.5265350e-002 1.0216682e-001 -1.9897100e-002 +v -5.9042010e-002 9.9032210e-002 -1.9222950e-002 +v -5.7846760e-002 1.0433496e-001 -1.8525740e-002 +v -2.7113460e-002 1.7332156e-001 -1.8538890e-002 +v 2.2832000e-002 6.7082570e-002 -2.6297510e-002 +v 1.4519060e-002 6.4595540e-002 -2.9855690e-002 +v 1.1471330e-002 6.7581440e-002 -3.0901170e-002 +v -1.7739360e-002 6.6260830e-002 -3.7657310e-002 +v -6.5059750e-002 1.3452104e-001 -8.0899900e-003 +v -7.5829320e-002 1.4244605e-001 -5.8090000e-003 +v -4.1362350e-002 6.1637330e-002 -1.2813770e-002 +v -5.6147890e-002 6.1921550e-002 -5.7541100e-003 +v -6.2126110e-002 6.2845360e-002 -4.5202600e-003 +v -3.7292480e-002 1.6449057e-001 -1.3627050e-002 +v -1.9818920e-002 1.6509494e-001 -1.7608980e-002 +v 6.2881100e-003 6.5416350e-002 -3.2563040e-002 +v -5.9250500e-003 6.9515630e-002 -3.5933480e-002 +v -1.0538630e-002 6.7999180e-002 -3.6517060e-002 +v -3.5385700e-002 6.6817430e-002 -1.5434860e-002 +v -5.3994500e-002 6.4638700e-002 -9.3254900e-003 +v -6.3852310e-002 6.5572310e-002 -6.9393300e-003 +v -6.3920880e-002 1.2774242e-001 -8.5494600e-003 +v -2.6940700e-002 3.6184050e-002 5.3351850e-002 +v 1.9618650e-002 6.7007390e-002 -2.8356120e-002 +v 1.2275180e-002 6.9933940e-002 -3.1553160e-002 +v 5.4265100e-003 6.8247960e-002 -3.2730520e-002 +v -4.4084200e-003 6.6619200e-002 -3.4870250e-002 +v -2.1911350e-002 6.7144790e-002 -3.6535750e-002 +v -4.5643150e-002 1.5466949e-001 -7.2969400e-003 +v -5.1673460e-002 6.6850660e-002 -1.2120350e-002 +v -5.8105180e-002 6.6465950e-002 -1.0044340e-002 +v -5.6992260e-002 1.4311862e-001 -2.2403000e-003 +v -8.0651110e-002 1.3119854e-001 -4.4397800e-003 +v -5.6544310e-002 1.2850938e-001 -6.2014700e-003 +v 1.7758080e-002 7.0138540e-002 -2.9404680e-002 +v 6.4980500e-003 7.0791870e-002 -3.3525310e-002 +v 7.5831000e-004 7.0434460e-002 -3.4462560e-002 +v -1.3235950e-002 6.9292820e-002 -3.7917490e-002 +v -6.7390780e-002 1.1889688e-001 -8.7301400e-003 +v -3.8119520e-002 6.4162310e-002 -1.3829140e-002 +v 1.8527400e-003 1.1303356e-001 -1.9794270e-002 +v -7.5950810e-002 6.8170610e-002 1.8117970e-002 +v -1.0001990e-002 7.2671480e-002 -3.7661370e-002 +v -1.7976070e-002 7.0613770e-002 -3.8443880e-002 +v -2.3035990e-002 7.2778460e-002 -3.8072640e-002 +v -2.6120100e-002 7.1177480e-002 -3.5451530e-002 +v -6.8535420e-002 1.3929375e-001 -7.8046600e-003 +v -3.5263040e-002 7.1067650e-002 -1.8011860e-002 +v -4.1558180e-002 6.9774010e-002 -1.6774100e-002 +v -5.2831730e-002 7.0298920e-002 -1.4864960e-002 +v -6.6978850e-002 6.7638980e-002 -6.8094400e-003 +v -1.0244470e-002 1.7895826e-001 -2.9538870e-002 +v -7.5272650e-002 1.2680098e-001 -8.0241700e-003 +v -8.7359900e-002 1.1248315e-001 4.2049490e-002 +v 8.7503000e-003 7.4301560e-002 -3.3398210e-002 +v -6.4249520e-002 1.6045024e-001 -5.7041470e-002 +v -4.4354010e-002 7.3372220e-002 -1.7874430e-002 +v -4.5762580e-002 6.9445320e-002 -1.5928780e-002 +v -4.7957440e-002 7.2542990e-002 -1.6106990e-002 +v -5.7822630e-002 6.9538010e-002 -1.4416470e-002 +v -7.2071600e-002 7.1538150e-002 -7.4714400e-003 +v 2.5472930e-002 7.4094500e-002 -2.4938540e-002 +v 1.5719730e-002 7.3756350e-002 -2.9747770e-002 +v 4.8214000e-003 7.3763980e-002 -3.4552450e-002 +v -2.2528600e-003 7.3921320e-002 -3.5887190e-002 +v -7.3834900e-003 7.4799620e-002 -3.7223830e-002 +v -2.0225340e-002 7.7095190e-002 -3.9044290e-002 +v -3.4016180e-002 7.2101270e-002 -2.0823150e-002 +v -3.8493370e-002 7.2839870e-002 -1.7502230e-002 +v -6.4392550e-002 7.3116330e-002 -1.5335340e-002 +v -6.4480660e-002 7.0187350e-002 -1.2261750e-002 +v -2.3854330e-002 1.6164528e-001 -1.4504190e-002 +v 2.2104450e-002 7.2692600e-002 -2.6900140e-002 +v 1.5532370e-002 7.6586960e-002 -2.9606940e-002 +v 1.1574050e-002 7.4860570e-002 -3.1383860e-002 +v -1.4731560e-002 7.7640750e-002 -3.8490670e-002 +v -1.6018820e-002 7.4288800e-002 -3.8864420e-002 +v -5.1103620e-002 7.3071950e-002 -1.6243060e-002 +v -5.7989540e-002 7.4017880e-002 -1.7522320e-002 +v -6.9608380e-002 7.2322890e-002 -1.0934430e-002 +v -7.5996110e-002 1.1714132e-001 -6.5577200e-003 +v -3.7987660e-002 1.0751453e-001 -1.9975760e-002 +v 1.0696210e-002 7.9889200e-002 -3.2009580e-002 +v -5.3433400e-003 7.8264580e-002 -3.7476940e-002 +v -2.6081990e-002 7.6191290e-002 -3.6780200e-002 +v -3.9161040e-002 1.5718885e-001 -1.0580510e-002 +v -6.5609880e-002 7.5860010e-002 -1.6750060e-002 +v -7.0177600e-002 7.5663330e-002 -1.3839210e-002 +v -7.4291360e-002 7.4808360e-002 -9.3537900e-003 +v -6.3428890e-002 1.7185387e-001 -6.1412170e-002 +v 3.0684890e-002 7.5726870e-002 -2.0778090e-002 +v 1.9305010e-002 7.9017870e-002 -2.7743990e-002 +v -8.5992100e-003 7.9338730e-002 -3.7905180e-002 +v -2.3200110e-002 7.6568500e-002 -3.8386500e-002 +v -3.8117820e-002 7.6390120e-002 -1.8644360e-002 +v -4.4231130e-002 7.7664130e-002 -1.9026580e-002 +v -5.1025500e-002 7.5705070e-002 -1.8186900e-002 +v -7.0595130e-002 1.2994832e-001 -8.7629200e-003 +v 2.8147660e-002 7.8785370e-002 -2.2432450e-002 +v 7.6016000e-003 7.9435920e-002 -3.3714560e-002 +v 4.9502400e-003 7.8027250e-002 -3.4409750e-002 +v -1.5858350e-002 8.1165550e-002 -3.9185590e-002 +v -1.8502080e-002 8.3343870e-002 -3.9010720e-002 +v -7.9739350e-002 1.3606854e-001 -4.1482100e-003 +v -3.0980180e-002 1.6634656e-001 -1.6241160e-002 +v -3.5749800e-002 7.7248350e-002 -1.9374020e-002 +v -4.8944740e-002 7.9086360e-002 -1.9575700e-002 +v -5.5065860e-002 7.8089190e-002 -1.9755480e-002 +v 2.3706000e-002 8.0240410e-002 -2.5450120e-002 +v 1.2254110e-002 8.3456700e-002 -3.0771580e-002 +v 1.8549900e-003 8.4692790e-002 -3.4838500e-002 +v -2.0857000e-004 7.8941410e-002 -3.5782080e-002 +v -4.2710000e-004 8.2947370e-002 -3.6380660e-002 +v -4.4101600e-003 8.2794510e-002 -3.7467250e-002 +v -3.3202320e-002 1.0578320e-001 -2.0647590e-002 +v -3.9206970e-002 8.1536380e-002 -2.0571000e-002 +v -6.0355410e-002 7.9766610e-002 -1.9375540e-002 +v -4.1771830e-002 1.0396706e-001 -2.0832940e-002 +v -1.1204010e-002 8.2713320e-002 -3.8489610e-002 +v -2.3181500e-002 8.1686990e-002 -3.8329160e-002 +v -2.7233190e-002 8.0570950e-002 -3.6620670e-002 +v -3.5470180e-002 8.0196070e-002 -2.2325910e-002 +v -4.4864210e-002 8.1997900e-002 -2.0473520e-002 +v -5.0647890e-002 8.2309430e-002 -2.1365890e-002 +v -5.5522610e-002 8.1927600e-002 -2.1353790e-002 +v -8.8089610e-002 1.1135484e-001 1.8516150e-002 +v -7.2036080e-002 1.1107918e-001 4.5361400e-002 +v -3.3359780e-002 1.6986395e-001 -1.5448990e-002 +v -6.6839030e-002 6.2170510e-002 2.1576840e-002 +v 3.0730560e-002 8.1968990e-002 -2.0040460e-002 +v 1.6224320e-002 8.6480380e-002 -2.8952010e-002 +v -6.9855630e-002 1.0027892e-001 -1.4847830e-002 +v -6.3836170e-002 8.1704600e-002 -1.8908860e-002 +v -6.7914820e-002 8.0136290e-002 -1.7128200e-002 +v -4.5752080e-002 1.6340754e-001 -8.1780500e-003 +v 1.1727540e-002 8.8010780e-002 -3.0860110e-002 +v 7.3334800e-003 8.5270000e-002 -3.2829380e-002 +v -3.4356500e-003 8.7017890e-002 -3.6461000e-002 +v -2.6964110e-002 8.4512810e-002 -3.6361740e-002 +v -3.6553370e-002 8.5316190e-002 -2.2576200e-002 +v -3.8791090e-002 8.5232710e-002 -2.1917600e-002 +v -5.7676940e-002 8.6258340e-002 -2.1098320e-002 +v -6.2581810e-002 8.6394530e-002 -1.9169290e-002 +v -7.1395340e-002 1.2468846e-001 -8.5944200e-003 +v 1.4801570e-002 9.9040900e-002 -2.2842920e-002 +v -2.1162860e-002 1.7491852e-001 -2.1977110e-002 +v -1.4824250e-002 8.7288840e-002 -3.8317070e-002 +v -2.3285750e-002 8.9468030e-002 -3.6027250e-002 +v -5.1595650e-002 8.4422070e-002 -2.1600960e-002 +v -6.9481040e-002 8.5656460e-002 -1.7198420e-002 +v -7.0917210e-002 1.0754846e-001 -1.1496630e-002 +v 3.0145320e-002 8.6284000e-002 -2.0408140e-002 +v -5.5578110e-002 1.1567692e-001 -1.4645990e-002 +v -8.0981100e-003 8.9070080e-002 -3.6552200e-002 +v -8.1206310e-002 1.1205088e-001 -8.8299000e-004 +v -1.8772170e-002 8.9838040e-002 -3.6991710e-002 +v -2.1100420e-002 8.6587670e-002 -3.7849050e-002 +v -2.5809910e-002 8.8889590e-002 -3.5082250e-002 +v -4.8984800e-002 9.0731760e-002 -2.1817170e-002 +v -3.5874870e-002 3.4776000e-002 -3.0845200e-002 +v -3.3164390e-002 3.3606540e-002 -2.9721880e-002 +v -2.5964020e-002 3.3487000e-002 -2.6321120e-002 +v -1.6717530e-002 3.3611640e-002 -2.4625420e-002 +v -5.3486300e-003 3.3829010e-002 -2.2600430e-002 +v 6.4843500e-003 3.4293000e-002 -2.0854930e-002 +v 1.3950350e-002 3.4880000e-002 -1.8612870e-002 +v -4.2465980e-002 3.4189100e-002 -2.7260650e-002 +v -3.3241100e-002 3.3578760e-002 -2.6719450e-002 +v 6.2813500e-003 3.4165800e-002 -1.8764230e-002 +v -4.4265790e-002 3.3663660e-002 -2.1914420e-002 +v -2.3671460e-002 3.3630970e-002 -2.3217760e-002 +v -1.1558580e-002 3.3895430e-002 -2.1054260e-002 +v -2.0406400e-003 3.4053940e-002 -1.9331070e-002 +v 1.7323900e-003 3.4459660e-002 -1.6607870e-002 +v -2.7316070e-002 3.3910070e-002 -2.1353750e-002 +v -1.3371080e-002 3.4361580e-002 -1.9023720e-002 +v 9.5887300e-003 3.4207220e-002 -1.5424050e-002 +v -1.4981540e-002 3.5878180e-002 -1.7992380e-002 +v -2.3474300e-003 3.5903130e-002 -1.5929740e-002 +v 2.2544300e-003 3.6411540e-002 -1.4783970e-002 +v -3.5199130e-002 3.3835210e-002 -2.0508290e-002 +v -2.6075450e-002 3.5918600e-002 -1.9405170e-002 +v 8.2740600e-003 3.5645200e-002 -1.2648700e-002 +v 1.0473640e-002 3.4742600e-002 -1.1262870e-002 +v 1.4055380e-002 3.4483430e-002 -1.4495730e-002 +v -3.6970520e-002 3.5680360e-002 -1.5007790e-002 +v -2.4719500e-003 3.8408770e-002 -1.4159030e-002 +v -3.9481890e-002 3.3618220e-002 -2.3612470e-002 +v -4.1091510e-002 3.4006000e-002 -1.1997540e-002 +v -3.1589810e-002 3.5592330e-002 -1.9204150e-002 +v -2.0086310e-002 3.8064450e-002 -1.7220790e-002 +v -1.1113250e-002 3.8290290e-002 -1.5646360e-002 +v 4.4522600e-003 3.7705190e-002 -1.2957650e-002 +v 1.5870480e-002 3.4416230e-002 -2.9666500e-003 +v -4.7872000e-002 3.4136300e-002 -1.5418250e-002 +v -4.7521640e-002 3.3622720e-002 -1.2804590e-002 +v -3.3407340e-002 3.7577040e-002 -1.6158190e-002 +v -2.7851470e-002 3.8404330e-002 -1.7210420e-002 +v -8.5065300e-003 3.9028950e-002 -1.3000800e-002 +v 6.4552500e-003 3.8165190e-002 -1.0164860e-002 +v 7.4147100e-003 3.4659190e-002 -3.0116800e-003 +v 1.1966200e-002 3.4335400e-002 -5.9571300e-003 +v 2.0414820e-002 3.5567580e-002 -3.7806900e-003 +v -1.9288780e-002 3.8762570e-002 -1.4202620e-002 +v -1.1390100e-003 3.9176760e-002 -1.0381370e-002 +v 3.8149200e-003 3.9024470e-002 -8.0827300e-003 +v 7.5208200e-003 3.6733400e-002 -6.7614300e-003 +v 1.9968120e-002 3.4843990e-002 -1.8984900e-003 +v -4.5058400e-002 3.3600490e-002 -1.2527510e-002 +v -3.0754850e-002 3.8639810e-002 -1.4050770e-002 +v -5.1499810e-002 3.3729110e-002 -1.2082510e-002 +v -2.3756860e-002 3.8585750e-002 -1.1093270e-002 +v 3.9734700e-003 3.8208550e-002 -3.7963500e-003 +v 9.5485400e-003 3.4232620e-002 1.7162000e-003 +v 2.9086550e-002 3.5799990e-002 3.5630900e-003 +v -5.5965200e-002 3.3529910e-002 -9.1246200e-003 +v -1.9523510e-002 3.8505210e-002 -4.5434500e-003 +v 1.6363470e-002 3.4394790e-002 2.2948600e-003 +v 2.1324740e-002 3.4624040e-002 5.6444000e-003 +v -3.9670300e-002 3.6174000e-002 -7.3397700e-003 +v -1.4251730e-002 3.8648030e-002 -4.3030400e-003 +v 2.3262300e-003 3.5348200e-002 2.3246000e-003 +v 1.4014300e-002 3.5703800e-002 3.8878900e-003 +v 1.5322800e-002 3.6239700e-002 3.6628500e-003 +v 2.3753130e-002 3.4670710e-002 3.9885300e-003 +v 3.2369180e-002 3.5816010e-002 7.0246300e-003 +v -6.3715900e-002 3.3776930e-002 -8.0065600e-003 +v -6.4266880e-002 3.3562500e-002 -5.1253200e-003 +v -3.8066600e-002 3.8518600e-002 -7.3079600e-003 +v -9.4308800e-003 3.8887690e-002 -7.4848700e-003 +v 3.9677800e-003 3.4200210e-002 4.9754500e-003 +v 9.4292600e-003 3.6030400e-002 4.5275100e-003 +v 2.9859020e-002 3.4980130e-002 9.8349300e-003 +v -5.2730060e-002 3.3497900e-002 -1.8117500e-003 +v -4.1271000e-002 3.3855400e-002 -1.8800800e-003 +v -3.1105000e-003 3.8946190e-002 -2.7793900e-003 +v 6.2194100e-003 3.5134100e-002 6.5492800e-003 +v 2.0897900e-002 3.5937100e-002 8.7849000e-003 +v 3.5606010e-002 3.6526640e-002 9.8155300e-003 +v -6.7078340e-002 3.3840100e-002 -6.1688300e-003 +v -8.1140000e-004 3.7424170e-002 4.7721500e-003 +v 3.1492300e-003 3.4125310e-002 1.1762220e-002 +v 4.9172000e-003 3.3997100e-002 9.1666100e-003 +v 2.5130800e-002 3.4546910e-002 1.1012580e-002 +v 2.8248620e-002 3.5046370e-002 1.6016700e-002 +v -6.7032970e-002 6.5145960e-002 2.7292860e-002 +v -4.6380170e-002 3.3605230e-002 -8.9435000e-004 +v -3.3163400e-002 3.8195400e-002 -5.2520000e-004 +v -3.2074200e-002 3.8323400e-002 -4.2109000e-004 +v -2.1692690e-002 3.8266010e-002 4.5100800e-003 +v 2.3930750e-002 3.4816710e-002 1.7739160e-002 +v 4.2719120e-002 3.9977070e-002 8.9321600e-003 +v -5.8604080e-002 3.3462230e-002 -2.1667000e-004 +v -3.7314400e-002 3.3633000e-002 4.5724700e-003 +v -1.0423990e-002 3.8488570e-002 6.2292700e-003 +v -1.3896900e-003 3.8651360e-002 2.3966500e-003 +v -3.0845000e-004 3.5462480e-002 8.2607200e-003 +v -1.4089000e-003 3.6193080e-002 1.2944550e-002 +v 2.2252900e-002 3.6583300e-002 1.3979700e-002 +v -7.0961830e-002 3.4345730e-002 -7.8374000e-004 +v -6.9066180e-002 3.3717630e-002 -1.9761000e-004 +v -6.4825640e-002 3.3505860e-002 2.8222500e-003 +v -4.7059660e-002 3.3501860e-002 3.5646400e-003 +v -3.6953800e-003 3.8172780e-002 1.3046800e-002 +v 3.3475850e-002 3.6447340e-002 1.6266960e-002 +v 3.7249610e-002 3.7509920e-002 1.4815820e-002 +v -4.5675940e-002 3.3703640e-002 6.4300300e-003 +v -3.8639270e-002 3.3937310e-002 8.5506500e-003 +v -9.5064100e-003 3.8352640e-002 1.5570660e-002 +v 2.1499800e-002 3.5807100e-002 1.8169400e-002 +v 4.4876460e-002 4.1230990e-002 1.6008250e-002 +v -7.2474010e-002 3.6255930e-002 1.5532600e-003 +v -7.1498130e-002 3.4452970e-002 4.2026500e-003 +v -2.7790900e-002 3.8062900e-002 7.9376100e-003 +v -1.6556410e-002 3.8286470e-002 1.0215790e-002 +v 8.1043500e-003 3.4842900e-002 1.8134600e-002 +v 2.3589460e-002 3.5890600e-002 2.5337690e-002 +v 4.1261350e-002 4.0585070e-002 2.0751930e-002 +v -5.1350870e-002 3.3645700e-002 8.0329400e-003 +v -4.7104300e-002 3.5549500e-002 8.0803900e-003 +v -1.4103500e-003 3.6999940e-002 1.6982030e-002 +v 9.1714000e-004 3.4803380e-002 1.5634690e-002 +v 2.8887900e-003 3.4636250e-002 1.8849770e-002 +v 1.3279200e-002 3.4379500e-002 2.1423700e-002 +v 1.4322700e-002 3.4425500e-002 2.1593200e-002 +v 1.7490100e-002 3.4646300e-002 2.2040900e-002 +v 2.9868460e-002 3.6248820e-002 1.9872200e-002 +v -3.9222000e-002 3.6326200e-002 1.0789900e-002 +v -3.0307100e-002 3.3995400e-002 1.4706400e-002 +v 2.0081230e-002 3.5172700e-002 2.8018770e-002 +v 2.4989010e-002 3.8104580e-002 2.9429570e-002 +v 3.3584130e-002 3.8303930e-002 2.2928670e-002 +v 4.9015720e-002 4.4573630e-002 2.0659450e-002 +v -5.8225970e-002 6.6607310e-002 3.5050280e-002 +v -6.7330830e-002 3.3846440e-002 8.7266300e-003 +v -3.4692330e-002 3.3828710e-002 1.2438580e-002 +v -2.9803200e-002 3.4287000e-002 1.6353100e-002 +v 1.7023800e-003 3.6310890e-002 2.1179600e-002 +v 4.5137020e-002 4.4625440e-002 2.5516510e-002 +v -6.8876490e-002 1.1022176e-001 3.9004630e-002 +v -5.7680560e-002 3.3622690e-002 1.4040310e-002 +v -5.3210500e-002 3.3585300e-002 1.3987000e-002 +v -3.5711600e-002 3.5891600e-002 1.5502900e-002 +v -2.8861500e-002 3.5396700e-002 1.7350000e-002 +v -2.6580500e-002 3.7742600e-002 1.5705300e-002 +v -1.0974400e-003 3.8147840e-002 2.0427010e-002 +v 3.5047710e-002 4.0973940e-002 2.6970390e-002 +v -6.9685460e-002 3.4478780e-002 9.7984300e-003 +v -5.4019000e-002 3.3309900e-002 1.5848000e-002 +v 4.4816800e-003 3.7117830e-002 2.4755300e-002 +v 6.6605500e-003 3.5204730e-002 2.4315930e-002 +v 8.3833000e-003 3.4748700e-002 2.4057310e-002 +v 3.8883100e-002 4.1032980e-002 2.4976570e-002 +v -2.6441900e-003 3.8727070e-002 2.5131260e-002 +v 3.2222300e-003 3.8708440e-002 2.5898750e-002 +v 9.0016500e-003 3.6890930e-002 2.8482190e-002 +v 1.3196980e-002 3.4835790e-002 3.1630980e-002 +v 2.2291600e-002 3.7053310e-002 3.3101020e-002 +v 2.8948390e-002 3.9160020e-002 2.7234810e-002 +v -8.7773470e-002 1.1181412e-001 3.7144310e-002 +v -1.7870490e-002 3.8203890e-002 2.0243220e-002 +v 1.0087420e-002 3.7047690e-002 3.0822500e-002 +v 4.2296550e-002 4.5435770e-002 2.9040920e-002 +v -8.4341340e-002 1.1388013e-001 4.6513480e-002 +v -7.3795710e-002 1.0895629e-001 3.9217250e-002 +v -5.1243340e-002 6.4239200e-002 3.4258040e-002 +v -6.1777390e-002 3.4017860e-002 1.6900580e-002 +v -3.6665100e-002 3.5304200e-002 2.3032000e-002 +v -1.4930180e-002 3.8643510e-002 2.9378330e-002 +v -8.0894520e-002 1.0967225e-001 3.7910230e-002 +v -8.9822620e-002 1.1387199e-001 3.2845310e-002 +v -6.9655510e-002 6.8728370e-002 3.1127880e-002 +v -7.8449800e-002 1.0988832e-001 4.2517920e-002 +v -7.5824140e-002 1.0794900e-001 3.7128750e-002 +v -5.5740630e-002 3.4128050e-002 2.6674360e-002 +v -3.8279600e-002 3.5429000e-002 2.4380600e-002 +v -3.5283340e-002 3.4179780e-002 2.2744860e-002 +v -2.5798070e-002 3.7865000e-002 1.9981460e-002 +v 6.9064300e-003 3.9004270e-002 2.9548510e-002 +v 1.5448990e-002 3.4852440e-002 3.6984890e-002 +v 1.9128230e-002 3.5640640e-002 3.6642280e-002 +v -6.3664970e-002 6.6047840e-002 3.1828080e-002 +v 3.9604800e-002 4.4939530e-002 2.9992360e-002 +v -8.0294310e-002 7.1702430e-002 1.5995300e-002 +v -5.4185430e-002 6.7322700e-002 3.6935610e-002 +v -7.3110210e-002 1.4847168e-001 -2.8748470e-002 +v -5.8999980e-002 7.3751550e-002 4.1197080e-002 +v -5.9520730e-002 6.1040260e-002 -2.3753800e-003 +v -6.2791800e-002 3.4596760e-002 2.3505640e-002 +v -4.1895500e-002 3.3668300e-002 2.6940000e-002 +v 8.9808200e-003 3.7639400e-002 3.3900800e-002 +v 8.5287800e-003 3.4888000e-002 3.6265100e-002 +v -8.9803890e-002 1.1498106e-001 4.2771650e-002 +v -6.5545420e-002 7.4430370e-002 3.9168070e-002 +v -6.4644190e-002 6.1723230e-002 2.2552000e-004 +v 5.2496900e-003 3.9507100e-002 3.3271200e-002 +v 2.0250320e-002 3.7033170e-002 3.9327190e-002 +v -6.7006400e-002 6.3292870e-002 -1.7493900e-003 +v -6.4479770e-002 6.0651470e-002 4.2343200e-003 +v -5.7219630e-002 5.7000470e-002 4.9175800e-003 +v -7.4362810e-002 7.2437050e-002 3.1430040e-002 +v -6.2019000e-002 3.4343180e-002 3.1883280e-002 +v -4.6870820e-002 3.4444130e-002 3.0513130e-002 +v -2.0814280e-002 3.8400960e-002 2.7868430e-002 +v 1.6439350e-002 3.5635110e-002 4.1281040e-002 +v -6.9087160e-002 1.1205014e-001 4.5320060e-002 +v -7.1811570e-002 1.4861318e-001 -3.4639490e-002 +v -6.9538770e-002 6.3074750e-002 3.5758200e-003 +v -8.4863890e-002 7.8392100e-002 1.6462010e-002 +v -9.1188780e-002 1.1588893e-001 2.4705540e-002 +v -8.8827760e-002 1.1359169e-001 2.3873640e-002 +v -7.1302830e-002 1.1325363e-001 4.9444530e-002 +v -5.4876950e-002 7.0282330e-002 3.8828200e-002 +v -7.7208880e-002 1.0715887e-001 3.4738290e-002 +v -6.1241780e-002 5.9007440e-002 8.0916600e-003 +v -6.5885650e-002 3.5025080e-002 2.9416520e-002 +v -5.7889430e-002 3.4419570e-002 3.6265760e-002 +v -5.1847710e-002 3.4470270e-002 3.4635180e-002 +v -3.4834600e-002 3.4721400e-002 3.4578200e-002 +v -3.0984700e-002 3.8191900e-002 3.2390100e-002 +v -4.9613100e-003 3.9364900e-002 3.6702200e-002 +v 1.2224170e-002 3.5177480e-002 4.2620580e-002 +v -7.4898220e-002 1.1458863e-001 5.0776480e-002 +v -8.0469100e-002 1.1357963e-001 4.6643440e-002 +v -7.4107560e-002 6.9586030e-002 2.7264400e-002 +v -7.9002620e-002 7.6339320e-002 2.9248090e-002 +v -6.5297080e-002 3.4778970e-002 3.3744340e-002 +v -3.3656400e-002 3.4344100e-002 3.6914100e-002 +v 4.9318500e-003 3.4814800e-002 4.3462110e-002 +v 1.1347440e-002 3.6213020e-002 4.4652280e-002 +v -6.0569260e-002 7.1154540e-002 3.8653760e-002 +v -8.8979470e-002 1.1450869e-001 2.8446030e-002 +v -6.8543520e-002 6.1090480e-002 1.0557760e-002 +v -8.2710960e-002 1.1648975e-001 4.8518530e-002 +v -4.1913210e-002 3.4467720e-002 3.3200040e-002 +v -1.1289800e-002 3.9529200e-002 3.8844100e-002 +v -2.8261900e-003 3.4885340e-002 4.5611410e-002 +v -6.4561210e-002 5.9484140e-002 1.3061680e-002 +v -5.8581440e-002 5.7801460e-002 1.3429540e-002 +v -2.3320000e-002 3.9169500e-002 3.8473300e-002 +v -1.8159900e-002 3.9322300e-002 3.9402900e-002 +v -1.6471400e-002 3.4812800e-002 4.3684700e-002 +v 3.2906600e-003 3.5833470e-002 4.6024610e-002 +v -8.5229630e-002 1.1200712e-001 3.0416940e-002 +v -8.5644730e-002 1.1131719e-001 3.4234780e-002 +v -7.4530360e-002 6.6680690e-002 4.6953300e-003 +v -7.1112970e-002 6.2751470e-002 8.7995500e-003 +v -6.1149380e-002 5.8834410e-002 1.6539440e-002 +v -4.6912270e-002 3.4627180e-002 3.9739710e-002 +v -4.0760350e-002 3.4668230e-002 4.0492530e-002 +v -2.6323100e-002 3.4658000e-002 4.3473500e-002 +v -3.1836600e-003 3.6229910e-002 4.7873100e-002 +v -7.9940490e-002 1.0916678e-001 3.4119800e-002 +v -5.9712170e-002 6.3165280e-002 2.8789180e-002 +v -5.1176600e-002 6.8061880e-002 3.7398330e-002 +v -5.0126580e-002 7.0933150e-002 3.9481010e-002 +v -7.2790130e-002 6.4399880e-002 1.5205950e-002 +v -6.8511230e-002 6.1214650e-002 1.5354080e-002 +v -3.9343210e-002 3.5440180e-002 4.2492560e-002 +v -8.1305900e-003 3.5008350e-002 4.7502400e-002 +v -6.6080670e-002 7.0202740e-002 3.5552860e-002 +v -6.8602600e-002 1.4992277e-001 -4.0051350e-002 +v -7.1722100e-002 6.7023040e-002 2.4959750e-002 +v -7.5115010e-002 6.6557040e-002 1.0244090e-002 +v -6.5146650e-002 3.5945650e-002 3.9775080e-002 +v -3.6898600e-002 3.5924640e-002 4.4794170e-002 +v -9.4780400e-003 3.5977600e-002 4.9434210e-002 +v -8.5175960e-002 1.1706809e-001 4.8139420e-002 +v -6.3366400e-002 6.2790260e-002 2.5647610e-002 +v -6.6633330e-002 6.1001700e-002 1.8101240e-002 +v -5.8167590e-002 5.9985190e-002 2.2606060e-002 +v -6.4212210e-002 3.4992560e-002 3.9401920e-002 +v -5.3425790e-002 3.4560020e-002 4.2782420e-002 +v -1.8031490e-002 3.4859970e-002 4.9264760e-002 +v -1.1440410e-002 3.7640770e-002 5.0275730e-002 +v -7.5165320e-002 1.1154286e-001 4.6707180e-002 +v -7.7168390e-002 6.9826450e-002 5.0605600e-003 +v -7.2801360e-002 6.4382590e-002 1.2089080e-002 +v -7.8022000e-002 7.0995160e-002 2.1322150e-002 +v -6.1263370e-002 3.4690410e-002 4.1994900e-002 +v -5.4403750e-002 3.5007310e-002 4.4874590e-002 +v -4.5754280e-002 3.5206980e-002 4.3518120e-002 +v -3.3832440e-002 3.5168820e-002 4.6957890e-002 +v -2.8657630e-002 3.5083380e-002 5.0549440e-002 +v -1.5306440e-002 3.5246410e-002 5.0133810e-002 +v -6.5283650e-002 1.5592447e-001 -4.9865930e-002 +v -6.6467860e-002 1.4871539e-001 -3.1579300e-002 +v -6.2095980e-002 1.6388324e-001 -5.8385930e-002 +v -6.3274890e-002 1.5245731e-001 -3.2221730e-002 +v -4.3755720e-002 1.4773408e-001 -2.1433200e-003 +v -6.5696940e-002 1.4561631e-001 -1.8974710e-002 +v -6.6713650e-002 1.5358824e-001 -4.9097100e-002 +v -1.0482810e-002 1.6668287e-001 -2.1746090e-002 +v -6.2744510e-002 1.6397531e-001 -5.9398280e-002 +v -7.0413230e-002 1.4129200e-001 -8.4590800e-003 +v -6.1530380e-002 1.4037628e-001 -6.2734700e-003 +v -1.1452460e-002 1.7220633e-001 -2.6844980e-002 +v -6.3731140e-002 1.6577037e-001 -6.0103610e-002 +v -2.8218820e-002 1.5758144e-001 -1.0999490e-002 +v -1.8471270e-002 1.5967716e-001 -1.1169510e-002 +v -6.6700710e-002 1.5236775e-001 -4.5266390e-002 +v -4.9896410e-002 1.4670859e-001 -1.8614200e-003 +v -3.1449640e-002 1.5460463e-001 -7.6802300e-003 +v -6.7447660e-002 1.5507675e-001 -5.1594250e-002 +v -1.0906650e-002 1.7649301e-001 -2.9246300e-002 +v -7.2083600e-002 1.4965550e-001 -3.9265860e-002 +v -6.4230830e-002 1.4877806e-001 -2.5899710e-002 +v -6.3056640e-002 1.4341650e-001 -7.4907700e-003 +v -5.3043350e-002 1.4092550e-001 -4.7408000e-004 +v -3.9269410e-002 1.5205232e-001 -6.6203800e-003 +v -6.4796930e-002 1.5210615e-001 -3.6185520e-002 +v -6.4400320e-002 1.5834400e-001 -5.4256370e-002 +v -6.6178120e-002 1.4218350e-001 -9.3766300e-003 +v -6.7751430e-002 1.4605207e-001 -2.3333300e-002 +v -6.4731580e-002 1.5410067e-001 -4.0464820e-002 +v -2.4265590e-002 1.5687690e-001 -7.8509300e-003 +v -1.5723180e-002 1.6312344e-001 -1.6396570e-002 +v -7.0887660e-002 1.4404618e-001 -1.4908480e-002 +v -4.4341830e-002 1.5113809e-001 -5.6859800e-003 +v -6.2896810e-002 1.4694778e-001 -1.3098620e-002 +v -6.3755400e-002 1.4428875e-001 -1.1395730e-002 +v -6.8214560e-002 1.4390932e-001 -1.4984170e-002 +v -5.0271440e-002 1.4336563e-001 1.5153000e-003 +v -2.8535590e-002 1.6208479e-001 -1.4786030e-002 +v -6.5810700e-002 1.4359119e-001 -1.2585380e-002 +v -5.6179200e-002 1.3774406e-001 -4.0674300e-003 +v -6.8866880e-002 1.4723338e-001 -2.8739870e-002 +v -6.0965420e-002 1.7002113e-001 -6.0839390e-002 +v -1.3895490e-002 1.6787168e-001 -2.1897230e-002 +v -6.9413000e-002 1.5121847e-001 -4.4538540e-002 +v -5.5039800e-002 5.7309700e-002 1.6990900e-002 +f 1069 1647 1578 +f 1058 909 939 +f 421 1176 238 +f 1055 1101 1042 +f 238 1059 1126 +f 1254 30 1261 +f 1065 1071 1 +f 1037 1130 1120 +f 1570 2381 1585 +f 2434 2502 2473 +f 1632 1654 1646 +f 1144 1166 669 +f 1202 1440 305 +f 1071 1090 1 +f 1555 1570 1584 +f 1184 1174 404 +f 65 432 12 +f 1032 1085 574 +f 1789 2207 2223 +f 1154 1118 1184 +f 1141 1086 1154 +f 99 1117 342 +f 404 1174 419 +f 489 2000 1998 +f 1118 1174 1184 +f 1196 403 136 +f 1495 717 1490 +f 1804 402 1207 +f 2272 1398 891 +f 1100 1002 804 +f 1596 1595 2381 +f 208 420 1207 +f 402 208 1207 +f 1455 1935 1925 +f 1176 1059 238 +f 1150 1040 348 +f 1957 1537 2051 +f 1124 1189 939 +f 1804 1207 1823 +f 1381 1300 1109 +f 383 384 1182 +f 1085 1086 1141 +f 1040 1046 132 +f 220 1495 1188 +f 420 261 1207 +f 261 420 1065 +f 1055 1133 1101 +f 1054 421 403 +f 182 1109 2 +f 1181 1207 320 +f 545 1570 1561 +f 35 342 432 +f 1024 574 1141 +f 432 342 12 +f 1489 1081 1547 +f 1181 320 1805 +f 1516 1683 1507 +f 357 1117 1047 +f 1561 1570 1555 +f 1090 1196 1206 +f 1047 1203 1051 +f 1165 202 1121 +f 1099 341 301 +f 1174 240 419 +f 922 921 833 +f 1121 1080 385 +f 815 21 1183 +f 35 99 342 +f 1083 398 262 +f 106 94 1317 +f 94 292 1317 +f 292 95 1317 +f 940 1039 1033 +f 1300 1306 433 +f 21 212 471 +f 1120 1131 1037 +f 833 921 688 +f 1117 357 342 +f 106 271 94 +f 386 227 1375 +f 1130 1044 1053 +f 419 240 219 +f 1255 1244 32 +f 1557 1081 1489 +f 2062 2120 2109 +f 2034 2110 430 +f 23 315 1111 +f 291 94 271 +f 291 292 94 +f 50 386 95 +f 964 734 665 +f 1616 1585 1611 +f 445 1084 402 +f 574 1085 1141 +f 1654 341 1653 +f 220 1188 1640 +f 342 69 12 +f 417 261 328 +f 292 50 95 +f 204 227 386 +f 50 204 386 +f 1276 1471 1311 +f 1206 1196 136 +f 1033 1055 1042 +f 1037 1044 1130 +f 1180 320 417 +f 1121 202 1080 +f 325 203 271 +f 291 76 292 +f 292 237 50 +f 2159 1696 1767 +f 583 929 850 +f 1584 1585 1616 +f 1495 1490 1188 +f 1557 1489 1660 +f 1078 1069 1494 +f 1972 1992 1971 +f 183 1226 2000 +f 325 429 203 +f 292 76 237 +f 1152 227 1143 +f 1488 1412 1489 +f 1638 1646 1653 +f 1947 1869 2468 +f 203 306 291 +f 306 76 291 +f 237 248 50 +f 204 1143 227 +f 2395 14 429 +f 1502 881 2500 +f 1 1090 202 +f 1652 1653 1099 +f 2117 1863 2496 +f 50 248 204 +f 160 792 994 +f 884 888 857 +f 544 2117 2496 +f 1090 1206 202 +f 2463 879 2492 +f 429 306 203 +f 498 188 418 +f 865 884 857 +f 994 998 1014 +f 884 897 888 +f 1795 948 1802 +f 208 1035 1071 +f 1065 1 1066 +f 377 435 1377 +f 304 429 14 +f 304 306 429 +f 73 60 74 +f 248 592 204 +f 846 2264 829 +f 897 912 906 +f 1004 991 992 +f 1422 1421 1233 +f 980 10 303 +f 1058 922 909 +f 2436 2449 2418 +f 394 435 377 +f 435 475 446 +f 475 474 446 +f 336 337 361 +f 338 235 372 +f 624 148 129 +f 812 306 596 +f 1726 992 1019 +f 945 1514 1511 +f 1069 1627 1628 +f 1812 1823 1181 +f 1165 1121 169 +f 447 475 435 +f 2487 2458 901 +f 42 59 46 +f 401 7 187 +f 1010 970 797 +f 1513 220 1640 +f 2474 2491 2462 +f 594 307 1014 +f 398 1513 1640 +f 307 594 1026 +f 545 2381 1570 +f 403 421 238 +f 445 402 127 +f 1611 1631 1616 +f 1805 1180 1148 +f 394 447 435 +f 2341 2413 2376 +f 75 74 60 +f 541 47 42 +f 47 59 42 +f 541 42 28 +f 917 931 1103 +f 897 906 883 +f 2484 2068 779 +f 888 883 857 +f 261 1065 328 +f 363 1307 349 +f 377 363 394 +f 444 747 464 +f 323 338 362 +f 92 116 74 +f 592 634 97 +f 982 1027 1004 +f 1020 982 1004 +f 1084 1054 1035 +f 208 402 1084 +f 421 1119 1176 +f 1207 1181 1823 +f 1179 1187 1160 +f 263 296 1343 +f 1298 296 1307 +f 1307 296 349 +f 405 363 349 +f 405 394 363 +f 405 447 394 +f 362 372 384 +f 338 372 362 +f 983 1004 987 +f 122 134 139 +f 415 440 414 +f 75 92 74 +f 226 186 246 +f 796 787 700 +f 1119 1059 1176 +f 122 114 91 +f 624 129 116 +f 641 558 631 +f 1311 1318 1487 +f 100 1162 1170 +f 1653 341 1099 +f 1316 1983 273 +f 263 277 296 +f 296 358 349 +f 436 447 405 +f 109 554 570 +f 504 1385 2501 +f 115 122 91 +f 2068 2460 779 +f 43 777 163 +f 378 405 349 +f 358 378 349 +f 448 447 436 +f 448 476 447 +f 78 77 108 +f 75 60 47 +f 1764 2481 1795 +f 717 714 1512 +f 1490 717 1501 +f 238 1126 168 +f 1878 1866 826 +f 2025 2360 2367 +f 251 278 263 +f 278 277 263 +f 277 318 296 +f 296 318 358 +f 318 350 358 +f 378 436 405 +f 384 372 1182 +f 454 440 415 +f 987 1004 992 +f 493 476 448 +f 323 788 338 +f 403 238 136 +f 1565 1503 1474 +f 297 277 278 +f 297 318 277 +f 358 350 378 +f 378 388 436 +f 476 493 500 +f 73 105 60 +f 323 337 312 +f 953 1573 2358 +f 142 161 119 +f 454 443 440 +f 1862 1871 1405 +f 297 319 318 +f 560 47 541 +f 170 1323 111 +f 357 1047 1050 +f 1119 98 1059 +f 1838 1877 1900 +f 2359 230 251 +f 350 364 378 +f 449 448 436 +f 449 493 448 +f 185 186 226 +f 443 469 479 +f 874 165 2480 +f 463 444 464 +f 64 105 91 +f 1182 440 1129 +f 1958 1651 2502 +f 1238 2034 191 +f 251 279 278 +f 278 279 297 +f 364 388 378 +f 483 493 449 +f 134 148 139 +f 244 268 259 +f 910 942 930 +f 105 115 91 +f 24 30 18 +f 1132 487 1059 +f 1869 1947 2021 +f 2497 2494 2463 +f 2359 2385 230 +f 230 280 251 +f 251 280 279 +f 279 308 297 +f 297 308 319 +f 319 364 318 +f 364 350 318 +f 388 395 436 +f 436 395 449 +f 493 472 500 +f 122 129 134 +f 125 142 124 +f 373 400 393 +f 24 557 30 +f 2264 2278 2251 +f 1261 30 1269 +f 1730 1862 1877 +f 252 280 230 +f 343 364 319 +f 364 343 388 +f 63 64 91 +f 399 393 416 +f 416 444 463 +f 162 189 142 +f 768 373 326 +f 189 661 177 +f 189 199 661 +f 847 887 864 +f 533 747 444 +f 1744 1022 1418 +f 1170 524 729 +f 121 1342 128 +f 1236 1244 26 +f 280 281 279 +f 281 308 279 +f 343 319 308 +f 343 365 388 +f 388 365 395 +f 365 406 395 +f 406 449 395 +f 483 477 493 +f 477 491 472 +f 493 477 472 +f 78 109 77 +f 166 174 196 +f 481 150 814 +f 63 59 64 +f 326 373 393 +f 643 260 43 +f 230 253 252 +f 449 441 483 +f 441 477 483 +f 415 416 463 +f 226 246 245 +f 464 470 454 +f 323 362 337 +f 52 37 1283 +f 253 281 252 +f 281 280 252 +f 309 308 281 +f 330 343 308 +f 366 365 343 +f 441 449 406 +f 464 814 15 +f 883 906 887 +f 337 362 371 +f 479 498 290 +f 247 746 1003 +f 25 37 557 +f 640 930 669 +f 2486 2499 2459 +f 309 330 308 +f 343 330 366 +f 441 437 477 +f 290 498 418 +f 124 119 108 +f 77 124 108 +f 589 125 109 +f 570 589 109 +f 125 162 142 +f 1045 433 1034 +f 1207 261 320 +f 2004 2474 2495 +f 1215 1228 2285 +f 365 396 406 +f 396 422 406 +f 422 437 441 +f 406 422 441 +f 59 47 60 +f 51 78 66 +f 361 371 383 +f 196 215 214 +f 463 454 415 +f 27 41 535 +f 53 1283 37 +f 84 1299 1283 +f 1805 320 1180 +f 254 253 222 +f 254 281 253 +f 309 366 330 +f 396 365 366 +f 456 477 437 +f 484 491 477 +f 2480 2485 2493 +f 418 188 187 +f 53 85 1283 +f 85 84 1283 +f 420 1071 1065 +f 264 281 254 +f 298 309 281 +f 368 366 367 +f 368 396 366 +f 1639 1564 1139 +f 560 48 47 +f 82 471 212 +f 25 38 37 +f 202 1206 1080 +f 264 298 281 +f 298 331 309 +f 309 331 366 +f 331 367 366 +f 396 368 422 +f 422 456 437 +f 491 1192 313 +f 1699 2064 1710 +f 462 443 479 +f 371 362 384 +f 2502 2476 2464 +f 371 384 383 +f 21 732 212 +f 1571 1629 1627 +f 38 39 53 +f 37 38 53 +f 39 85 53 +f 1173 1184 404 +f 1006 2142 1674 +f 201 255 254 +f 255 264 254 +f 368 407 422 +f 450 456 422 +f 450 484 456 +f 456 484 477 +f 314 1192 491 +f 2027 2501 2489 +f 2475 2471 2488 +f 551 492 732 +f 464 481 814 +f 1081 1494 1547 +f 201 231 255 +f 407 450 422 +f 484 494 491 +f 494 327 491 +f 327 314 491 +f 876 797 995 +f 847 856 829 +f 125 143 162 +f 134 129 148 +f 1564 1571 1627 +f 417 320 261 +f 328 1065 1066 +f 170 156 201 +f 156 231 201 +f 231 282 255 +f 282 264 255 +f 450 485 484 +f 484 485 494 +f 2463 2486 2479 +f 159 185 167 +f 492 68 212 +f 732 492 212 +f 68 82 212 +f 1311 1471 1296 +f 101 156 111 +f 332 264 282 +f 332 298 264 +f 332 331 298 +f 331 332 367 +f 407 423 450 +f 450 423 485 +f 804 1002 1443 +f 2484 779 946 +f 689 443 462 +f 440 689 1129 +f 166 167 174 +f 38 31 39 +f 112 145 101 +f 101 145 156 +f 156 256 231 +f 332 423 368 +f 367 332 368 +f 368 423 407 +f 946 779 920 +f 1432 1261 1449 +f 461 478 453 +f 464 15 470 +f 31 54 39 +f 39 54 85 +f 86 101 85 +f 145 210 156 +f 282 283 332 +f 283 369 332 +f 369 423 332 +f 423 408 485 +f 854 876 965 +f 78 108 66 +f 440 443 689 +f 374 2465 961 +f 929 519 979 +f 54 86 85 +f 156 241 256 +f 256 282 231 +f 256 283 282 +f 389 423 369 +f 389 408 423 +f 408 457 485 +f 457 49 485 +f 485 49 494 +f 494 135 327 +f 175 83 314 +f 1167 1140 1483 +f 196 174 215 +f 697 16 68 +f 1038 82 16 +f 140 117 141 +f 1654 1653 1646 +f 1234 54 31 +f 86 112 101 +f 210 241 156 +f 923 917 911 +f 697 34 16 +f 145 193 210 +f 256 265 283 +f 265 310 283 +f 283 310 369 +f 310 344 369 +f 344 370 369 +f 370 389 369 +f 409 408 389 +f 409 466 408 +f 466 457 408 +f 466 49 457 +f 49 135 494 +f 174 225 215 +f 1014 766 602 +f 826 2220 2215 +f 1078 1494 1081 +f 1273 70 86 +f 120 112 86 +f 146 145 112 +f 146 193 145 +f 265 256 241 +f 223 265 241 +f 486 49 466 +f 175 327 135 +f 105 122 115 +f 480 15 681 +f 225 234 215 +f 731 34 697 +f 86 54 1273 +f 70 120 86 +f 193 241 210 +f 299 310 265 +f 310 333 344 +f 344 351 370 +f 424 466 409 +f 135 49 175 +f 214 215 234 +f 48 75 47 +f 34 9 1038 +f 16 34 1038 +f 203 291 271 +f 9 558 754 +f 1195 397 1120 +f 120 146 112 +f 146 194 193 +f 266 265 223 +f 266 299 265 +f 299 333 310 +f 333 351 344 +f 382 383 392 +f 399 416 415 +f 266 333 299 +f 351 352 370 +f 424 486 466 +f 487 175 49 +f 7 117 187 +f 1182 414 440 +f 41 42 46 +f 290 289 497 +f 2502 2464 2473 +f 372 399 414 +f 1570 1585 1584 +f 1066 1 1165 +f 1 202 1165 +f 120 70 102 +f 157 146 120 +f 194 223 193 +f 223 241 193 +f 352 379 370 +f 370 379 389 +f 410 409 389 +f 2478 1409 1958 +f 806 945 1002 +f 157 194 146 +f 267 266 223 +f 267 333 266 +f 379 410 389 +f 410 438 409 +f 438 424 409 +f 190 205 143 +f 337 371 361 +f 2215 830 826 +f 1631 1646 1638 +f 102 157 120 +f 157 195 194 +f 195 223 194 +f 195 211 223 +f 223 211 267 +f 267 300 333 +f 300 334 351 +f 333 300 351 +f 351 334 352 +f 410 411 438 +f 438 486 424 +f 487 49 486 +f 875 594 989 +f 108 581 66 +f 225 245 244 +f 312 336 335 +f 151 754 107 +f 274 1386 300 +f 352 334 379 +f 923 1729 1096 +f 244 245 268 +f 463 464 454 +f 414 399 415 +f 15 480 470 +f 1647 1069 1078 +f 909 922 833 +f 387 417 328 +f 133 157 102 +f 1314 133 102 +f 133 195 157 +f 1148 1179 1160 +f 1046 1167 182 +f 379 411 410 +f 792 339 229 +f 391 7 668 +f 185 226 174 +f 461 290 497 +f 2027 504 2501 +f 1196 1054 403 +f 728 1019 752 +f 2459 2483 2461 +f 1291 1264 55 +f 133 1356 195 +f 195 1356 211 +f 412 438 411 +f 4 486 438 +f 458 4 438 +f 4 487 486 +f 1720 1572 1771 +f 245 275 268 +f 1869 2021 2059 +f 235 399 372 +f 64 60 105 +f 836 2492 879 +f 1315 133 1314 +f 1331 1382 1356 +f 1310 926 1128 +f 7 1121 117 +f 119 161 611 +f 380 379 334 +f 379 380 411 +f 467 4 458 +f 495 487 4 +f 495 1126 487 +f 416 400 533 +f 479 469 498 +f 74 116 73 +f 478 461 497 +f 393 400 416 +f 61 1291 55 +f 505 1999 2474 +f 1999 2491 2474 +f 199 189 36 +f 1164 1165 169 +f 1179 387 249 +f 390 411 380 +f 411 390 412 +f 458 438 412 +f 495 168 1126 +f 480 469 470 +f 116 122 105 +f 418 187 140 +f 185 174 167 +f 166 148 167 +f 470 469 443 +f 40 55 32 +f 61 71 1291 +f 71 103 1291 +f 1184 1173 1154 +f 634 514 97 +f 425 458 412 +f 917 923 931 +f 2472 2489 853 +f 754 641 567 +f 44 567 1163 +f 454 470 443 +f 40 32 1249 +f 33 40 1249 +f 56 55 40 +f 56 61 55 +f 451 1265 439 +f 1180 417 1179 +f 1099 301 1077 +f 1189 1058 939 +f 1059 221 1132 +f 598 1074 1075 +f 412 426 425 +f 650 186 185 +f 234 244 259 +f 226 245 225 +f 1033 1042 1030 +f 2492 836 247 +f 7 169 1121 +f 1462 1322 1482 +f 425 467 458 +f 496 4 467 +f 1751 2468 2480 +f 290 418 140 +f 326 789 762 +f 142 177 161 +f 165 1751 2480 +f 87 103 71 +f 103 87 104 +f 1180 1179 1148 +f 417 387 1179 +f 2081 2060 2031 +f 1154 1173 1141 +f 181 131 197 +f 442 425 426 +f 614 144 143 +f 876 1010 797 +f 40 45 56 +f 56 45 61 +f 87 71 61 +f 1563 1437 1590 +f 1121 385 117 +f 1148 1160 1137 +f 1449 1459 1439 +f 1028 2462 929 +f 442 459 425 +f 459 467 425 +f 168 495 4 +f 496 168 4 +f 1763 1403 1444 +f 140 187 117 +f 244 234 225 +f 246 740 269 +f 372 414 1182 +f 40 547 45 +f 45 62 61 +f 62 87 61 +f 87 88 104 +f 1084 517 1054 +f 387 328 1064 +f 2467 2497 2485 +f 286 1363 302 +f 205 189 162 +f 290 140 289 +f 214 234 224 +f 393 399 809 +f 315 1131 397 +f 302 321 353 +f 1164 169 391 +f 427 459 442 +f 217 496 467 +f 217 168 496 +f 978 969 2074 +f 361 383 382 +f 269 276 245 +f 1440 11 305 +f 62 88 87 +f 328 1066 1064 +f 1066 1165 1164 +f 242 287 302 +f 1363 242 302 +f 287 321 302 +f 1179 249 1187 +f 983 1020 1004 +f 464 747 481 +f 788 323 276 +f 269 245 246 +f 88 89 1325 +f 171 172 242 +f 360 353 321 +f 360 1354 353 +f 1057 1064 1164 +f 2184 2188 2183 +f 460 459 451 +f 460 467 459 +f 149 168 217 +f 149 136 168 +f 116 129 122 +f 109 124 77 +f 159 167 148 +f 28 42 41 +f 57 88 62 +f 45 57 62 +f 1336 1325 89 +f 89 72 1336 +f 147 172 171 +f 172 258 242 +f 258 257 242 +f 257 287 242 +f 257 321 287 +f 345 360 321 +f 360 381 1354 +f 1069 938 1655 +f 387 473 249 +f 270 217 467 +f 130 136 149 +f 851 847 829 +f 983 987 975 +f 189 177 142 +f 88 72 89 +f 184 258 172 +f 257 288 321 +f 1265 451 459 +f 270 149 217 +f 226 225 174 +f 27 28 41 +f 109 125 124 +f 547 57 45 +f 57 58 88 +f 88 58 72 +f 2476 2484 2458 +f 147 184 172 +f 184 213 258 +f 258 243 257 +f 243 288 257 +f 345 321 288 +f 391 169 7 +f 468 460 451 +f 468 488 460 +f 270 467 460 +f 488 270 460 +f 1206 136 130 +f 481 793 150 +f 143 205 162 +f 142 119 124 +f 58 90 72 +f 90 128 72 +f 147 173 184 +f 173 213 184 +f 213 233 258 +f 258 233 243 +f 354 360 345 +f 354 381 360 +f 1026 991 307 +f 268 312 259 +f 1206 130 1080 +f 116 105 73 +f 139 148 166 +f 275 312 268 +f 188 401 187 +f 2479 2459 2461 +f 58 63 90 +f 1064 1066 1164 +f 1064 473 387 +f 288 311 345 +f 311 354 345 +f 996 994 307 +f 452 468 439 +f 452 478 468 +f 478 488 468 +f 141 130 149 +f 1564 1639 1563 +f 547 41 57 +f 2081 2107 2060 +f 382 381 354 +f 497 270 488 +f 289 149 270 +f 289 141 149 +f 114 122 139 +f 59 60 64 +f 275 323 312 +f 401 668 7 +f 41 46 57 +f 57 46 58 +f 1459 1345 1269 +f 1342 121 158 +f 166 173 158 +f 213 224 233 +f 233 259 243 +f 243 322 288 +f 322 311 288 +f 453 478 452 +f 497 289 270 +f 912 911 906 +f 276 323 275 +f 276 275 245 +f 46 63 58 +f 90 121 128 +f 173 214 213 +f 213 214 224 +f 259 322 243 +f 336 311 322 +f 336 354 311 +f 361 382 354 +f 1043 439 1290 +f 497 488 478 +f 385 130 141 +f 385 1080 130 +f 144 190 143 +f 535 41 547 +f 121 166 158 +f 335 336 322 +f 354 336 361 +f 2004 2481 1764 +f 698 439 1043 +f 289 140 141 +f 923 1096 931 +f 650 185 159 +f 46 59 63 +f 63 91 90 +f 90 114 121 +f 121 139 166 +f 173 196 214 +f 259 335 322 +f 2478 2502 2434 +f 312 337 336 +f 90 91 114 +f 114 139 121 +f 166 196 173 +f 224 234 233 +f 234 259 233 +f 259 312 335 +f 1124 916 1189 +f 542 541 530 +f 462 479 290 +f 269 783 276 +f 813 567 641 +f 276 783 788 +f 82 1038 1333 +f 816 701 703 +f 672 137 603 +f 625 635 624 +f 2457 2439 1973 +f 767 533 529 +f 2468 1869 2480 +f 662 190 639 +f 711 720 719 +f 630 639 614 +f 161 654 638 +f 781 991 982 +f 1227 31 516 +f 648 639 630 +f 630 614 590 +f 2098 544 1899 +f 578 579 586 +f 697 492 551 +f 529 533 400 +f 869 859 870 +f 1732 924 914 +f 1004 1027 991 +f 801 591 603 +f 636 676 651 +f 876 949 965 +f 2207 1789 1859 +f 76 739 237 +f 188 681 15 +f 578 604 599 +f 797 616 995 +f 510 2035 1365 +f 76 812 617 +f 617 739 76 +f 1468 93 1765 +f 596 546 812 +f 1457 1305 1477 +f 760 197 150 +f 671 773 765 +f 586 609 604 +f 591 700 632 +f 476 2312 474 +f 2084 2027 2489 +f 582 590 571 +f 1555 2449 1996 +f 674 546 596 +f 812 655 617 +f 161 177 661 +f 599 604 636 +f 700 787 576 +f 776 675 572 +f 776 674 675 +f 617 634 739 +f 591 632 649 +f 612 546 674 +f 617 655 634 +f 728 752 706 +f 571 2311 2305 +f 775 674 776 +f 775 612 674 +f 612 628 546 +f 546 628 812 +f 812 628 655 +f 620 630 615 +f 620 648 630 +f 667 653 646 +f 810 782 785 +f 150 197 814 +f 534 1517 2000 +f 702 572 2378 +f 748 776 572 +f 655 613 634 +f 911 917 905 +f 648 679 662 +f 727 771 713 +f 750 807 799 +f 639 190 144 +f 662 679 200 +f 702 748 572 +f 775 776 748 +f 628 718 655 +f 626 658 645 +f 791 778 790 +f 612 811 628 +f 613 514 634 +f 1380 1756 1673 +f 570 590 614 +f 720 741 719 +f 1074 795 835 +f 614 639 144 +f 612 775 811 +f 718 735 655 +f 655 735 613 +f 798 338 788 +f 636 652 676 +f 571 590 555 +f 528 730 687 +f 690 702 2312 +f 476 690 2312 +f 811 718 628 +f 721 778 727 +f 748 702 690 +f 735 686 613 +f 1517 2002 2127 +f 654 685 667 +f 569 588 606 +f 513 531 538 +f 538 549 548 +f 549 553 548 +f 550 588 549 +f 1903 869 870 +f 691 775 748 +f 691 600 775 +f 600 811 775 +f 811 563 718 +f 563 736 718 +f 718 736 735 +f 736 647 735 +f 735 647 686 +f 686 745 613 +f 745 514 613 +f 569 606 605 +f 654 667 638 +f 851 857 847 +f 588 569 549 +f 690 691 748 +f 680 514 745 +f 2127 2002 2094 +f 747 701 481 +f 400 373 529 +f 600 536 811 +f 536 563 811 +f 1306 227 1152 +f 522 24 18 +f 523 24 522 +f 865 857 851 +f 2031 2060 1540 +f 767 701 747 +f 618 652 609 +f 652 636 609 +f 573 22 710 +f 642 699 730 +f 1522 1518 2476 +f 500 629 691 +f 690 500 691 +f 691 629 600 +f 780 644 641 +f 579 578 561 +f 131 668 197 +f 197 668 814 +f 789 809 798 +f 622 760 150 +f 621 563 536 +f 673 745 686 +f 673 818 745 +f 818 680 745 +f 680 96 514 +f 2495 2462 1028 +f 1028 583 575 +f 663 794 664 +f 629 761 600 +f 761 757 600 +f 600 757 536 +f 621 696 563 +f 755 736 563 +f 696 755 563 +f 633 736 755 +f 633 647 736 +f 623 686 647 +f 633 623 647 +f 686 623 673 +f 819 680 818 +f 680 819 96 +f 1729 1677 1096 +f 2482 1899 2471 +f 537 536 757 +f 536 537 621 +f 673 819 818 +f 2428 222 230 +f 25 24 523 +f 25 557 24 +f 38 25 19 +f 710 22 272 +f 663 759 794 +f 1120 878 1195 +f 537 696 621 +f 696 633 755 +f 822 2215 2220 +f 97 96 1053 +f 750 784 743 +f 887 905 864 +f 768 784 373 +f 512 513 548 +f 573 664 22 +f 696 715 633 +f 673 521 819 +f 2454 2453 2445 +f 883 887 847 +f 306 812 76 +f 642 528 759 +f 798 809 235 +f 994 792 998 +f 587 626 586 +f 1900 1918 1937 +f 645 652 618 +f 537 786 696 +f 521 593 819 +f 515 19 523 +f 741 749 719 +f 789 326 809 +f 539 581 550 +f 657 777 723 +f 684 713 660 +f 692 712 720 +f 652 666 692 +f 507 761 629 +f 472 507 629 +f 507 757 761 +f 623 633 673 +f 724 521 673 +f 515 516 19 +f 304 675 674 +f 178 778 721 +f 947 1447 2358 +f 626 645 618 +f 586 626 618 +f 784 768 742 +f 753 537 757 +f 537 753 786 +f 724 981 521 +f 521 981 593 +f 979 559 850 +f 637 660 677 +f 787 631 576 +f 141 117 385 +f 809 399 235 +f 641 754 558 +f 542 553 561 +f 742 768 762 +f 444 416 533 +f 528 687 796 +f 813 598 566 +f 1490 1501 1557 +f 753 757 507 +f 786 715 696 +f 633 724 673 +f 2090 2062 2109 +f 646 653 660 +f 660 694 683 +f 677 660 683 +f 1872 839 838 +f 1224 18 30 +f 326 393 809 +f 799 529 373 +f 313 507 472 +f 715 774 633 +f 974 699 841 +f 703 820 816 +f 692 711 676 +f 1014 355 766 +f 875 752 1019 +f 627 646 660 +f 711 692 720 +f 652 692 676 +f 799 373 784 +f 813 566 567 +f 2462 2482 2475 +f 764 644 780 +f 1479 1924 1916 +f 753 738 786 +f 738 607 786 +f 786 607 715 +f 715 524 774 +f 633 774 724 +f 559 979 672 +f 758 798 783 +f 683 694 705 +f 820 703 562 +f 764 687 644 +f 744 743 725 +f 313 753 507 +f 607 524 715 +f 664 801 22 +f 646 627 610 +f 800 820 562 +f 750 769 807 +f 767 747 533 +f 578 586 604 +f 862 593 981 +f 688 2382 1083 +f 306 304 674 +f 738 584 607 +f 168 136 238 +f 773 552 765 +f 2473 2464 2458 +f 773 793 552 +f 626 619 658 +f 1007 1139 1013 +f 562 529 799 +f 744 750 743 +f 659 683 693 +f 677 683 659 +f 313 737 753 +f 753 737 738 +f 607 729 524 +f 27 518 28 +f 553 569 580 +f 657 163 777 +f 580 569 605 +f 789 798 758 +f 769 562 807 +f 820 671 816 +f 638 646 611 +f 1074 598 644 +f 750 799 784 +f 1931 907 898 +f 2483 2487 2461 +f 737 584 738 +f 1439 1438 1431 +f 2098 1213 544 +f 48 578 75 +f 796 631 787 +f 815 732 21 +f 581 588 550 +f 625 636 651 +f 778 1011 810 +f 693 705 725 +f 693 683 705 +f 236 1921 1966 +f 584 729 607 +f 2237 1866 2227 +f 530 541 28 +f 237 739 248 +f 512 530 28 +f 727 778 771 +f 684 727 713 +f 2237 2220 826 +f 542 561 560 +f 528 796 700 +f 808 785 671 +f 739 592 248 +f 895 905 896 +f 740 246 186 +f 272 137 979 +f 770 769 744 +f 712 742 720 +f 1213 2026 544 +f 1888 1235 2438 +f 555 554 2311 +f 737 313 1192 +f 1585 1612 1611 +f 695 721 685 +f 518 17 28 +f 769 770 562 +f 719 749 740 +f 648 669 679 +f 773 657 723 +f 606 637 619 +f 2072 2062 2042 +f 606 619 626 +f 549 569 553 +f 161 638 611 +f 910 917 942 +f 917 1103 942 +f 991 1026 992 +f 979 137 672 +f 785 163 657 +f 710 2488 2472 +f 611 581 119 +f 808 671 820 +f 1820 1900 1870 +f 759 700 591 +f 637 677 619 +f 2494 2490 2463 +f 671 765 816 +f 687 764 780 +f 1019 992 1026 +f 1726 1719 987 +f 713 771 694 +f 51 2355 78 +f 510 526 525 +f 525 526 1249 +f 526 33 1249 +f 2311 554 2335 +f 827 848 840 +f 603 591 649 +f 758 269 740 +f 1595 1612 1586 +f 1694 1048 1699 +f 682 740 186 +f 22 801 603 +f 555 570 554 +f 1053 110 97 +f 615 582 601 +f 814 668 188 +f 725 705 744 +f 528 700 759 +f 640 648 620 +f 703 701 562 +f 886 892 582 +f 631 731 576 +f 1087 1835 1747 +f 882 864 895 +f 956 950 1103 +f 1502 2500 2470 +f 205 190 200 +f 815 878 616 +f 616 878 995 +f 1183 878 815 +f 1601 1827 881 +f 527 535 526 +f 2184 2183 2175 +f 1142 1125 1133 +f 235 338 798 +f 160 339 792 +f 599 92 75 +f 598 1116 566 +f 631 558 731 +f 771 770 744 +f 730 528 642 +f 841 699 642 +f 668 401 188 +f 510 527 526 +f 749 758 740 +f 706 721 695 +f 694 726 705 +f 694 744 726 +f 906 911 905 +f 661 695 161 +f 708 815 616 +f 535 547 33 +f 794 759 591 +f 778 808 790 +f 269 758 783 +f 771 744 694 +f 800 808 820 +f 571 886 582 +f 854 948 1010 +f 906 905 887 +f 625 651 635 +f 2000 1226 534 +f 2140 1504 2016 +f 601 620 615 +f 620 601 640 +f 648 640 669 +f 698 452 439 +f 671 785 657 +f 1561 2356 545 +f 685 653 667 +f 685 727 684 +f 568 616 797 +f 708 732 815 +f 93 229 339 +f 865 851 839 +f 942 1103 950 +f 589 614 125 +f 606 610 627 +f 951 834 873 +f 92 599 625 +f 1878 830 1902 +f 2482 2098 1899 +f 568 708 616 +f 708 551 732 +f 2434 2487 2483 +f 160 964 665 +f 2316 2391 2309 +f 762 758 749 +f 570 614 589 +f 888 897 883 +f 2000 1517 1388 +f 685 721 727 +f 588 610 606 +f 653 685 684 +f 651 650 635 +f 760 1151 6 +f 793 622 150 +f 651 676 650 +f 744 769 750 +f 541 542 560 +f 476 500 690 +f 473 1064 1057 +f 561 578 560 +f 636 625 599 +f 876 995 949 +f 829 856 846 +f 682 704 740 +f 791 790 770 +f 2466 2500 2460 +f 579 587 586 +f 1352 1208 1095 +f 1684 1479 1916 +f 604 609 636 +f 751 721 706 +f 810 608 782 +f 672 603 649 +f 475 447 476 +f 794 591 801 +f 682 186 650 +f 808 800 790 +f 644 598 813 +f 704 719 740 +f 1011 608 810 +f 1192 584 737 +f 687 780 796 +f 2337 474 2312 +f 638 667 646 +f 706 1186 728 +f 733 575 568 +f 595 551 708 +f 595 540 551 +f 1308 501 1852 +f 665 339 160 +f 527 2447 535 +f 558 9 731 +f 723 793 773 +f 660 713 694 +f 693 725 666 +f 562 767 529 +f 550 538 531 +f 2267 2287 2233 +f 996 964 160 +f 2068 2470 2466 +f 704 711 719 +f 741 762 749 +f 605 606 626 +f 548 542 530 +f 995 878 709 +f 1898 1684 1916 +f 778 791 771 +f 782 163 785 +f 789 758 762 +f 857 883 847 +f 733 970 1028 +f 838 829 825 +f 2447 511 535 +f 22 603 137 +f 705 726 744 +f 605 587 580 +f 512 548 530 +f 743 784 742 +f 790 800 770 +f 778 810 808 +f 1014 998 355 +f 708 568 595 +f 656 697 551 +f 540 656 551 +f 143 125 614 +f 1000 1020 983 +f 778 178 1011 +f 676 704 682 +f 637 627 660 +f 606 627 637 +f 701 552 481 +f 808 810 785 +f 590 570 555 +f 716 595 568 +f 2355 2335 554 +f 912 1729 911 +f 1076 1456 1546 +f 697 68 492 +f 676 711 704 +f 839 851 838 +f 1028 575 733 +f 1020 844 982 +f 716 568 575 +f 844 781 982 +f 1238 2156 2034 +f 553 580 561 +f 580 579 561 +f 452 461 453 +f 560 578 48 +f 564 540 595 +f 632 656 540 +f 564 632 540 +f 75 578 599 +f 518 27 535 +f 511 518 535 +f 783 798 788 +f 642 759 663 +f 720 742 741 +f 605 626 587 +f 580 587 579 +f 725 712 666 +f 562 701 767 +f 1729 923 911 +f 712 743 742 +f 619 677 658 +f 161 695 654 +f 770 800 562 +f 2084 2489 2472 +f 575 559 716 +f 716 564 595 +f 654 695 685 +f 843 855 2064 +f 34 731 9 +f 527 510 1973 +f 723 622 793 +f 992 1726 987 +f 693 666 652 +f 2472 853 573 +f 624 159 148 +f 671 657 773 +f 681 188 498 +f 797 970 733 +f 565 656 632 +f 565 697 656 +f 565 731 697 +f 1949 951 920 +f 85 111 84 +f 662 200 190 +f 44 324 754 +f 33 547 40 +f 658 693 652 +f 658 652 645 +f 664 794 801 +f 666 712 692 +f 639 648 662 +f 611 646 610 +f 850 559 575 +f 1447 2490 1106 +f 1972 1955 1935 +f 582 615 590 +f 66 581 539 +f 780 641 631 +f 796 780 631 +f 1049 1192 83 +f 1348 13 1519 +f 799 807 562 +f 581 611 588 +f 687 795 644 +f 663 8 642 +f 1936 1972 1935 +f 650 676 682 +f 615 630 590 +f 730 795 687 +f 742 762 741 +f 548 553 542 +f 1048 1692 1074 +f 658 659 693 +f 37 52 30 +f 611 610 588 +f 649 632 564 +f 565 576 731 +f 2138 922 1058 +f 1204 854 965 +f 725 743 712 +f 644 813 641 +f 660 653 684 +f 771 791 770 +f 644 795 1074 +f 469 480 681 +f 559 672 564 +f 716 559 564 +f 672 649 564 +f 2161 1378 2171 +f 474 475 476 +f 816 765 701 +f 765 552 701 +f 513 538 548 +f 754 324 107 +f 609 586 618 +f 25 523 19 +f 677 659 658 +f 689 452 698 +f 1334 1115 1353 +f 700 565 632 +f 700 576 565 +f 481 552 793 +f 763 901 2458 +f 550 549 538 +f 781 964 996 +f 1596 1634 1595 +f 198 916 1124 +f 198 1124 341 +f 842 973 1025 +f 842 1025 836 +f 1009 1024 934 +f 573 710 2472 +f 1100 971 1002 +f 1501 1081 1557 +f 1225 1219 955 +f 413 2138 284 +f 955 1630 522 +f 341 1124 301 +f 2333 2376 2350 +f 1107 218 284 +f 398 925 1513 +f 1513 1442 1495 +f 1935 1455 1744 +f 1723 1935 1744 +f 825 1872 838 +f 1495 1442 1496 +f 963 1024 1009 +f 1511 1514 966 +f 1775 1729 912 +f 688 262 1067 +f 714 1007 1512 +f 919 1732 914 +f 2319 2331 2304 +f 2400 2407 2391 +f 1674 2164 1780 +f 843 927 899 +f 1660 988 1188 +f 1067 262 1640 +f 1381 1109 1483 +f 1437 1381 1483 +f 2495 1010 948 +f 1514 1289 1313 +f 899 374 961 +f 1438 1430 1422 +f 1634 1095 1632 +f 2487 973 2461 +f 1003 499 874 +f 849 848 827 +f 1430 1462 1453 +f 2496 2084 2471 +f 909 10 980 +f 730 927 835 +f 2031 1540 1536 +f 831 849 2178 +f 881 834 951 +f 1841 1722 1803 +f 1005 670 1020 +f 1021 670 1005 +f 1869 2059 2467 +f 903 902 1939 +f 2476 2502 1651 +f 853 8 573 +f 1850 831 2178 +f 934 746 247 +f 934 65 746 +f 301 285 1077 +f 968 944 977 +f 970 2495 1028 +f 974 2465 374 +f 899 927 374 +f 1882 1898 1916 +f 1613 1634 1596 +f 909 833 1396 +f 2492 247 1003 +f 919 914 1931 +f 1459 1299 1458 +f 1634 1632 1633 +f 844 670 228 +f 2494 2497 2467 +f 901 973 2487 +f 228 1772 734 +f 1701 1709 1666 +f 963 574 1024 +f 847 864 856 +f 1730 1736 2239 +f 870 859 848 +f 2074 2111 2103 +f 1140 1590 1483 +f 927 730 974 +f 2103 978 2074 +f 756 1745 1718 +f 848 859 840 +f 1296 1482 1320 +f 2331 51 66 +f 1067 988 962 +f 1396 833 1445 +f 1001 1005 1000 +f 901 1009 973 +f 1099 1077 817 +f 933 944 936 +f 952 958 1828 +f 988 1660 986 +f 833 1067 1445 +f 1067 1640 988 +f 218 413 284 +f 1843 180 347 +f 1846 1708 1798 +f 2469 2477 855 +f 1006 1021 1005 +f 381 382 250 +f 2369 828 531 +f 968 977 1001 +f 2460 1949 779 +f 1194 1441 1115 +f 1001 1000 968 +f 756 678 1745 +f 963 1009 901 +f 2471 2084 2472 +f 841 642 8 +f 982 991 1027 +f 670 844 1020 +f 1289 1514 945 +f 869 904 890 +f 1161 1115 1639 +f 823 2178 849 +f 746 12 499 +f 263 428 2366 +f 1685 1075 1692 +f 1002 926 806 +f 1799 1755 216 +f 944 968 993 +f 943 944 993 +f 31 38 19 +f 531 828 550 +f 1501 1078 1081 +f 1921 1149 431 +f 936 943 932 +f 1660 1489 1412 +f 301 980 285 +f 903 918 902 +f 869 890 868 +f 890 903 867 +f 1003 746 499 +f 951 1949 2500 +f 990 841 853 +f 1595 1634 1611 +f 374 927 974 +f 836 1025 247 +f 1653 1652 1638 +f 1303 1545 1142 +f 1616 1631 1638 +f 1629 1546 1628 +f 936 932 913 +f 513 506 531 +f 868 890 867 +f 2330 2369 2353 +f 924 918 914 +f 907 914 904 +f 1258 1421 1267 +f 301 939 980 +f 1472 1482 1296 +f 868 867 859 +f 472 491 313 +f 272 519 2488 +f 1471 1472 1296 +f 1025 934 247 +f 1634 1633 1611 +f 2176 1847 2177 +f 1310 1289 806 +f 924 933 918 +f 1969 1968 902 +f 2107 2128 2118 +f 1428 1436 1287 +f 1139 1564 1617 +f 2378 572 2384 +f 853 841 8 +f 2501 961 2465 +f 1221 1240 1408 +f 1069 1578 1627 +f 1006 1005 1001 +f 1617 1564 1578 +f 828 539 550 +f 1791 2168 2160 +f 1829 1718 1739 +f 1968 1939 902 +f 756 1718 665 +f 1998 2000 1388 +f 2451 545 2356 +f 178 997 1011 +f 1275 325 1270 +f 1709 872 1666 +f 2176 1959 1847 +f 944 943 936 +f 2424 518 511 +f 1445 1067 962 +f 2007 952 1828 +f 2052 2061 2081 +f 828 2303 539 +f 835 1699 1048 +f 1709 1706 872 +f 885 574 963 +f 1318 1296 1320 +f 859 867 1902 +f 1452 1448 1421 +f 943 993 976 +f 993 1000 983 +f 854 1010 876 +f 988 986 962 +f 2031 2052 2081 +f 924 1732 1828 +f 965 949 1060 +f 781 228 734 +f 1718 1765 665 +f 943 976 932 +f 1680 1794 1783 +f 1448 1471 1276 +f 1276 1267 1421 +f 1931 914 907 +f 991 781 996 +f 1276 1421 1448 +f 10 909 1396 +f 831 860 849 +f 1523 1762 1774 +f 924 1828 937 +f 307 994 1014 +f 946 963 901 +f 978 2103 977 +f 977 1006 1001 +f 1007 1161 1639 +f 1639 1294 1437 +f 885 1032 574 +f 1294 1381 1437 +f 733 568 797 +f 792 229 1112 +f 119 581 108 +f 843 835 927 +f 1889 860 831 +f 2211 2216 2204 +f 2400 2431 2422 +f 2103 1006 977 +f 840 1902 830 +f 827 840 830 +f 827 830 822 +f 1003 874 2492 +f 1432 1439 1431 +f 781 734 964 +f 1937 1936 1723 +f 918 913 902 +f 958 977 944 +f 1850 2178 2177 +f 1005 1020 1000 +f 991 996 307 +f 1396 1445 340 +f 2179 1763 889 +f 939 909 980 +f 1828 958 937 +f 978 977 958 +f 1590 1571 1563 +f 779 1949 920 +f 1551 1362 1573 +f 2103 2142 1006 +f 920 885 963 +f 946 920 963 +f 1584 1616 1583 +f 1453 1472 1452 +f 1647 1617 1578 +f 1578 1564 1627 +f 1628 938 1069 +f 869 868 859 +f 993 983 976 +f 912 1762 1775 +f 752 751 706 +f 1628 1546 938 +f 844 228 781 +f 840 859 1902 +f 898 907 904 +f 1025 973 1009 +f 663 664 573 +f 763 946 901 +f 898 904 869 +f 2172 889 1763 +f 1128 926 971 +f 860 848 849 +f 904 903 890 +f 2486 2459 2479 +f 577 782 608 +f 933 936 918 +f 2177 1847 1851 +f 665 1765 339 +f 937 958 944 +f 894 981 724 +f 968 1000 993 +f 2192 2195 2205 +f 1652 1099 817 +f 997 608 1011 +f 997 577 608 +f 577 163 782 +f 1112 998 792 +f 2177 1851 1850 +f 1257 1421 1258 +f 951 873 920 +f 822 830 2215 +f 1899 2496 2471 +f 1773 1668 1558 +f 904 914 903 +f 932 1671 913 +f 873 885 920 +f 1013 1617 1647 +f 873 1032 885 +f 894 862 981 +f 2469 855 961 +f 913 1671 1969 +f 2477 2064 855 +f 918 936 913 +f 860 870 848 +f 937 944 933 +f 1501 1013 1647 +f 824 178 751 +f 824 997 178 +f 824 577 997 +f 643 163 577 +f 863 856 882 +f 2128 2153 2134 +f 722 774 880 +f 722 894 774 +f 864 905 895 +f 850 575 583 +f 914 918 903 +f 924 937 933 +f 1501 717 1013 +f 1587 1324 928 +f 717 1512 1013 +f 602 577 824 +f 766 643 577 +f 894 709 862 +f 709 878 862 +f 976 975 932 +f 1324 1596 928 +f 880 524 1060 +f 2434 2459 2499 +f 1324 1613 1596 +f 752 824 751 +f 602 766 577 +f 1014 602 594 +f 1387 1226 2152 +f 2153 1387 2152 +f 669 930 950 +f 1710 1694 1699 +f 768 326 762 +f 582 892 601 +f 974 990 2465 +f 624 116 625 +f 835 795 730 +f 2458 2484 763 +f 989 602 824 +f 2064 2477 1710 +f 976 983 975 +f 949 722 880 +f 996 160 994 +f 2305 863 556 +f 556 863 886 +f 601 910 640 +f 2264 825 829 +f 989 824 752 +f 856 864 882 +f 1595 1586 2381 +f 1627 1629 1628 +f 2174 2180 2173 +f 2128 2134 2118 +f 137 272 22 +f 949 880 1060 +f 995 894 722 +f 894 995 709 +f 894 724 774 +f 886 895 892 +f 640 910 930 +f 871 870 860 +f 846 856 863 +f 1026 875 1019 +f 838 851 829 +f 1024 1171 934 +f 36 189 205 +f 863 882 886 +f 886 882 895 +f 875 1026 594 +f 52 1459 1269 +f 896 917 910 +f 1025 1009 934 +f 949 995 722 +f 2152 1226 1636 +f 895 896 892 +f 892 910 601 +f 942 950 930 +f 875 989 752 +f 594 602 989 +f 766 355 643 +f 355 260 643 +f 905 917 896 +f 965 1060 1162 +f 892 896 910 +f 1101 1052 1042 +f 1029 1031 834 +f 1101 1133 1118 +f 342 357 376 +f 516 515 2454 +f 1656 2494 2467 +f 1056 1303 1133 +f 1120 1130 862 +f 69 342 376 +f 1055 1056 1133 +f 499 69 165 +f 85 101 111 +f 1031 1032 834 +f 200 679 1166 +f 1031 1042 1032 +f 1171 65 934 +f 1822 1204 1177 +f 1096 956 1103 +f 514 96 97 +f 956 1145 1144 +f 1185 1166 1144 +f 1145 1185 1144 +f 1185 200 1166 +f 375 132 1041 +f 1153 1202 305 +f 32 1244 1249 +f 1096 1087 956 +f 554 78 2355 +f 1191 138 110 +f 65 35 432 +f 1087 1110 956 +f 1110 1146 956 +f 956 1146 1145 +f 1146 1156 1145 +f 1145 1156 1185 +f 950 956 1144 +f 2481 2495 948 +f 1156 1193 1185 +f 1050 1047 1051 +f 239 151 107 +f 1185 1193 36 +f 1747 1110 1087 +f 1134 1146 1110 +f 1146 1157 1156 +f 1156 1157 1193 +f 1041 1045 1034 +f 1397 1134 1110 +f 1157 1146 1134 +f 1157 1175 1193 +f 1193 199 36 +f 1090 1035 1196 +f 1456 1150 1051 +f 1175 199 1193 +f 1186 695 199 +f 1186 199 1175 +f 1175 1157 1134 +f 728 1186 1175 +f 197 760 6 +f 1130 593 862 +f 1167 1109 182 +f 1194 1115 1161 +f 2140 1928 1504 +f 921 922 2138 +f 1147 1134 1397 +f 1719 1147 1397 +f 1147 1175 1134 +f 1175 1147 728 +f 341 1654 1208 +f 754 151 9 +f 284 2138 1058 +f 1188 1557 1660 +f 1191 110 1053 +f 916 284 1189 +f 284 1058 1189 +f 2094 1465 2127 +f 1726 1019 1147 +f 1147 1019 728 +f 593 1130 96 +f 239 305 1038 +f 1036 1131 315 +f 397 1131 1120 +f 1053 96 1130 +f 2467 2485 1869 +f 517 1089 421 +f 834 1827 1029 +f 419 1047 1117 +f 1034 433 1306 +f 2239 1862 1730 +f 1453 1462 1472 +f 1408 1422 1399 +f 471 23 1111 +f 1205 1150 1456 +f 1205 1040 1150 +f 1131 1036 293 +f 293 1068 1044 +f 375 1041 138 +f 1205 1140 1046 +f 1040 1205 1046 +f 1140 1167 1046 +f 1104 1049 83 +f 1052 1085 1032 +f 1044 1068 1191 +f 1167 1483 1109 +f 208 1084 1035 +f 1040 132 375 +f 1834 20 3 +f 1050 1051 1070 +f 1133 1125 1174 +f 11 1440 1401 +f 420 208 1071 +f 1135 1079 1094 +f 1086 1101 1118 +f 1029 1030 1031 +f 1200 1061 294 +f 1191 1068 138 +f 1171 1141 65 +f 1141 1172 65 +f 1172 35 65 +f 1172 404 35 +f 404 99 35 +f 221 1104 1063 +f 802 398 1083 +f 20 1089 3 +f 2064 1699 835 +f 1042 1052 1032 +f 1433 1261 1432 +f 1323 2338 155 +f 1076 1205 1456 +f 1088 1402 1056 +f 1150 348 1070 +f 1200 1089 20 +f 1097 1162 100 +f 1032 873 834 +f 21 471 1111 +f 294 1097 1104 +f 1072 100 584 +f 1151 760 622 +f 132 1045 1041 +f 1050 1070 1135 +f 1088 1039 940 +f 650 159 635 +f 100 1170 729 +f 729 584 100 +f 1103 931 1096 +f 925 1443 1513 +f 138 1102 110 +f 1034 1306 1152 +f 1071 1035 1090 +f 100 1072 1097 +f 23 1158 315 +f 1068 375 138 +f 1586 1612 1585 +f 1819 1030 1029 +f 1041 1034 1102 +f 232 375 1068 +f 348 1079 1070 +f 1061 1097 294 +f 1513 1443 1442 +f 1200 294 1119 +f 376 1050 1062 +f 1094 1036 315 +f 1200 1119 1089 +f 1111 1183 21 +f 1044 1191 1053 +f 698 295 689 +f 1079 232 1036 +f 404 1117 99 +f 1495 1496 717 +f 1119 294 98 +f 3 1089 517 +f 1132 1063 83 +f 1132 83 175 +f 132 1046 182 +f 1111 1195 1183 +f 1131 1044 1037 +f 127 402 1804 +f 219 1272 1047 +f 1697 1135 1094 +f 2140 1854 2117 +f 1111 397 1195 +f 1177 1162 1097 +f 1061 1177 1097 +f 717 1509 714 +f 2 1300 433 +f 462 290 461 +f 98 294 221 +f 294 1104 221 +f 714 1161 1007 +f 1073 1152 1143 +f 1697 1094 1360 +f 1223 1423 1218 +f 836 2479 842 +f 1097 1072 1049 +f 348 1040 375 +f 3 517 316 +f 180 1061 1201 +f 348 375 232 +f 1432 1431 1415 +f 220 1513 1495 +f 1104 1097 1049 +f 306 674 596 +f 777 455 723 +f 2170 2151 1641 +f 1047 419 219 +f 1102 1034 1073 +f 1073 1034 1152 +f 1035 1054 1196 +f 1177 1204 1162 +f 746 65 12 +f 751 178 721 +f 1054 517 421 +f 1051 1150 1070 +f 1102 1073 110 +f 998 1136 355 +f 567 566 1163 +f 1111 315 397 +f 1048 1074 835 +f 1158 1094 315 +f 1374 1107 1252 +f 1112 1136 998 +f 472 629 500 +f 355 1136 260 +f 260 118 43 +f 1104 83 1063 +f 376 357 1050 +f 1463 1142 1545 +f 1036 232 293 +f 1030 1042 1031 +f 1079 348 232 +f 221 1063 1132 +f 1094 1079 1036 +f 1076 1629 1205 +f 1136 1197 260 +f 260 1197 118 +f 1204 965 1162 +f 293 232 1068 +f 1590 1205 1629 +f 1205 1590 1140 +f 250 382 392 +f 1296 1318 1311 +f 347 1201 20 +f 1201 1200 20 +f 132 182 1045 +f 1101 1086 1052 +f 1033 1039 1055 +f 138 1041 1102 +f 970 1010 2495 +f 455 777 43 +f 1992 1948 2023 +f 20 1834 347 +f 1072 584 1049 +f 584 1192 1049 +f 182 2 1045 +f 1163 324 44 +f 1360 1094 1158 +f 1450 1360 1158 +f 1091 1112 229 +f 509 723 455 +f 207 509 455 +f 1251 1257 1266 +f 1488 1489 1547 +f 2157 1541 1875 +f 305 107 324 +f 1045 2 433 +f 1070 1079 1135 +f 1136 1168 1197 +f 1197 359 118 +f 118 359 43 +f 359 356 43 +f 356 455 43 +f 356 207 455 +f 1240 1422 1408 +f 1163 1153 324 +f 1201 1061 1200 +f 1052 1086 1085 +f 1024 1141 1171 +f 1112 1105 1136 +f 1050 1135 1062 +f 1105 1168 1136 +f 1168 1178 1197 +f 1197 1178 359 +f 1173 404 1172 +f 465 356 359 +f 1174 1125 240 +f 1240 1431 1422 +f 1098 1113 1105 +f 1112 1098 1105 +f 1105 1178 1168 +f 1178 465 359 +f 1091 1098 1112 +f 1133 1174 1118 +f 98 221 1059 +f 487 1132 175 +f 980 1017 285 +f 465 207 356 +f 180 1201 347 +f 1060 524 1170 +f 445 127 316 +f 1431 1438 1422 +f 498 469 681 +f 940 1807 1759 +f 381 250 1290 +f 1113 1122 1105 +f 1105 1122 1178 +f 1151 509 207 +f 1236 2035 525 +f 1131 293 1044 +f 346 207 465 +f 346 1151 207 +f 1822 1796 1204 +f 1143 204 97 +f 123 1128 971 +f 2153 2152 2134 +f 126 1151 346 +f 517 445 316 +f 1450 1158 23 +f 1458 1462 1430 +f 1129 152 1182 +f 1122 1159 1178 +f 1178 1198 465 +f 79 346 465 +f 126 1155 1151 +f 1151 1155 6 +f 295 1129 689 +f 1073 1143 97 +f 1098 1123 1113 +f 1113 1123 1122 +f 1123 1169 1122 +f 1178 1159 1198 +f 1198 79 465 +f 392 383 152 +f 1822 1061 180 +f 116 92 625 +f 421 1089 1119 +f 1129 295 152 +f 110 1073 97 +f 1173 1172 1141 +f 1122 1169 1159 +f 79 126 346 +f 1155 181 6 +f 971 926 1002 +f 295 1043 152 +f 1039 1088 1056 +f 1428 1266 1436 +f 404 419 1117 +f 836 879 2479 +f 2464 2476 2458 +f 1198 317 79 +f 1124 939 301 +f 44 754 567 +f 1039 1056 1055 +f 1439 1459 1458 +f 1660 1412 986 +f 1169 1160 1159 +f 179 1155 126 +f 1155 131 181 +f 1061 1822 1177 +f 1153 305 324 +f 175 314 327 +f 1160 1187 1159 +f 1159 1187 1198 +f 1198 1187 317 +f 79 179 126 +f 1043 250 392 +f 152 1043 392 +f 96 819 593 +f 1123 1127 1169 +f 317 179 79 +f 1057 1155 179 +f 1155 391 131 +f 131 391 668 +f 2381 1586 1585 +f 12 69 499 +f 262 398 1640 +f 2107 2118 2060 +f 2130 2094 2002 +f 1187 249 317 +f 1155 1057 391 +f 1290 439 1265 +f 305 239 107 +f 1127 1160 1169 +f 317 473 179 +f 473 1057 179 +f 83 1192 314 +f 1043 1290 250 +f 1807 940 1030 +f 517 1084 445 +f 1057 1164 391 +f 2492 2480 2493 +f 163 643 43 +f 1056 1545 1303 +f 1069 1655 1023 +f 249 473 317 +f 1162 1060 1170 +f 1086 1118 1154 +f 82 68 16 +f 1989 1990 1536 +f 1633 1632 1611 +f 1487 2372 1305 +f 1494 1069 1023 +f 1137 1160 1127 +f 669 1166 679 +f 390 1285 426 +f 1955 1972 1971 +f 1219 1223 2437 +f 1254 1261 1223 +f 1319 1545 1056 +f 1320 1328 2443 +f 1261 1433 1223 +f 1219 1254 1223 +f 254 222 2428 +f 1237 1290 1265 +f 1284 1273 1263 +f 1277 1291 1301 +f 1314 102 1301 +f 1280 363 377 +f 1313 1353 1514 +f 468 451 439 +f 1918 1964 1956 +f 2026 29 2140 +f 1354 381 1279 +f 1224 30 1254 +f 147 158 173 +f 1247 1253 274 +f 1271 380 334 +f 2043 2072 2042 +f 274 300 267 +f 1356 1392 211 +f 13 240 1142 +f 1382 1330 1392 +f 1312 1323 155 +f 240 1125 1142 +f 2358 1573 1362 +f 1236 1249 1244 +f 1272 219 1348 +f 1271 1274 380 +f 191 2034 1982 +f 1992 2052 1990 +f 462 452 689 +f 2262 2286 2261 +f 183 489 1642 +f 2485 2480 1869 +f 84 111 1323 +f 1190 353 1354 +f 446 434 435 +f 1336 171 1341 +f 2021 430 2059 +f 862 878 1120 +f 1263 1273 1248 +f 1966 1921 2144 +f 1312 84 1323 +f 240 13 1348 +f 1359 1274 1271 +f 1392 1330 1247 +f 1520 1333 11 +f 1368 1253 1247 +f 1279 1285 1190 +f 2465 990 2489 +f 1272 1519 805 +f 1369 1272 805 +f 1317 95 1344 +f 1242 1248 1234 +f 1368 242 1363 +f 274 1262 1386 +f 532 597 1886 +f 2117 2026 2140 +f 1392 1247 274 +f 2162 508 985 +f 1964 1469 1965 +f 1315 104 1331 +f 1392 1356 1382 +f 128 1342 1336 +f 1285 427 426 +f 1219 1224 1254 +f 1320 1322 1321 +f 1320 1321 1328 +f 153 2443 1328 +f 1321 153 1328 +f 1235 1244 1243 +f 1225 1224 1219 +f 1359 353 1190 +f 1312 1473 1458 +f 1336 1342 147 +f 305 1333 1038 +f 1336 147 171 +f 516 31 19 +f 2479 2461 842 +f 1237 1265 427 +f 1263 1278 1284 +f 881 1827 834 +f 1237 427 1285 +f 1299 1312 1458 +f 1190 1285 1274 +f 1363 286 1253 +f 2330 2303 828 +f 427 442 426 +f 2493 2463 2492 +f 1285 380 1274 +f 522 18 1225 +f 2471 2472 2488 +f 2338 154 1321 +f 1423 1415 1218 +f 1225 18 1224 +f 1253 286 1262 +f 286 353 1359 +f 171 1368 1383 +f 1273 54 1234 +f 1973 2447 527 +f 1322 155 1321 +f 1203 1369 1413 +f 1307 363 1298 +f 1364 1375 1329 +f 1329 227 1306 +f 296 1298 1343 +f 947 2499 1447 +f 1203 1047 1272 +f 1098 1748 1123 +f 1519 1272 1348 +f 1277 70 1273 +f 1282 1337 1361 +f 286 302 353 +f 103 104 1315 +f 1377 435 434 +f 1449 1261 1345 +f 926 1310 806 +f 1263 1248 1242 +f 985 508 597 +f 1415 1222 1218 +f 88 1325 104 +f 170 111 156 +f 1384 1282 1361 +f 274 1253 1262 +f 1371 1317 1344 +f 1371 1366 1337 +f 1345 1459 1449 +f 171 1383 1341 +f 2438 1235 1227 +f 2134 1582 2118 +f 428 1260 1379 +f 1336 1341 1325 +f 1235 1242 1227 +f 1228 1687 2284 +f 1854 2140 2016 +f 1866 1887 1873 +f 1343 1298 1370 +f 1384 1361 2440 +f 171 242 1368 +f 1344 1309 1366 +f 1371 1344 1366 +f 1280 1377 1293 +f 200 1185 205 +f 1330 1383 1368 +f 1255 1264 1263 +f 543 1367 1876 +f 1343 1370 1260 +f 1293 1326 1370 +f 2440 1361 1302 +f 1282 1384 2406 +f 271 1337 1282 +f 170 2338 1323 +f 1528 1503 2470 +f 515 1347 2453 +f 1997 1705 1998 +f 2285 1228 2284 +f 1229 1250 1228 +f 1330 1368 1247 +f 1919 1619 2045 +f 1344 1364 1335 +f 1222 1240 1221 +f 1212 858 1741 +f 2388 1222 1221 +f 1528 2470 2068 +f 501 1308 2171 +f 1295 1311 1487 +f 2116 1619 1655 +f 1220 1229 1228 +f 8 663 573 +f 1343 1260 428 +f 1337 1366 1361 +f 1298 1280 1293 +f 1269 1345 1261 +f 1279 381 1290 +f 1230 1229 1220 +f 1230 1245 1229 +f 1245 1250 1229 +f 1227 1234 31 +f 1302 1361 1350 +f 1245 1266 1428 +f 1992 2023 2052 +f 2482 2471 2475 +f 452 462 461 +f 271 1282 1275 +f 1991 1989 1934 +f 1366 1309 1350 +f 1344 1335 1309 +f 730 699 974 +f 1374 1252 1208 +f 597 508 1912 +f 1363 1253 1368 +f 1386 1271 300 +f 1211 1218 1222 +f 1376 1377 434 +f 2399 2437 1211 +f 1284 1291 1277 +f 1230 1251 1245 +f 1251 1266 1245 +f 1317 1371 1337 +f 1288 1286 1095 +f 1095 1286 1352 +f 1241 1208 1352 +f 1241 1374 1208 +f 1284 1278 1291 +f 211 1392 267 +f 1344 1375 1364 +f 929 583 1028 +f 1361 1366 1350 +f 1115 1294 1639 +f 1291 103 1301 +f 1220 1231 1230 +f 1231 1251 1230 +f 1234 1248 1273 +f 1255 55 1264 +f 1360 1450 1702 +f 363 1280 1298 +f 1369 1203 1272 +f 1415 1240 1222 +f 1216 1231 1220 +f 1243 1263 1235 +f 1375 227 1329 +f 1264 1278 1263 +f 855 899 961 +f 1286 1241 1352 +f 2081 2128 2107 +f 1223 1433 1423 +f 1473 1312 155 +f 154 153 1321 +f 1377 1376 1293 +f 1392 274 267 +f 334 300 1271 +f 1955 1991 1934 +f 1613 1327 1288 +f 1327 1286 1288 +f 1349 1374 1241 +f 2370 2025 2367 +f 1315 1331 133 +f 434 446 1256 +f 1232 1251 1231 +f 1243 1244 1255 +f 1286 1304 1241 +f 1349 1107 1374 +f 1359 1271 1386 +f 1227 516 2431 +f 219 240 1348 +f 1270 271 1275 +f 1255 1263 1243 +f 2026 1926 29 +f 1683 2157 1212 +f 1326 1293 1376 +f 1255 32 55 +f 104 1325 1341 +f 519 2462 2475 +f 2154 2161 2137 +f 1376 434 1246 +f 1246 434 1256 +f 1257 1251 1232 +f 1262 1359 1386 +f 2195 2192 2186 +f 1308 534 1226 +f 2026 2117 544 +f 1327 1613 1324 +f 1327 1326 1286 +f 1286 1326 1304 +f 104 1341 1331 +f 774 524 880 +f 837 1517 534 +f 1127 1123 1567 +f 1279 1237 1285 +f 1297 1381 1294 +f 1217 1232 1216 +f 1142 1519 13 +f 1436 1267 1287 +f 1324 1372 1327 +f 1304 1246 1241 +f 1246 1349 1241 +f 1246 1373 1349 +f 286 1359 1262 +f 1382 1383 1330 +f 1284 1277 1273 +f 489 1998 1799 +f 1675 1116 1075 +f 106 1317 1337 +f 1311 1295 1281 +f 1292 1364 1329 +f 1335 1364 1292 +f 1334 1294 1115 +f 1334 1297 1294 +f 1300 1381 1297 +f 973 842 2461 +f 1217 1239 1232 +f 1232 1239 1257 +f 1258 1267 1436 +f 1359 1190 1274 +f 1862 1405 1877 +f 1372 1339 1327 +f 1339 1326 1327 +f 1373 1351 1349 +f 1276 1311 1281 +f 1256 2386 1351 +f 2 1109 1300 +f 482 1731 520 +f 803 1604 2022 +f 1223 1218 1211 +f 1341 1383 1382 +f 1298 1293 1370 +f 1190 1354 1279 +f 1324 2398 1372 +f 1714 1700 2173 +f 183 2000 489 +f 1701 1666 192 +f 1227 1242 1234 +f 1332 1289 1310 +f 1517 2005 2130 +f 1331 1341 1382 +f 525 1249 1236 +f 23 1268 1450 +f 1264 1291 1278 +f 1281 1287 1267 +f 1295 1305 1287 +f 1281 1295 1287 +f 1487 1305 1295 +f 1605 2097 2058 +f 1326 1376 1304 +f 1304 1376 1246 +f 1316 1919 1984 +f 2500 1949 2460 +f 1332 1313 1289 +f 2189 2181 2177 +f 1335 1334 1353 +f 1292 1297 1334 +f 1428 1250 1245 +f 969 958 952 +f 1217 1233 1239 +f 1233 1257 1239 +f 1876 1367 1338 +f 1379 1260 1372 +f 1372 1260 1339 +f 1128 1302 1310 +f 1310 1302 1332 +f 1335 1353 1313 +f 1292 1334 1335 +f 1297 1329 1300 +f 1279 1290 1237 +f 1301 103 1314 +f 70 1301 102 +f 23 1333 1268 +f 380 1285 390 +f 772 325 1275 +f 1314 103 1315 +f 2473 2458 2487 +f 1276 1281 1267 +f 1344 95 1375 +f 2053 1771 1572 +f 1246 1256 1373 +f 1373 1256 1351 +f 1340 1302 1128 +f 1350 1313 1332 +f 1329 1297 1292 +f 2434 2473 2487 +f 106 1337 271 +f 23 471 1333 +f 622 723 509 +f 1388 1517 2127 +f 1991 1990 1989 +f 183 1636 1226 +f 2133 1605 2151 +f 1260 1370 1339 +f 1339 1370 1326 +f 867 1894 1902 +f 390 426 412 +f 1235 1263 1242 +f 1399 1422 1233 +f 305 11 1333 +f 1300 1329 1306 +f 1302 1350 1332 +f 1350 1309 1313 +f 1309 1335 1313 +f 2470 2102 1502 +f 1787 1531 1599 +f 1724 1725 1691 +f 1827 1601 1927 +f 1678 1358 1476 +f 1823 1812 1846 +f 1805 1824 1708 +f 1746 1676 1797 +f 325 2395 429 +f 1835 1677 1826 +f 1507 1790 1722 +f 1526 1672 858 +f 158 147 1342 +f 1462 1473 1322 +f 1474 1414 1565 +f 1761 1900 1877 +f 940 1759 1008 +f 1565 1015 1008 +f 1924 1533 1933 +f 1878 826 830 +f 1565 1414 1015 +f 1402 1088 1008 +f 1538 1532 1651 +f 1015 1552 1008 +f 1538 1591 1474 +f 1532 1538 1474 +f 1474 1591 1414 +f 1484 1402 1008 +f 1552 1484 1008 +f 1414 1460 1015 +f 1015 1460 1552 +f 806 1289 945 +f 1597 1538 1659 +f 1484 1319 1402 +f 1056 1402 1319 +f 1538 1597 1591 +f 1591 960 1414 +f 1414 960 1460 +f 1925 1466 1455 +f 1552 1400 1484 +f 1484 1400 1319 +f 1400 113 1319 +f 1597 1580 1591 +f 1460 1400 1552 +f 1514 1441 966 +f 1597 1659 1409 +f 1657 113 1400 +f 1460 1657 1400 +f 1288 1095 1634 +f 1551 1597 1409 +f 1580 1598 1591 +f 1591 1598 960 +f 1536 1990 2031 +f 960 1657 1460 +f 1809 1746 1797 +f 1423 1433 1432 +f 2478 1362 1409 +f 1463 1545 113 +f 1657 1463 113 +f 1457 1287 1305 +f 1682 1716 1746 +f 1434 1761 1885 +f 1013 1139 1617 +f 2379 1362 2478 +f 1420 1597 1551 +f 1420 1580 1597 +f 1664 1808 1712 +f 2256 2250 2231 +f 1362 1551 1409 +f 2196 2214 2213 +f 1691 1725 1777 +f 1626 192 1666 +f 1534 1574 2058 +f 1574 1600 1605 +f 1600 1606 1605 +f 1606 1641 1605 +f 1573 1420 1551 +f 1657 1485 1463 +f 678 1806 1742 +f 1534 1553 1574 +f 1574 1575 1600 +f 1810 2170 585 +f 1623 1641 1606 +f 1407 1657 960 +f 1598 1407 960 +f 1485 1142 1463 +f 1716 1581 1676 +f 1738 1743 1733 +f 843 2064 835 +f 1539 1575 1574 +f 1553 1539 1574 +f 1575 1592 1600 +f 1592 1624 1606 +f 1600 1592 1606 +f 1642 585 1641 +f 1623 1642 1641 +f 1485 164 1142 +f 1738 1516 1743 +f 1809 1720 1798 +f 1533 1535 1534 +f 1592 1607 1624 +f 1624 1623 1606 +f 1163 566 1116 +f 1407 1485 1657 +f 1432 1449 1439 +f 1100 802 2382 +f 1743 1516 1722 +f 1746 1716 1676 +f 1535 1539 1534 +f 1534 1539 1553 +f 1642 1623 1624 +f 1095 1208 1654 +f 967 1407 1598 +f 1580 967 1598 +f 1809 1797 1720 +f 1924 1524 1535 +f 1533 1924 1535 +f 1539 1576 1575 +f 1642 216 585 +f 1407 1529 1485 +f 1485 1529 164 +f 1472 1462 1482 +f 1415 1431 1240 +f 966 1194 714 +f 383 1182 152 +f 474 2337 446 +f 1743 1841 1757 +f 1486 1524 1924 +f 1535 1525 1539 +f 1575 1576 1592 +f 1420 967 1580 +f 1288 1634 1613 +f 459 427 1265 +f 1404 2179 1393 +f 1404 1403 1800 +f 1404 1410 1403 +f 1410 1749 1403 +f 1349 1351 218 +f 1486 1498 1524 +f 1535 1524 1525 +f 1607 1636 1624 +f 183 1642 1624 +f 1636 183 1624 +f 1107 1349 218 +f 1351 845 218 +f 164 1519 1142 +f 845 413 218 +f 1525 1576 1539 +f 1576 1582 1592 +f 1592 2134 1607 +f 2134 1636 1607 +f 2147 1491 1401 +f 1407 1589 1529 +f 1529 1519 164 +f 1693 1763 1444 +f 1924 1479 1486 +f 1592 1582 2134 +f 499 165 874 +f 2176 1857 1959 +f 2327 2368 2326 +f 2358 821 953 +f 953 821 1573 +f 1824 1704 1464 +f 1731 1358 1678 +f 1394 1410 1404 +f 1394 1418 1410 +f 1466 1479 1839 +f 1486 1479 1498 +f 1498 1525 1524 +f 1576 2080 1582 +f 1785 1684 1898 +f 804 398 802 +f 804 925 398 +f 1447 1562 2358 +f 2358 1562 821 +f 821 1620 1573 +f 1620 1420 1573 +f 1420 1556 967 +f 1393 1394 1404 +f 1525 2080 1576 +f 1621 1420 1620 +f 1621 1556 1420 +f 967 1589 1407 +f 1505 5 1357 +f 1266 1258 1436 +f 1393 1395 1394 +f 2176 2175 1848 +f 1455 1466 1839 +f 1525 1540 2080 +f 1582 2080 2118 +f 1100 804 802 +f 1556 1589 967 +f 1589 1082 1529 +f 1093 1685 1357 +f 1504 1093 1357 +f 1425 1418 1394 +f 1475 1479 1466 +f 1479 1506 1498 +f 1789 1784 1730 +f 2501 2465 2489 +f 1438 1458 1430 +f 1462 1458 1473 +f 1454 805 1529 +f 1082 1454 1529 +f 1529 805 1519 +f 1425 1394 1395 +f 1425 1744 1418 +f 1479 1475 1506 +f 1540 2060 2080 +f 1556 1082 1589 +f 1443 945 1511 +f 1506 1536 1498 +f 1498 1536 1525 +f 1525 1536 1540 +f 1670 852 1672 +f 1998 1388 1389 +f 1511 966 1509 +f 1509 966 714 +f 1442 1443 1496 +f 1562 1635 821 +f 155 1322 1473 +f 1439 1458 1438 +f 1426 1425 1395 +f 1475 1499 1506 +f 1735 1588 1776 +f 2422 2454 2421 +f 1423 1432 1415 +f 1559 2101 2073 +f 845 866 413 +f 1429 1620 821 +f 1620 1429 1621 +f 1228 1250 1687 +f 1002 945 1443 +f 2382 802 1083 +f 1859 1411 1395 +f 1411 1426 1395 +f 1426 1744 1425 +f 1590 1437 1483 +f 1480 1475 1466 +f 1480 1499 1475 +f 1510 1733 1743 +f 1663 1696 1658 +f 1430 1453 1452 +f 1452 1472 1471 +f 1452 1471 1448 +f 1430 1452 1421 +f 1430 1421 1422 +f 1429 1082 1556 +f 1621 1429 1556 +f 1351 2386 845 +f 1126 1059 487 +f 1639 1437 1563 +f 1504 1928 1093 +f 1499 1536 1506 +f 1588 1770 1727 +f 1110 1747 1397 +f 1776 1588 1531 +f 1322 1320 1482 +f 1590 1629 1571 +f 1730 1877 1838 +f 1429 935 1082 +f 1082 935 1454 +f 804 1443 925 +f 1139 1007 1639 +f 1925 1480 1466 +f 1934 1989 1480 +f 1499 1989 1536 +f 1727 1526 1531 +f 1593 1614 502 +f 2455 2431 2400 +f 1755 1680 908 +f 1563 1571 1564 +f 1647 1078 1501 +f 2490 1635 1106 +f 1496 1511 717 +f 2454 2431 516 +f 1478 1153 1093 +f 1870 1426 1411 +f 1426 1723 1744 +f 962 986 1412 +f 717 1511 1509 +f 1825 1704 1824 +f 2225 2234 2253 +f 1490 1557 1188 +f 1635 80 821 +f 805 1454 935 +f 1186 706 695 +f 1194 1161 714 +f 1512 1007 1013 +f 592 97 204 +f 1258 1266 1257 +f 82 1333 471 +f 1694 1710 1505 +f 1643 490 1661 +f 1661 490 1114 +f 1518 2068 2484 +f 1750 1808 1664 +f 1656 1635 2490 +f 935 1521 805 +f 1546 1629 1076 +f 1301 70 1277 +f 966 1441 1194 +f 1148 1825 1824 +f 1614 1609 1643 +f 1114 1092 1921 +f 1770 1739 1670 +f 1631 1632 1646 +f 821 1016 1429 +f 1429 1016 935 +f 1632 1095 1654 +f 1083 262 688 +f 1724 1686 1725 +f 1644 490 1643 +f 1092 1149 1921 +f 3 893 1832 +f 988 1640 1188 +f 916 1107 284 +f 1656 80 1635 +f 1016 821 80 +f 1016 1521 935 +f 1478 1202 1153 +f 1401 1928 29 +f 1440 1478 1928 +f 1849 1700 1865 +f 1595 1611 1612 +f 1208 198 341 +f 1464 1704 1746 +f 2143 984 1721 +f 1848 1849 1868 +f 1662 1114 490 +f 1669 1787 1682 +f 1656 1618 80 +f 198 1208 916 +f 1440 1928 1401 +f 1521 1369 805 +f 1252 1107 916 +f 1745 678 1672 +f 1703 1779 1721 +f 1750 1465 1808 +f 1609 1644 1643 +f 1092 1114 1662 +f 1826 1523 1793 +f 2262 2261 2224 +f 1696 2166 1767 +f 1016 1648 1521 +f 1208 1252 916 +f 833 688 1067 +f 1794 1803 1558 +f 28 17 512 +f 1750 861 1566 +f 1594 1644 1609 +f 1644 1645 490 +f 490 1645 1662 +f 2229 2262 2224 +f 1602 861 1760 +f 1530 1777 1760 +f 872 1706 1673 +f 1696 1668 2166 +f 1708 1809 1798 +f 1581 1716 1814 +f 1709 1794 1680 +f 1233 1421 1257 +f 1724 1476 1686 +f 1469 1481 1965 +f 1965 1481 1492 +f 2073 1549 1559 +f 1594 1615 1644 +f 1799 1706 1755 +f 1725 1686 1837 +f 1720 1797 1572 +f 1618 2467 2022 +f 1618 1579 80 +f 1648 1016 80 +f 2134 2152 1636 +f 1611 1632 1631 +f 1761 1434 1470 +f 1559 1577 1594 +f 1603 1615 1594 +f 1615 1645 1644 +f 1637 1662 1645 +f 1662 1199 1092 +f 1199 1149 1092 +f 1451 1108 1149 +f 665 734 756 +f 1865 1700 1714 +f 1709 1841 1794 +f 1618 2022 1579 +f 1648 1413 1369 +f 1521 1648 1369 +f 1520 11 1401 +f 1446 1470 1434 +f 1798 1691 1754 +f 2063 1544 2073 +f 2073 1544 1549 +f 1594 1577 1603 +f 1615 1637 1645 +f 1637 1199 1662 +f 1427 1149 1199 +f 2167 1108 1451 +f 1997 1673 1705 +f 1706 1799 1705 +f 1841 1709 1757 +f 1604 1579 2022 +f 1579 707 80 +f 80 707 1648 +f 1520 1401 1491 +f 1649 1520 1491 +f 1435 1434 1885 +f 1470 1469 1461 +f 1481 1508 2024 +f 2370 1544 2063 +f 1549 1568 1559 +f 1559 1568 1577 +f 1603 1610 1615 +f 1615 1610 1637 +f 999 1199 1637 +f 1451 1149 1427 +f 1137 1825 1148 +f 1706 1705 1673 +f 1138 1604 2116 +f 1138 1579 1604 +f 1413 1648 707 +f 2360 2024 1508 +f 598 1075 1116 +f 229 93 1468 +f 1839 1479 1684 +f 2216 2229 2224 +f 1610 1625 1637 +f 329 999 1637 +f 1199 1017 1427 +f 1017 303 1427 +f 303 1451 1427 +f 1792 1754 1777 +f 2309 2391 2301 +f 1655 1138 2116 +f 1138 707 1579 +f 1649 1491 206 +f 1406 1885 1398 +f 1406 1419 1885 +f 1419 1435 1885 +f 1434 1435 1446 +f 1470 1481 1469 +f 1577 1583 1603 +f 999 1017 1199 +f 81 67 941 +f 67 1650 941 +f 1259 1815 2164 +f 1619 2116 2045 +f 1424 707 1138 +f 1702 1649 206 +f 1687 1406 1398 +f 1477 1481 1470 +f 1568 1569 1577 +f 1577 1569 1583 +f 1603 1583 1610 +f 1625 329 1637 +f 2167 340 273 +f 81 273 340 +f 81 962 67 +f 1547 1619 1488 +f 1830 1739 1770 +f 938 1424 1138 +f 1424 1413 707 +f 1527 1649 1702 +f 1527 1520 1649 +f 1527 1268 1520 +f 1250 1406 1687 +f 1441 1353 1115 +f 1203 1413 1051 +f 1250 1419 1406 +f 1477 2372 1481 +f 1481 2372 1508 +f 2449 1560 1568 +f 1549 2449 1568 +f 1568 1560 1569 +f 1569 1584 1583 +f 1652 329 1625 +f 329 817 999 +f 285 1017 999 +f 303 10 1451 +f 10 2167 1451 +f 1412 1650 67 +f 1412 1488 1650 +f 1547 1023 1619 +f 1023 1655 1619 +f 1655 938 1138 +f 1456 1413 1424 +f 1457 1470 1446 +f 1457 1477 1470 +f 329 1652 817 +f 10 340 2167 +f 938 1546 1424 +f 1546 1456 1424 +f 1259 1548 1779 +f 2052 2031 1990 +f 1440 1202 1478 +f 1428 1419 1250 +f 1428 1435 1419 +f 1428 1446 1435 +f 1934 1935 1955 +f 1560 1584 1569 +f 1610 1638 1625 +f 1638 1652 1625 +f 817 1077 999 +f 1077 285 999 +f 980 303 1017 +f 962 1412 67 +f 1494 1023 1547 +f 325 271 1270 +f 1443 1511 1496 +f 1450 1268 1527 +f 1514 1353 1441 +f 1287 1446 1428 +f 1446 1287 1457 +f 1305 2372 1477 +f 1992 1990 1991 +f 1992 1991 1971 +f 1971 1991 1955 +f 2449 1549 2418 +f 1583 1616 1610 +f 1610 1616 1638 +f 10 1396 340 +f 340 1445 81 +f 1445 962 81 +f 1790 984 1753 +f 984 2148 1753 +f 1588 1713 1770 +f 969 978 958 +f 1741 1779 1703 +f 1758 1846 1754 +f 1827 1819 1029 +f 1818 1530 1712 +f 1750 1566 2127 +f 2459 2434 2483 +f 1798 1720 1771 +f 1794 1841 1803 +f 216 1755 1810 +f 1098 1735 1748 +f 1735 1497 1748 +f 1502 2102 1601 +f 881 1502 1601 +f 1455 1839 1744 +f 1706 1709 1680 +f 1212 1741 1703 +f 1788 1969 1671 +f 1075 1074 1692 +f 951 2500 881 +f 2490 2486 2463 +f 1748 1497 1781 +f 1721 984 1840 +f 1815 1259 1741 +f 1626 1756 1837 +f 975 987 1542 +f 2230 2236 2235 +f 1772 678 734 +f 1542 1671 975 +f 1806 1772 1780 +f 678 1772 1806 +f 2218 2225 2268 +f 1828 1732 2007 +f 1526 1688 1531 +f 1752 1526 1554 +f 1844 1818 1712 +f 1823 1846 1804 +f 1781 1669 1704 +f 1721 1779 2143 +f 1770 1670 1526 +f 1497 1669 1781 +f 1098 1713 1735 +f 1742 1815 1741 +f 1526 858 1875 +f 1599 1531 1688 +f 1803 1790 1558 +f 1703 1721 1683 +f 1832 1766 957 +f 1542 1679 1671 +f 1679 1788 1671 +f 1927 1819 1827 +f 1718 1745 1739 +f 1684 1022 1839 +f 1459 1283 1299 +f 1022 1410 1418 +f 2368 2393 2326 +f 1669 1497 1776 +f 1875 858 1212 +f 1739 1745 852 +f 1964 1918 1461 +f 1356 133 1331 +f 1765 1829 1468 +f 858 1742 1741 +f 1006 1674 1021 +f 1723 1936 1935 +f 1468 1713 1098 +f 1724 1678 1476 +f 1680 1783 908 +f 1731 1543 520 +f 1683 1721 1840 +f 1467 1679 1542 +f 1812 1708 1846 +f 1679 1975 1788 +f 1713 1830 1770 +f 1803 1722 1790 +f 2301 2391 2349 +f 1713 1588 1735 +f 1836 1530 1818 +f 1837 1756 861 +f 886 571 556 +f 1181 1805 1812 +f 1706 1680 1755 +f 1677 1729 1775 +f 1776 1787 1669 +f 1526 1670 1672 +f 1727 1770 1526 +f 987 1467 1542 +f 1567 1704 1137 +f 1693 1865 1714 +f 897 1762 912 +f 1135 1697 1062 +f 1697 376 1062 +f 1543 1731 1678 +f 1793 1679 1467 +f 1777 1602 1760 +f 1846 1798 1754 +f 1835 1096 1677 +f 1033 1030 940 +f 1450 1527 1702 +f 1717 376 1697 +f 1711 1717 1697 +f 1717 165 376 +f 1840 984 1790 +f 1669 1746 1704 +f 1669 1682 1746 +f 2301 2349 2308 +f 1882 1444 1898 +f 1820 1789 1730 +f 861 1380 1566 +f 2301 2308 2266 +f 1771 1543 1691 +f 1958 1659 1651 +f 1697 1360 1711 +f 1711 1737 1717 +f 1717 1737 165 +f 1790 1753 1558 +f 1668 1696 1663 +f 1360 1702 1711 +f 1702 1707 1711 +f 1707 1737 1711 +f 1737 1751 165 +f 1444 1782 1693 +f 1716 1787 1599 +f 1744 1839 1022 +f 1898 1444 1785 +f 206 1707 1702 +f 1764 2468 1751 +f 316 1844 893 +f 893 1844 915 +f 1845 1804 1758 +f 1380 861 1756 +f 1780 670 1021 +f 1714 2172 1763 +f 1783 1558 1663 +f 1750 2127 1465 +f 1798 1771 1691 +f 1691 1543 1724 +f 1872 1910 839 +f 1737 2044 1751 +f 1751 2044 1764 +f 1757 1701 482 +f 1725 1602 1777 +f 1836 1845 1530 +f 2102 2470 1503 +f 2496 1899 544 +f 763 2484 946 +f 987 1719 1467 +f 1845 1758 1792 +f 1725 1837 1602 +f 1872 1866 1873 +f 1712 1530 1760 +f 489 1799 216 +f 1760 861 1750 +f 2068 2466 2460 +f 1696 2159 2168 +f 377 1377 1280 +f 1797 1676 1572 +f 1581 2053 1572 +f 1676 1581 1572 +f 1764 2498 2468 +f 2468 2498 1994 +f 1861 1695 1860 +f 2481 2004 2495 +f 1826 1677 1523 +f 1670 1739 852 +f 2234 2269 2253 +f 1724 1543 1678 +f 1658 2168 1791 +f 1397 1747 1719 +f 1696 2168 1658 +f 979 519 272 +f 1774 1975 1679 +f 975 1671 932 +f 1787 1716 1682 +f 1835 1826 1747 +f 2501 2469 961 +f 1810 908 1791 +f 1982 1768 191 +f 1137 1704 1825 +f 1804 1846 1758 +f 2004 2044 1737 +f 913 1969 902 +f 2498 1795 1801 +f 915 1844 1712 +f 1689 915 1712 +f 1740 1752 1541 +f 695 661 199 +f 1865 1693 1782 +f 1824 1464 1809 +f 1829 1765 1718 +f 1816 1768 1982 +f 1816 1622 1768 +f 1622 2165 1681 +f 1768 1622 1681 +f 670 1772 228 +f 1283 1459 52 +f 1785 1444 1749 +f 1675 1075 1685 +f 1567 1781 1704 +f 1858 1857 1848 +f 1526 1752 1688 +f 1791 2160 1810 +f 908 1658 1791 +f 1813 1773 1558 +f 1845 1792 1530 +f 69 376 165 +f 3 1832 1834 +f 1722 1516 1507 +f 1801 1821 1994 +f 1833 1982 2046 +f 1821 1833 2046 +f 1833 1816 1982 +f 1022 1785 1749 +f 2160 2170 1810 +f 1147 1719 1726 +f 1683 1840 1507 +f 1467 1719 1793 +f 1795 1802 1801 +f 1802 1811 1801 +f 1801 1811 1821 +f 1690 2165 1622 +f 1934 1480 1925 +f 229 1468 1091 +f 1780 2164 1742 +f 1672 1742 858 +f 1833 1417 1816 +f 1417 1622 1816 +f 1831 2165 1690 +f 1668 1663 1558 +f 1719 1747 1826 +f 1760 1750 1664 +f 1817 1690 1622 +f 1530 1792 1777 +f 948 1796 1802 +f 1796 1811 1802 +f 1515 1817 1622 +f 1695 1861 1831 +f 1783 1663 1658 +f 1749 1410 1022 +f 854 1796 948 +f 1811 1842 1833 +f 1821 1811 1833 +f 1833 1842 1417 +f 1622 1417 1515 +f 127 1804 1845 +f 1686 1626 1837 +f 1608 1690 1817 +f 1523 1775 1762 +f 127 1845 1836 +f 1812 1805 1708 +f 1523 1677 1775 +f 1780 1772 670 +f 1758 1754 1792 +f 1204 1796 854 +f 1822 1842 1811 +f 1608 1831 1690 +f 1822 1811 1796 +f 1842 1416 1417 +f 1417 1416 1515 +f 1515 1608 1817 +f 1728 1831 1608 +f 908 1783 1658 +f 127 1836 316 +f 1805 1148 1824 +f 852 1745 1672 +f 1478 1093 1928 +f 1822 1843 1842 +f 1843 959 1842 +f 1842 959 1416 +f 1728 1695 1831 +f 1728 1860 1695 +f 2346 446 2337 +f 1602 1837 861 +f 1087 1096 1835 +f 1708 1824 1809 +f 2004 1737 505 +f 1567 1748 1781 +f 520 1543 1883 +f 1760 1664 1712 +f 128 1336 72 +f 2053 1883 1543 +f 1822 180 1843 +f 1786 1608 1515 +f 929 2462 519 +f 512 2402 506 +f 1212 1703 1683 +f 1830 1829 1739 +f 2053 1543 1771 +f 1416 1769 1515 +f 1769 1786 1515 +f 1786 1728 1608 +f 1712 1808 1689 +f 1794 1558 1783 +f 1497 1735 1776 +f 1127 1567 1137 +f 1123 1748 1567 +f 36 205 1185 +f 959 1734 1416 +f 1738 1733 1541 +f 1774 1762 1974 +f 1752 1554 1541 +f 1752 1740 1688 +f 1526 1875 1554 +f 1468 1829 1830 +f 1755 908 1810 +f 1716 1599 1814 +f 1806 1780 1742 +f 2308 2349 2340 +f 1832 915 1689 +f 1713 1468 1830 +f 1814 1599 1346 +f 1832 1689 1766 +f 1022 1684 1785 +f 1093 1153 1116 +f 1672 678 1742 +f 1675 1685 1093 +f 1841 1743 1722 +f 1814 2053 1581 +f 1464 1746 1809 +f 2485 2497 2493 +f 1416 1734 1769 +f 1665 1728 1786 +f 1665 1951 1728 +f 1951 1860 1728 +f 1951 2094 1860 +f 1844 1836 1818 +f 316 1836 1844 +f 1776 1531 1787 +f 1719 1826 1793 +f 2147 1401 29 +f 2111 2121 1548 +f 1741 1259 1779 +f 1843 347 1834 +f 1843 1734 959 +f 1766 1769 1734 +f 957 1766 1734 +f 1766 1786 1769 +f 1766 1689 1786 +f 1689 1665 1786 +f 1754 1691 1777 +f 1507 1840 1790 +f 1761 1470 1461 +f 1523 1679 1793 +f 1091 1468 1098 +f 1820 1730 1838 +f 1843 1834 1734 +f 1808 1951 1665 +f 1588 1727 1531 +f 893 915 1832 +f 1523 1774 1679 +f 272 2488 710 +f 1093 1116 1675 +f 2340 2349 2348 +f 1832 1734 1834 +f 1832 957 1734 +f 1951 1808 2094 +f 1685 1692 1505 +f 1043 295 698 +f 2143 1779 2121 +f 1689 1808 1665 +f 1693 1714 1763 +f 1738 2157 1516 +f 1114 1921 236 +f 1268 1333 1520 +f 1149 1108 431 +f 508 2144 1912 +f 1957 1108 1537 +f 431 1108 1957 +f 1018 1108 2167 +f 1338 1957 1681 +f 2163 1957 1338 +f 1983 1390 2093 +f 30 557 37 +f 1714 2173 2172 +f 1983 1984 1390 +f 1984 2065 1390 +f 884 1762 897 +f 2065 1984 1214 +f 1950 1974 1762 +f 884 1950 1762 +f 2012 1698 1861 +f 1214 2116 803 +f 1950 1938 1974 +f 1938 1967 1974 +f 1900 1761 1461 +f 865 1929 884 +f 884 1929 1950 +f 2062 2071 2042 +f 919 1985 1732 +f 1593 502 2146 +f 1995 1213 2098 +f 1522 2476 1651 +f 2174 1849 2175 +f 1480 1989 1499 +f 1929 1938 1950 +f 1605 2058 1574 +f 2097 1605 2133 +f 1912 2014 1886 +f 2092 2082 2083 +f 206 1930 505 +f 2101 2100 2092 +f 2073 2101 2092 +f 839 1910 865 +f 1910 1901 1929 +f 865 1910 1929 +f 1967 1788 1975 +f 2073 2092 2063 +f 2101 1593 2100 +f 2015 1876 1698 +f 1853 1884 2014 +f 1831 1698 2165 +f 1316 273 81 +f 1901 1920 1929 +f 1929 1920 1938 +f 1920 1968 1967 +f 1938 1920 1967 +f 1849 2174 1700 +f 2173 1700 2174 +f 2062 2072 2091 +f 803 2467 2059 +f 2239 1736 2240 +f 1505 1357 1685 +f 1358 1686 1476 +f 1967 1968 1788 +f 1968 1969 1788 +f 2065 2110 2156 +f 2065 1214 2110 +f 2110 1214 503 +f 273 2093 1018 +f 273 1983 2093 +f 532 1886 2155 +f 2034 2021 1947 +f 216 1810 585 +f 1912 543 2014 +f 1390 2051 1537 +f 1872 1873 1910 +f 1984 2045 1214 +f 597 1912 1886 +f 1593 2146 2100 +f 2071 2062 2090 +f 2034 2046 1982 +f 2034 1947 2046 +f 1214 2045 2116 +f 1873 1887 1910 +f 1887 1901 1910 +f 1562 1447 1106 +f 2163 431 1957 +f 1948 1972 1936 +f 1972 1948 1992 +f 2014 2015 2013 +f 1853 2014 2013 +f 1550 1884 1853 +f 1947 2468 1994 +f 1355 1550 2154 +f 1355 1884 1550 +f 2081 2108 2128 +f 2024 1965 1492 +f 2024 2032 1965 +f 2116 1604 803 +f 1901 1911 1920 +f 1939 1968 1920 +f 1911 1939 1920 +f 872 1626 1666 +f 2062 2091 2120 +f 1819 1927 1759 +f 1021 1674 1780 +f 872 1673 1756 +f 1550 501 2171 +f 1378 1550 2171 +f 2146 2162 2145 +f 1358 482 192 +f 2109 2120 2119 +f 1866 1872 2227 +f 1391 2012 1860 +f 2136 2137 2161 +f 2162 1661 236 +f 1887 1894 1901 +f 1901 1894 1911 +f 505 1707 206 +f 2120 2137 2136 +f 2142 2164 1674 +f 1860 2012 1861 +f 1894 1939 1911 +f 2080 2060 2118 +f 2162 236 508 +f 2164 1815 1742 +f 1018 2093 1537 +f 2154 1378 2161 +f 2041 2098 2491 +f 2043 2042 2032 +f 1108 1018 1537 +f 1465 2094 1808 +f 502 1643 1661 +f 2467 1618 1656 +f 2119 2136 2135 +f 2119 2108 2071 +f 878 1183 1195 +f 2101 1594 1593 +f 2033 2370 2063 +f 2482 2491 2098 +f 1282 2406 1275 +f 2003 1948 1956 +f 2043 2032 2024 +f 2025 2043 2024 +f 2154 1550 1378 +f 1795 2498 1764 +f 2142 1548 2164 +f 2431 2454 2422 +f 1981 2011 1993 +f 2349 2391 2362 +f 502 2162 2146 +f 2025 2024 2360 +f 2129 2120 2091 +f 1732 1985 2007 +f 2171 1308 209 +f 1930 1995 2041 +f 1390 1238 2051 +f 1866 1878 1887 +f 1878 1894 1887 +f 1965 2032 2011 +f 874 2480 2492 +f 2071 2108 2069 +f 1358 1731 482 +f 430 2021 2034 +f 1965 2003 1964 +f 1855 1889 831 +f 1668 1773 2150 +f 1390 2156 1238 +f 898 869 1903 +f 2391 2407 2362 +f 2121 2111 2074 +f 1548 1259 2164 +f 2099 2129 2091 +f 1550 1853 501 +f 1853 1852 501 +f 952 2017 969 +f 2085 2121 2074 +f 2130 2006 1391 +f 2144 1367 543 +f 2100 2146 2099 +f 1545 1319 113 +f 1903 1922 898 +f 1922 1931 898 +f 585 2170 1641 +f 2007 2017 952 +f 2017 2074 969 +f 1558 1753 1813 +f 837 2005 1517 +f 2005 2006 2130 +f 1532 1474 1528 +f 2003 1981 1948 +f 2070 2071 2069 +f 1922 919 1931 +f 2017 2085 2074 +f 2085 2104 2121 +f 2100 2099 2082 +f 2156 2110 2034 +f 505 2474 2004 +f 1903 871 1922 +f 1922 1952 919 +f 919 1952 1985 +f 1985 2001 2007 +f 2001 2036 2017 +f 2007 2001 2017 +f 2017 2036 2085 +f 2036 2047 2085 +f 2047 2075 2085 +f 2075 2104 2085 +f 1948 1993 2023 +f 2400 2422 2407 +f 2011 2070 1993 +f 2033 2043 2025 +f 2012 2015 1698 +f 1876 1338 2165 +f 871 1940 1922 +f 1985 1976 2001 +f 2121 2104 2143 +f 1051 1413 1456 +f 2358 1362 2379 +f 1859 1789 1870 +f 2090 2109 2071 +f 1405 1398 1885 +f 1886 1884 1355 +f 1922 1960 1952 +f 1952 1960 1985 +f 1960 1976 1985 +f 1956 1948 1936 +f 2135 209 2128 +f 2157 1875 1212 +f 2160 2168 2169 +f 1900 1461 1918 +f 2001 2018 2036 +f 2075 2086 2104 +f 2111 2142 2103 +f 1937 1956 1936 +f 2023 2070 2061 +f 2135 2128 2108 +f 2042 2071 2011 +f 2138 413 2383 +f 2033 2072 2043 +f 1922 1940 1960 +f 2070 2069 2061 +f 2069 2108 2061 +f 2108 2119 2135 +f 1855 1904 1889 +f 1889 1904 871 +f 871 1904 1940 +f 1976 2018 2001 +f 2036 2018 2047 +f 2122 2143 2104 +f 216 1642 489 +f 2148 984 2143 +f 1975 1974 1967 +f 2157 1683 1516 +f 1614 1593 1594 +f 2269 2270 2276 +f 1926 2147 29 +f 2082 2091 2072 +f 430 503 2059 +f 1904 1905 1940 +f 1940 1961 1960 +f 1961 1976 1960 +f 2087 2086 2075 +f 2065 2156 1390 +f 1820 1838 1900 +f 534 1308 837 +f 2167 273 1018 +f 831 1850 1855 +f 2019 2037 2018 +f 2018 2037 2047 +f 2037 2075 2047 +f 2086 2095 2104 +f 2095 2122 2104 +f 2122 2148 2143 +f 1926 1213 1995 +f 1405 1885 1761 +f 2006 2013 2012 +f 2211 2233 2216 +f 1855 1890 1904 +f 1904 1895 1905 +f 1905 1932 1940 +f 1961 1977 1976 +f 1976 1986 2018 +f 2484 2476 1518 +f 1870 1411 1859 +f 1548 2142 2111 +f 1904 1890 1895 +f 1895 1932 1905 +f 1940 1932 1961 +f 1976 1977 1986 +f 1986 2008 2018 +f 2018 2008 2019 +f 2087 2075 2037 +f 2087 2095 2086 +f 2094 1391 1860 +f 1852 1853 2006 +f 1853 2013 2006 +f 929 979 850 +f 1855 1874 1890 +f 2008 2028 2019 +f 1993 2070 2023 +f 1705 1799 1998 +f 1491 2147 206 +f 1851 1856 1855 +f 1895 1890 1874 +f 2038 2019 2028 +f 2038 2048 2037 +f 2019 2038 2037 +f 2048 2067 2087 +f 2037 2048 2087 +f 2087 2067 2095 +f 2095 2149 2122 +f 2149 2148 2122 +f 1308 2005 837 +f 209 1308 1387 +f 1601 2102 1927 +f 254 170 201 +f 1800 1403 1763 +f 1510 1346 1740 +f 870 871 1903 +f 1919 1650 1619 +f 2148 1667 1753 +f 1932 1923 1961 +f 1977 1953 1986 +f 2067 2112 2095 +f 2112 2149 2095 +f 2148 2149 1667 +f 2422 2421 2407 +f 1926 2026 1213 +f 1912 2144 543 +f 2128 1387 2153 +f 1733 1510 1740 +f 990 853 2489 +f 503 1214 803 +f 1921 431 2163 +f 2146 2145 2129 +f 2144 1921 2163 +f 1855 1856 1874 +f 1895 1923 1932 +f 1923 1941 1961 +f 1961 1941 1977 +f 2048 2076 2067 +f 2076 2113 2067 +f 2067 2113 2112 +f 1723 1900 1937 +f 1870 1900 1723 +f 1367 2163 1338 +f 520 1346 1510 +f 1698 1831 1861 +f 1984 1919 2045 +f 1895 1891 1923 +f 2008 1986 2028 +f 1948 1981 1993 +f 1883 1346 520 +f 1883 1814 1346 +f 1930 206 2147 +f 2499 2486 1447 +f 1891 1906 1923 +f 1923 1953 1941 +f 1953 1977 1941 +f 1953 1987 1986 +f 2113 2123 2112 +f 2123 2149 2112 +f 1387 1308 1226 +f 1599 1688 1346 +f 2093 1390 1537 +f 2003 2011 1981 +f 1987 2028 1986 +f 2038 2049 2048 +f 2048 2049 2076 +f 1813 1667 2149 +f 2123 1813 2149 +f 1461 1469 1964 +f 1757 1510 1743 +f 505 1930 1999 +f 2223 1784 1789 +f 1532 1522 1651 +f 1906 1913 1923 +f 1913 1943 1923 +f 1943 1942 1923 +f 1923 1942 1953 +f 1942 1987 1953 +f 1308 1852 2005 +f 2053 1814 1883 +f 1733 1740 1541 +f 2154 1886 1355 +f 1503 1528 1474 +f 1874 1879 1895 +f 1895 1879 1891 +f 2076 2124 2113 +f 2113 2124 2123 +f 1896 1891 1879 +f 1891 1896 1906 +f 1942 1962 1987 +f 1962 2009 2028 +f 1987 1962 2028 +f 2009 2038 2028 +f 2109 2119 2071 +f 1918 1956 1937 +f 1851 1864 1856 +f 1896 1897 1906 +f 1906 1897 1913 +f 1943 1962 1942 +f 2049 2077 2076 +f 2124 2125 2123 +f 1930 2147 1926 +f 1902 1894 1878 +f 482 1510 1757 +f 2129 2137 2120 +f 503 803 2059 +f 1847 1857 1851 +f 1851 1857 1864 +f 2039 2038 2009 +f 2038 2039 2049 +f 2076 2077 2124 +f 2150 1813 2123 +f 482 520 1510 +f 1994 1821 2046 +f 2044 2004 1764 +f 1864 1867 1856 +f 1867 1874 1856 +f 1897 1944 1913 +f 1943 1944 1962 +f 2124 2126 2125 +f 2150 2123 2125 +f 2099 2146 2129 +f 2041 1995 2098 +f 1605 1641 2151 +f 1847 1959 1857 +f 1874 1867 1879 +f 1913 1944 1943 +f 1944 1963 1962 +f 2077 2096 2124 +f 2096 2126 2124 +f 2126 2150 2125 +f 941 1650 1919 +f 2135 2136 209 +f 1884 1886 2014 +f 2049 2029 2077 +f 1388 2127 1389 +f 1389 2127 1566 +f 1930 1926 1995 +f 941 1919 1316 +f 2110 503 430 +f 1867 1880 1879 +f 1879 1880 1896 +f 1897 1907 1944 +f 1963 1978 1962 +f 1962 1978 2009 +f 2039 2029 2049 +f 2077 2078 2096 +f 822 823 827 +f 2166 1668 2150 +f 81 941 1316 +f 2204 2216 2203 +f 2011 2071 2070 +f 1880 1892 1896 +f 1892 1907 1897 +f 1896 1892 1897 +f 1907 1914 1944 +f 1978 2010 2009 +f 2010 2039 2009 +f 1688 1740 1346 +f 1789 1820 1870 +f 2130 1391 2094 +f 1944 1945 1963 +f 2029 2078 2077 +f 1767 2150 2126 +f 1767 2166 2150 +f 803 2022 2467 +f 1503 1927 2102 +f 1914 1954 1944 +f 1944 1954 1945 +f 1963 1970 1978 +f 2078 2105 2096 +f 2105 2126 2096 +f 1965 2011 2003 +f 192 1626 1358 +f 2101 1559 1594 +f 1930 2041 1999 +f 1698 1876 2165 +f 1398 1871 891 +f 2165 1338 1681 +f 1970 2010 1978 +f 2010 2030 2029 +f 2039 2010 2029 +f 2030 2055 2078 +f 2029 2030 2078 +f 1849 1848 2175 +f 1871 1862 891 +f 543 2015 2014 +f 1857 1858 1864 +f 1864 1858 1867 +f 1963 1945 1970 +f 2055 2088 2078 +f 2078 2088 2105 +f 2105 2131 2126 +f 2126 2131 1767 +f 2063 2083 2033 +f 2161 2171 209 +f 2032 2042 2011 +f 1813 2150 1773 +f 1914 1908 1954 +f 1970 1979 2010 +f 2088 2131 2105 +f 2015 543 1876 +f 1694 1692 1048 +f 1395 2207 1859 +f 1395 1393 2207 +f 1730 1784 1736 +f 2500 2466 2470 +f 1709 1701 1757 +f 1945 1979 1970 +f 2030 2050 2055 +f 2350 2317 2286 +f 2154 2155 1886 +f 871 860 1889 +f 2161 209 2136 +f 2497 2463 2493 +f 2190 2204 2203 +f 1800 2179 1404 +f 2477 2469 1385 +f 1385 1715 2477 +f 2128 209 1387 +f 1858 1868 1867 +f 1867 1881 1880 +f 1893 1892 1880 +f 1881 1893 1880 +f 1893 1907 1892 +f 1907 1908 1914 +f 1954 1979 1945 +f 1979 1980 2010 +f 2131 2159 1767 +f 1765 93 339 +f 1761 1877 1405 +f 523 1347 515 +f 1541 2157 1738 +f 2144 2163 1367 +f 1380 1389 1566 +f 2317 2392 2316 +f 1994 2498 1801 +f 1867 1868 1881 +f 1980 2050 2030 +f 2010 1980 2030 +f 2050 2089 2055 +f 2055 2089 2088 +f 2088 2114 2131 +f 1538 1651 1659 +f 2145 2155 2129 +f 2140 29 1928 +f 2370 2033 2025 +f 2252 2239 2240 +f 2239 2252 1862 +f 2392 2391 2316 +f 2469 2501 1385 +f 2477 1715 1710 +f 502 1614 1643 +f 2438 1227 2431 +f 1915 1907 1893 +f 1915 1908 1907 +f 1954 1908 1979 +f 1908 1988 1979 +f 1979 1988 1980 +f 2114 2159 2131 +f 2155 2154 2129 +f 508 1966 2144 +f 872 1756 1626 +f 1710 1715 1505 +f 236 1966 508 +f 2272 2284 1398 +f 2325 2355 2319 +f 1548 2121 1779 +f 1532 1528 1522 +f 1980 2056 2050 +f 2050 2056 2089 +f 2013 2015 2012 +f 1964 2003 1956 +f 2006 2012 1391 +f 1565 1927 1503 +f 2244 2243 2226 +f 5 1715 1385 +f 1858 1848 1868 +f 1915 1946 1908 +f 1946 1988 1908 +f 1980 2020 2056 +f 2115 2159 2114 +f 2092 2083 2063 +f 1398 2284 1687 +f 2162 2155 2145 +f 519 2475 2488 +f 2158 5 1385 +f 5 1505 1715 +f 1692 1694 1505 +f 1988 2020 1980 +f 2115 2169 2159 +f 2169 2168 2159 +f 2083 2082 2072 +f 1316 1984 1983 +f 1488 1619 1650 +f 2083 2072 2033 +f 2361 1210 1233 +f 1933 1946 1915 +f 2056 2079 2089 +f 2088 2115 2114 +f 2099 2091 2082 +f 2162 532 2155 +f 1852 2006 2005 +f 2023 2061 2052 +f 2176 2184 2175 +f 2162 985 532 +f 1909 1893 1881 +f 1909 1915 1893 +f 1988 2040 2020 +f 2040 2056 2020 +f 2089 2079 2088 +f 2088 2079 2115 +f 1782 1444 1882 +f 1216 1215 2320 +f 867 1939 1894 +f 867 903 1939 +f 1372 2398 1379 +f 1863 504 2027 +f 2158 1385 504 +f 1868 1782 1881 +f 1909 1933 1915 +f 2040 1988 1946 +f 1481 2024 1492 +f 2120 2136 2119 +f 1522 1528 1518 +f 1871 1398 1405 +f 1221 1408 1399 +f 1357 5 2158 +f 2179 1800 1763 +f 1868 1865 1782 +f 1882 1881 1782 +f 1882 1909 1881 +f 2040 2057 2056 +f 2106 2079 2056 +f 2057 2106 2056 +f 2106 2132 2079 +f 2132 2115 2079 +f 2115 2132 2169 +f 532 985 597 +f 2092 2100 2082 +f 1210 1221 1399 +f 1399 1233 1210 +f 2130 2002 1517 +f 1849 1865 1868 +f 1933 2040 1946 +f 52 1269 30 +f 1667 1813 1753 +f 1997 1380 1673 +f 940 1008 1088 +f 1947 1994 2046 +f 1882 1916 1909 +f 1924 1933 1909 +f 1533 2040 1933 +f 1533 1534 2040 +f 2058 2040 1534 +f 2058 2057 2040 +f 1238 191 1768 +f 1997 1389 1380 +f 1875 1541 1554 +f 1854 504 1863 +f 1854 2158 504 +f 2396 1275 2406 +f 2426 2443 153 +f 1916 1924 1909 +f 1925 1935 1934 +f 1870 1723 1426 +f 2058 2097 2057 +f 2097 2106 2057 +f 2132 2151 2169 +f 2151 2160 2169 +f 1106 1635 1562 +f 1957 1768 1681 +f 1957 2051 1768 +f 526 535 33 +f 1614 1594 1609 +f 2233 2229 2216 +f 2496 2027 2084 +f 2496 1863 2027 +f 2117 1854 1863 +f 2016 2158 1854 +f 2016 1504 1357 +f 2158 2016 1357 +f 1114 236 1661 +f 2129 2154 2137 +f 2133 2106 2097 +f 2491 1999 2041 +f 2051 1238 1768 +f 2061 2108 2081 +f 2189 2195 2186 +f 2348 2349 2362 +f 1701 192 482 +f 505 1737 1707 +f 2133 2132 2106 +f 2132 2133 2151 +f 2151 2170 2160 +f 502 1661 2162 +f 1998 1389 1997 +f 2297 2352 2329 +f 2352 2364 2329 +f 2394 2414 2364 +f 2352 2394 2364 +f 2402 512 2415 +f 2255 2254 2243 +f 2446 1365 2456 +f 2271 2282 2298 +f 846 2283 2264 +f 2293 2310 2318 +f 2254 2295 2294 +f 2283 2290 2278 +f 2270 2294 2293 +f 2423 2455 2400 +f 2281 2287 2267 +f 2190 2191 2204 +f 2271 2263 2282 +f 2334 2329 2364 +f 2424 2432 2409 +f 2282 2263 2298 +f 1409 1659 1958 +f 2263 2302 2298 +f 2297 2329 2296 +f 1256 446 2346 +f 1958 2502 2478 +f 2437 2399 2444 +f 263 2366 2359 +f 849 827 823 +f 2311 2325 2290 +f 2499 2379 2434 +f 2446 2456 2423 +f 947 2358 2379 +f 2499 947 2379 +f 2205 2195 2212 +f 2245 2237 2227 +f 2245 2256 2237 +f 2256 2263 2271 +f 556 571 2305 +f 1528 2068 1518 +f 2424 2439 2432 +f 2302 2352 2297 +f 1866 2237 826 +f 2248 2242 2211 +f 2334 2364 2363 +f 2235 2244 2226 +f 2255 2295 2254 +f 2329 2324 2296 +f 2439 2447 1973 +f 2329 2334 2324 +f 2409 2432 2414 +f 2293 2318 2276 +f 866 2425 2416 +f 1487 1493 2372 +f 2237 2231 2230 +f 2415 512 17 +f 2035 1236 26 +f 921 2138 688 +f 2491 2482 2462 +f 6 181 197 +f 2481 948 1795 +f 2138 2383 2382 +f 2377 2394 2352 +f 2377 506 2394 +f 2394 506 2402 +f 2401 2402 2415 +f 2394 2402 2401 +f 2318 2326 2276 +f 2439 2457 2432 +f 2298 2302 2297 +f 2244 2249 2243 +f 2404 1100 2382 +f 2238 2245 2227 +f 2245 2257 2256 +f 2257 2263 2256 +f 2324 2334 2328 +f 2257 2289 2263 +f 2289 2302 2263 +f 2236 2231 2250 +f 2138 2382 688 +f 2383 2404 2382 +f 1100 2404 2343 +f 2353 2352 2302 +f 2353 2377 2352 +f 2237 2230 2220 +f 2335 2355 2325 +f 2308 2340 2315 +f 2253 2269 2276 +f 2311 2335 2325 +f 2439 2424 511 +f 2268 2267 2248 +f 2383 413 2404 +f 123 971 832 +f 2234 2243 2269 +f 2225 2213 2234 +f 2219 2213 2225 +f 2195 2196 2212 +f 1544 2418 1549 +f 413 866 2404 +f 2404 866 2416 +f 2416 2417 2404 +f 2404 2417 2343 +f 2415 2409 2401 +f 2196 2219 2212 +f 2268 2248 2218 +f 2206 2214 2197 +f 2417 2332 2343 +f 2343 2332 832 +f 2330 2302 2289 +f 2330 2353 2302 +f 2453 2454 515 +f 2218 2248 2217 +f 2218 2217 2205 +f 2276 2281 2268 +f 2178 2197 2177 +f 2197 2189 2177 +f 2332 2066 832 +f 832 2066 123 +f 2231 2236 2230 +f 669 950 1144 +f 2217 2211 2199 +f 1216 1209 1217 +f 2066 2365 123 +f 2230 2226 2214 +f 2290 2325 2304 +f 2325 2319 2304 +f 2217 2248 2211 +f 2191 2192 2199 +f 510 525 2035 +f 2417 1917 2332 +f 2332 1917 2066 +f 2408 2413 2341 +f 2248 2267 2242 +f 2326 2333 2281 +f 1340 2365 2066 +f 2440 1302 1340 +f 2226 2230 2235 +f 1153 1163 1116 +f 2431 2455 2438 +f 2416 2425 2417 +f 2495 2474 2462 +f 2290 2304 2277 +f 825 2227 1872 +f 151 239 1038 +f 9 151 1038 +f 545 928 2381 +f 2440 2406 1384 +f 928 1596 2381 +f 2186 2188 2185 +f 2456 26 1888 +f 2287 2333 2262 +f 2425 2342 2417 +f 2342 1917 2417 +f 1917 877 2066 +f 2336 1340 2066 +f 2336 2440 1340 +f 2328 2351 2327 +f 825 2238 2227 +f 2351 2368 2327 +f 1222 2388 1211 +f 678 756 734 +f 428 263 1343 +f 2188 2191 2190 +f 2341 2376 2333 +f 2066 877 2336 +f 2290 2277 2278 +f 739 634 592 +f 675 304 14 +f 2384 675 14 +f 2199 2211 2204 +f 2191 2199 2204 +f 2322 2318 2310 +f 2287 2262 2233 +f 2185 2188 2184 +f 2386 2425 845 +f 2384 572 675 +f 1128 123 2365 +f 832 971 2343 +f 2188 2186 2191 +f 2185 2184 2176 +f 2345 1917 2342 +f 2345 877 1917 +f 2336 2406 2440 +f 971 1100 2343 +f 2299 2289 2257 +f 2299 2303 2289 +f 2249 2255 2243 +f 506 513 512 +f 2437 955 1219 +f 1587 2398 1324 +f 877 2396 2336 +f 2336 2396 2406 +f 2463 2479 879 +f 2376 2412 2350 +f 2281 2267 2268 +f 2303 2330 2289 +f 624 635 159 +f 1996 2356 1561 +f 2449 2436 1996 +f 2356 2054 2451 +f 928 2398 1587 +f 2333 2350 2262 +f 2035 26 2456 +f 2346 2342 2425 +f 2346 2345 2342 +f 1544 2380 2418 +f 2412 2392 2350 +f 622 509 1151 +f 2436 2054 1996 +f 545 2451 928 +f 2326 2341 2333 +f 2346 2425 2386 +f 1365 2035 2456 +f 2369 2377 2353 +f 2369 506 2377 +f 2451 900 928 +f 900 2398 928 +f 1235 1888 1244 +f 2337 2345 2346 +f 877 772 2396 +f 772 1275 2396 +f 2432 2446 2414 +f 2294 2295 2310 +f 2369 2330 828 +f 2418 2419 2436 +f 2450 2429 2436 +f 2436 2429 2054 +f 2490 2494 1656 +f 1321 155 2338 +f 1256 2346 2386 +f 2448 877 2345 +f 877 2448 772 +f 2446 2423 2414 +f 2351 2334 2363 +f 2243 2254 2269 +f 2380 2419 2418 +f 2419 2450 2436 +f 2283 2278 2264 +f 822 2197 823 +f 1008 1759 1565 +f 2448 2345 2337 +f 2270 2293 2276 +f 2323 2324 2328 +f 2429 1012 2054 +f 2226 2243 2213 +f 2395 325 772 +f 2370 2367 2380 +f 2054 2435 2451 +f 2435 2397 2451 +f 2451 2397 900 +f 1774 1974 1975 +f 2305 2290 2283 +f 846 2305 2283 +f 2320 1215 2285 +f 2139 2448 2337 +f 2448 2395 772 +f 1232 1231 1216 +f 2272 2285 2284 +f 2367 2371 2380 +f 2371 2405 2380 +f 2380 2405 2419 +f 2419 2429 2450 +f 2429 176 1012 +f 2397 2373 900 +f 2373 2398 900 +f 2373 1379 2398 +f 2372 1500 1508 +f 1133 1303 1142 +f 2252 2273 2272 +f 891 2252 2272 +f 2419 2405 2429 +f 2405 2430 2429 +f 2429 2430 176 +f 2189 2186 2181 +f 2212 2219 2218 +f 2312 2139 2337 +f 2139 2384 2448 +f 2448 2384 2395 +f 899 855 843 +f 2272 2273 2285 +f 2331 2303 2299 +f 176 2435 2054 +f 1012 176 2054 +f 2177 2185 2176 +f 2218 2219 2225 +f 1216 1220 1215 +f 2378 2139 2312 +f 2384 14 2395 +f 2324 2295 2255 +f 2240 2273 2252 +f 2371 2387 2405 +f 2410 2430 2405 +f 2430 2442 176 +f 2435 2344 2397 +f 2397 2344 2373 +f 2456 1888 2455 +f 2242 2267 2233 +f 2233 2262 2229 +f 2378 2384 2139 +f 2323 2310 2295 +f 2323 2322 2310 +f 2240 2274 2273 +f 974 841 990 +f 2490 1447 2486 +f 2387 2410 2405 +f 2442 2141 176 +f 2344 1778 2373 +f 972 1379 2373 +f 1778 972 2373 +f 1379 972 428 +f 1211 2437 1223 +f 1228 1215 1220 +f 702 2378 2312 +f 17 518 2415 +f 1888 26 1244 +f 2324 2323 2295 +f 2305 2311 2290 +f 2307 2285 2273 +f 2274 2307 2273 +f 2307 2320 2285 +f 2369 531 506 +f 2435 2258 2344 +f 2296 2324 2288 +f 1233 1217 2361 +f 2360 2371 2367 +f 2410 2442 2430 +f 176 2141 2258 +f 176 2258 2435 +f 539 2331 66 +f 2350 2392 2317 +f 2268 2225 2253 +f 1508 1500 2371 +f 2360 1508 2371 +f 2371 1500 2387 +f 972 2366 428 +f 1626 1686 1358 +f 1759 1807 1819 +f 2277 2257 2245 +f 2277 2299 2257 +f 1784 2228 1736 +f 2265 2240 1736 +f 2228 2265 1736 +f 2265 2274 2240 +f 1209 2320 2307 +f 2320 1209 1216 +f 1555 1584 1560 +f 2387 1500 2372 +f 2410 2420 2442 +f 2433 972 1778 +f 2433 2366 972 +f 955 522 1225 +f 2339 2307 2274 +f 2372 1493 2387 +f 2411 2420 2410 +f 2420 954 2442 +f 2442 954 2141 +f 2344 2433 1778 +f 2205 2212 2218 +f 2328 2334 2351 +f 2394 2401 2414 +f 2250 2256 2271 +f 2339 1209 2307 +f 2328 2322 2323 +f 866 845 2425 +f 3 316 893 +f 2387 2411 2410 +f 2441 2141 954 +f 2141 2441 2258 +f 2354 2433 2344 +f 2254 2294 2270 +f 2269 2254 2270 +f 863 2305 846 +f 2441 2354 2258 +f 2258 2354 2344 +f 2319 2355 51 +f 2223 2228 1784 +f 1493 2411 2387 +f 1560 2449 1555 +f 2288 2324 2255 +f 825 2251 2238 +f 2251 2245 2238 +f 1299 84 1312 +f 2246 2265 2228 +f 2313 2274 2265 +f 2313 2339 2274 +f 2251 2277 2245 +f 2319 51 2331 +f 891 1862 2252 +f 2443 954 2420 +f 2443 2441 954 +f 511 2447 2439 +f 2242 2233 2211 +f 188 15 814 +f 2443 2426 2441 +f 2426 2354 2441 +f 2306 2403 2433 +f 2433 2403 2366 +f 539 2303 2331 +f 2246 2228 2223 +f 1030 1819 1807 +f 2354 2306 2433 +f 2413 2412 2376 +f 2438 2455 1888 +f 1848 1857 2176 +f 2207 2208 2223 +f 2208 2246 2223 +f 1209 2339 1217 +f 2339 2361 1217 +f 1221 1210 2388 +f 554 109 78 +f 386 1375 95 +f 2327 2326 2318 +f 2179 2182 1393 +f 2182 2208 1393 +f 1393 2208 2207 +f 2361 2399 2388 +f 2388 2399 1211 +f 2306 2354 2426 +f 2403 2359 2366 +f 2214 2226 2213 +f 2268 2253 2276 +f 889 2200 2179 +f 2200 2182 2179 +f 2200 2221 2182 +f 2221 2208 2182 +f 2314 2265 2246 +f 2314 2313 2265 +f 2339 2374 2361 +f 2478 2434 2379 +f 2205 2217 2199 +f 2208 2259 2246 +f 2259 2275 2246 +f 2314 2321 2313 +f 2313 2347 2339 +f 2347 2374 2339 +f 2374 2399 2361 +f 153 154 2426 +f 154 2306 2426 +f 2385 2359 2403 +f 2221 2259 2208 +f 2306 2357 2403 +f 2357 2385 2403 +f 2237 2256 2231 +f 2172 2180 889 +f 2180 2200 889 +f 2200 2201 2221 +f 2246 2291 2314 +f 2374 2444 2399 +f 571 555 2311 +f 2192 2205 2199 +f 2173 2180 2172 +f 2279 2246 2275 +f 2279 2291 2246 +f 2292 2314 2291 +f 2321 2362 2313 +f 2362 2347 2313 +f 2347 2389 2374 +f 2444 955 2437 +f 2292 2291 2279 +f 2452 2444 2374 +f 2054 2356 1996 +f 2338 2306 154 +f 2186 2192 2191 +f 2193 2201 2200 +f 2259 2221 2201 +f 2247 2259 2201 +f 2452 955 2444 +f 2278 2277 2251 +f 2338 2357 2306 +f 2181 2186 2185 +f 2276 2326 2281 +f 2432 2457 2446 +f 2198 2201 2193 +f 2198 2232 2201 +f 2232 2247 2201 +f 2389 2452 2374 +f 2452 1630 955 +f 1403 1749 1444 +f 1555 1996 1561 +f 2357 2427 2385 +f 2385 2428 230 +f 2409 2415 2424 +f 2304 2331 2299 +f 2193 2200 2180 +f 2445 2452 2389 +f 1565 1759 1927 +f 2380 1544 2370 +f 2338 2427 2357 +f 2427 2428 2385 +f 230 222 253 +f 2202 2198 2193 +f 2202 2209 2198 +f 2209 2241 2198 +f 2241 2232 2198 +f 2266 2275 2259 +f 2365 1340 1128 +f 2415 518 2424 +f 2338 170 2427 +f 170 2428 2427 +f 2181 2185 2177 +f 2196 2195 2189 +f 2183 2193 2180 +f 2453 1630 2452 +f 2197 2214 2189 +f 2401 2409 2414 +f 822 2220 2197 +f 1210 2361 2388 +f 2187 2193 2183 +f 2187 2202 2193 +f 2266 2279 2275 +f 2279 2300 2292 +f 2375 2347 2362 +f 2375 2390 2347 +f 2390 2389 2347 +f 2453 2452 2445 +f 1347 1630 2453 +f 1630 1347 522 +f 2220 2206 2197 +f 2262 2350 2286 +f 170 254 2428 +f 2457 1973 2446 +f 1973 1365 2446 +f 2174 2183 2180 +f 2194 2202 2187 +f 2222 2241 2209 +f 2222 2260 2241 +f 2266 2259 2247 +f 2390 2445 2389 +f 2264 2251 825 +f 2363 2368 2351 +f 2326 2393 2341 +f 1855 1850 1851 +f 2210 2209 2202 +f 2210 2222 2209 +f 2261 2260 2222 +f 2280 2279 2266 +f 2280 2300 2279 +f 251 263 2359 +f 2277 2304 2299 +f 2220 2230 2206 +f 2202 2194 2210 +f 2213 2243 2234 +f 2328 2327 2322 +f 2294 2310 2293 +f 2214 2196 2189 +f 2196 2213 2219 +f 2224 2222 2210 +f 2421 2390 2375 +f 2206 2230 2214 +f 2194 2203 2210 +f 2224 2261 2222 +f 2421 2445 2390 +f 2322 2327 2318 +f 2393 2408 2341 +f 1365 1973 510 +f 2216 2210 2203 +f 2216 2224 2210 +f 2266 2308 2280 +f 2280 2308 2300 +f 2407 2421 2375 +f 2175 2183 2174 +f 2194 2190 2203 +f 2454 2445 2421 +f 522 1347 523 +f 2456 2455 2423 +f 823 2197 2178 +f 2281 2333 2287 +f 2188 2187 2183 +f 2188 2190 2194 +f 2187 2188 2194 +f 2308 2315 2300 +f 2407 2375 2362 +f 2443 2420 2503 +f 2420 2411 2503 +f 2411 1493 2503 +f 1493 1487 2503 +f 1487 1318 2503 +f 1318 1320 2503 +f 1320 2443 2503 diff --git a/gradio-modified/gradio/templates/frontend/static/img/Duck.glb b/gradio-modified/gradio/templates/frontend/static/img/Duck.glb new file mode 100644 index 0000000000000000000000000000000000000000..217170d2bd67051270be974292dc3b834eefe206 Binary files /dev/null and b/gradio-modified/gradio/templates/frontend/static/img/Duck.glb differ diff --git a/gradio-modified/gradio/templates/frontend/static/img/api-logo.svg b/gradio-modified/gradio/templates/frontend/static/img/api-logo.svg new file mode 100644 index 0000000000000000000000000000000000000000..bce49a58f0e8a89980e96b8f3bb99f7da48e6254 --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/static/img/api-logo.svg @@ -0,0 +1,4 @@ + + + + diff --git a/gradio-modified/gradio/templates/frontend/static/img/camera.svg b/gradio-modified/gradio/templates/frontend/static/img/camera.svg new file mode 100644 index 0000000000000000000000000000000000000000..b46daebb74be9fffa8868fcee3d9f2e8759d08d3 --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/static/img/camera.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/gradio-modified/gradio/templates/frontend/static/img/clear.svg b/gradio-modified/gradio/templates/frontend/static/img/clear.svg new file mode 100644 index 0000000000000000000000000000000000000000..bea03307482b585d819f3d581731e17e0ed37c29 --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/static/img/clear.svg @@ -0,0 +1,67 @@ + + + + + + + + + + + + + diff --git a/gradio-modified/gradio/templates/frontend/static/img/edit.svg b/gradio-modified/gradio/templates/frontend/static/img/edit.svg new file mode 100644 index 0000000000000000000000000000000000000000..07fbe15983f2a5a9f9447c21a414a5c82ee8dadf --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/static/img/edit.svg @@ -0,0 +1,39 @@ + + + + + + diff --git a/gradio-modified/gradio/templates/frontend/static/img/javascript.svg b/gradio-modified/gradio/templates/frontend/static/img/javascript.svg new file mode 100644 index 0000000000000000000000000000000000000000..426b76c2fb75e27d9825661ddf341ac7aa0e5ced --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/static/img/javascript.svg @@ -0,0 +1,16 @@ + diff --git a/gradio-modified/gradio/templates/frontend/static/img/logo.svg b/gradio-modified/gradio/templates/frontend/static/img/logo.svg new file mode 100644 index 0000000000000000000000000000000000000000..069779a490d8e0dc7cbfe41ed8a81fd6e5444dc9 --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/static/img/logo.svg @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/gradio-modified/gradio/templates/frontend/static/img/logo_error.svg b/gradio-modified/gradio/templates/frontend/static/img/logo_error.svg new file mode 100644 index 0000000000000000000000000000000000000000..5662b675528d13bd1cd70254cc125e27104f4409 --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/static/img/logo_error.svg @@ -0,0 +1,134 @@ + + + + + + + + + + + + + + + + + + + + + ERROR + + + diff --git a/gradio-modified/gradio/templates/frontend/static/img/python.svg b/gradio-modified/gradio/templates/frontend/static/img/python.svg new file mode 100644 index 0000000000000000000000000000000000000000..ae0065b85722deca4baac8222b2ebf1df4a1c82b --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/static/img/python.svg @@ -0,0 +1,20 @@ + diff --git a/gradio-modified/gradio/templates/frontend/static/img/undo-solid.svg b/gradio-modified/gradio/templates/frontend/static/img/undo-solid.svg new file mode 100644 index 0000000000000000000000000000000000000000..bbbc9670bbf3efdd50fb683f2fb5eac6eaff9f81 --- /dev/null +++ b/gradio-modified/gradio/templates/frontend/static/img/undo-solid.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/gradio-modified/gradio/test_data/__init__.py b/gradio-modified/gradio/test_data/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/gradio-modified/gradio/test_data/blocks_configs.py b/gradio-modified/gradio/test_data/blocks_configs.py new file mode 100644 index 0000000000000000000000000000000000000000..11dfa3a8da5efe45127f8e967ce5a0530f82b771 --- /dev/null +++ b/gradio-modified/gradio/test_data/blocks_configs.py @@ -0,0 +1,653 @@ +XRAY_CONFIG = { + "version": "3.4b3\n", + "mode": "blocks", + "dev_mode": True, + "components": [ + { + "id": 27, + "type": "markdown", + "props": { + "value": "

Detect Disease From Scan

\n

With this model you can lorem ipsum

\n
    \n
  • ipsum 1
  • \n
  • ipsum 2
  • \n
\n", + "name": "markdown", + "visible": True, + "style": {}, + }, + }, + { + "id": 28, + "type": "checkboxgroup", + "props": { + "choices": ["Covid", "Malaria", "Lung Cancer"], + "value": [], + "label": "Disease to Scan For", + "show_label": True, + "name": "checkboxgroup", + "visible": True, + "style": {}, + }, + }, + {"id": 29, "type": "tabs", "props": {"visible": True, "style": {}}}, + { + "id": 30, + "type": "tabitem", + "props": {"label": "X-ray", "visible": True, "style": {}}, + }, + { + "id": 31, + "type": "row", + "props": { + "type": "row", + "variant": "default", + "visible": True, + "style": {}, + }, + }, + { + "id": 32, + "type": "image", + "props": { + "image_mode": "RGB", + "source": "upload", + "tool": "editor", + "streaming": False, + "mirror_webcam": True, + "show_label": True, + "name": "image", + "visible": True, + "style": {}, + }, + }, + { + "id": 33, + "type": "json", + "props": {"show_label": True, "name": "json", "visible": True, "style": {}}, + }, + { + "id": 34, + "type": "button", + "props": { + "value": "Run", + "variant": "secondary", + "name": "button", + "visible": True, + "style": {}, + }, + }, + { + "id": 35, + "type": "tabitem", + "props": {"label": "CT Scan", "visible": True, "style": {}}, + }, + { + "id": 36, + "type": "row", + "props": { + "type": "row", + "variant": "default", + "visible": True, + "style": {}, + }, + }, + { + "id": 37, + "type": "image", + "props": { + "image_mode": "RGB", + "source": "upload", + "tool": "editor", + "streaming": False, + "mirror_webcam": True, + "show_label": True, + "name": "image", + "visible": True, + "style": {}, + }, + }, + { + "id": 38, + "type": "json", + "props": {"show_label": True, "name": "json", "visible": True, "style": {}}, + }, + { + "id": 39, + "type": "button", + "props": { + "value": "Run", + "variant": "secondary", + "name": "button", + "visible": True, + "style": {}, + }, + }, + { + "id": 40, + "type": "textbox", + "props": { + "lines": 1, + "max_lines": 20, + "value": "", + "type": "text", + "show_label": True, + "name": "textbox", + "visible": True, + "style": {}, + }, + }, + { + "id": 41, + "type": "form", + "props": {"type": "form", "visible": True, "style": {}}, + }, + { + "id": 42, + "type": "form", + "props": {"type": "form", "visible": True, "style": {}}, + }, + ], + "theme": "default", + "css": None, + "title": "Gradio", + "is_space": False, + "enable_queue": None, + "show_error": False, + "show_api": True, + "layout": { + "id": 26, + "children": [ + {"id": 27}, + {"id": 41, "children": [{"id": 28}]}, + { + "id": 29, + "children": [ + { + "id": 30, + "children": [ + {"id": 31, "children": [{"id": 32}, {"id": 33}]}, + {"id": 34}, + ], + }, + { + "id": 35, + "children": [ + {"id": 36, "children": [{"id": 37}, {"id": 38}]}, + {"id": 39}, + ], + }, + ], + }, + {"id": 42, "children": [{"id": 40}]}, + ], + }, + "dependencies": [ + { + "targets": [34], + "trigger": "click", + "inputs": [28, 32], + "outputs": [33], + "backend_fn": True, + "js": None, + "queue": None, + "api_name": None, + "scroll_to_output": False, + "show_progress": True, + "batch": False, + "max_batch_size": 4, + "cancels": [], + "every": None, + }, + { + "targets": [39], + "trigger": "click", + "inputs": [28, 37], + "outputs": [38], + "backend_fn": True, + "js": None, + "queue": None, + "api_name": None, + "scroll_to_output": False, + "show_progress": True, + "batch": False, + "max_batch_size": 4, + "cancels": [], + "every": None, + }, + { + "targets": [], + "trigger": "load", + "inputs": [], + "outputs": [40], + "backend_fn": True, + "js": None, + "queue": None, + "api_name": None, + "scroll_to_output": False, + "show_progress": True, + "batch": False, + "max_batch_size": 4, + "cancels": [], + "every": None, + }, + ], +} + + +XRAY_CONFIG_DIFF_IDS = { + "version": "3.4b3\n", + "mode": "blocks", + "dev_mode": True, + "components": [ + { + "id": 27, + "type": "markdown", + "props": { + "value": "

Detect Disease From Scan

\n

With this model you can lorem ipsum

\n
    \n
  • ipsum 1
  • \n
  • ipsum 2
  • \n
\n", + "name": "markdown", + "visible": True, + "style": {}, + }, + }, + { + "id": 28, + "type": "checkboxgroup", + "props": { + "choices": ["Covid", "Malaria", "Lung Cancer"], + "value": [], + "label": "Disease to Scan For", + "show_label": True, + "name": "checkboxgroup", + "visible": True, + "style": {}, + }, + }, + {"id": 29, "type": "tabs", "props": {"visible": True, "style": {}}}, + { + "id": 30, + "type": "tabitem", + "props": {"label": "X-ray", "visible": True, "style": {}}, + }, + { + "id": 31, + "type": "row", + "props": { + "type": "row", + "variant": "default", + "visible": True, + "style": {}, + }, + }, + { + "id": 32, + "type": "image", + "props": { + "image_mode": "RGB", + "source": "upload", + "tool": "editor", + "streaming": False, + "mirror_webcam": True, + "show_label": True, + "name": "image", + "visible": True, + "style": {}, + }, + }, + { + "id": 33, + "type": "json", + "props": {"show_label": True, "name": "json", "visible": True, "style": {}}, + }, + { + "id": 34, + "type": "button", + "props": { + "value": "Run", + "variant": "secondary", + "name": "button", + "visible": True, + "style": {}, + }, + }, + { + "id": 35, + "type": "tabitem", + "props": {"label": "CT Scan", "visible": True, "style": {}}, + }, + { + "id": 36, + "type": "row", + "props": { + "type": "row", + "variant": "default", + "visible": True, + "style": {}, + }, + }, + { + "id": 37, + "type": "image", + "props": { + "image_mode": "RGB", + "source": "upload", + "tool": "editor", + "streaming": False, + "mirror_webcam": True, + "show_label": True, + "name": "image", + "visible": True, + "style": {}, + }, + }, + { + "id": 38, + "type": "json", + "props": {"show_label": True, "name": "json", "visible": True, "style": {}}, + }, + { + "id": 933, + "type": "button", + "props": { + "value": "Run", + "variant": "secondary", + "name": "button", + "visible": True, + "style": {}, + }, + }, + { + "id": 40, + "type": "textbox", + "props": { + "lines": 1, + "max_lines": 20, + "value": "", + "type": "text", + "show_label": True, + "name": "textbox", + "visible": True, + "style": {}, + }, + }, + { + "id": 41, + "type": "form", + "props": {"type": "form", "visible": True, "style": {}}, + }, + { + "id": 42, + "type": "form", + "props": {"type": "form", "visible": True, "style": {}}, + }, + ], + "theme": "default", + "css": None, + "title": "Gradio", + "is_space": False, + "enable_queue": None, + "show_error": False, + "show_api": True, + "layout": { + "id": 26, + "children": [ + {"id": 27}, + {"id": 41, "children": [{"id": 28}]}, + { + "id": 29, + "children": [ + { + "id": 30, + "children": [ + {"id": 31, "children": [{"id": 32}, {"id": 33}]}, + {"id": 34}, + ], + }, + { + "id": 35, + "children": [ + {"id": 36, "children": [{"id": 37}, {"id": 38}]}, + {"id": 933}, + ], + }, + ], + }, + {"id": 42, "children": [{"id": 40}]}, + ], + }, + "dependencies": [ + { + "targets": [34], + "trigger": "click", + "inputs": [28, 32], + "outputs": [33], + "backend_fn": True, + "js": None, + "queue": None, + "api_name": None, + "scroll_to_output": False, + "show_progress": True, + "batch": False, + "max_batch_size": 4, + "cancels": [], + "every": None, + }, + { + "targets": [933], + "trigger": "click", + "inputs": [28, 37], + "outputs": [38], + "backend_fn": True, + "js": None, + "queue": None, + "api_name": None, + "scroll_to_output": False, + "show_progress": True, + "batch": False, + "max_batch_size": 4, + "cancels": [], + "every": None, + }, + { + "targets": [], + "trigger": "load", + "inputs": [], + "outputs": [40], + "backend_fn": True, + "js": None, + "queue": None, + "api_name": None, + "scroll_to_output": False, + "show_progress": True, + "batch": False, + "max_batch_size": 4, + "cancels": [], + "every": None, + }, + ], +} + + +XRAY_CONFIG_WITH_MISTAKE = { + "mode": "blocks", + "dev_mode": True, + "components": [ + { + "id": 1, + "type": "markdown", + "props": { + "value": "

Detect Disease From Scan

\n

With this model you can lorem ipsum

\n
    \n
  • ipsum 1
  • \n
  • ipsum 2
  • \n
\n", + "name": "markdown", + "style": {}, + }, + }, + { + "id": 2, + "type": "checkboxgroup", + "props": { + "choices": ["Covid", "Malaria", "Lung Cancer"], + "value": [], + "name": "checkboxgroup", + "show_label": True, + "label": "Disease to Scan For", + "style": {}, + }, + }, + { + "id": 3, + "type": "tabs", + "props": { + "style": {}, + "value": True, + }, + }, + { + "id": 4, + "type": "tabitem", + "props": { + "label": "X-ray", + "style": {}, + "value": True, + }, + }, + { + "id": 5, + "type": "row", + "props": {"type": "row", "variant": "default", "style": {}, "value": True}, + }, + { + "id": 6, + "type": "image", + "props": { + "image_mode": "RGB", + "source": "upload", + "streaming": False, + "mirror_webcam": True, + "tool": "editor", + "name": "image", + "style": {}, + }, + }, + { + "id": 7, + "type": "json", + "props": { + "name": "json", + "style": {}, + }, + }, + { + "id": 8, + "type": "button", + "props": { + "value": "Run", + "name": "button", + "css": {"background-color": "red", "--hover-color": "orange"}, + "variant": "secondary", + }, + }, + { + "id": 9, + "type": "tabitem", + "props": { + "show_label": True, + "label": "CT Scan", + "style": {}, + "value": True, + }, + }, + { + "id": 10, + "type": "row", + "props": {"type": "row", "variant": "default", "style": {}, "value": True}, + }, + { + "id": 11, + "type": "image", + "props": { + "image_mode": "RGB", + "source": "upload", + "tool": "editor", + "streaming": False, + "mirror_webcam": True, + "name": "image", + "style": {}, + }, + }, + { + "id": 12, + "type": "json", + "props": { + "name": "json", + "style": {}, + }, + }, + { + "id": 13, + "type": "button", + "props": { + "value": "Run", + "name": "button", + "style": {}, + "variant": "secondary", + }, + }, + { + "id": 14, + "type": "textbox", + "props": { + "lines": 1, + "value": "", + "name": "textbox", + "type": "text", + "style": {}, + }, + }, + ], + "theme": "default", + "layout": { + "id": 0, + "children": [ + {"id": 1}, + {"id": 2}, + { + "id": 3, + "children": [ + { + "id": 4, + "children": [ + {"id": 5, "children": [{"id": 6}, {"id": 7}]}, + {"id": 8}, + ], + }, + { + "id": 9, + "children": [ + {"id": 10, "children": [{"id": 12}, {"id": 11}]}, + {"id": 13}, + ], + }, + ], + }, + {"id": 14}, + ], + }, + "dependencies": [ + { + "targets": [8], + "trigger": "click", + "inputs": [2, 6], + "outputs": [7], + "api_name": None, + "scroll_to_output": False, + "show_progress": True, + "cancels": [], + }, + { + "targets": [13], + "trigger": "click", + "inputs": [2, 11], + "outputs": [12], + "api_name": None, + "scroll_to_output": False, + "show_progress": True, + "cancels": [], + }, + ], +} diff --git a/gradio-modified/gradio/test_data/cheetah1-copy.jpg b/gradio-modified/gradio/test_data/cheetah1-copy.jpg new file mode 100644 index 0000000000000000000000000000000000000000..c510ff30e09c1ce410afa499f0bfc3a63c751134 Binary files /dev/null and b/gradio-modified/gradio/test_data/cheetah1-copy.jpg differ diff --git a/gradio-modified/gradio/test_data/cheetah1.jpg b/gradio-modified/gradio/test_data/cheetah1.jpg new file mode 100644 index 0000000000000000000000000000000000000000..c510ff30e09c1ce410afa499f0bfc3a63c751134 Binary files /dev/null and b/gradio-modified/gradio/test_data/cheetah1.jpg differ diff --git a/gradio-modified/gradio/test_data/cheetah2.jpg b/gradio-modified/gradio/test_data/cheetah2.jpg new file mode 100644 index 0000000000000000000000000000000000000000..1408ea5af612402c1a1b998ce5e76d88f1ed1de7 Binary files /dev/null and b/gradio-modified/gradio/test_data/cheetah2.jpg differ diff --git a/gradio-modified/gradio/test_data/flagged_no_log/a.txt b/gradio-modified/gradio/test_data/flagged_no_log/a.txt new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/gradio-modified/gradio/test_data/flagged_no_log/b.txt b/gradio-modified/gradio/test_data/flagged_no_log/b.txt new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/gradio-modified/gradio/test_data/flagged_no_log/c.txt b/gradio-modified/gradio/test_data/flagged_no_log/c.txt new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/gradio-modified/gradio/test_data/flagged_with_log/log.csv b/gradio-modified/gradio/test_data/flagged_with_log/log.csv new file mode 100644 index 0000000000000000000000000000000000000000..f09847b6f72b43bc6191bcb799cbb6d5df04b543 --- /dev/null +++ b/gradio-modified/gradio/test_data/flagged_with_log/log.csv @@ -0,0 +1,3 @@ +input,output +10,20 +30,60 diff --git a/gradio-modified/gradio/test_data/lion.jpg b/gradio-modified/gradio/test_data/lion.jpg new file mode 100644 index 0000000000000000000000000000000000000000..e9bf9f5d0816d6201b4862088dc74476249a6a70 Binary files /dev/null and b/gradio-modified/gradio/test_data/lion.jpg differ diff --git a/gradio-modified/gradio/test_data/test_audio.wav b/gradio-modified/gradio/test_data/test_audio.wav new file mode 100644 index 0000000000000000000000000000000000000000..4b40a30f4b13fa75ee6dc1ddea4ff76b782670d3 Binary files /dev/null and b/gradio-modified/gradio/test_data/test_audio.wav differ diff --git a/gradio-modified/gradio/test_data/test_image.png b/gradio-modified/gradio/test_data/test_image.png new file mode 100644 index 0000000000000000000000000000000000000000..855b4041793a49335cf6d1b66d8c1e5059daf60f Binary files /dev/null and b/gradio-modified/gradio/test_data/test_image.png differ diff --git a/gradio-modified/gradio/tunneling.py b/gradio-modified/gradio/tunneling.py new file mode 100644 index 0000000000000000000000000000000000000000..afb1a01d2c4e5196018e5235c358494b0a18af87 --- /dev/null +++ b/gradio-modified/gradio/tunneling.py @@ -0,0 +1,105 @@ +import atexit +import os +import platform +import re +import subprocess +from pathlib import Path +from typing import List + +VERSION = "0.1" +CURRENT_TUNNELS: List["Tunnel"] = [] + + +class Tunnel: + def __init__(self, remote_host, remote_port, local_host, local_port): + self.proc = None + self.url = None + self.remote_host = remote_host + self.remote_port = remote_port + self.local_host = local_host + self.local_port = local_port + + @staticmethod + def download_binary(): + machine = platform.machine() + if machine == "x86_64": + machine = "amd64" + + # Check if the file exist + binary_name = f"frpc_{platform.system().lower()}_{machine.lower()}" + binary_path = str(Path(__file__).parent / binary_name) + + extension = ".exe" if os.name == "nt" else "" + + if not Path(binary_path).exists(): + import stat + + import requests + + binary_url = f"https://cdn-media.huggingface.co/frpc-gradio-{VERSION}/{binary_name}{extension}" + resp = requests.get(binary_url) + + if resp.status_code == 403: + raise OSError( + f"Cannot set up a share link as this platform is incompatible. Please " + f"create a GitHub issue with information about your platform: {platform.uname()}" + ) + + resp.raise_for_status() + + # Save file data to local copy + with open(binary_path, "wb") as file: + file.write(resp.content) + st = os.stat(binary_path) + os.chmod(binary_path, st.st_mode | stat.S_IEXEC) + + return binary_path + + def start_tunnel(self) -> str: + binary_path = self.download_binary() + self.url = self._start_tunnel(binary_path) + return self.url + + def kill(self): + if self.proc is not None: + print(f"Killing tunnel {self.local_host}:{self.local_port} <> {self.url}") + self.proc.terminate() + self.proc = None + + def _start_tunnel(self, binary: str) -> str: + CURRENT_TUNNELS.append(self) + command = [ + binary, + "http", + "-n", + "random", + "-l", + str(self.local_port), + "-i", + self.local_host, + "--uc", + "--sd", + "random", + "--ue", + "--server_addr", + f"{self.remote_host}:{self.remote_port}", + "--disable_log_color", + ] + + self.proc = subprocess.Popen( + command, stdout=subprocess.PIPE, stderr=subprocess.PIPE + ) + atexit.register(self.kill) + url = "" + while url == "": + if self.proc.stdout is None: + continue + line = self.proc.stdout.readline() + line = line.decode("utf-8") + if "start proxy success" in line: + result = re.search("start proxy success: (.+)\n", line) + if result is None: + raise ValueError("Could not create share URL") + else: + url = result.group(1) + return url diff --git a/gradio-modified/gradio/utils.py b/gradio-modified/gradio/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..b752c23a974f8f22bfaf99503f987828d25edba6 --- /dev/null +++ b/gradio-modified/gradio/utils.py @@ -0,0 +1,849 @@ +""" Handy utility functions.""" + +from __future__ import annotations + +import asyncio +import copy +import inspect +import json +import json.decoder +import os +import pkgutil +import random +import re +import sys +import time +import typing +import warnings +from contextlib import contextmanager +from distutils.version import StrictVersion +from enum import Enum +from io import BytesIO +from numbers import Number +from pathlib import Path +from typing import ( + TYPE_CHECKING, + Any, + Callable, + Dict, + Generator, + List, + NewType, + Tuple, + Type, + TypeVar, + Union, +) + +import aiohttp +import fsspec.asyn +import httpx +import matplotlib.pyplot as plt +import requests +from pydantic import BaseModel, Json, parse_obj_as + +import gradio +from gradio.context import Context +from gradio.strings import en + +if TYPE_CHECKING: # Only import for type checking (is False at runtime). + from gradio.blocks import BlockContext + from gradio.components import Component + +analytics_url = "https://api.gradio.app/" +PKG_VERSION_URL = "https://api.gradio.app/pkg-version" +JSON_PATH = os.path.join(os.path.dirname(gradio.__file__), "launches.json") + +T = TypeVar("T") + + +def version_check(): + try: + version_data = pkgutil.get_data(__name__, "version.txt") + if not version_data: + raise FileNotFoundError + current_pkg_version = version_data.decode("ascii").strip() + latest_pkg_version = requests.get(url=PKG_VERSION_URL, timeout=3).json()[ + "version" + ] + if StrictVersion(latest_pkg_version) > StrictVersion(current_pkg_version): + print( + "IMPORTANT: You are using gradio version {}, " + "however version {} " + "is available, please upgrade.".format( + current_pkg_version, latest_pkg_version + ) + ) + print("--------") + except json.decoder.JSONDecodeError: + warnings.warn("unable to parse version details from package URL.") + except KeyError: + warnings.warn("package URL does not contain version info.") + except: + pass + + +def get_local_ip_address() -> str: + """Gets the public IP address or returns the string "No internet connection" if unable to obtain it.""" + try: + ip_address = requests.get( + "https://checkip.amazonaws.com/", timeout=3 + ).text.strip() + except (requests.ConnectionError, requests.exceptions.ReadTimeout): + ip_address = "No internet connection" + return ip_address + + +def initiated_analytics(data: Dict[str, Any]) -> None: + try: + requests.post( + analytics_url + "gradio-initiated-analytics/", data=data, timeout=3 + ) + except (requests.ConnectionError, requests.exceptions.ReadTimeout): + pass # do not push analytics if no network + + +def launch_analytics(data: Dict[str, Any]) -> None: + try: + requests.post( + analytics_url + "gradio-launched-analytics/", data=data, timeout=3 + ) + except (requests.ConnectionError, requests.exceptions.ReadTimeout): + pass # do not push analytics if no network + + +def integration_analytics(data: Dict[str, Any]) -> None: + try: + requests.post( + analytics_url + "gradio-integration-analytics/", data=data, timeout=3 + ) + except (requests.ConnectionError, requests.exceptions.ReadTimeout): + pass # do not push analytics if no network + + +def error_analytics(ip_address: str, message: str) -> None: + """ + Send error analytics if there is network + :param ip_address: IP address where error occurred + :param message: Details about error + """ + data = {"ip_address": ip_address, "error": message} + try: + requests.post(analytics_url + "gradio-error-analytics/", data=data, timeout=3) + except (requests.ConnectionError, requests.exceptions.ReadTimeout): + pass # do not push analytics if no network + + +async def log_feature_analytics(ip_address: str, feature: str) -> None: + data = {"ip_address": ip_address, "feature": feature} + async with aiohttp.ClientSession() as session: + try: + async with session.post( + analytics_url + "gradio-feature-analytics/", data=data + ): + pass + except (aiohttp.ClientError): + pass # do not push analytics if no network + + +def colab_check() -> bool: + """ + Check if interface is launching from Google Colab + :return is_colab (bool): True or False + """ + is_colab = False + try: # Check if running interactively using ipython. + from IPython import get_ipython + + from_ipynb = get_ipython() + if "google.colab" in str(from_ipynb): + is_colab = True + except (ImportError, NameError): + pass + return is_colab + + +def ipython_check() -> bool: + """ + Check if interface is launching from iPython (not colab) + :return is_ipython (bool): True or False + """ + is_ipython = False + try: # Check if running interactively using ipython. + from IPython import get_ipython + + if get_ipython() is not None: + is_ipython = True + except (ImportError, NameError): + pass + return is_ipython + + +def readme_to_html(article: str) -> str: + try: + response = requests.get(article, timeout=3) + if response.status_code == requests.codes.ok: # pylint: disable=no-member + article = response.text + except requests.exceptions.RequestException: + pass + return article + + +def show_tip(interface: gradio.Blocks) -> None: + if interface.show_tips and random.random() < 1.5: + tip: str = random.choice(en["TIPS"]) + print(f"Tip: {tip}") + + +def launch_counter() -> None: + try: + if not os.path.exists(JSON_PATH): + launches = {"launches": 1} + with open(JSON_PATH, "w+") as j: + json.dump(launches, j) + else: + with open(JSON_PATH) as j: + launches = json.load(j) + launches["launches"] += 1 + if launches["launches"] in [25, 50, 150, 500, 1000]: + print(en["BETA_INVITE"]) + with open(JSON_PATH, "w") as j: + j.write(json.dumps(launches)) + except: + pass + + +def get_default_args(func: Callable) -> List[Any]: + signature = inspect.signature(func) + return [ + v.default if v.default is not inspect.Parameter.empty else None + for v in signature.parameters.values() + ] + + +def assert_configs_are_equivalent_besides_ids( + config1: Dict, config2: Dict, root_keys: Tuple = ("mode", "theme") +): + """Allows you to test if two different Blocks configs produce the same demo. + + Parameters: + config1 (dict): nested dict with config from the first Blocks instance + config2 (dict): nested dict with config from the second Blocks instance + root_keys (Tuple): an interable consisting of which keys to test for equivalence at + the root level of the config. By default, only "mode" and "theme" are tested, + so keys like "version" are ignored. + """ + config1 = copy.deepcopy(config1) + config2 = copy.deepcopy(config2) + + for key in root_keys: + assert config1[key] == config2[key], f"Configs have different: {key}" + + assert len(config1["components"]) == len( + config2["components"] + ), "# of components are different" + + def assert_same_components(config1_id, config2_id): + c1 = list(filter(lambda c: c["id"] == config1_id, config1["components"]))[0] + c2 = list(filter(lambda c: c["id"] == config2_id, config2["components"]))[0] + c1 = copy.deepcopy(c1) + c1.pop("id") + c2 = copy.deepcopy(c2) + c2.pop("id") + assert c1 == c2, f"{c1} does not match {c2}" + + def same_children_recursive(children1, chidren2): + for child1, child2 in zip(children1, chidren2): + assert_same_components(child1["id"], child2["id"]) + if "children" in child1 or "children" in child2: + same_children_recursive(child1["children"], child2["children"]) + + children1 = config1["layout"]["children"] + children2 = config2["layout"]["children"] + same_children_recursive(children1, children2) + + for d1, d2 in zip(config1["dependencies"], config2["dependencies"]): + for t1, t2 in zip(d1.pop("targets"), d2.pop("targets")): + assert_same_components(t1, t2) + for i1, i2 in zip(d1.pop("inputs"), d2.pop("inputs")): + assert_same_components(i1, i2) + for o1, o2 in zip(d1.pop("outputs"), d2.pop("outputs")): + assert_same_components(o1, o2) + + assert d1 == d2, f"{d1} does not match {d2}" + + return True + + +def format_ner_list(input_string: str, ner_groups: List[Dict[str, str | int]]): + if len(ner_groups) == 0: + return [(input_string, None)] + + output = [] + end = 0 + prev_end = 0 + + for group in ner_groups: + entity, start, end = group["entity_group"], group["start"], group["end"] + output.append((input_string[prev_end:start], None)) + output.append((input_string[start:end], entity)) + prev_end = end + + output.append((input_string[end:], None)) + return output + + +def delete_none(_dict: T, skip_value: bool = False) -> T: + """ + Delete None values recursively from all of the dictionaries, tuples, lists, sets. + Credit: https://stackoverflow.com/a/66127889/5209347 + """ + if isinstance(_dict, dict): + for key, value in list(_dict.items()): + if skip_value and key == "value": + continue + if isinstance(value, (list, dict, tuple, set)): + _dict[key] = delete_none(value) + elif value is None or key is None: + del _dict[key] + + elif isinstance(_dict, (list, set, tuple)): + _dict = type(_dict)(delete_none(item) for item in _dict if item is not None) + + return _dict + + +def resolve_singleton(_list: List[Any] | Any) -> Any: + if len(_list) == 1: + return _list[0] + else: + return _list + + +def component_or_layout_class(cls_name: str) -> Type[Component] | Type[BlockContext]: + """ + Returns the component, template, or layout class with the given class name, or + raises a ValueError if not found. + + Parameters: + cls_name (str): lower-case string class name of a component + Returns: + cls: the component class + """ + import gradio.blocks + import gradio.components + import gradio.layouts + import gradio.templates + + components = [ + (name, cls) + for name, cls in gradio.components.__dict__.items() + if isinstance(cls, type) + ] + templates = [ + (name, cls) + for name, cls in gradio.templates.__dict__.items() + if isinstance(cls, type) + ] + layouts = [ + (name, cls) + for name, cls in gradio.layouts.__dict__.items() + if isinstance(cls, type) + ] + for name, cls in components + templates + layouts: + if name.lower() == cls_name.replace("_", "") and ( + issubclass(cls, gradio.components.Component) + or issubclass(cls, gradio.blocks.BlockContext) + ): + return cls + raise ValueError(f"No such component or layout: {cls_name}") + + +def synchronize_async(func: Callable, *args, **kwargs) -> Any: + """ + Runs async functions in sync scopes. + + Can be used in any scope. See run_coro_in_background for more details. + + Example: + if inspect.iscoroutinefunction(block_fn.fn): + predictions = utils.synchronize_async(block_fn.fn, *processed_input) + + Args: + func: + *args: + **kwargs: + """ + return fsspec.asyn.sync(fsspec.asyn.get_loop(), func, *args, **kwargs) + + +def run_coro_in_background(func: Callable, *args, **kwargs): + """ + Runs coroutines in background. + + Warning, be careful to not use this function in other than FastAPI scope, because the event_loop has not started yet. + You can use it in any scope reached by FastAPI app. + + correct scope examples: endpoints in routes, Blocks.process_api + incorrect scope examples: Blocks.launch + + Use startup_events in routes.py if you need to run a coro in background in Blocks.launch(). + + + Example: + utils.run_coro_in_background(fn, *args, **kwargs) + + Args: + func: + *args: + **kwargs: + + Returns: + + """ + event_loop = asyncio.get_event_loop() + return event_loop.create_task(func(*args, **kwargs)) + + +def async_iteration(iterator): + try: + return next(iterator) + except StopIteration: + # raise a ValueError here because co-routines can't raise StopIteration themselves + raise StopAsyncIteration() + + +class AsyncRequest: + """ + The AsyncRequest class is a low-level API that allow you to create asynchronous HTTP requests without a context manager. + Compared to making calls by using httpx directly, AsyncRequest offers more flexibility and control over: + (1) Includes response validation functionality both using validation models and functions. + (2) Since we're still using httpx.Request class by wrapping it, we have all it's functionalities. + (3) Exceptions are handled silently during the request call, which gives us the ability to inspect each one + individually in the case of multiple asynchronous request calls and some of them failing. + (4) Provides HTTP request types with AsyncRequest.Method Enum class for ease of usage + AsyncRequest also offers some util functions such as has_exception, is_valid and status to inspect get detailed + information about executed request call. + + The basic usage of AsyncRequest is as follows: create a AsyncRequest object with inputs(method, url etc.). Then use it + with the "await" statement, and then you can use util functions to do some post request checks depending on your use-case. + Finally, call the get_validated_data function to get the response data. + + You can see example usages in test_utils.py. + """ + + ResponseJson = NewType("ResponseJson", Json) + client = httpx.AsyncClient() + + class Method(str, Enum): + """ + Method is an enumeration class that contains possible types of HTTP request methods. + """ + + ANY = "*" + CONNECT = "CONNECT" + HEAD = "HEAD" + GET = "GET" + DELETE = "DELETE" + OPTIONS = "OPTIONS" + PATCH = "PATCH" + POST = "POST" + PUT = "PUT" + TRACE = "TRACE" + + def __init__( + self, + method: Method, + url: str, + *, + validation_model: Type[BaseModel] | None = None, + validation_function: Union[Callable, None] = None, + exception_type: Type[Exception] = Exception, + raise_for_status: bool = False, + **kwargs, + ): + """ + Initialize the Request instance. + Args: + method(Request.Method) : method of the request + url(str): url of the request + * + validation_model(Type[BaseModel]): a pydantic validation class type to use in validation of the response + validation_function(Callable): a callable instance to use in validation of the response + exception_class(Type[Exception]): a exception type to throw with its type + raise_for_status(bool): a flag that determines to raise httpx.Request.raise_for_status() exceptions. + """ + self._exception: Union[Exception, None] = None + self._status = None + self._raise_for_status = raise_for_status + self._validation_model = validation_model + self._validation_function = validation_function + self._exception_type = exception_type + self._validated_data = None + # Create request + self._request = self._create_request(method, url, **kwargs) + + def __await__(self) -> Generator[None, Any, "AsyncRequest"]: + """ + Wrap Request's __await__ magic function to create request calls which are executed in one line. + """ + return self.__run().__await__() + + async def __run(self) -> AsyncRequest: + """ + Manage the request call lifecycle. + Execute the request by sending it through the client, then check its status. + Then parse the request into Json format. And then validate it using the provided validation methods. + If a problem occurs in this sequential process, + an exception will be raised within the corresponding method, and allowed to be examined. + Manage the request call lifecycle. + + Returns: + Request + """ + try: + # Send the request and get the response. + self._response: httpx.Response = await AsyncRequest.client.send( + self._request + ) + # Raise for _status + self._status = self._response.status_code + if self._raise_for_status: + self._response.raise_for_status() + # Parse client response data to JSON + self._json_response_data = self._response.json() + # Validate response data + self._validated_data = self._validate_response_data( + self._json_response_data + ) + except Exception as exception: + # If there is an exception, store it to do further inspections. + self._exception = self._exception_type(exception) + return self + + @staticmethod + def _create_request(method: Method, url: str, **kwargs) -> httpx.Request: + """ + Create a request. This is a httpx request wrapper function. + Args: + method(Request.Method): request method type + url(str): target url of the request + **kwargs + Returns: + Request + """ + request = httpx.Request(method, url, **kwargs) + return request + + def _validate_response_data( + self, response: ResponseJson + ) -> Union[BaseModel, ResponseJson | None]: + """ + Validate response using given validation methods. If there is a validation method and response is not valid, + validation functions will raise an exception for them. + Args: + response(ResponseJson): response object + Returns: + ResponseJson: Validated Json object. + """ + + # We use raw response as a default value if there is no validation method or response is not valid. + validated_response = response + + try: + # If a validation model is provided, validate response using the validation model. + if self._validation_model: + validated_response = self._validate_response_by_model(response) + # Then, If a validation function is provided, validate response using the validation function. + if self._validation_function: + validated_response = self._validate_response_by_validation_function( + response + ) + except Exception as exception: + # If one of the validation methods does not confirm, raised exception will be silently handled. + # We assign this exception to classes instance to do further inspections via is_valid function. + self._exception = exception + + return validated_response + + def _validate_response_by_model(self, response: ResponseJson) -> BaseModel: + """ + Validate response json using the validation model. + Args: + response(ResponseJson): response object + Returns: + ResponseJson: Validated Json object. + """ + validated_data = BaseModel() + if self._validation_model: + validated_data = parse_obj_as(self._validation_model, response) + return validated_data + + def _validate_response_by_validation_function( + self, response: ResponseJson + ) -> ResponseJson | None: + """ + Validate response json using the validation function. + Args: + response(ResponseJson): response object + Returns: + ResponseJson: Validated Json object. + """ + validated_data = None + + if self._validation_function: + validated_data = self._validation_function(response) + + return validated_data + + def is_valid(self, raise_exceptions: bool = False) -> bool: + """ + Check response object's validity+. Raise exceptions if raise_exceptions flag is True. + Args: + raise_exceptions(bool) : a flag to raise exceptions in this check + Returns: + bool: validity of the data + """ + if self.has_exception and self._exception: + if raise_exceptions: + raise self._exception + return False + else: + # If there is no exception, that means there is no validation error. + return True + + def get_validated_data(self): + return self._validated_data + + @property + def json(self): + return self._json_response_data + + @property + def exception(self): + return self._exception + + @property + def has_exception(self): + return self.exception is not None + + @property + def raise_exceptions(self): + if self.has_exception and self._exception: + raise self._exception + + @property + def status(self): + return self._status + + +@contextmanager +def set_directory(path: Path | str): + """Context manager that sets the working directory to the given path.""" + origin = Path().absolute() + try: + os.chdir(path) + yield + finally: + os.chdir(origin) + + +def strip_invalid_filename_characters(filename: str, max_bytes: int = 200) -> str: + """Strips invalid characters from a filename and ensures that the file_length is less than `max_bytes` bytes.""" + filename = "".join([char for char in filename if char.isalnum() or char in "._- "]) + filename_len = len(filename.encode()) + if filename_len > max_bytes: + while filename_len > max_bytes: + if len(filename) == 0: + break + filename = filename[:-1] + filename_len = len(filename.encode()) + return filename + + +def sanitize_value_for_csv(value: str | Number) -> str | Number: + """ + Sanitizes a value that is being written to a CSV file to prevent CSV injection attacks. + Reference: https://owasp.org/www-community/attacks/CSV_Injection + """ + if isinstance(value, Number): + return value + unsafe_prefixes = ["=", "+", "-", "@", "\t", "\n"] + unsafe_sequences = [",=", ",+", ",-", ",@", ",\t", ",\n"] + if any(value.startswith(prefix) for prefix in unsafe_prefixes) or any( + sequence in value for sequence in unsafe_sequences + ): + value = "'" + value + return value + + +def sanitize_list_for_csv(values: List[Any]) -> List[Any]: + """ + Sanitizes a list of values (or a list of list of values) that is being written to a + CSV file to prevent CSV injection attacks. + """ + sanitized_values = [] + for value in values: + if isinstance(value, list): + sanitized_value = [sanitize_value_for_csv(v) for v in value] + sanitized_values.append(sanitized_value) + else: + sanitized_value = sanitize_value_for_csv(value) + sanitized_values.append(sanitized_value) + return sanitized_values + + +def append_unique_suffix(name: str, list_of_names: List[str]): + """Appends a numerical suffix to `name` so that it does not appear in `list_of_names`.""" + set_of_names: set[str] = set(list_of_names) # for O(1) lookup + if name not in set_of_names: + return name + else: + suffix_counter = 1 + new_name = name + f"_{suffix_counter}" + while new_name in set_of_names: + suffix_counter += 1 + new_name = name + f"_{suffix_counter}" + return new_name + + +def validate_url(possible_url: str) -> bool: + headers = {"User-Agent": "gradio (https://gradio.app/; team@gradio.app)"} + try: + return requests.get(possible_url, headers=headers).ok + except Exception: + return False + + +def is_update(val): + return isinstance(val, dict) and "update" in val.get("__type__", "") + + +def get_continuous_fn(fn: Callable, every: float) -> Callable: + def continuous_fn(*args): + while True: + output = fn(*args) + yield output + time.sleep(every) + + return continuous_fn + + +async def cancel_tasks(task_ids: set[str]): + if sys.version_info < (3, 8): + return None + + matching_tasks = [ + task for task in asyncio.all_tasks() if task.get_name() in task_ids + ] + for task in matching_tasks: + task.cancel() + await asyncio.gather(*matching_tasks, return_exceptions=True) + + +def set_task_name(task, session_hash: str, fn_index: int, batch: bool): + if sys.version_info >= (3, 8) and not ( + batch + ): # You shouldn't be able to cancel a task if it's part of a batch + task.set_name(f"{session_hash}_{fn_index}") + + +def get_cancel_function( + dependencies: List[Dict[str, Any]] +) -> Tuple[Callable, List[int]]: + fn_to_comp = {} + for dep in dependencies: + if Context.root_block: + fn_index = next( + i for i, d in enumerate(Context.root_block.dependencies) if d == dep + ) + fn_to_comp[fn_index] = [ + Context.root_block.blocks[o] for o in dep["outputs"] + ] + + async def cancel(session_hash: str) -> None: + task_ids = set([f"{session_hash}_{fn}" for fn in fn_to_comp]) + await cancel_tasks(task_ids) + + return ( + cancel, + list(fn_to_comp.keys()), + ) + + +def check_function_inputs_match(fn: Callable, inputs: List, inputs_as_dict: bool): + """ + Checks if the input component set matches the function + Returns: None if valid, a string error message if mismatch + """ + + def is_special_typed_parameter(name): + from gradio.routes import Request + + """Checks if parameter has a type hint designating it as a gr.Request""" + return parameter_types.get(name, "") == Request + + signature = inspect.signature(fn) + parameter_types = typing.get_type_hints(fn) if inspect.isfunction(fn) else {} + min_args = 0 + max_args = 0 + infinity = -1 + for name, param in signature.parameters.items(): + has_default = param.default != param.empty + if param.kind in [param.POSITIONAL_ONLY, param.POSITIONAL_OR_KEYWORD]: + if not (is_special_typed_parameter(name)): + if not has_default: + min_args += 1 + max_args += 1 + elif param.kind == param.VAR_POSITIONAL: + max_args = infinity + elif param.kind == param.KEYWORD_ONLY: + if not has_default: + return f"Keyword-only args must have default values for function {fn}" + arg_count = 1 if inputs_as_dict else len(inputs) + if min_args == max_args and max_args != arg_count: + warnings.warn( + f"Expected {max_args} arguments for function {fn}, received {arg_count}." + ) + if arg_count < min_args: + warnings.warn( + f"Expected at least {min_args} arguments for function {fn}, received {arg_count}." + ) + if max_args != infinity and arg_count > max_args: + warnings.warn( + f"Expected maximum {max_args} arguments for function {fn}, received {arg_count}." + ) + + +class TupleNoPrint(tuple): + # To remove printing function return in notebook + def __repr__(self): + return "" + + def __str__(self): + return "" + + +def tex2svg(formula, *args): + FONTSIZE = 20 + DPI = 300 + plt.rc("mathtext", fontset="cm") + fig = plt.figure(figsize=(0.01, 0.01)) + fig.text(0, 0, r"${}$".format(formula), fontsize=FONTSIZE) + output = BytesIO() + fig.savefig( + output, + dpi=DPI, + transparent=True, + format="svg", + bbox_inches="tight", + pad_inches=0.0, + ) + plt.close(fig) + output.seek(0) + xml_code = output.read().decode("utf-8") + svg_start = xml_code.index(".*<\/metadata>", "", svg_code, flags=re.DOTALL) + copy_code = f"{formula}" + return f"{copy_code}{svg_code}" diff --git a/gradio-modified/gradio/version.txt b/gradio-modified/gradio/version.txt new file mode 100644 index 0000000000000000000000000000000000000000..f02113fe87c3358a5c900a87ccfd610816fd1eb4 --- /dev/null +++ b/gradio-modified/gradio/version.txt @@ -0,0 +1 @@ +3.15.0 diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8fd8a2a2c887f76f9f64622c576da8dc39baf01c --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +torch==1.12.1 +torchvision diff --git a/weights/.gitkeep b/weights/.gitkeep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/weights/pkp-v1.cpu.jit.pt b/weights/pkp-v1.cpu.jit.pt new file mode 100644 index 0000000000000000000000000000000000000000..2c64dd6d2357bea8ed19af7791c0660253b2d9d7 --- /dev/null +++ b/weights/pkp-v1.cpu.jit.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d766036dffa932d7c0ed72942e8e639e36f371a965277e53b19f1bd7cee6775a +size 626381371 diff --git a/weights/pkp-v1.cuda.jit.pt b/weights/pkp-v1.cuda.jit.pt new file mode 100644 index 0000000000000000000000000000000000000000..df28c95b756a4ab60e00e9a08fe6946f9af6499b --- /dev/null +++ b/weights/pkp-v1.cuda.jit.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a4ecbddf3f129b66df69d232c98920409bae84a0e3618ce9a18228d837f78521 +size 626382594